@tmsoft/webphone 5.1.0 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,45 +1,45 @@
1
1
  (function(){try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(`@import "https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Manrope:wght@200..800&family=Monda:wght@400..700&display=swap&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap&family=Quicksand:wght@300..700&display=swap";@import "https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Manrope:wght@200..800&family=Monda:wght@400..700&display=swap&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap&family=Quicksand:wght@300..700&display=swap";@layer components;@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-outline-style:solid;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-outline-style:solid;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}[data-v-9b88a405],[data-v-9b88a405]:before,[data-v-9b88a405]:after{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-outline-style:solid;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}[data-v-9b88a405]::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-outline-style:solid;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--wp-font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--wp-color-red-500:#fb2c36;--wp-color-amber-100:#fef3c6;--wp-color-amber-400:#fcbb00;--wp-color-amber-500:#f99c00;--wp-color-amber-600:#dd7400;--wp-color-amber-900:#7b3306;--wp-color-green-500:#00c758;--wp-color-emerald-100:#d0fae5;--wp-color-emerald-400:#00d294;--wp-color-emerald-600:#009767;--wp-color-emerald-900:#004e3b;--wp-color-blue-100:#dbeafe;--wp-color-blue-400:#54a2ff;--wp-color-blue-500:#3080ff;--wp-color-blue-600:#155dfc;--wp-color-blue-900:#1c398e;--wp-color-purple-100:#f3e8ff;--wp-color-purple-400:#c07eff;--wp-color-purple-600:#9810fa;--wp-color-purple-900:#59168b;--wp-color-neutral-100:#f5f5f5;--wp-color-neutral-200:#e5e5e5;--wp-color-neutral-400:#a1a1a1;--wp-color-neutral-500:#737373;--wp-color-neutral-600:#525252;--wp-color-neutral-700:#404040;--wp-color-neutral-800:#262626;--wp-color-neutral-900:#171717;--wp-color-black:#000;--wp-color-white:#fff;--wp-spacing:.25rem;--wp-breakpoint-2xl:96rem;--wp-container-sm:24rem;--wp-container-md:28rem;--wp-container-lg:32rem;--wp-text-xs:.75rem;--wp-text-xs--line-height:calc(1 / .75);--wp-text-sm:.875rem;--wp-text-sm--line-height:calc(1.25 / .875);--wp-text-base:1rem;--wp-text-base--line-height:calc(1.5 / 1);--wp-text-lg:1.125rem;--wp-text-lg--line-height:calc(1.75 / 1.125);--wp-text-3xl:1.875rem;--wp-text-3xl--line-height:calc(2.25 / 1.875);--wp-font-weight-light:300;--wp-font-weight-medium:500;--wp-font-weight-semibold:600;--wp-font-weight-bold:700;--wp-tracking-wider:.05em;--wp-tracking-widest:.1em;--wp-radius-xs:.125rem;--wp-radius-2xl:1rem;--wp-ease-in-out:cubic-bezier(.4, 0, .2, 1);--wp-animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--wp-aspect-video:16 / 9;--wp-default-transition-duration:.15s;--wp-default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--wp-default-font-family:"Montserrat", sans-serif;--wp-default-mono-font-family:var(--wp-font-mono)}@supports (color:color(display-p3 0 0 0)){:root,:host{--wp-color-red-500:color(display-p3 .903738 .262579 .253307);--wp-color-amber-100:color(display-p3 .989391 .954583 .796328);--wp-color-amber-400:color(display-p3 .959186 .738519 .118268);--wp-color-amber-500:color(display-p3 .93994 .620584 .0585367);--wp-color-amber-600:color(display-p3 .827144 .467166 .0336006);--wp-color-amber-900:color(display-p3 .445958 .216422 .0823321);--wp-color-green-500:color(display-p3 .308734 .774754 .374307);--wp-color-emerald-100:color(display-p3 .848335 .975974 .901691);--wp-color-emerald-400:color(display-p3 .334701 .819603 .591575);--wp-color-emerald-600:color(display-p3 .206557 .589057 .413962);--wp-color-emerald-900:color(display-p3 .117821 .302975 .234501);--wp-color-blue-100:color(display-p3 .869214 .915931 .989622);--wp-color-blue-400:color(display-p3 .397443 .62813 .992116);--wp-color-blue-500:color(display-p3 .266422 .491219 .988624);--wp-color-blue-600:color(display-p3 .174493 .358974 .950247);--wp-color-blue-900:color(display-p3 .136395 .219428 .537145);--wp-color-purple-100:color(display-p3 .945034 .910569 .992972);--wp-color-purple-400:color(display-p3 .719919 .492497 .995173);--wp-color-purple-600:color(display-p3 .546729 .130167 .94439);--wp-color-purple-900:color(display-p3 .321698 .107597 .524563);--wp-color-neutral-100:color(display-p3 .960587 .960587 .960587);--wp-color-neutral-200:color(display-p3 .898161 .898161 .898161);--wp-color-neutral-400:color(display-p3 .630163 .630163 .630163);--wp-color-neutral-500:color(display-p3 .451519 .451519 .451519);--wp-color-neutral-600:color(display-p3 .321993 .321993 .321993);--wp-color-neutral-700:color(display-p3 .250471 .250471 .250471);--wp-color-neutral-800:color(display-p3 .149382 .149382 .149382);--wp-color-neutral-900:color(display-p3 .0905274 .0905274 .0905274)}}@supports (color:lab(0% 0 0)){:root,:host{--wp-color-red-500:lab(55.4814% 75.0732 48.8528);--wp-color-amber-100:lab(95.916% -1.21653 23.111);--wp-color-amber-400:lab(80.1641% 16.6016 99.2089);--wp-color-amber-500:lab(72.7183% 31.8672 97.9407);--wp-color-amber-600:lab(60.3514% 40.5624 87.1228);--wp-color-amber-900:lab(31.2288% 30.2627 40.0378);--wp-color-green-500:lab(70.5521% -66.5147 45.8073);--wp-color-emerald-100:lab(94.9004% -17.0769 5.63836);--wp-color-emerald-400:lab(75.0771% -60.7313 19.4147);--wp-color-emerald-600:lab(55.0481% -49.9246 15.93);--wp-color-emerald-900:lab(28.8637% -26.9249 5.45986);--wp-color-blue-100:lab(92.0301% -2.24757 -11.6453);--wp-color-blue-400:lab(65.0361% -1.42065 -56.9802);--wp-color-blue-500:lab(54.1736% 13.3369 -74.6839);--wp-color-blue-600:lab(44.0605% 29.0279 -86.0352);--wp-color-blue-900:lab(26.1542% 15.7545 -51.5504);--wp-color-purple-100:lab(93.3333% 6.97437 -9.83434);--wp-color-purple-400:lab(63.6946% 47.6127 -59.2066);--wp-color-purple-600:lab(43.0295% 75.21 -86.5669);--wp-color-purple-900:lab(24.9401% 45.2703 -51.2728);--wp-color-neutral-100:lab(96.52% -.0000298023 .0000119209);--wp-color-neutral-200:lab(90.952% 0 -.0000119209);--wp-color-neutral-400:lab(66.128% -.0000298023 .0000119209);--wp-color-neutral-500:lab(48.496% 0 0);--wp-color-neutral-600:lab(34.924% 0 0);--wp-color-neutral-700:lab(27.036% 0 0);--wp-color-neutral-800:lab(15.204% 0 -.00000596046);--wp-color-neutral-900:lab(7.78201% -.0000149012 0)}}[data-v-9b88a405]:root,[data-v-9b88a405]:host{--wp-font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--wp-color-red-500:#fb2c36;--wp-color-amber-100:#fef3c6;--wp-color-amber-400:#fcbb00;--wp-color-amber-500:#f99c00;--wp-color-amber-600:#dd7400;--wp-color-amber-900:#7b3306;--wp-color-green-500:#00c758;--wp-color-emerald-100:#d0fae5;--wp-color-emerald-400:#00d294;--wp-color-emerald-600:#009767;--wp-color-emerald-900:#004e3b;--wp-color-blue-100:#dbeafe;--wp-color-blue-400:#54a2ff;--wp-color-blue-500:#3080ff;--wp-color-blue-600:#155dfc;--wp-color-blue-900:#1c398e;--wp-color-purple-100:#f3e8ff;--wp-color-purple-400:#c07eff;--wp-color-purple-600:#9810fa;--wp-color-purple-900:#59168b;--wp-color-neutral-100:#f5f5f5;--wp-color-neutral-200:#e5e5e5;--wp-color-neutral-400:#a1a1a1;--wp-color-neutral-500:#737373;--wp-color-neutral-600:#525252;--wp-color-neutral-700:#404040;--wp-color-neutral-800:#262626;--wp-color-neutral-900:#171717;--wp-color-black:#000;--wp-color-white:#fff;--wp-spacing:.25rem;--wp-breakpoint-2xl:96rem;--wp-container-sm:24rem;--wp-container-md:28rem;--wp-container-lg:32rem;--wp-text-xs:.75rem;--wp-text-xs--line-height:calc(1 / .75);--wp-text-sm:.875rem;--wp-text-sm--line-height:calc(1.25 / .875);--wp-text-base:1rem;--wp-text-base--line-height:calc(1.5 / 1);--wp-text-lg:1.125rem;--wp-text-lg--line-height:calc(1.75 / 1.125);--wp-text-3xl:1.875rem;--wp-text-3xl--line-height:calc(2.25 / 1.875);--wp-font-weight-light:300;--wp-font-weight-medium:500;--wp-font-weight-semibold:600;--wp-font-weight-bold:700;--wp-tracking-wider:.05em;--wp-tracking-widest:.1em;--wp-radius-xs:.125rem;--wp-radius-2xl:1rem;--wp-ease-in-out:cubic-bezier(.4, 0, .2, 1);--wp-animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--wp-aspect-video:16 / 9;--wp-default-transition-duration:.15s;--wp-default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--wp-default-font-family:"Montserrat", sans-serif;--wp-default-mono-font-family:var(--wp-font-mono)}@supports (color:color(display-p3 0 0 0)){[data-v-9b88a405]:root,[data-v-9b88a405]:host{--wp-color-red-500:color(display-p3 .903738 .262579 .253307);--wp-color-amber-100:color(display-p3 .989391 .954583 .796328);--wp-color-amber-400:color(display-p3 .959186 .738519 .118268);--wp-color-amber-500:color(display-p3 .93994 .620584 .0585367);--wp-color-amber-600:color(display-p3 .827144 .467166 .0336006);--wp-color-amber-900:color(display-p3 .445958 .216422 .0823321);--wp-color-green-500:color(display-p3 .308734 .774754 .374307);--wp-color-emerald-100:color(display-p3 .848335 .975974 .901691);--wp-color-emerald-400:color(display-p3 .334701 .819603 .591575);--wp-color-emerald-600:color(display-p3 .206557 .589057 .413962);--wp-color-emerald-900:color(display-p3 .117821 .302975 .234501);--wp-color-blue-100:color(display-p3 .869214 .915931 .989622);--wp-color-blue-400:color(display-p3 .397443 .62813 .992116);--wp-color-blue-500:color(display-p3 .266422 .491219 .988624);--wp-color-blue-600:color(display-p3 .174493 .358974 .950247);--wp-color-blue-900:color(display-p3 .136395 .219428 .537145);--wp-color-purple-100:color(display-p3 .945034 .910569 .992972);--wp-color-purple-400:color(display-p3 .719919 .492497 .995173);--wp-color-purple-600:color(display-p3 .546729 .130167 .94439);--wp-color-purple-900:color(display-p3 .321698 .107597 .524563);--wp-color-neutral-100:color(display-p3 .960587 .960587 .960587);--wp-color-neutral-200:color(display-p3 .898161 .898161 .898161);--wp-color-neutral-400:color(display-p3 .630163 .630163 .630163);--wp-color-neutral-500:color(display-p3 .451519 .451519 .451519);--wp-color-neutral-600:color(display-p3 .321993 .321993 .321993);--wp-color-neutral-700:color(display-p3 .250471 .250471 .250471);--wp-color-neutral-800:color(display-p3 .149382 .149382 .149382);--wp-color-neutral-900:color(display-p3 .0905274 .0905274 .0905274)}}@supports (color:lab(0% 0 0)){[data-v-9b88a405]:root,[data-v-9b88a405]:host{--wp-color-red-500:lab(55.4814% 75.0732 48.8528);--wp-color-amber-100:lab(95.916% -1.21653 23.111);--wp-color-amber-400:lab(80.1641% 16.6016 99.2089);--wp-color-amber-500:lab(72.7183% 31.8672 97.9407);--wp-color-amber-600:lab(60.3514% 40.5624 87.1228);--wp-color-amber-900:lab(31.2288% 30.2627 40.0378);--wp-color-green-500:lab(70.5521% -66.5147 45.8073);--wp-color-emerald-100:lab(94.9004% -17.0769 5.63836);--wp-color-emerald-400:lab(75.0771% -60.7313 19.4147);--wp-color-emerald-600:lab(55.0481% -49.9246 15.93);--wp-color-emerald-900:lab(28.8637% -26.9249 5.45986);--wp-color-blue-100:lab(92.0301% -2.24757 -11.6453);--wp-color-blue-400:lab(65.0361% -1.42065 -56.9802);--wp-color-blue-500:lab(54.1736% 13.3369 -74.6839);--wp-color-blue-600:lab(44.0605% 29.0279 -86.0352);--wp-color-blue-900:lab(26.1542% 15.7545 -51.5504);--wp-color-purple-100:lab(93.3333% 6.97437 -9.83434);--wp-color-purple-400:lab(63.6946% 47.6127 -59.2066);--wp-color-purple-600:lab(43.0295% 75.21 -86.5669);--wp-color-purple-900:lab(24.9401% 45.2703 -51.2728);--wp-color-neutral-100:lab(96.52% -.0000298023 .0000119209);--wp-color-neutral-200:lab(90.952% 0 -.0000119209);--wp-color-neutral-400:lab(66.128% -.0000298023 .0000119209);--wp-color-neutral-500:lab(48.496% 0 0);--wp-color-neutral-600:lab(34.924% 0 0);--wp-color-neutral-700:lab(27.036% 0 0);--wp-color-neutral-800:lab(15.204% 0 -.00000596046);--wp-color-neutral-900:lab(7.78201% -.0000149012 0)}}}@layer base{*,:after,:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::-webkit-file-upload-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--wp-default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--wp-default-font-feature-settings,normal);font-variation-settings:var(--wp-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--wp-default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--wp-default-mono-font-feature-settings,normal);font-variation-settings:var(--wp-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::-webkit-file-upload-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:-webkit-any([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:-webkit-any([multiple],[size])) optgroup option{padding-inline-start:20px}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::-webkit-file-upload-button{margin-inline-end:4px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-year-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-month-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-day-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-hour-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-minute-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-second-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-millisecond-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-meridiem-field{padding-block-start:0;padding-block-end:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button{-webkit-appearance:button;appearance:button}input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;appearance:button}::-webkit-file-upload-button{-webkit-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){*{outline-color:color-mix(in oklab, var(--ring) 50%, transparent)}}body{background-color:var(--background);color:var(--foreground)}[data-v-9b88a405],[data-v-9b88a405]:after,[data-v-9b88a405]:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}[data-v-9b88a405]::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}[data-v-9b88a405]::-webkit-file-upload-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}[data-v-9b88a405]::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html[data-v-9b88a405],[data-v-9b88a405]:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--wp-default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--wp-default-font-feature-settings,normal);font-variation-settings:var(--wp-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr[data-v-9b88a405]{height:0;color:inherit;border-top-width:1px}abbr[data-v-9b88a405]:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1[data-v-9b88a405],h2[data-v-9b88a405],h3[data-v-9b88a405],h4[data-v-9b88a405],h5[data-v-9b88a405],h6[data-v-9b88a405]{font-size:inherit;font-weight:inherit}a[data-v-9b88a405]{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b[data-v-9b88a405],strong[data-v-9b88a405]{font-weight:bolder}code[data-v-9b88a405],kbd[data-v-9b88a405],samp[data-v-9b88a405],pre[data-v-9b88a405]{font-family:var(--wp-default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--wp-default-mono-font-feature-settings,normal);font-variation-settings:var(--wp-default-mono-font-variation-settings,normal);font-size:1em}small[data-v-9b88a405]{font-size:80%}sub[data-v-9b88a405],sup[data-v-9b88a405]{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub[data-v-9b88a405]{bottom:-.25em}sup[data-v-9b88a405]{top:-.5em}table[data-v-9b88a405]{text-indent:0;border-color:inherit;border-collapse:collapse}[data-v-9b88a405]:-moz-focusring{outline:auto}progress[data-v-9b88a405]{vertical-align:baseline}summary[data-v-9b88a405]{display:list-item}ol[data-v-9b88a405],ul[data-v-9b88a405],menu[data-v-9b88a405]{list-style:none}img[data-v-9b88a405],svg[data-v-9b88a405],video[data-v-9b88a405],canvas[data-v-9b88a405],audio[data-v-9b88a405],iframe[data-v-9b88a405],embed[data-v-9b88a405],object[data-v-9b88a405]{vertical-align:middle;display:block}img[data-v-9b88a405],video[data-v-9b88a405]{max-width:100%;height:auto}button[data-v-9b88a405],input[data-v-9b88a405],select[data-v-9b88a405],optgroup[data-v-9b88a405],textarea[data-v-9b88a405]{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}[data-v-9b88a405]::-webkit-file-upload-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}[data-v-9b88a405]::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:-webkit-any([multiple],[size])) optgroup[data-v-9b88a405]{font-weight:bolder}:where(select:is([multiple],[size])) optgroup[data-v-9b88a405]{font-weight:bolder}:where(select:-webkit-any([multiple],[size])) optgroup option[data-v-9b88a405]{padding-inline-start:20px}:where(select:is([multiple],[size])) optgroup option[data-v-9b88a405]{padding-inline-start:20px}[data-v-9b88a405]::-webkit-file-upload-button{margin-inline-end:4px}[data-v-9b88a405]::file-selector-button{margin-inline-end:4px}[data-v-9b88a405]::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){[data-v-9b88a405]::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){[data-v-9b88a405]::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea[data-v-9b88a405]{resize:vertical}[data-v-9b88a405]::-webkit-search-decoration{-webkit-appearance:none}[data-v-9b88a405]::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}[data-v-9b88a405]::-webkit-datetime-edit{display:inline-flex}[data-v-9b88a405]::-webkit-datetime-edit-fields-wrapper{padding:0}[data-v-9b88a405]::-webkit-datetime-edit{padding-block-start:0;padding-block-end:0}[data-v-9b88a405]::-webkit-datetime-edit-year-field{padding-block-start:0;padding-block-end:0}[data-v-9b88a405]::-webkit-datetime-edit-month-field{padding-block-start:0;padding-block-end:0}[data-v-9b88a405]::-webkit-datetime-edit-day-field{padding-block-start:0;padding-block-end:0}[data-v-9b88a405]::-webkit-datetime-edit-hour-field{padding-block-start:0;padding-block-end:0}[data-v-9b88a405]::-webkit-datetime-edit-minute-field{padding-block-start:0;padding-block-end:0}[data-v-9b88a405]::-webkit-datetime-edit-second-field{padding-block-start:0;padding-block-end:0}[data-v-9b88a405]::-webkit-datetime-edit-millisecond-field{padding-block-start:0;padding-block-end:0}[data-v-9b88a405]::-webkit-datetime-edit-meridiem-field{padding-block-start:0;padding-block-end:0}[data-v-9b88a405]::-webkit-calendar-picker-indicator{line-height:1}[data-v-9b88a405]:-moz-ui-invalid{box-shadow:none}button[data-v-9b88a405]{-webkit-appearance:button;appearance:button}input[data-v-9b88a405]:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;appearance:button}[data-v-9b88a405]::-webkit-file-upload-button{-webkit-appearance:button;appearance:button}[data-v-9b88a405]::file-selector-button{-webkit-appearance:button;appearance:button}[data-v-9b88a405]::-webkit-inner-spin-button{height:auto}[data-v-9b88a405]::-webkit-outer-spin-button{height:auto}[hidden][data-v-9b88a405]:where(:not([hidden=until-found])){display:none!important}[data-v-9b88a405]{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){[data-v-9b88a405]{outline-color:color-mix(in oklab, var(--ring) 50%, transparent)}}body[data-v-9b88a405]{background-color:var(--background);color:var(--foreground)}}@layer utilities{.wp\\:\\@container\\/card-header{container:card-header/inline-size}.wp\\:pointer-events-none{pointer-events:none}.wp\\:sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.wp\\:absolute{position:absolute}.wp\\:fixed{position:fixed}.wp\\:relative{position:relative}.wp\\:sticky{position:sticky}.wp\\:inset-0{inset:calc(var(--wp-spacing) * 0)}.wp\\:inset-x-0{inset-inline:calc(var(--wp-spacing) * 0)}.wp\\:top-0{top:calc(var(--wp-spacing) * 0)}.wp\\:top-1\\/2{top:50%}.wp\\:top-2\\.5{top:calc(var(--wp-spacing) * 2.5)}.wp\\:top-4{top:calc(var(--wp-spacing) * 4)}.wp\\:top-\\[50\\%\\]{top:50%}.wp\\:top-full{top:100%}.wp\\:right-0{right:calc(var(--wp-spacing) * 0)}.wp\\:right-1{right:calc(var(--wp-spacing) * 1)}.wp\\:right-2{right:calc(var(--wp-spacing) * 2)}.wp\\:right-4{right:calc(var(--wp-spacing) * 4)}.wp\\:bottom-2{bottom:calc(var(--wp-spacing) * 2)}.wp\\:bottom-full{bottom:100%}.wp\\:left-0{left:calc(var(--wp-spacing) * 0)}.wp\\:left-0\\.5{left:calc(var(--wp-spacing) * .5)}.wp\\:left-2{left:calc(var(--wp-spacing) * 2)}.wp\\:left-\\[50\\%\\]{left:50%}.wp\\:z-10{z-index:10}.wp\\:z-40{z-index:40}.wp\\:z-50{z-index:50}.wp\\:order-first{order:-9999}.wp\\:col-start-2{grid-column-start:2}.wp\\:row-span-2{grid-row:span 2/span 2}.wp\\:row-start-1{grid-row-start:1}.wp\\:container{width:100%}@media (min-width:40rem){.wp\\:container{max-width:40rem}}@media (min-width:48rem){.wp\\:container{max-width:48rem}}@media (min-width:64rem){.wp\\:container{max-width:64rem}}@media (min-width:80rem){.wp\\:container{max-width:80rem}}@media (min-width:96rem){.wp\\:container{max-width:96rem}}.wp\\:-mx-1{margin-inline:calc(var(--wp-spacing) * -1)}.wp\\:mx-2{margin-inline:calc(var(--wp-spacing) * 2)}.wp\\:mx-auto{margin-inline-start:auto;margin-inline-end:auto}.wp\\:my-1{margin-block:calc(var(--wp-spacing) * 1)}.wp\\:my-2{margin-block:calc(var(--wp-spacing) * 2)}.wp\\:my-8{margin-block:calc(var(--wp-spacing) * 8)}.wp\\:mt-1{margin-top:calc(var(--wp-spacing) * 1)}.wp\\:mr-4{margin-right:calc(var(--wp-spacing) * 4)}.wp\\:mr-auto{margin-right:auto}.wp\\:mb-1{margin-bottom:calc(var(--wp-spacing) * 1)}.wp\\:mb-2{margin-bottom:calc(var(--wp-spacing) * 2)}.wp\\:mb-4{margin-bottom:calc(var(--wp-spacing) * 4)}.wp\\:mb-5{margin-bottom:calc(var(--wp-spacing) * 5)}.wp\\:ml-auto{margin-left:auto}.wp\\:block{display:block}.wp\\:flex{display:flex}.wp\\:grid{display:grid}.wp\\:hidden{display:none}.wp\\:inline-flex{display:inline-flex}.wp\\:aspect-square{aspect-ratio:1}.wp\\:aspect-video{aspect-ratio:var(--wp-aspect-video)}.wp\\:size-2{width:calc(var(--wp-spacing) * 2);height:calc(var(--wp-spacing) * 2)}.wp\\:size-2\\.5{width:calc(var(--wp-spacing) * 2.5);height:calc(var(--wp-spacing) * 2.5)}.wp\\:size-3{width:calc(var(--wp-spacing) * 3);height:calc(var(--wp-spacing) * 3)}.wp\\:size-3\\.5{width:calc(var(--wp-spacing) * 3.5);height:calc(var(--wp-spacing) * 3.5)}.wp\\:size-4{width:calc(var(--wp-spacing) * 4);height:calc(var(--wp-spacing) * 4)}.wp\\:size-5{width:calc(var(--wp-spacing) * 5);height:calc(var(--wp-spacing) * 5)}.wp\\:size-6{width:calc(var(--wp-spacing) * 6);height:calc(var(--wp-spacing) * 6)}.wp\\:size-7{width:calc(var(--wp-spacing) * 7);height:calc(var(--wp-spacing) * 7)}.wp\\:size-8{width:calc(var(--wp-spacing) * 8);height:calc(var(--wp-spacing) * 8)}.wp\\:size-9{width:calc(var(--wp-spacing) * 9);height:calc(var(--wp-spacing) * 9)}.wp\\:size-10{width:calc(var(--wp-spacing) * 10);height:calc(var(--wp-spacing) * 10)}.wp\\:size-12{width:calc(var(--wp-spacing) * 12);height:calc(var(--wp-spacing) * 12)}.wp\\:size-full{width:100%;height:100%}.wp\\:h-2\\.5{height:calc(var(--wp-spacing) * 2.5)}.wp\\:h-3{height:calc(var(--wp-spacing) * 3)}.wp\\:h-4{height:calc(var(--wp-spacing) * 4)}.wp\\:h-5{height:calc(var(--wp-spacing) * 5)}.wp\\:h-6{height:calc(var(--wp-spacing) * 6)}.wp\\:h-7{height:calc(var(--wp-spacing) * 7)}.wp\\:h-8{height:calc(var(--wp-spacing) * 8)}.wp\\:h-9{height:calc(var(--wp-spacing) * 9)}.wp\\:h-10{height:calc(var(--wp-spacing) * 10)}.wp\\:h-12{height:calc(var(--wp-spacing) * 12)}.wp\\:h-14{height:calc(var(--wp-spacing) * 14)}.wp\\:h-16{height:calc(var(--wp-spacing) * 16)}.wp\\:h-64{height:calc(var(--wp-spacing) * 64)}.wp\\:h-80{height:calc(var(--wp-spacing) * 80)}.wp\\:h-\\[15px\\]{height:15px}.wp\\:h-\\[16px\\]{height:16px}.wp\\:h-\\[60vh\\]{height:60vh}.wp\\:h-\\[var\\(--reka-select-trigger-height\\)\\]{height:var(--reka-select-trigger-height)}.wp\\:h-full{height:100%}.wp\\:h-px{height:1px}.wp\\:max-h-\\(--reka-dropdown-menu-content-available-height\\){max-height:var(--reka-dropdown-menu-content-available-height)}.wp\\:max-h-\\(--reka-select-content-available-height\\){max-height:var(--reka-select-content-available-height)}.wp\\:max-h-0{max-height:calc(var(--wp-spacing) * 0)}.wp\\:max-h-40{max-height:calc(var(--wp-spacing) * 40)}.wp\\:max-h-60{max-height:calc(var(--wp-spacing) * 60)}.wp\\:max-h-\\[300px\\]{max-height:300px}.wp\\:min-h-10{min-height:calc(var(--wp-spacing) * 10)}.wp\\:min-h-\\[calc\\(100vh-3\\.5rem\\)\\]{min-height:calc(100vh - 3.5rem)}.wp\\:min-h-screen{min-height:100vh}.wp\\:\\!w-full{width:100%!important}.wp\\:w-2\\.5{width:calc(var(--wp-spacing) * 2.5)}.wp\\:w-3{width:calc(var(--wp-spacing) * 3)}.wp\\:w-4{width:calc(var(--wp-spacing) * 4)}.wp\\:w-5{width:calc(var(--wp-spacing) * 5)}.wp\\:w-6{width:calc(var(--wp-spacing) * 6)}.wp\\:w-8{width:calc(var(--wp-spacing) * 8)}.wp\\:w-9{width:calc(var(--wp-spacing) * 9)}.wp\\:w-12{width:calc(var(--wp-spacing) * 12)}.wp\\:w-16{width:calc(var(--wp-spacing) * 16)}.wp\\:w-24{width:calc(var(--wp-spacing) * 24)}.wp\\:w-48{width:calc(var(--wp-spacing) * 48)}.wp\\:w-72{width:calc(var(--wp-spacing) * 72)}.wp\\:w-\\[15px\\]{width:15px}.wp\\:w-\\[16px\\]{width:16px}.wp\\:w-\\[min\\(92vw\\,330px\\)\\]{width:min(92vw,330px)}.wp\\:w-auto{width:auto}.wp\\:w-fit{width:-moz-fit-content;width:fit-content}.wp\\:w-full{width:100%}.wp\\:max-w-80{max-width:calc(var(--wp-spacing) * 80)}.wp\\:max-w-\\[330px\\]{max-width:330px}.wp\\:max-w-\\[calc\\(100\\%-2rem\\)\\]{max-width:calc(100% - 2rem)}.wp\\:max-w-lg{max-width:var(--wp-container-lg)}.wp\\:max-w-md{max-width:var(--wp-container-md)}.wp\\:max-w-screen-2xl{max-width:var(--wp-breakpoint-2xl)}.wp\\:min-w-0{min-width:calc(var(--wp-spacing) * 0)}.wp\\:min-w-5{min-width:calc(var(--wp-spacing) * 5)}.wp\\:min-w-8{min-width:calc(var(--wp-spacing) * 8)}.wp\\:min-w-9{min-width:calc(var(--wp-spacing) * 9)}.wp\\:min-w-10{min-width:calc(var(--wp-spacing) * 10)}.wp\\:min-w-\\[8rem\\]{min-width:8rem}.wp\\:min-w-\\[var\\(--reka-select-trigger-width\\)\\]{min-width:var(--reka-select-trigger-width)}.wp\\:flex-1{flex:1}.wp\\:shrink-0{flex-shrink:0}.wp\\:grow{flex-grow:1}.wp\\:origin-\\(--reka-dropdown-menu-content-transform-origin\\){transform-origin:var(--reka-dropdown-menu-content-transform-origin)}.wp\\:origin-\\(--reka-popover-content-transform-origin\\){transform-origin:var(--reka-popover-content-transform-origin)}.wp\\:translate-x-0{--tw-translate-x:calc(var(--wp-spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:translate-x-5{--tw-translate-x:calc(var(--wp-spacing) * 5);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:translate-x-\\[-50\\%\\]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:translate-y-0\\.5{--tw-translate-y:calc(var(--wp-spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:translate-y-\\[-50\\%\\]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:translate-y-\\[calc\\(-50\\%_-_2px\\)\\]{--tw-translate-y:calc(-50% - 2px);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:rotate-45{rotate:45deg}.wp\\:animate-in{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.wp\\:animate-pulse{animation:var(--wp-animate-pulse)}.wp\\:cursor-default{cursor:default}.wp\\:cursor-move{cursor:move}.wp\\:cursor-pointer{cursor:pointer}.wp\\:touch-none{touch-action:none}.wp\\:scroll-my-1{scroll-margin-block:calc(var(--wp-spacing) * 1)}.wp\\:scroll-py-1{scroll-padding-block:calc(var(--wp-spacing) * 1)}.wp\\:auto-rows-min{grid-auto-rows:min-content}.wp\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.wp\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.wp\\:grid-rows-\\[auto_auto\\]{grid-template-rows:auto auto}.wp\\:flex-col{flex-direction:column}.wp\\:flex-col-reverse{flex-direction:column-reverse}.wp\\:place-items-center{place-items:center}.wp\\:items-center{align-items:center}.wp\\:items-end{align-items:flex-end}.wp\\:items-start{align-items:flex-start}.wp\\:justify-between{justify-content:space-between}.wp\\:justify-center{justify-content:center}.wp\\:justify-start{justify-content:flex-start}.wp\\:gap-0{gap:calc(var(--wp-spacing) * 0)}.wp\\:gap-1{gap:calc(var(--wp-spacing) * 1)}.wp\\:gap-1\\.5{gap:calc(var(--wp-spacing) * 1.5)}.wp\\:gap-2{gap:calc(var(--wp-spacing) * 2)}.wp\\:gap-3{gap:calc(var(--wp-spacing) * 3)}.wp\\:gap-4{gap:calc(var(--wp-spacing) * 4)}.wp\\:gap-6{gap:calc(var(--wp-spacing) * 6)}.wp\\:gap-\\[--spacing\\(var\\(--gap\\)\\)\\]{gap:calc(var(--wp-spacing) * var(--gap))}:where(.wp\\:space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--wp-spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--wp-spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.wp\\:space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--wp-spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--wp-spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.wp\\:space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--wp-spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--wp-spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.wp\\:gap-x-6{column-gap:calc(var(--wp-spacing) * 6)}.wp\\:gap-y-3{row-gap:calc(var(--wp-spacing) * 3)}.wp\\:self-start{align-self:flex-start}.wp\\:justify-self-end{justify-self:flex-end}.wp\\:truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.wp\\:overflow-auto{overflow:auto}.wp\\:overflow-hidden{overflow:hidden}.wp\\:overflow-x-hidden{overflow-x:hidden}.wp\\:overflow-y-auto{overflow-y:auto}.wp\\:rounded{border-radius:.25rem}.wp\\:rounded-2xl{border-radius:var(--wp-radius-2xl)}.wp\\:rounded-\\[2px\\]{border-radius:2px}.wp\\:rounded-\\[inherit\\]{border-radius:inherit}.wp\\:rounded-full{border-radius:3.40282e38px}.wp\\:rounded-lg{border-radius:var(--radius)}.wp\\:rounded-md{border-radius:calc(var(--radius) - 2px)}.wp\\:rounded-sm{border-radius:calc(var(--radius) - 4px)}.wp\\:rounded-xl{border-radius:calc(var(--radius) + 4px)}.wp\\:rounded-xs{border-radius:var(--wp-radius-xs)}.wp\\:border{border-style:var(--tw-border-style);border-width:1px}.wp\\:border-0{border-style:var(--tw-border-style);border-width:0}.wp\\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.wp\\:border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.wp\\:border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.wp\\:border-blue-500{border-color:var(--wp-color-blue-500)}.wp\\:border-border{border-color:var(--border)}.wp\\:border-destructive{border-color:var(--destructive)}.wp\\:border-input{border-color:var(--input)}.wp\\:border-primary{border-color:var(--primary)}.wp\\:border-white\\/20{border-color:var(--wp-color-white)}@supports (color:color-mix(in lab, red, red)){.wp\\:border-white\\/20{border-color:color-mix(in oklab, var(--wp-color-white) 20%, transparent)}}.wp\\:border-t-transparent{border-top-color:#0000}.wp\\:border-l-transparent{border-left-color:#0000}.wp\\:bg-\\[var\\(--color-red\\)\\]\\/12{background-color:var(--color-red)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-\\[var\\(--color-red\\)\\]\\/12{background-color:color-mix(in oklab, var(--color-red) 12%, transparent)}}.wp\\:bg-\\[var\\(--p-primary-color\\)\\]\\/12{background-color:var(--p-primary-color)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-\\[var\\(--p-primary-color\\)\\]\\/12{background-color:color-mix(in oklab, var(--p-primary-color) 12%, transparent)}}.wp\\:bg-amber-100{background-color:var(--wp-color-amber-100)}.wp\\:bg-background,.wp\\:bg-background\\/95{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-background\\/95{background-color:color-mix(in oklab, var(--background) 95%, transparent)}}.wp\\:bg-black,.wp\\:bg-black\\/80{background-color:var(--wp-color-black)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-black\\/80{background-color:color-mix(in oklab, var(--wp-color-black) 80%, transparent)}}.wp\\:bg-blue-100{background-color:var(--wp-color-blue-100)}.wp\\:bg-border{background-color:var(--border)}.wp\\:bg-card{background-color:var(--card)}.wp\\:bg-destructive{background-color:var(--destructive)}.wp\\:bg-emerald-100{background-color:var(--wp-color-emerald-100)}.wp\\:bg-foreground{background-color:var(--foreground)}.wp\\:bg-muted{background-color:var(--muted)}.wp\\:bg-neutral-100{background-color:var(--wp-color-neutral-100)}.wp\\:bg-neutral-800{background-color:var(--wp-color-neutral-800)}.wp\\:bg-popover{background-color:var(--popover)}.wp\\:bg-primary,.wp\\:bg-primary\\/10{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-primary\\/10{background-color:color-mix(in oklab, var(--primary) 10%, transparent)}}.wp\\:bg-purple-100{background-color:var(--wp-color-purple-100)}.wp\\:bg-secondary{background-color:var(--secondary)}.wp\\:bg-status-available{background-color:var(--status-available)}.wp\\:bg-status-hold\\/12{background-color:var(--status-hold)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-status-hold\\/12{background-color:color-mix(in oklab, var(--status-hold) 12%, transparent)}}.wp\\:bg-transparent{background-color:#0000}.wp\\:bg-white,.wp\\:bg-white\\/70{background-color:var(--wp-color-white)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-white\\/70{background-color:color-mix(in oklab, var(--wp-color-white) 70%, transparent)}}.wp\\:bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.wp\\:from-\\[color\\:var\\(--p-primary-color\\)\\]\\/80{--tw-gradient-from:var(--p-primary-color)}@supports (color:color-mix(in lab, red, red)){.wp\\:from-\\[color\\:var\\(--p-primary-color\\)\\]\\/80{--tw-gradient-from:color-mix(in oklab, var(--p-primary-color) 80%, transparent)}}.wp\\:from-\\[color\\:var\\(--p-primary-color\\)\\]\\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.wp\\:from-destructive\\/60{--tw-gradient-from:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:from-destructive\\/60{--tw-gradient-from:color-mix(in oklab, var(--destructive) 60%, transparent)}}.wp\\:from-destructive\\/60{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.wp\\:to-\\[color\\:var\\(--p-primary-color\\)\\]\\/100{--tw-gradient-to:var(--p-primary-color);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.wp\\:to-destructive\\/90{--tw-gradient-to:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:to-destructive\\/90{--tw-gradient-to:color-mix(in oklab, var(--destructive) 90%, transparent)}}.wp\\:to-destructive\\/90{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.wp\\:fill-current{fill:currentColor}.wp\\:fill-foreground{fill:var(--foreground)}.wp\\:object-contain{object-fit:contain}.wp\\:object-cover{object-fit:cover}.wp\\:p-0{padding:calc(var(--wp-spacing) * 0)}.wp\\:p-0\\.5{padding:calc(var(--wp-spacing) * .5)}.wp\\:p-1{padding:calc(var(--wp-spacing) * 1)}.wp\\:p-2{padding:calc(var(--wp-spacing) * 2)}.wp\\:p-3{padding:calc(var(--wp-spacing) * 3)}.wp\\:p-4{padding:calc(var(--wp-spacing) * 4)}.wp\\:p-6{padding:calc(var(--wp-spacing) * 6)}.wp\\:p-px{padding:1px}.wp\\:px-1{padding-inline:calc(var(--wp-spacing) * 1)}.wp\\:px-1\\.5{padding-inline:calc(var(--wp-spacing) * 1.5)}.wp\\:px-2{padding-inline:calc(var(--wp-spacing) * 2)}.wp\\:px-2\\.5{padding-inline:calc(var(--wp-spacing) * 2.5)}.wp\\:px-3{padding-inline:calc(var(--wp-spacing) * 3)}.wp\\:px-4{padding-inline:calc(var(--wp-spacing) * 4)}.wp\\:px-6{padding-inline:calc(var(--wp-spacing) * 6)}.wp\\:px-10{padding-inline:calc(var(--wp-spacing) * 10)}.wp\\:px-14{padding-inline:calc(var(--wp-spacing) * 14)}.wp\\:py-1{padding-block:calc(var(--wp-spacing) * 1)}.wp\\:py-1\\.5{padding-block:calc(var(--wp-spacing) * 1.5)}.wp\\:py-2{padding-block:calc(var(--wp-spacing) * 2)}.wp\\:py-3{padding-block:calc(var(--wp-spacing) * 3)}.wp\\:py-4{padding-block:calc(var(--wp-spacing) * 4)}.wp\\:py-6{padding-block:calc(var(--wp-spacing) * 6)}.wp\\:py-8{padding-block:calc(var(--wp-spacing) * 8)}.wp\\:pt-0{padding-top:calc(var(--wp-spacing) * 0)}.wp\\:pr-2{padding-right:calc(var(--wp-spacing) * 2)}.wp\\:pr-4{padding-right:calc(var(--wp-spacing) * 4)}.wp\\:pr-8{padding-right:calc(var(--wp-spacing) * 8)}.wp\\:pb-0{padding-bottom:calc(var(--wp-spacing) * 0)}.wp\\:pb-4{padding-bottom:calc(var(--wp-spacing) * 4)}.wp\\:pl-2{padding-left:calc(var(--wp-spacing) * 2)}.wp\\:pl-8{padding-left:calc(var(--wp-spacing) * 8)}.wp\\:text-center{text-align:center}.wp\\:text-left{text-align:left}.wp\\:font-mono{font-family:var(--wp-font-mono)}.wp\\:font-sans{font-family:Montserrat,sans-serif}.wp\\:text-3xl{font-size:var(--wp-text-3xl);line-height:var(--tw-leading,var(--wp-text-3xl--line-height))}.wp\\:text-base{font-size:var(--wp-text-base);line-height:var(--tw-leading,var(--wp-text-base--line-height))}.wp\\:text-lg{font-size:var(--wp-text-lg);line-height:var(--tw-leading,var(--wp-text-lg--line-height))}.wp\\:text-sm{font-size:var(--wp-text-sm);line-height:var(--tw-leading,var(--wp-text-sm--line-height))}.wp\\:text-xs{font-size:var(--wp-text-xs);line-height:var(--tw-leading,var(--wp-text-xs--line-height))}.wp\\:text-\\[10px\\]{font-size:10px}.wp\\:text-\\[11px\\]{font-size:11px}.wp\\:leading-none{--tw-leading:1;line-height:1}.wp\\:font-bold{--tw-font-weight:var(--wp-font-weight-bold);font-weight:var(--wp-font-weight-bold)}.wp\\:font-light{--tw-font-weight:var(--wp-font-weight-light);font-weight:var(--wp-font-weight-light)}.wp\\:font-medium{--tw-font-weight:var(--wp-font-weight-medium);font-weight:var(--wp-font-weight-medium)}.wp\\:font-semibold{--tw-font-weight:var(--wp-font-weight-semibold);font-weight:var(--wp-font-weight-semibold)}.wp\\:tracking-wider{--tw-tracking:var(--wp-tracking-wider);letter-spacing:var(--wp-tracking-wider)}.wp\\:tracking-widest{--tw-tracking:var(--wp-tracking-widest);letter-spacing:var(--wp-tracking-widest)}.wp\\:text-balance{text-wrap:balance}.wp\\:whitespace-nowrap{white-space:nowrap}.wp\\:text-\\[var\\(--color-avaible\\)\\]{color:var(--color-avaible)}.wp\\:text-\\[var\\(--color-primary\\)\\]{color:var(--color-primary)}.wp\\:text-\\[var\\(--color-red\\)\\]{color:var(--color-red)}.wp\\:text-\\[var\\(--color-settings\\)\\]{color:var(--color-settings)}.wp\\:text-\\[var\\(--p-primary-color\\)\\]{color:var(--p-primary-color)}.wp\\:text-\\[var\\(--primary\\)\\]{color:var(--primary)}.wp\\:text-amber-500{color:var(--wp-color-amber-500)}.wp\\:text-amber-600{color:var(--wp-color-amber-600)}.wp\\:text-background{color:var(--background)}.wp\\:text-black{color:var(--wp-color-black)}.wp\\:text-blue-500{color:var(--wp-color-blue-500)}.wp\\:text-blue-600{color:var(--wp-color-blue-600)}.wp\\:text-card-foreground{color:var(--card-foreground)}.wp\\:text-destructive{color:var(--destructive)}.wp\\:text-emerald-600{color:var(--wp-color-emerald-600)}.wp\\:text-foreground{color:var(--foreground)}.wp\\:text-green-500{color:var(--wp-color-green-500)}.wp\\:text-muted-foreground{color:var(--muted-foreground)}.wp\\:text-neutral-400{color:var(--wp-color-neutral-400)}.wp\\:text-neutral-500{color:var(--wp-color-neutral-500)}.wp\\:text-neutral-600{color:var(--wp-color-neutral-600)}.wp\\:text-neutral-800{color:var(--wp-color-neutral-800)}.wp\\:text-neutral-900{color:var(--wp-color-neutral-900)}.wp\\:text-popover-foreground{color:var(--popover-foreground)}.wp\\:text-primary{color:var(--primary)}.wp\\:text-primary-foreground{color:var(--primary-foreground)}.wp\\:text-purple-600{color:var(--wp-color-purple-600)}.wp\\:text-red-500{color:var(--wp-color-red-500)}.wp\\:text-secondary-foreground{color:var(--secondary-foreground)}.wp\\:text-status-available{color:var(--status-available)}.wp\\:text-status-disconnected{color:var(--status-disconnected)}.wp\\:text-status-hold{color:var(--status-hold)}.wp\\:text-status-incall{color:var(--status-incall)}.wp\\:text-status-incoming{color:var(--status-incoming)}.wp\\:text-white{color:var(--wp-color-white)}.wp\\:capitalize{text-transform:capitalize}.wp\\:underline-offset-4{text-underline-offset:4px}.wp\\:opacity-0{opacity:0}.wp\\:opacity-50{opacity:.5}.wp\\:opacity-70{opacity:.7}.wp\\:opacity-100{opacity:1}.wp\\:shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.wp\\:shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.wp\\:shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.wp\\:shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.wp\\:inset-shadow-2xs{--tw-inset-shadow:inset 0 1px var(--tw-inset-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.wp\\:ring-ring\\/50{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.wp\\:ring-ring\\/50{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.wp\\:ring-offset-background{--tw-ring-offset-color:var(--background)}.wp\\:outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.wp\\:outline-hidden{outline-offset:2px;outline:2px solid #0000}}.wp\\:backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.wp\\:backdrop-blur-\\[1px\\]{--tw-backdrop-blur:blur(1px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.wp\\:transition-\\[color\\,box-shadow\\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--wp-default-transition-timing-function));transition-duration:var(--tw-duration,var(--wp-default-transition-duration))}.wp\\:transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--wp-default-transition-timing-function));transition-duration:var(--tw-duration,var(--wp-default-transition-duration))}.wp\\:transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--wp-default-transition-timing-function));transition-duration:var(--tw-duration,var(--wp-default-transition-duration))}.wp\\:transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--wp-default-transition-timing-function));transition-duration:var(--tw-duration,var(--wp-default-transition-duration))}.wp\\:transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--wp-default-transition-timing-function));transition-duration:var(--tw-duration,var(--wp-default-transition-duration))}.wp\\:duration-150{--tw-duration:.15s;transition-duration:.15s}.wp\\:duration-200{--tw-duration:.2s;transition-duration:.2s}.wp\\:duration-300{--tw-duration:.3s;transition-duration:.3s}.wp\\:ease-in-out{--tw-ease:var(--wp-ease-in-out);transition-timing-function:var(--wp-ease-in-out)}.wp\\:fade-in-0{--tw-enter-opacity:0}.wp\\:outline-none{--tw-outline-style:none;outline-style:none}.wp\\:select-none{-webkit-user-select:none;user-select:none}.wp\\:select-text{-webkit-user-select:text;user-select:text}.wp\\:zoom-in-95{--tw-enter-scale:.95}.wp\\:group-data-\\[disabled\\=true\\]\\:pointer-events-none:is(:where(.wp\\:group)[data-disabled=true] *){pointer-events:none}.wp\\:group-data-\\[disabled\\=true\\]\\:opacity-50:is(:where(.wp\\:group)[data-disabled=true] *){opacity:.5}.wp\\:peer-disabled\\:cursor-not-allowed:is(:where(.wp\\:peer):disabled~*){cursor:not-allowed}.wp\\:peer-disabled\\:opacity-50:is(:where(.wp\\:peer):disabled~*){opacity:.5}.wp\\:selection\\:bg-primary ::selection,.wp\\:selection\\:bg-primary::selection{background-color:var(--primary)}.wp\\:selection\\:text-primary-foreground ::selection,.wp\\:selection\\:text-primary-foreground::selection{color:var(--primary-foreground)}.wp\\:file\\:inline-flex::-webkit-file-upload-button{display:inline-flex}.wp\\:file\\:inline-flex::file-selector-button{display:inline-flex}.wp\\:file\\:h-7::-webkit-file-upload-button{height:calc(var(--wp-spacing) * 7)}.wp\\:file\\:h-7::file-selector-button{height:calc(var(--wp-spacing) * 7)}.wp\\:file\\:border-0::-webkit-file-upload-button{border-style:var(--tw-border-style);border-width:0}.wp\\:file\\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.wp\\:file\\:bg-transparent::-webkit-file-upload-button{background-color:#0000}.wp\\:file\\:bg-transparent::file-selector-button{background-color:#0000}.wp\\:file\\:text-sm::-webkit-file-upload-button{font-size:var(--wp-text-sm);line-height:var(--tw-leading,var(--wp-text-sm--line-height))}.wp\\:file\\:text-sm::file-selector-button{font-size:var(--wp-text-sm);line-height:var(--tw-leading,var(--wp-text-sm--line-height))}.wp\\:file\\:font-medium::-webkit-file-upload-button{--tw-font-weight:var(--wp-font-weight-medium);font-weight:var(--wp-font-weight-medium)}.wp\\:file\\:font-medium::file-selector-button{--tw-font-weight:var(--wp-font-weight-medium);font-weight:var(--wp-font-weight-medium)}.wp\\:file\\:text-foreground::-webkit-file-upload-button{color:var(--foreground)}.wp\\:file\\:text-foreground::file-selector-button{color:var(--foreground)}.wp\\:placeholder\\:text-muted-foreground::placeholder{color:var(--muted-foreground)}.wp\\:last\\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media (hover:hover){.wp\\:hover\\:bg-\\[var\\(--p-primary-color\\)\\]\\/8:hover{background-color:var(--p-primary-color)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-\\[var\\(--p-primary-color\\)\\]\\/8:hover{background-color:color-mix(in oklab, var(--p-primary-color) 8%, transparent)}}.wp\\:hover\\:bg-\\[var\\(--p-primary-color\\)\\]\\/10:hover{background-color:var(--p-primary-color)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-\\[var\\(--p-primary-color\\)\\]\\/10:hover{background-color:color-mix(in oklab, var(--p-primary-color) 10%, transparent)}}.wp\\:hover\\:bg-\\[var\\(--p-primary-color\\)\\]\\/20:hover{background-color:var(--p-primary-color)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-\\[var\\(--p-primary-color\\)\\]\\/20:hover{background-color:color-mix(in oklab, var(--p-primary-color) 20%, transparent)}}.wp\\:hover\\:bg-accent:hover,.wp\\:hover\\:bg-accent\\/50:hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-accent\\/50:hover{background-color:color-mix(in oklab, var(--accent) 50%, transparent)}}.wp\\:hover\\:bg-destructive\\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-destructive\\/90:hover{background-color:color-mix(in oklab, var(--destructive) 90%, transparent)}}.wp\\:hover\\:bg-muted:hover{background-color:var(--muted)}.wp\\:hover\\:bg-neutral-100:hover{background-color:var(--wp-color-neutral-100)}.wp\\:hover\\:bg-neutral-200:hover{background-color:var(--wp-color-neutral-200)}.wp\\:hover\\:bg-primary\\/10:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-primary\\/10:hover{background-color:color-mix(in oklab, var(--primary) 10%, transparent)}}.wp\\:hover\\:bg-primary\\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-primary\\/90:hover{background-color:color-mix(in oklab, var(--primary) 90%, transparent)}}.wp\\:hover\\:bg-secondary:hover,.wp\\:hover\\:bg-secondary\\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-secondary\\/80:hover{background-color:color-mix(in oklab, var(--secondary) 80%, transparent)}}.wp\\:hover\\:bg-status-available\\/90:hover{background-color:var(--status-available)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-status-available\\/90:hover{background-color:color-mix(in oklab, var(--status-available) 90%, transparent)}}.wp\\:hover\\:bg-transparent:hover{background-color:#0000}.wp\\:hover\\:from-\\[color\\:var\\(--p-primary-color\\)\\]\\/75:hover{--tw-gradient-from:var(--p-primary-color)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:from-\\[color\\:var\\(--p-primary-color\\)\\]\\/75:hover{--tw-gradient-from:color-mix(in oklab, var(--p-primary-color) 75%, transparent)}}.wp\\:hover\\:from-\\[color\\:var\\(--p-primary-color\\)\\]\\/75:hover{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.wp\\:hover\\:from-destructive\\/70:hover{--tw-gradient-from:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:from-destructive\\/70:hover{--tw-gradient-from:color-mix(in oklab, var(--destructive) 70%, transparent)}}.wp\\:hover\\:from-destructive\\/70:hover{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.wp\\:hover\\:to-\\[color\\:var\\(--p-primary-color\\)\\]:hover{--tw-gradient-to:var(--p-primary-color);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.wp\\:hover\\:to-destructive\\/95:hover{--tw-gradient-to:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:to-destructive\\/95:hover{--tw-gradient-to:color-mix(in oklab, var(--destructive) 95%, transparent)}}.wp\\:hover\\:to-destructive\\/95:hover{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.wp\\:hover\\:text-accent-foreground:hover{color:var(--accent-foreground)}.wp\\:hover\\:text-destructive:hover{color:var(--destructive)}.wp\\:hover\\:text-foreground:hover{color:var(--foreground)}.wp\\:hover\\:text-muted-foreground:hover{color:var(--muted-foreground)}.wp\\:hover\\:text-primary:hover{color:var(--primary)}.wp\\:hover\\:text-status-available\\/80:hover{color:var(--status-available)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-available\\/80:hover{color:color-mix(in oklab, var(--status-available) 80%, transparent)}}.wp\\:hover\\:text-status-disconnected:hover,.wp\\:hover\\:text-status-disconnected\\/80:hover{color:var(--status-disconnected)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-disconnected\\/80:hover{color:color-mix(in oklab, var(--status-disconnected) 80%, transparent)}}.wp\\:hover\\:text-status-hold\\/80:hover{color:var(--status-hold)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-hold\\/80:hover{color:color-mix(in oklab, var(--status-hold) 80%, transparent)}}.wp\\:hover\\:text-status-incall\\/80:hover{color:var(--status-incall)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-incall\\/80:hover{color:color-mix(in oklab, var(--status-incall) 80%, transparent)}}.wp\\:hover\\:text-status-incoming\\/80:hover{color:var(--status-incoming)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-incoming\\/80:hover{color:color-mix(in oklab, var(--status-incoming) 80%, transparent)}}.wp\\:hover\\:underline:hover{text-decoration-line:underline}.wp\\:hover\\:opacity-80:hover{opacity:.8}.wp\\:hover\\:opacity-100:hover{opacity:1}.wp\\:hover\\:ring-4:hover{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}.wp\\:focus\\:z-10:focus{z-index:10}.wp\\:focus\\:bg-accent:focus{background-color:var(--accent)}.wp\\:focus\\:text-accent-foreground:focus{color:var(--accent-foreground)}.wp\\:focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.wp\\:focus\\:ring-ring:focus{--tw-ring-color:var(--ring)}.wp\\:focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.wp\\:focus\\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.wp\\:focus\\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.wp\\:focus-visible\\:z-10:focus-visible{z-index:10}.wp\\:focus-visible\\:border-ring:focus-visible{border-color:var(--ring)}.wp\\:focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.wp\\:focus-visible\\:ring-4:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.wp\\:focus-visible\\:ring-\\[3px\\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.wp\\:focus-visible\\:ring-\\[var\\(--p-primary-color\\)\\]:focus-visible{--tw-ring-color:var(--p-primary-color)}.wp\\:focus-visible\\:ring-destructive\\/20:focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:focus-visible\\:ring-destructive\\/20:focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.wp\\:focus-visible\\:ring-primary\\/50:focus-visible{--tw-ring-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.wp\\:focus-visible\\:ring-primary\\/50:focus-visible{--tw-ring-color:color-mix(in oklab, var(--primary) 50%, transparent)}}.wp\\:focus-visible\\:ring-ring\\/50:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.wp\\:focus-visible\\:ring-ring\\/50:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.wp\\:focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.wp\\:focus-visible\\:ring-offset-white:focus-visible{--tw-ring-offset-color:var(--wp-color-white)}.wp\\:focus-visible\\:outline-hidden:focus-visible{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.wp\\:focus-visible\\:outline-hidden:focus-visible{outline-offset:2px;outline:2px solid #0000}}.wp\\:focus-visible\\:outline-1:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.wp\\:active\\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.wp\\:disabled\\:pointer-events-none:disabled{pointer-events:none}.wp\\:disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.wp\\:disabled\\:opacity-50:disabled{opacity:.5}.wp\\:has-data-\\[slot\\=card-action\\]\\:grid-cols-\\[1fr_auto\\]:has([data-slot=card-action]){grid-template-columns:1fr auto}.wp\\:has-\\[\\>svg\\]\\:px-2\\.5:has(>svg){padding-inline:calc(var(--wp-spacing) * 2.5)}.wp\\:has-\\[\\>svg\\]\\:px-3:has(>svg){padding-inline:calc(var(--wp-spacing) * 3)}.wp\\:has-\\[\\>svg\\]\\:px-4:has(>svg){padding-inline:calc(var(--wp-spacing) * 4)}.wp\\:aria-invalid\\:border-destructive[aria-invalid=true]{border-color:var(--destructive)}.wp\\:aria-invalid\\:ring-destructive\\/20[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:aria-invalid\\:ring-destructive\\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.wp\\:data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.wp\\:data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.wp\\:data-\\[highlighted\\]\\:bg-accent[data-highlighted]{background-color:var(--accent)}.wp\\:data-\\[highlighted\\]\\:text-accent-foreground[data-highlighted]{color:var(--accent-foreground)}.wp\\:data-\\[inset\\]\\:pl-8[data-inset]{padding-left:calc(var(--wp-spacing) * 8)}.wp\\:data-\\[orientation\\=horizontal\\]\\:h-1\\.5[data-orientation=horizontal]{height:calc(var(--wp-spacing) * 1.5)}.wp\\:data-\\[orientation\\=horizontal\\]\\:h-full[data-orientation=horizontal]{height:100%}.wp\\:data-\\[orientation\\=horizontal\\]\\:h-px[data-orientation=horizontal]{height:1px}.wp\\:data-\\[orientation\\=horizontal\\]\\:w-full[data-orientation=horizontal]{width:100%}.wp\\:data-\\[orientation\\=vertical\\]\\:h-full[data-orientation=vertical]{height:100%}.wp\\:data-\\[orientation\\=vertical\\]\\:min-h-44[data-orientation=vertical]{min-height:calc(var(--wp-spacing) * 44)}.wp\\:data-\\[orientation\\=vertical\\]\\:w-1\\.5[data-orientation=vertical]{width:calc(var(--wp-spacing) * 1.5)}.wp\\:data-\\[orientation\\=vertical\\]\\:w-auto[data-orientation=vertical]{width:auto}.wp\\:data-\\[orientation\\=vertical\\]\\:w-full[data-orientation=vertical]{width:100%}.wp\\:data-\\[orientation\\=vertical\\]\\:w-px[data-orientation=vertical]{width:1px}.wp\\:data-\\[orientation\\=vertical\\]\\:flex-col[data-orientation=vertical]{flex-direction:column}.wp\\:data-\\[placeholder\\]\\:text-muted-foreground[data-placeholder]{color:var(--muted-foreground)}.wp\\:data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--wp-spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:data-\\[side\\=bottom\\]\\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.wp\\:data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--wp-spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:data-\\[side\\=left\\]\\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:calc(2*var(--spacing))}.wp\\:data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--wp-spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:data-\\[side\\=right\\]\\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.wp\\:data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--wp-spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:data-\\[side\\=top\\]\\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:calc(2*var(--spacing))}.wp\\:data-\\[size\\=default\\]\\:h-9[data-size=default]{height:calc(var(--wp-spacing) * 9)}.wp\\:data-\\[size\\=sm\\]\\:h-8[data-size=sm]{height:calc(var(--wp-spacing) * 8)}:is(.wp\\:\\*\\:data-\\[slot\\=select-value\\]\\:line-clamp-1>*)[data-slot=select-value]{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:is(.wp\\:\\*\\:data-\\[slot\\=select-value\\]\\:flex>*)[data-slot=select-value]{display:flex}:is(.wp\\:\\*\\:data-\\[slot\\=select-value\\]\\:items-center>*)[data-slot=select-value]{align-items:center}:is(.wp\\:\\*\\:data-\\[slot\\=select-value\\]\\:gap-2>*)[data-slot=select-value]{gap:calc(var(--wp-spacing) * 2)}.wp\\:data-\\[spacing\\=0\\]\\:rounded-none[data-spacing="0"]{border-radius:0}.wp\\:data-\\[spacing\\=0\\]\\:shadow-none[data-spacing="0"]{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.wp\\:data-\\[spacing\\=0\\]\\:first\\:rounded-l-md[data-spacing="0"]:first-child{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.wp\\:data-\\[spacing\\=0\\]\\:last\\:rounded-r-md[data-spacing="0"]:last-child{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.wp\\:data-\\[state\\=closed\\]\\:animate-accordion-up[data-state=closed]{animation:accordion-up var(--tw-animation-duration,var(--tw-duration,.2s))var(--tw-ease,ease-out)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.wp\\:data-\\[state\\=closed\\]\\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.wp\\:data-\\[state\\=closed\\]\\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.wp\\:data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.wp\\:data-\\[state\\=on\\]\\:bg-accent[data-state=on]{background-color:var(--accent)}.wp\\:data-\\[state\\=on\\]\\:text-accent-foreground[data-state=on]{color:var(--accent-foreground)}.wp\\:data-\\[state\\=open\\]\\:animate-accordion-down[data-state=open]{animation:accordion-down var(--tw-animation-duration,var(--tw-duration,.2s))var(--tw-ease,ease-out)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.wp\\:data-\\[state\\=open\\]\\:animate-in[data-state=open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.wp\\:data-\\[state\\=open\\]\\:bg-accent[data-state=open]{background-color:var(--accent)}.wp\\:data-\\[state\\=open\\]\\:text-accent-foreground[data-state=open]{color:var(--accent-foreground)}.wp\\:data-\\[state\\=open\\]\\:text-muted-foreground[data-state=open]{color:var(--muted-foreground)}.wp\\:data-\\[state\\=open\\]\\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.wp\\:data-\\[state\\=open\\]\\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.wp\\:data-\\[variant\\=destructive\\]\\:text-destructive[data-variant=destructive]{color:var(--destructive)}.wp\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/10[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/10[data-variant=destructive]:focus{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.wp\\:data-\\[variant\\=destructive\\]\\:focus\\:text-destructive[data-variant=destructive]:focus{color:var(--destructive)}.wp\\:data-\\[variant\\=outline\\]\\:border-\\[color\\:var\\(--color-primary-500\\)\\][data-variant=outline]{border-color:var(--color-primary-500)}.wp\\:data-\\[variant\\=outline\\]\\:focus-visible\\:ring-\\[color\\:var\\(--color-primary-500\\)\\][data-variant=outline]:focus-visible{--tw-ring-color:var(--color-primary-500)}.wp\\:data-\\[spacing\\=0\\]\\:data-\\[variant\\=outline\\]\\:border[data-spacing="0"][data-variant=outline]{border-style:var(--tw-border-style);border-width:1px}.wp\\:data-\\[spacing\\=0\\]\\:data-\\[variant\\=outline\\]\\:border-\\[color\\:var\\(--color-primary-500\\)\\][data-spacing="0"][data-variant=outline]{border-color:var(--color-primary-500)}.wp\\:data-\\[spacing\\=default\\]\\:data-\\[variant\\=outline\\]\\:shadow-xs[data-spacing=default][data-variant=outline]{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}@supports ((-webkit-backdrop-filter:var(--tw)) or (backdrop-filter:var(--tw))){.wp\\:supports-backdrop-filter\\:bg-background\\/60{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.wp\\:supports-backdrop-filter\\:bg-background\\/60{background-color:color-mix(in oklab, var(--background) 60%, transparent)}}}@media (min-width:40rem){.wp\\:sm\\:block{display:block}.wp\\:sm\\:inline{display:inline}.wp\\:sm\\:inline-block{display:inline-block}.wp\\:sm\\:max-w-lg{max-width:var(--wp-container-lg)}.wp\\:sm\\:max-w-md{max-width:var(--wp-container-md)}.wp\\:sm\\:max-w-sm{max-width:var(--wp-container-sm)}.wp\\:sm\\:flex-row{flex-direction:row}.wp\\:sm\\:justify-end{justify-content:flex-end}.wp\\:sm\\:gap-0{gap:calc(var(--wp-spacing) * 0)}.wp\\:sm\\:rounded-lg{border-radius:var(--radius)}.wp\\:sm\\:text-left{text-align:left}}@media (min-width:48rem){.wp\\:md\\:w-full{width:100%}.wp\\:md\\:text-sm{font-size:var(--wp-text-sm);line-height:var(--tw-leading,var(--wp-text-sm--line-height))}}.wp\\:dark\\:border-input:where(.dark,.dark *){border-color:var(--input)}.wp\\:dark\\:bg-amber-900\\/30:where(.dark,.dark *){background-color:var(--wp-color-amber-900)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-amber-900\\/30:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-amber-900) 30%, transparent)}}.wp\\:dark\\:bg-blue-900\\/30:where(.dark,.dark *){background-color:var(--wp-color-blue-900)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-blue-900\\/30:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-blue-900) 30%, transparent)}}.wp\\:dark\\:bg-destructive\\/60:where(.dark,.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-destructive\\/60:where(.dark,.dark *){background-color:color-mix(in oklab, var(--destructive) 60%, transparent)}}.wp\\:dark\\:bg-emerald-900\\/30:where(.dark,.dark *){background-color:var(--wp-color-emerald-900)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-emerald-900\\/30:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-emerald-900) 30%, transparent)}}.wp\\:dark\\:bg-input\\/30:where(.dark,.dark *){background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-input\\/30:where(.dark,.dark *){background-color:color-mix(in oklab, var(--input) 30%, transparent)}}.wp\\:dark\\:bg-neutral-700:where(.dark,.dark *){background-color:var(--wp-color-neutral-700)}.wp\\:dark\\:bg-neutral-800:where(.dark,.dark *){background-color:var(--wp-color-neutral-800)}.wp\\:dark\\:bg-neutral-900:where(.dark,.dark *){background-color:var(--wp-color-neutral-900)}.wp\\:dark\\:bg-neutral-900\\/70:where(.dark,.dark *){background-color:var(--wp-color-neutral-900)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-neutral-900\\/70:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-neutral-900) 70%, transparent)}}.wp\\:dark\\:bg-purple-900\\/30:where(.dark,.dark *){background-color:var(--wp-color-purple-900)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-purple-900\\/30:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-purple-900) 30%, transparent)}}.wp\\:dark\\:text-amber-400:where(.dark,.dark *){color:var(--wp-color-amber-400)}.wp\\:dark\\:text-blue-400:where(.dark,.dark *){color:var(--wp-color-blue-400)}.wp\\:dark\\:text-emerald-400:where(.dark,.dark *){color:var(--wp-color-emerald-400)}.wp\\:dark\\:text-neutral-100:where(.dark,.dark *){color:var(--wp-color-neutral-100)}.wp\\:dark\\:text-neutral-400:where(.dark,.dark *){color:var(--wp-color-neutral-400)}.wp\\:dark\\:text-neutral-500:where(.dark,.dark *){color:var(--wp-color-neutral-500)}.wp\\:dark\\:text-purple-400:where(.dark,.dark *){color:var(--wp-color-purple-400)}.wp\\:dark\\:text-white:where(.dark,.dark *){color:var(--wp-color-white)}@media (hover:hover){.wp\\:dark\\:hover\\:bg-accent\\/50:where(.dark,.dark *):hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:hover\\:bg-accent\\/50:where(.dark,.dark *):hover{background-color:color-mix(in oklab, var(--accent) 50%, transparent)}}.wp\\:dark\\:hover\\:bg-input\\/50:where(.dark,.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:hover\\:bg-input\\/50:where(.dark,.dark *):hover{background-color:color-mix(in oklab, var(--input) 50%, transparent)}}.wp\\:dark\\:hover\\:bg-neutral-600:where(.dark,.dark *):hover{background-color:var(--wp-color-neutral-600)}.wp\\:dark\\:hover\\:bg-neutral-800\\/80:where(.dark,.dark *):hover{background-color:var(--wp-color-neutral-800)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:hover\\:bg-neutral-800\\/80:where(.dark,.dark *):hover{background-color:color-mix(in oklab, var(--wp-color-neutral-800) 80%, transparent)}}.wp\\:dark\\:hover\\:bg-neutral-900:where(.dark,.dark *):hover{background-color:var(--wp-color-neutral-900)}.wp\\:dark\\:hover\\:text-neutral-100:where(.dark,.dark *):hover{color:var(--wp-color-neutral-100)}.wp\\:dark\\:hover\\:text-status-disconnected:where(.dark,.dark *):hover{color:var(--status-disconnected)}}.wp\\:dark\\:focus-visible\\:ring-destructive\\/40:where(.dark,.dark *):focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:focus-visible\\:ring-destructive\\/40:where(.dark,.dark *):focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.wp\\:dark\\:focus-visible\\:ring-offset-neutral-900:where(.dark,.dark *):focus-visible{--tw-ring-offset-color:var(--wp-color-neutral-900)}.wp\\:dark\\:aria-invalid\\:ring-destructive\\/40:where(.dark,.dark *)[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:aria-invalid\\:ring-destructive\\/40:where(.dark,.dark *)[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.wp\\:dark\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/20:where(.dark,.dark *)[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/20:where(.dark,.dark *)[data-variant=destructive]:focus{background-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.wp\\:\\[\\&_button\\]\\:cursor-pointer button{cursor:pointer}.wp\\:\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.wp\\:\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.wp\\:\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4 svg:not([class*=size-]){width:calc(var(--wp-spacing) * 4);height:calc(var(--wp-spacing) * 4)}.wp\\:\\[\\&_svg\\:not\\(\\[class\\*\\=\\\\\\'size-\\\\\\'\\]\\)\\]\\:size-3 svg:not([class*="'size-'"]){width:calc(var(--wp-spacing) * 3);height:calc(var(--wp-spacing) * 3)}.wp\\:\\[\\&_svg\\:not\\(\\[class\\*\\=\\\\\\'size-\\\\\\'\\]\\)\\]\\:size-4 svg:not([class*="'size-'"]){width:calc(var(--wp-spacing) * 4);height:calc(var(--wp-spacing) * 4)}.wp\\:\\[\\&_svg\\:not\\(\\[class\\*\\=\\\\\\'text-\\\\\\'\\]\\)\\]\\:text-muted-foreground svg:not([class*="'text-'"]){color:var(--muted-foreground)}.wp\\:\\[\\.border-b\\]\\:pb-6.border-b{padding-bottom:calc(var(--wp-spacing) * 6)}.wp\\:\\[\\.border-t\\]\\:pt-6.border-t{padding-top:calc(var(--wp-spacing) * 6)}:is(.wp\\:\\*\\*\\:\\[\\[role\\=button\\]\\]\\:cursor-pointer *)[role=button]{cursor:pointer}:-webkit-any(.wp\\:\\*\\:\\[span\\]\\:last\\:flex>*):-webkit-any(span):last-child{display:flex}:is(.wp\\:\\*\\:\\[span\\]\\:last\\:flex>*):is(span):last-child{display:flex}:-webkit-any(.wp\\:\\*\\:\\[span\\]\\:last\\:items-center>*):-webkit-any(span):last-child{align-items:center}:is(.wp\\:\\*\\:\\[span\\]\\:last\\:items-center>*):is(span):last-child{align-items:center}:-webkit-any(.wp\\:\\*\\:\\[span\\]\\:last\\:gap-2>*):-webkit-any(span):last-child{gap:calc(var(--wp-spacing) * 2)}:is(.wp\\:\\*\\:\\[span\\]\\:last\\:gap-2>*):is(span):last-child{gap:calc(var(--wp-spacing) * 2)}:-webkit-any(.wp\\:data-\\[variant\\=destructive\\]\\:\\*\\:\\[svg\\]\\:\\!text-destructive[data-variant=destructive]>*):-webkit-any(svg){color:var(--destructive)!important}:is(.wp\\:data-\\[variant\\=destructive\\]\\:\\*\\:\\[svg\\]\\:\\!text-destructive[data-variant=destructive]>*):is(svg){color:var(--destructive)!important}.wp\\:data-\\[spacing\\=0\\]\\:data-\\[variant\\=outline\\]\\:\\[\\&\\:not\\(\\:first-child\\)\\]\\:border-l-0[data-spacing="0"][data-variant=outline]:not(:first-child){border-left-style:var(--tw-border-style);border-left-width:0}.wp\\:\\[\\&\\[data-state\\=open\\]\\>svg\\]\\:rotate-180[data-state=open]>svg{rotate:180deg}[data-slot=tooltip-content] .wp\\:\\[\\[data-slot\\=tooltip-content\\]_\\&\\]\\:bg-background\\/20{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){[data-slot=tooltip-content] .wp\\:\\[\\[data-slot\\=tooltip-content\\]_\\&\\]\\:bg-background\\/20{background-color:color-mix(in oklab, var(--background) 20%, transparent)}}[data-slot=tooltip-content] .wp\\:\\[\\[data-slot\\=tooltip-content\\]_\\&\\]\\:text-background{color:var(--background)}[data-slot=tooltip-content] .wp\\:dark\\:\\[\\[data-slot\\=tooltip-content\\]_\\&\\]\\:bg-background\\/10:where(.dark,.dark *){background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){[data-slot=tooltip-content] .wp\\:dark\\:\\[\\[data-slot\\=tooltip-content\\]_\\&\\]\\:bg-background\\/10:where(.dark,.dark *){background-color:color-mix(in oklab, var(--background) 10%, transparent)}}.wp\\:\\@container\\/card-header[data-v-9b88a405]{container:card-header/inline-size}.wp\\:pointer-events-none[data-v-9b88a405]{pointer-events:none}.wp\\:sr-only[data-v-9b88a405]{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.wp\\:absolute[data-v-9b88a405]{position:absolute}.wp\\:fixed[data-v-9b88a405]{position:fixed}.wp\\:relative[data-v-9b88a405]{position:relative}.wp\\:sticky[data-v-9b88a405]{position:sticky}.wp\\:inset-0[data-v-9b88a405]{inset:calc(var(--wp-spacing) * 0)}.wp\\:inset-x-0[data-v-9b88a405]{inset-inline:calc(var(--wp-spacing) * 0)}.wp\\:top-0[data-v-9b88a405]{top:calc(var(--wp-spacing) * 0)}.wp\\:top-1\\/2[data-v-9b88a405]{top:50%}.wp\\:top-2\\.5[data-v-9b88a405]{top:calc(var(--wp-spacing) * 2.5)}.wp\\:top-4[data-v-9b88a405]{top:calc(var(--wp-spacing) * 4)}.wp\\:top-\\[50\\%\\][data-v-9b88a405]{top:50%}.wp\\:top-full[data-v-9b88a405]{top:100%}.wp\\:right-0[data-v-9b88a405]{right:calc(var(--wp-spacing) * 0)}.wp\\:right-1[data-v-9b88a405]{right:calc(var(--wp-spacing) * 1)}.wp\\:right-2[data-v-9b88a405]{right:calc(var(--wp-spacing) * 2)}.wp\\:right-4[data-v-9b88a405]{right:calc(var(--wp-spacing) * 4)}.wp\\:bottom-2[data-v-9b88a405]{bottom:calc(var(--wp-spacing) * 2)}.wp\\:bottom-full[data-v-9b88a405]{bottom:100%}.wp\\:left-0[data-v-9b88a405]{left:calc(var(--wp-spacing) * 0)}.wp\\:left-0\\.5[data-v-9b88a405]{left:calc(var(--wp-spacing) * .5)}.wp\\:left-2[data-v-9b88a405]{left:calc(var(--wp-spacing) * 2)}.wp\\:left-\\[50\\%\\][data-v-9b88a405]{left:50%}.wp\\:z-10[data-v-9b88a405]{z-index:10}.wp\\:z-40[data-v-9b88a405]{z-index:40}.wp\\:z-50[data-v-9b88a405]{z-index:50}.wp\\:order-first[data-v-9b88a405]{order:-9999}.wp\\:col-start-2[data-v-9b88a405]{grid-column-start:2}.wp\\:row-span-2[data-v-9b88a405]{grid-row:span 2/span 2}.wp\\:row-start-1[data-v-9b88a405]{grid-row-start:1}.wp\\:container[data-v-9b88a405]{width:100%}@media (min-width:40rem){.wp\\:container[data-v-9b88a405]{max-width:40rem}}@media (min-width:48rem){.wp\\:container[data-v-9b88a405]{max-width:48rem}}@media (min-width:64rem){.wp\\:container[data-v-9b88a405]{max-width:64rem}}@media (min-width:80rem){.wp\\:container[data-v-9b88a405]{max-width:80rem}}@media (min-width:96rem){.wp\\:container[data-v-9b88a405]{max-width:96rem}}.wp\\:-mx-1[data-v-9b88a405]{margin-inline:calc(var(--wp-spacing) * -1)}.wp\\:mx-2[data-v-9b88a405]{margin-inline:calc(var(--wp-spacing) * 2)}.wp\\:mx-auto[data-v-9b88a405]{margin-inline-start:auto;margin-inline-end:auto}.wp\\:my-1[data-v-9b88a405]{margin-block:calc(var(--wp-spacing) * 1)}.wp\\:my-2[data-v-9b88a405]{margin-block:calc(var(--wp-spacing) * 2)}.wp\\:my-8[data-v-9b88a405]{margin-block:calc(var(--wp-spacing) * 8)}.wp\\:mt-1[data-v-9b88a405]{margin-top:calc(var(--wp-spacing) * 1)}.wp\\:mr-4[data-v-9b88a405]{margin-right:calc(var(--wp-spacing) * 4)}.wp\\:mr-auto[data-v-9b88a405]{margin-right:auto}.wp\\:mb-1[data-v-9b88a405]{margin-bottom:calc(var(--wp-spacing) * 1)}.wp\\:mb-2[data-v-9b88a405]{margin-bottom:calc(var(--wp-spacing) * 2)}.wp\\:mb-4[data-v-9b88a405]{margin-bottom:calc(var(--wp-spacing) * 4)}.wp\\:mb-5[data-v-9b88a405]{margin-bottom:calc(var(--wp-spacing) * 5)}.wp\\:ml-auto[data-v-9b88a405]{margin-left:auto}.wp\\:block[data-v-9b88a405]{display:block}.wp\\:flex[data-v-9b88a405]{display:flex}.wp\\:grid[data-v-9b88a405]{display:grid}.wp\\:hidden[data-v-9b88a405]{display:none}.wp\\:inline-flex[data-v-9b88a405]{display:inline-flex}.wp\\:aspect-square[data-v-9b88a405]{aspect-ratio:1}.wp\\:aspect-video[data-v-9b88a405]{aspect-ratio:var(--wp-aspect-video)}.wp\\:size-2[data-v-9b88a405]{width:calc(var(--wp-spacing) * 2);height:calc(var(--wp-spacing) * 2)}.wp\\:size-2\\.5[data-v-9b88a405]{width:calc(var(--wp-spacing) * 2.5);height:calc(var(--wp-spacing) * 2.5)}.wp\\:size-3[data-v-9b88a405]{width:calc(var(--wp-spacing) * 3);height:calc(var(--wp-spacing) * 3)}.wp\\:size-3\\.5[data-v-9b88a405]{width:calc(var(--wp-spacing) * 3.5);height:calc(var(--wp-spacing) * 3.5)}.wp\\:size-4[data-v-9b88a405]{width:calc(var(--wp-spacing) * 4);height:calc(var(--wp-spacing) * 4)}.wp\\:size-5[data-v-9b88a405]{width:calc(var(--wp-spacing) * 5);height:calc(var(--wp-spacing) * 5)}.wp\\:size-6[data-v-9b88a405]{width:calc(var(--wp-spacing) * 6);height:calc(var(--wp-spacing) * 6)}.wp\\:size-7[data-v-9b88a405]{width:calc(var(--wp-spacing) * 7);height:calc(var(--wp-spacing) * 7)}.wp\\:size-8[data-v-9b88a405]{width:calc(var(--wp-spacing) * 8);height:calc(var(--wp-spacing) * 8)}.wp\\:size-9[data-v-9b88a405]{width:calc(var(--wp-spacing) * 9);height:calc(var(--wp-spacing) * 9)}.wp\\:size-10[data-v-9b88a405]{width:calc(var(--wp-spacing) * 10);height:calc(var(--wp-spacing) * 10)}.wp\\:size-12[data-v-9b88a405]{width:calc(var(--wp-spacing) * 12);height:calc(var(--wp-spacing) * 12)}.wp\\:size-full[data-v-9b88a405]{width:100%;height:100%}.wp\\:h-2\\.5[data-v-9b88a405]{height:calc(var(--wp-spacing) * 2.5)}.wp\\:h-3[data-v-9b88a405]{height:calc(var(--wp-spacing) * 3)}.wp\\:h-4[data-v-9b88a405]{height:calc(var(--wp-spacing) * 4)}.wp\\:h-5[data-v-9b88a405]{height:calc(var(--wp-spacing) * 5)}.wp\\:h-6[data-v-9b88a405]{height:calc(var(--wp-spacing) * 6)}.wp\\:h-7[data-v-9b88a405]{height:calc(var(--wp-spacing) * 7)}.wp\\:h-8[data-v-9b88a405]{height:calc(var(--wp-spacing) * 8)}.wp\\:h-9[data-v-9b88a405]{height:calc(var(--wp-spacing) * 9)}.wp\\:h-10[data-v-9b88a405]{height:calc(var(--wp-spacing) * 10)}.wp\\:h-12[data-v-9b88a405]{height:calc(var(--wp-spacing) * 12)}.wp\\:h-14[data-v-9b88a405]{height:calc(var(--wp-spacing) * 14)}.wp\\:h-16[data-v-9b88a405]{height:calc(var(--wp-spacing) * 16)}.wp\\:h-64[data-v-9b88a405]{height:calc(var(--wp-spacing) * 64)}.wp\\:h-80[data-v-9b88a405]{height:calc(var(--wp-spacing) * 80)}.wp\\:h-\\[15px\\][data-v-9b88a405]{height:15px}.wp\\:h-\\[16px\\][data-v-9b88a405]{height:16px}.wp\\:h-\\[60vh\\][data-v-9b88a405]{height:60vh}.wp\\:h-\\[var\\(--reka-select-trigger-height\\)\\][data-v-9b88a405]{height:var(--reka-select-trigger-height)}.wp\\:h-full[data-v-9b88a405]{height:100%}.wp\\:h-px[data-v-9b88a405]{height:1px}.wp\\:max-h-\\(--reka-dropdown-menu-content-available-height\\)[data-v-9b88a405]{max-height:var(--reka-dropdown-menu-content-available-height)}.wp\\:max-h-\\(--reka-select-content-available-height\\)[data-v-9b88a405]{max-height:var(--reka-select-content-available-height)}.wp\\:max-h-0[data-v-9b88a405]{max-height:calc(var(--wp-spacing) * 0)}.wp\\:max-h-40[data-v-9b88a405]{max-height:calc(var(--wp-spacing) * 40)}.wp\\:max-h-60[data-v-9b88a405]{max-height:calc(var(--wp-spacing) * 60)}.wp\\:max-h-\\[300px\\][data-v-9b88a405]{max-height:300px}.wp\\:min-h-10[data-v-9b88a405]{min-height:calc(var(--wp-spacing) * 10)}.wp\\:min-h-\\[calc\\(100vh-3\\.5rem\\)\\][data-v-9b88a405]{min-height:calc(100vh - 3.5rem)}.wp\\:min-h-screen[data-v-9b88a405]{min-height:100vh}.wp\\:\\!w-full[data-v-9b88a405]{width:100%!important}.wp\\:w-2\\.5[data-v-9b88a405]{width:calc(var(--wp-spacing) * 2.5)}.wp\\:w-3[data-v-9b88a405]{width:calc(var(--wp-spacing) * 3)}.wp\\:w-4[data-v-9b88a405]{width:calc(var(--wp-spacing) * 4)}.wp\\:w-5[data-v-9b88a405]{width:calc(var(--wp-spacing) * 5)}.wp\\:w-6[data-v-9b88a405]{width:calc(var(--wp-spacing) * 6)}.wp\\:w-8[data-v-9b88a405]{width:calc(var(--wp-spacing) * 8)}.wp\\:w-9[data-v-9b88a405]{width:calc(var(--wp-spacing) * 9)}.wp\\:w-12[data-v-9b88a405]{width:calc(var(--wp-spacing) * 12)}.wp\\:w-16[data-v-9b88a405]{width:calc(var(--wp-spacing) * 16)}.wp\\:w-24[data-v-9b88a405]{width:calc(var(--wp-spacing) * 24)}.wp\\:w-48[data-v-9b88a405]{width:calc(var(--wp-spacing) * 48)}.wp\\:w-72[data-v-9b88a405]{width:calc(var(--wp-spacing) * 72)}.wp\\:w-\\[15px\\][data-v-9b88a405]{width:15px}.wp\\:w-\\[16px\\][data-v-9b88a405]{width:16px}.wp\\:w-\\[min\\(92vw\\,330px\\)\\][data-v-9b88a405]{width:min(92vw,330px)}.wp\\:w-auto[data-v-9b88a405]{width:auto}.wp\\:w-fit[data-v-9b88a405]{width:-moz-fit-content;width:fit-content}.wp\\:w-full[data-v-9b88a405]{width:100%}.wp\\:max-w-80[data-v-9b88a405]{max-width:calc(var(--wp-spacing) * 80)}.wp\\:max-w-\\[330px\\][data-v-9b88a405]{max-width:330px}.wp\\:max-w-\\[calc\\(100\\%-2rem\\)\\][data-v-9b88a405]{max-width:calc(100% - 2rem)}.wp\\:max-w-lg[data-v-9b88a405]{max-width:var(--wp-container-lg)}.wp\\:max-w-md[data-v-9b88a405]{max-width:var(--wp-container-md)}.wp\\:max-w-screen-2xl[data-v-9b88a405]{max-width:var(--wp-breakpoint-2xl)}.wp\\:min-w-0[data-v-9b88a405]{min-width:calc(var(--wp-spacing) * 0)}.wp\\:min-w-5[data-v-9b88a405]{min-width:calc(var(--wp-spacing) * 5)}.wp\\:min-w-8[data-v-9b88a405]{min-width:calc(var(--wp-spacing) * 8)}.wp\\:min-w-9[data-v-9b88a405]{min-width:calc(var(--wp-spacing) * 9)}.wp\\:min-w-10[data-v-9b88a405]{min-width:calc(var(--wp-spacing) * 10)}.wp\\:min-w-\\[8rem\\][data-v-9b88a405]{min-width:8rem}.wp\\:min-w-\\[var\\(--reka-select-trigger-width\\)\\][data-v-9b88a405]{min-width:var(--reka-select-trigger-width)}.wp\\:flex-1[data-v-9b88a405]{flex:1}.wp\\:shrink-0[data-v-9b88a405]{flex-shrink:0}.wp\\:grow[data-v-9b88a405]{flex-grow:1}.wp\\:origin-\\(--reka-dropdown-menu-content-transform-origin\\)[data-v-9b88a405]{transform-origin:var(--reka-dropdown-menu-content-transform-origin)}.wp\\:origin-\\(--reka-popover-content-transform-origin\\)[data-v-9b88a405]{transform-origin:var(--reka-popover-content-transform-origin)}.wp\\:translate-x-0[data-v-9b88a405]{--tw-translate-x:calc(var(--wp-spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:translate-x-5[data-v-9b88a405]{--tw-translate-x:calc(var(--wp-spacing) * 5);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:translate-x-\\[-50\\%\\][data-v-9b88a405]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:-translate-y-1\\/2[data-v-9b88a405]{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:translate-y-0\\.5[data-v-9b88a405]{--tw-translate-y:calc(var(--wp-spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:translate-y-\\[-50\\%\\][data-v-9b88a405]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:translate-y-\\[calc\\(-50\\%_-_2px\\)\\][data-v-9b88a405]{--tw-translate-y:calc(-50% - 2px);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:rotate-45[data-v-9b88a405]{rotate:45deg}.wp\\:animate-in[data-v-9b88a405]{animation:enter-9b88a405 var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.wp\\:animate-pulse[data-v-9b88a405]{animation:var(--wp-animate-pulse)}.wp\\:cursor-default[data-v-9b88a405]{cursor:default}.wp\\:cursor-move[data-v-9b88a405]{cursor:move}.wp\\:cursor-pointer[data-v-9b88a405]{cursor:pointer}.wp\\:touch-none[data-v-9b88a405]{touch-action:none}.wp\\:scroll-my-1[data-v-9b88a405]{scroll-margin-block:calc(var(--wp-spacing) * 1)}.wp\\:scroll-py-1[data-v-9b88a405]{scroll-padding-block:calc(var(--wp-spacing) * 1)}.wp\\:auto-rows-min[data-v-9b88a405]{grid-auto-rows:min-content}.wp\\:grid-cols-2[data-v-9b88a405]{grid-template-columns:repeat(2,minmax(0,1fr))}.wp\\:grid-cols-3[data-v-9b88a405]{grid-template-columns:repeat(3,minmax(0,1fr))}.wp\\:grid-rows-\\[auto_auto\\][data-v-9b88a405]{grid-template-rows:auto auto}.wp\\:flex-col[data-v-9b88a405]{flex-direction:column}.wp\\:flex-col-reverse[data-v-9b88a405]{flex-direction:column-reverse}.wp\\:place-items-center[data-v-9b88a405]{place-items:center}.wp\\:items-center[data-v-9b88a405]{align-items:center}.wp\\:items-end[data-v-9b88a405]{align-items:flex-end}.wp\\:items-start[data-v-9b88a405]{align-items:flex-start}.wp\\:justify-between[data-v-9b88a405]{justify-content:space-between}.wp\\:justify-center[data-v-9b88a405]{justify-content:center}.wp\\:justify-start[data-v-9b88a405]{justify-content:flex-start}.wp\\:gap-0[data-v-9b88a405]{gap:calc(var(--wp-spacing) * 0)}.wp\\:gap-1[data-v-9b88a405]{gap:calc(var(--wp-spacing) * 1)}.wp\\:gap-1\\.5[data-v-9b88a405]{gap:calc(var(--wp-spacing) * 1.5)}.wp\\:gap-2[data-v-9b88a405]{gap:calc(var(--wp-spacing) * 2)}.wp\\:gap-3[data-v-9b88a405]{gap:calc(var(--wp-spacing) * 3)}.wp\\:gap-4[data-v-9b88a405]{gap:calc(var(--wp-spacing) * 4)}.wp\\:gap-6[data-v-9b88a405]{gap:calc(var(--wp-spacing) * 6)}.wp\\:gap-\\[--spacing\\(var\\(--gap\\)\\)\\][data-v-9b88a405]{gap:calc(var(--wp-spacing) * var(--gap))}:where(.wp\\:space-y-2[data-v-9b88a405]>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--wp-spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--wp-spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.wp\\:space-y-4[data-v-9b88a405]>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--wp-spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--wp-spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.wp\\:space-y-6[data-v-9b88a405]>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--wp-spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--wp-spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.wp\\:gap-x-6[data-v-9b88a405]{column-gap:calc(var(--wp-spacing) * 6)}.wp\\:gap-y-3[data-v-9b88a405]{row-gap:calc(var(--wp-spacing) * 3)}.wp\\:self-start[data-v-9b88a405]{align-self:flex-start}.wp\\:justify-self-end[data-v-9b88a405]{justify-self:flex-end}.wp\\:truncate[data-v-9b88a405]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.wp\\:overflow-auto[data-v-9b88a405]{overflow:auto}.wp\\:overflow-hidden[data-v-9b88a405]{overflow:hidden}.wp\\:overflow-x-hidden[data-v-9b88a405]{overflow-x:hidden}.wp\\:overflow-y-auto[data-v-9b88a405]{overflow-y:auto}.wp\\:rounded[data-v-9b88a405]{border-radius:.25rem}.wp\\:rounded-2xl[data-v-9b88a405]{border-radius:var(--wp-radius-2xl)}.wp\\:rounded-\\[2px\\][data-v-9b88a405]{border-radius:2px}.wp\\:rounded-\\[inherit\\][data-v-9b88a405]{border-radius:inherit}.wp\\:rounded-full[data-v-9b88a405]{border-radius:3.40282e38px}.wp\\:rounded-lg[data-v-9b88a405]{border-radius:var(--radius)}.wp\\:rounded-md[data-v-9b88a405]{border-radius:calc(var(--radius) - 2px)}.wp\\:rounded-sm[data-v-9b88a405]{border-radius:calc(var(--radius) - 4px)}.wp\\:rounded-xl[data-v-9b88a405]{border-radius:calc(var(--radius) + 4px)}.wp\\:rounded-xs[data-v-9b88a405]{border-radius:var(--wp-radius-xs)}.wp\\:border[data-v-9b88a405]{border-style:var(--tw-border-style);border-width:1px}.wp\\:border-0[data-v-9b88a405]{border-style:var(--tw-border-style);border-width:0}.wp\\:border-t[data-v-9b88a405]{border-top-style:var(--tw-border-style);border-top-width:1px}.wp\\:border-b[data-v-9b88a405]{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.wp\\:border-l[data-v-9b88a405]{border-left-style:var(--tw-border-style);border-left-width:1px}.wp\\:border-blue-500[data-v-9b88a405]{border-color:var(--wp-color-blue-500)}.wp\\:border-border[data-v-9b88a405]{border-color:var(--border)}.wp\\:border-destructive[data-v-9b88a405]{border-color:var(--destructive)}.wp\\:border-input[data-v-9b88a405]{border-color:var(--input)}.wp\\:border-primary[data-v-9b88a405]{border-color:var(--primary)}.wp\\:border-white\\/20[data-v-9b88a405]{border-color:var(--wp-color-white)}@supports (color:color-mix(in lab, red, red)){.wp\\:border-white\\/20[data-v-9b88a405]{border-color:color-mix(in oklab, var(--wp-color-white) 20%, transparent)}}.wp\\:border-t-transparent[data-v-9b88a405]{border-top-color:#0000}.wp\\:border-l-transparent[data-v-9b88a405]{border-left-color:#0000}.wp\\:bg-\\[var\\(--color-red\\)\\]\\/12[data-v-9b88a405]{background-color:var(--color-red)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-\\[var\\(--color-red\\)\\]\\/12[data-v-9b88a405]{background-color:color-mix(in oklab, var(--color-red) 12%, transparent)}}.wp\\:bg-\\[var\\(--p-primary-color\\)\\]\\/12[data-v-9b88a405]{background-color:var(--p-primary-color)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-\\[var\\(--p-primary-color\\)\\]\\/12[data-v-9b88a405]{background-color:color-mix(in oklab, var(--p-primary-color) 12%, transparent)}}.wp\\:bg-amber-100[data-v-9b88a405]{background-color:var(--wp-color-amber-100)}.wp\\:bg-background[data-v-9b88a405],.wp\\:bg-background\\/95[data-v-9b88a405]{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-background\\/95[data-v-9b88a405]{background-color:color-mix(in oklab, var(--background) 95%, transparent)}}.wp\\:bg-black[data-v-9b88a405],.wp\\:bg-black\\/80[data-v-9b88a405]{background-color:var(--wp-color-black)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-black\\/80[data-v-9b88a405]{background-color:color-mix(in oklab, var(--wp-color-black) 80%, transparent)}}.wp\\:bg-blue-100[data-v-9b88a405]{background-color:var(--wp-color-blue-100)}.wp\\:bg-border[data-v-9b88a405]{background-color:var(--border)}.wp\\:bg-card[data-v-9b88a405]{background-color:var(--card)}.wp\\:bg-destructive[data-v-9b88a405]{background-color:var(--destructive)}.wp\\:bg-emerald-100[data-v-9b88a405]{background-color:var(--wp-color-emerald-100)}.wp\\:bg-foreground[data-v-9b88a405]{background-color:var(--foreground)}.wp\\:bg-muted[data-v-9b88a405]{background-color:var(--muted)}.wp\\:bg-neutral-100[data-v-9b88a405]{background-color:var(--wp-color-neutral-100)}.wp\\:bg-neutral-800[data-v-9b88a405]{background-color:var(--wp-color-neutral-800)}.wp\\:bg-popover[data-v-9b88a405]{background-color:var(--popover)}.wp\\:bg-primary[data-v-9b88a405],.wp\\:bg-primary\\/10[data-v-9b88a405]{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-primary\\/10[data-v-9b88a405]{background-color:color-mix(in oklab, var(--primary) 10%, transparent)}}.wp\\:bg-purple-100[data-v-9b88a405]{background-color:var(--wp-color-purple-100)}.wp\\:bg-secondary[data-v-9b88a405]{background-color:var(--secondary)}.wp\\:bg-status-available[data-v-9b88a405]{background-color:var(--status-available)}.wp\\:bg-status-hold\\/12[data-v-9b88a405]{background-color:var(--status-hold)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-status-hold\\/12[data-v-9b88a405]{background-color:color-mix(in oklab, var(--status-hold) 12%, transparent)}}.wp\\:bg-transparent[data-v-9b88a405]{background-color:#0000}.wp\\:bg-white[data-v-9b88a405],.wp\\:bg-white\\/70[data-v-9b88a405]{background-color:var(--wp-color-white)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-white\\/70[data-v-9b88a405]{background-color:color-mix(in oklab, var(--wp-color-white) 70%, transparent)}}.wp\\:bg-gradient-to-r[data-v-9b88a405]{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.wp\\:from-\\[color\\:var\\(--p-primary-color\\)\\]\\/80[data-v-9b88a405]{--tw-gradient-from:var(--p-primary-color)}@supports (color:color-mix(in lab, red, red)){.wp\\:from-\\[color\\:var\\(--p-primary-color\\)\\]\\/80[data-v-9b88a405]{--tw-gradient-from:color-mix(in oklab, var(--p-primary-color) 80%, transparent)}}.wp\\:from-\\[color\\:var\\(--p-primary-color\\)\\]\\/80[data-v-9b88a405]{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.wp\\:from-destructive\\/60[data-v-9b88a405]{--tw-gradient-from:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:from-destructive\\/60[data-v-9b88a405]{--tw-gradient-from:color-mix(in oklab, var(--destructive) 60%, transparent)}}.wp\\:from-destructive\\/60[data-v-9b88a405]{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.wp\\:to-\\[color\\:var\\(--p-primary-color\\)\\]\\/100[data-v-9b88a405]{--tw-gradient-to:var(--p-primary-color);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.wp\\:to-destructive\\/90[data-v-9b88a405]{--tw-gradient-to:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:to-destructive\\/90[data-v-9b88a405]{--tw-gradient-to:color-mix(in oklab, var(--destructive) 90%, transparent)}}.wp\\:to-destructive\\/90[data-v-9b88a405]{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.wp\\:fill-current[data-v-9b88a405]{fill:currentColor}.wp\\:fill-foreground[data-v-9b88a405]{fill:var(--foreground)}.wp\\:object-contain[data-v-9b88a405]{object-fit:contain}.wp\\:object-cover[data-v-9b88a405]{object-fit:cover}.wp\\:p-0[data-v-9b88a405]{padding:calc(var(--wp-spacing) * 0)}.wp\\:p-0\\.5[data-v-9b88a405]{padding:calc(var(--wp-spacing) * .5)}.wp\\:p-1[data-v-9b88a405]{padding:calc(var(--wp-spacing) * 1)}.wp\\:p-2[data-v-9b88a405]{padding:calc(var(--wp-spacing) * 2)}.wp\\:p-3[data-v-9b88a405]{padding:calc(var(--wp-spacing) * 3)}.wp\\:p-4[data-v-9b88a405]{padding:calc(var(--wp-spacing) * 4)}.wp\\:p-6[data-v-9b88a405]{padding:calc(var(--wp-spacing) * 6)}.wp\\:p-px[data-v-9b88a405]{padding:1px}.wp\\:px-1[data-v-9b88a405]{padding-inline:calc(var(--wp-spacing) * 1)}.wp\\:px-1\\.5[data-v-9b88a405]{padding-inline:calc(var(--wp-spacing) * 1.5)}.wp\\:px-2[data-v-9b88a405]{padding-inline:calc(var(--wp-spacing) * 2)}.wp\\:px-2\\.5[data-v-9b88a405]{padding-inline:calc(var(--wp-spacing) * 2.5)}.wp\\:px-3[data-v-9b88a405]{padding-inline:calc(var(--wp-spacing) * 3)}.wp\\:px-4[data-v-9b88a405]{padding-inline:calc(var(--wp-spacing) * 4)}.wp\\:px-6[data-v-9b88a405]{padding-inline:calc(var(--wp-spacing) * 6)}.wp\\:px-10[data-v-9b88a405]{padding-inline:calc(var(--wp-spacing) * 10)}.wp\\:px-14[data-v-9b88a405]{padding-inline:calc(var(--wp-spacing) * 14)}.wp\\:py-1[data-v-9b88a405]{padding-block:calc(var(--wp-spacing) * 1)}.wp\\:py-1\\.5[data-v-9b88a405]{padding-block:calc(var(--wp-spacing) * 1.5)}.wp\\:py-2[data-v-9b88a405]{padding-block:calc(var(--wp-spacing) * 2)}.wp\\:py-3[data-v-9b88a405]{padding-block:calc(var(--wp-spacing) * 3)}.wp\\:py-4[data-v-9b88a405]{padding-block:calc(var(--wp-spacing) * 4)}.wp\\:py-6[data-v-9b88a405]{padding-block:calc(var(--wp-spacing) * 6)}.wp\\:py-8[data-v-9b88a405]{padding-block:calc(var(--wp-spacing) * 8)}.wp\\:pt-0[data-v-9b88a405]{padding-top:calc(var(--wp-spacing) * 0)}.wp\\:pr-2[data-v-9b88a405]{padding-right:calc(var(--wp-spacing) * 2)}.wp\\:pr-4[data-v-9b88a405]{padding-right:calc(var(--wp-spacing) * 4)}.wp\\:pr-8[data-v-9b88a405]{padding-right:calc(var(--wp-spacing) * 8)}.wp\\:pb-0[data-v-9b88a405]{padding-bottom:calc(var(--wp-spacing) * 0)}.wp\\:pb-4[data-v-9b88a405]{padding-bottom:calc(var(--wp-spacing) * 4)}.wp\\:pl-2[data-v-9b88a405]{padding-left:calc(var(--wp-spacing) * 2)}.wp\\:pl-8[data-v-9b88a405]{padding-left:calc(var(--wp-spacing) * 8)}.wp\\:text-center[data-v-9b88a405]{text-align:center}.wp\\:text-left[data-v-9b88a405]{text-align:left}.wp\\:font-mono[data-v-9b88a405]{font-family:var(--wp-font-mono)}.wp\\:font-sans[data-v-9b88a405]{font-family:Montserrat,sans-serif}.wp\\:text-3xl[data-v-9b88a405]{font-size:var(--wp-text-3xl);line-height:var(--tw-leading,var(--wp-text-3xl--line-height))}.wp\\:text-base[data-v-9b88a405]{font-size:var(--wp-text-base);line-height:var(--tw-leading,var(--wp-text-base--line-height))}.wp\\:text-lg[data-v-9b88a405]{font-size:var(--wp-text-lg);line-height:var(--tw-leading,var(--wp-text-lg--line-height))}.wp\\:text-sm[data-v-9b88a405]{font-size:var(--wp-text-sm);line-height:var(--tw-leading,var(--wp-text-sm--line-height))}.wp\\:text-xs[data-v-9b88a405]{font-size:var(--wp-text-xs);line-height:var(--tw-leading,var(--wp-text-xs--line-height))}.wp\\:text-\\[10px\\][data-v-9b88a405]{font-size:10px}.wp\\:text-\\[11px\\][data-v-9b88a405]{font-size:11px}.wp\\:leading-none[data-v-9b88a405]{--tw-leading:1;line-height:1}.wp\\:font-bold[data-v-9b88a405]{--tw-font-weight:var(--wp-font-weight-bold);font-weight:var(--wp-font-weight-bold)}.wp\\:font-light[data-v-9b88a405]{--tw-font-weight:var(--wp-font-weight-light);font-weight:var(--wp-font-weight-light)}.wp\\:font-medium[data-v-9b88a405]{--tw-font-weight:var(--wp-font-weight-medium);font-weight:var(--wp-font-weight-medium)}.wp\\:font-semibold[data-v-9b88a405]{--tw-font-weight:var(--wp-font-weight-semibold);font-weight:var(--wp-font-weight-semibold)}.wp\\:tracking-wider[data-v-9b88a405]{--tw-tracking:var(--wp-tracking-wider);letter-spacing:var(--wp-tracking-wider)}.wp\\:tracking-widest[data-v-9b88a405]{--tw-tracking:var(--wp-tracking-widest);letter-spacing:var(--wp-tracking-widest)}.wp\\:text-balance[data-v-9b88a405]{text-wrap:balance}.wp\\:whitespace-nowrap[data-v-9b88a405]{white-space:nowrap}.wp\\:text-\\[var\\(--color-avaible\\)\\][data-v-9b88a405]{color:var(--color-avaible)}.wp\\:text-\\[var\\(--color-primary\\)\\][data-v-9b88a405]{color:var(--color-primary)}.wp\\:text-\\[var\\(--color-red\\)\\][data-v-9b88a405]{color:var(--color-red)}.wp\\:text-\\[var\\(--color-settings\\)\\][data-v-9b88a405]{color:var(--color-settings)}.wp\\:text-\\[var\\(--p-primary-color\\)\\][data-v-9b88a405]{color:var(--p-primary-color)}.wp\\:text-\\[var\\(--primary\\)\\][data-v-9b88a405]{color:var(--primary)}.wp\\:text-amber-500[data-v-9b88a405]{color:var(--wp-color-amber-500)}.wp\\:text-amber-600[data-v-9b88a405]{color:var(--wp-color-amber-600)}.wp\\:text-background[data-v-9b88a405]{color:var(--background)}.wp\\:text-black[data-v-9b88a405]{color:var(--wp-color-black)}.wp\\:text-blue-500[data-v-9b88a405]{color:var(--wp-color-blue-500)}.wp\\:text-blue-600[data-v-9b88a405]{color:var(--wp-color-blue-600)}.wp\\:text-card-foreground[data-v-9b88a405]{color:var(--card-foreground)}.wp\\:text-destructive[data-v-9b88a405]{color:var(--destructive)}.wp\\:text-emerald-600[data-v-9b88a405]{color:var(--wp-color-emerald-600)}.wp\\:text-foreground[data-v-9b88a405]{color:var(--foreground)}.wp\\:text-green-500[data-v-9b88a405]{color:var(--wp-color-green-500)}.wp\\:text-muted-foreground[data-v-9b88a405]{color:var(--muted-foreground)}.wp\\:text-neutral-400[data-v-9b88a405]{color:var(--wp-color-neutral-400)}.wp\\:text-neutral-500[data-v-9b88a405]{color:var(--wp-color-neutral-500)}.wp\\:text-neutral-600[data-v-9b88a405]{color:var(--wp-color-neutral-600)}.wp\\:text-neutral-800[data-v-9b88a405]{color:var(--wp-color-neutral-800)}.wp\\:text-neutral-900[data-v-9b88a405]{color:var(--wp-color-neutral-900)}.wp\\:text-popover-foreground[data-v-9b88a405]{color:var(--popover-foreground)}.wp\\:text-primary[data-v-9b88a405]{color:var(--primary)}.wp\\:text-primary-foreground[data-v-9b88a405]{color:var(--primary-foreground)}.wp\\:text-purple-600[data-v-9b88a405]{color:var(--wp-color-purple-600)}.wp\\:text-red-500[data-v-9b88a405]{color:var(--wp-color-red-500)}.wp\\:text-secondary-foreground[data-v-9b88a405]{color:var(--secondary-foreground)}.wp\\:text-status-available[data-v-9b88a405]{color:var(--status-available)}.wp\\:text-status-disconnected[data-v-9b88a405]{color:var(--status-disconnected)}.wp\\:text-status-hold[data-v-9b88a405]{color:var(--status-hold)}.wp\\:text-status-incall[data-v-9b88a405]{color:var(--status-incall)}.wp\\:text-status-incoming[data-v-9b88a405]{color:var(--status-incoming)}.wp\\:text-white[data-v-9b88a405]{color:var(--wp-color-white)}.wp\\:capitalize[data-v-9b88a405]{text-transform:capitalize}.wp\\:underline-offset-4[data-v-9b88a405]{text-underline-offset:4px}.wp\\:opacity-0[data-v-9b88a405]{opacity:0}.wp\\:opacity-50[data-v-9b88a405]{opacity:.5}.wp\\:opacity-70[data-v-9b88a405]{opacity:.7}.wp\\:opacity-100[data-v-9b88a405]{opacity:1}.wp\\:shadow-lg[data-v-9b88a405]{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.wp\\:shadow-md[data-v-9b88a405]{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.wp\\:shadow-sm[data-v-9b88a405]{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.wp\\:shadow-xs[data-v-9b88a405]{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.wp\\:inset-shadow-2xs[data-v-9b88a405]{--tw-inset-shadow:inset 0 1px var(--tw-inset-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.wp\\:ring-ring\\/50[data-v-9b88a405]{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.wp\\:ring-ring\\/50[data-v-9b88a405]{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.wp\\:ring-offset-background[data-v-9b88a405]{--tw-ring-offset-color:var(--background)}.wp\\:outline-hidden[data-v-9b88a405]{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.wp\\:outline-hidden[data-v-9b88a405]{outline-offset:2px;outline:2px solid #0000}}.wp\\:backdrop-blur[data-v-9b88a405]{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.wp\\:backdrop-blur-\\[1px\\][data-v-9b88a405]{--tw-backdrop-blur:blur(1px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.wp\\:transition-\\[color\\,box-shadow\\][data-v-9b88a405]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--wp-default-transition-timing-function));transition-duration:var(--tw-duration,var(--wp-default-transition-duration))}.wp\\:transition-all[data-v-9b88a405]{transition-property:all;transition-timing-function:var(--tw-ease,var(--wp-default-transition-timing-function));transition-duration:var(--tw-duration,var(--wp-default-transition-duration))}.wp\\:transition-colors[data-v-9b88a405]{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--wp-default-transition-timing-function));transition-duration:var(--tw-duration,var(--wp-default-transition-duration))}.wp\\:transition-opacity[data-v-9b88a405]{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--wp-default-transition-timing-function));transition-duration:var(--tw-duration,var(--wp-default-transition-duration))}.wp\\:transition-transform[data-v-9b88a405]{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--wp-default-transition-timing-function));transition-duration:var(--tw-duration,var(--wp-default-transition-duration))}.wp\\:duration-150[data-v-9b88a405]{--tw-duration:.15s;transition-duration:.15s}.wp\\:duration-200[data-v-9b88a405]{--tw-duration:.2s;transition-duration:.2s}.wp\\:duration-300[data-v-9b88a405]{--tw-duration:.3s;transition-duration:.3s}.wp\\:ease-in-out[data-v-9b88a405]{--tw-ease:var(--wp-ease-in-out);transition-timing-function:var(--wp-ease-in-out)}.wp\\:fade-in-0[data-v-9b88a405]{--tw-enter-opacity:0}.wp\\:outline-none[data-v-9b88a405]{--tw-outline-style:none;outline-style:none}.wp\\:select-none[data-v-9b88a405]{-webkit-user-select:none;user-select:none}.wp\\:select-text[data-v-9b88a405]{-webkit-user-select:text;user-select:text}.wp\\:zoom-in-95[data-v-9b88a405]{--tw-enter-scale:.95}.wp\\:group-data-\\[disabled\\=true\\]\\:pointer-events-none[data-v-9b88a405]:is(:where(.wp\\:group)[data-disabled=true] *){pointer-events:none}.wp\\:group-data-\\[disabled\\=true\\]\\:opacity-50[data-v-9b88a405]:is(:where(.wp\\:group)[data-disabled=true] *){opacity:.5}.wp\\:peer-disabled\\:cursor-not-allowed[data-v-9b88a405]:is(:where(.wp\\:peer):disabled~*){cursor:not-allowed}.wp\\:peer-disabled\\:opacity-50[data-v-9b88a405]:is(:where(.wp\\:peer):disabled~*){opacity:.5}.wp\\:selection\\:bg-primary[data-v-9b88a405] ::selection,.wp\\:selection\\:bg-primary[data-v-9b88a405]::selection{background-color:var(--primary)}.wp\\:selection\\:text-primary-foreground[data-v-9b88a405] ::selection,.wp\\:selection\\:text-primary-foreground[data-v-9b88a405]::selection{color:var(--primary-foreground)}.wp\\:file\\:inline-flex[data-v-9b88a405]::-webkit-file-upload-button{display:inline-flex}.wp\\:file\\:inline-flex[data-v-9b88a405]::file-selector-button{display:inline-flex}.wp\\:file\\:h-7[data-v-9b88a405]::-webkit-file-upload-button{height:calc(var(--wp-spacing) * 7)}.wp\\:file\\:h-7[data-v-9b88a405]::file-selector-button{height:calc(var(--wp-spacing) * 7)}.wp\\:file\\:border-0[data-v-9b88a405]::-webkit-file-upload-button{border-style:var(--tw-border-style);border-width:0}.wp\\:file\\:border-0[data-v-9b88a405]::file-selector-button{border-style:var(--tw-border-style);border-width:0}.wp\\:file\\:bg-transparent[data-v-9b88a405]::-webkit-file-upload-button{background-color:#0000}.wp\\:file\\:bg-transparent[data-v-9b88a405]::file-selector-button{background-color:#0000}.wp\\:file\\:text-sm[data-v-9b88a405]::-webkit-file-upload-button{font-size:var(--wp-text-sm);line-height:var(--tw-leading,var(--wp-text-sm--line-height))}.wp\\:file\\:text-sm[data-v-9b88a405]::file-selector-button{font-size:var(--wp-text-sm);line-height:var(--tw-leading,var(--wp-text-sm--line-height))}.wp\\:file\\:font-medium[data-v-9b88a405]::-webkit-file-upload-button{--tw-font-weight:var(--wp-font-weight-medium);font-weight:var(--wp-font-weight-medium)}.wp\\:file\\:font-medium[data-v-9b88a405]::file-selector-button{--tw-font-weight:var(--wp-font-weight-medium);font-weight:var(--wp-font-weight-medium)}.wp\\:file\\:text-foreground[data-v-9b88a405]::-webkit-file-upload-button{color:var(--foreground)}.wp\\:file\\:text-foreground[data-v-9b88a405]::file-selector-button{color:var(--foreground)}.wp\\:placeholder\\:text-muted-foreground[data-v-9b88a405]::placeholder{color:var(--muted-foreground)}.wp\\:last\\:border-b-0[data-v-9b88a405]:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media (hover:hover){.wp\\:hover\\:bg-\\[var\\(--p-primary-color\\)\\]\\/8[data-v-9b88a405]:hover{background-color:var(--p-primary-color)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-\\[var\\(--p-primary-color\\)\\]\\/8[data-v-9b88a405]:hover{background-color:color-mix(in oklab, var(--p-primary-color) 8%, transparent)}}.wp\\:hover\\:bg-\\[var\\(--p-primary-color\\)\\]\\/10[data-v-9b88a405]:hover{background-color:var(--p-primary-color)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-\\[var\\(--p-primary-color\\)\\]\\/10[data-v-9b88a405]:hover{background-color:color-mix(in oklab, var(--p-primary-color) 10%, transparent)}}.wp\\:hover\\:bg-\\[var\\(--p-primary-color\\)\\]\\/20[data-v-9b88a405]:hover{background-color:var(--p-primary-color)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-\\[var\\(--p-primary-color\\)\\]\\/20[data-v-9b88a405]:hover{background-color:color-mix(in oklab, var(--p-primary-color) 20%, transparent)}}.wp\\:hover\\:bg-accent[data-v-9b88a405]:hover,.wp\\:hover\\:bg-accent\\/50[data-v-9b88a405]:hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-accent\\/50[data-v-9b88a405]:hover{background-color:color-mix(in oklab, var(--accent) 50%, transparent)}}.wp\\:hover\\:bg-destructive\\/90[data-v-9b88a405]:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-destructive\\/90[data-v-9b88a405]:hover{background-color:color-mix(in oklab, var(--destructive) 90%, transparent)}}.wp\\:hover\\:bg-muted[data-v-9b88a405]:hover{background-color:var(--muted)}.wp\\:hover\\:bg-neutral-100[data-v-9b88a405]:hover{background-color:var(--wp-color-neutral-100)}.wp\\:hover\\:bg-neutral-200[data-v-9b88a405]:hover{background-color:var(--wp-color-neutral-200)}.wp\\:hover\\:bg-primary\\/10[data-v-9b88a405]:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-primary\\/10[data-v-9b88a405]:hover{background-color:color-mix(in oklab, var(--primary) 10%, transparent)}}.wp\\:hover\\:bg-primary\\/90[data-v-9b88a405]:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-primary\\/90[data-v-9b88a405]:hover{background-color:color-mix(in oklab, var(--primary) 90%, transparent)}}.wp\\:hover\\:bg-secondary[data-v-9b88a405]:hover,.wp\\:hover\\:bg-secondary\\/80[data-v-9b88a405]:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-secondary\\/80[data-v-9b88a405]:hover{background-color:color-mix(in oklab, var(--secondary) 80%, transparent)}}.wp\\:hover\\:bg-status-available\\/90[data-v-9b88a405]:hover{background-color:var(--status-available)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-status-available\\/90[data-v-9b88a405]:hover{background-color:color-mix(in oklab, var(--status-available) 90%, transparent)}}.wp\\:hover\\:bg-transparent[data-v-9b88a405]:hover{background-color:#0000}.wp\\:hover\\:from-\\[color\\:var\\(--p-primary-color\\)\\]\\/75[data-v-9b88a405]:hover{--tw-gradient-from:var(--p-primary-color)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:from-\\[color\\:var\\(--p-primary-color\\)\\]\\/75[data-v-9b88a405]:hover{--tw-gradient-from:color-mix(in oklab, var(--p-primary-color) 75%, transparent)}}.wp\\:hover\\:from-\\[color\\:var\\(--p-primary-color\\)\\]\\/75[data-v-9b88a405]:hover{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.wp\\:hover\\:from-destructive\\/70[data-v-9b88a405]:hover{--tw-gradient-from:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:from-destructive\\/70[data-v-9b88a405]:hover{--tw-gradient-from:color-mix(in oklab, var(--destructive) 70%, transparent)}}.wp\\:hover\\:from-destructive\\/70[data-v-9b88a405]:hover{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.wp\\:hover\\:to-\\[color\\:var\\(--p-primary-color\\)\\][data-v-9b88a405]:hover{--tw-gradient-to:var(--p-primary-color);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.wp\\:hover\\:to-destructive\\/95[data-v-9b88a405]:hover{--tw-gradient-to:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:to-destructive\\/95[data-v-9b88a405]:hover{--tw-gradient-to:color-mix(in oklab, var(--destructive) 95%, transparent)}}.wp\\:hover\\:to-destructive\\/95[data-v-9b88a405]:hover{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.wp\\:hover\\:text-accent-foreground[data-v-9b88a405]:hover{color:var(--accent-foreground)}.wp\\:hover\\:text-destructive[data-v-9b88a405]:hover{color:var(--destructive)}.wp\\:hover\\:text-foreground[data-v-9b88a405]:hover{color:var(--foreground)}.wp\\:hover\\:text-muted-foreground[data-v-9b88a405]:hover{color:var(--muted-foreground)}.wp\\:hover\\:text-primary[data-v-9b88a405]:hover{color:var(--primary)}.wp\\:hover\\:text-status-available\\/80[data-v-9b88a405]:hover{color:var(--status-available)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-available\\/80[data-v-9b88a405]:hover{color:color-mix(in oklab, var(--status-available) 80%, transparent)}}.wp\\:hover\\:text-status-disconnected[data-v-9b88a405]:hover,.wp\\:hover\\:text-status-disconnected\\/80[data-v-9b88a405]:hover{color:var(--status-disconnected)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-disconnected\\/80[data-v-9b88a405]:hover{color:color-mix(in oklab, var(--status-disconnected) 80%, transparent)}}.wp\\:hover\\:text-status-hold\\/80[data-v-9b88a405]:hover{color:var(--status-hold)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-hold\\/80[data-v-9b88a405]:hover{color:color-mix(in oklab, var(--status-hold) 80%, transparent)}}.wp\\:hover\\:text-status-incall\\/80[data-v-9b88a405]:hover{color:var(--status-incall)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-incall\\/80[data-v-9b88a405]:hover{color:color-mix(in oklab, var(--status-incall) 80%, transparent)}}.wp\\:hover\\:text-status-incoming\\/80[data-v-9b88a405]:hover{color:var(--status-incoming)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-incoming\\/80[data-v-9b88a405]:hover{color:color-mix(in oklab, var(--status-incoming) 80%, transparent)}}.wp\\:hover\\:underline[data-v-9b88a405]:hover{text-decoration-line:underline}.wp\\:hover\\:opacity-80[data-v-9b88a405]:hover{opacity:.8}.wp\\:hover\\:opacity-100[data-v-9b88a405]:hover{opacity:1}.wp\\:hover\\:ring-4[data-v-9b88a405]:hover{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}.wp\\:focus\\:z-10[data-v-9b88a405]:focus{z-index:10}.wp\\:focus\\:bg-accent[data-v-9b88a405]:focus{background-color:var(--accent)}.wp\\:focus\\:text-accent-foreground[data-v-9b88a405]:focus{color:var(--accent-foreground)}.wp\\:focus\\:ring-2[data-v-9b88a405]:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.wp\\:focus\\:ring-ring[data-v-9b88a405]:focus{--tw-ring-color:var(--ring)}.wp\\:focus\\:ring-offset-2[data-v-9b88a405]:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.wp\\:focus\\:outline-hidden[data-v-9b88a405]:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.wp\\:focus\\:outline-hidden[data-v-9b88a405]:focus{outline-offset:2px;outline:2px solid #0000}}.wp\\:focus-visible\\:z-10[data-v-9b88a405]:focus-visible{z-index:10}.wp\\:focus-visible\\:border-ring[data-v-9b88a405]:focus-visible{border-color:var(--ring)}.wp\\:focus-visible\\:ring-2[data-v-9b88a405]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.wp\\:focus-visible\\:ring-4[data-v-9b88a405]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.wp\\:focus-visible\\:ring-\\[3px\\][data-v-9b88a405]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.wp\\:focus-visible\\:ring-\\[var\\(--p-primary-color\\)\\][data-v-9b88a405]:focus-visible{--tw-ring-color:var(--p-primary-color)}.wp\\:focus-visible\\:ring-destructive\\/20[data-v-9b88a405]:focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:focus-visible\\:ring-destructive\\/20[data-v-9b88a405]:focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.wp\\:focus-visible\\:ring-primary\\/50[data-v-9b88a405]:focus-visible{--tw-ring-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.wp\\:focus-visible\\:ring-primary\\/50[data-v-9b88a405]:focus-visible{--tw-ring-color:color-mix(in oklab, var(--primary) 50%, transparent)}}.wp\\:focus-visible\\:ring-ring\\/50[data-v-9b88a405]:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.wp\\:focus-visible\\:ring-ring\\/50[data-v-9b88a405]:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.wp\\:focus-visible\\:ring-offset-2[data-v-9b88a405]:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.wp\\:focus-visible\\:ring-offset-white[data-v-9b88a405]:focus-visible{--tw-ring-offset-color:var(--wp-color-white)}.wp\\:focus-visible\\:outline-hidden[data-v-9b88a405]:focus-visible{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.wp\\:focus-visible\\:outline-hidden[data-v-9b88a405]:focus-visible{outline-offset:2px;outline:2px solid #0000}}.wp\\:focus-visible\\:outline-1[data-v-9b88a405]:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.wp\\:active\\:scale-95[data-v-9b88a405]:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.wp\\:disabled\\:pointer-events-none[data-v-9b88a405]:disabled{pointer-events:none}.wp\\:disabled\\:cursor-not-allowed[data-v-9b88a405]:disabled{cursor:not-allowed}.wp\\:disabled\\:opacity-50[data-v-9b88a405]:disabled{opacity:.5}.wp\\:has-data-\\[slot\\=card-action\\]\\:grid-cols-\\[1fr_auto\\][data-v-9b88a405]:has([data-slot=card-action]){grid-template-columns:1fr auto}.wp\\:has-\\[\\>svg\\]\\:px-2\\.5[data-v-9b88a405]:has(>svg){padding-inline:calc(var(--wp-spacing) * 2.5)}.wp\\:has-\\[\\>svg\\]\\:px-3[data-v-9b88a405]:has(>svg){padding-inline:calc(var(--wp-spacing) * 3)}.wp\\:has-\\[\\>svg\\]\\:px-4[data-v-9b88a405]:has(>svg){padding-inline:calc(var(--wp-spacing) * 4)}.wp\\:aria-invalid\\:border-destructive[aria-invalid=true][data-v-9b88a405]{border-color:var(--destructive)}.wp\\:aria-invalid\\:ring-destructive\\/20[aria-invalid=true][data-v-9b88a405]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:aria-invalid\\:ring-destructive\\/20[aria-invalid=true][data-v-9b88a405]{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.wp\\:data-\\[disabled\\]\\:pointer-events-none[data-disabled][data-v-9b88a405]{pointer-events:none}.wp\\:data-\\[disabled\\]\\:opacity-50[data-disabled][data-v-9b88a405]{opacity:.5}.wp\\:data-\\[highlighted\\]\\:bg-accent[data-highlighted][data-v-9b88a405]{background-color:var(--accent)}.wp\\:data-\\[highlighted\\]\\:text-accent-foreground[data-highlighted][data-v-9b88a405]{color:var(--accent-foreground)}.wp\\:data-\\[inset\\]\\:pl-8[data-inset][data-v-9b88a405]{padding-left:calc(var(--wp-spacing) * 8)}.wp\\:data-\\[orientation\\=horizontal\\]\\:h-1\\.5[data-orientation=horizontal][data-v-9b88a405]{height:calc(var(--wp-spacing) * 1.5)}.wp\\:data-\\[orientation\\=horizontal\\]\\:h-full[data-orientation=horizontal][data-v-9b88a405]{height:100%}.wp\\:data-\\[orientation\\=horizontal\\]\\:h-px[data-orientation=horizontal][data-v-9b88a405]{height:1px}.wp\\:data-\\[orientation\\=horizontal\\]\\:w-full[data-orientation=horizontal][data-v-9b88a405]{width:100%}.wp\\:data-\\[orientation\\=vertical\\]\\:h-full[data-orientation=vertical][data-v-9b88a405]{height:100%}.wp\\:data-\\[orientation\\=vertical\\]\\:min-h-44[data-orientation=vertical][data-v-9b88a405]{min-height:calc(var(--wp-spacing) * 44)}.wp\\:data-\\[orientation\\=vertical\\]\\:w-1\\.5[data-orientation=vertical][data-v-9b88a405]{width:calc(var(--wp-spacing) * 1.5)}.wp\\:data-\\[orientation\\=vertical\\]\\:w-auto[data-orientation=vertical][data-v-9b88a405]{width:auto}.wp\\:data-\\[orientation\\=vertical\\]\\:w-full[data-orientation=vertical][data-v-9b88a405]{width:100%}.wp\\:data-\\[orientation\\=vertical\\]\\:w-px[data-orientation=vertical][data-v-9b88a405]{width:1px}.wp\\:data-\\[orientation\\=vertical\\]\\:flex-col[data-orientation=vertical][data-v-9b88a405]{flex-direction:column}.wp\\:data-\\[placeholder\\]\\:text-muted-foreground[data-placeholder][data-v-9b88a405]{color:var(--muted-foreground)}.wp\\:data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom][data-v-9b88a405]{--tw-translate-y:calc(var(--wp-spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:data-\\[side\\=bottom\\]\\:slide-in-from-top-2[data-side=bottom][data-v-9b88a405]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.wp\\:data-\\[side\\=left\\]\\:-translate-x-1[data-side=left][data-v-9b88a405]{--tw-translate-x:calc(var(--wp-spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:data-\\[side\\=left\\]\\:slide-in-from-right-2[data-side=left][data-v-9b88a405]{--tw-enter-translate-x:calc(2*var(--spacing))}.wp\\:data-\\[side\\=right\\]\\:translate-x-1[data-side=right][data-v-9b88a405]{--tw-translate-x:calc(var(--wp-spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:data-\\[side\\=right\\]\\:slide-in-from-left-2[data-side=right][data-v-9b88a405]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.wp\\:data-\\[side\\=top\\]\\:-translate-y-1[data-side=top][data-v-9b88a405]{--tw-translate-y:calc(var(--wp-spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:data-\\[side\\=top\\]\\:slide-in-from-bottom-2[data-side=top][data-v-9b88a405]{--tw-enter-translate-y:calc(2*var(--spacing))}.wp\\:data-\\[size\\=default\\]\\:h-9[data-size=default][data-v-9b88a405]{height:calc(var(--wp-spacing) * 9)}.wp\\:data-\\[size\\=sm\\]\\:h-8[data-size=sm][data-v-9b88a405]{height:calc(var(--wp-spacing) * 8)}:is(.wp\\:\\*\\:data-\\[slot\\=select-value\\]\\:line-clamp-1>*)[data-slot=select-value][data-v-9b88a405]{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:is(.wp\\:\\*\\:data-\\[slot\\=select-value\\]\\:flex>*)[data-slot=select-value][data-v-9b88a405]{display:flex}:is(.wp\\:\\*\\:data-\\[slot\\=select-value\\]\\:items-center>*)[data-slot=select-value][data-v-9b88a405]{align-items:center}:is(.wp\\:\\*\\:data-\\[slot\\=select-value\\]\\:gap-2>*)[data-slot=select-value][data-v-9b88a405]{gap:calc(var(--wp-spacing) * 2)}.wp\\:data-\\[spacing\\=0\\]\\:rounded-none[data-spacing="0"][data-v-9b88a405]{border-radius:0}.wp\\:data-\\[spacing\\=0\\]\\:shadow-none[data-spacing="0"][data-v-9b88a405]{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.wp\\:data-\\[spacing\\=0\\]\\:first\\:rounded-l-md[data-spacing="0"][data-v-9b88a405]:first-child{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.wp\\:data-\\[spacing\\=0\\]\\:last\\:rounded-r-md[data-spacing="0"][data-v-9b88a405]:last-child{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.wp\\:data-\\[state\\=closed\\]\\:animate-accordion-up[data-state=closed][data-v-9b88a405]{animation:accordion-up-9b88a405 var(--tw-animation-duration,var(--tw-duration,.2s))var(--tw-ease,ease-out)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.wp\\:data-\\[state\\=closed\\]\\:animate-out[data-state=closed][data-v-9b88a405]{animation:exit-9b88a405 var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.wp\\:data-\\[state\\=closed\\]\\:fade-out-0[data-state=closed][data-v-9b88a405]{--tw-exit-opacity:0}.wp\\:data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed][data-v-9b88a405]{--tw-exit-scale:.95}.wp\\:data-\\[state\\=on\\]\\:bg-accent[data-state=on][data-v-9b88a405]{background-color:var(--accent)}.wp\\:data-\\[state\\=on\\]\\:text-accent-foreground[data-state=on][data-v-9b88a405]{color:var(--accent-foreground)}.wp\\:data-\\[state\\=open\\]\\:animate-accordion-down[data-state=open][data-v-9b88a405]{animation:accordion-down-9b88a405 var(--tw-animation-duration,var(--tw-duration,.2s))var(--tw-ease,ease-out)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.wp\\:data-\\[state\\=open\\]\\:animate-in[data-state=open][data-v-9b88a405]{animation:enter-9b88a405 var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.wp\\:data-\\[state\\=open\\]\\:bg-accent[data-state=open][data-v-9b88a405]{background-color:var(--accent)}.wp\\:data-\\[state\\=open\\]\\:text-accent-foreground[data-state=open][data-v-9b88a405]{color:var(--accent-foreground)}.wp\\:data-\\[state\\=open\\]\\:text-muted-foreground[data-state=open][data-v-9b88a405]{color:var(--muted-foreground)}.wp\\:data-\\[state\\=open\\]\\:fade-in-0[data-state=open][data-v-9b88a405]{--tw-enter-opacity:0}.wp\\:data-\\[state\\=open\\]\\:zoom-in-95[data-state=open][data-v-9b88a405]{--tw-enter-scale:.95}.wp\\:data-\\[variant\\=destructive\\]\\:text-destructive[data-variant=destructive][data-v-9b88a405]{color:var(--destructive)}.wp\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/10[data-variant=destructive][data-v-9b88a405]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/10[data-variant=destructive][data-v-9b88a405]:focus{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.wp\\:data-\\[variant\\=destructive\\]\\:focus\\:text-destructive[data-variant=destructive][data-v-9b88a405]:focus{color:var(--destructive)}.wp\\:data-\\[variant\\=outline\\]\\:border-\\[color\\:var\\(--color-primary-500\\)\\][data-variant=outline][data-v-9b88a405]{border-color:var(--color-primary-500)}.wp\\:data-\\[variant\\=outline\\]\\:focus-visible\\:ring-\\[color\\:var\\(--color-primary-500\\)\\][data-variant=outline][data-v-9b88a405]:focus-visible{--tw-ring-color:var(--color-primary-500)}.wp\\:data-\\[spacing\\=0\\]\\:data-\\[variant\\=outline\\]\\:border[data-spacing="0"][data-variant=outline][data-v-9b88a405]{border-style:var(--tw-border-style);border-width:1px}.wp\\:data-\\[spacing\\=0\\]\\:data-\\[variant\\=outline\\]\\:border-\\[color\\:var\\(--color-primary-500\\)\\][data-spacing="0"][data-variant=outline][data-v-9b88a405]{border-color:var(--color-primary-500)}.wp\\:data-\\[spacing\\=default\\]\\:data-\\[variant\\=outline\\]\\:shadow-xs[data-spacing=default][data-variant=outline][data-v-9b88a405]{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}@supports ((-webkit-backdrop-filter:var(--tw)) or (backdrop-filter:var(--tw))){.wp\\:supports-backdrop-filter\\:bg-background\\/60[data-v-9b88a405]{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.wp\\:supports-backdrop-filter\\:bg-background\\/60[data-v-9b88a405]{background-color:color-mix(in oklab, var(--background) 60%, transparent)}}}@media (min-width:40rem){.wp\\:sm\\:block[data-v-9b88a405]{display:block}.wp\\:sm\\:inline[data-v-9b88a405]{display:inline}.wp\\:sm\\:inline-block[data-v-9b88a405]{display:inline-block}.wp\\:sm\\:max-w-lg[data-v-9b88a405]{max-width:var(--wp-container-lg)}.wp\\:sm\\:max-w-md[data-v-9b88a405]{max-width:var(--wp-container-md)}.wp\\:sm\\:max-w-sm[data-v-9b88a405]{max-width:var(--wp-container-sm)}.wp\\:sm\\:flex-row[data-v-9b88a405]{flex-direction:row}.wp\\:sm\\:justify-end[data-v-9b88a405]{justify-content:flex-end}.wp\\:sm\\:gap-0[data-v-9b88a405]{gap:calc(var(--wp-spacing) * 0)}.wp\\:sm\\:rounded-lg[data-v-9b88a405]{border-radius:var(--radius)}.wp\\:sm\\:text-left[data-v-9b88a405]{text-align:left}}@media (min-width:48rem){.wp\\:md\\:w-full[data-v-9b88a405]{width:100%}.wp\\:md\\:text-sm[data-v-9b88a405]{font-size:var(--wp-text-sm);line-height:var(--tw-leading,var(--wp-text-sm--line-height))}}.wp\\:dark\\:border-input[data-v-9b88a405]:where(.dark,.dark *){border-color:var(--input)}.wp\\:dark\\:bg-amber-900\\/30[data-v-9b88a405]:where(.dark,.dark *){background-color:var(--wp-color-amber-900)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-amber-900\\/30[data-v-9b88a405]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-amber-900) 30%, transparent)}}.wp\\:dark\\:bg-blue-900\\/30[data-v-9b88a405]:where(.dark,.dark *){background-color:var(--wp-color-blue-900)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-blue-900\\/30[data-v-9b88a405]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-blue-900) 30%, transparent)}}.wp\\:dark\\:bg-destructive\\/60[data-v-9b88a405]:where(.dark,.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-destructive\\/60[data-v-9b88a405]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--destructive) 60%, transparent)}}.wp\\:dark\\:bg-emerald-900\\/30[data-v-9b88a405]:where(.dark,.dark *){background-color:var(--wp-color-emerald-900)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-emerald-900\\/30[data-v-9b88a405]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-emerald-900) 30%, transparent)}}.wp\\:dark\\:bg-input\\/30[data-v-9b88a405]:where(.dark,.dark *){background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-input\\/30[data-v-9b88a405]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--input) 30%, transparent)}}.wp\\:dark\\:bg-neutral-700[data-v-9b88a405]:where(.dark,.dark *){background-color:var(--wp-color-neutral-700)}.wp\\:dark\\:bg-neutral-800[data-v-9b88a405]:where(.dark,.dark *){background-color:var(--wp-color-neutral-800)}.wp\\:dark\\:bg-neutral-900[data-v-9b88a405]:where(.dark,.dark *){background-color:var(--wp-color-neutral-900)}.wp\\:dark\\:bg-neutral-900\\/70[data-v-9b88a405]:where(.dark,.dark *){background-color:var(--wp-color-neutral-900)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-neutral-900\\/70[data-v-9b88a405]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-neutral-900) 70%, transparent)}}.wp\\:dark\\:bg-purple-900\\/30[data-v-9b88a405]:where(.dark,.dark *){background-color:var(--wp-color-purple-900)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-purple-900\\/30[data-v-9b88a405]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-purple-900) 30%, transparent)}}.wp\\:dark\\:text-amber-400[data-v-9b88a405]:where(.dark,.dark *){color:var(--wp-color-amber-400)}.wp\\:dark\\:text-blue-400[data-v-9b88a405]:where(.dark,.dark *){color:var(--wp-color-blue-400)}.wp\\:dark\\:text-emerald-400[data-v-9b88a405]:where(.dark,.dark *){color:var(--wp-color-emerald-400)}.wp\\:dark\\:text-neutral-100[data-v-9b88a405]:where(.dark,.dark *){color:var(--wp-color-neutral-100)}.wp\\:dark\\:text-neutral-400[data-v-9b88a405]:where(.dark,.dark *){color:var(--wp-color-neutral-400)}.wp\\:dark\\:text-neutral-500[data-v-9b88a405]:where(.dark,.dark *){color:var(--wp-color-neutral-500)}.wp\\:dark\\:text-purple-400[data-v-9b88a405]:where(.dark,.dark *){color:var(--wp-color-purple-400)}.wp\\:dark\\:text-white[data-v-9b88a405]:where(.dark,.dark *){color:var(--wp-color-white)}@media (hover:hover){.wp\\:dark\\:hover\\:bg-accent\\/50[data-v-9b88a405]:where(.dark,.dark *):hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:hover\\:bg-accent\\/50[data-v-9b88a405]:where(.dark,.dark *):hover{background-color:color-mix(in oklab, var(--accent) 50%, transparent)}}.wp\\:dark\\:hover\\:bg-input\\/50[data-v-9b88a405]:where(.dark,.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:hover\\:bg-input\\/50[data-v-9b88a405]:where(.dark,.dark *):hover{background-color:color-mix(in oklab, var(--input) 50%, transparent)}}.wp\\:dark\\:hover\\:bg-neutral-600[data-v-9b88a405]:where(.dark,.dark *):hover{background-color:var(--wp-color-neutral-600)}.wp\\:dark\\:hover\\:bg-neutral-800\\/80[data-v-9b88a405]:where(.dark,.dark *):hover{background-color:var(--wp-color-neutral-800)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:hover\\:bg-neutral-800\\/80[data-v-9b88a405]:where(.dark,.dark *):hover{background-color:color-mix(in oklab, var(--wp-color-neutral-800) 80%, transparent)}}.wp\\:dark\\:hover\\:bg-neutral-900[data-v-9b88a405]:where(.dark,.dark *):hover{background-color:var(--wp-color-neutral-900)}.wp\\:dark\\:hover\\:text-neutral-100[data-v-9b88a405]:where(.dark,.dark *):hover{color:var(--wp-color-neutral-100)}.wp\\:dark\\:hover\\:text-status-disconnected[data-v-9b88a405]:where(.dark,.dark *):hover{color:var(--status-disconnected)}}.wp\\:dark\\:focus-visible\\:ring-destructive\\/40[data-v-9b88a405]:where(.dark,.dark *):focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:focus-visible\\:ring-destructive\\/40[data-v-9b88a405]:where(.dark,.dark *):focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.wp\\:dark\\:focus-visible\\:ring-offset-neutral-900[data-v-9b88a405]:where(.dark,.dark *):focus-visible{--tw-ring-offset-color:var(--wp-color-neutral-900)}.wp\\:dark\\:aria-invalid\\:ring-destructive\\/40:where(.dark,.dark *)[aria-invalid=true][data-v-9b88a405]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:aria-invalid\\:ring-destructive\\/40:where(.dark,.dark *)[aria-invalid=true][data-v-9b88a405]{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.wp\\:dark\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/20:where(.dark,.dark *)[data-variant=destructive][data-v-9b88a405]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/20:where(.dark,.dark *)[data-variant=destructive][data-v-9b88a405]:focus{background-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.wp\\:\\[\\&_button\\]\\:cursor-pointer button[data-v-9b88a405]{cursor:pointer}.wp\\:\\[\\&_svg\\]\\:pointer-events-none svg[data-v-9b88a405]{pointer-events:none}.wp\\:\\[\\&_svg\\]\\:shrink-0 svg[data-v-9b88a405]{flex-shrink:0}.wp\\:\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4 svg[data-v-9b88a405]:not([class*=size-]){width:calc(var(--wp-spacing) * 4);height:calc(var(--wp-spacing) * 4)}.wp\\:\\[\\&_svg\\:not\\(\\[class\\*\\=\\\\\\'size-\\\\\\'\\]\\)\\]\\:size-3 svg[data-v-9b88a405]:not([class*="'size-'"]){width:calc(var(--wp-spacing) * 3);height:calc(var(--wp-spacing) * 3)}.wp\\:\\[\\&_svg\\:not\\(\\[class\\*\\=\\\\\\'size-\\\\\\'\\]\\)\\]\\:size-4 svg[data-v-9b88a405]:not([class*="'size-'"]){width:calc(var(--wp-spacing) * 4);height:calc(var(--wp-spacing) * 4)}.wp\\:\\[\\&_svg\\:not\\(\\[class\\*\\=\\\\\\'text-\\\\\\'\\]\\)\\]\\:text-muted-foreground svg[data-v-9b88a405]:not([class*="'text-'"]){color:var(--muted-foreground)}.wp\\:\\[\\.border-b\\]\\:pb-6.border-b[data-v-9b88a405]{padding-bottom:calc(var(--wp-spacing) * 6)}.wp\\:\\[\\.border-t\\]\\:pt-6.border-t[data-v-9b88a405]{padding-top:calc(var(--wp-spacing) * 6)}:is(.wp\\:\\*\\*\\:\\[\\[role\\=button\\]\\]\\:cursor-pointer *)[role=button][data-v-9b88a405]{cursor:pointer}:-webkit-any(.wp\\:\\*\\:\\[span\\]\\:last\\:flex[data-v-9b88a405]>*):-webkit-any(span):last-child{display:flex}:is(.wp\\:\\*\\:\\[span\\]\\:last\\:flex[data-v-9b88a405]>*):is(span):last-child{display:flex}:-webkit-any(.wp\\:\\*\\:\\[span\\]\\:last\\:items-center[data-v-9b88a405]>*):-webkit-any(span):last-child{align-items:center}:is(.wp\\:\\*\\:\\[span\\]\\:last\\:items-center[data-v-9b88a405]>*):is(span):last-child{align-items:center}:-webkit-any(.wp\\:\\*\\:\\[span\\]\\:last\\:gap-2[data-v-9b88a405]>*):-webkit-any(span):last-child{gap:calc(var(--wp-spacing) * 2)}:is(.wp\\:\\*\\:\\[span\\]\\:last\\:gap-2[data-v-9b88a405]>*):is(span):last-child{gap:calc(var(--wp-spacing) * 2)}:-webkit-any(.wp\\:data-\\[variant\\=destructive\\]\\:\\*\\:\\[svg\\]\\:\\!text-destructive[data-variant=destructive][data-v-9b88a405]>*):-webkit-any(svg){color:var(--destructive)!important}:is(.wp\\:data-\\[variant\\=destructive\\]\\:\\*\\:\\[svg\\]\\:\\!text-destructive[data-variant=destructive][data-v-9b88a405]>*):is(svg){color:var(--destructive)!important}.wp\\:data-\\[spacing\\=0\\]\\:data-\\[variant\\=outline\\]\\:\\[\\&\\:not\\(\\:first-child\\)\\]\\:border-l-0[data-spacing="0"][data-variant=outline][data-v-9b88a405]:not(:first-child){border-left-style:var(--tw-border-style);border-left-width:0}.wp\\:\\[\\&\\[data-state\\=open\\]\\>svg\\]\\:rotate-180[data-state=open]>svg[data-v-9b88a405]{rotate:180deg}[data-slot=tooltip-content] .wp\\:\\[\\[data-slot\\=tooltip-content\\]_\\&\\]\\:bg-background\\/20[data-v-9b88a405]{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){[data-slot=tooltip-content] .wp\\:\\[\\[data-slot\\=tooltip-content\\]_\\&\\]\\:bg-background\\/20[data-v-9b88a405]{background-color:color-mix(in oklab, var(--background) 20%, transparent)}}[data-slot=tooltip-content] .wp\\:\\[\\[data-slot\\=tooltip-content\\]_\\&\\]\\:text-background[data-v-9b88a405]{color:var(--background)}[data-slot=tooltip-content] .wp\\:dark\\:\\[\\[data-slot\\=tooltip-content\\]_\\&\\]\\:bg-background\\/10[data-v-9b88a405]:where(.dark,.dark *){background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){[data-slot=tooltip-content] .wp\\:dark\\:\\[\\[data-slot\\=tooltip-content\\]_\\&\\]\\:bg-background\\/10[data-v-9b88a405]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--background) 10%, transparent)}}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}@font-face{font-family:Ibrand;src:url(/fonts/Ibrand.otf)format("truetype");font-weight:100 900;font-style:normal;font-display:swap}svg [clip-path]{clip-path:none!important}:root{--radius:.625rem;--background:#fff;--foreground:#0a0a0a;--card:#fff;--card-foreground:#0a0a0a;--popover:#fff;--popover-foreground:#0a0a0a;--primary:var(--p-primary-color,#171717);--color-primary-500:#9b5ff5;--p-primary-color:var(--color-primary-500);--primary-foreground:#fafafa;--secondary:#f5f5f5;--secondary-foreground:#171717;--muted:#f5f5f5;--muted-foreground:#737373;--accent:#f5f5f5;--accent-foreground:#171717;--destructive:#e40014;--border:#e5e5e5;--input:#e5e5e5;--ring:#a1a1a1;--chart-1:#f05100;--chart-2:#009588;--chart-3:#104e64;--chart-4:#fcbb00;--chart-5:#f99c00;--sidebar:#fafafa;--sidebar-foreground:#0a0a0a;--sidebar-primary:#171717;--sidebar-primary-foreground:#fafafa;--sidebar-accent:#f5f5f5;--sidebar-accent-foreground:#171717;--sidebar-border:#e5e5e5;--sidebar-ring:#a1a1a1;--status-available:#00a544;--status-incall:#7a75b5;--status-hold:#f5c632;--status-incoming:#ac4bff;--status-disconnected:#fb2c36;--color-green:#81c200;--color-red:#ed3237;--color-blue:#7a75b5;--color-settings:#b3acd5;--color-avaible:#00c448;font-family:Montserrat,sans-serif}@supports (color:color(display-p3 0 0 0)){:root{--background:color(display-p3 1 1 1);--foreground:color(display-p3 .0393882 .0393882 .0393882);--card:color(display-p3 1 1 1);--card-foreground:color(display-p3 .0393882 .0393882 .0393882);--popover:color(display-p3 1 1 1);--popover-foreground:color(display-p3 .0393882 .0393882 .0393882);--primary:var(--p-primary-color,color(display-p3 .0905274 .0905274 .0905274));--primary-foreground:color(display-p3 .980256 .980256 .980256);--secondary:color(display-p3 .960587 .960587 .960587);--secondary-foreground:color(display-p3 .0905274 .0905274 .0905274);--muted:color(display-p3 .960587 .960587 .960587);--muted-foreground:color(display-p3 .451519 .451519 .451519);--accent:color(display-p3 .960587 .960587 .960587);--accent-foreground:color(display-p3 .0905274 .0905274 .0905274);--destructive:color(display-p3 .830323 .140383 .133196);--border:color(display-p3 .898161 .898161 .898161);--input:color(display-p3 .898161 .898161 .898161);--ring:color(display-p3 .630163 .630163 .630163);--chart-1:color(display-p3 .887467 .341665 .0219962);--chart-2:color(display-p3 .207114 .579584 .53668);--chart-3:color(display-p3 .142586 .302008 .385094);--chart-4:color(display-p3 .959186 .738519 .118268);--chart-5:color(display-p3 .93994 .620584 .0585367);--sidebar:color(display-p3 .980256 .980256 .980256);--sidebar-foreground:color(display-p3 .0393882 .0393882 .0393882);--sidebar-primary:color(display-p3 .0905274 .0905274 .0905274);--sidebar-primary-foreground:color(display-p3 .980256 .980256 .980256);--sidebar-accent:color(display-p3 .960587 .960587 .960587);--sidebar-accent-foreground:color(display-p3 .0905274 .0905274 .0905274);--sidebar-border:color(display-p3 .898161 .898161 .898161);--sidebar-ring:color(display-p3 .630163 .630163 .630163);--status-available:color(display-p3 .243882 .640824 .294808);--status-incall:color(display-p3 .474968 .45946 .692102);--status-hold:color(display-p3 .930111 .782506 .322764);--status-incoming:color(display-p3 .629519 .30089 .990817);--status-disconnected:color(display-p3 .903738 .262579 .253307);--color-green:color(display-p3 .562304 .754036 .228809);--color-red:color(display-p3 .855599 .269309 .251664);--color-blue:color(display-p3 .474968 .45946 .692102);--color-settings:color(display-p3 .697185 .675441 .822883);--color-avaible:color(display-p3 .345782 .7571 .347428)}}@supports (color:lab(0% 0 0)){:root{--background:lab(100% 0 0);--foreground:lab(2.75381% 0 0);--card:lab(100% 0 0);--card-foreground:lab(2.75381% 0 0);--popover:lab(100% 0 0);--popover-foreground:lab(2.75381% 0 0);--primary:var(--p-primary-color,lab(7.78201% -.0000149012 0));--primary-foreground:lab(98.26% 0 0);--secondary:lab(96.52% -.0000298023 .0000119209);--secondary-foreground:lab(7.78201% -.0000149012 0);--muted:lab(96.52% -.0000298023 .0000119209);--muted-foreground:lab(48.496% 0 0);--accent:lab(96.52% -.0000298023 .0000119209);--accent-foreground:lab(7.78201% -.0000149012 0);--destructive:lab(48.4493% 77.4328 61.5452);--border:lab(90.952% 0 -.0000119209);--input:lab(90.952% 0 -.0000119209);--ring:lab(66.128% -.0000298023 .0000119209);--chart-1:lab(57.1026% 64.2584 89.8886);--chart-2:lab(55.0223% -41.0774 -3.90277);--chart-3:lab(30.372% -13.1853 -18.7887);--chart-4:lab(80.1641% 16.6016 99.2089);--chart-5:lab(72.7183% 31.8672 97.9407);--sidebar:lab(98.26% 0 0);--sidebar-foreground:lab(2.75381% 0 0);--sidebar-primary:lab(7.78201% -.0000149012 0);--sidebar-primary-foreground:lab(98.26% 0 0);--sidebar-accent:lab(96.52% -.0000298023 .0000119209);--sidebar-accent-foreground:lab(7.78201% -.0000149012 0);--sidebar-border:lab(90.952% 0 -.0000119209);--sidebar-ring:lab(66.128% -.0000298023 .0000119209);--status-available:lab(59.0978% -58.6621 41.2579);--status-incall:lab(51.7014% 13.4467 -33.5273);--status-hold:lab(82.2725% 7.53289 73.9282);--status-incoming:lab(52.0183% 66.11 -78.2316);--status-disconnected:lab(55.4814% 75.0732 48.8528);--color-green:lab(71.931% -38.9071 70.3045);--color-red:lab(53.3473% 69.9469 45.351);--color-blue:lab(51.7014% 13.4467 -33.5273);--color-settings:lab(71.9851% 8.76683 -19.9302);--color-avaible:lab(69.443% -61.9097 48.3881)}}.dark{--background:#0a0a0a;--foreground:#fafafa;--card:#171717;--card-foreground:#fafafa;--popover:#171717;--popover-foreground:#fafafa;--primary:var(--p-primary-color,#e5e5e5);--primary-foreground:#171717;--secondary:#262626;--secondary-foreground:#fafafa;--muted:#262626;--muted-foreground:#a1a1a1;--accent:#262626;--accent-foreground:#fafafa;--destructive:#ff6568;--border:#ffffff1a;--input:#ffffff26;--ring:#737373;--chart-1:#1447e6;--chart-2:#00bb7f;--chart-3:#f99c00;--chart-4:#ac4bff;--chart-5:#ff2357;--sidebar:#171717;--sidebar-foreground:#fafafa;--sidebar-primary:#1447e6;--sidebar-primary-foreground:#fafafa;--sidebar-accent:#262626;--sidebar-accent-foreground:#fafafa;--sidebar-border:#ffffff1a;--sidebar-ring:#737373;--status-available:#41cd6a;--status-incall:#54a2ff;--status-hold:#fccf2c;--status-incoming:#b971ff;--status-disconnected:#ff6568}@supports (color:color(display-p3 0 0 0)){.dark{--background:color(display-p3 .0393882 .0393882 .0393882);--foreground:color(display-p3 .980256 .980256 .980256);--card:color(display-p3 .0905274 .0905274 .0905274);--card-foreground:color(display-p3 .980256 .980256 .980256);--popover:color(display-p3 .0905274 .0905274 .0905274);--popover-foreground:color(display-p3 .980256 .980256 .980256);--primary:var(--p-primary-color,color(display-p3 .898161 .898161 .898161));--primary-foreground:color(display-p3 .0905274 .0905274 .0905274);--secondary:color(display-p3 .149382 .149382 .149382);--secondary-foreground:color(display-p3 .980256 .980256 .980256);--muted:color(display-p3 .149382 .149382 .149382);--muted-foreground:color(display-p3 .630163 .630163 .630163);--accent:color(display-p3 .149382 .149382 .149382);--accent-foreground:color(display-p3 .980256 .980256 .980256);--destructive:color(display-p3 .933534 .431676 .423491);--border:color(display-p3 1 1 1/.1);--input:color(display-p3 1 1 1/.15);--ring:color(display-p3 .451519 .451519 .451519);--chart-1:color(display-p3 .1379 .274983 .867624);--chart-2:color(display-p3 .267113 .726847 .508397);--chart-3:color(display-p3 .93994 .620584 .0585367);--chart-4:color(display-p3 .629519 .30089 .990817);--chart-5:color(display-p3 .921824 .240748 .355666);--sidebar:color(display-p3 .0905274 .0905274 .0905274);--sidebar-foreground:color(display-p3 .980256 .980256 .980256);--sidebar-primary:color(display-p3 .1379 .274983 .867624);--sidebar-primary-foreground:color(display-p3 .980256 .980256 .980256);--sidebar-accent:color(display-p3 .149382 .149382 .149382);--sidebar-accent-foreground:color(display-p3 .980256 .980256 .980256);--sidebar-border:color(display-p3 1 1 1/.1);--sidebar-ring:color(display-p3 .451519 .451519 .451519);--status-available:color(display-p3 .425834 .792595 .456802);--status-incall:color(display-p3 .397443 .62813 .992116);--status-hold:color(display-p3 .958937 .816675 .321887);--status-incoming:color(display-p3 .692676 .438266 1.01683);--status-disconnected:color(display-p3 .933534 .431676 .423491)}}@supports (color:lab(0% 0 0)){.dark{--background:lab(2.75381% 0 0);--foreground:lab(98.26% 0 0);--card:lab(7.78201% -.0000149012 0);--card-foreground:lab(98.26% 0 0);--popover:lab(7.78201% -.0000149012 0);--popover-foreground:lab(98.26% 0 0);--primary:var(--p-primary-color,lab(90.952% 0 -.0000119209));--primary-foreground:lab(7.78201% -.0000149012 0);--secondary:lab(15.204% 0 -.00000596046);--secondary-foreground:lab(98.26% 0 0);--muted:lab(15.204% 0 -.00000596046);--muted-foreground:lab(66.128% -.0000298023 .0000119209);--accent:lab(15.204% 0 -.00000596046);--accent-foreground:lab(98.26% 0 0);--destructive:lab(63.7053% 60.745 31.3109);--border:lab(100% 0 0/.1);--input:lab(100% 0 0/.15);--ring:lab(48.496% 0 0);--chart-1:lab(36.9089% 35.0961 -85.6872);--chart-2:lab(66.9756% -58.27 19.5419);--chart-3:lab(72.7183% 31.8672 97.9407);--chart-4:lab(52.0183% 66.11 -78.2316);--chart-5:lab(56.101% 79.4328 31.4532);--sidebar:lab(7.78201% -.0000149012 0);--sidebar-foreground:lab(98.26% 0 0);--sidebar-primary:lab(36.9089% 35.0961 -85.6872);--sidebar-primary-foreground:lab(98.26% 0 0);--sidebar-accent:lab(15.204% 0 -.00000596046);--sidebar-accent-foreground:lab(98.26% 0 0);--sidebar-border:lab(100% 0 0/.1);--sidebar-ring:lab(48.496% 0 0);--status-available:lab(73.3941% -54.8093 37.6928);--status-incall:lab(65.0361% -1.42065 -56.9802);--status-hold:lab(85.1352% 6.10837 78.1641);--status-incoming:lab(60.4586% 54.1298 -67.8379);--status-disconnected:lab(63.7053% 60.745 31.3109)}}.ibrand{font-family:Ibrand,sans-serif}.montserrat{font-family:Montserrat}.quicksand{font-family:Quicksand}.manrope{font-family:Manrope}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes pulse{50%{opacity:.5}}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height,var(--bits-accordion-content-height,var(--reka-accordion-content-height,var(--kb-accordion-content-height,var(--ngp-accordion-content-height,auto)))))}}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height,var(--bits-accordion-content-height,var(--reka-accordion-content-height,var(--kb-accordion-content-height,var(--ngp-accordion-content-height,auto)))))}to{height:0}}.p-input::placeholder{color:#959595;font-size:12px}@font-face{font-family:Ibrand;src:url(/fonts/Ibrand.otf)format("truetype");font-weight:100 900;font-style:normal;font-display:swap}svg [clip-path][data-v-9b88a405]{clip-path:none!important}[data-v-9b88a405]:root{--radius:.625rem;--background:#fff;--foreground:#0a0a0a;--card:#fff;--card-foreground:#0a0a0a;--popover:#fff;--popover-foreground:#0a0a0a;--primary:var(--p-primary-color,#171717);--color-primary-500:#9b5ff5;--p-primary-color:var(--color-primary-500);--primary-foreground:#fafafa;--secondary:#f5f5f5;--secondary-foreground:#171717;--muted:#f5f5f5;--muted-foreground:#737373;--accent:#f5f5f5;--accent-foreground:#171717;--destructive:#e40014;--border:#e5e5e5;--input:#e5e5e5;--ring:#a1a1a1;--chart-1:#f05100;--chart-2:#009588;--chart-3:#104e64;--chart-4:#fcbb00;--chart-5:#f99c00;--sidebar:#fafafa;--sidebar-foreground:#0a0a0a;--sidebar-primary:#171717;--sidebar-primary-foreground:#fafafa;--sidebar-accent:#f5f5f5;--sidebar-accent-foreground:#171717;--sidebar-border:#e5e5e5;--sidebar-ring:#a1a1a1;--status-available:#00a544;--status-incall:#7a75b5;--status-hold:#f5c632;--status-incoming:#ac4bff;--status-disconnected:#fb2c36;--color-green:#81c200;--color-red:#ed3237;--color-blue:#7a75b5;--color-settings:#b3acd5;--color-avaible:#00c448;font-family:Montserrat,sans-serif}@supports (color:color(display-p3 0 0 0)){[data-v-9b88a405]:root{--background:color(display-p3 1 1 1);--foreground:color(display-p3 .0393882 .0393882 .0393882);--card:color(display-p3 1 1 1);--card-foreground:color(display-p3 .0393882 .0393882 .0393882);--popover:color(display-p3 1 1 1);--popover-foreground:color(display-p3 .0393882 .0393882 .0393882);--primary:var(--p-primary-color,color(display-p3 .0905274 .0905274 .0905274));--primary-foreground:color(display-p3 .980256 .980256 .980256);--secondary:color(display-p3 .960587 .960587 .960587);--secondary-foreground:color(display-p3 .0905274 .0905274 .0905274);--muted:color(display-p3 .960587 .960587 .960587);--muted-foreground:color(display-p3 .451519 .451519 .451519);--accent:color(display-p3 .960587 .960587 .960587);--accent-foreground:color(display-p3 .0905274 .0905274 .0905274);--destructive:color(display-p3 .830323 .140383 .133196);--border:color(display-p3 .898161 .898161 .898161);--input:color(display-p3 .898161 .898161 .898161);--ring:color(display-p3 .630163 .630163 .630163);--chart-1:color(display-p3 .887467 .341665 .0219962);--chart-2:color(display-p3 .207114 .579584 .53668);--chart-3:color(display-p3 .142586 .302008 .385094);--chart-4:color(display-p3 .959186 .738519 .118268);--chart-5:color(display-p3 .93994 .620584 .0585367);--sidebar:color(display-p3 .980256 .980256 .980256);--sidebar-foreground:color(display-p3 .0393882 .0393882 .0393882);--sidebar-primary:color(display-p3 .0905274 .0905274 .0905274);--sidebar-primary-foreground:color(display-p3 .980256 .980256 .980256);--sidebar-accent:color(display-p3 .960587 .960587 .960587);--sidebar-accent-foreground:color(display-p3 .0905274 .0905274 .0905274);--sidebar-border:color(display-p3 .898161 .898161 .898161);--sidebar-ring:color(display-p3 .630163 .630163 .630163);--status-available:color(display-p3 .243882 .640824 .294808);--status-incall:color(display-p3 .474968 .45946 .692102);--status-hold:color(display-p3 .930111 .782506 .322764);--status-incoming:color(display-p3 .629519 .30089 .990817);--status-disconnected:color(display-p3 .903738 .262579 .253307);--color-green:color(display-p3 .562304 .754036 .228809);--color-red:color(display-p3 .855599 .269309 .251664);--color-blue:color(display-p3 .474968 .45946 .692102);--color-settings:color(display-p3 .697185 .675441 .822883);--color-avaible:color(display-p3 .345782 .7571 .347428)}}@supports (color:lab(0% 0 0)){[data-v-9b88a405]:root{--background:lab(100% 0 0);--foreground:lab(2.75381% 0 0);--card:lab(100% 0 0);--card-foreground:lab(2.75381% 0 0);--popover:lab(100% 0 0);--popover-foreground:lab(2.75381% 0 0);--primary:var(--p-primary-color,lab(7.78201% -.0000149012 0));--primary-foreground:lab(98.26% 0 0);--secondary:lab(96.52% -.0000298023 .0000119209);--secondary-foreground:lab(7.78201% -.0000149012 0);--muted:lab(96.52% -.0000298023 .0000119209);--muted-foreground:lab(48.496% 0 0);--accent:lab(96.52% -.0000298023 .0000119209);--accent-foreground:lab(7.78201% -.0000149012 0);--destructive:lab(48.4493% 77.4328 61.5452);--border:lab(90.952% 0 -.0000119209);--input:lab(90.952% 0 -.0000119209);--ring:lab(66.128% -.0000298023 .0000119209);--chart-1:lab(57.1026% 64.2584 89.8886);--chart-2:lab(55.0223% -41.0774 -3.90277);--chart-3:lab(30.372% -13.1853 -18.7887);--chart-4:lab(80.1641% 16.6016 99.2089);--chart-5:lab(72.7183% 31.8672 97.9407);--sidebar:lab(98.26% 0 0);--sidebar-foreground:lab(2.75381% 0 0);--sidebar-primary:lab(7.78201% -.0000149012 0);--sidebar-primary-foreground:lab(98.26% 0 0);--sidebar-accent:lab(96.52% -.0000298023 .0000119209);--sidebar-accent-foreground:lab(7.78201% -.0000149012 0);--sidebar-border:lab(90.952% 0 -.0000119209);--sidebar-ring:lab(66.128% -.0000298023 .0000119209);--status-available:lab(59.0978% -58.6621 41.2579);--status-incall:lab(51.7014% 13.4467 -33.5273);--status-hold:lab(82.2725% 7.53289 73.9282);--status-incoming:lab(52.0183% 66.11 -78.2316);--status-disconnected:lab(55.4814% 75.0732 48.8528);--color-green:lab(71.931% -38.9071 70.3045);--color-red:lab(53.3473% 69.9469 45.351);--color-blue:lab(51.7014% 13.4467 -33.5273);--color-settings:lab(71.9851% 8.76683 -19.9302);--color-avaible:lab(69.443% -61.9097 48.3881)}}.dark[data-v-9b88a405]{--background:#0a0a0a;--foreground:#fafafa;--card:#171717;--card-foreground:#fafafa;--popover:#171717;--popover-foreground:#fafafa;--primary:var(--p-primary-color,#e5e5e5);--primary-foreground:#171717;--secondary:#262626;--secondary-foreground:#fafafa;--muted:#262626;--muted-foreground:#a1a1a1;--accent:#262626;--accent-foreground:#fafafa;--destructive:#ff6568;--border:#ffffff1a;--input:#ffffff26;--ring:#737373;--chart-1:#1447e6;--chart-2:#00bb7f;--chart-3:#f99c00;--chart-4:#ac4bff;--chart-5:#ff2357;--sidebar:#171717;--sidebar-foreground:#fafafa;--sidebar-primary:#1447e6;--sidebar-primary-foreground:#fafafa;--sidebar-accent:#262626;--sidebar-accent-foreground:#fafafa;--sidebar-border:#ffffff1a;--sidebar-ring:#737373;--status-available:#41cd6a;--status-incall:#54a2ff;--status-hold:#fccf2c;--status-incoming:#b971ff;--status-disconnected:#ff6568}@supports (color:color(display-p3 0 0 0)){.dark[data-v-9b88a405]{--background:color(display-p3 .0393882 .0393882 .0393882);--foreground:color(display-p3 .980256 .980256 .980256);--card:color(display-p3 .0905274 .0905274 .0905274);--card-foreground:color(display-p3 .980256 .980256 .980256);--popover:color(display-p3 .0905274 .0905274 .0905274);--popover-foreground:color(display-p3 .980256 .980256 .980256);--primary:var(--p-primary-color,color(display-p3 .898161 .898161 .898161));--primary-foreground:color(display-p3 .0905274 .0905274 .0905274);--secondary:color(display-p3 .149382 .149382 .149382);--secondary-foreground:color(display-p3 .980256 .980256 .980256);--muted:color(display-p3 .149382 .149382 .149382);--muted-foreground:color(display-p3 .630163 .630163 .630163);--accent:color(display-p3 .149382 .149382 .149382);--accent-foreground:color(display-p3 .980256 .980256 .980256);--destructive:color(display-p3 .933534 .431676 .423491);--border:color(display-p3 1 1 1/.1);--input:color(display-p3 1 1 1/.15);--ring:color(display-p3 .451519 .451519 .451519);--chart-1:color(display-p3 .1379 .274983 .867624);--chart-2:color(display-p3 .267113 .726847 .508397);--chart-3:color(display-p3 .93994 .620584 .0585367);--chart-4:color(display-p3 .629519 .30089 .990817);--chart-5:color(display-p3 .921824 .240748 .355666);--sidebar:color(display-p3 .0905274 .0905274 .0905274);--sidebar-foreground:color(display-p3 .980256 .980256 .980256);--sidebar-primary:color(display-p3 .1379 .274983 .867624);--sidebar-primary-foreground:color(display-p3 .980256 .980256 .980256);--sidebar-accent:color(display-p3 .149382 .149382 .149382);--sidebar-accent-foreground:color(display-p3 .980256 .980256 .980256);--sidebar-border:color(display-p3 1 1 1/.1);--sidebar-ring:color(display-p3 .451519 .451519 .451519);--status-available:color(display-p3 .425834 .792595 .456802);--status-incall:color(display-p3 .397443 .62813 .992116);--status-hold:color(display-p3 .958937 .816675 .321887);--status-incoming:color(display-p3 .692676 .438266 1.01683);--status-disconnected:color(display-p3 .933534 .431676 .423491)}}@supports (color:lab(0% 0 0)){.dark[data-v-9b88a405]{--background:lab(2.75381% 0 0);--foreground:lab(98.26% 0 0);--card:lab(7.78201% -.0000149012 0);--card-foreground:lab(98.26% 0 0);--popover:lab(7.78201% -.0000149012 0);--popover-foreground:lab(98.26% 0 0);--primary:var(--p-primary-color,lab(90.952% 0 -.0000119209));--primary-foreground:lab(7.78201% -.0000149012 0);--secondary:lab(15.204% 0 -.00000596046);--secondary-foreground:lab(98.26% 0 0);--muted:lab(15.204% 0 -.00000596046);--muted-foreground:lab(66.128% -.0000298023 .0000119209);--accent:lab(15.204% 0 -.00000596046);--accent-foreground:lab(98.26% 0 0);--destructive:lab(63.7053% 60.745 31.3109);--border:lab(100% 0 0/.1);--input:lab(100% 0 0/.15);--ring:lab(48.496% 0 0);--chart-1:lab(36.9089% 35.0961 -85.6872);--chart-2:lab(66.9756% -58.27 19.5419);--chart-3:lab(72.7183% 31.8672 97.9407);--chart-4:lab(52.0183% 66.11 -78.2316);--chart-5:lab(56.101% 79.4328 31.4532);--sidebar:lab(7.78201% -.0000149012 0);--sidebar-foreground:lab(98.26% 0 0);--sidebar-primary:lab(36.9089% 35.0961 -85.6872);--sidebar-primary-foreground:lab(98.26% 0 0);--sidebar-accent:lab(15.204% 0 -.00000596046);--sidebar-accent-foreground:lab(98.26% 0 0);--sidebar-border:lab(100% 0 0/.1);--sidebar-ring:lab(48.496% 0 0);--status-available:lab(73.3941% -54.8093 37.6928);--status-incall:lab(65.0361% -1.42065 -56.9802);--status-hold:lab(85.1352% 6.10837 78.1641);--status-incoming:lab(60.4586% 54.1298 -67.8379);--status-disconnected:lab(63.7053% 60.745 31.3109)}}.ibrand[data-v-9b88a405]{font-family:Ibrand,sans-serif}.montserrat[data-v-9b88a405]{font-family:Montserrat}.quicksand[data-v-9b88a405]{font-family:Quicksand}.manrope[data-v-9b88a405]{font-family:Manrope}@keyframes pulse-9b88a405{50%{opacity:.5}}@keyframes enter-9b88a405{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit-9b88a405{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}}@keyframes accordion-down-9b88a405{0%{height:0}to{height:var(--radix-accordion-content-height,var(--bits-accordion-content-height,var(--reka-accordion-content-height,var(--kb-accordion-content-height,var(--ngp-accordion-content-height,auto)))))}}@keyframes accordion-up-9b88a405{0%{height:var(--radix-accordion-content-height,var(--bits-accordion-content-height,var(--reka-accordion-content-height,var(--kb-accordion-content-height,var(--ngp-accordion-content-height,auto)))))}to{height:0}}
2
2
  /*$vite$:1*/`)),document.head.appendChild(a)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
3
- (function(){var fu=Object.defineProperty,qg=(e,t)=>{let r={};for(var n in e)fu(r,n,{get:e[n],enumerable:!0});return t&&fu(r,Symbol.toStringTag,{value:"Module"}),r};function Xs(e){const t=Object.create(null);for(const r of e.split(","))t[r]=1;return r=>r in t}var Ue={},ms=[],fr=()=>{},pu=()=>!1,Qs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Pa=e=>e.startsWith("onUpdate:"),Qe=Object.assign,Da=(e,t)=>{const r=e.indexOf(t);r>-1&&e.splice(r,1)},Bg=Object.prototype.hasOwnProperty,Ye=(e,t)=>Bg.call(e,t),_e=Array.isArray,ws=e=>ys(e)==="[object Map]",Gn=e=>ys(e)==="[object Set]",hu=e=>ys(e)==="[object Date]",Lg=e=>ys(e)==="[object RegExp]",De=e=>typeof e=="function",it=e=>typeof e=="string",Er=e=>typeof e=="symbol",Ge=e=>e!==null&&typeof e=="object",Oa=e=>(Ge(e)||De(e))&&De(e.then)&&De(e.catch),gu=Object.prototype.toString,ys=e=>gu.call(e),Fg=e=>ys(e).slice(8,-1),Ji=e=>ys(e)==="[object Object]",Yi=e=>it(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Jn=Xs(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Zi=e=>{const t=Object.create(null);return(r=>t[r]||(t[r]=e(r)))},Vg=/-\w/g,_t=Zi(e=>e.replace(Vg,t=>t.slice(1).toUpperCase())),jg=/\B([A-Z])/g,Gt=Zi(e=>e.replace(jg,"-$1").toLowerCase()),ei=Zi(e=>e.charAt(0).toUpperCase()+e.slice(1)),bs=Zi(e=>e?`on${ei(e)}`:""),Bt=(e,t)=>!Object.is(e,t),_s=(e,...t)=>{for(let r=0;r<e.length;r++)e[r](...t)},vu=(e,t,r,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:r})},Xi=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Qi=e=>{const t=it(e)?Number(e):NaN;return isNaN(t)?e:t},mu,eo=()=>mu||(mu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),Ug=Xs("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol");function St(e){if(_e(e)){const t={};for(let r=0;r<e.length;r++){const n=e[r],s=it(n)?Gg(n):St(n);if(s)for(const i in s)t[i]=s[i]}return t}else if(it(e)||Ge(e))return e}var zg=/;(?![^(]*\))/g,Kg=/:([^]+)/,Wg=/\/\*[^]*?\*\//g;function Gg(e){const t={};return e.replace(Wg,"").split(zg).forEach(r=>{if(r){const n=r.split(Kg);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function et(e){let t="";if(it(e))t=e;else if(_e(e))for(let r=0;r<e.length;r++){const n=et(e[r]);n&&(t+=n+" ")}else if(Ge(e))for(const r in e)e[r]&&(t+=r+" ");return t.trim()}function pr(e){if(!e)return null;let{class:t,style:r}=e;return t&&!it(t)&&(e.class=et(t)),r&&(e.style=St(r)),e}var wu="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Jg=Xs(wu),oT=Xs(wu+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function yu(e){return!!e||e===""}function Yg(e,t){if(e.length!==t.length)return!1;let r=!0;for(let n=0;r&&n<e.length;n++)r=Gr(e[n],t[n]);return r}function Gr(e,t){if(e===t)return!0;let r=hu(e),n=hu(t);if(r||n)return r&&n?e.getTime()===t.getTime():!1;if(r=Er(e),n=Er(t),r||n)return e===t;if(r=_e(e),n=_e(t),r||n)return r&&n?Yg(e,t):!1;if(r=Ge(e),n=Ge(t),r||n){if(!r||!n||Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e){const i=e.hasOwnProperty(s),o=t.hasOwnProperty(s);if(i&&!o||!i&&o||!Gr(e[s],t[s]))return!1}}return String(e)===String(t)}function to(e,t){return e.findIndex(r=>Gr(r,t))}var bu=e=>!!(e&&e.__v_isRef===!0),Le=e=>it(e)?e:e==null?"":_e(e)||Ge(e)&&(e.toString===gu||!De(e.toString))?bu(e)?Le(e.value):JSON.stringify(e,_u,2):String(e),_u=(e,t)=>bu(t)?_u(e,t.value):ws(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((r,[n,s],i)=>(r[Ha(n,i)+" =>"]=s,r),{})}:Gn(t)?{[`Set(${t.size})`]:[...t.values()].map(r=>Ha(r))}:Er(t)?Ha(t):Ge(t)&&!_e(t)&&!Ji(t)?String(t):t,Ha=(e,t="")=>{var r;return Er(e)?`Symbol(${(r=e.description)!=null?r:t})`:e};function Zg(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:(typeof e!="number"||Number.isFinite(e),String(e))}var Dt,Ma=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=Dt,!e&&Dt&&(this.index=(Dt.scopes||(Dt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){const t=Dt;try{return Dt=this,e()}finally{Dt=t}}}on(){++this._on===1&&(this.prevScope=Dt,Dt=this)}off(){this._on>0&&--this._on===0&&(Dt=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let t,r;for(t=0,r=this.effects.length;t<r;t++)this.effects[t].stop();for(this.effects.length=0,t=0,r=this.cleanups.length;t<r;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,r=this.scopes.length;t<r;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const n=this.parent.scopes.pop();n&&n!==this&&(this.parent.scopes[this.index]=n,n.index=this.index)}this.parent=void 0}}};function Na(e){return new Ma(e)}function ro(){return Dt}function qa(e,t=!1){Dt&&Dt.cleanups.push(e)}var ot,Ba=new WeakSet,ti=class{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Dt&&Dt.active&&Dt.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ba.has(this)&&(Ba.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Cu(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,ku(this),xu(this);const e=ot,t=Ar;ot=this,Ar=!0;try{return this.fn()}finally{Tu(this),ot=e,Ar=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)ja(e);this.deps=this.depsTail=void 0,ku(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ba.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Va(this)&&this.run()}get dirty(){return Va(this)}},Su=0,ri,ni;function Cu(e,t=!1){if(e.flags|=8,t){e.next=ni,ni=e;return}e.next=ri,ri=e}function La(){Su++}function Fa(){if(--Su>0)return;if(ni){let t=ni;for(ni=void 0;t;){const r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;for(;ri;){let t=ri;for(ri=void 0;t;){const r=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=r}}if(e)throw e}function xu(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Tu(e){let t,r=e.depsTail,n=r;for(;n;){const s=n.prevDep;n.version===-1?(n===r&&(r=s),ja(n),Xg(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=s}e.deps=t,e.depsTail=r}function Va(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Eu(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Eu(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===si)||(e.globalVersion=si,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Va(e))))return;e.flags|=2;const t=e.dep,r=ot,n=Ar;ot=e,Ar=!0;try{xu(e);const s=e.fn(e._value);(t.version===0||Bt(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{ot=r,Ar=n,Tu(e),e.flags&=-3}}function ja(e,t=!1){const{dep:r,prevSub:n,nextSub:s}=e;if(n&&(n.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=n,e.nextSub=void 0),r.subs===e&&(r.subs=n,!n&&r.computed)){r.computed.flags&=-5;for(let i=r.computed.deps;i;i=i.nextDep)ja(i,!0)}!t&&!--r.sc&&r.map&&r.map.delete(r.key)}function Xg(e){const{prevDep:t,nextDep:r}=e;t&&(t.nextDep=r,e.prevDep=void 0),r&&(r.prevDep=t,e.nextDep=void 0)}function Qg(e,t){e.effect instanceof ti&&(e=e.effect.fn);const r=new ti(e);t&&Qe(r,t);try{r.run()}catch(s){throw r.stop(),s}const n=r.run.bind(r);return n.effect=r,n}function ev(e){e.effect.stop()}var Ar=!0,Au=[];function Jr(){Au.push(Ar),Ar=!1}function Yr(){const e=Au.pop();Ar=e===void 0?!0:e}function ku(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const r=ot;ot=void 0;try{t()}finally{ot=r}}}var si=0,tv=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},no=class{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,this.__v_skip=!0}track(e){if(!ot||!Ar||ot===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==ot)t=this.activeLink=new tv(ot,this),ot.deps?(t.prevDep=ot.depsTail,ot.depsTail.nextDep=t,ot.depsTail=t):ot.deps=ot.depsTail=t,Iu(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){const r=t.nextDep;r.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=r),t.prevDep=ot.depsTail,t.nextDep=void 0,ot.depsTail.nextDep=t,ot.depsTail=t,ot.deps===t&&(ot.deps=r)}return t}trigger(e){this.version++,si++,this.notify(e)}notify(e){La();try{for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{Fa()}}};function Iu(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)Iu(n)}const r=e.dep.subs;r!==e&&(e.prevSub=r,r&&(r.nextSub=e)),e.dep.subs=e}}var so=new WeakMap,Yn=Symbol(""),Ua=Symbol(""),ii=Symbol("");function Ot(e,t,r){if(Ar&&ot){let n=so.get(e);n||so.set(e,n=new Map);let s=n.get(r);s||(n.set(r,s=new no),s.map=n,s.key=r),s.track()}}function Zr(e,t,r,n,s,i){const o=so.get(e);if(!o){si++;return}const a=l=>{l&&l.trigger()};if(La(),t==="clear")o.forEach(a);else{const l=_e(e),u=l&&Yi(r);if(l&&r==="length"){const c=Number(n);o.forEach((d,p)=>{(p==="length"||p===ii||!Er(p)&&p>=c)&&a(d)})}else switch((r!==void 0||o.has(void 0))&&a(o.get(r)),u&&a(o.get(ii)),t){case"add":l?u&&a(o.get("length")):(a(o.get(Yn)),ws(e)&&a(o.get(Ua)));break;case"delete":l||(a(o.get(Yn)),ws(e)&&a(o.get(Ua)));break;case"set":ws(e)&&a(o.get(Yn));break}}Fa()}function rv(e,t){const r=so.get(e);return r&&r.get(t)}function Ss(e){const t=ze(e);return t===e?t:(Ot(t,"iterate",ii),Jt(e)?t:t.map(kr))}function io(e){return Ot(e=ze(e),"iterate",ii),e}function Sn(e,t){return Mr(e)?Cs(tn(e)?kr(t):t):kr(t)}var nv={__proto__:null,[Symbol.iterator](){return za(this,Symbol.iterator,e=>Sn(this,e))},concat(...e){return Ss(this).concat(...e.map(t=>_e(t)?Ss(t):t))},entries(){return za(this,"entries",e=>(e[1]=Sn(this,e[1]),e))},every(e,t){return Xr(this,"every",e,t,void 0,arguments)},filter(e,t){return Xr(this,"filter",e,t,r=>r.map(n=>Sn(this,n)),arguments)},find(e,t){return Xr(this,"find",e,t,r=>Sn(this,r),arguments)},findIndex(e,t){return Xr(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Xr(this,"findLast",e,t,r=>Sn(this,r),arguments)},findLastIndex(e,t){return Xr(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Xr(this,"forEach",e,t,void 0,arguments)},includes(...e){return Ka(this,"includes",e)},indexOf(...e){return Ka(this,"indexOf",e)},join(e){return Ss(this).join(e)},lastIndexOf(...e){return Ka(this,"lastIndexOf",e)},map(e,t){return Xr(this,"map",e,t,void 0,arguments)},pop(){return oi(this,"pop")},push(...e){return oi(this,"push",e)},reduce(e,...t){return Ru(this,"reduce",e,t)},reduceRight(e,...t){return Ru(this,"reduceRight",e,t)},shift(){return oi(this,"shift")},some(e,t){return Xr(this,"some",e,t,void 0,arguments)},splice(...e){return oi(this,"splice",e)},toReversed(){return Ss(this).toReversed()},toSorted(e){return Ss(this).toSorted(e)},toSpliced(...e){return Ss(this).toSpliced(...e)},unshift(...e){return oi(this,"unshift",e)},values(){return za(this,"values",e=>Sn(this,e))}};function za(e,t,r){const n=io(e),s=n[t]();return n!==e&&!Jt(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=r(i.value)),i}),s}var sv=Array.prototype;function Xr(e,t,r,n,s,i){const o=io(e),a=o!==e&&!Jt(e),l=o[t];if(l!==sv[t]){const d=l.apply(e,i);return a?kr(d):d}let u=r;o!==e&&(a?u=function(d,p){return r.call(this,Sn(e,d),p,e)}:r.length>2&&(u=function(d,p){return r.call(this,d,p,e)}));const c=l.call(o,u,n);return a&&s?s(c):c}function Ru(e,t,r,n){const s=io(e);let i=r;return s!==e&&(Jt(e)?r.length>3&&(i=function(o,a,l){return r.call(this,o,a,l,e)}):i=function(o,a,l){return r.call(this,o,Sn(e,a),l,e)}),s[t](i,...n)}function Ka(e,t,r){const n=ze(e);Ot(n,"iterate",ii);const s=n[t](...r);return(s===-1||s===!1)&&ai(r[0])?(r[0]=ze(r[0]),n[t](...r)):s}function oi(e,t,r=[]){Jr(),La();const n=ze(e)[t].apply(e,r);return Fa(),Yr(),n}var iv=Xs("__proto__,__v_isRef,__isVue"),$u=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Er));function ov(e){Er(e)||(e=String(e));const t=ze(this);return Ot(t,"has",e),t.hasOwnProperty(e)}var Pu=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,r){if(t==="__v_skip")return e.__v_skip;const n=this._isReadonly,s=this._isShallow;if(t==="__v_isReactive")return!n;if(t==="__v_isReadonly")return n;if(t==="__v_isShallow")return s;if(t==="__v_raw")return r===(n?s?qu:Nu:s?Mu:Hu).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r)?e:void 0;const i=_e(e);if(!n){let a;if(i&&(a=nv[t]))return a;if(t==="hasOwnProperty")return ov}const o=Reflect.get(e,t,rt(e)?e:r);if((Er(t)?$u.has(t):iv(t))||(n||Ot(e,"get",t),s))return o;if(rt(o)){const a=i&&Yi(t)?o:o.value;return n&&Ge(a)?Ht(a):a}return Ge(o)?n?Ht(o):Qr(o):o}},Du=class extends Pu{constructor(e=!1){super(!1,e)}set(e,t,r,n){let s=e[t];const i=_e(e)&&Yi(t);if(!this._isShallow){const l=Mr(s);if(!Jt(r)&&!Mr(r)&&(s=ze(s),r=ze(r)),!i&&rt(s)&&!rt(r))return l||(s.value=r),!0}const o=i?Number(t)<e.length:Ye(e,t),a=Reflect.set(e,t,r,rt(e)?e:n);return e===ze(n)&&(o?Bt(r,s)&&Zr(e,"set",t,r,s):Zr(e,"add",t,r)),a}deleteProperty(e,t){const r=Ye(e,t),n=e[t],s=Reflect.deleteProperty(e,t);return s&&r&&Zr(e,"delete",t,void 0,n),s}has(e,t){const r=Reflect.has(e,t);return(!Er(t)||!$u.has(t))&&Ot(e,"has",t),r}ownKeys(e){return Ot(e,"iterate",_e(e)?"length":Yn),Reflect.ownKeys(e)}},Ou=class extends Pu{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},av=new Du,lv=new Ou,cv=new Du(!0),uv=new Ou(!0),Wa=e=>e,oo=e=>Reflect.getPrototypeOf(e);function dv(e,t,r){return function(...n){const s=this.__v_raw,i=ze(s),o=ws(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,u=s[e](...n),c=r?Wa:t?Cs:kr;return!t&&Ot(i,"iterate",l?Ua:Yn),Qe(Object.create(u),{next(){const{value:d,done:p}=u.next();return p?{value:d,done:p}:{value:a?[c(d[0]),c(d[1])]:c(d),done:p}}})}}function ao(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function fv(e,t){const r={get(n){const s=this.__v_raw,i=ze(s),o=ze(n);e||(Bt(n,o)&&Ot(i,"get",n),Ot(i,"get",o));const{has:a}=oo(i),l=t?Wa:e?Cs:kr;if(a.call(i,n))return l(s.get(n));if(a.call(i,o))return l(s.get(o));s!==i&&s.get(n)},get size(){const n=this.__v_raw;return!e&&Ot(ze(n),"iterate",Yn),n.size},has(n){const s=this.__v_raw,i=ze(s),o=ze(n);return e||(Bt(n,o)&&Ot(i,"has",n),Ot(i,"has",o)),n===o?s.has(n):s.has(n)||s.has(o)},forEach(n,s){const i=this,o=i.__v_raw,a=ze(o),l=t?Wa:e?Cs:kr;return!e&&Ot(a,"iterate",Yn),o.forEach((u,c)=>n.call(s,l(u),l(c),i))}};return Qe(r,e?{add:ao("add"),set:ao("set"),delete:ao("delete"),clear:ao("clear")}:{add(n){!t&&!Jt(n)&&!Mr(n)&&(n=ze(n));const s=ze(this);return oo(s).has.call(s,n)||(s.add(n),Zr(s,"add",n,n)),this},set(n,s){!t&&!Jt(s)&&!Mr(s)&&(s=ze(s));const i=ze(this),{has:o,get:a}=oo(i);let l=o.call(i,n);l||(n=ze(n),l=o.call(i,n));const u=a.call(i,n);return i.set(n,s),l?Bt(s,u)&&Zr(i,"set",n,s,u):Zr(i,"add",n,s),this},delete(n){const s=ze(this),{has:i,get:o}=oo(s);let a=i.call(s,n);a||(n=ze(n),a=i.call(s,n));const l=o?o.call(s,n):void 0,u=s.delete(n);return a&&Zr(s,"delete",n,void 0,l),u},clear(){const n=ze(this),s=n.size!==0,i=void 0,o=n.clear();return s&&Zr(n,"clear",void 0,void 0,i),o}}),["keys","values","entries",Symbol.iterator].forEach(n=>{r[n]=dv(n,e,t)}),r}function lo(e,t){const r=fv(e,t);return(n,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?n:Reflect.get(Ye(r,s)&&s in n?r:n,s,i)}var pv={get:lo(!1,!1)},hv={get:lo(!1,!0)},gv={get:lo(!0,!1)},vv={get:lo(!0,!0)},Hu=new WeakMap,Mu=new WeakMap,Nu=new WeakMap,qu=new WeakMap;function mv(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function wv(e){return e.__v_skip||!Object.isExtensible(e)?0:mv(Fg(e))}function Qr(e){return Mr(e)?e:co(e,!1,av,pv,Hu)}function Bu(e){return co(e,!1,cv,hv,Mu)}function Ht(e){return co(e,!0,lv,gv,Nu)}function en(e){return co(e,!0,uv,vv,qu)}function co(e,t,r,n,s){if(!Ge(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=wv(e);if(i===0)return e;const o=s.get(e);if(o)return o;const a=new Proxy(e,i===2?n:r);return s.set(e,a),a}function tn(e){return Mr(e)?tn(e.__v_raw):!!(e&&e.__v_isReactive)}function Mr(e){return!!(e&&e.__v_isReadonly)}function Jt(e){return!!(e&&e.__v_isShallow)}function ai(e){return e?!!e.__v_raw:!1}function ze(e){const t=e&&e.__v_raw;return t?ze(t):e}function Ga(e){return!Ye(e,"__v_skip")&&Object.isExtensible(e)&&vu(e,"__v_skip",!0),e}var kr=e=>Ge(e)?Qr(e):e,Cs=e=>Ge(e)?Ht(e):e;function rt(e){return e?e.__v_isRef===!0:!1}function F(e){return Lu(e,!1)}function ft(e){return Lu(e,!0)}function Lu(e,t){return rt(e)?e:new yv(e,t)}var yv=class{constructor(e,t){this.dep=new no,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:ze(e),this._value=t?e:kr(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,r=this.__v_isShallow||Jt(e)||Mr(e);e=r?e:ze(e),Bt(e,t)&&(this._rawValue=e,this._value=r?e:kr(e),this.dep.trigger())}};function Fu(e){e.dep&&e.dep.trigger()}function f(e){return rt(e)?e.value:e}function $e(e){return De(e)?e():f(e)}var bv={get:(e,t,r)=>t==="__v_raw"?e:f(Reflect.get(e,t,r)),set:(e,t,r,n)=>{const s=e[t];return rt(s)&&!rt(r)?(s.value=r,!0):Reflect.set(e,t,r,n)}};function Ja(e){return tn(e)?e:new Proxy(e,bv)}var _v=class{constructor(e){this.__v_isRef=!0,this._value=void 0;const t=this.dep=new no,{get:r,set:n}=e(t.track.bind(t),t.trigger.bind(t));this._get=r,this._set=n}get value(){return this._value=this._get()}set value(e){this._set(e)}};function li(e){return new _v(e)}function Mt(e){const t=_e(e)?new Array(e.length):{};for(const r in e)t[r]=Vu(e,r);return t}var Sv=class{constructor(e,t,r){this._object=e,this._key=t,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0,this._raw=ze(e);let n=!0,s=e;if(!_e(e)||!Yi(String(t)))do n=!ai(s)||Jt(s);while(n&&(s=s.__v_raw));this._shallow=n}get value(){let e=this._object[this._key];return this._shallow&&(e=f(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&rt(this._raw[this._key])){const t=this._object[this._key];if(rt(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return rv(this._raw,this._key)}},Cv=class{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 Ya(e,t,r){return rt(e)?e:De(e)?new Cv(e):Ge(e)&&arguments.length>1?Vu(e,t,r):F(e)}function Vu(e,t,r){return new Sv(e,t,r)}var xv=class{constructor(e,t,r){this.fn=e,this.setter=t,this._value=void 0,this.dep=new no(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=si-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&ot!==this)return Cu(this,!0),!0}get value(){const e=this.dep.track();return Eu(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function Tv(e,t,r=!1){let n,s;return De(e)?n=e:(n=e.get,s=e.set),new xv(n,s,r)}var Ev={GET:"get",HAS:"has",ITERATE:"iterate"},Av={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},uo={},fo=new WeakMap,Cn=void 0;function kv(){return Cn}function ju(e,t=!1,r=Cn){if(r){let n=fo.get(r);n||fo.set(r,n=[]),n.push(e)}}function Iv(e,t,r=Ue){const{immediate:n,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=r,u=y=>s?y:Jt(y)||s===!1||s===0?rn(y,1):rn(y);let c,d,p,h,m=!1,w=!1;if(rt(e)?(d=()=>e.value,m=Jt(e)):tn(e)?(d=()=>u(e),m=!0):_e(e)?(w=!0,m=e.some(y=>tn(y)||Jt(y)),d=()=>e.map(y=>{if(rt(y))return y.value;if(tn(y))return u(y);if(De(y))return l?l(y,2):y()})):De(e)?t?d=l?()=>l(e,2):e:d=()=>{if(p){Jr();try{p()}finally{Yr()}}const y=Cn;Cn=c;try{return l?l(e,3,[h]):e(h)}finally{Cn=y}}:d=fr,t&&s){const y=d,T=s===!0?1/0:s;d=()=>rn(y(),T)}const x=ro(),g=()=>{c.stop(),x&&x.active&&Da(x.effects,c)};if(i&&t){const y=t;t=(...T)=>{y(...T),g()}}let S=w?new Array(e.length).fill(uo):uo;const b=y=>{if(!(!(c.flags&1)||!c.dirty&&!y))if(t){const T=c.run();if(s||m||(w?T.some((k,N)=>Bt(k,S[N])):Bt(T,S))){p&&p();const k=Cn;Cn=c;try{const N=[T,S===uo?void 0:w&&S[0]===uo?[]:S,h];S=T,l?l(t,3,N):t(...N)}finally{Cn=k}}}else c.run()};return a&&a(b),c=new ti(d),c.scheduler=o?()=>o(b,!1):b,h=y=>ju(y,!1,c),p=c.onStop=()=>{const y=fo.get(c);if(y){if(l)l(y,4);else for(const T of y)T();fo.delete(c)}},t?n?b(!0):S=c.run():o?o(b.bind(null,!0),!0):c.run(),g.pause=c.pause.bind(c),g.resume=c.resume.bind(c),g.stop=g,g}function rn(e,t=1/0,r){if(t<=0||!Ge(e)||e.__v_skip||(r=r||new Map,(r.get(e)||0)>=t))return e;if(r.set(e,t),t--,rt(e))rn(e.value,t,r);else if(_e(e))for(let n=0;n<e.length;n++)rn(e[n],t,r);else if(Gn(e)||ws(e))e.forEach(n=>{rn(n,t,r)});else if(Ji(e)){for(const n in e)rn(e[n],t,r);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&rn(e[n],t,r)}return e}var Uu=[];function Rv(e){Uu.push(e)}function $v(){Uu.pop()}function Pv(e,t){}var Dv={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},Ov={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function xs(e,t,r,n){try{return n?e(...n):e()}catch(s){Zn(s,t,r)}}function hr(e,t,r,n){if(De(e)){const s=xs(e,t,r,n);return s&&Oa(s)&&s.catch(i=>{Zn(i,t,r)}),s}if(_e(e)){const s=[];for(let i=0;i<e.length;i++)s.push(hr(e[i],t,r,n));return s}}function Zn(e,t,r,n=!0){const s=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||Ue;if(t){let a=t.parent;const l=t.proxy,u=`https://vuejs.org/error-reference/#runtime-${r}`;for(;a;){const c=a.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,l,u)===!1)return}a=a.parent}if(i){Jr(),xs(i,null,10,[e,l,u]),Yr();return}}Hv(e,r,s,n,o)}function Hv(e,t,r,n=!0,s=!1){if(s)throw e;console.error(e)}var Lt=[],Nr=-1,Ts=[],xn=null,Es=0,zu=Promise.resolve(),po=null;function Et(e){const t=po||zu;return e?t.then(this?e.bind(this):e):t}function Mv(e){let t=Nr+1,r=Lt.length;for(;t<r;){const n=t+r>>>1,s=Lt[n],i=ui(s);i<e||i===e&&s.flags&2?t=n+1:r=n}return t}function Za(e){if(!(e.flags&1)){const t=ui(e),r=Lt[Lt.length-1];!r||!(e.flags&2)&&t>=ui(r)?Lt.push(e):Lt.splice(Mv(t),0,e),e.flags|=1,Ku()}}function Ku(){po||(po=zu.then(Gu))}function ci(e){_e(e)?Ts.push(...e):xn&&e.id===-1?xn.splice(Es+1,0,e):e.flags&1||(Ts.push(e),e.flags|=1),Ku()}function Wu(e,t,r=Nr+1){for(;r<Lt.length;r++){const n=Lt[r];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;Lt.splice(r,1),r--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function ho(e){if(Ts.length){const t=[...new Set(Ts)].sort((r,n)=>ui(r)-ui(n));if(Ts.length=0,xn){xn.push(...t);return}for(xn=t,Es=0;Es<xn.length;Es++){const r=xn[Es];r.flags&4&&(r.flags&=-2),r.flags&8||r(),r.flags&=-2}xn=null,Es=0}}var ui=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Gu(e){try{for(Nr=0;Nr<Lt.length;Nr++){const t=Lt[Nr];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),xs(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Nr<Lt.length;Nr++){const t=Lt[Nr];t&&(t.flags&=-2)}Nr=-1,Lt.length=0,ho(e),po=null,(Lt.length||Ts.length)&&Gu(e)}}var As,go=[];function Ju(e,t){var r,n;As=e,As?(As.enabled=!0,go.forEach(({event:s,args:i})=>As.emit(s,...i)),go=[]):typeof window<"u"&&window.HTMLElement&&!((n=(r=window.navigator)==null?void 0:r.userAgent)!=null&&n.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(s=>{Ju(s,t)}),setTimeout(()=>{As||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,go=[])},3e3)):go=[]}var It=null,vo=null;function di(e){const t=It;return It=e,vo=e&&e.type.__scopeId||null,t}function Nv(e){vo=e}function qv(){vo=null}var Bv=e=>I;function I(e,t=It,r){if(!t||e._n)return e;const n=(...s)=>{n._d&&xi(-1);const i=di(t);let o;try{o=e(...s)}finally{di(i),n._d&&xi(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function mo(e,t){if(It===null)return e;const r=Ti(It),n=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[i,o,a,l=Ue]=t[s];i&&(De(i)&&(i={mounted:i,updated:i}),i.deep&&rn(o),n.push({dir:i,instance:r,value:o,oldValue:void 0,arg:a,modifiers:l}))}return e}function qr(e,t,r,n){const s=e.dirs,i=t&&t.dirs;for(let o=0;o<s.length;o++){const a=s[o];i&&(a.oldValue=i[o].value);let l=a.dir[n];l&&(Jr(),hr(l,r,8,[e.el,a,e,t]),Yr())}}function Xn(e,t){if(Rt){let r=Rt.provides;const n=Rt.parent&&Rt.parent.provides;n===r&&(r=Rt.provides=Object.create(n)),r[e]=t}}function Ft(e,t,r=!1){const n=gt();if(n||Qn){let s=Qn?Qn._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return r&&De(t)?t.call(n&&n.proxy):t}}function Lv(){return!!(gt()||Qn)}var Yu=Symbol.for("v-scx"),Zu=()=>{{const e=Ft(Yu);return e}};function ct(e,t){return fi(e,null,t)}function Xa(e,t){return fi(e,null,{flush:"post"})}function Xu(e,t){return fi(e,null,{flush:"sync"})}function Me(e,t,r){return fi(e,t,r)}function fi(e,t,r=Ue){const{immediate:n,deep:s,flush:i,once:o}=r,a=Qe({},r),l=t&&n||!t&&i!=="post";let u;if(Os){if(i==="sync"){const h=Zu();u=h.__watcherHandles||(h.__watcherHandles=[])}else if(!l){const h=()=>{};return h.stop=fr,h.resume=fr,h.pause=fr,h}}const c=Rt;a.call=(h,m,w)=>hr(h,c,m,w);let d=!1;i==="post"?a.scheduler=h=>{wt(h,c&&c.suspense)}:i!=="sync"&&(d=!0,a.scheduler=(h,m)=>{m?h():Za(h)}),a.augmentJob=h=>{t&&(h.flags|=4),d&&(h.flags|=2,c&&(h.id=c.uid,h.i=c))};const p=Iv(e,t,a);return Os&&(u?u.push(p):l&&p()),p}function Fv(e,t,r){const n=this.proxy,s=it(e)?e.includes(".")?Qu(n,e):()=>n[e]:e.bind(n,n);let i;De(t)?i=t:(i=t.handler,r=t);const o=ns(this),a=fi(s,i.bind(n),r);return o(),a}function Qu(e,t){const r=t.split(".");return()=>{let n=e;for(let s=0;s<r.length&&n;s++)n=n[r[s]];return n}}var ed=Symbol("_vte"),td=e=>e.__isTeleport,pi=e=>e&&(e.disabled||e.disabled===""),rd=e=>e&&(e.defer||e.defer===""),nd=e=>typeof SVGElement<"u"&&e instanceof SVGElement,sd=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Qa=(e,t)=>{const r=e&&e.to;return it(r)?t?t(r):null:r},id={name:"Teleport",__isTeleport:!0,process(e,t,r,n,s,i,o,a,l,u){const{mc:c,pc:d,pbc:p,o:{insert:h,querySelector:m,createText:w,createComment:x}}=u,g=pi(t.props);let{shapeFlag:S,children:b,dynamicChildren:y}=t;if(e==null){const T=t.el=w(""),k=t.anchor=w("");h(T,r,n),h(k,r,n);const N=(B,q)=>{S&16&&c(b,B,q,s,i,o,a,l)},v=()=>{const B=t.target=Qa(t.props,m),q=tl(B,t,w,h);B&&(o!=="svg"&&nd(B)?o="svg":o!=="mathml"&&sd(B)&&(o="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(B),g||(N(B,q),yo(t,!1)))};g&&(N(r,k),yo(t,!0)),rd(t.props)?(t.el.__isMounted=!1,wt(()=>{v(),delete t.el.__isMounted},i)):v()}else{if(rd(t.props)&&e.el.__isMounted===!1){wt(()=>{id.process(e,t,r,n,s,i,o,a,l,u)},i);return}t.el=e.el,t.targetStart=e.targetStart;const T=t.anchor=e.anchor,k=t.target=e.target,N=t.targetAnchor=e.targetAnchor,v=pi(e.props),B=v?r:k,q=v?T:N;if(o==="svg"||nd(k)?o="svg":(o==="mathml"||sd(k))&&(o="mathml"),y?(p(e.dynamicChildren,y,B,s,i,o,a),_l(e,t,!0)):l||d(e,t,B,q,s,i,o,a,!1),g)v?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):wo(t,r,T,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const C=t.target=Qa(t.props,m);C&&wo(t,C,null,u,0)}else v&&wo(t,k,N,u,1);yo(t,g)}},remove(e,t,r,{um:n,o:{remove:s}},i){const{shapeFlag:o,children:a,anchor:l,targetStart:u,targetAnchor:c,target:d,props:p}=e;if(d&&(s(u),s(c)),i&&s(l),o&16){const h=i||!pi(p);for(let m=0;m<a.length;m++){const w=a[m];n(w,t,r,h,!!w.dynamicChildren)}}},move:wo,hydrate:Vv};function wo(e,t,r,{o:{insert:n},m:s},i=2){i===0&&n(e.targetAnchor,t,r);const{el:o,anchor:a,shapeFlag:l,children:u,props:c}=e,d=i===2;if(d&&n(o,t,r),(!d||pi(c))&&l&16)for(let p=0;p<u.length;p++)s(u[p],t,r,2);d&&n(a,t,r)}function Vv(e,t,r,n,s,i,{o:{nextSibling:o,parentNode:a,querySelector:l,insert:u,createText:c}},d){function p(x,g){let S=g;for(;S;){if(S&&S.nodeType===8){if(S.data==="teleport start anchor")t.targetStart=S;else if(S.data==="teleport anchor"){t.targetAnchor=S,x._lpa=t.targetAnchor&&o(t.targetAnchor);break}}S=o(S)}}function h(x,g){g.anchor=d(o(x),g,a(x),r,n,s,i)}const m=t.target=Qa(t.props,l),w=pi(t.props);if(m){const x=m._lpa||m.firstChild;t.shapeFlag&16&&(w?(h(e,t),p(m,x),t.targetAnchor||tl(m,t,c,u,a(e)===m?e:null)):(t.anchor=o(e),p(m,x),t.targetAnchor||tl(m,t,c,u),d(x&&o(x),t,m,r,n,s,i))),yo(t,w)}else w&&t.shapeFlag&16&&(h(e,t),t.targetStart=e,t.targetAnchor=o(e));return t.anchor&&o(t.anchor)}var el=id;function yo(e,t){const r=e.ctx;if(r&&r.ut){let n,s;for(t?(n=e.el,s=e.anchor):(n=e.targetStart,s=e.targetAnchor);n&&n!==s;)n.nodeType===1&&n.setAttribute("data-v-owner",r.uid),n=n.nextSibling;r.ut()}}function tl(e,t,r,n,s=null){const i=t.targetStart=r(""),o=t.targetAnchor=r("");return i[ed]=o,e&&(n(i,e,s),n(o,e,s)),o}var Br=Symbol("_leaveCb"),hi=Symbol("_enterCb");function rl(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return tt(()=>{e.isMounted=!0}),Ps(()=>{e.isUnmounting=!0}),e}var gr=[Function,Array],nl={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:gr,onEnter:gr,onAfterEnter:gr,onEnterCancelled:gr,onBeforeLeave:gr,onLeave:gr,onAfterLeave:gr,onLeaveCancelled:gr,onBeforeAppear:gr,onAppear:gr,onAfterAppear:gr,onAppearCancelled:gr},od=e=>{const t=e.subTree;return t.component?od(t.component):t},jv={name:"BaseTransition",props:nl,setup(e,{slots:t}){const r=gt(),n=rl();return()=>{const s=t.default&&bo(t.default(),!0);if(!s||!s.length)return;const i=ad(s),o=ze(e),{mode:a}=o;if(n.isLeaving)return sl(i);const l=ud(i);if(!l)return sl(i);let u=ks(l,o,n,r,d=>u=d);l.type!==ht&&nn(l,u);let c=r.subTree&&ud(r.subTree);if(c&&c.type!==ht&&!Ir(c,l)&&od(r).type!==ht){let d=ks(c,o,n,r);if(nn(c,d),a==="out-in"&&l.type!==ht)return n.isLeaving=!0,d.afterLeave=()=>{n.isLeaving=!1,r.job.flags&8||r.update(),delete d.afterLeave,c=void 0},sl(i);a==="in-out"&&l.type!==ht?d.delayLeave=(p,h,m)=>{const w=cd(n,c);w[String(c.key)]=c,p[Br]=()=>{h(),p[Br]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{m(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return i}}};function ad(e){let t=e[0];if(e.length>1){for(const r of e)if(r.type!==ht){t=r;break}}return t}var ld=jv;function cd(e,t){const{leavingVNodes:r}=e;let n=r.get(t.type);return n||(n=Object.create(null),r.set(t.type,n)),n}function ks(e,t,r,n,s){const{appear:i,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:p,onLeave:h,onAfterLeave:m,onLeaveCancelled:w,onBeforeAppear:x,onAppear:g,onAfterAppear:S,onAppearCancelled:b}=t,y=String(e.key),T=cd(r,e),k=(B,q)=>{B&&hr(B,n,9,q)},N=(B,q)=>{const C=q[1];k(B,q),_e(B)?B.every(_=>_.length<=1)&&C():B.length<=1&&C()},v={mode:o,persisted:a,beforeEnter(B){let q=l;if(!r.isMounted)if(i)q=x||l;else return;B[Br]&&B[Br](!0);const C=T[y];C&&Ir(e,C)&&C.el[Br]&&C.el[Br](),k(q,[B])},enter(B){if(T[y]===e)return;let q=u,C=c,_=d;if(!r.isMounted)if(i)q=g||u,C=S||c,_=b||d;else return;let E=!1;B[hi]=R=>{E||(E=!0,R?k(_,[B]):k(C,[B]),v.delayedLeave&&v.delayedLeave(),B[hi]=void 0)};const P=B[hi].bind(null,!1);q?N(q,[B,P]):P()},leave(B,q){const C=String(e.key);if(B[hi]&&B[hi](!0),r.isUnmounting)return q();k(p,[B]);let _=!1;B[Br]=P=>{_||(_=!0,q(),P?k(w,[B]):k(m,[B]),B[Br]=void 0,T[C]===e&&delete T[C])};const E=B[Br].bind(null,!1);T[C]=e,h?N(h,[B,E]):E()},clone(B){const q=ks(B,t,r,n,s);return s&&s(q),q}};return v}function sl(e){if(gi(e))return e=Rr(e),e.children=null,e}function ud(e){if(!gi(e))return td(e.type)&&e.children?ad(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:r}=e;if(r){if(t&16)return r[0];if(t&32&&De(r.default))return r.default()}}function nn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,nn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function bo(e,t=!1,r){let n=[],s=0;for(let i=0;i<e.length;i++){let o=e[i];const a=r==null?o.key:String(r)+String(o.key!=null?o.key:i);o.type===Ke?(o.patchFlag&128&&s++,n=n.concat(bo(o.children,t,a))):(t||o.type!==ht)&&n.push(a!=null?Rr(o,{key:a}):o)}if(s>1)for(let i=0;i<n.length;i++)n[i].patchFlag=-2;return n}function X(e,t){return De(e)?Qe({name:e.name},t,{setup:e}):e}function dd(){const e=gt();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function il(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Uv(e){const t=gt(),r=ft(null);if(t){const n=t.refs===Ue?t.refs={}:t.refs;Object.defineProperty(n,e,{enumerable:!0,get:()=>r.value,set:s=>r.value=s})}return r}function fd(e,t){let r;return!!((r=Object.getOwnPropertyDescriptor(e,t))&&!r.configurable)}var _o=new WeakMap;function Is(e,t,r,n,s=!1){if(_e(e)){e.forEach((w,x)=>Is(w,t&&(_e(t)?t[x]:t),r,n,s));return}if(sn(n)&&!s){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Is(e,t,r,n.component.subTree);return}const i=n.shapeFlag&4?Ti(n.component):n.el,o=s?null:i,{i:a,r:l}=e,u=t&&t.r,c=a.refs===Ue?a.refs={}:a.refs,d=a.setupState,p=ze(d),h=d===Ue?pu:w=>fd(c,w)?!1:Ye(p,w),m=(w,x)=>!(x&&fd(c,x));if(u!=null&&u!==l){if(pd(t),it(u))c[u]=null,h(u)&&(d[u]=null);else if(rt(u)){const w=t;m(u,w.k)&&(u.value=null),w.k&&(c[w.k]=null)}}if(De(l))xs(l,a,12,[o,c]);else{const w=it(l),x=rt(l);if(w||x){const g=()=>{if(e.f){const S=w?h(l)?d[l]:c[l]:m(l)||!e.k?l.value:c[e.k];if(s)_e(S)&&Da(S,i);else if(_e(S))S.includes(i)||S.push(i);else if(w)c[l]=[i],h(l)&&(d[l]=c[l]);else{const b=[i];m(l,e.k)&&(l.value=b),e.k&&(c[e.k]=b)}}else w?(c[l]=o,h(l)&&(d[l]=o)):x&&(m(l,e.k)&&(l.value=o),e.k&&(c[e.k]=o))};if(o){const S=()=>{g(),_o.delete(e)};S.id=-1,_o.set(e,S),wt(S,r)}else pd(e),g()}}}function pd(e){const t=_o.get(e);t&&(t.flags|=8,_o.delete(e))}var hd=!1,Rs=()=>{hd||(console.error("Hydration completed but contains mismatches."),hd=!0)},zv=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",Kv=e=>e.namespaceURI.includes("MathML"),So=e=>{if(e.nodeType===1){if(zv(e))return"svg";if(Kv(e))return"mathml"}},$s=e=>e.nodeType===8;function Wv(e){const{mt:t,p:r,o:{patchProp:n,createText:s,nextSibling:i,parentNode:o,remove:a,insert:l,createComment:u}}=e,c=(b,y)=>{if(!y.hasChildNodes()){r(null,b,y),ho(),y._vnode=b;return}d(y.firstChild,b,null,null,null),ho(),y._vnode=b},d=(b,y,T,k,N,v=!1)=>{v=v||!!y.dynamicChildren;const B=$s(b)&&b.data==="[",q=()=>w(b,y,T,k,N,B),{type:C,ref:_,shapeFlag:E,patchFlag:P}=y;let R=b.nodeType;y.el=b,P===-2&&(v=!1,y.dynamicChildren=null);let D=null;switch(C){case Tn:R!==3?y.children===""?(l(y.el=s(""),o(b),b),D=b):D=q():(b.data!==y.children&&(Rs(),b.data=y.children),D=i(b));break;case ht:S(b)?(D=i(b),g(y.el=b.content.firstChild,b,T)):R!==8||B?D=q():D=i(b);break;case ts:if(B&&(b=i(b),R=b.nodeType),R===1||R===3){D=b;const G=!y.children.length;for(let W=0;W<y.staticCount;W++)G&&(y.children+=D.nodeType===1?D.outerHTML:D.data),W===y.staticCount-1&&(y.anchor=D),D=i(D);return B?i(D):D}else q();break;case Ke:B?D=m(b,y,T,k,N,v):D=q();break;default:if(E&1)(R!==1||y.type.toLowerCase()!==b.tagName.toLowerCase())&&!S(b)?D=q():D=p(b,y,T,k,N,v);else if(E&6){y.slotScopeIds=N;const G=o(b);if(B?D=x(b):$s(b)&&b.data==="teleport start"?D=x(b,b.data,"teleport end"):D=i(b),t(y,G,null,T,k,So(G),v),sn(y)&&!y.type.__asyncResolved){let W;B?(W=O(Ke),W.anchor=D?D.previousSibling:G.lastChild):W=b.nodeType===3?qe(""):O("div"),W.el=b,y.component.subTree=W}}else E&64?R!==8?D=q():D=y.type.hydrate(b,y,T,k,N,v,e,h):E&128&&(D=y.type.hydrate(b,y,T,k,So(o(b)),N,v,e,d))}return _!=null&&Is(_,null,k,y),D},p=(b,y,T,k,N,v)=>{v=v||!!y.dynamicChildren;const{type:B,props:q,patchFlag:C,shapeFlag:_,dirs:E,transition:P}=y,R=B==="input"||B==="option";if(R||C!==-1){E&&qr(y,null,T,"created");let D=!1;if(S(b)){D=Yd(null,P)&&T&&T.vnode.props&&T.vnode.props.appear;const W=b.content.firstChild;if(D){const ae=W.getAttribute("class");ae&&(W.$cls=ae),P.beforeEnter(W)}g(W,b,T),y.el=b=W}if(_&16&&!(q&&(q.innerHTML||q.textContent))){let W=h(b.firstChild,y,b,T,k,N,v);for(;W;){Co(b,1)||Rs();const ae=W;W=W.nextSibling,a(ae)}}else if(_&8){let W=y.children;W[0]===`
3
+ (function(){var fu=Object.defineProperty,Bg=(e,t)=>{let r={};for(var n in e)fu(r,n,{get:e[n],enumerable:!0});return t&&fu(r,Symbol.toStringTag,{value:"Module"}),r};function Qs(e){const t=Object.create(null);for(const r of e.split(","))t[r]=1;return r=>r in t}var Ue={},ws=[],dr=()=>{},pu=()=>!1,ei=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Pa=e=>e.startsWith("onUpdate:"),Qe=Object.assign,Da=(e,t)=>{const r=e.indexOf(t);r>-1&&e.splice(r,1)},Lg=Object.prototype.hasOwnProperty,Ze=(e,t)=>Lg.call(e,t),Se=Array.isArray,ys=e=>bs(e)==="[object Map]",Gn=e=>bs(e)==="[object Set]",hu=e=>bs(e)==="[object Date]",Fg=e=>bs(e)==="[object RegExp]",Oe=e=>typeof e=="function",it=e=>typeof e=="string",Tr=e=>typeof e=="symbol",Je=e=>e!==null&&typeof e=="object",Oa=e=>(Je(e)||Oe(e))&&Oe(e.then)&&Oe(e.catch),gu=Object.prototype.toString,bs=e=>gu.call(e),Vg=e=>bs(e).slice(8,-1),Yi=e=>bs(e)==="[object Object]",Zi=e=>it(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Jn=Qs(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Xi=e=>{const t=Object.create(null);return(r=>t[r]||(t[r]=e(r)))},jg=/-\w/g,_t=Xi(e=>e.replace(jg,t=>t.slice(1).toUpperCase())),Ug=/\B([A-Z])/g,Jt=Xi(e=>e.replace(Ug,"-$1").toLowerCase()),ti=Xi(e=>e.charAt(0).toUpperCase()+e.slice(1)),_s=Xi(e=>e?`on${ti(e)}`:""),Lt=(e,t)=>!Object.is(e,t),Ss=(e,...t)=>{for(let r=0;r<e.length;r++)e[r](...t)},vu=(e,t,r,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:r})},Qi=e=>{const t=parseFloat(e);return isNaN(t)?e:t},eo=e=>{const t=it(e)?Number(e):NaN;return isNaN(t)?e:t},mu,to=()=>mu||(mu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),zg=Qs("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol");function St(e){if(Se(e)){const t={};for(let r=0;r<e.length;r++){const n=e[r],s=it(n)?Jg(n):St(n);if(s)for(const i in s)t[i]=s[i]}return t}else if(it(e)||Je(e))return e}var Kg=/;(?![^(]*\))/g,Wg=/:([^]+)/,Gg=/\/\*[^]*?\*\//g;function Jg(e){const t={};return e.replace(Gg,"").split(Kg).forEach(r=>{if(r){const n=r.split(Wg);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function et(e){let t="";if(it(e))t=e;else if(Se(e))for(let r=0;r<e.length;r++){const n=et(e[r]);n&&(t+=n+" ")}else if(Je(e))for(const r in e)e[r]&&(t+=r+" ");return t.trim()}function fr(e){if(!e)return null;let{class:t,style:r}=e;return t&&!it(t)&&(e.class=et(t)),r&&(e.style=St(r)),e}var wu="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Yg=Qs(wu),gT=Qs(wu+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function yu(e){return!!e||e===""}function Zg(e,t){if(e.length!==t.length)return!1;let r=!0;for(let n=0;r&&n<e.length;n++)r=Gr(e[n],t[n]);return r}function Gr(e,t){if(e===t)return!0;let r=hu(e),n=hu(t);if(r||n)return r&&n?e.getTime()===t.getTime():!1;if(r=Tr(e),n=Tr(t),r||n)return e===t;if(r=Se(e),n=Se(t),r||n)return r&&n?Zg(e,t):!1;if(r=Je(e),n=Je(t),r||n){if(!r||!n||Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e){const i=e.hasOwnProperty(s),o=t.hasOwnProperty(s);if(i&&!o||!i&&o||!Gr(e[s],t[s]))return!1}}return String(e)===String(t)}function ro(e,t){return e.findIndex(r=>Gr(r,t))}var bu=e=>!!(e&&e.__v_isRef===!0),Le=e=>it(e)?e:e==null?"":Se(e)||Je(e)&&(e.toString===gu||!Oe(e.toString))?bu(e)?Le(e.value):JSON.stringify(e,_u,2):String(e),_u=(e,t)=>bu(t)?_u(e,t.value):ys(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((r,[n,s],i)=>(r[Ha(n,i)+" =>"]=s,r),{})}:Gn(t)?{[`Set(${t.size})`]:[...t.values()].map(r=>Ha(r))}:Tr(t)?Ha(t):Je(t)&&!Se(t)&&!Yi(t)?String(t):t,Ha=(e,t="")=>{var r;return Tr(e)?`Symbol(${(r=e.description)!=null?r:t})`:e};function Xg(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:(typeof e!="number"||Number.isFinite(e),String(e))}var Ot,Ma=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=Ot,!e&&Ot&&(this.index=(Ot.scopes||(Ot.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){const t=Ot;try{return Ot=this,e()}finally{Ot=t}}}on(){++this._on===1&&(this.prevScope=Ot,Ot=this)}off(){this._on>0&&--this._on===0&&(Ot=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let t,r;for(t=0,r=this.effects.length;t<r;t++)this.effects[t].stop();for(this.effects.length=0,t=0,r=this.cleanups.length;t<r;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,r=this.scopes.length;t<r;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const n=this.parent.scopes.pop();n&&n!==this&&(this.parent.scopes[this.index]=n,n.index=this.index)}this.parent=void 0}}};function Na(e){return new Ma(e)}function no(){return Ot}function qa(e,t=!1){Ot&&Ot.cleanups.push(e)}var ot,Ba=new WeakSet,ri=class{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Ot&&Ot.active&&Ot.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ba.has(this)&&(Ba.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Cu(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,ku(this),xu(this);const e=ot,t=Er;ot=this,Er=!0;try{return this.fn()}finally{Tu(this),ot=e,Er=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)ja(e);this.deps=this.depsTail=void 0,ku(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ba.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Va(this)&&this.run()}get dirty(){return Va(this)}},Su=0,ni,si;function Cu(e,t=!1){if(e.flags|=8,t){e.next=si,si=e;return}e.next=ni,ni=e}function La(){Su++}function Fa(){if(--Su>0)return;if(si){let t=si;for(si=void 0;t;){const r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;for(;ni;){let t=ni;for(ni=void 0;t;){const r=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=r}}if(e)throw e}function xu(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Tu(e){let t,r=e.depsTail,n=r;for(;n;){const s=n.prevDep;n.version===-1?(n===r&&(r=s),ja(n),Qg(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=s}e.deps=t,e.depsTail=r}function Va(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Eu(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Eu(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===ii)||(e.globalVersion=ii,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Va(e))))return;e.flags|=2;const t=e.dep,r=ot,n=Er;ot=e,Er=!0;try{xu(e);const s=e.fn(e._value);(t.version===0||Lt(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{ot=r,Er=n,Tu(e),e.flags&=-3}}function ja(e,t=!1){const{dep:r,prevSub:n,nextSub:s}=e;if(n&&(n.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=n,e.nextSub=void 0),r.subs===e&&(r.subs=n,!n&&r.computed)){r.computed.flags&=-5;for(let i=r.computed.deps;i;i=i.nextDep)ja(i,!0)}!t&&!--r.sc&&r.map&&r.map.delete(r.key)}function Qg(e){const{prevDep:t,nextDep:r}=e;t&&(t.nextDep=r,e.prevDep=void 0),r&&(r.prevDep=t,e.nextDep=void 0)}function ev(e,t){e.effect instanceof ri&&(e=e.effect.fn);const r=new ri(e);t&&Qe(r,t);try{r.run()}catch(s){throw r.stop(),s}const n=r.run.bind(r);return n.effect=r,n}function tv(e){e.effect.stop()}var Er=!0,Au=[];function Jr(){Au.push(Er),Er=!1}function Yr(){const e=Au.pop();Er=e===void 0?!0:e}function ku(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const r=ot;ot=void 0;try{t()}finally{ot=r}}}var ii=0,rv=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},so=class{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,this.__v_skip=!0}track(e){if(!ot||!Er||ot===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==ot)t=this.activeLink=new rv(ot,this),ot.deps?(t.prevDep=ot.depsTail,ot.depsTail.nextDep=t,ot.depsTail=t):ot.deps=ot.depsTail=t,Iu(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){const r=t.nextDep;r.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=r),t.prevDep=ot.depsTail,t.nextDep=void 0,ot.depsTail.nextDep=t,ot.depsTail=t,ot.deps===t&&(ot.deps=r)}return t}trigger(e){this.version++,ii++,this.notify(e)}notify(e){La();try{for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{Fa()}}};function Iu(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)Iu(n)}const r=e.dep.subs;r!==e&&(e.prevSub=r,r&&(r.nextSub=e)),e.dep.subs=e}}var io=new WeakMap,Yn=Symbol(""),Ua=Symbol(""),oi=Symbol("");function Ht(e,t,r){if(Er&&ot){let n=io.get(e);n||io.set(e,n=new Map);let s=n.get(r);s||(n.set(r,s=new so),s.map=n,s.key=r),s.track()}}function Zr(e,t,r,n,s,i){const o=io.get(e);if(!o){ii++;return}const a=l=>{l&&l.trigger()};if(La(),t==="clear")o.forEach(a);else{const l=Se(e),u=l&&Zi(r);if(l&&r==="length"){const c=Number(n);o.forEach((d,p)=>{(p==="length"||p===oi||!Tr(p)&&p>=c)&&a(d)})}else switch((r!==void 0||o.has(void 0))&&a(o.get(r)),u&&a(o.get(oi)),t){case"add":l?u&&a(o.get("length")):(a(o.get(Yn)),ys(e)&&a(o.get(Ua)));break;case"delete":l||(a(o.get(Yn)),ys(e)&&a(o.get(Ua)));break;case"set":ys(e)&&a(o.get(Yn));break}}Fa()}function nv(e,t){const r=io.get(e);return r&&r.get(t)}function Cs(e){const t=ze(e);return t===e?t:(Ht(t,"iterate",oi),Yt(e)?t:t.map(Ar))}function oo(e){return Ht(e=ze(e),"iterate",oi),e}function Sn(e,t){return Hr(e)?xs(tn(e)?Ar(t):t):Ar(t)}var sv={__proto__:null,[Symbol.iterator](){return za(this,Symbol.iterator,e=>Sn(this,e))},concat(...e){return Cs(this).concat(...e.map(t=>Se(t)?Cs(t):t))},entries(){return za(this,"entries",e=>(e[1]=Sn(this,e[1]),e))},every(e,t){return Xr(this,"every",e,t,void 0,arguments)},filter(e,t){return Xr(this,"filter",e,t,r=>r.map(n=>Sn(this,n)),arguments)},find(e,t){return Xr(this,"find",e,t,r=>Sn(this,r),arguments)},findIndex(e,t){return Xr(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Xr(this,"findLast",e,t,r=>Sn(this,r),arguments)},findLastIndex(e,t){return Xr(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Xr(this,"forEach",e,t,void 0,arguments)},includes(...e){return Ka(this,"includes",e)},indexOf(...e){return Ka(this,"indexOf",e)},join(e){return Cs(this).join(e)},lastIndexOf(...e){return Ka(this,"lastIndexOf",e)},map(e,t){return Xr(this,"map",e,t,void 0,arguments)},pop(){return ai(this,"pop")},push(...e){return ai(this,"push",e)},reduce(e,...t){return Ru(this,"reduce",e,t)},reduceRight(e,...t){return Ru(this,"reduceRight",e,t)},shift(){return ai(this,"shift")},some(e,t){return Xr(this,"some",e,t,void 0,arguments)},splice(...e){return ai(this,"splice",e)},toReversed(){return Cs(this).toReversed()},toSorted(e){return Cs(this).toSorted(e)},toSpliced(...e){return Cs(this).toSpliced(...e)},unshift(...e){return ai(this,"unshift",e)},values(){return za(this,"values",e=>Sn(this,e))}};function za(e,t,r){const n=oo(e),s=n[t]();return n!==e&&!Yt(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=r(i.value)),i}),s}var iv=Array.prototype;function Xr(e,t,r,n,s,i){const o=oo(e),a=o!==e&&!Yt(e),l=o[t];if(l!==iv[t]){const d=l.apply(e,i);return a?Ar(d):d}let u=r;o!==e&&(a?u=function(d,p){return r.call(this,Sn(e,d),p,e)}:r.length>2&&(u=function(d,p){return r.call(this,d,p,e)}));const c=l.call(o,u,n);return a&&s?s(c):c}function Ru(e,t,r,n){const s=oo(e);let i=r;return s!==e&&(Yt(e)?r.length>3&&(i=function(o,a,l){return r.call(this,o,a,l,e)}):i=function(o,a,l){return r.call(this,o,Sn(e,a),l,e)}),s[t](i,...n)}function Ka(e,t,r){const n=ze(e);Ht(n,"iterate",oi);const s=n[t](...r);return(s===-1||s===!1)&&li(r[0])?(r[0]=ze(r[0]),n[t](...r)):s}function ai(e,t,r=[]){Jr(),La();const n=ze(e)[t].apply(e,r);return Fa(),Yr(),n}var ov=Qs("__proto__,__v_isRef,__isVue"),$u=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Tr));function av(e){Tr(e)||(e=String(e));const t=ze(this);return Ht(t,"has",e),t.hasOwnProperty(e)}var Pu=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,r){if(t==="__v_skip")return e.__v_skip;const n=this._isReadonly,s=this._isShallow;if(t==="__v_isReactive")return!n;if(t==="__v_isReadonly")return n;if(t==="__v_isShallow")return s;if(t==="__v_raw")return r===(n?s?qu:Nu:s?Mu:Hu).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r)?e:void 0;const i=Se(e);if(!n){let a;if(i&&(a=sv[t]))return a;if(t==="hasOwnProperty")return av}const o=Reflect.get(e,t,rt(e)?e:r);if((Tr(t)?$u.has(t):ov(t))||(n||Ht(e,"get",t),s))return o;if(rt(o)){const a=i&&Zi(t)?o:o.value;return n&&Je(a)?Mt(a):a}return Je(o)?n?Mt(o):Qr(o):o}},Du=class extends Pu{constructor(e=!1){super(!1,e)}set(e,t,r,n){let s=e[t];const i=Se(e)&&Zi(t);if(!this._isShallow){const l=Hr(s);if(!Yt(r)&&!Hr(r)&&(s=ze(s),r=ze(r)),!i&&rt(s)&&!rt(r))return l||(s.value=r),!0}const o=i?Number(t)<e.length:Ze(e,t),a=Reflect.set(e,t,r,rt(e)?e:n);return e===ze(n)&&(o?Lt(r,s)&&Zr(e,"set",t,r,s):Zr(e,"add",t,r)),a}deleteProperty(e,t){const r=Ze(e,t),n=e[t],s=Reflect.deleteProperty(e,t);return s&&r&&Zr(e,"delete",t,void 0,n),s}has(e,t){const r=Reflect.has(e,t);return(!Tr(t)||!$u.has(t))&&Ht(e,"has",t),r}ownKeys(e){return Ht(e,"iterate",Se(e)?"length":Yn),Reflect.ownKeys(e)}},Ou=class extends Pu{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},lv=new Du,cv=new Ou,uv=new Du(!0),dv=new Ou(!0),Wa=e=>e,ao=e=>Reflect.getPrototypeOf(e);function fv(e,t,r){return function(...n){const s=this.__v_raw,i=ze(s),o=ys(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,u=s[e](...n),c=r?Wa:t?xs:Ar;return!t&&Ht(i,"iterate",l?Ua:Yn),Qe(Object.create(u),{next(){const{value:d,done:p}=u.next();return p?{value:d,done:p}:{value:a?[c(d[0]),c(d[1])]:c(d),done:p}}})}}function lo(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function pv(e,t){const r={get(n){const s=this.__v_raw,i=ze(s),o=ze(n);e||(Lt(n,o)&&Ht(i,"get",n),Ht(i,"get",o));const{has:a}=ao(i),l=t?Wa:e?xs:Ar;if(a.call(i,n))return l(s.get(n));if(a.call(i,o))return l(s.get(o));s!==i&&s.get(n)},get size(){const n=this.__v_raw;return!e&&Ht(ze(n),"iterate",Yn),n.size},has(n){const s=this.__v_raw,i=ze(s),o=ze(n);return e||(Lt(n,o)&&Ht(i,"has",n),Ht(i,"has",o)),n===o?s.has(n):s.has(n)||s.has(o)},forEach(n,s){const i=this,o=i.__v_raw,a=ze(o),l=t?Wa:e?xs:Ar;return!e&&Ht(a,"iterate",Yn),o.forEach((u,c)=>n.call(s,l(u),l(c),i))}};return Qe(r,e?{add:lo("add"),set:lo("set"),delete:lo("delete"),clear:lo("clear")}:{add(n){!t&&!Yt(n)&&!Hr(n)&&(n=ze(n));const s=ze(this);return ao(s).has.call(s,n)||(s.add(n),Zr(s,"add",n,n)),this},set(n,s){!t&&!Yt(s)&&!Hr(s)&&(s=ze(s));const i=ze(this),{has:o,get:a}=ao(i);let l=o.call(i,n);l||(n=ze(n),l=o.call(i,n));const u=a.call(i,n);return i.set(n,s),l?Lt(s,u)&&Zr(i,"set",n,s,u):Zr(i,"add",n,s),this},delete(n){const s=ze(this),{has:i,get:o}=ao(s);let a=i.call(s,n);a||(n=ze(n),a=i.call(s,n));const l=o?o.call(s,n):void 0,u=s.delete(n);return a&&Zr(s,"delete",n,void 0,l),u},clear(){const n=ze(this),s=n.size!==0,i=void 0,o=n.clear();return s&&Zr(n,"clear",void 0,void 0,i),o}}),["keys","values","entries",Symbol.iterator].forEach(n=>{r[n]=fv(n,e,t)}),r}function co(e,t){const r=pv(e,t);return(n,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?n:Reflect.get(Ze(r,s)&&s in n?r:n,s,i)}var hv={get:co(!1,!1)},gv={get:co(!1,!0)},vv={get:co(!0,!1)},mv={get:co(!0,!0)},Hu=new WeakMap,Mu=new WeakMap,Nu=new WeakMap,qu=new WeakMap;function wv(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function yv(e){return e.__v_skip||!Object.isExtensible(e)?0:wv(Vg(e))}function Qr(e){return Hr(e)?e:uo(e,!1,lv,hv,Hu)}function Bu(e){return uo(e,!1,uv,gv,Mu)}function Mt(e){return uo(e,!0,cv,vv,Nu)}function en(e){return uo(e,!0,dv,mv,qu)}function uo(e,t,r,n,s){if(!Je(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=yv(e);if(i===0)return e;const o=s.get(e);if(o)return o;const a=new Proxy(e,i===2?n:r);return s.set(e,a),a}function tn(e){return Hr(e)?tn(e.__v_raw):!!(e&&e.__v_isReactive)}function Hr(e){return!!(e&&e.__v_isReadonly)}function Yt(e){return!!(e&&e.__v_isShallow)}function li(e){return e?!!e.__v_raw:!1}function ze(e){const t=e&&e.__v_raw;return t?ze(t):e}function Ga(e){return!Ze(e,"__v_skip")&&Object.isExtensible(e)&&vu(e,"__v_skip",!0),e}var Ar=e=>Je(e)?Qr(e):e,xs=e=>Je(e)?Mt(e):e;function rt(e){return e?e.__v_isRef===!0:!1}function F(e){return Lu(e,!1)}function ft(e){return Lu(e,!0)}function Lu(e,t){return rt(e)?e:new bv(e,t)}var bv=class{constructor(e,t){this.dep=new so,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:ze(e),this._value=t?e:Ar(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,r=this.__v_isShallow||Yt(e)||Hr(e);e=r?e:ze(e),Lt(e,t)&&(this._rawValue=e,this._value=r?e:Ar(e),this.dep.trigger())}};function Fu(e){e.dep&&e.dep.trigger()}function f(e){return rt(e)?e.value:e}function $e(e){return Oe(e)?e():f(e)}var _v={get:(e,t,r)=>t==="__v_raw"?e:f(Reflect.get(e,t,r)),set:(e,t,r,n)=>{const s=e[t];return rt(s)&&!rt(r)?(s.value=r,!0):Reflect.set(e,t,r,n)}};function Ja(e){return tn(e)?e:new Proxy(e,_v)}var Sv=class{constructor(e){this.__v_isRef=!0,this._value=void 0;const t=this.dep=new so,{get:r,set:n}=e(t.track.bind(t),t.trigger.bind(t));this._get=r,this._set=n}get value(){return this._value=this._get()}set value(e){this._set(e)}};function ci(e){return new Sv(e)}function Nt(e){const t=Se(e)?new Array(e.length):{};for(const r in e)t[r]=Vu(e,r);return t}var Cv=class{constructor(e,t,r){this._object=e,this._key=t,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0,this._raw=ze(e);let n=!0,s=e;if(!Se(e)||!Zi(String(t)))do n=!li(s)||Yt(s);while(n&&(s=s.__v_raw));this._shallow=n}get value(){let e=this._object[this._key];return this._shallow&&(e=f(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&rt(this._raw[this._key])){const t=this._object[this._key];if(rt(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return nv(this._raw,this._key)}},xv=class{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 Ya(e,t,r){return rt(e)?e:Oe(e)?new xv(e):Je(e)&&arguments.length>1?Vu(e,t,r):F(e)}function Vu(e,t,r){return new Cv(e,t,r)}var Tv=class{constructor(e,t,r){this.fn=e,this.setter=t,this._value=void 0,this.dep=new so(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=ii-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&ot!==this)return Cu(this,!0),!0}get value(){const e=this.dep.track();return Eu(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function Ev(e,t,r=!1){let n,s;return Oe(e)?n=e:(n=e.get,s=e.set),new Tv(n,s,r)}var Av={GET:"get",HAS:"has",ITERATE:"iterate"},kv={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},fo={},po=new WeakMap,Cn=void 0;function Iv(){return Cn}function ju(e,t=!1,r=Cn){if(r){let n=po.get(r);n||po.set(r,n=[]),n.push(e)}}function Rv(e,t,r=Ue){const{immediate:n,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=r,u=y=>s?y:Yt(y)||s===!1||s===0?rn(y,1):rn(y);let c,d,p,h,m=!1,w=!1;if(rt(e)?(d=()=>e.value,m=Yt(e)):tn(e)?(d=()=>u(e),m=!0):Se(e)?(w=!0,m=e.some(y=>tn(y)||Yt(y)),d=()=>e.map(y=>{if(rt(y))return y.value;if(tn(y))return u(y);if(Oe(y))return l?l(y,2):y()})):Oe(e)?t?d=l?()=>l(e,2):e:d=()=>{if(p){Jr();try{p()}finally{Yr()}}const y=Cn;Cn=c;try{return l?l(e,3,[h]):e(h)}finally{Cn=y}}:d=dr,t&&s){const y=d,T=s===!0?1/0:s;d=()=>rn(y(),T)}const x=no(),v=()=>{c.stop(),x&&x.active&&Da(x.effects,c)};if(i&&t){const y=t;t=(...T)=>{y(...T),v()}}let S=w?new Array(e.length).fill(fo):fo;const b=y=>{if(!(!(c.flags&1)||!c.dirty&&!y))if(t){const T=c.run();if(s||m||(w?T.some((I,N)=>Lt(I,S[N])):Lt(T,S))){p&&p();const I=Cn;Cn=c;try{const N=[T,S===fo?void 0:w&&S[0]===fo?[]:S,h];S=T,l?l(t,3,N):t(...N)}finally{Cn=I}}}else c.run()};return a&&a(b),c=new ri(d),c.scheduler=o?()=>o(b,!1):b,h=y=>ju(y,!1,c),p=c.onStop=()=>{const y=po.get(c);if(y){if(l)l(y,4);else for(const T of y)T();po.delete(c)}},t?n?b(!0):S=c.run():o?o(b.bind(null,!0),!0):c.run(),v.pause=c.pause.bind(c),v.resume=c.resume.bind(c),v.stop=v,v}function rn(e,t=1/0,r){if(t<=0||!Je(e)||e.__v_skip||(r=r||new Map,(r.get(e)||0)>=t))return e;if(r.set(e,t),t--,rt(e))rn(e.value,t,r);else if(Se(e))for(let n=0;n<e.length;n++)rn(e[n],t,r);else if(Gn(e)||ys(e))e.forEach(n=>{rn(n,t,r)});else if(Yi(e)){for(const n in e)rn(e[n],t,r);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&rn(e[n],t,r)}return e}var Uu=[];function $v(e){Uu.push(e)}function Pv(){Uu.pop()}function Dv(e,t){}var Ov={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},Hv={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function Ts(e,t,r,n){try{return n?e(...n):e()}catch(s){Zn(s,t,r)}}function pr(e,t,r,n){if(Oe(e)){const s=Ts(e,t,r,n);return s&&Oa(s)&&s.catch(i=>{Zn(i,t,r)}),s}if(Se(e)){const s=[];for(let i=0;i<e.length;i++)s.push(pr(e[i],t,r,n));return s}}function Zn(e,t,r,n=!0){const s=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||Ue;if(t){let a=t.parent;const l=t.proxy,u=`https://vuejs.org/error-reference/#runtime-${r}`;for(;a;){const c=a.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,l,u)===!1)return}a=a.parent}if(i){Jr(),Ts(i,null,10,[e,l,u]),Yr();return}}Mv(e,r,s,n,o)}function Mv(e,t,r,n=!0,s=!1){if(s)throw e;console.error(e)}var Ft=[],Mr=-1,Es=[],xn=null,As=0,zu=Promise.resolve(),ho=null;function Et(e){const t=ho||zu;return e?t.then(this?e.bind(this):e):t}function Nv(e){let t=Mr+1,r=Ft.length;for(;t<r;){const n=t+r>>>1,s=Ft[n],i=di(s);i<e||i===e&&s.flags&2?t=n+1:r=n}return t}function Za(e){if(!(e.flags&1)){const t=di(e),r=Ft[Ft.length-1];!r||!(e.flags&2)&&t>=di(r)?Ft.push(e):Ft.splice(Nv(t),0,e),e.flags|=1,Ku()}}function Ku(){ho||(ho=zu.then(Gu))}function ui(e){Se(e)?Es.push(...e):xn&&e.id===-1?xn.splice(As+1,0,e):e.flags&1||(Es.push(e),e.flags|=1),Ku()}function Wu(e,t,r=Mr+1){for(;r<Ft.length;r++){const n=Ft[r];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;Ft.splice(r,1),r--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function go(e){if(Es.length){const t=[...new Set(Es)].sort((r,n)=>di(r)-di(n));if(Es.length=0,xn){xn.push(...t);return}for(xn=t,As=0;As<xn.length;As++){const r=xn[As];r.flags&4&&(r.flags&=-2),r.flags&8||r(),r.flags&=-2}xn=null,As=0}}var di=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Gu(e){try{for(Mr=0;Mr<Ft.length;Mr++){const t=Ft[Mr];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Ts(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Mr<Ft.length;Mr++){const t=Ft[Mr];t&&(t.flags&=-2)}Mr=-1,Ft.length=0,go(e),ho=null,(Ft.length||Es.length)&&Gu(e)}}var ks,vo=[];function Ju(e,t){var r,n;ks=e,ks?(ks.enabled=!0,vo.forEach(({event:s,args:i})=>ks.emit(s,...i)),vo=[]):typeof window<"u"&&window.HTMLElement&&!((n=(r=window.navigator)==null?void 0:r.userAgent)!=null&&n.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(s=>{Ju(s,t)}),setTimeout(()=>{ks||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,vo=[])},3e3)):vo=[]}var It=null,mo=null;function fi(e){const t=It;return It=e,mo=e&&e.type.__scopeId||null,t}function qv(e){mo=e}function Bv(){mo=null}var Lv=e=>k;function k(e,t=It,r){if(!t||e._n)return e;const n=(...s)=>{n._d&&Ti(-1);const i=fi(t);let o;try{o=e(...s)}finally{fi(i),n._d&&Ti(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function wo(e,t){if(It===null)return e;const r=Ei(It),n=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[i,o,a,l=Ue]=t[s];i&&(Oe(i)&&(i={mounted:i,updated:i}),i.deep&&rn(o),n.push({dir:i,instance:r,value:o,oldValue:void 0,arg:a,modifiers:l}))}return e}function Nr(e,t,r,n){const s=e.dirs,i=t&&t.dirs;for(let o=0;o<s.length;o++){const a=s[o];i&&(a.oldValue=i[o].value);let l=a.dir[n];l&&(Jr(),pr(l,r,8,[e.el,a,e,t]),Yr())}}function Xn(e,t){if(Rt){let r=Rt.provides;const n=Rt.parent&&Rt.parent.provides;n===r&&(r=Rt.provides=Object.create(n)),r[e]=t}}function Vt(e,t,r=!1){const n=gt();if(n||Qn){let s=Qn?Qn._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return r&&Oe(t)?t.call(n&&n.proxy):t}}function Fv(){return!!(gt()||Qn)}var Yu=Symbol.for("v-scx"),Zu=()=>{{const e=Vt(Yu);return e}};function ct(e,t){return pi(e,null,t)}function Xa(e,t){return pi(e,null,{flush:"post"})}function Xu(e,t){return pi(e,null,{flush:"sync"})}function He(e,t,r){return pi(e,t,r)}function pi(e,t,r=Ue){const{immediate:n,deep:s,flush:i,once:o}=r,a=Qe({},r),l=t&&n||!t&&i!=="post";let u;if(Hs){if(i==="sync"){const h=Zu();u=h.__watcherHandles||(h.__watcherHandles=[])}else if(!l){const h=()=>{};return h.stop=dr,h.resume=dr,h.pause=dr,h}}const c=Rt;a.call=(h,m,w)=>pr(h,c,m,w);let d=!1;i==="post"?a.scheduler=h=>{yt(h,c&&c.suspense)}:i!=="sync"&&(d=!0,a.scheduler=(h,m)=>{m?h():Za(h)}),a.augmentJob=h=>{t&&(h.flags|=4),d&&(h.flags|=2,c&&(h.id=c.uid,h.i=c))};const p=Rv(e,t,a);return Hs&&(u?u.push(p):l&&p()),p}function Vv(e,t,r){const n=this.proxy,s=it(e)?e.includes(".")?Qu(n,e):()=>n[e]:e.bind(n,n);let i;Oe(t)?i=t:(i=t.handler,r=t);const o=ns(this),a=pi(s,i.bind(n),r);return o(),a}function Qu(e,t){const r=t.split(".");return()=>{let n=e;for(let s=0;s<r.length&&n;s++)n=n[r[s]];return n}}var ed=Symbol("_vte"),td=e=>e.__isTeleport,hi=e=>e&&(e.disabled||e.disabled===""),rd=e=>e&&(e.defer||e.defer===""),nd=e=>typeof SVGElement<"u"&&e instanceof SVGElement,sd=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Qa=(e,t)=>{const r=e&&e.to;return it(r)?t?t(r):null:r},id={name:"Teleport",__isTeleport:!0,process(e,t,r,n,s,i,o,a,l,u){const{mc:c,pc:d,pbc:p,o:{insert:h,querySelector:m,createText:w,createComment:x}}=u,v=hi(t.props);let{shapeFlag:S,children:b,dynamicChildren:y}=t;if(e==null){const T=t.el=w(""),I=t.anchor=w("");h(T,r,n),h(I,r,n);const N=(B,q)=>{S&16&&c(b,B,q,s,i,o,a,l)},g=()=>{const B=t.target=Qa(t.props,m),q=tl(B,t,w,h);B&&(o!=="svg"&&nd(B)?o="svg":o!=="mathml"&&sd(B)&&(o="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(B),v||(N(B,q),bo(t,!1)))};v&&(N(r,I),bo(t,!0)),rd(t.props)?(t.el.__isMounted=!1,yt(()=>{g(),delete t.el.__isMounted},i)):g()}else{if(rd(t.props)&&e.el.__isMounted===!1){yt(()=>{id.process(e,t,r,n,s,i,o,a,l,u)},i);return}t.el=e.el,t.targetStart=e.targetStart;const T=t.anchor=e.anchor,I=t.target=e.target,N=t.targetAnchor=e.targetAnchor,g=hi(e.props),B=g?r:I,q=g?T:N;if(o==="svg"||nd(I)?o="svg":(o==="mathml"||sd(I))&&(o="mathml"),y?(p(e.dynamicChildren,y,B,s,i,o,a),_l(e,t,!0)):l||d(e,t,B,q,s,i,o,a,!1),v)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):yo(t,r,T,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const C=t.target=Qa(t.props,m);C&&yo(t,C,null,u,0)}else g&&yo(t,I,N,u,1);bo(t,v)}},remove(e,t,r,{um:n,o:{remove:s}},i){const{shapeFlag:o,children:a,anchor:l,targetStart:u,targetAnchor:c,target:d,props:p}=e;if(d&&(s(u),s(c)),i&&s(l),o&16){const h=i||!hi(p);for(let m=0;m<a.length;m++){const w=a[m];n(w,t,r,h,!!w.dynamicChildren)}}},move:yo,hydrate:jv};function yo(e,t,r,{o:{insert:n},m:s},i=2){i===0&&n(e.targetAnchor,t,r);const{el:o,anchor:a,shapeFlag:l,children:u,props:c}=e,d=i===2;if(d&&n(o,t,r),(!d||hi(c))&&l&16)for(let p=0;p<u.length;p++)s(u[p],t,r,2);d&&n(a,t,r)}function jv(e,t,r,n,s,i,{o:{nextSibling:o,parentNode:a,querySelector:l,insert:u,createText:c}},d){function p(x,v){let S=v;for(;S;){if(S&&S.nodeType===8){if(S.data==="teleport start anchor")t.targetStart=S;else if(S.data==="teleport anchor"){t.targetAnchor=S,x._lpa=t.targetAnchor&&o(t.targetAnchor);break}}S=o(S)}}function h(x,v){v.anchor=d(o(x),v,a(x),r,n,s,i)}const m=t.target=Qa(t.props,l),w=hi(t.props);if(m){const x=m._lpa||m.firstChild;t.shapeFlag&16&&(w?(h(e,t),p(m,x),t.targetAnchor||tl(m,t,c,u,a(e)===m?e:null)):(t.anchor=o(e),p(m,x),t.targetAnchor||tl(m,t,c,u),d(x&&o(x),t,m,r,n,s,i))),bo(t,w)}else w&&t.shapeFlag&16&&(h(e,t),t.targetStart=e,t.targetAnchor=o(e));return t.anchor&&o(t.anchor)}var el=id;function bo(e,t){const r=e.ctx;if(r&&r.ut){let n,s;for(t?(n=e.el,s=e.anchor):(n=e.targetStart,s=e.targetAnchor);n&&n!==s;)n.nodeType===1&&n.setAttribute("data-v-owner",r.uid),n=n.nextSibling;r.ut()}}function tl(e,t,r,n,s=null){const i=t.targetStart=r(""),o=t.targetAnchor=r("");return i[ed]=o,e&&(n(i,e,s),n(o,e,s)),o}var qr=Symbol("_leaveCb"),gi=Symbol("_enterCb");function rl(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return tt(()=>{e.isMounted=!0}),Ds(()=>{e.isUnmounting=!0}),e}var hr=[Function,Array],nl={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:hr,onEnter:hr,onAfterEnter:hr,onEnterCancelled:hr,onBeforeLeave:hr,onLeave:hr,onAfterLeave:hr,onLeaveCancelled:hr,onBeforeAppear:hr,onAppear:hr,onAfterAppear:hr,onAppearCancelled:hr},od=e=>{const t=e.subTree;return t.component?od(t.component):t},Uv={name:"BaseTransition",props:nl,setup(e,{slots:t}){const r=gt(),n=rl();return()=>{const s=t.default&&_o(t.default(),!0);if(!s||!s.length)return;const i=ad(s),o=ze(e),{mode:a}=o;if(n.isLeaving)return sl(i);const l=ud(i);if(!l)return sl(i);let u=Is(l,o,n,r,d=>u=d);l.type!==ht&&nn(l,u);let c=r.subTree&&ud(r.subTree);if(c&&c.type!==ht&&!kr(c,l)&&od(r).type!==ht){let d=Is(c,o,n,r);if(nn(c,d),a==="out-in"&&l.type!==ht)return n.isLeaving=!0,d.afterLeave=()=>{n.isLeaving=!1,r.job.flags&8||r.update(),delete d.afterLeave,c=void 0},sl(i);a==="in-out"&&l.type!==ht?d.delayLeave=(p,h,m)=>{const w=cd(n,c);w[String(c.key)]=c,p[qr]=()=>{h(),p[qr]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{m(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return i}}};function ad(e){let t=e[0];if(e.length>1){for(const r of e)if(r.type!==ht){t=r;break}}return t}var ld=Uv;function cd(e,t){const{leavingVNodes:r}=e;let n=r.get(t.type);return n||(n=Object.create(null),r.set(t.type,n)),n}function Is(e,t,r,n,s){const{appear:i,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:p,onLeave:h,onAfterLeave:m,onLeaveCancelled:w,onBeforeAppear:x,onAppear:v,onAfterAppear:S,onAppearCancelled:b}=t,y=String(e.key),T=cd(r,e),I=(B,q)=>{B&&pr(B,n,9,q)},N=(B,q)=>{const C=q[1];I(B,q),Se(B)?B.every(_=>_.length<=1)&&C():B.length<=1&&C()},g={mode:o,persisted:a,beforeEnter(B){let q=l;if(!r.isMounted)if(i)q=x||l;else return;B[qr]&&B[qr](!0);const C=T[y];C&&kr(e,C)&&C.el[qr]&&C.el[qr](),I(q,[B])},enter(B){if(T[y]===e)return;let q=u,C=c,_=d;if(!r.isMounted)if(i)q=v||u,C=S||c,_=b||d;else return;let E=!1;B[gi]=R=>{E||(E=!0,R?I(_,[B]):I(C,[B]),g.delayedLeave&&g.delayedLeave(),B[gi]=void 0)};const P=B[gi].bind(null,!1);q?N(q,[B,P]):P()},leave(B,q){const C=String(e.key);if(B[gi]&&B[gi](!0),r.isUnmounting)return q();I(p,[B]);let _=!1;B[qr]=P=>{_||(_=!0,q(),P?I(w,[B]):I(m,[B]),B[qr]=void 0,T[C]===e&&delete T[C])};const E=B[qr].bind(null,!1);T[C]=e,h?N(h,[B,E]):E()},clone(B){const q=Is(B,t,r,n,s);return s&&s(q),q}};return g}function sl(e){if(vi(e))return e=Ir(e),e.children=null,e}function ud(e){if(!vi(e))return td(e.type)&&e.children?ad(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:r}=e;if(r){if(t&16)return r[0];if(t&32&&Oe(r.default))return r.default()}}function nn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,nn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function _o(e,t=!1,r){let n=[],s=0;for(let i=0;i<e.length;i++){let o=e[i];const a=r==null?o.key:String(r)+String(o.key!=null?o.key:i);o.type===Ke?(o.patchFlag&128&&s++,n=n.concat(_o(o.children,t,a))):(t||o.type!==ht)&&n.push(a!=null?Ir(o,{key:a}):o)}if(s>1)for(let i=0;i<n.length;i++)n[i].patchFlag=-2;return n}function X(e,t){return Oe(e)?Qe({name:e.name},t,{setup:e}):e}function dd(){const e=gt();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function il(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function zv(e){const t=gt(),r=ft(null);if(t){const n=t.refs===Ue?t.refs={}:t.refs;Object.defineProperty(n,e,{enumerable:!0,get:()=>r.value,set:s=>r.value=s})}return r}function fd(e,t){let r;return!!((r=Object.getOwnPropertyDescriptor(e,t))&&!r.configurable)}var So=new WeakMap;function Rs(e,t,r,n,s=!1){if(Se(e)){e.forEach((w,x)=>Rs(w,t&&(Se(t)?t[x]:t),r,n,s));return}if(sn(n)&&!s){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Rs(e,t,r,n.component.subTree);return}const i=n.shapeFlag&4?Ei(n.component):n.el,o=s?null:i,{i:a,r:l}=e,u=t&&t.r,c=a.refs===Ue?a.refs={}:a.refs,d=a.setupState,p=ze(d),h=d===Ue?pu:w=>fd(c,w)?!1:Ze(p,w),m=(w,x)=>!(x&&fd(c,x));if(u!=null&&u!==l){if(pd(t),it(u))c[u]=null,h(u)&&(d[u]=null);else if(rt(u)){const w=t;m(u,w.k)&&(u.value=null),w.k&&(c[w.k]=null)}}if(Oe(l))Ts(l,a,12,[o,c]);else{const w=it(l),x=rt(l);if(w||x){const v=()=>{if(e.f){const S=w?h(l)?d[l]:c[l]:m(l)||!e.k?l.value:c[e.k];if(s)Se(S)&&Da(S,i);else if(Se(S))S.includes(i)||S.push(i);else if(w)c[l]=[i],h(l)&&(d[l]=c[l]);else{const b=[i];m(l,e.k)&&(l.value=b),e.k&&(c[e.k]=b)}}else w?(c[l]=o,h(l)&&(d[l]=o)):x&&(m(l,e.k)&&(l.value=o),e.k&&(c[e.k]=o))};if(o){const S=()=>{v(),So.delete(e)};S.id=-1,So.set(e,S),yt(S,r)}else pd(e),v()}}}function pd(e){const t=So.get(e);t&&(t.flags|=8,So.delete(e))}var hd=!1,$s=()=>{hd||(console.error("Hydration completed but contains mismatches."),hd=!0)},Kv=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",Wv=e=>e.namespaceURI.includes("MathML"),Co=e=>{if(e.nodeType===1){if(Kv(e))return"svg";if(Wv(e))return"mathml"}},Ps=e=>e.nodeType===8;function Gv(e){const{mt:t,p:r,o:{patchProp:n,createText:s,nextSibling:i,parentNode:o,remove:a,insert:l,createComment:u}}=e,c=(b,y)=>{if(!y.hasChildNodes()){r(null,b,y),go(),y._vnode=b;return}d(y.firstChild,b,null,null,null),go(),y._vnode=b},d=(b,y,T,I,N,g=!1)=>{g=g||!!y.dynamicChildren;const B=Ps(b)&&b.data==="[",q=()=>w(b,y,T,I,N,B),{type:C,ref:_,shapeFlag:E,patchFlag:P}=y;let R=b.nodeType;y.el=b,P===-2&&(g=!1,y.dynamicChildren=null);let D=null;switch(C){case Tn:R!==3?y.children===""?(l(y.el=s(""),o(b),b),D=b):D=q():(b.data!==y.children&&($s(),b.data=y.children),D=i(b));break;case ht:S(b)?(D=i(b),v(y.el=b.content.firstChild,b,T)):R!==8||B?D=q():D=i(b);break;case ts:if(B&&(b=i(b),R=b.nodeType),R===1||R===3){D=b;const G=!y.children.length;for(let W=0;W<y.staticCount;W++)G&&(y.children+=D.nodeType===1?D.outerHTML:D.data),W===y.staticCount-1&&(y.anchor=D),D=i(D);return B?i(D):D}else q();break;case Ke:B?D=m(b,y,T,I,N,g):D=q();break;default:if(E&1)(R!==1||y.type.toLowerCase()!==b.tagName.toLowerCase())&&!S(b)?D=q():D=p(b,y,T,I,N,g);else if(E&6){y.slotScopeIds=N;const G=o(b);if(B?D=x(b):Ps(b)&&b.data==="teleport start"?D=x(b,b.data,"teleport end"):D=i(b),t(y,G,null,T,I,Co(G),g),sn(y)&&!y.type.__asyncResolved){let W;B?(W=O(Ke),W.anchor=D?D.previousSibling:G.lastChild):W=b.nodeType===3?qe(""):O("div"),W.el=b,y.component.subTree=W}}else E&64?R!==8?D=q():D=y.type.hydrate(b,y,T,I,N,g,e,h):E&128&&(D=y.type.hydrate(b,y,T,I,Co(o(b)),N,g,e,d))}return _!=null&&Rs(_,null,I,y),D},p=(b,y,T,I,N,g)=>{g=g||!!y.dynamicChildren;const{type:B,props:q,patchFlag:C,shapeFlag:_,dirs:E,transition:P}=y,R=B==="input"||B==="option";if(R||C!==-1){E&&Nr(y,null,T,"created");let D=!1;if(S(b)){D=Yd(null,P)&&T&&T.vnode.props&&T.vnode.props.appear;const W=b.content.firstChild;if(D){const ae=W.getAttribute("class");ae&&(W.$cls=ae),P.beforeEnter(W)}v(W,b,T),y.el=b=W}if(_&16&&!(q&&(q.innerHTML||q.textContent))){let W=h(b.firstChild,y,b,T,I,N,g);for(;W;){xo(b,1)||$s();const ae=W;W=W.nextSibling,a(ae)}}else if(_&8){let W=y.children;W[0]===`
4
4
  `&&(b.tagName==="PRE"||b.tagName==="TEXTAREA")&&(W=W.slice(1));const{textContent:ae}=b;ae!==W&&ae!==W.replace(/\r\n|\r/g,`
5
- `)&&(Co(b,0)||Rs(),b.textContent=y.children)}if(q){if(R||!v||C&48){const W=b.tagName.includes("-");for(const ae in q)(R&&(ae.endsWith("value")||ae==="indeterminate")||Qs(ae)&&!Jn(ae)||ae[0]==="."||W&&!Jn(ae))&&n(b,ae,null,q[ae],void 0,T)}else if(q.onClick)n(b,"onClick",null,q.onClick,void 0,T);else if(C&4&&tn(q.style))for(const W in q.style)q.style[W]}let G;(G=q&&q.onVnodeBeforeMount)&&Zt(G,T,y),E&&qr(y,null,T,"beforeMount"),((G=q&&q.onVnodeMounted)||E||D)&&tf(()=>{G&&Zt(G,T,y),D&&P.enter(b),E&&qr(y,null,T,"mounted")},k)}return b.nextSibling},h=(b,y,T,k,N,v,B)=>{B=B||!!y.dynamicChildren;const q=y.children,C=q.length;for(let _=0;_<C;_++){const E=B?q[_]:q[_]=Yt(q[_]),P=E.type===Tn;b?(P&&!B&&_+1<C&&Yt(q[_+1]).type===Tn&&(l(s(b.data.slice(E.children.length)),T,i(b)),b.data=E.children),b=d(b,E,k,N,v,B)):P&&!E.children?l(E.el=s(""),T):(Co(T,1)||Rs(),r(null,E,T,null,k,N,So(T),v))}return b},m=(b,y,T,k,N,v)=>{const{slotScopeIds:B}=y;B&&(N=N?N.concat(B):B);const q=o(b),C=h(i(b),y,q,T,k,N,v);return C&&$s(C)&&C.data==="]"?i(y.anchor=C):(Rs(),l(y.anchor=u("]"),q,C),C)},w=(b,y,T,k,N,v)=>{if(Co(b.parentElement,1)||Rs(),y.el=null,v){const C=x(b);for(;;){const _=i(b);if(_&&_!==C)a(_);else break}}const B=i(b),q=o(b);return a(b),r(null,y,q,B,T,k,So(q),N),T&&(T.vnode.el=y.el,Ro(T,y.el)),B},x=(b,y="[",T="]")=>{let k=0;for(;b;)if(b=i(b),b&&$s(b)&&(b.data===y&&k++,b.data===T)){if(k===0)return i(b);k--}return b},g=(b,y,T)=>{const k=y.parentNode;k&&k.replaceChild(b,y);let N=T;for(;N;)N.vnode.el===y&&(N.vnode.el=N.subTree.el=b),N=N.parent},S=b=>b.nodeType===1&&b.tagName==="TEMPLATE";return[c,d]}var gd="data-allow-mismatch",Gv={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Co(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(gd);)e=e.parentElement;const r=e&&e.getAttribute(gd);if(r==null)return!1;if(r==="")return!0;{const n=r.split(",");return t===0&&n.includes("children")?!0:n.includes(Gv[t])}}var Jv=eo().requestIdleCallback||(e=>setTimeout(e,1)),Yv=eo().cancelIdleCallback||(e=>clearTimeout(e)),Zv=(e=1e4)=>t=>{const r=Jv(t,{timeout:e});return()=>Yv(r)};function Xv(e){const{top:t,left:r,bottom:n,right:s}=e.getBoundingClientRect(),{innerHeight:i,innerWidth:o}=window;return(t>0&&t<i||n>0&&n<i)&&(r>0&&r<o||s>0&&s<o)}var Qv=e=>(t,r)=>{const n=new IntersectionObserver(s=>{for(const i of s)if(i.isIntersecting){n.disconnect(),t();break}},e);return r(s=>{if(s instanceof Element){if(Xv(s))return t(),n.disconnect(),!1;n.observe(s)}}),()=>n.disconnect()},em=e=>t=>{if(e){const r=matchMedia(e);if(r.matches)t();else return r.addEventListener("change",t,{once:!0}),()=>r.removeEventListener("change",t)}},tm=(e=[])=>(t,r)=>{it(e)&&(e=[e]);let n=!1;const s=o=>{n||(n=!0,i(),t(),o.target.dispatchEvent(new o.constructor(o.type,o)))},i=()=>{r(o=>{for(const a of e)o.removeEventListener(a,s)})};return r(o=>{for(const a of e)o.addEventListener(a,s,{once:!0})}),i};function rm(e,t){if($s(e)&&e.data==="["){let r=1,n=e.nextSibling;for(;n;){if(n.nodeType===1){if(t(n)===!1)break}else if($s(n))if(n.data==="]"){if(--r===0)break}else n.data==="["&&r++;n=n.nextSibling}}else t(e)}var sn=e=>!!e.type.__asyncLoader;function nm(e){De(e)&&(e={loader:e});const{loader:t,loadingComponent:r,errorComponent:n,delay:s=200,hydrate:i,timeout:o,suspensible:a=!0,onError:l}=e;let u=null,c,d=0;const p=()=>(d++,u=null,h()),h=()=>{let m;return u||(m=u=t().catch(w=>{if(w=w instanceof Error?w:new Error(String(w)),l)return new Promise((x,g)=>{l(w,()=>x(p()),()=>g(w),d+1)});throw w}).then(w=>m!==u&&u?u:(w&&(w.__esModule||w[Symbol.toStringTag]==="Module")&&(w=w.default),c=w,w)))};return X({name:"AsyncComponentWrapper",__asyncLoader:h,__asyncHydrate(m,w,x){let g=!1;(w.bu||(w.bu=[])).push(()=>g=!0);const S=()=>{g||x()},b=i?()=>{const y=i(S,T=>rm(m,T));y&&(w.bum||(w.bum=[])).push(y)}:S;c?b():h().then(()=>!w.isUnmounted&&b())},get __asyncResolved(){return c},setup(){const m=Rt;if(il(m),c)return()=>xo(c,m);const w=b=>{u=null,Zn(b,m,13,!n)};if(a&&m.suspense||Os)return h().then(b=>()=>xo(b,m)).catch(b=>(w(b),()=>n?O(n,{error:b}):null));const x=F(!1),g=F(),S=F(!!s);return s&&setTimeout(()=>{S.value=!1},s),o!=null&&setTimeout(()=>{if(!x.value&&!g.value){const b=new Error(`Async component timed out after ${o}ms.`);w(b),g.value=b}},o),h().then(()=>{x.value=!0,m.parent&&gi(m.parent.vnode)&&m.parent.update()}).catch(b=>{w(b),g.value=b}),()=>{if(x.value&&c)return xo(c,m);if(g.value&&n)return O(n,{error:g.value});if(r&&!S.value)return xo(r,m)}}})}function xo(e,t){const{ref:r,props:n,children:s,ce:i}=t.vnode,o=O(e,n,s);return o.ref=r,o.ce=i,delete t.vnode.ce,o}var gi=e=>e.type.__isKeepAlive,sm={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const r=gt(),n=r.ctx;if(!n.renderer)return()=>{const S=t.default&&t.default();return S&&S.length===1?S[0]:S};const s=new Map,i=new Set;let o=null;const a=r.suspense,{renderer:{p:l,m:u,um:c,o:{createElement:d}}}=n,p=d("div");n.activate=(S,b,y,T,k)=>{const N=S.component;u(S,b,y,0,a),l(N.vnode,S,b,y,N,a,T,S.slotScopeIds,k),wt(()=>{N.isDeactivated=!1,N.a&&_s(N.a);const v=S.props&&S.props.onVnodeMounted;v&&Zt(v,N.parent,S)},a)},n.deactivate=S=>{const b=S.component;$o(b.m),$o(b.a),u(S,p,null,1,a),wt(()=>{b.da&&_s(b.da);const y=S.props&&S.props.onVnodeUnmounted;y&&Zt(y,b.parent,S),b.isDeactivated=!0},a)};function h(S){ol(S),c(S,r,a,!0)}function m(S){s.forEach((b,y)=>{const T=kl(sn(b)?b.type.__asyncResolved||{}:b.type);T&&!S(T)&&w(y)})}function w(S){const b=s.get(S);b&&(!o||!Ir(b,o))?h(b):o&&ol(o),s.delete(S),i.delete(S)}Me(()=>[e.include,e.exclude],([S,b])=>{S&&m(y=>vi(S,y)),b&&m(y=>!vi(b,y))},{flush:"post",deep:!0});let x=null;const g=()=>{x!=null&&(Po(r.subTree.type)?wt(()=>{s.set(x,To(r.subTree))},r.subTree.suspense):s.set(x,To(r.subTree)))};return tt(g),mi(g),Ps(()=>{s.forEach(S=>{const{subTree:b,suspense:y}=r,T=To(b);if(S.type===T.type&&S.key===T.key){ol(T);const k=T.component.da;k&&wt(k,y);return}h(S)})}),()=>{if(x=null,!t.default)return o=null;const S=t.default(),b=S[0];if(S.length>1)return o=null,S;if(!an(b)||!(b.shapeFlag&4)&&!(b.shapeFlag&128))return o=null,b;let y=To(b);if(y.type===ht)return o=null,y;const T=y.type,k=kl(sn(y)?y.type.__asyncResolved||{}:T),{include:N,exclude:v,max:B}=e;if(N&&(!k||!vi(N,k))||v&&k&&vi(v,k))return y.shapeFlag&=-257,o=y,b;const q=y.key==null?T:y.key,C=s.get(q);return y.el&&(y=Rr(y),b.shapeFlag&128&&(b.ssContent=y)),x=q,C?(y.el=C.el,y.component=C.component,y.transition&&nn(y,y.transition),y.shapeFlag|=512,i.delete(q),i.add(q)):(i.add(q),B&&i.size>parseInt(B,10)&&w(i.values().next().value)),y.shapeFlag|=256,o=y,Po(b.type)?b:y}}};function vi(e,t){return _e(e)?e.some(r=>vi(r,t)):it(e)?e.split(",").includes(t):Lg(e)?(e.lastIndex=0,e.test(t)):!1}function vd(e,t){wd(e,"a",t)}function md(e,t){wd(e,"da",t)}function wd(e,t,r=Rt){const n=e.__wdc||(e.__wdc=()=>{let s=r;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(Eo(t,n,r),r){let s=r.parent;for(;s&&s.parent;)gi(s.parent.vnode)&&im(n,t,r,s),s=s.parent}}function im(e,t,r,n){const s=Eo(t,e,n,!0);Vt(()=>{Da(n[t],s)},r)}function ol(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function To(e){return e.shapeFlag&128?e.ssContent:e}function Eo(e,t,r=Rt,n=!1){if(r){const s=r[e]||(r[e]=[]),i=t.__weh||(t.__weh=(...o)=>{Jr();const a=ns(r),l=hr(t,r,e,o);return a(),Yr(),l});return n?s.unshift(i):s.push(i),i}}var on=e=>(t,r=Rt)=>{(!Os||e==="sp")&&Eo(e,(...n)=>t(...n),r)},yd=on("bm"),tt=on("m"),al=on("bu"),mi=on("u"),Ps=on("bum"),Vt=on("um"),bd=on("sp"),_d=on("rtg"),Sd=on("rtc");function Cd(e,t=Rt){Eo("ec",e,t)}var ll="components",om="directives";function am(e,t){return cl(ll,e,!0,t)||e}var xd=Symbol.for("v-ndc");function wi(e){return it(e)?cl(ll,e,!1)||e:e||xd}function lm(e){return cl(om,e)}function cl(e,t,r=!0,n=!1){const s=It||Rt;if(s){const i=s.type;if(e===ll){const a=kl(i,!1);if(a&&(a===t||a===_t(t)||a===ei(_t(t))))return i}const o=Td(s[e]||i[e],t)||Td(s.appContext[e],t);return!o&&n?i:o}}function Td(e,t){return e&&(e[t]||e[_t(t)]||e[ei(_t(t))])}function vr(e,t,r,n){let s;const i=r&&r[n],o=_e(e);if(o||it(e)){const a=o&&tn(e);let l=!1,u=!1;a&&(l=!Jt(e),u=Mr(e),e=io(e)),s=new Array(e.length);for(let c=0,d=e.length;c<d;c++)s[c]=t(l?u?Cs(kr(e[c])):kr(e[c]):e[c],c,void 0,i&&i[c])}else if(typeof e=="number"){s=new Array(e);for(let a=0;a<e;a++)s[a]=t(a+1,a,void 0,i&&i[a])}else if(Ge(e))if(e[Symbol.iterator])s=Array.from(e,(a,l)=>t(a,l,void 0,i&&i[l]));else{const a=Object.keys(e);s=new Array(a.length);for(let l=0,u=a.length;l<u;l++){const c=a[l];s[l]=t(e[c],c,l,i&&i[l])}}else s=[];return r&&(r[n]=s),s}function cm(e,t){for(let r=0;r<t.length;r++){const n=t[r];if(_e(n))for(let s=0;s<n.length;s++)e[n[s].name]=n[s].fn;else n&&(e[n.name]=n.key?(...s)=>{const i=n.fn(...s);return i&&(i.key=n.key),i}:n.fn)}return e}function ne(e,t,r={},n,s){if(It.ce||It.parent&&sn(It.parent)&&It.parent.ce){const u=Object.keys(r).length>0;return t!=="default"&&(r.name=t),$(),U(Ke,null,[O("slot",r,n&&n())],u?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),$();const o=i&&ul(i(r)),a=r.key||o&&o.key,l=U(Ke,{key:(a&&!Er(a)?a:`_${t}`)+(!o&&n?"_fb":"")},o||(n?n():[]),o&&e._===1?64:-2);return!s&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),i&&i._c&&(i._d=!0),l}function ul(e){return e.some(t=>an(t)?!(t.type===ht||t.type===Ke&&!ul(t.children)):!0)?e:null}function Ed(e,t){const r={};for(const n in e)r[t&&/[A-Z]/.test(n)?`on:${n}`:bs(n)]=e[n];return r}var dl=e=>e?af(e)?Ti(e):dl(e.parent):null,yi=Qe(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>dl(e.parent),$root:e=>dl(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>gl(e),$forceUpdate:e=>e.f||(e.f=()=>{Za(e.update)}),$nextTick:e=>e.n||(e.n=Et.bind(e.proxy)),$watch:e=>Fv.bind(e)}),fl=(e,t)=>e!==Ue&&!e.__isScriptSetup&&Ye(e,t),pl={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:r,setupState:n,data:s,props:i,accessCache:o,type:a,appContext:l}=e;if(t[0]!=="$"){const p=o[t];if(p!==void 0)switch(p){case 1:return n[t];case 2:return s[t];case 4:return r[t];case 3:return i[t]}else{if(fl(n,t))return o[t]=1,n[t];if(s!==Ue&&Ye(s,t))return o[t]=2,s[t];if(Ye(i,t))return o[t]=3,i[t];if(r!==Ue&&Ye(r,t))return o[t]=4,r[t];hl&&(o[t]=0)}}const u=yi[t];let c,d;if(u)return t==="$attrs"&&Ot(e.attrs,"get",""),u(e);if((c=a.__cssModules)&&(c=c[t]))return c;if(r!==Ue&&Ye(r,t))return o[t]=4,r[t];if(d=l.config.globalProperties,Ye(d,t))return d[t]},set({_:e},t,r){const{data:n,setupState:s,ctx:i}=e;return fl(s,t)?(s[t]=r,!0):n!==Ue&&Ye(n,t)?(n[t]=r,!0):Ye(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=r,!0)},has({_:{data:e,setupState:t,accessCache:r,ctx:n,appContext:s,props:i,type:o}},a){let l;return!!(r[a]||e!==Ue&&a[0]!=="$"&&Ye(e,a)||fl(t,a)||Ye(i,a)||Ye(n,a)||Ye(yi,a)||Ye(s.config.globalProperties,a)||(l=o.__cssModules)&&l[a])},defineProperty(e,t,r){return r.get!=null?e._.accessCache[t]=0:Ye(r,"value")&&this.set(e,t,r.value,null),Reflect.defineProperty(e,t,r)}},um=Qe({},pl,{get(e,t){if(t!==Symbol.unscopables)return pl.get(e,t,e)},has(e,t){return t[0]!=="_"&&!Ug(t)}});function dm(){return null}function fm(){return null}function pm(e){}function hm(e){}function gm(){return null}function vm(){}function mm(e,t){return null}function wm(){return Ad("useSlots").slots}function ym(){return Ad("useAttrs").attrs}function Ad(e){const t=gt();return t.setupContext||(t.setupContext=uf(t))}function bi(e){return _e(e)?e.reduce((t,r)=>(t[r]=null,t),{}):e}function kd(e,t){const r=bi(e);for(const n in t){if(n.startsWith("__skip"))continue;let s=r[n];s?_e(s)||De(s)?s=r[n]={type:s,default:t[n]}:s.default=t[n]:s===null&&(s=r[n]={default:t[n]}),s&&t[`__skip_${n}`]&&(s.skipFactory=!0)}return r}function bm(e,t){return!e||!t?e||t:_e(e)&&_e(t)?e.concat(t):Qe({},bi(e),bi(t))}function _m(e,t){const r={};for(const n in e)t.includes(n)||Object.defineProperty(r,n,{enumerable:!0,get:()=>e[n]});return r}function Sm(e){const t=gt();let r=e();Ho();const n=()=>{gt()!==t&&t.scope.off(),Ho()};return Oa(r)&&(r=r.catch(s=>{throw ns(t),Promise.resolve().then(()=>Promise.resolve().then(n)),s})),[r,()=>{ns(t),Promise.resolve().then(n)}]}var hl=!0;function Cm(e){const t=gl(e),r=e.proxy,n=e.ctx;hl=!1,t.beforeCreate&&Id(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:o,watch:a,provide:l,inject:u,created:c,beforeMount:d,mounted:p,beforeUpdate:h,updated:m,activated:w,deactivated:x,beforeDestroy:g,beforeUnmount:S,destroyed:b,unmounted:y,render:T,renderTracked:k,renderTriggered:N,errorCaptured:v,serverPrefetch:B,expose:q,inheritAttrs:C,components:_,directives:E,filters:P}=t;if(u&&xm(u,n,null),o)for(const G in o){const W=o[G];De(W)&&(n[G]=W.bind(r))}if(s){const G=s.call(r,r);Ge(G)&&(e.data=Qr(G))}if(hl=!0,i)for(const G in i){const W=i[G],ae=V({get:De(W)?W.bind(r,r):De(W.get)?W.get.bind(r,r):fr,set:!De(W)&&De(W.set)?W.set.bind(r):fr});Object.defineProperty(n,G,{enumerable:!0,configurable:!0,get:()=>ae.value,set:Y=>ae.value=Y})}if(a)for(const G in a)Rd(a[G],n,r,G);if(l){const G=De(l)?l.call(r):l;Reflect.ownKeys(G).forEach(W=>{Xn(W,G[W])})}c&&Id(c,e,"c");function D(G,W){_e(W)?W.forEach(ae=>G(ae.bind(r))):W&&G(W.bind(r))}if(D(yd,d),D(tt,p),D(al,h),D(mi,m),D(vd,w),D(md,x),D(Cd,v),D(Sd,k),D(_d,N),D(Ps,S),D(Vt,y),D(bd,B),_e(q))if(q.length){const G=e.exposed||(e.exposed={});q.forEach(W=>{Object.defineProperty(G,W,{get:()=>r[W],set:ae=>r[W]=ae,enumerable:!0})})}else e.exposed||(e.exposed={});T&&e.render===fr&&(e.render=T),C!=null&&(e.inheritAttrs=C),_&&(e.components=_),E&&(e.directives=E),B&&il(e)}function xm(e,t,r=fr){_e(e)&&(e=vl(e));for(const n in e){const s=e[n];let i;Ge(s)?"default"in s?i=Ft(s.from||n,s.default,!0):i=Ft(s.from||n):i=Ft(s),rt(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[n]=i}}function Id(e,t,r){hr(_e(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,r)}function Rd(e,t,r,n){let s=n.includes(".")?Qu(r,n):()=>r[n];if(it(e)){const i=t[e];De(i)&&Me(s,i)}else if(De(e))Me(s,e.bind(r));else if(Ge(e))if(_e(e))e.forEach(i=>Rd(i,t,r,n));else{const i=De(e.handler)?e.handler.bind(r):t[e.handler];De(i)&&Me(s,i,e)}}function gl(e){const t=e.type,{mixins:r,extends:n}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,a=i.get(t);let l;return a?l=a:!s.length&&!r&&!n?l=t:(l={},s.length&&s.forEach(u=>Ao(l,u,o,!0)),Ao(l,t,o)),Ge(t)&&i.set(t,l),l}function Ao(e,t,r,n=!1){const{mixins:s,extends:i}=t;i&&Ao(e,i,r,!0),s&&s.forEach(o=>Ao(e,o,r,!0));for(const o in t)if(!(n&&o==="expose")){const a=Tm[o]||r&&r[o];e[o]=a?a(e[o],t[o]):t[o]}return e}var Tm={data:$d,props:Pd,emits:Pd,methods:_i,computed:_i,beforeCreate:jt,created:jt,beforeMount:jt,mounted:jt,beforeUpdate:jt,updated:jt,beforeDestroy:jt,beforeUnmount:jt,destroyed:jt,unmounted:jt,activated:jt,deactivated:jt,errorCaptured:jt,serverPrefetch:jt,components:_i,directives:_i,watch:Am,provide:$d,inject:Em};function $d(e,t){return t?e?function(){return Qe(De(e)?e.call(this,this):e,De(t)?t.call(this,this):t)}:t:e}function Em(e,t){return _i(vl(e),vl(t))}function vl(e){if(_e(e)){const t={};for(let r=0;r<e.length;r++)t[e[r]]=e[r];return t}return e}function jt(e,t){return e?[...new Set([].concat(e,t))]:t}function _i(e,t){return e?Qe(Object.create(null),e,t):t}function Pd(e,t){return e?_e(e)&&_e(t)?[...new Set([...e,...t])]:Qe(Object.create(null),bi(e),bi(t??{})):t}function Am(e,t){if(!e)return t;if(!t)return e;const r=Qe(Object.create(null),e);for(const n in t)r[n]=jt(e[n],t[n]);return r}function Dd(){return{app:null,config:{isNativeTag:pu,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}var km=0;function Im(e,t){return function(n,s=null){De(n)||(n=Qe({},n)),s!=null&&!Ge(s)&&(s=null);const i=Dd(),o=new WeakSet,a=[];let l=!1;const u=i.app={_uid:km++,_component:n,_props:s,_container:null,_context:i,_instance:null,version:ff,get config(){return i.config},set config(c){},use(c,...d){return o.has(c)||(c&&De(c.install)?(o.add(c),c.install(u,...d)):De(c)&&(o.add(c),c(u,...d))),u},mixin(c){return i.mixins.includes(c)||i.mixins.push(c),u},component(c,d){return d?(i.components[c]=d,u):i.components[c]},directive(c,d){return d?(i.directives[c]=d,u):i.directives[c]},mount(c,d,p){if(!l){const h=u._ceVNode||O(n,s);return h.appContext=i,p===!0?p="svg":p===!1&&(p=void 0),d&&t?t(h,c):e(h,c,p),l=!0,u._container=c,c.__vue_app__=u,Ti(h.component)}},onUnmount(c){a.push(c)},unmount(){l&&(hr(a,u._instance,16),e(null,u._container),delete u._container.__vue_app__)},provide(c,d){return i.provides[c]=d,u},runWithContext(c){const d=Qn;Qn=u;try{return c()}finally{Qn=d}}};return u}}var Qn=null;function Rm(e,t,r=Ue){const n=gt(),s=_t(t),i=Gt(t),o=Od(e,s),a=li((l,u)=>{let c,d=Ue,p;return Xu(()=>{const h=e[s];Bt(c,h)&&(c=h,u())}),{get(){return l(),r.get?r.get(c):c},set(h){const m=r.set?r.set(h):h;if(!Bt(m,c)&&!(d!==Ue&&Bt(h,d)))return;const w=n.vnode.props;w&&(t in w||s in w||i in w)&&(`onUpdate:${t}`in w||`onUpdate:${s}`in w||`onUpdate:${i}`in w)||(c=h,u()),n.emit(`update:${t}`,m),Bt(h,m)&&Bt(h,d)&&!Bt(m,p)&&u(),d=h,p=m}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?o||Ue:a,done:!1}:{done:!0}}}},a}var Od=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${_t(t)}Modifiers`]||e[`${Gt(t)}Modifiers`];function $m(e,t,...r){if(e.isUnmounted)return;const n=e.vnode.props||Ue;let s=r;const i=t.startsWith("update:"),o=i&&Od(n,t.slice(7));o&&(o.trim&&(s=r.map(c=>it(c)?c.trim():c)),o.number&&(s=r.map(Xi)));let a,l=n[a=bs(t)]||n[a=bs(_t(t))];!l&&i&&(l=n[a=bs(Gt(t))]),l&&hr(l,e,6,s);const u=n[a+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,hr(u,e,6,s)}}var Pm=new WeakMap;function Hd(e,t,r=!1){const n=r?Pm:t.emitsCache,s=n.get(e);if(s!==void 0)return s;const i=e.emits;let o={},a=!1;if(!De(e)){const l=u=>{const c=Hd(u,t,!0);c&&(a=!0,Qe(o,c))};!r&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!i&&!a?(Ge(e)&&n.set(e,null),null):(_e(i)?i.forEach(l=>o[l]=null):Qe(o,i),Ge(e)&&n.set(e,o),o)}function ko(e,t){return!e||!Qs(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ye(e,t[0].toLowerCase()+t.slice(1))||Ye(e,Gt(t))||Ye(e,t))}function Io(e){const{type:t,vnode:r,proxy:n,withProxy:s,propsOptions:[i],slots:o,attrs:a,emit:l,render:u,renderCache:c,props:d,data:p,setupState:h,ctx:m,inheritAttrs:w}=e,x=di(e);let g,S;try{if(r.shapeFlag&4){const y=s||n,T=y;g=Yt(u.call(T,y,c,d,h,p,m)),S=a}else{const y=t;g=Yt(y.length>1?y(d,{attrs:a,slots:o,emit:l}):y(d,null)),S=t.props?a:Om(a)}}catch(y){Ci.length=0,Zn(y,e,1),g=O(ht)}let b=g;if(S&&w!==!1){const y=Object.keys(S),{shapeFlag:T}=b;y.length&&T&7&&(i&&y.some(Pa)&&(S=Hm(S,i)),b=Rr(b,S,!1,!0))}return r.dirs&&(b=Rr(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(r.dirs):r.dirs),r.transition&&nn(b,r.transition),g=b,di(x),g}function Dm(e,t=!0){let r;for(let n=0;n<e.length;n++){const s=e[n];if(an(s)){if(s.type!==ht||s.children==="v-if"){if(r)return;r=s}}else return}return r}var Om=e=>{let t;for(const r in e)(r==="class"||r==="style"||Qs(r))&&((t||(t={}))[r]=e[r]);return t},Hm=(e,t)=>{const r={};for(const n in e)(!Pa(n)||!(n.slice(9)in t))&&(r[n]=e[n]);return r};function Mm(e,t,r){const{props:n,children:s,component:i}=e,{props:o,children:a,patchFlag:l}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(r&&l>=0){if(l&1024)return!0;if(l&16)return n?Md(n,o,u):!!o;if(l&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const p=c[d];if(Nd(o,n,p)&&!ko(u,p))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:n===o?!1:n?o?Md(n,o,u):!0:!!o;return!1}function Md(e,t,r){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let s=0;s<n.length;s++){const i=n[s];if(Nd(t,e,i)&&!ko(r,i))return!0}return!1}function Nd(e,t,r){const n=e[r],s=t[r];return r==="style"&&Ge(n)&&Ge(s)?!Gr(n,s):n!==s}function Ro({vnode:e,parent:t},r){for(;t;){const n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.el=e.el),n===e)(e=t.vnode).el=r,t=t.parent;else break}}var qd={},Bd=()=>Object.create(qd),Ld=e=>Object.getPrototypeOf(e)===qd;function Nm(e,t,r,n=!1){const s={},i=Bd();e.propsDefaults=Object.create(null),Fd(e,t,s,i);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);r?e.props=n?s:Bu(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function qm(e,t,r,n){const{props:s,attrs:i,vnode:{patchFlag:o}}=e,a=ze(s),[l]=e.propsOptions;let u=!1;if((n||o>0)&&!(o&16)){if(o&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let p=c[d];if(ko(e.emitsOptions,p))continue;const h=t[p];if(l)if(Ye(i,p))h!==i[p]&&(i[p]=h,u=!0);else{const m=_t(p);s[m]=ml(l,a,m,h,e,!1)}else h!==i[p]&&(i[p]=h,u=!0)}}}else{Fd(e,t,s,i)&&(u=!0);let c;for(const d in a)(!t||!Ye(t,d)&&((c=Gt(d))===d||!Ye(t,c)))&&(l?r&&(r[d]!==void 0||r[c]!==void 0)&&(s[d]=ml(l,a,d,void 0,e,!0)):delete s[d]);if(i!==a)for(const d in i)(!t||!Ye(t,d))&&(delete i[d],u=!0)}u&&Zr(e.attrs,"set","")}function Fd(e,t,r,n){const[s,i]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(Jn(l))continue;const u=t[l];let c;s&&Ye(s,c=_t(l))?!i||!i.includes(c)?r[c]=u:(a||(a={}))[c]=u:ko(e.emitsOptions,l)||(!(l in n)||u!==n[l])&&(n[l]=u,o=!0)}if(i){const l=ze(r),u=a||Ue;for(let c=0;c<i.length;c++){const d=i[c];r[d]=ml(s,l,d,u[d],e,!Ye(u,d))}}return o}function ml(e,t,r,n,s,i){const o=e[r];if(o!=null){const a=Ye(o,"default");if(a&&n===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&De(l)){const{propsDefaults:u}=s;if(r in u)n=u[r];else{const c=ns(s);n=u[r]=l.call(null,t),c()}}else n=l;s.ce&&s.ce._setProp(r,n)}o[0]&&(i&&!a?n=!1:o[1]&&(n===""||n===Gt(r))&&(n=!0))}return n}var Bm=new WeakMap;function Vd(e,t,r=!1){const n=r?Bm:t.propsCache,s=n.get(e);if(s)return s;const i=e.props,o={},a=[];let l=!1;if(!De(e)){const c=d=>{l=!0;const[p,h]=Vd(d,t,!0);Qe(o,p),h&&a.push(...h)};!r&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!i&&!l)return Ge(e)&&n.set(e,ms),ms;if(_e(i))for(let c=0;c<i.length;c++){const d=_t(i[c]);jd(d)&&(o[d]=Ue)}else if(i)for(const c in i){const d=_t(c);if(jd(d)){const p=i[c],h=o[d]=_e(p)||De(p)?{type:p}:Qe({},p),m=h.type;let w=!1,x=!0;if(_e(m))for(let g=0;g<m.length;++g){const S=m[g],b=De(S)&&S.name;if(b==="Boolean"){w=!0;break}else b==="String"&&(x=!1)}else w=De(m)&&m.name==="Boolean";h[0]=w,h[1]=x,(w||Ye(h,"default"))&&a.push(d)}}const u=[o,a];return Ge(e)&&n.set(e,u),u}function jd(e){return e[0]!=="$"&&!Jn(e)}var wl=e=>e==="_"||e==="_ctx"||e==="$stable",yl=e=>_e(e)?e.map(Yt):[Yt(e)],Lm=(e,t,r)=>{if(t._n)return t;const n=I((...s)=>yl(t(...s)),r);return n._c=!1,n},Ud=(e,t,r)=>{const n=e._ctx;for(const s in e){if(wl(s))continue;const i=e[s];if(De(i))t[s]=Lm(s,i,n);else if(i!=null){const o=yl(i);t[s]=()=>o}}},zd=(e,t)=>{const r=yl(t);e.slots.default=()=>r},Kd=(e,t,r)=>{for(const n in t)(r||!wl(n))&&(e[n]=t[n])},Fm=(e,t,r)=>{const n=e.slots=Bd();if(e.vnode.shapeFlag&32){const s=t._;s?(Kd(n,t,r),r&&vu(n,"_",s,!0)):Ud(t,n)}else t&&zd(e,t)},Vm=(e,t,r)=>{const{vnode:n,slots:s}=e;let i=!0,o=Ue;if(n.shapeFlag&32){const a=t._;a?r&&a===1?i=!1:Kd(s,t,r):(i=!t.$stable,Ud(t,s)),o=t}else t&&(zd(e,t),o={default:1});if(i)for(const a in s)!wl(a)&&o[a]==null&&delete s[a]};function aT(){}var wt=tf;function Wd(e){return Jd(e)}function Gd(e){return Jd(e,Wv)}function Jd(e,t){const r=eo();r.__VUE__=!0;const{insert:n,remove:s,patchProp:i,createElement:o,createText:a,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:p,setScopeId:h=fr,insertStaticContent:m}=e,w=(A,H,J,se=null,re=null,ee=null,fe=void 0,de=null,ue=!!H.dynamicChildren)=>{if(A===H)return;A&&!Ir(A,H)&&(se=Xe(A),pe(A,re,ee,!0),A=null),H.patchFlag===-2&&(ue=!1,H.dynamicChildren=null);const{type:ie,ref:Re,shapeFlag:ge}=H;switch(ie){case Tn:x(A,H,J,se);break;case ht:g(A,H,J,se);break;case ts:A==null&&S(H,J,se,fe);break;case Ke:_(A,H,J,se,re,ee,fe,de,ue);break;default:ge&1?T(A,H,J,se,re,ee,fe,de,ue):ge&6?E(A,H,J,se,re,ee,fe,de,ue):(ge&64||ge&128)&&ie.process(A,H,J,se,re,ee,fe,de,ue,at)}Re!=null&&re?Is(Re,A&&A.ref,ee,H||A,!H):Re==null&&A&&A.ref!=null&&Is(A.ref,null,ee,A,!0)},x=(A,H,J,se)=>{if(A==null)n(H.el=a(H.children),J,se);else{const re=H.el=A.el;H.children!==A.children&&u(re,H.children)}},g=(A,H,J,se)=>{A==null?n(H.el=l(H.children||""),J,se):H.el=A.el},S=(A,H,J,se)=>{[A.el,A.anchor]=m(A.children,H,J,se,A.el,A.anchor)},b=({el:A,anchor:H},J,se)=>{let re;for(;A&&A!==H;)re=p(A),n(A,J,se),A=re;n(H,J,se)},y=({el:A,anchor:H})=>{let J;for(;A&&A!==H;)J=p(A),s(A),A=J;s(H)},T=(A,H,J,se,re,ee,fe,de,ue)=>{if(H.type==="svg"?fe="svg":H.type==="math"&&(fe="mathml"),A==null)k(H,J,se,re,ee,fe,de,ue);else{const ie=A.el&&A.el._isVueCE?A.el:null;try{ie&&ie._beginPatch(),B(A,H,re,ee,fe,de,ue)}finally{ie&&ie._endPatch()}}},k=(A,H,J,se,re,ee,fe,de)=>{let ue,ie;const{props:Re,shapeFlag:ge,transition:Te,dirs:He}=A;if(ue=A.el=o(A.type,ee,Re&&Re.is,Re),ge&8?c(ue,A.children):ge&16&&v(A.children,ue,null,se,re,bl(A,ee),fe,de),He&&qr(A,null,se,"created"),N(ue,A,A.scopeId,fe,se),Re){for(const Z in Re)Z!=="value"&&!Jn(Z)&&i(ue,Z,null,Re[Z],ee,se);"value"in Re&&i(ue,"value",null,Re.value,ee),(ie=Re.onVnodeBeforeMount)&&Zt(ie,se,A)}He&&qr(A,null,se,"beforeMount");const Ve=Yd(re,Te);Ve&&Te.beforeEnter(ue),n(ue,H,J),((ie=Re&&Re.onVnodeMounted)||Ve||He)&&wt(()=>{ie&&Zt(ie,se,A),Ve&&Te.enter(ue),He&&qr(A,null,se,"mounted")},re)},N=(A,H,J,se,re)=>{if(J&&h(A,J),se)for(let ee=0;ee<se.length;ee++)h(A,se[ee]);if(re){let ee=re.subTree;if(H===ee||Po(ee.type)&&(ee.ssContent===H||ee.ssFallback===H)){const fe=re.vnode;N(A,fe,fe.scopeId,fe.slotScopeIds,re.parent)}}},v=(A,H,J,se,re,ee,fe,de,ue=0)=>{for(let ie=ue;ie<A.length;ie++)w(null,A[ie]=de?ln(A[ie]):Yt(A[ie]),H,J,se,re,ee,fe,de)},B=(A,H,J,se,re,ee,fe)=>{const de=H.el=A.el;let{patchFlag:ue,dynamicChildren:ie,dirs:Re}=H;ue|=A.patchFlag&16;const ge=A.props||Ue,Te=H.props||Ue;let He;if(J&&es(J,!1),(He=Te.onVnodeBeforeUpdate)&&Zt(He,J,H,A),Re&&qr(H,A,J,"beforeUpdate"),J&&es(J,!0),(ge.innerHTML&&Te.innerHTML==null||ge.textContent&&Te.textContent==null)&&c(de,""),ie?q(A.dynamicChildren,ie,de,J,se,bl(H,re),ee):fe||W(A,H,de,null,J,se,bl(H,re),ee,!1),ue>0){if(ue&16)C(de,ge,Te,J,re);else if(ue&2&&ge.class!==Te.class&&i(de,"class",null,Te.class,re),ue&4&&i(de,"style",ge.style,Te.style,re),ue&8){const Ve=H.dynamicProps;for(let Z=0;Z<Ve.length;Z++){const ce=Ve[Z],he=ge[ce],st=Te[ce];(st!==he||ce==="value")&&i(de,ce,he,st,re,J)}}ue&1&&A.children!==H.children&&c(de,H.children)}else!fe&&ie==null&&C(de,ge,Te,J,re);((He=Te.onVnodeUpdated)||Re)&&wt(()=>{He&&Zt(He,J,H,A),Re&&qr(H,A,J,"updated")},se)},q=(A,H,J,se,re,ee,fe)=>{for(let de=0;de<H.length;de++){const ue=A[de],ie=H[de];w(ue,ie,ue.el&&(ue.type===Ke||!Ir(ue,ie)||ue.shapeFlag&198)?d(ue.el):J,null,se,re,ee,fe,!0)}},C=(A,H,J,se,re)=>{if(H!==J){if(H!==Ue)for(const ee in H)!Jn(ee)&&!(ee in J)&&i(A,ee,H[ee],null,re,se);for(const ee in J){if(Jn(ee))continue;const fe=J[ee],de=H[ee];fe!==de&&ee!=="value"&&i(A,ee,de,fe,re,se)}"value"in J&&i(A,"value",H.value,J.value,re)}},_=(A,H,J,se,re,ee,fe,de,ue)=>{const ie=H.el=A?A.el:a(""),Re=H.anchor=A?A.anchor:a("");let{patchFlag:ge,dynamicChildren:Te,slotScopeIds:He}=H;He&&(de=de?de.concat(He):He),A==null?(n(ie,J,se),n(Re,J,se),v(H.children||[],J,Re,re,ee,fe,de,ue)):ge>0&&ge&64&&Te&&A.dynamicChildren&&A.dynamicChildren.length===Te.length?(q(A.dynamicChildren,Te,J,re,ee,fe,de),(H.key!=null||re&&H===re.subTree)&&_l(A,H,!0)):W(A,H,J,Re,re,ee,fe,de,ue)},E=(A,H,J,se,re,ee,fe,de,ue)=>{H.slotScopeIds=de,A==null?H.shapeFlag&512?re.ctx.activate(H,J,se,fe,ue):P(H,J,se,re,ee,fe,ue):R(A,H,ue)},P=(A,H,J,se,re,ee,fe)=>{const de=A.component=of(A,se,re);if(gi(A)&&(de.ctx.renderer=at),lf(de,!1,fe),de.asyncDep){if(re&&re.registerDep(de,D,fe),!A.el){const ue=de.subTree=O(ht);g(null,ue,H,J),A.placeholder=ue.el}}else D(de,A,H,J,re,ee,fe)},R=(A,H,J)=>{const se=H.component=A.component;if(Mm(A,H,J))if(se.asyncDep&&!se.asyncResolved){G(se,H,J);return}else se.next=H,se.update();else H.el=A.el,se.vnode=H},D=(A,H,J,se,re,ee,fe)=>{const de=()=>{if(A.isMounted){let{next:ge,bu:Te,u:He,parent:Ve,vnode:Z}=A;{const Kt=Zd(A);if(Kt){ge&&(ge.el=Z.el,G(A,ge,fe)),Kt.asyncDep.then(()=>{wt(()=>{A.isUnmounted||ie()},re)});return}}let ce=ge,he;es(A,!1),ge?(ge.el=Z.el,G(A,ge,fe)):ge=Z,Te&&_s(Te),(he=ge.props&&ge.props.onVnodeBeforeUpdate)&&Zt(he,Ve,ge,Z),es(A,!0);const st=Io(A),ur=A.subTree;A.subTree=st,w(ur,st,d(ur.el),Xe(ur),A,re,ee),ge.el=st.el,ce===null&&Ro(A,st.el),He&&wt(He,re),(he=ge.props&&ge.props.onVnodeUpdated)&&wt(()=>Zt(he,Ve,ge,Z),re)}else{let ge;const{el:Te,props:He}=H,{bm:Ve,m:Z,parent:ce,root:he,type:st}=A,ur=sn(H);if(es(A,!1),Ve&&_s(Ve),!ur&&(ge=He&&He.onVnodeBeforeMount)&&Zt(ge,ce,H),es(A,!0),Te&&Tt){const Kt=()=>{A.subTree=Io(A),Tt(Te,A.subTree,A,re,null)};ur&&st.__asyncHydrate?st.__asyncHydrate(Te,A,Kt):Kt()}else{he.ce&&he.ce._hasShadowRoot()&&he.ce._injectChildStyle(st);const Kt=A.subTree=Io(A);w(null,Kt,J,se,A,re,ee),H.el=Kt.el}if(Z&&wt(Z,re),!ur&&(ge=He&&He.onVnodeMounted)){const Kt=H;wt(()=>Zt(ge,ce,Kt),re)}(H.shapeFlag&256||ce&&sn(ce.vnode)&&ce.vnode.shapeFlag&256)&&A.a&&wt(A.a,re),A.isMounted=!0,H=J=se=null}};A.scope.on();const ue=A.effect=new ti(de);A.scope.off();const ie=A.update=ue.run.bind(ue),Re=A.job=ue.runIfDirty.bind(ue);Re.i=A,Re.id=A.uid,ue.scheduler=()=>Za(Re),es(A,!0),ie()},G=(A,H,J)=>{H.component=A;const se=A.vnode.props;A.vnode=H,A.next=null,qm(A,H.props,se,J),Vm(A,H.children,J),Jr(),Wu(A),Yr()},W=(A,H,J,se,re,ee,fe,de,ue=!1)=>{const ie=A&&A.children,Re=A?A.shapeFlag:0,ge=H.children,{patchFlag:Te,shapeFlag:He}=H;if(Te>0){if(Te&128){Y(ie,ge,J,se,re,ee,fe,de,ue);return}else if(Te&256){ae(ie,ge,J,se,re,ee,fe,de,ue);return}}He&8?(Re&16&&Oe(ie,re,ee),ge!==ie&&c(J,ge)):Re&16?He&16?Y(ie,ge,J,se,re,ee,fe,de,ue):Oe(ie,re,ee,!0):(Re&8&&c(J,""),He&16&&v(ge,J,se,re,ee,fe,de,ue))},ae=(A,H,J,se,re,ee,fe,de,ue)=>{A=A||ms,H=H||ms;const ie=A.length,Re=H.length,ge=Math.min(ie,Re);let Te;for(Te=0;Te<ge;Te++){const He=H[Te]=ue?ln(H[Te]):Yt(H[Te]);w(A[Te],He,J,null,re,ee,fe,de,ue)}ie>Re?Oe(A,re,ee,!0,!1,ge):v(H,J,se,re,ee,fe,de,ue,ge)},Y=(A,H,J,se,re,ee,fe,de,ue)=>{let ie=0;const Re=H.length;let ge=A.length-1,Te=Re-1;for(;ie<=ge&&ie<=Te;){const He=A[ie],Ve=H[ie]=ue?ln(H[ie]):Yt(H[ie]);if(Ir(He,Ve))w(He,Ve,J,null,re,ee,fe,de,ue);else break;ie++}for(;ie<=ge&&ie<=Te;){const He=A[ge],Ve=H[Te]=ue?ln(H[Te]):Yt(H[Te]);if(Ir(He,Ve))w(He,Ve,J,null,re,ee,fe,de,ue);else break;ge--,Te--}if(ie>ge){if(ie<=Te){const He=Te+1,Ve=He<Re?H[He].el:se;for(;ie<=Te;)w(null,H[ie]=ue?ln(H[ie]):Yt(H[ie]),J,Ve,re,ee,fe,de,ue),ie++}}else if(ie>Te)for(;ie<=ge;)pe(A[ie],re,ee,!0),ie++;else{const He=ie,Ve=ie,Z=new Map;for(ie=Ve;ie<=Te;ie++){const Wt=H[ie]=ue?ln(H[ie]):Yt(H[ie]);Wt.key!=null&&Z.set(Wt.key,ie)}let ce,he=0;const st=Te-Ve+1;let ur=!1,Kt=0;const dr=new Array(st);for(ie=0;ie<st;ie++)dr[ie]=0;for(ie=He;ie<=ge;ie++){const Wt=A[ie];if(he>=st){pe(Wt,re,ee,!0);continue}let Cr;if(Wt.key!=null)Cr=Z.get(Wt.key);else for(ce=Ve;ce<=Te;ce++)if(dr[ce-Ve]===0&&Ir(Wt,H[ce])){Cr=ce;break}Cr===void 0?pe(Wt,re,ee,!0):(dr[Cr-Ve]=ie+1,Cr>=Kt?Kt=Cr:ur=!0,w(Wt,H[Cr],J,null,re,ee,fe,de,ue),he++)}const Aa=ur?jm(dr):ms;for(ce=Aa.length-1,ie=st-1;ie>=0;ie--){const Wt=Ve+ie,Cr=H[Wt],Wi=H[Wt+1],ka=Wt+1<Re?Wi.el||Xd(Wi):se;dr[ie]===0?w(null,Cr,J,ka,re,ee,fe,de,ue):ur&&(ce<0||ie!==Aa[ce]?le(Cr,J,ka,2):ce--)}}},le=(A,H,J,se,re=null)=>{const{el:ee,type:fe,transition:de,children:ue,shapeFlag:ie}=A;if(ie&6){le(A.component.subTree,H,J,se);return}if(ie&128){A.suspense.move(H,J,se);return}if(ie&64){fe.move(A,H,J,at);return}if(fe===Ke){n(ee,H,J);for(let Re=0;Re<ue.length;Re++)le(ue[Re],H,J,se);n(A.anchor,H,J);return}if(fe===ts){b(A,H,J);return}if(se!==2&&ie&1&&de)if(se===0)de.beforeEnter(ee),n(ee,H,J),wt(()=>de.enter(ee),re);else{const{leave:Re,delayLeave:ge,afterLeave:Te}=de,He=()=>{A.ctx.isUnmounted?s(ee):n(ee,H,J)},Ve=()=>{ee._isLeaving&&ee[Br](!0),Re(ee,()=>{He(),Te&&Te()})};ge?ge(ee,He,Ve):Ve()}else n(ee,H,J)},pe=(A,H,J,se=!1,re=!1)=>{const{type:ee,props:fe,ref:de,children:ue,dynamicChildren:ie,shapeFlag:Re,patchFlag:ge,dirs:Te,cacheIndex:He}=A;if(ge===-2&&(re=!1),de!=null&&(Jr(),Is(de,null,J,A,!0),Yr()),He!=null&&(H.renderCache[He]=void 0),Re&256){H.ctx.deactivate(A);return}const Ve=Re&1&&Te,Z=!sn(A);let ce;if(Z&&(ce=fe&&fe.onVnodeBeforeUnmount)&&Zt(ce,H,A),Re&6)Ie(A.component,J,se);else{if(Re&128){A.suspense.unmount(J,se);return}Ve&&qr(A,null,H,"beforeUnmount"),Re&64?A.type.remove(A,H,J,at,se):ie&&!ie.hasOnce&&(ee!==Ke||ge>0&&ge&64)?Oe(ie,H,J,!1,!0):(ee===Ke&&ge&384||!re&&Re&16)&&Oe(ue,H,J),se&&Ae(A)}(Z&&(ce=fe&&fe.onVnodeUnmounted)||Ve)&&wt(()=>{ce&&Zt(ce,H,A),Ve&&qr(A,null,H,"unmounted")},J)},Ae=A=>{const{type:H,el:J,anchor:se,transition:re}=A;if(H===Ke){je(J,se);return}if(H===ts){y(A);return}const ee=()=>{s(J),re&&!re.persisted&&re.afterLeave&&re.afterLeave()};if(A.shapeFlag&1&&re&&!re.persisted){const{leave:fe,delayLeave:de}=re,ue=()=>fe(J,ee);de?de(A.el,ee,ue):ue()}else ee()},je=(A,H)=>{let J;for(;A!==H;)J=p(A),s(A),A=J;s(H)},Ie=(A,H,J)=>{const{bum:se,scope:re,job:ee,subTree:fe,um:de,m:ue,a:ie}=A;$o(ue),$o(ie),se&&_s(se),re.stop(),ee&&(ee.flags|=8,pe(fe,A,H,J)),de&&wt(de,H),wt(()=>{A.isUnmounted=!0},H)},Oe=(A,H,J,se=!1,re=!1,ee=0)=>{for(let fe=ee;fe<A.length;fe++)pe(A[fe],H,J,se,re)},Xe=A=>{if(A.shapeFlag&6)return Xe(A.component.subTree);if(A.shapeFlag&128)return A.suspense.next();const H=p(A.anchor||A.el),J=H&&H[ed];return J?p(J):H};let yt=!1;const Ne=(A,H,J)=>{let se;A==null?H._vnode&&(pe(H._vnode,null,null,!0),se=H._vnode.component):w(H._vnode||null,A,H,null,null,null,J),H._vnode=A,yt||(yt=!0,Wu(se),ho(),yt=!1)},at={p:w,um:pe,m:le,r:Ae,mt:P,mc:v,pc:W,pbc:q,n:Xe,o:e};let bt,Tt;return t&&([bt,Tt]=t(at)),{render:Ne,hydrate:bt,createApp:Im(Ne,bt)}}function bl({type:e,props:t},r){return r==="svg"&&e==="foreignObject"||r==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:r}function es({effect:e,job:t},r){r?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Yd(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function _l(e,t,r=!1){const n=e.children,s=t.children;if(_e(n)&&_e(s))for(let i=0;i<n.length;i++){const o=n[i];let a=s[i];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=s[i]=ln(s[i]),a.el=o.el),!r&&a.patchFlag!==-2&&_l(o,a)),a.type===Tn&&(a.patchFlag===-1&&(a=s[i]=ln(a)),a.el=o.el),a.type===ht&&!a.el&&(a.el=o.el)}}function jm(e){const t=e.slice(),r=[0];let n,s,i,o,a;const l=e.length;for(n=0;n<l;n++){const u=e[n];if(u!==0){if(s=r[r.length-1],e[s]<u){t[n]=s,r.push(n);continue}for(i=0,o=r.length-1;i<o;)a=i+o>>1,e[r[a]]<u?i=a+1:o=a;u<e[r[i]]&&(i>0&&(t[n]=r[i-1]),r[i]=n)}}for(i=r.length,o=r[i-1];i-- >0;)r[i]=o,o=t[o];return r}function Zd(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Zd(t)}function $o(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Xd(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Xd(t.subTree):null}var Po=e=>e.__isSuspense,Sl=0,Um={name:"Suspense",__isSuspense:!0,process(e,t,r,n,s,i,o,a,l,u){if(e==null)zm(t,r,n,s,i,o,a,l,u);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}Km(e,t,r,n,s,o,a,l,u)}},hydrate:Wm,normalize:Gm};function Si(e,t){const r=e.props&&e.props[t];De(r)&&r()}function zm(e,t,r,n,s,i,o,a,l){const{p:u,o:{createElement:c}}=l,d=c("div"),p=e.suspense=Qd(e,s,n,t,d,r,i,o,a,l);u(null,p.pendingBranch=e.ssContent,d,null,n,p,i,o),p.deps>0?(Si(e,"onPending"),Si(e,"onFallback"),u(null,e.ssFallback,t,r,n,null,i,o),Ds(p,e.ssFallback)):p.resolve(!1,!0)}function Km(e,t,r,n,s,i,o,a,{p:l,um:u,o:{createElement:c}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const p=t.ssContent,h=t.ssFallback,{activeBranch:m,pendingBranch:w,isInFallback:x,isHydrating:g}=d;if(w)d.pendingBranch=p,Ir(w,p)?(l(w,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0?d.resolve():x&&(g||(l(m,h,r,n,s,null,i,o,a),Ds(d,h)))):(d.pendingId=Sl++,g?(d.isHydrating=!1,d.activeBranch=w):u(w,s,d),d.deps=0,d.effects.length=0,d.hiddenContainer=c("div"),x?(l(null,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0?d.resolve():(l(m,h,r,n,s,null,i,o,a),Ds(d,h))):m&&Ir(m,p)?(l(m,p,r,n,s,d,i,o,a),d.resolve(!0)):(l(null,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0&&d.resolve()));else if(m&&Ir(m,p))l(m,p,r,n,s,d,i,o,a),Ds(d,p);else if(Si(t,"onPending"),d.pendingBranch=p,p.shapeFlag&512?d.pendingId=p.component.suspenseId:d.pendingId=Sl++,l(null,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0)d.resolve();else{const{timeout:S,pendingId:b}=d;S>0?setTimeout(()=>{d.pendingId===b&&d.fallback(h)},S):S===0&&d.fallback(h)}}function Qd(e,t,r,n,s,i,o,a,l,u,c=!1){const{p:d,m:p,um:h,n:m,o:{parentNode:w,remove:x}}=u;let g;const S=Jm(e);S&&t&&t.pendingBranch&&(g=t.pendingId,t.deps++);const b=e.props?Qi(e.props.timeout):void 0,y=i,T={vnode:e,parent:t,parentComponent:r,namespace:o,container:n,hiddenContainer:s,deps:0,pendingId:Sl++,timeout:typeof b=="number"?b:-1,activeBranch:null,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(k=!1,N=!1){const{vnode:v,activeBranch:B,pendingBranch:q,pendingId:C,effects:_,parentComponent:E,container:P,isInFallback:R}=T;let D=!1;T.isHydrating?T.isHydrating=!1:k||(D=B&&q.transition&&q.transition.mode==="out-in",D&&(B.transition.afterLeave=()=>{C===T.pendingId&&(p(q,P,i===y?m(B):i,0),ci(_),R&&v.ssFallback&&(v.ssFallback.el=null))}),B&&(w(B.el)===P&&(i=m(B)),h(B,E,T,!0),!D&&R&&v.ssFallback&&wt(()=>v.ssFallback.el=null,T)),D||p(q,P,i,0)),Ds(T,q),T.pendingBranch=null,T.isInFallback=!1;let G=T.parent,W=!1;for(;G;){if(G.pendingBranch){G.effects.push(..._),W=!0;break}G=G.parent}!W&&!D&&ci(_),T.effects=[],S&&t&&t.pendingBranch&&g===t.pendingId&&(t.deps--,t.deps===0&&!N&&t.resolve()),Si(v,"onResolve")},fallback(k){if(!T.pendingBranch)return;const{vnode:N,activeBranch:v,parentComponent:B,container:q,namespace:C}=T;Si(N,"onFallback");const _=m(v),E=()=>{T.isInFallback&&(d(null,k,q,_,B,null,C,a,l),Ds(T,k))},P=k.transition&&k.transition.mode==="out-in";P&&(v.transition.afterLeave=E),T.isInFallback=!0,h(v,B,null,!0),P||E()},move(k,N,v){T.activeBranch&&p(T.activeBranch,k,N,v),T.container=k},next(){return T.activeBranch&&m(T.activeBranch)},registerDep(k,N,v){const B=!!T.pendingBranch;B&&T.deps++;const q=k.vnode.el;k.asyncDep.catch(C=>{Zn(C,k,0)}).then(C=>{if(k.isUnmounted||T.isUnmounted||T.pendingId!==k.suspenseId)return;k.asyncResolved=!0;const{vnode:_}=k;El(k,C,!1),q&&(_.el=q);const E=!q&&k.subTree.el;N(k,_,w(q||k.subTree.el),q?null:m(k.subTree),T,o,v),E&&(_.placeholder=null,x(E)),Ro(k,_.el),B&&--T.deps===0&&T.resolve()})},unmount(k,N){T.isUnmounted=!0,T.activeBranch&&h(T.activeBranch,r,k,N),T.pendingBranch&&h(T.pendingBranch,r,k,N)}};return T}function Wm(e,t,r,n,s,i,o,a,l){const u=t.suspense=Qd(t,n,r,e.parentNode,document.createElement("div"),null,s,i,o,a,!0),c=l(e,u.pendingBranch=t.ssContent,r,u,i,o);return u.deps===0&&u.resolve(!1,!0),c}function Gm(e){const{shapeFlag:t,children:r}=e,n=t&32;e.ssContent=ef(n?r.default:r),e.ssFallback=n?ef(r.fallback):O(ht)}function ef(e){let t;if(De(e)){const r=rs&&e._c;r&&(e._d=!1,$()),e=e(),r&&(e._d=!0,t=Nt,rf())}return _e(e)&&(e=Dm(e)),e=Yt(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(r=>r!==e)),e}function tf(e,t){t&&t.pendingBranch?_e(e)?t.effects.push(...e):t.effects.push(e):ci(e)}function Ds(e,t){e.activeBranch=t;const{vnode:r,parentComponent:n}=e;let s=t.el;for(;!s&&t.component;)t=t.component.subTree,s=t.el;r.el=s,n&&n.subTree===r&&(n.vnode.el=s,Ro(n,s))}function Jm(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}var Ke=Symbol.for("v-fgt"),Tn=Symbol.for("v-txt"),ht=Symbol.for("v-cmt"),ts=Symbol.for("v-stc"),Ci=[],Nt=null;function $(e=!1){Ci.push(Nt=e?null:[])}function rf(){Ci.pop(),Nt=Ci[Ci.length-1]||null}var rs=1;function xi(e,t=!1){rs+=e,e<0&&Nt&&t&&(Nt.hasOnce=!0)}function nf(e){return e.dynamicChildren=rs>0?Nt||ms:null,rf(),rs>0&&Nt&&Nt.push(e),e}function Se(e,t,r,n,s,i){return nf(Q(e,t,r,n,s,i,!0))}function U(e,t,r,n,s){return nf(O(e,t,r,n,s,!0))}function an(e){return e?e.__v_isVNode===!0:!1}function Ir(e,t){return e.type===t.type&&e.key===t.key}function Ym(e){}var sf=({key:e})=>e??null,Do=({ref:e,ref_key:t,ref_for:r})=>(typeof e=="number"&&(e=""+e),e!=null?it(e)||rt(e)||De(e)?{i:It,r:e,k:t,f:!!r}:e:null);function Q(e,t=null,r=null,n=0,s=null,i=e===Ke?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&sf(t),ref:t&&Do(t),scopeId:vo,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:n,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:It};return a?(xl(l,r),i&128&&e.normalize(l)):r&&(l.shapeFlag|=it(r)?8:16),rs>0&&!o&&Nt&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&Nt.push(l),l}var O=Zm;function Zm(e,t=null,r=null,n=0,s=null,i=!1){if((!e||e===xd)&&(e=ht),an(e)){const a=Rr(e,t,!0);return r&&xl(a,r),rs>0&&!i&&Nt&&(a.shapeFlag&6?Nt[Nt.indexOf(e)]=a:Nt.push(a)),a.patchFlag=-2,a}if(s0(e)&&(e=e.__vccOpts),t){t=rr(t);let{class:a,style:l}=t;a&&!it(a)&&(t.class=et(a)),Ge(l)&&(ai(l)&&!_e(l)&&(l=Qe({},l)),t.style=St(l))}const o=it(e)?1:Po(e)?128:td(e)?64:Ge(e)?4:De(e)?2:0;return Q(e,t,r,n,s,o,i,!0)}function rr(e){return e?ai(e)||Ld(e)?Qe({},e):e:null}function Rr(e,t,r=!1,n=!1){const{props:s,ref:i,patchFlag:o,children:a,transition:l}=e,u=t?we(s||{},t):s,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&sf(u),ref:t&&t.ref?r&&i?_e(i)?i.concat(Do(t)):[i,Do(t)]:Do(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ke?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Rr(e.ssContent),ssFallback:e.ssFallback&&Rr(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&n&&nn(c,l.clone(c)),c}function qe(e=" ",t=0){return O(Tn,null,e,t)}function Cl(e,t){const r=O(ts,null,e);return r.staticCount=t,r}function Be(e="",t=!1){return t?($(),U(ht,null,e)):O(ht,null,e)}function Yt(e){return e==null||typeof e=="boolean"?O(ht):_e(e)?O(Ke,null,e.slice()):an(e)?ln(e):O(Tn,null,String(e))}function ln(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Rr(e)}function xl(e,t){let r=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(_e(t))r=16;else if(typeof t=="object")if(n&65){const s=t.default;s&&(s._c&&(s._d=!1),xl(e,s()),s._c&&(s._d=!0));return}else{r=32;const s=t._;!s&&!Ld(t)?t._ctx=It:s===3&&It&&(It.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else De(t)?(t={default:t,_ctx:It},r=32):(t=String(t),n&64?(r=16,t=[qe(t)]):r=8);e.children=t,e.shapeFlag|=r}function we(...e){const t={};for(let r=0;r<e.length;r++){const n=e[r];for(const s in n)if(s==="class")t.class!==n.class&&(t.class=et([t.class,n.class]));else if(s==="style")t.style=St([t.style,n.style]);else if(Qs(s)){const i=t[s],o=n[s];o&&i!==o&&!(_e(i)&&i.includes(o))&&(t[s]=i?[].concat(i,o):o)}else s!==""&&(t[s]=n[s])}return t}function Zt(e,t,r,n=null){hr(e,t,7,[r,n])}var Xm=Dd(),Qm=0;function of(e,t,r){const n=e.type,s=(t?t.appContext:e.appContext)||Xm,i={uid:Qm++,vnode:e,type:n,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ma(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Vd(n,s),emitsOptions:Hd(n,s),emit:null,emitted:null,propsDefaults:Ue,inheritAttrs:n.inheritAttrs,ctx:Ue,data:Ue,props:Ue,attrs:Ue,slots:Ue,refs:Ue,setupState:Ue,setupContext:null,suspense:r,suspenseId:r?r.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=$m.bind(null,i),e.ce&&e.ce(i),i}var Rt=null,gt=()=>Rt||It,Oo,Tl;{const e=eo(),t=(r,n)=>{let s;return(s=e[r])||(s=e[r]=[]),s.push(n),i=>{s.length>1?s.forEach(o=>o(i)):s[0](i)}};Oo=t("__VUE_INSTANCE_SETTERS__",r=>Rt=r),Tl=t("__VUE_SSR_SETTERS__",r=>Os=r)}var ns=e=>{const t=Rt;return Oo(e),e.scope.on(),()=>{e.scope.off(),Oo(t)}},Ho=()=>{Rt&&Rt.scope.off(),Oo(null)};function af(e){return e.vnode.shapeFlag&4}var Os=!1;function lf(e,t=!1,r=!1){t&&Tl(t);const{props:n,children:s}=e.vnode,i=af(e);Nm(e,n,i,t),Fm(e,s,r||t);const o=i?e0(e,t):void 0;return t&&Tl(!1),o}function e0(e,t){const r=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,pl);const{setup:n}=r;if(n){Jr();const s=e.setupContext=n.length>1?uf(e):null,i=ns(e),o=xs(n,e,0,[e.props,s]),a=Oa(o);if(Yr(),i(),(a||e.sp)&&!sn(e)&&il(e),a){if(o.then(Ho,Ho),t)return o.then(l=>{El(e,l,t)}).catch(l=>{Zn(l,e,0)});e.asyncDep=o}else El(e,o,t)}else cf(e,t)}function El(e,t,r){De(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ge(t)&&(e.setupState=Ja(t)),cf(e,r)}var Mo,Al;function t0(e){Mo=e,Al=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,um))}}var r0=()=>!Mo;function cf(e,t,r){const n=e.type;if(!e.render){if(!t&&Mo&&!n.render){const s=n.template||gl(e).template;if(s){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:a,compilerOptions:l}=n,u=Qe(Qe({isCustomElement:i,delimiters:a},o),l);n.render=Mo(s,u)}}e.render=n.render||fr,Al&&Al(e)}{const s=ns(e);Jr();try{Cm(e)}finally{Yr(),s()}}}var n0={get(e,t){return Ot(e,"get",""),e[t]}};function uf(e){const t=r=>{e.exposed=r||{}};return{attrs:new Proxy(e.attrs,n0),slots:e.slots,emit:e.emit,expose:t}}function Ti(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ja(Ga(e.exposed)),{get(t,r){if(r in t)return t[r];if(r in yi)return yi[r](e)},has(t,r){return r in t||r in yi}})):e.proxy}function kl(e,t=!0){return De(e)?e.displayName||e.name:e.name||t&&e.__name}function s0(e){return De(e)&&"__vccOpts"in e}var V=(e,t)=>Tv(e,t,Os);function mr(e,t,r){try{xi(-1);const n=arguments.length;return n===2?Ge(t)&&!_e(t)?an(t)?O(e,null,[t]):O(e,t):O(e,null,t):(n>3?r=Array.prototype.slice.call(arguments,2):n===3&&an(r)&&(r=[r]),O(e,t,r))}finally{xi(1)}}function i0(){return;function e(t,r,n){const s=t[n];if(_e(s)&&s.includes(r)||Ge(s)&&r in s||t.extends&&e(t.extends,r,n)||t.mixins&&t.mixins.some(i=>e(i,r,n)))return!0}}function o0(e,t,r,n){const s=r[n];if(s&&df(s,e))return s;const i=t();return i.memo=e.slice(),i.cacheIndex=n,r[n]=i}function df(e,t){const r=e.memo;if(r.length!=t.length)return!1;for(let n=0;n<r.length;n++)if(Bt(r[n],t[n]))return!1;return rs>0&&Nt&&Nt.push(e),!0}var ff="3.5.29",a0=fr,l0=Ov,c0=As,u0=Ju,d0={createComponentInstance:of,setupComponent:lf,renderComponentRoot:Io,setCurrentRenderingInstance:di,isVNode:an,normalizeVNode:Yt,getComponentPublicInstance:Ti,ensureValidVNode:ul,pushWarningContext:Rv,popWarningContext:$v},lT=null,cT=null,uT=null;var Il=void 0,pf=typeof window<"u"&&window.trustedTypes;if(pf)try{Il=pf.createPolicy("vue",{createHTML:e=>e})}catch{}var hf=Il?e=>Il.createHTML(e):e=>e,f0="http://www.w3.org/2000/svg",p0="http://www.w3.org/1998/Math/MathML",cn=typeof document<"u"?document:null,gf=cn&&cn.createElement("template"),vf={insert:(e,t,r)=>{t.insertBefore(e,r||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,r,n)=>{const s=t==="svg"?cn.createElementNS(f0,e):t==="mathml"?cn.createElementNS(p0,e):r?cn.createElement(e,{is:r}):cn.createElement(e);return e==="select"&&n&&n.multiple!=null&&s.setAttribute("multiple",n.multiple),s},createText:e=>cn.createTextNode(e),createComment:e=>cn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>cn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,r,n,s,i){const o=r?r.previousSibling:t.lastChild;if(s&&(s===i||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),r),!(s===i||!(s=s.nextSibling)););else{gf.innerHTML=hf(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=gf.content;if(n==="svg"||n==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,r)}return[o?o.nextSibling:t.firstChild,r?r.previousSibling:t.lastChild]}},En="transition",Ei="animation",Hs=Symbol("_vtc"),mf={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},wf=Qe({},nl,mf),h0=e=>(e.displayName="Transition",e.props=wf,e),g0=h0((e,{slots:t})=>mr(ld,bf(e),t)),ss=(e,t=[])=>{_e(e)?e.forEach(r=>r(...t)):e&&e(...t)},yf=e=>e?_e(e)?e.some(t=>t.length>1):e.length>1:!1;function bf(e){const t={};for(const _ in e)_ in mf||(t[_]=e[_]);if(e.css===!1)return t;const{name:r="v",type:n,duration:s,enterFromClass:i=`${r}-enter-from`,enterActiveClass:o=`${r}-enter-active`,enterToClass:a=`${r}-enter-to`,appearFromClass:l=i,appearActiveClass:u=o,appearToClass:c=a,leaveFromClass:d=`${r}-leave-from`,leaveActiveClass:p=`${r}-leave-active`,leaveToClass:h=`${r}-leave-to`}=e,m=v0(s),w=m&&m[0],x=m&&m[1],{onBeforeEnter:g,onEnter:S,onEnterCancelled:b,onLeave:y,onLeaveCancelled:T,onBeforeAppear:k=g,onAppear:N=S,onAppearCancelled:v=b}=t,B=(_,E,P,R)=>{_._enterCancelled=R,An(_,E?c:a),An(_,E?u:o),P&&P()},q=(_,E)=>{_._isLeaving=!1,An(_,d),An(_,h),An(_,p),E&&E()},C=_=>(E,P)=>{const R=_?N:S,D=()=>B(E,_,P);ss(R,[E,D]),_f(()=>{An(E,_?l:i),Lr(E,_?c:a),yf(R)||Sf(E,n,w,D)})};return Qe(t,{onBeforeEnter(_){ss(g,[_]),Lr(_,i),Lr(_,o)},onBeforeAppear(_){ss(k,[_]),Lr(_,l),Lr(_,u)},onEnter:C(!1),onAppear:C(!0),onLeave(_,E){_._isLeaving=!0;const P=()=>q(_,E);Lr(_,d),_._enterCancelled?(Lr(_,p),$l(_)):($l(_),Lr(_,p)),_f(()=>{_._isLeaving&&(An(_,d),Lr(_,h),yf(y)||Sf(_,n,x,P))}),ss(y,[_,P])},onEnterCancelled(_){B(_,!1,void 0,!0),ss(b,[_])},onAppearCancelled(_){B(_,!0,void 0,!0),ss(v,[_])},onLeaveCancelled(_){q(_),ss(T,[_])}})}function v0(e){if(e==null)return null;if(Ge(e))return[Rl(e.enter),Rl(e.leave)];{const t=Rl(e);return[t,t]}}function Rl(e){return Qi(e)}function Lr(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.add(r)),(e[Hs]||(e[Hs]=new Set)).add(t)}function An(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const r=e[Hs];r&&(r.delete(t),r.size||(e[Hs]=void 0))}function _f(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var m0=0;function Sf(e,t,r,n){const s=e._endId=++m0,i=()=>{s===e._endId&&n()};if(r!=null)return setTimeout(i,r);const{type:o,timeout:a,propCount:l}=Cf(e,t);if(!o)return n();const u=o+"end";let c=0;const d=()=>{e.removeEventListener(u,p),i()},p=h=>{h.target===e&&++c>=l&&d()};setTimeout(()=>{c<l&&d()},a+1),e.addEventListener(u,p)}function Cf(e,t){const r=window.getComputedStyle(e),n=m=>(r[m]||"").split(", "),s=n(`${En}Delay`),i=n(`${En}Duration`),o=xf(s,i),a=n(`${Ei}Delay`),l=n(`${Ei}Duration`),u=xf(a,l);let c=null,d=0,p=0;t===En?o>0&&(c=En,d=o,p=i.length):t===Ei?u>0&&(c=Ei,d=u,p=l.length):(d=Math.max(o,u),c=d>0?o>u?En:Ei:null,p=c?c===En?i.length:l.length:0);const h=c===En&&/\b(?:transform|all)(?:,|$)/.test(n(`${En}Property`).toString());return{type:c,timeout:d,propCount:p,hasTransform:h}}function xf(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((r,n)=>Tf(r)+Tf(e[n])))}function Tf(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function $l(e){return(e?e.ownerDocument:document).body.offsetHeight}function w0(e,t,r){const n=e[Hs];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):r?e.setAttribute("class",t):e.className=t}var No=Symbol("_vod"),Ef=Symbol("_vsh"),qo={name:"show",beforeMount(e,{value:t},{transition:r}){e[No]=e.style.display==="none"?"":e.style.display,r&&t?r.beforeEnter(e):Ai(e,t)},mounted(e,{value:t},{transition:r}){r&&t&&r.enter(e)},updated(e,{value:t,oldValue:r},{transition:n}){!t!=!r&&(n?t?(n.beforeEnter(e),Ai(e,!0),n.enter(e)):n.leave(e,()=>{Ai(e,!1)}):Ai(e,t))},beforeUnmount(e,{value:t}){Ai(e,t)}};function Ai(e,t){e.style.display=t?e[No]:"none",e[Ef]=!t}function y0(){qo.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}var Af=Symbol("");function b0(e){const t=gt();if(!t)return;const r=t.ut=(s=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(i=>Bo(i,s))},n=()=>{const s=e(t.proxy);t.ce?Bo(t.ce,s):Pl(t.subTree,s),r(s)};al(()=>{ci(n)}),tt(()=>{Me(n,fr,{flush:"post"});const s=new MutationObserver(n);s.observe(t.subTree.el.parentNode,{childList:!0}),Vt(()=>s.disconnect())})}function Pl(e,t){if(e.shapeFlag&128){const r=e.suspense;e=r.activeBranch,r.pendingBranch&&!r.isHydrating&&r.effects.push(()=>{Pl(r.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)Bo(e.el,t);else if(e.type===Ke)e.children.forEach(r=>Pl(r,t));else if(e.type===ts){let{el:r,anchor:n}=e;for(;r&&(Bo(r,t),r!==n);)r=r.nextSibling}}function Bo(e,t){if(e.nodeType===1){const r=e.style;let n="";for(const s in t){const i=Zg(t[s]);r.setProperty(`--${s}`,i),n+=`--${s}: ${i};`}r[Af]=n}}var _0=/(?:^|;)\s*display\s*:/;function S0(e,t,r){const n=e.style,s=it(r);let i=!1;if(r&&!s){if(t)if(it(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();r[a]==null&&Lo(n,a,"")}else for(const o in t)r[o]==null&&Lo(n,o,"");for(const o in r)o==="display"&&(i=!0),Lo(n,o,r[o])}else if(s){if(t!==r){const o=n[Af];o&&(r+=";"+o),n.cssText=r,i=_0.test(r)}}else t&&e.removeAttribute("style");No in e&&(e[No]=i?n.display:"",e[Ef]&&(n.display="none"))}var kf=/\s*!important$/;function Lo(e,t,r){if(_e(r))r.forEach(n=>Lo(e,t,n));else if(r==null&&(r=""),t.startsWith("--"))e.setProperty(t,r);else{const n=C0(e,t);kf.test(r)?e.setProperty(Gt(n),r.replace(kf,""),"important"):e[n]=r}}var If=["Webkit","Moz","ms"],Dl={};function C0(e,t){const r=Dl[t];if(r)return r;let n=_t(t);if(n!=="filter"&&n in e)return Dl[t]=n;n=ei(n);for(let s=0;s<If.length;s++){const i=If[s]+n;if(i in e)return Dl[t]=i}return t}var Rf="http://www.w3.org/1999/xlink";function $f(e,t,r,n,s,i=Jg(t)){n&&t.startsWith("xlink:")?r==null?e.removeAttributeNS(Rf,t.slice(6,t.length)):e.setAttributeNS(Rf,t,r):r==null||i&&!yu(r)?e.removeAttribute(t):e.setAttribute(t,i?"":Er(r)?String(r):r)}function Pf(e,t,r,n,s){if(t==="innerHTML"||t==="textContent"){r!=null&&(e[t]=t==="innerHTML"?hf(r):r);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const a=i==="OPTION"?e.getAttribute("value")||"":e.value,l=r==null?e.type==="checkbox"?"on":"":String(r);(a!==l||!("_value"in e))&&(e.value=l),r==null&&e.removeAttribute(t),e._value=r;return}let o=!1;if(r===""||r==null){const a=typeof e[t];a==="boolean"?r=yu(r):r==null&&a==="string"?(r="",o=!0):a==="number"&&(r=0,o=!0)}try{e[t]=r}catch{}o&&e.removeAttribute(s||t)}function un(e,t,r,n){e.addEventListener(t,r,n)}function x0(e,t,r,n){e.removeEventListener(t,r,n)}var Df=Symbol("_vei");function T0(e,t,r,n,s=null){const i=e[Df]||(e[Df]={}),o=i[t];if(n&&o)o.value=n;else{const[a,l]=E0(t);n?un(e,a,i[t]=I0(n,s),l):o&&(x0(e,a,o,l),i[t]=void 0)}}var Of=/(?:Once|Passive|Capture)$/;function E0(e){let t;if(Of.test(e)){t={};let r;for(;r=e.match(Of);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Gt(e.slice(2)),t]}var Ol=0,A0=Promise.resolve(),k0=()=>Ol||(A0.then(()=>Ol=0),Ol=Date.now());function I0(e,t){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;hr(R0(n,r.value),t,5,[n])};return r.value=e,r.attached=k0(),r}function R0(e,t){if(_e(t)){const r=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{r.call(e),e._stopped=!0},t.map(n=>s=>!s._stopped&&n&&n(s))}else return t}var Hf=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Mf=(e,t,r,n,s,i)=>{const o=s==="svg";t==="class"?w0(e,n,o):t==="style"?S0(e,r,n):Qs(t)?Pa(t)||T0(e,t,r,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):$0(e,t,n,o))?(Pf(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&$f(e,t,n,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!it(n))?Pf(e,_t(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),$f(e,t,n,o))};function $0(e,t,r,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Hf(t)&&De(r));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return Hf(t)&&it(r)?!1:t in e}var Nf={};function Hl(e,t,r){let n=X(e,t);Ji(n)&&(n=Qe({},n,t));class s extends qf{constructor(o){super(n,o,r)}}return s.def=n,s}var P0=((e,t)=>Hl(e,t,np)),D0=typeof HTMLElement<"u"?HTMLElement:class{},qf=class Pg extends D0{constructor(t,r={},n=Bl){super(),this._def=t,this._props=r,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&n!==Bl?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(Qe({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof Pg){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,Et(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(t){for(const r of t)this._setAttr(r.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let n=0;n<this.attributes.length;n++)this._setAttr(this.attributes[n].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});const t=(n,s=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:i,styles:o}=n;let a;if(i&&!_e(i))for(const l in i){const u=i[l];(u===Number||u&&u.type===Number)&&(l in this._props&&(this._props[l]=Qi(this._props[l])),(a||(a=Object.create(null)))[_t(l)]=!0)}this._numberProps=a,this._resolveProps(n),this.shadowRoot&&this._applyStyles(o),this._mount(n)},r=this._def.__asyncLoader;r?this._pendingResolve=r().then(n=>{n.configureApp=this._def.configureApp,t(this._def=n,!0)}):t(this._def)}_mount(t){this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const r=this._instance&&this._instance.exposed;if(r)for(const n in r)Ye(this,n)||Object.defineProperty(this,n,{get:()=>f(r[n])})}_resolveProps(t){const{props:r}=t,n=_e(r)?r:Object.keys(r||{});for(const s of Object.keys(this))s[0]!=="_"&&n.includes(s)&&this._setProp(s,this[s]);for(const s of n.map(_t))Object.defineProperty(this,s,{get(){return this._getProp(s)},set(i){this._setProp(s,i,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const r=this.hasAttribute(t);let n=r?this.getAttribute(t):Nf;const s=_t(t);r&&this._numberProps&&this._numberProps[s]&&(n=Qi(n)),this._setProp(s,n,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,r,n=!0,s=!1){if(r!==this._props[t]&&(this._dirty=!0,r===Nf?delete this._props[t]:(this._props[t]=r,t==="key"&&this._app&&(this._app._ceVNode.key=r)),s&&this._instance&&this._update(),n)){const i=this._ob;i&&(this._processMutations(i.takeRecords()),i.disconnect()),r===!0?this.setAttribute(Gt(t),""):typeof r=="string"||typeof r=="number"?this.setAttribute(Gt(t),r+""):r||this.removeAttribute(Gt(t)),i&&i.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),rp(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const r=O(this._def,Qe(t,this._props));return this._instance||(r.ce=n=>{this._instance=n,n.ce=this,n.isCE=!0;const s=(i,o)=>{this.dispatchEvent(new CustomEvent(i,Ji(o[0])?Qe({detail:o},o[0]):{detail:o}))};n.emit=(i,...o)=>{s(i,o),Gt(i)!==i&&s(Gt(i),o)},this._setParent()}),r}_applyStyles(t,r){if(!t)return;if(r){if(r===this._def||this._styleChildren.has(r))return;this._styleChildren.add(r)}const n=this._nonce;for(let s=t.length-1;s>=0;s--){const i=document.createElement("style");n&&i.setAttribute("nonce",n),i.textContent=t[s],this.shadowRoot.prepend(i)}}_parseSlots(){const t=this._slots={};let r;for(;r=this.firstChild;){const n=r.nodeType===1&&r.getAttribute("slot")||"default";(t[n]||(t[n]=[])).push(r),this.removeChild(r)}}_renderSlots(){const t=this._getSlots(),r=this._instance.type.__scopeId;for(let n=0;n<t.length;n++){const s=t[n],i=s.getAttribute("name")||"default",o=this._slots[i],a=s.parentNode;if(o)for(const l of o){if(r&&l.nodeType===1){const u=r+"-s",c=document.createTreeWalker(l,1);l.setAttribute(u,"");let d;for(;d=c.nextNode();)d.setAttribute(u,"")}a.insertBefore(l,s)}else for(;s.firstChild;)a.insertBefore(s.firstChild,s);a.removeChild(s)}}_getSlots(){const t=[this];this._teleportTargets&&t.push(...this._teleportTargets);const r=new Set;for(const n of t){const s=n.querySelectorAll("slot");for(let i=0;i<s.length;i++)r.add(s[i])}return Array.from(r)}_injectChildStyle(t){this._applyStyles(t.styles,t)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_hasShadowRoot(){return this._def.shadowRoot!==!1}_removeChildStyle(t){}};function Bf(e){const t=gt(),r=t&&t.ce;return r||null}function O0(){const e=Bf();return e&&e.shadowRoot}function H0(e="$style"){{const t=gt();if(!t)return Ue;const r=t.type.__cssModules;if(!r)return Ue;const n=r[e];return n||Ue}}var Lf=new WeakMap,Ff=new WeakMap,Fo=Symbol("_moveCb"),Vf=Symbol("_enterCb"),M0=e=>(delete e.props.mode,e),N0=M0({name:"TransitionGroup",props:Qe({},wf,{tag:String,moveClass:String}),setup(e,{slots:t}){const r=gt(),n=rl();let s,i;return mi(()=>{if(!s.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!F0(s[0].el,r.vnode.el,o)){s=[];return}s.forEach(q0),s.forEach(B0);const a=s.filter(L0);$l(r.vnode.el),a.forEach(l=>{const u=l.el,c=u.style;Lr(u,o),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[Fo]=p=>{p&&p.target!==u||(!p||p.propertyName.endsWith("transform"))&&(u.removeEventListener("transitionend",d),u[Fo]=null,An(u,o))};u.addEventListener("transitionend",d)}),s=[]}),()=>{const o=ze(e),a=bf(o);let l=o.tag||Ke;if(s=[],i)for(let u=0;u<i.length;u++){const c=i[u];c.el&&c.el instanceof Element&&(s.push(c),nn(c,ks(c,a,n,r)),Lf.set(c,jf(c.el)))}i=t.default?bo(t.default()):[];for(let u=0;u<i.length;u++){const c=i[u];c.key!=null&&nn(c,ks(c,a,n,r))}return O(l,null,i)}}});function q0(e){const t=e.el;t[Fo]&&t[Fo](),t[Vf]&&t[Vf]()}function B0(e){Ff.set(e,jf(e.el))}function L0(e){const t=Lf.get(e),r=Ff.get(e),n=t.left-r.left,s=t.top-r.top;if(n||s){const i=e.el,o=i.style,a=i.getBoundingClientRect();let l=1,u=1;return i.offsetWidth&&(l=a.width/i.offsetWidth),i.offsetHeight&&(u=a.height/i.offsetHeight),(!Number.isFinite(l)||l===0)&&(l=1),(!Number.isFinite(u)||u===0)&&(u=1),Math.abs(l-1)<.01&&(l=1),Math.abs(u-1)<.01&&(u=1),o.transform=o.webkitTransform=`translate(${n/l}px,${s/u}px)`,o.transitionDuration="0s",e}}function jf(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function F0(e,t,r){const n=e.cloneNode(),s=e[Hs];s&&s.forEach(a=>{a.split(/\s+/).forEach(l=>l&&n.classList.remove(l))}),r.split(/\s+/).forEach(a=>a&&n.classList.add(a)),n.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(n);const{hasTransform:o}=Cf(n);return i.removeChild(n),o}var kn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return _e(t)?r=>_s(t,r):t};function V0(e){e.target.composing=!0}function Uf(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}var wr=Symbol("_assign");function zf(e,t,r){return t&&(e=e.trim()),r&&(e=Xi(e)),e}var ki={created(e,{modifiers:{lazy:t,trim:r,number:n}},s){e[wr]=kn(s);const i=n||s.props&&s.props.type==="number";un(e,t?"change":"input",o=>{o.target.composing||e[wr](zf(e.value,r,i))}),(r||i)&&un(e,"change",()=>{e.value=zf(e.value,r,i)}),t||(un(e,"compositionstart",V0),un(e,"compositionend",Uf),un(e,"change",Uf))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:r,modifiers:{lazy:n,trim:s,number:i}},o){if(e[wr]=kn(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?Xi(e.value):e.value,l=t??"";a!==l&&(document.activeElement===e&&e.type!=="range"&&(n&&t===r||s&&e.value.trim()===l)||(e.value=l))}},Ml={deep:!0,created(e,t,r){e[wr]=kn(r),un(e,"change",()=>{const n=e._modelValue,s=Ms(e),i=e.checked,o=e[wr];if(_e(n)){const a=to(n,s),l=a!==-1;if(i&&!l)o(n.concat(s));else if(!i&&l){const u=[...n];u.splice(a,1),o(u)}}else if(Gn(n)){const a=new Set(n);i?a.add(s):a.delete(s),o(a)}else o(Jf(e,i))})},mounted:Kf,beforeUpdate(e,t,r){e[wr]=kn(r),Kf(e,t,r)}};function Kf(e,{value:t,oldValue:r},n){e._modelValue=t;let s;if(_e(t))s=to(t,n.props.value)>-1;else if(Gn(t))s=t.has(n.props.value);else{if(t===r)return;s=Gr(t,Jf(e,!0))}e.checked!==s&&(e.checked=s)}var Nl={created(e,{value:t},r){e.checked=Gr(t,r.props.value),e[wr]=kn(r),un(e,"change",()=>{e[wr](Ms(e))})},beforeUpdate(e,{value:t,oldValue:r},n){e[wr]=kn(n),t!==r&&(e.checked=Gr(t,n.props.value))}},Wf={deep:!0,created(e,{value:t,modifiers:{number:r}},n){const s=Gn(t);un(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>r?Xi(Ms(o)):Ms(o));e[wr](e.multiple?s?new Set(i):i:i[0]),e._assigning=!0,Et(()=>{e._assigning=!1})}),e[wr]=kn(n)},mounted(e,{value:t}){Gf(e,t)},beforeUpdate(e,t,r){e[wr]=kn(r)},updated(e,{value:t}){e._assigning||Gf(e,t)}};function Gf(e,t){const r=e.multiple,n=_e(t);if(!(r&&!n&&!Gn(t))){for(let s=0,i=e.options.length;s<i;s++){const o=e.options[s],a=Ms(o);if(r)if(n){const l=typeof a;l==="string"||l==="number"?o.selected=t.some(u=>String(u)===String(a)):o.selected=to(t,a)>-1}else o.selected=t.has(a);else if(Gr(Ms(o),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!r&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ms(e){return"_value"in e?e._value:e.value}function Jf(e,t){const r=t?"_trueValue":"_falseValue";return r in e?e[r]:t}var Yf={created(e,t,r){Vo(e,t,r,null,"created")},mounted(e,t,r){Vo(e,t,r,null,"mounted")},beforeUpdate(e,t,r,n){Vo(e,t,r,n,"beforeUpdate")},updated(e,t,r,n){Vo(e,t,r,n,"updated")}};function Zf(e,t){switch(e){case"SELECT":return Wf;case"TEXTAREA":return ki;default:switch(t){case"checkbox":return Ml;case"radio":return Nl;default:return ki}}}function Vo(e,t,r,n,s){const i=Zf(e.tagName,r.props&&r.props.type)[s];i&&i(e,t,r,n)}function j0(){ki.getSSRProps=({value:e})=>({value:e}),Nl.getSSRProps=({value:e},t)=>{if(t.props&&Gr(t.props.value,e))return{checked:!0}},Ml.getSSRProps=({value:e},t)=>{if(_e(e)){if(t.props&&to(e,t.props.value)>-1)return{checked:!0}}else if(Gn(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},Yf.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const r=Zf(t.type.toUpperCase(),t.props&&t.props.type);if(r.getSSRProps)return r.getSSRProps(e,t)}}var U0=["ctrl","shift","alt","meta"],z0={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>U0.some(r=>e[`${r}Key`]&&!t.includes(r))},Xt=(e,t)=>{if(!e)return e;const r=e._withMods||(e._withMods={}),n=t.join(".");return r[n]||(r[n]=((s,...i)=>{for(let o=0;o<t.length;o++){const a=z0[t[o]];if(a&&a(s,t))return}return e(s,...i)}))},K0={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},ql=(e,t)=>{const r=e._withKeys||(e._withKeys={}),n=t.join(".");return r[n]||(r[n]=(s=>{if(!("key"in s))return;const i=Gt(s.key);if(t.some(o=>o===i||K0[o]===i))return e(s)}))},Xf=Qe({patchProp:Mf},vf),Ii,Qf=!1;function ep(){return Ii||(Ii=Wd(Xf))}function tp(){return Ii=Qf?Ii:Gd(Xf),Qf=!0,Ii}var rp=((...e)=>{ep().render(...e)}),W0=((...e)=>{tp().hydrate(...e)}),Bl=((...e)=>{const t=ep().createApp(...e),{mount:r}=t;return t.mount=n=>{const s=ip(n);if(!s)return;const i=t._component;!De(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=r(s,!1,sp(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},t}),np=((...e)=>{const t=tp().createApp(...e),{mount:r}=t;return t.mount=n=>{const s=ip(n);if(s)return r(s,!0,sp(s))},t});function sp(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function ip(e){return it(e)?document.querySelector(e):e}var op=!1,G0=()=>{op||(op=!0,j0(),y0())},J0=qg({BaseTransition:()=>ld,BaseTransitionPropsValidators:()=>nl,Comment:()=>ht,DeprecationTypes:()=>null,EffectScope:()=>Ma,ErrorCodes:()=>Dv,ErrorTypeStrings:()=>l0,Fragment:()=>Ke,KeepAlive:()=>sm,ReactiveEffect:()=>ti,Static:()=>ts,Suspense:()=>Um,Teleport:()=>el,Text:()=>Tn,TrackOpTypes:()=>Ev,Transition:()=>g0,TransitionGroup:()=>N0,TriggerOpTypes:()=>Av,VueElement:()=>qf,assertNumber:()=>Pv,callWithAsyncErrorHandling:()=>hr,callWithErrorHandling:()=>xs,camelize:()=>_t,capitalize:()=>ei,cloneVNode:()=>Rr,compatUtils:()=>null,compile:()=>Y0,computed:()=>V,createApp:()=>Bl,createBlock:()=>U,createCommentVNode:()=>Be,createElementBlock:()=>Se,createElementVNode:()=>Q,createHydrationRenderer:()=>Gd,createPropsRestProxy:()=>_m,createRenderer:()=>Wd,createSSRApp:()=>np,createSlots:()=>cm,createStaticVNode:()=>Cl,createTextVNode:()=>qe,createVNode:()=>O,customRef:()=>li,defineAsyncComponent:()=>nm,defineComponent:()=>X,defineCustomElement:()=>Hl,defineEmits:()=>fm,defineExpose:()=>pm,defineModel:()=>vm,defineOptions:()=>hm,defineProps:()=>dm,defineSSRCustomElement:()=>P0,defineSlots:()=>gm,devtools:()=>c0,effect:()=>Qg,effectScope:()=>Na,getCurrentInstance:()=>gt,getCurrentScope:()=>ro,getCurrentWatcher:()=>kv,getTransitionRawChildren:()=>bo,guardReactiveProps:()=>rr,h:()=>mr,handleError:()=>Zn,hasInjectionContext:()=>Lv,hydrate:()=>W0,hydrateOnIdle:()=>Zv,hydrateOnInteraction:()=>tm,hydrateOnMediaQuery:()=>em,hydrateOnVisible:()=>Qv,initCustomFormatter:()=>i0,initDirectivesForSSR:()=>G0,inject:()=>Ft,isMemoSame:()=>df,isProxy:()=>ai,isReactive:()=>tn,isReadonly:()=>Mr,isRef:()=>rt,isRuntimeOnly:()=>r0,isShallow:()=>Jt,isVNode:()=>an,markRaw:()=>Ga,mergeDefaults:()=>kd,mergeModels:()=>bm,mergeProps:()=>we,nextTick:()=>Et,nodeOps:()=>vf,normalizeClass:()=>et,normalizeProps:()=>pr,normalizeStyle:()=>St,onActivated:()=>vd,onBeforeMount:()=>yd,onBeforeUnmount:()=>Ps,onBeforeUpdate:()=>al,onDeactivated:()=>md,onErrorCaptured:()=>Cd,onMounted:()=>tt,onRenderTracked:()=>Sd,onRenderTriggered:()=>_d,onScopeDispose:()=>qa,onServerPrefetch:()=>bd,onUnmounted:()=>Vt,onUpdated:()=>mi,onWatcherCleanup:()=>ju,openBlock:()=>$,patchProp:()=>Mf,popScopeId:()=>qv,provide:()=>Xn,proxyRefs:()=>Ja,pushScopeId:()=>Nv,queuePostFlushCb:()=>ci,reactive:()=>Qr,readonly:()=>Ht,ref:()=>F,registerRuntimeCompiler:()=>t0,render:()=>rp,renderList:()=>vr,renderSlot:()=>ne,resolveComponent:()=>am,resolveDirective:()=>lm,resolveDynamicComponent:()=>wi,resolveFilter:()=>null,resolveTransitionHooks:()=>ks,setBlockTracking:()=>xi,setDevtoolsHook:()=>u0,setTransitionHooks:()=>nn,shallowReactive:()=>Bu,shallowReadonly:()=>en,shallowRef:()=>ft,ssrContextKey:()=>Yu,ssrUtils:()=>d0,stop:()=>ev,toDisplayString:()=>Le,toHandlerKey:()=>bs,toHandlers:()=>Ed,toRaw:()=>ze,toRef:()=>Ya,toRefs:()=>Mt,toValue:()=>$e,transformVNodeArgs:()=>Ym,triggerRef:()=>Fu,unref:()=>f,useAttrs:()=>ym,useCssModule:()=>H0,useCssVars:()=>b0,useHost:()=>Bf,useId:()=>dd,useModel:()=>Rm,useSSRContext:()=>Zu,useShadowRoot:()=>O0,useSlots:()=>wm,useTemplateRef:()=>Uv,useTransitionState:()=>rl,vModelCheckbox:()=>Ml,vModelDynamic:()=>Yf,vModelRadio:()=>Nl,vModelSelect:()=>Wf,vModelText:()=>ki,vShow:()=>qo,version:()=>ff,warn:()=>a0,watch:()=>Me,watchEffect:()=>ct,watchPostEffect:()=>Xa,watchSyncEffect:()=>Xu,withAsyncContext:()=>Sm,withCtx:()=>I,withDefaults:()=>mm,withDirectives:()=>mo,withKeys:()=>ql,withMemo:()=>o0,withModifiers:()=>Xt,withScopeId:()=>Bv},1),Y0=()=>{},Z0=2;const $r={CALL_HISTORY:"call_history",CONTACTS:"contacts",CONNECTIONS:"connections"},X0=(e="webphone_db")=>{const t=F(null),r=F(!1);return{initDB:()=>new Promise((l,u)=>{if(t.value){l();return}const c=indexedDB.open(e,Z0);c.onerror=d=>{console.error("IndexedDB error:",d),u(d)},c.onsuccess=d=>{t.value=d.target.result,r.value=!0,l()},c.onupgradeneeded=d=>{const p=d.target.result;p.objectStoreNames.contains($r.CALL_HISTORY)||p.createObjectStore($r.CALL_HISTORY,{keyPath:"id"}),p.objectStoreNames.contains($r.CONTACTS)||p.createObjectStore($r.CONTACTS,{keyPath:"number"}),p.objectStoreNames.contains($r.CONNECTIONS)||p.createObjectStore($r.CONNECTIONS,{keyPath:"id"})}}),getAll:l=>new Promise((u,c)=>{if(!t.value)return c("DB not initialized");const d=t.value.transaction([l],"readonly").objectStore(l).getAll();d.onsuccess=()=>u(d.result),d.onerror=()=>c(d.error)}),add:(l,u)=>new Promise((c,d)=>{if(!t.value)return d("DB not initialized");const p=t.value.transaction([l],"readwrite").objectStore(l).add(u);p.onsuccess=()=>c(),p.onerror=()=>d(p.error)}),put:(l,u)=>new Promise((c,d)=>{if(!t.value)return d("DB not initialized");const p=t.value.transaction([l],"readwrite").objectStore(l).put(u);p.onsuccess=()=>c(),p.onerror=()=>d(p.error)}),remove:(l,u)=>new Promise((c,d)=>{if(!t.value)return d("DB not initialized");const p=t.value.transaction([l],"readwrite").objectStore(l).delete(u);p.onsuccess=()=>c(),p.onerror=()=>d(p.error)}),isReady:r}},Q0=e=>{const t=F(e?.initialConnected??!1),r=F(0),n=F(null),s=F([]),i=F([]),{initDB:o,getAll:a,add:l}=X0(e?.server&&e?.extension?`webphone_${e.server}_${e.extension}`.replace(/[^a-z0-9_]/gi,"_"):"webphone_db");o().then(async()=>{try{s.value=(await a($r.CALL_HISTORY)).sort((Y,le)=>le.startTime-Y.startTime),i.value=await a($r.CONTACTS)}catch(Y){console.error("Error loading data from IndexedDB:",Y)}});const u=F([{id:0,status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1},{id:1,status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1},{id:2,status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1}]),c=F(e?.initialKeypadVisible??!0),d=F(""),p=F(!1),h=V(()=>u.value.find(Y=>Y.id===r.value)||u.value[0]),m=V(()=>h.value?.status||"idle"),w=V(()=>h.value?.remoteNumber||""),x=V(()=>h.value?.isMuted||!1),g=V(()=>h.value?.isHeld||!1),S=V({get:()=>h.value?.keypadValue||"",set:Y=>{h.value&&(h.value.keypadValue=Y)}}),b=Y=>{t.value=Y},y=Y=>{u.value.some(le=>le.id===Y)&&(r.value=Y)},T=(Y,le)=>{const pe=u.value.find(Ae=>Ae.id===Y);pe&&Object.assign(pe,le)};return{isConnected:t,activeChannelId:r,channels:u,activeChannel:h,callStatus:m,remoteNumber:w,isMuted:x,isHeld:g,keypadValue:S,isKeypadVisible:c,lastDialedNumber:d,videoModeEnabled:p,transferInProgress:n,setConnected:b,setActiveChannelId:y,updateChannelState:T,setCallStatus:Y=>{T(r.value,{status:Y})},setIncomingCall:Y=>{T(r.value,{remoteNumber:Y})},resetCall:()=>{T(r.value,{status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1})},addCallLog:async Y=>{const le={id:crypto.randomUUID(),...Y};s.value.unshift(le);try{await l($r.CALL_HISTORY,le)}catch(pe){console.error("Error saving call log:",pe)}},callHistory:s,contacts:i,addContact:async Y=>{try{await l($r.CONTACTS,Y),i.value=await a($r.CONTACTS)}catch(le){console.error("Error saving contact:",le)}},setMuted:Y=>{T(r.value,{isMuted:Y})},setHeld:Y=>{T(r.value,{isHeld:Y})},appendKeypad:Y=>{S.value+=Y},clearKeypad:()=>{S.value=""},backspaceKeypad:()=>{S.value=S.value.slice(0,-1)},toggleKeypad:()=>{c.value=!c.value},setLastDialedNumber:Y=>{d.value=Y},setTransferInProgress:Y=>{n.value=Y},toggleVideoMode:()=>{p.value=!p.value}}},ap="0.21.1";var is=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}},Ll=class extends is{constructor(e){super(e||"Unsupported content type.")}},Fl=class extends is{constructor(e){super(e||"Request pending.")}},ew=class extends is{constructor(e){super(e||"Unspecified session description handler error.")}},Vl=class extends is{constructor(){super("The session has terminated.")}},Ri=class extends is{constructor(e){super(e||"An error occurred during state transition.")}},tw=class{constructor(e){this.incomingAckRequest=e}get request(){return this.incomingAckRequest.message}},rw=class{constructor(e){this.incomingByeRequest=e}get request(){return this.incomingByeRequest.message}accept(e){return this.incomingByeRequest.accept(e),Promise.resolve()}reject(e){return this.incomingByeRequest.reject(e),Promise.resolve()}},nw=class{constructor(e){this.incomingCancelRequest=e}get request(){return this.incomingCancelRequest}},Ns=class{constructor(){this.listeners=new Array}addListener(e,t){const r=n=>{this.removeListener(r),e(n)};t?.once===!0?this.listeners.push(r):this.listeners.push(e)}emit(e){this.listeners.slice().forEach(t=>t(e))}removeAllListeners(){this.listeners=[]}removeListener(e){this.listeners=this.listeners.filter(t=>t!==e)}on(e){return this.addListener(e)}off(e){return this.removeListener(e)}once(e){return this.addListener(e,{once:!0})}},sw=class{constructor(e){this.incomingInfoRequest=e}get request(){return this.incomingInfoRequest.message}accept(e){return this.incomingInfoRequest.accept(e),Promise.resolve()}reject(e){return this.incomingInfoRequest.reject(e),Promise.resolve()}},lp=class{constructor(e){this.parameters={};for(const t in e)e.hasOwnProperty(t)&&this.setParam(t,e[t])}setParam(e,t){e&&(this.parameters[e.toLowerCase()]=typeof t>"u"||t===null?null:t.toString())}getParam(e){if(e)return this.parameters[e.toLowerCase()]}hasParam(e){return!!(e&&this.parameters[e.toLowerCase()]!==void 0)}deleteParam(e){if(e=e.toLowerCase(),this.hasParam(e)){const t=this.parameters[e];return delete this.parameters[e],t}}clearParams(){this.parameters={}}},yr=class Dg extends lp{constructor(t,r,n){super(n),this.uri=t,this._displayName=r}get friendlyName(){return this.displayName||this.uri.aor}get displayName(){return this._displayName}set displayName(t){this._displayName=t}clone(){return new Dg(this.uri.clone(),this._displayName,JSON.parse(JSON.stringify(this.parameters)))}toString(){let t=this.displayName||this.displayName==="0"?'"'+this.displayName+'" ':"";t+="<"+this.uri.toString()+">";for(const r in this.parameters)this.parameters.hasOwnProperty(r)&&(t+=";"+r,this.parameters[r]!==null&&(t+="="+this.parameters[r]));return t}},In=class Og extends lp{constructor(t="sip",r,n,s,i,o){if(super(i||{}),this.headers={},!n)throw new TypeError('missing or invalid "host" parameter');for(const a in o)o.hasOwnProperty(a)&&this.setHeader(a,o[a]);this.raw={scheme:t,user:r,host:n,port:s},this.normal={scheme:t.toLowerCase(),user:r,host:n.toLowerCase(),port:s}}get scheme(){return this.normal.scheme}set scheme(t){this.raw.scheme=t,this.normal.scheme=t.toLowerCase()}get user(){return this.normal.user}set user(t){this.normal.user=this.raw.user=t}get host(){return this.normal.host}set host(t){this.raw.host=t,this.normal.host=t.toLowerCase()}get aor(){return this.normal.user+"@"+this.normal.host}get port(){return this.normal.port}set port(t){this.normal.port=this.raw.port=t}setHeader(t,r){this.headers[this.headerize(t)]=r instanceof Array?r:[r]}getHeader(t){if(t)return this.headers[this.headerize(t)]}hasHeader(t){return!!t&&!!this.headers.hasOwnProperty(this.headerize(t))}deleteHeader(t){if(t=this.headerize(t),this.headers.hasOwnProperty(t)){const r=this.headers[t];return delete this.headers[t],r}}clearHeaders(){this.headers={}}clone(){return new Og(this._raw.scheme,this._raw.user||"",this._raw.host,this._raw.port,JSON.parse(JSON.stringify(this.parameters)),JSON.parse(JSON.stringify(this.headers)))}toRaw(){return this._toString(this._raw)}toString(){return this._toString(this._normal)}get _normal(){return this.normal}get _raw(){return this.raw}_toString(t){let r=t.scheme+":";t.scheme.toLowerCase().match("^sips?$")||(r+="//"),t.user&&(r+=this.escapeUser(t.user)+"@"),r+=t.host,(t.port||t.port===0)&&(r+=":"+t.port);for(const s in this.parameters)this.parameters.hasOwnProperty(s)&&(r+=";"+s,this.parameters[s]!==null&&(r+="="+this.parameters[s]));const n=[];for(const s in this.headers)if(this.headers.hasOwnProperty(s))for(const i in this.headers[s])this.headers[s].hasOwnProperty(i)&&n.push(s+"="+this.headers[s][i]);return n.length>0&&(r+="?"+n.join("&")),r}escapeUser(t){let r;try{r=decodeURIComponent(t)}catch(n){throw n}return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%2B/gi,"+").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}headerize(t){const r={"Call-Id":"Call-ID",Cseq:"CSeq","Min-Se":"Min-SE",Rack:"RAck",Rseq:"RSeq","Www-Authenticate":"WWW-Authenticate"},n=t.toLowerCase().replace(/_/g,"-").split("-"),s=n.length;let i="";for(let o=0;o<s;o++)o!==0&&(i+="-"),i+=n[o].charAt(0).toUpperCase()+n[o].substring(1);return r[i]&&(i=r[i]),i}};function cp(e,t){if(e.scheme!==t.scheme||e.user!==t.user||e.host!==t.host||e.port!==t.port)return!1;function r(i,o){const a=Object.keys(i.parameters),l=Object.keys(o.parameters);return!(!a.filter(u=>l.includes(u)).every(u=>i.parameters[u]===o.parameters[u])||!["user","ttl","method","transport"].every(u=>i.hasParam(u)&&o.hasParam(u)||!i.hasParam(u)&&!o.hasParam(u))||!["maddr"].every(u=>i.hasParam(u)&&o.hasParam(u)||!i.hasParam(u)&&!o.hasParam(u)))}if(!r(e,t))return!1;const n=Object.keys(e.headers),s=Object.keys(t.headers);if(n.length!==0||s.length!==0){if(n.length!==s.length)return!1;const i=n.filter(o=>s.includes(o));if(i.length!==s.length||!i.every(o=>e.headers[o].length&&t.headers[o].length&&e.headers[o][0]===t.headers[o][0]))return!1}return!0}function jl(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,r+=r.repeat(t),e+r.slice(0,t))}var up=class Ia extends Error{constructor(t,r,n,s){super(),this.message=t,this.expected=r,this.found=n,this.location=s,this.name="SyntaxError",typeof Object.setPrototypeOf=="function"?Object.setPrototypeOf(this,Ia.prototype):this.__proto__=Ia.prototype,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Ia)}static buildMessage(t,r){function n(u){return u.charCodeAt(0).toString(16).toUpperCase()}function s(u){return u.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,c=>"\\x0"+n(c)).replace(/[\x10-\x1F\x7F-\x9F]/g,c=>"\\x"+n(c))}function i(u){return u.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,c=>"\\x0"+n(c)).replace(/[\x10-\x1F\x7F-\x9F]/g,c=>"\\x"+n(c))}function o(u){switch(u.type){case"literal":return'"'+s(u.text)+'"';case"class":const c=u.parts.map(d=>Array.isArray(d)?i(d[0])+"-"+i(d[1]):i(d));return"["+(u.inverted?"^":"")+c+"]";case"any":return"any character";case"end":return"end of input";case"other":return u.description}}function a(u){const c=u.map(o);let d,p;if(c.sort(),c.length>0){for(d=1,p=1;d<c.length;d++)c[d-1]!==c[d]&&(c[p]=c[d],p++);c.length=p}switch(c.length){case 1:return c[0];case 2:return c[0]+" or "+c[1];default:return c.slice(0,-1).join(", ")+", or "+c[c.length-1]}}function l(u){return u?'"'+s(u)+'"':"end of input"}return"Expected "+a(t)+" but "+l(r)+" found."}format(t){let r="Error: "+this.message;if(this.location){let n=null,s;for(s=0;s<t.length;s++)if(t[s].source===this.location.source){n=t[s].text.split(/\r\n|\n|\r/g);break}let i=this.location.start,o=this.location.source+":"+i.line+":"+i.column;if(n){let a=this.location.end,l=jl("",i.line.toString().length," "),u=n[i.line-1],c=i.line===a.line?a.column:u.length+1;r+=`
5
+ `)&&(xo(b,0)||$s(),b.textContent=y.children)}if(q){if(R||!g||C&48){const W=b.tagName.includes("-");for(const ae in q)(R&&(ae.endsWith("value")||ae==="indeterminate")||ei(ae)&&!Jn(ae)||ae[0]==="."||W&&!Jn(ae))&&n(b,ae,null,q[ae],void 0,T)}else if(q.onClick)n(b,"onClick",null,q.onClick,void 0,T);else if(C&4&&tn(q.style))for(const W in q.style)q.style[W]}let G;(G=q&&q.onVnodeBeforeMount)&&Xt(G,T,y),E&&Nr(y,null,T,"beforeMount"),((G=q&&q.onVnodeMounted)||E||D)&&tf(()=>{G&&Xt(G,T,y),D&&P.enter(b),E&&Nr(y,null,T,"mounted")},I)}return b.nextSibling},h=(b,y,T,I,N,g,B)=>{B=B||!!y.dynamicChildren;const q=y.children,C=q.length;for(let _=0;_<C;_++){const E=B?q[_]:q[_]=Zt(q[_]),P=E.type===Tn;b?(P&&!B&&_+1<C&&Zt(q[_+1]).type===Tn&&(l(s(b.data.slice(E.children.length)),T,i(b)),b.data=E.children),b=d(b,E,I,N,g,B)):P&&!E.children?l(E.el=s(""),T):(xo(T,1)||$s(),r(null,E,T,null,I,N,Co(T),g))}return b},m=(b,y,T,I,N,g)=>{const{slotScopeIds:B}=y;B&&(N=N?N.concat(B):B);const q=o(b),C=h(i(b),y,q,T,I,N,g);return C&&Ps(C)&&C.data==="]"?i(y.anchor=C):($s(),l(y.anchor=u("]"),q,C),C)},w=(b,y,T,I,N,g)=>{if(xo(b.parentElement,1)||$s(),y.el=null,g){const C=x(b);for(;;){const _=i(b);if(_&&_!==C)a(_);else break}}const B=i(b),q=o(b);return a(b),r(null,y,q,B,T,I,Co(q),N),T&&(T.vnode.el=y.el,$o(T,y.el)),B},x=(b,y="[",T="]")=>{let I=0;for(;b;)if(b=i(b),b&&Ps(b)&&(b.data===y&&I++,b.data===T)){if(I===0)return i(b);I--}return b},v=(b,y,T)=>{const I=y.parentNode;I&&I.replaceChild(b,y);let N=T;for(;N;)N.vnode.el===y&&(N.vnode.el=N.subTree.el=b),N=N.parent},S=b=>b.nodeType===1&&b.tagName==="TEMPLATE";return[c,d]}var gd="data-allow-mismatch",Jv={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function xo(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(gd);)e=e.parentElement;const r=e&&e.getAttribute(gd);if(r==null)return!1;if(r==="")return!0;{const n=r.split(",");return t===0&&n.includes("children")?!0:n.includes(Jv[t])}}var Yv=to().requestIdleCallback||(e=>setTimeout(e,1)),Zv=to().cancelIdleCallback||(e=>clearTimeout(e)),Xv=(e=1e4)=>t=>{const r=Yv(t,{timeout:e});return()=>Zv(r)};function Qv(e){const{top:t,left:r,bottom:n,right:s}=e.getBoundingClientRect(),{innerHeight:i,innerWidth:o}=window;return(t>0&&t<i||n>0&&n<i)&&(r>0&&r<o||s>0&&s<o)}var em=e=>(t,r)=>{const n=new IntersectionObserver(s=>{for(const i of s)if(i.isIntersecting){n.disconnect(),t();break}},e);return r(s=>{if(s instanceof Element){if(Qv(s))return t(),n.disconnect(),!1;n.observe(s)}}),()=>n.disconnect()},tm=e=>t=>{if(e){const r=matchMedia(e);if(r.matches)t();else return r.addEventListener("change",t,{once:!0}),()=>r.removeEventListener("change",t)}},rm=(e=[])=>(t,r)=>{it(e)&&(e=[e]);let n=!1;const s=o=>{n||(n=!0,i(),t(),o.target.dispatchEvent(new o.constructor(o.type,o)))},i=()=>{r(o=>{for(const a of e)o.removeEventListener(a,s)})};return r(o=>{for(const a of e)o.addEventListener(a,s,{once:!0})}),i};function nm(e,t){if(Ps(e)&&e.data==="["){let r=1,n=e.nextSibling;for(;n;){if(n.nodeType===1){if(t(n)===!1)break}else if(Ps(n))if(n.data==="]"){if(--r===0)break}else n.data==="["&&r++;n=n.nextSibling}}else t(e)}var sn=e=>!!e.type.__asyncLoader;function sm(e){Oe(e)&&(e={loader:e});const{loader:t,loadingComponent:r,errorComponent:n,delay:s=200,hydrate:i,timeout:o,suspensible:a=!0,onError:l}=e;let u=null,c,d=0;const p=()=>(d++,u=null,h()),h=()=>{let m;return u||(m=u=t().catch(w=>{if(w=w instanceof Error?w:new Error(String(w)),l)return new Promise((x,v)=>{l(w,()=>x(p()),()=>v(w),d+1)});throw w}).then(w=>m!==u&&u?u:(w&&(w.__esModule||w[Symbol.toStringTag]==="Module")&&(w=w.default),c=w,w)))};return X({name:"AsyncComponentWrapper",__asyncLoader:h,__asyncHydrate(m,w,x){let v=!1;(w.bu||(w.bu=[])).push(()=>v=!0);const S=()=>{v||x()},b=i?()=>{const y=i(S,T=>nm(m,T));y&&(w.bum||(w.bum=[])).push(y)}:S;c?b():h().then(()=>!w.isUnmounted&&b())},get __asyncResolved(){return c},setup(){const m=Rt;if(il(m),c)return()=>To(c,m);const w=b=>{u=null,Zn(b,m,13,!n)};if(a&&m.suspense||Hs)return h().then(b=>()=>To(b,m)).catch(b=>(w(b),()=>n?O(n,{error:b}):null));const x=F(!1),v=F(),S=F(!!s);return s&&setTimeout(()=>{S.value=!1},s),o!=null&&setTimeout(()=>{if(!x.value&&!v.value){const b=new Error(`Async component timed out after ${o}ms.`);w(b),v.value=b}},o),h().then(()=>{x.value=!0,m.parent&&vi(m.parent.vnode)&&m.parent.update()}).catch(b=>{w(b),v.value=b}),()=>{if(x.value&&c)return To(c,m);if(v.value&&n)return O(n,{error:v.value});if(r&&!S.value)return To(r,m)}}})}function To(e,t){const{ref:r,props:n,children:s,ce:i}=t.vnode,o=O(e,n,s);return o.ref=r,o.ce=i,delete t.vnode.ce,o}var vi=e=>e.type.__isKeepAlive,im={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const r=gt(),n=r.ctx;if(!n.renderer)return()=>{const S=t.default&&t.default();return S&&S.length===1?S[0]:S};const s=new Map,i=new Set;let o=null;const a=r.suspense,{renderer:{p:l,m:u,um:c,o:{createElement:d}}}=n,p=d("div");n.activate=(S,b,y,T,I)=>{const N=S.component;u(S,b,y,0,a),l(N.vnode,S,b,y,N,a,T,S.slotScopeIds,I),yt(()=>{N.isDeactivated=!1,N.a&&Ss(N.a);const g=S.props&&S.props.onVnodeMounted;g&&Xt(g,N.parent,S)},a)},n.deactivate=S=>{const b=S.component;Po(b.m),Po(b.a),u(S,p,null,1,a),yt(()=>{b.da&&Ss(b.da);const y=S.props&&S.props.onVnodeUnmounted;y&&Xt(y,b.parent,S),b.isDeactivated=!0},a)};function h(S){ol(S),c(S,r,a,!0)}function m(S){s.forEach((b,y)=>{const T=kl(sn(b)?b.type.__asyncResolved||{}:b.type);T&&!S(T)&&w(y)})}function w(S){const b=s.get(S);b&&(!o||!kr(b,o))?h(b):o&&ol(o),s.delete(S),i.delete(S)}He(()=>[e.include,e.exclude],([S,b])=>{S&&m(y=>mi(S,y)),b&&m(y=>!mi(b,y))},{flush:"post",deep:!0});let x=null;const v=()=>{x!=null&&(Do(r.subTree.type)?yt(()=>{s.set(x,Eo(r.subTree))},r.subTree.suspense):s.set(x,Eo(r.subTree)))};return tt(v),wi(v),Ds(()=>{s.forEach(S=>{const{subTree:b,suspense:y}=r,T=Eo(b);if(S.type===T.type&&S.key===T.key){ol(T);const I=T.component.da;I&&yt(I,y);return}h(S)})}),()=>{if(x=null,!t.default)return o=null;const S=t.default(),b=S[0];if(S.length>1)return o=null,S;if(!an(b)||!(b.shapeFlag&4)&&!(b.shapeFlag&128))return o=null,b;let y=Eo(b);if(y.type===ht)return o=null,y;const T=y.type,I=kl(sn(y)?y.type.__asyncResolved||{}:T),{include:N,exclude:g,max:B}=e;if(N&&(!I||!mi(N,I))||g&&I&&mi(g,I))return y.shapeFlag&=-257,o=y,b;const q=y.key==null?T:y.key,C=s.get(q);return y.el&&(y=Ir(y),b.shapeFlag&128&&(b.ssContent=y)),x=q,C?(y.el=C.el,y.component=C.component,y.transition&&nn(y,y.transition),y.shapeFlag|=512,i.delete(q),i.add(q)):(i.add(q),B&&i.size>parseInt(B,10)&&w(i.values().next().value)),y.shapeFlag|=256,o=y,Do(b.type)?b:y}}};function mi(e,t){return Se(e)?e.some(r=>mi(r,t)):it(e)?e.split(",").includes(t):Fg(e)?(e.lastIndex=0,e.test(t)):!1}function vd(e,t){wd(e,"a",t)}function md(e,t){wd(e,"da",t)}function wd(e,t,r=Rt){const n=e.__wdc||(e.__wdc=()=>{let s=r;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(Ao(t,n,r),r){let s=r.parent;for(;s&&s.parent;)vi(s.parent.vnode)&&om(n,t,r,s),s=s.parent}}function om(e,t,r,n){const s=Ao(t,e,n,!0);jt(()=>{Da(n[t],s)},r)}function ol(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Eo(e){return e.shapeFlag&128?e.ssContent:e}function Ao(e,t,r=Rt,n=!1){if(r){const s=r[e]||(r[e]=[]),i=t.__weh||(t.__weh=(...o)=>{Jr();const a=ns(r),l=pr(t,r,e,o);return a(),Yr(),l});return n?s.unshift(i):s.push(i),i}}var on=e=>(t,r=Rt)=>{(!Hs||e==="sp")&&Ao(e,(...n)=>t(...n),r)},yd=on("bm"),tt=on("m"),al=on("bu"),wi=on("u"),Ds=on("bum"),jt=on("um"),bd=on("sp"),_d=on("rtg"),Sd=on("rtc");function Cd(e,t=Rt){Ao("ec",e,t)}var ll="components",am="directives";function lm(e,t){return cl(ll,e,!0,t)||e}var xd=Symbol.for("v-ndc");function yi(e){return it(e)?cl(ll,e,!1)||e:e||xd}function cm(e){return cl(am,e)}function cl(e,t,r=!0,n=!1){const s=It||Rt;if(s){const i=s.type;if(e===ll){const a=kl(i,!1);if(a&&(a===t||a===_t(t)||a===ti(_t(t))))return i}const o=Td(s[e]||i[e],t)||Td(s.appContext[e],t);return!o&&n?i:o}}function Td(e,t){return e&&(e[t]||e[_t(t)]||e[ti(_t(t))])}function gr(e,t,r,n){let s;const i=r&&r[n],o=Se(e);if(o||it(e)){const a=o&&tn(e);let l=!1,u=!1;a&&(l=!Yt(e),u=Hr(e),e=oo(e)),s=new Array(e.length);for(let c=0,d=e.length;c<d;c++)s[c]=t(l?u?xs(Ar(e[c])):Ar(e[c]):e[c],c,void 0,i&&i[c])}else if(typeof e=="number"){s=new Array(e);for(let a=0;a<e;a++)s[a]=t(a+1,a,void 0,i&&i[a])}else if(Je(e))if(e[Symbol.iterator])s=Array.from(e,(a,l)=>t(a,l,void 0,i&&i[l]));else{const a=Object.keys(e);s=new Array(a.length);for(let l=0,u=a.length;l<u;l++){const c=a[l];s[l]=t(e[c],c,l,i&&i[l])}}else s=[];return r&&(r[n]=s),s}function um(e,t){for(let r=0;r<t.length;r++){const n=t[r];if(Se(n))for(let s=0;s<n.length;s++)e[n[s].name]=n[s].fn;else n&&(e[n.name]=n.key?(...s)=>{const i=n.fn(...s);return i&&(i.key=n.key),i}:n.fn)}return e}function ne(e,t,r={},n,s){if(It.ce||It.parent&&sn(It.parent)&&It.parent.ce){const u=Object.keys(r).length>0;return t!=="default"&&(r.name=t),$(),U(Ke,null,[O("slot",r,n&&n())],u?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),$();const o=i&&ul(i(r)),a=r.key||o&&o.key,l=U(Ke,{key:(a&&!Tr(a)?a:`_${t}`)+(!o&&n?"_fb":"")},o||(n?n():[]),o&&e._===1?64:-2);return!s&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),i&&i._c&&(i._d=!0),l}function ul(e){return e.some(t=>an(t)?!(t.type===ht||t.type===Ke&&!ul(t.children)):!0)?e:null}function Ed(e,t){const r={};for(const n in e)r[t&&/[A-Z]/.test(n)?`on:${n}`:_s(n)]=e[n];return r}var dl=e=>e?af(e)?Ei(e):dl(e.parent):null,bi=Qe(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>dl(e.parent),$root:e=>dl(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>gl(e),$forceUpdate:e=>e.f||(e.f=()=>{Za(e.update)}),$nextTick:e=>e.n||(e.n=Et.bind(e.proxy)),$watch:e=>Vv.bind(e)}),fl=(e,t)=>e!==Ue&&!e.__isScriptSetup&&Ze(e,t),pl={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:r,setupState:n,data:s,props:i,accessCache:o,type:a,appContext:l}=e;if(t[0]!=="$"){const p=o[t];if(p!==void 0)switch(p){case 1:return n[t];case 2:return s[t];case 4:return r[t];case 3:return i[t]}else{if(fl(n,t))return o[t]=1,n[t];if(s!==Ue&&Ze(s,t))return o[t]=2,s[t];if(Ze(i,t))return o[t]=3,i[t];if(r!==Ue&&Ze(r,t))return o[t]=4,r[t];hl&&(o[t]=0)}}const u=bi[t];let c,d;if(u)return t==="$attrs"&&Ht(e.attrs,"get",""),u(e);if((c=a.__cssModules)&&(c=c[t]))return c;if(r!==Ue&&Ze(r,t))return o[t]=4,r[t];if(d=l.config.globalProperties,Ze(d,t))return d[t]},set({_:e},t,r){const{data:n,setupState:s,ctx:i}=e;return fl(s,t)?(s[t]=r,!0):n!==Ue&&Ze(n,t)?(n[t]=r,!0):Ze(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=r,!0)},has({_:{data:e,setupState:t,accessCache:r,ctx:n,appContext:s,props:i,type:o}},a){let l;return!!(r[a]||e!==Ue&&a[0]!=="$"&&Ze(e,a)||fl(t,a)||Ze(i,a)||Ze(n,a)||Ze(bi,a)||Ze(s.config.globalProperties,a)||(l=o.__cssModules)&&l[a])},defineProperty(e,t,r){return r.get!=null?e._.accessCache[t]=0:Ze(r,"value")&&this.set(e,t,r.value,null),Reflect.defineProperty(e,t,r)}},dm=Qe({},pl,{get(e,t){if(t!==Symbol.unscopables)return pl.get(e,t,e)},has(e,t){return t[0]!=="_"&&!zg(t)}});function fm(){return null}function pm(){return null}function hm(e){}function gm(e){}function vm(){return null}function mm(){}function wm(e,t){return null}function ym(){return Ad("useSlots").slots}function bm(){return Ad("useAttrs").attrs}function Ad(e){const t=gt();return t.setupContext||(t.setupContext=uf(t))}function _i(e){return Se(e)?e.reduce((t,r)=>(t[r]=null,t),{}):e}function kd(e,t){const r=_i(e);for(const n in t){if(n.startsWith("__skip"))continue;let s=r[n];s?Se(s)||Oe(s)?s=r[n]={type:s,default:t[n]}:s.default=t[n]:s===null&&(s=r[n]={default:t[n]}),s&&t[`__skip_${n}`]&&(s.skipFactory=!0)}return r}function _m(e,t){return!e||!t?e||t:Se(e)&&Se(t)?e.concat(t):Qe({},_i(e),_i(t))}function Sm(e,t){const r={};for(const n in e)t.includes(n)||Object.defineProperty(r,n,{enumerable:!0,get:()=>e[n]});return r}function Cm(e){const t=gt();let r=e();Mo();const n=()=>{gt()!==t&&t.scope.off(),Mo()};return Oa(r)&&(r=r.catch(s=>{throw ns(t),Promise.resolve().then(()=>Promise.resolve().then(n)),s})),[r,()=>{ns(t),Promise.resolve().then(n)}]}var hl=!0;function xm(e){const t=gl(e),r=e.proxy,n=e.ctx;hl=!1,t.beforeCreate&&Id(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:o,watch:a,provide:l,inject:u,created:c,beforeMount:d,mounted:p,beforeUpdate:h,updated:m,activated:w,deactivated:x,beforeDestroy:v,beforeUnmount:S,destroyed:b,unmounted:y,render:T,renderTracked:I,renderTriggered:N,errorCaptured:g,serverPrefetch:B,expose:q,inheritAttrs:C,components:_,directives:E,filters:P}=t;if(u&&Tm(u,n,null),o)for(const G in o){const W=o[G];Oe(W)&&(n[G]=W.bind(r))}if(s){const G=s.call(r,r);Je(G)&&(e.data=Qr(G))}if(hl=!0,i)for(const G in i){const W=i[G],ae=V({get:Oe(W)?W.bind(r,r):Oe(W.get)?W.get.bind(r,r):dr,set:!Oe(W)&&Oe(W.set)?W.set.bind(r):dr});Object.defineProperty(n,G,{enumerable:!0,configurable:!0,get:()=>ae.value,set:Y=>ae.value=Y})}if(a)for(const G in a)Rd(a[G],n,r,G);if(l){const G=Oe(l)?l.call(r):l;Reflect.ownKeys(G).forEach(W=>{Xn(W,G[W])})}c&&Id(c,e,"c");function D(G,W){Se(W)?W.forEach(ae=>G(ae.bind(r))):W&&G(W.bind(r))}if(D(yd,d),D(tt,p),D(al,h),D(wi,m),D(vd,w),D(md,x),D(Cd,g),D(Sd,I),D(_d,N),D(Ds,S),D(jt,y),D(bd,B),Se(q))if(q.length){const G=e.exposed||(e.exposed={});q.forEach(W=>{Object.defineProperty(G,W,{get:()=>r[W],set:ae=>r[W]=ae,enumerable:!0})})}else e.exposed||(e.exposed={});T&&e.render===dr&&(e.render=T),C!=null&&(e.inheritAttrs=C),_&&(e.components=_),E&&(e.directives=E),B&&il(e)}function Tm(e,t,r=dr){Se(e)&&(e=vl(e));for(const n in e){const s=e[n];let i;Je(s)?"default"in s?i=Vt(s.from||n,s.default,!0):i=Vt(s.from||n):i=Vt(s),rt(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[n]=i}}function Id(e,t,r){pr(Se(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,r)}function Rd(e,t,r,n){let s=n.includes(".")?Qu(r,n):()=>r[n];if(it(e)){const i=t[e];Oe(i)&&He(s,i)}else if(Oe(e))He(s,e.bind(r));else if(Je(e))if(Se(e))e.forEach(i=>Rd(i,t,r,n));else{const i=Oe(e.handler)?e.handler.bind(r):t[e.handler];Oe(i)&&He(s,i,e)}}function gl(e){const t=e.type,{mixins:r,extends:n}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,a=i.get(t);let l;return a?l=a:!s.length&&!r&&!n?l=t:(l={},s.length&&s.forEach(u=>ko(l,u,o,!0)),ko(l,t,o)),Je(t)&&i.set(t,l),l}function ko(e,t,r,n=!1){const{mixins:s,extends:i}=t;i&&ko(e,i,r,!0),s&&s.forEach(o=>ko(e,o,r,!0));for(const o in t)if(!(n&&o==="expose")){const a=Em[o]||r&&r[o];e[o]=a?a(e[o],t[o]):t[o]}return e}var Em={data:$d,props:Pd,emits:Pd,methods:Si,computed:Si,beforeCreate:Ut,created:Ut,beforeMount:Ut,mounted:Ut,beforeUpdate:Ut,updated:Ut,beforeDestroy:Ut,beforeUnmount:Ut,destroyed:Ut,unmounted:Ut,activated:Ut,deactivated:Ut,errorCaptured:Ut,serverPrefetch:Ut,components:Si,directives:Si,watch:km,provide:$d,inject:Am};function $d(e,t){return t?e?function(){return Qe(Oe(e)?e.call(this,this):e,Oe(t)?t.call(this,this):t)}:t:e}function Am(e,t){return Si(vl(e),vl(t))}function vl(e){if(Se(e)){const t={};for(let r=0;r<e.length;r++)t[e[r]]=e[r];return t}return e}function Ut(e,t){return e?[...new Set([].concat(e,t))]:t}function Si(e,t){return e?Qe(Object.create(null),e,t):t}function Pd(e,t){return e?Se(e)&&Se(t)?[...new Set([...e,...t])]:Qe(Object.create(null),_i(e),_i(t??{})):t}function km(e,t){if(!e)return t;if(!t)return e;const r=Qe(Object.create(null),e);for(const n in t)r[n]=Ut(e[n],t[n]);return r}function Dd(){return{app:null,config:{isNativeTag:pu,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}var Im=0;function Rm(e,t){return function(n,s=null){Oe(n)||(n=Qe({},n)),s!=null&&!Je(s)&&(s=null);const i=Dd(),o=new WeakSet,a=[];let l=!1;const u=i.app={_uid:Im++,_component:n,_props:s,_container:null,_context:i,_instance:null,version:ff,get config(){return i.config},set config(c){},use(c,...d){return o.has(c)||(c&&Oe(c.install)?(o.add(c),c.install(u,...d)):Oe(c)&&(o.add(c),c(u,...d))),u},mixin(c){return i.mixins.includes(c)||i.mixins.push(c),u},component(c,d){return d?(i.components[c]=d,u):i.components[c]},directive(c,d){return d?(i.directives[c]=d,u):i.directives[c]},mount(c,d,p){if(!l){const h=u._ceVNode||O(n,s);return h.appContext=i,p===!0?p="svg":p===!1&&(p=void 0),d&&t?t(h,c):e(h,c,p),l=!0,u._container=c,c.__vue_app__=u,Ei(h.component)}},onUnmount(c){a.push(c)},unmount(){l&&(pr(a,u._instance,16),e(null,u._container),delete u._container.__vue_app__)},provide(c,d){return i.provides[c]=d,u},runWithContext(c){const d=Qn;Qn=u;try{return c()}finally{Qn=d}}};return u}}var Qn=null;function $m(e,t,r=Ue){const n=gt(),s=_t(t),i=Jt(t),o=Od(e,s),a=ci((l,u)=>{let c,d=Ue,p;return Xu(()=>{const h=e[s];Lt(c,h)&&(c=h,u())}),{get(){return l(),r.get?r.get(c):c},set(h){const m=r.set?r.set(h):h;if(!Lt(m,c)&&!(d!==Ue&&Lt(h,d)))return;const w=n.vnode.props;w&&(t in w||s in w||i in w)&&(`onUpdate:${t}`in w||`onUpdate:${s}`in w||`onUpdate:${i}`in w)||(c=h,u()),n.emit(`update:${t}`,m),Lt(h,m)&&Lt(h,d)&&!Lt(m,p)&&u(),d=h,p=m}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?o||Ue:a,done:!1}:{done:!0}}}},a}var Od=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${_t(t)}Modifiers`]||e[`${Jt(t)}Modifiers`];function Pm(e,t,...r){if(e.isUnmounted)return;const n=e.vnode.props||Ue;let s=r;const i=t.startsWith("update:"),o=i&&Od(n,t.slice(7));o&&(o.trim&&(s=r.map(c=>it(c)?c.trim():c)),o.number&&(s=r.map(Qi)));let a,l=n[a=_s(t)]||n[a=_s(_t(t))];!l&&i&&(l=n[a=_s(Jt(t))]),l&&pr(l,e,6,s);const u=n[a+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,pr(u,e,6,s)}}var Dm=new WeakMap;function Hd(e,t,r=!1){const n=r?Dm:t.emitsCache,s=n.get(e);if(s!==void 0)return s;const i=e.emits;let o={},a=!1;if(!Oe(e)){const l=u=>{const c=Hd(u,t,!0);c&&(a=!0,Qe(o,c))};!r&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!i&&!a?(Je(e)&&n.set(e,null),null):(Se(i)?i.forEach(l=>o[l]=null):Qe(o,i),Je(e)&&n.set(e,o),o)}function Io(e,t){return!e||!ei(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ze(e,t[0].toLowerCase()+t.slice(1))||Ze(e,Jt(t))||Ze(e,t))}function Ro(e){const{type:t,vnode:r,proxy:n,withProxy:s,propsOptions:[i],slots:o,attrs:a,emit:l,render:u,renderCache:c,props:d,data:p,setupState:h,ctx:m,inheritAttrs:w}=e,x=fi(e);let v,S;try{if(r.shapeFlag&4){const y=s||n,T=y;v=Zt(u.call(T,y,c,d,h,p,m)),S=a}else{const y=t;v=Zt(y.length>1?y(d,{attrs:a,slots:o,emit:l}):y(d,null)),S=t.props?a:Hm(a)}}catch(y){xi.length=0,Zn(y,e,1),v=O(ht)}let b=v;if(S&&w!==!1){const y=Object.keys(S),{shapeFlag:T}=b;y.length&&T&7&&(i&&y.some(Pa)&&(S=Mm(S,i)),b=Ir(b,S,!1,!0))}return r.dirs&&(b=Ir(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(r.dirs):r.dirs),r.transition&&nn(b,r.transition),v=b,fi(x),v}function Om(e,t=!0){let r;for(let n=0;n<e.length;n++){const s=e[n];if(an(s)){if(s.type!==ht||s.children==="v-if"){if(r)return;r=s}}else return}return r}var Hm=e=>{let t;for(const r in e)(r==="class"||r==="style"||ei(r))&&((t||(t={}))[r]=e[r]);return t},Mm=(e,t)=>{const r={};for(const n in e)(!Pa(n)||!(n.slice(9)in t))&&(r[n]=e[n]);return r};function Nm(e,t,r){const{props:n,children:s,component:i}=e,{props:o,children:a,patchFlag:l}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(r&&l>=0){if(l&1024)return!0;if(l&16)return n?Md(n,o,u):!!o;if(l&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const p=c[d];if(Nd(o,n,p)&&!Io(u,p))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:n===o?!1:n?o?Md(n,o,u):!0:!!o;return!1}function Md(e,t,r){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let s=0;s<n.length;s++){const i=n[s];if(Nd(t,e,i)&&!Io(r,i))return!0}return!1}function Nd(e,t,r){const n=e[r],s=t[r];return r==="style"&&Je(n)&&Je(s)?!Gr(n,s):n!==s}function $o({vnode:e,parent:t},r){for(;t;){const n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.el=e.el),n===e)(e=t.vnode).el=r,t=t.parent;else break}}var qd={},Bd=()=>Object.create(qd),Ld=e=>Object.getPrototypeOf(e)===qd;function qm(e,t,r,n=!1){const s={},i=Bd();e.propsDefaults=Object.create(null),Fd(e,t,s,i);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);r?e.props=n?s:Bu(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function Bm(e,t,r,n){const{props:s,attrs:i,vnode:{patchFlag:o}}=e,a=ze(s),[l]=e.propsOptions;let u=!1;if((n||o>0)&&!(o&16)){if(o&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let p=c[d];if(Io(e.emitsOptions,p))continue;const h=t[p];if(l)if(Ze(i,p))h!==i[p]&&(i[p]=h,u=!0);else{const m=_t(p);s[m]=ml(l,a,m,h,e,!1)}else h!==i[p]&&(i[p]=h,u=!0)}}}else{Fd(e,t,s,i)&&(u=!0);let c;for(const d in a)(!t||!Ze(t,d)&&((c=Jt(d))===d||!Ze(t,c)))&&(l?r&&(r[d]!==void 0||r[c]!==void 0)&&(s[d]=ml(l,a,d,void 0,e,!0)):delete s[d]);if(i!==a)for(const d in i)(!t||!Ze(t,d))&&(delete i[d],u=!0)}u&&Zr(e.attrs,"set","")}function Fd(e,t,r,n){const[s,i]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(Jn(l))continue;const u=t[l];let c;s&&Ze(s,c=_t(l))?!i||!i.includes(c)?r[c]=u:(a||(a={}))[c]=u:Io(e.emitsOptions,l)||(!(l in n)||u!==n[l])&&(n[l]=u,o=!0)}if(i){const l=ze(r),u=a||Ue;for(let c=0;c<i.length;c++){const d=i[c];r[d]=ml(s,l,d,u[d],e,!Ze(u,d))}}return o}function ml(e,t,r,n,s,i){const o=e[r];if(o!=null){const a=Ze(o,"default");if(a&&n===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&Oe(l)){const{propsDefaults:u}=s;if(r in u)n=u[r];else{const c=ns(s);n=u[r]=l.call(null,t),c()}}else n=l;s.ce&&s.ce._setProp(r,n)}o[0]&&(i&&!a?n=!1:o[1]&&(n===""||n===Jt(r))&&(n=!0))}return n}var Lm=new WeakMap;function Vd(e,t,r=!1){const n=r?Lm:t.propsCache,s=n.get(e);if(s)return s;const i=e.props,o={},a=[];let l=!1;if(!Oe(e)){const c=d=>{l=!0;const[p,h]=Vd(d,t,!0);Qe(o,p),h&&a.push(...h)};!r&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!i&&!l)return Je(e)&&n.set(e,ws),ws;if(Se(i))for(let c=0;c<i.length;c++){const d=_t(i[c]);jd(d)&&(o[d]=Ue)}else if(i)for(const c in i){const d=_t(c);if(jd(d)){const p=i[c],h=o[d]=Se(p)||Oe(p)?{type:p}:Qe({},p),m=h.type;let w=!1,x=!0;if(Se(m))for(let v=0;v<m.length;++v){const S=m[v],b=Oe(S)&&S.name;if(b==="Boolean"){w=!0;break}else b==="String"&&(x=!1)}else w=Oe(m)&&m.name==="Boolean";h[0]=w,h[1]=x,(w||Ze(h,"default"))&&a.push(d)}}const u=[o,a];return Je(e)&&n.set(e,u),u}function jd(e){return e[0]!=="$"&&!Jn(e)}var wl=e=>e==="_"||e==="_ctx"||e==="$stable",yl=e=>Se(e)?e.map(Zt):[Zt(e)],Fm=(e,t,r)=>{if(t._n)return t;const n=k((...s)=>yl(t(...s)),r);return n._c=!1,n},Ud=(e,t,r)=>{const n=e._ctx;for(const s in e){if(wl(s))continue;const i=e[s];if(Oe(i))t[s]=Fm(s,i,n);else if(i!=null){const o=yl(i);t[s]=()=>o}}},zd=(e,t)=>{const r=yl(t);e.slots.default=()=>r},Kd=(e,t,r)=>{for(const n in t)(r||!wl(n))&&(e[n]=t[n])},Vm=(e,t,r)=>{const n=e.slots=Bd();if(e.vnode.shapeFlag&32){const s=t._;s?(Kd(n,t,r),r&&vu(n,"_",s,!0)):Ud(t,n)}else t&&zd(e,t)},jm=(e,t,r)=>{const{vnode:n,slots:s}=e;let i=!0,o=Ue;if(n.shapeFlag&32){const a=t._;a?r&&a===1?i=!1:Kd(s,t,r):(i=!t.$stable,Ud(t,s)),o=t}else t&&(zd(e,t),o={default:1});if(i)for(const a in s)!wl(a)&&o[a]==null&&delete s[a]};function vT(){}var yt=tf;function Wd(e){return Jd(e)}function Gd(e){return Jd(e,Gv)}function Jd(e,t){const r=to();r.__VUE__=!0;const{insert:n,remove:s,patchProp:i,createElement:o,createText:a,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:p,setScopeId:h=dr,insertStaticContent:m}=e,w=(A,H,J,ie=null,ee=null,re=null,fe=void 0,de=null,ce=!!H.dynamicChildren)=>{if(A===H)return;A&&!kr(A,H)&&(ie=st(A),he(A,ee,re,!0),A=null),H.patchFlag===-2&&(ce=!1,H.dynamicChildren=null);const{type:se,ref:ke,shapeFlag:we}=H;switch(se){case Tn:x(A,H,J,ie);break;case ht:v(A,H,J,ie);break;case ts:A==null&&S(H,J,ie,fe);break;case Ke:_(A,H,J,ie,ee,re,fe,de,ce);break;default:we&1?T(A,H,J,ie,ee,re,fe,de,ce):we&6?E(A,H,J,ie,ee,re,fe,de,ce):(we&64||we&128)&&se.process(A,H,J,ie,ee,re,fe,de,ce,je)}ke!=null&&ee?Rs(ke,A&&A.ref,re,H||A,!H):ke==null&&A&&A.ref!=null&&Rs(A.ref,null,re,A,!0)},x=(A,H,J,ie)=>{if(A==null)n(H.el=a(H.children),J,ie);else{const ee=H.el=A.el;H.children!==A.children&&u(ee,H.children)}},v=(A,H,J,ie)=>{A==null?n(H.el=l(H.children||""),J,ie):H.el=A.el},S=(A,H,J,ie)=>{[A.el,A.anchor]=m(A.children,H,J,ie,A.el,A.anchor)},b=({el:A,anchor:H},J,ie)=>{let ee;for(;A&&A!==H;)ee=p(A),n(A,J,ie),A=ee;n(H,J,ie)},y=({el:A,anchor:H})=>{let J;for(;A&&A!==H;)J=p(A),s(A),A=J;s(H)},T=(A,H,J,ie,ee,re,fe,de,ce)=>{if(H.type==="svg"?fe="svg":H.type==="math"&&(fe="mathml"),A==null)I(H,J,ie,ee,re,fe,de,ce);else{const se=A.el&&A.el._isVueCE?A.el:null;try{se&&se._beginPatch(),B(A,H,ee,re,fe,de,ce)}finally{se&&se._endPatch()}}},I=(A,H,J,ie,ee,re,fe,de)=>{let ce,se;const{props:ke,shapeFlag:we,transition:_e,dirs:Me}=A;if(ce=A.el=o(A.type,re,ke&&ke.is,ke),we&8?c(ce,A.children):we&16&&g(A.children,ce,null,ie,ee,bl(A,re),fe,de),Me&&Nr(A,null,ie,"created"),N(ce,A,A.scopeId,fe,ie),ke){for(const Z in ke)Z!=="value"&&!Jn(Z)&&i(ce,Z,null,ke[Z],re,ie);"value"in ke&&i(ce,"value",null,ke.value,re),(se=ke.onVnodeBeforeMount)&&Xt(se,ie,A)}Me&&Nr(A,null,ie,"beforeMount");const Ve=Yd(ee,_e);Ve&&_e.beforeEnter(ce),n(ce,H,J),((se=ke&&ke.onVnodeMounted)||Ve||Me)&&yt(()=>{se&&Xt(se,ie,A),Ve&&_e.enter(ce),Me&&Nr(A,null,ie,"mounted")},ee)},N=(A,H,J,ie,ee)=>{if(J&&h(A,J),ie)for(let re=0;re<ie.length;re++)h(A,ie[re]);if(ee){let re=ee.subTree;if(H===re||Do(re.type)&&(re.ssContent===H||re.ssFallback===H)){const fe=ee.vnode;N(A,fe,fe.scopeId,fe.slotScopeIds,ee.parent)}}},g=(A,H,J,ie,ee,re,fe,de,ce=0)=>{for(let se=ce;se<A.length;se++)w(null,A[se]=de?ln(A[se]):Zt(A[se]),H,J,ie,ee,re,fe,de)},B=(A,H,J,ie,ee,re,fe)=>{const de=H.el=A.el;let{patchFlag:ce,dynamicChildren:se,dirs:ke}=H;ce|=A.patchFlag&16;const we=A.props||Ue,_e=H.props||Ue;let Me;if(J&&es(J,!1),(Me=_e.onVnodeBeforeUpdate)&&Xt(Me,J,H,A),ke&&Nr(H,A,J,"beforeUpdate"),J&&es(J,!0),(we.innerHTML&&_e.innerHTML==null||we.textContent&&_e.textContent==null)&&c(de,""),se?q(A.dynamicChildren,se,de,J,ie,bl(H,ee),re):fe||W(A,H,de,null,J,ie,bl(H,ee),re,!1),ce>0){if(ce&16)C(de,we,_e,J,ee);else if(ce&2&&we.class!==_e.class&&i(de,"class",null,_e.class,ee),ce&4&&i(de,"style",we.style,_e.style,ee),ce&8){const Ve=H.dynamicProps;for(let Z=0;Z<Ve.length;Z++){const ue=Ve[Z],pe=we[ue],lt=_e[ue];(lt!==pe||ue==="value")&&i(de,ue,pe,lt,ee,J)}}ce&1&&A.children!==H.children&&c(de,H.children)}else!fe&&se==null&&C(de,we,_e,J,ee);((Me=_e.onVnodeUpdated)||ke)&&yt(()=>{Me&&Xt(Me,J,H,A),ke&&Nr(H,A,J,"updated")},ie)},q=(A,H,J,ie,ee,re,fe)=>{for(let de=0;de<H.length;de++){const ce=A[de],se=H[de];w(ce,se,ce.el&&(ce.type===Ke||!kr(ce,se)||ce.shapeFlag&198)?d(ce.el):J,null,ie,ee,re,fe,!0)}},C=(A,H,J,ie,ee)=>{if(H!==J){if(H!==Ue)for(const re in H)!Jn(re)&&!(re in J)&&i(A,re,H[re],null,ee,ie);for(const re in J){if(Jn(re))continue;const fe=J[re],de=H[re];fe!==de&&re!=="value"&&i(A,re,de,fe,ee,ie)}"value"in J&&i(A,"value",H.value,J.value,ee)}},_=(A,H,J,ie,ee,re,fe,de,ce)=>{const se=H.el=A?A.el:a(""),ke=H.anchor=A?A.anchor:a("");let{patchFlag:we,dynamicChildren:_e,slotScopeIds:Me}=H;Me&&(de=de?de.concat(Me):Me),A==null?(n(se,J,ie),n(ke,J,ie),g(H.children||[],J,ke,ee,re,fe,de,ce)):we>0&&we&64&&_e&&A.dynamicChildren&&A.dynamicChildren.length===_e.length?(q(A.dynamicChildren,_e,J,ee,re,fe,de),(H.key!=null||ee&&H===ee.subTree)&&_l(A,H,!0)):W(A,H,J,ke,ee,re,fe,de,ce)},E=(A,H,J,ie,ee,re,fe,de,ce)=>{H.slotScopeIds=de,A==null?H.shapeFlag&512?ee.ctx.activate(H,J,ie,fe,ce):P(H,J,ie,ee,re,fe,ce):R(A,H,ce)},P=(A,H,J,ie,ee,re,fe)=>{const de=A.component=of(A,ie,ee);if(vi(A)&&(de.ctx.renderer=je),lf(de,!1,fe),de.asyncDep){if(ee&&ee.registerDep(de,D,fe),!A.el){const ce=de.subTree=O(ht);v(null,ce,H,J),A.placeholder=ce.el}}else D(de,A,H,J,ee,re,fe)},R=(A,H,J)=>{const ie=H.component=A.component;if(Nm(A,H,J))if(ie.asyncDep&&!ie.asyncResolved){G(ie,H,J);return}else ie.next=H,ie.update();else H.el=A.el,ie.vnode=H},D=(A,H,J,ie,ee,re,fe)=>{const de=()=>{if(A.isMounted){let{next:we,bu:_e,u:Me,parent:Ve,vnode:Z}=A;{const Wt=Zd(A);if(Wt){we&&(we.el=Z.el,G(A,we,fe)),Wt.asyncDep.then(()=>{yt(()=>{A.isUnmounted||se()},ee)});return}}let ue=we,pe;es(A,!1),we?(we.el=Z.el,G(A,we,fe)):we=Z,_e&&Ss(_e),(pe=we.props&&we.props.onVnodeBeforeUpdate)&&Xt(pe,Ve,we,Z),es(A,!0);const lt=Ro(A),Dt=A.subTree;A.subTree=lt,w(Dt,lt,d(Dt.el),st(Dt),A,ee,re),we.el=lt.el,ue===null&&$o(A,lt.el),Me&&yt(Me,ee),(pe=we.props&&we.props.onVnodeUpdated)&&yt(()=>Xt(pe,Ve,we,Z),ee)}else{let we;const{el:_e,props:Me}=H,{bm:Ve,m:Z,parent:ue,root:pe,type:lt}=A,Dt=sn(H);if(es(A,!1),Ve&&Ss(Ve),!Dt&&(we=Me&&Me.onVnodeBeforeMount)&&Xt(we,ue,H),es(A,!0),_e&&Tt){const Wt=()=>{A.subTree=Ro(A),Tt(_e,A.subTree,A,ee,null)};Dt&&lt.__asyncHydrate?lt.__asyncHydrate(_e,A,Wt):Wt()}else{pe.ce&&pe.ce._hasShadowRoot()&&pe.ce._injectChildStyle(lt);const Wt=A.subTree=Ro(A);w(null,Wt,J,ie,A,ee,re),H.el=Wt.el}if(Z&&yt(Z,ee),!Dt&&(we=Me&&Me.onVnodeMounted)){const Wt=H;yt(()=>Xt(we,ue,Wt),ee)}(H.shapeFlag&256||ue&&sn(ue.vnode)&&ue.vnode.shapeFlag&256)&&A.a&&yt(A.a,ee),A.isMounted=!0,H=J=ie=null}};A.scope.on();const ce=A.effect=new ri(de);A.scope.off();const se=A.update=ce.run.bind(ce),ke=A.job=ce.runIfDirty.bind(ce);ke.i=A,ke.id=A.uid,ce.scheduler=()=>Za(ke),es(A,!0),se()},G=(A,H,J)=>{H.component=A;const ie=A.vnode.props;A.vnode=H,A.next=null,Bm(A,H.props,ie,J),jm(A,H.children,J),Jr(),Wu(A),Yr()},W=(A,H,J,ie,ee,re,fe,de,ce=!1)=>{const se=A&&A.children,ke=A?A.shapeFlag:0,we=H.children,{patchFlag:_e,shapeFlag:Me}=H;if(_e>0){if(_e&128){Y(se,we,J,ie,ee,re,fe,de,ce);return}else if(_e&256){ae(se,we,J,ie,ee,re,fe,de,ce);return}}Me&8?(ke&16&&Re(se,ee,re),we!==se&&c(J,we)):ke&16?Me&16?Y(se,we,J,ie,ee,re,fe,de,ce):Re(se,ee,re,!0):(ke&8&&c(J,""),Me&16&&g(we,J,ie,ee,re,fe,de,ce))},ae=(A,H,J,ie,ee,re,fe,de,ce)=>{A=A||ws,H=H||ws;const se=A.length,ke=H.length,we=Math.min(se,ke);let _e;for(_e=0;_e<we;_e++){const Me=H[_e]=ce?ln(H[_e]):Zt(H[_e]);w(A[_e],Me,J,null,ee,re,fe,de,ce)}se>ke?Re(A,ee,re,!0,!1,we):g(H,J,ie,ee,re,fe,de,ce,we)},Y=(A,H,J,ie,ee,re,fe,de,ce)=>{let se=0;const ke=H.length;let we=A.length-1,_e=ke-1;for(;se<=we&&se<=_e;){const Me=A[se],Ve=H[se]=ce?ln(H[se]):Zt(H[se]);if(kr(Me,Ve))w(Me,Ve,J,null,ee,re,fe,de,ce);else break;se++}for(;se<=we&&se<=_e;){const Me=A[we],Ve=H[_e]=ce?ln(H[_e]):Zt(H[_e]);if(kr(Me,Ve))w(Me,Ve,J,null,ee,re,fe,de,ce);else break;we--,_e--}if(se>we){if(se<=_e){const Me=_e+1,Ve=Me<ke?H[Me].el:ie;for(;se<=_e;)w(null,H[se]=ce?ln(H[se]):Zt(H[se]),J,Ve,ee,re,fe,de,ce),se++}}else if(se>_e)for(;se<=we;)he(A[se],ee,re,!0),se++;else{const Me=se,Ve=se,Z=new Map;for(se=Ve;se<=_e;se++){const Gt=H[se]=ce?ln(H[se]):Zt(H[se]);Gt.key!=null&&Z.set(Gt.key,se)}let ue,pe=0;const lt=_e-Ve+1;let Dt=!1,Wt=0;const vs=new Array(lt);for(se=0;se<lt;se++)vs[se]=0;for(se=Me;se<=we;se++){const Gt=A[se];if(pe>=lt){he(Gt,ee,re,!0);continue}let Sr;if(Gt.key!=null)Sr=Z.get(Gt.key);else for(ue=Ve;ue<=_e;ue++)if(vs[ue-Ve]===0&&kr(Gt,H[ue])){Sr=ue;break}Sr===void 0?he(Gt,ee,re,!0):(vs[Sr-Ve]=se+1,Sr>=Wt?Wt=Sr:Dt=!0,w(Gt,H[Sr],J,null,ee,re,fe,de,ce),pe++)}const Wr=Dt?Um(vs):ws;for(ue=Wr.length-1,se=lt-1;se>=0;se--){const Gt=Ve+se,Sr=H[Gt],ka=H[Gt+1],Gi=Gt+1<ke?ka.el||Xd(ka):ie;vs[se]===0?w(null,Sr,J,Gi,ee,re,fe,de,ce):Dt&&(ue<0||se!==Wr[ue]?le(Sr,J,Gi,2):ue--)}}},le=(A,H,J,ie,ee=null)=>{const{el:re,type:fe,transition:de,children:ce,shapeFlag:se}=A;if(se&6){le(A.component.subTree,H,J,ie);return}if(se&128){A.suspense.move(H,J,ie);return}if(se&64){fe.move(A,H,J,je);return}if(fe===Ke){n(re,H,J);for(let ke=0;ke<ce.length;ke++)le(ce[ke],H,J,ie);n(A.anchor,H,J);return}if(fe===ts){b(A,H,J);return}if(ie!==2&&se&1&&de)if(ie===0)de.beforeEnter(re),n(re,H,J),yt(()=>de.enter(re),ee);else{const{leave:ke,delayLeave:we,afterLeave:_e}=de,Me=()=>{A.ctx.isUnmounted?s(re):n(re,H,J)},Ve=()=>{re._isLeaving&&re[qr](!0),ke(re,()=>{Me(),_e&&_e()})};we?we(re,Me,Ve):Ve()}else n(re,H,J)},he=(A,H,J,ie=!1,ee=!1)=>{const{type:re,props:fe,ref:de,children:ce,dynamicChildren:se,shapeFlag:ke,patchFlag:we,dirs:_e,cacheIndex:Me}=A;if(we===-2&&(ee=!1),de!=null&&(Jr(),Rs(de,null,J,A,!0),Yr()),Me!=null&&(H.renderCache[Me]=void 0),ke&256){H.ctx.deactivate(A);return}const Ve=ke&1&&_e,Z=!sn(A);let ue;if(Z&&(ue=fe&&fe.onVnodeBeforeUnmount)&&Xt(ue,H,A),ke&6)De(A.component,J,ie);else{if(ke&128){A.suspense.unmount(J,ie);return}Ve&&Nr(A,null,H,"beforeUnmount"),ke&64?A.type.remove(A,H,J,je,ie):se&&!se.hasOnce&&(re!==Ke||we>0&&we&64)?Re(se,H,J,!1,!0):(re===Ke&&we&384||!ee&&ke&16)&&Re(ce,H,J),ie&&Ie(A)}(Z&&(ue=fe&&fe.onVnodeUnmounted)||Ve)&&yt(()=>{ue&&Xt(ue,H,A),Ve&&Nr(A,null,H,"unmounted")},J)},Ie=A=>{const{type:H,el:J,anchor:ie,transition:ee}=A;if(H===Ke){Ne(J,ie);return}if(H===ts){y(A);return}const re=()=>{s(J),ee&&!ee.persisted&&ee.afterLeave&&ee.afterLeave()};if(A.shapeFlag&1&&ee&&!ee.persisted){const{leave:fe,delayLeave:de}=ee,ce=()=>fe(J,re);de?de(A.el,re,ce):ce()}else re()},Ne=(A,H)=>{let J;for(;A!==H;)J=p(A),s(A),A=J;s(H)},De=(A,H,J)=>{const{bum:ie,scope:ee,job:re,subTree:fe,um:de,m:ce,a:se}=A;Po(ce),Po(se),ie&&Ss(ie),ee.stop(),re&&(re.flags|=8,he(fe,A,H,J)),de&&yt(de,H),yt(()=>{A.isUnmounted=!0},H)},Re=(A,H,J,ie=!1,ee=!1,re=0)=>{for(let fe=re;fe<A.length;fe++)he(A[fe],H,J,ie,ee)},st=A=>{if(A.shapeFlag&6)return st(A.component.subTree);if(A.shapeFlag&128)return A.suspense.next();const H=p(A.anchor||A.el),J=H&&H[ed];return J?p(J):H};let mt=!1;const Ge=(A,H,J)=>{let ie;A==null?H._vnode&&(he(H._vnode,null,null,!0),ie=H._vnode.component):w(H._vnode||null,A,H,null,null,null,J),H._vnode=A,mt||(mt=!0,Wu(ie),go(),mt=!1)},je={p:w,um:he,m:le,r:Ie,mt:P,mc:g,pc:W,pbc:q,n:st,o:e};let bt,Tt;return t&&([bt,Tt]=t(je)),{render:Ge,hydrate:bt,createApp:Rm(Ge,bt)}}function bl({type:e,props:t},r){return r==="svg"&&e==="foreignObject"||r==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:r}function es({effect:e,job:t},r){r?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Yd(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function _l(e,t,r=!1){const n=e.children,s=t.children;if(Se(n)&&Se(s))for(let i=0;i<n.length;i++){const o=n[i];let a=s[i];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=s[i]=ln(s[i]),a.el=o.el),!r&&a.patchFlag!==-2&&_l(o,a)),a.type===Tn&&(a.patchFlag===-1&&(a=s[i]=ln(a)),a.el=o.el),a.type===ht&&!a.el&&(a.el=o.el)}}function Um(e){const t=e.slice(),r=[0];let n,s,i,o,a;const l=e.length;for(n=0;n<l;n++){const u=e[n];if(u!==0){if(s=r[r.length-1],e[s]<u){t[n]=s,r.push(n);continue}for(i=0,o=r.length-1;i<o;)a=i+o>>1,e[r[a]]<u?i=a+1:o=a;u<e[r[i]]&&(i>0&&(t[n]=r[i-1]),r[i]=n)}}for(i=r.length,o=r[i-1];i-- >0;)r[i]=o,o=t[o];return r}function Zd(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Zd(t)}function Po(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Xd(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Xd(t.subTree):null}var Do=e=>e.__isSuspense,Sl=0,zm={name:"Suspense",__isSuspense:!0,process(e,t,r,n,s,i,o,a,l,u){if(e==null)Km(t,r,n,s,i,o,a,l,u);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}Wm(e,t,r,n,s,o,a,l,u)}},hydrate:Gm,normalize:Jm};function Ci(e,t){const r=e.props&&e.props[t];Oe(r)&&r()}function Km(e,t,r,n,s,i,o,a,l){const{p:u,o:{createElement:c}}=l,d=c("div"),p=e.suspense=Qd(e,s,n,t,d,r,i,o,a,l);u(null,p.pendingBranch=e.ssContent,d,null,n,p,i,o),p.deps>0?(Ci(e,"onPending"),Ci(e,"onFallback"),u(null,e.ssFallback,t,r,n,null,i,o),Os(p,e.ssFallback)):p.resolve(!1,!0)}function Wm(e,t,r,n,s,i,o,a,{p:l,um:u,o:{createElement:c}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const p=t.ssContent,h=t.ssFallback,{activeBranch:m,pendingBranch:w,isInFallback:x,isHydrating:v}=d;if(w)d.pendingBranch=p,kr(w,p)?(l(w,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0?d.resolve():x&&(v||(l(m,h,r,n,s,null,i,o,a),Os(d,h)))):(d.pendingId=Sl++,v?(d.isHydrating=!1,d.activeBranch=w):u(w,s,d),d.deps=0,d.effects.length=0,d.hiddenContainer=c("div"),x?(l(null,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0?d.resolve():(l(m,h,r,n,s,null,i,o,a),Os(d,h))):m&&kr(m,p)?(l(m,p,r,n,s,d,i,o,a),d.resolve(!0)):(l(null,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0&&d.resolve()));else if(m&&kr(m,p))l(m,p,r,n,s,d,i,o,a),Os(d,p);else if(Ci(t,"onPending"),d.pendingBranch=p,p.shapeFlag&512?d.pendingId=p.component.suspenseId:d.pendingId=Sl++,l(null,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0)d.resolve();else{const{timeout:S,pendingId:b}=d;S>0?setTimeout(()=>{d.pendingId===b&&d.fallback(h)},S):S===0&&d.fallback(h)}}function Qd(e,t,r,n,s,i,o,a,l,u,c=!1){const{p:d,m:p,um:h,n:m,o:{parentNode:w,remove:x}}=u;let v;const S=Ym(e);S&&t&&t.pendingBranch&&(v=t.pendingId,t.deps++);const b=e.props?eo(e.props.timeout):void 0,y=i,T={vnode:e,parent:t,parentComponent:r,namespace:o,container:n,hiddenContainer:s,deps:0,pendingId:Sl++,timeout:typeof b=="number"?b:-1,activeBranch:null,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(I=!1,N=!1){const{vnode:g,activeBranch:B,pendingBranch:q,pendingId:C,effects:_,parentComponent:E,container:P,isInFallback:R}=T;let D=!1;T.isHydrating?T.isHydrating=!1:I||(D=B&&q.transition&&q.transition.mode==="out-in",D&&(B.transition.afterLeave=()=>{C===T.pendingId&&(p(q,P,i===y?m(B):i,0),ui(_),R&&g.ssFallback&&(g.ssFallback.el=null))}),B&&(w(B.el)===P&&(i=m(B)),h(B,E,T,!0),!D&&R&&g.ssFallback&&yt(()=>g.ssFallback.el=null,T)),D||p(q,P,i,0)),Os(T,q),T.pendingBranch=null,T.isInFallback=!1;let G=T.parent,W=!1;for(;G;){if(G.pendingBranch){G.effects.push(..._),W=!0;break}G=G.parent}!W&&!D&&ui(_),T.effects=[],S&&t&&t.pendingBranch&&v===t.pendingId&&(t.deps--,t.deps===0&&!N&&t.resolve()),Ci(g,"onResolve")},fallback(I){if(!T.pendingBranch)return;const{vnode:N,activeBranch:g,parentComponent:B,container:q,namespace:C}=T;Ci(N,"onFallback");const _=m(g),E=()=>{T.isInFallback&&(d(null,I,q,_,B,null,C,a,l),Os(T,I))},P=I.transition&&I.transition.mode==="out-in";P&&(g.transition.afterLeave=E),T.isInFallback=!0,h(g,B,null,!0),P||E()},move(I,N,g){T.activeBranch&&p(T.activeBranch,I,N,g),T.container=I},next(){return T.activeBranch&&m(T.activeBranch)},registerDep(I,N,g){const B=!!T.pendingBranch;B&&T.deps++;const q=I.vnode.el;I.asyncDep.catch(C=>{Zn(C,I,0)}).then(C=>{if(I.isUnmounted||T.isUnmounted||T.pendingId!==I.suspenseId)return;I.asyncResolved=!0;const{vnode:_}=I;El(I,C,!1),q&&(_.el=q);const E=!q&&I.subTree.el;N(I,_,w(q||I.subTree.el),q?null:m(I.subTree),T,o,g),E&&(_.placeholder=null,x(E)),$o(I,_.el),B&&--T.deps===0&&T.resolve()})},unmount(I,N){T.isUnmounted=!0,T.activeBranch&&h(T.activeBranch,r,I,N),T.pendingBranch&&h(T.pendingBranch,r,I,N)}};return T}function Gm(e,t,r,n,s,i,o,a,l){const u=t.suspense=Qd(t,n,r,e.parentNode,document.createElement("div"),null,s,i,o,a,!0),c=l(e,u.pendingBranch=t.ssContent,r,u,i,o);return u.deps===0&&u.resolve(!1,!0),c}function Jm(e){const{shapeFlag:t,children:r}=e,n=t&32;e.ssContent=ef(n?r.default:r),e.ssFallback=n?ef(r.fallback):O(ht)}function ef(e){let t;if(Oe(e)){const r=rs&&e._c;r&&(e._d=!1,$()),e=e(),r&&(e._d=!0,t=qt,rf())}return Se(e)&&(e=Om(e)),e=Zt(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(r=>r!==e)),e}function tf(e,t){t&&t.pendingBranch?Se(e)?t.effects.push(...e):t.effects.push(e):ui(e)}function Os(e,t){e.activeBranch=t;const{vnode:r,parentComponent:n}=e;let s=t.el;for(;!s&&t.component;)t=t.component.subTree,s=t.el;r.el=s,n&&n.subTree===r&&(n.vnode.el=s,$o(n,s))}function Ym(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}var Ke=Symbol.for("v-fgt"),Tn=Symbol.for("v-txt"),ht=Symbol.for("v-cmt"),ts=Symbol.for("v-stc"),xi=[],qt=null;function $(e=!1){xi.push(qt=e?null:[])}function rf(){xi.pop(),qt=xi[xi.length-1]||null}var rs=1;function Ti(e,t=!1){rs+=e,e<0&&qt&&t&&(qt.hasOnce=!0)}function nf(e){return e.dynamicChildren=rs>0?qt||ws:null,rf(),rs>0&&qt&&qt.push(e),e}function Ce(e,t,r,n,s,i){return nf(Q(e,t,r,n,s,i,!0))}function U(e,t,r,n,s){return nf(O(e,t,r,n,s,!0))}function an(e){return e?e.__v_isVNode===!0:!1}function kr(e,t){return e.type===t.type&&e.key===t.key}function Zm(e){}var sf=({key:e})=>e??null,Oo=({ref:e,ref_key:t,ref_for:r})=>(typeof e=="number"&&(e=""+e),e!=null?it(e)||rt(e)||Oe(e)?{i:It,r:e,k:t,f:!!r}:e:null);function Q(e,t=null,r=null,n=0,s=null,i=e===Ke?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&sf(t),ref:t&&Oo(t),scopeId:mo,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:n,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:It};return a?(xl(l,r),i&128&&e.normalize(l)):r&&(l.shapeFlag|=it(r)?8:16),rs>0&&!o&&qt&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&qt.push(l),l}var O=Xm;function Xm(e,t=null,r=null,n=0,s=null,i=!1){if((!e||e===xd)&&(e=ht),an(e)){const a=Ir(e,t,!0);return r&&xl(a,r),rs>0&&!i&&qt&&(a.shapeFlag&6?qt[qt.indexOf(e)]=a:qt.push(a)),a.patchFlag=-2,a}if(i0(e)&&(e=e.__vccOpts),t){t=nr(t);let{class:a,style:l}=t;a&&!it(a)&&(t.class=et(a)),Je(l)&&(li(l)&&!Se(l)&&(l=Qe({},l)),t.style=St(l))}const o=it(e)?1:Do(e)?128:td(e)?64:Je(e)?4:Oe(e)?2:0;return Q(e,t,r,n,s,o,i,!0)}function nr(e){return e?li(e)||Ld(e)?Qe({},e):e:null}function Ir(e,t,r=!1,n=!1){const{props:s,ref:i,patchFlag:o,children:a,transition:l}=e,u=t?me(s||{},t):s,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&sf(u),ref:t&&t.ref?r&&i?Se(i)?i.concat(Oo(t)):[i,Oo(t)]:Oo(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ke?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ir(e.ssContent),ssFallback:e.ssFallback&&Ir(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&n&&nn(c,l.clone(c)),c}function qe(e=" ",t=0){return O(Tn,null,e,t)}function Cl(e,t){const r=O(ts,null,e);return r.staticCount=t,r}function Be(e="",t=!1){return t?($(),U(ht,null,e)):O(ht,null,e)}function Zt(e){return e==null||typeof e=="boolean"?O(ht):Se(e)?O(Ke,null,e.slice()):an(e)?ln(e):O(Tn,null,String(e))}function ln(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ir(e)}function xl(e,t){let r=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(Se(t))r=16;else if(typeof t=="object")if(n&65){const s=t.default;s&&(s._c&&(s._d=!1),xl(e,s()),s._c&&(s._d=!0));return}else{r=32;const s=t._;!s&&!Ld(t)?t._ctx=It:s===3&&It&&(It.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Oe(t)?(t={default:t,_ctx:It},r=32):(t=String(t),n&64?(r=16,t=[qe(t)]):r=8);e.children=t,e.shapeFlag|=r}function me(...e){const t={};for(let r=0;r<e.length;r++){const n=e[r];for(const s in n)if(s==="class")t.class!==n.class&&(t.class=et([t.class,n.class]));else if(s==="style")t.style=St([t.style,n.style]);else if(ei(s)){const i=t[s],o=n[s];o&&i!==o&&!(Se(i)&&i.includes(o))&&(t[s]=i?[].concat(i,o):o)}else s!==""&&(t[s]=n[s])}return t}function Xt(e,t,r,n=null){pr(e,t,7,[r,n])}var Qm=Dd(),e0=0;function of(e,t,r){const n=e.type,s=(t?t.appContext:e.appContext)||Qm,i={uid:e0++,vnode:e,type:n,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ma(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Vd(n,s),emitsOptions:Hd(n,s),emit:null,emitted:null,propsDefaults:Ue,inheritAttrs:n.inheritAttrs,ctx:Ue,data:Ue,props:Ue,attrs:Ue,slots:Ue,refs:Ue,setupState:Ue,setupContext:null,suspense:r,suspenseId:r?r.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=Pm.bind(null,i),e.ce&&e.ce(i),i}var Rt=null,gt=()=>Rt||It,Ho,Tl;{const e=to(),t=(r,n)=>{let s;return(s=e[r])||(s=e[r]=[]),s.push(n),i=>{s.length>1?s.forEach(o=>o(i)):s[0](i)}};Ho=t("__VUE_INSTANCE_SETTERS__",r=>Rt=r),Tl=t("__VUE_SSR_SETTERS__",r=>Hs=r)}var ns=e=>{const t=Rt;return Ho(e),e.scope.on(),()=>{e.scope.off(),Ho(t)}},Mo=()=>{Rt&&Rt.scope.off(),Ho(null)};function af(e){return e.vnode.shapeFlag&4}var Hs=!1;function lf(e,t=!1,r=!1){t&&Tl(t);const{props:n,children:s}=e.vnode,i=af(e);qm(e,n,i,t),Vm(e,s,r||t);const o=i?t0(e,t):void 0;return t&&Tl(!1),o}function t0(e,t){const r=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,pl);const{setup:n}=r;if(n){Jr();const s=e.setupContext=n.length>1?uf(e):null,i=ns(e),o=Ts(n,e,0,[e.props,s]),a=Oa(o);if(Yr(),i(),(a||e.sp)&&!sn(e)&&il(e),a){if(o.then(Mo,Mo),t)return o.then(l=>{El(e,l,t)}).catch(l=>{Zn(l,e,0)});e.asyncDep=o}else El(e,o,t)}else cf(e,t)}function El(e,t,r){Oe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Je(t)&&(e.setupState=Ja(t)),cf(e,r)}var No,Al;function r0(e){No=e,Al=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,dm))}}var n0=()=>!No;function cf(e,t,r){const n=e.type;if(!e.render){if(!t&&No&&!n.render){const s=n.template||gl(e).template;if(s){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:a,compilerOptions:l}=n,u=Qe(Qe({isCustomElement:i,delimiters:a},o),l);n.render=No(s,u)}}e.render=n.render||dr,Al&&Al(e)}{const s=ns(e);Jr();try{xm(e)}finally{Yr(),s()}}}var s0={get(e,t){return Ht(e,"get",""),e[t]}};function uf(e){const t=r=>{e.exposed=r||{}};return{attrs:new Proxy(e.attrs,s0),slots:e.slots,emit:e.emit,expose:t}}function Ei(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ja(Ga(e.exposed)),{get(t,r){if(r in t)return t[r];if(r in bi)return bi[r](e)},has(t,r){return r in t||r in bi}})):e.proxy}function kl(e,t=!0){return Oe(e)?e.displayName||e.name:e.name||t&&e.__name}function i0(e){return Oe(e)&&"__vccOpts"in e}var V=(e,t)=>Ev(e,t,Hs);function vr(e,t,r){try{Ti(-1);const n=arguments.length;return n===2?Je(t)&&!Se(t)?an(t)?O(e,null,[t]):O(e,t):O(e,null,t):(n>3?r=Array.prototype.slice.call(arguments,2):n===3&&an(r)&&(r=[r]),O(e,t,r))}finally{Ti(1)}}function o0(){return;function e(t,r,n){const s=t[n];if(Se(s)&&s.includes(r)||Je(s)&&r in s||t.extends&&e(t.extends,r,n)||t.mixins&&t.mixins.some(i=>e(i,r,n)))return!0}}function a0(e,t,r,n){const s=r[n];if(s&&df(s,e))return s;const i=t();return i.memo=e.slice(),i.cacheIndex=n,r[n]=i}function df(e,t){const r=e.memo;if(r.length!=t.length)return!1;for(let n=0;n<r.length;n++)if(Lt(r[n],t[n]))return!1;return rs>0&&qt&&qt.push(e),!0}var ff="3.5.29",l0=dr,c0=Hv,u0=ks,d0=Ju,f0={createComponentInstance:of,setupComponent:lf,renderComponentRoot:Ro,setCurrentRenderingInstance:fi,isVNode:an,normalizeVNode:Zt,getComponentPublicInstance:Ei,ensureValidVNode:ul,pushWarningContext:$v,popWarningContext:Pv},mT=null,wT=null,yT=null;var Il=void 0,pf=typeof window<"u"&&window.trustedTypes;if(pf)try{Il=pf.createPolicy("vue",{createHTML:e=>e})}catch{}var hf=Il?e=>Il.createHTML(e):e=>e,p0="http://www.w3.org/2000/svg",h0="http://www.w3.org/1998/Math/MathML",cn=typeof document<"u"?document:null,gf=cn&&cn.createElement("template"),vf={insert:(e,t,r)=>{t.insertBefore(e,r||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,r,n)=>{const s=t==="svg"?cn.createElementNS(p0,e):t==="mathml"?cn.createElementNS(h0,e):r?cn.createElement(e,{is:r}):cn.createElement(e);return e==="select"&&n&&n.multiple!=null&&s.setAttribute("multiple",n.multiple),s},createText:e=>cn.createTextNode(e),createComment:e=>cn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>cn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,r,n,s,i){const o=r?r.previousSibling:t.lastChild;if(s&&(s===i||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),r),!(s===i||!(s=s.nextSibling)););else{gf.innerHTML=hf(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=gf.content;if(n==="svg"||n==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,r)}return[o?o.nextSibling:t.firstChild,r?r.previousSibling:t.lastChild]}},En="transition",Ai="animation",Ms=Symbol("_vtc"),mf={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},wf=Qe({},nl,mf),g0=e=>(e.displayName="Transition",e.props=wf,e),v0=g0((e,{slots:t})=>vr(ld,bf(e),t)),ss=(e,t=[])=>{Se(e)?e.forEach(r=>r(...t)):e&&e(...t)},yf=e=>e?Se(e)?e.some(t=>t.length>1):e.length>1:!1;function bf(e){const t={};for(const _ in e)_ in mf||(t[_]=e[_]);if(e.css===!1)return t;const{name:r="v",type:n,duration:s,enterFromClass:i=`${r}-enter-from`,enterActiveClass:o=`${r}-enter-active`,enterToClass:a=`${r}-enter-to`,appearFromClass:l=i,appearActiveClass:u=o,appearToClass:c=a,leaveFromClass:d=`${r}-leave-from`,leaveActiveClass:p=`${r}-leave-active`,leaveToClass:h=`${r}-leave-to`}=e,m=m0(s),w=m&&m[0],x=m&&m[1],{onBeforeEnter:v,onEnter:S,onEnterCancelled:b,onLeave:y,onLeaveCancelled:T,onBeforeAppear:I=v,onAppear:N=S,onAppearCancelled:g=b}=t,B=(_,E,P,R)=>{_._enterCancelled=R,An(_,E?c:a),An(_,E?u:o),P&&P()},q=(_,E)=>{_._isLeaving=!1,An(_,d),An(_,h),An(_,p),E&&E()},C=_=>(E,P)=>{const R=_?N:S,D=()=>B(E,_,P);ss(R,[E,D]),_f(()=>{An(E,_?l:i),Br(E,_?c:a),yf(R)||Sf(E,n,w,D)})};return Qe(t,{onBeforeEnter(_){ss(v,[_]),Br(_,i),Br(_,o)},onBeforeAppear(_){ss(I,[_]),Br(_,l),Br(_,u)},onEnter:C(!1),onAppear:C(!0),onLeave(_,E){_._isLeaving=!0;const P=()=>q(_,E);Br(_,d),_._enterCancelled?(Br(_,p),$l(_)):($l(_),Br(_,p)),_f(()=>{_._isLeaving&&(An(_,d),Br(_,h),yf(y)||Sf(_,n,x,P))}),ss(y,[_,P])},onEnterCancelled(_){B(_,!1,void 0,!0),ss(b,[_])},onAppearCancelled(_){B(_,!0,void 0,!0),ss(g,[_])},onLeaveCancelled(_){q(_),ss(T,[_])}})}function m0(e){if(e==null)return null;if(Je(e))return[Rl(e.enter),Rl(e.leave)];{const t=Rl(e);return[t,t]}}function Rl(e){return eo(e)}function Br(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.add(r)),(e[Ms]||(e[Ms]=new Set)).add(t)}function An(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const r=e[Ms];r&&(r.delete(t),r.size||(e[Ms]=void 0))}function _f(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var w0=0;function Sf(e,t,r,n){const s=e._endId=++w0,i=()=>{s===e._endId&&n()};if(r!=null)return setTimeout(i,r);const{type:o,timeout:a,propCount:l}=Cf(e,t);if(!o)return n();const u=o+"end";let c=0;const d=()=>{e.removeEventListener(u,p),i()},p=h=>{h.target===e&&++c>=l&&d()};setTimeout(()=>{c<l&&d()},a+1),e.addEventListener(u,p)}function Cf(e,t){const r=window.getComputedStyle(e),n=m=>(r[m]||"").split(", "),s=n(`${En}Delay`),i=n(`${En}Duration`),o=xf(s,i),a=n(`${Ai}Delay`),l=n(`${Ai}Duration`),u=xf(a,l);let c=null,d=0,p=0;t===En?o>0&&(c=En,d=o,p=i.length):t===Ai?u>0&&(c=Ai,d=u,p=l.length):(d=Math.max(o,u),c=d>0?o>u?En:Ai:null,p=c?c===En?i.length:l.length:0);const h=c===En&&/\b(?:transform|all)(?:,|$)/.test(n(`${En}Property`).toString());return{type:c,timeout:d,propCount:p,hasTransform:h}}function xf(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((r,n)=>Tf(r)+Tf(e[n])))}function Tf(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function $l(e){return(e?e.ownerDocument:document).body.offsetHeight}function y0(e,t,r){const n=e[Ms];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):r?e.setAttribute("class",t):e.className=t}var qo=Symbol("_vod"),Ef=Symbol("_vsh"),Bo={name:"show",beforeMount(e,{value:t},{transition:r}){e[qo]=e.style.display==="none"?"":e.style.display,r&&t?r.beforeEnter(e):ki(e,t)},mounted(e,{value:t},{transition:r}){r&&t&&r.enter(e)},updated(e,{value:t,oldValue:r},{transition:n}){!t!=!r&&(n?t?(n.beforeEnter(e),ki(e,!0),n.enter(e)):n.leave(e,()=>{ki(e,!1)}):ki(e,t))},beforeUnmount(e,{value:t}){ki(e,t)}};function ki(e,t){e.style.display=t?e[qo]:"none",e[Ef]=!t}function b0(){Bo.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}var Af=Symbol("");function _0(e){const t=gt();if(!t)return;const r=t.ut=(s=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(i=>Lo(i,s))},n=()=>{const s=e(t.proxy);t.ce?Lo(t.ce,s):Pl(t.subTree,s),r(s)};al(()=>{ui(n)}),tt(()=>{He(n,dr,{flush:"post"});const s=new MutationObserver(n);s.observe(t.subTree.el.parentNode,{childList:!0}),jt(()=>s.disconnect())})}function Pl(e,t){if(e.shapeFlag&128){const r=e.suspense;e=r.activeBranch,r.pendingBranch&&!r.isHydrating&&r.effects.push(()=>{Pl(r.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)Lo(e.el,t);else if(e.type===Ke)e.children.forEach(r=>Pl(r,t));else if(e.type===ts){let{el:r,anchor:n}=e;for(;r&&(Lo(r,t),r!==n);)r=r.nextSibling}}function Lo(e,t){if(e.nodeType===1){const r=e.style;let n="";for(const s in t){const i=Xg(t[s]);r.setProperty(`--${s}`,i),n+=`--${s}: ${i};`}r[Af]=n}}var S0=/(?:^|;)\s*display\s*:/;function C0(e,t,r){const n=e.style,s=it(r);let i=!1;if(r&&!s){if(t)if(it(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();r[a]==null&&Fo(n,a,"")}else for(const o in t)r[o]==null&&Fo(n,o,"");for(const o in r)o==="display"&&(i=!0),Fo(n,o,r[o])}else if(s){if(t!==r){const o=n[Af];o&&(r+=";"+o),n.cssText=r,i=S0.test(r)}}else t&&e.removeAttribute("style");qo in e&&(e[qo]=i?n.display:"",e[Ef]&&(n.display="none"))}var kf=/\s*!important$/;function Fo(e,t,r){if(Se(r))r.forEach(n=>Fo(e,t,n));else if(r==null&&(r=""),t.startsWith("--"))e.setProperty(t,r);else{const n=x0(e,t);kf.test(r)?e.setProperty(Jt(n),r.replace(kf,""),"important"):e[n]=r}}var If=["Webkit","Moz","ms"],Dl={};function x0(e,t){const r=Dl[t];if(r)return r;let n=_t(t);if(n!=="filter"&&n in e)return Dl[t]=n;n=ti(n);for(let s=0;s<If.length;s++){const i=If[s]+n;if(i in e)return Dl[t]=i}return t}var Rf="http://www.w3.org/1999/xlink";function $f(e,t,r,n,s,i=Yg(t)){n&&t.startsWith("xlink:")?r==null?e.removeAttributeNS(Rf,t.slice(6,t.length)):e.setAttributeNS(Rf,t,r):r==null||i&&!yu(r)?e.removeAttribute(t):e.setAttribute(t,i?"":Tr(r)?String(r):r)}function Pf(e,t,r,n,s){if(t==="innerHTML"||t==="textContent"){r!=null&&(e[t]=t==="innerHTML"?hf(r):r);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const a=i==="OPTION"?e.getAttribute("value")||"":e.value,l=r==null?e.type==="checkbox"?"on":"":String(r);(a!==l||!("_value"in e))&&(e.value=l),r==null&&e.removeAttribute(t),e._value=r;return}let o=!1;if(r===""||r==null){const a=typeof e[t];a==="boolean"?r=yu(r):r==null&&a==="string"?(r="",o=!0):a==="number"&&(r=0,o=!0)}try{e[t]=r}catch{}o&&e.removeAttribute(s||t)}function un(e,t,r,n){e.addEventListener(t,r,n)}function T0(e,t,r,n){e.removeEventListener(t,r,n)}var Df=Symbol("_vei");function E0(e,t,r,n,s=null){const i=e[Df]||(e[Df]={}),o=i[t];if(n&&o)o.value=n;else{const[a,l]=A0(t);n?un(e,a,i[t]=R0(n,s),l):o&&(T0(e,a,o,l),i[t]=void 0)}}var Of=/(?:Once|Passive|Capture)$/;function A0(e){let t;if(Of.test(e)){t={};let r;for(;r=e.match(Of);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Jt(e.slice(2)),t]}var Ol=0,k0=Promise.resolve(),I0=()=>Ol||(k0.then(()=>Ol=0),Ol=Date.now());function R0(e,t){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;pr($0(n,r.value),t,5,[n])};return r.value=e,r.attached=I0(),r}function $0(e,t){if(Se(t)){const r=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{r.call(e),e._stopped=!0},t.map(n=>s=>!s._stopped&&n&&n(s))}else return t}var Hf=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Mf=(e,t,r,n,s,i)=>{const o=s==="svg";t==="class"?y0(e,n,o):t==="style"?C0(e,r,n):ei(t)?Pa(t)||E0(e,t,r,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):P0(e,t,n,o))?(Pf(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&$f(e,t,n,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!it(n))?Pf(e,_t(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),$f(e,t,n,o))};function P0(e,t,r,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Hf(t)&&Oe(r));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return Hf(t)&&it(r)?!1:t in e}var Nf={};function Hl(e,t,r){let n=X(e,t);Yi(n)&&(n=Qe({},n,t));class s extends qf{constructor(o){super(n,o,r)}}return s.def=n,s}var D0=((e,t)=>Hl(e,t,np)),O0=typeof HTMLElement<"u"?HTMLElement:class{},qf=class Dg extends O0{constructor(t,r={},n=Bl){super(),this._def=t,this._props=r,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&n!==Bl?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(Qe({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof Dg){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,Et(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(t){for(const r of t)this._setAttr(r.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let n=0;n<this.attributes.length;n++)this._setAttr(this.attributes[n].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});const t=(n,s=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:i,styles:o}=n;let a;if(i&&!Se(i))for(const l in i){const u=i[l];(u===Number||u&&u.type===Number)&&(l in this._props&&(this._props[l]=eo(this._props[l])),(a||(a=Object.create(null)))[_t(l)]=!0)}this._numberProps=a,this._resolveProps(n),this.shadowRoot&&this._applyStyles(o),this._mount(n)},r=this._def.__asyncLoader;r?this._pendingResolve=r().then(n=>{n.configureApp=this._def.configureApp,t(this._def=n,!0)}):t(this._def)}_mount(t){this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const r=this._instance&&this._instance.exposed;if(r)for(const n in r)Ze(this,n)||Object.defineProperty(this,n,{get:()=>f(r[n])})}_resolveProps(t){const{props:r}=t,n=Se(r)?r:Object.keys(r||{});for(const s of Object.keys(this))s[0]!=="_"&&n.includes(s)&&this._setProp(s,this[s]);for(const s of n.map(_t))Object.defineProperty(this,s,{get(){return this._getProp(s)},set(i){this._setProp(s,i,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const r=this.hasAttribute(t);let n=r?this.getAttribute(t):Nf;const s=_t(t);r&&this._numberProps&&this._numberProps[s]&&(n=eo(n)),this._setProp(s,n,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,r,n=!0,s=!1){if(r!==this._props[t]&&(this._dirty=!0,r===Nf?delete this._props[t]:(this._props[t]=r,t==="key"&&this._app&&(this._app._ceVNode.key=r)),s&&this._instance&&this._update(),n)){const i=this._ob;i&&(this._processMutations(i.takeRecords()),i.disconnect()),r===!0?this.setAttribute(Jt(t),""):typeof r=="string"||typeof r=="number"?this.setAttribute(Jt(t),r+""):r||this.removeAttribute(Jt(t)),i&&i.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),rp(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const r=O(this._def,Qe(t,this._props));return this._instance||(r.ce=n=>{this._instance=n,n.ce=this,n.isCE=!0;const s=(i,o)=>{this.dispatchEvent(new CustomEvent(i,Yi(o[0])?Qe({detail:o},o[0]):{detail:o}))};n.emit=(i,...o)=>{s(i,o),Jt(i)!==i&&s(Jt(i),o)},this._setParent()}),r}_applyStyles(t,r){if(!t)return;if(r){if(r===this._def||this._styleChildren.has(r))return;this._styleChildren.add(r)}const n=this._nonce;for(let s=t.length-1;s>=0;s--){const i=document.createElement("style");n&&i.setAttribute("nonce",n),i.textContent=t[s],this.shadowRoot.prepend(i)}}_parseSlots(){const t=this._slots={};let r;for(;r=this.firstChild;){const n=r.nodeType===1&&r.getAttribute("slot")||"default";(t[n]||(t[n]=[])).push(r),this.removeChild(r)}}_renderSlots(){const t=this._getSlots(),r=this._instance.type.__scopeId;for(let n=0;n<t.length;n++){const s=t[n],i=s.getAttribute("name")||"default",o=this._slots[i],a=s.parentNode;if(o)for(const l of o){if(r&&l.nodeType===1){const u=r+"-s",c=document.createTreeWalker(l,1);l.setAttribute(u,"");let d;for(;d=c.nextNode();)d.setAttribute(u,"")}a.insertBefore(l,s)}else for(;s.firstChild;)a.insertBefore(s.firstChild,s);a.removeChild(s)}}_getSlots(){const t=[this];this._teleportTargets&&t.push(...this._teleportTargets);const r=new Set;for(const n of t){const s=n.querySelectorAll("slot");for(let i=0;i<s.length;i++)r.add(s[i])}return Array.from(r)}_injectChildStyle(t){this._applyStyles(t.styles,t)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_hasShadowRoot(){return this._def.shadowRoot!==!1}_removeChildStyle(t){}};function Bf(e){const t=gt(),r=t&&t.ce;return r||null}function H0(){const e=Bf();return e&&e.shadowRoot}function M0(e="$style"){{const t=gt();if(!t)return Ue;const r=t.type.__cssModules;if(!r)return Ue;const n=r[e];return n||Ue}}var Lf=new WeakMap,Ff=new WeakMap,Vo=Symbol("_moveCb"),Vf=Symbol("_enterCb"),N0=e=>(delete e.props.mode,e),q0=N0({name:"TransitionGroup",props:Qe({},wf,{tag:String,moveClass:String}),setup(e,{slots:t}){const r=gt(),n=rl();let s,i;return wi(()=>{if(!s.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!V0(s[0].el,r.vnode.el,o)){s=[];return}s.forEach(B0),s.forEach(L0);const a=s.filter(F0);$l(r.vnode.el),a.forEach(l=>{const u=l.el,c=u.style;Br(u,o),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[Vo]=p=>{p&&p.target!==u||(!p||p.propertyName.endsWith("transform"))&&(u.removeEventListener("transitionend",d),u[Vo]=null,An(u,o))};u.addEventListener("transitionend",d)}),s=[]}),()=>{const o=ze(e),a=bf(o);let l=o.tag||Ke;if(s=[],i)for(let u=0;u<i.length;u++){const c=i[u];c.el&&c.el instanceof Element&&(s.push(c),nn(c,Is(c,a,n,r)),Lf.set(c,jf(c.el)))}i=t.default?_o(t.default()):[];for(let u=0;u<i.length;u++){const c=i[u];c.key!=null&&nn(c,Is(c,a,n,r))}return O(l,null,i)}}});function B0(e){const t=e.el;t[Vo]&&t[Vo](),t[Vf]&&t[Vf]()}function L0(e){Ff.set(e,jf(e.el))}function F0(e){const t=Lf.get(e),r=Ff.get(e),n=t.left-r.left,s=t.top-r.top;if(n||s){const i=e.el,o=i.style,a=i.getBoundingClientRect();let l=1,u=1;return i.offsetWidth&&(l=a.width/i.offsetWidth),i.offsetHeight&&(u=a.height/i.offsetHeight),(!Number.isFinite(l)||l===0)&&(l=1),(!Number.isFinite(u)||u===0)&&(u=1),Math.abs(l-1)<.01&&(l=1),Math.abs(u-1)<.01&&(u=1),o.transform=o.webkitTransform=`translate(${n/l}px,${s/u}px)`,o.transitionDuration="0s",e}}function jf(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function V0(e,t,r){const n=e.cloneNode(),s=e[Ms];s&&s.forEach(a=>{a.split(/\s+/).forEach(l=>l&&n.classList.remove(l))}),r.split(/\s+/).forEach(a=>a&&n.classList.add(a)),n.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(n);const{hasTransform:o}=Cf(n);return i.removeChild(n),o}var kn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Se(t)?r=>Ss(t,r):t};function j0(e){e.target.composing=!0}function Uf(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}var mr=Symbol("_assign");function zf(e,t,r){return t&&(e=e.trim()),r&&(e=Qi(e)),e}var Ii={created(e,{modifiers:{lazy:t,trim:r,number:n}},s){e[mr]=kn(s);const i=n||s.props&&s.props.type==="number";un(e,t?"change":"input",o=>{o.target.composing||e[mr](zf(e.value,r,i))}),(r||i)&&un(e,"change",()=>{e.value=zf(e.value,r,i)}),t||(un(e,"compositionstart",j0),un(e,"compositionend",Uf),un(e,"change",Uf))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:r,modifiers:{lazy:n,trim:s,number:i}},o){if(e[mr]=kn(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?Qi(e.value):e.value,l=t??"";a!==l&&(document.activeElement===e&&e.type!=="range"&&(n&&t===r||s&&e.value.trim()===l)||(e.value=l))}},Ml={deep:!0,created(e,t,r){e[mr]=kn(r),un(e,"change",()=>{const n=e._modelValue,s=Ns(e),i=e.checked,o=e[mr];if(Se(n)){const a=ro(n,s),l=a!==-1;if(i&&!l)o(n.concat(s));else if(!i&&l){const u=[...n];u.splice(a,1),o(u)}}else if(Gn(n)){const a=new Set(n);i?a.add(s):a.delete(s),o(a)}else o(Jf(e,i))})},mounted:Kf,beforeUpdate(e,t,r){e[mr]=kn(r),Kf(e,t,r)}};function Kf(e,{value:t,oldValue:r},n){e._modelValue=t;let s;if(Se(t))s=ro(t,n.props.value)>-1;else if(Gn(t))s=t.has(n.props.value);else{if(t===r)return;s=Gr(t,Jf(e,!0))}e.checked!==s&&(e.checked=s)}var Nl={created(e,{value:t},r){e.checked=Gr(t,r.props.value),e[mr]=kn(r),un(e,"change",()=>{e[mr](Ns(e))})},beforeUpdate(e,{value:t,oldValue:r},n){e[mr]=kn(n),t!==r&&(e.checked=Gr(t,n.props.value))}},Wf={deep:!0,created(e,{value:t,modifiers:{number:r}},n){const s=Gn(t);un(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>r?Qi(Ns(o)):Ns(o));e[mr](e.multiple?s?new Set(i):i:i[0]),e._assigning=!0,Et(()=>{e._assigning=!1})}),e[mr]=kn(n)},mounted(e,{value:t}){Gf(e,t)},beforeUpdate(e,t,r){e[mr]=kn(r)},updated(e,{value:t}){e._assigning||Gf(e,t)}};function Gf(e,t){const r=e.multiple,n=Se(t);if(!(r&&!n&&!Gn(t))){for(let s=0,i=e.options.length;s<i;s++){const o=e.options[s],a=Ns(o);if(r)if(n){const l=typeof a;l==="string"||l==="number"?o.selected=t.some(u=>String(u)===String(a)):o.selected=ro(t,a)>-1}else o.selected=t.has(a);else if(Gr(Ns(o),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!r&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ns(e){return"_value"in e?e._value:e.value}function Jf(e,t){const r=t?"_trueValue":"_falseValue";return r in e?e[r]:t}var Yf={created(e,t,r){jo(e,t,r,null,"created")},mounted(e,t,r){jo(e,t,r,null,"mounted")},beforeUpdate(e,t,r,n){jo(e,t,r,n,"beforeUpdate")},updated(e,t,r,n){jo(e,t,r,n,"updated")}};function Zf(e,t){switch(e){case"SELECT":return Wf;case"TEXTAREA":return Ii;default:switch(t){case"checkbox":return Ml;case"radio":return Nl;default:return Ii}}}function jo(e,t,r,n,s){const i=Zf(e.tagName,r.props&&r.props.type)[s];i&&i(e,t,r,n)}function U0(){Ii.getSSRProps=({value:e})=>({value:e}),Nl.getSSRProps=({value:e},t)=>{if(t.props&&Gr(t.props.value,e))return{checked:!0}},Ml.getSSRProps=({value:e},t)=>{if(Se(e)){if(t.props&&ro(e,t.props.value)>-1)return{checked:!0}}else if(Gn(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},Yf.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const r=Zf(t.type.toUpperCase(),t.props&&t.props.type);if(r.getSSRProps)return r.getSSRProps(e,t)}}var z0=["ctrl","shift","alt","meta"],K0={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>z0.some(r=>e[`${r}Key`]&&!t.includes(r))},Qt=(e,t)=>{if(!e)return e;const r=e._withMods||(e._withMods={}),n=t.join(".");return r[n]||(r[n]=((s,...i)=>{for(let o=0;o<t.length;o++){const a=K0[t[o]];if(a&&a(s,t))return}return e(s,...i)}))},W0={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},ql=(e,t)=>{const r=e._withKeys||(e._withKeys={}),n=t.join(".");return r[n]||(r[n]=(s=>{if(!("key"in s))return;const i=Jt(s.key);if(t.some(o=>o===i||W0[o]===i))return e(s)}))},Xf=Qe({patchProp:Mf},vf),Ri,Qf=!1;function ep(){return Ri||(Ri=Wd(Xf))}function tp(){return Ri=Qf?Ri:Gd(Xf),Qf=!0,Ri}var rp=((...e)=>{ep().render(...e)}),G0=((...e)=>{tp().hydrate(...e)}),Bl=((...e)=>{const t=ep().createApp(...e),{mount:r}=t;return t.mount=n=>{const s=ip(n);if(!s)return;const i=t._component;!Oe(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=r(s,!1,sp(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},t}),np=((...e)=>{const t=tp().createApp(...e),{mount:r}=t;return t.mount=n=>{const s=ip(n);if(s)return r(s,!0,sp(s))},t});function sp(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function ip(e){return it(e)?document.querySelector(e):e}var op=!1,J0=()=>{op||(op=!0,U0(),b0())},Y0=Bg({BaseTransition:()=>ld,BaseTransitionPropsValidators:()=>nl,Comment:()=>ht,DeprecationTypes:()=>null,EffectScope:()=>Ma,ErrorCodes:()=>Ov,ErrorTypeStrings:()=>c0,Fragment:()=>Ke,KeepAlive:()=>im,ReactiveEffect:()=>ri,Static:()=>ts,Suspense:()=>zm,Teleport:()=>el,Text:()=>Tn,TrackOpTypes:()=>Av,Transition:()=>v0,TransitionGroup:()=>q0,TriggerOpTypes:()=>kv,VueElement:()=>qf,assertNumber:()=>Dv,callWithAsyncErrorHandling:()=>pr,callWithErrorHandling:()=>Ts,camelize:()=>_t,capitalize:()=>ti,cloneVNode:()=>Ir,compatUtils:()=>null,compile:()=>Z0,computed:()=>V,createApp:()=>Bl,createBlock:()=>U,createCommentVNode:()=>Be,createElementBlock:()=>Ce,createElementVNode:()=>Q,createHydrationRenderer:()=>Gd,createPropsRestProxy:()=>Sm,createRenderer:()=>Wd,createSSRApp:()=>np,createSlots:()=>um,createStaticVNode:()=>Cl,createTextVNode:()=>qe,createVNode:()=>O,customRef:()=>ci,defineAsyncComponent:()=>sm,defineComponent:()=>X,defineCustomElement:()=>Hl,defineEmits:()=>pm,defineExpose:()=>hm,defineModel:()=>mm,defineOptions:()=>gm,defineProps:()=>fm,defineSSRCustomElement:()=>D0,defineSlots:()=>vm,devtools:()=>u0,effect:()=>ev,effectScope:()=>Na,getCurrentInstance:()=>gt,getCurrentScope:()=>no,getCurrentWatcher:()=>Iv,getTransitionRawChildren:()=>_o,guardReactiveProps:()=>nr,h:()=>vr,handleError:()=>Zn,hasInjectionContext:()=>Fv,hydrate:()=>G0,hydrateOnIdle:()=>Xv,hydrateOnInteraction:()=>rm,hydrateOnMediaQuery:()=>tm,hydrateOnVisible:()=>em,initCustomFormatter:()=>o0,initDirectivesForSSR:()=>J0,inject:()=>Vt,isMemoSame:()=>df,isProxy:()=>li,isReactive:()=>tn,isReadonly:()=>Hr,isRef:()=>rt,isRuntimeOnly:()=>n0,isShallow:()=>Yt,isVNode:()=>an,markRaw:()=>Ga,mergeDefaults:()=>kd,mergeModels:()=>_m,mergeProps:()=>me,nextTick:()=>Et,nodeOps:()=>vf,normalizeClass:()=>et,normalizeProps:()=>fr,normalizeStyle:()=>St,onActivated:()=>vd,onBeforeMount:()=>yd,onBeforeUnmount:()=>Ds,onBeforeUpdate:()=>al,onDeactivated:()=>md,onErrorCaptured:()=>Cd,onMounted:()=>tt,onRenderTracked:()=>Sd,onRenderTriggered:()=>_d,onScopeDispose:()=>qa,onServerPrefetch:()=>bd,onUnmounted:()=>jt,onUpdated:()=>wi,onWatcherCleanup:()=>ju,openBlock:()=>$,patchProp:()=>Mf,popScopeId:()=>Bv,provide:()=>Xn,proxyRefs:()=>Ja,pushScopeId:()=>qv,queuePostFlushCb:()=>ui,reactive:()=>Qr,readonly:()=>Mt,ref:()=>F,registerRuntimeCompiler:()=>r0,render:()=>rp,renderList:()=>gr,renderSlot:()=>ne,resolveComponent:()=>lm,resolveDirective:()=>cm,resolveDynamicComponent:()=>yi,resolveFilter:()=>null,resolveTransitionHooks:()=>Is,setBlockTracking:()=>Ti,setDevtoolsHook:()=>d0,setTransitionHooks:()=>nn,shallowReactive:()=>Bu,shallowReadonly:()=>en,shallowRef:()=>ft,ssrContextKey:()=>Yu,ssrUtils:()=>f0,stop:()=>tv,toDisplayString:()=>Le,toHandlerKey:()=>_s,toHandlers:()=>Ed,toRaw:()=>ze,toRef:()=>Ya,toRefs:()=>Nt,toValue:()=>$e,transformVNodeArgs:()=>Zm,triggerRef:()=>Fu,unref:()=>f,useAttrs:()=>bm,useCssModule:()=>M0,useCssVars:()=>_0,useHost:()=>Bf,useId:()=>dd,useModel:()=>$m,useSSRContext:()=>Zu,useShadowRoot:()=>H0,useSlots:()=>ym,useTemplateRef:()=>zv,useTransitionState:()=>rl,vModelCheckbox:()=>Ml,vModelDynamic:()=>Yf,vModelRadio:()=>Nl,vModelSelect:()=>Wf,vModelText:()=>Ii,vShow:()=>Bo,version:()=>ff,warn:()=>l0,watch:()=>He,watchEffect:()=>ct,watchPostEffect:()=>Xa,watchSyncEffect:()=>Xu,withAsyncContext:()=>Cm,withCtx:()=>k,withDefaults:()=>wm,withDirectives:()=>wo,withKeys:()=>ql,withMemo:()=>a0,withModifiers:()=>Qt,withScopeId:()=>Lv},1),Z0=()=>{},X0=2;const Rr={CALL_HISTORY:"call_history",CONTACTS:"contacts",CONNECTIONS:"connections"},Q0=(e="webphone_db")=>{const t=F(null),r=F(!1);return{initDB:()=>new Promise((l,u)=>{if(t.value){l();return}const c=indexedDB.open(e,X0);c.onerror=d=>{console.error("IndexedDB error:",d),u(d)},c.onsuccess=d=>{t.value=d.target.result,r.value=!0,l()},c.onupgradeneeded=d=>{const p=d.target.result;p.objectStoreNames.contains(Rr.CALL_HISTORY)||p.createObjectStore(Rr.CALL_HISTORY,{keyPath:"id"}),p.objectStoreNames.contains(Rr.CONTACTS)||p.createObjectStore(Rr.CONTACTS,{keyPath:"number"}),p.objectStoreNames.contains(Rr.CONNECTIONS)||p.createObjectStore(Rr.CONNECTIONS,{keyPath:"id"})}}),getAll:l=>new Promise((u,c)=>{if(!t.value)return c("DB not initialized");const d=t.value.transaction([l],"readonly").objectStore(l).getAll();d.onsuccess=()=>u(d.result),d.onerror=()=>c(d.error)}),add:(l,u)=>new Promise((c,d)=>{if(!t.value)return d("DB not initialized");const p=t.value.transaction([l],"readwrite").objectStore(l).add(u);p.onsuccess=()=>c(),p.onerror=()=>d(p.error)}),put:(l,u)=>new Promise((c,d)=>{if(!t.value)return d("DB not initialized");const p=t.value.transaction([l],"readwrite").objectStore(l).put(u);p.onsuccess=()=>c(),p.onerror=()=>d(p.error)}),remove:(l,u)=>new Promise((c,d)=>{if(!t.value)return d("DB not initialized");const p=t.value.transaction([l],"readwrite").objectStore(l).delete(u);p.onsuccess=()=>c(),p.onerror=()=>d(p.error)}),isReady:r}},ew=e=>{const t=F(e?.initialConnected??!1),r=F(0),n=F(null),s=F([]),i=F([]),{initDB:o,getAll:a,add:l}=Q0(e?.server&&e?.extension?`webphone_${e.server}_${e.extension}`.replace(/[^a-z0-9_]/gi,"_"):"webphone_db");o().then(async()=>{try{s.value=(await a(Rr.CALL_HISTORY)).sort((Y,le)=>le.startTime-Y.startTime),i.value=await a(Rr.CONTACTS)}catch(Y){console.error("Error loading data from IndexedDB:",Y)}});const u=F([{id:0,status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1},{id:1,status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1},{id:2,status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1}]),c=F(e?.initialKeypadVisible??!0),d=F(""),p=F(!1),h=V(()=>u.value.find(Y=>Y.id===r.value)||u.value[0]),m=V(()=>h.value?.status||"idle"),w=V(()=>h.value?.remoteNumber||""),x=V(()=>h.value?.isMuted||!1),v=V(()=>h.value?.isHeld||!1),S=V({get:()=>h.value?.keypadValue||"",set:Y=>{h.value&&(h.value.keypadValue=Y)}}),b=Y=>{t.value=Y},y=Y=>{u.value.some(le=>le.id===Y)&&(r.value=Y)},T=(Y,le)=>{const he=u.value.find(Ie=>Ie.id===Y);he&&Object.assign(he,le)};return{isConnected:t,activeChannelId:r,channels:u,activeChannel:h,callStatus:m,remoteNumber:w,isMuted:x,isHeld:v,keypadValue:S,isKeypadVisible:c,lastDialedNumber:d,videoModeEnabled:p,transferInProgress:n,setConnected:b,setActiveChannelId:y,updateChannelState:T,setCallStatus:Y=>{T(r.value,{status:Y})},setIncomingCall:Y=>{T(r.value,{remoteNumber:Y})},resetCall:()=>{T(r.value,{status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1})},addCallLog:async Y=>{const le={id:crypto.randomUUID(),...Y};s.value.unshift(le);try{await l(Rr.CALL_HISTORY,le)}catch(he){console.error("Error saving call log:",he)}},callHistory:s,contacts:i,addContact:async Y=>{try{await l(Rr.CONTACTS,Y),i.value=await a(Rr.CONTACTS)}catch(le){console.error("Error saving contact:",le)}},setMuted:Y=>{T(r.value,{isMuted:Y})},setHeld:Y=>{T(r.value,{isHeld:Y})},appendKeypad:Y=>{S.value+=Y},clearKeypad:()=>{S.value=""},backspaceKeypad:()=>{S.value=S.value.slice(0,-1)},toggleKeypad:()=>{c.value=!c.value},setLastDialedNumber:Y=>{d.value=Y},setTransferInProgress:Y=>{n.value=Y},toggleVideoMode:()=>{p.value=!p.value}}},ap="0.21.1";var is=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}},Ll=class extends is{constructor(e){super(e||"Unsupported content type.")}},Fl=class extends is{constructor(e){super(e||"Request pending.")}},tw=class extends is{constructor(e){super(e||"Unspecified session description handler error.")}},Vl=class extends is{constructor(){super("The session has terminated.")}},$i=class extends is{constructor(e){super(e||"An error occurred during state transition.")}},rw=class{constructor(e){this.incomingAckRequest=e}get request(){return this.incomingAckRequest.message}},nw=class{constructor(e){this.incomingByeRequest=e}get request(){return this.incomingByeRequest.message}accept(e){return this.incomingByeRequest.accept(e),Promise.resolve()}reject(e){return this.incomingByeRequest.reject(e),Promise.resolve()}},sw=class{constructor(e){this.incomingCancelRequest=e}get request(){return this.incomingCancelRequest}},qs=class{constructor(){this.listeners=new Array}addListener(e,t){const r=n=>{this.removeListener(r),e(n)};t?.once===!0?this.listeners.push(r):this.listeners.push(e)}emit(e){this.listeners.slice().forEach(t=>t(e))}removeAllListeners(){this.listeners=[]}removeListener(e){this.listeners=this.listeners.filter(t=>t!==e)}on(e){return this.addListener(e)}off(e){return this.removeListener(e)}once(e){return this.addListener(e,{once:!0})}},iw=class{constructor(e){this.incomingInfoRequest=e}get request(){return this.incomingInfoRequest.message}accept(e){return this.incomingInfoRequest.accept(e),Promise.resolve()}reject(e){return this.incomingInfoRequest.reject(e),Promise.resolve()}},lp=class{constructor(e){this.parameters={};for(const t in e)e.hasOwnProperty(t)&&this.setParam(t,e[t])}setParam(e,t){e&&(this.parameters[e.toLowerCase()]=typeof t>"u"||t===null?null:t.toString())}getParam(e){if(e)return this.parameters[e.toLowerCase()]}hasParam(e){return!!(e&&this.parameters[e.toLowerCase()]!==void 0)}deleteParam(e){if(e=e.toLowerCase(),this.hasParam(e)){const t=this.parameters[e];return delete this.parameters[e],t}}clearParams(){this.parameters={}}},wr=class Og extends lp{constructor(t,r,n){super(n),this.uri=t,this._displayName=r}get friendlyName(){return this.displayName||this.uri.aor}get displayName(){return this._displayName}set displayName(t){this._displayName=t}clone(){return new Og(this.uri.clone(),this._displayName,JSON.parse(JSON.stringify(this.parameters)))}toString(){let t=this.displayName||this.displayName==="0"?'"'+this.displayName+'" ':"";t+="<"+this.uri.toString()+">";for(const r in this.parameters)this.parameters.hasOwnProperty(r)&&(t+=";"+r,this.parameters[r]!==null&&(t+="="+this.parameters[r]));return t}},In=class Hg extends lp{constructor(t="sip",r,n,s,i,o){if(super(i||{}),this.headers={},!n)throw new TypeError('missing or invalid "host" parameter');for(const a in o)o.hasOwnProperty(a)&&this.setHeader(a,o[a]);this.raw={scheme:t,user:r,host:n,port:s},this.normal={scheme:t.toLowerCase(),user:r,host:n.toLowerCase(),port:s}}get scheme(){return this.normal.scheme}set scheme(t){this.raw.scheme=t,this.normal.scheme=t.toLowerCase()}get user(){return this.normal.user}set user(t){this.normal.user=this.raw.user=t}get host(){return this.normal.host}set host(t){this.raw.host=t,this.normal.host=t.toLowerCase()}get aor(){return this.normal.user+"@"+this.normal.host}get port(){return this.normal.port}set port(t){this.normal.port=this.raw.port=t}setHeader(t,r){this.headers[this.headerize(t)]=r instanceof Array?r:[r]}getHeader(t){if(t)return this.headers[this.headerize(t)]}hasHeader(t){return!!t&&!!this.headers.hasOwnProperty(this.headerize(t))}deleteHeader(t){if(t=this.headerize(t),this.headers.hasOwnProperty(t)){const r=this.headers[t];return delete this.headers[t],r}}clearHeaders(){this.headers={}}clone(){return new Hg(this._raw.scheme,this._raw.user||"",this._raw.host,this._raw.port,JSON.parse(JSON.stringify(this.parameters)),JSON.parse(JSON.stringify(this.headers)))}toRaw(){return this._toString(this._raw)}toString(){return this._toString(this._normal)}get _normal(){return this.normal}get _raw(){return this.raw}_toString(t){let r=t.scheme+":";t.scheme.toLowerCase().match("^sips?$")||(r+="//"),t.user&&(r+=this.escapeUser(t.user)+"@"),r+=t.host,(t.port||t.port===0)&&(r+=":"+t.port);for(const s in this.parameters)this.parameters.hasOwnProperty(s)&&(r+=";"+s,this.parameters[s]!==null&&(r+="="+this.parameters[s]));const n=[];for(const s in this.headers)if(this.headers.hasOwnProperty(s))for(const i in this.headers[s])this.headers[s].hasOwnProperty(i)&&n.push(s+"="+this.headers[s][i]);return n.length>0&&(r+="?"+n.join("&")),r}escapeUser(t){let r;try{r=decodeURIComponent(t)}catch(n){throw n}return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%2B/gi,"+").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}headerize(t){const r={"Call-Id":"Call-ID",Cseq:"CSeq","Min-Se":"Min-SE",Rack:"RAck",Rseq:"RSeq","Www-Authenticate":"WWW-Authenticate"},n=t.toLowerCase().replace(/_/g,"-").split("-"),s=n.length;let i="";for(let o=0;o<s;o++)o!==0&&(i+="-"),i+=n[o].charAt(0).toUpperCase()+n[o].substring(1);return r[i]&&(i=r[i]),i}};function cp(e,t){if(e.scheme!==t.scheme||e.user!==t.user||e.host!==t.host||e.port!==t.port)return!1;function r(i,o){const a=Object.keys(i.parameters),l=Object.keys(o.parameters);return!(!a.filter(u=>l.includes(u)).every(u=>i.parameters[u]===o.parameters[u])||!["user","ttl","method","transport"].every(u=>i.hasParam(u)&&o.hasParam(u)||!i.hasParam(u)&&!o.hasParam(u))||!["maddr"].every(u=>i.hasParam(u)&&o.hasParam(u)||!i.hasParam(u)&&!o.hasParam(u)))}if(!r(e,t))return!1;const n=Object.keys(e.headers),s=Object.keys(t.headers);if(n.length!==0||s.length!==0){if(n.length!==s.length)return!1;const i=n.filter(o=>s.includes(o));if(i.length!==s.length||!i.every(o=>e.headers[o].length&&t.headers[o].length&&e.headers[o][0]===t.headers[o][0]))return!1}return!0}function jl(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,r+=r.repeat(t),e+r.slice(0,t))}var up=class Ia extends Error{constructor(t,r,n,s){super(),this.message=t,this.expected=r,this.found=n,this.location=s,this.name="SyntaxError",typeof Object.setPrototypeOf=="function"?Object.setPrototypeOf(this,Ia.prototype):this.__proto__=Ia.prototype,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Ia)}static buildMessage(t,r){function n(u){return u.charCodeAt(0).toString(16).toUpperCase()}function s(u){return u.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,c=>"\\x0"+n(c)).replace(/[\x10-\x1F\x7F-\x9F]/g,c=>"\\x"+n(c))}function i(u){return u.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,c=>"\\x0"+n(c)).replace(/[\x10-\x1F\x7F-\x9F]/g,c=>"\\x"+n(c))}function o(u){switch(u.type){case"literal":return'"'+s(u.text)+'"';case"class":const c=u.parts.map(d=>Array.isArray(d)?i(d[0])+"-"+i(d[1]):i(d));return"["+(u.inverted?"^":"")+c+"]";case"any":return"any character";case"end":return"end of input";case"other":return u.description}}function a(u){const c=u.map(o);let d,p;if(c.sort(),c.length>0){for(d=1,p=1;d<c.length;d++)c[d-1]!==c[d]&&(c[p]=c[d],p++);c.length=p}switch(c.length){case 1:return c[0];case 2:return c[0]+" or "+c[1];default:return c.slice(0,-1).join(", ")+", or "+c[c.length-1]}}function l(u){return u?'"'+s(u)+'"':"end of input"}return"Expected "+a(t)+" but "+l(r)+" found."}format(t){let r="Error: "+this.message;if(this.location){let n=null,s;for(s=0;s<t.length;s++)if(t[s].source===this.location.source){n=t[s].text.split(/\r\n|\n|\r/g);break}let i=this.location.start,o=this.location.source+":"+i.line+":"+i.column;if(n){let a=this.location.end,l=jl("",i.line.toString().length," "),u=n[i.line-1],c=i.line===a.line?a.column:u.length+1;r+=`
6
6
  --> `+o+`
7
7
  `+l+` |
8
8
  `+i.line+" | "+u+`
9
9
  `+l+" | "+jl("",i.column-1," ")+jl("",c-i.column,"^")}else r+=`
10
- at `+o}return r}};function iw(e,t){t=t!==void 0?t:{};const r={},n=t.grammarSource,s={Contact:119,Name_Addr_Header:156,Record_Route:176,Request_Response:81,SIP_URI:45,Subscription_State:186,Supported:191,Require:182,Via:194,absoluteURI:84,Call_ID:118,Content_Disposition:130,Content_Length:135,Content_Type:136,CSeq:146,displayName:122,Event:149,From:151,host:52,Max_Forwards:154,Min_SE:213,Proxy_Authenticate:157,quoted_string:40,Refer_To:178,Replaces:179,Session_Expires:210,stun_URI:217,To:192,turn_URI:223,uuid:226,WWW_Authenticate:209,challenge:158,sipfrag:230,Referred_By:231};let i=119;const o=[`\r
11
- `,g(`\r
12
- `,!1),/^[0-9]/,S([["0","9"]],!1,!1),/^[a-zA-Z]/,S([["a","z"],["A","Z"]],!1,!1),/^[0-9a-fA-F]/,S([["0","9"],["a","f"],["A","F"]],!1,!1),/^[\0-\xFF]/,S([["\0","ÿ"]],!1,!1),/^["]/,S(['"'],!1,!1)," ",g(" ",!1)," ",g(" ",!1),/^[a-zA-Z0-9]/,S([["a","z"],["A","Z"],["0","9"]],!1,!1),";",g(";",!1),"/",g("/",!1),"?",g("?",!1),":",g(":",!1),"@",g("@",!1),"&",g("&",!1),"=",g("=",!1),"+",g("+",!1),"$",g("$",!1),",",g(",",!1),"-",g("-",!1),"_",g("_",!1),".",g(".",!1),"!",g("!",!1),"~",g("~",!1),"*",g("*",!1),"'",g("'",!1),"(",g("(",!1),")",g(")",!1),"%",g("%",!1),function(){return" "},function(){return":"},/^[!-~]/,S([["!","~"]],!1,!1),/^[\x80-\uFFFF]/,S([["€","￿"]],!1,!1),/^[\x80-\xBF]/,S([["€","¿"]],!1,!1),/^[a-f]/,S([["a","f"]],!1,!1),"`",g("`",!1),"<",g("<",!1),">",g(">",!1),"\\",g("\\",!1),"[",g("[",!1),"]",g("]",!1),"{",g("{",!1),"}",g("}",!1),function(){return"*"},function(){return"/"},function(){return"="},function(){return"("},function(){return")"},function(){return">"},function(){return"<"},function(){return","},function(){return";"},function(){return":"},function(){return'"'},/^[!-']/,S([["!","'"]],!1,!1),/^[*-[]/,S([["*","["]],!1,!1),/^[\]-~]/,S([["]","~"]],!1,!1),function(C){return C},/^[#-[]/,S([["#","["]],!1,!1),/^[\0-\t]/,S([["\0"," "]],!1,!1),/^[\v-\f]/,S([["\v","\f"]],!1,!1),/^[\x0E-\x7F]/,S([["",""]],!1,!1),function(){t=t||{data:{}},t.data.uri=new In(t.data.scheme,t.data.user,t.data.host,t.data.port),delete t.data.scheme,delete t.data.user,delete t.data.host,delete t.data.host_type,delete t.data.port},function(){t=t||{data:{}},t.data.uri=new In(t.data.scheme,t.data.user,t.data.host,t.data.port,t.data.uri_params,t.data.uri_headers),delete t.data.scheme,delete t.data.user,delete t.data.host,delete t.data.host_type,delete t.data.port,delete t.data.uri_params,t.startRule==="SIP_URI"&&(t.data=t.data.uri)},"sips",g("sips",!0),"sip",g("sip",!0),function(C){t=t||{data:{}},t.data.scheme=C},function(){t=t||{data:{}},t.data.user=decodeURIComponent(w().slice(0,-1))},function(){t=t||{data:{}},t.data.password=w()},function(){return t=t||{data:{}},t.data.host=w(),t.data.host},function(){return t=t||{data:{}},t.data.host_type="domain",w()},/^[a-zA-Z0-9_\-]/,S([["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),/^[a-zA-Z0-9\-]/,S([["a","z"],["A","Z"],["0","9"],"-"],!1,!1),function(){return t=t||{data:{}},t.data.host_type="IPv6",w()},"::",g("::",!1),function(){return t=t||{data:{}},t.data.host_type="IPv6",w()},function(){return t=t||{data:{}},t.data.host_type="IPv4",w()},"25",g("25",!1),/^[0-5]/,S([["0","5"]],!1,!1),"2",g("2",!1),/^[0-4]/,S([["0","4"]],!1,!1),"1",g("1",!1),/^[1-9]/,S([["1","9"]],!1,!1),function(C){return t=t||{data:{}},C=parseInt(C.join("")),t.data.port=C,C},"transport=",g("transport=",!0),"udp",g("udp",!0),"tcp",g("tcp",!0),"sctp",g("sctp",!0),"tls",g("tls",!0),function(C){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.transport=C.toLowerCase()},"user=",g("user=",!0),"phone",g("phone",!0),"ip",g("ip",!0),function(C){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.user=C.toLowerCase()},"method=",g("method=",!0),function(C){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.method=C},"ttl=",g("ttl=",!0),function(C){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.ttl=C},"maddr=",g("maddr=",!0),function(C){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.maddr=C},"lr",g("lr",!0),function(){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.lr=void 0},function(C,_){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),_===null?_=void 0:_=_[1],t.data.uri_params[C.toLowerCase()]=_},function(C,_){C=C.join("").toLowerCase(),_=_.join(""),t=t||{data:{}},t.data.uri_headers||(t.data.uri_headers={}),t.data.uri_headers[C]?t.data.uri_headers[C].push(_):t.data.uri_headers[C]=[_]},function(){t=t||{data:{}},t.startRule==="Refer_To"&&(t.data.uri=new In(t.data.scheme,t.data.user,t.data.host,t.data.port,t.data.uri_params,t.data.uri_headers),delete t.data.scheme,delete t.data.user,delete t.data.host,delete t.data.host_type,delete t.data.port,delete t.data.uri_params)},"//",g("//",!1),function(){t=t||{data:{}},t.data.scheme=w()},g("SIP",!0),function(){t=t||{data:{}},t.data.sip_version=w()},"INVITE",g("INVITE",!1),"ACK",g("ACK",!1),"VXACH",g("VXACH",!1),"OPTIONS",g("OPTIONS",!1),"BYE",g("BYE",!1),"CANCEL",g("CANCEL",!1),"REGISTER",g("REGISTER",!1),"SUBSCRIBE",g("SUBSCRIBE",!1),"NOTIFY",g("NOTIFY",!1),"REFER",g("REFER",!1),"PUBLISH",g("PUBLISH",!1),function(){return t=t||{data:{}},t.data.method=w(),t.data.method},function(C){t=t||{data:{}},t.data.status_code=parseInt(C.join(""))},function(){t=t||{data:{}},t.data.reason_phrase=w()},function(){t=t||{data:{}},t.data=w()},function(){var C,_;for(t=t||{data:{}},_=t.data.multi_header.length,C=0;C<_;C++)if(t.data.multi_header[C].parsed===null){t.data=null;break}t.data!==null?t.data=t.data.multi_header:t.data=-1},function(){var C;t=t||{data:{}},t.data.multi_header||(t.data.multi_header=[]);try{C=new yr(t.data.uri,t.data.displayName,t.data.params),delete t.data.uri,delete t.data.displayName,delete t.data.params}catch{C=null}t.data.multi_header.push({position:l,offset:x().start.offset,parsed:C})},function(C){C=w().trim(),C[0]==='"'&&(C=C.substring(1,C.length-1)),t=t||{data:{}},t.data.displayName=C},"q",g("q",!0),function(C){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.q=C},"expires",g("expires",!0),function(C){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.expires=C},function(C){return parseInt(C.join(""))},"0",g("0",!1),function(){return parseFloat(w())},function(C,_){t=t||{data:{}},t.data.params||(t.data.params={}),_===null?_=void 0:_=_[1],t.data.params[C.toLowerCase()]=_},"render",g("render",!0),"session",g("session",!0),"icon",g("icon",!0),"alert",g("alert",!0),function(){t=t||{data:{}},t.startRule==="Content_Disposition"&&(t.data.type=w().toLowerCase())},"handling",g("handling",!0),"optional",g("optional",!0),"required",g("required",!0),function(C){t=t||{data:{}},t.data=parseInt(C.join(""))},function(){t=t||{data:{}},t.data=w()},"text",g("text",!0),"image",g("image",!0),"audio",g("audio",!0),"video",g("video",!0),"application",g("application",!0),"message",g("message",!0),"multipart",g("multipart",!0),"x-",g("x-",!0),function(C){t=t||{data:{}},t.data.value=parseInt(C.join(""))},function(C){t=t||{data:{}},t.data=C},function(C){t=t||{data:{}},t.data.event=C.toLowerCase()},function(){t=t||{data:{}};var C=t.data.tag;t.data=new yr(t.data.uri,t.data.displayName,t.data.params),C&&t.data.setParam("tag",C)},"tag",g("tag",!0),function(C){t=t||{data:{}},t.data.tag=C},function(C){t=t||{data:{}},t.data=parseInt(C.join(""))},function(C){t=t||{data:{}},t.data=C},function(){t=t||{data:{}},t.data=new yr(t.data.uri,t.data.displayName,t.data.params)},"digest",g("Digest",!0),"realm",g("realm",!0),function(C){t=t||{data:{}},t.data.realm=C},"domain",g("domain",!0),"nonce",g("nonce",!0),function(C){t=t||{data:{}},t.data.nonce=C},"opaque",g("opaque",!0),function(C){t=t||{data:{}},t.data.opaque=C},"stale",g("stale",!0),"true",g("true",!0),function(){t=t||{data:{}},t.data.stale=!0},"false",g("false",!0),function(){t=t||{data:{}},t.data.stale=!1},"algorithm",g("algorithm",!0),"md5",g("MD5",!0),"md5-sess",g("MD5-sess",!0),function(C){t=t||{data:{}},t.data.algorithm=C.toUpperCase()},"qop",g("qop",!0),"auth-int",g("auth-int",!0),"auth",g("auth",!0),function(C){t=t||{data:{}},t.data.qop||(t.data.qop=[]),t.data.qop.push(C.toLowerCase())},function(C){t=t||{data:{}},t.data.value=parseInt(C.join(""))},function(){var C,_;for(t=t||{data:{}},_=t.data.multi_header.length,C=0;C<_;C++)if(t.data.multi_header[C].parsed===null){t.data=null;break}t.data!==null?t.data=t.data.multi_header:t.data=-1},function(){var C;t=t||{data:{}},t.data.multi_header||(t.data.multi_header=[]);try{C=new yr(t.data.uri,t.data.displayName,t.data.params),delete t.data.uri,delete t.data.displayName,delete t.data.params}catch{C=null}t.data.multi_header.push({position:l,offset:x().start.offset,parsed:C})},function(){t=t||{data:{}},t.data=new yr(t.data.uri,t.data.displayName,t.data.params)},function(){t=t||{data:{}},t.data.replaces_from_tag&&t.data.replaces_to_tag||(t.data=-1)},function(){t=t||{data:{}},t.data={call_id:t.data}},"from-tag",g("from-tag",!0),function(C){t=t||{data:{}},t.data.replaces_from_tag=C},"to-tag",g("to-tag",!0),function(C){t=t||{data:{}},t.data.replaces_to_tag=C},"early-only",g("early-only",!0),function(){t=t||{data:{}},t.data.early_only=!0},function(C,_){return _},function(C,_){return q(C,_)},function(C){t=t||{data:{}},t.startRule==="Require"&&(t.data=C||[])},function(C){t=t||{data:{}},t.data.value=parseInt(C.join(""))},"active",g("active",!0),"pending",g("pending",!0),"terminated",g("terminated",!0),function(){t=t||{data:{}},t.data.state=w()},"reason",g("reason",!0),function(C){t=t||{data:{}},typeof C<"u"&&(t.data.reason=C)},function(C){t=t||{data:{}},typeof C<"u"&&(t.data.expires=C)},"retry_after",g("retry_after",!0),function(C){t=t||{data:{}},typeof C<"u"&&(t.data.retry_after=C)},"deactivated",g("deactivated",!0),"probation",g("probation",!0),"rejected",g("rejected",!0),"timeout",g("timeout",!0),"giveup",g("giveup",!0),"noresource",g("noresource",!0),"invariant",g("invariant",!0),function(C){t=t||{data:{}},t.startRule==="Supported"&&(t.data=C||[])},function(){t=t||{data:{}};var C=t.data.tag;t.data=new yr(t.data.uri,t.data.displayName,t.data.params),C&&t.data.setParam("tag",C)},"ttl",g("ttl",!0),function(C){t=t||{data:{}},t.data.ttl=C},"maddr",g("maddr",!0),function(C){t=t||{data:{}},t.data.maddr=C},"received",g("received",!0),function(C){t=t||{data:{}},t.data.received=C},"branch",g("branch",!0),function(C){t=t||{data:{}},t.data.branch=C},"rport",g("rport",!0),function(C){t=t||{data:{}},typeof C<"u"&&(t.data.rport=C.join(""))},function(C){t=t||{data:{}},t.data.protocol=C},g("UDP",!0),g("TCP",!0),g("TLS",!0),g("SCTP",!0),function(C){t=t||{data:{}},t.data.transport=C},function(){t=t||{data:{}},t.data.host=w()},function(C){t=t||{data:{}},t.data.port=parseInt(C.join(""))},function(C){return parseInt(C.join(""))},function(C){t=t||{data:{}},t.startRule==="Session_Expires"&&(t.data.deltaSeconds=C)},"refresher",g("refresher",!1),"uas",g("uas",!1),"uac",g("uac",!1),function(C){t=t||{data:{}},t.startRule==="Session_Expires"&&(t.data.refresher=C)},function(C){t=t||{data:{}},t.startRule==="Min_SE"&&(t.data=C)},"stuns",g("stuns",!0),"stun",g("stun",!0),function(C){t=t||{data:{}},t.data.scheme=C},function(C){t=t||{data:{}},t.data.host=C},"?transport=",g("?transport=",!1),"turns",g("turns",!0),"turn",g("turn",!0),function(C){t=t||{data:{}},t.data.transport=C},function(){t=t||{data:{}},t.data=w()},"Referred-By",g("Referred-By",!1),"b",g("b",!1),"cid",g("cid",!1)],a=[v('2 ""6 7!'),v('4"""5!7#'),v('4$""5!7%'),v(`4&""5!7'`),v(";'.# &;("),v('4(""5!7)'),v('4*""5!7+'),v('2,""6,7-'),v('2.""6.7/'),v('40""5!71'),v('22""6273.‰ &24""6475.} &26""6677.q &28""6879.e &2:""6:7;.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E'),v(";).# &;,"),v('2F""6F7G.} &2H""6H7I.q &2J""6J7K.e &2L""6L7M.Y &2N""6N7O.M &2P""6P7Q.A &2R""6R7S.5 &2T""6T7U.) &2V""6V7W'),v(`%%2X""6X7Y/5#;#/,$;#/#$+#)(#'#("'#&'#/"!&,)`),v(`%%$;$0#*;$&/,#; /#$+")("'#&'#." &"/=#$;$/&#0#*;$&&&#/'$8":Z" )("'#&'#`),v(';.." &"'),v(`%$;'.# &;(0)*;'.# &;(&/?#28""6879/0$;//'$8#:[# )(#'#("'#&'#`),v(`%%$;2/&#0#*;2&&&#/g#$%$;.0#*;.&/,#;2/#$+")("'#&'#0=*%$;.0#*;.&/,#;2/#$+")("'#&'#&/#$+")("'#&'#/"!&,)`),v('4\\""5!7].# &;3'),v('4^""5!7_'),v('4`""5!7a'),v(';!.) &4b""5!7c'),v('%$;).• &2F""6F7G.‰ &2J""6J7K.} &2L""6L7M.q &2X""6X7Y.e &2P""6P7Q.Y &2H""6H7I.M &2@""6@7A.A &2d""6d7e.5 &2R""6R7S.) &2N""6N7O/ž#0›*;).• &2F""6F7G.‰ &2J""6J7K.} &2L""6L7M.q &2X""6X7Y.e &2P""6P7Q.Y &2H""6H7I.M &2@""6@7A.A &2d""6d7e.5 &2R""6R7S.) &2N""6N7O&&&#/"!&,)'),v('%$;).‰ &2F""6F7G.} &2L""6L7M.q &2X""6X7Y.e &2P""6P7Q.Y &2H""6H7I.M &2@""6@7A.A &2d""6d7e.5 &2R""6R7S.) &2N""6N7O/’#0*;).‰ &2F""6F7G.} &2L""6L7M.q &2X""6X7Y.e &2P""6P7Q.Y &2H""6H7I.M &2@""6@7A.A &2d""6d7e.5 &2R""6R7S.) &2N""6N7O&&&#/"!&,)'),v(`2T""6T7U.ã &2V""6V7W.× &2f""6f7g.Ë &2h""6h7i.¿ &2:""6:7;.³ &2D""6D7E.§ &22""6273.› &28""6879. &2j""6j7k.ƒ &;&.} &24""6475.q &2l""6l7m.e &2n""6n7o.Y &26""6677.M &2>""6>7?.A &2p""6p7q.5 &2r""6r7s.) &;'.# &;(`),v('%$;).ī &2F""6F7G.ğ &2J""6J7K.ē &2L""6L7M.ć &2X""6X7Y.û &2P""6P7Q.ï &2H""6H7I.ã &2@""6@7A.× &2d""6d7e.Ë &2R""6R7S.¿ &2N""6N7O.³ &2T""6T7U.§ &2V""6V7W.› &2f""6f7g. &2h""6h7i.ƒ &28""6879.w &2j""6j7k.k &;&.e &24""6475.Y &2l""6l7m.M &2n""6n7o.A &26""6677.5 &2p""6p7q.) &2r""6r7s/Ĵ#0ı*;).ī &2F""6F7G.ğ &2J""6J7K.ē &2L""6L7M.ć &2X""6X7Y.û &2P""6P7Q.ï &2H""6H7I.ã &2@""6@7A.× &2d""6d7e.Ë &2R""6R7S.¿ &2N""6N7O.³ &2T""6T7U.§ &2V""6V7W.› &2f""6f7g. &2h""6h7i.ƒ &28""6879.w &2j""6j7k.k &;&.e &24""6475.Y &2l""6l7m.M &2n""6n7o.A &26""6677.5 &2p""6p7q.) &2r""6r7s&&&#/"!&,)'),v(`%;//?#2P""6P7Q/0$;//'$8#:t# )(#'#("'#&'#`),v(`%;//?#24""6475/0$;//'$8#:u# )(#'#("'#&'#`),v(`%;//?#2>""6>7?/0$;//'$8#:v# )(#'#("'#&'#`),v(`%;//?#2T""6T7U/0$;//'$8#:w# )(#'#("'#&'#`),v(`%;//?#2V""6V7W/0$;//'$8#:x# )(#'#("'#&'#`),v(`%2h""6h7i/0#;//'$8":y" )("'#&'#`),v(`%;//6#2f""6f7g/'$8":z" )("'#&'#`),v(`%;//?#2D""6D7E/0$;//'$8#:{# )(#'#("'#&'#`),v(`%;//?#22""6273/0$;//'$8#:|# )(#'#("'#&'#`),v(`%;//?#28""6879/0$;//'$8#:}# )(#'#("'#&'#`),v(`%;//0#;&/'$8":~" )("'#&'#`),v(`%;&/0#;//'$8":~" )("'#&'#`),v(`%;=/T#$;G.) &;K.# &;F0/*;G.) &;K.# &;F&/,$;>/#$+#)(#'#("'#&'#`),v('4""5!7€.A &4""5!7‚.5 &4ƒ""5!7„.) &;3.# &;.'),v(`%%;//Q#;&/H$$;J.# &;K0)*;J.# &;K&/,$;&/#$+$)($'#(#'#("'#&'#/"!&,)`),v(`%;//]#;&/T$%$;J.# &;K0)*;J.# &;K&/"!&,)/1$;&/($8$:…$!!)($'#(#'#("'#&'#`),v(';..G &2L""6L7M.; &4†""5!7‡./ &4ƒ""5!7„.# &;3'),v(`%2j""6j7k/J#4ˆ""5!7‰.5 &4Š""5!7‹.) &4Œ""5!7/#$+")("'#&'#`),v(`%;N/M#28""6879/>$;O." &"/0$;S/'$8$:Ž$ )($'#(#'#("'#&'#`),v(`%;N/d#28""6879/U$;O." &"/G$;S/>$;_/5$;l." &"/'$8&:& )(&'#(%'#($'#(#'#("'#&'#`),v(`%3""5$7‘.) &3’""5#7“/' 8!:”!! )`),v(`%;P/]#%28""6879/,#;R/#$+")("'#&'#." &"/6$2:""6:7;/'$8#:•# )(#'#("'#&'#`),v("$;+.) &;-.# &;Q/2#0/*;+.) &;-.# &;Q&&&#"),v('2<""6<7=.q &2>""6>7?.e &2@""6@7A.Y &2B""6B7C.M &2D""6D7E.A &22""6273.5 &26""6677.) &24""6475'),v('%$;+._ &;-.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E0e*;+._ &;-.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E&/& 8!:–! )'),v(`%;T/J#%28""6879/,#;^/#$+")("'#&'#." &"/#$+")("'#&'#`),v("%;U.) &;\\.# &;X/& 8!:—! )"),v(`%$%;V/2#2J""6J7K/#$+")("'#&'#0<*%;V/2#2J""6J7K/#$+")("'#&'#&/D#;W/;$2J""6J7K." &"/'$8#:˜# )(#'#("'#&'#`),v('$4™""5!7š/,#0)*4™""5!7š&&&#'),v(`%4$""5!7%/?#$4›""5!7œ0)*4›""5!7œ&/#$+")("'#&'#`),v(`%2l""6l7m/?#;Y/6$2n""6n7o/'$8#:# )(#'#("'#&'#`),v(`%%;Z/³#28""6879/¤$;Z/›$28""6879/Œ$;Z/ƒ$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+-)(-'#(,'#(+'#(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.ސ &%2ž""6ž7Ÿ/¤#;Z/›$28""6879/Œ$;Z/ƒ$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+,)(,'#(+'#(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.۹ &%2ž""6ž7Ÿ/Œ#;Z/ƒ$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+*)(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.ٺ &%2ž""6ž7Ÿ/t#;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#.ؓ &%2ž""6ž7Ÿ/\\#;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+&)(&'#(%'#($'#(#'#("'#&'#.ׄ &%2ž""6ž7Ÿ/D#;Z/;$28""6879/,$;[/#$+$)($'#(#'#("'#&'#.֍ &%2ž""6ž7Ÿ/,#;[/#$+")("'#&'#.ծ &%2ž""6ž7Ÿ/,#;Z/#$+")("'#&'#.Տ &%;Z/›#2ž""6ž7Ÿ/Œ$;Z/ƒ$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$++)(+'#(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.Ӈ &%;Z/ª#%28""6879/,#;Z/#$+")("'#&'#." &"/ƒ$2ž""6ž7Ÿ/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+*)(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.а &%;Z/¹#%28""6879/,#;Z/#$+")("'#&'#." &"/’$%28""6879/,#;Z/#$+")("'#&'#." &"/k$2ž""6ž7Ÿ/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+))()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.Ί &%;Z/È#%28""6879/,#;Z/#$+")("'#&'#." &"/¡$%28""6879/,#;Z/#$+")("'#&'#." &"/z$%28""6879/,#;Z/#$+")("'#&'#." &"/S$2ž""6ž7Ÿ/D$;Z/;$28""6879/,$;[/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#.˕ &%;Z/×#%28""6879/,#;Z/#$+")("'#&'#." &"/°$%28""6879/,#;Z/#$+")("'#&'#." &"/‰$%28""6879/,#;Z/#$+")("'#&'#." &"/b$%28""6879/,#;Z/#$+")("'#&'#." &"/;$2ž""6ž7Ÿ/,$;[/#$+')(''#(&'#(%'#($'#(#'#("'#&'#.ȑ &%;Z/þ#%28""6879/,#;Z/#$+")("'#&'#." &"/×$%28""6879/,#;Z/#$+")("'#&'#." &"/°$%28""6879/,#;Z/#$+")("'#&'#." &"/‰$%28""6879/,#;Z/#$+")("'#&'#." &"/b$%28""6879/,#;Z/#$+")("'#&'#." &"/;$2ž""6ž7Ÿ/,$;Z/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#.Ħ &%;Z/Ĝ#%28""6879/,#;Z/#$+")("'#&'#." &"/õ$%28""6879/,#;Z/#$+")("'#&'#." &"/Î$%28""6879/,#;Z/#$+")("'#&'#." &"/§$%28""6879/,#;Z/#$+")("'#&'#." &"/€$%28""6879/,#;Z/#$+")("'#&'#." &"/Y$%28""6879/,#;Z/#$+")("'#&'#." &"/2$2ž""6ž7Ÿ/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#/& 8!: ! )`),v(`%;#/M#;#." &"/?$;#." &"/1$;#." &"/#$+$)($'#(#'#("'#&'#`),v(`%;Z/;#28""6879/,$;Z/#$+#)(#'#("'#&'#.# &;\\`),v(`%;]/o#2J""6J7K/\`$;]/W$2J""6J7K/H$;]/?$2J""6J7K/0$;]/'$8':¡' )(''#(&'#(%'#($'#(#'#("'#&'#`),v(`%2¢""6¢7£/2#4¤""5!7¥/#$+")("'#&'#.˜ &%2¦""6¦7§/;#4¨""5!7©/,$;!/#$+#)(#'#("'#&'#.j &%2ª""6ª7«/5#;!/,$;!/#$+#)(#'#("'#&'#.B &%4¬""5!7­/,#;!/#$+")("'#&'#.# &;!`),v(`%%;!." &"/[#;!." &"/M$;!." &"/?$;!." &"/1$;!." &"/#$+%)(%'#($'#(#'#("'#&'#/' 8!:®!! )`),v(`$%22""6273/,#;\`/#$+")("'#&'#0<*%22""6273/,#;\`/#$+")("'#&'#&`),v(";a.A &;b.; &;c.5 &;d./ &;e.) &;f.# &;g"),v(`%3¯""5*7°/a#3±""5#7².G &3³""5#7´.; &3µ""5$7¶./ &3·""5#7¸.# &;6/($8":¹"! )("'#&'#`),v(`%3º""5%7»/I#3¼""5%7½./ &3¾""5"7¿.# &;6/($8":À"! )("'#&'#`),v(`%3Á""5'7Â/1#;/($8":Ã"! )("'#&'#`),v(`%3Ä""5$7Å/1#;ð/($8":Æ"! )("'#&'#`),v(`%3Ç""5&7È/1#;T/($8":É"! )("'#&'#`),v(`%3Ê""5"7Ë/N#%2>""6>7?/,#;6/#$+")("'#&'#." &"/'$8":Ì" )("'#&'#`),v(`%;h/P#%2>""6>7?/,#;i/#$+")("'#&'#." &"/)$8":Í""! )("'#&'#`),v('%$;j/&#0#*;j&&&#/"!&,)'),v('%$;j/&#0#*;j&&&#/"!&,)'),v(";k.) &;+.# &;-"),v('2l""6l7m.e &2n""6n7o.Y &24""6475.M &28""6879.A &2<""6<7=.5 &2@""6@7A.) &2B""6B7C'),v(`%26""6677/n#;m/e$$%2<""6<7=/,#;m/#$+")("'#&'#0<*%2<""6<7=/,#;m/#$+")("'#&'#&/#$+#)(#'#("'#&'#`),v(`%;n/A#2>""6>7?/2$;o/)$8#:Î#"" )(#'#("'#&'#`),v("$;p.) &;+.# &;-/2#0/*;p.) &;+.# &;-&&&#"),v("$;p.) &;+.# &;-0/*;p.) &;+.# &;-&"),v('2l""6l7m.e &2n""6n7o.Y &24""6475.M &26""6677.A &28""6879.5 &2@""6@7A.) &2B""6B7C'),v(";‘.# &;r"),v(`%;/G#;'/>$;s/5$;'/,$;„/#$+%)(%'#($'#(#'#("'#&'#`),v(";M.# &;t"),v(`%;/E#28""6879/6$;u.# &;x/'$8#:Ï# )(#'#("'#&'#`),v(`%;v.# &;w/J#%26""6677/,#;ƒ/#$+")("'#&'#." &"/#$+")("'#&'#`),v(`%2Ð""6Ð7Ñ/:#;€/1$;w." &"/#$+#)(#'#("'#&'#`),v(`%24""6475/,#;{/#$+")("'#&'#`),v(`%;z/3#$;y0#*;y&/#$+")("'#&'#`),v(";*.) &;+.# &;-"),v(';+. &;-.‰ &22""6273.} &26""6677.q &28""6879.e &2:""6:7;.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E'),v(`%;|/e#$%24""6475/,#;|/#$+")("'#&'#0<*%24""6475/,#;|/#$+")("'#&'#&/#$+")("'#&'#`),v(`%$;~0#*;~&/e#$%22""6273/,#;}/#$+")("'#&'#0<*%22""6273/,#;}/#$+")("'#&'#&/#$+")("'#&'#`),v("$;~0#*;~&"),v(';+.w &;-.q &28""6879.e &2:""6:7;.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E'),v(`%%;"/‡#$;".G &;!.A &2@""6@7A.5 &2F""6F7G.) &2J""6J7K0M*;".G &;!.A &2@""6@7A.5 &2F""6F7G.) &2J""6J7K&/#$+")("'#&'#/& 8!:Ò! )`),v(";.# &;‚"),v(`%%;O/2#2:""6:7;/#$+")("'#&'#." &"/,#;S/#$+")("'#&'#." &"`),v('$;+.ƒ &;-.} &2B""6B7C.q &2D""6D7E.e &22""6273.Y &28""6879.M &2:""6:7;.A &2<""6<7=.5 &2>""6>7?.) &2@""6@7A/Œ#0‰*;+.ƒ &;-.} &2B""6B7C.q &2D""6D7E.e &22""6273.Y &28""6879.M &2:""6:7;.A &2<""6<7=.5 &2>""6>7?.) &2@""6@7A&&&#'),v("$;y0#*;y&"),v(`%3’""5#7Ó/q#24""6475/b$$;!/&#0#*;!&&&#/L$2J""6J7K/=$$;!/&#0#*;!&&&#/'$8%:Ô% )(%'#($'#(#'#("'#&'#`),v('2Õ""6Õ7Ö'),v('2×""6×7Ø'),v('2Ù""6Ù7Ú'),v('2Û""6Û7Ü'),v('2Ý""6Ý7Þ'),v('2ß""6ß7à'),v('2á""6á7â'),v('2ã""6ã7ä'),v('2å""6å7æ'),v('2ç""6ç7è'),v('2é""6é7ê'),v("%;….Y &;†.S &;ˆ.M &;‰.G &;Š.A &;‹.; &;Œ.5 &;./ &;.) &;Ž.# &;6/& 8!:ë! )"),v(`%;„/G#;'/>$;’/5$;'/,$;”/#$+%)(%'#($'#(#'#("'#&'#`),v("%;“/' 8!:ì!! )"),v(`%;!/5#;!/,$;!/#$+#)(#'#("'#&'#`),v("%$;*.A &;+.; &;-.5 &;3./ &;4.) &;'.# &;(0G*;*.A &;+.; &;-.5 &;3./ &;4.) &;'.# &;(&/& 8!:í! )"),v(`%;¶/Y#$%;A/,#;¶/#$+")("'#&'#06*%;A/,#;¶/#$+")("'#&'#&/#$+")("'#&'#`),v(`%;9/N#%2:""6:7;/,#;9/#$+")("'#&'#." &"/'$8":î" )("'#&'#`),v(`%;:.c &%;˜/Y#$%;A/,#;˜/#$+")("'#&'#06*%;A/,#;˜/#$+")("'#&'#&/#$+")("'#&'#/& 8!:ï! )`),v(`%;L.# &;™/]#$%;B/,#;›/#$+")("'#&'#06*%;B/,#;›/#$+")("'#&'#&/'$8":ð" )("'#&'#`),v(`%;š." &"/>#;@/5$;M/,$;?/#$+$)($'#(#'#("'#&'#`),v(`%%;6/Y#$%;./,#;6/#$+")("'#&'#06*%;./,#;6/#$+")("'#&'#&/#$+")("'#&'#.# &;H/' 8!:ñ!! )`),v(";œ.) &;.# &; "),v(`%3ò""5!7ó/:#;</1$;Ÿ/($8#:ô#! )(#'#("'#&'#`),v(`%3õ""5'7ö/:#;</1$;ž/($8#:÷#! )(#'#("'#&'#`),v("%$;!/&#0#*;!&&&#/' 8!:ø!! )"),v(`%2ù""6ù7ú/o#%2J""6J7K/M#;!." &"/?$;!." &"/1$;!." &"/#$+$)($'#(#'#("'#&'#." &"/'$8":û" )("'#&'#`),v(`%;6/J#%;</,#;¡/#$+")("'#&'#." &"/)$8":ü""! )("'#&'#`),v(";6.) &;T.# &;H"),v(`%;£/Y#$%;B/,#;¤/#$+")("'#&'#06*%;B/,#;¤/#$+")("'#&'#&/#$+")("'#&'#`),v(`%3ý""5&7þ.G &3ÿ""5'7Ā.; &3ā""5$7Ă./ &3ă""5%7Ą.# &;6/& 8!:ą! )`),v(";¥.# &; "),v(`%3Ć""5(7ć/M#;</D$3Ĉ""5(7ĉ./ &3Ċ""5(7ċ.# &;6/#$+#)(#'#("'#&'#`),v(`%;6/Y#$%;A/,#;6/#$+")("'#&'#06*%;A/,#;6/#$+")("'#&'#&/#$+")("'#&'#`),v("%$;!/&#0#*;!&&&#/' 8!:Č!! )"),v("%;©/& 8!:č! )"),v(`%;ª/k#;;/b$;¯/Y$$%;B/,#;°/#$+")("'#&'#06*%;B/,#;°/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),v(";«.# &;¬"),v('3Ď""5$7ď.S &3Đ""5%7đ.G &3Ē""5%7ē.; &3Ĕ""5%7ĕ./ &3Ė""5+7ė.# &;­'),v(`3Ę""5'7ę./ &3Ě""5)7ě.# &;­`),v(";6.# &;®"),v(`%3Ĝ""5"7ĝ/,#;6/#$+")("'#&'#`),v(";­.# &;6"),v(`%;6/5#;</,$;±/#$+#)(#'#("'#&'#`),v(";6.# &;H"),v(`%;³/5#;./,$;/#$+#)(#'#("'#&'#`),v("%$;!/&#0#*;!&&&#/' 8!:Ğ!! )"),v("%;ž/' 8!:ğ!! )"),v(`%;¶/^#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/($8":Ġ"!!)("'#&'#`),v(`%%;7/e#$%2J""6J7K/,#;7/#$+")("'#&'#0<*%2J""6J7K/,#;7/#$+")("'#&'#&/#$+")("'#&'#/"!&,)`),v(`%;L.# &;™/]#$%;B/,#;¸/#$+")("'#&'#06*%;B/,#;¸/#$+")("'#&'#&/'$8":ġ" )("'#&'#`),v(";¹.# &; "),v(`%3Ģ""5#7ģ/:#;</1$;6/($8#:Ĥ#! )(#'#("'#&'#`),v("%$;!/&#0#*;!&&&#/' 8!:ĥ!! )"),v("%;ž/' 8!:Ħ!! )"),v(`%$;š0#*;š&/x#;@/o$;M/f$;?/]$$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/'$8%:ħ% )(%'#($'#(#'#("'#&'#`),v(";¾"),v(`%3Ĩ""5&7ĩ/k#;./b$;Á/Y$$%;A/,#;Á/#$+")("'#&'#06*%;A/,#;Á/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#.# &;¿`),v(`%;6/k#;./b$;À/Y$$%;A/,#;À/#$+")("'#&'#06*%;A/,#;À/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),v(`%;6/;#;</2$;6.# &;H/#$+#)(#'#("'#&'#`),v(";Â.G &;Ä.A &;Æ.; &;È.5 &;É./ &;Ê.) &;Ë.# &;À"),v(`%3Ī""5%7ī/5#;</,$;Ã/#$+#)(#'#("'#&'#`),v("%;I/' 8!:Ĭ!! )"),v(`%3ĭ""5&7Į/—#;</Ž$;D/…$;Å/|$$%$;'/&#0#*;'&&&#/,#;Å/#$+")("'#&'#0C*%$;'/&#0#*;'&&&#/,#;Å/#$+")("'#&'#&/,$;E/#$+&)(&'#(%'#($'#(#'#("'#&'#`),v(";t.# &;w"),v(`%3į""5%7İ/5#;</,$;Ç/#$+#)(#'#("'#&'#`),v("%;I/' 8!:ı!! )"),v(`%3IJ""5&7ij/:#;</1$;I/($8#:Ĵ#! )(#'#("'#&'#`),v(`%3ĵ""5%7Ķ/]#;</T$%3ķ""5$7ĸ/& 8!:Ĺ! ).4 &%3ĺ""5%7Ļ/& 8!:ļ! )/#$+#)(#'#("'#&'#`),v(`%3Ľ""5)7ľ/R#;</I$3Ŀ""5#7ŀ./ &3Ł""5(7ł.# &;6/($8#:Ń#! )(#'#("'#&'#`),v(`%3ń""5#7Ņ/“#;</Š$;D/$%;Ì/e#$%2D""6D7E/,#;Ì/#$+")("'#&'#0<*%2D""6D7E/,#;Ì/#$+")("'#&'#&/#$+")("'#&'#/,$;E/#$+%)(%'#($'#(#'#("'#&'#`),v(`%3ņ""5(7Ň./ &3ň""5$7ʼn.# &;6/' 8!:Ŋ!! )`),v(`%;6/Y#$%;A/,#;6/#$+")("'#&'#06*%;A/,#;6/#$+")("'#&'#&/#$+")("'#&'#`),v(`%;Ï/G#;./>$;Ï/5$;./,$;/#$+%)(%'#($'#(#'#("'#&'#`),v("%$;!/&#0#*;!&&&#/' 8!:ŋ!! )"),v(`%;Ñ/]#$%;A/,#;Ñ/#$+")("'#&'#06*%;A/,#;Ñ/#$+")("'#&'#&/'$8":Ō" )("'#&'#`),v(`%;™/]#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/'$8":ō" )("'#&'#`),v(`%;L.O &;™.I &%;@." &"/:#;t/1$;?." &"/#$+#)(#'#("'#&'#/]#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/'$8":Ŏ" )("'#&'#`),v(`%;Ô/]#$%;B/,#;Õ/#$+")("'#&'#06*%;B/,#;Õ/#$+")("'#&'#&/'$8":ŏ" )("'#&'#`),v("%;–/& 8!:Ő! )"),v(`%3ő""5(7Œ/:#;</1$;6/($8#:œ#! )(#'#("'#&'#.g &%3Ŕ""5&7ŕ/:#;</1$;6/($8#:Ŗ#! )(#'#("'#&'#.: &%3ŗ""5*7Ř/& 8!:ř! ).# &; `),v(`%%;6/k#$%;A/2#;6/)$8":Ś""$ )("'#&'#0<*%;A/2#;6/)$8":Ś""$ )("'#&'#&/)$8":ś""! )("'#&'#." &"/' 8!:Ŝ!! )`),v(`%;Ø/Y#$%;A/,#;Ø/#$+")("'#&'#06*%;A/,#;Ø/#$+")("'#&'#&/#$+")("'#&'#`),v(`%;™/Y#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/#$+")("'#&'#`),v("%$;!/&#0#*;!&&&#/' 8!:ŝ!! )"),v(`%;Û/Y#$%;B/,#;Ü/#$+")("'#&'#06*%;B/,#;Ü/#$+")("'#&'#&/#$+")("'#&'#`),v(`%3Ş""5&7ş.; &3Š""5'7š./ &3Ţ""5*7ţ.# &;6/& 8!:Ť! )`),v(`%3ť""5&7Ŧ/:#;</1$;Ý/($8#:ŧ#! )(#'#("'#&'#.} &%3õ""5'7ö/:#;</1$;ž/($8#:Ũ#! )(#'#("'#&'#.P &%3ũ""5+7Ū/:#;</1$;ž/($8#:ū#! )(#'#("'#&'#.# &; `),v(`3Ŭ""5+7ŭ.k &3Ů""5)7ů._ &3Ű""5(7ű.S &3Ų""5'7ų.G &3Ŵ""5&7ŵ.; &3Ŷ""5*7ŷ./ &3Ÿ""5)7Ź.# &;6`),v(';1." &"'),v(`%%;6/k#$%;A/2#;6/)$8":Ś""$ )("'#&'#0<*%;A/2#;6/)$8":Ś""$ )("'#&'#&/)$8":ś""! )("'#&'#." &"/' 8!:ź!! )`),v(`%;L.# &;™/]#$%;B/,#;á/#$+")("'#&'#06*%;B/,#;á/#$+")("'#&'#&/'$8":Ż" )("'#&'#`),v(";¹.# &; "),v(`%;ã/Y#$%;A/,#;ã/#$+")("'#&'#06*%;A/,#;ã/#$+")("'#&'#&/#$+")("'#&'#`),v(`%;ê/k#;./b$;í/Y$$%;B/,#;ä/#$+")("'#&'#06*%;B/,#;ä/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),v(";å.; &;æ.5 &;ç./ &;è.) &;é.# &; "),v(`%3ż""5#7Ž/:#;</1$;ð/($8#:ž#! )(#'#("'#&'#`),v(`%3ſ""5%7ƀ/:#;</1$;T/($8#:Ɓ#! )(#'#("'#&'#`),v(`%3Ƃ""5(7ƃ/F#;</=$;\\.) &;Y.# &;X/($8#:Ƅ#! )(#'#("'#&'#`),v(`%3ƅ""5&7Ɔ/:#;</1$;6/($8#:Ƈ#! )(#'#("'#&'#`),v(`%3ƈ""5%7Ɖ/A#;</8$$;!0#*;!&/($8#:Ɗ#! )(#'#("'#&'#`),v(`%;ë/G#;;/>$;6/5$;;/,$;ì/#$+%)(%'#($'#(#'#("'#&'#`),v(`%3’""5#7Ó.# &;6/' 8!:Ƌ!! )`),v(`%3±""5#7ƌ.G &3³""5#7ƍ.; &3·""5#7Ǝ./ &3µ""5$7Ə.# &;6/' 8!:Ɛ!! )`),v(`%;î/D#%;C/,#;ï/#$+")("'#&'#." &"/#$+")("'#&'#`),v("%;U.) &;\\.# &;X/& 8!:Ƒ! )"),v(`%%;!." &"/[#;!." &"/M$;!." &"/?$;!." &"/1$;!." &"/#$+%)(%'#($'#(#'#("'#&'#/' 8!:ƒ!! )`),v(`%%;!/?#;!." &"/1$;!." &"/#$+#)(#'#("'#&'#/' 8!:Ɠ!! )`),v(";¾"),v(`%;ž/^#$%;B/,#;ó/#$+")("'#&'#06*%;B/,#;ó/#$+")("'#&'#&/($8":Ɣ"!!)("'#&'#`),v(";ô.# &; "),v(`%2ƕ""6ƕ7Ɩ/L#;</C$2Ɨ""6Ɨ7Ƙ.) &2ƙ""6ƙ7ƚ/($8#:ƛ#! )(#'#("'#&'#`),v(`%;ž/^#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/($8":Ɯ"!!)("'#&'#`),v(`%;6/5#;0/,$;÷/#$+#)(#'#("'#&'#`),v("$;2.) &;4.# &;.0/*;2.) &;4.# &;.&"),v("$;%0#*;%&"),v(`%;ú/;#28""6879/,$;û/#$+#)(#'#("'#&'#`),v(`%3Ɲ""5%7ƞ.) &3Ɵ""5$7Ơ/' 8!:ơ!! )`),v(`%;ü/J#%28""6879/,#;^/#$+")("'#&'#." &"/#$+")("'#&'#`),v("%;\\.) &;X.# &;‚/' 8!:Ƣ!! )"),v(';".S &;!.M &2F""6F7G.A &2J""6J7K.5 &2H""6H7I.) &2N""6N7O'),v('2L""6L7M.• &2B""6B7C.‰ &2<""6<7=.} &2R""6R7S.q &2T""6T7U.e &2V""6V7W.Y &2P""6P7Q.M &2@""6@7A.A &2D""6D7E.5 &22""6273.) &2>""6>7?'),v(`%;Ā/b#28""6879/S$;û/J$%2ƣ""6ƣ7Ƥ/,#;ì/#$+")("'#&'#." &"/#$+$)($'#(#'#("'#&'#`),v(`%3ƥ""5%7Ʀ.) &3Ƨ""5$7ƨ/' 8!:ơ!! )`),v(`%3±""5#7².6 &3³""5#7´.* &$;+0#*;+&/' 8!:Ʃ!! )`),v(`%;Ą/‡#2F""6F7G/x$;ă/o$2F""6F7G/\`$;ă/W$2F""6F7G/H$;ă/?$2F""6F7G/0$;ą/'$8):ƪ) )()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#`),v(`%;#/>#;#/5$;#/,$;#/#$+$)($'#(#'#("'#&'#`),v(`%;ă/,#;ă/#$+")("'#&'#`),v(`%;ă/5#;ă/,$;ă/#$+#)(#'#("'#&'#`),v(`%;q/T#$;m0#*;m&/D$%; /,#;ø/#$+")("'#&'#." &"/#$+#)(#'#("'#&'#`),v(`%2ƫ""6ƫ7Ƭ.) &2ƭ""6ƭ7Ʈ/w#;0/n$;Ĉ/e$$%;B/2#;ĉ.# &; /#$+")("'#&'#0<*%;B/2#;ĉ.# &; /#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),v(";™.# &;L"),v(`%2Ư""6Ư7ư/5#;</,$;Ċ/#$+#)(#'#("'#&'#`),v(`%;D/S#;,/J$2:""6:7;/;$;,.# &;T/,$;E/#$+%)(%'#($'#(#'#("'#&'#`)];let l=0,u=0;const c=[{line:1,column:1}];let d=0,p=[],h=0,m;if(t.startRule!==void 0){if(!(t.startRule in s))throw new Error(`Can't start parsing from rule "`+t.startRule+'".');i=s[t.startRule]}function w(){return e.substring(u,l)}function x(){return T(u,l)}function g(C,_){return{type:"literal",text:C,ignoreCase:_}}function S(C,_,E){return{type:"class",parts:C,inverted:_,ignoreCase:E}}function b(){return{type:"end"}}function y(C){let _=c[C],E;if(_)return _;for(E=C-1;!c[E];)E--;for(_=c[E],_={line:_.line,column:_.column};E<C;)e.charCodeAt(E)===10?(_.line++,_.column=1):_.column++,E++;return c[C]=_,_}function T(C,_){const E=y(C),P=y(_);return{source:n,start:{offset:C,line:E.line,column:E.column},end:{offset:_,line:P.line,column:P.column}}}function k(C){l<d||(l>d&&(d=l,p=[]),p.push(C))}function N(C,_,E){return new up(up.buildMessage(C,_),C,_,E)}function v(C){return C.split("").map(_=>_.charCodeAt(0)-32)}function B(C){const _=a[C];let E=0;const P=[];let R=_.length;const D=[],G=[];let W;for(;;){for(;E<R;)switch(_[E]){case 0:G.push(o[_[E+1]]),E+=2;break;case 1:G.push(void 0),E++;break;case 2:G.push(null),E++;break;case 3:G.push(r),E++;break;case 4:G.push([]),E++;break;case 5:G.push(l),E++;break;case 6:G.pop(),E++;break;case 7:l=G.pop(),E++;break;case 8:G.length-=_[E+1],E+=2;break;case 9:G.splice(-2,1),E++;break;case 10:G[G.length-2].push(G.pop()),E++;break;case 11:G.push(G.splice(G.length-_[E+1],_[E+1])),E+=2;break;case 12:G.push(e.substring(G.pop(),l)),E++;break;case 13:D.push(R),P.push(E+3+_[E+1]+_[E+2]),G[G.length-1]?(R=E+3+_[E+1],E+=3):(R=E+3+_[E+1]+_[E+2],E+=3+_[E+1]);break;case 14:D.push(R),P.push(E+3+_[E+1]+_[E+2]),G[G.length-1]===r?(R=E+3+_[E+1],E+=3):(R=E+3+_[E+1]+_[E+2],E+=3+_[E+1]);break;case 15:D.push(R),P.push(E+3+_[E+1]+_[E+2]),G[G.length-1]!==r?(R=E+3+_[E+1],E+=3):(R=E+3+_[E+1]+_[E+2],E+=3+_[E+1]);break;case 16:G[G.length-1]!==r?(D.push(R),P.push(E),R=E+2+_[E+1],E+=2):E+=2+_[E+1];break;case 17:D.push(R),P.push(E+3+_[E+1]+_[E+2]),e.length>l?(R=E+3+_[E+1],E+=3):(R=E+3+_[E+1]+_[E+2],E+=3+_[E+1]);break;case 18:D.push(R),P.push(E+4+_[E+2]+_[E+3]),e.substr(l,o[_[E+1]].length)===o[_[E+1]]?(R=E+4+_[E+2],E+=4):(R=E+4+_[E+2]+_[E+3],E+=4+_[E+2]);break;case 19:D.push(R),P.push(E+4+_[E+2]+_[E+3]),e.substr(l,o[_[E+1]].length).toLowerCase()===o[_[E+1]]?(R=E+4+_[E+2],E+=4):(R=E+4+_[E+2]+_[E+3],E+=4+_[E+2]);break;case 20:D.push(R),P.push(E+4+_[E+2]+_[E+3]),o[_[E+1]].test(e.charAt(l))?(R=E+4+_[E+2],E+=4):(R=E+4+_[E+2]+_[E+3],E+=4+_[E+2]);break;case 21:G.push(e.substr(l,_[E+1])),l+=_[E+1],E+=2;break;case 22:G.push(o[_[E+1]]),l+=o[_[E+1]].length,E+=2;break;case 23:G.push(r),h===0&&k(o[_[E+1]]),E+=2;break;case 24:u=G[G.length-1-_[E+1]],E+=2;break;case 25:u=l,E++;break;case 26:W=_.slice(E+4,E+4+_[E+3]).map(function(ae){return G[G.length-1-ae]}),G.splice(G.length-_[E+2],_[E+2],o[_[E+1]].apply(null,W)),E+=4+_[E+3];break;case 27:G.push(B(_[E+1])),E+=2;break;case 28:h++,E++;break;case 29:h--,E++;break;default:throw new Error("Invalid opcode: "+_[E]+".")}if(D.length>0)R=D.pop(),E=P.pop();else break}return G[0]}t.data={};function q(C,_){return[C].concat(_)}if(m=B(i),m!==r&&l===e.length)return m;throw m!==r&&l<e.length&&k(b()),N(p,d<e.length?e.charAt(d):null,d<e.length?T(d,d+1):T(d,d))}const ow=iw;var Ct;(function(e){function t(s,i){const o={startRule:i};try{ow(s,o)}catch{o.data=-1}return o.data}e.parse=t;function r(s){const i=e.parse(s,"Name_Addr_Header");return i!==-1?i:void 0}e.nameAddrHeaderParse=r;function n(s){const i=e.parse(s,"SIP_URI");return i!==-1?i:void 0}e.URIParse=n})(Ct=Ct||(Ct={}));var aw={100:"Trying",180:"Ringing",181:"Call Is Being Forwarded",182:"Queued",183:"Session Progress",199:"Early Dialog Terminated",200:"OK",202:"Accepted",204:"No Notification",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",305:"Use Proxy",380:"Alternative Service",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",410:"Gone",412:"Conditional Request Failed",413:"Request Entity Too Large",414:"Request-URI Too Long",415:"Unsupported Media Type",416:"Unsupported URI Scheme",417:"Unknown Resource-Priority",420:"Bad Extension",421:"Extension Required",422:"Session Interval Too Small",423:"Interval Too Brief",428:"Use Identity Header",429:"Provide Referrer Identity",430:"Flow Failed",433:"Anonymity Disallowed",436:"Bad Identity-Info",437:"Unsupported Certificate",438:"Invalid Identity Header",439:"First Hop Lacks Outbound Support",440:"Max-Breadth Exceeded",469:"Bad Info Package",470:"Consent Needed",478:"Unresolvable Destination",480:"Temporarily Unavailable",481:"Call/Transaction Does Not Exist",482:"Loop Detected",483:"Too Many Hops",484:"Address Incomplete",485:"Ambiguous",486:"Busy Here",487:"Request Terminated",488:"Not Acceptable Here",489:"Bad Event",491:"Request Pending",493:"Undecipherable",494:"Security Agreement Required",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Server Time-out",505:"Version Not Supported",513:"Message Too Large",580:"Precondition Failure",600:"Busy Everywhere",603:"Decline",604:"Does Not Exist Anywhere",606:"Not Acceptable"};function os(e,t=32){let r="";for(let n=0;n<e;n++){const s=Math.floor(Math.random()*t);r+=s.toString(t)}return r}function jo(e){return aw[e]||""}function Uo(){return os(10)}function Fr(e){const t={"Call-Id":"Call-ID",Cseq:"CSeq","Min-Se":"Min-SE",Rack:"RAck",Rseq:"RSeq","Www-Authenticate":"WWW-Authenticate"},r=e.toLowerCase().replace(/_/g,"-").split("-"),n=r.length;let s="";for(let i=0;i<n;i++)i!==0&&(s+="-"),s+=r[i].charAt(0).toUpperCase()+r[i].substring(1);return t[s]&&(s=t[s]),s}function $i(e){return encodeURIComponent(e).replace(/%[A-F\d]{2}/g,"U").length}var dp=class{constructor(){this.headers={}}addHeader(e,t){const r={raw:t};e=Fr(e),this.headers[e]?this.headers[e].push(r):this.headers[e]=[r]}getHeader(e){const t=this.headers[Fr(e)];if(t){if(t[0])return t[0].raw}else return}getHeaders(e){const t=this.headers[Fr(e)],r=[];if(!t)return[];for(const n of t)r.push(n.raw);return r}hasHeader(e){return!!this.headers[Fr(e)]}parseHeader(e,t=0){if(e=Fr(e),this.headers[e]){if(t>=this.headers[e].length)return}else return;const r=this.headers[e][t],n=r.raw;if(r.parsed)return r.parsed;const s=Ct.parse(n,e.replace(/-/g,"_"));if(s===-1){this.headers[e].splice(t,1);return}else return r.parsed=s,s}s(e,t=0){return this.parseHeader(e,t)}setHeader(e,t){this.headers[Fr(e)]=[{raw:t}]}toString(){return this.data}},qs=class extends dp{constructor(){super()}},Rn=class extends dp{constructor(){super()}},Ul=class Ra{constructor(t,r,n,s,i,o,a){this.headers={},this.extraHeaders=[],this.options=Ra.getDefaultOptions(),i&&(this.options=Object.assign(Object.assign({},this.options),i),this.options.optionTags&&this.options.optionTags.length&&(this.options.optionTags=this.options.optionTags.slice()),this.options.routeSet&&this.options.routeSet.length&&(this.options.routeSet=this.options.routeSet.slice())),o&&o.length&&(this.extraHeaders=o.slice()),a&&(this.body={body:a.content,contentType:a.contentType}),this.method=t,this.ruri=r.clone(),this.fromURI=n.clone(),this.fromTag=this.options.fromTag?this.options.fromTag:Uo(),this.from=Ra.makeNameAddrHeader(this.fromURI,this.options.fromDisplayName,this.fromTag),this.toURI=s.clone(),this.toTag=this.options.toTag,this.to=Ra.makeNameAddrHeader(this.toURI,this.options.toDisplayName,this.toTag),this.callId=this.options.callId?this.options.callId:this.options.callIdPrefix+os(15),this.cseq=this.options.cseq,this.setHeader("route",this.options.routeSet),this.setHeader("via",""),this.setHeader("to",this.to.toString()),this.setHeader("from",this.from.toString()),this.setHeader("cseq",this.cseq+" "+this.method),this.setHeader("call-id",this.callId),this.setHeader("max-forwards","70")}static getDefaultOptions(){return{callId:"",callIdPrefix:"",cseq:1,toDisplayName:"",toTag:"",fromDisplayName:"",fromTag:"",forceRport:!1,hackViaTcp:!1,optionTags:["outbound"],routeSet:[],userAgentString:"sip.js",viaHost:""}}static makeNameAddrHeader(t,r,n){const s={};return n&&(s.tag=n),new yr(t,r,s)}getHeader(t){const r=this.headers[Fr(t)];if(r){if(r[0])return r[0]}else{const n=new RegExp("^\\s*"+t+"\\s*:","i");for(const s of this.extraHeaders)if(n.test(s))return s.substring(s.indexOf(":")+1).trim()}}getHeaders(t){const r=[],n=this.headers[Fr(t)];if(n)for(const s of n)r.push(s);else{const s=new RegExp("^\\s*"+t+"\\s*:","i");for(const i of this.extraHeaders)s.test(i)&&r.push(i.substring(i.indexOf(":")+1).trim())}return r}hasHeader(t){if(this.headers[Fr(t)])return!0;{const r=new RegExp("^\\s*"+t+"\\s*:","i");for(const n of this.extraHeaders)if(r.test(n))return!0}return!1}setHeader(t,r){this.headers[Fr(t)]=r instanceof Array?r:[r]}setViaHeader(t,r){this.options.hackViaTcp&&(r="TCP");let n="SIP/2.0/"+r;n+=" "+this.options.viaHost+";branch="+t,this.options.forceRport&&(n+=";rport"),this.setHeader("via",n),this.branch=t}toString(){let t="";t+=this.method+" "+this.ruri.toRaw()+` SIP/2.0\r
10
+ at `+o}return r}};function ow(e,t){t=t!==void 0?t:{};const r={},n=t.grammarSource,s={Contact:119,Name_Addr_Header:156,Record_Route:176,Request_Response:81,SIP_URI:45,Subscription_State:186,Supported:191,Require:182,Via:194,absoluteURI:84,Call_ID:118,Content_Disposition:130,Content_Length:135,Content_Type:136,CSeq:146,displayName:122,Event:149,From:151,host:52,Max_Forwards:154,Min_SE:213,Proxy_Authenticate:157,quoted_string:40,Refer_To:178,Replaces:179,Session_Expires:210,stun_URI:217,To:192,turn_URI:223,uuid:226,WWW_Authenticate:209,challenge:158,sipfrag:230,Referred_By:231};let i=119;const o=[`\r
11
+ `,v(`\r
12
+ `,!1),/^[0-9]/,S([["0","9"]],!1,!1),/^[a-zA-Z]/,S([["a","z"],["A","Z"]],!1,!1),/^[0-9a-fA-F]/,S([["0","9"],["a","f"],["A","F"]],!1,!1),/^[\0-\xFF]/,S([["\0","ÿ"]],!1,!1),/^["]/,S(['"'],!1,!1)," ",v(" ",!1)," ",v(" ",!1),/^[a-zA-Z0-9]/,S([["a","z"],["A","Z"],["0","9"]],!1,!1),";",v(";",!1),"/",v("/",!1),"?",v("?",!1),":",v(":",!1),"@",v("@",!1),"&",v("&",!1),"=",v("=",!1),"+",v("+",!1),"$",v("$",!1),",",v(",",!1),"-",v("-",!1),"_",v("_",!1),".",v(".",!1),"!",v("!",!1),"~",v("~",!1),"*",v("*",!1),"'",v("'",!1),"(",v("(",!1),")",v(")",!1),"%",v("%",!1),function(){return" "},function(){return":"},/^[!-~]/,S([["!","~"]],!1,!1),/^[\x80-\uFFFF]/,S([["€","￿"]],!1,!1),/^[\x80-\xBF]/,S([["€","¿"]],!1,!1),/^[a-f]/,S([["a","f"]],!1,!1),"`",v("`",!1),"<",v("<",!1),">",v(">",!1),"\\",v("\\",!1),"[",v("[",!1),"]",v("]",!1),"{",v("{",!1),"}",v("}",!1),function(){return"*"},function(){return"/"},function(){return"="},function(){return"("},function(){return")"},function(){return">"},function(){return"<"},function(){return","},function(){return";"},function(){return":"},function(){return'"'},/^[!-']/,S([["!","'"]],!1,!1),/^[*-[]/,S([["*","["]],!1,!1),/^[\]-~]/,S([["]","~"]],!1,!1),function(C){return C},/^[#-[]/,S([["#","["]],!1,!1),/^[\0-\t]/,S([["\0"," "]],!1,!1),/^[\v-\f]/,S([["\v","\f"]],!1,!1),/^[\x0E-\x7F]/,S([["",""]],!1,!1),function(){t=t||{data:{}},t.data.uri=new In(t.data.scheme,t.data.user,t.data.host,t.data.port),delete t.data.scheme,delete t.data.user,delete t.data.host,delete t.data.host_type,delete t.data.port},function(){t=t||{data:{}},t.data.uri=new In(t.data.scheme,t.data.user,t.data.host,t.data.port,t.data.uri_params,t.data.uri_headers),delete t.data.scheme,delete t.data.user,delete t.data.host,delete t.data.host_type,delete t.data.port,delete t.data.uri_params,t.startRule==="SIP_URI"&&(t.data=t.data.uri)},"sips",v("sips",!0),"sip",v("sip",!0),function(C){t=t||{data:{}},t.data.scheme=C},function(){t=t||{data:{}},t.data.user=decodeURIComponent(w().slice(0,-1))},function(){t=t||{data:{}},t.data.password=w()},function(){return t=t||{data:{}},t.data.host=w(),t.data.host},function(){return t=t||{data:{}},t.data.host_type="domain",w()},/^[a-zA-Z0-9_\-]/,S([["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),/^[a-zA-Z0-9\-]/,S([["a","z"],["A","Z"],["0","9"],"-"],!1,!1),function(){return t=t||{data:{}},t.data.host_type="IPv6",w()},"::",v("::",!1),function(){return t=t||{data:{}},t.data.host_type="IPv6",w()},function(){return t=t||{data:{}},t.data.host_type="IPv4",w()},"25",v("25",!1),/^[0-5]/,S([["0","5"]],!1,!1),"2",v("2",!1),/^[0-4]/,S([["0","4"]],!1,!1),"1",v("1",!1),/^[1-9]/,S([["1","9"]],!1,!1),function(C){return t=t||{data:{}},C=parseInt(C.join("")),t.data.port=C,C},"transport=",v("transport=",!0),"udp",v("udp",!0),"tcp",v("tcp",!0),"sctp",v("sctp",!0),"tls",v("tls",!0),function(C){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.transport=C.toLowerCase()},"user=",v("user=",!0),"phone",v("phone",!0),"ip",v("ip",!0),function(C){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.user=C.toLowerCase()},"method=",v("method=",!0),function(C){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.method=C},"ttl=",v("ttl=",!0),function(C){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.ttl=C},"maddr=",v("maddr=",!0),function(C){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.maddr=C},"lr",v("lr",!0),function(){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.lr=void 0},function(C,_){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),_===null?_=void 0:_=_[1],t.data.uri_params[C.toLowerCase()]=_},function(C,_){C=C.join("").toLowerCase(),_=_.join(""),t=t||{data:{}},t.data.uri_headers||(t.data.uri_headers={}),t.data.uri_headers[C]?t.data.uri_headers[C].push(_):t.data.uri_headers[C]=[_]},function(){t=t||{data:{}},t.startRule==="Refer_To"&&(t.data.uri=new In(t.data.scheme,t.data.user,t.data.host,t.data.port,t.data.uri_params,t.data.uri_headers),delete t.data.scheme,delete t.data.user,delete t.data.host,delete t.data.host_type,delete t.data.port,delete t.data.uri_params)},"//",v("//",!1),function(){t=t||{data:{}},t.data.scheme=w()},v("SIP",!0),function(){t=t||{data:{}},t.data.sip_version=w()},"INVITE",v("INVITE",!1),"ACK",v("ACK",!1),"VXACH",v("VXACH",!1),"OPTIONS",v("OPTIONS",!1),"BYE",v("BYE",!1),"CANCEL",v("CANCEL",!1),"REGISTER",v("REGISTER",!1),"SUBSCRIBE",v("SUBSCRIBE",!1),"NOTIFY",v("NOTIFY",!1),"REFER",v("REFER",!1),"PUBLISH",v("PUBLISH",!1),function(){return t=t||{data:{}},t.data.method=w(),t.data.method},function(C){t=t||{data:{}},t.data.status_code=parseInt(C.join(""))},function(){t=t||{data:{}},t.data.reason_phrase=w()},function(){t=t||{data:{}},t.data=w()},function(){var C,_;for(t=t||{data:{}},_=t.data.multi_header.length,C=0;C<_;C++)if(t.data.multi_header[C].parsed===null){t.data=null;break}t.data!==null?t.data=t.data.multi_header:t.data=-1},function(){var C;t=t||{data:{}},t.data.multi_header||(t.data.multi_header=[]);try{C=new wr(t.data.uri,t.data.displayName,t.data.params),delete t.data.uri,delete t.data.displayName,delete t.data.params}catch{C=null}t.data.multi_header.push({position:l,offset:x().start.offset,parsed:C})},function(C){C=w().trim(),C[0]==='"'&&(C=C.substring(1,C.length-1)),t=t||{data:{}},t.data.displayName=C},"q",v("q",!0),function(C){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.q=C},"expires",v("expires",!0),function(C){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.expires=C},function(C){return parseInt(C.join(""))},"0",v("0",!1),function(){return parseFloat(w())},function(C,_){t=t||{data:{}},t.data.params||(t.data.params={}),_===null?_=void 0:_=_[1],t.data.params[C.toLowerCase()]=_},"render",v("render",!0),"session",v("session",!0),"icon",v("icon",!0),"alert",v("alert",!0),function(){t=t||{data:{}},t.startRule==="Content_Disposition"&&(t.data.type=w().toLowerCase())},"handling",v("handling",!0),"optional",v("optional",!0),"required",v("required",!0),function(C){t=t||{data:{}},t.data=parseInt(C.join(""))},function(){t=t||{data:{}},t.data=w()},"text",v("text",!0),"image",v("image",!0),"audio",v("audio",!0),"video",v("video",!0),"application",v("application",!0),"message",v("message",!0),"multipart",v("multipart",!0),"x-",v("x-",!0),function(C){t=t||{data:{}},t.data.value=parseInt(C.join(""))},function(C){t=t||{data:{}},t.data=C},function(C){t=t||{data:{}},t.data.event=C.toLowerCase()},function(){t=t||{data:{}};var C=t.data.tag;t.data=new wr(t.data.uri,t.data.displayName,t.data.params),C&&t.data.setParam("tag",C)},"tag",v("tag",!0),function(C){t=t||{data:{}},t.data.tag=C},function(C){t=t||{data:{}},t.data=parseInt(C.join(""))},function(C){t=t||{data:{}},t.data=C},function(){t=t||{data:{}},t.data=new wr(t.data.uri,t.data.displayName,t.data.params)},"digest",v("Digest",!0),"realm",v("realm",!0),function(C){t=t||{data:{}},t.data.realm=C},"domain",v("domain",!0),"nonce",v("nonce",!0),function(C){t=t||{data:{}},t.data.nonce=C},"opaque",v("opaque",!0),function(C){t=t||{data:{}},t.data.opaque=C},"stale",v("stale",!0),"true",v("true",!0),function(){t=t||{data:{}},t.data.stale=!0},"false",v("false",!0),function(){t=t||{data:{}},t.data.stale=!1},"algorithm",v("algorithm",!0),"md5",v("MD5",!0),"md5-sess",v("MD5-sess",!0),function(C){t=t||{data:{}},t.data.algorithm=C.toUpperCase()},"qop",v("qop",!0),"auth-int",v("auth-int",!0),"auth",v("auth",!0),function(C){t=t||{data:{}},t.data.qop||(t.data.qop=[]),t.data.qop.push(C.toLowerCase())},function(C){t=t||{data:{}},t.data.value=parseInt(C.join(""))},function(){var C,_;for(t=t||{data:{}},_=t.data.multi_header.length,C=0;C<_;C++)if(t.data.multi_header[C].parsed===null){t.data=null;break}t.data!==null?t.data=t.data.multi_header:t.data=-1},function(){var C;t=t||{data:{}},t.data.multi_header||(t.data.multi_header=[]);try{C=new wr(t.data.uri,t.data.displayName,t.data.params),delete t.data.uri,delete t.data.displayName,delete t.data.params}catch{C=null}t.data.multi_header.push({position:l,offset:x().start.offset,parsed:C})},function(){t=t||{data:{}},t.data=new wr(t.data.uri,t.data.displayName,t.data.params)},function(){t=t||{data:{}},t.data.replaces_from_tag&&t.data.replaces_to_tag||(t.data=-1)},function(){t=t||{data:{}},t.data={call_id:t.data}},"from-tag",v("from-tag",!0),function(C){t=t||{data:{}},t.data.replaces_from_tag=C},"to-tag",v("to-tag",!0),function(C){t=t||{data:{}},t.data.replaces_to_tag=C},"early-only",v("early-only",!0),function(){t=t||{data:{}},t.data.early_only=!0},function(C,_){return _},function(C,_){return q(C,_)},function(C){t=t||{data:{}},t.startRule==="Require"&&(t.data=C||[])},function(C){t=t||{data:{}},t.data.value=parseInt(C.join(""))},"active",v("active",!0),"pending",v("pending",!0),"terminated",v("terminated",!0),function(){t=t||{data:{}},t.data.state=w()},"reason",v("reason",!0),function(C){t=t||{data:{}},typeof C<"u"&&(t.data.reason=C)},function(C){t=t||{data:{}},typeof C<"u"&&(t.data.expires=C)},"retry_after",v("retry_after",!0),function(C){t=t||{data:{}},typeof C<"u"&&(t.data.retry_after=C)},"deactivated",v("deactivated",!0),"probation",v("probation",!0),"rejected",v("rejected",!0),"timeout",v("timeout",!0),"giveup",v("giveup",!0),"noresource",v("noresource",!0),"invariant",v("invariant",!0),function(C){t=t||{data:{}},t.startRule==="Supported"&&(t.data=C||[])},function(){t=t||{data:{}};var C=t.data.tag;t.data=new wr(t.data.uri,t.data.displayName,t.data.params),C&&t.data.setParam("tag",C)},"ttl",v("ttl",!0),function(C){t=t||{data:{}},t.data.ttl=C},"maddr",v("maddr",!0),function(C){t=t||{data:{}},t.data.maddr=C},"received",v("received",!0),function(C){t=t||{data:{}},t.data.received=C},"branch",v("branch",!0),function(C){t=t||{data:{}},t.data.branch=C},"rport",v("rport",!0),function(C){t=t||{data:{}},typeof C<"u"&&(t.data.rport=C.join(""))},function(C){t=t||{data:{}},t.data.protocol=C},v("UDP",!0),v("TCP",!0),v("TLS",!0),v("SCTP",!0),function(C){t=t||{data:{}},t.data.transport=C},function(){t=t||{data:{}},t.data.host=w()},function(C){t=t||{data:{}},t.data.port=parseInt(C.join(""))},function(C){return parseInt(C.join(""))},function(C){t=t||{data:{}},t.startRule==="Session_Expires"&&(t.data.deltaSeconds=C)},"refresher",v("refresher",!1),"uas",v("uas",!1),"uac",v("uac",!1),function(C){t=t||{data:{}},t.startRule==="Session_Expires"&&(t.data.refresher=C)},function(C){t=t||{data:{}},t.startRule==="Min_SE"&&(t.data=C)},"stuns",v("stuns",!0),"stun",v("stun",!0),function(C){t=t||{data:{}},t.data.scheme=C},function(C){t=t||{data:{}},t.data.host=C},"?transport=",v("?transport=",!1),"turns",v("turns",!0),"turn",v("turn",!0),function(C){t=t||{data:{}},t.data.transport=C},function(){t=t||{data:{}},t.data=w()},"Referred-By",v("Referred-By",!1),"b",v("b",!1),"cid",v("cid",!1)],a=[g('2 ""6 7!'),g('4"""5!7#'),g('4$""5!7%'),g(`4&""5!7'`),g(";'.# &;("),g('4(""5!7)'),g('4*""5!7+'),g('2,""6,7-'),g('2.""6.7/'),g('40""5!71'),g('22""6273.‰ &24""6475.} &26""6677.q &28""6879.e &2:""6:7;.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E'),g(";).# &;,"),g('2F""6F7G.} &2H""6H7I.q &2J""6J7K.e &2L""6L7M.Y &2N""6N7O.M &2P""6P7Q.A &2R""6R7S.5 &2T""6T7U.) &2V""6V7W'),g(`%%2X""6X7Y/5#;#/,$;#/#$+#)(#'#("'#&'#/"!&,)`),g(`%%$;$0#*;$&/,#; /#$+")("'#&'#." &"/=#$;$/&#0#*;$&&&#/'$8":Z" )("'#&'#`),g(';.." &"'),g(`%$;'.# &;(0)*;'.# &;(&/?#28""6879/0$;//'$8#:[# )(#'#("'#&'#`),g(`%%$;2/&#0#*;2&&&#/g#$%$;.0#*;.&/,#;2/#$+")("'#&'#0=*%$;.0#*;.&/,#;2/#$+")("'#&'#&/#$+")("'#&'#/"!&,)`),g('4\\""5!7].# &;3'),g('4^""5!7_'),g('4`""5!7a'),g(';!.) &4b""5!7c'),g('%$;).• &2F""6F7G.‰ &2J""6J7K.} &2L""6L7M.q &2X""6X7Y.e &2P""6P7Q.Y &2H""6H7I.M &2@""6@7A.A &2d""6d7e.5 &2R""6R7S.) &2N""6N7O/ž#0›*;).• &2F""6F7G.‰ &2J""6J7K.} &2L""6L7M.q &2X""6X7Y.e &2P""6P7Q.Y &2H""6H7I.M &2@""6@7A.A &2d""6d7e.5 &2R""6R7S.) &2N""6N7O&&&#/"!&,)'),g('%$;).‰ &2F""6F7G.} &2L""6L7M.q &2X""6X7Y.e &2P""6P7Q.Y &2H""6H7I.M &2@""6@7A.A &2d""6d7e.5 &2R""6R7S.) &2N""6N7O/’#0*;).‰ &2F""6F7G.} &2L""6L7M.q &2X""6X7Y.e &2P""6P7Q.Y &2H""6H7I.M &2@""6@7A.A &2d""6d7e.5 &2R""6R7S.) &2N""6N7O&&&#/"!&,)'),g(`2T""6T7U.ã &2V""6V7W.× &2f""6f7g.Ë &2h""6h7i.¿ &2:""6:7;.³ &2D""6D7E.§ &22""6273.› &28""6879. &2j""6j7k.ƒ &;&.} &24""6475.q &2l""6l7m.e &2n""6n7o.Y &26""6677.M &2>""6>7?.A &2p""6p7q.5 &2r""6r7s.) &;'.# &;(`),g('%$;).ī &2F""6F7G.ğ &2J""6J7K.ē &2L""6L7M.ć &2X""6X7Y.û &2P""6P7Q.ï &2H""6H7I.ã &2@""6@7A.× &2d""6d7e.Ë &2R""6R7S.¿ &2N""6N7O.³ &2T""6T7U.§ &2V""6V7W.› &2f""6f7g. &2h""6h7i.ƒ &28""6879.w &2j""6j7k.k &;&.e &24""6475.Y &2l""6l7m.M &2n""6n7o.A &26""6677.5 &2p""6p7q.) &2r""6r7s/Ĵ#0ı*;).ī &2F""6F7G.ğ &2J""6J7K.ē &2L""6L7M.ć &2X""6X7Y.û &2P""6P7Q.ï &2H""6H7I.ã &2@""6@7A.× &2d""6d7e.Ë &2R""6R7S.¿ &2N""6N7O.³ &2T""6T7U.§ &2V""6V7W.› &2f""6f7g. &2h""6h7i.ƒ &28""6879.w &2j""6j7k.k &;&.e &24""6475.Y &2l""6l7m.M &2n""6n7o.A &26""6677.5 &2p""6p7q.) &2r""6r7s&&&#/"!&,)'),g(`%;//?#2P""6P7Q/0$;//'$8#:t# )(#'#("'#&'#`),g(`%;//?#24""6475/0$;//'$8#:u# )(#'#("'#&'#`),g(`%;//?#2>""6>7?/0$;//'$8#:v# )(#'#("'#&'#`),g(`%;//?#2T""6T7U/0$;//'$8#:w# )(#'#("'#&'#`),g(`%;//?#2V""6V7W/0$;//'$8#:x# )(#'#("'#&'#`),g(`%2h""6h7i/0#;//'$8":y" )("'#&'#`),g(`%;//6#2f""6f7g/'$8":z" )("'#&'#`),g(`%;//?#2D""6D7E/0$;//'$8#:{# )(#'#("'#&'#`),g(`%;//?#22""6273/0$;//'$8#:|# )(#'#("'#&'#`),g(`%;//?#28""6879/0$;//'$8#:}# )(#'#("'#&'#`),g(`%;//0#;&/'$8":~" )("'#&'#`),g(`%;&/0#;//'$8":~" )("'#&'#`),g(`%;=/T#$;G.) &;K.# &;F0/*;G.) &;K.# &;F&/,$;>/#$+#)(#'#("'#&'#`),g('4""5!7€.A &4""5!7‚.5 &4ƒ""5!7„.) &;3.# &;.'),g(`%%;//Q#;&/H$$;J.# &;K0)*;J.# &;K&/,$;&/#$+$)($'#(#'#("'#&'#/"!&,)`),g(`%;//]#;&/T$%$;J.# &;K0)*;J.# &;K&/"!&,)/1$;&/($8$:…$!!)($'#(#'#("'#&'#`),g(';..G &2L""6L7M.; &4†""5!7‡./ &4ƒ""5!7„.# &;3'),g(`%2j""6j7k/J#4ˆ""5!7‰.5 &4Š""5!7‹.) &4Œ""5!7/#$+")("'#&'#`),g(`%;N/M#28""6879/>$;O." &"/0$;S/'$8$:Ž$ )($'#(#'#("'#&'#`),g(`%;N/d#28""6879/U$;O." &"/G$;S/>$;_/5$;l." &"/'$8&:& )(&'#(%'#($'#(#'#("'#&'#`),g(`%3""5$7‘.) &3’""5#7“/' 8!:”!! )`),g(`%;P/]#%28""6879/,#;R/#$+")("'#&'#." &"/6$2:""6:7;/'$8#:•# )(#'#("'#&'#`),g("$;+.) &;-.# &;Q/2#0/*;+.) &;-.# &;Q&&&#"),g('2<""6<7=.q &2>""6>7?.e &2@""6@7A.Y &2B""6B7C.M &2D""6D7E.A &22""6273.5 &26""6677.) &24""6475'),g('%$;+._ &;-.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E0e*;+._ &;-.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E&/& 8!:–! )'),g(`%;T/J#%28""6879/,#;^/#$+")("'#&'#." &"/#$+")("'#&'#`),g("%;U.) &;\\.# &;X/& 8!:—! )"),g(`%$%;V/2#2J""6J7K/#$+")("'#&'#0<*%;V/2#2J""6J7K/#$+")("'#&'#&/D#;W/;$2J""6J7K." &"/'$8#:˜# )(#'#("'#&'#`),g('$4™""5!7š/,#0)*4™""5!7š&&&#'),g(`%4$""5!7%/?#$4›""5!7œ0)*4›""5!7œ&/#$+")("'#&'#`),g(`%2l""6l7m/?#;Y/6$2n""6n7o/'$8#:# )(#'#("'#&'#`),g(`%%;Z/³#28""6879/¤$;Z/›$28""6879/Œ$;Z/ƒ$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+-)(-'#(,'#(+'#(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.ސ &%2ž""6ž7Ÿ/¤#;Z/›$28""6879/Œ$;Z/ƒ$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+,)(,'#(+'#(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.۹ &%2ž""6ž7Ÿ/Œ#;Z/ƒ$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+*)(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.ٺ &%2ž""6ž7Ÿ/t#;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#.ؓ &%2ž""6ž7Ÿ/\\#;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+&)(&'#(%'#($'#(#'#("'#&'#.ׄ &%2ž""6ž7Ÿ/D#;Z/;$28""6879/,$;[/#$+$)($'#(#'#("'#&'#.֍ &%2ž""6ž7Ÿ/,#;[/#$+")("'#&'#.ծ &%2ž""6ž7Ÿ/,#;Z/#$+")("'#&'#.Տ &%;Z/›#2ž""6ž7Ÿ/Œ$;Z/ƒ$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$++)(+'#(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.Ӈ &%;Z/ª#%28""6879/,#;Z/#$+")("'#&'#." &"/ƒ$2ž""6ž7Ÿ/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+*)(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.а &%;Z/¹#%28""6879/,#;Z/#$+")("'#&'#." &"/’$%28""6879/,#;Z/#$+")("'#&'#." &"/k$2ž""6ž7Ÿ/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+))()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.Ί &%;Z/È#%28""6879/,#;Z/#$+")("'#&'#." &"/¡$%28""6879/,#;Z/#$+")("'#&'#." &"/z$%28""6879/,#;Z/#$+")("'#&'#." &"/S$2ž""6ž7Ÿ/D$;Z/;$28""6879/,$;[/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#.˕ &%;Z/×#%28""6879/,#;Z/#$+")("'#&'#." &"/°$%28""6879/,#;Z/#$+")("'#&'#." &"/‰$%28""6879/,#;Z/#$+")("'#&'#." &"/b$%28""6879/,#;Z/#$+")("'#&'#." &"/;$2ž""6ž7Ÿ/,$;[/#$+')(''#(&'#(%'#($'#(#'#("'#&'#.ȑ &%;Z/þ#%28""6879/,#;Z/#$+")("'#&'#." &"/×$%28""6879/,#;Z/#$+")("'#&'#." &"/°$%28""6879/,#;Z/#$+")("'#&'#." &"/‰$%28""6879/,#;Z/#$+")("'#&'#." &"/b$%28""6879/,#;Z/#$+")("'#&'#." &"/;$2ž""6ž7Ÿ/,$;Z/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#.Ħ &%;Z/Ĝ#%28""6879/,#;Z/#$+")("'#&'#." &"/õ$%28""6879/,#;Z/#$+")("'#&'#." &"/Î$%28""6879/,#;Z/#$+")("'#&'#." &"/§$%28""6879/,#;Z/#$+")("'#&'#." &"/€$%28""6879/,#;Z/#$+")("'#&'#." &"/Y$%28""6879/,#;Z/#$+")("'#&'#." &"/2$2ž""6ž7Ÿ/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#/& 8!: ! )`),g(`%;#/M#;#." &"/?$;#." &"/1$;#." &"/#$+$)($'#(#'#("'#&'#`),g(`%;Z/;#28""6879/,$;Z/#$+#)(#'#("'#&'#.# &;\\`),g(`%;]/o#2J""6J7K/\`$;]/W$2J""6J7K/H$;]/?$2J""6J7K/0$;]/'$8':¡' )(''#(&'#(%'#($'#(#'#("'#&'#`),g(`%2¢""6¢7£/2#4¤""5!7¥/#$+")("'#&'#.˜ &%2¦""6¦7§/;#4¨""5!7©/,$;!/#$+#)(#'#("'#&'#.j &%2ª""6ª7«/5#;!/,$;!/#$+#)(#'#("'#&'#.B &%4¬""5!7­/,#;!/#$+")("'#&'#.# &;!`),g(`%%;!." &"/[#;!." &"/M$;!." &"/?$;!." &"/1$;!." &"/#$+%)(%'#($'#(#'#("'#&'#/' 8!:®!! )`),g(`$%22""6273/,#;\`/#$+")("'#&'#0<*%22""6273/,#;\`/#$+")("'#&'#&`),g(";a.A &;b.; &;c.5 &;d./ &;e.) &;f.# &;g"),g(`%3¯""5*7°/a#3±""5#7².G &3³""5#7´.; &3µ""5$7¶./ &3·""5#7¸.# &;6/($8":¹"! )("'#&'#`),g(`%3º""5%7»/I#3¼""5%7½./ &3¾""5"7¿.# &;6/($8":À"! )("'#&'#`),g(`%3Á""5'7Â/1#;/($8":Ã"! )("'#&'#`),g(`%3Ä""5$7Å/1#;ð/($8":Æ"! )("'#&'#`),g(`%3Ç""5&7È/1#;T/($8":É"! )("'#&'#`),g(`%3Ê""5"7Ë/N#%2>""6>7?/,#;6/#$+")("'#&'#." &"/'$8":Ì" )("'#&'#`),g(`%;h/P#%2>""6>7?/,#;i/#$+")("'#&'#." &"/)$8":Í""! )("'#&'#`),g('%$;j/&#0#*;j&&&#/"!&,)'),g('%$;j/&#0#*;j&&&#/"!&,)'),g(";k.) &;+.# &;-"),g('2l""6l7m.e &2n""6n7o.Y &24""6475.M &28""6879.A &2<""6<7=.5 &2@""6@7A.) &2B""6B7C'),g(`%26""6677/n#;m/e$$%2<""6<7=/,#;m/#$+")("'#&'#0<*%2<""6<7=/,#;m/#$+")("'#&'#&/#$+#)(#'#("'#&'#`),g(`%;n/A#2>""6>7?/2$;o/)$8#:Î#"" )(#'#("'#&'#`),g("$;p.) &;+.# &;-/2#0/*;p.) &;+.# &;-&&&#"),g("$;p.) &;+.# &;-0/*;p.) &;+.# &;-&"),g('2l""6l7m.e &2n""6n7o.Y &24""6475.M &26""6677.A &28""6879.5 &2@""6@7A.) &2B""6B7C'),g(";‘.# &;r"),g(`%;/G#;'/>$;s/5$;'/,$;„/#$+%)(%'#($'#(#'#("'#&'#`),g(";M.# &;t"),g(`%;/E#28""6879/6$;u.# &;x/'$8#:Ï# )(#'#("'#&'#`),g(`%;v.# &;w/J#%26""6677/,#;ƒ/#$+")("'#&'#." &"/#$+")("'#&'#`),g(`%2Ð""6Ð7Ñ/:#;€/1$;w." &"/#$+#)(#'#("'#&'#`),g(`%24""6475/,#;{/#$+")("'#&'#`),g(`%;z/3#$;y0#*;y&/#$+")("'#&'#`),g(";*.) &;+.# &;-"),g(';+. &;-.‰ &22""6273.} &26""6677.q &28""6879.e &2:""6:7;.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E'),g(`%;|/e#$%24""6475/,#;|/#$+")("'#&'#0<*%24""6475/,#;|/#$+")("'#&'#&/#$+")("'#&'#`),g(`%$;~0#*;~&/e#$%22""6273/,#;}/#$+")("'#&'#0<*%22""6273/,#;}/#$+")("'#&'#&/#$+")("'#&'#`),g("$;~0#*;~&"),g(';+.w &;-.q &28""6879.e &2:""6:7;.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E'),g(`%%;"/‡#$;".G &;!.A &2@""6@7A.5 &2F""6F7G.) &2J""6J7K0M*;".G &;!.A &2@""6@7A.5 &2F""6F7G.) &2J""6J7K&/#$+")("'#&'#/& 8!:Ò! )`),g(";.# &;‚"),g(`%%;O/2#2:""6:7;/#$+")("'#&'#." &"/,#;S/#$+")("'#&'#." &"`),g('$;+.ƒ &;-.} &2B""6B7C.q &2D""6D7E.e &22""6273.Y &28""6879.M &2:""6:7;.A &2<""6<7=.5 &2>""6>7?.) &2@""6@7A/Œ#0‰*;+.ƒ &;-.} &2B""6B7C.q &2D""6D7E.e &22""6273.Y &28""6879.M &2:""6:7;.A &2<""6<7=.5 &2>""6>7?.) &2@""6@7A&&&#'),g("$;y0#*;y&"),g(`%3’""5#7Ó/q#24""6475/b$$;!/&#0#*;!&&&#/L$2J""6J7K/=$$;!/&#0#*;!&&&#/'$8%:Ô% )(%'#($'#(#'#("'#&'#`),g('2Õ""6Õ7Ö'),g('2×""6×7Ø'),g('2Ù""6Ù7Ú'),g('2Û""6Û7Ü'),g('2Ý""6Ý7Þ'),g('2ß""6ß7à'),g('2á""6á7â'),g('2ã""6ã7ä'),g('2å""6å7æ'),g('2ç""6ç7è'),g('2é""6é7ê'),g("%;….Y &;†.S &;ˆ.M &;‰.G &;Š.A &;‹.; &;Œ.5 &;./ &;.) &;Ž.# &;6/& 8!:ë! )"),g(`%;„/G#;'/>$;’/5$;'/,$;”/#$+%)(%'#($'#(#'#("'#&'#`),g("%;“/' 8!:ì!! )"),g(`%;!/5#;!/,$;!/#$+#)(#'#("'#&'#`),g("%$;*.A &;+.; &;-.5 &;3./ &;4.) &;'.# &;(0G*;*.A &;+.; &;-.5 &;3./ &;4.) &;'.# &;(&/& 8!:í! )"),g(`%;¶/Y#$%;A/,#;¶/#$+")("'#&'#06*%;A/,#;¶/#$+")("'#&'#&/#$+")("'#&'#`),g(`%;9/N#%2:""6:7;/,#;9/#$+")("'#&'#." &"/'$8":î" )("'#&'#`),g(`%;:.c &%;˜/Y#$%;A/,#;˜/#$+")("'#&'#06*%;A/,#;˜/#$+")("'#&'#&/#$+")("'#&'#/& 8!:ï! )`),g(`%;L.# &;™/]#$%;B/,#;›/#$+")("'#&'#06*%;B/,#;›/#$+")("'#&'#&/'$8":ð" )("'#&'#`),g(`%;š." &"/>#;@/5$;M/,$;?/#$+$)($'#(#'#("'#&'#`),g(`%%;6/Y#$%;./,#;6/#$+")("'#&'#06*%;./,#;6/#$+")("'#&'#&/#$+")("'#&'#.# &;H/' 8!:ñ!! )`),g(";œ.) &;.# &; "),g(`%3ò""5!7ó/:#;</1$;Ÿ/($8#:ô#! )(#'#("'#&'#`),g(`%3õ""5'7ö/:#;</1$;ž/($8#:÷#! )(#'#("'#&'#`),g("%$;!/&#0#*;!&&&#/' 8!:ø!! )"),g(`%2ù""6ù7ú/o#%2J""6J7K/M#;!." &"/?$;!." &"/1$;!." &"/#$+$)($'#(#'#("'#&'#." &"/'$8":û" )("'#&'#`),g(`%;6/J#%;</,#;¡/#$+")("'#&'#." &"/)$8":ü""! )("'#&'#`),g(";6.) &;T.# &;H"),g(`%;£/Y#$%;B/,#;¤/#$+")("'#&'#06*%;B/,#;¤/#$+")("'#&'#&/#$+")("'#&'#`),g(`%3ý""5&7þ.G &3ÿ""5'7Ā.; &3ā""5$7Ă./ &3ă""5%7Ą.# &;6/& 8!:ą! )`),g(";¥.# &; "),g(`%3Ć""5(7ć/M#;</D$3Ĉ""5(7ĉ./ &3Ċ""5(7ċ.# &;6/#$+#)(#'#("'#&'#`),g(`%;6/Y#$%;A/,#;6/#$+")("'#&'#06*%;A/,#;6/#$+")("'#&'#&/#$+")("'#&'#`),g("%$;!/&#0#*;!&&&#/' 8!:Č!! )"),g("%;©/& 8!:č! )"),g(`%;ª/k#;;/b$;¯/Y$$%;B/,#;°/#$+")("'#&'#06*%;B/,#;°/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),g(";«.# &;¬"),g('3Ď""5$7ď.S &3Đ""5%7đ.G &3Ē""5%7ē.; &3Ĕ""5%7ĕ./ &3Ė""5+7ė.# &;­'),g(`3Ę""5'7ę./ &3Ě""5)7ě.# &;­`),g(";6.# &;®"),g(`%3Ĝ""5"7ĝ/,#;6/#$+")("'#&'#`),g(";­.# &;6"),g(`%;6/5#;</,$;±/#$+#)(#'#("'#&'#`),g(";6.# &;H"),g(`%;³/5#;./,$;/#$+#)(#'#("'#&'#`),g("%$;!/&#0#*;!&&&#/' 8!:Ğ!! )"),g("%;ž/' 8!:ğ!! )"),g(`%;¶/^#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/($8":Ġ"!!)("'#&'#`),g(`%%;7/e#$%2J""6J7K/,#;7/#$+")("'#&'#0<*%2J""6J7K/,#;7/#$+")("'#&'#&/#$+")("'#&'#/"!&,)`),g(`%;L.# &;™/]#$%;B/,#;¸/#$+")("'#&'#06*%;B/,#;¸/#$+")("'#&'#&/'$8":ġ" )("'#&'#`),g(";¹.# &; "),g(`%3Ģ""5#7ģ/:#;</1$;6/($8#:Ĥ#! )(#'#("'#&'#`),g("%$;!/&#0#*;!&&&#/' 8!:ĥ!! )"),g("%;ž/' 8!:Ħ!! )"),g(`%$;š0#*;š&/x#;@/o$;M/f$;?/]$$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/'$8%:ħ% )(%'#($'#(#'#("'#&'#`),g(";¾"),g(`%3Ĩ""5&7ĩ/k#;./b$;Á/Y$$%;A/,#;Á/#$+")("'#&'#06*%;A/,#;Á/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#.# &;¿`),g(`%;6/k#;./b$;À/Y$$%;A/,#;À/#$+")("'#&'#06*%;A/,#;À/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),g(`%;6/;#;</2$;6.# &;H/#$+#)(#'#("'#&'#`),g(";Â.G &;Ä.A &;Æ.; &;È.5 &;É./ &;Ê.) &;Ë.# &;À"),g(`%3Ī""5%7ī/5#;</,$;Ã/#$+#)(#'#("'#&'#`),g("%;I/' 8!:Ĭ!! )"),g(`%3ĭ""5&7Į/—#;</Ž$;D/…$;Å/|$$%$;'/&#0#*;'&&&#/,#;Å/#$+")("'#&'#0C*%$;'/&#0#*;'&&&#/,#;Å/#$+")("'#&'#&/,$;E/#$+&)(&'#(%'#($'#(#'#("'#&'#`),g(";t.# &;w"),g(`%3į""5%7İ/5#;</,$;Ç/#$+#)(#'#("'#&'#`),g("%;I/' 8!:ı!! )"),g(`%3IJ""5&7ij/:#;</1$;I/($8#:Ĵ#! )(#'#("'#&'#`),g(`%3ĵ""5%7Ķ/]#;</T$%3ķ""5$7ĸ/& 8!:Ĺ! ).4 &%3ĺ""5%7Ļ/& 8!:ļ! )/#$+#)(#'#("'#&'#`),g(`%3Ľ""5)7ľ/R#;</I$3Ŀ""5#7ŀ./ &3Ł""5(7ł.# &;6/($8#:Ń#! )(#'#("'#&'#`),g(`%3ń""5#7Ņ/“#;</Š$;D/$%;Ì/e#$%2D""6D7E/,#;Ì/#$+")("'#&'#0<*%2D""6D7E/,#;Ì/#$+")("'#&'#&/#$+")("'#&'#/,$;E/#$+%)(%'#($'#(#'#("'#&'#`),g(`%3ņ""5(7Ň./ &3ň""5$7ʼn.# &;6/' 8!:Ŋ!! )`),g(`%;6/Y#$%;A/,#;6/#$+")("'#&'#06*%;A/,#;6/#$+")("'#&'#&/#$+")("'#&'#`),g(`%;Ï/G#;./>$;Ï/5$;./,$;/#$+%)(%'#($'#(#'#("'#&'#`),g("%$;!/&#0#*;!&&&#/' 8!:ŋ!! )"),g(`%;Ñ/]#$%;A/,#;Ñ/#$+")("'#&'#06*%;A/,#;Ñ/#$+")("'#&'#&/'$8":Ō" )("'#&'#`),g(`%;™/]#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/'$8":ō" )("'#&'#`),g(`%;L.O &;™.I &%;@." &"/:#;t/1$;?." &"/#$+#)(#'#("'#&'#/]#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/'$8":Ŏ" )("'#&'#`),g(`%;Ô/]#$%;B/,#;Õ/#$+")("'#&'#06*%;B/,#;Õ/#$+")("'#&'#&/'$8":ŏ" )("'#&'#`),g("%;–/& 8!:Ő! )"),g(`%3ő""5(7Œ/:#;</1$;6/($8#:œ#! )(#'#("'#&'#.g &%3Ŕ""5&7ŕ/:#;</1$;6/($8#:Ŗ#! )(#'#("'#&'#.: &%3ŗ""5*7Ř/& 8!:ř! ).# &; `),g(`%%;6/k#$%;A/2#;6/)$8":Ś""$ )("'#&'#0<*%;A/2#;6/)$8":Ś""$ )("'#&'#&/)$8":ś""! )("'#&'#." &"/' 8!:Ŝ!! )`),g(`%;Ø/Y#$%;A/,#;Ø/#$+")("'#&'#06*%;A/,#;Ø/#$+")("'#&'#&/#$+")("'#&'#`),g(`%;™/Y#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/#$+")("'#&'#`),g("%$;!/&#0#*;!&&&#/' 8!:ŝ!! )"),g(`%;Û/Y#$%;B/,#;Ü/#$+")("'#&'#06*%;B/,#;Ü/#$+")("'#&'#&/#$+")("'#&'#`),g(`%3Ş""5&7ş.; &3Š""5'7š./ &3Ţ""5*7ţ.# &;6/& 8!:Ť! )`),g(`%3ť""5&7Ŧ/:#;</1$;Ý/($8#:ŧ#! )(#'#("'#&'#.} &%3õ""5'7ö/:#;</1$;ž/($8#:Ũ#! )(#'#("'#&'#.P &%3ũ""5+7Ū/:#;</1$;ž/($8#:ū#! )(#'#("'#&'#.# &; `),g(`3Ŭ""5+7ŭ.k &3Ů""5)7ů._ &3Ű""5(7ű.S &3Ų""5'7ų.G &3Ŵ""5&7ŵ.; &3Ŷ""5*7ŷ./ &3Ÿ""5)7Ź.# &;6`),g(';1." &"'),g(`%%;6/k#$%;A/2#;6/)$8":Ś""$ )("'#&'#0<*%;A/2#;6/)$8":Ś""$ )("'#&'#&/)$8":ś""! )("'#&'#." &"/' 8!:ź!! )`),g(`%;L.# &;™/]#$%;B/,#;á/#$+")("'#&'#06*%;B/,#;á/#$+")("'#&'#&/'$8":Ż" )("'#&'#`),g(";¹.# &; "),g(`%;ã/Y#$%;A/,#;ã/#$+")("'#&'#06*%;A/,#;ã/#$+")("'#&'#&/#$+")("'#&'#`),g(`%;ê/k#;./b$;í/Y$$%;B/,#;ä/#$+")("'#&'#06*%;B/,#;ä/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),g(";å.; &;æ.5 &;ç./ &;è.) &;é.# &; "),g(`%3ż""5#7Ž/:#;</1$;ð/($8#:ž#! )(#'#("'#&'#`),g(`%3ſ""5%7ƀ/:#;</1$;T/($8#:Ɓ#! )(#'#("'#&'#`),g(`%3Ƃ""5(7ƃ/F#;</=$;\\.) &;Y.# &;X/($8#:Ƅ#! )(#'#("'#&'#`),g(`%3ƅ""5&7Ɔ/:#;</1$;6/($8#:Ƈ#! )(#'#("'#&'#`),g(`%3ƈ""5%7Ɖ/A#;</8$$;!0#*;!&/($8#:Ɗ#! )(#'#("'#&'#`),g(`%;ë/G#;;/>$;6/5$;;/,$;ì/#$+%)(%'#($'#(#'#("'#&'#`),g(`%3’""5#7Ó.# &;6/' 8!:Ƌ!! )`),g(`%3±""5#7ƌ.G &3³""5#7ƍ.; &3·""5#7Ǝ./ &3µ""5$7Ə.# &;6/' 8!:Ɛ!! )`),g(`%;î/D#%;C/,#;ï/#$+")("'#&'#." &"/#$+")("'#&'#`),g("%;U.) &;\\.# &;X/& 8!:Ƒ! )"),g(`%%;!." &"/[#;!." &"/M$;!." &"/?$;!." &"/1$;!." &"/#$+%)(%'#($'#(#'#("'#&'#/' 8!:ƒ!! )`),g(`%%;!/?#;!." &"/1$;!." &"/#$+#)(#'#("'#&'#/' 8!:Ɠ!! )`),g(";¾"),g(`%;ž/^#$%;B/,#;ó/#$+")("'#&'#06*%;B/,#;ó/#$+")("'#&'#&/($8":Ɣ"!!)("'#&'#`),g(";ô.# &; "),g(`%2ƕ""6ƕ7Ɩ/L#;</C$2Ɨ""6Ɨ7Ƙ.) &2ƙ""6ƙ7ƚ/($8#:ƛ#! )(#'#("'#&'#`),g(`%;ž/^#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/($8":Ɯ"!!)("'#&'#`),g(`%;6/5#;0/,$;÷/#$+#)(#'#("'#&'#`),g("$;2.) &;4.# &;.0/*;2.) &;4.# &;.&"),g("$;%0#*;%&"),g(`%;ú/;#28""6879/,$;û/#$+#)(#'#("'#&'#`),g(`%3Ɲ""5%7ƞ.) &3Ɵ""5$7Ơ/' 8!:ơ!! )`),g(`%;ü/J#%28""6879/,#;^/#$+")("'#&'#." &"/#$+")("'#&'#`),g("%;\\.) &;X.# &;‚/' 8!:Ƣ!! )"),g(';".S &;!.M &2F""6F7G.A &2J""6J7K.5 &2H""6H7I.) &2N""6N7O'),g('2L""6L7M.• &2B""6B7C.‰ &2<""6<7=.} &2R""6R7S.q &2T""6T7U.e &2V""6V7W.Y &2P""6P7Q.M &2@""6@7A.A &2D""6D7E.5 &22""6273.) &2>""6>7?'),g(`%;Ā/b#28""6879/S$;û/J$%2ƣ""6ƣ7Ƥ/,#;ì/#$+")("'#&'#." &"/#$+$)($'#(#'#("'#&'#`),g(`%3ƥ""5%7Ʀ.) &3Ƨ""5$7ƨ/' 8!:ơ!! )`),g(`%3±""5#7².6 &3³""5#7´.* &$;+0#*;+&/' 8!:Ʃ!! )`),g(`%;Ą/‡#2F""6F7G/x$;ă/o$2F""6F7G/\`$;ă/W$2F""6F7G/H$;ă/?$2F""6F7G/0$;ą/'$8):ƪ) )()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#`),g(`%;#/>#;#/5$;#/,$;#/#$+$)($'#(#'#("'#&'#`),g(`%;ă/,#;ă/#$+")("'#&'#`),g(`%;ă/5#;ă/,$;ă/#$+#)(#'#("'#&'#`),g(`%;q/T#$;m0#*;m&/D$%; /,#;ø/#$+")("'#&'#." &"/#$+#)(#'#("'#&'#`),g(`%2ƫ""6ƫ7Ƭ.) &2ƭ""6ƭ7Ʈ/w#;0/n$;Ĉ/e$$%;B/2#;ĉ.# &; /#$+")("'#&'#0<*%;B/2#;ĉ.# &; /#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),g(";™.# &;L"),g(`%2Ư""6Ư7ư/5#;</,$;Ċ/#$+#)(#'#("'#&'#`),g(`%;D/S#;,/J$2:""6:7;/;$;,.# &;T/,$;E/#$+%)(%'#($'#(#'#("'#&'#`)];let l=0,u=0;const c=[{line:1,column:1}];let d=0,p=[],h=0,m;if(t.startRule!==void 0){if(!(t.startRule in s))throw new Error(`Can't start parsing from rule "`+t.startRule+'".');i=s[t.startRule]}function w(){return e.substring(u,l)}function x(){return T(u,l)}function v(C,_){return{type:"literal",text:C,ignoreCase:_}}function S(C,_,E){return{type:"class",parts:C,inverted:_,ignoreCase:E}}function b(){return{type:"end"}}function y(C){let _=c[C],E;if(_)return _;for(E=C-1;!c[E];)E--;for(_=c[E],_={line:_.line,column:_.column};E<C;)e.charCodeAt(E)===10?(_.line++,_.column=1):_.column++,E++;return c[C]=_,_}function T(C,_){const E=y(C),P=y(_);return{source:n,start:{offset:C,line:E.line,column:E.column},end:{offset:_,line:P.line,column:P.column}}}function I(C){l<d||(l>d&&(d=l,p=[]),p.push(C))}function N(C,_,E){return new up(up.buildMessage(C,_),C,_,E)}function g(C){return C.split("").map(_=>_.charCodeAt(0)-32)}function B(C){const _=a[C];let E=0;const P=[];let R=_.length;const D=[],G=[];let W;for(;;){for(;E<R;)switch(_[E]){case 0:G.push(o[_[E+1]]),E+=2;break;case 1:G.push(void 0),E++;break;case 2:G.push(null),E++;break;case 3:G.push(r),E++;break;case 4:G.push([]),E++;break;case 5:G.push(l),E++;break;case 6:G.pop(),E++;break;case 7:l=G.pop(),E++;break;case 8:G.length-=_[E+1],E+=2;break;case 9:G.splice(-2,1),E++;break;case 10:G[G.length-2].push(G.pop()),E++;break;case 11:G.push(G.splice(G.length-_[E+1],_[E+1])),E+=2;break;case 12:G.push(e.substring(G.pop(),l)),E++;break;case 13:D.push(R),P.push(E+3+_[E+1]+_[E+2]),G[G.length-1]?(R=E+3+_[E+1],E+=3):(R=E+3+_[E+1]+_[E+2],E+=3+_[E+1]);break;case 14:D.push(R),P.push(E+3+_[E+1]+_[E+2]),G[G.length-1]===r?(R=E+3+_[E+1],E+=3):(R=E+3+_[E+1]+_[E+2],E+=3+_[E+1]);break;case 15:D.push(R),P.push(E+3+_[E+1]+_[E+2]),G[G.length-1]!==r?(R=E+3+_[E+1],E+=3):(R=E+3+_[E+1]+_[E+2],E+=3+_[E+1]);break;case 16:G[G.length-1]!==r?(D.push(R),P.push(E),R=E+2+_[E+1],E+=2):E+=2+_[E+1];break;case 17:D.push(R),P.push(E+3+_[E+1]+_[E+2]),e.length>l?(R=E+3+_[E+1],E+=3):(R=E+3+_[E+1]+_[E+2],E+=3+_[E+1]);break;case 18:D.push(R),P.push(E+4+_[E+2]+_[E+3]),e.substr(l,o[_[E+1]].length)===o[_[E+1]]?(R=E+4+_[E+2],E+=4):(R=E+4+_[E+2]+_[E+3],E+=4+_[E+2]);break;case 19:D.push(R),P.push(E+4+_[E+2]+_[E+3]),e.substr(l,o[_[E+1]].length).toLowerCase()===o[_[E+1]]?(R=E+4+_[E+2],E+=4):(R=E+4+_[E+2]+_[E+3],E+=4+_[E+2]);break;case 20:D.push(R),P.push(E+4+_[E+2]+_[E+3]),o[_[E+1]].test(e.charAt(l))?(R=E+4+_[E+2],E+=4):(R=E+4+_[E+2]+_[E+3],E+=4+_[E+2]);break;case 21:G.push(e.substr(l,_[E+1])),l+=_[E+1],E+=2;break;case 22:G.push(o[_[E+1]]),l+=o[_[E+1]].length,E+=2;break;case 23:G.push(r),h===0&&I(o[_[E+1]]),E+=2;break;case 24:u=G[G.length-1-_[E+1]],E+=2;break;case 25:u=l,E++;break;case 26:W=_.slice(E+4,E+4+_[E+3]).map(function(ae){return G[G.length-1-ae]}),G.splice(G.length-_[E+2],_[E+2],o[_[E+1]].apply(null,W)),E+=4+_[E+3];break;case 27:G.push(B(_[E+1])),E+=2;break;case 28:h++,E++;break;case 29:h--,E++;break;default:throw new Error("Invalid opcode: "+_[E]+".")}if(D.length>0)R=D.pop(),E=P.pop();else break}return G[0]}t.data={};function q(C,_){return[C].concat(_)}if(m=B(i),m!==r&&l===e.length)return m;throw m!==r&&l<e.length&&I(b()),N(p,d<e.length?e.charAt(d):null,d<e.length?T(d,d+1):T(d,d))}const aw=ow;var Ct;(function(e){function t(s,i){const o={startRule:i};try{aw(s,o)}catch{o.data=-1}return o.data}e.parse=t;function r(s){const i=e.parse(s,"Name_Addr_Header");return i!==-1?i:void 0}e.nameAddrHeaderParse=r;function n(s){const i=e.parse(s,"SIP_URI");return i!==-1?i:void 0}e.URIParse=n})(Ct=Ct||(Ct={}));var lw={100:"Trying",180:"Ringing",181:"Call Is Being Forwarded",182:"Queued",183:"Session Progress",199:"Early Dialog Terminated",200:"OK",202:"Accepted",204:"No Notification",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",305:"Use Proxy",380:"Alternative Service",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",410:"Gone",412:"Conditional Request Failed",413:"Request Entity Too Large",414:"Request-URI Too Long",415:"Unsupported Media Type",416:"Unsupported URI Scheme",417:"Unknown Resource-Priority",420:"Bad Extension",421:"Extension Required",422:"Session Interval Too Small",423:"Interval Too Brief",428:"Use Identity Header",429:"Provide Referrer Identity",430:"Flow Failed",433:"Anonymity Disallowed",436:"Bad Identity-Info",437:"Unsupported Certificate",438:"Invalid Identity Header",439:"First Hop Lacks Outbound Support",440:"Max-Breadth Exceeded",469:"Bad Info Package",470:"Consent Needed",478:"Unresolvable Destination",480:"Temporarily Unavailable",481:"Call/Transaction Does Not Exist",482:"Loop Detected",483:"Too Many Hops",484:"Address Incomplete",485:"Ambiguous",486:"Busy Here",487:"Request Terminated",488:"Not Acceptable Here",489:"Bad Event",491:"Request Pending",493:"Undecipherable",494:"Security Agreement Required",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Server Time-out",505:"Version Not Supported",513:"Message Too Large",580:"Precondition Failure",600:"Busy Everywhere",603:"Decline",604:"Does Not Exist Anywhere",606:"Not Acceptable"};function os(e,t=32){let r="";for(let n=0;n<e;n++){const s=Math.floor(Math.random()*t);r+=s.toString(t)}return r}function Uo(e){return lw[e]||""}function zo(){return os(10)}function Lr(e){const t={"Call-Id":"Call-ID",Cseq:"CSeq","Min-Se":"Min-SE",Rack:"RAck",Rseq:"RSeq","Www-Authenticate":"WWW-Authenticate"},r=e.toLowerCase().replace(/_/g,"-").split("-"),n=r.length;let s="";for(let i=0;i<n;i++)i!==0&&(s+="-"),s+=r[i].charAt(0).toUpperCase()+r[i].substring(1);return t[s]&&(s=t[s]),s}function Pi(e){return encodeURIComponent(e).replace(/%[A-F\d]{2}/g,"U").length}var dp=class{constructor(){this.headers={}}addHeader(e,t){const r={raw:t};e=Lr(e),this.headers[e]?this.headers[e].push(r):this.headers[e]=[r]}getHeader(e){const t=this.headers[Lr(e)];if(t){if(t[0])return t[0].raw}else return}getHeaders(e){const t=this.headers[Lr(e)],r=[];if(!t)return[];for(const n of t)r.push(n.raw);return r}hasHeader(e){return!!this.headers[Lr(e)]}parseHeader(e,t=0){if(e=Lr(e),this.headers[e]){if(t>=this.headers[e].length)return}else return;const r=this.headers[e][t],n=r.raw;if(r.parsed)return r.parsed;const s=Ct.parse(n,e.replace(/-/g,"_"));if(s===-1){this.headers[e].splice(t,1);return}else return r.parsed=s,s}s(e,t=0){return this.parseHeader(e,t)}setHeader(e,t){this.headers[Lr(e)]=[{raw:t}]}toString(){return this.data}},Bs=class extends dp{constructor(){super()}},Rn=class extends dp{constructor(){super()}},Ul=class Ra{constructor(t,r,n,s,i,o,a){this.headers={},this.extraHeaders=[],this.options=Ra.getDefaultOptions(),i&&(this.options=Object.assign(Object.assign({},this.options),i),this.options.optionTags&&this.options.optionTags.length&&(this.options.optionTags=this.options.optionTags.slice()),this.options.routeSet&&this.options.routeSet.length&&(this.options.routeSet=this.options.routeSet.slice())),o&&o.length&&(this.extraHeaders=o.slice()),a&&(this.body={body:a.content,contentType:a.contentType}),this.method=t,this.ruri=r.clone(),this.fromURI=n.clone(),this.fromTag=this.options.fromTag?this.options.fromTag:zo(),this.from=Ra.makeNameAddrHeader(this.fromURI,this.options.fromDisplayName,this.fromTag),this.toURI=s.clone(),this.toTag=this.options.toTag,this.to=Ra.makeNameAddrHeader(this.toURI,this.options.toDisplayName,this.toTag),this.callId=this.options.callId?this.options.callId:this.options.callIdPrefix+os(15),this.cseq=this.options.cseq,this.setHeader("route",this.options.routeSet),this.setHeader("via",""),this.setHeader("to",this.to.toString()),this.setHeader("from",this.from.toString()),this.setHeader("cseq",this.cseq+" "+this.method),this.setHeader("call-id",this.callId),this.setHeader("max-forwards","70")}static getDefaultOptions(){return{callId:"",callIdPrefix:"",cseq:1,toDisplayName:"",toTag:"",fromDisplayName:"",fromTag:"",forceRport:!1,hackViaTcp:!1,optionTags:["outbound"],routeSet:[],userAgentString:"sip.js",viaHost:""}}static makeNameAddrHeader(t,r,n){const s={};return n&&(s.tag=n),new wr(t,r,s)}getHeader(t){const r=this.headers[Lr(t)];if(r){if(r[0])return r[0]}else{const n=new RegExp("^\\s*"+t+"\\s*:","i");for(const s of this.extraHeaders)if(n.test(s))return s.substring(s.indexOf(":")+1).trim()}}getHeaders(t){const r=[],n=this.headers[Lr(t)];if(n)for(const s of n)r.push(s);else{const s=new RegExp("^\\s*"+t+"\\s*:","i");for(const i of this.extraHeaders)s.test(i)&&r.push(i.substring(i.indexOf(":")+1).trim())}return r}hasHeader(t){if(this.headers[Lr(t)])return!0;{const r=new RegExp("^\\s*"+t+"\\s*:","i");for(const n of this.extraHeaders)if(r.test(n))return!0}return!1}setHeader(t,r){this.headers[Lr(t)]=r instanceof Array?r:[r]}setViaHeader(t,r){this.options.hackViaTcp&&(r="TCP");let n="SIP/2.0/"+r;n+=" "+this.options.viaHost+";branch="+t,this.options.forceRport&&(n+=";rport"),this.setHeader("via",n),this.branch=t}toString(){let t="";t+=this.method+" "+this.ruri.toRaw()+` SIP/2.0\r
13
13
  `;for(const r in this.headers)if(this.headers[r])for(const n of this.headers[r])t+=r+": "+n+`\r
14
14
  `;for(const r of this.extraHeaders)t+=r.trim()+`\r
15
15
  `;return t+="Supported: "+this.options.optionTags.join(", ")+`\r
16
16
  `,t+="User-Agent: "+this.options.userAgentString+`\r
17
- `,this.body?typeof this.body=="string"?(t+="Content-Length: "+$i(this.body)+`\r
17
+ `,this.body?typeof this.body=="string"?(t+="Content-Length: "+Pi(this.body)+`\r
18
18
  \r
19
19
  `,t+=this.body):this.body.body&&this.body.contentType?(t+="Content-Type: "+this.body.contentType+`\r
20
- `,t+="Content-Length: "+$i(this.body.body)+`\r
20
+ `,t+="Content-Length: "+Pi(this.body.body)+`\r
21
21
  \r
22
22
  `,t+=this.body.body):t+=`Content-Length: 0\r
23
23
  \r
24
24
  `:t+=`Content-Length: 0\r
25
25
  \r
26
- `,t}};function fp(e){return e==="application/sdp"?"session":"render"}function zo(e){const t=typeof e=="string"?e:e.body,r=typeof e=="string"?"application/sdp":e.contentType;return{contentDisposition:fp(r),contentType:r,content:t}}function pp(e){return e&&typeof e.content=="string"&&typeof e.contentType=="string"&&e.contentDisposition===void 0?!0:typeof e.contentDisposition=="string"}function Pi(e){let t,r,n;if(e instanceof qs&&e.body){const s=e.parseHeader("Content-Disposition");t=s?s.type:void 0,r=e.parseHeader("Content-Type"),n=e.body}if(e instanceof Rn&&e.body){const s=e.parseHeader("Content-Disposition");t=s?s.type:void 0,r=e.parseHeader("Content-Type"),n=e.body}if(e instanceof Ul&&e.body)if(t=e.getHeader("Content-Disposition"),r=e.getHeader("Content-Type"),typeof e.body=="string"){if(!r)throw new Error("Header content type header does not equal body content type.");n=e.body}else{if(r&&r!==e.body.contentType)throw new Error("Header content type header does not equal body content type.");r=e.body.contentType,n=e.body.body}if(pp(e)&&(t=e.contentDisposition,r=e.contentType,n=e.content),!!n){if(r&&!t&&(t=fp(r)),!t)throw new Error("Content disposition undefined.");if(!r)throw new Error("Content type undefined.");return{contentDisposition:t,contentType:r,content:n}}}var br;(function(e){e.Initial="Initial",e.Early="Early",e.AckWait="AckWait",e.Confirmed="Confirmed",e.Terminated="Terminated"})(br=br||(br={}));var me;(function(e){e.Initial="Initial",e.HaveLocalOffer="HaveLocalOffer",e.HaveRemoteOffer="HaveRemoteOffer",e.Stable="Stable",e.Closed="Closed"})(me=me||(me={}));var dn=500,lw=4e3,zl=5e3;const At={T1:dn,T2:lw,T4:zl,TIMER_B:64*dn,TIMER_D:0*dn,TIMER_F:64*dn,TIMER_H:64*dn,TIMER_I:0*zl,TIMER_J:0*dn,TIMER_K:0*zl,TIMER_L:64*dn,TIMER_M:64*dn,TIMER_N:64*dn,PROVISIONAL_RESPONSE_INTERVAL:6e4};var $n=class extends is{constructor(e){super(e||"Transaction state error.")}},be;(function(e){e.ACK="ACK",e.BYE="BYE",e.CANCEL="CANCEL",e.INFO="INFO",e.INVITE="INVITE",e.MESSAGE="MESSAGE",e.NOTIFY="NOTIFY",e.OPTIONS="OPTIONS",e.REGISTER="REGISTER",e.UPDATE="UPDATE",e.SUBSCRIBE="SUBSCRIBE",e.PUBLISH="PUBLISH",e.REFER="REFER",e.PRACK="PRACK"})(be=be||(be={}));const Pn=[be.ACK,be.BYE,be.CANCEL,be.INFO,be.INVITE,be.MESSAGE,be.NOTIFY,be.OPTIONS,be.PRACK,be.REFER,be.REGISTER,be.SUBSCRIBE];var hp=class{constructor(e){this.incomingMessageRequest=e}get request(){return this.incomingMessageRequest.message}accept(e){return this.incomingMessageRequest.accept(e),Promise.resolve()}reject(e){return this.incomingMessageRequest.reject(e),Promise.resolve()}},Kl=class{constructor(e){this.incomingNotifyRequest=e}get request(){return this.incomingNotifyRequest.message}accept(e){return this.incomingNotifyRequest.accept(e),Promise.resolve()}reject(e){return this.incomingNotifyRequest.reject(e),Promise.resolve()}},cw=class{constructor(e,t){this.incomingReferRequest=e,this.session=t}get referTo(){const e=this.incomingReferRequest.message.parseHeader("refer-to");if(!(e instanceof yr))throw new Error("Failed to parse Refer-To header.");return e}get referredBy(){return this.incomingReferRequest.message.getHeader("referred-by")}get replaces(){const e=this.referTo.uri.getHeader("replaces");return e instanceof Array?e[0]:e}get request(){return this.incomingReferRequest.message}accept(e={statusCode:202}){return this.incomingReferRequest.accept(e),Promise.resolve()}reject(e){return this.incomingReferRequest.reject(e),Promise.resolve()}makeInviter(e){if(this.inviter)return this.inviter;const t=this.referTo.uri.clone();t.clearHeaders(),e=e||{};const r=(e.extraHeaders||[]).slice(),n=this.replaces;n&&r.push("Replaces: "+decodeURIComponent(n));const s=this.referredBy;return s&&r.push("Referred-By: "+s),e.extraHeaders=r,this.inviter=this.session.userAgent._makeInviter(t,e),this.inviter._referred=this.session,this.session._referral=this.inviter,this.inviter}},z;(function(e){e.Initial="Initial",e.Establishing="Establishing",e.Established="Established",e.Terminating="Terminating",e.Terminated="Terminated"})(z=z||(z={}));var Wl=class Hg{constructor(t,r={}){this.pendingReinvite=!1,this.pendingReinviteAck=!1,this._state=z.Initial,this.delegate=r.delegate,this._stateEventEmitter=new Ns,this._userAgent=t}dispose(){switch(this.logger.log(`Session ${this.id} in state ${this._state} is being disposed`),delete this.userAgent._sessions[this.id],this._sessionDescriptionHandler&&this._sessionDescriptionHandler.close(),this.state){case z.Initial:break;case z.Establishing:break;case z.Established:return new Promise(t=>{this._bye({onAccept:()=>t(),onRedirect:()=>t(),onReject:()=>t()})});case z.Terminating:break;case z.Terminated:break;default:throw new Error("Unknown state.")}return Promise.resolve()}get assertedIdentity(){return this._assertedIdentity}get dialog(){return this._dialog}get id(){return this._id}get replacee(){return this._replacee}get sessionDescriptionHandler(){return this._sessionDescriptionHandler}get sessionDescriptionHandlerFactory(){return this.userAgent.configuration.sessionDescriptionHandlerFactory}get sessionDescriptionHandlerModifiers(){return this._sessionDescriptionHandlerModifiers||[]}set sessionDescriptionHandlerModifiers(t){this._sessionDescriptionHandlerModifiers=t.slice()}get sessionDescriptionHandlerOptions(){return this._sessionDescriptionHandlerOptions||{}}set sessionDescriptionHandlerOptions(t){this._sessionDescriptionHandlerOptions=Object.assign({},t)}get sessionDescriptionHandlerModifiersReInvite(){return this._sessionDescriptionHandlerModifiersReInvite||[]}set sessionDescriptionHandlerModifiersReInvite(t){this._sessionDescriptionHandlerModifiersReInvite=t.slice()}get sessionDescriptionHandlerOptionsReInvite(){return this._sessionDescriptionHandlerOptionsReInvite||{}}set sessionDescriptionHandlerOptionsReInvite(t){this._sessionDescriptionHandlerOptionsReInvite=Object.assign({},t)}get state(){return this._state}get stateChange(){return this._stateEventEmitter}get userAgent(){return this._userAgent}bye(t={}){let r="Session.bye() may only be called if established session.";switch(this.state){case z.Initial:typeof this.cancel=="function"?(r+=" However Inviter.invite() has not yet been called.",r+=" Perhaps you should have called Inviter.cancel()?"):typeof this.reject=="function"&&(r+=" However Invitation.accept() has not yet been called.",r+=" Perhaps you should have called Invitation.reject()?");break;case z.Establishing:typeof this.cancel=="function"?(r+=" However a dialog does not yet exist.",r+=" Perhaps you should have called Inviter.cancel()?"):typeof this.reject=="function"&&(r+=" However Invitation.accept() has not yet been called (or not yet resolved).",r+=" Perhaps you should have called Invitation.reject()?");break;case z.Established:{const n=t.requestDelegate,s=this.copyRequestOptions(t.requestOptions);return this._bye(n,s)}case z.Terminating:r+=" However this session is already terminating.",typeof this.cancel=="function"?r+=" Perhaps you have already called Inviter.cancel()?":typeof this.reject=="function"&&(r+=" Perhaps you have already called Session.bye()?");break;case z.Terminated:r+=" However this session is already terminated.";break;default:throw new Error("Unknown state")}return this.logger.error(r),Promise.reject(new Error(`Invalid session state ${this.state}`))}info(t={}){if(this.state!==z.Established)return this.logger.error("Session.info() may only be called if established session."),Promise.reject(new Error(`Invalid session state ${this.state}`));const r=t.requestDelegate,n=this.copyRequestOptions(t.requestOptions);return this._info(r,n)}invite(t={}){if(this.logger.log("Session.invite"),this.state!==z.Established)return Promise.reject(new Error(`Invalid session state ${this.state}`));if(this.pendingReinvite)return Promise.reject(new Fl("Reinvite in progress. Please wait until complete, then try again."));this.pendingReinvite=!0,t.sessionDescriptionHandlerModifiers&&(this.sessionDescriptionHandlerModifiersReInvite=t.sessionDescriptionHandlerModifiers),t.sessionDescriptionHandlerOptions&&(this.sessionDescriptionHandlerOptionsReInvite=t.sessionDescriptionHandlerOptions);const r={onAccept:i=>{const o=Pi(i.message);if(!o){this.logger.error("Received 2xx response to re-INVITE without a session description"),this.ackAndBye(i,400,"Missing session description"),this.stateTransition(z.Terminated),this.pendingReinvite=!1;return}if(t.withoutSdp){const a={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptionsReInvite,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiersReInvite};this.setOfferAndGetAnswer(o,a).then(l=>{i.ack({body:l})}).catch(l=>{this.logger.error("Failed to handle offer in 2xx response to re-INVITE"),this.logger.error(l.message),this.state===z.Terminated?i.ack():(this.ackAndBye(i,488,"Bad Media Description"),this.stateTransition(z.Terminated))}).then(()=>{this.pendingReinvite=!1,t.requestDelegate&&t.requestDelegate.onAccept&&t.requestDelegate.onAccept(i)})}else{const a={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptionsReInvite,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiersReInvite};this.setAnswer(o,a).then(()=>{i.ack()}).catch(l=>{this.logger.error("Failed to handle answer in 2xx response to re-INVITE"),this.logger.error(l.message),this.state!==z.Terminated?(this.ackAndBye(i,488,"Bad Media Description"),this.stateTransition(z.Terminated)):i.ack()}).then(()=>{this.pendingReinvite=!1,t.requestDelegate&&t.requestDelegate.onAccept&&t.requestDelegate.onAccept(i)})}},onProgress:i=>{},onRedirect:i=>{},onReject:i=>{this.logger.warn("Received a non-2xx response to re-INVITE"),this.pendingReinvite=!1,t.withoutSdp?t.requestDelegate&&t.requestDelegate.onReject&&t.requestDelegate.onReject(i):this.rollbackOffer().catch(o=>{if(this.logger.error("Failed to rollback offer on non-2xx response to re-INVITE"),this.logger.error(o.message),this.state!==z.Terminated){if(!this.dialog)throw new Error("Dialog undefined.");const a=[];a.push("Reason: "+this.getReasonHeaderValue(500,"Internal Server Error")),this.dialog.bye(void 0,{extraHeaders:a}),this.stateTransition(z.Terminated)}}).then(()=>{t.requestDelegate&&t.requestDelegate.onReject&&t.requestDelegate.onReject(i)})},onTrying:i=>{}},n=t.requestOptions||{};if(n.extraHeaders=(n.extraHeaders||[]).slice(),n.extraHeaders.push("Allow: "+Pn.toString()),n.extraHeaders.push("Contact: "+this._contact),t.withoutSdp){if(!this.dialog)throw this.pendingReinvite=!1,new Error("Dialog undefined.");return Promise.resolve(this.dialog.invite(r,n))}const s={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptionsReInvite,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiersReInvite};return this.getOffer(s).then(i=>{if(!this.dialog)throw this.pendingReinvite=!1,new Error("Dialog undefined.");return n.body=i,this.dialog.invite(r,n)}).catch(i=>{throw this.logger.error(i.message),this.logger.error("Failed to send re-INVITE"),this.pendingReinvite=!1,i})}message(t={}){if(this.state!==z.Established)return this.logger.error("Session.message() may only be called if established session."),Promise.reject(new Error(`Invalid session state ${this.state}`));const r=t.requestDelegate,n=this.copyRequestOptions(t.requestOptions);return this._message(r,n)}refer(t,r={}){if(this.state!==z.Established)return this.logger.error("Session.refer() may only be called if established session."),Promise.reject(new Error(`Invalid session state ${this.state}`));if(t instanceof Hg&&!t.dialog)return this.logger.error("Session.refer() may only be called with session which is established. You are perhaps attempting to attended transfer to a target for which there is not dialog yet established. Perhaps you are attempting a 'semi-attended' tansfer? Regardless, this is not supported. The recommended approached is to check to see if the target Session is in the Established state before calling refer(); if the state is not Established you may proceed by falling back using a URI as the target (blind transfer)."),Promise.reject(new Error(`Invalid session state ${this.state}`));const n=r.requestDelegate,s=this.copyRequestOptions(r.requestOptions);return s.extraHeaders=s.extraHeaders?s.extraHeaders.concat(this.referExtraHeaders(this.referToString(t))):this.referExtraHeaders(this.referToString(t)),this._refer(r.onNotify,n,s)}_bye(t,r){if(!this.dialog)return Promise.reject(new Error("Session dialog undefined."));const n=this.dialog;switch(n.sessionState){case br.Initial:throw new Error(`Invalid dialog state ${n.sessionState}`);case br.Early:throw new Error(`Invalid dialog state ${n.sessionState}`);case br.AckWait:return this.stateTransition(z.Terminating),new Promise(s=>{n.delegate={onAck:()=>{const i=n.bye(t,r);return this.stateTransition(z.Terminated),s(i),Promise.resolve()},onAckTimeout:()=>{const i=n.bye(t,r);this.stateTransition(z.Terminated),s(i)}}});case br.Confirmed:{const s=n.bye(t,r);return this.stateTransition(z.Terminated),Promise.resolve(s)}case br.Terminated:throw new Error(`Invalid dialog state ${n.sessionState}`);default:throw new Error("Unrecognized state.")}}_info(t,r){return this.dialog?Promise.resolve(this.dialog.info(t,r)):Promise.reject(new Error("Session dialog undefined."))}_message(t,r){return this.dialog?Promise.resolve(this.dialog.message(t,r)):Promise.reject(new Error("Session dialog undefined."))}_refer(t,r,n){return this.dialog?(this.onNotify=t,Promise.resolve(this.dialog.refer(r,n))):Promise.reject(new Error("Session dialog undefined."))}ackAndBye(t,r,n){t.ack();const s=[];r&&s.push("Reason: "+this.getReasonHeaderValue(r,n)),t.session.bye(void 0,{extraHeaders:s})}onAckRequest(t){if(this.logger.log("Session.onAckRequest"),this.state!==z.Established&&this.state!==z.Terminating)return this.logger.error(`ACK received while in state ${this.state}, dropping request`),Promise.resolve();const r=this.dialog;if(!r)throw new Error("Dialog undefined.");const n={sessionDescriptionHandlerOptions:this.pendingReinviteAck?this.sessionDescriptionHandlerOptionsReInvite:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.pendingReinviteAck?this._sessionDescriptionHandlerModifiersReInvite:this._sessionDescriptionHandlerModifiers};if(this.delegate&&this.delegate.onAck){const s=new tw(t);this.delegate.onAck(s)}switch(this.pendingReinviteAck=!1,r.signalingState){case me.Initial:{this.logger.error(`Invalid signaling state ${r.signalingState}.`);const s=["Reason: "+this.getReasonHeaderValue(488,"Bad Media Description")];return r.bye(void 0,{extraHeaders:s}),this.stateTransition(z.Terminated),Promise.resolve()}case me.Stable:{const s=Pi(t.message);return s?s.contentDisposition==="render"?(this._renderbody=s.content,this._rendertype=s.contentType,Promise.resolve()):s.contentDisposition!=="session"?Promise.resolve():this.setAnswer(s,n).catch(i=>{this.logger.error(i.message);const o=["Reason: "+this.getReasonHeaderValue(488,"Bad Media Description")];r.bye(void 0,{extraHeaders:o}),this.stateTransition(z.Terminated)}):Promise.resolve()}case me.HaveLocalOffer:{this.logger.error(`Invalid signaling state ${r.signalingState}.`);const s=["Reason: "+this.getReasonHeaderValue(488,"Bad Media Description")];return r.bye(void 0,{extraHeaders:s}),this.stateTransition(z.Terminated),Promise.resolve()}case me.HaveRemoteOffer:{this.logger.error(`Invalid signaling state ${r.signalingState}.`);const s=["Reason: "+this.getReasonHeaderValue(488,"Bad Media Description")];return r.bye(void 0,{extraHeaders:s}),this.stateTransition(z.Terminated),Promise.resolve()}case me.Closed:throw new Error(`Invalid signaling state ${r.signalingState}.`);default:throw new Error(`Invalid signaling state ${r.signalingState}.`)}}onByeRequest(t){if(this.logger.log("Session.onByeRequest"),this.state!==z.Established){this.logger.error(`BYE received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onBye){const r=new rw(t);this.delegate.onBye(r)}else t.accept();this.stateTransition(z.Terminated)}onInfoRequest(t){if(this.logger.log("Session.onInfoRequest"),this.state!==z.Established){this.logger.error(`INFO received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onInfo){const r=new sw(t);this.delegate.onInfo(r)}else t.accept()}onInviteRequest(t){if(this.logger.log("Session.onInviteRequest"),this.state!==z.Established){this.logger.error(`INVITE received while in state ${this.state}, dropping request`);return}this.pendingReinviteAck=!0;const r=["Contact: "+this._contact];if(t.message.hasHeader("P-Asserted-Identity")){const s=t.message.getHeader("P-Asserted-Identity");if(!s)throw new Error("Header undefined.");this._assertedIdentity=Ct.nameAddrHeaderParse(s)}const n={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptionsReInvite,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiersReInvite};this.generateResponseOfferAnswerInDialog(n).then(s=>{const i=t.accept({statusCode:200,extraHeaders:r,body:s});this.delegate&&this.delegate.onInvite&&this.delegate.onInvite(t.message,i.message,200)}).catch(s=>{if(this.logger.error(s.message),this.logger.error("Failed to handle to re-INVITE request"),!this.dialog)throw new Error("Dialog undefined.");if(this.logger.error(this.dialog.signalingState),this.dialog.signalingState===me.Stable){const i=t.reject({statusCode:488});this.delegate&&this.delegate.onInvite&&this.delegate.onInvite(t.message,i.message,488);return}this.rollbackOffer().then(()=>{const i=t.reject({statusCode:488});this.delegate&&this.delegate.onInvite&&this.delegate.onInvite(t.message,i.message,488)}).catch(i=>{this.logger.error(i.message),this.logger.error("Failed to rollback offer on re-INVITE request");const o=t.reject({statusCode:488});if(this.state!==z.Terminated){if(!this.dialog)throw new Error("Dialog undefined.");const a=[];a.push("Reason: "+this.getReasonHeaderValue(500,"Internal Server Error")),this.dialog.bye(void 0,{extraHeaders:a}),this.stateTransition(z.Terminated)}this.delegate&&this.delegate.onInvite&&this.delegate.onInvite(t.message,o.message,488)})})}onMessageRequest(t){if(this.logger.log("Session.onMessageRequest"),this.state!==z.Established){this.logger.error(`MESSAGE received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onMessage){const r=new hp(t);this.delegate.onMessage(r)}else t.accept()}onNotifyRequest(t){if(this.logger.log("Session.onNotifyRequest"),this.state!==z.Established){this.logger.error(`NOTIFY received while in state ${this.state}, dropping request`);return}if(this.onNotify){const r=new Kl(t);this.onNotify(r);return}if(this.delegate&&this.delegate.onNotify){const r=new Kl(t);this.delegate.onNotify(r)}else t.accept()}onPrackRequest(t){if(this.logger.log("Session.onPrackRequest"),this.state!==z.Established){this.logger.error(`PRACK received while in state ${this.state}, dropping request`);return}throw new Error("Unimplemented.")}onReferRequest(t){if(this.logger.log("Session.onReferRequest"),this.state!==z.Established){this.logger.error(`REFER received while in state ${this.state}, dropping request`);return}if(!t.message.hasHeader("refer-to")){this.logger.warn("Invalid REFER packet. A refer-to header is required. Rejecting."),t.reject();return}const r=new cw(t,this);this.delegate&&this.delegate.onRefer?this.delegate.onRefer(r):(this.logger.log("No delegate available to handle REFER, automatically accepting and following."),r.accept().then(()=>r.makeInviter(this._referralInviterOptions).invite()).catch(n=>{this.logger.error(n.message)}))}generateResponseOfferAnswer(t,r){if(this.dialog)return this.generateResponseOfferAnswerInDialog(r);const n=Pi(t.message);return!n||n.contentDisposition!=="session"?this.getOffer(r):this.setOfferAndGetAnswer(n,r)}generateResponseOfferAnswerInDialog(t){if(!this.dialog)throw new Error("Dialog undefined.");switch(this.dialog.signalingState){case me.Initial:return this.getOffer(t);case me.HaveLocalOffer:return Promise.resolve(void 0);case me.HaveRemoteOffer:if(!this.dialog.offer)throw new Error(`Session offer undefined in signaling state ${this.dialog.signalingState}.`);return this.setOfferAndGetAnswer(this.dialog.offer,t);case me.Stable:return this.state!==z.Established?Promise.resolve(void 0):this.getOffer(t);case me.Closed:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);default:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`)}}getOffer(t){const r=this.setupSessionDescriptionHandler(),n=t.sessionDescriptionHandlerOptions,s=t.sessionDescriptionHandlerModifiers;try{return r.getDescription(n,s).then(i=>zo(i)).catch(i=>{this.logger.error("Session.getOffer: SDH getDescription rejected...");const o=i instanceof Error?i:new Error("Session.getOffer unknown error.");throw this.logger.error(o.message),o})}catch(i){this.logger.error("Session.getOffer: SDH getDescription threw...");const o=i instanceof Error?i:new Error(i);return this.logger.error(o.message),Promise.reject(o)}}rollbackOffer(){const t=this.setupSessionDescriptionHandler();if(t.rollbackDescription===void 0)return Promise.resolve();try{return t.rollbackDescription().catch(r=>{this.logger.error("Session.rollbackOffer: SDH rollbackDescription rejected...");const n=r instanceof Error?r:new Error("Session.rollbackOffer unknown error.");throw this.logger.error(n.message),n})}catch(r){this.logger.error("Session.rollbackOffer: SDH rollbackDescription threw...");const n=r instanceof Error?r:new Error(r);return this.logger.error(n.message),Promise.reject(n)}}setAnswer(t,r){const n=this.setupSessionDescriptionHandler(),s=r.sessionDescriptionHandlerOptions,i=r.sessionDescriptionHandlerModifiers;try{if(!n.hasDescription(t.contentType))return Promise.reject(new Ll)}catch(o){this.logger.error("Session.setAnswer: SDH hasDescription threw...");const a=o instanceof Error?o:new Error(o);return this.logger.error(a.message),Promise.reject(a)}try{return n.setDescription(t.content,s,i).catch(o=>{this.logger.error("Session.setAnswer: SDH setDescription rejected...");const a=o instanceof Error?o:new Error("Session.setAnswer unknown error.");throw this.logger.error(a.message),a})}catch(o){this.logger.error("Session.setAnswer: SDH setDescription threw...");const a=o instanceof Error?o:new Error(o);return this.logger.error(a.message),Promise.reject(a)}}setOfferAndGetAnswer(t,r){const n=this.setupSessionDescriptionHandler(),s=r.sessionDescriptionHandlerOptions,i=r.sessionDescriptionHandlerModifiers;try{if(!n.hasDescription(t.contentType))return Promise.reject(new Ll)}catch(o){this.logger.error("Session.setOfferAndGetAnswer: SDH hasDescription threw...");const a=o instanceof Error?o:new Error(o);return this.logger.error(a.message),Promise.reject(a)}try{return n.setDescription(t.content,s,i).then(()=>n.getDescription(s,i)).then(o=>zo(o)).catch(o=>{this.logger.error("Session.setOfferAndGetAnswer: SDH setDescription or getDescription rejected...");const a=o instanceof Error?o:new Error("Session.setOfferAndGetAnswer unknown error.");throw this.logger.error(a.message),a})}catch(o){this.logger.error("Session.setOfferAndGetAnswer: SDH setDescription or getDescription threw...");const a=o instanceof Error?o:new Error(o);return this.logger.error(a.message),Promise.reject(a)}}setSessionDescriptionHandler(t){if(this._sessionDescriptionHandler)throw new Error("Session description handler defined.");this._sessionDescriptionHandler=t}setupSessionDescriptionHandler(){var t;return this._sessionDescriptionHandler?this._sessionDescriptionHandler:(this._sessionDescriptionHandler=this.sessionDescriptionHandlerFactory(this,this.userAgent.configuration.sessionDescriptionHandlerFactoryOptions),!((t=this.delegate)===null||t===void 0)&&t.onSessionDescriptionHandler&&this.delegate.onSessionDescriptionHandler(this._sessionDescriptionHandler,!1),this._sessionDescriptionHandler)}stateTransition(t){const r=()=>{throw new Error(`Invalid state transition from ${this._state} to ${t}`)};switch(this._state){case z.Initial:t!==z.Establishing&&t!==z.Established&&t!==z.Terminating&&t!==z.Terminated&&r();break;case z.Establishing:t!==z.Established&&t!==z.Terminating&&t!==z.Terminated&&r();break;case z.Established:t!==z.Terminating&&t!==z.Terminated&&r();break;case z.Terminating:t!==z.Terminated&&r();break;case z.Terminated:r();break;default:throw new Error("Unrecognized state.")}this._state=t,this.logger.log(`Session ${this.id} transitioned to state ${this._state}`),this._stateEventEmitter.emit(this._state),t===z.Terminated&&this.dispose()}copyRequestOptions(t={}){return{extraHeaders:t.extraHeaders?t.extraHeaders.slice():void 0,body:t.body?{contentDisposition:t.body.contentDisposition||"render",contentType:t.body.contentType||"text/plain",content:t.body.content||""}:void 0}}getReasonHeaderValue(t,r){const n=t;let s=jo(t);return!s&&r&&(s=r),"SIP;cause="+n+';text="'+s+'"'}referExtraHeaders(t){const r=[];return r.push("Referred-By: <"+this.userAgent.configuration.uri+">"),r.push("Contact: "+this._contact),r.push("Allow: "+["ACK","CANCEL","INVITE","MESSAGE","BYE","OPTIONS","INFO","NOTIFY","REFER"].toString()),r.push("Refer-To: "+t),r}referToString(t){let r;if(t instanceof In)r=t.toString();else{if(!t.dialog)throw new Error("Dialog undefined.");const n=t.remoteIdentity.friendlyName,s=t.dialog.remoteTarget.toString(),i=t.dialog.callId,o=t.dialog.remoteTag,a=t.dialog.localTag;r=`"${n}" <${s}?Replaces=${encodeURIComponent(`${i};to-tag=${o};from-tag=${a}`)}>`}return r}},Pr;(function(e){e.Required="Required",e.Supported="Supported",e.Unsupported="Unsupported"})(Pr=Pr||(Pr={}));const uw={"100rel":!0,199:!0,answermode:!0,"early-session":!0,eventlist:!0,explicitsub:!0,"from-change":!0,"geolocation-http":!0,"geolocation-sip":!0,gin:!0,gruu:!0,histinfo:!0,ice:!0,join:!0,"multiple-refer":!0,norefersub:!0,nosub:!0,outbound:!0,path:!0,policy:!0,precondition:!0,pref:!0,privacy:!0,"recipient-list-invite":!0,"recipient-list-message":!0,"recipient-list-subscribe":!0,replaces:!0,"resource-priority":!0,"sdp-anat":!0,"sec-agree":!0,tdialog:!0,timer:!0,uui:!0};var Bs=class extends Wl{constructor(e,t){super(e),this.incomingInviteRequest=t,this.disposed=!1,this.expiresTimer=void 0,this.isCanceled=!1,this.rel100="none",this.rseq=Math.floor(Math.random()*1e4),this.userNoAnswerTimer=void 0,this.waitingForPrack=!1,this.logger=e.getLogger("sip.Invitation");const r=this.incomingInviteRequest.message,n=r.getHeader("require");n&&n.toLowerCase().includes("100rel")&&(this.rel100="required");const s=r.getHeader("supported");if(s&&s.toLowerCase().includes("100rel")&&(this.rel100="supported"),r.toTag=t.toTag,typeof r.toTag!="string")throw new TypeError("toTag should have been a string.");if(this.userNoAnswerTimer=setTimeout(()=>{t.reject({statusCode:480}),this.stateTransition(z.Terminated)},this.userAgent.configuration.noAnswerTimeout?this.userAgent.configuration.noAnswerTimeout*1e3:6e4),r.hasHeader("expires")){const a=Number(r.getHeader("expires")||0)*1e3;this.expiresTimer=setTimeout(()=>{this.state===z.Initial&&(t.reject({statusCode:487}),this.stateTransition(z.Terminated))},a)}const i=this.request.getHeader("P-Asserted-Identity");i&&(this._assertedIdentity=Ct.nameAddrHeaderParse(i)),this._contact=this.userAgent.contact.toString();const o=r.parseHeader("Content-Disposition");o&&o.type==="render"&&(this._renderbody=r.body,this._rendertype=r.getHeader("Content-Type")),this._id=r.callId+r.fromTag,this.userAgent._sessions[this._id]=this}dispose(){if(this.disposed)return Promise.resolve();switch(this.disposed=!0,this.expiresTimer&&(clearTimeout(this.expiresTimer),this.expiresTimer=void 0),this.userNoAnswerTimer&&(clearTimeout(this.userNoAnswerTimer),this.userNoAnswerTimer=void 0),this.prackNeverArrived(),this.state){case z.Initial:return this.reject().then(()=>super.dispose());case z.Establishing:return this.reject().then(()=>super.dispose());case z.Established:return super.dispose();case z.Terminating:return super.dispose();case z.Terminated:return super.dispose();default:throw new Error("Unknown state.")}}get autoSendAnInitialProvisionalResponse(){return this.rel100!=="required"&&this.userAgent.configuration.sendInitialProvisionalResponse}get body(){return this.incomingInviteRequest.message.body}get localIdentity(){return this.request.to}get remoteIdentity(){return this.request.from}get request(){return this.incomingInviteRequest.message}accept(e={}){if(this.logger.log("Invitation.accept"),this.state!==z.Initial){const t=new Error(`Invalid session state ${this.state}`);return this.logger.error(t.message),Promise.reject(t)}return e.sessionDescriptionHandlerModifiers&&(this.sessionDescriptionHandlerModifiers=e.sessionDescriptionHandlerModifiers),e.sessionDescriptionHandlerOptions&&(this.sessionDescriptionHandlerOptions=e.sessionDescriptionHandlerOptions),this.stateTransition(z.Establishing),this.sendAccept(e).then(({message:t,session:r})=>{r.delegate={onAck:n=>this.onAckRequest(n),onAckTimeout:()=>this.onAckTimeout(),onBye:n=>this.onByeRequest(n),onInfo:n=>this.onInfoRequest(n),onInvite:n=>this.onInviteRequest(n),onMessage:n=>this.onMessageRequest(n),onNotify:n=>this.onNotifyRequest(n),onPrack:n=>this.onPrackRequest(n),onRefer:n=>this.onReferRequest(n)},this._dialog=r,this.stateTransition(z.Established),this._replacee&&this._replacee._bye()}).catch(t=>this.handleResponseError(t))}progress(e={}){if(this.logger.log("Invitation.progress"),this.state!==z.Initial){const r=new Error(`Invalid session state ${this.state}`);return this.logger.error(r.message),Promise.reject(r)}const t=e.statusCode||180;if(t<100||t>199)throw new TypeError("Invalid statusCode: "+t);return e.sessionDescriptionHandlerModifiers&&(this.sessionDescriptionHandlerModifiers=e.sessionDescriptionHandlerModifiers),e.sessionDescriptionHandlerOptions&&(this.sessionDescriptionHandlerOptions=e.sessionDescriptionHandlerOptions),this.waitingForPrack?(this.logger.warn("Unexpected call for progress while waiting for prack, ignoring"),Promise.resolve()):e.statusCode===100?this.sendProgressTrying().then(()=>{}).catch(r=>this.handleResponseError(r)):this.rel100!=="required"&&!(this.rel100==="supported"&&e.rel100)&&!(this.rel100==="supported"&&this.userAgent.configuration.sipExtension100rel===Pr.Required)?this.sendProgress(e).then(()=>{}).catch(r=>this.handleResponseError(r)):this.sendProgressReliableWaitForPrack(e).then(()=>{}).catch(r=>this.handleResponseError(r))}reject(e={}){if(this.logger.log("Invitation.reject"),this.state!==z.Initial&&this.state!==z.Establishing){const i=new Error(`Invalid session state ${this.state}`);return this.logger.error(i.message),Promise.reject(i)}const t=e.statusCode||480,r=e.reasonPhrase?e.reasonPhrase:jo(t),n=e.extraHeaders||[];if(t<300||t>699)throw new TypeError("Invalid statusCode: "+t);const s=e.body?zo(e.body):void 0;return t<400?this.incomingInviteRequest.redirect([],{statusCode:t,reasonPhrase:r,extraHeaders:n,body:s}):this.incomingInviteRequest.reject({statusCode:t,reasonPhrase:r,extraHeaders:n,body:s}),this.stateTransition(z.Terminated),Promise.resolve()}_onCancel(e){if(this.logger.log("Invitation._onCancel"),this.state!==z.Initial&&this.state!==z.Establishing){this.logger.error(`CANCEL received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onCancel){const t=new nw(e);this.delegate.onCancel(t)}this.isCanceled=!0,this.incomingInviteRequest.reject({statusCode:487}),this.stateTransition(z.Terminated)}handlePrackOfferAnswer(e){if(!this.dialog)throw new Error("Dialog undefined.");const t=Pi(e.message);if(!t||t.contentDisposition!=="session")return Promise.resolve(void 0);const r={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers};switch(this.dialog.signalingState){case me.Initial:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);case me.Stable:return this.setAnswer(t,r).then(()=>{});case me.HaveLocalOffer:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);case me.HaveRemoteOffer:return this.setOfferAndGetAnswer(t,r);case me.Closed:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);default:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`)}}handleResponseError(e){let t=480;if(e instanceof Error?this.logger.error(e.message):this.logger.error(e),e instanceof Ll?(this.logger.error("A session description handler occurred while sending response (content type unsupported"),t=415):e instanceof ew?this.logger.error("A session description handler occurred while sending response"):e instanceof Vl?this.logger.error("Session ended before response could be formulated and sent (while waiting for PRACK)"):e instanceof $n&&this.logger.error("Session changed state before response could be formulated and sent"),this.state===z.Initial||this.state===z.Establishing)try{this.incomingInviteRequest.reject({statusCode:t}),this.stateTransition(z.Terminated)}catch(r){throw this.logger.error("An error occurred attempting to reject the request while handling another error"),r}if(this.isCanceled){this.logger.warn("An error occurred while attempting to formulate and send a response to an incoming INVITE. However a CANCEL was received and processed while doing so which can (and often does) result in errors occurring as the session terminates in the meantime. Said error is being ignored.");return}throw e}onAckTimeout(){if(this.logger.log("Invitation.onAckTimeout"),!this.dialog)throw new Error("Dialog undefined.");this.logger.log("No ACK received for an extended period of time, terminating session"),this.dialog.bye(),this.stateTransition(z.Terminated)}sendAccept(e={}){const t={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers},r=e.extraHeaders||[];return this.waitingForPrack?this.waitForArrivalOfPrack().then(()=>clearTimeout(this.userNoAnswerTimer)).then(()=>this.generateResponseOfferAnswer(this.incomingInviteRequest,t)).then(n=>this.incomingInviteRequest.accept({statusCode:200,body:n,extraHeaders:r})):(clearTimeout(this.userNoAnswerTimer),this.generateResponseOfferAnswer(this.incomingInviteRequest,t).then(n=>this.incomingInviteRequest.accept({statusCode:200,body:n,extraHeaders:r})))}sendProgress(e={}){const t=e.statusCode||180,r=e.reasonPhrase,n=(e.extraHeaders||[]).slice(),s=e.body?zo(e.body):void 0;if(t===183&&!s)return this.sendProgressWithSDP(e);try{const i=this.incomingInviteRequest.progress({statusCode:t,reasonPhrase:r,extraHeaders:n,body:s});return this._dialog=i.session,Promise.resolve(i)}catch(i){return Promise.reject(i)}}sendProgressWithSDP(e={}){const t={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers},r=e.statusCode||183,n=e.reasonPhrase,s=(e.extraHeaders||[]).slice();return this.generateResponseOfferAnswer(this.incomingInviteRequest,t).then(i=>this.incomingInviteRequest.progress({statusCode:r,reasonPhrase:n,extraHeaders:s,body:i})).then(i=>(this._dialog=i.session,i))}sendProgressReliable(e={}){return e.extraHeaders=(e.extraHeaders||[]).slice(),e.extraHeaders.push("Require: 100rel"),e.extraHeaders.push("RSeq: "+Math.floor(Math.random()*1e4)),this.sendProgressWithSDP(e)}sendProgressReliableWaitForPrack(e={}){const t={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers},r=e.statusCode||183,n=e.reasonPhrase,s=(e.extraHeaders||[]).slice();s.push("Require: 100rel"),s.push("RSeq: "+this.rseq++);let i;return new Promise((o,a)=>{this.waitingForPrack=!0,this.generateResponseOfferAnswer(this.incomingInviteRequest,t).then(l=>(i=l,this.incomingInviteRequest.progress({statusCode:r,reasonPhrase:n,extraHeaders:s,body:i}))).then(l=>{this._dialog=l.session;let u,c;l.session.delegate={onPrack:x=>{u=x,clearTimeout(p),clearTimeout(w),this.waitingForPrack&&(this.waitingForPrack=!1,this.handlePrackOfferAnswer(u).then(g=>{try{c=u.accept({statusCode:200,body:g}),this.prackArrived(),o({prackRequest:u,prackResponse:c,progressResponse:l})}catch(S){a(S)}}).catch(g=>a(g)))}};const p=setTimeout(()=>{this.waitingForPrack&&(this.waitingForPrack=!1,this.logger.warn("No PRACK received, rejecting INVITE."),clearTimeout(w),this.reject({statusCode:504}).then(()=>a(new Vl)).catch(x=>a(x)))},At.T1*64),h=()=>{try{this.incomingInviteRequest.progress({statusCode:r,reasonPhrase:n,extraHeaders:s,body:i})}catch(x){this.waitingForPrack=!1,a(x);return}w=setTimeout(h,m*=2)};let m=At.T1,w=setTimeout(h,m)}).catch(l=>{this.waitingForPrack=!1,a(l)})})}sendProgressTrying(){try{const e=this.incomingInviteRequest.trying();return Promise.resolve(e)}catch(e){return Promise.reject(e)}}waitForArrivalOfPrack(){if(this.waitingForPrackPromise)throw new Error("Already waiting for PRACK");return this.waitingForPrackPromise=new Promise((e,t)=>{this.waitingForPrackResolve=e,this.waitingForPrackReject=t}),this.waitingForPrackPromise}prackArrived(){this.waitingForPrackResolve&&this.waitingForPrackResolve(),this.waitingForPrackPromise=void 0,this.waitingForPrackResolve=void 0,this.waitingForPrackReject=void 0}prackNeverArrived(){this.waitingForPrackReject&&this.waitingForPrackReject(new Vl),this.waitingForPrackPromise=void 0,this.waitingForPrackResolve=void 0,this.waitingForPrackReject=void 0}},Ko=class extends Wl{constructor(e,t,r={}){super(e,r),this.disposed=!1,this.earlyMedia=!1,this.earlyMediaSessionDescriptionHandlers=new Map,this.isCanceled=!1,this.inviteWithoutSdp=!1,this.logger=e.getLogger("sip.Inviter"),this.earlyMedia=r.earlyMedia!==void 0?r.earlyMedia:this.earlyMedia,this.fromTag=Uo(),this.inviteWithoutSdp=r.inviteWithoutSdp!==void 0?r.inviteWithoutSdp:this.inviteWithoutSdp;const n=Object.assign({},r);n.params=Object.assign({},r.params);const s=r.anonymous||!1,i=e.contact.toString({anonymous:s,outbound:s?!e.contact.tempGruu:!e.contact.pubGruu});s&&e.configuration.uri&&(n.params.fromDisplayName="Anonymous",n.params.fromUri="sip:anonymous@anonymous.invalid");let o=e.userAgentCore.configuration.aor;if(n.params.fromUri&&(o=typeof n.params.fromUri=="string"?Ct.URIParse(n.params.fromUri):n.params.fromUri),!o)throw new TypeError("Invalid from URI: "+n.params.fromUri);let a=t;if(n.params.toUri&&(a=typeof n.params.toUri=="string"?Ct.URIParse(n.params.toUri):n.params.toUri),!a)throw new TypeError("Invalid to URI: "+n.params.toUri);const l=Object.assign({},n.params);l.fromTag=this.fromTag;const u=(n.extraHeaders||[]).slice();s&&e.configuration.uri&&(u.push("P-Preferred-Identity: "+e.configuration.uri.toString()),u.push("Privacy: id")),u.push("Contact: "+i),u.push("Allow: "+["ACK","CANCEL","INVITE","MESSAGE","BYE","OPTIONS","INFO","NOTIFY","REFER"].toString()),e.configuration.sipExtension100rel===Pr.Required&&u.push("Require: 100rel"),e.configuration.sipExtensionReplaces===Pr.Required&&u.push("Require: replaces"),n.extraHeaders=u,this.outgoingRequestMessage=e.userAgentCore.makeOutgoingRequestMessage(be.INVITE,t,o,a,l,u,void 0),this._contact=i,this._referralInviterOptions=n,this._renderbody=r.renderbody,this._rendertype=r.rendertype,r.sessionDescriptionHandlerModifiers&&(this.sessionDescriptionHandlerModifiers=r.sessionDescriptionHandlerModifiers),r.sessionDescriptionHandlerOptions&&(this.sessionDescriptionHandlerOptions=r.sessionDescriptionHandlerOptions),r.sessionDescriptionHandlerModifiersReInvite&&(this.sessionDescriptionHandlerModifiersReInvite=r.sessionDescriptionHandlerModifiersReInvite),r.sessionDescriptionHandlerOptionsReInvite&&(this.sessionDescriptionHandlerOptionsReInvite=r.sessionDescriptionHandlerOptionsReInvite),this._id=this.outgoingRequestMessage.callId+this.fromTag,this.userAgent._sessions[this._id]=this}dispose(){if(this.disposed)return Promise.resolve();switch(this.disposed=!0,this.disposeEarlyMedia(),this.state){case z.Initial:return this.cancel().then(()=>super.dispose());case z.Establishing:return this.cancel().then(()=>super.dispose());case z.Established:return super.dispose();case z.Terminating:return super.dispose();case z.Terminated:return super.dispose();default:throw new Error("Unknown state.")}}get body(){return this.outgoingRequestMessage.body}get localIdentity(){return this.outgoingRequestMessage.from}get remoteIdentity(){return this.outgoingRequestMessage.to}get request(){return this.outgoingRequestMessage}cancel(e={}){if(this.logger.log("Inviter.cancel"),this.state!==z.Initial&&this.state!==z.Establishing){const r=new Error(`Invalid session state ${this.state}`);return this.logger.error(r.message),Promise.reject(r)}this.isCanceled=!0,this.stateTransition(z.Terminating);function t(r,n){if(r&&r<200||r>699)throw new TypeError("Invalid statusCode: "+r);if(r){const s=r,i=jo(r)||n;return"SIP;cause="+s+';text="'+i+'"'}}if(this.outgoingInviteRequest){let r;e.statusCode&&e.reasonPhrase&&(r=t(e.statusCode,e.reasonPhrase)),this.outgoingInviteRequest.cancel(r,e)}else this.logger.warn("Canceled session before INVITE was sent"),this.stateTransition(z.Terminated);return Promise.resolve()}invite(e={}){if(this.logger.log("Inviter.invite"),this.state!==z.Initial)return super.invite(e);if(e.sessionDescriptionHandlerModifiers&&(this.sessionDescriptionHandlerModifiers=e.sessionDescriptionHandlerModifiers),e.sessionDescriptionHandlerOptions&&(this.sessionDescriptionHandlerOptions=e.sessionDescriptionHandlerOptions),e.withoutSdp||this.inviteWithoutSdp)return this._renderbody&&this._rendertype&&(this.outgoingRequestMessage.body={contentType:this._rendertype,body:this._renderbody}),this.stateTransition(z.Establishing),Promise.resolve(this.sendInvite(e));const t={sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers,sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions};return this.getOffer(t).then(r=>(this.outgoingRequestMessage.body={body:r.content,contentType:r.contentType},this.stateTransition(z.Establishing),this.sendInvite(e))).catch(r=>{throw this.logger.log(r.message),this.state!==z.Terminated&&this.stateTransition(z.Terminated),r})}sendInvite(e={}){return this.outgoingInviteRequest=this.userAgent.userAgentCore.invite(this.outgoingRequestMessage,{onAccept:t=>{if(this.dialog){this.logger.log("Additional confirmed dialog, sending ACK and BYE"),this.ackAndBye(t);return}if(this.isCanceled){this.logger.log("Canceled session accepted, sending ACK and BYE"),this.ackAndBye(t),this.stateTransition(z.Terminated);return}this.notifyReferer(t),this.onAccept(t).then(()=>{this.disposeEarlyMedia()}).catch(()=>{this.disposeEarlyMedia()}).then(()=>{e.requestDelegate&&e.requestDelegate.onAccept&&e.requestDelegate.onAccept(t)})},onProgress:t=>{this.isCanceled||(this.notifyReferer(t),this.onProgress(t).catch(()=>{this.disposeEarlyMedia()}).then(()=>{e.requestDelegate&&e.requestDelegate.onProgress&&e.requestDelegate.onProgress(t)}))},onRedirect:t=>{this.notifyReferer(t),this.onRedirect(t),e.requestDelegate&&e.requestDelegate.onRedirect&&e.requestDelegate.onRedirect(t)},onReject:t=>{this.notifyReferer(t),this.onReject(t),e.requestDelegate&&e.requestDelegate.onReject&&e.requestDelegate.onReject(t)},onTrying:t=>{this.notifyReferer(t),this.onTrying(t),e.requestDelegate&&e.requestDelegate.onTrying&&e.requestDelegate.onTrying(t)}}),this.outgoingInviteRequest}disposeEarlyMedia(){this.earlyMediaSessionDescriptionHandlers.forEach(e=>{e.close()}),this.earlyMediaSessionDescriptionHandlers.clear()}notifyReferer(e){if(!this._referred)return;if(!(this._referred instanceof Wl))throw new Error("Referred session not instance of session");if(!this._referred.dialog)return;if(!e.message.statusCode)throw new Error("Status code undefined.");if(!e.message.reasonPhrase)throw new Error("Reason phrase undefined.");const t=`SIP/2.0 ${e.message.statusCode} ${e.message.reasonPhrase}`.trim(),r=this._referred.dialog.notify(void 0,{extraHeaders:["Event: refer","Subscription-State: terminated"],body:{contentDisposition:"render",contentType:"message/sipfrag",content:t}});r.delegate={onReject:()=>{this._referred=void 0}}}onAccept(e){if(this.logger.log("Inviter.onAccept"),this.state!==z.Establishing)return this.logger.error(`Accept received while in state ${this.state}, dropping response`),Promise.reject(new Error(`Invalid session state ${this.state}`));const t=e.message,r=e.session;switch(t.hasHeader("P-Asserted-Identity")&&(this._assertedIdentity=Ct.nameAddrHeaderParse(t.getHeader("P-Asserted-Identity"))),r.delegate={onAck:n=>this.onAckRequest(n),onBye:n=>this.onByeRequest(n),onInfo:n=>this.onInfoRequest(n),onInvite:n=>this.onInviteRequest(n),onMessage:n=>this.onMessageRequest(n),onNotify:n=>this.onNotifyRequest(n),onPrack:n=>this.onPrackRequest(n),onRefer:n=>this.onReferRequest(n)},this._dialog=r,r.signalingState){case me.Initial:return this.logger.error("Received 2xx response to INVITE without a session description"),this.ackAndBye(e,400,"Missing session description"),this.stateTransition(z.Terminated),Promise.reject(new Error("Bad Media Description"));case me.HaveLocalOffer:return this.logger.error("Received 2xx response to INVITE without a session description"),this.ackAndBye(e,400,"Missing session description"),this.stateTransition(z.Terminated),Promise.reject(new Error("Bad Media Description"));case me.HaveRemoteOffer:{if(!this._dialog.offer)throw new Error(`Session offer undefined in signaling state ${this._dialog.signalingState}.`);const n={sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers,sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions};return this.setOfferAndGetAnswer(this._dialog.offer,n).then(s=>{e.ack({body:s}),this.stateTransition(z.Established)}).catch(s=>{throw this.ackAndBye(e,488,"Invalid session description"),this.stateTransition(z.Terminated),s})}case me.Stable:{if(this.earlyMediaSessionDescriptionHandlers.size>0){const i=this.earlyMediaSessionDescriptionHandlers.get(r.id);if(!i)throw new Error("Session description handler undefined.");return this.setSessionDescriptionHandler(i),this.earlyMediaSessionDescriptionHandlers.delete(r.id),e.ack(),this.stateTransition(z.Established),Promise.resolve()}if(this.earlyMediaDialog){if(this.earlyMediaDialog!==r){this.earlyMedia&&this.logger.error("You have set the 'earlyMedia' option to 'true' which requires that your INVITE requests do not fork and yet this INVITE request did in fact fork. Consequentially and not surprisingly the end point which accepted the INVITE (confirmed dialog) does not match the end point with which early media has been setup (early dialog) and thus this session is unable to proceed. In accordance with the SIP specifications, the SIP servers your end point is connected to determine if an INVITE forks and the forking behavior of those servers cannot be controlled by this library. If you wish to use early media with this library you must configure those servers accordingly. Alternatively you may set the 'earlyMedia' to 'false' which will allow this library to function with any INVITE requests which do fork.");const i=new Error("Early media dialog does not equal confirmed dialog, terminating session");return this.logger.error(i.message),this.ackAndBye(e,488,"Not Acceptable Here"),this.stateTransition(z.Terminated),Promise.reject(i)}return e.ack(),this.stateTransition(z.Established),Promise.resolve()}const n=r.answer;if(!n)throw new Error("Answer is undefined.");const s={sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers,sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions};return this.setAnswer(n,s).then(()=>{let i;this._renderbody&&this._rendertype&&(i={body:{contentDisposition:"render",contentType:this._rendertype,content:this._renderbody}}),e.ack(i),this.stateTransition(z.Established)}).catch(i=>{throw this.logger.error(i.message),this.ackAndBye(e,488,"Not Acceptable Here"),this.stateTransition(z.Terminated),i})}case me.Closed:return Promise.reject(new Error("Terminated."));default:throw new Error("Unknown session signaling state.")}}onProgress(e){var t;if(this.logger.log("Inviter.onProgress"),this.state!==z.Establishing)return this.logger.error(`Progress received while in state ${this.state}, dropping response`),Promise.reject(new Error(`Invalid session state ${this.state}`));if(!this.outgoingInviteRequest)throw new Error("Outgoing INVITE request undefined.");const r=e.message,n=e.session;r.hasHeader("P-Asserted-Identity")&&(this._assertedIdentity=Ct.nameAddrHeaderParse(r.getHeader("P-Asserted-Identity")));const s=r.getHeader("require"),i=r.getHeader("rseq"),o=!!(s&&s.includes("100rel")&&i&&Number(i)),a=[];switch(o&&a.push("RAck: "+r.getHeader("rseq")+" "+r.getHeader("cseq")),n.signalingState){case me.Initial:return o&&(this.logger.warn("First reliable provisional response received MUST contain an offer when INVITE does not contain an offer."),e.prack({extraHeaders:a})),Promise.resolve();case me.HaveLocalOffer:return o&&e.prack({extraHeaders:a}),Promise.resolve();case me.HaveRemoteOffer:if(!o)return this.logger.warn("Non-reliable provisional response MUST NOT contain an initial offer, discarding response."),Promise.resolve();{const l=this.sessionDescriptionHandlerFactory(this,this.userAgent.configuration.sessionDescriptionHandlerFactoryOptions||{});return!((t=this.delegate)===null||t===void 0)&&t.onSessionDescriptionHandler&&this.delegate.onSessionDescriptionHandler(l,!0),this.earlyMediaSessionDescriptionHandlers.set(n.id,l),l.setDescription(r.body,this.sessionDescriptionHandlerOptions,this.sessionDescriptionHandlerModifiers).then(()=>l.getDescription(this.sessionDescriptionHandlerOptions,this.sessionDescriptionHandlerModifiers)).then(u=>{const c={contentDisposition:"session",contentType:u.contentType,content:u.body};e.prack({extraHeaders:a,body:c})}).catch(u=>{throw this.stateTransition(z.Terminated),u})}case me.Stable:if(o&&e.prack({extraHeaders:a}),this.earlyMedia&&!this.earlyMediaDialog){this.earlyMediaDialog=n;const l=n.answer;if(!l)throw new Error("Answer is undefined.");const u={sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers,sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions};return this.setAnswer(l,u).catch(c=>{throw this.stateTransition(z.Terminated),c})}return Promise.resolve();case me.Closed:return Promise.reject(new Error("Terminated."));default:throw new Error("Unknown session signaling state.")}}onRedirect(e){if(this.logger.log("Inviter.onRedirect"),this.state!==z.Establishing&&this.state!==z.Terminating){this.logger.error(`Redirect received while in state ${this.state}, dropping response`);return}this.stateTransition(z.Terminated)}onReject(e){if(this.logger.log("Inviter.onReject"),this.state!==z.Establishing&&this.state!==z.Terminating){this.logger.error(`Reject received while in state ${this.state}, dropping response`);return}this.stateTransition(z.Terminated)}onTrying(e){if(this.logger.log("Inviter.onTrying"),this.state!==z.Establishing){this.logger.error(`Trying received while in state ${this.state}, dropping response`);return}}},nt;(function(e){e.Initial="Initial",e.Registered="Registered",e.Unregistered="Unregistered",e.Terminated="Terminated"})(nt=nt||(nt={}));var Wo=class vs{constructor(t,r={}){this.disposed=!1,this._contacts=[],this._retryAfter=void 0,this._state=nt.Initial,this._waiting=!1,this._stateEventEmitter=new Ns,this._waitingEventEmitter=new Ns,this.userAgent=t;const n=t.configuration.uri.clone();if(n.user=void 0,this.options=Object.assign(Object.assign(Object.assign({},vs.defaultOptions()),{registrar:n}),vs.stripUndefinedProperties(r)),this.options.extraContactHeaderParams=(this.options.extraContactHeaderParams||[]).slice(),this.options.extraHeaders=(this.options.extraHeaders||[]).slice(),!this.options.registrar)throw new Error("Registrar undefined.");if(this.options.registrar=this.options.registrar.clone(),this.options.regId&&!this.options.instanceId?this.options.instanceId=this.userAgent.instanceId:!this.options.regId&&this.options.instanceId&&(this.options.regId=1),this.options.instanceId&&Ct.parse(this.options.instanceId,"uuid")===-1)throw new Error("Invalid instanceId.");if(this.options.regId&&this.options.regId<0)throw new Error("Invalid regId.");const s=this.options.registrar,i=this.options.params&&this.options.params.fromUri||t.userAgentCore.configuration.aor,o=this.options.params&&this.options.params.toUri||t.configuration.uri,a=this.options.params||{},l=(r.extraHeaders||[]).slice();if(this.request=t.userAgentCore.makeOutgoingRequestMessage(be.REGISTER,s,i,o,a,l,void 0),this.expires=this.options.expires||vs.defaultExpires,this.expires<0)throw new Error("Invalid expires.");if(this.refreshFrequency=this.options.refreshFrequency||vs.defaultRefreshFrequency,this.refreshFrequency<50||this.refreshFrequency>99)throw new Error("Invalid refresh frequency. The value represents a percentage of the expiration time and should be between 50 and 99.");this.logger=t.getLogger("sip.Registerer"),this.options.logConfiguration&&(this.logger.log("Configuration:"),Object.keys(this.options).forEach(u=>{const c=this.options[u];u==="registrar"?this.logger.log("· "+u+": "+c):this.logger.log("· "+u+": "+JSON.stringify(c))})),this.id=this.request.callId+this.request.from.parameters.tag,this.userAgent._registerers[this.id]=this}static defaultOptions(){return{expires:vs.defaultExpires,extraContactHeaderParams:[],extraHeaders:[],logConfiguration:!0,instanceId:"",params:{},regId:0,registrar:new In("sip","anonymous","anonymous.invalid"),refreshFrequency:vs.defaultRefreshFrequency}}static stripUndefinedProperties(t){return Object.keys(t).reduce((r,n)=>(t[n]!==void 0&&(r[n]=t[n]),r),{})}get contacts(){return this._contacts.slice()}get retryAfter(){return this._retryAfter}get state(){return this._state}get stateChange(){return this._stateEventEmitter}dispose(){return this.disposed?Promise.resolve():(this.disposed=!0,this.logger.log(`Registerer ${this.id} in state ${this.state} is being disposed`),delete this.userAgent._registerers[this.id],new Promise(t=>{const r=()=>{if(!this.waiting&&this._state===nt.Registered){this.stateChange.addListener(()=>{this.terminated(),t()},{once:!0}),this.unregister();return}this.terminated(),t()};this.waiting?this.waitingChange.addListener(()=>{r()},{once:!0}):r()}))}register(t={}){if(this.state===nt.Terminated)throw this.stateError(),new Error("Registerer terminated. Unable to register.");if(this.disposed)throw this.stateError(),new Error("Registerer disposed. Unable to register.");if(this.waiting){this.waitingWarning();const s=new Fl("REGISTER request already in progress, waiting for final response");return Promise.reject(s)}t.requestOptions&&(this.options=Object.assign(Object.assign({},this.options),t.requestOptions));const r=(this.options.extraHeaders||[]).slice();r.push("Contact: "+this.generateContactHeader(this.expires)),r.push("Allow: "+["ACK","CANCEL","INVITE","MESSAGE","BYE","OPTIONS","INFO","NOTIFY","REFER"].toString()),this.request.cseq++,this.request.setHeader("cseq",this.request.cseq+" REGISTER"),this.request.extraHeaders=r,this.waitingToggle(!0);const n=this.userAgent.userAgentCore.register(this.request,{onAccept:s=>{let i;s.message.hasHeader("expires")&&(i=Number(s.message.getHeader("expires"))),this._contacts=s.message.getHeaders("contact");let o=this._contacts.length;if(!o){this.logger.error("No Contact header in response to REGISTER, dropping response."),this.unregistered();return}let a;for(;o--;){if(a=s.message.parseHeader("contact",o),!a)throw new Error("Contact undefined");if(this.userAgent.contact.pubGruu&&cp(a.uri,this.userAgent.contact.pubGruu)){i=Number(a.getParam("expires"));break}if(this.userAgent.configuration.contactName===""){if(a.uri.user===this.userAgent.contact.uri.user){i=Number(a.getParam("expires"));break}}else if(cp(a.uri,this.userAgent.contact.uri)){i=Number(a.getParam("expires"));break}a=void 0}if(a===void 0){this.logger.error("No Contact header pointing to us, dropping response"),this.unregistered(),this.waitingToggle(!1);return}if(i===void 0){this.logger.error("Contact pointing to us is missing expires parameter, dropping response"),this.unregistered(),this.waitingToggle(!1);return}if(a.hasParam("temp-gruu")){const l=a.getParam("temp-gruu");l&&(this.userAgent.contact.tempGruu=Ct.URIParse(l.replace(/"/g,"")))}if(a.hasParam("pub-gruu")){const l=a.getParam("pub-gruu");l&&(this.userAgent.contact.pubGruu=Ct.URIParse(l.replace(/"/g,"")))}this.registered(i),t.requestDelegate&&t.requestDelegate.onAccept&&t.requestDelegate.onAccept(s),this.waitingToggle(!1)},onProgress:s=>{t.requestDelegate&&t.requestDelegate.onProgress&&t.requestDelegate.onProgress(s)},onRedirect:s=>{this.logger.error("Redirect received. Not supported."),this.unregistered(),t.requestDelegate&&t.requestDelegate.onRedirect&&t.requestDelegate.onRedirect(s),this.waitingToggle(!1)},onReject:s=>{if(s.message.statusCode===423){if(!s.message.hasHeader("min-expires")){this.logger.error("423 response received for REGISTER without Min-Expires, dropping response"),this.unregistered(),this.waitingToggle(!1);return}this.expires=Number(s.message.getHeader("min-expires")),this.waitingToggle(!1),this.register();return}this.logger.warn(`Failed to register, status code ${s.message.statusCode}`);let i=NaN;if(s.message.statusCode===500||s.message.statusCode===503){const o=s.message.getHeader("retry-after");o&&(i=Number.parseInt(o,void 0))}this._retryAfter=isNaN(i)?void 0:i,this.unregistered(),t.requestDelegate&&t.requestDelegate.onReject&&t.requestDelegate.onReject(s),this._retryAfter=void 0,this.waitingToggle(!1)},onTrying:s=>{t.requestDelegate&&t.requestDelegate.onTrying&&t.requestDelegate.onTrying(s)}});return Promise.resolve(n)}unregister(t={}){if(this.state===nt.Terminated)throw this.stateError(),new Error("Registerer terminated. Unable to register.");if(this.disposed&&this.state!==nt.Registered)throw this.stateError(),new Error("Registerer disposed. Unable to register.");if(this.waiting){this.waitingWarning();const s=new Fl("REGISTER request already in progress, waiting for final response");return Promise.reject(s)}this._state!==nt.Registered&&!t.all&&this.logger.warn("Not currently registered, but sending an unregister anyway.");const r=(t.requestOptions&&t.requestOptions.extraHeaders||[]).slice();this.request.extraHeaders=r,t.all?(r.push("Contact: *"),r.push("Expires: 0")):r.push("Contact: "+this.generateContactHeader(0)),this.request.cseq++,this.request.setHeader("cseq",this.request.cseq+" REGISTER"),this.registrationTimer!==void 0&&(clearTimeout(this.registrationTimer),this.registrationTimer=void 0),this.waitingToggle(!0);const n=this.userAgent.userAgentCore.register(this.request,{onAccept:s=>{this._contacts=s.message.getHeaders("contact"),this.unregistered(),t.requestDelegate&&t.requestDelegate.onAccept&&t.requestDelegate.onAccept(s),this.waitingToggle(!1)},onProgress:s=>{t.requestDelegate&&t.requestDelegate.onProgress&&t.requestDelegate.onProgress(s)},onRedirect:s=>{this.logger.error("Unregister redirected. Not currently supported."),this.unregistered(),t.requestDelegate&&t.requestDelegate.onRedirect&&t.requestDelegate.onRedirect(s),this.waitingToggle(!1)},onReject:s=>{this.logger.error(`Unregister rejected with status code ${s.message.statusCode}`),this.unregistered(),t.requestDelegate&&t.requestDelegate.onReject&&t.requestDelegate.onReject(s),this.waitingToggle(!1)},onTrying:s=>{t.requestDelegate&&t.requestDelegate.onTrying&&t.requestDelegate.onTrying(s)}});return Promise.resolve(n)}clearTimers(){this.registrationTimer!==void 0&&(clearTimeout(this.registrationTimer),this.registrationTimer=void 0),this.registrationExpiredTimer!==void 0&&(clearTimeout(this.registrationExpiredTimer),this.registrationExpiredTimer=void 0)}generateContactHeader(t){let r=this.userAgent.contact.toString({register:!0});return this.options.regId&&this.options.instanceId&&(r+=";reg-id="+this.options.regId,r+=';+sip.instance="<urn:uuid:'+this.options.instanceId+'>"'),this.options.extraContactHeaderParams&&this.options.extraContactHeaderParams.forEach(n=>{r+=";"+n}),r+=";expires="+t,r}registered(t){this.clearTimers(),this.registrationTimer=setTimeout(()=>{this.registrationTimer=void 0,this.register()},this.refreshFrequency/100*t*1e3),this.registrationExpiredTimer=setTimeout(()=>{this.logger.warn("Registration expired"),this.unregistered()},t*1e3),this._state!==nt.Registered&&this.stateTransition(nt.Registered)}unregistered(){this.clearTimers(),this._state!==nt.Unregistered&&this.stateTransition(nt.Unregistered)}terminated(){this.clearTimers(),this._state!==nt.Terminated&&this.stateTransition(nt.Terminated)}stateTransition(t){const r=()=>{throw new Error(`Invalid state transition from ${this._state} to ${t}`)};switch(this._state){case nt.Initial:t!==nt.Registered&&t!==nt.Unregistered&&t!==nt.Terminated&&r();break;case nt.Registered:t!==nt.Unregistered&&t!==nt.Terminated&&r();break;case nt.Unregistered:t!==nt.Registered&&t!==nt.Terminated&&r();break;case nt.Terminated:r();break;default:throw new Error("Unrecognized state.")}this._state=t,this.logger.log(`Registration transitioned to state ${this._state}`),this._stateEventEmitter.emit(this._state),t===nt.Terminated&&this.dispose()}get waiting(){return this._waiting}get waitingChange(){return this._waitingEventEmitter}waitingToggle(t){if(this._waiting===t)throw new Error(`Invalid waiting transition from ${this._waiting} to ${t}`);this._waiting=t,this.logger.log(`Waiting toggled to ${this._waiting}`),this._waitingEventEmitter.emit(this._waiting)}waitingWarning(){let t="An attempt was made to send a REGISTER request while a prior one was still in progress.";t+=" RFC 3261 requires UAs MUST NOT send a new registration until they have received a final response",t+=" from the registrar for the previous one or the previous REGISTER request has timed out.",t+=" Note that if the transport disconnects, you still must wait for the prior request to time out before",t+=" sending a new REGISTER request or alternatively dispose of the current Registerer and create a new Registerer.",this.logger.warn(t)}stateError(){let t=`An attempt was made to send a REGISTER request when the Registerer ${this.state===nt.Terminated?"is in 'Terminated' state":"has been disposed"}.`;t+=" The Registerer transitions to 'Terminated' when Registerer.dispose() is called.",t+=" Perhaps you called UserAgent.stop() which dipsoses of all Registerers?",this.logger.error(t)}};Wo.defaultExpires=600,Wo.defaultRefreshFrequency=99;var Je;(function(e){e.Initial="Initial",e.NotifyWait="NotifyWait",e.Pending="Pending",e.Active="Active",e.Terminated="Terminated"})(Je=Je||(Je={}));var Ee;(function(e){e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Disconnected="Disconnected"})(Ee=Ee||(Ee={}));var $t;(function(e){e.Started="Started",e.Stopped="Stopped"})($t=$t||($t={}));var Dn=class Tr{constructor(){this._dataLength=0,this._bufferLength=0,this._state=new Int32Array(4),this._buffer=new ArrayBuffer(68),this._buffer8=new Uint8Array(this._buffer,0,68),this._buffer32=new Uint32Array(this._buffer,0,17),this.start()}static hashStr(t,r=!1){return this.onePassHasher.start().appendStr(t).end(r)}static hashAsciiStr(t,r=!1){return this.onePassHasher.start().appendAsciiStr(t).end(r)}static _hex(t){const r=Tr.hexChars,n=Tr.hexOut;let s,i,o,a;for(a=0;a<4;a+=1)for(i=a*8,s=t[a],o=0;o<8;o+=2)n[i+1+o]=r.charAt(s&15),s>>>=4,n[i+0+o]=r.charAt(s&15),s>>>=4;return n.join("")}static _md5cycle(t,r){let n=t[0],s=t[1],i=t[2],o=t[3];n+=(s&i|~s&o)+r[0]-680876936|0,n=(n<<7|n>>>25)+s|0,o+=(n&s|~n&i)+r[1]-389564586|0,o=(o<<12|o>>>20)+n|0,i+=(o&n|~o&s)+r[2]+606105819|0,i=(i<<17|i>>>15)+o|0,s+=(i&o|~i&n)+r[3]-1044525330|0,s=(s<<22|s>>>10)+i|0,n+=(s&i|~s&o)+r[4]-176418897|0,n=(n<<7|n>>>25)+s|0,o+=(n&s|~n&i)+r[5]+1200080426|0,o=(o<<12|o>>>20)+n|0,i+=(o&n|~o&s)+r[6]-1473231341|0,i=(i<<17|i>>>15)+o|0,s+=(i&o|~i&n)+r[7]-45705983|0,s=(s<<22|s>>>10)+i|0,n+=(s&i|~s&o)+r[8]+1770035416|0,n=(n<<7|n>>>25)+s|0,o+=(n&s|~n&i)+r[9]-1958414417|0,o=(o<<12|o>>>20)+n|0,i+=(o&n|~o&s)+r[10]-42063|0,i=(i<<17|i>>>15)+o|0,s+=(i&o|~i&n)+r[11]-1990404162|0,s=(s<<22|s>>>10)+i|0,n+=(s&i|~s&o)+r[12]+1804603682|0,n=(n<<7|n>>>25)+s|0,o+=(n&s|~n&i)+r[13]-40341101|0,o=(o<<12|o>>>20)+n|0,i+=(o&n|~o&s)+r[14]-1502002290|0,i=(i<<17|i>>>15)+o|0,s+=(i&o|~i&n)+r[15]+1236535329|0,s=(s<<22|s>>>10)+i|0,n+=(s&o|i&~o)+r[1]-165796510|0,n=(n<<5|n>>>27)+s|0,o+=(n&i|s&~i)+r[6]-1069501632|0,o=(o<<9|o>>>23)+n|0,i+=(o&s|n&~s)+r[11]+643717713|0,i=(i<<14|i>>>18)+o|0,s+=(i&n|o&~n)+r[0]-373897302|0,s=(s<<20|s>>>12)+i|0,n+=(s&o|i&~o)+r[5]-701558691|0,n=(n<<5|n>>>27)+s|0,o+=(n&i|s&~i)+r[10]+38016083|0,o=(o<<9|o>>>23)+n|0,i+=(o&s|n&~s)+r[15]-660478335|0,i=(i<<14|i>>>18)+o|0,s+=(i&n|o&~n)+r[4]-405537848|0,s=(s<<20|s>>>12)+i|0,n+=(s&o|i&~o)+r[9]+568446438|0,n=(n<<5|n>>>27)+s|0,o+=(n&i|s&~i)+r[14]-1019803690|0,o=(o<<9|o>>>23)+n|0,i+=(o&s|n&~s)+r[3]-187363961|0,i=(i<<14|i>>>18)+o|0,s+=(i&n|o&~n)+r[8]+1163531501|0,s=(s<<20|s>>>12)+i|0,n+=(s&o|i&~o)+r[13]-1444681467|0,n=(n<<5|n>>>27)+s|0,o+=(n&i|s&~i)+r[2]-51403784|0,o=(o<<9|o>>>23)+n|0,i+=(o&s|n&~s)+r[7]+1735328473|0,i=(i<<14|i>>>18)+o|0,s+=(i&n|o&~n)+r[12]-1926607734|0,s=(s<<20|s>>>12)+i|0,n+=(s^i^o)+r[5]-378558|0,n=(n<<4|n>>>28)+s|0,o+=(n^s^i)+r[8]-2022574463|0,o=(o<<11|o>>>21)+n|0,i+=(o^n^s)+r[11]+1839030562|0,i=(i<<16|i>>>16)+o|0,s+=(i^o^n)+r[14]-35309556|0,s=(s<<23|s>>>9)+i|0,n+=(s^i^o)+r[1]-1530992060|0,n=(n<<4|n>>>28)+s|0,o+=(n^s^i)+r[4]+1272893353|0,o=(o<<11|o>>>21)+n|0,i+=(o^n^s)+r[7]-155497632|0,i=(i<<16|i>>>16)+o|0,s+=(i^o^n)+r[10]-1094730640|0,s=(s<<23|s>>>9)+i|0,n+=(s^i^o)+r[13]+681279174|0,n=(n<<4|n>>>28)+s|0,o+=(n^s^i)+r[0]-358537222|0,o=(o<<11|o>>>21)+n|0,i+=(o^n^s)+r[3]-722521979|0,i=(i<<16|i>>>16)+o|0,s+=(i^o^n)+r[6]+76029189|0,s=(s<<23|s>>>9)+i|0,n+=(s^i^o)+r[9]-640364487|0,n=(n<<4|n>>>28)+s|0,o+=(n^s^i)+r[12]-421815835|0,o=(o<<11|o>>>21)+n|0,i+=(o^n^s)+r[15]+530742520|0,i=(i<<16|i>>>16)+o|0,s+=(i^o^n)+r[2]-995338651|0,s=(s<<23|s>>>9)+i|0,n+=(i^(s|~o))+r[0]-198630844|0,n=(n<<6|n>>>26)+s|0,o+=(s^(n|~i))+r[7]+1126891415|0,o=(o<<10|o>>>22)+n|0,i+=(n^(o|~s))+r[14]-1416354905|0,i=(i<<15|i>>>17)+o|0,s+=(o^(i|~n))+r[5]-57434055|0,s=(s<<21|s>>>11)+i|0,n+=(i^(s|~o))+r[12]+1700485571|0,n=(n<<6|n>>>26)+s|0,o+=(s^(n|~i))+r[3]-1894986606|0,o=(o<<10|o>>>22)+n|0,i+=(n^(o|~s))+r[10]-1051523|0,i=(i<<15|i>>>17)+o|0,s+=(o^(i|~n))+r[1]-2054922799|0,s=(s<<21|s>>>11)+i|0,n+=(i^(s|~o))+r[8]+1873313359|0,n=(n<<6|n>>>26)+s|0,o+=(s^(n|~i))+r[15]-30611744|0,o=(o<<10|o>>>22)+n|0,i+=(n^(o|~s))+r[6]-1560198380|0,i=(i<<15|i>>>17)+o|0,s+=(o^(i|~n))+r[13]+1309151649|0,s=(s<<21|s>>>11)+i|0,n+=(i^(s|~o))+r[4]-145523070|0,n=(n<<6|n>>>26)+s|0,o+=(s^(n|~i))+r[11]-1120210379|0,o=(o<<10|o>>>22)+n|0,i+=(n^(o|~s))+r[2]+718787259|0,i=(i<<15|i>>>17)+o|0,s+=(o^(i|~n))+r[9]-343485551|0,s=(s<<21|s>>>11)+i|0,t[0]=n+t[0]|0,t[1]=s+t[1]|0,t[2]=i+t[2]|0,t[3]=o+t[3]|0}start(){return this._dataLength=0,this._bufferLength=0,this._state.set(Tr.stateIdentity),this}appendStr(t){const r=this._buffer8,n=this._buffer32;let s=this._bufferLength,i,o;for(o=0;o<t.length;o+=1){if(i=t.charCodeAt(o),i<128)r[s++]=i;else if(i<2048)r[s++]=(i>>>6)+192,r[s++]=i&63|128;else if(i<55296||i>56319)r[s++]=(i>>>12)+224,r[s++]=i>>>6&63|128,r[s++]=i&63|128;else{if(i=(i-55296)*1024+(t.charCodeAt(++o)-56320)+65536,i>1114111)throw new Error("Unicode standard supports code points up to U+10FFFF");r[s++]=(i>>>18)+240,r[s++]=i>>>12&63|128,r[s++]=i>>>6&63|128,r[s++]=i&63|128}s>=64&&(this._dataLength+=64,Tr._md5cycle(this._state,n),s-=64,n[0]=n[16])}return this._bufferLength=s,this}appendAsciiStr(t){const r=this._buffer8,n=this._buffer32;let s=this._bufferLength,i,o=0;for(;;){for(i=Math.min(t.length-o,64-s);i--;)r[s++]=t.charCodeAt(o++);if(s<64)break;this._dataLength+=64,Tr._md5cycle(this._state,n),s=0}return this._bufferLength=s,this}appendByteArray(t){const r=this._buffer8,n=this._buffer32;let s=this._bufferLength,i,o=0;for(;;){for(i=Math.min(t.length-o,64-s);i--;)r[s++]=t[o++];if(s<64)break;this._dataLength+=64,Tr._md5cycle(this._state,n),s=0}return this._bufferLength=s,this}getState(){const t=this,r=t._state;return{buffer:String.fromCharCode.apply(null,t._buffer8),buflen:t._bufferLength,length:t._dataLength,state:[r[0],r[1],r[2],r[3]]}}setState(t){const r=t.buffer,n=t.state,s=this._state;let i;for(this._dataLength=t.length,this._bufferLength=t.buflen,s[0]=n[0],s[1]=n[1],s[2]=n[2],s[3]=n[3],i=0;i<r.length;i+=1)this._buffer8[i]=r.charCodeAt(i)}end(t=!1){const r=this._bufferLength,n=this._buffer8,s=this._buffer32,i=(r>>2)+1;let o;if(this._dataLength+=r,n[r]=128,n[r+1]=n[r+2]=n[r+3]=0,s.set(Tr.buffer32Identity.subarray(i),i),r>55&&(Tr._md5cycle(this._state,s),s.set(Tr.buffer32Identity)),o=this._dataLength*8,o<=4294967295)s[14]=o;else{const a=o.toString(16).match(/(.*?)(.{0,8})$/);if(a===null)return;const l=parseInt(a[2],16),u=parseInt(a[1],16)||0;s[14]=l,s[15]=u}return Tr._md5cycle(this._state,s),t?this._state:Tr._hex(this._state)}};Dn.stateIdentity=new Int32Array([1732584193,-271733879,-1732584194,271733878]),Dn.buffer32Identity=new Int32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),Dn.hexChars="0123456789abcdef",Dn.hexOut=[],Dn.onePassHasher=new Dn,Dn.hashStr("hello")!=="5d41402abc4b2a76b9719d911017c592"&&console.error("Md5 self test failed.");function On(e){return Dn.hashStr(e)}var dw=class{constructor(e,t,r,n){this.logger=e.getLogger("sipjs.digestauthentication"),this.username=r,this.password=n,this.ha1=t,this.nc=0,this.ncHex="00000000"}authenticate(e,t,r){if(this.algorithm=t.algorithm,this.realm=t.realm,this.nonce=t.nonce,this.opaque=t.opaque,this.stale=t.stale,this.algorithm){if(this.algorithm!=="MD5")return this.logger.warn("challenge with Digest algorithm different than 'MD5', authentication aborted"),!1}else this.algorithm="MD5";if(!this.realm)return this.logger.warn("challenge without Digest realm, authentication aborted"),!1;if(!this.nonce)return this.logger.warn("challenge without Digest nonce, authentication aborted"),!1;if(t.qop)if(t.qop.indexOf("auth")>-1)this.qop="auth";else if(t.qop.indexOf("auth-int")>-1)this.qop="auth-int";else return this.logger.warn("challenge without Digest qop different than 'auth' or 'auth-int', authentication aborted"),!1;else this.qop=void 0;return this.method=e.method,this.uri=e.ruri,this.cnonce=os(12),this.nc+=1,this.updateNcHex(),this.nc===4294967296&&(this.nc=1,this.ncHex="00000001"),this.calculateResponse(r),!0}toString(){const e=[];if(!this.response)throw new Error("response field does not exist, cannot generate Authorization header");return e.push("algorithm="+this.algorithm),e.push('username="'+this.username+'"'),e.push('realm="'+this.realm+'"'),e.push('nonce="'+this.nonce+'"'),e.push('uri="'+this.uri+'"'),e.push('response="'+this.response+'"'),this.opaque&&e.push('opaque="'+this.opaque+'"'),this.qop&&(e.push("qop="+this.qop),e.push('cnonce="'+this.cnonce+'"'),e.push("nc="+this.ncHex)),"Digest "+e.join(", ")}updateNcHex(){const e=Number(this.nc).toString(16);this.ncHex="00000000".substr(0,8-e.length)+e}calculateResponse(e){let t,r;t=this.ha1,(t===""||t===void 0)&&(t=On(this.username+":"+this.realm+":"+this.password)),this.qop==="auth"?(r=On(this.method+":"+this.uri),this.response=On(t+":"+this.nonce+":"+this.ncHex+":"+this.cnonce+":auth:"+r)):this.qop==="auth-int"?(r=On(this.method+":"+this.uri+":"+On(e||"")),this.response=On(t+":"+this.nonce+":"+this.ncHex+":"+this.cnonce+":auth-int:"+r)):this.qop===void 0&&(r=On(this.method+":"+this.uri),this.response=On(t+":"+this.nonce+":"+r))}},kt;(function(e){e[e.error=0]="error",e[e.warn=1]="warn",e[e.log=2]="log",e[e.debug=3]="debug"})(kt=kt||(kt={}));var gp=class{constructor(e,t,r){this.logger=e,this.category=t,this.label=r}error(e){this.genericLog(kt.error,e)}warn(e){this.genericLog(kt.warn,e)}log(e){this.genericLog(kt.log,e)}debug(e){this.genericLog(kt.debug,e)}genericLog(e,t){this.logger.genericLog(e,this.category,this.label,t)}get level(){return this.logger.level}set level(e){this.logger.level=e}},fw=class{constructor(){this.builtinEnabled=!0,this._level=kt.log,this.loggers={},this.logger=this.getLogger("sip:loggerfactory")}get level(){return this._level}set level(e){e>=0&&e<=3?this._level=e:e>3?this._level=3:kt.hasOwnProperty(e)?this._level=e:this.logger.error("invalid 'level' parameter value: "+JSON.stringify(e))}get connector(){return this._connector}set connector(e){e?typeof e=="function"?this._connector=e:this.logger.error("invalid 'connector' parameter value: "+JSON.stringify(e)):this._connector=void 0}getLogger(e,t){if(t&&this.level===3)return new gp(this,e,t);if(this.loggers[e])return this.loggers[e];{const r=new gp(this,e);return this.loggers[e]=r,r}}genericLog(e,t,r,n){this.level>=e&&this.builtinEnabled&&this.print(e,t,r,n),this.connector&&this.connector(kt[e],t,r,n)}print(e,t,r,n){if(typeof n=="string"){const s=[new Date,t];r&&s.push(r),n=s.concat(n).join(" | ")}switch(e){case kt.error:console.error(n);break;case kt.warn:console.warn(n);break;case kt.log:console.log(n);break;case kt.debug:console.debug(n);break;default:break}}},Go;(function(e){function t(s,i){let o=i,a=0,l=0;if(s.substring(o,o+2).match(/(^\r\n)/))return-2;for(;a===0;){if(l=s.indexOf(`\r
26
+ `,t}};function fp(e){return e==="application/sdp"?"session":"render"}function Ko(e){const t=typeof e=="string"?e:e.body,r=typeof e=="string"?"application/sdp":e.contentType;return{contentDisposition:fp(r),contentType:r,content:t}}function pp(e){return e&&typeof e.content=="string"&&typeof e.contentType=="string"&&e.contentDisposition===void 0?!0:typeof e.contentDisposition=="string"}function Di(e){let t,r,n;if(e instanceof Bs&&e.body){const s=e.parseHeader("Content-Disposition");t=s?s.type:void 0,r=e.parseHeader("Content-Type"),n=e.body}if(e instanceof Rn&&e.body){const s=e.parseHeader("Content-Disposition");t=s?s.type:void 0,r=e.parseHeader("Content-Type"),n=e.body}if(e instanceof Ul&&e.body)if(t=e.getHeader("Content-Disposition"),r=e.getHeader("Content-Type"),typeof e.body=="string"){if(!r)throw new Error("Header content type header does not equal body content type.");n=e.body}else{if(r&&r!==e.body.contentType)throw new Error("Header content type header does not equal body content type.");r=e.body.contentType,n=e.body.body}if(pp(e)&&(t=e.contentDisposition,r=e.contentType,n=e.content),!!n){if(r&&!t&&(t=fp(r)),!t)throw new Error("Content disposition undefined.");if(!r)throw new Error("Content type undefined.");return{contentDisposition:t,contentType:r,content:n}}}var yr;(function(e){e.Initial="Initial",e.Early="Early",e.AckWait="AckWait",e.Confirmed="Confirmed",e.Terminated="Terminated"})(yr=yr||(yr={}));var ve;(function(e){e.Initial="Initial",e.HaveLocalOffer="HaveLocalOffer",e.HaveRemoteOffer="HaveRemoteOffer",e.Stable="Stable",e.Closed="Closed"})(ve=ve||(ve={}));var dn=500,cw=4e3,zl=5e3;const At={T1:dn,T2:cw,T4:zl,TIMER_B:64*dn,TIMER_D:0*dn,TIMER_F:64*dn,TIMER_H:64*dn,TIMER_I:0*zl,TIMER_J:0*dn,TIMER_K:0*zl,TIMER_L:64*dn,TIMER_M:64*dn,TIMER_N:64*dn,PROVISIONAL_RESPONSE_INTERVAL:6e4};var $n=class extends is{constructor(e){super(e||"Transaction state error.")}},be;(function(e){e.ACK="ACK",e.BYE="BYE",e.CANCEL="CANCEL",e.INFO="INFO",e.INVITE="INVITE",e.MESSAGE="MESSAGE",e.NOTIFY="NOTIFY",e.OPTIONS="OPTIONS",e.REGISTER="REGISTER",e.UPDATE="UPDATE",e.SUBSCRIBE="SUBSCRIBE",e.PUBLISH="PUBLISH",e.REFER="REFER",e.PRACK="PRACK"})(be=be||(be={}));const Pn=[be.ACK,be.BYE,be.CANCEL,be.INFO,be.INVITE,be.MESSAGE,be.NOTIFY,be.OPTIONS,be.PRACK,be.REFER,be.REGISTER,be.SUBSCRIBE];var hp=class{constructor(e){this.incomingMessageRequest=e}get request(){return this.incomingMessageRequest.message}accept(e){return this.incomingMessageRequest.accept(e),Promise.resolve()}reject(e){return this.incomingMessageRequest.reject(e),Promise.resolve()}},Kl=class{constructor(e){this.incomingNotifyRequest=e}get request(){return this.incomingNotifyRequest.message}accept(e){return this.incomingNotifyRequest.accept(e),Promise.resolve()}reject(e){return this.incomingNotifyRequest.reject(e),Promise.resolve()}},uw=class{constructor(e,t){this.incomingReferRequest=e,this.session=t}get referTo(){const e=this.incomingReferRequest.message.parseHeader("refer-to");if(!(e instanceof wr))throw new Error("Failed to parse Refer-To header.");return e}get referredBy(){return this.incomingReferRequest.message.getHeader("referred-by")}get replaces(){const e=this.referTo.uri.getHeader("replaces");return e instanceof Array?e[0]:e}get request(){return this.incomingReferRequest.message}accept(e={statusCode:202}){return this.incomingReferRequest.accept(e),Promise.resolve()}reject(e){return this.incomingReferRequest.reject(e),Promise.resolve()}makeInviter(e){if(this.inviter)return this.inviter;const t=this.referTo.uri.clone();t.clearHeaders(),e=e||{};const r=(e.extraHeaders||[]).slice(),n=this.replaces;n&&r.push("Replaces: "+decodeURIComponent(n));const s=this.referredBy;return s&&r.push("Referred-By: "+s),e.extraHeaders=r,this.inviter=this.session.userAgent._makeInviter(t,e),this.inviter._referred=this.session,this.session._referral=this.inviter,this.inviter}},z;(function(e){e.Initial="Initial",e.Establishing="Establishing",e.Established="Established",e.Terminating="Terminating",e.Terminated="Terminated"})(z=z||(z={}));var Wl=class Mg{constructor(t,r={}){this.pendingReinvite=!1,this.pendingReinviteAck=!1,this._state=z.Initial,this.delegate=r.delegate,this._stateEventEmitter=new qs,this._userAgent=t}dispose(){switch(this.logger.log(`Session ${this.id} in state ${this._state} is being disposed`),delete this.userAgent._sessions[this.id],this._sessionDescriptionHandler&&this._sessionDescriptionHandler.close(),this.state){case z.Initial:break;case z.Establishing:break;case z.Established:return new Promise(t=>{this._bye({onAccept:()=>t(),onRedirect:()=>t(),onReject:()=>t()})});case z.Terminating:break;case z.Terminated:break;default:throw new Error("Unknown state.")}return Promise.resolve()}get assertedIdentity(){return this._assertedIdentity}get dialog(){return this._dialog}get id(){return this._id}get replacee(){return this._replacee}get sessionDescriptionHandler(){return this._sessionDescriptionHandler}get sessionDescriptionHandlerFactory(){return this.userAgent.configuration.sessionDescriptionHandlerFactory}get sessionDescriptionHandlerModifiers(){return this._sessionDescriptionHandlerModifiers||[]}set sessionDescriptionHandlerModifiers(t){this._sessionDescriptionHandlerModifiers=t.slice()}get sessionDescriptionHandlerOptions(){return this._sessionDescriptionHandlerOptions||{}}set sessionDescriptionHandlerOptions(t){this._sessionDescriptionHandlerOptions=Object.assign({},t)}get sessionDescriptionHandlerModifiersReInvite(){return this._sessionDescriptionHandlerModifiersReInvite||[]}set sessionDescriptionHandlerModifiersReInvite(t){this._sessionDescriptionHandlerModifiersReInvite=t.slice()}get sessionDescriptionHandlerOptionsReInvite(){return this._sessionDescriptionHandlerOptionsReInvite||{}}set sessionDescriptionHandlerOptionsReInvite(t){this._sessionDescriptionHandlerOptionsReInvite=Object.assign({},t)}get state(){return this._state}get stateChange(){return this._stateEventEmitter}get userAgent(){return this._userAgent}bye(t={}){let r="Session.bye() may only be called if established session.";switch(this.state){case z.Initial:typeof this.cancel=="function"?(r+=" However Inviter.invite() has not yet been called.",r+=" Perhaps you should have called Inviter.cancel()?"):typeof this.reject=="function"&&(r+=" However Invitation.accept() has not yet been called.",r+=" Perhaps you should have called Invitation.reject()?");break;case z.Establishing:typeof this.cancel=="function"?(r+=" However a dialog does not yet exist.",r+=" Perhaps you should have called Inviter.cancel()?"):typeof this.reject=="function"&&(r+=" However Invitation.accept() has not yet been called (or not yet resolved).",r+=" Perhaps you should have called Invitation.reject()?");break;case z.Established:{const n=t.requestDelegate,s=this.copyRequestOptions(t.requestOptions);return this._bye(n,s)}case z.Terminating:r+=" However this session is already terminating.",typeof this.cancel=="function"?r+=" Perhaps you have already called Inviter.cancel()?":typeof this.reject=="function"&&(r+=" Perhaps you have already called Session.bye()?");break;case z.Terminated:r+=" However this session is already terminated.";break;default:throw new Error("Unknown state")}return this.logger.error(r),Promise.reject(new Error(`Invalid session state ${this.state}`))}info(t={}){if(this.state!==z.Established)return this.logger.error("Session.info() may only be called if established session."),Promise.reject(new Error(`Invalid session state ${this.state}`));const r=t.requestDelegate,n=this.copyRequestOptions(t.requestOptions);return this._info(r,n)}invite(t={}){if(this.logger.log("Session.invite"),this.state!==z.Established)return Promise.reject(new Error(`Invalid session state ${this.state}`));if(this.pendingReinvite)return Promise.reject(new Fl("Reinvite in progress. Please wait until complete, then try again."));this.pendingReinvite=!0,t.sessionDescriptionHandlerModifiers&&(this.sessionDescriptionHandlerModifiersReInvite=t.sessionDescriptionHandlerModifiers),t.sessionDescriptionHandlerOptions&&(this.sessionDescriptionHandlerOptionsReInvite=t.sessionDescriptionHandlerOptions);const r={onAccept:i=>{const o=Di(i.message);if(!o){this.logger.error("Received 2xx response to re-INVITE without a session description"),this.ackAndBye(i,400,"Missing session description"),this.stateTransition(z.Terminated),this.pendingReinvite=!1;return}if(t.withoutSdp){const a={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptionsReInvite,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiersReInvite};this.setOfferAndGetAnswer(o,a).then(l=>{i.ack({body:l})}).catch(l=>{this.logger.error("Failed to handle offer in 2xx response to re-INVITE"),this.logger.error(l.message),this.state===z.Terminated?i.ack():(this.ackAndBye(i,488,"Bad Media Description"),this.stateTransition(z.Terminated))}).then(()=>{this.pendingReinvite=!1,t.requestDelegate&&t.requestDelegate.onAccept&&t.requestDelegate.onAccept(i)})}else{const a={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptionsReInvite,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiersReInvite};this.setAnswer(o,a).then(()=>{i.ack()}).catch(l=>{this.logger.error("Failed to handle answer in 2xx response to re-INVITE"),this.logger.error(l.message),this.state!==z.Terminated?(this.ackAndBye(i,488,"Bad Media Description"),this.stateTransition(z.Terminated)):i.ack()}).then(()=>{this.pendingReinvite=!1,t.requestDelegate&&t.requestDelegate.onAccept&&t.requestDelegate.onAccept(i)})}},onProgress:i=>{},onRedirect:i=>{},onReject:i=>{this.logger.warn("Received a non-2xx response to re-INVITE"),this.pendingReinvite=!1,t.withoutSdp?t.requestDelegate&&t.requestDelegate.onReject&&t.requestDelegate.onReject(i):this.rollbackOffer().catch(o=>{if(this.logger.error("Failed to rollback offer on non-2xx response to re-INVITE"),this.logger.error(o.message),this.state!==z.Terminated){if(!this.dialog)throw new Error("Dialog undefined.");const a=[];a.push("Reason: "+this.getReasonHeaderValue(500,"Internal Server Error")),this.dialog.bye(void 0,{extraHeaders:a}),this.stateTransition(z.Terminated)}}).then(()=>{t.requestDelegate&&t.requestDelegate.onReject&&t.requestDelegate.onReject(i)})},onTrying:i=>{}},n=t.requestOptions||{};if(n.extraHeaders=(n.extraHeaders||[]).slice(),n.extraHeaders.push("Allow: "+Pn.toString()),n.extraHeaders.push("Contact: "+this._contact),t.withoutSdp){if(!this.dialog)throw this.pendingReinvite=!1,new Error("Dialog undefined.");return Promise.resolve(this.dialog.invite(r,n))}const s={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptionsReInvite,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiersReInvite};return this.getOffer(s).then(i=>{if(!this.dialog)throw this.pendingReinvite=!1,new Error("Dialog undefined.");return n.body=i,this.dialog.invite(r,n)}).catch(i=>{throw this.logger.error(i.message),this.logger.error("Failed to send re-INVITE"),this.pendingReinvite=!1,i})}message(t={}){if(this.state!==z.Established)return this.logger.error("Session.message() may only be called if established session."),Promise.reject(new Error(`Invalid session state ${this.state}`));const r=t.requestDelegate,n=this.copyRequestOptions(t.requestOptions);return this._message(r,n)}refer(t,r={}){if(this.state!==z.Established)return this.logger.error("Session.refer() may only be called if established session."),Promise.reject(new Error(`Invalid session state ${this.state}`));if(t instanceof Mg&&!t.dialog)return this.logger.error("Session.refer() may only be called with session which is established. You are perhaps attempting to attended transfer to a target for which there is not dialog yet established. Perhaps you are attempting a 'semi-attended' tansfer? Regardless, this is not supported. The recommended approached is to check to see if the target Session is in the Established state before calling refer(); if the state is not Established you may proceed by falling back using a URI as the target (blind transfer)."),Promise.reject(new Error(`Invalid session state ${this.state}`));const n=r.requestDelegate,s=this.copyRequestOptions(r.requestOptions);return s.extraHeaders=s.extraHeaders?s.extraHeaders.concat(this.referExtraHeaders(this.referToString(t))):this.referExtraHeaders(this.referToString(t)),this._refer(r.onNotify,n,s)}_bye(t,r){if(!this.dialog)return Promise.reject(new Error("Session dialog undefined."));const n=this.dialog;switch(n.sessionState){case yr.Initial:throw new Error(`Invalid dialog state ${n.sessionState}`);case yr.Early:throw new Error(`Invalid dialog state ${n.sessionState}`);case yr.AckWait:return this.stateTransition(z.Terminating),new Promise(s=>{n.delegate={onAck:()=>{const i=n.bye(t,r);return this.stateTransition(z.Terminated),s(i),Promise.resolve()},onAckTimeout:()=>{const i=n.bye(t,r);this.stateTransition(z.Terminated),s(i)}}});case yr.Confirmed:{const s=n.bye(t,r);return this.stateTransition(z.Terminated),Promise.resolve(s)}case yr.Terminated:throw new Error(`Invalid dialog state ${n.sessionState}`);default:throw new Error("Unrecognized state.")}}_info(t,r){return this.dialog?Promise.resolve(this.dialog.info(t,r)):Promise.reject(new Error("Session dialog undefined."))}_message(t,r){return this.dialog?Promise.resolve(this.dialog.message(t,r)):Promise.reject(new Error("Session dialog undefined."))}_refer(t,r,n){return this.dialog?(this.onNotify=t,Promise.resolve(this.dialog.refer(r,n))):Promise.reject(new Error("Session dialog undefined."))}ackAndBye(t,r,n){t.ack();const s=[];r&&s.push("Reason: "+this.getReasonHeaderValue(r,n)),t.session.bye(void 0,{extraHeaders:s})}onAckRequest(t){if(this.logger.log("Session.onAckRequest"),this.state!==z.Established&&this.state!==z.Terminating)return this.logger.error(`ACK received while in state ${this.state}, dropping request`),Promise.resolve();const r=this.dialog;if(!r)throw new Error("Dialog undefined.");const n={sessionDescriptionHandlerOptions:this.pendingReinviteAck?this.sessionDescriptionHandlerOptionsReInvite:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.pendingReinviteAck?this._sessionDescriptionHandlerModifiersReInvite:this._sessionDescriptionHandlerModifiers};if(this.delegate&&this.delegate.onAck){const s=new rw(t);this.delegate.onAck(s)}switch(this.pendingReinviteAck=!1,r.signalingState){case ve.Initial:{this.logger.error(`Invalid signaling state ${r.signalingState}.`);const s=["Reason: "+this.getReasonHeaderValue(488,"Bad Media Description")];return r.bye(void 0,{extraHeaders:s}),this.stateTransition(z.Terminated),Promise.resolve()}case ve.Stable:{const s=Di(t.message);return s?s.contentDisposition==="render"?(this._renderbody=s.content,this._rendertype=s.contentType,Promise.resolve()):s.contentDisposition!=="session"?Promise.resolve():this.setAnswer(s,n).catch(i=>{this.logger.error(i.message);const o=["Reason: "+this.getReasonHeaderValue(488,"Bad Media Description")];r.bye(void 0,{extraHeaders:o}),this.stateTransition(z.Terminated)}):Promise.resolve()}case ve.HaveLocalOffer:{this.logger.error(`Invalid signaling state ${r.signalingState}.`);const s=["Reason: "+this.getReasonHeaderValue(488,"Bad Media Description")];return r.bye(void 0,{extraHeaders:s}),this.stateTransition(z.Terminated),Promise.resolve()}case ve.HaveRemoteOffer:{this.logger.error(`Invalid signaling state ${r.signalingState}.`);const s=["Reason: "+this.getReasonHeaderValue(488,"Bad Media Description")];return r.bye(void 0,{extraHeaders:s}),this.stateTransition(z.Terminated),Promise.resolve()}case ve.Closed:throw new Error(`Invalid signaling state ${r.signalingState}.`);default:throw new Error(`Invalid signaling state ${r.signalingState}.`)}}onByeRequest(t){if(this.logger.log("Session.onByeRequest"),this.state!==z.Established){this.logger.error(`BYE received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onBye){const r=new nw(t);this.delegate.onBye(r)}else t.accept();this.stateTransition(z.Terminated)}onInfoRequest(t){if(this.logger.log("Session.onInfoRequest"),this.state!==z.Established){this.logger.error(`INFO received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onInfo){const r=new iw(t);this.delegate.onInfo(r)}else t.accept()}onInviteRequest(t){if(this.logger.log("Session.onInviteRequest"),this.state!==z.Established){this.logger.error(`INVITE received while in state ${this.state}, dropping request`);return}this.pendingReinviteAck=!0;const r=["Contact: "+this._contact];if(t.message.hasHeader("P-Asserted-Identity")){const s=t.message.getHeader("P-Asserted-Identity");if(!s)throw new Error("Header undefined.");this._assertedIdentity=Ct.nameAddrHeaderParse(s)}const n={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptionsReInvite,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiersReInvite};this.generateResponseOfferAnswerInDialog(n).then(s=>{const i=t.accept({statusCode:200,extraHeaders:r,body:s});this.delegate&&this.delegate.onInvite&&this.delegate.onInvite(t.message,i.message,200)}).catch(s=>{if(this.logger.error(s.message),this.logger.error("Failed to handle to re-INVITE request"),!this.dialog)throw new Error("Dialog undefined.");if(this.logger.error(this.dialog.signalingState),this.dialog.signalingState===ve.Stable){const i=t.reject({statusCode:488});this.delegate&&this.delegate.onInvite&&this.delegate.onInvite(t.message,i.message,488);return}this.rollbackOffer().then(()=>{const i=t.reject({statusCode:488});this.delegate&&this.delegate.onInvite&&this.delegate.onInvite(t.message,i.message,488)}).catch(i=>{this.logger.error(i.message),this.logger.error("Failed to rollback offer on re-INVITE request");const o=t.reject({statusCode:488});if(this.state!==z.Terminated){if(!this.dialog)throw new Error("Dialog undefined.");const a=[];a.push("Reason: "+this.getReasonHeaderValue(500,"Internal Server Error")),this.dialog.bye(void 0,{extraHeaders:a}),this.stateTransition(z.Terminated)}this.delegate&&this.delegate.onInvite&&this.delegate.onInvite(t.message,o.message,488)})})}onMessageRequest(t){if(this.logger.log("Session.onMessageRequest"),this.state!==z.Established){this.logger.error(`MESSAGE received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onMessage){const r=new hp(t);this.delegate.onMessage(r)}else t.accept()}onNotifyRequest(t){if(this.logger.log("Session.onNotifyRequest"),this.state!==z.Established){this.logger.error(`NOTIFY received while in state ${this.state}, dropping request`);return}if(this.onNotify){const r=new Kl(t);this.onNotify(r);return}if(this.delegate&&this.delegate.onNotify){const r=new Kl(t);this.delegate.onNotify(r)}else t.accept()}onPrackRequest(t){if(this.logger.log("Session.onPrackRequest"),this.state!==z.Established){this.logger.error(`PRACK received while in state ${this.state}, dropping request`);return}throw new Error("Unimplemented.")}onReferRequest(t){if(this.logger.log("Session.onReferRequest"),this.state!==z.Established){this.logger.error(`REFER received while in state ${this.state}, dropping request`);return}if(!t.message.hasHeader("refer-to")){this.logger.warn("Invalid REFER packet. A refer-to header is required. Rejecting."),t.reject();return}const r=new uw(t,this);this.delegate&&this.delegate.onRefer?this.delegate.onRefer(r):(this.logger.log("No delegate available to handle REFER, automatically accepting and following."),r.accept().then(()=>r.makeInviter(this._referralInviterOptions).invite()).catch(n=>{this.logger.error(n.message)}))}generateResponseOfferAnswer(t,r){if(this.dialog)return this.generateResponseOfferAnswerInDialog(r);const n=Di(t.message);return!n||n.contentDisposition!=="session"?this.getOffer(r):this.setOfferAndGetAnswer(n,r)}generateResponseOfferAnswerInDialog(t){if(!this.dialog)throw new Error("Dialog undefined.");switch(this.dialog.signalingState){case ve.Initial:return this.getOffer(t);case ve.HaveLocalOffer:return Promise.resolve(void 0);case ve.HaveRemoteOffer:if(!this.dialog.offer)throw new Error(`Session offer undefined in signaling state ${this.dialog.signalingState}.`);return this.setOfferAndGetAnswer(this.dialog.offer,t);case ve.Stable:return this.state!==z.Established?Promise.resolve(void 0):this.getOffer(t);case ve.Closed:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);default:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`)}}getOffer(t){const r=this.setupSessionDescriptionHandler(),n=t.sessionDescriptionHandlerOptions,s=t.sessionDescriptionHandlerModifiers;try{return r.getDescription(n,s).then(i=>Ko(i)).catch(i=>{this.logger.error("Session.getOffer: SDH getDescription rejected...");const o=i instanceof Error?i:new Error("Session.getOffer unknown error.");throw this.logger.error(o.message),o})}catch(i){this.logger.error("Session.getOffer: SDH getDescription threw...");const o=i instanceof Error?i:new Error(i);return this.logger.error(o.message),Promise.reject(o)}}rollbackOffer(){const t=this.setupSessionDescriptionHandler();if(t.rollbackDescription===void 0)return Promise.resolve();try{return t.rollbackDescription().catch(r=>{this.logger.error("Session.rollbackOffer: SDH rollbackDescription rejected...");const n=r instanceof Error?r:new Error("Session.rollbackOffer unknown error.");throw this.logger.error(n.message),n})}catch(r){this.logger.error("Session.rollbackOffer: SDH rollbackDescription threw...");const n=r instanceof Error?r:new Error(r);return this.logger.error(n.message),Promise.reject(n)}}setAnswer(t,r){const n=this.setupSessionDescriptionHandler(),s=r.sessionDescriptionHandlerOptions,i=r.sessionDescriptionHandlerModifiers;try{if(!n.hasDescription(t.contentType))return Promise.reject(new Ll)}catch(o){this.logger.error("Session.setAnswer: SDH hasDescription threw...");const a=o instanceof Error?o:new Error(o);return this.logger.error(a.message),Promise.reject(a)}try{return n.setDescription(t.content,s,i).catch(o=>{this.logger.error("Session.setAnswer: SDH setDescription rejected...");const a=o instanceof Error?o:new Error("Session.setAnswer unknown error.");throw this.logger.error(a.message),a})}catch(o){this.logger.error("Session.setAnswer: SDH setDescription threw...");const a=o instanceof Error?o:new Error(o);return this.logger.error(a.message),Promise.reject(a)}}setOfferAndGetAnswer(t,r){const n=this.setupSessionDescriptionHandler(),s=r.sessionDescriptionHandlerOptions,i=r.sessionDescriptionHandlerModifiers;try{if(!n.hasDescription(t.contentType))return Promise.reject(new Ll)}catch(o){this.logger.error("Session.setOfferAndGetAnswer: SDH hasDescription threw...");const a=o instanceof Error?o:new Error(o);return this.logger.error(a.message),Promise.reject(a)}try{return n.setDescription(t.content,s,i).then(()=>n.getDescription(s,i)).then(o=>Ko(o)).catch(o=>{this.logger.error("Session.setOfferAndGetAnswer: SDH setDescription or getDescription rejected...");const a=o instanceof Error?o:new Error("Session.setOfferAndGetAnswer unknown error.");throw this.logger.error(a.message),a})}catch(o){this.logger.error("Session.setOfferAndGetAnswer: SDH setDescription or getDescription threw...");const a=o instanceof Error?o:new Error(o);return this.logger.error(a.message),Promise.reject(a)}}setSessionDescriptionHandler(t){if(this._sessionDescriptionHandler)throw new Error("Session description handler defined.");this._sessionDescriptionHandler=t}setupSessionDescriptionHandler(){var t;return this._sessionDescriptionHandler?this._sessionDescriptionHandler:(this._sessionDescriptionHandler=this.sessionDescriptionHandlerFactory(this,this.userAgent.configuration.sessionDescriptionHandlerFactoryOptions),!((t=this.delegate)===null||t===void 0)&&t.onSessionDescriptionHandler&&this.delegate.onSessionDescriptionHandler(this._sessionDescriptionHandler,!1),this._sessionDescriptionHandler)}stateTransition(t){const r=()=>{throw new Error(`Invalid state transition from ${this._state} to ${t}`)};switch(this._state){case z.Initial:t!==z.Establishing&&t!==z.Established&&t!==z.Terminating&&t!==z.Terminated&&r();break;case z.Establishing:t!==z.Established&&t!==z.Terminating&&t!==z.Terminated&&r();break;case z.Established:t!==z.Terminating&&t!==z.Terminated&&r();break;case z.Terminating:t!==z.Terminated&&r();break;case z.Terminated:r();break;default:throw new Error("Unrecognized state.")}this._state=t,this.logger.log(`Session ${this.id} transitioned to state ${this._state}`),this._stateEventEmitter.emit(this._state),t===z.Terminated&&this.dispose()}copyRequestOptions(t={}){return{extraHeaders:t.extraHeaders?t.extraHeaders.slice():void 0,body:t.body?{contentDisposition:t.body.contentDisposition||"render",contentType:t.body.contentType||"text/plain",content:t.body.content||""}:void 0}}getReasonHeaderValue(t,r){const n=t;let s=Uo(t);return!s&&r&&(s=r),"SIP;cause="+n+';text="'+s+'"'}referExtraHeaders(t){const r=[];return r.push("Referred-By: <"+this.userAgent.configuration.uri+">"),r.push("Contact: "+this._contact),r.push("Allow: "+["ACK","CANCEL","INVITE","MESSAGE","BYE","OPTIONS","INFO","NOTIFY","REFER"].toString()),r.push("Refer-To: "+t),r}referToString(t){let r;if(t instanceof In)r=t.toString();else{if(!t.dialog)throw new Error("Dialog undefined.");const n=t.remoteIdentity.friendlyName,s=t.dialog.remoteTarget.toString(),i=t.dialog.callId,o=t.dialog.remoteTag,a=t.dialog.localTag;r=`"${n}" <${s}?Replaces=${encodeURIComponent(`${i};to-tag=${o};from-tag=${a}`)}>`}return r}},$r;(function(e){e.Required="Required",e.Supported="Supported",e.Unsupported="Unsupported"})($r=$r||($r={}));const dw={"100rel":!0,199:!0,answermode:!0,"early-session":!0,eventlist:!0,explicitsub:!0,"from-change":!0,"geolocation-http":!0,"geolocation-sip":!0,gin:!0,gruu:!0,histinfo:!0,ice:!0,join:!0,"multiple-refer":!0,norefersub:!0,nosub:!0,outbound:!0,path:!0,policy:!0,precondition:!0,pref:!0,privacy:!0,"recipient-list-invite":!0,"recipient-list-message":!0,"recipient-list-subscribe":!0,replaces:!0,"resource-priority":!0,"sdp-anat":!0,"sec-agree":!0,tdialog:!0,timer:!0,uui:!0};var Ls=class extends Wl{constructor(e,t){super(e),this.incomingInviteRequest=t,this.disposed=!1,this.expiresTimer=void 0,this.isCanceled=!1,this.rel100="none",this.rseq=Math.floor(Math.random()*1e4),this.userNoAnswerTimer=void 0,this.waitingForPrack=!1,this.logger=e.getLogger("sip.Invitation");const r=this.incomingInviteRequest.message,n=r.getHeader("require");n&&n.toLowerCase().includes("100rel")&&(this.rel100="required");const s=r.getHeader("supported");if(s&&s.toLowerCase().includes("100rel")&&(this.rel100="supported"),r.toTag=t.toTag,typeof r.toTag!="string")throw new TypeError("toTag should have been a string.");if(this.userNoAnswerTimer=setTimeout(()=>{t.reject({statusCode:480}),this.stateTransition(z.Terminated)},this.userAgent.configuration.noAnswerTimeout?this.userAgent.configuration.noAnswerTimeout*1e3:6e4),r.hasHeader("expires")){const a=Number(r.getHeader("expires")||0)*1e3;this.expiresTimer=setTimeout(()=>{this.state===z.Initial&&(t.reject({statusCode:487}),this.stateTransition(z.Terminated))},a)}const i=this.request.getHeader("P-Asserted-Identity");i&&(this._assertedIdentity=Ct.nameAddrHeaderParse(i)),this._contact=this.userAgent.contact.toString();const o=r.parseHeader("Content-Disposition");o&&o.type==="render"&&(this._renderbody=r.body,this._rendertype=r.getHeader("Content-Type")),this._id=r.callId+r.fromTag,this.userAgent._sessions[this._id]=this}dispose(){if(this.disposed)return Promise.resolve();switch(this.disposed=!0,this.expiresTimer&&(clearTimeout(this.expiresTimer),this.expiresTimer=void 0),this.userNoAnswerTimer&&(clearTimeout(this.userNoAnswerTimer),this.userNoAnswerTimer=void 0),this.prackNeverArrived(),this.state){case z.Initial:return this.reject().then(()=>super.dispose());case z.Establishing:return this.reject().then(()=>super.dispose());case z.Established:return super.dispose();case z.Terminating:return super.dispose();case z.Terminated:return super.dispose();default:throw new Error("Unknown state.")}}get autoSendAnInitialProvisionalResponse(){return this.rel100!=="required"&&this.userAgent.configuration.sendInitialProvisionalResponse}get body(){return this.incomingInviteRequest.message.body}get localIdentity(){return this.request.to}get remoteIdentity(){return this.request.from}get request(){return this.incomingInviteRequest.message}accept(e={}){if(this.logger.log("Invitation.accept"),this.state!==z.Initial){const t=new Error(`Invalid session state ${this.state}`);return this.logger.error(t.message),Promise.reject(t)}return e.sessionDescriptionHandlerModifiers&&(this.sessionDescriptionHandlerModifiers=e.sessionDescriptionHandlerModifiers),e.sessionDescriptionHandlerOptions&&(this.sessionDescriptionHandlerOptions=e.sessionDescriptionHandlerOptions),this.stateTransition(z.Establishing),this.sendAccept(e).then(({message:t,session:r})=>{r.delegate={onAck:n=>this.onAckRequest(n),onAckTimeout:()=>this.onAckTimeout(),onBye:n=>this.onByeRequest(n),onInfo:n=>this.onInfoRequest(n),onInvite:n=>this.onInviteRequest(n),onMessage:n=>this.onMessageRequest(n),onNotify:n=>this.onNotifyRequest(n),onPrack:n=>this.onPrackRequest(n),onRefer:n=>this.onReferRequest(n)},this._dialog=r,this.stateTransition(z.Established),this._replacee&&this._replacee._bye()}).catch(t=>this.handleResponseError(t))}progress(e={}){if(this.logger.log("Invitation.progress"),this.state!==z.Initial){const r=new Error(`Invalid session state ${this.state}`);return this.logger.error(r.message),Promise.reject(r)}const t=e.statusCode||180;if(t<100||t>199)throw new TypeError("Invalid statusCode: "+t);return e.sessionDescriptionHandlerModifiers&&(this.sessionDescriptionHandlerModifiers=e.sessionDescriptionHandlerModifiers),e.sessionDescriptionHandlerOptions&&(this.sessionDescriptionHandlerOptions=e.sessionDescriptionHandlerOptions),this.waitingForPrack?(this.logger.warn("Unexpected call for progress while waiting for prack, ignoring"),Promise.resolve()):e.statusCode===100?this.sendProgressTrying().then(()=>{}).catch(r=>this.handleResponseError(r)):this.rel100!=="required"&&!(this.rel100==="supported"&&e.rel100)&&!(this.rel100==="supported"&&this.userAgent.configuration.sipExtension100rel===$r.Required)?this.sendProgress(e).then(()=>{}).catch(r=>this.handleResponseError(r)):this.sendProgressReliableWaitForPrack(e).then(()=>{}).catch(r=>this.handleResponseError(r))}reject(e={}){if(this.logger.log("Invitation.reject"),this.state!==z.Initial&&this.state!==z.Establishing){const i=new Error(`Invalid session state ${this.state}`);return this.logger.error(i.message),Promise.reject(i)}const t=e.statusCode||480,r=e.reasonPhrase?e.reasonPhrase:Uo(t),n=e.extraHeaders||[];if(t<300||t>699)throw new TypeError("Invalid statusCode: "+t);const s=e.body?Ko(e.body):void 0;return t<400?this.incomingInviteRequest.redirect([],{statusCode:t,reasonPhrase:r,extraHeaders:n,body:s}):this.incomingInviteRequest.reject({statusCode:t,reasonPhrase:r,extraHeaders:n,body:s}),this.stateTransition(z.Terminated),Promise.resolve()}_onCancel(e){if(this.logger.log("Invitation._onCancel"),this.state!==z.Initial&&this.state!==z.Establishing){this.logger.error(`CANCEL received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onCancel){const t=new sw(e);this.delegate.onCancel(t)}this.isCanceled=!0,this.incomingInviteRequest.reject({statusCode:487}),this.stateTransition(z.Terminated)}handlePrackOfferAnswer(e){if(!this.dialog)throw new Error("Dialog undefined.");const t=Di(e.message);if(!t||t.contentDisposition!=="session")return Promise.resolve(void 0);const r={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers};switch(this.dialog.signalingState){case ve.Initial:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);case ve.Stable:return this.setAnswer(t,r).then(()=>{});case ve.HaveLocalOffer:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);case ve.HaveRemoteOffer:return this.setOfferAndGetAnswer(t,r);case ve.Closed:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);default:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`)}}handleResponseError(e){let t=480;if(e instanceof Error?this.logger.error(e.message):this.logger.error(e),e instanceof Ll?(this.logger.error("A session description handler occurred while sending response (content type unsupported"),t=415):e instanceof tw?this.logger.error("A session description handler occurred while sending response"):e instanceof Vl?this.logger.error("Session ended before response could be formulated and sent (while waiting for PRACK)"):e instanceof $n&&this.logger.error("Session changed state before response could be formulated and sent"),this.state===z.Initial||this.state===z.Establishing)try{this.incomingInviteRequest.reject({statusCode:t}),this.stateTransition(z.Terminated)}catch(r){throw this.logger.error("An error occurred attempting to reject the request while handling another error"),r}if(this.isCanceled){this.logger.warn("An error occurred while attempting to formulate and send a response to an incoming INVITE. However a CANCEL was received and processed while doing so which can (and often does) result in errors occurring as the session terminates in the meantime. Said error is being ignored.");return}throw e}onAckTimeout(){if(this.logger.log("Invitation.onAckTimeout"),!this.dialog)throw new Error("Dialog undefined.");this.logger.log("No ACK received for an extended period of time, terminating session"),this.dialog.bye(),this.stateTransition(z.Terminated)}sendAccept(e={}){const t={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers},r=e.extraHeaders||[];return this.waitingForPrack?this.waitForArrivalOfPrack().then(()=>clearTimeout(this.userNoAnswerTimer)).then(()=>this.generateResponseOfferAnswer(this.incomingInviteRequest,t)).then(n=>this.incomingInviteRequest.accept({statusCode:200,body:n,extraHeaders:r})):(clearTimeout(this.userNoAnswerTimer),this.generateResponseOfferAnswer(this.incomingInviteRequest,t).then(n=>this.incomingInviteRequest.accept({statusCode:200,body:n,extraHeaders:r})))}sendProgress(e={}){const t=e.statusCode||180,r=e.reasonPhrase,n=(e.extraHeaders||[]).slice(),s=e.body?Ko(e.body):void 0;if(t===183&&!s)return this.sendProgressWithSDP(e);try{const i=this.incomingInviteRequest.progress({statusCode:t,reasonPhrase:r,extraHeaders:n,body:s});return this._dialog=i.session,Promise.resolve(i)}catch(i){return Promise.reject(i)}}sendProgressWithSDP(e={}){const t={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers},r=e.statusCode||183,n=e.reasonPhrase,s=(e.extraHeaders||[]).slice();return this.generateResponseOfferAnswer(this.incomingInviteRequest,t).then(i=>this.incomingInviteRequest.progress({statusCode:r,reasonPhrase:n,extraHeaders:s,body:i})).then(i=>(this._dialog=i.session,i))}sendProgressReliable(e={}){return e.extraHeaders=(e.extraHeaders||[]).slice(),e.extraHeaders.push("Require: 100rel"),e.extraHeaders.push("RSeq: "+Math.floor(Math.random()*1e4)),this.sendProgressWithSDP(e)}sendProgressReliableWaitForPrack(e={}){const t={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers},r=e.statusCode||183,n=e.reasonPhrase,s=(e.extraHeaders||[]).slice();s.push("Require: 100rel"),s.push("RSeq: "+this.rseq++);let i;return new Promise((o,a)=>{this.waitingForPrack=!0,this.generateResponseOfferAnswer(this.incomingInviteRequest,t).then(l=>(i=l,this.incomingInviteRequest.progress({statusCode:r,reasonPhrase:n,extraHeaders:s,body:i}))).then(l=>{this._dialog=l.session;let u,c;l.session.delegate={onPrack:x=>{u=x,clearTimeout(p),clearTimeout(w),this.waitingForPrack&&(this.waitingForPrack=!1,this.handlePrackOfferAnswer(u).then(v=>{try{c=u.accept({statusCode:200,body:v}),this.prackArrived(),o({prackRequest:u,prackResponse:c,progressResponse:l})}catch(S){a(S)}}).catch(v=>a(v)))}};const p=setTimeout(()=>{this.waitingForPrack&&(this.waitingForPrack=!1,this.logger.warn("No PRACK received, rejecting INVITE."),clearTimeout(w),this.reject({statusCode:504}).then(()=>a(new Vl)).catch(x=>a(x)))},At.T1*64),h=()=>{try{this.incomingInviteRequest.progress({statusCode:r,reasonPhrase:n,extraHeaders:s,body:i})}catch(x){this.waitingForPrack=!1,a(x);return}w=setTimeout(h,m*=2)};let m=At.T1,w=setTimeout(h,m)}).catch(l=>{this.waitingForPrack=!1,a(l)})})}sendProgressTrying(){try{const e=this.incomingInviteRequest.trying();return Promise.resolve(e)}catch(e){return Promise.reject(e)}}waitForArrivalOfPrack(){if(this.waitingForPrackPromise)throw new Error("Already waiting for PRACK");return this.waitingForPrackPromise=new Promise((e,t)=>{this.waitingForPrackResolve=e,this.waitingForPrackReject=t}),this.waitingForPrackPromise}prackArrived(){this.waitingForPrackResolve&&this.waitingForPrackResolve(),this.waitingForPrackPromise=void 0,this.waitingForPrackResolve=void 0,this.waitingForPrackReject=void 0}prackNeverArrived(){this.waitingForPrackReject&&this.waitingForPrackReject(new Vl),this.waitingForPrackPromise=void 0,this.waitingForPrackResolve=void 0,this.waitingForPrackReject=void 0}},Wo=class extends Wl{constructor(e,t,r={}){super(e,r),this.disposed=!1,this.earlyMedia=!1,this.earlyMediaSessionDescriptionHandlers=new Map,this.isCanceled=!1,this.inviteWithoutSdp=!1,this.logger=e.getLogger("sip.Inviter"),this.earlyMedia=r.earlyMedia!==void 0?r.earlyMedia:this.earlyMedia,this.fromTag=zo(),this.inviteWithoutSdp=r.inviteWithoutSdp!==void 0?r.inviteWithoutSdp:this.inviteWithoutSdp;const n=Object.assign({},r);n.params=Object.assign({},r.params);const s=r.anonymous||!1,i=e.contact.toString({anonymous:s,outbound:s?!e.contact.tempGruu:!e.contact.pubGruu});s&&e.configuration.uri&&(n.params.fromDisplayName="Anonymous",n.params.fromUri="sip:anonymous@anonymous.invalid");let o=e.userAgentCore.configuration.aor;if(n.params.fromUri&&(o=typeof n.params.fromUri=="string"?Ct.URIParse(n.params.fromUri):n.params.fromUri),!o)throw new TypeError("Invalid from URI: "+n.params.fromUri);let a=t;if(n.params.toUri&&(a=typeof n.params.toUri=="string"?Ct.URIParse(n.params.toUri):n.params.toUri),!a)throw new TypeError("Invalid to URI: "+n.params.toUri);const l=Object.assign({},n.params);l.fromTag=this.fromTag;const u=(n.extraHeaders||[]).slice();s&&e.configuration.uri&&(u.push("P-Preferred-Identity: "+e.configuration.uri.toString()),u.push("Privacy: id")),u.push("Contact: "+i),u.push("Allow: "+["ACK","CANCEL","INVITE","MESSAGE","BYE","OPTIONS","INFO","NOTIFY","REFER"].toString()),e.configuration.sipExtension100rel===$r.Required&&u.push("Require: 100rel"),e.configuration.sipExtensionReplaces===$r.Required&&u.push("Require: replaces"),n.extraHeaders=u,this.outgoingRequestMessage=e.userAgentCore.makeOutgoingRequestMessage(be.INVITE,t,o,a,l,u,void 0),this._contact=i,this._referralInviterOptions=n,this._renderbody=r.renderbody,this._rendertype=r.rendertype,r.sessionDescriptionHandlerModifiers&&(this.sessionDescriptionHandlerModifiers=r.sessionDescriptionHandlerModifiers),r.sessionDescriptionHandlerOptions&&(this.sessionDescriptionHandlerOptions=r.sessionDescriptionHandlerOptions),r.sessionDescriptionHandlerModifiersReInvite&&(this.sessionDescriptionHandlerModifiersReInvite=r.sessionDescriptionHandlerModifiersReInvite),r.sessionDescriptionHandlerOptionsReInvite&&(this.sessionDescriptionHandlerOptionsReInvite=r.sessionDescriptionHandlerOptionsReInvite),this._id=this.outgoingRequestMessage.callId+this.fromTag,this.userAgent._sessions[this._id]=this}dispose(){if(this.disposed)return Promise.resolve();switch(this.disposed=!0,this.disposeEarlyMedia(),this.state){case z.Initial:return this.cancel().then(()=>super.dispose());case z.Establishing:return this.cancel().then(()=>super.dispose());case z.Established:return super.dispose();case z.Terminating:return super.dispose();case z.Terminated:return super.dispose();default:throw new Error("Unknown state.")}}get body(){return this.outgoingRequestMessage.body}get localIdentity(){return this.outgoingRequestMessage.from}get remoteIdentity(){return this.outgoingRequestMessage.to}get request(){return this.outgoingRequestMessage}cancel(e={}){if(this.logger.log("Inviter.cancel"),this.state!==z.Initial&&this.state!==z.Establishing){const r=new Error(`Invalid session state ${this.state}`);return this.logger.error(r.message),Promise.reject(r)}this.isCanceled=!0,this.stateTransition(z.Terminating);function t(r,n){if(r&&r<200||r>699)throw new TypeError("Invalid statusCode: "+r);if(r){const s=r,i=Uo(r)||n;return"SIP;cause="+s+';text="'+i+'"'}}if(this.outgoingInviteRequest){let r;e.statusCode&&e.reasonPhrase&&(r=t(e.statusCode,e.reasonPhrase)),this.outgoingInviteRequest.cancel(r,e)}else this.logger.warn("Canceled session before INVITE was sent"),this.stateTransition(z.Terminated);return Promise.resolve()}invite(e={}){if(this.logger.log("Inviter.invite"),this.state!==z.Initial)return super.invite(e);if(e.sessionDescriptionHandlerModifiers&&(this.sessionDescriptionHandlerModifiers=e.sessionDescriptionHandlerModifiers),e.sessionDescriptionHandlerOptions&&(this.sessionDescriptionHandlerOptions=e.sessionDescriptionHandlerOptions),e.withoutSdp||this.inviteWithoutSdp)return this._renderbody&&this._rendertype&&(this.outgoingRequestMessage.body={contentType:this._rendertype,body:this._renderbody}),this.stateTransition(z.Establishing),Promise.resolve(this.sendInvite(e));const t={sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers,sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions};return this.getOffer(t).then(r=>(this.outgoingRequestMessage.body={body:r.content,contentType:r.contentType},this.stateTransition(z.Establishing),this.sendInvite(e))).catch(r=>{throw this.logger.log(r.message),this.state!==z.Terminated&&this.stateTransition(z.Terminated),r})}sendInvite(e={}){return this.outgoingInviteRequest=this.userAgent.userAgentCore.invite(this.outgoingRequestMessage,{onAccept:t=>{if(this.dialog){this.logger.log("Additional confirmed dialog, sending ACK and BYE"),this.ackAndBye(t);return}if(this.isCanceled){this.logger.log("Canceled session accepted, sending ACK and BYE"),this.ackAndBye(t),this.stateTransition(z.Terminated);return}this.notifyReferer(t),this.onAccept(t).then(()=>{this.disposeEarlyMedia()}).catch(()=>{this.disposeEarlyMedia()}).then(()=>{e.requestDelegate&&e.requestDelegate.onAccept&&e.requestDelegate.onAccept(t)})},onProgress:t=>{this.isCanceled||(this.notifyReferer(t),this.onProgress(t).catch(()=>{this.disposeEarlyMedia()}).then(()=>{e.requestDelegate&&e.requestDelegate.onProgress&&e.requestDelegate.onProgress(t)}))},onRedirect:t=>{this.notifyReferer(t),this.onRedirect(t),e.requestDelegate&&e.requestDelegate.onRedirect&&e.requestDelegate.onRedirect(t)},onReject:t=>{this.notifyReferer(t),this.onReject(t),e.requestDelegate&&e.requestDelegate.onReject&&e.requestDelegate.onReject(t)},onTrying:t=>{this.notifyReferer(t),this.onTrying(t),e.requestDelegate&&e.requestDelegate.onTrying&&e.requestDelegate.onTrying(t)}}),this.outgoingInviteRequest}disposeEarlyMedia(){this.earlyMediaSessionDescriptionHandlers.forEach(e=>{e.close()}),this.earlyMediaSessionDescriptionHandlers.clear()}notifyReferer(e){if(!this._referred)return;if(!(this._referred instanceof Wl))throw new Error("Referred session not instance of session");if(!this._referred.dialog)return;if(!e.message.statusCode)throw new Error("Status code undefined.");if(!e.message.reasonPhrase)throw new Error("Reason phrase undefined.");const t=`SIP/2.0 ${e.message.statusCode} ${e.message.reasonPhrase}`.trim(),r=this._referred.dialog.notify(void 0,{extraHeaders:["Event: refer","Subscription-State: terminated"],body:{contentDisposition:"render",contentType:"message/sipfrag",content:t}});r.delegate={onReject:()=>{this._referred=void 0}}}onAccept(e){if(this.logger.log("Inviter.onAccept"),this.state!==z.Establishing)return this.logger.error(`Accept received while in state ${this.state}, dropping response`),Promise.reject(new Error(`Invalid session state ${this.state}`));const t=e.message,r=e.session;switch(t.hasHeader("P-Asserted-Identity")&&(this._assertedIdentity=Ct.nameAddrHeaderParse(t.getHeader("P-Asserted-Identity"))),r.delegate={onAck:n=>this.onAckRequest(n),onBye:n=>this.onByeRequest(n),onInfo:n=>this.onInfoRequest(n),onInvite:n=>this.onInviteRequest(n),onMessage:n=>this.onMessageRequest(n),onNotify:n=>this.onNotifyRequest(n),onPrack:n=>this.onPrackRequest(n),onRefer:n=>this.onReferRequest(n)},this._dialog=r,r.signalingState){case ve.Initial:return this.logger.error("Received 2xx response to INVITE without a session description"),this.ackAndBye(e,400,"Missing session description"),this.stateTransition(z.Terminated),Promise.reject(new Error("Bad Media Description"));case ve.HaveLocalOffer:return this.logger.error("Received 2xx response to INVITE without a session description"),this.ackAndBye(e,400,"Missing session description"),this.stateTransition(z.Terminated),Promise.reject(new Error("Bad Media Description"));case ve.HaveRemoteOffer:{if(!this._dialog.offer)throw new Error(`Session offer undefined in signaling state ${this._dialog.signalingState}.`);const n={sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers,sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions};return this.setOfferAndGetAnswer(this._dialog.offer,n).then(s=>{e.ack({body:s}),this.stateTransition(z.Established)}).catch(s=>{throw this.ackAndBye(e,488,"Invalid session description"),this.stateTransition(z.Terminated),s})}case ve.Stable:{if(this.earlyMediaSessionDescriptionHandlers.size>0){const i=this.earlyMediaSessionDescriptionHandlers.get(r.id);if(!i)throw new Error("Session description handler undefined.");return this.setSessionDescriptionHandler(i),this.earlyMediaSessionDescriptionHandlers.delete(r.id),e.ack(),this.stateTransition(z.Established),Promise.resolve()}if(this.earlyMediaDialog){if(this.earlyMediaDialog!==r){this.earlyMedia&&this.logger.error("You have set the 'earlyMedia' option to 'true' which requires that your INVITE requests do not fork and yet this INVITE request did in fact fork. Consequentially and not surprisingly the end point which accepted the INVITE (confirmed dialog) does not match the end point with which early media has been setup (early dialog) and thus this session is unable to proceed. In accordance with the SIP specifications, the SIP servers your end point is connected to determine if an INVITE forks and the forking behavior of those servers cannot be controlled by this library. If you wish to use early media with this library you must configure those servers accordingly. Alternatively you may set the 'earlyMedia' to 'false' which will allow this library to function with any INVITE requests which do fork.");const i=new Error("Early media dialog does not equal confirmed dialog, terminating session");return this.logger.error(i.message),this.ackAndBye(e,488,"Not Acceptable Here"),this.stateTransition(z.Terminated),Promise.reject(i)}return e.ack(),this.stateTransition(z.Established),Promise.resolve()}const n=r.answer;if(!n)throw new Error("Answer is undefined.");const s={sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers,sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions};return this.setAnswer(n,s).then(()=>{let i;this._renderbody&&this._rendertype&&(i={body:{contentDisposition:"render",contentType:this._rendertype,content:this._renderbody}}),e.ack(i),this.stateTransition(z.Established)}).catch(i=>{throw this.logger.error(i.message),this.ackAndBye(e,488,"Not Acceptable Here"),this.stateTransition(z.Terminated),i})}case ve.Closed:return Promise.reject(new Error("Terminated."));default:throw new Error("Unknown session signaling state.")}}onProgress(e){var t;if(this.logger.log("Inviter.onProgress"),this.state!==z.Establishing)return this.logger.error(`Progress received while in state ${this.state}, dropping response`),Promise.reject(new Error(`Invalid session state ${this.state}`));if(!this.outgoingInviteRequest)throw new Error("Outgoing INVITE request undefined.");const r=e.message,n=e.session;r.hasHeader("P-Asserted-Identity")&&(this._assertedIdentity=Ct.nameAddrHeaderParse(r.getHeader("P-Asserted-Identity")));const s=r.getHeader("require"),i=r.getHeader("rseq"),o=!!(s&&s.includes("100rel")&&i&&Number(i)),a=[];switch(o&&a.push("RAck: "+r.getHeader("rseq")+" "+r.getHeader("cseq")),n.signalingState){case ve.Initial:return o&&(this.logger.warn("First reliable provisional response received MUST contain an offer when INVITE does not contain an offer."),e.prack({extraHeaders:a})),Promise.resolve();case ve.HaveLocalOffer:return o&&e.prack({extraHeaders:a}),Promise.resolve();case ve.HaveRemoteOffer:if(!o)return this.logger.warn("Non-reliable provisional response MUST NOT contain an initial offer, discarding response."),Promise.resolve();{const l=this.sessionDescriptionHandlerFactory(this,this.userAgent.configuration.sessionDescriptionHandlerFactoryOptions||{});return!((t=this.delegate)===null||t===void 0)&&t.onSessionDescriptionHandler&&this.delegate.onSessionDescriptionHandler(l,!0),this.earlyMediaSessionDescriptionHandlers.set(n.id,l),l.setDescription(r.body,this.sessionDescriptionHandlerOptions,this.sessionDescriptionHandlerModifiers).then(()=>l.getDescription(this.sessionDescriptionHandlerOptions,this.sessionDescriptionHandlerModifiers)).then(u=>{const c={contentDisposition:"session",contentType:u.contentType,content:u.body};e.prack({extraHeaders:a,body:c})}).catch(u=>{throw this.stateTransition(z.Terminated),u})}case ve.Stable:if(o&&e.prack({extraHeaders:a}),this.earlyMedia&&!this.earlyMediaDialog){this.earlyMediaDialog=n;const l=n.answer;if(!l)throw new Error("Answer is undefined.");const u={sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers,sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions};return this.setAnswer(l,u).catch(c=>{throw this.stateTransition(z.Terminated),c})}return Promise.resolve();case ve.Closed:return Promise.reject(new Error("Terminated."));default:throw new Error("Unknown session signaling state.")}}onRedirect(e){if(this.logger.log("Inviter.onRedirect"),this.state!==z.Establishing&&this.state!==z.Terminating){this.logger.error(`Redirect received while in state ${this.state}, dropping response`);return}this.stateTransition(z.Terminated)}onReject(e){if(this.logger.log("Inviter.onReject"),this.state!==z.Establishing&&this.state!==z.Terminating){this.logger.error(`Reject received while in state ${this.state}, dropping response`);return}this.stateTransition(z.Terminated)}onTrying(e){if(this.logger.log("Inviter.onTrying"),this.state!==z.Establishing){this.logger.error(`Trying received while in state ${this.state}, dropping response`);return}}},nt;(function(e){e.Initial="Initial",e.Registered="Registered",e.Unregistered="Unregistered",e.Terminated="Terminated"})(nt=nt||(nt={}));var Go=class ms{constructor(t,r={}){this.disposed=!1,this._contacts=[],this._retryAfter=void 0,this._state=nt.Initial,this._waiting=!1,this._stateEventEmitter=new qs,this._waitingEventEmitter=new qs,this.userAgent=t;const n=t.configuration.uri.clone();if(n.user=void 0,this.options=Object.assign(Object.assign(Object.assign({},ms.defaultOptions()),{registrar:n}),ms.stripUndefinedProperties(r)),this.options.extraContactHeaderParams=(this.options.extraContactHeaderParams||[]).slice(),this.options.extraHeaders=(this.options.extraHeaders||[]).slice(),!this.options.registrar)throw new Error("Registrar undefined.");if(this.options.registrar=this.options.registrar.clone(),this.options.regId&&!this.options.instanceId?this.options.instanceId=this.userAgent.instanceId:!this.options.regId&&this.options.instanceId&&(this.options.regId=1),this.options.instanceId&&Ct.parse(this.options.instanceId,"uuid")===-1)throw new Error("Invalid instanceId.");if(this.options.regId&&this.options.regId<0)throw new Error("Invalid regId.");const s=this.options.registrar,i=this.options.params&&this.options.params.fromUri||t.userAgentCore.configuration.aor,o=this.options.params&&this.options.params.toUri||t.configuration.uri,a=this.options.params||{},l=(r.extraHeaders||[]).slice();if(this.request=t.userAgentCore.makeOutgoingRequestMessage(be.REGISTER,s,i,o,a,l,void 0),this.expires=this.options.expires||ms.defaultExpires,this.expires<0)throw new Error("Invalid expires.");if(this.refreshFrequency=this.options.refreshFrequency||ms.defaultRefreshFrequency,this.refreshFrequency<50||this.refreshFrequency>99)throw new Error("Invalid refresh frequency. The value represents a percentage of the expiration time and should be between 50 and 99.");this.logger=t.getLogger("sip.Registerer"),this.options.logConfiguration&&(this.logger.log("Configuration:"),Object.keys(this.options).forEach(u=>{const c=this.options[u];u==="registrar"?this.logger.log("· "+u+": "+c):this.logger.log("· "+u+": "+JSON.stringify(c))})),this.id=this.request.callId+this.request.from.parameters.tag,this.userAgent._registerers[this.id]=this}static defaultOptions(){return{expires:ms.defaultExpires,extraContactHeaderParams:[],extraHeaders:[],logConfiguration:!0,instanceId:"",params:{},regId:0,registrar:new In("sip","anonymous","anonymous.invalid"),refreshFrequency:ms.defaultRefreshFrequency}}static stripUndefinedProperties(t){return Object.keys(t).reduce((r,n)=>(t[n]!==void 0&&(r[n]=t[n]),r),{})}get contacts(){return this._contacts.slice()}get retryAfter(){return this._retryAfter}get state(){return this._state}get stateChange(){return this._stateEventEmitter}dispose(){return this.disposed?Promise.resolve():(this.disposed=!0,this.logger.log(`Registerer ${this.id} in state ${this.state} is being disposed`),delete this.userAgent._registerers[this.id],new Promise(t=>{const r=()=>{if(!this.waiting&&this._state===nt.Registered){this.stateChange.addListener(()=>{this.terminated(),t()},{once:!0}),this.unregister();return}this.terminated(),t()};this.waiting?this.waitingChange.addListener(()=>{r()},{once:!0}):r()}))}register(t={}){if(this.state===nt.Terminated)throw this.stateError(),new Error("Registerer terminated. Unable to register.");if(this.disposed)throw this.stateError(),new Error("Registerer disposed. Unable to register.");if(this.waiting){this.waitingWarning();const s=new Fl("REGISTER request already in progress, waiting for final response");return Promise.reject(s)}t.requestOptions&&(this.options=Object.assign(Object.assign({},this.options),t.requestOptions));const r=(this.options.extraHeaders||[]).slice();r.push("Contact: "+this.generateContactHeader(this.expires)),r.push("Allow: "+["ACK","CANCEL","INVITE","MESSAGE","BYE","OPTIONS","INFO","NOTIFY","REFER"].toString()),this.request.cseq++,this.request.setHeader("cseq",this.request.cseq+" REGISTER"),this.request.extraHeaders=r,this.waitingToggle(!0);const n=this.userAgent.userAgentCore.register(this.request,{onAccept:s=>{let i;s.message.hasHeader("expires")&&(i=Number(s.message.getHeader("expires"))),this._contacts=s.message.getHeaders("contact");let o=this._contacts.length;if(!o){this.logger.error("No Contact header in response to REGISTER, dropping response."),this.unregistered();return}let a;for(;o--;){if(a=s.message.parseHeader("contact",o),!a)throw new Error("Contact undefined");if(this.userAgent.contact.pubGruu&&cp(a.uri,this.userAgent.contact.pubGruu)){i=Number(a.getParam("expires"));break}if(this.userAgent.configuration.contactName===""){if(a.uri.user===this.userAgent.contact.uri.user){i=Number(a.getParam("expires"));break}}else if(cp(a.uri,this.userAgent.contact.uri)){i=Number(a.getParam("expires"));break}a=void 0}if(a===void 0){this.logger.error("No Contact header pointing to us, dropping response"),this.unregistered(),this.waitingToggle(!1);return}if(i===void 0){this.logger.error("Contact pointing to us is missing expires parameter, dropping response"),this.unregistered(),this.waitingToggle(!1);return}if(a.hasParam("temp-gruu")){const l=a.getParam("temp-gruu");l&&(this.userAgent.contact.tempGruu=Ct.URIParse(l.replace(/"/g,"")))}if(a.hasParam("pub-gruu")){const l=a.getParam("pub-gruu");l&&(this.userAgent.contact.pubGruu=Ct.URIParse(l.replace(/"/g,"")))}this.registered(i),t.requestDelegate&&t.requestDelegate.onAccept&&t.requestDelegate.onAccept(s),this.waitingToggle(!1)},onProgress:s=>{t.requestDelegate&&t.requestDelegate.onProgress&&t.requestDelegate.onProgress(s)},onRedirect:s=>{this.logger.error("Redirect received. Not supported."),this.unregistered(),t.requestDelegate&&t.requestDelegate.onRedirect&&t.requestDelegate.onRedirect(s),this.waitingToggle(!1)},onReject:s=>{if(s.message.statusCode===423){if(!s.message.hasHeader("min-expires")){this.logger.error("423 response received for REGISTER without Min-Expires, dropping response"),this.unregistered(),this.waitingToggle(!1);return}this.expires=Number(s.message.getHeader("min-expires")),this.waitingToggle(!1),this.register();return}this.logger.warn(`Failed to register, status code ${s.message.statusCode}`);let i=NaN;if(s.message.statusCode===500||s.message.statusCode===503){const o=s.message.getHeader("retry-after");o&&(i=Number.parseInt(o,void 0))}this._retryAfter=isNaN(i)?void 0:i,this.unregistered(),t.requestDelegate&&t.requestDelegate.onReject&&t.requestDelegate.onReject(s),this._retryAfter=void 0,this.waitingToggle(!1)},onTrying:s=>{t.requestDelegate&&t.requestDelegate.onTrying&&t.requestDelegate.onTrying(s)}});return Promise.resolve(n)}unregister(t={}){if(this.state===nt.Terminated)throw this.stateError(),new Error("Registerer terminated. Unable to register.");if(this.disposed&&this.state!==nt.Registered)throw this.stateError(),new Error("Registerer disposed. Unable to register.");if(this.waiting){this.waitingWarning();const s=new Fl("REGISTER request already in progress, waiting for final response");return Promise.reject(s)}this._state!==nt.Registered&&!t.all&&this.logger.warn("Not currently registered, but sending an unregister anyway.");const r=(t.requestOptions&&t.requestOptions.extraHeaders||[]).slice();this.request.extraHeaders=r,t.all?(r.push("Contact: *"),r.push("Expires: 0")):r.push("Contact: "+this.generateContactHeader(0)),this.request.cseq++,this.request.setHeader("cseq",this.request.cseq+" REGISTER"),this.registrationTimer!==void 0&&(clearTimeout(this.registrationTimer),this.registrationTimer=void 0),this.waitingToggle(!0);const n=this.userAgent.userAgentCore.register(this.request,{onAccept:s=>{this._contacts=s.message.getHeaders("contact"),this.unregistered(),t.requestDelegate&&t.requestDelegate.onAccept&&t.requestDelegate.onAccept(s),this.waitingToggle(!1)},onProgress:s=>{t.requestDelegate&&t.requestDelegate.onProgress&&t.requestDelegate.onProgress(s)},onRedirect:s=>{this.logger.error("Unregister redirected. Not currently supported."),this.unregistered(),t.requestDelegate&&t.requestDelegate.onRedirect&&t.requestDelegate.onRedirect(s),this.waitingToggle(!1)},onReject:s=>{this.logger.error(`Unregister rejected with status code ${s.message.statusCode}`),this.unregistered(),t.requestDelegate&&t.requestDelegate.onReject&&t.requestDelegate.onReject(s),this.waitingToggle(!1)},onTrying:s=>{t.requestDelegate&&t.requestDelegate.onTrying&&t.requestDelegate.onTrying(s)}});return Promise.resolve(n)}clearTimers(){this.registrationTimer!==void 0&&(clearTimeout(this.registrationTimer),this.registrationTimer=void 0),this.registrationExpiredTimer!==void 0&&(clearTimeout(this.registrationExpiredTimer),this.registrationExpiredTimer=void 0)}generateContactHeader(t){let r=this.userAgent.contact.toString({register:!0});return this.options.regId&&this.options.instanceId&&(r+=";reg-id="+this.options.regId,r+=';+sip.instance="<urn:uuid:'+this.options.instanceId+'>"'),this.options.extraContactHeaderParams&&this.options.extraContactHeaderParams.forEach(n=>{r+=";"+n}),r+=";expires="+t,r}registered(t){this.clearTimers(),this.registrationTimer=setTimeout(()=>{this.registrationTimer=void 0,this.register()},this.refreshFrequency/100*t*1e3),this.registrationExpiredTimer=setTimeout(()=>{this.logger.warn("Registration expired"),this.unregistered()},t*1e3),this._state!==nt.Registered&&this.stateTransition(nt.Registered)}unregistered(){this.clearTimers(),this._state!==nt.Unregistered&&this.stateTransition(nt.Unregistered)}terminated(){this.clearTimers(),this._state!==nt.Terminated&&this.stateTransition(nt.Terminated)}stateTransition(t){const r=()=>{throw new Error(`Invalid state transition from ${this._state} to ${t}`)};switch(this._state){case nt.Initial:t!==nt.Registered&&t!==nt.Unregistered&&t!==nt.Terminated&&r();break;case nt.Registered:t!==nt.Unregistered&&t!==nt.Terminated&&r();break;case nt.Unregistered:t!==nt.Registered&&t!==nt.Terminated&&r();break;case nt.Terminated:r();break;default:throw new Error("Unrecognized state.")}this._state=t,this.logger.log(`Registration transitioned to state ${this._state}`),this._stateEventEmitter.emit(this._state),t===nt.Terminated&&this.dispose()}get waiting(){return this._waiting}get waitingChange(){return this._waitingEventEmitter}waitingToggle(t){if(this._waiting===t)throw new Error(`Invalid waiting transition from ${this._waiting} to ${t}`);this._waiting=t,this.logger.log(`Waiting toggled to ${this._waiting}`),this._waitingEventEmitter.emit(this._waiting)}waitingWarning(){let t="An attempt was made to send a REGISTER request while a prior one was still in progress.";t+=" RFC 3261 requires UAs MUST NOT send a new registration until they have received a final response",t+=" from the registrar for the previous one or the previous REGISTER request has timed out.",t+=" Note that if the transport disconnects, you still must wait for the prior request to time out before",t+=" sending a new REGISTER request or alternatively dispose of the current Registerer and create a new Registerer.",this.logger.warn(t)}stateError(){let t=`An attempt was made to send a REGISTER request when the Registerer ${this.state===nt.Terminated?"is in 'Terminated' state":"has been disposed"}.`;t+=" The Registerer transitions to 'Terminated' when Registerer.dispose() is called.",t+=" Perhaps you called UserAgent.stop() which dipsoses of all Registerers?",this.logger.error(t)}};Go.defaultExpires=600,Go.defaultRefreshFrequency=99;var Ye;(function(e){e.Initial="Initial",e.NotifyWait="NotifyWait",e.Pending="Pending",e.Active="Active",e.Terminated="Terminated"})(Ye=Ye||(Ye={}));var Ee;(function(e){e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Disconnected="Disconnected"})(Ee=Ee||(Ee={}));var $t;(function(e){e.Started="Started",e.Stopped="Stopped"})($t=$t||($t={}));var Dn=class xr{constructor(){this._dataLength=0,this._bufferLength=0,this._state=new Int32Array(4),this._buffer=new ArrayBuffer(68),this._buffer8=new Uint8Array(this._buffer,0,68),this._buffer32=new Uint32Array(this._buffer,0,17),this.start()}static hashStr(t,r=!1){return this.onePassHasher.start().appendStr(t).end(r)}static hashAsciiStr(t,r=!1){return this.onePassHasher.start().appendAsciiStr(t).end(r)}static _hex(t){const r=xr.hexChars,n=xr.hexOut;let s,i,o,a;for(a=0;a<4;a+=1)for(i=a*8,s=t[a],o=0;o<8;o+=2)n[i+1+o]=r.charAt(s&15),s>>>=4,n[i+0+o]=r.charAt(s&15),s>>>=4;return n.join("")}static _md5cycle(t,r){let n=t[0],s=t[1],i=t[2],o=t[3];n+=(s&i|~s&o)+r[0]-680876936|0,n=(n<<7|n>>>25)+s|0,o+=(n&s|~n&i)+r[1]-389564586|0,o=(o<<12|o>>>20)+n|0,i+=(o&n|~o&s)+r[2]+606105819|0,i=(i<<17|i>>>15)+o|0,s+=(i&o|~i&n)+r[3]-1044525330|0,s=(s<<22|s>>>10)+i|0,n+=(s&i|~s&o)+r[4]-176418897|0,n=(n<<7|n>>>25)+s|0,o+=(n&s|~n&i)+r[5]+1200080426|0,o=(o<<12|o>>>20)+n|0,i+=(o&n|~o&s)+r[6]-1473231341|0,i=(i<<17|i>>>15)+o|0,s+=(i&o|~i&n)+r[7]-45705983|0,s=(s<<22|s>>>10)+i|0,n+=(s&i|~s&o)+r[8]+1770035416|0,n=(n<<7|n>>>25)+s|0,o+=(n&s|~n&i)+r[9]-1958414417|0,o=(o<<12|o>>>20)+n|0,i+=(o&n|~o&s)+r[10]-42063|0,i=(i<<17|i>>>15)+o|0,s+=(i&o|~i&n)+r[11]-1990404162|0,s=(s<<22|s>>>10)+i|0,n+=(s&i|~s&o)+r[12]+1804603682|0,n=(n<<7|n>>>25)+s|0,o+=(n&s|~n&i)+r[13]-40341101|0,o=(o<<12|o>>>20)+n|0,i+=(o&n|~o&s)+r[14]-1502002290|0,i=(i<<17|i>>>15)+o|0,s+=(i&o|~i&n)+r[15]+1236535329|0,s=(s<<22|s>>>10)+i|0,n+=(s&o|i&~o)+r[1]-165796510|0,n=(n<<5|n>>>27)+s|0,o+=(n&i|s&~i)+r[6]-1069501632|0,o=(o<<9|o>>>23)+n|0,i+=(o&s|n&~s)+r[11]+643717713|0,i=(i<<14|i>>>18)+o|0,s+=(i&n|o&~n)+r[0]-373897302|0,s=(s<<20|s>>>12)+i|0,n+=(s&o|i&~o)+r[5]-701558691|0,n=(n<<5|n>>>27)+s|0,o+=(n&i|s&~i)+r[10]+38016083|0,o=(o<<9|o>>>23)+n|0,i+=(o&s|n&~s)+r[15]-660478335|0,i=(i<<14|i>>>18)+o|0,s+=(i&n|o&~n)+r[4]-405537848|0,s=(s<<20|s>>>12)+i|0,n+=(s&o|i&~o)+r[9]+568446438|0,n=(n<<5|n>>>27)+s|0,o+=(n&i|s&~i)+r[14]-1019803690|0,o=(o<<9|o>>>23)+n|0,i+=(o&s|n&~s)+r[3]-187363961|0,i=(i<<14|i>>>18)+o|0,s+=(i&n|o&~n)+r[8]+1163531501|0,s=(s<<20|s>>>12)+i|0,n+=(s&o|i&~o)+r[13]-1444681467|0,n=(n<<5|n>>>27)+s|0,o+=(n&i|s&~i)+r[2]-51403784|0,o=(o<<9|o>>>23)+n|0,i+=(o&s|n&~s)+r[7]+1735328473|0,i=(i<<14|i>>>18)+o|0,s+=(i&n|o&~n)+r[12]-1926607734|0,s=(s<<20|s>>>12)+i|0,n+=(s^i^o)+r[5]-378558|0,n=(n<<4|n>>>28)+s|0,o+=(n^s^i)+r[8]-2022574463|0,o=(o<<11|o>>>21)+n|0,i+=(o^n^s)+r[11]+1839030562|0,i=(i<<16|i>>>16)+o|0,s+=(i^o^n)+r[14]-35309556|0,s=(s<<23|s>>>9)+i|0,n+=(s^i^o)+r[1]-1530992060|0,n=(n<<4|n>>>28)+s|0,o+=(n^s^i)+r[4]+1272893353|0,o=(o<<11|o>>>21)+n|0,i+=(o^n^s)+r[7]-155497632|0,i=(i<<16|i>>>16)+o|0,s+=(i^o^n)+r[10]-1094730640|0,s=(s<<23|s>>>9)+i|0,n+=(s^i^o)+r[13]+681279174|0,n=(n<<4|n>>>28)+s|0,o+=(n^s^i)+r[0]-358537222|0,o=(o<<11|o>>>21)+n|0,i+=(o^n^s)+r[3]-722521979|0,i=(i<<16|i>>>16)+o|0,s+=(i^o^n)+r[6]+76029189|0,s=(s<<23|s>>>9)+i|0,n+=(s^i^o)+r[9]-640364487|0,n=(n<<4|n>>>28)+s|0,o+=(n^s^i)+r[12]-421815835|0,o=(o<<11|o>>>21)+n|0,i+=(o^n^s)+r[15]+530742520|0,i=(i<<16|i>>>16)+o|0,s+=(i^o^n)+r[2]-995338651|0,s=(s<<23|s>>>9)+i|0,n+=(i^(s|~o))+r[0]-198630844|0,n=(n<<6|n>>>26)+s|0,o+=(s^(n|~i))+r[7]+1126891415|0,o=(o<<10|o>>>22)+n|0,i+=(n^(o|~s))+r[14]-1416354905|0,i=(i<<15|i>>>17)+o|0,s+=(o^(i|~n))+r[5]-57434055|0,s=(s<<21|s>>>11)+i|0,n+=(i^(s|~o))+r[12]+1700485571|0,n=(n<<6|n>>>26)+s|0,o+=(s^(n|~i))+r[3]-1894986606|0,o=(o<<10|o>>>22)+n|0,i+=(n^(o|~s))+r[10]-1051523|0,i=(i<<15|i>>>17)+o|0,s+=(o^(i|~n))+r[1]-2054922799|0,s=(s<<21|s>>>11)+i|0,n+=(i^(s|~o))+r[8]+1873313359|0,n=(n<<6|n>>>26)+s|0,o+=(s^(n|~i))+r[15]-30611744|0,o=(o<<10|o>>>22)+n|0,i+=(n^(o|~s))+r[6]-1560198380|0,i=(i<<15|i>>>17)+o|0,s+=(o^(i|~n))+r[13]+1309151649|0,s=(s<<21|s>>>11)+i|0,n+=(i^(s|~o))+r[4]-145523070|0,n=(n<<6|n>>>26)+s|0,o+=(s^(n|~i))+r[11]-1120210379|0,o=(o<<10|o>>>22)+n|0,i+=(n^(o|~s))+r[2]+718787259|0,i=(i<<15|i>>>17)+o|0,s+=(o^(i|~n))+r[9]-343485551|0,s=(s<<21|s>>>11)+i|0,t[0]=n+t[0]|0,t[1]=s+t[1]|0,t[2]=i+t[2]|0,t[3]=o+t[3]|0}start(){return this._dataLength=0,this._bufferLength=0,this._state.set(xr.stateIdentity),this}appendStr(t){const r=this._buffer8,n=this._buffer32;let s=this._bufferLength,i,o;for(o=0;o<t.length;o+=1){if(i=t.charCodeAt(o),i<128)r[s++]=i;else if(i<2048)r[s++]=(i>>>6)+192,r[s++]=i&63|128;else if(i<55296||i>56319)r[s++]=(i>>>12)+224,r[s++]=i>>>6&63|128,r[s++]=i&63|128;else{if(i=(i-55296)*1024+(t.charCodeAt(++o)-56320)+65536,i>1114111)throw new Error("Unicode standard supports code points up to U+10FFFF");r[s++]=(i>>>18)+240,r[s++]=i>>>12&63|128,r[s++]=i>>>6&63|128,r[s++]=i&63|128}s>=64&&(this._dataLength+=64,xr._md5cycle(this._state,n),s-=64,n[0]=n[16])}return this._bufferLength=s,this}appendAsciiStr(t){const r=this._buffer8,n=this._buffer32;let s=this._bufferLength,i,o=0;for(;;){for(i=Math.min(t.length-o,64-s);i--;)r[s++]=t.charCodeAt(o++);if(s<64)break;this._dataLength+=64,xr._md5cycle(this._state,n),s=0}return this._bufferLength=s,this}appendByteArray(t){const r=this._buffer8,n=this._buffer32;let s=this._bufferLength,i,o=0;for(;;){for(i=Math.min(t.length-o,64-s);i--;)r[s++]=t[o++];if(s<64)break;this._dataLength+=64,xr._md5cycle(this._state,n),s=0}return this._bufferLength=s,this}getState(){const t=this,r=t._state;return{buffer:String.fromCharCode.apply(null,t._buffer8),buflen:t._bufferLength,length:t._dataLength,state:[r[0],r[1],r[2],r[3]]}}setState(t){const r=t.buffer,n=t.state,s=this._state;let i;for(this._dataLength=t.length,this._bufferLength=t.buflen,s[0]=n[0],s[1]=n[1],s[2]=n[2],s[3]=n[3],i=0;i<r.length;i+=1)this._buffer8[i]=r.charCodeAt(i)}end(t=!1){const r=this._bufferLength,n=this._buffer8,s=this._buffer32,i=(r>>2)+1;let o;if(this._dataLength+=r,n[r]=128,n[r+1]=n[r+2]=n[r+3]=0,s.set(xr.buffer32Identity.subarray(i),i),r>55&&(xr._md5cycle(this._state,s),s.set(xr.buffer32Identity)),o=this._dataLength*8,o<=4294967295)s[14]=o;else{const a=o.toString(16).match(/(.*?)(.{0,8})$/);if(a===null)return;const l=parseInt(a[2],16),u=parseInt(a[1],16)||0;s[14]=l,s[15]=u}return xr._md5cycle(this._state,s),t?this._state:xr._hex(this._state)}};Dn.stateIdentity=new Int32Array([1732584193,-271733879,-1732584194,271733878]),Dn.buffer32Identity=new Int32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),Dn.hexChars="0123456789abcdef",Dn.hexOut=[],Dn.onePassHasher=new Dn,Dn.hashStr("hello")!=="5d41402abc4b2a76b9719d911017c592"&&console.error("Md5 self test failed.");function On(e){return Dn.hashStr(e)}var fw=class{constructor(e,t,r,n){this.logger=e.getLogger("sipjs.digestauthentication"),this.username=r,this.password=n,this.ha1=t,this.nc=0,this.ncHex="00000000"}authenticate(e,t,r){if(this.algorithm=t.algorithm,this.realm=t.realm,this.nonce=t.nonce,this.opaque=t.opaque,this.stale=t.stale,this.algorithm){if(this.algorithm!=="MD5")return this.logger.warn("challenge with Digest algorithm different than 'MD5', authentication aborted"),!1}else this.algorithm="MD5";if(!this.realm)return this.logger.warn("challenge without Digest realm, authentication aborted"),!1;if(!this.nonce)return this.logger.warn("challenge without Digest nonce, authentication aborted"),!1;if(t.qop)if(t.qop.indexOf("auth")>-1)this.qop="auth";else if(t.qop.indexOf("auth-int")>-1)this.qop="auth-int";else return this.logger.warn("challenge without Digest qop different than 'auth' or 'auth-int', authentication aborted"),!1;else this.qop=void 0;return this.method=e.method,this.uri=e.ruri,this.cnonce=os(12),this.nc+=1,this.updateNcHex(),this.nc===4294967296&&(this.nc=1,this.ncHex="00000001"),this.calculateResponse(r),!0}toString(){const e=[];if(!this.response)throw new Error("response field does not exist, cannot generate Authorization header");return e.push("algorithm="+this.algorithm),e.push('username="'+this.username+'"'),e.push('realm="'+this.realm+'"'),e.push('nonce="'+this.nonce+'"'),e.push('uri="'+this.uri+'"'),e.push('response="'+this.response+'"'),this.opaque&&e.push('opaque="'+this.opaque+'"'),this.qop&&(e.push("qop="+this.qop),e.push('cnonce="'+this.cnonce+'"'),e.push("nc="+this.ncHex)),"Digest "+e.join(", ")}updateNcHex(){const e=Number(this.nc).toString(16);this.ncHex="00000000".substr(0,8-e.length)+e}calculateResponse(e){let t,r;t=this.ha1,(t===""||t===void 0)&&(t=On(this.username+":"+this.realm+":"+this.password)),this.qop==="auth"?(r=On(this.method+":"+this.uri),this.response=On(t+":"+this.nonce+":"+this.ncHex+":"+this.cnonce+":auth:"+r)):this.qop==="auth-int"?(r=On(this.method+":"+this.uri+":"+On(e||"")),this.response=On(t+":"+this.nonce+":"+this.ncHex+":"+this.cnonce+":auth-int:"+r)):this.qop===void 0&&(r=On(this.method+":"+this.uri),this.response=On(t+":"+this.nonce+":"+r))}},kt;(function(e){e[e.error=0]="error",e[e.warn=1]="warn",e[e.log=2]="log",e[e.debug=3]="debug"})(kt=kt||(kt={}));var gp=class{constructor(e,t,r){this.logger=e,this.category=t,this.label=r}error(e){this.genericLog(kt.error,e)}warn(e){this.genericLog(kt.warn,e)}log(e){this.genericLog(kt.log,e)}debug(e){this.genericLog(kt.debug,e)}genericLog(e,t){this.logger.genericLog(e,this.category,this.label,t)}get level(){return this.logger.level}set level(e){this.logger.level=e}},pw=class{constructor(){this.builtinEnabled=!0,this._level=kt.log,this.loggers={},this.logger=this.getLogger("sip:loggerfactory")}get level(){return this._level}set level(e){e>=0&&e<=3?this._level=e:e>3?this._level=3:kt.hasOwnProperty(e)?this._level=e:this.logger.error("invalid 'level' parameter value: "+JSON.stringify(e))}get connector(){return this._connector}set connector(e){e?typeof e=="function"?this._connector=e:this.logger.error("invalid 'connector' parameter value: "+JSON.stringify(e)):this._connector=void 0}getLogger(e,t){if(t&&this.level===3)return new gp(this,e,t);if(this.loggers[e])return this.loggers[e];{const r=new gp(this,e);return this.loggers[e]=r,r}}genericLog(e,t,r,n){this.level>=e&&this.builtinEnabled&&this.print(e,t,r,n),this.connector&&this.connector(kt[e],t,r,n)}print(e,t,r,n){if(typeof n=="string"){const s=[new Date,t];r&&s.push(r),n=s.concat(n).join(" | ")}switch(e){case kt.error:console.error(n);break;case kt.warn:console.warn(n);break;case kt.log:console.log(n);break;case kt.debug:console.debug(n);break;default:break}}},Jo;(function(e){function t(s,i){let o=i,a=0,l=0;if(s.substring(o,o+2).match(/(^\r\n)/))return-2;for(;a===0;){if(l=s.indexOf(`\r
27
27
  `,o),l===-1)return l;!s.substring(l+2,l+4).match(/(^\r\n)/)&&s.charAt(l+2).match(/(^\s+)/)?o=l+2:a=l}return a}e.getHeader=t;function r(s,i,o,a){const l=i.indexOf(":",o),u=i.substring(o,l).trim(),c=i.substring(l+1,a).trim();let d;switch(u.toLowerCase()){case"via":case"v":s.addHeader("via",c),s.getHeaders("via").length===1?(d=s.parseHeader("Via"),d&&(s.via=d,s.viaBranch=d.branch)):d=0;break;case"from":case"f":s.setHeader("from",c),d=s.parseHeader("from"),d&&(s.from=d,s.fromTag=d.getParam("tag"));break;case"to":case"t":s.setHeader("to",c),d=s.parseHeader("to"),d&&(s.to=d,s.toTag=d.getParam("tag"));break;case"record-route":if(d=Ct.parse(c,"Record_Route"),d===-1){d=void 0;break}if(!(d instanceof Array)){d=void 0;break}d.forEach(p=>{s.addHeader("record-route",c.substring(p.position,p.offset)),s.headers["Record-Route"][s.getHeaders("record-route").length-1].parsed=p.parsed});break;case"call-id":case"i":s.setHeader("call-id",c),d=s.parseHeader("call-id"),d&&(s.callId=c);break;case"contact":case"m":if(d=Ct.parse(c,"Contact"),d===-1){d=void 0;break}if(!(d instanceof Array)){d=void 0;break}d.forEach(p=>{s.addHeader("contact",c.substring(p.position,p.offset)),s.headers.Contact[s.getHeaders("contact").length-1].parsed=p.parsed});break;case"content-length":case"l":s.setHeader("content-length",c),d=s.parseHeader("content-length");break;case"content-type":case"c":s.setHeader("content-type",c),d=s.parseHeader("content-type");break;case"cseq":s.setHeader("cseq",c),d=s.parseHeader("cseq"),d&&(s.cseq=d.value),s instanceof Rn&&(s.method=d.method);break;case"max-forwards":s.setHeader("max-forwards",c),d=s.parseHeader("max-forwards");break;case"www-authenticate":s.setHeader("www-authenticate",c),d=s.parseHeader("www-authenticate");break;case"proxy-authenticate":s.setHeader("proxy-authenticate",c),d=s.parseHeader("proxy-authenticate");break;case"refer-to":case"r":s.setHeader("refer-to",c),d=s.parseHeader("refer-to"),d&&(s.referTo=d);break;default:s.addHeader(u.toLowerCase(),c),d=0}return d===void 0?{error:"error parsing header '"+u+"'"}:!0}e.parseHeader=r;function n(s,i){let o=0,a=s.indexOf(`\r
28
- `);if(a===-1){i.warn("no CRLF found, not a SIP message, discarded");return}const l=s.substring(0,a),u=Ct.parse(l,"Request_Response");let c;if(u===-1){i.warn('error parsing first line of SIP message: "'+l+'"');return}else u.status_code?(c=new Rn,c.statusCode=u.status_code,c.reasonPhrase=u.reason_phrase):(c=new qs,c.method=u.method,c.ruri=u.uri);c.data=s,o=a+2;let d;for(;;){if(a=t(s,o),a===-2){d=o+2;break}else if(a===-1){i.error("malformed message");return}const p=r(c,s,o,a);if(p&&p!==!0){i.error(p.error);return}o=a+2}return c.hasHeader("content-length")?c.body=s.substr(d,Number(c.getHeader("content-length"))):c.body=s.substring(d),c}e.parseMessage=n})(Go=Go||(Go={}));function vp(e,t){if(t.statusCode<100||t.statusCode>699)throw new TypeError("Invalid statusCode: "+t.statusCode);const n=t.reasonPhrase?t.reasonPhrase:jo(t.statusCode);let s="SIP/2.0 "+t.statusCode+" "+n+`\r
28
+ `);if(a===-1){i.warn("no CRLF found, not a SIP message, discarded");return}const l=s.substring(0,a),u=Ct.parse(l,"Request_Response");let c;if(u===-1){i.warn('error parsing first line of SIP message: "'+l+'"');return}else u.status_code?(c=new Rn,c.statusCode=u.status_code,c.reasonPhrase=u.reason_phrase):(c=new Bs,c.method=u.method,c.ruri=u.uri);c.data=s,o=a+2;let d;for(;;){if(a=t(s,o),a===-2){d=o+2;break}else if(a===-1){i.error("malformed message");return}const p=r(c,s,o,a);if(p&&p!==!0){i.error(p.error);return}o=a+2}return c.hasHeader("content-length")?c.body=s.substr(d,Number(c.getHeader("content-length"))):c.body=s.substring(d),c}e.parseMessage=n})(Jo=Jo||(Jo={}));function vp(e,t){if(t.statusCode<100||t.statusCode>699)throw new TypeError("Invalid statusCode: "+t.statusCode);const n=t.reasonPhrase?t.reasonPhrase:Uo(t.statusCode);let s="SIP/2.0 "+t.statusCode+" "+n+`\r
29
29
  `;t.statusCode>=100&&t.statusCode<200,t.statusCode;const i="From: "+e.getHeader("From")+`\r
30
30
  `,o="Call-ID: "+e.callId+`\r
31
31
  `,a="CSeq: "+e.cseq+" "+e.method+`\r
32
32
  `,l=e.getHeaders("via").reduce((h,m)=>h+"Via: "+m+`\r
33
- `,"");let u="To: "+e.getHeader("to");if(t.statusCode>100&&!e.parseHeader("to").hasParam("tag")){let h=t.toTag;h||(h=Uo()),u+=";tag="+h}u+=`\r
33
+ `,"");let u="To: "+e.getHeader("to");if(t.statusCode>100&&!e.parseHeader("to").hasParam("tag")){let h=t.toTag;h||(h=zo()),u+=";tag="+h}u+=`\r
34
34
  `;let c="";t.supported&&(c="Supported: "+t.supported.join(", ")+`\r
35
35
  `);let d="";t.userAgent&&(d="User-Agent: "+t.userAgent+`\r
36
36
  `);let p="";return t.extraHeaders&&(p=t.extraHeaders.reduce((h,m)=>h+m.trim()+`\r
37
37
  `,"")),s+=l,s+=i,s+=u,s+=a,s+=o,s+=c,s+=d,s+=p,t.body?(s+="Content-Type: "+t.body.contentType+`\r
38
- `,s+="Content-Length: "+$i(t.body.content)+`\r
38
+ `,s+="Content-Length: "+Pi(t.body.content)+`\r
39
39
  \r
40
40
  `,s+=t.body.content):s+=`Content-Length: 0\r
41
41
  \r
42
- `,{message:s}}var Gl=class extends is{constructor(e){super(e||"Unspecified transport error.")}},mp=class{constructor(e,t,r,n,s){this._transport=e,this._user=t,this._id=r,this._state=n,this.listeners=new Array,this.logger=t.loggerFactory.getLogger(s,r),this.logger.debug(`Constructing ${this.typeToString()} with id ${this.id}.`)}dispose(){this.logger.debug(`Destroyed ${this.typeToString()} with id ${this.id}.`)}get id(){return this._id}get kind(){throw new Error("Invalid kind.")}get state(){return this._state}get transport(){return this._transport}addStateChangeListener(e,t){const r=()=>{this.removeStateChangeListener(r),e()};t?.once===!0?this.listeners.push(r):this.listeners.push(e)}notifyStateChangeListeners(){this.listeners.slice().forEach(e=>e())}removeStateChangeListener(e){this.listeners=this.listeners.filter(t=>t!==e)}logTransportError(e,t){this.logger.error(e.message),this.logger.error(`Transport error occurred in ${this.typeToString()} with id ${this.id}.`),this.logger.error(t)}send(e){return this.transport.send(e).catch(t=>{if(t instanceof Gl)throw this.onTransportError(t),t;let r;throw t&&typeof t.message=="string"?r=new Gl(t.message):r=new Gl,this.onTransportError(r),r})}setState(e){this.logger.debug(`State change to "${e}" on ${this.typeToString()} with id ${this.id}.`),this._state=e,this._user.onStateChange&&this._user.onStateChange(e),this.notifyStateChangeListeners()}typeToString(){return"UnknownType"}},wp=class extends mp{constructor(e,t,r,n,s){super(t,r,e.viaBranch,n,s),this._request=e,this.user=r}get request(){return this._request}},j;(function(e){e.Accepted="Accepted",e.Calling="Calling",e.Completed="Completed",e.Confirmed="Confirmed",e.Proceeding="Proceeding",e.Terminated="Terminated",e.Trying="Trying"})(j=j||(j={}));var Qt=class extends wp{constructor(e,t,r){super(e,t,r,j.Proceeding,"sip.transaction.ist")}dispose(){this.stopProgressExtensionTimer(),this.H&&(clearTimeout(this.H),this.H=void 0),this.I&&(clearTimeout(this.I),this.I=void 0),this.L&&(clearTimeout(this.L),this.L=void 0),super.dispose()}get kind(){return"ist"}receiveRequest(e){switch(this.state){case j.Proceeding:if(e.method===be.INVITE){this.lastProvisionalResponse&&this.send(this.lastProvisionalResponse).catch(r=>{this.logTransportError(r,"Failed to send retransmission of provisional response.")});return}break;case j.Accepted:if(e.method===be.INVITE)return;break;case j.Completed:if(e.method===be.INVITE){if(!this.lastFinalResponse)throw new Error("Last final response undefined.");this.send(this.lastFinalResponse).catch(r=>{this.logTransportError(r,"Failed to send retransmission of final response.")});return}if(e.method===be.ACK){this.stateTransition(j.Confirmed);return}break;case j.Confirmed:if(e.method===be.INVITE||e.method===be.ACK)return;break;case j.Terminated:if(e.method===be.INVITE||e.method===be.ACK)return;break;default:throw new Error(`Invalid state ${this.state}`)}const t=`INVITE server transaction received unexpected ${e.method} request while in state ${this.state}.`;this.logger.warn(t)}receiveResponse(e,t){if(e<100||e>699)throw new Error(`Invalid status code ${e}`);switch(this.state){case j.Proceeding:if(e>=100&&e<=199){this.lastProvisionalResponse=t,e>100&&this.startProgressExtensionTimer(),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send 1xx response.")});return}if(e>=200&&e<=299){this.lastFinalResponse=t,this.stateTransition(j.Accepted),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send 2xx response.")});return}if(e>=300&&e<=699){this.lastFinalResponse=t,this.stateTransition(j.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send non-2xx final response.")});return}break;case j.Accepted:if(e>=200&&e<=299){this.send(t).catch(n=>{this.logTransportError(n,"Failed to send 2xx response.")});return}break;case j.Completed:break;case j.Confirmed:break;case j.Terminated:break;default:throw new Error(`Invalid state ${this.state}`)}const r=`INVITE server transaction received unexpected ${e} response from TU while in state ${this.state}.`;throw this.logger.error(r),new Error(r)}retransmitAcceptedResponse(){this.state===j.Accepted&&this.lastFinalResponse&&this.send(this.lastFinalResponse).catch(e=>{this.logTransportError(e,"Failed to send 2xx response.")})}onTransportError(e){this.user.onTransportError&&this.user.onTransportError(e)}typeToString(){return"INVITE server transaction"}stateTransition(e){const t=()=>{throw new Error(`Invalid state transition from ${this.state} to ${e}`)};switch(e){case j.Proceeding:t();break;case j.Accepted:case j.Completed:this.state!==j.Proceeding&&t();break;case j.Confirmed:this.state!==j.Completed&&t();break;case j.Terminated:this.state!==j.Accepted&&this.state!==j.Completed&&this.state!==j.Confirmed&&t();break;default:t()}this.stopProgressExtensionTimer(),e===j.Accepted&&(this.L=setTimeout(()=>this.timerL(),At.TIMER_L)),e===j.Completed&&(this.H=setTimeout(()=>this.timerH(),At.TIMER_H)),e===j.Confirmed&&(this.I=setTimeout(()=>this.timerI(),At.TIMER_I)),e===j.Terminated&&this.dispose(),this.setState(e)}startProgressExtensionTimer(){this.progressExtensionTimer===void 0&&(this.progressExtensionTimer=setInterval(()=>{if(this.logger.debug(`Progress extension timer expired for INVITE server transaction ${this.id}.`),!this.lastProvisionalResponse)throw new Error("Last provisional response undefined.");this.send(this.lastProvisionalResponse).catch(e=>{this.logTransportError(e,"Failed to send retransmission of provisional response.")})},At.PROVISIONAL_RESPONSE_INTERVAL))}stopProgressExtensionTimer(){this.progressExtensionTimer!==void 0&&(clearInterval(this.progressExtensionTimer),this.progressExtensionTimer=void 0)}timerG(){}timerH(){this.logger.debug(`Timer H expired for INVITE server transaction ${this.id}.`),this.state===j.Completed&&(this.logger.warn("ACK to negative final response was never received, terminating transaction."),this.stateTransition(j.Terminated))}timerI(){this.logger.debug(`Timer I expired for INVITE server transaction ${this.id}.`),this.stateTransition(j.Terminated)}timerL(){this.logger.debug(`Timer L expired for INVITE server transaction ${this.id}.`),this.state===j.Accepted&&this.stateTransition(j.Terminated)}},yp=class Mg extends mp{constructor(t,r,n,s,i){super(r,n,Mg.makeId(t),s,i),this._request=t,this.user=n,t.setViaHeader(this.id,r.protocol)}static makeId(t){if(t.method==="CANCEL"){if(!t.branch)throw new Error("Outgoing CANCEL request without a branch.");return t.branch}else return"z9hG4bK"+Math.floor(Math.random()*1e7)}get request(){return this._request}onRequestTimeout(){this.user.onRequestTimeout&&this.user.onRequestTimeout()}},nr=class extends yp{constructor(e,t,r){super(e,t,r,j.Trying,"sip.transaction.nict"),this.F=setTimeout(()=>this.timerF(),At.TIMER_F),this.send(e.toString()).catch(n=>{this.logTransportError(n,"Failed to send initial outgoing request.")})}dispose(){this.F&&(clearTimeout(this.F),this.F=void 0),this.K&&(clearTimeout(this.K),this.K=void 0),super.dispose()}get kind(){return"nict"}receiveResponse(e){const t=e.statusCode;if(!t||t<100||t>699)throw new Error(`Invalid status code ${t}`);switch(this.state){case j.Trying:if(t>=100&&t<=199){this.stateTransition(j.Proceeding),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=200&&t<=699){if(this.stateTransition(j.Completed),t===408){this.onRequestTimeout();return}this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case j.Proceeding:if(t>=100&&t<=199&&this.user.receiveResponse)return this.user.receiveResponse(e);if(t>=200&&t<=699){if(this.stateTransition(j.Completed),t===408){this.onRequestTimeout();return}this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case j.Completed:return;case j.Terminated:return;default:throw new Error(`Invalid state ${this.state}`)}const r=`Non-INVITE client transaction received unexpected ${t} response while in state ${this.state}.`;this.logger.warn(r)}onTransportError(e){this.user.onTransportError&&this.user.onTransportError(e),this.stateTransition(j.Terminated,!0)}typeToString(){return"non-INVITE client transaction"}stateTransition(e,t=!1){const r=()=>{throw new Error(`Invalid state transition from ${this.state} to ${e}`)};switch(e){case j.Trying:r();break;case j.Proceeding:this.state!==j.Trying&&r();break;case j.Completed:this.state!==j.Trying&&this.state!==j.Proceeding&&r();break;case j.Terminated:this.state!==j.Trying&&this.state!==j.Proceeding&&this.state!==j.Completed&&(t||r());break;default:r()}e===j.Completed&&(this.F&&(clearTimeout(this.F),this.F=void 0),this.K=setTimeout(()=>this.timerK(),At.TIMER_K)),e===j.Terminated&&this.dispose(),this.setState(e)}timerF(){this.logger.debug(`Timer F expired for non-INVITE client transaction ${this.id}.`),(this.state===j.Trying||this.state===j.Proceeding)&&(this.onRequestTimeout(),this.stateTransition(j.Terminated))}timerK(){this.state===j.Completed&&this.stateTransition(j.Terminated)}},Ls=class{constructor(e,t){this.core=e,this.dialogState=t,this.core.dialogs.set(this.id,this)}static initialDialogStateForUserAgentClient(e,t){const n=t.getHeaders("record-route").reverse(),s=t.parseHeader("contact");if(!s)throw new Error("Contact undefined.");if(!(s instanceof yr))throw new Error("Contact not instance of NameAddrHeader.");const i=s.uri,o=e.cseq,a=void 0,l=e.callId,u=e.fromTag,c=t.toTag;if(!l)throw new Error("Call id undefined.");if(!u)throw new Error("From tag undefined.");if(!c)throw new Error("To tag undefined.");if(!e.from)throw new Error("From undefined.");if(!e.to)throw new Error("To undefined.");const d=e.from.uri,p=e.to.uri;if(!t.statusCode)throw new Error("Incoming response status code undefined.");const h=t.statusCode<200;return{id:l+u+c,early:h,callId:l,localTag:u,remoteTag:c,localSequenceNumber:o,remoteSequenceNumber:a,localURI:d,remoteURI:p,remoteTarget:i,routeSet:n,secure:!1}}static initialDialogStateForUserAgentServer(e,t,r=!1){const s=e.getHeaders("record-route"),i=e.parseHeader("contact");if(!i)throw new Error("Contact undefined.");if(!(i instanceof yr))throw new Error("Contact not instance of NameAddrHeader.");const o=i.uri,a=e.cseq,l=void 0,u=e.callId,c=t,d=e.fromTag,p=e.from.uri,h=e.to.uri;return{id:u+c+d,early:r,callId:u,localTag:c,remoteTag:d,localSequenceNumber:l,remoteSequenceNumber:a,localURI:h,remoteURI:p,remoteTarget:o,routeSet:s,secure:!1}}dispose(){this.core.dialogs.delete(this.id)}get id(){return this.dialogState.id}get early(){return this.dialogState.early}get callId(){return this.dialogState.callId}get localTag(){return this.dialogState.localTag}get remoteTag(){return this.dialogState.remoteTag}get localSequenceNumber(){return this.dialogState.localSequenceNumber}get remoteSequenceNumber(){return this.dialogState.remoteSequenceNumber}get localURI(){return this.dialogState.localURI}get remoteURI(){return this.dialogState.remoteURI}get remoteTarget(){return this.dialogState.remoteTarget}get routeSet(){return this.dialogState.routeSet}get secure(){return this.dialogState.secure}get userAgentCore(){return this.core}confirm(){this.dialogState.early=!1}receiveRequest(e){if(e.method!==be.ACK){if(this.remoteSequenceNumber){if(e.cseq<=this.remoteSequenceNumber)throw new Error("Out of sequence in dialog request. Did you forget to call sequenceGuard()?");this.dialogState.remoteSequenceNumber=e.cseq}this.remoteSequenceNumber||(this.dialogState.remoteSequenceNumber=e.cseq)}}recomputeRouteSet(e){this.dialogState.routeSet=e.getHeaders("record-route").reverse()}createOutgoingRequestMessage(e,t){const r=this.remoteURI,n=this.remoteTag,s=this.localURI,i=this.localTag,o=this.callId;let a;t&&t.cseq?a=t.cseq:this.dialogState.localSequenceNumber?a=this.dialogState.localSequenceNumber+=1:a=this.dialogState.localSequenceNumber=1;const l=this.remoteTarget,u=this.routeSet,c=t&&t.extraHeaders,d=t&&t.body;return this.userAgentCore.makeOutgoingRequestMessage(e,l,s,r,{callId:o,cseq:a,fromTag:i,toTag:n,routeSet:u},c,d)}incrementLocalSequenceNumber(){if(!this.dialogState.localSequenceNumber)throw new Error("Local sequence number undefined.");this.dialogState.localSequenceNumber+=1}sequenceGuard(e){return e.method===be.ACK?!0:this.remoteSequenceNumber&&e.cseq<=this.remoteSequenceNumber?(this.core.replyStateless(e,{statusCode:500}),!1):!0}},Hn=class extends yp{constructor(e,t,r){super(e,t,r,j.Calling,"sip.transaction.ict"),this.ackRetransmissionCache=new Map,this.B=setTimeout(()=>this.timerB(),At.TIMER_B),this.send(e.toString()).catch(n=>{this.logTransportError(n,"Failed to send initial outgoing request.")})}dispose(){this.B&&(clearTimeout(this.B),this.B=void 0),this.D&&(clearTimeout(this.D),this.D=void 0),this.M&&(clearTimeout(this.M),this.M=void 0),super.dispose()}get kind(){return"ict"}ackResponse(e){const t=e.toTag;if(!t)throw new Error("To tag undefined.");const r="z9hG4bK"+Math.floor(Math.random()*1e7);e.setViaHeader(r,this.transport.protocol),this.ackRetransmissionCache.set(t,e),this.send(e.toString()).catch(n=>{this.logTransportError(n,"Failed to send ACK to 2xx response.")})}receiveResponse(e){const t=e.statusCode;if(!t||t<100||t>699)throw new Error(`Invalid status code ${t}`);switch(this.state){case j.Calling:if(t>=100&&t<=199){this.stateTransition(j.Proceeding),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=200&&t<=299){this.ackRetransmissionCache.set(e.toTag,void 0),this.stateTransition(j.Accepted),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=300&&t<=699){this.stateTransition(j.Completed),this.ack(e),this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case j.Proceeding:if(t>=100&&t<=199){this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=200&&t<=299){this.ackRetransmissionCache.set(e.toTag,void 0),this.stateTransition(j.Accepted),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=300&&t<=699){this.stateTransition(j.Completed),this.ack(e),this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case j.Accepted:if(t>=200&&t<=299){if(!this.ackRetransmissionCache.has(e.toTag)){this.ackRetransmissionCache.set(e.toTag,void 0),this.user.receiveResponse&&this.user.receiveResponse(e);return}const n=this.ackRetransmissionCache.get(e.toTag);if(n){this.send(n.toString()).catch(s=>{this.logTransportError(s,"Failed to send retransmission of ACK to 2xx response.")});return}return}break;case j.Completed:if(t>=300&&t<=699){this.ack(e);return}break;case j.Terminated:break;default:throw new Error(`Invalid state ${this.state}`)}const r=`Received unexpected ${t} response while in state ${this.state}.`;this.logger.warn(r)}onTransportError(e){this.user.onTransportError&&this.user.onTransportError(e),this.stateTransition(j.Terminated,!0)}typeToString(){return"INVITE client transaction"}ack(e){const t=this.request.ruri,r=this.request.callId,n=this.request.cseq,s=this.request.getHeader("from"),i=e.getHeader("to"),o=this.request.getHeader("via"),a=this.request.getHeader("route");if(!s)throw new Error("From undefined.");if(!i)throw new Error("To undefined.");if(!o)throw new Error("Via undefined.");let l=`ACK ${t} SIP/2.0\r
42
+ `,{message:s}}var Gl=class extends is{constructor(e){super(e||"Unspecified transport error.")}},mp=class{constructor(e,t,r,n,s){this._transport=e,this._user=t,this._id=r,this._state=n,this.listeners=new Array,this.logger=t.loggerFactory.getLogger(s,r),this.logger.debug(`Constructing ${this.typeToString()} with id ${this.id}.`)}dispose(){this.logger.debug(`Destroyed ${this.typeToString()} with id ${this.id}.`)}get id(){return this._id}get kind(){throw new Error("Invalid kind.")}get state(){return this._state}get transport(){return this._transport}addStateChangeListener(e,t){const r=()=>{this.removeStateChangeListener(r),e()};t?.once===!0?this.listeners.push(r):this.listeners.push(e)}notifyStateChangeListeners(){this.listeners.slice().forEach(e=>e())}removeStateChangeListener(e){this.listeners=this.listeners.filter(t=>t!==e)}logTransportError(e,t){this.logger.error(e.message),this.logger.error(`Transport error occurred in ${this.typeToString()} with id ${this.id}.`),this.logger.error(t)}send(e){return this.transport.send(e).catch(t=>{if(t instanceof Gl)throw this.onTransportError(t),t;let r;throw t&&typeof t.message=="string"?r=new Gl(t.message):r=new Gl,this.onTransportError(r),r})}setState(e){this.logger.debug(`State change to "${e}" on ${this.typeToString()} with id ${this.id}.`),this._state=e,this._user.onStateChange&&this._user.onStateChange(e),this.notifyStateChangeListeners()}typeToString(){return"UnknownType"}},wp=class extends mp{constructor(e,t,r,n,s){super(t,r,e.viaBranch,n,s),this._request=e,this.user=r}get request(){return this._request}},j;(function(e){e.Accepted="Accepted",e.Calling="Calling",e.Completed="Completed",e.Confirmed="Confirmed",e.Proceeding="Proceeding",e.Terminated="Terminated",e.Trying="Trying"})(j=j||(j={}));var er=class extends wp{constructor(e,t,r){super(e,t,r,j.Proceeding,"sip.transaction.ist")}dispose(){this.stopProgressExtensionTimer(),this.H&&(clearTimeout(this.H),this.H=void 0),this.I&&(clearTimeout(this.I),this.I=void 0),this.L&&(clearTimeout(this.L),this.L=void 0),super.dispose()}get kind(){return"ist"}receiveRequest(e){switch(this.state){case j.Proceeding:if(e.method===be.INVITE){this.lastProvisionalResponse&&this.send(this.lastProvisionalResponse).catch(r=>{this.logTransportError(r,"Failed to send retransmission of provisional response.")});return}break;case j.Accepted:if(e.method===be.INVITE)return;break;case j.Completed:if(e.method===be.INVITE){if(!this.lastFinalResponse)throw new Error("Last final response undefined.");this.send(this.lastFinalResponse).catch(r=>{this.logTransportError(r,"Failed to send retransmission of final response.")});return}if(e.method===be.ACK){this.stateTransition(j.Confirmed);return}break;case j.Confirmed:if(e.method===be.INVITE||e.method===be.ACK)return;break;case j.Terminated:if(e.method===be.INVITE||e.method===be.ACK)return;break;default:throw new Error(`Invalid state ${this.state}`)}const t=`INVITE server transaction received unexpected ${e.method} request while in state ${this.state}.`;this.logger.warn(t)}receiveResponse(e,t){if(e<100||e>699)throw new Error(`Invalid status code ${e}`);switch(this.state){case j.Proceeding:if(e>=100&&e<=199){this.lastProvisionalResponse=t,e>100&&this.startProgressExtensionTimer(),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send 1xx response.")});return}if(e>=200&&e<=299){this.lastFinalResponse=t,this.stateTransition(j.Accepted),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send 2xx response.")});return}if(e>=300&&e<=699){this.lastFinalResponse=t,this.stateTransition(j.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send non-2xx final response.")});return}break;case j.Accepted:if(e>=200&&e<=299){this.send(t).catch(n=>{this.logTransportError(n,"Failed to send 2xx response.")});return}break;case j.Completed:break;case j.Confirmed:break;case j.Terminated:break;default:throw new Error(`Invalid state ${this.state}`)}const r=`INVITE server transaction received unexpected ${e} response from TU while in state ${this.state}.`;throw this.logger.error(r),new Error(r)}retransmitAcceptedResponse(){this.state===j.Accepted&&this.lastFinalResponse&&this.send(this.lastFinalResponse).catch(e=>{this.logTransportError(e,"Failed to send 2xx response.")})}onTransportError(e){this.user.onTransportError&&this.user.onTransportError(e)}typeToString(){return"INVITE server transaction"}stateTransition(e){const t=()=>{throw new Error(`Invalid state transition from ${this.state} to ${e}`)};switch(e){case j.Proceeding:t();break;case j.Accepted:case j.Completed:this.state!==j.Proceeding&&t();break;case j.Confirmed:this.state!==j.Completed&&t();break;case j.Terminated:this.state!==j.Accepted&&this.state!==j.Completed&&this.state!==j.Confirmed&&t();break;default:t()}this.stopProgressExtensionTimer(),e===j.Accepted&&(this.L=setTimeout(()=>this.timerL(),At.TIMER_L)),e===j.Completed&&(this.H=setTimeout(()=>this.timerH(),At.TIMER_H)),e===j.Confirmed&&(this.I=setTimeout(()=>this.timerI(),At.TIMER_I)),e===j.Terminated&&this.dispose(),this.setState(e)}startProgressExtensionTimer(){this.progressExtensionTimer===void 0&&(this.progressExtensionTimer=setInterval(()=>{if(this.logger.debug(`Progress extension timer expired for INVITE server transaction ${this.id}.`),!this.lastProvisionalResponse)throw new Error("Last provisional response undefined.");this.send(this.lastProvisionalResponse).catch(e=>{this.logTransportError(e,"Failed to send retransmission of provisional response.")})},At.PROVISIONAL_RESPONSE_INTERVAL))}stopProgressExtensionTimer(){this.progressExtensionTimer!==void 0&&(clearInterval(this.progressExtensionTimer),this.progressExtensionTimer=void 0)}timerG(){}timerH(){this.logger.debug(`Timer H expired for INVITE server transaction ${this.id}.`),this.state===j.Completed&&(this.logger.warn("ACK to negative final response was never received, terminating transaction."),this.stateTransition(j.Terminated))}timerI(){this.logger.debug(`Timer I expired for INVITE server transaction ${this.id}.`),this.stateTransition(j.Terminated)}timerL(){this.logger.debug(`Timer L expired for INVITE server transaction ${this.id}.`),this.state===j.Accepted&&this.stateTransition(j.Terminated)}},yp=class Ng extends mp{constructor(t,r,n,s,i){super(r,n,Ng.makeId(t),s,i),this._request=t,this.user=n,t.setViaHeader(this.id,r.protocol)}static makeId(t){if(t.method==="CANCEL"){if(!t.branch)throw new Error("Outgoing CANCEL request without a branch.");return t.branch}else return"z9hG4bK"+Math.floor(Math.random()*1e7)}get request(){return this._request}onRequestTimeout(){this.user.onRequestTimeout&&this.user.onRequestTimeout()}},sr=class extends yp{constructor(e,t,r){super(e,t,r,j.Trying,"sip.transaction.nict"),this.F=setTimeout(()=>this.timerF(),At.TIMER_F),this.send(e.toString()).catch(n=>{this.logTransportError(n,"Failed to send initial outgoing request.")})}dispose(){this.F&&(clearTimeout(this.F),this.F=void 0),this.K&&(clearTimeout(this.K),this.K=void 0),super.dispose()}get kind(){return"nict"}receiveResponse(e){const t=e.statusCode;if(!t||t<100||t>699)throw new Error(`Invalid status code ${t}`);switch(this.state){case j.Trying:if(t>=100&&t<=199){this.stateTransition(j.Proceeding),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=200&&t<=699){if(this.stateTransition(j.Completed),t===408){this.onRequestTimeout();return}this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case j.Proceeding:if(t>=100&&t<=199&&this.user.receiveResponse)return this.user.receiveResponse(e);if(t>=200&&t<=699){if(this.stateTransition(j.Completed),t===408){this.onRequestTimeout();return}this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case j.Completed:return;case j.Terminated:return;default:throw new Error(`Invalid state ${this.state}`)}const r=`Non-INVITE client transaction received unexpected ${t} response while in state ${this.state}.`;this.logger.warn(r)}onTransportError(e){this.user.onTransportError&&this.user.onTransportError(e),this.stateTransition(j.Terminated,!0)}typeToString(){return"non-INVITE client transaction"}stateTransition(e,t=!1){const r=()=>{throw new Error(`Invalid state transition from ${this.state} to ${e}`)};switch(e){case j.Trying:r();break;case j.Proceeding:this.state!==j.Trying&&r();break;case j.Completed:this.state!==j.Trying&&this.state!==j.Proceeding&&r();break;case j.Terminated:this.state!==j.Trying&&this.state!==j.Proceeding&&this.state!==j.Completed&&(t||r());break;default:r()}e===j.Completed&&(this.F&&(clearTimeout(this.F),this.F=void 0),this.K=setTimeout(()=>this.timerK(),At.TIMER_K)),e===j.Terminated&&this.dispose(),this.setState(e)}timerF(){this.logger.debug(`Timer F expired for non-INVITE client transaction ${this.id}.`),(this.state===j.Trying||this.state===j.Proceeding)&&(this.onRequestTimeout(),this.stateTransition(j.Terminated))}timerK(){this.state===j.Completed&&this.stateTransition(j.Terminated)}},Fs=class{constructor(e,t){this.core=e,this.dialogState=t,this.core.dialogs.set(this.id,this)}static initialDialogStateForUserAgentClient(e,t){const n=t.getHeaders("record-route").reverse(),s=t.parseHeader("contact");if(!s)throw new Error("Contact undefined.");if(!(s instanceof wr))throw new Error("Contact not instance of NameAddrHeader.");const i=s.uri,o=e.cseq,a=void 0,l=e.callId,u=e.fromTag,c=t.toTag;if(!l)throw new Error("Call id undefined.");if(!u)throw new Error("From tag undefined.");if(!c)throw new Error("To tag undefined.");if(!e.from)throw new Error("From undefined.");if(!e.to)throw new Error("To undefined.");const d=e.from.uri,p=e.to.uri;if(!t.statusCode)throw new Error("Incoming response status code undefined.");const h=t.statusCode<200;return{id:l+u+c,early:h,callId:l,localTag:u,remoteTag:c,localSequenceNumber:o,remoteSequenceNumber:a,localURI:d,remoteURI:p,remoteTarget:i,routeSet:n,secure:!1}}static initialDialogStateForUserAgentServer(e,t,r=!1){const s=e.getHeaders("record-route"),i=e.parseHeader("contact");if(!i)throw new Error("Contact undefined.");if(!(i instanceof wr))throw new Error("Contact not instance of NameAddrHeader.");const o=i.uri,a=e.cseq,l=void 0,u=e.callId,c=t,d=e.fromTag,p=e.from.uri,h=e.to.uri;return{id:u+c+d,early:r,callId:u,localTag:c,remoteTag:d,localSequenceNumber:l,remoteSequenceNumber:a,localURI:h,remoteURI:p,remoteTarget:o,routeSet:s,secure:!1}}dispose(){this.core.dialogs.delete(this.id)}get id(){return this.dialogState.id}get early(){return this.dialogState.early}get callId(){return this.dialogState.callId}get localTag(){return this.dialogState.localTag}get remoteTag(){return this.dialogState.remoteTag}get localSequenceNumber(){return this.dialogState.localSequenceNumber}get remoteSequenceNumber(){return this.dialogState.remoteSequenceNumber}get localURI(){return this.dialogState.localURI}get remoteURI(){return this.dialogState.remoteURI}get remoteTarget(){return this.dialogState.remoteTarget}get routeSet(){return this.dialogState.routeSet}get secure(){return this.dialogState.secure}get userAgentCore(){return this.core}confirm(){this.dialogState.early=!1}receiveRequest(e){if(e.method!==be.ACK){if(this.remoteSequenceNumber){if(e.cseq<=this.remoteSequenceNumber)throw new Error("Out of sequence in dialog request. Did you forget to call sequenceGuard()?");this.dialogState.remoteSequenceNumber=e.cseq}this.remoteSequenceNumber||(this.dialogState.remoteSequenceNumber=e.cseq)}}recomputeRouteSet(e){this.dialogState.routeSet=e.getHeaders("record-route").reverse()}createOutgoingRequestMessage(e,t){const r=this.remoteURI,n=this.remoteTag,s=this.localURI,i=this.localTag,o=this.callId;let a;t&&t.cseq?a=t.cseq:this.dialogState.localSequenceNumber?a=this.dialogState.localSequenceNumber+=1:a=this.dialogState.localSequenceNumber=1;const l=this.remoteTarget,u=this.routeSet,c=t&&t.extraHeaders,d=t&&t.body;return this.userAgentCore.makeOutgoingRequestMessage(e,l,s,r,{callId:o,cseq:a,fromTag:i,toTag:n,routeSet:u},c,d)}incrementLocalSequenceNumber(){if(!this.dialogState.localSequenceNumber)throw new Error("Local sequence number undefined.");this.dialogState.localSequenceNumber+=1}sequenceGuard(e){return e.method===be.ACK?!0:this.remoteSequenceNumber&&e.cseq<=this.remoteSequenceNumber?(this.core.replyStateless(e,{statusCode:500}),!1):!0}},Hn=class extends yp{constructor(e,t,r){super(e,t,r,j.Calling,"sip.transaction.ict"),this.ackRetransmissionCache=new Map,this.B=setTimeout(()=>this.timerB(),At.TIMER_B),this.send(e.toString()).catch(n=>{this.logTransportError(n,"Failed to send initial outgoing request.")})}dispose(){this.B&&(clearTimeout(this.B),this.B=void 0),this.D&&(clearTimeout(this.D),this.D=void 0),this.M&&(clearTimeout(this.M),this.M=void 0),super.dispose()}get kind(){return"ict"}ackResponse(e){const t=e.toTag;if(!t)throw new Error("To tag undefined.");const r="z9hG4bK"+Math.floor(Math.random()*1e7);e.setViaHeader(r,this.transport.protocol),this.ackRetransmissionCache.set(t,e),this.send(e.toString()).catch(n=>{this.logTransportError(n,"Failed to send ACK to 2xx response.")})}receiveResponse(e){const t=e.statusCode;if(!t||t<100||t>699)throw new Error(`Invalid status code ${t}`);switch(this.state){case j.Calling:if(t>=100&&t<=199){this.stateTransition(j.Proceeding),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=200&&t<=299){this.ackRetransmissionCache.set(e.toTag,void 0),this.stateTransition(j.Accepted),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=300&&t<=699){this.stateTransition(j.Completed),this.ack(e),this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case j.Proceeding:if(t>=100&&t<=199){this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=200&&t<=299){this.ackRetransmissionCache.set(e.toTag,void 0),this.stateTransition(j.Accepted),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=300&&t<=699){this.stateTransition(j.Completed),this.ack(e),this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case j.Accepted:if(t>=200&&t<=299){if(!this.ackRetransmissionCache.has(e.toTag)){this.ackRetransmissionCache.set(e.toTag,void 0),this.user.receiveResponse&&this.user.receiveResponse(e);return}const n=this.ackRetransmissionCache.get(e.toTag);if(n){this.send(n.toString()).catch(s=>{this.logTransportError(s,"Failed to send retransmission of ACK to 2xx response.")});return}return}break;case j.Completed:if(t>=300&&t<=699){this.ack(e);return}break;case j.Terminated:break;default:throw new Error(`Invalid state ${this.state}`)}const r=`Received unexpected ${t} response while in state ${this.state}.`;this.logger.warn(r)}onTransportError(e){this.user.onTransportError&&this.user.onTransportError(e),this.stateTransition(j.Terminated,!0)}typeToString(){return"INVITE client transaction"}ack(e){const t=this.request.ruri,r=this.request.callId,n=this.request.cseq,s=this.request.getHeader("from"),i=e.getHeader("to"),o=this.request.getHeader("via"),a=this.request.getHeader("route");if(!s)throw new Error("From undefined.");if(!i)throw new Error("To undefined.");if(!o)throw new Error("Via undefined.");let l=`ACK ${t} SIP/2.0\r
43
43
  `;a&&(l+=`Route: ${a}\r
44
44
  `),l+=`Via: ${o}\r
45
45
  `,l+=`To: ${i}\r
@@ -49,11 +49,11 @@
49
49
  `,l+=`Max-Forwards: 70\r
50
50
  `,l+=`Content-Length: 0\r
51
51
  \r
52
- `,this.send(l).catch(u=>{this.logTransportError(u,"Failed to send ACK to non-2xx response.")})}stateTransition(e,t=!1){const r=()=>{throw new Error(`Invalid state transition from ${this.state} to ${e}`)};switch(e){case j.Calling:r();break;case j.Proceeding:this.state!==j.Calling&&r();break;case j.Accepted:case j.Completed:this.state!==j.Calling&&this.state!==j.Proceeding&&r();break;case j.Terminated:this.state!==j.Calling&&this.state!==j.Accepted&&this.state!==j.Completed&&(t||r());break;default:r()}this.B&&(clearTimeout(this.B),this.B=void 0),j.Proceeding,e===j.Completed&&(this.D=setTimeout(()=>this.timerD(),At.TIMER_D)),e===j.Accepted&&(this.M=setTimeout(()=>this.timerM(),At.TIMER_M)),e===j.Terminated&&this.dispose(),this.setState(e)}timerA(){}timerB(){this.logger.debug(`Timer B expired for INVITE client transaction ${this.id}.`),this.state===j.Calling&&(this.onRequestTimeout(),this.stateTransition(j.Terminated))}timerD(){this.logger.debug(`Timer D expired for INVITE client transaction ${this.id}.`),this.state===j.Completed&&this.stateTransition(j.Terminated)}timerM(){this.logger.debug(`Timer M expired for INVITE client transaction ${this.id}.`),this.state===j.Accepted&&this.stateTransition(j.Terminated)}},sr=class du{constructor(t,r,n,s){this.transactionConstructor=t,this.core=r,this.message=n,this.delegate=s,this.challenged=!1,this.stale=!1,this.logger=this.loggerFactory.getLogger("sip.user-agent-client"),this.init()}dispose(){this.transaction.dispose()}get loggerFactory(){return this.core.loggerFactory}get transaction(){if(!this._transaction)throw new Error("Transaction undefined.");return this._transaction}cancel(t,r={}){if(!this.transaction)throw new Error("Transaction undefined.");if(!this.message.to)throw new Error("To undefined.");if(!this.message.from)throw new Error("From undefined.");const n=this.core.makeOutgoingRequestMessage(be.CANCEL,this.message.ruri,this.message.from.uri,this.message.to.uri,{toTag:this.message.toTag,fromTag:this.message.fromTag,callId:this.message.callId,cseq:this.message.cseq},r.extraHeaders);return n.branch=this.message.branch,this.message.headers.Route&&(n.headers.Route=this.message.headers.Route),t&&n.setHeader("Reason",t),this.transaction.state===j.Proceeding?new du(nr,this.core,n):this.transaction.addStateChangeListener(()=>{this.transaction&&this.transaction.state===j.Proceeding&&new du(nr,this.core,n)},{once:!0}),n}authenticationGuard(t,r){const n=t.statusCode;if(!n)throw new Error("Response status code undefined.");if(n!==401&&n!==407)return!0;let s,i;if(n===401?(s=t.parseHeader("www-authenticate"),i="authorization"):(s=t.parseHeader("proxy-authenticate"),i="proxy-authorization"),!s)return this.logger.warn(n+" with wrong or missing challenge, cannot authenticate"),!0;if(this.challenged&&(this.stale||s.stale!==!0))return this.logger.warn(n+" apparently in authentication loop, cannot authenticate"),!0;if(!this.credentials&&(this.credentials=this.core.configuration.authenticationFactory(),!this.credentials))return this.logger.warn("Unable to obtain credentials, cannot authenticate"),!0;if(!this.credentials.authenticate(this.message,s))return!0;this.challenged=!0,s.stale&&(this.stale=!0);let o=this.message.cseq+=1;return r&&r.localSequenceNumber&&(r.incrementLocalSequenceNumber(),o=this.message.cseq=r.localSequenceNumber),this.message.setHeader("cseq",o+" "+this.message.method),this.message.setHeader(i,this.credentials.toString()),this.init(),!1}onRequestTimeout(){this.logger.warn("User agent client request timed out. Generating internal 408 Request Timeout.");const t=new Rn;t.statusCode=408,t.reasonPhrase="Request Timeout",this.receiveResponse(t)}onTransportError(t){this.logger.error(t.message),this.logger.error("User agent client request transport error. Generating internal 503 Service Unavailable.");const r=new Rn;r.statusCode=503,r.reasonPhrase="Service Unavailable",this.receiveResponse(r)}receiveResponse(t){if(!this.authenticationGuard(t))return;const r=t.statusCode?t.statusCode.toString():"";if(!r)throw new Error("Response status code undefined.");switch(!0){case/^100$/.test(r):this.delegate&&this.delegate.onTrying&&this.delegate.onTrying({message:t});break;case/^1[0-9]{2}$/.test(r):this.delegate&&this.delegate.onProgress&&this.delegate.onProgress({message:t});break;case/^2[0-9]{2}$/.test(r):this.delegate&&this.delegate.onAccept&&this.delegate.onAccept({message:t});break;case/^3[0-9]{2}$/.test(r):this.delegate&&this.delegate.onRedirect&&this.delegate.onRedirect({message:t});break;case/^[4-6][0-9]{2}$/.test(r):this.delegate&&this.delegate.onReject&&this.delegate.onReject({message:t});break;default:throw new Error(`Invalid status code ${r}`)}}init(){const t={loggerFactory:this.loggerFactory,onRequestTimeout:()=>this.onRequestTimeout(),onStateChange:s=>{s===j.Terminated&&(this.core.userAgentClients.delete(n),r===this._transaction&&this.dispose())},onTransportError:s=>this.onTransportError(s),receiveResponse:s=>this.receiveResponse(s)},r=new this.transactionConstructor(this.message,this.core.transport,t);this._transaction=r;const n=r.id+r.request.method;this.core.userAgentClients.set(n,this)}},pw=class extends sr{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.BYE,r);super(nr,e.userAgentCore,n,t),e.dispose()}},ir=class extends wp{constructor(e,t,r){super(e,t,r,j.Trying,"sip.transaction.nist")}dispose(){this.J&&(clearTimeout(this.J),this.J=void 0),super.dispose()}get kind(){return"nist"}receiveRequest(e){switch(this.state){case j.Trying:break;case j.Proceeding:if(!this.lastResponse)throw new Error("Last response undefined.");this.send(this.lastResponse).catch(t=>{this.logTransportError(t,"Failed to send retransmission of provisional response.")});break;case j.Completed:if(!this.lastResponse)throw new Error("Last response undefined.");this.send(this.lastResponse).catch(t=>{this.logTransportError(t,"Failed to send retransmission of final response.")});break;case j.Terminated:break;default:throw new Error(`Invalid state ${this.state}`)}}receiveResponse(e,t){if(e<100||e>699)throw new Error(`Invalid status code ${e}`);if(e>100&&e<=199)throw new Error("Provisional response other than 100 not allowed.");switch(this.state){case j.Trying:if(this.lastResponse=t,e>=100&&e<200){this.stateTransition(j.Proceeding),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send provisional response.")});return}if(e>=200&&e<=699){this.stateTransition(j.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send final response.")});return}break;case j.Proceeding:if(this.lastResponse=t,e>=200&&e<=699){this.stateTransition(j.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send final response.")});return}break;case j.Completed:return;case j.Terminated:break;default:throw new Error(`Invalid state ${this.state}`)}const r=`Non-INVITE server transaction received unexpected ${e} response from TU while in state ${this.state}.`;throw this.logger.error(r),new Error(r)}onTransportError(e){this.user.onTransportError&&this.user.onTransportError(e),this.stateTransition(j.Terminated,!0)}typeToString(){return"non-INVITE server transaction"}stateTransition(e,t=!1){const r=()=>{throw new Error(`Invalid state transition from ${this.state} to ${e}`)};switch(e){case j.Trying:r();break;case j.Proceeding:this.state!==j.Trying&&r();break;case j.Completed:this.state!==j.Trying&&this.state!==j.Proceeding&&r();break;case j.Terminated:this.state!==j.Proceeding&&this.state!==j.Completed&&(t||r());break;default:r()}e===j.Completed&&(this.J=setTimeout(()=>this.timerJ(),At.TIMER_J)),e===j.Terminated&&this.dispose(),this.setState(e)}timerJ(){this.logger.debug(`Timer J expired for NON-INVITE server transaction ${this.id}.`),this.state===j.Completed&&this.stateTransition(j.Terminated)}},Vr=class{constructor(e,t,r,n){this.transactionConstructor=e,this.core=t,this.message=r,this.delegate=n,this.logger=this.loggerFactory.getLogger("sip.user-agent-server"),this.toTag=r.toTag?r.toTag:Uo(),this.init()}dispose(){this.transaction.dispose()}get loggerFactory(){return this.core.loggerFactory}get transaction(){if(!this._transaction)throw new Error("Transaction undefined.");return this._transaction}accept(e={statusCode:200}){if(!this.acceptable)throw new $n(`${this.message.method} not acceptable in state ${this.transaction.state}.`);const t=e.statusCode;if(t<200||t>299)throw new TypeError(`Invalid statusCode: ${t}`);return this.reply(e)}progress(e={statusCode:180}){if(!this.progressable)throw new $n(`${this.message.method} not progressable in state ${this.transaction.state}.`);const t=e.statusCode;if(t<101||t>199)throw new TypeError(`Invalid statusCode: ${t}`);return this.reply(e)}redirect(e,t={statusCode:302}){if(!this.redirectable)throw new $n(`${this.message.method} not redirectable in state ${this.transaction.state}.`);const r=t.statusCode;if(r<300||r>399)throw new TypeError(`Invalid statusCode: ${r}`);const n=new Array;return e.forEach(s=>n.push(`Contact: ${s.toString()}`)),t.extraHeaders=(t.extraHeaders||[]).concat(n),this.reply(t)}reject(e={statusCode:480}){if(!this.rejectable)throw new $n(`${this.message.method} not rejectable in state ${this.transaction.state}.`);const t=e.statusCode;if(t<400||t>699)throw new TypeError(`Invalid statusCode: ${t}`);return this.reply(e)}trying(e){if(!this.tryingable)throw new $n(`${this.message.method} not tryingable in state ${this.transaction.state}.`);return this.reply({statusCode:100})}receiveCancel(e){this.delegate&&this.delegate.onCancel&&this.delegate.onCancel(e)}get acceptable(){if(this.transaction instanceof Qt)return this.transaction.state===j.Proceeding||this.transaction.state===j.Accepted;if(this.transaction instanceof ir)return this.transaction.state===j.Trying||this.transaction.state===j.Proceeding;throw new Error("Unknown transaction type.")}get progressable(){if(this.transaction instanceof Qt)return this.transaction.state===j.Proceeding;if(this.transaction instanceof ir)return!1;throw new Error("Unknown transaction type.")}get redirectable(){if(this.transaction instanceof Qt)return this.transaction.state===j.Proceeding;if(this.transaction instanceof ir)return this.transaction.state===j.Trying||this.transaction.state===j.Proceeding;throw new Error("Unknown transaction type.")}get rejectable(){if(this.transaction instanceof Qt)return this.transaction.state===j.Proceeding;if(this.transaction instanceof ir)return this.transaction.state===j.Trying||this.transaction.state===j.Proceeding;throw new Error("Unknown transaction type.")}get tryingable(){if(this.transaction instanceof Qt)return this.transaction.state===j.Proceeding;if(this.transaction instanceof ir)return this.transaction.state===j.Trying;throw new Error("Unknown transaction type.")}reply(e){!e.toTag&&e.statusCode!==100&&(e.toTag=this.toTag),e.userAgent=e.userAgent||this.core.configuration.userAgentHeaderFieldValue,e.supported=e.supported||this.core.configuration.supportedOptionTagsResponse;const t=vp(this.message,e);return this.transaction.receiveResponse(e.statusCode,t.message),t}init(){const e={loggerFactory:this.loggerFactory,onStateChange:n=>{n===j.Terminated&&(this.core.userAgentServers.delete(r),this.dispose())},onTransportError:n=>{this.logger.error(n.message),this.delegate&&this.delegate.onTransportError?this.delegate.onTransportError(n):this.logger.error("User agent server response transport error.")}},t=new this.transactionConstructor(this.message,this.core.transport,e);this._transaction=t;const r=t.id;this.core.userAgentServers.set(t.id,this)}},hw=class extends Vr{constructor(e,t,r){super(ir,e.userAgentCore,t,r)}},gw=class extends sr{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.INFO,r);super(nr,e.userAgentCore,n,t)}},vw=class extends Vr{constructor(e,t,r){super(ir,e.userAgentCore,t,r)}},bp=class extends sr{constructor(e,t,r){super(nr,e,t,r)}},_p=class extends Vr{constructor(e,t,r){super(ir,e,t,r)}},mw=class extends sr{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.NOTIFY,r);super(nr,e.userAgentCore,n,t)}};function ww(e){return e.userAgentCore!==void 0}var Jo=class extends Vr{constructor(e,t,r){const n=ww(e)?e.userAgentCore:e;super(ir,n,t,r)}},yw=class extends sr{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.PRACK,r);super(nr,e.userAgentCore,n,t),e.signalingStateTransition(n)}},bw=class extends Vr{constructor(e,t,r){super(ir,e.userAgentCore,t,r),e.signalingStateTransition(t),this.dialog=e}accept(e={statusCode:200}){return e.body&&this.dialog.signalingStateTransition(e.body),super.accept(e)}},_w=class extends sr{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.INVITE,r);super(Hn,e.userAgentCore,n,t),this.delegate=t,e.signalingStateTransition(n),e.reinviteUserAgentClient=this,this.dialog=e}receiveResponse(e){if(!this.authenticationGuard(e,this.dialog))return;const t=e.statusCode?e.statusCode.toString():"";if(!t)throw new Error("Response status code undefined.");switch(!0){case/^100$/.test(t):this.delegate&&this.delegate.onTrying&&this.delegate.onTrying({message:e});break;case/^1[0-9]{2}$/.test(t):this.delegate&&this.delegate.onProgress&&this.delegate.onProgress({message:e,session:this.dialog,prack:r=>{throw new Error("Unimplemented.")}});break;case/^2[0-9]{2}$/.test(t):this.dialog.signalingStateTransition(e),this.delegate&&this.delegate.onAccept&&this.delegate.onAccept({message:e,session:this.dialog,ack:r=>this.dialog.ack(r)});break;case/^3[0-9]{2}$/.test(t):this.dialog.signalingStateRollback(),this.dialog.reinviteUserAgentClient=void 0,this.delegate&&this.delegate.onRedirect&&this.delegate.onRedirect({message:e});break;case/^[4-6][0-9]{2}$/.test(t):this.dialog.signalingStateRollback(),this.dialog.reinviteUserAgentClient=void 0,this.delegate&&this.delegate.onReject&&this.delegate.onReject({message:e});break;default:throw new Error(`Invalid status code ${t}`)}}},Sw=class extends Vr{constructor(e,t,r){super(Qt,e.userAgentCore,t,r),e.reinviteUserAgentServer=this,this.dialog=e}accept(e={statusCode:200}){e.extraHeaders=e.extraHeaders||[],e.extraHeaders=e.extraHeaders.concat(this.dialog.routeSet.map(s=>`Record-Route: ${s}`));const t=super.accept(e),r=this.dialog,n=Object.assign(Object.assign({},t),{session:r});return e.body&&this.dialog.signalingStateTransition(e.body),this.dialog.reConfirm(),n}progress(e={statusCode:180}){const t=super.progress(e),r=this.dialog,n=Object.assign(Object.assign({},t),{session:r});return e.body&&this.dialog.signalingStateTransition(e.body),n}redirect(e,t={statusCode:302}){throw this.dialog.signalingStateRollback(),this.dialog.reinviteUserAgentServer=void 0,new Error("Unimplemented.")}reject(e={statusCode:488}){return this.dialog.signalingStateRollback(),this.dialog.reinviteUserAgentServer=void 0,super.reject(e)}},Cw=class extends sr{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.REFER,r);super(nr,e.userAgentCore,n,t)}};function xw(e){return e.userAgentCore!==void 0}var Sp=class extends Vr{constructor(e,t,r){const n=xw(e)?e.userAgentCore:e;super(ir,n,t,r)}},Yo=class extends Ls{constructor(e,t,r,n){super(t,r),this.initialTransaction=e,this._signalingState=me.Initial,this.ackWait=!1,this.ackProcessing=!1,this.delegate=n,e instanceof Qt&&(this.ackWait=!0),this.early||this.start2xxRetransmissionTimer(),this.signalingStateTransition(e.request),this.logger=t.loggerFactory.getLogger("sip.invite-dialog"),this.logger.log(`INVITE dialog ${this.id} constructed`)}dispose(){super.dispose(),this._signalingState=me.Closed,this._offer=void 0,this._answer=void 0,this.invite2xxTimer&&(clearTimeout(this.invite2xxTimer),this.invite2xxTimer=void 0),this.logger.log(`INVITE dialog ${this.id} destroyed`)}get sessionState(){return this.early?br.Early:this.ackWait?br.AckWait:this._signalingState===me.Closed?br.Terminated:br.Confirmed}get signalingState(){return this._signalingState}get offer(){return this._offer}get answer(){return this._answer}confirm(){this.early&&this.start2xxRetransmissionTimer(),super.confirm()}reConfirm(){this.reinviteUserAgentServer&&this.startReInvite2xxRetransmissionTimer()}ack(e={}){this.logger.log(`INVITE dialog ${this.id} sending ACK request`);let t;if(this.reinviteUserAgentClient){if(!(this.reinviteUserAgentClient.transaction instanceof Hn))throw new Error("Transaction not instance of InviteClientTransaction.");t=this.reinviteUserAgentClient.transaction,this.reinviteUserAgentClient=void 0}else{if(!(this.initialTransaction instanceof Hn))throw new Error("Initial transaction not instance of InviteClientTransaction.");t=this.initialTransaction}const r=this.createOutgoingRequestMessage(be.ACK,{cseq:t.request.cseq,extraHeaders:e.extraHeaders,body:e.body});return t.ackResponse(r),this.signalingStateTransition(r),{message:r}}bye(e,t){if(this.logger.log(`INVITE dialog ${this.id} sending BYE request`),this.initialTransaction instanceof Qt){if(this.early)throw new Error("UAS MUST NOT send a BYE on early dialogs.");if(this.ackWait&&this.initialTransaction.state!==j.Terminated)throw new Error("UAS MUST NOT send a BYE on a confirmed dialog until it has received an ACK for its 2xx response or until the server transaction times out.")}return new pw(this,e,t)}info(e,t){if(this.logger.log(`INVITE dialog ${this.id} sending INFO request`),this.early)throw new Error("Dialog not confirmed.");return new gw(this,e,t)}invite(e,t){if(this.logger.log(`INVITE dialog ${this.id} sending INVITE request`),this.early)throw new Error("Dialog not confirmed.");if(this.reinviteUserAgentClient)throw new Error("There is an ongoing re-INVITE client transaction.");if(this.reinviteUserAgentServer)throw new Error("There is an ongoing re-INVITE server transaction.");return new _w(this,e,t)}message(e,t){if(this.logger.log(`INVITE dialog ${this.id} sending MESSAGE request`),this.early)throw new Error("Dialog not confirmed.");const r=this.createOutgoingRequestMessage(be.MESSAGE,t);return new bp(this.core,r,e)}notify(e,t){if(this.logger.log(`INVITE dialog ${this.id} sending NOTIFY request`),this.early)throw new Error("Dialog not confirmed.");return new mw(this,e,t)}prack(e,t){return this.logger.log(`INVITE dialog ${this.id} sending PRACK request`),new yw(this,e,t)}refer(e,t){if(this.logger.log(`INVITE dialog ${this.id} sending REFER request`),this.early)throw new Error("Dialog not confirmed.");return new Cw(this,e,t)}receiveRequest(e){if(this.logger.log(`INVITE dialog ${this.id} received ${e.method} request`),e.method===be.ACK){if(this.ackWait){if(this.initialTransaction instanceof Hn){this.logger.warn(`INVITE dialog ${this.id} received unexpected ${e.method} request, dropping.`);return}if(this.initialTransaction.request.cseq!==e.cseq){this.logger.warn(`INVITE dialog ${this.id} received unexpected ${e.method} request, dropping.`);return}this.ackWait=!1}else{if(!this.reinviteUserAgentServer){this.logger.warn(`INVITE dialog ${this.id} received unexpected ${e.method} request, dropping.`);return}if(this.reinviteUserAgentServer.transaction.request.cseq!==e.cseq){this.logger.warn(`INVITE dialog ${this.id} received unexpected ${e.method} request, dropping.`);return}this.reinviteUserAgentServer=void 0}if(this.signalingStateTransition(e),this.delegate&&this.delegate.onAck){const t=this.delegate.onAck({message:e});t instanceof Promise&&(this.ackProcessing=!0,t.then(()=>this.ackProcessing=!1).catch(()=>this.ackProcessing=!1))}return}if(!this.sequenceGuard(e)){this.logger.log(`INVITE dialog ${this.id} rejected out of order ${e.method} request.`);return}if(super.receiveRequest(e),e.method===be.INVITE){const t=()=>{const n=this.ackWait?"waiting for initial ACK":"processing initial ACK";this.logger.warn(`INVITE dialog ${this.id} received re-INVITE while ${n}`);let s="RFC 5407 suggests the following to avoid this race condition... ";s+=" Note: Implementation issues are outside the scope of this document,",s+=" but the following tip is provided for avoiding race conditions of",s+=" this type. The caller can delay sending re-INVITE F6 for some period",s+=" of time (2 seconds, perhaps), after which the caller can reasonably",s+=" assume that its ACK has been received. Implementors can decouple the",s+=" actions of the user (e.g., pressing the hold button) from the actions",s+=" of the protocol (the sending of re-INVITE F6), so that the UA can",s+=" behave like this. In this case, it is the implementor's choice as to",s+=" how long to wait. In most cases, such an implementation may be",s+=" useful to prevent the type of race condition shown in this section.",s+=" This document expresses no preference about whether or not they",s+=" should wait for an ACK to be delivered. After considering the impact",s+=" on user experience, implementors should decide whether or not to wait",s+=" for a while, because the user experience depends on the",s+=" implementation and has no direct bearing on protocol behavior.",this.logger.warn(s)},r=[`Retry-After: ${Math.floor(Math.random()*10)+1}`];if(this.ackProcessing){this.core.replyStateless(e,{statusCode:500,extraHeaders:r}),t();return}if(this.ackWait&&this.signalingState!==me.Stable){this.core.replyStateless(e,{statusCode:500,extraHeaders:r}),t();return}if(this.reinviteUserAgentServer){this.core.replyStateless(e,{statusCode:500,extraHeaders:r});return}if(this.reinviteUserAgentClient){this.core.replyStateless(e,{statusCode:491});return}}if(e.method===be.INVITE){const t=e.parseHeader("contact");if(!t)throw new Error("Contact undefined.");if(!(t instanceof yr))throw new Error("Contact not instance of NameAddrHeader.");this.dialogState.remoteTarget=t.uri}switch(e.method){case be.BYE:{const t=new hw(this,e);this.delegate&&this.delegate.onBye?this.delegate.onBye(t):t.accept(),this.dispose()}break;case be.INFO:{const t=new vw(this,e);this.delegate&&this.delegate.onInfo?this.delegate.onInfo(t):t.reject({statusCode:469,extraHeaders:["Recv-Info:"]})}break;case be.INVITE:{const t=new Sw(this,e);this.signalingStateTransition(e),this.delegate&&this.delegate.onInvite?this.delegate.onInvite(t):t.reject({statusCode:488})}break;case be.MESSAGE:{const t=new _p(this.core,e);this.delegate&&this.delegate.onMessage?this.delegate.onMessage(t):t.accept()}break;case be.NOTIFY:{const t=new Jo(this,e);this.delegate&&this.delegate.onNotify?this.delegate.onNotify(t):t.accept()}break;case be.PRACK:{const t=new bw(this,e);this.delegate&&this.delegate.onPrack?this.delegate.onPrack(t):t.accept()}break;case be.REFER:{const t=new Sp(this,e);this.delegate&&this.delegate.onRefer?this.delegate.onRefer(t):t.reject()}break;default:this.logger.log(`INVITE dialog ${this.id} received unimplemented ${e.method} request`),this.core.replyStateless(e,{statusCode:501});break}}reliableSequenceGuard(e){const t=e.statusCode;if(!t)throw new Error("Status code undefined");if(t>100&&t<200){const r=e.getHeader("require"),n=e.getHeader("rseq"),s=r&&r.includes("100rel")&&n?Number(n):void 0;if(s){if(this.rseq&&this.rseq+1!==s)return!1;this.rseq=this.rseq?this.rseq+1:s}}return!0}signalingStateRollback(){(this._signalingState===me.HaveLocalOffer||this.signalingState===me.HaveRemoteOffer)&&this._rollbackOffer&&this._rollbackAnswer&&(this._signalingState=me.Stable,this._offer=this._rollbackOffer,this._answer=this._rollbackAnswer)}signalingStateTransition(e){const t=Pi(e);if(!(!t||t.contentDisposition!=="session")){if(this._signalingState===me.Stable&&(this._rollbackOffer=this._offer,this._rollbackAnswer=this._answer),e instanceof qs)switch(this._signalingState){case me.Initial:case me.Stable:this._signalingState=me.HaveRemoteOffer,this._offer=t,this._answer=void 0;break;case me.HaveLocalOffer:this._signalingState=me.Stable,this._answer=t;break;case me.HaveRemoteOffer:break;case me.Closed:break;default:throw new Error("Unexpected signaling state.")}if(e instanceof Rn)switch(this._signalingState){case me.Initial:case me.Stable:this._signalingState=me.HaveRemoteOffer,this._offer=t,this._answer=void 0;break;case me.HaveLocalOffer:this._signalingState=me.Stable,this._answer=t;break;case me.HaveRemoteOffer:break;case me.Closed:break;default:throw new Error("Unexpected signaling state.")}if(e instanceof Ul)switch(this._signalingState){case me.Initial:case me.Stable:this._signalingState=me.HaveLocalOffer,this._offer=t,this._answer=void 0;break;case me.HaveLocalOffer:break;case me.HaveRemoteOffer:this._signalingState=me.Stable,this._answer=t;break;case me.Closed:break;default:throw new Error("Unexpected signaling state.")}if(pp(e))switch(this._signalingState){case me.Initial:case me.Stable:this._signalingState=me.HaveLocalOffer,this._offer=t,this._answer=void 0;break;case me.HaveLocalOffer:break;case me.HaveRemoteOffer:this._signalingState=me.Stable,this._answer=t;break;case me.Closed:break;default:throw new Error("Unexpected signaling state.")}}}start2xxRetransmissionTimer(){if(this.initialTransaction instanceof Qt){const e=this.initialTransaction;let t=At.T1;const r=()=>{if(!this.ackWait){this.invite2xxTimer=void 0;return}this.logger.log("No ACK for 2xx response received, attempting retransmission"),e.retransmitAcceptedResponse(),t=Math.min(t*2,At.T2),this.invite2xxTimer=setTimeout(r,t)};this.invite2xxTimer=setTimeout(r,t);const n=()=>{e.state===j.Terminated&&(e.removeStateChangeListener(n),this.invite2xxTimer&&(clearTimeout(this.invite2xxTimer),this.invite2xxTimer=void 0),this.ackWait&&(this.delegate&&this.delegate.onAckTimeout?this.delegate.onAckTimeout():this.bye()))};e.addStateChangeListener(n)}}startReInvite2xxRetransmissionTimer(){if(this.reinviteUserAgentServer&&this.reinviteUserAgentServer.transaction instanceof Qt){const e=this.reinviteUserAgentServer.transaction;let t=At.T1;const r=()=>{if(!this.reinviteUserAgentServer){this.invite2xxTimer=void 0;return}this.logger.log("No ACK for 2xx response received, attempting retransmission"),e.retransmitAcceptedResponse(),t=Math.min(t*2,At.T2),this.invite2xxTimer=setTimeout(r,t)};this.invite2xxTimer=setTimeout(r,t);const n=()=>{e.state===j.Terminated&&(e.removeStateChangeListener(n),this.invite2xxTimer&&(clearTimeout(this.invite2xxTimer),this.invite2xxTimer=void 0),this.reinviteUserAgentServer)};e.addStateChangeListener(n)}}},Tw=class extends sr{constructor(e,t,r){super(Hn,e,t,r),this.confirmedDialogAcks=new Map,this.confirmedDialogs=new Map,this.earlyDialogs=new Map,this.delegate=r}dispose(){this.earlyDialogs.forEach(e=>e.dispose()),this.earlyDialogs.clear(),super.dispose()}onTransportError(e){if(this.transaction.state===j.Calling)return super.onTransportError(e);this.logger.error(e.message),this.logger.error("User agent client request transport error while sending ACK.")}receiveResponse(e){if(!this.authenticationGuard(e))return;const t=e.statusCode?e.statusCode.toString():"";if(!t)throw new Error("Response status code undefined.");switch(!0){case/^100$/.test(t):this.delegate&&this.delegate.onTrying&&this.delegate.onTrying({message:e});return;case/^1[0-9]{2}$/.test(t):{if(!e.toTag){this.logger.warn("Non-100 1xx INVITE response received without a to tag, dropping.");return}if(!e.parseHeader("contact")){this.logger.error("Non-100 1xx INVITE response received without a Contact header field, dropping.");return}const r=Ls.initialDialogStateForUserAgentClient(this.message,e);let n=this.earlyDialogs.get(r.id);if(!n){const i=this.transaction;if(!(i instanceof Hn))throw new Error("Transaction not instance of InviteClientTransaction.");n=new Yo(i,this.core,r),this.earlyDialogs.set(n.id,n)}if(!n.reliableSequenceGuard(e)){this.logger.warn("1xx INVITE reliable response received out of order or is a retransmission, dropping.");return}(n.signalingState===me.Initial||n.signalingState===me.HaveLocalOffer)&&n.signalingStateTransition(e);const s=n;this.delegate&&this.delegate.onProgress&&this.delegate.onProgress({message:e,session:s,prack:i=>s.prack(void 0,i)})}return;case/^2[0-9]{2}$/.test(t):{if(!e.toTag){this.logger.error("2xx INVITE response received without a to tag, dropping.");return}if(!e.parseHeader("contact")){this.logger.error("2xx INVITE response received without a Contact header field, dropping.");return}const r=Ls.initialDialogStateForUserAgentClient(this.message,e);let n=this.confirmedDialogs.get(r.id);if(n){const i=this.confirmedDialogAcks.get(r.id);if(i){const o=this.transaction;if(!(o instanceof Hn))throw new Error("Client transaction not instance of InviteClientTransaction.");o.ackResponse(i.message)}return}if(n=this.earlyDialogs.get(r.id),n)n.confirm(),n.recomputeRouteSet(e),this.earlyDialogs.delete(n.id),this.confirmedDialogs.set(n.id,n);else{const i=this.transaction;if(!(i instanceof Hn))throw new Error("Transaction not instance of InviteClientTransaction.");n=new Yo(i,this.core,r),this.confirmedDialogs.set(n.id,n)}(n.signalingState===me.Initial||n.signalingState===me.HaveLocalOffer)&&n.signalingStateTransition(e);const s=n;if(this.delegate&&this.delegate.onAccept)this.delegate.onAccept({message:e,session:s,ack:i=>{const o=s.ack(i);return this.confirmedDialogAcks.set(s.id,o),o}});else{const i=s.ack();this.confirmedDialogAcks.set(s.id,i)}}return;case/^3[0-9]{2}$/.test(t):this.earlyDialogs.forEach(r=>r.dispose()),this.earlyDialogs.clear(),this.delegate&&this.delegate.onRedirect&&this.delegate.onRedirect({message:e});return;case/^[4-6][0-9]{2}$/.test(t):this.earlyDialogs.forEach(r=>r.dispose()),this.earlyDialogs.clear(),this.delegate&&this.delegate.onReject&&this.delegate.onReject({message:e});return;default:throw new Error(`Invalid status code ${t}`)}throw new Error(`Executing what should be an unreachable code path receiving ${t} response.`)}},Jl=class extends Vr{constructor(e,t,r){super(Qt,e,t,r),this.core=e}dispose(){this.earlyDialog&&this.earlyDialog.dispose(),super.dispose()}accept(e={statusCode:200}){if(!this.acceptable)throw new $n(`${this.message.method} not acceptable in state ${this.transaction.state}.`);if(!this.confirmedDialog)if(this.earlyDialog)this.earlyDialog.confirm(),this.confirmedDialog=this.earlyDialog,this.earlyDialog=void 0;else{const a=this.transaction;if(!(a instanceof Qt))throw new Error("Transaction not instance of InviteClientTransaction.");const l=Ls.initialDialogStateForUserAgentServer(this.message,this.toTag);this.confirmedDialog=new Yo(a,this.core,l)}const t=this.message.getHeaders("record-route").map(a=>`Record-Route: ${a}`),r=`Contact: ${this.core.configuration.contact.toString()}`,n="Allow: "+Pn.toString();if(!e.body){if(this.confirmedDialog.signalingState===me.Stable)e.body=this.confirmedDialog.answer;else if(this.confirmedDialog.signalingState===me.Initial||this.confirmedDialog.signalingState===me.HaveRemoteOffer)throw new Error("Response must have a body.")}e.statusCode=e.statusCode||200,e.extraHeaders=e.extraHeaders||[],e.extraHeaders=e.extraHeaders.concat(t),e.extraHeaders.push(n),e.extraHeaders.push(r);const s=super.accept(e),i=this.confirmedDialog,o=Object.assign(Object.assign({},s),{session:i});return e.body&&this.confirmedDialog.signalingState!==me.Stable&&this.confirmedDialog.signalingStateTransition(e.body),o}progress(e={statusCode:180}){if(!this.progressable)throw new $n(`${this.message.method} not progressable in state ${this.transaction.state}.`);if(!this.earlyDialog){const o=this.transaction;if(!(o instanceof Qt))throw new Error("Transaction not instance of InviteClientTransaction.");const a=Ls.initialDialogStateForUserAgentServer(this.message,this.toTag,!0);this.earlyDialog=new Yo(o,this.core,a)}const t=this.message.getHeaders("record-route").map(o=>`Record-Route: ${o}`),r=`Contact: ${this.core.configuration.contact}`;e.extraHeaders=e.extraHeaders||[],e.extraHeaders=e.extraHeaders.concat(t),e.extraHeaders.push(r);const n=super.progress(e),s=this.earlyDialog,i=Object.assign(Object.assign({},n),{session:s});return e.body&&this.earlyDialog.signalingState!==me.Stable&&this.earlyDialog.signalingStateTransition(e.body),i}redirect(e,t={statusCode:302}){return super.redirect(e,t)}reject(e={statusCode:486}){return super.reject(e)}},Ew=class extends sr{constructor(e,t,r){super(nr,e,t,r)}},Aw=class extends sr{constructor(e,t,r){super(nr,e,t,r)}},kw=class extends Vr{constructor(e,t,r){super(ir,e,t,r),this.core=e}},Iw=class extends sr{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.SUBSCRIBE,r);super(nr,e.userAgentCore,n,t),this.dialog=e}waitNotifyStop(){}receiveResponse(e){if(e.statusCode&&e.statusCode>=200&&e.statusCode<300){const t=e.getHeader("Expires");if(!t)this.logger.warn("Expires header missing in a 200-class response to SUBSCRIBE");else{const r=Number(t);this.dialog.subscriptionExpires>r&&(this.dialog.subscriptionExpires=r)}}e.statusCode&&e.statusCode>=400&&e.statusCode<700&&[404,405,410,416,480,481,482,483,484,485,489,501,604].includes(e.statusCode)&&this.dialog.terminate(),super.receiveResponse(e)}},Cp=class extends Ls{constructor(e,t,r,n,s,i){super(n,s),this.delegate=i,this._autoRefresh=!1,this._subscriptionEvent=e,this._subscriptionExpires=t,this._subscriptionExpiresInitial=t,this._subscriptionExpiresLastSet=Math.floor(Date.now()/1e3),this._subscriptionRefresh=void 0,this._subscriptionRefreshLastSet=void 0,this._subscriptionState=r,this.logger=n.loggerFactory.getLogger("sip.subscribe-dialog"),this.logger.log(`SUBSCRIBE dialog ${this.id} constructed`)}static initialDialogStateForSubscription(e,t){const n=t.getHeaders("record-route"),s=t.parseHeader("contact");if(!s)throw new Error("Contact undefined.");if(!(s instanceof yr))throw new Error("Contact not instance of NameAddrHeader.");const i=s.uri,o=e.cseq,a=void 0,l=e.callId,u=e.fromTag,c=t.fromTag;if(!l)throw new Error("Call id undefined.");if(!u)throw new Error("From tag undefined.");if(!c)throw new Error("To tag undefined.");if(!e.from)throw new Error("From undefined.");if(!e.to)throw new Error("To undefined.");const d=e.from.uri,p=e.to.uri;return{id:l+u+c,early:!1,callId:l,localTag:u,remoteTag:c,localSequenceNumber:o,remoteSequenceNumber:a,localURI:d,remoteURI:p,remoteTarget:i,routeSet:n,secure:!1}}dispose(){super.dispose(),this.N&&(clearTimeout(this.N),this.N=void 0),this.refreshTimerClear(),this.logger.log(`SUBSCRIBE dialog ${this.id} destroyed`)}get autoRefresh(){return this._autoRefresh}set autoRefresh(e){this._autoRefresh=!0,this.refreshTimerSet()}get subscriptionEvent(){return this._subscriptionEvent}get subscriptionExpires(){const e=Math.floor(Date.now()/1e3)-this._subscriptionExpiresLastSet,t=this._subscriptionExpires-e;return Math.max(t,0)}set subscriptionExpires(e){if(e<0)throw new Error("Expires must be greater than or equal to zero.");if(this._subscriptionExpires=e,this._subscriptionExpiresLastSet=Math.floor(Date.now()/1e3),this.autoRefresh){const t=this.subscriptionRefresh;(t===void 0||t>=e)&&this.refreshTimerSet()}}get subscriptionExpiresInitial(){return this._subscriptionExpiresInitial}get subscriptionRefresh(){if(this._subscriptionRefresh===void 0||this._subscriptionRefreshLastSet===void 0)return;const e=Math.floor(Date.now()/1e3)-this._subscriptionRefreshLastSet,t=this._subscriptionRefresh-e;return Math.max(t,0)}get subscriptionState(){return this._subscriptionState}receiveRequest(e){if(this.logger.log(`SUBSCRIBE dialog ${this.id} received ${e.method} request`),!this.sequenceGuard(e)){this.logger.log(`SUBSCRIBE dialog ${this.id} rejected out of order ${e.method} request.`);return}super.receiveRequest(e),e.method===be.NOTIFY?this.onNotify(e):(this.logger.log(`SUBSCRIBE dialog ${this.id} received unimplemented ${e.method} request`),this.core.replyStateless(e,{statusCode:501}))}refresh(){const e="Allow: "+Pn.toString(),t={};return t.extraHeaders=(t.extraHeaders||[]).slice(),t.extraHeaders.push(e),t.extraHeaders.push("Event: "+this.subscriptionEvent),t.extraHeaders.push("Expires: "+this.subscriptionExpiresInitial),t.extraHeaders.push("Contact: "+this.core.configuration.contact.toString()),this.subscribe(void 0,t)}subscribe(e,t={}){var r;if(this.subscriptionState!==Je.Pending&&this.subscriptionState!==Je.Active)throw new Error(`Invalid state ${this.subscriptionState}. May only re-subscribe while in state "pending" or "active".`);this.logger.log(`SUBSCRIBE dialog ${this.id} sending SUBSCRIBE request`);const n=new Iw(this,e,t);return this.N&&(clearTimeout(this.N),this.N=void 0),!((r=t.extraHeaders)===null||r===void 0)&&r.includes("Expires: 0")||(this.N=setTimeout(()=>this.timerN(),At.TIMER_N)),n}terminate(){this.stateTransition(Je.Terminated),this.onTerminated()}unsubscribe(){const e="Allow: "+Pn.toString(),t={};return t.extraHeaders=(t.extraHeaders||[]).slice(),t.extraHeaders.push(e),t.extraHeaders.push("Event: "+this.subscriptionEvent),t.extraHeaders.push("Expires: 0"),t.extraHeaders.push("Contact: "+this.core.configuration.contact.toString()),this.subscribe(void 0,t)}onNotify(e){const t=e.parseHeader("Event").event;if(!t||t!==this.subscriptionEvent){this.core.replyStateless(e,{statusCode:489});return}this.N&&(clearTimeout(this.N),this.N=void 0);const r=e.parseHeader("Subscription-State");if(!r||!r.state){this.core.replyStateless(e,{statusCode:489});return}const n=r.state,s=r.expires?Math.max(r.expires,0):void 0;switch(n){case"pending":this.stateTransition(Je.Pending,s);break;case"active":this.stateTransition(Je.Active,s);break;case"terminated":this.stateTransition(Je.Terminated,s);break;default:this.logger.warn("Unrecognized subscription state.");break}const i=new Jo(this,e);this.delegate&&this.delegate.onNotify?this.delegate.onNotify(i):i.accept()}onRefresh(e){this.delegate&&this.delegate.onRefresh&&this.delegate.onRefresh(e)}onTerminated(){this.delegate&&this.delegate.onTerminated&&this.delegate.onTerminated()}refreshTimerClear(){this.refreshTimer&&(clearTimeout(this.refreshTimer),this.refreshTimer=void 0)}refreshTimerSet(){if(this.refreshTimerClear(),this.autoRefresh&&this.subscriptionExpires>0){const e=this.subscriptionExpires*900;this._subscriptionRefresh=Math.floor(e/1e3),this._subscriptionRefreshLastSet=Math.floor(Date.now()/1e3),this.refreshTimer=setTimeout(()=>{this.refreshTimer=void 0,this._subscriptionRefresh=void 0,this._subscriptionRefreshLastSet=void 0,this.onRefresh(this.refresh())},e)}}stateTransition(e,t){const r=()=>{this.logger.warn(`Invalid subscription state transition from ${this.subscriptionState} to ${e}`)};switch(e){case Je.Initial:r();return;case Je.NotifyWait:r();return;case Je.Pending:if(this.subscriptionState!==Je.NotifyWait&&this.subscriptionState!==Je.Pending){r();return}break;case Je.Active:if(this.subscriptionState!==Je.NotifyWait&&this.subscriptionState!==Je.Pending&&this.subscriptionState!==Je.Active){r();return}break;case Je.Terminated:if(this.subscriptionState!==Je.NotifyWait&&this.subscriptionState!==Je.Pending&&this.subscriptionState!==Je.Active){r();return}break;default:r();return}e===Je.Pending&&t&&(this.subscriptionExpires=t),e===Je.Active&&t&&(this.subscriptionExpires=t),e===Je.Terminated&&this.dispose(),this._subscriptionState=e}timerN(){this.logger.warn("Timer N expired for SUBSCRIBE dialog. Timed out waiting for NOTIFY."),this.subscriptionState!==Je.Terminated&&(this.stateTransition(Je.Terminated),this.onTerminated())}},Rw=class extends sr{constructor(e,t,r){const n=t.getHeader("Event");if(!n)throw new Error("Event undefined");const s=t.getHeader("Expires");if(!s)throw new Error("Expires undefined");super(nr,e,t,r),this.delegate=r,this.subscriberId=t.callId+t.fromTag+n,this.subscriptionExpiresRequested=this.subscriptionExpires=Number(s),this.subscriptionEvent=n,this.subscriptionState=Je.NotifyWait,this.waitNotifyStart()}dispose(){super.dispose()}onNotify(e){const t=e.message.parseHeader("Event").event;if(!t||t!==this.subscriptionEvent){this.logger.warn("Failed to parse event."),e.reject({statusCode:489});return}const r=e.message.parseHeader("Subscription-State");if(!r||!r.state){this.logger.warn("Failed to parse subscription state."),e.reject({statusCode:489});return}const n=r.state;switch(n){case"pending":break;case"active":break;case"terminated":break;default:this.logger.warn(`Invalid subscription state ${n}`),e.reject({statusCode:489});return}if(n!=="terminated"&&!e.message.parseHeader("contact")){this.logger.warn("Failed to parse contact."),e.reject({statusCode:489});return}if(this.dialog)throw new Error("Dialog already created. This implementation only supports install of single subscriptions.");switch(this.waitNotifyStop(),this.subscriptionExpires=r.expires?Math.min(this.subscriptionExpires,Math.max(r.expires,0)):this.subscriptionExpires,n){case"pending":this.subscriptionState=Je.Pending;break;case"active":this.subscriptionState=Je.Active;break;case"terminated":this.subscriptionState=Je.Terminated;break;default:throw new Error(`Unrecognized state ${n}.`)}if(this.subscriptionState!==Je.Terminated){const s=Cp.initialDialogStateForSubscription(this.message,e.message);this.dialog=new Cp(this.subscriptionEvent,this.subscriptionExpires,this.subscriptionState,this.core,s)}if(this.delegate&&this.delegate.onNotify){const s=e,i=this.dialog;this.delegate.onNotify({request:s,subscription:i})}else e.accept()}waitNotifyStart(){this.N||(this.core.subscribers.set(this.subscriberId,this),this.N=setTimeout(()=>this.timerN(),At.TIMER_N))}waitNotifyStop(){this.N&&(this.core.subscribers.delete(this.subscriberId),clearTimeout(this.N),this.N=void 0)}receiveResponse(e){if(this.authenticationGuard(e)){if(e.statusCode&&e.statusCode>=200&&e.statusCode<300){const t=e.getHeader("Expires");if(!t)this.logger.warn("Expires header missing in a 200-class response to SUBSCRIBE");else{const r=Number(t);r>this.subscriptionExpiresRequested&&this.logger.warn("Expires header in a 200-class response to SUBSCRIBE with a higher value than the one in the request"),r<this.subscriptionExpires&&(this.subscriptionExpires=r)}this.dialog&&this.dialog.subscriptionExpires>this.subscriptionExpires&&(this.dialog.subscriptionExpires=this.subscriptionExpires)}e.statusCode&&e.statusCode>=300&&e.statusCode<700&&this.waitNotifyStop(),super.receiveResponse(e)}}timerN(){this.logger.warn("Timer N expired for SUBSCRIBE user agent client. Timed out waiting for NOTIFY."),this.waitNotifyStop(),this.delegate&&this.delegate.onNotifyTimeout&&this.delegate.onNotifyTimeout()}},$w=class extends Vr{constructor(e,t,r){super(ir,e,t,r),this.core=e}},xp=["application/sdp","application/dtmf-relay"],Pw=class{constructor(e,t={}){this.userAgentClients=new Map,this.userAgentServers=new Map,this.configuration=e,this.delegate=t,this.dialogs=new Map,this.subscribers=new Map,this.logger=e.loggerFactory.getLogger("sip.user-agent-core")}dispose(){this.reset()}reset(){this.dialogs.forEach(e=>e.dispose()),this.dialogs.clear(),this.subscribers.forEach(e=>e.dispose()),this.subscribers.clear(),this.userAgentClients.forEach(e=>e.dispose()),this.userAgentClients.clear(),this.userAgentServers.forEach(e=>e.dispose()),this.userAgentServers.clear()}get loggerFactory(){return this.configuration.loggerFactory}get transport(){const e=this.configuration.transportAccessor();if(!e)throw new Error("Transport undefined.");return e}invite(e,t){return new Tw(this,e,t)}message(e,t){return new bp(this,e,t)}publish(e,t){return new Ew(this,e,t)}register(e,t){return new Aw(this,e,t)}subscribe(e,t){return new Rw(this,e,t)}request(e,t){return new sr(nr,this,e,t)}makeOutgoingRequestMessage(e,t,r,n,s,i,o){const a=this.configuration.sipjsId,l=this.configuration.displayName,u=this.configuration.viaForceRport,c=this.configuration.hackViaTcp,d=this.configuration.supportedOptionTags.slice();e===be.REGISTER&&d.push("path","gruu"),e===be.INVITE&&(this.configuration.contact.pubGruu||this.configuration.contact.tempGruu)&&d.push("gruu");const p={callIdPrefix:a,forceRport:u,fromDisplayName:l,hackViaTcp:c,optionTags:d,routeSet:this.configuration.routeSet,userAgentString:this.configuration.userAgentHeaderFieldValue,viaHost:this.configuration.viaHost};return new Ul(e,t,r,n,Object.assign(Object.assign({},p),s),i,o)}receiveIncomingRequestFromTransport(e){this.receiveRequestFromTransport(e)}receiveIncomingResponseFromTransport(e){this.receiveResponseFromTransport(e)}replyStateless(e,t){const r=this.configuration.userAgentHeaderFieldValue,n=this.configuration.supportedOptionTagsResponse;t=Object.assign(Object.assign({},t),{userAgent:r,supported:n});const s=vp(e,t);return this.transport.send(s.message).catch(i=>{i instanceof Error&&this.logger.error(i.message),this.logger.error(`Transport error occurred sending stateless reply to ${e.method} request.`)}),s}receiveRequestFromTransport(e){const t=e.viaBranch,r=this.userAgentServers.get(t);if(e.method===be.ACK&&r&&r.transaction.state===j.Accepted&&r instanceof Jl){this.logger.warn(`Discarding out of dialog ACK after 2xx response sent on transaction ${t}.`);return}if(e.method===be.CANCEL){r?(this.replyStateless(e,{statusCode:200}),r.transaction instanceof Qt&&r.transaction.state===j.Proceeding&&r instanceof Jl&&r.receiveCancel(e)):this.replyStateless(e,{statusCode:481});return}if(r){r.transaction.receiveRequest(e);return}this.receiveRequest(e)}receiveRequest(e){if(!Pn.includes(e.method)){const n="Allow: "+Pn.toString();this.replyStateless(e,{statusCode:405,extraHeaders:[n]});return}if(!e.ruri)throw new Error("Request-URI undefined.");if(e.ruri.scheme!=="sip"){this.replyStateless(e,{statusCode:416});return}const t=e.ruri,r=n=>!!n&&n.user===t.user;if(!r(this.configuration.aor)&&!(r(this.configuration.contact.uri)||r(this.configuration.contact.pubGruu)||r(this.configuration.contact.tempGruu))){this.logger.warn("Request-URI does not point to us."),e.method!==be.ACK&&this.replyStateless(e,{statusCode:404});return}if(e.method===be.INVITE&&!e.hasHeader("Contact")){this.replyStateless(e,{statusCode:400,reasonPhrase:"Missing Contact Header"});return}if(!e.toTag){const n=e.viaBranch;if(!this.userAgentServers.has(n)&&Array.from(this.userAgentServers.values()).some(s=>s.transaction.request.fromTag===e.fromTag&&s.transaction.request.callId===e.callId&&s.transaction.request.cseq===e.cseq)){this.replyStateless(e,{statusCode:482});return}}e.toTag?this.receiveInsideDialogRequest(e):this.receiveOutsideDialogRequest(e)}receiveInsideDialogRequest(e){if(e.method===be.NOTIFY){const n=e.parseHeader("Event");if(!n||!n.event){this.replyStateless(e,{statusCode:489});return}const s=e.callId+e.toTag+n.event,i=this.subscribers.get(s);if(i){const o=new Jo(this,e);i.onNotify(o);return}}const t=e.callId+e.toTag+e.fromTag,r=this.dialogs.get(t);if(r){if(e.method===be.OPTIONS){const n="Allow: "+Pn.toString(),s="Accept: "+xp.toString();this.replyStateless(e,{statusCode:200,extraHeaders:[n,s]});return}r.receiveRequest(e);return}e.method!==be.ACK&&this.replyStateless(e,{statusCode:481})}receiveOutsideDialogRequest(e){switch(e.method){case be.ACK:break;case be.BYE:this.replyStateless(e,{statusCode:481});break;case be.CANCEL:throw new Error(`Unexpected out of dialog request method ${e.method}.`);case be.INFO:this.replyStateless(e,{statusCode:405});break;case be.INVITE:{const t=new Jl(this,e);this.delegate.onInvite?this.delegate.onInvite(t):t.reject()}break;case be.MESSAGE:{const t=new _p(this,e);this.delegate.onMessage?this.delegate.onMessage(t):t.accept()}break;case be.NOTIFY:{const t=new Jo(this,e);this.delegate.onNotify?this.delegate.onNotify(t):t.reject({statusCode:405})}break;case be.OPTIONS:{const t="Allow: "+Pn.toString(),r="Accept: "+xp.toString();this.replyStateless(e,{statusCode:200,extraHeaders:[t,r]})}break;case be.REFER:{const t=new Sp(this,e);this.delegate.onRefer?this.delegate.onRefer(t):t.reject({statusCode:405})}break;case be.REGISTER:{const t=new kw(this,e);this.delegate.onRegister?this.delegate.onRegister(t):t.reject({statusCode:405})}break;case be.SUBSCRIBE:{const t=new $w(this,e);this.delegate.onSubscribe?this.delegate.onSubscribe(t):t.reject({statusCode:480})}break;default:throw new Error(`Unexpected out of dialog request method ${e.method}.`)}}receiveResponseFromTransport(e){if(e.getHeaders("via").length>1){this.logger.warn("More than one Via header field present in the response, dropping");return}const t=e.viaBranch+e.method,r=this.userAgentClients.get(t);r?r.transaction.receiveResponse(e):this.logger.warn(`Discarding unmatched ${e.statusCode} response to ${e.method} ${t}.`)}};function Dw(){return e=>!e.audio&&!e.video?Promise.resolve(new MediaStream):navigator.mediaDevices===void 0?Promise.reject(new Error("Media devices not available in insecure contexts.")):navigator.mediaDevices.getUserMedia.call(navigator.mediaDevices,e)}function Ow(){return{bundlePolicy:"balanced",certificates:void 0,iceCandidatePoolSize:0,iceServers:[{urls:"stun:stun.l.google.com:19302"}],iceTransportPolicy:"all",rtcpMuxPolicy:"require"}}var Hw=class Wn{constructor(t,r,n){t.debug("SessionDescriptionHandler.constructor"),this.logger=t,this.mediaStreamFactory=r,this.sessionDescriptionHandlerConfiguration=n,this._localMediaStream=new MediaStream,this._remoteMediaStream=new MediaStream,this._peerConnection=new RTCPeerConnection(n?.peerConnectionConfiguration),this.initPeerConnectionEventHandlers()}get localMediaStream(){return this._localMediaStream}get remoteMediaStream(){return this._remoteMediaStream}get dataChannel(){return this._dataChannel}get peerConnection(){return this._peerConnection}get peerConnectionDelegate(){return this._peerConnectionDelegate}set peerConnectionDelegate(t){this._peerConnectionDelegate=t}static dispatchAddTrackEvent(t,r){t.dispatchEvent(new MediaStreamTrackEvent("addtrack",{track:r}))}static dispatchRemoveTrackEvent(t,r){t.dispatchEvent(new MediaStreamTrackEvent("removetrack",{track:r}))}close(){this.logger.debug("SessionDescriptionHandler.close"),this._peerConnection!==void 0&&(this._peerConnection.getReceivers().forEach(t=>{t.track&&t.track.stop()}),this._peerConnection.getSenders().forEach(t=>{t.track&&t.track.stop()}),this._dataChannel&&this._dataChannel.close(),this._peerConnection.close(),this._peerConnection=void 0)}enableReceiverTracks(t){const r=this.peerConnection;if(!r)throw new Error("Peer connection closed.");r.getReceivers().forEach(n=>{n.track&&(n.track.enabled=t)})}enableSenderTracks(t){const r=this.peerConnection;if(!r)throw new Error("Peer connection closed.");r.getSenders().forEach(n=>{n.track&&(n.track.enabled=t)})}getDescription(t,r){var n,s;if(this.logger.debug("SessionDescriptionHandler.getDescription"),this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));this.onDataChannel=t?.onDataChannel;const i=(n=t?.offerOptions)===null||n===void 0?void 0:n.iceRestart,o=t?.iceGatheringTimeout===void 0?(s=this.sessionDescriptionHandlerConfiguration)===null||s===void 0?void 0:s.iceGatheringTimeout:t?.iceGatheringTimeout;return this.getLocalMediaStream(t).then(()=>this.updateDirection(t)).then(()=>this.createDataChannel(t)).then(()=>this.createLocalOfferOrAnswer(t)).then(a=>this.applyModifiers(a,r)).then(a=>this.setLocalSessionDescription(a)).then(()=>this.waitForIceGatheringComplete(i,o)).then(()=>this.getLocalSessionDescription()).then(a=>({body:a.sdp,contentType:"application/sdp"})).catch(a=>{throw this.logger.error("SessionDescriptionHandler.getDescription failed - "+a),a})}hasDescription(t){return this.logger.debug("SessionDescriptionHandler.hasDescription"),t==="application/sdp"}iceGatheringComplete(){this.logger.debug("SessionDescriptionHandler.iceGatheringComplete"),this.iceGatheringCompleteTimeoutId!==void 0&&(this.logger.debug("SessionDescriptionHandler.iceGatheringComplete - clearing timeout"),clearTimeout(this.iceGatheringCompleteTimeoutId),this.iceGatheringCompleteTimeoutId=void 0),this.iceGatheringCompletePromise!==void 0&&(this.logger.debug("SessionDescriptionHandler.iceGatheringComplete - resolving promise"),this.iceGatheringCompleteResolve&&this.iceGatheringCompleteResolve(),this.iceGatheringCompletePromise=void 0,this.iceGatheringCompleteResolve=void 0,this.iceGatheringCompleteReject=void 0)}sendDtmf(t,r){if(this.logger.debug("SessionDescriptionHandler.sendDtmf"),this._peerConnection===void 0)return this.logger.error("SessionDescriptionHandler.sendDtmf failed - peer connection closed"),!1;const n=this._peerConnection.getSenders();if(n.length===0)return this.logger.error("SessionDescriptionHandler.sendDtmf failed - no senders"),!1;const s=n[0].dtmf;if(!s)return this.logger.error("SessionDescriptionHandler.sendDtmf failed - no DTMF sender"),!1;const i=r?.duration,o=r?.interToneGap;try{s.insertDTMF(t,i,o)}catch(a){return this.logger.error(a.toString()),!1}return this.logger.log("SessionDescriptionHandler.sendDtmf sent via RTP: "+t.toString()),!0}setDescription(t,r,n){if(this.logger.debug("SessionDescriptionHandler.setDescription"),this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));this.onDataChannel=r?.onDataChannel;const s=this._peerConnection.signalingState==="have-local-offer"?"answer":"offer";return this.getLocalMediaStream(r).then(()=>this.applyModifiers({sdp:t,type:s},n)).then(i=>this.setRemoteSessionDescription(i)).catch(i=>{throw this.logger.error("SessionDescriptionHandler.setDescription failed - "+i),i})}applyModifiers(t,r){return this.logger.debug("SessionDescriptionHandler.applyModifiers"),!r||r.length===0?Promise.resolve(t):r.reduce((n,s)=>n.then(s),Promise.resolve(t)).then(n=>{if(this.logger.debug("SessionDescriptionHandler.applyModifiers - modified sdp"),!n.sdp||!n.type)throw new Error("Invalid SDP.");return{sdp:n.sdp,type:n.type}})}createDataChannel(t){if(this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));if(t?.dataChannel!==!0||this._dataChannel)return Promise.resolve();switch(this._peerConnection.signalingState){case"stable":this.logger.debug("SessionDescriptionHandler.createDataChannel - creating data channel");try{return this._dataChannel=this._peerConnection.createDataChannel(t?.dataChannelLabel||"",t?.dataChannelOptions),this.onDataChannel&&this.onDataChannel(this._dataChannel),Promise.resolve()}catch(r){return Promise.reject(r)}case"have-remote-offer":return Promise.resolve();default:return Promise.reject(new Error("Invalid signaling state "+this._peerConnection.signalingState))}}createLocalOfferOrAnswer(t){if(this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));switch(this._peerConnection.signalingState){case"stable":return this.logger.debug("SessionDescriptionHandler.createLocalOfferOrAnswer - creating SDP offer"),this._peerConnection.createOffer(t?.offerOptions);case"have-remote-offer":return this.logger.debug("SessionDescriptionHandler.createLocalOfferOrAnswer - creating SDP answer"),this._peerConnection.createAnswer(t?.answerOptions);default:return Promise.reject(new Error("Invalid signaling state "+this._peerConnection.signalingState))}}getLocalMediaStream(t){if(this.logger.debug("SessionDescriptionHandler.getLocalMediaStream"),this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));let r=Object.assign({},t?.constraints);if(this.localMediaStreamConstraints){if(r.audio=r.audio||this.localMediaStreamConstraints.audio,r.video=r.video||this.localMediaStreamConstraints.video,JSON.stringify(this.localMediaStreamConstraints.audio)===JSON.stringify(r.audio)&&JSON.stringify(this.localMediaStreamConstraints.video)===JSON.stringify(r.video))return Promise.resolve()}else r.audio===void 0&&r.video===void 0&&(r={audio:!0});return this.localMediaStreamConstraints=r,this.mediaStreamFactory(r,this,t).then(n=>this.setLocalMediaStream(n))}setLocalMediaStream(t){if(this.logger.debug("SessionDescriptionHandler.setLocalMediaStream"),!this._peerConnection)throw new Error("Peer connection undefined.");const r=this._peerConnection,n=this._localMediaStream,s=[],i=l=>{const u=l.kind;if(u!=="audio"&&u!=="video")throw new Error(`Unknown new track kind ${u}.`);const c=r.getSenders().find(d=>d.track&&d.track.kind===u);c?s.push(new Promise(d=>{this.logger.debug(`SessionDescriptionHandler.setLocalMediaStream - replacing sender ${u} track`),d()}).then(()=>c.replaceTrack(l).then(()=>{const d=n.getTracks().find(p=>p.kind===u);d&&(d.stop(),n.removeTrack(d),Wn.dispatchRemoveTrackEvent(n,d)),n.addTrack(l),Wn.dispatchAddTrackEvent(n,l)}).catch(d=>{throw this.logger.error(`SessionDescriptionHandler.setLocalMediaStream - failed to replace sender ${u} track`),d}))):s.push(new Promise(d=>{this.logger.debug(`SessionDescriptionHandler.setLocalMediaStream - adding sender ${u} track`),d()}).then(()=>{try{r.addTrack(l,n)}catch(d){throw this.logger.error(`SessionDescriptionHandler.setLocalMediaStream - failed to add sender ${u} track`),d}n.addTrack(l),Wn.dispatchAddTrackEvent(n,l)}))},o=t.getAudioTracks();o.length&&i(o[0]);const a=t.getVideoTracks();return a.length&&i(a[0]),s.reduce((l,u)=>l.then(()=>u),Promise.resolve())}getLocalSessionDescription(){if(this.logger.debug("SessionDescriptionHandler.getLocalSessionDescription"),this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));const t=this._peerConnection.localDescription;return t?Promise.resolve(t):Promise.reject(new Error("Failed to get local session description"))}setLocalSessionDescription(t){return this.logger.debug("SessionDescriptionHandler.setLocalSessionDescription"),this._peerConnection===void 0?Promise.reject(new Error("Peer connection closed.")):this._peerConnection.setLocalDescription(t)}setRemoteSessionDescription(t){if(this.logger.debug("SessionDescriptionHandler.setRemoteSessionDescription"),this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));const r=t.sdp;let n;switch(this._peerConnection.signalingState){case"stable":n="offer";break;case"have-local-offer":n="answer";break;default:return Promise.reject(new Error("Invalid signaling state "+this._peerConnection.signalingState))}return r?this._peerConnection.setRemoteDescription({sdp:r,type:n}):(this.logger.error("SessionDescriptionHandler.setRemoteSessionDescription failed - cannot set null sdp"),Promise.reject(new Error("SDP is undefined")))}setRemoteTrack(t){this.logger.debug("SessionDescriptionHandler.setRemoteTrack");const r=this._remoteMediaStream;r.getTrackById(t.id)?this.logger.debug(`SessionDescriptionHandler.setRemoteTrack - have remote ${t.kind} track`):t.kind==="audio"?(this.logger.debug(`SessionDescriptionHandler.setRemoteTrack - adding remote ${t.kind} track`),r.getAudioTracks().forEach(n=>{n.stop(),r.removeTrack(n),Wn.dispatchRemoveTrackEvent(r,n)}),r.addTrack(t),Wn.dispatchAddTrackEvent(r,t)):t.kind==="video"&&(this.logger.debug(`SessionDescriptionHandler.setRemoteTrack - adding remote ${t.kind} track`),r.getVideoTracks().forEach(n=>{n.stop(),r.removeTrack(n),Wn.dispatchRemoveTrackEvent(r,n)}),r.addTrack(t),Wn.dispatchAddTrackEvent(r,t))}updateDirection(t){if(this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));switch(this._peerConnection.signalingState){case"stable":this.logger.debug("SessionDescriptionHandler.updateDirection - setting offer direction");{const r=n=>{switch(n){case"inactive":return t?.hold?"inactive":"recvonly";case"recvonly":return t?.hold?"inactive":"recvonly";case"sendonly":return t?.hold?"sendonly":"sendrecv";case"sendrecv":return t?.hold?"sendonly":"sendrecv";case"stopped":return"stopped";default:throw new Error("Should never happen")}};this._peerConnection.getTransceivers().forEach(n=>{if(n.direction){const s=r(n.direction);n.direction!==s&&(n.direction=s)}})}break;case"have-remote-offer":this.logger.debug("SessionDescriptionHandler.updateDirection - setting answer direction");{const r=(()=>{const s=this._peerConnection.remoteDescription;if(!s)throw new Error("Failed to read remote offer");const i=/a=sendrecv\r\n|a=sendonly\r\n|a=recvonly\r\n|a=inactive\r\n/.exec(s.sdp);if(i)switch(i[0]){case`a=inactive\r
52
+ `,this.send(l).catch(u=>{this.logTransportError(u,"Failed to send ACK to non-2xx response.")})}stateTransition(e,t=!1){const r=()=>{throw new Error(`Invalid state transition from ${this.state} to ${e}`)};switch(e){case j.Calling:r();break;case j.Proceeding:this.state!==j.Calling&&r();break;case j.Accepted:case j.Completed:this.state!==j.Calling&&this.state!==j.Proceeding&&r();break;case j.Terminated:this.state!==j.Calling&&this.state!==j.Accepted&&this.state!==j.Completed&&(t||r());break;default:r()}this.B&&(clearTimeout(this.B),this.B=void 0),j.Proceeding,e===j.Completed&&(this.D=setTimeout(()=>this.timerD(),At.TIMER_D)),e===j.Accepted&&(this.M=setTimeout(()=>this.timerM(),At.TIMER_M)),e===j.Terminated&&this.dispose(),this.setState(e)}timerA(){}timerB(){this.logger.debug(`Timer B expired for INVITE client transaction ${this.id}.`),this.state===j.Calling&&(this.onRequestTimeout(),this.stateTransition(j.Terminated))}timerD(){this.logger.debug(`Timer D expired for INVITE client transaction ${this.id}.`),this.state===j.Completed&&this.stateTransition(j.Terminated)}timerM(){this.logger.debug(`Timer M expired for INVITE client transaction ${this.id}.`),this.state===j.Accepted&&this.stateTransition(j.Terminated)}},ir=class du{constructor(t,r,n,s){this.transactionConstructor=t,this.core=r,this.message=n,this.delegate=s,this.challenged=!1,this.stale=!1,this.logger=this.loggerFactory.getLogger("sip.user-agent-client"),this.init()}dispose(){this.transaction.dispose()}get loggerFactory(){return this.core.loggerFactory}get transaction(){if(!this._transaction)throw new Error("Transaction undefined.");return this._transaction}cancel(t,r={}){if(!this.transaction)throw new Error("Transaction undefined.");if(!this.message.to)throw new Error("To undefined.");if(!this.message.from)throw new Error("From undefined.");const n=this.core.makeOutgoingRequestMessage(be.CANCEL,this.message.ruri,this.message.from.uri,this.message.to.uri,{toTag:this.message.toTag,fromTag:this.message.fromTag,callId:this.message.callId,cseq:this.message.cseq},r.extraHeaders);return n.branch=this.message.branch,this.message.headers.Route&&(n.headers.Route=this.message.headers.Route),t&&n.setHeader("Reason",t),this.transaction.state===j.Proceeding?new du(sr,this.core,n):this.transaction.addStateChangeListener(()=>{this.transaction&&this.transaction.state===j.Proceeding&&new du(sr,this.core,n)},{once:!0}),n}authenticationGuard(t,r){const n=t.statusCode;if(!n)throw new Error("Response status code undefined.");if(n!==401&&n!==407)return!0;let s,i;if(n===401?(s=t.parseHeader("www-authenticate"),i="authorization"):(s=t.parseHeader("proxy-authenticate"),i="proxy-authorization"),!s)return this.logger.warn(n+" with wrong or missing challenge, cannot authenticate"),!0;if(this.challenged&&(this.stale||s.stale!==!0))return this.logger.warn(n+" apparently in authentication loop, cannot authenticate"),!0;if(!this.credentials&&(this.credentials=this.core.configuration.authenticationFactory(),!this.credentials))return this.logger.warn("Unable to obtain credentials, cannot authenticate"),!0;if(!this.credentials.authenticate(this.message,s))return!0;this.challenged=!0,s.stale&&(this.stale=!0);let o=this.message.cseq+=1;return r&&r.localSequenceNumber&&(r.incrementLocalSequenceNumber(),o=this.message.cseq=r.localSequenceNumber),this.message.setHeader("cseq",o+" "+this.message.method),this.message.setHeader(i,this.credentials.toString()),this.init(),!1}onRequestTimeout(){this.logger.warn("User agent client request timed out. Generating internal 408 Request Timeout.");const t=new Rn;t.statusCode=408,t.reasonPhrase="Request Timeout",this.receiveResponse(t)}onTransportError(t){this.logger.error(t.message),this.logger.error("User agent client request transport error. Generating internal 503 Service Unavailable.");const r=new Rn;r.statusCode=503,r.reasonPhrase="Service Unavailable",this.receiveResponse(r)}receiveResponse(t){if(!this.authenticationGuard(t))return;const r=t.statusCode?t.statusCode.toString():"";if(!r)throw new Error("Response status code undefined.");switch(!0){case/^100$/.test(r):this.delegate&&this.delegate.onTrying&&this.delegate.onTrying({message:t});break;case/^1[0-9]{2}$/.test(r):this.delegate&&this.delegate.onProgress&&this.delegate.onProgress({message:t});break;case/^2[0-9]{2}$/.test(r):this.delegate&&this.delegate.onAccept&&this.delegate.onAccept({message:t});break;case/^3[0-9]{2}$/.test(r):this.delegate&&this.delegate.onRedirect&&this.delegate.onRedirect({message:t});break;case/^[4-6][0-9]{2}$/.test(r):this.delegate&&this.delegate.onReject&&this.delegate.onReject({message:t});break;default:throw new Error(`Invalid status code ${r}`)}}init(){const t={loggerFactory:this.loggerFactory,onRequestTimeout:()=>this.onRequestTimeout(),onStateChange:s=>{s===j.Terminated&&(this.core.userAgentClients.delete(n),r===this._transaction&&this.dispose())},onTransportError:s=>this.onTransportError(s),receiveResponse:s=>this.receiveResponse(s)},r=new this.transactionConstructor(this.message,this.core.transport,t);this._transaction=r;const n=r.id+r.request.method;this.core.userAgentClients.set(n,this)}},hw=class extends ir{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.BYE,r);super(sr,e.userAgentCore,n,t),e.dispose()}},or=class extends wp{constructor(e,t,r){super(e,t,r,j.Trying,"sip.transaction.nist")}dispose(){this.J&&(clearTimeout(this.J),this.J=void 0),super.dispose()}get kind(){return"nist"}receiveRequest(e){switch(this.state){case j.Trying:break;case j.Proceeding:if(!this.lastResponse)throw new Error("Last response undefined.");this.send(this.lastResponse).catch(t=>{this.logTransportError(t,"Failed to send retransmission of provisional response.")});break;case j.Completed:if(!this.lastResponse)throw new Error("Last response undefined.");this.send(this.lastResponse).catch(t=>{this.logTransportError(t,"Failed to send retransmission of final response.")});break;case j.Terminated:break;default:throw new Error(`Invalid state ${this.state}`)}}receiveResponse(e,t){if(e<100||e>699)throw new Error(`Invalid status code ${e}`);if(e>100&&e<=199)throw new Error("Provisional response other than 100 not allowed.");switch(this.state){case j.Trying:if(this.lastResponse=t,e>=100&&e<200){this.stateTransition(j.Proceeding),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send provisional response.")});return}if(e>=200&&e<=699){this.stateTransition(j.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send final response.")});return}break;case j.Proceeding:if(this.lastResponse=t,e>=200&&e<=699){this.stateTransition(j.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send final response.")});return}break;case j.Completed:return;case j.Terminated:break;default:throw new Error(`Invalid state ${this.state}`)}const r=`Non-INVITE server transaction received unexpected ${e} response from TU while in state ${this.state}.`;throw this.logger.error(r),new Error(r)}onTransportError(e){this.user.onTransportError&&this.user.onTransportError(e),this.stateTransition(j.Terminated,!0)}typeToString(){return"non-INVITE server transaction"}stateTransition(e,t=!1){const r=()=>{throw new Error(`Invalid state transition from ${this.state} to ${e}`)};switch(e){case j.Trying:r();break;case j.Proceeding:this.state!==j.Trying&&r();break;case j.Completed:this.state!==j.Trying&&this.state!==j.Proceeding&&r();break;case j.Terminated:this.state!==j.Proceeding&&this.state!==j.Completed&&(t||r());break;default:r()}e===j.Completed&&(this.J=setTimeout(()=>this.timerJ(),At.TIMER_J)),e===j.Terminated&&this.dispose(),this.setState(e)}timerJ(){this.logger.debug(`Timer J expired for NON-INVITE server transaction ${this.id}.`),this.state===j.Completed&&this.stateTransition(j.Terminated)}},Fr=class{constructor(e,t,r,n){this.transactionConstructor=e,this.core=t,this.message=r,this.delegate=n,this.logger=this.loggerFactory.getLogger("sip.user-agent-server"),this.toTag=r.toTag?r.toTag:zo(),this.init()}dispose(){this.transaction.dispose()}get loggerFactory(){return this.core.loggerFactory}get transaction(){if(!this._transaction)throw new Error("Transaction undefined.");return this._transaction}accept(e={statusCode:200}){if(!this.acceptable)throw new $n(`${this.message.method} not acceptable in state ${this.transaction.state}.`);const t=e.statusCode;if(t<200||t>299)throw new TypeError(`Invalid statusCode: ${t}`);return this.reply(e)}progress(e={statusCode:180}){if(!this.progressable)throw new $n(`${this.message.method} not progressable in state ${this.transaction.state}.`);const t=e.statusCode;if(t<101||t>199)throw new TypeError(`Invalid statusCode: ${t}`);return this.reply(e)}redirect(e,t={statusCode:302}){if(!this.redirectable)throw new $n(`${this.message.method} not redirectable in state ${this.transaction.state}.`);const r=t.statusCode;if(r<300||r>399)throw new TypeError(`Invalid statusCode: ${r}`);const n=new Array;return e.forEach(s=>n.push(`Contact: ${s.toString()}`)),t.extraHeaders=(t.extraHeaders||[]).concat(n),this.reply(t)}reject(e={statusCode:480}){if(!this.rejectable)throw new $n(`${this.message.method} not rejectable in state ${this.transaction.state}.`);const t=e.statusCode;if(t<400||t>699)throw new TypeError(`Invalid statusCode: ${t}`);return this.reply(e)}trying(e){if(!this.tryingable)throw new $n(`${this.message.method} not tryingable in state ${this.transaction.state}.`);return this.reply({statusCode:100})}receiveCancel(e){this.delegate&&this.delegate.onCancel&&this.delegate.onCancel(e)}get acceptable(){if(this.transaction instanceof er)return this.transaction.state===j.Proceeding||this.transaction.state===j.Accepted;if(this.transaction instanceof or)return this.transaction.state===j.Trying||this.transaction.state===j.Proceeding;throw new Error("Unknown transaction type.")}get progressable(){if(this.transaction instanceof er)return this.transaction.state===j.Proceeding;if(this.transaction instanceof or)return!1;throw new Error("Unknown transaction type.")}get redirectable(){if(this.transaction instanceof er)return this.transaction.state===j.Proceeding;if(this.transaction instanceof or)return this.transaction.state===j.Trying||this.transaction.state===j.Proceeding;throw new Error("Unknown transaction type.")}get rejectable(){if(this.transaction instanceof er)return this.transaction.state===j.Proceeding;if(this.transaction instanceof or)return this.transaction.state===j.Trying||this.transaction.state===j.Proceeding;throw new Error("Unknown transaction type.")}get tryingable(){if(this.transaction instanceof er)return this.transaction.state===j.Proceeding;if(this.transaction instanceof or)return this.transaction.state===j.Trying;throw new Error("Unknown transaction type.")}reply(e){!e.toTag&&e.statusCode!==100&&(e.toTag=this.toTag),e.userAgent=e.userAgent||this.core.configuration.userAgentHeaderFieldValue,e.supported=e.supported||this.core.configuration.supportedOptionTagsResponse;const t=vp(this.message,e);return this.transaction.receiveResponse(e.statusCode,t.message),t}init(){const e={loggerFactory:this.loggerFactory,onStateChange:n=>{n===j.Terminated&&(this.core.userAgentServers.delete(r),this.dispose())},onTransportError:n=>{this.logger.error(n.message),this.delegate&&this.delegate.onTransportError?this.delegate.onTransportError(n):this.logger.error("User agent server response transport error.")}},t=new this.transactionConstructor(this.message,this.core.transport,e);this._transaction=t;const r=t.id;this.core.userAgentServers.set(t.id,this)}},gw=class extends Fr{constructor(e,t,r){super(or,e.userAgentCore,t,r)}},vw=class extends ir{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.INFO,r);super(sr,e.userAgentCore,n,t)}},mw=class extends Fr{constructor(e,t,r){super(or,e.userAgentCore,t,r)}},bp=class extends ir{constructor(e,t,r){super(sr,e,t,r)}},_p=class extends Fr{constructor(e,t,r){super(or,e,t,r)}},ww=class extends ir{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.NOTIFY,r);super(sr,e.userAgentCore,n,t)}};function yw(e){return e.userAgentCore!==void 0}var Yo=class extends Fr{constructor(e,t,r){const n=yw(e)?e.userAgentCore:e;super(or,n,t,r)}},bw=class extends ir{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.PRACK,r);super(sr,e.userAgentCore,n,t),e.signalingStateTransition(n)}},_w=class extends Fr{constructor(e,t,r){super(or,e.userAgentCore,t,r),e.signalingStateTransition(t),this.dialog=e}accept(e={statusCode:200}){return e.body&&this.dialog.signalingStateTransition(e.body),super.accept(e)}},Sw=class extends ir{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.INVITE,r);super(Hn,e.userAgentCore,n,t),this.delegate=t,e.signalingStateTransition(n),e.reinviteUserAgentClient=this,this.dialog=e}receiveResponse(e){if(!this.authenticationGuard(e,this.dialog))return;const t=e.statusCode?e.statusCode.toString():"";if(!t)throw new Error("Response status code undefined.");switch(!0){case/^100$/.test(t):this.delegate&&this.delegate.onTrying&&this.delegate.onTrying({message:e});break;case/^1[0-9]{2}$/.test(t):this.delegate&&this.delegate.onProgress&&this.delegate.onProgress({message:e,session:this.dialog,prack:r=>{throw new Error("Unimplemented.")}});break;case/^2[0-9]{2}$/.test(t):this.dialog.signalingStateTransition(e),this.delegate&&this.delegate.onAccept&&this.delegate.onAccept({message:e,session:this.dialog,ack:r=>this.dialog.ack(r)});break;case/^3[0-9]{2}$/.test(t):this.dialog.signalingStateRollback(),this.dialog.reinviteUserAgentClient=void 0,this.delegate&&this.delegate.onRedirect&&this.delegate.onRedirect({message:e});break;case/^[4-6][0-9]{2}$/.test(t):this.dialog.signalingStateRollback(),this.dialog.reinviteUserAgentClient=void 0,this.delegate&&this.delegate.onReject&&this.delegate.onReject({message:e});break;default:throw new Error(`Invalid status code ${t}`)}}},Cw=class extends Fr{constructor(e,t,r){super(er,e.userAgentCore,t,r),e.reinviteUserAgentServer=this,this.dialog=e}accept(e={statusCode:200}){e.extraHeaders=e.extraHeaders||[],e.extraHeaders=e.extraHeaders.concat(this.dialog.routeSet.map(s=>`Record-Route: ${s}`));const t=super.accept(e),r=this.dialog,n=Object.assign(Object.assign({},t),{session:r});return e.body&&this.dialog.signalingStateTransition(e.body),this.dialog.reConfirm(),n}progress(e={statusCode:180}){const t=super.progress(e),r=this.dialog,n=Object.assign(Object.assign({},t),{session:r});return e.body&&this.dialog.signalingStateTransition(e.body),n}redirect(e,t={statusCode:302}){throw this.dialog.signalingStateRollback(),this.dialog.reinviteUserAgentServer=void 0,new Error("Unimplemented.")}reject(e={statusCode:488}){return this.dialog.signalingStateRollback(),this.dialog.reinviteUserAgentServer=void 0,super.reject(e)}},xw=class extends ir{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.REFER,r);super(sr,e.userAgentCore,n,t)}};function Tw(e){return e.userAgentCore!==void 0}var Sp=class extends Fr{constructor(e,t,r){const n=Tw(e)?e.userAgentCore:e;super(or,n,t,r)}},Zo=class extends Fs{constructor(e,t,r,n){super(t,r),this.initialTransaction=e,this._signalingState=ve.Initial,this.ackWait=!1,this.ackProcessing=!1,this.delegate=n,e instanceof er&&(this.ackWait=!0),this.early||this.start2xxRetransmissionTimer(),this.signalingStateTransition(e.request),this.logger=t.loggerFactory.getLogger("sip.invite-dialog"),this.logger.log(`INVITE dialog ${this.id} constructed`)}dispose(){super.dispose(),this._signalingState=ve.Closed,this._offer=void 0,this._answer=void 0,this.invite2xxTimer&&(clearTimeout(this.invite2xxTimer),this.invite2xxTimer=void 0),this.logger.log(`INVITE dialog ${this.id} destroyed`)}get sessionState(){return this.early?yr.Early:this.ackWait?yr.AckWait:this._signalingState===ve.Closed?yr.Terminated:yr.Confirmed}get signalingState(){return this._signalingState}get offer(){return this._offer}get answer(){return this._answer}confirm(){this.early&&this.start2xxRetransmissionTimer(),super.confirm()}reConfirm(){this.reinviteUserAgentServer&&this.startReInvite2xxRetransmissionTimer()}ack(e={}){this.logger.log(`INVITE dialog ${this.id} sending ACK request`);let t;if(this.reinviteUserAgentClient){if(!(this.reinviteUserAgentClient.transaction instanceof Hn))throw new Error("Transaction not instance of InviteClientTransaction.");t=this.reinviteUserAgentClient.transaction,this.reinviteUserAgentClient=void 0}else{if(!(this.initialTransaction instanceof Hn))throw new Error("Initial transaction not instance of InviteClientTransaction.");t=this.initialTransaction}const r=this.createOutgoingRequestMessage(be.ACK,{cseq:t.request.cseq,extraHeaders:e.extraHeaders,body:e.body});return t.ackResponse(r),this.signalingStateTransition(r),{message:r}}bye(e,t){if(this.logger.log(`INVITE dialog ${this.id} sending BYE request`),this.initialTransaction instanceof er){if(this.early)throw new Error("UAS MUST NOT send a BYE on early dialogs.");if(this.ackWait&&this.initialTransaction.state!==j.Terminated)throw new Error("UAS MUST NOT send a BYE on a confirmed dialog until it has received an ACK for its 2xx response or until the server transaction times out.")}return new hw(this,e,t)}info(e,t){if(this.logger.log(`INVITE dialog ${this.id} sending INFO request`),this.early)throw new Error("Dialog not confirmed.");return new vw(this,e,t)}invite(e,t){if(this.logger.log(`INVITE dialog ${this.id} sending INVITE request`),this.early)throw new Error("Dialog not confirmed.");if(this.reinviteUserAgentClient)throw new Error("There is an ongoing re-INVITE client transaction.");if(this.reinviteUserAgentServer)throw new Error("There is an ongoing re-INVITE server transaction.");return new Sw(this,e,t)}message(e,t){if(this.logger.log(`INVITE dialog ${this.id} sending MESSAGE request`),this.early)throw new Error("Dialog not confirmed.");const r=this.createOutgoingRequestMessage(be.MESSAGE,t);return new bp(this.core,r,e)}notify(e,t){if(this.logger.log(`INVITE dialog ${this.id} sending NOTIFY request`),this.early)throw new Error("Dialog not confirmed.");return new ww(this,e,t)}prack(e,t){return this.logger.log(`INVITE dialog ${this.id} sending PRACK request`),new bw(this,e,t)}refer(e,t){if(this.logger.log(`INVITE dialog ${this.id} sending REFER request`),this.early)throw new Error("Dialog not confirmed.");return new xw(this,e,t)}receiveRequest(e){if(this.logger.log(`INVITE dialog ${this.id} received ${e.method} request`),e.method===be.ACK){if(this.ackWait){if(this.initialTransaction instanceof Hn){this.logger.warn(`INVITE dialog ${this.id} received unexpected ${e.method} request, dropping.`);return}if(this.initialTransaction.request.cseq!==e.cseq){this.logger.warn(`INVITE dialog ${this.id} received unexpected ${e.method} request, dropping.`);return}this.ackWait=!1}else{if(!this.reinviteUserAgentServer){this.logger.warn(`INVITE dialog ${this.id} received unexpected ${e.method} request, dropping.`);return}if(this.reinviteUserAgentServer.transaction.request.cseq!==e.cseq){this.logger.warn(`INVITE dialog ${this.id} received unexpected ${e.method} request, dropping.`);return}this.reinviteUserAgentServer=void 0}if(this.signalingStateTransition(e),this.delegate&&this.delegate.onAck){const t=this.delegate.onAck({message:e});t instanceof Promise&&(this.ackProcessing=!0,t.then(()=>this.ackProcessing=!1).catch(()=>this.ackProcessing=!1))}return}if(!this.sequenceGuard(e)){this.logger.log(`INVITE dialog ${this.id} rejected out of order ${e.method} request.`);return}if(super.receiveRequest(e),e.method===be.INVITE){const t=()=>{const n=this.ackWait?"waiting for initial ACK":"processing initial ACK";this.logger.warn(`INVITE dialog ${this.id} received re-INVITE while ${n}`);let s="RFC 5407 suggests the following to avoid this race condition... ";s+=" Note: Implementation issues are outside the scope of this document,",s+=" but the following tip is provided for avoiding race conditions of",s+=" this type. The caller can delay sending re-INVITE F6 for some period",s+=" of time (2 seconds, perhaps), after which the caller can reasonably",s+=" assume that its ACK has been received. Implementors can decouple the",s+=" actions of the user (e.g., pressing the hold button) from the actions",s+=" of the protocol (the sending of re-INVITE F6), so that the UA can",s+=" behave like this. In this case, it is the implementor's choice as to",s+=" how long to wait. In most cases, such an implementation may be",s+=" useful to prevent the type of race condition shown in this section.",s+=" This document expresses no preference about whether or not they",s+=" should wait for an ACK to be delivered. After considering the impact",s+=" on user experience, implementors should decide whether or not to wait",s+=" for a while, because the user experience depends on the",s+=" implementation and has no direct bearing on protocol behavior.",this.logger.warn(s)},r=[`Retry-After: ${Math.floor(Math.random()*10)+1}`];if(this.ackProcessing){this.core.replyStateless(e,{statusCode:500,extraHeaders:r}),t();return}if(this.ackWait&&this.signalingState!==ve.Stable){this.core.replyStateless(e,{statusCode:500,extraHeaders:r}),t();return}if(this.reinviteUserAgentServer){this.core.replyStateless(e,{statusCode:500,extraHeaders:r});return}if(this.reinviteUserAgentClient){this.core.replyStateless(e,{statusCode:491});return}}if(e.method===be.INVITE){const t=e.parseHeader("contact");if(!t)throw new Error("Contact undefined.");if(!(t instanceof wr))throw new Error("Contact not instance of NameAddrHeader.");this.dialogState.remoteTarget=t.uri}switch(e.method){case be.BYE:{const t=new gw(this,e);this.delegate&&this.delegate.onBye?this.delegate.onBye(t):t.accept(),this.dispose()}break;case be.INFO:{const t=new mw(this,e);this.delegate&&this.delegate.onInfo?this.delegate.onInfo(t):t.reject({statusCode:469,extraHeaders:["Recv-Info:"]})}break;case be.INVITE:{const t=new Cw(this,e);this.signalingStateTransition(e),this.delegate&&this.delegate.onInvite?this.delegate.onInvite(t):t.reject({statusCode:488})}break;case be.MESSAGE:{const t=new _p(this.core,e);this.delegate&&this.delegate.onMessage?this.delegate.onMessage(t):t.accept()}break;case be.NOTIFY:{const t=new Yo(this,e);this.delegate&&this.delegate.onNotify?this.delegate.onNotify(t):t.accept()}break;case be.PRACK:{const t=new _w(this,e);this.delegate&&this.delegate.onPrack?this.delegate.onPrack(t):t.accept()}break;case be.REFER:{const t=new Sp(this,e);this.delegate&&this.delegate.onRefer?this.delegate.onRefer(t):t.reject()}break;default:this.logger.log(`INVITE dialog ${this.id} received unimplemented ${e.method} request`),this.core.replyStateless(e,{statusCode:501});break}}reliableSequenceGuard(e){const t=e.statusCode;if(!t)throw new Error("Status code undefined");if(t>100&&t<200){const r=e.getHeader("require"),n=e.getHeader("rseq"),s=r&&r.includes("100rel")&&n?Number(n):void 0;if(s){if(this.rseq&&this.rseq+1!==s)return!1;this.rseq=this.rseq?this.rseq+1:s}}return!0}signalingStateRollback(){(this._signalingState===ve.HaveLocalOffer||this.signalingState===ve.HaveRemoteOffer)&&this._rollbackOffer&&this._rollbackAnswer&&(this._signalingState=ve.Stable,this._offer=this._rollbackOffer,this._answer=this._rollbackAnswer)}signalingStateTransition(e){const t=Di(e);if(!(!t||t.contentDisposition!=="session")){if(this._signalingState===ve.Stable&&(this._rollbackOffer=this._offer,this._rollbackAnswer=this._answer),e instanceof Bs)switch(this._signalingState){case ve.Initial:case ve.Stable:this._signalingState=ve.HaveRemoteOffer,this._offer=t,this._answer=void 0;break;case ve.HaveLocalOffer:this._signalingState=ve.Stable,this._answer=t;break;case ve.HaveRemoteOffer:break;case ve.Closed:break;default:throw new Error("Unexpected signaling state.")}if(e instanceof Rn)switch(this._signalingState){case ve.Initial:case ve.Stable:this._signalingState=ve.HaveRemoteOffer,this._offer=t,this._answer=void 0;break;case ve.HaveLocalOffer:this._signalingState=ve.Stable,this._answer=t;break;case ve.HaveRemoteOffer:break;case ve.Closed:break;default:throw new Error("Unexpected signaling state.")}if(e instanceof Ul)switch(this._signalingState){case ve.Initial:case ve.Stable:this._signalingState=ve.HaveLocalOffer,this._offer=t,this._answer=void 0;break;case ve.HaveLocalOffer:break;case ve.HaveRemoteOffer:this._signalingState=ve.Stable,this._answer=t;break;case ve.Closed:break;default:throw new Error("Unexpected signaling state.")}if(pp(e))switch(this._signalingState){case ve.Initial:case ve.Stable:this._signalingState=ve.HaveLocalOffer,this._offer=t,this._answer=void 0;break;case ve.HaveLocalOffer:break;case ve.HaveRemoteOffer:this._signalingState=ve.Stable,this._answer=t;break;case ve.Closed:break;default:throw new Error("Unexpected signaling state.")}}}start2xxRetransmissionTimer(){if(this.initialTransaction instanceof er){const e=this.initialTransaction;let t=At.T1;const r=()=>{if(!this.ackWait){this.invite2xxTimer=void 0;return}this.logger.log("No ACK for 2xx response received, attempting retransmission"),e.retransmitAcceptedResponse(),t=Math.min(t*2,At.T2),this.invite2xxTimer=setTimeout(r,t)};this.invite2xxTimer=setTimeout(r,t);const n=()=>{e.state===j.Terminated&&(e.removeStateChangeListener(n),this.invite2xxTimer&&(clearTimeout(this.invite2xxTimer),this.invite2xxTimer=void 0),this.ackWait&&(this.delegate&&this.delegate.onAckTimeout?this.delegate.onAckTimeout():this.bye()))};e.addStateChangeListener(n)}}startReInvite2xxRetransmissionTimer(){if(this.reinviteUserAgentServer&&this.reinviteUserAgentServer.transaction instanceof er){const e=this.reinviteUserAgentServer.transaction;let t=At.T1;const r=()=>{if(!this.reinviteUserAgentServer){this.invite2xxTimer=void 0;return}this.logger.log("No ACK for 2xx response received, attempting retransmission"),e.retransmitAcceptedResponse(),t=Math.min(t*2,At.T2),this.invite2xxTimer=setTimeout(r,t)};this.invite2xxTimer=setTimeout(r,t);const n=()=>{e.state===j.Terminated&&(e.removeStateChangeListener(n),this.invite2xxTimer&&(clearTimeout(this.invite2xxTimer),this.invite2xxTimer=void 0),this.reinviteUserAgentServer)};e.addStateChangeListener(n)}}},Ew=class extends ir{constructor(e,t,r){super(Hn,e,t,r),this.confirmedDialogAcks=new Map,this.confirmedDialogs=new Map,this.earlyDialogs=new Map,this.delegate=r}dispose(){this.earlyDialogs.forEach(e=>e.dispose()),this.earlyDialogs.clear(),super.dispose()}onTransportError(e){if(this.transaction.state===j.Calling)return super.onTransportError(e);this.logger.error(e.message),this.logger.error("User agent client request transport error while sending ACK.")}receiveResponse(e){if(!this.authenticationGuard(e))return;const t=e.statusCode?e.statusCode.toString():"";if(!t)throw new Error("Response status code undefined.");switch(!0){case/^100$/.test(t):this.delegate&&this.delegate.onTrying&&this.delegate.onTrying({message:e});return;case/^1[0-9]{2}$/.test(t):{if(!e.toTag){this.logger.warn("Non-100 1xx INVITE response received without a to tag, dropping.");return}if(!e.parseHeader("contact")){this.logger.error("Non-100 1xx INVITE response received without a Contact header field, dropping.");return}const r=Fs.initialDialogStateForUserAgentClient(this.message,e);let n=this.earlyDialogs.get(r.id);if(!n){const i=this.transaction;if(!(i instanceof Hn))throw new Error("Transaction not instance of InviteClientTransaction.");n=new Zo(i,this.core,r),this.earlyDialogs.set(n.id,n)}if(!n.reliableSequenceGuard(e)){this.logger.warn("1xx INVITE reliable response received out of order or is a retransmission, dropping.");return}(n.signalingState===ve.Initial||n.signalingState===ve.HaveLocalOffer)&&n.signalingStateTransition(e);const s=n;this.delegate&&this.delegate.onProgress&&this.delegate.onProgress({message:e,session:s,prack:i=>s.prack(void 0,i)})}return;case/^2[0-9]{2}$/.test(t):{if(!e.toTag){this.logger.error("2xx INVITE response received without a to tag, dropping.");return}if(!e.parseHeader("contact")){this.logger.error("2xx INVITE response received without a Contact header field, dropping.");return}const r=Fs.initialDialogStateForUserAgentClient(this.message,e);let n=this.confirmedDialogs.get(r.id);if(n){const i=this.confirmedDialogAcks.get(r.id);if(i){const o=this.transaction;if(!(o instanceof Hn))throw new Error("Client transaction not instance of InviteClientTransaction.");o.ackResponse(i.message)}return}if(n=this.earlyDialogs.get(r.id),n)n.confirm(),n.recomputeRouteSet(e),this.earlyDialogs.delete(n.id),this.confirmedDialogs.set(n.id,n);else{const i=this.transaction;if(!(i instanceof Hn))throw new Error("Transaction not instance of InviteClientTransaction.");n=new Zo(i,this.core,r),this.confirmedDialogs.set(n.id,n)}(n.signalingState===ve.Initial||n.signalingState===ve.HaveLocalOffer)&&n.signalingStateTransition(e);const s=n;if(this.delegate&&this.delegate.onAccept)this.delegate.onAccept({message:e,session:s,ack:i=>{const o=s.ack(i);return this.confirmedDialogAcks.set(s.id,o),o}});else{const i=s.ack();this.confirmedDialogAcks.set(s.id,i)}}return;case/^3[0-9]{2}$/.test(t):this.earlyDialogs.forEach(r=>r.dispose()),this.earlyDialogs.clear(),this.delegate&&this.delegate.onRedirect&&this.delegate.onRedirect({message:e});return;case/^[4-6][0-9]{2}$/.test(t):this.earlyDialogs.forEach(r=>r.dispose()),this.earlyDialogs.clear(),this.delegate&&this.delegate.onReject&&this.delegate.onReject({message:e});return;default:throw new Error(`Invalid status code ${t}`)}throw new Error(`Executing what should be an unreachable code path receiving ${t} response.`)}},Jl=class extends Fr{constructor(e,t,r){super(er,e,t,r),this.core=e}dispose(){this.earlyDialog&&this.earlyDialog.dispose(),super.dispose()}accept(e={statusCode:200}){if(!this.acceptable)throw new $n(`${this.message.method} not acceptable in state ${this.transaction.state}.`);if(!this.confirmedDialog)if(this.earlyDialog)this.earlyDialog.confirm(),this.confirmedDialog=this.earlyDialog,this.earlyDialog=void 0;else{const a=this.transaction;if(!(a instanceof er))throw new Error("Transaction not instance of InviteClientTransaction.");const l=Fs.initialDialogStateForUserAgentServer(this.message,this.toTag);this.confirmedDialog=new Zo(a,this.core,l)}const t=this.message.getHeaders("record-route").map(a=>`Record-Route: ${a}`),r=`Contact: ${this.core.configuration.contact.toString()}`,n="Allow: "+Pn.toString();if(!e.body){if(this.confirmedDialog.signalingState===ve.Stable)e.body=this.confirmedDialog.answer;else if(this.confirmedDialog.signalingState===ve.Initial||this.confirmedDialog.signalingState===ve.HaveRemoteOffer)throw new Error("Response must have a body.")}e.statusCode=e.statusCode||200,e.extraHeaders=e.extraHeaders||[],e.extraHeaders=e.extraHeaders.concat(t),e.extraHeaders.push(n),e.extraHeaders.push(r);const s=super.accept(e),i=this.confirmedDialog,o=Object.assign(Object.assign({},s),{session:i});return e.body&&this.confirmedDialog.signalingState!==ve.Stable&&this.confirmedDialog.signalingStateTransition(e.body),o}progress(e={statusCode:180}){if(!this.progressable)throw new $n(`${this.message.method} not progressable in state ${this.transaction.state}.`);if(!this.earlyDialog){const o=this.transaction;if(!(o instanceof er))throw new Error("Transaction not instance of InviteClientTransaction.");const a=Fs.initialDialogStateForUserAgentServer(this.message,this.toTag,!0);this.earlyDialog=new Zo(o,this.core,a)}const t=this.message.getHeaders("record-route").map(o=>`Record-Route: ${o}`),r=`Contact: ${this.core.configuration.contact}`;e.extraHeaders=e.extraHeaders||[],e.extraHeaders=e.extraHeaders.concat(t),e.extraHeaders.push(r);const n=super.progress(e),s=this.earlyDialog,i=Object.assign(Object.assign({},n),{session:s});return e.body&&this.earlyDialog.signalingState!==ve.Stable&&this.earlyDialog.signalingStateTransition(e.body),i}redirect(e,t={statusCode:302}){return super.redirect(e,t)}reject(e={statusCode:486}){return super.reject(e)}},Aw=class extends ir{constructor(e,t,r){super(sr,e,t,r)}},kw=class extends ir{constructor(e,t,r){super(sr,e,t,r)}},Iw=class extends Fr{constructor(e,t,r){super(or,e,t,r),this.core=e}},Rw=class extends ir{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.SUBSCRIBE,r);super(sr,e.userAgentCore,n,t),this.dialog=e}waitNotifyStop(){}receiveResponse(e){if(e.statusCode&&e.statusCode>=200&&e.statusCode<300){const t=e.getHeader("Expires");if(!t)this.logger.warn("Expires header missing in a 200-class response to SUBSCRIBE");else{const r=Number(t);this.dialog.subscriptionExpires>r&&(this.dialog.subscriptionExpires=r)}}e.statusCode&&e.statusCode>=400&&e.statusCode<700&&[404,405,410,416,480,481,482,483,484,485,489,501,604].includes(e.statusCode)&&this.dialog.terminate(),super.receiveResponse(e)}},Cp=class extends Fs{constructor(e,t,r,n,s,i){super(n,s),this.delegate=i,this._autoRefresh=!1,this._subscriptionEvent=e,this._subscriptionExpires=t,this._subscriptionExpiresInitial=t,this._subscriptionExpiresLastSet=Math.floor(Date.now()/1e3),this._subscriptionRefresh=void 0,this._subscriptionRefreshLastSet=void 0,this._subscriptionState=r,this.logger=n.loggerFactory.getLogger("sip.subscribe-dialog"),this.logger.log(`SUBSCRIBE dialog ${this.id} constructed`)}static initialDialogStateForSubscription(e,t){const n=t.getHeaders("record-route"),s=t.parseHeader("contact");if(!s)throw new Error("Contact undefined.");if(!(s instanceof wr))throw new Error("Contact not instance of NameAddrHeader.");const i=s.uri,o=e.cseq,a=void 0,l=e.callId,u=e.fromTag,c=t.fromTag;if(!l)throw new Error("Call id undefined.");if(!u)throw new Error("From tag undefined.");if(!c)throw new Error("To tag undefined.");if(!e.from)throw new Error("From undefined.");if(!e.to)throw new Error("To undefined.");const d=e.from.uri,p=e.to.uri;return{id:l+u+c,early:!1,callId:l,localTag:u,remoteTag:c,localSequenceNumber:o,remoteSequenceNumber:a,localURI:d,remoteURI:p,remoteTarget:i,routeSet:n,secure:!1}}dispose(){super.dispose(),this.N&&(clearTimeout(this.N),this.N=void 0),this.refreshTimerClear(),this.logger.log(`SUBSCRIBE dialog ${this.id} destroyed`)}get autoRefresh(){return this._autoRefresh}set autoRefresh(e){this._autoRefresh=!0,this.refreshTimerSet()}get subscriptionEvent(){return this._subscriptionEvent}get subscriptionExpires(){const e=Math.floor(Date.now()/1e3)-this._subscriptionExpiresLastSet,t=this._subscriptionExpires-e;return Math.max(t,0)}set subscriptionExpires(e){if(e<0)throw new Error("Expires must be greater than or equal to zero.");if(this._subscriptionExpires=e,this._subscriptionExpiresLastSet=Math.floor(Date.now()/1e3),this.autoRefresh){const t=this.subscriptionRefresh;(t===void 0||t>=e)&&this.refreshTimerSet()}}get subscriptionExpiresInitial(){return this._subscriptionExpiresInitial}get subscriptionRefresh(){if(this._subscriptionRefresh===void 0||this._subscriptionRefreshLastSet===void 0)return;const e=Math.floor(Date.now()/1e3)-this._subscriptionRefreshLastSet,t=this._subscriptionRefresh-e;return Math.max(t,0)}get subscriptionState(){return this._subscriptionState}receiveRequest(e){if(this.logger.log(`SUBSCRIBE dialog ${this.id} received ${e.method} request`),!this.sequenceGuard(e)){this.logger.log(`SUBSCRIBE dialog ${this.id} rejected out of order ${e.method} request.`);return}super.receiveRequest(e),e.method===be.NOTIFY?this.onNotify(e):(this.logger.log(`SUBSCRIBE dialog ${this.id} received unimplemented ${e.method} request`),this.core.replyStateless(e,{statusCode:501}))}refresh(){const e="Allow: "+Pn.toString(),t={};return t.extraHeaders=(t.extraHeaders||[]).slice(),t.extraHeaders.push(e),t.extraHeaders.push("Event: "+this.subscriptionEvent),t.extraHeaders.push("Expires: "+this.subscriptionExpiresInitial),t.extraHeaders.push("Contact: "+this.core.configuration.contact.toString()),this.subscribe(void 0,t)}subscribe(e,t={}){var r;if(this.subscriptionState!==Ye.Pending&&this.subscriptionState!==Ye.Active)throw new Error(`Invalid state ${this.subscriptionState}. May only re-subscribe while in state "pending" or "active".`);this.logger.log(`SUBSCRIBE dialog ${this.id} sending SUBSCRIBE request`);const n=new Rw(this,e,t);return this.N&&(clearTimeout(this.N),this.N=void 0),!((r=t.extraHeaders)===null||r===void 0)&&r.includes("Expires: 0")||(this.N=setTimeout(()=>this.timerN(),At.TIMER_N)),n}terminate(){this.stateTransition(Ye.Terminated),this.onTerminated()}unsubscribe(){const e="Allow: "+Pn.toString(),t={};return t.extraHeaders=(t.extraHeaders||[]).slice(),t.extraHeaders.push(e),t.extraHeaders.push("Event: "+this.subscriptionEvent),t.extraHeaders.push("Expires: 0"),t.extraHeaders.push("Contact: "+this.core.configuration.contact.toString()),this.subscribe(void 0,t)}onNotify(e){const t=e.parseHeader("Event").event;if(!t||t!==this.subscriptionEvent){this.core.replyStateless(e,{statusCode:489});return}this.N&&(clearTimeout(this.N),this.N=void 0);const r=e.parseHeader("Subscription-State");if(!r||!r.state){this.core.replyStateless(e,{statusCode:489});return}const n=r.state,s=r.expires?Math.max(r.expires,0):void 0;switch(n){case"pending":this.stateTransition(Ye.Pending,s);break;case"active":this.stateTransition(Ye.Active,s);break;case"terminated":this.stateTransition(Ye.Terminated,s);break;default:this.logger.warn("Unrecognized subscription state.");break}const i=new Yo(this,e);this.delegate&&this.delegate.onNotify?this.delegate.onNotify(i):i.accept()}onRefresh(e){this.delegate&&this.delegate.onRefresh&&this.delegate.onRefresh(e)}onTerminated(){this.delegate&&this.delegate.onTerminated&&this.delegate.onTerminated()}refreshTimerClear(){this.refreshTimer&&(clearTimeout(this.refreshTimer),this.refreshTimer=void 0)}refreshTimerSet(){if(this.refreshTimerClear(),this.autoRefresh&&this.subscriptionExpires>0){const e=this.subscriptionExpires*900;this._subscriptionRefresh=Math.floor(e/1e3),this._subscriptionRefreshLastSet=Math.floor(Date.now()/1e3),this.refreshTimer=setTimeout(()=>{this.refreshTimer=void 0,this._subscriptionRefresh=void 0,this._subscriptionRefreshLastSet=void 0,this.onRefresh(this.refresh())},e)}}stateTransition(e,t){const r=()=>{this.logger.warn(`Invalid subscription state transition from ${this.subscriptionState} to ${e}`)};switch(e){case Ye.Initial:r();return;case Ye.NotifyWait:r();return;case Ye.Pending:if(this.subscriptionState!==Ye.NotifyWait&&this.subscriptionState!==Ye.Pending){r();return}break;case Ye.Active:if(this.subscriptionState!==Ye.NotifyWait&&this.subscriptionState!==Ye.Pending&&this.subscriptionState!==Ye.Active){r();return}break;case Ye.Terminated:if(this.subscriptionState!==Ye.NotifyWait&&this.subscriptionState!==Ye.Pending&&this.subscriptionState!==Ye.Active){r();return}break;default:r();return}e===Ye.Pending&&t&&(this.subscriptionExpires=t),e===Ye.Active&&t&&(this.subscriptionExpires=t),e===Ye.Terminated&&this.dispose(),this._subscriptionState=e}timerN(){this.logger.warn("Timer N expired for SUBSCRIBE dialog. Timed out waiting for NOTIFY."),this.subscriptionState!==Ye.Terminated&&(this.stateTransition(Ye.Terminated),this.onTerminated())}},$w=class extends ir{constructor(e,t,r){const n=t.getHeader("Event");if(!n)throw new Error("Event undefined");const s=t.getHeader("Expires");if(!s)throw new Error("Expires undefined");super(sr,e,t,r),this.delegate=r,this.subscriberId=t.callId+t.fromTag+n,this.subscriptionExpiresRequested=this.subscriptionExpires=Number(s),this.subscriptionEvent=n,this.subscriptionState=Ye.NotifyWait,this.waitNotifyStart()}dispose(){super.dispose()}onNotify(e){const t=e.message.parseHeader("Event").event;if(!t||t!==this.subscriptionEvent){this.logger.warn("Failed to parse event."),e.reject({statusCode:489});return}const r=e.message.parseHeader("Subscription-State");if(!r||!r.state){this.logger.warn("Failed to parse subscription state."),e.reject({statusCode:489});return}const n=r.state;switch(n){case"pending":break;case"active":break;case"terminated":break;default:this.logger.warn(`Invalid subscription state ${n}`),e.reject({statusCode:489});return}if(n!=="terminated"&&!e.message.parseHeader("contact")){this.logger.warn("Failed to parse contact."),e.reject({statusCode:489});return}if(this.dialog)throw new Error("Dialog already created. This implementation only supports install of single subscriptions.");switch(this.waitNotifyStop(),this.subscriptionExpires=r.expires?Math.min(this.subscriptionExpires,Math.max(r.expires,0)):this.subscriptionExpires,n){case"pending":this.subscriptionState=Ye.Pending;break;case"active":this.subscriptionState=Ye.Active;break;case"terminated":this.subscriptionState=Ye.Terminated;break;default:throw new Error(`Unrecognized state ${n}.`)}if(this.subscriptionState!==Ye.Terminated){const s=Cp.initialDialogStateForSubscription(this.message,e.message);this.dialog=new Cp(this.subscriptionEvent,this.subscriptionExpires,this.subscriptionState,this.core,s)}if(this.delegate&&this.delegate.onNotify){const s=e,i=this.dialog;this.delegate.onNotify({request:s,subscription:i})}else e.accept()}waitNotifyStart(){this.N||(this.core.subscribers.set(this.subscriberId,this),this.N=setTimeout(()=>this.timerN(),At.TIMER_N))}waitNotifyStop(){this.N&&(this.core.subscribers.delete(this.subscriberId),clearTimeout(this.N),this.N=void 0)}receiveResponse(e){if(this.authenticationGuard(e)){if(e.statusCode&&e.statusCode>=200&&e.statusCode<300){const t=e.getHeader("Expires");if(!t)this.logger.warn("Expires header missing in a 200-class response to SUBSCRIBE");else{const r=Number(t);r>this.subscriptionExpiresRequested&&this.logger.warn("Expires header in a 200-class response to SUBSCRIBE with a higher value than the one in the request"),r<this.subscriptionExpires&&(this.subscriptionExpires=r)}this.dialog&&this.dialog.subscriptionExpires>this.subscriptionExpires&&(this.dialog.subscriptionExpires=this.subscriptionExpires)}e.statusCode&&e.statusCode>=300&&e.statusCode<700&&this.waitNotifyStop(),super.receiveResponse(e)}}timerN(){this.logger.warn("Timer N expired for SUBSCRIBE user agent client. Timed out waiting for NOTIFY."),this.waitNotifyStop(),this.delegate&&this.delegate.onNotifyTimeout&&this.delegate.onNotifyTimeout()}},Pw=class extends Fr{constructor(e,t,r){super(or,e,t,r),this.core=e}},xp=["application/sdp","application/dtmf-relay"],Dw=class{constructor(e,t={}){this.userAgentClients=new Map,this.userAgentServers=new Map,this.configuration=e,this.delegate=t,this.dialogs=new Map,this.subscribers=new Map,this.logger=e.loggerFactory.getLogger("sip.user-agent-core")}dispose(){this.reset()}reset(){this.dialogs.forEach(e=>e.dispose()),this.dialogs.clear(),this.subscribers.forEach(e=>e.dispose()),this.subscribers.clear(),this.userAgentClients.forEach(e=>e.dispose()),this.userAgentClients.clear(),this.userAgentServers.forEach(e=>e.dispose()),this.userAgentServers.clear()}get loggerFactory(){return this.configuration.loggerFactory}get transport(){const e=this.configuration.transportAccessor();if(!e)throw new Error("Transport undefined.");return e}invite(e,t){return new Ew(this,e,t)}message(e,t){return new bp(this,e,t)}publish(e,t){return new Aw(this,e,t)}register(e,t){return new kw(this,e,t)}subscribe(e,t){return new $w(this,e,t)}request(e,t){return new ir(sr,this,e,t)}makeOutgoingRequestMessage(e,t,r,n,s,i,o){const a=this.configuration.sipjsId,l=this.configuration.displayName,u=this.configuration.viaForceRport,c=this.configuration.hackViaTcp,d=this.configuration.supportedOptionTags.slice();e===be.REGISTER&&d.push("path","gruu"),e===be.INVITE&&(this.configuration.contact.pubGruu||this.configuration.contact.tempGruu)&&d.push("gruu");const p={callIdPrefix:a,forceRport:u,fromDisplayName:l,hackViaTcp:c,optionTags:d,routeSet:this.configuration.routeSet,userAgentString:this.configuration.userAgentHeaderFieldValue,viaHost:this.configuration.viaHost};return new Ul(e,t,r,n,Object.assign(Object.assign({},p),s),i,o)}receiveIncomingRequestFromTransport(e){this.receiveRequestFromTransport(e)}receiveIncomingResponseFromTransport(e){this.receiveResponseFromTransport(e)}replyStateless(e,t){const r=this.configuration.userAgentHeaderFieldValue,n=this.configuration.supportedOptionTagsResponse;t=Object.assign(Object.assign({},t),{userAgent:r,supported:n});const s=vp(e,t);return this.transport.send(s.message).catch(i=>{i instanceof Error&&this.logger.error(i.message),this.logger.error(`Transport error occurred sending stateless reply to ${e.method} request.`)}),s}receiveRequestFromTransport(e){const t=e.viaBranch,r=this.userAgentServers.get(t);if(e.method===be.ACK&&r&&r.transaction.state===j.Accepted&&r instanceof Jl){this.logger.warn(`Discarding out of dialog ACK after 2xx response sent on transaction ${t}.`);return}if(e.method===be.CANCEL){r?(this.replyStateless(e,{statusCode:200}),r.transaction instanceof er&&r.transaction.state===j.Proceeding&&r instanceof Jl&&r.receiveCancel(e)):this.replyStateless(e,{statusCode:481});return}if(r){r.transaction.receiveRequest(e);return}this.receiveRequest(e)}receiveRequest(e){if(!Pn.includes(e.method)){const n="Allow: "+Pn.toString();this.replyStateless(e,{statusCode:405,extraHeaders:[n]});return}if(!e.ruri)throw new Error("Request-URI undefined.");if(e.ruri.scheme!=="sip"){this.replyStateless(e,{statusCode:416});return}const t=e.ruri,r=n=>!!n&&n.user===t.user;if(!r(this.configuration.aor)&&!(r(this.configuration.contact.uri)||r(this.configuration.contact.pubGruu)||r(this.configuration.contact.tempGruu))){this.logger.warn("Request-URI does not point to us."),e.method!==be.ACK&&this.replyStateless(e,{statusCode:404});return}if(e.method===be.INVITE&&!e.hasHeader("Contact")){this.replyStateless(e,{statusCode:400,reasonPhrase:"Missing Contact Header"});return}if(!e.toTag){const n=e.viaBranch;if(!this.userAgentServers.has(n)&&Array.from(this.userAgentServers.values()).some(s=>s.transaction.request.fromTag===e.fromTag&&s.transaction.request.callId===e.callId&&s.transaction.request.cseq===e.cseq)){this.replyStateless(e,{statusCode:482});return}}e.toTag?this.receiveInsideDialogRequest(e):this.receiveOutsideDialogRequest(e)}receiveInsideDialogRequest(e){if(e.method===be.NOTIFY){const n=e.parseHeader("Event");if(!n||!n.event){this.replyStateless(e,{statusCode:489});return}const s=e.callId+e.toTag+n.event,i=this.subscribers.get(s);if(i){const o=new Yo(this,e);i.onNotify(o);return}}const t=e.callId+e.toTag+e.fromTag,r=this.dialogs.get(t);if(r){if(e.method===be.OPTIONS){const n="Allow: "+Pn.toString(),s="Accept: "+xp.toString();this.replyStateless(e,{statusCode:200,extraHeaders:[n,s]});return}r.receiveRequest(e);return}e.method!==be.ACK&&this.replyStateless(e,{statusCode:481})}receiveOutsideDialogRequest(e){switch(e.method){case be.ACK:break;case be.BYE:this.replyStateless(e,{statusCode:481});break;case be.CANCEL:throw new Error(`Unexpected out of dialog request method ${e.method}.`);case be.INFO:this.replyStateless(e,{statusCode:405});break;case be.INVITE:{const t=new Jl(this,e);this.delegate.onInvite?this.delegate.onInvite(t):t.reject()}break;case be.MESSAGE:{const t=new _p(this,e);this.delegate.onMessage?this.delegate.onMessage(t):t.accept()}break;case be.NOTIFY:{const t=new Yo(this,e);this.delegate.onNotify?this.delegate.onNotify(t):t.reject({statusCode:405})}break;case be.OPTIONS:{const t="Allow: "+Pn.toString(),r="Accept: "+xp.toString();this.replyStateless(e,{statusCode:200,extraHeaders:[t,r]})}break;case be.REFER:{const t=new Sp(this,e);this.delegate.onRefer?this.delegate.onRefer(t):t.reject({statusCode:405})}break;case be.REGISTER:{const t=new Iw(this,e);this.delegate.onRegister?this.delegate.onRegister(t):t.reject({statusCode:405})}break;case be.SUBSCRIBE:{const t=new Pw(this,e);this.delegate.onSubscribe?this.delegate.onSubscribe(t):t.reject({statusCode:480})}break;default:throw new Error(`Unexpected out of dialog request method ${e.method}.`)}}receiveResponseFromTransport(e){if(e.getHeaders("via").length>1){this.logger.warn("More than one Via header field present in the response, dropping");return}const t=e.viaBranch+e.method,r=this.userAgentClients.get(t);r?r.transaction.receiveResponse(e):this.logger.warn(`Discarding unmatched ${e.statusCode} response to ${e.method} ${t}.`)}};function Ow(){return e=>!e.audio&&!e.video?Promise.resolve(new MediaStream):navigator.mediaDevices===void 0?Promise.reject(new Error("Media devices not available in insecure contexts.")):navigator.mediaDevices.getUserMedia.call(navigator.mediaDevices,e)}function Hw(){return{bundlePolicy:"balanced",certificates:void 0,iceCandidatePoolSize:0,iceServers:[{urls:"stun:stun.l.google.com:19302"}],iceTransportPolicy:"all",rtcpMuxPolicy:"require"}}var Mw=class Wn{constructor(t,r,n){t.debug("SessionDescriptionHandler.constructor"),this.logger=t,this.mediaStreamFactory=r,this.sessionDescriptionHandlerConfiguration=n,this._localMediaStream=new MediaStream,this._remoteMediaStream=new MediaStream,this._peerConnection=new RTCPeerConnection(n?.peerConnectionConfiguration),this.initPeerConnectionEventHandlers()}get localMediaStream(){return this._localMediaStream}get remoteMediaStream(){return this._remoteMediaStream}get dataChannel(){return this._dataChannel}get peerConnection(){return this._peerConnection}get peerConnectionDelegate(){return this._peerConnectionDelegate}set peerConnectionDelegate(t){this._peerConnectionDelegate=t}static dispatchAddTrackEvent(t,r){t.dispatchEvent(new MediaStreamTrackEvent("addtrack",{track:r}))}static dispatchRemoveTrackEvent(t,r){t.dispatchEvent(new MediaStreamTrackEvent("removetrack",{track:r}))}close(){this.logger.debug("SessionDescriptionHandler.close"),this._peerConnection!==void 0&&(this._peerConnection.getReceivers().forEach(t=>{t.track&&t.track.stop()}),this._peerConnection.getSenders().forEach(t=>{t.track&&t.track.stop()}),this._dataChannel&&this._dataChannel.close(),this._peerConnection.close(),this._peerConnection=void 0)}enableReceiverTracks(t){const r=this.peerConnection;if(!r)throw new Error("Peer connection closed.");r.getReceivers().forEach(n=>{n.track&&(n.track.enabled=t)})}enableSenderTracks(t){const r=this.peerConnection;if(!r)throw new Error("Peer connection closed.");r.getSenders().forEach(n=>{n.track&&(n.track.enabled=t)})}getDescription(t,r){var n,s;if(this.logger.debug("SessionDescriptionHandler.getDescription"),this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));this.onDataChannel=t?.onDataChannel;const i=(n=t?.offerOptions)===null||n===void 0?void 0:n.iceRestart,o=t?.iceGatheringTimeout===void 0?(s=this.sessionDescriptionHandlerConfiguration)===null||s===void 0?void 0:s.iceGatheringTimeout:t?.iceGatheringTimeout;return this.getLocalMediaStream(t).then(()=>this.updateDirection(t)).then(()=>this.createDataChannel(t)).then(()=>this.createLocalOfferOrAnswer(t)).then(a=>this.applyModifiers(a,r)).then(a=>this.setLocalSessionDescription(a)).then(()=>this.waitForIceGatheringComplete(i,o)).then(()=>this.getLocalSessionDescription()).then(a=>({body:a.sdp,contentType:"application/sdp"})).catch(a=>{throw this.logger.error("SessionDescriptionHandler.getDescription failed - "+a),a})}hasDescription(t){return this.logger.debug("SessionDescriptionHandler.hasDescription"),t==="application/sdp"}iceGatheringComplete(){this.logger.debug("SessionDescriptionHandler.iceGatheringComplete"),this.iceGatheringCompleteTimeoutId!==void 0&&(this.logger.debug("SessionDescriptionHandler.iceGatheringComplete - clearing timeout"),clearTimeout(this.iceGatheringCompleteTimeoutId),this.iceGatheringCompleteTimeoutId=void 0),this.iceGatheringCompletePromise!==void 0&&(this.logger.debug("SessionDescriptionHandler.iceGatheringComplete - resolving promise"),this.iceGatheringCompleteResolve&&this.iceGatheringCompleteResolve(),this.iceGatheringCompletePromise=void 0,this.iceGatheringCompleteResolve=void 0,this.iceGatheringCompleteReject=void 0)}sendDtmf(t,r){if(this.logger.debug("SessionDescriptionHandler.sendDtmf"),this._peerConnection===void 0)return this.logger.error("SessionDescriptionHandler.sendDtmf failed - peer connection closed"),!1;const n=this._peerConnection.getSenders();if(n.length===0)return this.logger.error("SessionDescriptionHandler.sendDtmf failed - no senders"),!1;const s=n[0].dtmf;if(!s)return this.logger.error("SessionDescriptionHandler.sendDtmf failed - no DTMF sender"),!1;const i=r?.duration,o=r?.interToneGap;try{s.insertDTMF(t,i,o)}catch(a){return this.logger.error(a.toString()),!1}return this.logger.log("SessionDescriptionHandler.sendDtmf sent via RTP: "+t.toString()),!0}setDescription(t,r,n){if(this.logger.debug("SessionDescriptionHandler.setDescription"),this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));this.onDataChannel=r?.onDataChannel;const s=this._peerConnection.signalingState==="have-local-offer"?"answer":"offer";return this.getLocalMediaStream(r).then(()=>this.applyModifiers({sdp:t,type:s},n)).then(i=>this.setRemoteSessionDescription(i)).catch(i=>{throw this.logger.error("SessionDescriptionHandler.setDescription failed - "+i),i})}applyModifiers(t,r){return this.logger.debug("SessionDescriptionHandler.applyModifiers"),!r||r.length===0?Promise.resolve(t):r.reduce((n,s)=>n.then(s),Promise.resolve(t)).then(n=>{if(this.logger.debug("SessionDescriptionHandler.applyModifiers - modified sdp"),!n.sdp||!n.type)throw new Error("Invalid SDP.");return{sdp:n.sdp,type:n.type}})}createDataChannel(t){if(this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));if(t?.dataChannel!==!0||this._dataChannel)return Promise.resolve();switch(this._peerConnection.signalingState){case"stable":this.logger.debug("SessionDescriptionHandler.createDataChannel - creating data channel");try{return this._dataChannel=this._peerConnection.createDataChannel(t?.dataChannelLabel||"",t?.dataChannelOptions),this.onDataChannel&&this.onDataChannel(this._dataChannel),Promise.resolve()}catch(r){return Promise.reject(r)}case"have-remote-offer":return Promise.resolve();default:return Promise.reject(new Error("Invalid signaling state "+this._peerConnection.signalingState))}}createLocalOfferOrAnswer(t){if(this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));switch(this._peerConnection.signalingState){case"stable":return this.logger.debug("SessionDescriptionHandler.createLocalOfferOrAnswer - creating SDP offer"),this._peerConnection.createOffer(t?.offerOptions);case"have-remote-offer":return this.logger.debug("SessionDescriptionHandler.createLocalOfferOrAnswer - creating SDP answer"),this._peerConnection.createAnswer(t?.answerOptions);default:return Promise.reject(new Error("Invalid signaling state "+this._peerConnection.signalingState))}}getLocalMediaStream(t){if(this.logger.debug("SessionDescriptionHandler.getLocalMediaStream"),this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));let r=Object.assign({},t?.constraints);if(this.localMediaStreamConstraints){if(r.audio=r.audio||this.localMediaStreamConstraints.audio,r.video=r.video||this.localMediaStreamConstraints.video,JSON.stringify(this.localMediaStreamConstraints.audio)===JSON.stringify(r.audio)&&JSON.stringify(this.localMediaStreamConstraints.video)===JSON.stringify(r.video))return Promise.resolve()}else r.audio===void 0&&r.video===void 0&&(r={audio:!0});return this.localMediaStreamConstraints=r,this.mediaStreamFactory(r,this,t).then(n=>this.setLocalMediaStream(n))}setLocalMediaStream(t){if(this.logger.debug("SessionDescriptionHandler.setLocalMediaStream"),!this._peerConnection)throw new Error("Peer connection undefined.");const r=this._peerConnection,n=this._localMediaStream,s=[],i=l=>{const u=l.kind;if(u!=="audio"&&u!=="video")throw new Error(`Unknown new track kind ${u}.`);const c=r.getSenders().find(d=>d.track&&d.track.kind===u);c?s.push(new Promise(d=>{this.logger.debug(`SessionDescriptionHandler.setLocalMediaStream - replacing sender ${u} track`),d()}).then(()=>c.replaceTrack(l).then(()=>{const d=n.getTracks().find(p=>p.kind===u);d&&(d.stop(),n.removeTrack(d),Wn.dispatchRemoveTrackEvent(n,d)),n.addTrack(l),Wn.dispatchAddTrackEvent(n,l)}).catch(d=>{throw this.logger.error(`SessionDescriptionHandler.setLocalMediaStream - failed to replace sender ${u} track`),d}))):s.push(new Promise(d=>{this.logger.debug(`SessionDescriptionHandler.setLocalMediaStream - adding sender ${u} track`),d()}).then(()=>{try{r.addTrack(l,n)}catch(d){throw this.logger.error(`SessionDescriptionHandler.setLocalMediaStream - failed to add sender ${u} track`),d}n.addTrack(l),Wn.dispatchAddTrackEvent(n,l)}))},o=t.getAudioTracks();o.length&&i(o[0]);const a=t.getVideoTracks();return a.length&&i(a[0]),s.reduce((l,u)=>l.then(()=>u),Promise.resolve())}getLocalSessionDescription(){if(this.logger.debug("SessionDescriptionHandler.getLocalSessionDescription"),this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));const t=this._peerConnection.localDescription;return t?Promise.resolve(t):Promise.reject(new Error("Failed to get local session description"))}setLocalSessionDescription(t){return this.logger.debug("SessionDescriptionHandler.setLocalSessionDescription"),this._peerConnection===void 0?Promise.reject(new Error("Peer connection closed.")):this._peerConnection.setLocalDescription(t)}setRemoteSessionDescription(t){if(this.logger.debug("SessionDescriptionHandler.setRemoteSessionDescription"),this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));const r=t.sdp;let n;switch(this._peerConnection.signalingState){case"stable":n="offer";break;case"have-local-offer":n="answer";break;default:return Promise.reject(new Error("Invalid signaling state "+this._peerConnection.signalingState))}return r?this._peerConnection.setRemoteDescription({sdp:r,type:n}):(this.logger.error("SessionDescriptionHandler.setRemoteSessionDescription failed - cannot set null sdp"),Promise.reject(new Error("SDP is undefined")))}setRemoteTrack(t){this.logger.debug("SessionDescriptionHandler.setRemoteTrack");const r=this._remoteMediaStream;r.getTrackById(t.id)?this.logger.debug(`SessionDescriptionHandler.setRemoteTrack - have remote ${t.kind} track`):t.kind==="audio"?(this.logger.debug(`SessionDescriptionHandler.setRemoteTrack - adding remote ${t.kind} track`),r.getAudioTracks().forEach(n=>{n.stop(),r.removeTrack(n),Wn.dispatchRemoveTrackEvent(r,n)}),r.addTrack(t),Wn.dispatchAddTrackEvent(r,t)):t.kind==="video"&&(this.logger.debug(`SessionDescriptionHandler.setRemoteTrack - adding remote ${t.kind} track`),r.getVideoTracks().forEach(n=>{n.stop(),r.removeTrack(n),Wn.dispatchRemoveTrackEvent(r,n)}),r.addTrack(t),Wn.dispatchAddTrackEvent(r,t))}updateDirection(t){if(this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));switch(this._peerConnection.signalingState){case"stable":this.logger.debug("SessionDescriptionHandler.updateDirection - setting offer direction");{const r=n=>{switch(n){case"inactive":return t?.hold?"inactive":"recvonly";case"recvonly":return t?.hold?"inactive":"recvonly";case"sendonly":return t?.hold?"sendonly":"sendrecv";case"sendrecv":return t?.hold?"sendonly":"sendrecv";case"stopped":return"stopped";default:throw new Error("Should never happen")}};this._peerConnection.getTransceivers().forEach(n=>{if(n.direction){const s=r(n.direction);n.direction!==s&&(n.direction=s)}})}break;case"have-remote-offer":this.logger.debug("SessionDescriptionHandler.updateDirection - setting answer direction");{const r=(()=>{const s=this._peerConnection.remoteDescription;if(!s)throw new Error("Failed to read remote offer");const i=/a=sendrecv\r\n|a=sendonly\r\n|a=recvonly\r\n|a=inactive\r\n/.exec(s.sdp);if(i)switch(i[0]){case`a=inactive\r
53
53
  `:return"inactive";case`a=recvonly\r
54
54
  `:return"recvonly";case`a=sendonly\r
55
55
  `:return"sendonly";case`a=sendrecv\r
56
- `:return"sendrecv";default:throw new Error("Should never happen")}return"sendrecv"})(),n=(()=>{switch(r){case"inactive":return"inactive";case"recvonly":return"sendonly";case"sendonly":return t?.hold?"inactive":"recvonly";case"sendrecv":return t?.hold?"sendonly":"sendrecv";default:throw new Error("Should never happen")}})();this._peerConnection.getTransceivers().forEach(s=>{s.direction&&s.direction!=="stopped"&&s.direction!==n&&(s.direction=n)})}break;default:return Promise.reject(new Error("Invalid signaling state "+this._peerConnection.signalingState))}return Promise.resolve()}waitForIceGatheringComplete(t=!1,r=0){return this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete"),this._peerConnection===void 0?Promise.reject("Peer connection closed."):!t&&this._peerConnection.iceGatheringState==="complete"?(this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete - already complete"),Promise.resolve()):(this.iceGatheringCompletePromise!==void 0&&(this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete - rejecting prior waiting promise"),this.iceGatheringCompleteReject&&this.iceGatheringCompleteReject(new Error("Promise superseded.")),this.iceGatheringCompletePromise=void 0,this.iceGatheringCompleteResolve=void 0,this.iceGatheringCompleteReject=void 0),this.iceGatheringCompletePromise=new Promise((n,s)=>{this.iceGatheringCompleteResolve=n,this.iceGatheringCompleteReject=s,r>0&&(this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete - timeout in "+r),this.iceGatheringCompleteTimeoutId=setTimeout(()=>{this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete - timeout"),this.iceGatheringComplete()},r))}),this.iceGatheringCompletePromise)}initPeerConnectionEventHandlers(){if(this.logger.debug("SessionDescriptionHandler.initPeerConnectionEventHandlers"),!this._peerConnection)throw new Error("Peer connection undefined.");const t=this._peerConnection;t.onconnectionstatechange=r=>{var n;const s=t.connectionState;this.logger.debug(`SessionDescriptionHandler.onconnectionstatechange ${s}`),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onconnectionstatechange&&this._peerConnectionDelegate.onconnectionstatechange(r)},t.ondatachannel=r=>{var n;this.logger.debug("SessionDescriptionHandler.ondatachannel"),this._dataChannel=r.channel,this.onDataChannel&&this.onDataChannel(this._dataChannel),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.ondatachannel&&this._peerConnectionDelegate.ondatachannel(r)},t.onicecandidate=r=>{var n;this.logger.debug("SessionDescriptionHandler.onicecandidate"),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onicecandidate&&this._peerConnectionDelegate.onicecandidate(r)},t.onicecandidateerror=r=>{var n;this.logger.debug("SessionDescriptionHandler.onicecandidateerror"),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onicecandidateerror&&this._peerConnectionDelegate.onicecandidateerror(r)},t.oniceconnectionstatechange=r=>{var n;const s=t.iceConnectionState;this.logger.debug(`SessionDescriptionHandler.oniceconnectionstatechange ${s}`),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.oniceconnectionstatechange&&this._peerConnectionDelegate.oniceconnectionstatechange(r)},t.onicegatheringstatechange=r=>{var n;const s=t.iceGatheringState;this.logger.debug(`SessionDescriptionHandler.onicegatheringstatechange ${s}`),s==="complete"&&this.iceGatheringComplete(),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onicegatheringstatechange&&this._peerConnectionDelegate.onicegatheringstatechange(r)},t.onnegotiationneeded=r=>{var n;this.logger.debug("SessionDescriptionHandler.onnegotiationneeded"),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onnegotiationneeded&&this._peerConnectionDelegate.onnegotiationneeded(r)},t.onsignalingstatechange=r=>{var n;const s=t.signalingState;this.logger.debug(`SessionDescriptionHandler.onsignalingstatechange ${s}`),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onsignalingstatechange&&this._peerConnectionDelegate.onsignalingstatechange(r)},t.ontrack=r=>{var n;const s=r.track.kind,i=r.track.enabled?"enabled":"disabled";this.logger.debug(`SessionDescriptionHandler.ontrack ${s} ${i}`),this.setRemoteTrack(r.track),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.ontrack&&this._peerConnectionDelegate.ontrack(r)}}};function Mw(e){return(t,r)=>{e===void 0&&(e=Dw());const n={iceGatheringTimeout:r?.iceGatheringTimeout!==void 0?r?.iceGatheringTimeout:5e3,peerConnectionConfiguration:Object.assign(Object.assign({},Ow()),r?.peerConnectionConfiguration)};return new Hw(t.userAgent.getLogger("sip.SessionDescriptionHandler"),e,n)}}var Tp=class Ng{constructor(t,r){if(this._state=Ee.Disconnected,this.transitioningState=!1,this._stateEventEmitter=new Ns,this.logger=t,r){const i=r,o=i?.wsServers,a=i?.maxReconnectionAttempts;o!==void 0&&this.logger.warn('The transport option "wsServers" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),a!==void 0&&this.logger.warn('The transport option "maxReconnectionAttempts" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),o&&!r.server&&(typeof o=="string"&&(r.server=o),o instanceof Array&&(r.server=o[0]))}this.configuration=Object.assign(Object.assign({},Ng.defaultOptions),r);const n=this.configuration.server,s=Ct.parse(n,"absoluteURI");if(s===-1)throw this.logger.error(`Invalid WebSocket Server URL "${n}"`),new Error("Invalid WebSocket Server URL");if(!["wss","ws","udp"].includes(s.scheme))throw this.logger.error(`Invalid scheme in WebSocket Server URL "${n}"`),new Error("Invalid scheme in WebSocket Server URL");this._protocol=s.scheme.toUpperCase()}dispose(){return this.disconnect()}get protocol(){return this._protocol}get server(){return this.configuration.server}get state(){return this._state}get stateChange(){return this._stateEventEmitter}get ws(){return this._ws}connect(){return this._connect()}disconnect(){return this._disconnect()}isConnected(){return this.state===Ee.Connected}send(t){return this._send(t)}_connect(){switch(this.logger.log(`Connecting ${this.server}`),this.state){case Ee.Connecting:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(Ee.Connecting));if(!this.connectPromise)throw new Error("Connect promise must be defined.");return this.connectPromise;case Ee.Connected:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(Ee.Connecting));if(this.connectPromise)throw new Error("Connect promise must not be defined.");return Promise.resolve();case Ee.Disconnecting:if(this.connectPromise)throw new Error("Connect promise must not be defined.");try{this.transitionState(Ee.Connecting)}catch(r){if(r instanceof Ri)return Promise.reject(r);throw r}break;case Ee.Disconnected:if(this.connectPromise)throw new Error("Connect promise must not be defined.");try{this.transitionState(Ee.Connecting)}catch(r){if(r instanceof Ri)return Promise.reject(r);throw r}break;default:throw new Error("Unknown state")}let t;try{t=new WebSocket(this.server,"sip"),t.binaryType="arraybuffer",t.addEventListener("close",r=>this.onWebSocketClose(r,t)),t.addEventListener("error",r=>this.onWebSocketError(r,t)),t.addEventListener("open",r=>this.onWebSocketOpen(r,t)),t.addEventListener("message",r=>this.onWebSocketMessage(r,t)),this._ws=t}catch(r){return this._ws=void 0,this.logger.error("WebSocket construction failed."),this.logger.error(r.toString()),new Promise((n,s)=>{this.connectResolve=n,this.connectReject=s,this.transitionState(Ee.Disconnected,r)})}return this.connectPromise=new Promise((r,n)=>{this.connectResolve=r,this.connectReject=n,this.connectTimeout=setTimeout(()=>{this.logger.warn("Connect timed out. Exceeded time set in configuration.connectionTimeout: "+this.configuration.connectionTimeout+"s."),t.close(1e3)},this.configuration.connectionTimeout*1e3)}),this.connectPromise}_disconnect(){switch(this.logger.log(`Disconnecting ${this.server}`),this.state){case Ee.Connecting:if(this.disconnectPromise)throw new Error("Disconnect promise must not be defined.");try{this.transitionState(Ee.Disconnecting)}catch(r){if(r instanceof Ri)return Promise.reject(r);throw r}break;case Ee.Connected:if(this.disconnectPromise)throw new Error("Disconnect promise must not be defined.");try{this.transitionState(Ee.Disconnecting)}catch(r){if(r instanceof Ri)return Promise.reject(r);throw r}break;case Ee.Disconnecting:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(Ee.Disconnecting));if(!this.disconnectPromise)throw new Error("Disconnect promise must be defined.");return this.disconnectPromise;case Ee.Disconnected:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(Ee.Disconnecting));if(this.disconnectPromise)throw new Error("Disconnect promise must not be defined.");return Promise.resolve();default:throw new Error("Unknown state")}if(!this._ws)throw new Error("WebSocket must be defined.");const t=this._ws;return this.disconnectPromise=new Promise((r,n)=>{this.disconnectResolve=r,this.disconnectReject=n;try{t.close(1e3)}catch(s){throw this.logger.error("WebSocket close failed."),this.logger.error(s.toString()),s}}),this.disconnectPromise}_send(t){if(this.configuration.traceSip===!0&&this.logger.log(`Sending WebSocket message:
56
+ `:return"sendrecv";default:throw new Error("Should never happen")}return"sendrecv"})(),n=(()=>{switch(r){case"inactive":return"inactive";case"recvonly":return"sendonly";case"sendonly":return t?.hold?"inactive":"recvonly";case"sendrecv":return t?.hold?"sendonly":"sendrecv";default:throw new Error("Should never happen")}})();this._peerConnection.getTransceivers().forEach(s=>{s.direction&&s.direction!=="stopped"&&s.direction!==n&&(s.direction=n)})}break;default:return Promise.reject(new Error("Invalid signaling state "+this._peerConnection.signalingState))}return Promise.resolve()}waitForIceGatheringComplete(t=!1,r=0){return this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete"),this._peerConnection===void 0?Promise.reject("Peer connection closed."):!t&&this._peerConnection.iceGatheringState==="complete"?(this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete - already complete"),Promise.resolve()):(this.iceGatheringCompletePromise!==void 0&&(this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete - rejecting prior waiting promise"),this.iceGatheringCompleteReject&&this.iceGatheringCompleteReject(new Error("Promise superseded.")),this.iceGatheringCompletePromise=void 0,this.iceGatheringCompleteResolve=void 0,this.iceGatheringCompleteReject=void 0),this.iceGatheringCompletePromise=new Promise((n,s)=>{this.iceGatheringCompleteResolve=n,this.iceGatheringCompleteReject=s,r>0&&(this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete - timeout in "+r),this.iceGatheringCompleteTimeoutId=setTimeout(()=>{this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete - timeout"),this.iceGatheringComplete()},r))}),this.iceGatheringCompletePromise)}initPeerConnectionEventHandlers(){if(this.logger.debug("SessionDescriptionHandler.initPeerConnectionEventHandlers"),!this._peerConnection)throw new Error("Peer connection undefined.");const t=this._peerConnection;t.onconnectionstatechange=r=>{var n;const s=t.connectionState;this.logger.debug(`SessionDescriptionHandler.onconnectionstatechange ${s}`),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onconnectionstatechange&&this._peerConnectionDelegate.onconnectionstatechange(r)},t.ondatachannel=r=>{var n;this.logger.debug("SessionDescriptionHandler.ondatachannel"),this._dataChannel=r.channel,this.onDataChannel&&this.onDataChannel(this._dataChannel),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.ondatachannel&&this._peerConnectionDelegate.ondatachannel(r)},t.onicecandidate=r=>{var n;this.logger.debug("SessionDescriptionHandler.onicecandidate"),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onicecandidate&&this._peerConnectionDelegate.onicecandidate(r)},t.onicecandidateerror=r=>{var n;this.logger.debug("SessionDescriptionHandler.onicecandidateerror"),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onicecandidateerror&&this._peerConnectionDelegate.onicecandidateerror(r)},t.oniceconnectionstatechange=r=>{var n;const s=t.iceConnectionState;this.logger.debug(`SessionDescriptionHandler.oniceconnectionstatechange ${s}`),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.oniceconnectionstatechange&&this._peerConnectionDelegate.oniceconnectionstatechange(r)},t.onicegatheringstatechange=r=>{var n;const s=t.iceGatheringState;this.logger.debug(`SessionDescriptionHandler.onicegatheringstatechange ${s}`),s==="complete"&&this.iceGatheringComplete(),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onicegatheringstatechange&&this._peerConnectionDelegate.onicegatheringstatechange(r)},t.onnegotiationneeded=r=>{var n;this.logger.debug("SessionDescriptionHandler.onnegotiationneeded"),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onnegotiationneeded&&this._peerConnectionDelegate.onnegotiationneeded(r)},t.onsignalingstatechange=r=>{var n;const s=t.signalingState;this.logger.debug(`SessionDescriptionHandler.onsignalingstatechange ${s}`),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onsignalingstatechange&&this._peerConnectionDelegate.onsignalingstatechange(r)},t.ontrack=r=>{var n;const s=r.track.kind,i=r.track.enabled?"enabled":"disabled";this.logger.debug(`SessionDescriptionHandler.ontrack ${s} ${i}`),this.setRemoteTrack(r.track),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.ontrack&&this._peerConnectionDelegate.ontrack(r)}}};function Nw(e){return(t,r)=>{e===void 0&&(e=Ow());const n={iceGatheringTimeout:r?.iceGatheringTimeout!==void 0?r?.iceGatheringTimeout:5e3,peerConnectionConfiguration:Object.assign(Object.assign({},Hw()),r?.peerConnectionConfiguration)};return new Mw(t.userAgent.getLogger("sip.SessionDescriptionHandler"),e,n)}}var Tp=class qg{constructor(t,r){if(this._state=Ee.Disconnected,this.transitioningState=!1,this._stateEventEmitter=new qs,this.logger=t,r){const i=r,o=i?.wsServers,a=i?.maxReconnectionAttempts;o!==void 0&&this.logger.warn('The transport option "wsServers" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),a!==void 0&&this.logger.warn('The transport option "maxReconnectionAttempts" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),o&&!r.server&&(typeof o=="string"&&(r.server=o),o instanceof Array&&(r.server=o[0]))}this.configuration=Object.assign(Object.assign({},qg.defaultOptions),r);const n=this.configuration.server,s=Ct.parse(n,"absoluteURI");if(s===-1)throw this.logger.error(`Invalid WebSocket Server URL "${n}"`),new Error("Invalid WebSocket Server URL");if(!["wss","ws","udp"].includes(s.scheme))throw this.logger.error(`Invalid scheme in WebSocket Server URL "${n}"`),new Error("Invalid scheme in WebSocket Server URL");this._protocol=s.scheme.toUpperCase()}dispose(){return this.disconnect()}get protocol(){return this._protocol}get server(){return this.configuration.server}get state(){return this._state}get stateChange(){return this._stateEventEmitter}get ws(){return this._ws}connect(){return this._connect()}disconnect(){return this._disconnect()}isConnected(){return this.state===Ee.Connected}send(t){return this._send(t)}_connect(){switch(this.logger.log(`Connecting ${this.server}`),this.state){case Ee.Connecting:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(Ee.Connecting));if(!this.connectPromise)throw new Error("Connect promise must be defined.");return this.connectPromise;case Ee.Connected:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(Ee.Connecting));if(this.connectPromise)throw new Error("Connect promise must not be defined.");return Promise.resolve();case Ee.Disconnecting:if(this.connectPromise)throw new Error("Connect promise must not be defined.");try{this.transitionState(Ee.Connecting)}catch(r){if(r instanceof $i)return Promise.reject(r);throw r}break;case Ee.Disconnected:if(this.connectPromise)throw new Error("Connect promise must not be defined.");try{this.transitionState(Ee.Connecting)}catch(r){if(r instanceof $i)return Promise.reject(r);throw r}break;default:throw new Error("Unknown state")}let t;try{t=new WebSocket(this.server,"sip"),t.binaryType="arraybuffer",t.addEventListener("close",r=>this.onWebSocketClose(r,t)),t.addEventListener("error",r=>this.onWebSocketError(r,t)),t.addEventListener("open",r=>this.onWebSocketOpen(r,t)),t.addEventListener("message",r=>this.onWebSocketMessage(r,t)),this._ws=t}catch(r){return this._ws=void 0,this.logger.error("WebSocket construction failed."),this.logger.error(r.toString()),new Promise((n,s)=>{this.connectResolve=n,this.connectReject=s,this.transitionState(Ee.Disconnected,r)})}return this.connectPromise=new Promise((r,n)=>{this.connectResolve=r,this.connectReject=n,this.connectTimeout=setTimeout(()=>{this.logger.warn("Connect timed out. Exceeded time set in configuration.connectionTimeout: "+this.configuration.connectionTimeout+"s."),t.close(1e3)},this.configuration.connectionTimeout*1e3)}),this.connectPromise}_disconnect(){switch(this.logger.log(`Disconnecting ${this.server}`),this.state){case Ee.Connecting:if(this.disconnectPromise)throw new Error("Disconnect promise must not be defined.");try{this.transitionState(Ee.Disconnecting)}catch(r){if(r instanceof $i)return Promise.reject(r);throw r}break;case Ee.Connected:if(this.disconnectPromise)throw new Error("Disconnect promise must not be defined.");try{this.transitionState(Ee.Disconnecting)}catch(r){if(r instanceof $i)return Promise.reject(r);throw r}break;case Ee.Disconnecting:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(Ee.Disconnecting));if(!this.disconnectPromise)throw new Error("Disconnect promise must be defined.");return this.disconnectPromise;case Ee.Disconnected:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(Ee.Disconnecting));if(this.disconnectPromise)throw new Error("Disconnect promise must not be defined.");return Promise.resolve();default:throw new Error("Unknown state")}if(!this._ws)throw new Error("WebSocket must be defined.");const t=this._ws;return this.disconnectPromise=new Promise((r,n)=>{this.disconnectResolve=r,this.disconnectReject=n;try{t.close(1e3)}catch(s){throw this.logger.error("WebSocket close failed."),this.logger.error(s.toString()),s}}),this.disconnectPromise}_send(t){if(this.configuration.traceSip===!0&&this.logger.log(`Sending WebSocket message:
57
57
 
58
58
  `+t+`
59
59
  `),this._state!==Ee.Connected)return Promise.reject(new Error("Not connected."));if(!this._ws)throw new Error("WebSocket undefined.");try{this._ws.send(t)}catch(r){return r instanceof Error?Promise.reject(r):Promise.reject(new Error("WebSocket send failed."))}return Promise.resolve()}onWebSocketClose(t,r){if(r!==this._ws)return;const n=`WebSocket closed ${this.server} (code: ${t.code})`,s=this.disconnectPromise?void 0:new Error(n);s&&this.logger.warn("WebSocket closed unexpectedly"),this.logger.log(n),this._ws=void 0,this.transitionState(Ee.Disconnected,s)}onWebSocketError(t,r){r===this._ws&&this.logger.error("WebSocket error occurred.")}onWebSocketMessage(t,r){if(r!==this._ws)return;const n=t.data;let s;if(/^(\r\n)+$/.test(n)){this.clearKeepAliveTimeout(),this.configuration.traceSip===!0&&this.logger.log("Received WebSocket message with CRLF Keep Alive response");return}if(!n){this.logger.warn("Received empty message, discarding...");return}if(typeof n!="string"){try{s=new TextDecoder().decode(new Uint8Array(n))}catch(i){this.logger.error(i.toString()),this.logger.error("Received WebSocket binary message failed to be converted into string, message discarded");return}this.configuration.traceSip===!0&&this.logger.log(`Received WebSocket binary message:
@@ -62,18 +62,18 @@
62
62
  `)}else s=n,this.configuration.traceSip===!0&&this.logger.log(`Received WebSocket text message:
63
63
 
64
64
  `+s+`
65
- `);if(this.state!==Ee.Connected){this.logger.warn("Received message while not connected, discarding...");return}if(this.onMessage)try{this.onMessage(s)}catch(i){throw this.logger.error(i.toString()),this.logger.error("Exception thrown by onMessage callback"),i}}onWebSocketOpen(t,r){r===this._ws&&this._state===Ee.Connecting&&(this.logger.log(`WebSocket opened ${this.server}`),this.transitionState(Ee.Connected))}transitionLoopDetectedError(t){let r="A state transition loop has been detected.";return r+=` An attempt to transition from ${this._state} to ${t} before the prior transition completed.`,r+=" Perhaps you are synchronously calling connect() or disconnect() from a callback or state change handler?",this.logger.error(r),new Ri("Loop detected.")}transitionState(t,r){const n=()=>{throw new Error(`Invalid state transition from ${this._state} to ${t}`)};if(this.transitioningState)throw this.transitionLoopDetectedError(t);switch(this.transitioningState=!0,this._state){case Ee.Connecting:t!==Ee.Connected&&t!==Ee.Disconnecting&&t!==Ee.Disconnected&&n();break;case Ee.Connected:t!==Ee.Disconnecting&&t!==Ee.Disconnected&&n();break;case Ee.Disconnecting:t!==Ee.Connecting&&t!==Ee.Disconnected&&n();break;case Ee.Disconnected:t!==Ee.Connecting&&n();break;default:throw new Error("Unknown state.")}const s=this._state;this._state=t;const i=this.connectResolve,o=this.connectReject;s===Ee.Connecting&&(this.connectPromise=void 0,this.connectResolve=void 0,this.connectReject=void 0);const a=this.disconnectResolve,l=this.disconnectReject;if(s===Ee.Disconnecting&&(this.disconnectPromise=void 0,this.disconnectResolve=void 0,this.disconnectReject=void 0),this.connectTimeout&&(clearTimeout(this.connectTimeout),this.connectTimeout=void 0),this.logger.log(`Transitioned from ${s} to ${this._state}`),this._stateEventEmitter.emit(this._state),t===Ee.Connected&&(this.startSendingKeepAlives(),this.onConnect))try{this.onConnect()}catch(u){throw this.logger.error(u.toString()),this.logger.error("Exception thrown by onConnect callback"),u}if(s===Ee.Connected&&(this.stopSendingKeepAlives(),this.onDisconnect))try{r?this.onDisconnect(r):this.onDisconnect()}catch(u){throw this.logger.error(u.toString()),this.logger.error("Exception thrown by onDisconnect callback"),u}if(s===Ee.Connecting){if(!i)throw new Error("Connect resolve undefined.");if(!o)throw new Error("Connect reject undefined.");t===Ee.Connected?i():o(r||new Error("Connect aborted."))}if(s===Ee.Disconnecting){if(!a)throw new Error("Disconnect resolve undefined.");if(!l)throw new Error("Disconnect reject undefined.");t===Ee.Disconnected?a():l(r||new Error("Disconnect aborted."))}this.transitioningState=!1}clearKeepAliveTimeout(){this.keepAliveDebounceTimeout&&clearTimeout(this.keepAliveDebounceTimeout),this.keepAliveDebounceTimeout=void 0}sendKeepAlive(){return this.keepAliveDebounceTimeout?Promise.resolve():(this.keepAliveDebounceTimeout=setTimeout(()=>{this.clearKeepAliveTimeout()},this.configuration.keepAliveDebounce*1e3),this.send(`\r
65
+ `);if(this.state!==Ee.Connected){this.logger.warn("Received message while not connected, discarding...");return}if(this.onMessage)try{this.onMessage(s)}catch(i){throw this.logger.error(i.toString()),this.logger.error("Exception thrown by onMessage callback"),i}}onWebSocketOpen(t,r){r===this._ws&&this._state===Ee.Connecting&&(this.logger.log(`WebSocket opened ${this.server}`),this.transitionState(Ee.Connected))}transitionLoopDetectedError(t){let r="A state transition loop has been detected.";return r+=` An attempt to transition from ${this._state} to ${t} before the prior transition completed.`,r+=" Perhaps you are synchronously calling connect() or disconnect() from a callback or state change handler?",this.logger.error(r),new $i("Loop detected.")}transitionState(t,r){const n=()=>{throw new Error(`Invalid state transition from ${this._state} to ${t}`)};if(this.transitioningState)throw this.transitionLoopDetectedError(t);switch(this.transitioningState=!0,this._state){case Ee.Connecting:t!==Ee.Connected&&t!==Ee.Disconnecting&&t!==Ee.Disconnected&&n();break;case Ee.Connected:t!==Ee.Disconnecting&&t!==Ee.Disconnected&&n();break;case Ee.Disconnecting:t!==Ee.Connecting&&t!==Ee.Disconnected&&n();break;case Ee.Disconnected:t!==Ee.Connecting&&n();break;default:throw new Error("Unknown state.")}const s=this._state;this._state=t;const i=this.connectResolve,o=this.connectReject;s===Ee.Connecting&&(this.connectPromise=void 0,this.connectResolve=void 0,this.connectReject=void 0);const a=this.disconnectResolve,l=this.disconnectReject;if(s===Ee.Disconnecting&&(this.disconnectPromise=void 0,this.disconnectResolve=void 0,this.disconnectReject=void 0),this.connectTimeout&&(clearTimeout(this.connectTimeout),this.connectTimeout=void 0),this.logger.log(`Transitioned from ${s} to ${this._state}`),this._stateEventEmitter.emit(this._state),t===Ee.Connected&&(this.startSendingKeepAlives(),this.onConnect))try{this.onConnect()}catch(u){throw this.logger.error(u.toString()),this.logger.error("Exception thrown by onConnect callback"),u}if(s===Ee.Connected&&(this.stopSendingKeepAlives(),this.onDisconnect))try{r?this.onDisconnect(r):this.onDisconnect()}catch(u){throw this.logger.error(u.toString()),this.logger.error("Exception thrown by onDisconnect callback"),u}if(s===Ee.Connecting){if(!i)throw new Error("Connect resolve undefined.");if(!o)throw new Error("Connect reject undefined.");t===Ee.Connected?i():o(r||new Error("Connect aborted."))}if(s===Ee.Disconnecting){if(!a)throw new Error("Disconnect resolve undefined.");if(!l)throw new Error("Disconnect reject undefined.");t===Ee.Disconnected?a():l(r||new Error("Disconnect aborted."))}this.transitioningState=!1}clearKeepAliveTimeout(){this.keepAliveDebounceTimeout&&clearTimeout(this.keepAliveDebounceTimeout),this.keepAliveDebounceTimeout=void 0}sendKeepAlive(){return this.keepAliveDebounceTimeout?Promise.resolve():(this.keepAliveDebounceTimeout=setTimeout(()=>{this.clearKeepAliveTimeout()},this.configuration.keepAliveDebounce*1e3),this.send(`\r
66
66
  \r
67
- `))}startSendingKeepAlives(){const t=r=>{const n=r*.8;return 1e3*(Math.random()*(r-n)+n)};this.configuration.keepAliveInterval&&!this.keepAliveInterval&&(this.keepAliveInterval=setInterval(()=>{this.sendKeepAlive(),this.startSendingKeepAlives()},t(this.configuration.keepAliveInterval)))}stopSendingKeepAlives(){this.keepAliveInterval&&clearInterval(this.keepAliveInterval),this.keepAliveDebounceTimeout&&clearTimeout(this.keepAliveDebounceTimeout),this.keepAliveInterval=void 0,this.keepAliveDebounceTimeout=void 0}};Tp.defaultOptions={server:"",connectionTimeout:5,keepAliveInterval:0,keepAliveDebounce:10,traceSip:!0};var jr=class $a{constructor(t={}){if(this._publishers={},this._registerers={},this._sessions={},this._subscriptions={},this._state=$t.Stopped,this._stateEventEmitter=new Ns,this.delegate=t.delegate,this.options=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},$a.defaultOptions()),{sipjsId:os(5)}),{uri:new In("sip","anonymous."+os(6),"anonymous.invalid")}),{viaHost:os(12)+".invalid"}),$a.stripUndefinedProperties(t)),this.options.hackIpInContact)if(typeof this.options.hackIpInContact=="boolean"&&this.options.hackIpInContact){const n=Math.floor(Math.random()*254+1);this.options.viaHost="192.0.2."+n}else this.options.hackIpInContact&&(this.options.viaHost=this.options.hackIpInContact);switch(this.loggerFactory=new fw,this.logger=this.loggerFactory.getLogger("sip.UserAgent"),this.loggerFactory.builtinEnabled=this.options.logBuiltinEnabled,this.loggerFactory.connector=this.options.logConnector,this.options.logLevel){case"error":this.loggerFactory.level=kt.error;break;case"warn":this.loggerFactory.level=kt.warn;break;case"log":this.loggerFactory.level=kt.log;break;case"debug":this.loggerFactory.level=kt.debug;break;default:break}if(this.options.logConfiguration&&(this.logger.log("Configuration:"),Object.keys(this.options).forEach(r=>{const n=this.options[r];switch(r){case"uri":case"sessionDescriptionHandlerFactory":this.logger.log("· "+r+": "+n);break;case"authorizationPassword":this.logger.log("· "+r+": NOT SHOWN");break;case"transportConstructor":this.logger.log("· "+r+": "+n.name);break;default:this.logger.log("· "+r+": "+JSON.stringify(n))}})),this.options.transportOptions){const r=this.options.transportOptions,n=r.maxReconnectionAttempts,s=r.reconnectionTimeout;n!==void 0&&this.logger.warn('The transport option "maxReconnectionAttempts" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),s!==void 0&&this.logger.warn('The transport option "reconnectionTimeout" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),t.reconnectionDelay===void 0&&s!==void 0&&(this.options.reconnectionDelay=s),t.reconnectionAttempts===void 0&&n!==void 0&&(this.options.reconnectionAttempts=n)}if(t.reconnectionDelay!==void 0&&this.logger.warn('The user agent option "reconnectionDelay" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),t.reconnectionAttempts!==void 0&&this.logger.warn('The user agent option "reconnectionAttempts" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),this._transport=new this.options.transportConstructor(this.getLogger("sip.Transport"),this.options.transportOptions),this.initTransportCallbacks(),this._contact=this.initContact(),this._instanceId=this.options.instanceId?this.options.instanceId:$a.newUUID(),Ct.parse(this._instanceId,"uuid")===-1)throw new Error("Invalid instanceId.");this._userAgentCore=this.initCore()}static makeURI(t){return Ct.URIParse(t)}static defaultOptions(){return{allowLegacyNotifications:!1,authorizationHa1:"",authorizationPassword:"",authorizationUsername:"",delegate:{},contactName:"",contactParams:{transport:"ws"},displayName:"",forceRport:!1,gracefulShutdown:!0,hackAllowUnregisteredOptionTags:!1,hackIpInContact:!1,hackViaTcp:!1,instanceId:"",instanceIdAlwaysAdded:!1,logBuiltinEnabled:!0,logConfiguration:!0,logConnector:()=>{},logLevel:"log",noAnswerTimeout:60,preloadedRouteSet:[],reconnectionAttempts:0,reconnectionDelay:4,sendInitialProvisionalResponse:!0,sessionDescriptionHandlerFactory:Mw(),sessionDescriptionHandlerFactoryOptions:{},sipExtension100rel:Pr.Unsupported,sipExtensionReplaces:Pr.Unsupported,sipExtensionExtraSupported:[],sipjsId:"",transportConstructor:Tp,transportOptions:{},uri:new In("sip","anonymous","anonymous.invalid"),userAgentString:"SIP.js/"+ap,viaHost:""}}static newUUID(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=Math.floor(Math.random()*16);return(t==="x"?r:r%4+8).toString(16)})}static stripUndefinedProperties(t){return Object.keys(t).reduce((r,n)=>(t[n]!==void 0&&(r[n]=t[n]),r),{})}get configuration(){return this.options}get contact(){return this._contact}get instanceId(){return this._instanceId}get state(){return this._state}get stateChange(){return this._stateEventEmitter}get transport(){return this._transport}get userAgentCore(){return this._userAgentCore}getLogger(t,r){return this.loggerFactory.getLogger(t,r)}getLoggerFactory(){return this.loggerFactory}isConnected(){return this.transport.isConnected()}reconnect(){return this.state===$t.Stopped?Promise.reject(new Error("User agent stopped.")):Promise.resolve().then(()=>this.transport.connect())}start(){return this.state===$t.Started?(this.logger.warn("User agent already started"),Promise.resolve()):(this.logger.log(`Starting ${this.configuration.uri}`),this.transitionState($t.Started),this.transport.connect())}async stop(){if(this.state===$t.Stopped)return this.logger.warn("User agent already stopped"),Promise.resolve();if(this.logger.log(`Stopping ${this.configuration.uri}`),!this.options.gracefulShutdown)return this.logger.log("Dispose of transport"),this.transport.dispose().catch(a=>{throw this.logger.error(a.message),a}),this.logger.log("Dispose of core"),this.userAgentCore.dispose(),this._publishers={},this._registerers={},this._sessions={},this._subscriptions={},this.transitionState($t.Stopped),Promise.resolve();const t=Object.assign({},this._publishers),r=Object.assign({},this._registerers),n=Object.assign({},this._sessions),s=Object.assign({},this._subscriptions),i=this.transport,o=this.userAgentCore;this.logger.log("Dispose of registerers");for(const a in r)r[a]&&await r[a].dispose().catch(l=>{throw this.logger.error(l.message),delete this._registerers[a],l});this.logger.log("Dispose of sessions");for(const a in n)n[a]&&await n[a].dispose().catch(l=>{throw this.logger.error(l.message),delete this._sessions[a],l});this.logger.log("Dispose of subscriptions");for(const a in s)s[a]&&await s[a].dispose().catch(l=>{throw this.logger.error(l.message),delete this._subscriptions[a],l});this.logger.log("Dispose of publishers");for(const a in t)t[a]&&await t[a].dispose().catch(l=>{throw this.logger.error(l.message),delete this._publishers[a],l});this.logger.log("Dispose of transport"),await i.dispose().catch(a=>{throw this.logger.error(a.message),a}),this.logger.log("Dispose of core"),o.dispose(),this.transitionState($t.Stopped)}_makeInviter(t,r){return new Ko(this,t,r)}attemptReconnection(t=1){const r=this.options.reconnectionAttempts,n=this.options.reconnectionDelay;if(t>r){this.logger.log("Maximum reconnection attempts reached");return}this.logger.log(`Reconnection attempt ${t} of ${r} - trying`),setTimeout(()=>{this.reconnect().then(()=>{this.logger.log(`Reconnection attempt ${t} of ${r} - succeeded`)}).catch(s=>{this.logger.error(s.message),this.logger.log(`Reconnection attempt ${t} of ${r} - failed`),this.attemptReconnection(++t)})},t===1?0:n*1e3)}initContact(){const t=this.options.contactName!==""?this.options.contactName:os(8),r=this.options.contactParams;return{pubGruu:void 0,tempGruu:void 0,uri:new In("sip",t,this.options.viaHost,void 0,r),toString:(n={})=>{const s=n.anonymous||!1,i=n.outbound||!1,o=n.register||!1;let a="<";return s?a+=this.contact.tempGruu||`sip:anonymous@anonymous.invalid;transport=${r.transport?r.transport:"ws"}`:o?a+=this.contact.uri:a+=this.contact.pubGruu||this.contact.uri,i&&(a+=";ob"),a+=">",this.options.instanceIdAlwaysAdded&&(a+=';+sip.instance="<urn:uuid:'+this._instanceId+'>"'),a}}}initCore(){let t=[];t.push("outbound"),this.options.sipExtension100rel===Pr.Supported&&t.push("100rel"),this.options.sipExtensionReplaces===Pr.Supported&&t.push("replaces"),this.options.sipExtensionExtraSupported&&t.push(...this.options.sipExtensionExtraSupported),this.options.hackAllowUnregisteredOptionTags||(t=t.filter(n=>uw[n])),t=Array.from(new Set(t));const r=t.slice();return(this.contact.pubGruu||this.contact.tempGruu)&&r.push("gruu"),new Pw({aor:this.options.uri,contact:this.contact,displayName:this.options.displayName,loggerFactory:this.loggerFactory,hackViaTcp:this.options.hackViaTcp,routeSet:this.options.preloadedRouteSet,supportedOptionTags:t,supportedOptionTagsResponse:r,sipjsId:this.options.sipjsId,userAgentHeaderFieldValue:this.options.userAgentString,viaForceRport:this.options.forceRport,viaHost:this.options.viaHost,authenticationFactory:()=>{const n=this.options.authorizationUsername?this.options.authorizationUsername:this.options.uri.user,s=this.options.authorizationPassword?this.options.authorizationPassword:void 0,i=this.options.authorizationHa1?this.options.authorizationHa1:void 0;return new dw(this.getLoggerFactory(),i,n,s)},transportAccessor:()=>this.transport},{onInvite:n=>{var s;const i=new Bs(this,n);if(n.delegate={onCancel:o=>{i._onCancel(o)},onTransportError:o=>{this.logger.error("A transport error has occurred while handling an incoming INVITE request.")}},n.trying(),this.options.sipExtensionReplaces!==Pr.Unsupported){const o=n.message.parseHeader("replaces");if(o){const a=o.call_id;if(typeof a!="string")throw new Error("Type of call id is not string");const l=o.replaces_to_tag;if(typeof l!="string")throw new Error("Type of to tag is not string");const u=o.replaces_from_tag;if(typeof u!="string")throw new Error("type of from tag is not string");const c=a+l+u,d=this.userAgentCore.dialogs.get(c);if(!d){i.reject({statusCode:481});return}if(!d.early&&o.early_only===!0){i.reject({statusCode:486});return}const p=this._sessions[a+u]||this._sessions[a+l]||void 0;if(!p)throw new Error("Session does not exist.");i._replacee=p}}if(!((s=this.delegate)===null||s===void 0)&&s.onInvite){if(i.autoSendAnInitialProvisionalResponse){i.progress().then(()=>{var o;if(((o=this.delegate)===null||o===void 0?void 0:o.onInvite)===void 0)throw new Error("onInvite undefined.");this.delegate.onInvite(i)});return}this.delegate.onInvite(i);return}i.reject({statusCode:486})},onMessage:n=>{if(this.delegate&&this.delegate.onMessage){const s=new hp(n);this.delegate.onMessage(s)}else n.accept()},onNotify:n=>{if(this.delegate&&this.delegate.onNotify){const s=new Kl(n);this.delegate.onNotify(s)}else this.options.allowLegacyNotifications?n.accept():n.reject({statusCode:481})},onRefer:n=>{this.logger.warn("Received an out of dialog REFER request"),this.delegate&&this.delegate.onReferRequest?this.delegate.onReferRequest(n):n.reject({statusCode:405})},onRegister:n=>{this.logger.warn("Received an out of dialog REGISTER request"),this.delegate&&this.delegate.onRegisterRequest?this.delegate.onRegisterRequest(n):n.reject({statusCode:405})},onSubscribe:n=>{this.logger.warn("Received an out of dialog SUBSCRIBE request"),this.delegate&&this.delegate.onSubscribeRequest?this.delegate.onSubscribeRequest(n):n.reject({statusCode:405})}})}initTransportCallbacks(){this.transport.onConnect=()=>this.onTransportConnect(),this.transport.onDisconnect=t=>this.onTransportDisconnect(t),this.transport.onMessage=t=>this.onTransportMessage(t)}onTransportConnect(){this.state!==$t.Stopped&&this.delegate&&this.delegate.onConnect&&this.delegate.onConnect()}onTransportDisconnect(t){this.state!==$t.Stopped&&(this.delegate&&this.delegate.onDisconnect&&this.delegate.onDisconnect(t),t&&this.options.reconnectionAttempts>0&&this.attemptReconnection())}onTransportMessage(t){const r=Go.parseMessage(t,this.getLogger("sip.Parser"));if(!r){this.logger.warn("Failed to parse incoming message. Dropping.");return}if(this.state===$t.Stopped&&r instanceof qs){this.logger.warn(`Received ${r.method} request while stopped. Dropping.`);return}const n=()=>{for(const s of["from","to","call_id","cseq","via"])if(!r.hasHeader(s))return this.logger.warn(`Missing mandatory header field : ${s}.`),!1;return!0};if(r instanceof qs){if(!n()){this.logger.warn("Request missing mandatory header field. Dropping.");return}if(!r.toTag&&r.callId.substr(0,5)===this.options.sipjsId){this.userAgentCore.replyStateless(r,{statusCode:482});return}const s=$i(r.body),i=r.getHeader("content-length");if(i&&s<Number(i)){this.userAgentCore.replyStateless(r,{statusCode:400});return}}if(r instanceof Rn){if(!n()){this.logger.warn("Response missing mandatory header field. Dropping.");return}if(r.getHeaders("via").length>1){this.logger.warn("More than one Via header field present in the response. Dropping.");return}if(r.via.host!==this.options.viaHost||r.via.port!==void 0){this.logger.warn("Via sent-by in the response does not match UA Via host value. Dropping.");return}const s=$i(r.body),i=r.getHeader("content-length");if(i&&s<Number(i)){this.logger.warn("Message body length is lower than the value in Content-Length header field. Dropping.");return}}if(r instanceof qs){this.userAgentCore.receiveIncomingRequestFromTransport(r);return}if(r instanceof Rn){this.userAgentCore.receiveIncomingResponseFromTransport(r);return}throw new Error("Invalid message type.")}transitionState(t,r){const n=()=>{throw new Error(`Invalid state transition from ${this._state} to ${t}`)};switch(this._state){case $t.Started:t!==$t.Stopped&&n();break;case $t.Stopped:t!==$t.Started&&n();break;default:throw new Error("Unknown state.")}this.logger.log(`Transitioned from ${this._state} to ${t}`),this._state=t,this._stateEventEmitter.emit(this._state)}},Nw=ap,ut=new window.AudioContext,qw={1:[697,1209],2:[697,1336],3:[697,1477],A:[697,1633],4:[770,1209],5:[770,1336],6:[770,1477],B:[770,1633],7:[852,1209],8:[852,1336],9:[852,1477],C:[852,1633],"*":[941,1209],0:[941,1336],"#":[941,1477],D:[941,1633]},Zo=F(null),Xo=F(null),Di=F(null),Oi=F(.5),Qo=F(1),Yl=F("original"),ea=F(!1),Hi={original:{frequencies:[523.25,659.25,783.99],type:"sine",originalMelody:!0,gain:.7,duration:.5,repeatDelay:400},aurora:{frequencies:[523.25,659.25,783.99,1046.5],type:"sine",originalMelody:!0,gain:.85,duration:.55,repeatDelay:400},resonancia:{frequencies:[392,523.25,659.25,783.99],type:"triangle",originalMelody:!0,gain:1,duration:.6,repeatDelay:400}};const Ep=()=>{const e={classic:"original","original-loud":"aurora","original-intense":"resonancia"},t=d=>{Oi.value=Math.max(0,Math.min(1,d/100))},r=d=>{Qo.value=Math.max(0,Math.min(1,d/100))},n=()=>{ea.value&&(l(),a())},s=d=>{const p=e[d]??d;Yl.value=Hi[p]?p:"original",n()},i=(d,p=150)=>{ut.state==="suspended"&&ut.resume();const h=qw[d.toUpperCase()];if(!h)return;const m=ut.createOscillator(),w=ut.createOscillator(),x=ut.createGain();m.frequency.value=h[0],w.frequency.value=h[1],m.type="sine",w.type="sine",x.gain.value=.1*Oi.value,m.connect(x),w.connect(x),x.connect(ut.destination),m.start(),w.start(),setTimeout(()=>{m.stop(),w.stop(),m.disconnect(),w.disconnect(),x.disconnect()},p)},o=async(d=500)=>{if(ut.state==="suspended")try{await ut.resume()}catch{}const p=ut.createOscillator(),h=ut.createGain(),m=ut.currentTime;p.type="sine",p.frequency.value=600;const w=.02,x=.1,g=.75*Oi.value;h.gain.setValueAtTime(0,m),h.gain.linearRampToValueAtTime(g,m+w),h.gain.setValueAtTime(g,m+d/1e3-x),h.gain.linearRampToValueAtTime(0,m+d/1e3),p.connect(h),h.connect(ut.destination),p.start(m),p.stop(m+d/1e3),await new Promise(S=>window.setTimeout(S,d))},a=()=>{if(ea.value)return;ea.value=!0,ut.state==="suspended"&&ut.resume();const d=()=>{const h=ut.currentTime,m=Hi[Yl.value]||Hi.original,w=ut.createGain(),x=m.duration,g=(m.originalMelody?[m.frequencies[0]]:m.frequencies).map(S=>{const b=ut.createOscillator();return b.type=m.type,b.frequency.setValueAtTime(S,h),m.originalMelody&&m.frequencies.slice(1).forEach((y,T)=>{b.frequency.setValueAtTime(y,h+(T+1)*.1)}),b.connect(w),b});m.originalMelody?(w.gain.setValueAtTime(m.gain*Qo.value,h),w.gain.exponentialRampToValueAtTime(.001,h+x)):(w.gain.setValueAtTime(0,h),w.gain.linearRampToValueAtTime(.7*Qo.value,h+.02),w.gain.setValueAtTime(.7*Qo.value,h+1.05),w.gain.linearRampToValueAtTime(0,h+x)),w.connect(ut.destination),g.forEach(S=>{S.start(h),S.stop(h+x)})},p=()=>{const h=Hi[Yl.value]||Hi.original;Xo.value=window.setTimeout(d,h.repeatDelay)};d(),p(),Zo.value=window.setInterval(()=>{d(),p()},3e3)},l=()=>{Zo.value&&(clearInterval(Zo.value),Zo.value=null),Xo.value&&(clearTimeout(Xo.value),Xo.value=null),ea.value=!1};return{playDtmf:i,playAutoAnswerBeep:o,startRingtone:a,stopRingtone:l,startRingback:()=>{if(Di.value)return;ut.state==="suspended"&&ut.resume();const d=()=>{const p=ut.currentTime,h=ut.createOscillator(),m=ut.createGain();h.type="sine",h.frequency.value=425,m.gain.setValueAtTime(.1*Oi.value,p),m.gain.linearRampToValueAtTime(.1*Oi.value,p+1),m.gain.linearRampToValueAtTime(0,p+1.1),h.connect(m),m.connect(ut.destination),h.start(p),h.stop(p+1.1)};d(),Di.value=window.setInterval(()=>{d()},4e3)},stopRingback:()=>{Di.value&&(clearInterval(Di.value),Di.value=null)},setNotificationVolume:t,setRingtoneVolume:r,setRingtoneTone:s}};function Ap(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=Ap(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function kp(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=Ap(e))&&(n&&(n+=" "),n+=t);return n}var Bw=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},Lw=(e,t)=>({classGroupId:e,validator:t}),Ip=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),ta="-",Rp=[],Fw="arbitrary..",Vw=e=>{const t=Uw(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return jw(o);const a=o.split(ta);return $p(a,a[0]===""&&a.length>1?1:0,t)},getConflictingClassGroupIds:(o,a)=>{if(a){const l=n[o],u=r[o];return l?u?Bw(u,l):l:u||Rp}return r[o]||Rp}}},$p=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const n=e[t],s=r.nextPart.get(n);if(s){const l=$p(e,t+1,s);if(l)return l}const i=r.validators;if(i===null)return;const o=t===0?e.join(ta):e.slice(t).join(ta),a=i.length;for(let l=0;l<a;l++){const u=i[l];if(u.validator(o))return u.classGroupId}},jw=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?Fw+n:void 0})(),Uw=e=>{const{theme:t,classGroups:r}=e;return zw(r,t)},zw=(e,t)=>{const r=Ip();for(const n in e){const s=e[n];Zl(s,r,n,t)}return r},Zl=(e,t,r,n)=>{const s=e.length;for(let i=0;i<s;i++){const o=e[i];Kw(o,t,r,n)}},Kw=(e,t,r,n)=>{if(typeof e=="string"){Ww(e,t,r);return}if(typeof e=="function"){Gw(e,t,r,n);return}Jw(e,t,r,n)},Ww=(e,t,r)=>{const n=e===""?t:Pp(t,e);n.classGroupId=r},Gw=(e,t,r,n)=>{if(Yw(e)){Zl(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(Lw(r,e))},Jw=(e,t,r,n)=>{const s=Object.entries(e),i=s.length;for(let o=0;o<i;o++){const[a,l]=s[o];Zl(l,Pp(t,a),r,n)}},Pp=(e,t)=>{let r=e;const n=t.split(ta),s=n.length;for(let i=0;i<s;i++){const o=n[i];let a=r.nextPart.get(o);a||(a=Ip(),r.nextPart.set(o,a)),r=a}return r},Yw=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Zw=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const s=(i,o)=>{r[i]=o,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(i){let o=r[i];if(o!==void 0)return o;if((o=n[i])!==void 0)return s(i,o),o},set(i,o){i in r?r[i]=o:s(i,o)}}},Xl="!",Dp=":",Xw=[],Op=(e,t,r,n,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:s}),Qw=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=s=>{const i=[];let o=0,a=0,l=0,u;const c=s.length;for(let w=0;w<c;w++){const x=s[w];if(o===0&&a===0){if(x===Dp){i.push(s.slice(l,w)),l=w+1;continue}if(x==="/"){u=w;continue}}x==="["?o++:x==="]"?o--:x==="("?a++:x===")"&&a--}const d=i.length===0?s:s.slice(l);let p=d,h=!1;d.endsWith(Xl)?(p=d.slice(0,-1),h=!0):d.startsWith(Xl)&&(p=d.slice(1),h=!0);const m=u&&u>l?u-l:void 0;return Op(i,h,p,m)};if(t){const s=t+Dp,i=n;n=o=>o.startsWith(s)?i(o.slice(s.length)):Op(Xw,!1,o,void 0,!0)}if(r){const s=n;n=i=>r({className:i,parseClassName:s})}return n},ey=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let s=[];for(let i=0;i<r.length;i++){const o=r[i],a=o[0]==="[",l=t.has(o);a||l?(s.length>0&&(s.sort(),n.push(...s),s=[]),n.push(o)):s.push(o)}return s.length>0&&(s.sort(),n.push(...s)),n}},ty=e=>({cache:Zw(e.cacheSize),parseClassName:Qw(e),sortModifiers:ey(e),...Vw(e)}),ry=/\s+/,ny=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:i}=t,o=[],a=e.trim().split(ry);let l="";for(let u=a.length-1;u>=0;u-=1){const c=a[u],{isExternal:d,modifiers:p,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:w}=r(c);if(d){l=c+(l.length>0?" "+l:l);continue}let x=!!w,g=n(x?m.substring(0,w):m);if(!g){if(!x){l=c+(l.length>0?" "+l:l);continue}if(g=n(m),!g){l=c+(l.length>0?" "+l:l);continue}x=!1}const S=p.length===0?"":p.length===1?p[0]:i(p).join(":"),b=h?S+Xl:S,y=b+g;if(o.indexOf(y)>-1)continue;o.push(y);const T=s(g,x);for(let k=0;k<T.length;++k){const N=T[k];o.push(b+N)}l=c+(l.length>0?" "+l:l)}return l},sy=(...e)=>{let t=0,r,n,s="";for(;t<e.length;)(r=e[t++])&&(n=Hp(r))&&(s&&(s+=" "),s+=n);return s},Hp=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Hp(e[n]))&&(r&&(r+=" "),r+=t);return r},iy=(e,...t)=>{let r,n,s,i;const o=l=>(r=ty(t.reduce((u,c)=>c(u),e())),n=r.cache.get,s=r.cache.set,i=a,a(l)),a=l=>{const u=n(l);if(u)return u;const c=ny(l,r);return s(l,c),c};return i=o,(...l)=>i(sy(...l))},oy=[],xt=e=>{const t=r=>r[e]||oy;return t.isThemeGetter=!0,t},Mp=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Np=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ay=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ly=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,cy=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,uy=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,dy=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fy=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Mn=e=>ay.test(e),Fe=e=>!!e&&!Number.isNaN(Number(e)),Nn=e=>!!e&&Number.isInteger(Number(e)),Ql=e=>e.endsWith("%")&&Fe(e.slice(0,-1)),fn=e=>ly.test(e),qp=()=>!0,py=e=>cy.test(e)&&!uy.test(e),ec=()=>!1,hy=e=>dy.test(e),gy=e=>fy.test(e),vy=e=>!Ce(e)&&!xe(e),my=e=>qn(e,Up,ec),Ce=e=>Mp.test(e),as=e=>qn(e,zp,py),Bp=e=>qn(e,Ty,Fe),wy=e=>qn(e,Wp,qp),yy=e=>qn(e,Kp,ec),Lp=e=>qn(e,Vp,ec),by=e=>qn(e,jp,gy),ra=e=>qn(e,Gp,hy),xe=e=>Np.test(e),Mi=e=>ls(e,zp),_y=e=>ls(e,Kp),Fp=e=>ls(e,Vp),Sy=e=>ls(e,Up),Cy=e=>ls(e,jp),na=e=>ls(e,Gp,!0),xy=e=>ls(e,Wp,!0),qn=(e,t,r)=>{const n=Mp.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},ls=(e,t,r=!1)=>{const n=Np.exec(e);return n?n[1]?t(n[1]):r:!1},Vp=e=>e==="position"||e==="percentage",jp=e=>e==="image"||e==="url",Up=e=>e==="length"||e==="size"||e==="bg-size",zp=e=>e==="length",Ty=e=>e==="number",Kp=e=>e==="family-name",Wp=e=>e==="number"||e==="weight",Gp=e=>e==="shadow",Ey=()=>{const e=xt("color"),t=xt("font"),r=xt("text"),n=xt("font-weight"),s=xt("tracking"),i=xt("leading"),o=xt("breakpoint"),a=xt("container"),l=xt("spacing"),u=xt("radius"),c=xt("shadow"),d=xt("inset-shadow"),p=xt("text-shadow"),h=xt("drop-shadow"),m=xt("blur"),w=xt("perspective"),x=xt("aspect"),g=xt("ease"),S=xt("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],T=()=>[...y(),xe,Ce],k=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],v=()=>[xe,Ce,l],B=()=>[Mn,"full","auto",...v()],q=()=>[Nn,"none","subgrid",xe,Ce],C=()=>["auto",{span:["full",Nn,xe,Ce]},Nn,xe,Ce],_=()=>[Nn,"auto",xe,Ce],E=()=>["auto","min","max","fr",xe,Ce],P=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],R=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...v()],G=()=>[Mn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...v()],W=()=>[Mn,"screen","full","dvw","lvw","svw","min","max","fit",...v()],ae=()=>[Mn,"screen","full","lh","dvh","lvh","svh","min","max","fit",...v()],Y=()=>[e,xe,Ce],le=()=>[...y(),Fp,Lp,{position:[xe,Ce]}],pe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Ae=()=>["auto","cover","contain",Sy,my,{size:[xe,Ce]}],je=()=>[Ql,Mi,as],Ie=()=>["","none","full",u,xe,Ce],Oe=()=>["",Fe,Mi,as],Xe=()=>["solid","dashed","dotted","double"],yt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ne=()=>[Fe,Ql,Fp,Lp],at=()=>["","none",m,xe,Ce],bt=()=>["none",Fe,xe,Ce],Tt=()=>["none",Fe,xe,Ce],A=()=>[Fe,xe,Ce],H=()=>[Mn,"full",...v()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[fn],breakpoint:[fn],color:[qp],container:[fn],"drop-shadow":[fn],ease:["in","out","in-out"],font:[vy],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[fn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[fn],shadow:[fn],spacing:["px",Fe],text:[fn],"text-shadow":[fn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Mn,Ce,xe,x]}],container:["container"],columns:[{columns:[Fe,Ce,xe,a]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:T()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:B()}],"inset-x":[{"inset-x":B()}],"inset-y":[{"inset-y":B()}],start:[{"inset-s":B(),start:B()}],end:[{"inset-e":B(),end:B()}],"inset-bs":[{"inset-bs":B()}],"inset-be":[{"inset-be":B()}],top:[{top:B()}],right:[{right:B()}],bottom:[{bottom:B()}],left:[{left:B()}],visibility:["visible","invisible","collapse"],z:[{z:[Nn,"auto",xe,Ce]}],basis:[{basis:[Mn,"full","auto",a,...v()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Fe,Mn,"auto","initial","none",Ce]}],grow:[{grow:["",Fe,xe,Ce]}],shrink:[{shrink:["",Fe,xe,Ce]}],order:[{order:[Nn,"first","last","none",xe,Ce]}],"grid-cols":[{"grid-cols":q()}],"col-start-end":[{col:C()}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":q()}],"row-start-end":[{row:C()}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":E()}],"auto-rows":[{"auto-rows":E()}],gap:[{gap:v()}],"gap-x":[{"gap-x":v()}],"gap-y":[{"gap-y":v()}],"justify-content":[{justify:[...P(),"normal"]}],"justify-items":[{"justify-items":[...R(),"normal"]}],"justify-self":[{"justify-self":["auto",...R()]}],"align-content":[{content:["normal",...P()]}],"align-items":[{items:[...R(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...R(),{baseline:["","last"]}]}],"place-content":[{"place-content":P()}],"place-items":[{"place-items":[...R(),"baseline"]}],"place-self":[{"place-self":["auto",...R()]}],p:[{p:v()}],px:[{px:v()}],py:[{py:v()}],ps:[{ps:v()}],pe:[{pe:v()}],pbs:[{pbs:v()}],pbe:[{pbe:v()}],pt:[{pt:v()}],pr:[{pr:v()}],pb:[{pb:v()}],pl:[{pl:v()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mbs:[{mbs:D()}],mbe:[{mbe:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":v()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":v()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],"inline-size":[{inline:["auto",...W()]}],"min-inline-size":[{"min-inline":["auto",...W()]}],"max-inline-size":[{"max-inline":["none",...W()]}],"block-size":[{block:["auto",...ae()]}],"min-block-size":[{"min-block":["auto",...ae()]}],"max-block-size":[{"max-block":["none",...ae()]}],w:[{w:[a,"screen",...G()]}],"min-w":[{"min-w":[a,"screen","none",...G()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",r,Mi,as]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,xy,wy]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ql,Ce]}],"font-family":[{font:[_y,yy,t]}],"font-features":[{"font-features":[Ce]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,xe,Ce]}],"line-clamp":[{"line-clamp":[Fe,"none",xe,Bp]}],leading:[{leading:[i,...v()]}],"list-image":[{"list-image":["none",xe,Ce]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",xe,Ce]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Y()}],"text-color":[{text:Y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Xe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Fe,"from-font","auto",xe,as]}],"text-decoration-color":[{decoration:Y()}],"underline-offset":[{"underline-offset":[Fe,"auto",xe,Ce]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:v()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",xe,Ce]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",xe,Ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:le()}],"bg-repeat":[{bg:pe()}],"bg-size":[{bg:Ae()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Nn,xe,Ce],radial:["",xe,Ce],conic:[Nn,xe,Ce]},Cy,by]}],"bg-color":[{bg:Y()}],"gradient-from-pos":[{from:je()}],"gradient-via-pos":[{via:je()}],"gradient-to-pos":[{to:je()}],"gradient-from":[{from:Y()}],"gradient-via":[{via:Y()}],"gradient-to":[{to:Y()}],rounded:[{rounded:Ie()}],"rounded-s":[{"rounded-s":Ie()}],"rounded-e":[{"rounded-e":Ie()}],"rounded-t":[{"rounded-t":Ie()}],"rounded-r":[{"rounded-r":Ie()}],"rounded-b":[{"rounded-b":Ie()}],"rounded-l":[{"rounded-l":Ie()}],"rounded-ss":[{"rounded-ss":Ie()}],"rounded-se":[{"rounded-se":Ie()}],"rounded-ee":[{"rounded-ee":Ie()}],"rounded-es":[{"rounded-es":Ie()}],"rounded-tl":[{"rounded-tl":Ie()}],"rounded-tr":[{"rounded-tr":Ie()}],"rounded-br":[{"rounded-br":Ie()}],"rounded-bl":[{"rounded-bl":Ie()}],"border-w":[{border:Oe()}],"border-w-x":[{"border-x":Oe()}],"border-w-y":[{"border-y":Oe()}],"border-w-s":[{"border-s":Oe()}],"border-w-e":[{"border-e":Oe()}],"border-w-bs":[{"border-bs":Oe()}],"border-w-be":[{"border-be":Oe()}],"border-w-t":[{"border-t":Oe()}],"border-w-r":[{"border-r":Oe()}],"border-w-b":[{"border-b":Oe()}],"border-w-l":[{"border-l":Oe()}],"divide-x":[{"divide-x":Oe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Oe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Xe(),"hidden","none"]}],"divide-style":[{divide:[...Xe(),"hidden","none"]}],"border-color":[{border:Y()}],"border-color-x":[{"border-x":Y()}],"border-color-y":[{"border-y":Y()}],"border-color-s":[{"border-s":Y()}],"border-color-e":[{"border-e":Y()}],"border-color-bs":[{"border-bs":Y()}],"border-color-be":[{"border-be":Y()}],"border-color-t":[{"border-t":Y()}],"border-color-r":[{"border-r":Y()}],"border-color-b":[{"border-b":Y()}],"border-color-l":[{"border-l":Y()}],"divide-color":[{divide:Y()}],"outline-style":[{outline:[...Xe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Fe,xe,Ce]}],"outline-w":[{outline:["",Fe,Mi,as]}],"outline-color":[{outline:Y()}],shadow:[{shadow:["","none",c,na,ra]}],"shadow-color":[{shadow:Y()}],"inset-shadow":[{"inset-shadow":["none",d,na,ra]}],"inset-shadow-color":[{"inset-shadow":Y()}],"ring-w":[{ring:Oe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Y()}],"ring-offset-w":[{"ring-offset":[Fe,as]}],"ring-offset-color":[{"ring-offset":Y()}],"inset-ring-w":[{"inset-ring":Oe()}],"inset-ring-color":[{"inset-ring":Y()}],"text-shadow":[{"text-shadow":["none",p,na,ra]}],"text-shadow-color":[{"text-shadow":Y()}],opacity:[{opacity:[Fe,xe,Ce]}],"mix-blend":[{"mix-blend":[...yt(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":yt()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Fe]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ne()}],"mask-image-linear-from-color":[{"mask-linear-from":Y()}],"mask-image-linear-to-color":[{"mask-linear-to":Y()}],"mask-image-t-from-pos":[{"mask-t-from":Ne()}],"mask-image-t-to-pos":[{"mask-t-to":Ne()}],"mask-image-t-from-color":[{"mask-t-from":Y()}],"mask-image-t-to-color":[{"mask-t-to":Y()}],"mask-image-r-from-pos":[{"mask-r-from":Ne()}],"mask-image-r-to-pos":[{"mask-r-to":Ne()}],"mask-image-r-from-color":[{"mask-r-from":Y()}],"mask-image-r-to-color":[{"mask-r-to":Y()}],"mask-image-b-from-pos":[{"mask-b-from":Ne()}],"mask-image-b-to-pos":[{"mask-b-to":Ne()}],"mask-image-b-from-color":[{"mask-b-from":Y()}],"mask-image-b-to-color":[{"mask-b-to":Y()}],"mask-image-l-from-pos":[{"mask-l-from":Ne()}],"mask-image-l-to-pos":[{"mask-l-to":Ne()}],"mask-image-l-from-color":[{"mask-l-from":Y()}],"mask-image-l-to-color":[{"mask-l-to":Y()}],"mask-image-x-from-pos":[{"mask-x-from":Ne()}],"mask-image-x-to-pos":[{"mask-x-to":Ne()}],"mask-image-x-from-color":[{"mask-x-from":Y()}],"mask-image-x-to-color":[{"mask-x-to":Y()}],"mask-image-y-from-pos":[{"mask-y-from":Ne()}],"mask-image-y-to-pos":[{"mask-y-to":Ne()}],"mask-image-y-from-color":[{"mask-y-from":Y()}],"mask-image-y-to-color":[{"mask-y-to":Y()}],"mask-image-radial":[{"mask-radial":[xe,Ce]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ne()}],"mask-image-radial-from-color":[{"mask-radial-from":Y()}],"mask-image-radial-to-color":[{"mask-radial-to":Y()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":y()}],"mask-image-conic-pos":[{"mask-conic":[Fe]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ne()}],"mask-image-conic-from-color":[{"mask-conic-from":Y()}],"mask-image-conic-to-color":[{"mask-conic-to":Y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:le()}],"mask-repeat":[{mask:pe()}],"mask-size":[{mask:Ae()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",xe,Ce]}],filter:[{filter:["","none",xe,Ce]}],blur:[{blur:at()}],brightness:[{brightness:[Fe,xe,Ce]}],contrast:[{contrast:[Fe,xe,Ce]}],"drop-shadow":[{"drop-shadow":["","none",h,na,ra]}],"drop-shadow-color":[{"drop-shadow":Y()}],grayscale:[{grayscale:["",Fe,xe,Ce]}],"hue-rotate":[{"hue-rotate":[Fe,xe,Ce]}],invert:[{invert:["",Fe,xe,Ce]}],saturate:[{saturate:[Fe,xe,Ce]}],sepia:[{sepia:["",Fe,xe,Ce]}],"backdrop-filter":[{"backdrop-filter":["","none",xe,Ce]}],"backdrop-blur":[{"backdrop-blur":at()}],"backdrop-brightness":[{"backdrop-brightness":[Fe,xe,Ce]}],"backdrop-contrast":[{"backdrop-contrast":[Fe,xe,Ce]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Fe,xe,Ce]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Fe,xe,Ce]}],"backdrop-invert":[{"backdrop-invert":["",Fe,xe,Ce]}],"backdrop-opacity":[{"backdrop-opacity":[Fe,xe,Ce]}],"backdrop-saturate":[{"backdrop-saturate":[Fe,xe,Ce]}],"backdrop-sepia":[{"backdrop-sepia":["",Fe,xe,Ce]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":v()}],"border-spacing-x":[{"border-spacing-x":v()}],"border-spacing-y":[{"border-spacing-y":v()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",xe,Ce]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Fe,"initial",xe,Ce]}],ease:[{ease:["linear","initial",g,xe,Ce]}],delay:[{delay:[Fe,xe,Ce]}],animate:[{animate:["none",S,xe,Ce]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,xe,Ce]}],"perspective-origin":[{"perspective-origin":T()}],rotate:[{rotate:bt()}],"rotate-x":[{"rotate-x":bt()}],"rotate-y":[{"rotate-y":bt()}],"rotate-z":[{"rotate-z":bt()}],scale:[{scale:Tt()}],"scale-x":[{"scale-x":Tt()}],"scale-y":[{"scale-y":Tt()}],"scale-z":[{"scale-z":Tt()}],"scale-3d":["scale-3d"],skew:[{skew:A()}],"skew-x":[{"skew-x":A()}],"skew-y":[{"skew-y":A()}],transform:[{transform:[xe,Ce,"","none","gpu","cpu"]}],"transform-origin":[{origin:T()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:H()}],"translate-x":[{"translate-x":H()}],"translate-y":[{"translate-y":H()}],"translate-z":[{"translate-z":H()}],"translate-none":["translate-none"],accent:[{accent:Y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Y()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",xe,Ce]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":v()}],"scroll-mx":[{"scroll-mx":v()}],"scroll-my":[{"scroll-my":v()}],"scroll-ms":[{"scroll-ms":v()}],"scroll-me":[{"scroll-me":v()}],"scroll-mbs":[{"scroll-mbs":v()}],"scroll-mbe":[{"scroll-mbe":v()}],"scroll-mt":[{"scroll-mt":v()}],"scroll-mr":[{"scroll-mr":v()}],"scroll-mb":[{"scroll-mb":v()}],"scroll-ml":[{"scroll-ml":v()}],"scroll-p":[{"scroll-p":v()}],"scroll-px":[{"scroll-px":v()}],"scroll-py":[{"scroll-py":v()}],"scroll-ps":[{"scroll-ps":v()}],"scroll-pe":[{"scroll-pe":v()}],"scroll-pbs":[{"scroll-pbs":v()}],"scroll-pbe":[{"scroll-pbe":v()}],"scroll-pt":[{"scroll-pt":v()}],"scroll-pr":[{"scroll-pr":v()}],"scroll-pb":[{"scroll-pb":v()}],"scroll-pl":[{"scroll-pl":v()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",xe,Ce]}],fill:[{fill:["none",...Y()]}],"stroke-w":[{stroke:[Fe,Mi,as,Bp]}],stroke:[{stroke:["none",...Y()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Ay=iy(Ey);const dt=(...e)=>Ay(kp(e)),dT=4;var Jp=e=>e.replace(/\D/g,"");const tc=(e,t=[])=>{const r=Jp(e??"");return r!==""&&t.some(n=>Jp(n)===r)},_r=(e,t=[])=>e.length<=4||tc(e,t)?e:`${"*".repeat(e.length-4)}${e.slice(-4)}`,ky=(e,t)=>{if(e){const r=rc(e);if(r&&Yp(r))return r;if(e.trim())return e.trim()}if(t){const r=rc(t);if(r&&Yp(r))return r;const n=Iy(t);if(n)return n;if(t.trim()&&!t.includes("@"))return t.trim()}return"Unknown"};var rc=e=>e.replace(/[^\d+*#]/g,""),Yp=e=>/^\+?[\d*#]{2,}$/.test(e),Iy=e=>{let t=e.match(/^([+]?[\d*#]{2,})\s*[-:]/);return t&&t[1]||(t=e.match(/\(([+]?[\d*#]{2,})\)/),t&&t[1])||(t=e.match(/(?:ext\.?|extension)\s*([+]?[\d*#]{2,})/i),t&&t[1])?t[1]:(t=e.match(/([+]?\d{1,3}[-.\s]?\(?\d{1,4}\)?[-.\s]?\d{1,4}[-.\s]?\d{1,9})/),t&&t[1]?rc(t[1]):null)};const Zp="webphone-auto-answer",nc=()=>{try{return localStorage.getItem(Zp)==="true"}catch{return!1}};var Ry="/assets/sipSharedWorker-Bk0APY9t.js";function Ni(e){"@babel/helpers - typeof";return Ni=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ni(e)}function $y(e,t){if(Ni(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ni(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Py(e){var t=$y(e,"string");return Ni(t)=="symbol"?t:t+""}function er(e,t,r){return(t=Py(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Dy=class{constructor(e,t){er(this,"serverUrl",void 0),er(this,"keepAliveInterval",void 0),er(this,"clientId",void 0),er(this,"connectionId",void 0),er(this,"stateEventEmitter",new Ns),er(this,"port",void 0),er(this,"currentState",Ee.Disconnected),er(this,"connectPromise",void 0),er(this,"connectResolve",void 0),er(this,"connectReject",void 0),er(this,"connectTimeout",void 0),er(this,"onConnect",void 0),er(this,"onDisconnect",void 0),er(this,"onMessage",void 0),this.serverUrl=t.server,this.keepAliveInterval=t.keepAliveInterval??30,this.clientId=t.clientId,this.connectionId=t.connectionId;const r=new SharedWorker(Ry,{name:`webphone-sip-${this.connectionId}`});this.port=r.port,r.addEventListener("error",n=>{this.handle({type:"error",error:n.message||"SharedWorker failed to load"})}),this.port.addEventListener("message",n=>this.handle(n.data)),this.port.start()}get protocol(){return new URL(this.serverUrl).protocol.replace(":","").toUpperCase()}get server(){return this.serverUrl}get state(){return this.currentState}get stateChange(){return this.stateEventEmitter}isConnected(){return this.currentState===Ee.Connected}connect(){return this.isConnected()?Promise.resolve():this.connectPromise?this.connectPromise:(this.transition(Ee.Connecting),this.connectPromise=new Promise((e,t)=>{this.connectResolve=e,this.connectReject=t}),this.connectTimeout=setTimeout(()=>{if(this.currentState!==Ee.Connecting)return;const e=new Error(`SharedWorker did not connect to ${this.serverUrl}`);this.transition(Ee.Disconnected),this.connectReject?.(e),this.clearPromise()},1e4),this.post({type:"connect",clientId:this.clientId,connectionId:this.connectionId,server:this.serverUrl,keepAliveInterval:this.keepAliveInterval}),this.connectPromise)}async disconnect(){this.currentState!==Ee.Disconnected&&(this.transition(Ee.Disconnecting),this.connectReject?.(new Error("SharedWorker WebSocket disconnected")),this.clearPromise(),this.post({type:"disconnect",clientId:this.clientId,connectionId:this.connectionId}),this.transition(Ee.Disconnected))}async dispose(){await this.disconnect(),this.port.close()}send(e){return this.isConnected()?(this.post({type:"send",clientId:this.clientId,connectionId:this.connectionId,data:e}),Promise.resolve()):Promise.reject(new Error("SharedWorker WebSocket is not connected"))}post(e){this.port.postMessage(e)}handle(e){switch(e.type){case"connected":this.transition(Ee.Connected),this.connectResolve?.(),this.clearPromise(),this.onConnect?.();break;case"message":this.isConnected()&&this.onMessage?.(e.data);break;case"error":if(this.currentState===Ee.Connecting){const t=new Error(e.error);this.transition(Ee.Disconnected),this.connectReject?.(t),this.clearPromise()}break;case"disconnected":{const t=this.isConnected(),r=e.error?new Error(e.error):void 0;this.transition(Ee.Disconnected),this.connectReject&&(this.connectReject(r??new Error("SharedWorker WebSocket disconnected")),this.clearPromise()),t&&this.onDisconnect?.(r);break}}}clearPromise(){this.connectTimeout&&clearTimeout(this.connectTimeout),this.connectTimeout=void 0,this.connectPromise=void 0,this.connectResolve=void 0,this.connectReject=void 0}transition(e){this.currentState!==e&&(this.currentState=e,this.stateEventEmitter.emit(e))}};const Oy="Nebula-",Hy=(e,t,r="5.1.0")=>{const n=(e??"").replace(/[^A-Za-z0-9_.-]/g,"");if(!n)return;const s=r.replace(/[^A-Za-z0-9_.+-]/g,"");return`${Oy}${n}${s?`/${s}`:""} ${t}`};var My="X-Nebula-Queue",Ny="X-Nebula-Queue-Id";const fT=30,sa=[1e3,2e3,5e3,1e4,2e4,3e4],qy=3e4;var Xp=class extends Error{constructor(){super("Invalid URI")}};const By=(e,t={})=>{const r=ft(null),n=ft(null),s=ft(new Map),i=new Audio;i.autoplay=!0;const o=ft(void 0),a=ft(null),l=ft(null),u=new Map,c=new Map,d=new Set,p=new Map,h=5e3;let m=!1,w=null,x=null,g=null,S=null,b=null,y=null,T=0,k=null,N=null,v=0,B=0;const q=V(()=>r.value?.configuration.uri?.user||""),{startRingtone:C,stopRingtone:_,startRingback:E,stopRingback:P,playAutoAnswerBeep:R,setNotificationVolume:D,setRingtoneVolume:G,setRingtoneTone:W}=Ep(),ae=M=>M instanceof Ko||M instanceof Bs?M.request?.callId||M.dialog?.callId||M.id||crypto.randomUUID():M.dialog?.callId||M.id||crypto.randomUUID(),Y=M=>{if(!(M instanceof Bs))return;const K=M.request;if(!K)return;const L=K.getHeader(My)?.trim(),oe=K.getHeader(Ny)?.trim();if(!(!L&&!oe))return{...oe?{id:oe}:{},...L?{name:L}:{}}},le=(M,K,L,oe)=>{const te=Y(M),ve={channelId:K,sipCallId:ae(M),direction:L,remoteNumber:oe,...te?{queue:te}:{}};return u.set(K,ve),t.onCallContext?.(ve),ve},pe=(M,K)=>{const L=u.get(M);L&&t.onCallState?.({...L,state:K,timestamp:Date.now()})},Ae=(M,K)=>{if(s.value.get(K)!==M||M.state!==z.Established)return;const L=u.get(K),oe=M.sessionDescriptionHandler,te=oe?.localMediaStream??l.value,ve=oe?.remoteMediaStream??a.value,ye=te?.getAudioTracks()??[],ke=ve?.getAudioTracks()??[];if(!L||!te||!ve||ye.length===0||ke.length===0)return;const lt=[L.sipCallId,...ye.map(Ze=>`local:${Ze.id}`),...ke.map(Ze=>`remote:${Ze.id}`)].join("|");c.get(K)!==lt&&(c.set(K,lt),t.onMediaReady?.({...L,localStream:te,remoteStream:ve}))},je=M=>{u.delete(M),c.delete(M),d.delete(M)},Ie=(M,K)=>{if(s.value.get(M)!==K)return;const L=p.get(K);L&&clearTimeout(L),p.delete(K);const oe=e.channels.value.find(ke=>ke.id===M),te=u.get(M),ve=d.has(M)||oe?.status==="connected";je(M),s.value.delete(M),e.updateChannelState(M,{status:"idle",remoteNumber:"",remoteDisplayName:void 0,isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1});const ye=e.transferInProgress.value;if(ye&&(ye.originalChannelId===M||ye.consultationChannelId===M)&&e.setTransferInProgress(null),e.activeChannelId.value===M&&uu(),Ne(),te){try{e.addCallLog({number:te.remoteNumber,direction:te.direction,status:ve?"answered":te.direction==="incoming"?"missed":"cancelled",startTime:ve?oe?.startTime??Date.now():Date.now(),duration:ve?Math.floor((Date.now()-(oe?.startTime??Date.now()))/1e3):0})}catch(ke){console.warn("[SipJs] Call ended, but saving its history failed:",ke)}try{t.onCallState?.({...te,state:ve?"ended":"failed",timestamp:Date.now()})}catch(ke){console.warn("[SipJs] Call ended, but the state callback failed:",ke)}}},Oe=(M,K)=>{p.has(K)||p.set(K,setTimeout(()=>{console.warn("[SipJs] Hangup did not terminate; releasing local call state"),Xe(K),Ie(M,K)},h))},Xe=M=>{if(M.state!==z.Terminated)try{M.dispose().catch(K=>{console.warn("[SipJs] Session disposal failed:",K)})}catch(K){console.warn("[SipJs] Session disposal failed:",K)}},yt=()=>{for(const[M,K]of s.value)K.state===z.Initial&&u.get(M)?.direction==="incoming"&&(console.warn("[SipJs] Transport lost while ringing; releasing the incoming call"),Ie(M,K),Xe(K))},Ne=()=>{e.channels.value.some(M=>M.status==="incoming")&&!nc()?C():_(),e.activeChannel.value?.status==="calling"?E():P()},at=async(M,K,L)=>{await R(),nc()&&s.value.get(M)===K&&K.state===z.Initial&&await he(L)},bt=M=>{i.volume=M/100},Tt=async M=>{typeof i.setSinkId=="function"&&await i.setSinkId(M)},A=async M=>{if(!M)return;const K=[...s.value.entries()].flatMap(([te,ve])=>{const ye=ve.sessionDescriptionHandler,ke=ye?.peerConnection?.getSenders().find(lt=>lt.track?.kind==="audio");return ke?[{channelId:te,session:ve,sdh:ye,sender:ke}]:[]});if(K.length===0){o.value=M;return}const L=[],oe=[];try{for(const{sender:ve}of K){const ye=await navigator.mediaDevices.getUserMedia(fe(!1,M));L.push(ye);const[ke]=ye.getAudioTracks(),lt=ve.track;if(!ke||!lt)throw new Error("Could not acquire an audio track for the selected microphone");ke.enabled=lt.enabled,await ve.replaceTrack(ke),oe.push({sender:ve,previousTrack:lt})}o.value=M,K.forEach(({channelId:ve,session:ye,sdh:ke,sender:lt},Ze)=>{const mt=L[Ze]?.getAudioTracks()[0];if(!mt)return;const Kn=e.channels.value.find(_n=>_n.id===ve),Gi=!(Kn?.isHeld||Kn?.isMuted);lt.track.enabled=Gi;const xr=ke.localMediaStream;xr&&(xr.getAudioTracks().forEach(_n=>{_n!==mt&&xr.removeTrack(_n)}),xr.getTracks().includes(mt)||xr.addTrack(mt)),e.activeChannelId.value===ve&&(xr?l.value=xr:l.value&&(l.value.getAudioTracks().forEach(_n=>{_n!==mt&&l.value?.removeTrack(_n)}),l.value.getTracks().includes(mt)||l.value.addTrack(mt)));try{Ae(ye,ve)}catch(_n){console.error("[SipJs] Media-ready callback failed after microphone switch:",_n)}});const te=new Set([...s.value.values()].flatMap(ve=>ve.sessionDescriptionHandler?.peerConnection?.getSenders().map(ye=>ye.track).filter(ye=>ye?.kind==="audio")??[]));oe.forEach(({previousTrack:ve})=>{te.has(ve)||ve.stop()}),L.forEach((ve,ye)=>{ve.getTracks().forEach(ke=>{ke!==K[ye]?.sender.track&&ke.stop()})})}catch(te){await Promise.allSettled(oe.map(({sender:ve,previousTrack:ye})=>ve.replaceTrack(ye))),L.forEach(ve=>ve.getTracks().forEach(ye=>ye.stop())),console.warn("[SipJs] Failed to switch microphone:",te)}},H=(M,K)=>{let L=!1;const oe=M.sessionDescriptionHandler;return oe?.peerConnection&&oe.peerConnection.getSenders().forEach(te=>{te.track&&te.track.kind==="audio"&&(te.track.enabled=K,L=!0)}),L},J=M=>{let K=!1;return l.value&&l.value.getAudioTracks().forEach(L=>{L.enabled=M,K=!0}),K},se=(M,K)=>{const L=!(K?.isHeld||K?.isMuted),oe=H(M,L),te=J(L);!oe&&!te&&console.warn("[SipJs] No audio tracks found to apply channel audio state")},re=M=>{for(const[K,L]of s.value.entries())if(L===M)return e.channels.value.find(oe=>oe.id===K)||null;return e.activeChannel.value||null},ee=async M=>{const K=M.sessionDescriptionHandler?.peerConnection;if(!K)return;const L=re(M),oe=!(L?.isHeld||L?.isMuted),te=K.getSenders().find(ve=>ve.track?.kind==="audio");if(te?.track){te.track.enabled=oe,L&&Ae(M,L.id);return}try{const ve=await navigator.mediaDevices.getUserMedia(fe(!1));if(![...s.value.values()].includes(M)){ve.getTracks().forEach(Ze=>Ze.stop());return}const[ye]=ve.getAudioTracks();if(!ye)return;ye.enabled=oe;const ke=new MediaStream([ye]);l.value=ke;const lt=K.getSenders().find(Ze=>Ze.track===null);lt?await lt.replaceTrack(ye):K.addTrack(ye,ke),se(M,L),L&&Ae(M,L.id)}catch(ve){console.warn("[SipJs] Failed to recover outbound audio track:",ve)}},fe=(M=!1,K=o.value)=>{const L={echoCancellation:{ideal:!0},noiseSuppression:{ideal:!1},autoGainControl:{ideal:!1},channelCount:1};return K&&(L.deviceId={exact:K}),{audio:L,video:M}},de=async()=>{const M=n.value;M&&await M.register({requestDelegate:{onAccept:()=>{e.setConnected(!0),T=0},onReject:K=>{e.setConnected(!1);const L=K?.message?.statusCode;L===401||L===403||L===404||ge()}}})},ue=async M=>{if(r.value)return;N&&(clearTimeout(N),N=null);const K=B;try{(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(L=>L.stop())}catch(L){console.error("Microphone permission denied",L);return}try{const L=jr.makeURI(M.uri);if(!L)throw new Xp;m=M.earlyMedia??!1;const oe={server:M.transportOptions.server,keepAliveInterval:M.transportOptions.keepAliveInterval??30},te={uri:L,logLevel:"error",transportOptions:oe,authorizationUsername:M.authorizationUsername,authorizationPassword:M.authorizationPassword,userAgentString:Hy(M.appName,`SIP.js/${Nw}`),reconnectionAttempts:0,delegate:{onConnect:()=>{},onDisconnect:()=>{e.setConnected(!1),yt(),ge()},onInvite:ke=>Z(ke)}},ve=typeof SharedWorker<"u";let ye=ve;ve&&(te.transportConstructor=Dy,te.transportOptions={...oe,clientId:crypto.randomUUID(),connectionId:`${M.transportOptions.server}|${M.uri}|${crypto.randomUUID()}`});try{r.value=new jr(te)}catch(ke){if(!ve)throw ke;ye=!1,console.warn("[SipJs] SharedWorker unavailable, using native WebSocket transport",ke),delete te.transportConstructor,te.transportOptions=oe,r.value=new jr(te)}try{await r.value.start(),n.value=new Wo(r.value),await de()}catch(ke){if(!ye)throw ke;console.warn("[SipJs] SharedWorker connection failed, retrying with native WebSocket",ke);const lt=r.value;r.value=null,n.value=null;try{await lt?.stop()}catch(Ze){console.warn("[SipJs] Failed to clean up SharedWorker transport",Ze)}delete te.transportConstructor,te.transportOptions=oe,r.value=new jr(te),await r.value.start(),n.value=new Wo(r.value),await de()}Re(),v=0}catch(L){console.error("[SipJs] Failed to initialize WSS/SIP connection",L);const oe=r.value;if(r.value=null,n.value=null,oe!==null)try{await oe.stop()}catch(te){console.warn("[SipJs] Failed to clean up after connection error",te)}!(L instanceof Xp)&&K===B&&ie(M)}},ie=M=>{if(N)return;const K=sa[Math.min(v,sa.length-1)];v++,N=setTimeout(async()=>{if(N=null,!navigator.onLine){console.log("[SipJs] Skipping initial connection retry, device is offline"),ie(M);return}console.log("[SipJs] Retrying initial connection..."),await ue(M)},K)},Re=()=>{g=new AbortController;const{signal:M}=g;let K=Date.now();const L=5e3,oe=(mt=1e3)=>{S&&clearTimeout(S),S=setTimeout(async()=>{S=null,await He()},mt)},te=()=>{if(document.visibilityState==="visible"){Ne();const mt=Date.now()-K;mt>L?(console.log(`[SipJs] Device was suspended for ${Math.round(mt/1e3)}s, reconnecting...`),oe(1500)):oe(500)}K=Date.now()},ve=()=>{console.log("[SipJs] Network online, reconnecting..."),oe(1e3)},ye=()=>{console.log("[SipJs] Network offline"),e.setConnected(!1),S&&(clearTimeout(S),S=null)},ke=()=>{b=setInterval(()=>{const mt=Date.now(),Kn=mt-K;Kn>3e4&&(console.log(`[SipJs] Heartbeat drift detected (${Math.round(Kn/1e3)}s), device may have woken from sleep`),oe(1500)),K=mt},1e3)},lt=()=>{console.log("[SipJs] Page frozen"),b&&(clearInterval(b),b=null)},Ze=()=>{console.log("[SipJs] Page resumed"),Ne(),K=Date.now(),ke(),oe(1e3)};document.addEventListener("visibilitychange",te,{signal:M}),window.addEventListener("online",ve,{signal:M}),window.addEventListener("offline",ye,{signal:M}),document.addEventListener("freeze",lt,{signal:M}),document.addEventListener("resume",Ze,{signal:M}),ke(),Te()},ge=()=>{if(y||!r.value)return;const M=sa[Math.min(T,sa.length-1)];y=setTimeout(async()=>{if(y=null,!r.value||e.isConnected.value){T=0;return}T++,await He(),e.isConnected.value||ge()},M)},Te=()=>{k&&clearInterval(k),k=setInterval(()=>{r.value&&!e.isConnected.value&&ge()},qy)},He=async()=>{if(r.value){if(!navigator.onLine){console.log("[SipJs] Skipping reconnect, device is offline");return}if(s.value.size>0){console.log("[SipJs] Skipping reconnect, active calls in progress");return}try{if(r.value.isConnected()||(console.log("[SipJs] Reconnecting..."),await r.value.reconnect()),n.value&&r.value.isConnected())try{await de()}catch{}}catch(M){console.error("[SipJs] Reconnection failed:",M)}}},Ve=async()=>{g?.abort(),g=null,S&&(clearTimeout(S),S=null),b&&(clearInterval(b),b=null),k&&(clearInterval(k),k=null),y&&(clearTimeout(y),y=null),T=0,N&&(clearTimeout(N),N=null),v=0,B++;for(const[L,oe]of s.value.entries()){let te;try{await Promise.race([st(L,oe),new Promise(ve=>{te=setTimeout(ve,1500)})])}finally{te&&clearTimeout(te)}}uu();const M=n.value,K=r.value;if(n.value=null,r.value=null,M)try{await M.unregister()}catch(L){console.warn("[SipJs] Unregister failed:",L)}if(K)try{await K.stop()}catch(L){console.warn("[SipJs] UserAgent stop failed:",L)}},Z=M=>{console.log("[SipJs] 📞 Llamada entrante recibida"),console.log("[SipJs] Remote Identity URI:",M.remoteIdentity.uri.toString()),console.log("[SipJs] Remote Identity URI user:",M.remoteIdentity.uri.user),console.log("[SipJs] Remote Identity displayName:",M.remoteIdentity.displayName);const K=e.channels.value.find(ve=>ve.status==="idle"&&!s.value.has(ve.id));if(!K){console.warn("[SipJs] ⚠️ No hay canales disponibles, rechazando llamada"),M.reject();return}const L=K.id;s.value.set(L,M);const oe=M.body?M.body.includes("m=video"):!1,te=ky(M.remoteIdentity.uri.user,M.remoteIdentity.displayName);console.log("[SipJs] 📋 Caller number extraído:",te),console.log("[SipJs] 🎥 Video:",oe?"Sí":"No"),e.updateChannelState(L,{status:"incoming",remoteNumber:te,remoteDisplayName:M.remoteIdentity.displayName||void 0,hasVideo:oe}),le(M,L,"incoming",te),pe(L,"ringing"),Ne(),e.setActiveChannelId(L),nc()&&at(L,M,oe),M.stateChange.addListener(ve=>{switch(ve){case z.Terminated:Ie(L,M);break;case z.Established:if(s.value.get(L)!==M)break;d.add(L),e.updateChannelState(L,{status:"connected",startTime:Date.now()}),pe(L,"connected"),e.activeChannelId.value===L&&(Zs(M),ee(M).then(()=>Ae(M,L))),Ne();break}})},ce=async(M,K=!1)=>{if(!r.value)return;const L=e.activeChannelId.value;if(s.value.has(L))return;let oe=jr.makeURI(M);if(!oe&&r.value.configuration.uri){const ye=r.value.configuration.uri.host;oe=jr.makeURI(`sip:${M}@${ye}`)}if(!oe)return;const te=new Ko(r.value,oe,{earlyMedia:m});s.value.set(L,te),le(te,L,"outgoing",M),pe(L,"dialing"),e.updateChannelState(L,{status:"calling",remoteNumber:M,hasVideo:K}),e.setLastDialedNumber(M),Ne(),te.stateChange.addListener(ye=>{switch(ye){case z.Established:if(s.value.get(L)!==te)break;d.add(L),e.channels.value.find(ke=>ke.id===L)?.status!=="connected"&&(e.updateChannelState(L,{status:"connected",startTime:Date.now()}),pe(L,"connected"),Zs(te),ee(te).then(()=>Ae(te,L)),Ne());break;case z.Terminated:Ie(L,te);break}});const ve={sessionDescriptionHandlerOptions:{constraints:fe(K)},requestDelegate:{onProgress:ye=>{s.value.get(L)===te&&(ye.message.statusCode===180||ye.message.statusCode===183)&&(ye.message.body&&(e.updateChannelState(L,{hasEarlyMedia:!0}),Zs(te)),Ne())},onAccept:ye=>{s.value.get(L)===te&&e.channels.value.find(ke=>ke.id===L)?.status!=="connected"&&(d.add(L),e.updateChannelState(L,{status:"connected",startTime:Date.now()}),pe(L,"connected"),Zs(te),ee(te).then(()=>Ae(te,L)),Ne())}}};try{await te.invite(ve)}catch(ye){throw Ie(L,te),ye}},he=async(M=!1)=>{const K=e.activeChannelId.value,L=s.value.get(K);if(L instanceof Bs&&L.state===z.Initial){_(),e.updateChannelState(K,{status:"connected",startTime:Date.now()}),Ne();for(const[te,ve]of s.value.entries())if(te!==e.activeChannelId.value&&ve.state===z.Established&&!e.channels.value.find(ye=>ye.id===te)?.isHeld)try{await dr(ve,!0),e.updateChannelState(te,{isHeld:!0})}catch(ye){console.error(`[SipJs] Failed to hold channel ${te}:`,ye)}const oe={sessionDescriptionHandlerOptions:{constraints:fe(M),iceGatheringTimeout:1e3}};try{await L.accept(oe),Ne()}catch(te){const ve=s.value.get(K);throw ve instanceof Bs&&ve.state===z.Initial&&(e.updateChannelState(K,{status:"incoming",startTime:void 0}),Ne()),te}}},st=async(M,K)=>{Oe(M,K);try{switch(K.state){case z.Initial:case z.Establishing:K instanceof Ko?await K.cancel():K instanceof Bs&&await K.reject();break;case z.Established:await K.bye();break}}catch(L){console.warn("[SipJs] Hangup signaling failed:",L)}finally{Xe(K),Ie(M,K)}},ur=async()=>{const M=e.activeChannelId.value,K=s.value.get(M);K&&await st(M,K)},Kt=()=>{const M=s.value.get(e.activeChannelId.value);if(!M)return;const K=!e.isMuted.value;e.setMuted(K),se(M,e.channels.value.find(L=>L.id===e.activeChannelId.value))},dr=async(M,K)=>{const L={sessionDescriptionHandlerOptions:{hold:K}};await M.invite(L)},Aa=async()=>{const M=s.value.get(e.activeChannelId.value);if(M?.state!==z.Established)return;const K=!e.isHeld.value;try{await dr(M,K),e.setHeld(K),se(M,e.channels.value.find(L=>L.id===e.activeChannelId.value))}catch{}},Wt=async M=>{const K=e.activeChannelId.value;if(K===M)return;const L=s.value.get(K),oe=s.value.get(M),te=e.channels.value.find(ye=>ye.id===K),ve=e.channels.value.find(ye=>ye.id===M);if(L&&L.state===z.Established&&!te?.isHeld)try{await dr(L,!0),e.updateChannelState(K,{isHeld:!0}),se(L,e.channels.value.find(ye=>ye.id===K))}catch{}if(e.setActiveChannelId(M),Ne(),oe&&oe.state===z.Established){if(ve?.isHeld)try{await dr(oe,!1),e.updateChannelState(M,{isHeld:!1})}catch{}se(oe,e.channels.value.find(ye=>ye.id===M)),Zs(oe)}else uu()},Cr=M=>{if(!/^[0-9*#]$/.test(M))return;const K=s.value.get(e.activeChannelId.value);if(K?.state!==z.Established)return;const L=K.sessionDescriptionHandler?.peerConnection?.getSenders().find(te=>te.track?.kind==="audio")?.dtmf;if(L?.canInsertDTMF){L.insertDTMF(M,160,70);return}const oe={requestOptions:{body:{content:`Signal=${M}\r
68
- Duration=160`,contentType:"application/dtmf-relay",contentDisposition:"signal"}}};K.info(oe)},Wi=(M,K)=>{const L=e.channels.value.find(oe=>oe.id===M);!L||L.status!=="connected"||(Zs(K),se(K,L),ee(K),i.play().catch(()=>{}))},ka=async M=>{console.log("[SipJs] 🔄 transferCall iniciado"),console.log("[SipJs] Target:",M);const K=e.activeChannelId.value,L=s.value.get(K);if(!L)throw console.error("[SipJs] ❌ No hay sesión activa en el canal",K),new Error("No active session to transfer");if(console.log("[SipJs] Sesión encontrada - Estado:",L.state),console.log("[SipJs] Dialog ID:",L.dialog?.id),console.log("[SipJs] Call ID:",L.dialog?.callId),L.state!==z.Established)throw console.error("[SipJs] ❌ Sesión no establecida. Estado actual:",L.state),new Error(`Cannot transfer call. Call is not established (state: ${L.state})`);let oe=jr.makeURI(M);if(!oe&&r.value?.configuration.uri){const te=r.value.configuration.uri.host;console.log("[SipJs] Construyendo URI con dominio:",te),oe=jr.makeURI(`sip:${M}@${te}`)}if(!oe)throw console.error("[SipJs] ❌ URI de destino inválida:",M),new Error(`Invalid transfer target: ${M}`);console.log("[SipJs] 📤 URI de transferencia:",oe.toString()),console.log("[SipJs] URI scheme:",oe.scheme),console.log("[SipJs] URI user:",oe.user),console.log("[SipJs] URI host:",oe.host);try{console.log("[SipJs] 🚀 Enviando REFER..."),await L.refer(oe,{requestDelegate:{onAccept:te=>{console.log("[SipJs] ✅ Transfer REFER aceptado por el servidor (202 Accepted)"),console.log("[SipJs] Response:",te.message)},onReject:te=>{const ve=te.message.statusCode;console.error("[SipJs] ❌ Transfer REFER rechazado:",ve),console.error("[SipJs] Response completo:",te.message),Wi(K,L)}},onNotify:te=>{console.log("[SipJs] 📬 NOTIFY recibido para transferencia"),console.log("[SipJs] NOTIFY request:",te.request),te.accept();const ve=te.request.body;if(console.log("[SipJs] NOTIFY body:",ve),ve){const ye=ve.match(/SIP\/2\.0\s+(\d{3})(.*)/);if(ye&&ye[1]){const ke=parseInt(ye[1],10),lt=ye[2]?.trim()||"";if(console.log("[SipJs] 📊 Status code:",ke),console.log("[SipJs] 📊 Status text:",lt),ke>=200&&ke<300)console.log("[SipJs] ✅ Transferencia exitosa! Terminando sesión..."),setTimeout(()=>{L.bye().catch(Ze=>{console.warn("[SipJs] Error hanging up after successful transfer:",Ze)})},500);else if(ke>=400){console.error("[SipJs] ❌ Transfer falló con status:",ke,lt),console.log("[SipJs] 🔄 Manteniendo la sesión activa para el usuario");const Ze={404:"Número no encontrado",486:"Número ocupado",487:"Transferencia cancelada",503:"Servicio no disponible - el destino puede estar fuera de línea"}[ke]||`Error en transferencia (código ${ke})`;console.warn("[SipJs] 💬",Ze),Wi(K,L)}else ke>=100&&ke<200&&console.log("[SipJs] 📞 Transferencia en progreso:",ke,lt)}else console.warn("[SipJs] ⚠️ No se pudo extraer el código de estado del NOTIFY body")}else console.warn("[SipJs] ⚠️ NOTIFY sin body")}}),console.log("[SipJs] ✅ REFER enviado exitosamente (promesa resuelta)")}catch(te){throw console.error("[SipJs] ❌ Error en transferCall:",te),console.error("[SipJs] Error type:",te?.constructor?.name),console.error("[SipJs] Error message:",te instanceof Error?te.message:String(te)),console.error("[SipJs] Error stack:",te instanceof Error?te.stack:"N/A"),te}},nT=async M=>{console.log("[SipJs] 🔄 startAttendedTransfer iniciado"),console.log("[SipJs] Target:",M);const K=e.activeChannelId.value,L=s.value.get(K);if(console.log("[SipJs] Canal original:",K),console.log("[SipJs] Sesión original:",L?.state),!L||L.state!==z.Established)throw console.error("[SipJs] ❌ No hay llamada establecida para transferir"),new Error("No established call to transfer");const oe=e.channels.value.find(te=>te.status==="idle");if(console.log("[SipJs] Canal de consulta encontrado:",oe?.id),!oe)throw console.error("[SipJs] ❌ No hay canales disponibles para llamada de consulta"),new Error("No available channel for consultation call");try{console.log("[SipJs] 🔇 Poniendo llamada original en hold..."),await dr(L,!0),e.updateChannelState(K,{isHeld:!0}),console.log("[SipJs] ✅ Llamada original en hold")}catch(te){throw console.error("[SipJs] ❌ Failed to hold original call:",te),new Error("Failed to put call on hold")}console.log("[SipJs] 🔄 Cambiando al canal de consulta:",oe.id),e.setActiveChannelId(oe.id);try{console.log("[SipJs] 📞 Iniciando llamada de consulta a:",M),await ce(M,!1),console.log("[SipJs] ✅ Llamada de consulta iniciada"),e.setTransferInProgress({originalChannelId:K,consultationChannelId:oe.id,targetNumber:M}),console.log("[SipJs] 📋 Transferencia en progreso registrada")}catch(te){throw console.error("[SipJs] ❌ Failed to start consultation call:",te),console.log("[SipJs] 🔄 Volviendo al canal original y quitando hold..."),e.setActiveChannelId(K),await dr(L,!1).catch(()=>{}),e.updateChannelState(K,{isHeld:!1}),new Error("Failed to initiate consultation call")}},sT=async()=>{console.log("[SipJs] 🔄 completeAttendedTransfer iniciado");const M=e.transferInProgress.value;if(!M)throw console.error("[SipJs] ❌ No hay transferencia en progreso"),new Error("No transfer in progress");console.log("[SipJs] Estado de transferencia:",M);const K=s.value.get(M.originalChannelId),L=s.value.get(M.consultationChannelId);if(console.log("[SipJs] Sesión original:",K?.state),console.log("[SipJs] Sesión de consulta:",L?.state),!K||!L)throw console.error("[SipJs] ❌ Falta una o ambas sesiones"),new Error("Missing session for transfer");if(L.state!==z.Established)throw console.error("[SipJs] ❌ Llamada de consulta no está establecida. Estado:",L.state),new Error("Consultation call not established");const oe=L.dialog;if(!oe)throw new Error("No dialog available for consultation session");const te=oe.callId,ve=oe.remoteTag,ye=oe.localTag;let ke=jr.makeURI(M.targetNumber);if(!ke&&r.value?.configuration.uri){const Ze=r.value.configuration.uri.host;ke=jr.makeURI(`sip:${M.targetNumber}@${Ze}`)}if(!ke)throw new Error("Invalid transfer target URI");const lt=`${encodeURIComponent(te)}%3Bto-tag%3D${encodeURIComponent(ve)}%3Bfrom-tag%3D${encodeURIComponent(ye)}`;ke.setHeader("Replaces",lt);try{await K.refer(ke,{onNotify:Ze=>{Ze.accept();const mt=Ze.request.body,Kn=typeof mt=="string"?mt:mt&&typeof mt=="object"&&"content"in mt?mt.content:void 0;if(Kn){const Gi=Kn.match(/SIP\/2\.0\s+(\d+)/);if(Gi&&Gi[1]){const xr=parseInt(Gi[1]);xr>=200&&xr<300?setTimeout(()=>{st(M.originalChannelId,K),st(M.consultationChannelId,L),e.setTransferInProgress(null)},500):xr>=400&&(console.error("[SipJs] Attended transfer failed with status:",xr),e.setTransferInProgress(null))}}},requestDelegate:{onAccept:()=>{},onReject:Ze=>{console.error("[SipJs] Attended transfer REFER rejected:",Ze.message.statusCode),e.setTransferInProgress(null)}}})}catch(Ze){throw console.error("[SipJs] Attended transfer failed:",Ze),Ze}},iT=async()=>{const M=e.transferInProgress.value;if(!M)throw new Error("No transfer in progress");console.log("[SipJs] Canceling attended transfer...");const K=s.value.get(M.originalChannelId),L=s.value.get(M.consultationChannelId);if(L)try{await st(M.consultationChannelId,L),console.log("[SipJs] Consultation call ended")}catch(oe){console.warn("[SipJs] Error ending consultation:",oe)}if(K)try{e.setActiveChannelId(M.originalChannelId),await dr(K,!1),e.updateChannelState(M.originalChannelId,{isHeld:!1}),console.log("[SipJs] Returned to original call")}catch(oe){console.warn("[SipJs] Error resuming original call:",oe)}e.setTransferInProgress(null)},Zs=M=>{const K=M.sessionDescriptionHandler;if(!K){console.error("[SipJs] setupRemoteMedia: no sessionDescriptionHandler");return}const L=K.remoteMediaStream;if(!L){console.error("[SipJs] setupRemoteMedia: no remoteMediaStream on SDH");return}if(a.value===L)return;i.pause(),i.srcObject=null,w?.abort(),w=new AbortController,a.value=L,l.value=K.localMediaStream??null;const oe=re(M);se(M,oe),oe&&Ae(M,oe.id);const te=ye=>{x?.abort(),x=new AbortController;const{signal:ke}=x,lt=()=>{i.play().catch(Ze=>{Ze.name!=="AbortError"&&console.error("[SipJs] play() failed:",Ze.name,Ze.message)})};ye.addEventListener("unmute",()=>{lt()},{signal:ke}),lt()};L.addEventListener("addtrack",ye=>{ye.track.kind==="audio"&&(i.srcObject=null,i.srcObject=L,te(ye.track),oe&&Ae(M,oe.id))},{signal:w.signal});const[ve]=L.getTracks();ve&&(i.srcObject=L,te(ve),oe&&Ae(M,oe.id))},uu=()=>{x?.abort(),x=null,w?.abort(),w=null,i.pause(),i.srcObject=null,a.value=null,l.value=null};return{initUserAgent:ue,stop:Ve,makeCall:ce,answerCall:he,hangupCall:ur,toggleMute:Kt,toggleHold:Aa,sendDTMF:Cr,transferCall:ka,startAttendedTransfer:nT,completeAttendedTransfer:sT,cancelAttendedTransfer:iT,switchChannel:Wt,extension:q,setVolume:bt,setNotificationVolume:D,setRingtoneVolume:G,setRingtoneTone:W,setOutputDevice:Tt,setInputDevice:A,remoteStream:a,localStream:l}};var Qp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e;const eh=kp,th=(e,t)=>r=>{var n;if(t?.variants==null)return eh(e,r?.class,r?.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(l=>{const u=r?.[l],c=i?.[l];if(u===null)return null;const d=Qp(u)||Qp(c);return s[l][d]}),a=r&&Object.entries(r).reduce((l,u)=>{let[c,d]=u;return d===void 0||(l[c]=d),l},{});return eh(e,o,t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((l,u)=>{let{class:c,className:d,...p}=u;return Object.entries(p).every(h=>{let[m,w]=h;return Array.isArray(w)?w.includes({...i,...a}[m]):{...i,...a}[m]===w})?[...l,c,d]:l},[]),r?.class,r?.className)};function Ly(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Fy(e,t,r){Ly(e,t),t.set(e,r)}function Vy(e,t,r){if(typeof e=="function"?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}function ia(e,t){return e.get(Vy(e,t))}function rh(e){return typeof e=="string"?`'${e}'`:new jy().serialize(e)}var jy=(function(){var e=new WeakMap;class t{constructor(){Fy(this,e,new Map)}compare(n,s){const i=typeof n,o=typeof s;return i==="string"&&o==="string"?n.localeCompare(s):i==="number"&&o==="number"?n-s:String.prototype.localeCompare.call(this.serialize(n,!0),this.serialize(s,!0))}serialize(n,s){if(n===null)return"null";switch(typeof n){case"string":return s?n:`'${n}'`;case"bigint":return`${n}n`;case"object":return this.$object(n);case"function":return this.$function(n)}return String(n)}serializeObject(n){const s=Object.prototype.toString.call(n);if(s!=="[object Object]")return this.serializeBuiltInType(s.length<10?`unknown:${s}`:s.slice(8,-1),n);const i=n.constructor,o=i===Object||i===void 0?"":i.name;if(o!==""&&globalThis[o]===i)return this.serializeBuiltInType(o,n);if(typeof n.toJSON=="function"){const a=n.toJSON();return o+(a!==null&&typeof a=="object"?this.$object(a):`(${this.serialize(a)})`)}return this.serializeObjectEntries(o,Object.entries(n))}serializeBuiltInType(n,s){const i=this["$"+n];if(i)return i.call(this,s);if(typeof s?.entries=="function")return this.serializeObjectEntries(n,s.entries());throw new Error(`Cannot serialize ${n}`)}serializeObjectEntries(n,s){const i=Array.from(s).sort((a,l)=>this.compare(a[0],l[0]));let o=`${n}{`;for(let a=0;a<i.length;a++){const[l,u]=i[a];o+=`${this.serialize(l,!0)}:${this.serialize(u)}`,a<i.length-1&&(o+=",")}return o+"}"}$object(n){let s=ia(e,this).get(n);return s===void 0&&(ia(e,this).set(n,`#${ia(e,this).size}`),s=this.serializeObject(n),ia(e,this).set(n,s)),s}$function(n){const s=Function.prototype.toString.call(n);return s.slice(-15)==="[native code] }"?`${n.name||""}()[native]`:`${n.name}(${n.length})${s.replace(/\s*\n\s*/g,"")}`}$Array(n){let s="[";for(let i=0;i<n.length;i++)s+=this.serialize(n[i]),i<n.length-1&&(s+=",");return s+"]"}$Date(n){try{return`Date(${n.toISOString()})`}catch{return"Date(null)"}}$ArrayBuffer(n){return`ArrayBuffer[${new Uint8Array(n).join(",")}]`}$Set(n){return`Set${this.$Array(Array.from(n).sort((s,i)=>this.compare(s,i)))}`}$Map(n){return this.serializeObjectEntries("Map",n.entries())}}for(const r of["Error","RegExp","URL"])t.prototype["$"+r]=function(n){return`${r}(${n})`};for(const r of["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"])t.prototype["$"+r]=function(n){return`${r}[${n.join(",")}]`};for(const r of["BigInt64Array","BigUint64Array"])t.prototype["$"+r]=function(n){return`${r}[${n.join("n,")}${n.length>0?"n":""}]`};return t})();function Uy(e,t){return e===t||rh(e)===rh(t)}function qi(e,t=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY){return Math.min(r,Math.max(t,e))}function Pt(e,t){const r=typeof e=="string"&&!t?`${e}Context`:t,n=Symbol(r);return[o=>{const a=Ft(n,o);if(a||a===null)return a;throw new Error(`Injection \`${n.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`)},o=>(Xn(n,o),o)]}function or(){let e=document.activeElement;if(e==null)return null;for(;e!=null&&e.shadowRoot!=null&&e.shadowRoot.activeElement!=null;)e=e.shadowRoot.activeElement;return e}function sc(e,t,r){const n=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&n.addEventListener(e,t,{once:!0}),n.dispatchEvent(s)}function ic(e){return e==null}function oc(e){return e?e.flatMap(t=>t.type===Ke?oc(t.children):[t]):[]}var[oa,hT]=Pt("ConfigProvider");function zy(e,t){var r;const n=ft();return ct(()=>{n.value=e()},{...t,flush:(r=t?.flush)!==null&&r!==void 0?r:"sync"}),Ht(n)}function Bn(e,t){return ro()?(qa(e,t),!0):!1}function Ky(){const e=new Set,t=i=>{e.delete(i)};return{on:i=>{e.add(i);const o=()=>t(i);return Bn(o),{off:o}},off:t,trigger:(...i)=>Promise.all(Array.from(e).map(o=>o(...i))),clear:()=>{e.clear()}}}function Wy(e){let t=!1,r;const n=Na(!0);return((...s)=>(t||(r=n.run(()=>e(...s)),t=!0),r))}var qt=typeof window<"u"&&typeof document<"u",gT=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,Gy=e=>typeof e<"u",Jy=Object.prototype.toString,Yy=e=>Jy.call(e)==="[object Object]",pn=()=>{},ac=Zy();function Zy(){var e,t,r;return qt&&!!(!((e=window)===null||e===void 0||(e=e.navigator)===null||e===void 0)&&e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window)===null||t===void 0||(t=t.navigator)===null||t===void 0?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test((r=window)===null||r===void 0?void 0:r.navigator.userAgent))}function Xy(...e){if(e.length!==1)return Ya(...e);const t=e[0];return typeof t=="function"?Ht(li(()=>({get:t,set:pn}))):F(t)}function nh(e,t){function r(...n){return new Promise((s,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(s).catch(i)})}return r}var sh=e=>e();function Qy(e,t={}){let r,n,s=pn;const i=l=>{clearTimeout(l),s(),s=pn};let o;return l=>{const u=$e(e),c=$e(t.maxWait);return r&&i(r),u<=0||c!==void 0&&c<=0?(n&&(i(n),n=void 0),Promise.resolve(l())):new Promise((d,p)=>{s=t.rejectOnCancel?p:d,o=l,c&&!n&&(n=setTimeout(()=>{r&&i(r),n=void 0,d(o())},c)),r=setTimeout(()=>{n&&i(n),n=void 0,d(l())},u)})}}function eb(e=sh,t={}){const{initialState:r="active"}=t,n=Xy(r==="active");function s(){n.value=!1}function i(){n.value=!0}return{isActive:Ht(n),pause:s,resume:i,eventFilter:(...a)=>{n.value&&e(...a)}}}function lc(e){return Array.isArray(e)?e:[e]}function ih(e){const t=Object.create(null);return(r=>t[r]||(t[r]=e(r)))}var tb=/\B([A-Z])/g,vT=ih(e=>e.replace(tb,"-$1").toLowerCase()),rb=/-(\w)/g,mT=ih(e=>e.replace(rb,(t,r)=>r?r.toUpperCase():""));function oh(e){return e||gt()}function nb(e){if(!qt)return e;let t=0,r,n;const s=()=>{t-=1,n&&t<=0&&(n.stop(),r=void 0,n=void 0)};return((...i)=>(t+=1,n||(n=Na(!0),r=n.run(()=>e(...i))),Bn(s),r))}function sb(e){return Qr(rt(e)?new Proxy({},{get(t,r,n){return f(Reflect.get(e.value,r,n))},set(t,r,n){return rt(e.value[r])&&!rt(n)?e.value[r].value=n:e.value[r]=n,!0},deleteProperty(t,r){return Reflect.deleteProperty(e.value,r)},has(t,r){return Reflect.has(e.value,r)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}}):e)}function ib(e){return sb(V(e))}function Ut(e,...t){const r=t.flat(),n=r[0];return ib(()=>Object.fromEntries(typeof n=="function"?Object.entries(Mt(e)).filter(([s,i])=>!n($e(i),s)):Object.entries(Mt(e)).filter(s=>!r.includes(s[0]))))}function ah(e,t=1e4){return li((r,n)=>{let s=$e(e),i;const o=()=>setTimeout(()=>{s=$e(e),n()},$e(t));return Bn(()=>{clearTimeout(i)}),{get(){return r(),s},set(a){s=a,n(),clearTimeout(i),i=o()}}})}function cc(e,t=200,r={}){return nh(Qy(t,r),e)}function ob(e,t,r={}){const{eventFilter:n=sh,...s}=r;return Me(e,nh(n,t),s)}function ab(e,t,r={}){const{eventFilter:n,initialState:s="active",...i}=r,{eventFilter:o,pause:a,resume:l,isActive:u}=eb(n,{initialState:s});return{stop:ob(e,t,{...i,eventFilter:o}),pause:a,resume:l,isActive:u}}function lb(e,t={}){if(!rt(e))return Mt(e);const r=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const n in e.value)r[n]=li(()=>({get(){return e.value[n]},set(s){var i;if(!((i=$e(t.replaceRef))!==null&&i!==void 0)||i)if(Array.isArray(e.value)){const o=[...e.value];o[n]=s,e.value=o}else{const o={...e.value,[n]:s};Object.setPrototypeOf(o,Object.getPrototypeOf(e.value)),e.value=o}else e.value[n]=s}}));return r}function cb(e,t){oh(t)&&Ps(e,t)}function ub(e,t=!0,r){oh(r)?tt(e,r):t?e():Et(e)}function db(e,t=1e3,r={}){const{immediate:n=!0,immediateCallback:s=!1}=r;let i=null;const o=ft(!1);function a(){i&&(clearInterval(i),i=null)}function l(){o.value=!1,a()}function u(){const c=$e(t);c<=0||(o.value=!0,s&&e(),a(),o.value&&(i=setInterval(e,c)))}return n&&qt&&u(),(rt(t)||typeof t=="function")&&Bn(Me(t,()=>{o.value&&qt&&u()})),Bn(l),{isActive:en(o),pause:l,resume:u}}function lh(e,t,r={}){const{immediate:n=!0,immediateCallback:s=!1}=r,i=ft(!1);let o;function a(){o&&(clearTimeout(o),o=void 0)}function l(){i.value=!1,a()}function u(...c){s&&e(),a(),i.value=!0,o=setTimeout(()=>{i.value=!1,o=void 0,e(...c)},$e(t))}return n&&(i.value=!0,qt&&u()),Bn(l),{isPending:en(i),start:u,stop:l}}function fb(e,t,r){return Me(e,t,{...r,immediate:!0})}function pb(e,t,r){return Me(e,t,{...r,once:!0})}var Dr=qt?window:void 0,wT=qt?window.document:void 0,yT=qt?window.navigator:void 0,bT=qt?window.location:void 0;function tr(e){var t;const r=$e(e);return(t=r?.$el)!==null&&t!==void 0?t:r}function zt(...e){const t=(n,s,i,o)=>(n.addEventListener(s,i,o),()=>n.removeEventListener(s,i,o)),r=V(()=>{const n=lc($e(e[0])).filter(s=>s!=null);return n.every(s=>typeof s!="string")?n:void 0});return fb(()=>{var n,s;return[(n=(s=r.value)===null||s===void 0?void 0:s.map(i=>tr(i)))!==null&&n!==void 0?n:[Dr].filter(i=>i!=null),lc($e(r.value?e[1]:e[0])),lc(f(r.value?e[2]:e[1])),$e(r.value?e[3]:e[2])]},([n,s,i,o],a,l)=>{if(!n?.length||!s?.length||!i?.length)return;const u=Yy(o)?{...o}:o,c=n.flatMap(d=>s.flatMap(p=>i.map(h=>t(d,p,h,u))));l(()=>{c.forEach(d=>d())})},{flush:"post"})}var ch=!1;function hb(e,t,r={}){const{window:n=Dr,ignore:s=[],capture:i=!0,detectIframe:o=!1,controls:a=!1}=r;if(!n)return a?{stop:pn,cancel:pn,trigger:pn}:pn;if(ac&&!ch){ch=!0;const x={passive:!0};Array.from(n.document.body.children).forEach(g=>g.addEventListener("click",pn,x)),n.document.documentElement.addEventListener("click",pn,x)}let l=!0;const u=x=>$e(s).some(g=>{if(typeof g=="string")return Array.from(n.document.querySelectorAll(g)).some(S=>S===x.target||x.composedPath().includes(S));{const S=tr(g);return S&&(x.target===S||x.composedPath().includes(S))}});function c(x){const g=$e(x);return g&&g.$.subTree.shapeFlag===16}function d(x,g){const S=$e(x),b=S.$.subTree&&S.$.subTree.children;return b==null||!Array.isArray(b)?!1:b.some(y=>y.el===g.target||g.composedPath().includes(y.el))}const p=x=>{const g=tr(e);if(x.target!=null&&!(!(g instanceof Element)&&c(e)&&d(e,x))&&!(!g||g===x.target||x.composedPath().includes(g))){if("detail"in x&&x.detail===0&&(l=!u(x)),!l){l=!0;return}t(x)}};let h=!1;const m=[zt(n,"click",x=>{h||(h=!0,setTimeout(()=>{h=!1},0),p(x))},{passive:!0,capture:i}),zt(n,"pointerdown",x=>{const g=tr(e);l=!u(x)&&!!(g&&!x.composedPath().includes(g))},{passive:!0}),o&&zt(n,"blur",x=>{setTimeout(()=>{var g;const S=tr(e);((g=n.document.activeElement)===null||g===void 0?void 0:g.tagName)==="IFRAME"&&!S?.contains(n.document.activeElement)&&t(x)},0)},{passive:!0})].filter(Boolean),w=()=>m.forEach(x=>x());return a?{stop:w,cancel:()=>{l=!1},trigger:x=>{l=!0,p(x),l=!1}}:w}function uc(){const e=ft(!1),t=gt();return t&&tt(()=>{e.value=!0},t),e}function uh(e){const t=uc();return V(()=>(t.value,!!e()))}function gb(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function vb(...e){let t,r,n={};e.length===3?(t=e[0],r=e[1],n=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,r=e[0],n=e[1]):(t=e[0],r=e[1]):(t=!0,r=e[0]);const{target:s=Dr,eventName:i="keydown",passive:o=!1,dedupe:a=!1}=n,l=gb(t);return zt(s,i,c=>{c.repeat&&$e(a)||l(c)&&r(c)},o)}function mb(e){return JSON.parse(JSON.stringify(e))}var aa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},la="__vueuse_ssr_handlers__",wb=yb();function yb(){return la in aa||(aa[la]=aa[la]||{}),aa[la]}function bb(e,t){return wb[e]||t}function _b(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}var Sb={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},dh="vueuse-storage";function cs(e,t,r,n={}){var s;const{flush:i="pre",deep:o=!0,listenToStorageChanges:a=!0,writeDefaults:l=!0,mergeDefaults:u=!1,shallow:c,window:d=Dr,eventFilter:p,onError:h=P=>{console.error(P)},initOnMounted:m}=n,w=(c?ft:F)(typeof t=="function"?t():t),x=V(()=>$e(e));if(!r)try{r=bb("getDefaultStorage",()=>Dr?.localStorage)()}catch(P){h(P)}if(!r)return w;const g=$e(t),S=_b(g),b=(s=n.serializer)!==null&&s!==void 0?s:Sb[S],{pause:y,resume:T}=ab(w,P=>q(P),{flush:i,deep:o,eventFilter:p});Me(x,()=>_(),{flush:i});let k=!1;const N=P=>{m&&!k||_(P)},v=P=>{m&&!k||E(P)};d&&a&&(r instanceof Storage?zt(d,"storage",N,{passive:!0}):zt(d,dh,v)),m?ub(()=>{k=!0,_()}):_();function B(P,R){if(d){const D={key:x.value,oldValue:P,newValue:R,storageArea:r};d.dispatchEvent(r instanceof Storage?new StorageEvent("storage",D):new CustomEvent(dh,{detail:D}))}}function q(P){try{const R=r.getItem(x.value);if(P==null)B(R,null),r.removeItem(x.value);else{const D=b.write(P);R!==D&&(r.setItem(x.value,D),B(R,D))}}catch(R){h(R)}}function C(P){const R=P?P.newValue:r.getItem(x.value);if(R==null)return l&&g!=null&&r.setItem(x.value,b.write(g)),g;if(!P&&u){const D=b.read(R);return typeof u=="function"?u(D,g):S==="object"&&!Array.isArray(D)?{...g,...D}:D}else return typeof R!="string"?R:b.read(R)}function _(P){if(!(P&&P.storageArea!==r)){if(P&&P.key==null){w.value=g;return}if(!(P&&P.key!==x.value)){y();try{const R=b.write(w.value);(P===void 0||P?.newValue!==R)&&(w.value=C(P))}catch(R){h(R)}finally{P?Et(T):T()}}}}function E(P){_(P.detail)}return w}var ca={speed:2,margin:30,direction:"both"};function Cb(e){e.scrollLeft>e.scrollWidth-e.clientWidth&&(e.scrollLeft=Math.max(0,e.scrollWidth-e.clientWidth)),e.scrollTop>e.scrollHeight-e.clientHeight&&(e.scrollTop=Math.max(0,e.scrollHeight-e.clientHeight))}function xb(e,t={}){var r,n,s,i;const{pointerTypes:o,preventDefault:a,stopPropagation:l,exact:u,onMove:c,onEnd:d,onStart:p,initialValue:h,axis:m="both",draggingElement:w=Dr,containerElement:x,handle:g=e,buttons:S=[0],restrictInView:b,autoScroll:y=!1}=t,T=F((r=$e(h))!==null&&r!==void 0?r:{x:0,y:0}),k=F(),N=le=>o?o.includes(le.pointerType):!0,v=le=>{$e(a)&&le.preventDefault(),$e(l)&&le.stopPropagation()},B=$e(y),q=typeof B=="object"?{speed:(n=$e(B.speed))!==null&&n!==void 0?n:ca.speed,margin:(s=$e(B.margin))!==null&&s!==void 0?s:ca.margin,direction:(i=B.direction)!==null&&i!==void 0?i:ca.direction}:ca,C=le=>typeof le=="number"?[le,le]:[le.x,le.y],_=(le,pe,Ae)=>{const{clientWidth:je,clientHeight:Ie,scrollLeft:Oe,scrollTop:Xe,scrollWidth:yt,scrollHeight:Ne}=le,[at,bt]=C(q.margin),[Tt,A]=C(q.speed);let H=0,J=0;(q.direction==="x"||q.direction==="both")&&(Ae.x<at&&Oe>0?H=-Tt:Ae.x+pe.width>je-at&&Oe<yt-je&&(H=Tt)),(q.direction==="y"||q.direction==="both")&&(Ae.y<bt&&Xe>0?J=-A:Ae.y+pe.height>Ie-bt&&Xe<Ne-Ie&&(J=A)),(H||J)&&le.scrollBy({left:H,top:J,behavior:"auto"})};let E=null;const P=()=>{const le=$e(x);le&&!E&&(E=setInterval(()=>{const pe=$e(e).getBoundingClientRect(),{x:Ae,y:je}=T.value,Ie={x:Ae-le.scrollLeft,y:je-le.scrollTop};Ie.x>=0&&Ie.y>=0&&(_(le,pe,Ie),Ie.x+=le.scrollLeft,Ie.y+=le.scrollTop,T.value=Ie)},1e3/60))},R=()=>{E&&(clearInterval(E),E=null)},D=(le,pe,Ae,je)=>{const[Ie,Oe]=typeof Ae=="number"?[Ae,Ae]:[Ae.x,Ae.y],{clientWidth:Xe,clientHeight:yt}=pe;return le.x<Ie||le.x+je.width>Xe-Ie||le.y<Oe||le.y+je.height>yt-Oe},G=()=>{if($e(t.disabled)||!k.value)return;const le=$e(x);if(!le)return;const pe=$e(e).getBoundingClientRect(),{x:Ae,y:je}=T.value;D({x:Ae-le.scrollLeft,y:je-le.scrollTop},le,q.margin,pe)?P():R()};$e(y)&&Me(T,G);const W=le=>{var pe;if(!$e(S).includes(le.button)||$e(t.disabled)||!N(le)||$e(u)&&le.target!==$e(e))return;const Ae=$e(x),je=Ae==null||(pe=Ae.getBoundingClientRect)===null||pe===void 0?void 0:pe.call(Ae),Ie=$e(e).getBoundingClientRect(),Oe={x:le.clientX-(Ae?Ie.left-je.left+(y?0:Ae.scrollLeft):Ie.left),y:le.clientY-(Ae?Ie.top-je.top+(y?0:Ae.scrollTop):Ie.top)};p?.(Oe,le)!==!1&&(k.value=Oe,v(le))},ae=le=>{if($e(t.disabled)||!N(le)||!k.value)return;const pe=$e(x);pe instanceof HTMLElement&&Cb(pe);const Ae=$e(e).getBoundingClientRect();let{x:je,y:Ie}=T.value;if((m==="x"||m==="both")&&(je=le.clientX-k.value.x,pe&&(je=Math.min(Math.max(0,je),pe.scrollWidth-Ae.width))),(m==="y"||m==="both")&&(Ie=le.clientY-k.value.y,pe&&(Ie=Math.min(Math.max(0,Ie),pe.scrollHeight-Ae.height))),$e(y)&&pe&&(E===null&&_(pe,Ae,{x:je,y:Ie}),je+=pe.scrollLeft,Ie+=pe.scrollTop),pe&&(b||y)){if(m!=="y"){const Oe=je-pe.scrollLeft;Oe<0?je=pe.scrollLeft:Oe>pe.clientWidth-Ae.width&&(je=pe.clientWidth-Ae.width+pe.scrollLeft)}if(m!=="x"){const Oe=Ie-pe.scrollTop;Oe<0?Ie=pe.scrollTop:Oe>pe.clientHeight-Ae.height&&(Ie=pe.clientHeight-Ae.height+pe.scrollTop)}}T.value={x:je,y:Ie},c?.(T.value,le),v(le)},Y=le=>{$e(t.disabled)||!N(le)||k.value&&(k.value=void 0,y&&R(),d?.(T.value,le),v(le))};if(qt){const le=()=>{var pe;return{capture:(pe=t.capture)!==null&&pe!==void 0?pe:!0,passive:!$e(a)}};zt(g,"pointerdown",W,le),zt(w,"pointermove",ae,le),zt(w,"pointerup",Y,le)}return{...lb(T),position:T,isDragging:V(()=>!!k.value),style:V(()=>`
67
+ `))}startSendingKeepAlives(){const t=r=>{const n=r*.8;return 1e3*(Math.random()*(r-n)+n)};this.configuration.keepAliveInterval&&!this.keepAliveInterval&&(this.keepAliveInterval=setInterval(()=>{this.sendKeepAlive(),this.startSendingKeepAlives()},t(this.configuration.keepAliveInterval)))}stopSendingKeepAlives(){this.keepAliveInterval&&clearInterval(this.keepAliveInterval),this.keepAliveDebounceTimeout&&clearTimeout(this.keepAliveDebounceTimeout),this.keepAliveInterval=void 0,this.keepAliveDebounceTimeout=void 0}};Tp.defaultOptions={server:"",connectionTimeout:5,keepAliveInterval:0,keepAliveDebounce:10,traceSip:!0};var Vr=class $a{constructor(t={}){if(this._publishers={},this._registerers={},this._sessions={},this._subscriptions={},this._state=$t.Stopped,this._stateEventEmitter=new qs,this.delegate=t.delegate,this.options=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},$a.defaultOptions()),{sipjsId:os(5)}),{uri:new In("sip","anonymous."+os(6),"anonymous.invalid")}),{viaHost:os(12)+".invalid"}),$a.stripUndefinedProperties(t)),this.options.hackIpInContact)if(typeof this.options.hackIpInContact=="boolean"&&this.options.hackIpInContact){const n=Math.floor(Math.random()*254+1);this.options.viaHost="192.0.2."+n}else this.options.hackIpInContact&&(this.options.viaHost=this.options.hackIpInContact);switch(this.loggerFactory=new pw,this.logger=this.loggerFactory.getLogger("sip.UserAgent"),this.loggerFactory.builtinEnabled=this.options.logBuiltinEnabled,this.loggerFactory.connector=this.options.logConnector,this.options.logLevel){case"error":this.loggerFactory.level=kt.error;break;case"warn":this.loggerFactory.level=kt.warn;break;case"log":this.loggerFactory.level=kt.log;break;case"debug":this.loggerFactory.level=kt.debug;break;default:break}if(this.options.logConfiguration&&(this.logger.log("Configuration:"),Object.keys(this.options).forEach(r=>{const n=this.options[r];switch(r){case"uri":case"sessionDescriptionHandlerFactory":this.logger.log("· "+r+": "+n);break;case"authorizationPassword":this.logger.log("· "+r+": NOT SHOWN");break;case"transportConstructor":this.logger.log("· "+r+": "+n.name);break;default:this.logger.log("· "+r+": "+JSON.stringify(n))}})),this.options.transportOptions){const r=this.options.transportOptions,n=r.maxReconnectionAttempts,s=r.reconnectionTimeout;n!==void 0&&this.logger.warn('The transport option "maxReconnectionAttempts" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),s!==void 0&&this.logger.warn('The transport option "reconnectionTimeout" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),t.reconnectionDelay===void 0&&s!==void 0&&(this.options.reconnectionDelay=s),t.reconnectionAttempts===void 0&&n!==void 0&&(this.options.reconnectionAttempts=n)}if(t.reconnectionDelay!==void 0&&this.logger.warn('The user agent option "reconnectionDelay" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),t.reconnectionAttempts!==void 0&&this.logger.warn('The user agent option "reconnectionAttempts" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),this._transport=new this.options.transportConstructor(this.getLogger("sip.Transport"),this.options.transportOptions),this.initTransportCallbacks(),this._contact=this.initContact(),this._instanceId=this.options.instanceId?this.options.instanceId:$a.newUUID(),Ct.parse(this._instanceId,"uuid")===-1)throw new Error("Invalid instanceId.");this._userAgentCore=this.initCore()}static makeURI(t){return Ct.URIParse(t)}static defaultOptions(){return{allowLegacyNotifications:!1,authorizationHa1:"",authorizationPassword:"",authorizationUsername:"",delegate:{},contactName:"",contactParams:{transport:"ws"},displayName:"",forceRport:!1,gracefulShutdown:!0,hackAllowUnregisteredOptionTags:!1,hackIpInContact:!1,hackViaTcp:!1,instanceId:"",instanceIdAlwaysAdded:!1,logBuiltinEnabled:!0,logConfiguration:!0,logConnector:()=>{},logLevel:"log",noAnswerTimeout:60,preloadedRouteSet:[],reconnectionAttempts:0,reconnectionDelay:4,sendInitialProvisionalResponse:!0,sessionDescriptionHandlerFactory:Nw(),sessionDescriptionHandlerFactoryOptions:{},sipExtension100rel:$r.Unsupported,sipExtensionReplaces:$r.Unsupported,sipExtensionExtraSupported:[],sipjsId:"",transportConstructor:Tp,transportOptions:{},uri:new In("sip","anonymous","anonymous.invalid"),userAgentString:"SIP.js/"+ap,viaHost:""}}static newUUID(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=Math.floor(Math.random()*16);return(t==="x"?r:r%4+8).toString(16)})}static stripUndefinedProperties(t){return Object.keys(t).reduce((r,n)=>(t[n]!==void 0&&(r[n]=t[n]),r),{})}get configuration(){return this.options}get contact(){return this._contact}get instanceId(){return this._instanceId}get state(){return this._state}get stateChange(){return this._stateEventEmitter}get transport(){return this._transport}get userAgentCore(){return this._userAgentCore}getLogger(t,r){return this.loggerFactory.getLogger(t,r)}getLoggerFactory(){return this.loggerFactory}isConnected(){return this.transport.isConnected()}reconnect(){return this.state===$t.Stopped?Promise.reject(new Error("User agent stopped.")):Promise.resolve().then(()=>this.transport.connect())}start(){return this.state===$t.Started?(this.logger.warn("User agent already started"),Promise.resolve()):(this.logger.log(`Starting ${this.configuration.uri}`),this.transitionState($t.Started),this.transport.connect())}async stop(){if(this.state===$t.Stopped)return this.logger.warn("User agent already stopped"),Promise.resolve();if(this.logger.log(`Stopping ${this.configuration.uri}`),!this.options.gracefulShutdown)return this.logger.log("Dispose of transport"),this.transport.dispose().catch(a=>{throw this.logger.error(a.message),a}),this.logger.log("Dispose of core"),this.userAgentCore.dispose(),this._publishers={},this._registerers={},this._sessions={},this._subscriptions={},this.transitionState($t.Stopped),Promise.resolve();const t=Object.assign({},this._publishers),r=Object.assign({},this._registerers),n=Object.assign({},this._sessions),s=Object.assign({},this._subscriptions),i=this.transport,o=this.userAgentCore;this.logger.log("Dispose of registerers");for(const a in r)r[a]&&await r[a].dispose().catch(l=>{throw this.logger.error(l.message),delete this._registerers[a],l});this.logger.log("Dispose of sessions");for(const a in n)n[a]&&await n[a].dispose().catch(l=>{throw this.logger.error(l.message),delete this._sessions[a],l});this.logger.log("Dispose of subscriptions");for(const a in s)s[a]&&await s[a].dispose().catch(l=>{throw this.logger.error(l.message),delete this._subscriptions[a],l});this.logger.log("Dispose of publishers");for(const a in t)t[a]&&await t[a].dispose().catch(l=>{throw this.logger.error(l.message),delete this._publishers[a],l});this.logger.log("Dispose of transport"),await i.dispose().catch(a=>{throw this.logger.error(a.message),a}),this.logger.log("Dispose of core"),o.dispose(),this.transitionState($t.Stopped)}_makeInviter(t,r){return new Wo(this,t,r)}attemptReconnection(t=1){const r=this.options.reconnectionAttempts,n=this.options.reconnectionDelay;if(t>r){this.logger.log("Maximum reconnection attempts reached");return}this.logger.log(`Reconnection attempt ${t} of ${r} - trying`),setTimeout(()=>{this.reconnect().then(()=>{this.logger.log(`Reconnection attempt ${t} of ${r} - succeeded`)}).catch(s=>{this.logger.error(s.message),this.logger.log(`Reconnection attempt ${t} of ${r} - failed`),this.attemptReconnection(++t)})},t===1?0:n*1e3)}initContact(){const t=this.options.contactName!==""?this.options.contactName:os(8),r=this.options.contactParams;return{pubGruu:void 0,tempGruu:void 0,uri:new In("sip",t,this.options.viaHost,void 0,r),toString:(n={})=>{const s=n.anonymous||!1,i=n.outbound||!1,o=n.register||!1;let a="<";return s?a+=this.contact.tempGruu||`sip:anonymous@anonymous.invalid;transport=${r.transport?r.transport:"ws"}`:o?a+=this.contact.uri:a+=this.contact.pubGruu||this.contact.uri,i&&(a+=";ob"),a+=">",this.options.instanceIdAlwaysAdded&&(a+=';+sip.instance="<urn:uuid:'+this._instanceId+'>"'),a}}}initCore(){let t=[];t.push("outbound"),this.options.sipExtension100rel===$r.Supported&&t.push("100rel"),this.options.sipExtensionReplaces===$r.Supported&&t.push("replaces"),this.options.sipExtensionExtraSupported&&t.push(...this.options.sipExtensionExtraSupported),this.options.hackAllowUnregisteredOptionTags||(t=t.filter(n=>dw[n])),t=Array.from(new Set(t));const r=t.slice();return(this.contact.pubGruu||this.contact.tempGruu)&&r.push("gruu"),new Dw({aor:this.options.uri,contact:this.contact,displayName:this.options.displayName,loggerFactory:this.loggerFactory,hackViaTcp:this.options.hackViaTcp,routeSet:this.options.preloadedRouteSet,supportedOptionTags:t,supportedOptionTagsResponse:r,sipjsId:this.options.sipjsId,userAgentHeaderFieldValue:this.options.userAgentString,viaForceRport:this.options.forceRport,viaHost:this.options.viaHost,authenticationFactory:()=>{const n=this.options.authorizationUsername?this.options.authorizationUsername:this.options.uri.user,s=this.options.authorizationPassword?this.options.authorizationPassword:void 0,i=this.options.authorizationHa1?this.options.authorizationHa1:void 0;return new fw(this.getLoggerFactory(),i,n,s)},transportAccessor:()=>this.transport},{onInvite:n=>{var s;const i=new Ls(this,n);if(n.delegate={onCancel:o=>{i._onCancel(o)},onTransportError:o=>{this.logger.error("A transport error has occurred while handling an incoming INVITE request.")}},n.trying(),this.options.sipExtensionReplaces!==$r.Unsupported){const o=n.message.parseHeader("replaces");if(o){const a=o.call_id;if(typeof a!="string")throw new Error("Type of call id is not string");const l=o.replaces_to_tag;if(typeof l!="string")throw new Error("Type of to tag is not string");const u=o.replaces_from_tag;if(typeof u!="string")throw new Error("type of from tag is not string");const c=a+l+u,d=this.userAgentCore.dialogs.get(c);if(!d){i.reject({statusCode:481});return}if(!d.early&&o.early_only===!0){i.reject({statusCode:486});return}const p=this._sessions[a+u]||this._sessions[a+l]||void 0;if(!p)throw new Error("Session does not exist.");i._replacee=p}}if(!((s=this.delegate)===null||s===void 0)&&s.onInvite){if(i.autoSendAnInitialProvisionalResponse){i.progress().then(()=>{var o;if(((o=this.delegate)===null||o===void 0?void 0:o.onInvite)===void 0)throw new Error("onInvite undefined.");this.delegate.onInvite(i)});return}this.delegate.onInvite(i);return}i.reject({statusCode:486})},onMessage:n=>{if(this.delegate&&this.delegate.onMessage){const s=new hp(n);this.delegate.onMessage(s)}else n.accept()},onNotify:n=>{if(this.delegate&&this.delegate.onNotify){const s=new Kl(n);this.delegate.onNotify(s)}else this.options.allowLegacyNotifications?n.accept():n.reject({statusCode:481})},onRefer:n=>{this.logger.warn("Received an out of dialog REFER request"),this.delegate&&this.delegate.onReferRequest?this.delegate.onReferRequest(n):n.reject({statusCode:405})},onRegister:n=>{this.logger.warn("Received an out of dialog REGISTER request"),this.delegate&&this.delegate.onRegisterRequest?this.delegate.onRegisterRequest(n):n.reject({statusCode:405})},onSubscribe:n=>{this.logger.warn("Received an out of dialog SUBSCRIBE request"),this.delegate&&this.delegate.onSubscribeRequest?this.delegate.onSubscribeRequest(n):n.reject({statusCode:405})}})}initTransportCallbacks(){this.transport.onConnect=()=>this.onTransportConnect(),this.transport.onDisconnect=t=>this.onTransportDisconnect(t),this.transport.onMessage=t=>this.onTransportMessage(t)}onTransportConnect(){this.state!==$t.Stopped&&this.delegate&&this.delegate.onConnect&&this.delegate.onConnect()}onTransportDisconnect(t){this.state!==$t.Stopped&&(this.delegate&&this.delegate.onDisconnect&&this.delegate.onDisconnect(t),t&&this.options.reconnectionAttempts>0&&this.attemptReconnection())}onTransportMessage(t){const r=Jo.parseMessage(t,this.getLogger("sip.Parser"));if(!r){this.logger.warn("Failed to parse incoming message. Dropping.");return}if(this.state===$t.Stopped&&r instanceof Bs){this.logger.warn(`Received ${r.method} request while stopped. Dropping.`);return}const n=()=>{for(const s of["from","to","call_id","cseq","via"])if(!r.hasHeader(s))return this.logger.warn(`Missing mandatory header field : ${s}.`),!1;return!0};if(r instanceof Bs){if(!n()){this.logger.warn("Request missing mandatory header field. Dropping.");return}if(!r.toTag&&r.callId.substr(0,5)===this.options.sipjsId){this.userAgentCore.replyStateless(r,{statusCode:482});return}const s=Pi(r.body),i=r.getHeader("content-length");if(i&&s<Number(i)){this.userAgentCore.replyStateless(r,{statusCode:400});return}}if(r instanceof Rn){if(!n()){this.logger.warn("Response missing mandatory header field. Dropping.");return}if(r.getHeaders("via").length>1){this.logger.warn("More than one Via header field present in the response. Dropping.");return}if(r.via.host!==this.options.viaHost||r.via.port!==void 0){this.logger.warn("Via sent-by in the response does not match UA Via host value. Dropping.");return}const s=Pi(r.body),i=r.getHeader("content-length");if(i&&s<Number(i)){this.logger.warn("Message body length is lower than the value in Content-Length header field. Dropping.");return}}if(r instanceof Bs){this.userAgentCore.receiveIncomingRequestFromTransport(r);return}if(r instanceof Rn){this.userAgentCore.receiveIncomingResponseFromTransport(r);return}throw new Error("Invalid message type.")}transitionState(t,r){const n=()=>{throw new Error(`Invalid state transition from ${this._state} to ${t}`)};switch(this._state){case $t.Started:t!==$t.Stopped&&n();break;case $t.Stopped:t!==$t.Started&&n();break;default:throw new Error("Unknown state.")}this.logger.log(`Transitioned from ${this._state} to ${t}`),this._state=t,this._stateEventEmitter.emit(this._state)}},qw=ap,ut=new window.AudioContext,Bw={1:[697,1209],2:[697,1336],3:[697,1477],A:[697,1633],4:[770,1209],5:[770,1336],6:[770,1477],B:[770,1633],7:[852,1209],8:[852,1336],9:[852,1477],C:[852,1633],"*":[941,1209],0:[941,1336],"#":[941,1477],D:[941,1633]},Xo=F(null),Qo=F(null),Oi=F(null),Hi=F(.5),ea=F(1),Yl=F("original"),ta=F(!1),Mi={original:{frequencies:[523.25,659.25,783.99],type:"sine",originalMelody:!0,gain:.7,duration:.5,repeatDelay:400},aurora:{frequencies:[523.25,659.25,783.99,1046.5],type:"sine",originalMelody:!0,gain:.85,duration:.55,repeatDelay:400},resonancia:{frequencies:[392,523.25,659.25,783.99],type:"triangle",originalMelody:!0,gain:1,duration:.6,repeatDelay:400}};const Ep=()=>{const e={classic:"original","original-loud":"aurora","original-intense":"resonancia"},t=d=>{Hi.value=Math.max(0,Math.min(1,d/100))},r=d=>{ea.value=Math.max(0,Math.min(1,d/100))},n=()=>{ta.value&&(l(),a())},s=d=>{const p=e[d]??d;Yl.value=Mi[p]?p:"original",n()},i=(d,p=150)=>{ut.state==="suspended"&&ut.resume();const h=Bw[d.toUpperCase()];if(!h)return;const m=ut.createOscillator(),w=ut.createOscillator(),x=ut.createGain();m.frequency.value=h[0],w.frequency.value=h[1],m.type="sine",w.type="sine",x.gain.value=.1*Hi.value,m.connect(x),w.connect(x),x.connect(ut.destination),m.start(),w.start(),setTimeout(()=>{m.stop(),w.stop(),m.disconnect(),w.disconnect(),x.disconnect()},p)},o=async(d=500)=>{if(ut.state==="suspended")try{await ut.resume()}catch{}const p=ut.createOscillator(),h=ut.createGain(),m=ut.currentTime;p.type="sine",p.frequency.value=600;const w=.02,x=.1,v=.75*Hi.value;h.gain.setValueAtTime(0,m),h.gain.linearRampToValueAtTime(v,m+w),h.gain.setValueAtTime(v,m+d/1e3-x),h.gain.linearRampToValueAtTime(0,m+d/1e3),p.connect(h),h.connect(ut.destination),p.start(m),p.stop(m+d/1e3),await new Promise(S=>window.setTimeout(S,d))},a=()=>{if(ta.value)return;ta.value=!0,ut.state==="suspended"&&ut.resume();const d=()=>{const h=ut.currentTime,m=Mi[Yl.value]||Mi.original,w=ut.createGain(),x=m.duration,v=(m.originalMelody?[m.frequencies[0]]:m.frequencies).map(S=>{const b=ut.createOscillator();return b.type=m.type,b.frequency.setValueAtTime(S,h),m.originalMelody&&m.frequencies.slice(1).forEach((y,T)=>{b.frequency.setValueAtTime(y,h+(T+1)*.1)}),b.connect(w),b});m.originalMelody?(w.gain.setValueAtTime(m.gain*ea.value,h),w.gain.exponentialRampToValueAtTime(.001,h+x)):(w.gain.setValueAtTime(0,h),w.gain.linearRampToValueAtTime(.7*ea.value,h+.02),w.gain.setValueAtTime(.7*ea.value,h+1.05),w.gain.linearRampToValueAtTime(0,h+x)),w.connect(ut.destination),v.forEach(S=>{S.start(h),S.stop(h+x)})},p=()=>{const h=Mi[Yl.value]||Mi.original;Qo.value=window.setTimeout(d,h.repeatDelay)};d(),p(),Xo.value=window.setInterval(()=>{d(),p()},3e3)},l=()=>{Xo.value&&(clearInterval(Xo.value),Xo.value=null),Qo.value&&(clearTimeout(Qo.value),Qo.value=null),ta.value=!1};return{playDtmf:i,playAutoAnswerBeep:o,startRingtone:a,stopRingtone:l,startRingback:()=>{if(Oi.value)return;ut.state==="suspended"&&ut.resume();const d=()=>{const p=ut.currentTime,h=ut.createOscillator(),m=ut.createGain();h.type="sine",h.frequency.value=425,m.gain.setValueAtTime(.1*Hi.value,p),m.gain.linearRampToValueAtTime(.1*Hi.value,p+1),m.gain.linearRampToValueAtTime(0,p+1.1),h.connect(m),m.connect(ut.destination),h.start(p),h.stop(p+1.1)};d(),Oi.value=window.setInterval(()=>{d()},4e3)},stopRingback:()=>{Oi.value&&(clearInterval(Oi.value),Oi.value=null)},setNotificationVolume:t,setRingtoneVolume:r,setRingtoneTone:s}};function Ap(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=Ap(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function kp(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=Ap(e))&&(n&&(n+=" "),n+=t);return n}var Lw=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},Fw=(e,t)=>({classGroupId:e,validator:t}),Ip=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),ra="-",Rp=[],Vw="arbitrary..",jw=e=>{const t=zw(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return Uw(o);const a=o.split(ra);return $p(a,a[0]===""&&a.length>1?1:0,t)},getConflictingClassGroupIds:(o,a)=>{if(a){const l=n[o],u=r[o];return l?u?Lw(u,l):l:u||Rp}return r[o]||Rp}}},$p=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const n=e[t],s=r.nextPart.get(n);if(s){const l=$p(e,t+1,s);if(l)return l}const i=r.validators;if(i===null)return;const o=t===0?e.join(ra):e.slice(t).join(ra),a=i.length;for(let l=0;l<a;l++){const u=i[l];if(u.validator(o))return u.classGroupId}},Uw=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?Vw+n:void 0})(),zw=e=>{const{theme:t,classGroups:r}=e;return Kw(r,t)},Kw=(e,t)=>{const r=Ip();for(const n in e){const s=e[n];Zl(s,r,n,t)}return r},Zl=(e,t,r,n)=>{const s=e.length;for(let i=0;i<s;i++){const o=e[i];Ww(o,t,r,n)}},Ww=(e,t,r,n)=>{if(typeof e=="string"){Gw(e,t,r);return}if(typeof e=="function"){Jw(e,t,r,n);return}Yw(e,t,r,n)},Gw=(e,t,r)=>{const n=e===""?t:Pp(t,e);n.classGroupId=r},Jw=(e,t,r,n)=>{if(Zw(e)){Zl(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(Fw(r,e))},Yw=(e,t,r,n)=>{const s=Object.entries(e),i=s.length;for(let o=0;o<i;o++){const[a,l]=s[o];Zl(l,Pp(t,a),r,n)}},Pp=(e,t)=>{let r=e;const n=t.split(ra),s=n.length;for(let i=0;i<s;i++){const o=n[i];let a=r.nextPart.get(o);a||(a=Ip(),r.nextPart.set(o,a)),r=a}return r},Zw=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Xw=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const s=(i,o)=>{r[i]=o,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(i){let o=r[i];if(o!==void 0)return o;if((o=n[i])!==void 0)return s(i,o),o},set(i,o){i in r?r[i]=o:s(i,o)}}},Xl="!",Dp=":",Qw=[],Op=(e,t,r,n,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:s}),ey=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=s=>{const i=[];let o=0,a=0,l=0,u;const c=s.length;for(let w=0;w<c;w++){const x=s[w];if(o===0&&a===0){if(x===Dp){i.push(s.slice(l,w)),l=w+1;continue}if(x==="/"){u=w;continue}}x==="["?o++:x==="]"?o--:x==="("?a++:x===")"&&a--}const d=i.length===0?s:s.slice(l);let p=d,h=!1;d.endsWith(Xl)?(p=d.slice(0,-1),h=!0):d.startsWith(Xl)&&(p=d.slice(1),h=!0);const m=u&&u>l?u-l:void 0;return Op(i,h,p,m)};if(t){const s=t+Dp,i=n;n=o=>o.startsWith(s)?i(o.slice(s.length)):Op(Qw,!1,o,void 0,!0)}if(r){const s=n;n=i=>r({className:i,parseClassName:s})}return n},ty=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let s=[];for(let i=0;i<r.length;i++){const o=r[i],a=o[0]==="[",l=t.has(o);a||l?(s.length>0&&(s.sort(),n.push(...s),s=[]),n.push(o)):s.push(o)}return s.length>0&&(s.sort(),n.push(...s)),n}},ry=e=>({cache:Xw(e.cacheSize),parseClassName:ey(e),sortModifiers:ty(e),...jw(e)}),ny=/\s+/,sy=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:i}=t,o=[],a=e.trim().split(ny);let l="";for(let u=a.length-1;u>=0;u-=1){const c=a[u],{isExternal:d,modifiers:p,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:w}=r(c);if(d){l=c+(l.length>0?" "+l:l);continue}let x=!!w,v=n(x?m.substring(0,w):m);if(!v){if(!x){l=c+(l.length>0?" "+l:l);continue}if(v=n(m),!v){l=c+(l.length>0?" "+l:l);continue}x=!1}const S=p.length===0?"":p.length===1?p[0]:i(p).join(":"),b=h?S+Xl:S,y=b+v;if(o.indexOf(y)>-1)continue;o.push(y);const T=s(v,x);for(let I=0;I<T.length;++I){const N=T[I];o.push(b+N)}l=c+(l.length>0?" "+l:l)}return l},iy=(...e)=>{let t=0,r,n,s="";for(;t<e.length;)(r=e[t++])&&(n=Hp(r))&&(s&&(s+=" "),s+=n);return s},Hp=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Hp(e[n]))&&(r&&(r+=" "),r+=t);return r},oy=(e,...t)=>{let r,n,s,i;const o=l=>(r=ry(t.reduce((u,c)=>c(u),e())),n=r.cache.get,s=r.cache.set,i=a,a(l)),a=l=>{const u=n(l);if(u)return u;const c=sy(l,r);return s(l,c),c};return i=o,(...l)=>i(iy(...l))},ay=[],xt=e=>{const t=r=>r[e]||ay;return t.isThemeGetter=!0,t},Mp=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Np=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ly=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,cy=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,uy=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,dy=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,fy=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,py=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Mn=e=>ly.test(e),Fe=e=>!!e&&!Number.isNaN(Number(e)),Nn=e=>!!e&&Number.isInteger(Number(e)),Ql=e=>e.endsWith("%")&&Fe(e.slice(0,-1)),fn=e=>cy.test(e),qp=()=>!0,hy=e=>uy.test(e)&&!dy.test(e),ec=()=>!1,gy=e=>fy.test(e),vy=e=>py.test(e),my=e=>!xe(e)&&!Te(e),wy=e=>qn(e,Up,ec),xe=e=>Mp.test(e),as=e=>qn(e,zp,hy),Bp=e=>qn(e,Ey,Fe),yy=e=>qn(e,Wp,qp),by=e=>qn(e,Kp,ec),Lp=e=>qn(e,Vp,ec),_y=e=>qn(e,jp,vy),na=e=>qn(e,Gp,gy),Te=e=>Np.test(e),Ni=e=>ls(e,zp),Sy=e=>ls(e,Kp),Fp=e=>ls(e,Vp),Cy=e=>ls(e,Up),xy=e=>ls(e,jp),sa=e=>ls(e,Gp,!0),Ty=e=>ls(e,Wp,!0),qn=(e,t,r)=>{const n=Mp.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},ls=(e,t,r=!1)=>{const n=Np.exec(e);return n?n[1]?t(n[1]):r:!1},Vp=e=>e==="position"||e==="percentage",jp=e=>e==="image"||e==="url",Up=e=>e==="length"||e==="size"||e==="bg-size",zp=e=>e==="length",Ey=e=>e==="number",Kp=e=>e==="family-name",Wp=e=>e==="number"||e==="weight",Gp=e=>e==="shadow",Ay=()=>{const e=xt("color"),t=xt("font"),r=xt("text"),n=xt("font-weight"),s=xt("tracking"),i=xt("leading"),o=xt("breakpoint"),a=xt("container"),l=xt("spacing"),u=xt("radius"),c=xt("shadow"),d=xt("inset-shadow"),p=xt("text-shadow"),h=xt("drop-shadow"),m=xt("blur"),w=xt("perspective"),x=xt("aspect"),v=xt("ease"),S=xt("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],T=()=>[...y(),Te,xe],I=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],g=()=>[Te,xe,l],B=()=>[Mn,"full","auto",...g()],q=()=>[Nn,"none","subgrid",Te,xe],C=()=>["auto",{span:["full",Nn,Te,xe]},Nn,Te,xe],_=()=>[Nn,"auto",Te,xe],E=()=>["auto","min","max","fr",Te,xe],P=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],R=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...g()],G=()=>[Mn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...g()],W=()=>[Mn,"screen","full","dvw","lvw","svw","min","max","fit",...g()],ae=()=>[Mn,"screen","full","lh","dvh","lvh","svh","min","max","fit",...g()],Y=()=>[e,Te,xe],le=()=>[...y(),Fp,Lp,{position:[Te,xe]}],he=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Ie=()=>["auto","cover","contain",Cy,wy,{size:[Te,xe]}],Ne=()=>[Ql,Ni,as],De=()=>["","none","full",u,Te,xe],Re=()=>["",Fe,Ni,as],st=()=>["solid","dashed","dotted","double"],mt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ge=()=>[Fe,Ql,Fp,Lp],je=()=>["","none",m,Te,xe],bt=()=>["none",Fe,Te,xe],Tt=()=>["none",Fe,Te,xe],A=()=>[Fe,Te,xe],H=()=>[Mn,"full",...g()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[fn],breakpoint:[fn],color:[qp],container:[fn],"drop-shadow":[fn],ease:["in","out","in-out"],font:[my],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[fn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[fn],shadow:[fn],spacing:["px",Fe],text:[fn],"text-shadow":[fn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Mn,xe,Te,x]}],container:["container"],columns:[{columns:[Fe,xe,Te,a]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:T()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:B()}],"inset-x":[{"inset-x":B()}],"inset-y":[{"inset-y":B()}],start:[{"inset-s":B(),start:B()}],end:[{"inset-e":B(),end:B()}],"inset-bs":[{"inset-bs":B()}],"inset-be":[{"inset-be":B()}],top:[{top:B()}],right:[{right:B()}],bottom:[{bottom:B()}],left:[{left:B()}],visibility:["visible","invisible","collapse"],z:[{z:[Nn,"auto",Te,xe]}],basis:[{basis:[Mn,"full","auto",a,...g()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Fe,Mn,"auto","initial","none",xe]}],grow:[{grow:["",Fe,Te,xe]}],shrink:[{shrink:["",Fe,Te,xe]}],order:[{order:[Nn,"first","last","none",Te,xe]}],"grid-cols":[{"grid-cols":q()}],"col-start-end":[{col:C()}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":q()}],"row-start-end":[{row:C()}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":E()}],"auto-rows":[{"auto-rows":E()}],gap:[{gap:g()}],"gap-x":[{"gap-x":g()}],"gap-y":[{"gap-y":g()}],"justify-content":[{justify:[...P(),"normal"]}],"justify-items":[{"justify-items":[...R(),"normal"]}],"justify-self":[{"justify-self":["auto",...R()]}],"align-content":[{content:["normal",...P()]}],"align-items":[{items:[...R(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...R(),{baseline:["","last"]}]}],"place-content":[{"place-content":P()}],"place-items":[{"place-items":[...R(),"baseline"]}],"place-self":[{"place-self":["auto",...R()]}],p:[{p:g()}],px:[{px:g()}],py:[{py:g()}],ps:[{ps:g()}],pe:[{pe:g()}],pbs:[{pbs:g()}],pbe:[{pbe:g()}],pt:[{pt:g()}],pr:[{pr:g()}],pb:[{pb:g()}],pl:[{pl:g()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mbs:[{mbs:D()}],mbe:[{mbe:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":g()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":g()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],"inline-size":[{inline:["auto",...W()]}],"min-inline-size":[{"min-inline":["auto",...W()]}],"max-inline-size":[{"max-inline":["none",...W()]}],"block-size":[{block:["auto",...ae()]}],"min-block-size":[{"min-block":["auto",...ae()]}],"max-block-size":[{"max-block":["none",...ae()]}],w:[{w:[a,"screen",...G()]}],"min-w":[{"min-w":[a,"screen","none",...G()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",r,Ni,as]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Ty,yy]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ql,xe]}],"font-family":[{font:[Sy,by,t]}],"font-features":[{"font-features":[xe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,Te,xe]}],"line-clamp":[{"line-clamp":[Fe,"none",Te,Bp]}],leading:[{leading:[i,...g()]}],"list-image":[{"list-image":["none",Te,xe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Te,xe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Y()}],"text-color":[{text:Y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...st(),"wavy"]}],"text-decoration-thickness":[{decoration:[Fe,"from-font","auto",Te,as]}],"text-decoration-color":[{decoration:Y()}],"underline-offset":[{"underline-offset":[Fe,"auto",Te,xe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:g()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Te,xe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Te,xe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:le()}],"bg-repeat":[{bg:he()}],"bg-size":[{bg:Ie()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Nn,Te,xe],radial:["",Te,xe],conic:[Nn,Te,xe]},xy,_y]}],"bg-color":[{bg:Y()}],"gradient-from-pos":[{from:Ne()}],"gradient-via-pos":[{via:Ne()}],"gradient-to-pos":[{to:Ne()}],"gradient-from":[{from:Y()}],"gradient-via":[{via:Y()}],"gradient-to":[{to:Y()}],rounded:[{rounded:De()}],"rounded-s":[{"rounded-s":De()}],"rounded-e":[{"rounded-e":De()}],"rounded-t":[{"rounded-t":De()}],"rounded-r":[{"rounded-r":De()}],"rounded-b":[{"rounded-b":De()}],"rounded-l":[{"rounded-l":De()}],"rounded-ss":[{"rounded-ss":De()}],"rounded-se":[{"rounded-se":De()}],"rounded-ee":[{"rounded-ee":De()}],"rounded-es":[{"rounded-es":De()}],"rounded-tl":[{"rounded-tl":De()}],"rounded-tr":[{"rounded-tr":De()}],"rounded-br":[{"rounded-br":De()}],"rounded-bl":[{"rounded-bl":De()}],"border-w":[{border:Re()}],"border-w-x":[{"border-x":Re()}],"border-w-y":[{"border-y":Re()}],"border-w-s":[{"border-s":Re()}],"border-w-e":[{"border-e":Re()}],"border-w-bs":[{"border-bs":Re()}],"border-w-be":[{"border-be":Re()}],"border-w-t":[{"border-t":Re()}],"border-w-r":[{"border-r":Re()}],"border-w-b":[{"border-b":Re()}],"border-w-l":[{"border-l":Re()}],"divide-x":[{"divide-x":Re()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Re()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...st(),"hidden","none"]}],"divide-style":[{divide:[...st(),"hidden","none"]}],"border-color":[{border:Y()}],"border-color-x":[{"border-x":Y()}],"border-color-y":[{"border-y":Y()}],"border-color-s":[{"border-s":Y()}],"border-color-e":[{"border-e":Y()}],"border-color-bs":[{"border-bs":Y()}],"border-color-be":[{"border-be":Y()}],"border-color-t":[{"border-t":Y()}],"border-color-r":[{"border-r":Y()}],"border-color-b":[{"border-b":Y()}],"border-color-l":[{"border-l":Y()}],"divide-color":[{divide:Y()}],"outline-style":[{outline:[...st(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Fe,Te,xe]}],"outline-w":[{outline:["",Fe,Ni,as]}],"outline-color":[{outline:Y()}],shadow:[{shadow:["","none",c,sa,na]}],"shadow-color":[{shadow:Y()}],"inset-shadow":[{"inset-shadow":["none",d,sa,na]}],"inset-shadow-color":[{"inset-shadow":Y()}],"ring-w":[{ring:Re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Y()}],"ring-offset-w":[{"ring-offset":[Fe,as]}],"ring-offset-color":[{"ring-offset":Y()}],"inset-ring-w":[{"inset-ring":Re()}],"inset-ring-color":[{"inset-ring":Y()}],"text-shadow":[{"text-shadow":["none",p,sa,na]}],"text-shadow-color":[{"text-shadow":Y()}],opacity:[{opacity:[Fe,Te,xe]}],"mix-blend":[{"mix-blend":[...mt(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":mt()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Fe]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ge()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ge()}],"mask-image-linear-from-color":[{"mask-linear-from":Y()}],"mask-image-linear-to-color":[{"mask-linear-to":Y()}],"mask-image-t-from-pos":[{"mask-t-from":Ge()}],"mask-image-t-to-pos":[{"mask-t-to":Ge()}],"mask-image-t-from-color":[{"mask-t-from":Y()}],"mask-image-t-to-color":[{"mask-t-to":Y()}],"mask-image-r-from-pos":[{"mask-r-from":Ge()}],"mask-image-r-to-pos":[{"mask-r-to":Ge()}],"mask-image-r-from-color":[{"mask-r-from":Y()}],"mask-image-r-to-color":[{"mask-r-to":Y()}],"mask-image-b-from-pos":[{"mask-b-from":Ge()}],"mask-image-b-to-pos":[{"mask-b-to":Ge()}],"mask-image-b-from-color":[{"mask-b-from":Y()}],"mask-image-b-to-color":[{"mask-b-to":Y()}],"mask-image-l-from-pos":[{"mask-l-from":Ge()}],"mask-image-l-to-pos":[{"mask-l-to":Ge()}],"mask-image-l-from-color":[{"mask-l-from":Y()}],"mask-image-l-to-color":[{"mask-l-to":Y()}],"mask-image-x-from-pos":[{"mask-x-from":Ge()}],"mask-image-x-to-pos":[{"mask-x-to":Ge()}],"mask-image-x-from-color":[{"mask-x-from":Y()}],"mask-image-x-to-color":[{"mask-x-to":Y()}],"mask-image-y-from-pos":[{"mask-y-from":Ge()}],"mask-image-y-to-pos":[{"mask-y-to":Ge()}],"mask-image-y-from-color":[{"mask-y-from":Y()}],"mask-image-y-to-color":[{"mask-y-to":Y()}],"mask-image-radial":[{"mask-radial":[Te,xe]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ge()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ge()}],"mask-image-radial-from-color":[{"mask-radial-from":Y()}],"mask-image-radial-to-color":[{"mask-radial-to":Y()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":y()}],"mask-image-conic-pos":[{"mask-conic":[Fe]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ge()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ge()}],"mask-image-conic-from-color":[{"mask-conic-from":Y()}],"mask-image-conic-to-color":[{"mask-conic-to":Y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:le()}],"mask-repeat":[{mask:he()}],"mask-size":[{mask:Ie()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Te,xe]}],filter:[{filter:["","none",Te,xe]}],blur:[{blur:je()}],brightness:[{brightness:[Fe,Te,xe]}],contrast:[{contrast:[Fe,Te,xe]}],"drop-shadow":[{"drop-shadow":["","none",h,sa,na]}],"drop-shadow-color":[{"drop-shadow":Y()}],grayscale:[{grayscale:["",Fe,Te,xe]}],"hue-rotate":[{"hue-rotate":[Fe,Te,xe]}],invert:[{invert:["",Fe,Te,xe]}],saturate:[{saturate:[Fe,Te,xe]}],sepia:[{sepia:["",Fe,Te,xe]}],"backdrop-filter":[{"backdrop-filter":["","none",Te,xe]}],"backdrop-blur":[{"backdrop-blur":je()}],"backdrop-brightness":[{"backdrop-brightness":[Fe,Te,xe]}],"backdrop-contrast":[{"backdrop-contrast":[Fe,Te,xe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Fe,Te,xe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Fe,Te,xe]}],"backdrop-invert":[{"backdrop-invert":["",Fe,Te,xe]}],"backdrop-opacity":[{"backdrop-opacity":[Fe,Te,xe]}],"backdrop-saturate":[{"backdrop-saturate":[Fe,Te,xe]}],"backdrop-sepia":[{"backdrop-sepia":["",Fe,Te,xe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":g()}],"border-spacing-x":[{"border-spacing-x":g()}],"border-spacing-y":[{"border-spacing-y":g()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Te,xe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Fe,"initial",Te,xe]}],ease:[{ease:["linear","initial",v,Te,xe]}],delay:[{delay:[Fe,Te,xe]}],animate:[{animate:["none",S,Te,xe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,Te,xe]}],"perspective-origin":[{"perspective-origin":T()}],rotate:[{rotate:bt()}],"rotate-x":[{"rotate-x":bt()}],"rotate-y":[{"rotate-y":bt()}],"rotate-z":[{"rotate-z":bt()}],scale:[{scale:Tt()}],"scale-x":[{"scale-x":Tt()}],"scale-y":[{"scale-y":Tt()}],"scale-z":[{"scale-z":Tt()}],"scale-3d":["scale-3d"],skew:[{skew:A()}],"skew-x":[{"skew-x":A()}],"skew-y":[{"skew-y":A()}],transform:[{transform:[Te,xe,"","none","gpu","cpu"]}],"transform-origin":[{origin:T()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:H()}],"translate-x":[{"translate-x":H()}],"translate-y":[{"translate-y":H()}],"translate-z":[{"translate-z":H()}],"translate-none":["translate-none"],accent:[{accent:Y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Y()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Te,xe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":g()}],"scroll-mx":[{"scroll-mx":g()}],"scroll-my":[{"scroll-my":g()}],"scroll-ms":[{"scroll-ms":g()}],"scroll-me":[{"scroll-me":g()}],"scroll-mbs":[{"scroll-mbs":g()}],"scroll-mbe":[{"scroll-mbe":g()}],"scroll-mt":[{"scroll-mt":g()}],"scroll-mr":[{"scroll-mr":g()}],"scroll-mb":[{"scroll-mb":g()}],"scroll-ml":[{"scroll-ml":g()}],"scroll-p":[{"scroll-p":g()}],"scroll-px":[{"scroll-px":g()}],"scroll-py":[{"scroll-py":g()}],"scroll-ps":[{"scroll-ps":g()}],"scroll-pe":[{"scroll-pe":g()}],"scroll-pbs":[{"scroll-pbs":g()}],"scroll-pbe":[{"scroll-pbe":g()}],"scroll-pt":[{"scroll-pt":g()}],"scroll-pr":[{"scroll-pr":g()}],"scroll-pb":[{"scroll-pb":g()}],"scroll-pl":[{"scroll-pl":g()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Te,xe]}],fill:[{fill:["none",...Y()]}],"stroke-w":[{stroke:[Fe,Ni,as,Bp]}],stroke:[{stroke:["none",...Y()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},ky=oy(Ay);const dt=(...e)=>ky(kp(e)),bT=4;var Jp=e=>e.replace(/\D/g,"");const tc=(e,t=[])=>{const r=Jp(e??"");return r!==""&&t.some(n=>Jp(n)===r)},br=(e,t=[])=>e.length<=4||tc(e,t)?e:`${"*".repeat(e.length-4)}${e.slice(-4)}`,Iy=(e,t)=>{if(e){const r=rc(e);if(r&&Yp(r))return r;if(e.trim())return e.trim()}if(t){const r=rc(t);if(r&&Yp(r))return r;const n=Ry(t);if(n)return n;if(t.trim()&&!t.includes("@"))return t.trim()}return"Unknown"};var rc=e=>e.replace(/[^\d+*#]/g,""),Yp=e=>/^\+?[\d*#]{2,}$/.test(e),Ry=e=>{let t=e.match(/^([+]?[\d*#]{2,})\s*[-:]/);return t&&t[1]||(t=e.match(/\(([+]?[\d*#]{2,})\)/),t&&t[1])||(t=e.match(/(?:ext\.?|extension)\s*([+]?[\d*#]{2,})/i),t&&t[1])?t[1]:(t=e.match(/([+]?\d{1,3}[-.\s]?\(?\d{1,4}\)?[-.\s]?\d{1,4}[-.\s]?\d{1,9})/),t&&t[1]?rc(t[1]):null)};const Zp="webphone-auto-answer",nc=()=>{try{return localStorage.getItem(Zp)==="true"}catch{return!1}};var $y="/assets/sipSharedWorker-Bk0APY9t.js";function qi(e){"@babel/helpers - typeof";return qi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qi(e)}function Py(e,t){if(qi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(qi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Dy(e){var t=Py(e,"string");return qi(t)=="symbol"?t:t+""}function tr(e,t,r){return(t=Dy(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Oy=class{constructor(e,t){tr(this,"serverUrl",void 0),tr(this,"keepAliveInterval",void 0),tr(this,"clientId",void 0),tr(this,"connectionId",void 0),tr(this,"stateEventEmitter",new qs),tr(this,"port",void 0),tr(this,"currentState",Ee.Disconnected),tr(this,"connectPromise",void 0),tr(this,"connectResolve",void 0),tr(this,"connectReject",void 0),tr(this,"connectTimeout",void 0),tr(this,"onConnect",void 0),tr(this,"onDisconnect",void 0),tr(this,"onMessage",void 0),this.serverUrl=t.server,this.keepAliveInterval=t.keepAliveInterval??30,this.clientId=t.clientId,this.connectionId=t.connectionId;const r=new SharedWorker($y,{name:`webphone-sip-${this.connectionId}`});this.port=r.port,r.addEventListener("error",n=>{this.handle({type:"error",error:n.message||"SharedWorker failed to load"})}),this.port.addEventListener("message",n=>this.handle(n.data)),this.port.start()}get protocol(){return new URL(this.serverUrl).protocol.replace(":","").toUpperCase()}get server(){return this.serverUrl}get state(){return this.currentState}get stateChange(){return this.stateEventEmitter}isConnected(){return this.currentState===Ee.Connected}connect(){return this.isConnected()?Promise.resolve():this.connectPromise?this.connectPromise:(this.transition(Ee.Connecting),this.connectPromise=new Promise((e,t)=>{this.connectResolve=e,this.connectReject=t}),this.connectTimeout=setTimeout(()=>{if(this.currentState!==Ee.Connecting)return;const e=new Error(`SharedWorker did not connect to ${this.serverUrl}`);this.transition(Ee.Disconnected),this.connectReject?.(e),this.clearPromise()},1e4),this.post({type:"connect",clientId:this.clientId,connectionId:this.connectionId,server:this.serverUrl,keepAliveInterval:this.keepAliveInterval}),this.connectPromise)}async disconnect(){this.currentState!==Ee.Disconnected&&(this.transition(Ee.Disconnecting),this.connectReject?.(new Error("SharedWorker WebSocket disconnected")),this.clearPromise(),this.post({type:"disconnect",clientId:this.clientId,connectionId:this.connectionId}),this.transition(Ee.Disconnected))}async dispose(){await this.disconnect(),this.port.close()}send(e){return this.isConnected()?(this.post({type:"send",clientId:this.clientId,connectionId:this.connectionId,data:e}),Promise.resolve()):Promise.reject(new Error("SharedWorker WebSocket is not connected"))}post(e){this.port.postMessage(e)}handle(e){switch(e.type){case"connected":this.transition(Ee.Connected),this.connectResolve?.(),this.clearPromise(),this.onConnect?.();break;case"message":this.isConnected()&&this.onMessage?.(e.data);break;case"error":if(this.currentState===Ee.Connecting){const t=new Error(e.error);this.transition(Ee.Disconnected),this.connectReject?.(t),this.clearPromise()}break;case"disconnected":{const t=this.isConnected(),r=e.error?new Error(e.error):void 0;this.transition(Ee.Disconnected),this.connectReject&&(this.connectReject(r??new Error("SharedWorker WebSocket disconnected")),this.clearPromise()),t&&this.onDisconnect?.(r);break}}}clearPromise(){this.connectTimeout&&clearTimeout(this.connectTimeout),this.connectTimeout=void 0,this.connectPromise=void 0,this.connectResolve=void 0,this.connectReject=void 0}transition(e){this.currentState!==e&&(this.currentState=e,this.stateEventEmitter.emit(e))}};const Hy="Nebula-",My=(e,t,r="5.2.0")=>{const n=(e??"").replace(/[^A-Za-z0-9_.-]/g,"");if(!n)return;const s=r.replace(/[^A-Za-z0-9_.+-]/g,"");return`${Hy}${n}${s?`/${s}`:""} ${t}`},Ny="webphone:connection-drops",_T=50,qy="webphone:connection-drop";var Xp=()=>{try{return typeof localStorage>"u"?null:localStorage}catch{return null}};const By=(e=Xp())=>{if(!e)return[];try{const t=JSON.parse(e.getItem("webphone:connection-drops")??"[]");return Array.isArray(t)?t:[]}catch{return[]}},Ly=({connectedAt:e,inCall:t,error:r,now:n=Date.now()})=>{const s=typeof navigator>"u"?void 0:navigator.connection;return{at:new Date(n).toISOString(),connectedForMs:e===null?null:Math.max(0,n-e),inCall:t,reason:r?.message||"clean",online:typeof navigator>"u"?!0:navigator.onLine,...s?.effectiveType?{effectiveType:s.effectiveType}:{},...typeof s?.rtt=="number"?{rttMs:s.rtt}:{},...typeof s?.downlink=="number"?{downlinkMbps:s.downlink}:{}}};var Fy=e=>{try{typeof window<"u"&&window.dispatchEvent(new CustomEvent(qy,{detail:e}))}catch{}};const Vy=(e,t=Xp())=>{const r=Ly(e);if(console.warn("[SipJs] WebSocket dropped",r),Fy(r),!t)return r;try{const n=[...By(t),r].slice(-50);t.setItem(Ny,JSON.stringify(n))}catch{}return r};var jy="X-Nebula-Queue",Uy="X-Nebula-Queue-Id";const ST=30,ia=[1e3,2e3,5e3,1e4,2e4,3e4],zy=3e4,Ky=(e,t)=>e&&t;var Qp=class extends Error{constructor(){super("Invalid URI")}};const Wy=(e,t={})=>{const r=ft(null),n=ft(null),s=ft(new Map),i=new Audio;i.autoplay=!0;const o=ft(void 0),a=ft(null),l=ft(null),u=new Map,c=new Map,d=new Set,p=new Map,h=5e3;let m=!1,w=null,x=null,v=null,S=null,b=null,y=null,T=0,I=null,N=null,g=null,B=0,q=0;const C=V(()=>r.value?.configuration.uri?.user||""),{startRingtone:_,stopRingtone:E,startRingback:P,stopRingback:R,playAutoAnswerBeep:D,setNotificationVolume:G,setRingtoneVolume:W,setRingtoneTone:ae}=Ep(),Y=M=>M instanceof Wo||M instanceof Ls?M.request?.callId||M.dialog?.callId||M.id||crypto.randomUUID():M.dialog?.callId||M.id||crypto.randomUUID(),le=M=>{if(!(M instanceof Ls))return;const K=M.request;if(!K)return;const L=K.getHeader(jy)?.trim(),oe=K.getHeader(Uy)?.trim();if(!(!L&&!oe))return{...oe?{id:oe}:{},...L?{name:L}:{}}},he=(M,K,L,oe)=>{const te=le(M),ge={channelId:K,sipCallId:Y(M),direction:L,remoteNumber:oe,...te?{queue:te}:{}};return u.set(K,ge),t.onCallContext?.(ge),ge},Ie=(M,K)=>{const L=u.get(M);L&&t.onCallState?.({...L,state:K,timestamp:Date.now()})},Ne=(M,K)=>{if(s.value.get(K)!==M||M.state!==z.Established)return;const L=u.get(K),oe=M.sessionDescriptionHandler,te=oe?.localMediaStream??l.value,ge=oe?.remoteMediaStream??a.value,ye=te?.getAudioTracks()??[],Ae=ge?.getAudioTracks()??[];if(!L||!te||!ge||ye.length===0||Ae.length===0)return;const at=[L.sipCallId,...ye.map(Xe=>`local:${Xe.id}`),...Ae.map(Xe=>`remote:${Xe.id}`)].join("|");c.get(K)!==at&&(c.set(K,at),t.onMediaReady?.({...L,localStream:te,remoteStream:ge}))},De=M=>{u.delete(M),c.delete(M),d.delete(M)},Re=(M,K)=>{if(s.value.get(M)!==K)return;const L=p.get(K);L&&clearTimeout(L),p.delete(K);const oe=e.channels.value.find(Ae=>Ae.id===M),te=u.get(M),ge=d.has(M)||oe?.status==="connected";De(M),s.value.delete(M),e.updateChannelState(M,{status:"idle",remoteNumber:"",remoteDisplayName:void 0,isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1});const ye=e.transferInProgress.value;if(ye&&(ye.originalChannelId===M||ye.consultationChannelId===M)&&e.setTransferInProgress(null),e.activeChannelId.value===M&&uu(),je(),te){try{e.addCallLog({number:te.remoteNumber,direction:te.direction,status:ge?"answered":te.direction==="incoming"?"missed":"cancelled",startTime:ge?oe?.startTime??Date.now():Date.now(),duration:ge?Math.floor((Date.now()-(oe?.startTime??Date.now()))/1e3):0})}catch(Ae){console.warn("[SipJs] Call ended, but saving its history failed:",Ae)}try{t.onCallState?.({...te,state:ge?"ended":"failed",timestamp:Date.now()})}catch(Ae){console.warn("[SipJs] Call ended, but the state callback failed:",Ae)}}},st=(M,K)=>{p.has(K)||p.set(K,setTimeout(()=>{console.warn("[SipJs] Hangup did not terminate; releasing local call state"),mt(K),Re(M,K)},h))},mt=M=>{if(M.state!==z.Terminated)try{M.dispose().catch(K=>{console.warn("[SipJs] Session disposal failed:",K)})}catch(K){console.warn("[SipJs] Session disposal failed:",K)}},Ge=()=>{for(const[M,K]of s.value)K.state===z.Initial&&u.get(M)?.direction==="incoming"&&(console.warn("[SipJs] Transport lost while ringing; releasing the incoming call"),Re(M,K),mt(K))},je=()=>{e.channels.value.some(M=>M.status==="incoming")&&!nc()?_():E(),e.activeChannel.value?.status==="calling"?P():R()},bt=async(M,K,L)=>{await D(),nc()&&s.value.get(M)===K&&K.state===z.Initial&&await lt(L)},Tt=M=>{i.volume=M/100},A=async M=>{typeof i.setSinkId=="function"&&await i.setSinkId(M)},H=async M=>{if(!M)return;const K=[...s.value.entries()].flatMap(([te,ge])=>{const ye=ge.sessionDescriptionHandler,Ae=ye?.peerConnection?.getSenders().find(at=>at.track?.kind==="audio");return Ae?[{channelId:te,session:ge,sdh:ye,sender:Ae}]:[]});if(K.length===0){o.value=M;return}const L=[],oe=[];try{for(const{sender:ge}of K){const ye=await navigator.mediaDevices.getUserMedia(de(!1,M));L.push(ye);const[Ae]=ye.getAudioTracks(),at=ge.track;if(!Ae||!at)throw new Error("Could not acquire an audio track for the selected microphone");Ae.enabled=at.enabled,await ge.replaceTrack(Ae),oe.push({sender:ge,previousTrack:at})}o.value=M,K.forEach(({channelId:ge,session:ye,sdh:Ae,sender:at},Xe)=>{const wt=L[Xe]?.getAudioTracks()[0];if(!wt)return;const Kn=e.channels.value.find(_n=>_n.id===ge),Ji=!(Kn?.isHeld||Kn?.isMuted);at.track.enabled=Ji;const Cr=Ae.localMediaStream;Cr&&(Cr.getAudioTracks().forEach(_n=>{_n!==wt&&Cr.removeTrack(_n)}),Cr.getTracks().includes(wt)||Cr.addTrack(wt)),e.activeChannelId.value===ge&&(Cr?l.value=Cr:l.value&&(l.value.getAudioTracks().forEach(_n=>{_n!==wt&&l.value?.removeTrack(_n)}),l.value.getTracks().includes(wt)||l.value.addTrack(wt)));try{Ne(ye,ge)}catch(_n){console.error("[SipJs] Media-ready callback failed after microphone switch:",_n)}});const te=new Set([...s.value.values()].flatMap(ge=>ge.sessionDescriptionHandler?.peerConnection?.getSenders().map(ye=>ye.track).filter(ye=>ye?.kind==="audio")??[]));oe.forEach(({previousTrack:ge})=>{te.has(ge)||ge.stop()}),L.forEach((ge,ye)=>{ge.getTracks().forEach(Ae=>{Ae!==K[ye]?.sender.track&&Ae.stop()})})}catch(te){await Promise.allSettled(oe.map(({sender:ge,previousTrack:ye})=>ge.replaceTrack(ye))),L.forEach(ge=>ge.getTracks().forEach(ye=>ye.stop())),console.warn("[SipJs] Failed to switch microphone:",te)}},J=(M,K)=>{let L=!1;const oe=M.sessionDescriptionHandler;return oe?.peerConnection&&oe.peerConnection.getSenders().forEach(te=>{te.track&&te.track.kind==="audio"&&(te.track.enabled=K,L=!0)}),L},ie=M=>{let K=!1;return l.value&&l.value.getAudioTracks().forEach(L=>{L.enabled=M,K=!0}),K},ee=(M,K)=>{const L=!(K?.isHeld||K?.isMuted),oe=J(M,L),te=ie(L);!oe&&!te&&console.warn("[SipJs] No audio tracks found to apply channel audio state")},re=M=>{for(const[K,L]of s.value.entries())if(L===M)return e.channels.value.find(oe=>oe.id===K)||null;return e.activeChannel.value||null},fe=async M=>{const K=M.sessionDescriptionHandler?.peerConnection;if(!K)return;const L=re(M),oe=!(L?.isHeld||L?.isMuted),te=K.getSenders().find(ge=>ge.track?.kind==="audio");if(te?.track){te.track.enabled=oe,L&&Ne(M,L.id);return}try{const ge=await navigator.mediaDevices.getUserMedia(de(!1));if(![...s.value.values()].includes(M)){ge.getTracks().forEach(Xe=>Xe.stop());return}const[ye]=ge.getAudioTracks();if(!ye)return;ye.enabled=oe;const Ae=new MediaStream([ye]);l.value=Ae;const at=K.getSenders().find(Xe=>Xe.track===null);at?await at.replaceTrack(ye):K.addTrack(ye,Ae),ee(M,L),L&&Ne(M,L.id)}catch(ge){console.warn("[SipJs] Failed to recover outbound audio track:",ge)}},de=(M=!1,K=o.value)=>{const L={echoCancellation:{ideal:!0},noiseSuppression:{ideal:!1},autoGainControl:{ideal:!1},channelCount:1};return K&&(L.deviceId={exact:K}),{audio:L,video:M}},ce=async()=>{const M=n.value;M&&await M.register({requestDelegate:{onAccept:()=>{e.setConnected(!0),T=0},onReject:K=>{e.setConnected(!1);const L=K?.message?.statusCode;L===401||L===403||L===404||_e()}}})},se=async M=>{if(r.value)return;g&&(clearTimeout(g),g=null);const K=q;try{(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(L=>L.stop())}catch(L){console.error("Microphone permission denied",L);return}try{const L=Vr.makeURI(M.uri);if(!L)throw new Qp;m=M.earlyMedia??!1;const oe={server:M.transportOptions.server,keepAliveInterval:M.transportOptions.keepAliveInterval??30},te={uri:L,logLevel:"error",transportOptions:oe,authorizationUsername:M.authorizationUsername,authorizationPassword:M.authorizationPassword,userAgentString:My(M.appName,`SIP.js/${qw}`),reconnectionAttempts:0,delegate:{onConnect:()=>{I=Date.now()},onDisconnect:Ae=>{Vy({connectedAt:I,inCall:s.value.size>0,error:Ae}),I=null,e.setConnected(!1),Ge(),_e()},onInvite:Ae=>ue(Ae)}},ge=typeof SharedWorker<"u";let ye=ge;ge&&(te.transportConstructor=Oy,te.transportOptions={...oe,clientId:crypto.randomUUID(),connectionId:`${M.transportOptions.server}|${M.uri}|${crypto.randomUUID()}`});try{r.value=new Vr(te)}catch(Ae){if(!ge)throw Ae;ye=!1,console.warn("[SipJs] SharedWorker unavailable, using native WebSocket transport",Ae),delete te.transportConstructor,te.transportOptions=oe,r.value=new Vr(te)}try{await r.value.start(),n.value=new Go(r.value),await ce()}catch(Ae){if(!ye)throw Ae;console.warn("[SipJs] SharedWorker connection failed, retrying with native WebSocket",Ae);const at=r.value;r.value=null,n.value=null;try{await at?.stop()}catch(Xe){console.warn("[SipJs] Failed to clean up SharedWorker transport",Xe)}delete te.transportConstructor,te.transportOptions=oe,r.value=new Vr(te),await r.value.start(),n.value=new Go(r.value),await ce()}we(),B=0}catch(L){console.error("[SipJs] Failed to initialize WSS/SIP connection",L);const oe=r.value;if(r.value=null,n.value=null,oe!==null)try{await oe.stop()}catch(te){console.warn("[SipJs] Failed to clean up after connection error",te)}!(L instanceof Qp)&&K===q&&ke(M)}},ke=M=>{if(g)return;const K=ia[Math.min(B,ia.length-1)];B++,g=setTimeout(async()=>{if(g=null,!navigator.onLine){console.log("[SipJs] Skipping initial connection retry, device is offline"),ke(M);return}console.log("[SipJs] Retrying initial connection..."),await se(M)},K)},we=()=>{v=new AbortController;const{signal:M}=v;let K=Date.now();const L=5e3,oe=(wt=1e3)=>{S&&clearTimeout(S),S=setTimeout(async()=>{S=null,await Ve()},wt)},te=()=>{if(document.visibilityState==="visible"){je();const wt=Date.now()-K;wt>L?(console.log(`[SipJs] Device was suspended for ${Math.round(wt/1e3)}s, reconnecting...`),oe(1500)):oe(500)}K=Date.now()},ge=()=>{console.log("[SipJs] Network online, reconnecting..."),oe(1e3)},ye=()=>{console.log("[SipJs] Network offline"),e.setConnected(!1),S&&(clearTimeout(S),S=null)},Ae=()=>{b=setInterval(()=>{const wt=Date.now(),Kn=wt-K;Kn>3e4&&(console.log(`[SipJs] Heartbeat drift detected (${Math.round(Kn/1e3)}s), device may have woken from sleep`),oe(1500)),K=wt},1e3)},at=()=>{console.log("[SipJs] Page frozen"),b&&(clearInterval(b),b=null)},Xe=()=>{console.log("[SipJs] Page resumed"),je(),K=Date.now(),Ae(),oe(1e3)};document.addEventListener("visibilitychange",te,{signal:M}),window.addEventListener("online",ge,{signal:M}),window.addEventListener("offline",ye,{signal:M}),document.addEventListener("freeze",at,{signal:M}),document.addEventListener("resume",Xe,{signal:M}),Ae(),Me()},_e=()=>{if(y||!r.value)return;const M=ia[Math.min(T,ia.length-1)];y=setTimeout(async()=>{if(y=null,!r.value||e.isConnected.value){T=0;return}T++,await Ve(),e.isConnected.value||_e()},M)},Me=()=>{N&&clearInterval(N),N=setInterval(()=>{r.value&&!e.isConnected.value&&_e()},zy)},Ve=async()=>{if(r.value){if(!navigator.onLine){console.log("[SipJs] Skipping reconnect, device is offline");return}if(Ky(s.value.size>0,e.isConnected.value)){console.log("[SipJs] Skipping reconnect, call in progress and registration is healthy");return}try{if(r.value.isConnected()||(console.log("[SipJs] Reconnecting..."),await r.value.reconnect()),n.value&&r.value.isConnected())try{await ce()}catch{}}catch(M){console.error("[SipJs] Reconnection failed:",M)}}},Z=async()=>{v?.abort(),v=null,S&&(clearTimeout(S),S=null),b&&(clearInterval(b),b=null),N&&(clearInterval(N),N=null),y&&(clearTimeout(y),y=null),T=0,g&&(clearTimeout(g),g=null),B=0,q++;for(const[L,oe]of s.value.entries()){let te;try{await Promise.race([Dt(L,oe),new Promise(ge=>{te=setTimeout(ge,1500)})])}finally{te&&clearTimeout(te)}}uu();const M=n.value,K=r.value;if(n.value=null,r.value=null,M)try{await M.unregister()}catch(L){console.warn("[SipJs] Unregister failed:",L)}if(K)try{await K.stop()}catch(L){console.warn("[SipJs] UserAgent stop failed:",L)}},ue=M=>{console.log("[SipJs] 📞 Llamada entrante recibida"),console.log("[SipJs] Remote Identity URI:",M.remoteIdentity.uri.toString()),console.log("[SipJs] Remote Identity URI user:",M.remoteIdentity.uri.user),console.log("[SipJs] Remote Identity displayName:",M.remoteIdentity.displayName);const K=e.channels.value.find(ge=>ge.status==="idle"&&!s.value.has(ge.id));if(!K){console.warn("[SipJs] ⚠️ No hay canales disponibles, rechazando llamada"),M.reject();return}const L=K.id;s.value.set(L,M);const oe=M.body?M.body.includes("m=video"):!1,te=Iy(M.remoteIdentity.uri.user,M.remoteIdentity.displayName);console.log("[SipJs] 📋 Caller number extraído:",te),console.log("[SipJs] 🎥 Video:",oe?"Sí":"No"),e.updateChannelState(L,{status:"incoming",remoteNumber:te,remoteDisplayName:M.remoteIdentity.displayName||void 0,hasVideo:oe}),he(M,L,"incoming",te),Ie(L,"ringing"),je(),e.setActiveChannelId(L),nc()&&bt(L,M,oe),M.stateChange.addListener(ge=>{switch(ge){case z.Terminated:Re(L,M);break;case z.Established:if(s.value.get(L)!==M)break;d.add(L),e.updateChannelState(L,{status:"connected",startTime:Date.now()}),Ie(L,"connected"),e.activeChannelId.value===L&&(Xs(M),fe(M).then(()=>Ne(M,L))),je();break}})},pe=async(M,K=!1)=>{if(!r.value)return;const L=e.activeChannelId.value;if(s.value.has(L))return;let oe=Vr.makeURI(M);if(!oe&&r.value.configuration.uri){const ye=r.value.configuration.uri.host;oe=Vr.makeURI(`sip:${M}@${ye}`)}if(!oe)return;const te=new Wo(r.value,oe,{earlyMedia:m});s.value.set(L,te),he(te,L,"outgoing",M),Ie(L,"dialing"),e.updateChannelState(L,{status:"calling",remoteNumber:M,hasVideo:K}),e.setLastDialedNumber(M),je(),te.stateChange.addListener(ye=>{switch(ye){case z.Established:if(s.value.get(L)!==te)break;d.add(L),e.channels.value.find(Ae=>Ae.id===L)?.status!=="connected"&&(e.updateChannelState(L,{status:"connected",startTime:Date.now()}),Ie(L,"connected"),Xs(te),fe(te).then(()=>Ne(te,L)),je());break;case z.Terminated:Re(L,te);break}});const ge={sessionDescriptionHandlerOptions:{constraints:de(K)},requestDelegate:{onProgress:ye=>{s.value.get(L)===te&&(ye.message.statusCode===180||ye.message.statusCode===183)&&(ye.message.body&&(e.updateChannelState(L,{hasEarlyMedia:!0}),Xs(te)),je())},onAccept:ye=>{s.value.get(L)===te&&e.channels.value.find(Ae=>Ae.id===L)?.status!=="connected"&&(d.add(L),e.updateChannelState(L,{status:"connected",startTime:Date.now()}),Ie(L,"connected"),Xs(te),fe(te).then(()=>Ne(te,L)),je())}}};try{await te.invite(ge)}catch(ye){throw Re(L,te),ye}},lt=async(M=!1)=>{const K=e.activeChannelId.value,L=s.value.get(K);if(L instanceof Ls&&L.state===z.Initial){E(),e.updateChannelState(K,{status:"connected",startTime:Date.now()}),je();for(const[te,ge]of s.value.entries())if(te!==e.activeChannelId.value&&ge.state===z.Established&&!e.channels.value.find(ye=>ye.id===te)?.isHeld)try{await Wr(ge,!0),e.updateChannelState(te,{isHeld:!0})}catch(ye){console.error(`[SipJs] Failed to hold channel ${te}:`,ye)}const oe={sessionDescriptionHandlerOptions:{constraints:de(M),iceGatheringTimeout:1e3}};try{await L.accept(oe),je()}catch(te){const ge=s.value.get(K);throw ge instanceof Ls&&ge.state===z.Initial&&(e.updateChannelState(K,{status:"incoming",startTime:void 0}),je()),te}}},Dt=async(M,K)=>{st(M,K);try{switch(K.state){case z.Initial:case z.Establishing:K instanceof Wo?await K.cancel():K instanceof Ls&&await K.reject();break;case z.Established:await K.bye();break}}catch(L){console.warn("[SipJs] Hangup signaling failed:",L)}finally{mt(K),Re(M,K)}},Wt=async()=>{const M=e.activeChannelId.value,K=s.value.get(M);K&&await Dt(M,K)},vs=()=>{const M=s.value.get(e.activeChannelId.value);if(!M)return;const K=!e.isMuted.value;e.setMuted(K),ee(M,e.channels.value.find(L=>L.id===e.activeChannelId.value))},Wr=async(M,K)=>{const L={sessionDescriptionHandlerOptions:{hold:K}};await M.invite(L)},Gt=async()=>{const M=s.value.get(e.activeChannelId.value);if(M?.state!==z.Established)return;const K=!e.isHeld.value;try{await Wr(M,K),e.setHeld(K),ee(M,e.channels.value.find(L=>L.id===e.activeChannelId.value))}catch{}},Sr=async M=>{const K=e.activeChannelId.value;if(K===M)return;const L=s.value.get(K),oe=s.value.get(M),te=e.channels.value.find(ye=>ye.id===K),ge=e.channels.value.find(ye=>ye.id===M);if(L&&L.state===z.Established&&!te?.isHeld)try{await Wr(L,!0),e.updateChannelState(K,{isHeld:!0}),ee(L,e.channels.value.find(ye=>ye.id===K))}catch{}if(e.setActiveChannelId(M),je(),oe&&oe.state===z.Established){if(ge?.isHeld)try{await Wr(oe,!1),e.updateChannelState(M,{isHeld:!1})}catch{}ee(oe,e.channels.value.find(ye=>ye.id===M)),Xs(oe)}else uu()},ka=M=>{if(!/^[0-9*#]$/.test(M))return;const K=s.value.get(e.activeChannelId.value);if(K?.state!==z.Established)return;const L=K.sessionDescriptionHandler?.peerConnection?.getSenders().find(te=>te.track?.kind==="audio")?.dtmf;if(L?.canInsertDTMF){L.insertDTMF(M,160,70);return}const oe={requestOptions:{body:{content:`Signal=${M}\r
68
+ Duration=160`,contentType:"application/dtmf-relay",contentDisposition:"signal"}}};K.info(oe)},Gi=(M,K)=>{const L=e.channels.value.find(oe=>oe.id===M);!L||L.status!=="connected"||(Xs(K),ee(K,L),fe(K),i.play().catch(()=>{}))},dT=async M=>{console.log("[SipJs] 🔄 transferCall iniciado"),console.log("[SipJs] Target:",M);const K=e.activeChannelId.value,L=s.value.get(K);if(!L)throw console.error("[SipJs] ❌ No hay sesión activa en el canal",K),new Error("No active session to transfer");if(console.log("[SipJs] Sesión encontrada - Estado:",L.state),console.log("[SipJs] Dialog ID:",L.dialog?.id),console.log("[SipJs] Call ID:",L.dialog?.callId),L.state!==z.Established)throw console.error("[SipJs] ❌ Sesión no establecida. Estado actual:",L.state),new Error(`Cannot transfer call. Call is not established (state: ${L.state})`);let oe=Vr.makeURI(M);if(!oe&&r.value?.configuration.uri){const te=r.value.configuration.uri.host;console.log("[SipJs] Construyendo URI con dominio:",te),oe=Vr.makeURI(`sip:${M}@${te}`)}if(!oe)throw console.error("[SipJs] ❌ URI de destino inválida:",M),new Error(`Invalid transfer target: ${M}`);console.log("[SipJs] 📤 URI de transferencia:",oe.toString()),console.log("[SipJs] URI scheme:",oe.scheme),console.log("[SipJs] URI user:",oe.user),console.log("[SipJs] URI host:",oe.host);try{console.log("[SipJs] 🚀 Enviando REFER..."),await L.refer(oe,{requestDelegate:{onAccept:te=>{console.log("[SipJs] ✅ Transfer REFER aceptado por el servidor (202 Accepted)"),console.log("[SipJs] Response:",te.message)},onReject:te=>{const ge=te.message.statusCode;console.error("[SipJs] ❌ Transfer REFER rechazado:",ge),console.error("[SipJs] Response completo:",te.message),Gi(K,L)}},onNotify:te=>{console.log("[SipJs] 📬 NOTIFY recibido para transferencia"),console.log("[SipJs] NOTIFY request:",te.request),te.accept();const ge=te.request.body;if(console.log("[SipJs] NOTIFY body:",ge),ge){const ye=ge.match(/SIP\/2\.0\s+(\d{3})(.*)/);if(ye&&ye[1]){const Ae=parseInt(ye[1],10),at=ye[2]?.trim()||"";if(console.log("[SipJs] 📊 Status code:",Ae),console.log("[SipJs] 📊 Status text:",at),Ae>=200&&Ae<300)console.log("[SipJs] ✅ Transferencia exitosa! Terminando sesión..."),setTimeout(()=>{L.bye().catch(Xe=>{console.warn("[SipJs] Error hanging up after successful transfer:",Xe)})},500);else if(Ae>=400){console.error("[SipJs] ❌ Transfer falló con status:",Ae,at),console.log("[SipJs] 🔄 Manteniendo la sesión activa para el usuario");const Xe={404:"Número no encontrado",486:"Número ocupado",487:"Transferencia cancelada",503:"Servicio no disponible - el destino puede estar fuera de línea"}[Ae]||`Error en transferencia (código ${Ae})`;console.warn("[SipJs] 💬",Xe),Gi(K,L)}else Ae>=100&&Ae<200&&console.log("[SipJs] 📞 Transferencia en progreso:",Ae,at)}else console.warn("[SipJs] ⚠️ No se pudo extraer el código de estado del NOTIFY body")}else console.warn("[SipJs] ⚠️ NOTIFY sin body")}}),console.log("[SipJs] ✅ REFER enviado exitosamente (promesa resuelta)")}catch(te){throw console.error("[SipJs] ❌ Error en transferCall:",te),console.error("[SipJs] Error type:",te?.constructor?.name),console.error("[SipJs] Error message:",te instanceof Error?te.message:String(te)),console.error("[SipJs] Error stack:",te instanceof Error?te.stack:"N/A"),te}},fT=async M=>{console.log("[SipJs] 🔄 startAttendedTransfer iniciado"),console.log("[SipJs] Target:",M);const K=e.activeChannelId.value,L=s.value.get(K);if(console.log("[SipJs] Canal original:",K),console.log("[SipJs] Sesión original:",L?.state),!L||L.state!==z.Established)throw console.error("[SipJs] ❌ No hay llamada establecida para transferir"),new Error("No established call to transfer");const oe=e.channels.value.find(te=>te.status==="idle");if(console.log("[SipJs] Canal de consulta encontrado:",oe?.id),!oe)throw console.error("[SipJs] ❌ No hay canales disponibles para llamada de consulta"),new Error("No available channel for consultation call");try{console.log("[SipJs] 🔇 Poniendo llamada original en hold..."),await Wr(L,!0),e.updateChannelState(K,{isHeld:!0}),console.log("[SipJs] ✅ Llamada original en hold")}catch(te){throw console.error("[SipJs] ❌ Failed to hold original call:",te),new Error("Failed to put call on hold")}console.log("[SipJs] 🔄 Cambiando al canal de consulta:",oe.id),e.setActiveChannelId(oe.id);try{console.log("[SipJs] 📞 Iniciando llamada de consulta a:",M),await pe(M,!1),console.log("[SipJs] ✅ Llamada de consulta iniciada"),e.setTransferInProgress({originalChannelId:K,consultationChannelId:oe.id,targetNumber:M}),console.log("[SipJs] 📋 Transferencia en progreso registrada")}catch(te){throw console.error("[SipJs] ❌ Failed to start consultation call:",te),console.log("[SipJs] 🔄 Volviendo al canal original y quitando hold..."),e.setActiveChannelId(K),await Wr(L,!1).catch(()=>{}),e.updateChannelState(K,{isHeld:!1}),new Error("Failed to initiate consultation call")}},pT=async()=>{console.log("[SipJs] 🔄 completeAttendedTransfer iniciado");const M=e.transferInProgress.value;if(!M)throw console.error("[SipJs] ❌ No hay transferencia en progreso"),new Error("No transfer in progress");console.log("[SipJs] Estado de transferencia:",M);const K=s.value.get(M.originalChannelId),L=s.value.get(M.consultationChannelId);if(console.log("[SipJs] Sesión original:",K?.state),console.log("[SipJs] Sesión de consulta:",L?.state),!K||!L)throw console.error("[SipJs] ❌ Falta una o ambas sesiones"),new Error("Missing session for transfer");if(L.state!==z.Established)throw console.error("[SipJs] ❌ Llamada de consulta no está establecida. Estado:",L.state),new Error("Consultation call not established");const oe=L.dialog;if(!oe)throw new Error("No dialog available for consultation session");const te=oe.callId,ge=oe.remoteTag,ye=oe.localTag;let Ae=Vr.makeURI(M.targetNumber);if(!Ae&&r.value?.configuration.uri){const Xe=r.value.configuration.uri.host;Ae=Vr.makeURI(`sip:${M.targetNumber}@${Xe}`)}if(!Ae)throw new Error("Invalid transfer target URI");const at=`${encodeURIComponent(te)}%3Bto-tag%3D${encodeURIComponent(ge)}%3Bfrom-tag%3D${encodeURIComponent(ye)}`;Ae.setHeader("Replaces",at);try{await K.refer(Ae,{onNotify:Xe=>{Xe.accept();const wt=Xe.request.body,Kn=typeof wt=="string"?wt:wt&&typeof wt=="object"&&"content"in wt?wt.content:void 0;if(Kn){const Ji=Kn.match(/SIP\/2\.0\s+(\d+)/);if(Ji&&Ji[1]){const Cr=parseInt(Ji[1]);Cr>=200&&Cr<300?setTimeout(()=>{Dt(M.originalChannelId,K),Dt(M.consultationChannelId,L),e.setTransferInProgress(null)},500):Cr>=400&&(console.error("[SipJs] Attended transfer failed with status:",Cr),e.setTransferInProgress(null))}}},requestDelegate:{onAccept:()=>{},onReject:Xe=>{console.error("[SipJs] Attended transfer REFER rejected:",Xe.message.statusCode),e.setTransferInProgress(null)}}})}catch(Xe){throw console.error("[SipJs] Attended transfer failed:",Xe),Xe}},hT=async()=>{const M=e.transferInProgress.value;if(!M)throw new Error("No transfer in progress");console.log("[SipJs] Canceling attended transfer...");const K=s.value.get(M.originalChannelId),L=s.value.get(M.consultationChannelId);if(L)try{await Dt(M.consultationChannelId,L),console.log("[SipJs] Consultation call ended")}catch(oe){console.warn("[SipJs] Error ending consultation:",oe)}if(K)try{e.setActiveChannelId(M.originalChannelId),await Wr(K,!1),e.updateChannelState(M.originalChannelId,{isHeld:!1}),console.log("[SipJs] Returned to original call")}catch(oe){console.warn("[SipJs] Error resuming original call:",oe)}e.setTransferInProgress(null)},Xs=M=>{const K=M.sessionDescriptionHandler;if(!K){console.error("[SipJs] setupRemoteMedia: no sessionDescriptionHandler");return}const L=K.remoteMediaStream;if(!L){console.error("[SipJs] setupRemoteMedia: no remoteMediaStream on SDH");return}if(a.value===L)return;i.pause(),i.srcObject=null,w?.abort(),w=new AbortController,a.value=L,l.value=K.localMediaStream??null;const oe=re(M);ee(M,oe),oe&&Ne(M,oe.id);const te=ye=>{x?.abort(),x=new AbortController;const{signal:Ae}=x,at=()=>{i.play().catch(Xe=>{Xe.name!=="AbortError"&&console.error("[SipJs] play() failed:",Xe.name,Xe.message)})};ye.addEventListener("unmute",()=>{at()},{signal:Ae}),at()};L.addEventListener("addtrack",ye=>{ye.track.kind==="audio"&&(i.srcObject=null,i.srcObject=L,te(ye.track),oe&&Ne(M,oe.id))},{signal:w.signal});const[ge]=L.getTracks();ge&&(i.srcObject=L,te(ge),oe&&Ne(M,oe.id))},uu=()=>{x?.abort(),x=null,w?.abort(),w=null,i.pause(),i.srcObject=null,a.value=null,l.value=null};return{initUserAgent:se,stop:Z,makeCall:pe,answerCall:lt,hangupCall:Wt,toggleMute:vs,toggleHold:Gt,sendDTMF:ka,transferCall:dT,startAttendedTransfer:fT,completeAttendedTransfer:pT,cancelAttendedTransfer:hT,switchChannel:Sr,extension:C,setVolume:Tt,setNotificationVolume:G,setRingtoneVolume:W,setRingtoneTone:ae,setOutputDevice:A,setInputDevice:H,remoteStream:a,localStream:l}};var eh=e=>typeof e=="boolean"?`${e}`:e===0?"0":e;const th=kp,rh=(e,t)=>r=>{var n;if(t?.variants==null)return th(e,r?.class,r?.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(l=>{const u=r?.[l],c=i?.[l];if(u===null)return null;const d=eh(u)||eh(c);return s[l][d]}),a=r&&Object.entries(r).reduce((l,u)=>{let[c,d]=u;return d===void 0||(l[c]=d),l},{});return th(e,o,t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((l,u)=>{let{class:c,className:d,...p}=u;return Object.entries(p).every(h=>{let[m,w]=h;return Array.isArray(w)?w.includes({...i,...a}[m]):{...i,...a}[m]===w})?[...l,c,d]:l},[]),r?.class,r?.className)};function Gy(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Jy(e,t,r){Gy(e,t),t.set(e,r)}function Yy(e,t,r){if(typeof e=="function"?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}function oa(e,t){return e.get(Yy(e,t))}function nh(e){return typeof e=="string"?`'${e}'`:new Zy().serialize(e)}var Zy=(function(){var e=new WeakMap;class t{constructor(){Jy(this,e,new Map)}compare(n,s){const i=typeof n,o=typeof s;return i==="string"&&o==="string"?n.localeCompare(s):i==="number"&&o==="number"?n-s:String.prototype.localeCompare.call(this.serialize(n,!0),this.serialize(s,!0))}serialize(n,s){if(n===null)return"null";switch(typeof n){case"string":return s?n:`'${n}'`;case"bigint":return`${n}n`;case"object":return this.$object(n);case"function":return this.$function(n)}return String(n)}serializeObject(n){const s=Object.prototype.toString.call(n);if(s!=="[object Object]")return this.serializeBuiltInType(s.length<10?`unknown:${s}`:s.slice(8,-1),n);const i=n.constructor,o=i===Object||i===void 0?"":i.name;if(o!==""&&globalThis[o]===i)return this.serializeBuiltInType(o,n);if(typeof n.toJSON=="function"){const a=n.toJSON();return o+(a!==null&&typeof a=="object"?this.$object(a):`(${this.serialize(a)})`)}return this.serializeObjectEntries(o,Object.entries(n))}serializeBuiltInType(n,s){const i=this["$"+n];if(i)return i.call(this,s);if(typeof s?.entries=="function")return this.serializeObjectEntries(n,s.entries());throw new Error(`Cannot serialize ${n}`)}serializeObjectEntries(n,s){const i=Array.from(s).sort((a,l)=>this.compare(a[0],l[0]));let o=`${n}{`;for(let a=0;a<i.length;a++){const[l,u]=i[a];o+=`${this.serialize(l,!0)}:${this.serialize(u)}`,a<i.length-1&&(o+=",")}return o+"}"}$object(n){let s=oa(e,this).get(n);return s===void 0&&(oa(e,this).set(n,`#${oa(e,this).size}`),s=this.serializeObject(n),oa(e,this).set(n,s)),s}$function(n){const s=Function.prototype.toString.call(n);return s.slice(-15)==="[native code] }"?`${n.name||""}()[native]`:`${n.name}(${n.length})${s.replace(/\s*\n\s*/g,"")}`}$Array(n){let s="[";for(let i=0;i<n.length;i++)s+=this.serialize(n[i]),i<n.length-1&&(s+=",");return s+"]"}$Date(n){try{return`Date(${n.toISOString()})`}catch{return"Date(null)"}}$ArrayBuffer(n){return`ArrayBuffer[${new Uint8Array(n).join(",")}]`}$Set(n){return`Set${this.$Array(Array.from(n).sort((s,i)=>this.compare(s,i)))}`}$Map(n){return this.serializeObjectEntries("Map",n.entries())}}for(const r of["Error","RegExp","URL"])t.prototype["$"+r]=function(n){return`${r}(${n})`};for(const r of["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"])t.prototype["$"+r]=function(n){return`${r}[${n.join(",")}]`};for(const r of["BigInt64Array","BigUint64Array"])t.prototype["$"+r]=function(n){return`${r}[${n.join("n,")}${n.length>0?"n":""}]`};return t})();function Xy(e,t){return e===t||nh(e)===nh(t)}function Bi(e,t=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY){return Math.min(r,Math.max(t,e))}function Pt(e,t){const r=typeof e=="string"&&!t?`${e}Context`:t,n=Symbol(r);return[o=>{const a=Vt(n,o);if(a||a===null)return a;throw new Error(`Injection \`${n.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`)},o=>(Xn(n,o),o)]}function ar(){let e=document.activeElement;if(e==null)return null;for(;e!=null&&e.shadowRoot!=null&&e.shadowRoot.activeElement!=null;)e=e.shadowRoot.activeElement;return e}function sc(e,t,r){const n=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&n.addEventListener(e,t,{once:!0}),n.dispatchEvent(s)}function ic(e){return e==null}function oc(e){return e?e.flatMap(t=>t.type===Ke?oc(t.children):[t]):[]}var[aa,xT]=Pt("ConfigProvider");function Qy(e,t){var r;const n=ft();return ct(()=>{n.value=e()},{...t,flush:(r=t?.flush)!==null&&r!==void 0?r:"sync"}),Mt(n)}function Bn(e,t){return no()?(qa(e,t),!0):!1}function eb(){const e=new Set,t=i=>{e.delete(i)};return{on:i=>{e.add(i);const o=()=>t(i);return Bn(o),{off:o}},off:t,trigger:(...i)=>Promise.all(Array.from(e).map(o=>o(...i))),clear:()=>{e.clear()}}}function tb(e){let t=!1,r;const n=Na(!0);return((...s)=>(t||(r=n.run(()=>e(...s)),t=!0),r))}var Bt=typeof window<"u"&&typeof document<"u",TT=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,rb=e=>typeof e<"u",nb=Object.prototype.toString,sb=e=>nb.call(e)==="[object Object]",pn=()=>{},ac=ib();function ib(){var e,t,r;return Bt&&!!(!((e=window)===null||e===void 0||(e=e.navigator)===null||e===void 0)&&e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window)===null||t===void 0||(t=t.navigator)===null||t===void 0?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test((r=window)===null||r===void 0?void 0:r.navigator.userAgent))}function ob(...e){if(e.length!==1)return Ya(...e);const t=e[0];return typeof t=="function"?Mt(ci(()=>({get:t,set:pn}))):F(t)}function sh(e,t){function r(...n){return new Promise((s,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(s).catch(i)})}return r}var ih=e=>e();function ab(e,t={}){let r,n,s=pn;const i=l=>{clearTimeout(l),s(),s=pn};let o;return l=>{const u=$e(e),c=$e(t.maxWait);return r&&i(r),u<=0||c!==void 0&&c<=0?(n&&(i(n),n=void 0),Promise.resolve(l())):new Promise((d,p)=>{s=t.rejectOnCancel?p:d,o=l,c&&!n&&(n=setTimeout(()=>{r&&i(r),n=void 0,d(o())},c)),r=setTimeout(()=>{n&&i(n),n=void 0,d(l())},u)})}}function lb(e=ih,t={}){const{initialState:r="active"}=t,n=ob(r==="active");function s(){n.value=!1}function i(){n.value=!0}return{isActive:Mt(n),pause:s,resume:i,eventFilter:(...a)=>{n.value&&e(...a)}}}function lc(e){return Array.isArray(e)?e:[e]}function oh(e){const t=Object.create(null);return(r=>t[r]||(t[r]=e(r)))}var cb=/\B([A-Z])/g,ET=oh(e=>e.replace(cb,"-$1").toLowerCase()),ub=/-(\w)/g,AT=oh(e=>e.replace(ub,(t,r)=>r?r.toUpperCase():""));function ah(e){return e||gt()}function db(e){if(!Bt)return e;let t=0,r,n;const s=()=>{t-=1,n&&t<=0&&(n.stop(),r=void 0,n=void 0)};return((...i)=>(t+=1,n||(n=Na(!0),r=n.run(()=>e(...i))),Bn(s),r))}function fb(e){return Qr(rt(e)?new Proxy({},{get(t,r,n){return f(Reflect.get(e.value,r,n))},set(t,r,n){return rt(e.value[r])&&!rt(n)?e.value[r].value=n:e.value[r]=n,!0},deleteProperty(t,r){return Reflect.deleteProperty(e.value,r)},has(t,r){return Reflect.has(e.value,r)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}}):e)}function pb(e){return fb(V(e))}function zt(e,...t){const r=t.flat(),n=r[0];return pb(()=>Object.fromEntries(typeof n=="function"?Object.entries(Nt(e)).filter(([s,i])=>!n($e(i),s)):Object.entries(Nt(e)).filter(s=>!r.includes(s[0]))))}function lh(e,t=1e4){return ci((r,n)=>{let s=$e(e),i;const o=()=>setTimeout(()=>{s=$e(e),n()},$e(t));return Bn(()=>{clearTimeout(i)}),{get(){return r(),s},set(a){s=a,n(),clearTimeout(i),i=o()}}})}function cc(e,t=200,r={}){return sh(ab(t,r),e)}function hb(e,t,r={}){const{eventFilter:n=ih,...s}=r;return He(e,sh(n,t),s)}function gb(e,t,r={}){const{eventFilter:n,initialState:s="active",...i}=r,{eventFilter:o,pause:a,resume:l,isActive:u}=lb(n,{initialState:s});return{stop:hb(e,t,{...i,eventFilter:o}),pause:a,resume:l,isActive:u}}function vb(e,t={}){if(!rt(e))return Nt(e);const r=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const n in e.value)r[n]=ci(()=>({get(){return e.value[n]},set(s){var i;if(!((i=$e(t.replaceRef))!==null&&i!==void 0)||i)if(Array.isArray(e.value)){const o=[...e.value];o[n]=s,e.value=o}else{const o={...e.value,[n]:s};Object.setPrototypeOf(o,Object.getPrototypeOf(e.value)),e.value=o}else e.value[n]=s}}));return r}function mb(e,t){ah(t)&&Ds(e,t)}function wb(e,t=!0,r){ah(r)?tt(e,r):t?e():Et(e)}function yb(e,t=1e3,r={}){const{immediate:n=!0,immediateCallback:s=!1}=r;let i=null;const o=ft(!1);function a(){i&&(clearInterval(i),i=null)}function l(){o.value=!1,a()}function u(){const c=$e(t);c<=0||(o.value=!0,s&&e(),a(),o.value&&(i=setInterval(e,c)))}return n&&Bt&&u(),(rt(t)||typeof t=="function")&&Bn(He(t,()=>{o.value&&Bt&&u()})),Bn(l),{isActive:en(o),pause:l,resume:u}}function ch(e,t,r={}){const{immediate:n=!0,immediateCallback:s=!1}=r,i=ft(!1);let o;function a(){o&&(clearTimeout(o),o=void 0)}function l(){i.value=!1,a()}function u(...c){s&&e(),a(),i.value=!0,o=setTimeout(()=>{i.value=!1,o=void 0,e(...c)},$e(t))}return n&&(i.value=!0,Bt&&u()),Bn(l),{isPending:en(i),start:u,stop:l}}function bb(e,t,r){return He(e,t,{...r,immediate:!0})}function _b(e,t,r){return He(e,t,{...r,once:!0})}var Pr=Bt?window:void 0,kT=Bt?window.document:void 0,IT=Bt?window.navigator:void 0,RT=Bt?window.location:void 0;function rr(e){var t;const r=$e(e);return(t=r?.$el)!==null&&t!==void 0?t:r}function Kt(...e){const t=(n,s,i,o)=>(n.addEventListener(s,i,o),()=>n.removeEventListener(s,i,o)),r=V(()=>{const n=lc($e(e[0])).filter(s=>s!=null);return n.every(s=>typeof s!="string")?n:void 0});return bb(()=>{var n,s;return[(n=(s=r.value)===null||s===void 0?void 0:s.map(i=>rr(i)))!==null&&n!==void 0?n:[Pr].filter(i=>i!=null),lc($e(r.value?e[1]:e[0])),lc(f(r.value?e[2]:e[1])),$e(r.value?e[3]:e[2])]},([n,s,i,o],a,l)=>{if(!n?.length||!s?.length||!i?.length)return;const u=sb(o)?{...o}:o,c=n.flatMap(d=>s.flatMap(p=>i.map(h=>t(d,p,h,u))));l(()=>{c.forEach(d=>d())})},{flush:"post"})}var uh=!1;function Sb(e,t,r={}){const{window:n=Pr,ignore:s=[],capture:i=!0,detectIframe:o=!1,controls:a=!1}=r;if(!n)return a?{stop:pn,cancel:pn,trigger:pn}:pn;if(ac&&!uh){uh=!0;const x={passive:!0};Array.from(n.document.body.children).forEach(v=>v.addEventListener("click",pn,x)),n.document.documentElement.addEventListener("click",pn,x)}let l=!0;const u=x=>$e(s).some(v=>{if(typeof v=="string")return Array.from(n.document.querySelectorAll(v)).some(S=>S===x.target||x.composedPath().includes(S));{const S=rr(v);return S&&(x.target===S||x.composedPath().includes(S))}});function c(x){const v=$e(x);return v&&v.$.subTree.shapeFlag===16}function d(x,v){const S=$e(x),b=S.$.subTree&&S.$.subTree.children;return b==null||!Array.isArray(b)?!1:b.some(y=>y.el===v.target||v.composedPath().includes(y.el))}const p=x=>{const v=rr(e);if(x.target!=null&&!(!(v instanceof Element)&&c(e)&&d(e,x))&&!(!v||v===x.target||x.composedPath().includes(v))){if("detail"in x&&x.detail===0&&(l=!u(x)),!l){l=!0;return}t(x)}};let h=!1;const m=[Kt(n,"click",x=>{h||(h=!0,setTimeout(()=>{h=!1},0),p(x))},{passive:!0,capture:i}),Kt(n,"pointerdown",x=>{const v=rr(e);l=!u(x)&&!!(v&&!x.composedPath().includes(v))},{passive:!0}),o&&Kt(n,"blur",x=>{setTimeout(()=>{var v;const S=rr(e);((v=n.document.activeElement)===null||v===void 0?void 0:v.tagName)==="IFRAME"&&!S?.contains(n.document.activeElement)&&t(x)},0)},{passive:!0})].filter(Boolean),w=()=>m.forEach(x=>x());return a?{stop:w,cancel:()=>{l=!1},trigger:x=>{l=!0,p(x),l=!1}}:w}function uc(){const e=ft(!1),t=gt();return t&&tt(()=>{e.value=!0},t),e}function dh(e){const t=uc();return V(()=>(t.value,!!e()))}function Cb(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function xb(...e){let t,r,n={};e.length===3?(t=e[0],r=e[1],n=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,r=e[0],n=e[1]):(t=e[0],r=e[1]):(t=!0,r=e[0]);const{target:s=Pr,eventName:i="keydown",passive:o=!1,dedupe:a=!1}=n,l=Cb(t);return Kt(s,i,c=>{c.repeat&&$e(a)||l(c)&&r(c)},o)}function Tb(e){return JSON.parse(JSON.stringify(e))}var la=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ca="__vueuse_ssr_handlers__",Eb=Ab();function Ab(){return ca in la||(la[ca]=la[ca]||{}),la[ca]}function kb(e,t){return Eb[e]||t}function Ib(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}var Rb={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},fh="vueuse-storage";function cs(e,t,r,n={}){var s;const{flush:i="pre",deep:o=!0,listenToStorageChanges:a=!0,writeDefaults:l=!0,mergeDefaults:u=!1,shallow:c,window:d=Pr,eventFilter:p,onError:h=P=>{console.error(P)},initOnMounted:m}=n,w=(c?ft:F)(typeof t=="function"?t():t),x=V(()=>$e(e));if(!r)try{r=kb("getDefaultStorage",()=>Pr?.localStorage)()}catch(P){h(P)}if(!r)return w;const v=$e(t),S=Ib(v),b=(s=n.serializer)!==null&&s!==void 0?s:Rb[S],{pause:y,resume:T}=gb(w,P=>q(P),{flush:i,deep:o,eventFilter:p});He(x,()=>_(),{flush:i});let I=!1;const N=P=>{m&&!I||_(P)},g=P=>{m&&!I||E(P)};d&&a&&(r instanceof Storage?Kt(d,"storage",N,{passive:!0}):Kt(d,fh,g)),m?wb(()=>{I=!0,_()}):_();function B(P,R){if(d){const D={key:x.value,oldValue:P,newValue:R,storageArea:r};d.dispatchEvent(r instanceof Storage?new StorageEvent("storage",D):new CustomEvent(fh,{detail:D}))}}function q(P){try{const R=r.getItem(x.value);if(P==null)B(R,null),r.removeItem(x.value);else{const D=b.write(P);R!==D&&(r.setItem(x.value,D),B(R,D))}}catch(R){h(R)}}function C(P){const R=P?P.newValue:r.getItem(x.value);if(R==null)return l&&v!=null&&r.setItem(x.value,b.write(v)),v;if(!P&&u){const D=b.read(R);return typeof u=="function"?u(D,v):S==="object"&&!Array.isArray(D)?{...v,...D}:D}else return typeof R!="string"?R:b.read(R)}function _(P){if(!(P&&P.storageArea!==r)){if(P&&P.key==null){w.value=v;return}if(!(P&&P.key!==x.value)){y();try{const R=b.write(w.value);(P===void 0||P?.newValue!==R)&&(w.value=C(P))}catch(R){h(R)}finally{P?Et(T):T()}}}}function E(P){_(P.detail)}return w}var ua={speed:2,margin:30,direction:"both"};function $b(e){e.scrollLeft>e.scrollWidth-e.clientWidth&&(e.scrollLeft=Math.max(0,e.scrollWidth-e.clientWidth)),e.scrollTop>e.scrollHeight-e.clientHeight&&(e.scrollTop=Math.max(0,e.scrollHeight-e.clientHeight))}function Pb(e,t={}){var r,n,s,i;const{pointerTypes:o,preventDefault:a,stopPropagation:l,exact:u,onMove:c,onEnd:d,onStart:p,initialValue:h,axis:m="both",draggingElement:w=Pr,containerElement:x,handle:v=e,buttons:S=[0],restrictInView:b,autoScroll:y=!1}=t,T=F((r=$e(h))!==null&&r!==void 0?r:{x:0,y:0}),I=F(),N=le=>o?o.includes(le.pointerType):!0,g=le=>{$e(a)&&le.preventDefault(),$e(l)&&le.stopPropagation()},B=$e(y),q=typeof B=="object"?{speed:(n=$e(B.speed))!==null&&n!==void 0?n:ua.speed,margin:(s=$e(B.margin))!==null&&s!==void 0?s:ua.margin,direction:(i=B.direction)!==null&&i!==void 0?i:ua.direction}:ua,C=le=>typeof le=="number"?[le,le]:[le.x,le.y],_=(le,he,Ie)=>{const{clientWidth:Ne,clientHeight:De,scrollLeft:Re,scrollTop:st,scrollWidth:mt,scrollHeight:Ge}=le,[je,bt]=C(q.margin),[Tt,A]=C(q.speed);let H=0,J=0;(q.direction==="x"||q.direction==="both")&&(Ie.x<je&&Re>0?H=-Tt:Ie.x+he.width>Ne-je&&Re<mt-Ne&&(H=Tt)),(q.direction==="y"||q.direction==="both")&&(Ie.y<bt&&st>0?J=-A:Ie.y+he.height>De-bt&&st<Ge-De&&(J=A)),(H||J)&&le.scrollBy({left:H,top:J,behavior:"auto"})};let E=null;const P=()=>{const le=$e(x);le&&!E&&(E=setInterval(()=>{const he=$e(e).getBoundingClientRect(),{x:Ie,y:Ne}=T.value,De={x:Ie-le.scrollLeft,y:Ne-le.scrollTop};De.x>=0&&De.y>=0&&(_(le,he,De),De.x+=le.scrollLeft,De.y+=le.scrollTop,T.value=De)},1e3/60))},R=()=>{E&&(clearInterval(E),E=null)},D=(le,he,Ie,Ne)=>{const[De,Re]=typeof Ie=="number"?[Ie,Ie]:[Ie.x,Ie.y],{clientWidth:st,clientHeight:mt}=he;return le.x<De||le.x+Ne.width>st-De||le.y<Re||le.y+Ne.height>mt-Re},G=()=>{if($e(t.disabled)||!I.value)return;const le=$e(x);if(!le)return;const he=$e(e).getBoundingClientRect(),{x:Ie,y:Ne}=T.value;D({x:Ie-le.scrollLeft,y:Ne-le.scrollTop},le,q.margin,he)?P():R()};$e(y)&&He(T,G);const W=le=>{var he;if(!$e(S).includes(le.button)||$e(t.disabled)||!N(le)||$e(u)&&le.target!==$e(e))return;const Ie=$e(x),Ne=Ie==null||(he=Ie.getBoundingClientRect)===null||he===void 0?void 0:he.call(Ie),De=$e(e).getBoundingClientRect(),Re={x:le.clientX-(Ie?De.left-Ne.left+(y?0:Ie.scrollLeft):De.left),y:le.clientY-(Ie?De.top-Ne.top+(y?0:Ie.scrollTop):De.top)};p?.(Re,le)!==!1&&(I.value=Re,g(le))},ae=le=>{if($e(t.disabled)||!N(le)||!I.value)return;const he=$e(x);he instanceof HTMLElement&&$b(he);const Ie=$e(e).getBoundingClientRect();let{x:Ne,y:De}=T.value;if((m==="x"||m==="both")&&(Ne=le.clientX-I.value.x,he&&(Ne=Math.min(Math.max(0,Ne),he.scrollWidth-Ie.width))),(m==="y"||m==="both")&&(De=le.clientY-I.value.y,he&&(De=Math.min(Math.max(0,De),he.scrollHeight-Ie.height))),$e(y)&&he&&(E===null&&_(he,Ie,{x:Ne,y:De}),Ne+=he.scrollLeft,De+=he.scrollTop),he&&(b||y)){if(m!=="y"){const Re=Ne-he.scrollLeft;Re<0?Ne=he.scrollLeft:Re>he.clientWidth-Ie.width&&(Ne=he.clientWidth-Ie.width+he.scrollLeft)}if(m!=="x"){const Re=De-he.scrollTop;Re<0?De=he.scrollTop:Re>he.clientHeight-Ie.height&&(De=he.clientHeight-Ie.height+he.scrollTop)}}T.value={x:Ne,y:De},c?.(T.value,le),g(le)},Y=le=>{$e(t.disabled)||!N(le)||I.value&&(I.value=void 0,y&&R(),d?.(T.value,le),g(le))};if(Bt){const le=()=>{var he;return{capture:(he=t.capture)!==null&&he!==void 0?he:!0,passive:!$e(a)}};Kt(v,"pointerdown",W,le),Kt(w,"pointermove",ae,le),Kt(w,"pointerup",Y,le)}return{...vb(T),position:T,isDragging:V(()=>!!I.value),style:V(()=>`
69
69
  left: ${T.value.x}px;
70
70
  top: ${T.value.y}px;
71
71
  ${y?"text-wrap: nowrap;":""}
72
- `)}}function us(e,t,r={}){const{window:n=Dr,...s}=r;let i;const o=uh(()=>n&&"ResizeObserver"in n),a=()=>{i&&(i.disconnect(),i=void 0)},l=Me(V(()=>{const c=$e(e);return Array.isArray(c)?c.map(d=>tr(d)):[tr(c)]}),c=>{if(a(),o.value&&n){i=new ResizeObserver(t);for(const d of c)d&&i.observe(d,s)}},{immediate:!0,flush:"post"}),u=()=>{a(),l()};return Bn(u),{isSupported:o,stop:u}}function Tb(e={}){const{window:t=Dr}=e,r=t?.navigator,n=uh(()=>r&&"connection"in r),s=ft(!0),i=ft(!1),o=ft(void 0),a=ft(void 0),l=ft(void 0),u=ft(void 0),c=ft(void 0),d=ft(void 0),p=ft("unknown"),h=n.value&&r.connection;function m(){r&&(s.value=r.onLine,o.value=s.value?void 0:Date.now(),a.value=s.value?Date.now():void 0,h&&(l.value=h.downlink,u.value=h.downlinkMax,d.value=h.effectiveType,c.value=h.rtt,i.value=h.saveData,p.value=h.type))}const w={passive:!0};return t&&(zt(t,"offline",()=>{s.value=!1,o.value=Date.now()},w),zt(t,"online",()=>{s.value=!0,a.value=Date.now()},w)),h&&zt(h,"change",m,w),m(),{isSupported:n,isOnline:Ht(s),saveData:Ht(i),offlineAt:Ht(o),onlineAt:Ht(a),downlink:Ht(l),downlinkMax:Ht(u),effectiveType:Ht(d),rtt:Ht(c),type:Ht(p)}}var _T=[{max:6e4,value:1e3,name:"second"},{max:276e4,value:6e4,name:"minute"},{max:72e6,value:36e5,name:"hour"},{max:5184e5,value:864e5,name:"day"},{max:24192e5,value:6048e5,name:"week"},{max:28512e6,value:2592e6,name:"month"},{max:Number.POSITIVE_INFINITY,value:31536e6,name:"year"}];function ds(e,t,r,n={}){var s,i;const{clone:o=!1,passive:a=!1,eventName:l,deep:u=!1,defaultValue:c,shouldEmit:d}=n,p=gt(),h=r||p?.emit||(p==null||(s=p.$emit)===null||s===void 0?void 0:s.bind(p))||(p==null||(i=p.proxy)===null||i===void 0||(i=i.$emit)===null||i===void 0?void 0:i.bind(p?.proxy));let m=l;t||(t="modelValue"),m=m||`update:${t.toString()}`;const w=S=>o?typeof o=="function"?o(S):mb(S):S,x=()=>Gy(e[t])?w(e[t]):c,g=S=>{d?d(S)&&h(m,S):h(m,S)};if(a){const S=F(x());let b=!1;return Me(()=>e[t],y=>{b||(b=!0,S.value=w(y),Et(()=>b=!1))}),Me(S,y=>{!b&&(y!==e[t]||u)&&g(y)},{deep:u}),S}else return V({get(){return x()},set(S){g(S)}})}function dc(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function fc(e,t,r=".",n){if(!dc(t))return fc(e,{},r,n);const s=Object.assign({},t);for(const i in e){if(i==="__proto__"||i==="constructor")continue;const o=e[i];o!=null&&(n&&n(s,i,o,r)||(Array.isArray(o)&&Array.isArray(s[i])?s[i]=[...o,...s[i]]:dc(o)&&dc(s[i])?s[i]=fc(o,s[i],(r?`${r}.`:"")+i.toString(),n):s[i]=o))}return s}function pc(e){return(...t)=>t.reduce((r,n)=>fc(r,n,"",e),{})}var fh=pc(),ST=pc((e,t,r)=>{if(e[t]!==void 0&&typeof r=="function")return e[t]=r(e[t]),!0}),CT=pc((e,t,r)=>{if(Array.isArray(e[t])&&typeof r=="function")return e[t]=r(e[t]),!0}),Eb=nb(()=>{const e=F(new Map),t=F(),r=V(()=>{for(const o of e.value.values())if(o)return!0;return!1}),n=oa({scrollBody:F(!0)});let s=null;const i=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.documentElement.style.removeProperty("--scrollbar-width"),document.body.style.overflow=t.value??"",ac&&s?.(),t.value=void 0};return Me(r,(o,a)=>{if(!qt)return;if(!o){a&&i();return}t.value===void 0&&(t.value=document.body.style.overflow);const l=window.innerWidth-document.documentElement.clientWidth,u={padding:l,margin:0},c=n.scrollBody?.value?typeof n.scrollBody.value=="object"?fh({padding:n.scrollBody.value.padding===!0?l:n.scrollBody.value.padding,margin:n.scrollBody.value.margin===!0?l:n.scrollBody.value.margin},u):u:{padding:0,margin:0};l>0&&(document.body.style.paddingRight=typeof c.padding=="number"?`${c.padding}px`:String(c.padding),document.body.style.marginRight=typeof c.margin=="number"?`${c.margin}px`:String(c.margin),document.documentElement.style.setProperty("--scrollbar-width",`${l}px`),document.body.style.overflow="hidden"),ac&&(s=zt(document,"touchmove",d=>Ab(d),{passive:!1})),Et(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),e});function ph(e){const t=Math.random().toString(36).substring(2,7),r=Eb();r.value.set(t,e??!1);const n=V({get:()=>r.value.get(t)??!1,set:s=>r.value.set(t,s)});return cb(()=>{r.value.delete(t)}),n}function hh(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth<e.scrollWidth||t.overflowY==="auto"&&e.clientHeight<e.scrollHeight)return!0;{const r=e.parentNode;return!(r instanceof Element)||r.tagName==="BODY"?!1:hh(r)}}function Ab(e){const t=e||window.event,r=t.target;return r instanceof Element&&hh(r)?!1:t.touches.length>1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}function hc(e){const t=oa({dir:F("ltr")});return V(()=>e?.value||t.dir?.value||"ltr")}function ua(e){const t=gt(),r=t?.type.emits,n={};return r?.length||console.warn(`No emitted event found. Please check component: ${t?.type.__name}`),r?.forEach(s=>{n[bs(_t(s))]=(...i)=>e(s,...i)}),n}var gc=0;function kb(){ct(e=>{if(!qt)return;const t=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",t[0]??gh()),document.body.insertAdjacentElement("beforeend",t[1]??gh()),gc++,e(()=>{gc===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(r=>r.remove()),gc--})})}function gh(){const e=document.createElement("span");return e.setAttribute("data-reka-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}function vc(e){return V(()=>$e(e)?!!tr(e)?.closest("form"):!0)}function Pe(){const e=gt(),t=F(),r=V(()=>n());mi(()=>{r.value!==n()&&Fu(t)});function n(){return t.value&&"$el"in t.value&&["#text","#comment"].includes(t.value.$el.nodeName)?t.value.$el.nextElementSibling:tr(t)}const s=Object.assign({},e.exposed),i={};for(const a in e.props)Object.defineProperty(i,a,{enumerable:!0,configurable:!0,get:()=>e.props[a]});if(Object.keys(s).length>0)for(const a in s)Object.defineProperty(i,a,{enumerable:!0,configurable:!0,get:()=>s[a]});Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=i;function o(a){if(t.value=a,!!a&&(Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>a instanceof Element?a:a.$el}),!(a instanceof Element)&&!Object.prototype.hasOwnProperty.call(a,"$el"))){const l=a.$.exposed,u=Object.assign({},i);for(const c in l)Object.defineProperty(u,c,{enumerable:!0,configurable:!0,get:()=>l[c]});e.exposed=u}}return{forwardRef:o,currentRef:t,currentElement:r}}function hn(e){const t=gt(),r=Object.keys(t?.type.props??{}).reduce((s,i)=>{const o=(t?.type.props[i]).default;return o!==void 0&&(s[i]=o),s},{}),n=Ya(e);return V(()=>{const s={},i=t?.vnode.props??{};return Object.keys(i).forEach(o=>{s[_t(o)]=i[o]}),Object.keys({...r,...s}).reduce((o,a)=>(n.value[a]!==void 0&&(o[a]=n.value[a]),o),{})})}function Ur(e,t){const r=hn(e),n=t?ua(t):{};return V(()=>({...r.value,...n}))}function Ib(e,t){const r=ah(!1,300);Bn(()=>{r.value=!1});const n=F(null),s=Ky();function i(){n.value=null,r.value=!1}function o(a,l){const u=a.currentTarget,c={x:a.clientX,y:a.clientY},d=$b(c,Rb(c,u.getBoundingClientRect()),1),p=Pb(l.getBoundingClientRect());n.value=Ob([...d,...p]),r.value=!0}return ct(a=>{if(e.value&&t.value){const l=c=>o(c,t.value),u=c=>o(c,e.value);e.value.addEventListener("pointerleave",l),t.value.addEventListener("pointerleave",u),a(()=>{e.value?.removeEventListener("pointerleave",l),t.value?.removeEventListener("pointerleave",u)})}}),ct(a=>{if(n.value){const l=u=>{if(!n.value||!(u.target instanceof Element))return;const c=u.target,d={x:u.clientX,y:u.clientY},p=e.value?.contains(c)||t.value?.contains(c),h=!Db(d,n.value),m=!!c.closest("[data-grace-area-trigger]");p?i():(h||m)&&(i(),s.trigger())};e.value?.ownerDocument.addEventListener("pointermove",l),a(()=>e.value?.ownerDocument.removeEventListener("pointermove",l))}}),{isPointerInTransit:r,onPointerExit:s.on}}function Rb(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,s,i)){case i:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function $b(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function Pb(e){const{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}function Db(e,t){const{x:r,y:n}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const a=t[i].x,l=t[i].y,u=t[o].x,c=t[o].y;l>n!=c>n&&r<(u-a)*(n-l)/(c-l)+a&&(s=!s)}return s}function Ob(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),Hb(t)}function Hb(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const s=e[n];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const i=r[r.length-1],o=r[r.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var Mb=function(e){return typeof document>"u"?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Fs=new WeakMap,da=new WeakMap,fa={},mc=0,vh=function(e){return e&&(e.host||vh(e.parentNode))},Nb=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=vh(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},qb=function(e,t,r,n){var s=Nb(t,Array.isArray(e)?e:[e]);fa[r]||(fa[r]=new WeakMap);var i=fa[r],o=[],a=new Set,l=new Set(s),u=function(d){!d||a.has(d)||(a.add(d),u(d.parentNode))};s.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(p){if(a.has(p))c(p);else try{var h=p.getAttribute(n),m=h!==null&&h!=="false",w=(Fs.get(p)||0)+1,x=(i.get(p)||0)+1;Fs.set(p,w),i.set(p,x),o.push(p),w===1&&m&&da.set(p,!0),x===1&&p.setAttribute(r,"true"),m||p.setAttribute(n,"true")}catch(g){console.error("aria-hidden: cannot operate on ",p,g)}})};return c(t),a.clear(),mc++,function(){o.forEach(function(d){var p=Fs.get(d)-1,h=i.get(d)-1;Fs.set(d,p),i.set(d,h),p||(da.has(d)||d.removeAttribute(n),da.delete(d)),h||d.removeAttribute(r)}),mc--,mc||(Fs=new WeakMap,Fs=new WeakMap,da=new WeakMap,fa={})}},Bb=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=t||Mb(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live], script"))),qb(n,s,r,"aria-hidden")):function(){return null}};function mh(e){let t;Me(()=>tr(e),r=>{r?t=Bb(r):t&&t()}),Vt(()=>{t&&t()})}var Lb=0;function Vs(e,t="reka"){if(e)return e;let r;return"useId"in J0?r=dd?.():r=oa({useId:void 0}).useId?.()??`${++Lb}`,t?`${t}-${r}`:r}function wh(e){const t=F(),r=V(()=>t.value?.width??0),n=V(()=>t.value?.height??0);return tt(()=>{const s=tr(e);if(s){t.value={width:s.offsetWidth,height:s.offsetHeight};const i=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let l,u;if("borderBoxSize"in a){const c=a.borderBoxSize,d=Array.isArray(c)?c[0]:c;l=d.inlineSize,u=d.blockSize}else l=s.offsetWidth,u=s.offsetHeight;t.value={width:l,height:u}});return i.observe(s,{box:"border-box"}),()=>i.unobserve(s)}else t.value=void 0}),{width:r,height:n}}function wc(e,t){const r=F(e);function n(i){return t[r.value][i]??r.value}return{state:r,dispatch:i=>{r.value=n(i)}}}function yh(e){const t=ah("",1e3);return{search:t,handleTypeaheadSearch:(s,i)=>{if(t.value=t.value+s,e)e(s);else{const o=or(),a=i.map(d=>({...d,textValue:d.value?.textValue??d.ref.textContent?.trim()??""})),l=a.find(d=>d.ref===o),u=Vb(a.map(d=>d.textValue),t.value,l?.textValue),c=a.find(d=>d.textValue===u);return c&&c.ref.focus(),c?.ref}},resetTypeahead:()=>{t.value=""}}}function Fb(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function Vb(e,t,r){const n=t.length>1&&Array.from(t).every(a=>a===t[0])?t[0]:t,s=r?e.indexOf(r):-1;let i=Fb(e,Math.max(s,0));n.length===1&&(i=i.filter(a=>a!==r));const o=i.find(a=>a.toLowerCase().startsWith(n.toLowerCase()));return o!==r?o:void 0}function jb(e,t){const r=F({}),n=F("none"),s=F(e),i=e.value?"mounted":"unmounted";let o;const a=t.value?.ownerDocument.defaultView??Dr,{state:l,dispatch:u}=wc(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),c=w=>{if(qt){const x=new CustomEvent(w,{bubbles:!1,cancelable:!1});t.value?.dispatchEvent(x)}};Me(e,async(w,x)=>{const g=x!==w;if(await Et(),g){const S=n.value,b=pa(t.value);w?(u("MOUNT"),c("enter"),b==="none"&&c("after-enter")):b==="none"||b==="undefined"||r.value?.display==="none"?(u("UNMOUNT"),c("leave"),c("after-leave")):x&&S!==b?(u("ANIMATION_OUT"),c("leave")):(u("UNMOUNT"),c("after-leave"))}},{immediate:!0});const d=w=>{const x=pa(t.value),g=x.includes(CSS.escape(w.animationName)),S=l.value==="mounted"?"enter":"leave";if(w.target===t.value&&g&&(c(`after-${S}`),u("ANIMATION_END"),!s.value)){const b=t.value.style.animationFillMode;t.value.style.animationFillMode="forwards",o=a?.setTimeout(()=>{t.value?.style.animationFillMode==="forwards"&&(t.value.style.animationFillMode=b)})}w.target===t.value&&x==="none"&&u("ANIMATION_END")},p=w=>{w.target===t.value&&(n.value=pa(t.value))},h=Me(t,(w,x)=>{w?(r.value=getComputedStyle(w),w.addEventListener("animationstart",p),w.addEventListener("animationcancel",d),w.addEventListener("animationend",d)):(u("ANIMATION_END"),o!==void 0&&a?.clearTimeout(o),x?.removeEventListener("animationstart",p),x?.removeEventListener("animationcancel",d),x?.removeEventListener("animationend",d))},{immediate:!0}),m=Me(l,()=>{const w=pa(t.value);n.value=l.value==="mounted"?w:"none"});return Vt(()=>{h(),m()}),{isPresent:V(()=>["mounted","unmountSuspended"].includes(l.value))}}function pa(e){return e&&getComputedStyle(e).animationName||"none"}var Ln=X({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:r}){const{present:n,forceMount:s}=Mt(e),i=F(),{isPresent:o}=jb(n,i);r({present:o});let a=t.default({present:o.value});a=oc(a||[]);const l=gt();if(a&&a?.length>1){const u=l?.parent?.type.name?`<${l.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${u}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(c=>` - ${c}`).join(`
72
+ `)}}function us(e,t,r={}){const{window:n=Pr,...s}=r;let i;const o=dh(()=>n&&"ResizeObserver"in n),a=()=>{i&&(i.disconnect(),i=void 0)},l=He(V(()=>{const c=$e(e);return Array.isArray(c)?c.map(d=>rr(d)):[rr(c)]}),c=>{if(a(),o.value&&n){i=new ResizeObserver(t);for(const d of c)d&&i.observe(d,s)}},{immediate:!0,flush:"post"}),u=()=>{a(),l()};return Bn(u),{isSupported:o,stop:u}}function Db(e={}){const{window:t=Pr}=e,r=t?.navigator,n=dh(()=>r&&"connection"in r),s=ft(!0),i=ft(!1),o=ft(void 0),a=ft(void 0),l=ft(void 0),u=ft(void 0),c=ft(void 0),d=ft(void 0),p=ft("unknown"),h=n.value&&r.connection;function m(){r&&(s.value=r.onLine,o.value=s.value?void 0:Date.now(),a.value=s.value?Date.now():void 0,h&&(l.value=h.downlink,u.value=h.downlinkMax,d.value=h.effectiveType,c.value=h.rtt,i.value=h.saveData,p.value=h.type))}const w={passive:!0};return t&&(Kt(t,"offline",()=>{s.value=!1,o.value=Date.now()},w),Kt(t,"online",()=>{s.value=!0,a.value=Date.now()},w)),h&&Kt(h,"change",m,w),m(),{isSupported:n,isOnline:Mt(s),saveData:Mt(i),offlineAt:Mt(o),onlineAt:Mt(a),downlink:Mt(l),downlinkMax:Mt(u),effectiveType:Mt(d),rtt:Mt(c),type:Mt(p)}}var $T=[{max:6e4,value:1e3,name:"second"},{max:276e4,value:6e4,name:"minute"},{max:72e6,value:36e5,name:"hour"},{max:5184e5,value:864e5,name:"day"},{max:24192e5,value:6048e5,name:"week"},{max:28512e6,value:2592e6,name:"month"},{max:Number.POSITIVE_INFINITY,value:31536e6,name:"year"}];function ds(e,t,r,n={}){var s,i;const{clone:o=!1,passive:a=!1,eventName:l,deep:u=!1,defaultValue:c,shouldEmit:d}=n,p=gt(),h=r||p?.emit||(p==null||(s=p.$emit)===null||s===void 0?void 0:s.bind(p))||(p==null||(i=p.proxy)===null||i===void 0||(i=i.$emit)===null||i===void 0?void 0:i.bind(p?.proxy));let m=l;t||(t="modelValue"),m=m||`update:${t.toString()}`;const w=S=>o?typeof o=="function"?o(S):Tb(S):S,x=()=>rb(e[t])?w(e[t]):c,v=S=>{d?d(S)&&h(m,S):h(m,S)};if(a){const S=F(x());let b=!1;return He(()=>e[t],y=>{b||(b=!0,S.value=w(y),Et(()=>b=!1))}),He(S,y=>{!b&&(y!==e[t]||u)&&v(y)},{deep:u}),S}else return V({get(){return x()},set(S){v(S)}})}function dc(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function fc(e,t,r=".",n){if(!dc(t))return fc(e,{},r,n);const s=Object.assign({},t);for(const i in e){if(i==="__proto__"||i==="constructor")continue;const o=e[i];o!=null&&(n&&n(s,i,o,r)||(Array.isArray(o)&&Array.isArray(s[i])?s[i]=[...o,...s[i]]:dc(o)&&dc(s[i])?s[i]=fc(o,s[i],(r?`${r}.`:"")+i.toString(),n):s[i]=o))}return s}function pc(e){return(...t)=>t.reduce((r,n)=>fc(r,n,"",e),{})}var ph=pc(),PT=pc((e,t,r)=>{if(e[t]!==void 0&&typeof r=="function")return e[t]=r(e[t]),!0}),DT=pc((e,t,r)=>{if(Array.isArray(e[t])&&typeof r=="function")return e[t]=r(e[t]),!0}),Ob=db(()=>{const e=F(new Map),t=F(),r=V(()=>{for(const o of e.value.values())if(o)return!0;return!1}),n=aa({scrollBody:F(!0)});let s=null;const i=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.documentElement.style.removeProperty("--scrollbar-width"),document.body.style.overflow=t.value??"",ac&&s?.(),t.value=void 0};return He(r,(o,a)=>{if(!Bt)return;if(!o){a&&i();return}t.value===void 0&&(t.value=document.body.style.overflow);const l=window.innerWidth-document.documentElement.clientWidth,u={padding:l,margin:0},c=n.scrollBody?.value?typeof n.scrollBody.value=="object"?ph({padding:n.scrollBody.value.padding===!0?l:n.scrollBody.value.padding,margin:n.scrollBody.value.margin===!0?l:n.scrollBody.value.margin},u):u:{padding:0,margin:0};l>0&&(document.body.style.paddingRight=typeof c.padding=="number"?`${c.padding}px`:String(c.padding),document.body.style.marginRight=typeof c.margin=="number"?`${c.margin}px`:String(c.margin),document.documentElement.style.setProperty("--scrollbar-width",`${l}px`),document.body.style.overflow="hidden"),ac&&(s=Kt(document,"touchmove",d=>Hb(d),{passive:!1})),Et(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),e});function hh(e){const t=Math.random().toString(36).substring(2,7),r=Ob();r.value.set(t,e??!1);const n=V({get:()=>r.value.get(t)??!1,set:s=>r.value.set(t,s)});return mb(()=>{r.value.delete(t)}),n}function gh(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth<e.scrollWidth||t.overflowY==="auto"&&e.clientHeight<e.scrollHeight)return!0;{const r=e.parentNode;return!(r instanceof Element)||r.tagName==="BODY"?!1:gh(r)}}function Hb(e){const t=e||window.event,r=t.target;return r instanceof Element&&gh(r)?!1:t.touches.length>1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}function hc(e){const t=aa({dir:F("ltr")});return V(()=>e?.value||t.dir?.value||"ltr")}function da(e){const t=gt(),r=t?.type.emits,n={};return r?.length||console.warn(`No emitted event found. Please check component: ${t?.type.__name}`),r?.forEach(s=>{n[_s(_t(s))]=(...i)=>e(s,...i)}),n}var gc=0;function Mb(){ct(e=>{if(!Bt)return;const t=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",t[0]??vh()),document.body.insertAdjacentElement("beforeend",t[1]??vh()),gc++,e(()=>{gc===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(r=>r.remove()),gc--})})}function vh(){const e=document.createElement("span");return e.setAttribute("data-reka-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}function vc(e){return V(()=>$e(e)?!!rr(e)?.closest("form"):!0)}function Pe(){const e=gt(),t=F(),r=V(()=>n());wi(()=>{r.value!==n()&&Fu(t)});function n(){return t.value&&"$el"in t.value&&["#text","#comment"].includes(t.value.$el.nodeName)?t.value.$el.nextElementSibling:rr(t)}const s=Object.assign({},e.exposed),i={};for(const a in e.props)Object.defineProperty(i,a,{enumerable:!0,configurable:!0,get:()=>e.props[a]});if(Object.keys(s).length>0)for(const a in s)Object.defineProperty(i,a,{enumerable:!0,configurable:!0,get:()=>s[a]});Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=i;function o(a){if(t.value=a,!!a&&(Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>a instanceof Element?a:a.$el}),!(a instanceof Element)&&!Object.prototype.hasOwnProperty.call(a,"$el"))){const l=a.$.exposed,u=Object.assign({},i);for(const c in l)Object.defineProperty(u,c,{enumerable:!0,configurable:!0,get:()=>l[c]});e.exposed=u}}return{forwardRef:o,currentRef:t,currentElement:r}}function hn(e){const t=gt(),r=Object.keys(t?.type.props??{}).reduce((s,i)=>{const o=(t?.type.props[i]).default;return o!==void 0&&(s[i]=o),s},{}),n=Ya(e);return V(()=>{const s={},i=t?.vnode.props??{};return Object.keys(i).forEach(o=>{s[_t(o)]=i[o]}),Object.keys({...r,...s}).reduce((o,a)=>(n.value[a]!==void 0&&(o[a]=n.value[a]),o),{})})}function jr(e,t){const r=hn(e),n=t?da(t):{};return V(()=>({...r.value,...n}))}function Nb(e,t){const r=lh(!1,300);Bn(()=>{r.value=!1});const n=F(null),s=eb();function i(){n.value=null,r.value=!1}function o(a,l){const u=a.currentTarget,c={x:a.clientX,y:a.clientY},d=Bb(c,qb(c,u.getBoundingClientRect()),1),p=Lb(l.getBoundingClientRect());n.value=Vb([...d,...p]),r.value=!0}return ct(a=>{if(e.value&&t.value){const l=c=>o(c,t.value),u=c=>o(c,e.value);e.value.addEventListener("pointerleave",l),t.value.addEventListener("pointerleave",u),a(()=>{e.value?.removeEventListener("pointerleave",l),t.value?.removeEventListener("pointerleave",u)})}}),ct(a=>{if(n.value){const l=u=>{if(!n.value||!(u.target instanceof Element))return;const c=u.target,d={x:u.clientX,y:u.clientY},p=e.value?.contains(c)||t.value?.contains(c),h=!Fb(d,n.value),m=!!c.closest("[data-grace-area-trigger]");p?i():(h||m)&&(i(),s.trigger())};e.value?.ownerDocument.addEventListener("pointermove",l),a(()=>e.value?.ownerDocument.removeEventListener("pointermove",l))}}),{isPointerInTransit:r,onPointerExit:s.on}}function qb(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,s,i)){case i:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Bb(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function Lb(e){const{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}function Fb(e,t){const{x:r,y:n}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const a=t[i].x,l=t[i].y,u=t[o].x,c=t[o].y;l>n!=c>n&&r<(u-a)*(n-l)/(c-l)+a&&(s=!s)}return s}function Vb(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),jb(t)}function jb(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const s=e[n];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const i=r[r.length-1],o=r[r.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var Ub=function(e){return typeof document>"u"?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Vs=new WeakMap,fa=new WeakMap,pa={},mc=0,mh=function(e){return e&&(e.host||mh(e.parentNode))},zb=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=mh(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Kb=function(e,t,r,n){var s=zb(t,Array.isArray(e)?e:[e]);pa[r]||(pa[r]=new WeakMap);var i=pa[r],o=[],a=new Set,l=new Set(s),u=function(d){!d||a.has(d)||(a.add(d),u(d.parentNode))};s.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(p){if(a.has(p))c(p);else try{var h=p.getAttribute(n),m=h!==null&&h!=="false",w=(Vs.get(p)||0)+1,x=(i.get(p)||0)+1;Vs.set(p,w),i.set(p,x),o.push(p),w===1&&m&&fa.set(p,!0),x===1&&p.setAttribute(r,"true"),m||p.setAttribute(n,"true")}catch(v){console.error("aria-hidden: cannot operate on ",p,v)}})};return c(t),a.clear(),mc++,function(){o.forEach(function(d){var p=Vs.get(d)-1,h=i.get(d)-1;Vs.set(d,p),i.set(d,h),p||(fa.has(d)||d.removeAttribute(n),fa.delete(d)),h||d.removeAttribute(r)}),mc--,mc||(Vs=new WeakMap,Vs=new WeakMap,fa=new WeakMap,pa={})}},Wb=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=t||Ub(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live], script"))),Kb(n,s,r,"aria-hidden")):function(){return null}};function wh(e){let t;He(()=>rr(e),r=>{r?t=Wb(r):t&&t()}),jt(()=>{t&&t()})}var Gb=0;function js(e,t="reka"){if(e)return e;let r;return"useId"in Y0?r=dd?.():r=aa({useId:void 0}).useId?.()??`${++Gb}`,t?`${t}-${r}`:r}function yh(e){const t=F(),r=V(()=>t.value?.width??0),n=V(()=>t.value?.height??0);return tt(()=>{const s=rr(e);if(s){t.value={width:s.offsetWidth,height:s.offsetHeight};const i=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let l,u;if("borderBoxSize"in a){const c=a.borderBoxSize,d=Array.isArray(c)?c[0]:c;l=d.inlineSize,u=d.blockSize}else l=s.offsetWidth,u=s.offsetHeight;t.value={width:l,height:u}});return i.observe(s,{box:"border-box"}),()=>i.unobserve(s)}else t.value=void 0}),{width:r,height:n}}function wc(e,t){const r=F(e);function n(i){return t[r.value][i]??r.value}return{state:r,dispatch:i=>{r.value=n(i)}}}function bh(e){const t=lh("",1e3);return{search:t,handleTypeaheadSearch:(s,i)=>{if(t.value=t.value+s,e)e(s);else{const o=ar(),a=i.map(d=>({...d,textValue:d.value?.textValue??d.ref.textContent?.trim()??""})),l=a.find(d=>d.ref===o),u=Yb(a.map(d=>d.textValue),t.value,l?.textValue),c=a.find(d=>d.textValue===u);return c&&c.ref.focus(),c?.ref}},resetTypeahead:()=>{t.value=""}}}function Jb(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function Yb(e,t,r){const n=t.length>1&&Array.from(t).every(a=>a===t[0])?t[0]:t,s=r?e.indexOf(r):-1;let i=Jb(e,Math.max(s,0));n.length===1&&(i=i.filter(a=>a!==r));const o=i.find(a=>a.toLowerCase().startsWith(n.toLowerCase()));return o!==r?o:void 0}function Zb(e,t){const r=F({}),n=F("none"),s=F(e),i=e.value?"mounted":"unmounted";let o;const a=t.value?.ownerDocument.defaultView??Pr,{state:l,dispatch:u}=wc(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),c=w=>{if(Bt){const x=new CustomEvent(w,{bubbles:!1,cancelable:!1});t.value?.dispatchEvent(x)}};He(e,async(w,x)=>{const v=x!==w;if(await Et(),v){const S=n.value,b=ha(t.value);w?(u("MOUNT"),c("enter"),b==="none"&&c("after-enter")):b==="none"||b==="undefined"||r.value?.display==="none"?(u("UNMOUNT"),c("leave"),c("after-leave")):x&&S!==b?(u("ANIMATION_OUT"),c("leave")):(u("UNMOUNT"),c("after-leave"))}},{immediate:!0});const d=w=>{const x=ha(t.value),v=x.includes(CSS.escape(w.animationName)),S=l.value==="mounted"?"enter":"leave";if(w.target===t.value&&v&&(c(`after-${S}`),u("ANIMATION_END"),!s.value)){const b=t.value.style.animationFillMode;t.value.style.animationFillMode="forwards",o=a?.setTimeout(()=>{t.value?.style.animationFillMode==="forwards"&&(t.value.style.animationFillMode=b)})}w.target===t.value&&x==="none"&&u("ANIMATION_END")},p=w=>{w.target===t.value&&(n.value=ha(t.value))},h=He(t,(w,x)=>{w?(r.value=getComputedStyle(w),w.addEventListener("animationstart",p),w.addEventListener("animationcancel",d),w.addEventListener("animationend",d)):(u("ANIMATION_END"),o!==void 0&&a?.clearTimeout(o),x?.removeEventListener("animationstart",p),x?.removeEventListener("animationcancel",d),x?.removeEventListener("animationend",d))},{immediate:!0}),m=He(l,()=>{const w=ha(t.value);n.value=l.value==="mounted"?w:"none"});return jt(()=>{h(),m()}),{isPresent:V(()=>["mounted","unmountSuspended"].includes(l.value))}}function ha(e){return e&&getComputedStyle(e).animationName||"none"}var Ln=X({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:r}){const{present:n,forceMount:s}=Nt(e),i=F(),{isPresent:o}=Zb(n,i);r({present:o});let a=t.default({present:o.value});a=oc(a||[]);const l=gt();if(a&&a?.length>1){const u=l?.parent?.type.name?`<${l.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${u}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(c=>` - ${c}`).join(`
73
73
  `)].join(`
74
- `))}return()=>s.value||n.value||o.value?mr(t.default({present:o.value})[0],{ref:u=>{const c=tr(u);return typeof c?.hasAttribute>"u"||(c?.hasAttribute("data-reka-popper-content-wrapper")?i.value=c.firstElementChild:i.value=c),c}}):null}}),yc=X({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:r}){return()=>{if(!r.default)return null;const n=oc(r.default()),s=n.findIndex(l=>l.type!==ht);if(s===-1)return n;const i=n[s];delete i.props?.ref;const o=i.props?we(t,i.props):t,a=Rr({...i,props:{}},o);return n.length===1?a:(n[s]=a,n)}}}),Ub=["area","img","input"],We=X({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(e,{attrs:t,slots:r}){const n=e.asChild?"template":e.as;return typeof n=="string"&&Ub.includes(n)?()=>mr(n,t):n!=="template"?()=>mr(e.as,t,{default:r.default}):()=>mr(yc,t,{default:r.default})}});function bc(){const e=F();return{primitiveElement:e,currentElement:V(()=>["#text","#comment"].includes(e.value?.$el.nodeName)?e.value?.$el.nextElementSibling:tr(e))}}var[Fn,zb]=Pt("DialogRoot"),Kb=X({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1,default:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(e,{emit:t}){const r=e,n=ds(r,"open",t,{defaultValue:r.defaultOpen,passive:r.open===void 0}),s=F(),i=F(),{modal:o}=Mt(r);return zb({open:n,modal:o,openModal:()=>{n.value=!0},onOpenChange:a=>{n.value=a},onOpenToggle:()=>{n.value=!n.value},contentId:"",titleId:"",descriptionId:"",triggerElement:s,contentElement:i}),(a,l)=>ne(a.$slots,"default",{open:f(n),close:()=>n.value=!1})}}),Wb=X({__name:"DialogClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e;Pe();const r=Fn();return(n,s)=>($(),U(f(We),we(t,{type:n.as==="button"?"button":void 0,onClick:s[0]||(s[0]=i=>f(r).onOpenChange(!1))}),{default:I(()=>[ne(n.$slots,"default")]),_:3},16,["type"]))}}),Gb="dismissableLayer.pointerDownOutside",Jb="dismissableLayer.focusOutside";function bh(e,t){const r=t.closest("[data-dismissable-layer]"),n=e.dataset.dismissableLayer===""?e:e.querySelector("[data-dismissable-layer]"),s=Array.from(e.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(r&&(n===r||s.indexOf(n)<s.indexOf(r)))}function Yb(e,t,r=!0){const n=t?.value?.ownerDocument??globalThis?.document,s=F(!1),i=F(()=>{});return ct(o=>{if(!qt||!$e(r))return;const a=async u=>{const c=u.target;if(!(!t?.value||!c)){if(bh(t.value,c)){s.value=!1;return}if(u.target&&!s.value){let h=function(){sc(Gb,e,p)};var d=h;const p={originalEvent:u};u.pointerType==="touch"?(n.removeEventListener("click",i.value),i.value=h,n.addEventListener("click",i.value,{once:!0})):h()}else n.removeEventListener("click",i.value);s.value=!1}},l=window.setTimeout(()=>{n.addEventListener("pointerdown",a)},0);o(()=>{window.clearTimeout(l),n.removeEventListener("pointerdown",a),n.removeEventListener("click",i.value)})}),{onPointerDownCapture:()=>{$e(r)&&(s.value=!0)}}}function Zb(e,t,r=!0){const n=t?.value?.ownerDocument??globalThis?.document,s=F(!1);return ct(i=>{if(!qt||!$e(r))return;const o=async a=>{if(!t?.value)return;await Et(),await Et();const l=a.target;!t.value||!l||bh(t.value,l)||a.target&&!s.value&&sc(Jb,e,{originalEvent:a})};n.addEventListener("focusin",o),i(()=>n.removeEventListener("focusin",o))}),{onFocusCapture:()=>{$e(r)&&(s.value=!0)},onBlurCapture:()=>{$e(r)&&(s.value=!1)}}}var Sr=Qr({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,originalBodyPointerEvents:void 0,branches:new Set}),_c=X({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(e,{emit:t}){const r=e,n=t,{forwardRef:s,currentElement:i}=Pe(),o=V(()=>i.value?.ownerDocument??globalThis.document),a=V(()=>Sr.layersRoot),l=V(()=>i.value?Array.from(a.value).indexOf(i.value):-1),u=V(()=>Sr.layersWithOutsidePointerEventsDisabled.size>0),c=V(()=>{const h=Array.from(a.value),[m]=[...Sr.layersWithOutsidePointerEventsDisabled].slice(-1),w=h.indexOf(m);return l.value>=w}),d=Yb(async h=>{const m=[...Sr.branches].some(w=>w?.contains(h.target));!c.value||m||(n("pointerDownOutside",h),n("interactOutside",h),await Et(),h.defaultPrevented||n("dismiss"))},i),p=Zb(h=>{[...Sr.branches].some(m=>m?.contains(h.target))||(n("focusOutside",h),n("interactOutside",h),h.defaultPrevented||n("dismiss"))},i);return vb("Escape",h=>{l.value===a.value.size-1&&(n("escapeKeyDown",h),h.defaultPrevented||n("dismiss"))}),ct(h=>{i.value&&(r.disableOutsidePointerEvents&&(Sr.layersWithOutsidePointerEventsDisabled.size===0&&(Sr.originalBodyPointerEvents=o.value.body.style.pointerEvents,o.value.body.style.pointerEvents="none"),Sr.layersWithOutsidePointerEventsDisabled.add(i.value)),a.value.add(i.value),h(()=>{r.disableOutsidePointerEvents&&Sr.layersWithOutsidePointerEventsDisabled.size===1&&!ic(Sr.originalBodyPointerEvents)&&(o.value.body.style.pointerEvents=Sr.originalBodyPointerEvents)}))}),ct(h=>{h(()=>{i.value&&(a.value.delete(i.value),Sr.layersWithOutsidePointerEventsDisabled.delete(i.value))})}),(h,m)=>($(),U(f(We),{ref:f(s),"as-child":h.asChild,as:h.as,"data-dismissable-layer":"",style:St({pointerEvents:u.value?c.value?"auto":"none":void 0}),onFocusCapture:f(p).onFocusCapture,onBlurCapture:f(p).onBlurCapture,onPointerdownCapture:f(d).onPointerDownCapture},{default:I(()=>[ne(h.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),Xb=Wy(()=>F([]));function Qb(){const e=Xb();return{add(t){const r=e.value[0];t!==r&&r?.pause(),e.value=_h(e.value,t),e.value.unshift(t)},remove(t){e.value=_h(e.value,t),e.value[0]?.resume()}}}function _h(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}var Sc="focusScope.autoFocusOnMount",Cc="focusScope.autoFocusOnUnmount",Sh={bubbles:!1,cancelable:!0};function e1(e,{select:t=!1}={}){const r=or();for(const n of e)if(Vn(n,{select:t}),or()!==r)return!0}function t1(e){const t=Ch(e);return[xh(t,e),xh(t.reverse(),e)]}function Ch(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function xh(e,t){for(const r of e)if(!r1(r,{upTo:t}))return r}function r1(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function n1(e){return e instanceof HTMLInputElement&&"select"in e}function Vn(e,{select:t=!1}={}){if(e&&e.focus){const r=or();e.focus({preventScroll:!0}),e!==r&&n1(e)&&t&&e.select()}}var Th=X({__name:"FocusScope",props:{loop:{type:Boolean,required:!1,default:!1},trapped:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["mountAutoFocus","unmountAutoFocus"],setup(e,{emit:t}){const r=e,n=t,{currentRef:s,currentElement:i}=Pe(),o=F(null),a=Qb(),l=Qr({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});ct(c=>{if(!qt)return;const d=i.value;if(!r.trapped)return;function p(x){if(l.paused||!d)return;const g=x.target;d.contains(g)?o.value=g:Vn(o.value,{select:!0})}function h(x){if(l.paused||!d)return;const g=x.relatedTarget;g!==null&&(d.contains(g)||Vn(o.value,{select:!0}))}function m(x){d.contains(o.value)||Vn(d)}document.addEventListener("focusin",p),document.addEventListener("focusout",h);const w=new MutationObserver(m);d&&w.observe(d,{childList:!0,subtree:!0}),c(()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",h),w.disconnect()})}),ct(async c=>{const d=i.value;if(await Et(),!d)return;a.add(l);const p=or();if(!d.contains(p)){const h=new CustomEvent(Sc,Sh);d.addEventListener(Sc,m=>n("mountAutoFocus",m)),d.dispatchEvent(h),h.defaultPrevented||(e1(Ch(d),{select:!0}),or()===p&&Vn(d))}c(()=>{d.removeEventListener(Sc,w=>n("mountAutoFocus",w));const h=new CustomEvent(Cc,Sh),m=w=>{n("unmountAutoFocus",w)};d.addEventListener(Cc,m),d.dispatchEvent(h),setTimeout(()=>{h.defaultPrevented||Vn(p??document.body,{select:!0}),d.removeEventListener(Cc,m),a.remove(l)},0)})});function u(c){if(!r.loop&&!r.trapped||l.paused)return;const d=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,p=or();if(d&&p){const h=c.currentTarget,[m,w]=t1(h);m&&w?!c.shiftKey&&p===w?(c.preventDefault(),r.loop&&Vn(m,{select:!0})):c.shiftKey&&p===m&&(c.preventDefault(),r.loop&&Vn(w,{select:!0})):p===h&&c.preventDefault()}}return(c,d)=>($(),U(f(We),{ref_key:"currentRef",ref:s,tabindex:"-1","as-child":c.asChild,as:c.as,onKeydown:u},{default:I(()=>[ne(c.$slots,"default")]),_:3},8,["as-child","as"]))}}),Eh=["Enter"," "],s1=["ArrowDown","PageUp","Home"],i1=["ArrowUp","PageDown","End"],xT=[...s1,...i1],TT={ltr:[...Eh,"ArrowRight"],rtl:[...Eh,"ArrowLeft"]};function o1(e){return e?"open":"closed"}function Ah(e){const t=or();for(const r of e)if(r===t||(r.focus(),or()!==t))return}var kh=X({__name:"DialogContentImpl",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=e,n=t,s=Fn(),{forwardRef:i,currentElement:o}=Pe();return s.titleId||(s.titleId=Vs(void 0,"reka-dialog-title")),s.descriptionId||(s.descriptionId=Vs(void 0,"reka-dialog-description")),tt(()=>{s.contentElement=o,or()!==document.body&&(s.triggerElement.value=or())}),(a,l)=>($(),U(f(Th),{"as-child":"",loop:"",trapped:r.trapFocus,onMountAutoFocus:l[5]||(l[5]=u=>n("openAutoFocus",u)),onUnmountAutoFocus:l[6]||(l[6]=u=>n("closeAutoFocus",u))},{default:I(()=>[O(f(_c),we({id:f(s).contentId,ref:f(i),as:a.as,"as-child":a.asChild,"disable-outside-pointer-events":a.disableOutsidePointerEvents,role:"dialog","aria-describedby":f(s).descriptionId,"aria-labelledby":f(s).titleId,"data-state":f(o1)(f(s).open.value)},a.$attrs,{onDismiss:l[0]||(l[0]=u=>f(s).onOpenChange(!1)),onEscapeKeyDown:l[1]||(l[1]=u=>n("escapeKeyDown",u)),onFocusOutside:l[2]||(l[2]=u=>n("focusOutside",u)),onInteractOutside:l[3]||(l[3]=u=>n("interactOutside",u)),onPointerDownOutside:l[4]||(l[4]=u=>n("pointerDownOutside",u))}),{default:I(()=>[ne(a.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),a1=X({__name:"DialogContentModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=e,n=t,s=Fn(),i=ua(n),{forwardRef:o,currentElement:a}=Pe();return mh(a),(l,u)=>($(),U(kh,we({...r,...f(i)},{ref:f(o),"trap-focus":f(s).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:u[0]||(u[0]=c=>{c.defaultPrevented||(c.preventDefault(),f(s).triggerElement.value?.focus())}),onPointerDownOutside:u[1]||(u[1]=c=>{const d=c.detail.originalEvent,p=d.button===0&&d.ctrlKey===!0;(d.button===2||p)&&c.preventDefault()}),onFocusOutside:u[2]||(u[2]=c=>{c.preventDefault()})}),{default:I(()=>[ne(l.$slots,"default")]),_:3},16,["trap-focus"]))}}),l1=X({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=e,n=ua(t);Pe();const s=Fn(),i=F(!1),o=F(!1);return(a,l)=>($(),U(kh,we({...r,...f(n)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:l[0]||(l[0]=u=>{u.defaultPrevented||(i.value||f(s).triggerElement.value?.focus(),u.preventDefault()),i.value=!1,o.value=!1}),onInteractOutside:l[1]||(l[1]=u=>{u.defaultPrevented||(i.value=!0,u.detail.originalEvent.type==="pointerdown"&&(o.value=!0));const c=u.target;f(s).triggerElement.value?.contains(c)&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&o.value&&u.preventDefault()})}),{default:I(()=>[ne(a.$slots,"default")]),_:3},16))}}),c1=X({__name:"DialogContent",props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=e,n=t,s=Fn(),i=ua(n),{forwardRef:o}=Pe();return(a,l)=>($(),U(f(Ln),{present:a.forceMount||f(s).open.value},{default:I(()=>[f(s).modal.value?($(),U(a1,we({key:0,ref:f(o)},{...r,...f(i),...a.$attrs}),{default:I(()=>[ne(a.$slots,"default")]),_:3},16)):($(),U(l1,we({key:1,ref:f(o)},{...r,...f(i),...a.$attrs}),{default:I(()=>[ne(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),u1=X({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=Fn();return ph(!0),Pe(),(r,n)=>($(),U(f(We),{as:r.as,"as-child":r.asChild,"data-state":f(t).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:I(()=>[ne(r.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),d1=X({__name:"DialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=Fn(),{forwardRef:r}=Pe();return(n,s)=>f(t)?.modal.value?($(),U(f(Ln),{key:0,present:n.forceMount||f(t).open.value},{default:I(()=>[O(u1,we(n.$attrs,{ref:f(r),as:n.as,"as-child":n.asChild}),{default:I(()=>[ne(n.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):Be("v-if",!0)}}),xc=X({__name:"Teleport",props:{to:{type:null,required:!1,default:"body"},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=uc();return(r,n)=>f(t)||r.forceMount?($(),U(el,{key:0,to:r.to,disabled:r.disabled,defer:r.defer},[ne(r.$slots,"default")],8,["to","disabled","defer"])):Be("v-if",!0)}}),f1=X({__name:"DialogPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=e;return(r,n)=>($(),U(f(xc),pr(rr(t)),{default:I(()=>[ne(r.$slots,"default")]),_:3},16))}}),p1=X({__name:"DialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(e){const t=e,r=Fn();return Pe(),(n,s)=>($(),U(f(We),we(t,{id:f(r).titleId}),{default:I(()=>[ne(n.$slots,"default")]),_:3},16,["id"]))}}),Ih="data-reka-collection-item";function gn(e={}){const{key:t="",isProvider:r=!1}=e,n=`${t}CollectionProvider`;let s;r?(s={collectionRef:F(),itemMap:F(new Map)},Xn(n,s)):s=Ft(n);const i=(l=!1)=>{const u=s.collectionRef.value;if(!u)return[];const c=Array.from(u.querySelectorAll(`[${Ih}]`)),d=Array.from(s.itemMap.value.values()).sort((p,h)=>c.indexOf(p.ref)-c.indexOf(h.ref));return l?d:d.filter(p=>p.ref.dataset.disabled!=="")},o=X({name:"CollectionSlot",inheritAttrs:!1,setup(l,{slots:u,attrs:c}){const{primitiveElement:d,currentElement:p}=bc();return Me(p,()=>{s.collectionRef.value=p.value}),()=>mr(yc,{ref:d,...c},u)}}),a=X({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(l,{slots:u,attrs:c}){const{primitiveElement:d,currentElement:p}=bc();return ct(h=>{if(p.value){const m=Ga(p.value);s.itemMap.value.set(m,{ref:p.value,value:l.value}),h(()=>s.itemMap.value.delete(m))}}),()=>mr(yc,{...c,[Ih]:"",ref:d},u)}});return{getItems:i,reactiveItems:V(()=>Array.from(s.itemMap.value.values())),itemMapSize:V(()=>s.itemMap.value.size),CollectionSlot:o,CollectionItem:a}}var Tc=X({__name:"VisuallyHidden",props:{feature:{type:String,required:!1,default:"focusable"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){return(t,r)=>($(),U(f(We),{as:t.as,"as-child":t.asChild,"aria-hidden":t.feature==="focusable"?"true":void 0,"data-hidden":t.feature==="fully-hidden"?"":void 0,tabindex:t.feature==="fully-hidden"?"-1":void 0,style:{position:"absolute",border:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",wordWrap:"normal",top:"-1px",left:"-1px"}},{default:I(()=>[ne(t.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}}),Rh=X({inheritAttrs:!1,__name:"VisuallyHiddenInputBubble",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(e){const t=e,{primitiveElement:r,currentElement:n}=bc();return Me(V(()=>t.checked??t.value),(s,i)=>{if(!n.value)return;const o=n.value,a=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(a,"value").set;if(l&&s!==i){const u=new Event("input",{bubbles:!0}),c=new Event("change",{bubbles:!0});l.call(o,s),o.dispatchEvent(u),o.dispatchEvent(c)}}),(s,i)=>($(),U(Tc,we({ref_key:"primitiveElement",ref:r},{...t,...s.$attrs},{as:"input"}),null,16))}}),$h=X({inheritAttrs:!1,__name:"VisuallyHiddenInput",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(e){const t=e,r=V(()=>typeof t.value=="object"&&Array.isArray(t.value)&&t.value.length===0&&t.required),n=V(()=>typeof t.value=="string"||typeof t.value=="number"||typeof t.value=="boolean"||t.value===null||t.value===void 0?[{name:t.name,value:t.value}]:typeof t.value=="object"&&Array.isArray(t.value)?t.value.flatMap((s,i)=>typeof s=="object"?Object.entries(s).map(([o,a])=>({name:`${t.name}[${i}][${o}]`,value:a})):{name:`${t.name}[${i}]`,value:s}):t.value!==null&&typeof t.value=="object"&&!Array.isArray(t.value)?Object.entries(t.value).map(([s,i])=>({name:`${t.name}[${s}]`,value:i})):[]);return(s,i)=>($(),Se(Ke,null,[Be(" We render single input if it's required "),r.value?($(),U(Rh,we({key:s.name},{...t,...s.$attrs},{name:s.name,value:s.value}),null,16,["name","value"])):($(!0),Se(Ke,{key:1},vr(n.value,o=>($(),U(Rh,we({key:o.name},{ref_for:!0},{...t,...s.$attrs},{name:o.name,value:o.value}),null,16,["name","value"]))),128))],2112))}}),[Ph,h1]=Pt("PopperRoot"),Dh=X({inheritAttrs:!1,__name:"PopperRoot",setup(e){const t=F();return h1({anchor:t,onAnchorChange:r=>t.value=r}),(r,n)=>ne(r.$slots,"default")}}),Oh=X({__name:"PopperAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:r,currentElement:n}=Pe(),s=Ph();return Xa(()=>{s.onAnchorChange(t.reference??n.value)}),(i,o)=>($(),U(f(We),{ref:f(r),as:i.as,"as-child":i.asChild},{default:I(()=>[ne(i.$slots,"default")]),_:3},8,["as","as-child"]))}}),g1={key:0,d:"M0 0L6 6L12 0"},v1={key:1,d:"M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0"},m1=X({__name:"Arrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(e){const t=e;return Pe(),(r,n)=>($(),U(f(We),we(t,{width:r.width,height:r.height,viewBox:r.asChild?void 0:"0 0 12 6",preserveAspectRatio:r.asChild?void 0:"none"}),{default:I(()=>[ne(r.$slots,"default",{},()=>[r.rounded?($(),Se("path",v1)):($(),Se("path",g1))])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}});function w1(e){return e!==null}function y1(e){return{name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:s}=t,i=s.arrow?.centerOffset!==0,o=i?0:e.arrowWidth,a=i?0:e.arrowHeight,[l,u]=Ec(r),c={start:"0%",center:"50%",end:"100%"}[u],d=(s.arrow?.x??0)+o/2,p=(s.arrow?.y??0)+a/2;let h="",m="";return l==="bottom"?(h=i?c:`${d}px`,m=`${-a}px`):l==="top"?(h=i?c:`${d}px`,m=`${n.floating.height+a}px`):l==="right"?(h=`${-a}px`,m=i?c:`${p}px`):l==="left"&&(h=`${n.floating.width+a}px`,m=i?c:`${p}px`),{data:{x:h,y:m}}}}}function Ec(e){const[t,r="center"]=e.split("-");return[t,r]}var b1=["top","right","bottom","left"],jn=Math.min,ar=Math.max,ha=Math.round,ga=Math.floor,zr=e=>({x:e,y:e}),_1={left:"right",right:"left",bottom:"top",top:"bottom"};function Ac(e,t,r){return ar(e,jn(t,r))}function vn(e,t){return typeof e=="function"?e(t):e}function mn(e){return e.split("-")[0]}function js(e){return e.split("-")[1]}function kc(e){return e==="x"?"y":"x"}function Ic(e){return e==="y"?"height":"width"}function Kr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Rc(e){return kc(Kr(e))}function S1(e,t,r){r===void 0&&(r=!1);const n=js(e),s=Rc(e),i=Ic(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=va(o)),[o,va(o)]}function C1(e){const t=va(e);return[$c(e),t,$c(t)]}function $c(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Hh=["left","right"],Mh=["right","left"],x1=["top","bottom"],T1=["bottom","top"];function E1(e,t,r){switch(e){case"top":case"bottom":return r?t?Mh:Hh:t?Hh:Mh;case"left":case"right":return t?x1:T1;default:return[]}}function A1(e,t,r,n){const s=js(e);let i=E1(mn(e),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map($c)))),i}function va(e){const t=mn(e);return _1[t]+e.slice(t.length)}function k1(e){return{top:0,right:0,bottom:0,left:0,...e}}function Nh(e){return typeof e!="number"?k1(e):{top:e,right:e,bottom:e,left:e}}function ma(e){const{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function qh(e,t,r){let{reference:n,floating:s}=e;const i=Kr(t),o=Rc(t),a=Ic(o),l=mn(t),u=i==="y",c=n.x+n.width/2-s.width/2,d=n.y+n.height/2-s.height/2,p=n[a]/2-s[a]/2;let h;switch(l){case"top":h={x:c,y:n.y-s.height};break;case"bottom":h={x:c,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:d};break;case"left":h={x:n.x-s.width,y:d};break;default:h={x:n.x,y:n.y}}switch(js(t)){case"start":h[o]-=p*(r&&u?-1:1);break;case"end":h[o]+=p*(r&&u?-1:1);break}return h}async function I1(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=vn(t,e),m=Nh(h),w=a[p?d==="floating"?"reference":"floating":d],x=ma(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(w)))==null||r?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),g=d==="floating"?{x:n,y:s,width:o.floating.width,height:o.floating.height}:o.reference,S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),b=await(i.isElement==null?void 0:i.isElement(S))?await(i.getScale==null?void 0:i.getScale(S))||{x:1,y:1}:{x:1,y:1},y=ma(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:S,strategy:l}):g);return{top:(x.top-y.top+m.top)/b.y,bottom:(y.bottom-x.bottom+m.bottom)/b.y,left:(x.left-y.left+m.left)/b.x,right:(y.right-x.right+m.right)/b.x}}var R1=50,$1=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:I1},l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:c,y:d}=qh(u,n,l),p=n,h=0;const m={};for(let w=0;w<i.length;w++){const x=i[w];if(!x)continue;const{name:g,fn:S}=x,{x:b,y,data:T,reset:k}=await S({x:c,y:d,initialPlacement:n,placement:p,strategy:s,middlewareData:m,rects:u,platform:a,elements:{reference:e,floating:t}});c=b??c,d=y??d,m[g]={...m[g],...T},k&&h<R1&&(h++,typeof k=="object"&&(k.placement&&(p=k.placement),k.rects&&(u=k.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):k.rects),{x:c,y:d}=qh(u,p,l)),w=-1)}return{x:c,y:d,placement:p,strategy:s,middlewareData:m}},P1=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:u,padding:c=0}=vn(e,t)||{};if(u==null)return{};const d=Nh(c),p={x:r,y:n},h=Rc(s),m=Ic(h),w=await o.getDimensions(u),x=h==="y",g=x?"top":"left",S=x?"bottom":"right",b=x?"clientHeight":"clientWidth",y=i.reference[m]+i.reference[h]-p[h]-i.floating[m],T=p[h]-i.reference[h],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let N=k?k[b]:0;(!N||!await(o.isElement==null?void 0:o.isElement(k)))&&(N=a.floating[b]||i.floating[m]);const v=y/2-T/2,B=N/2-w[m]/2-1,q=jn(d[g],B),C=jn(d[S],B),_=q,E=N-w[m]-C,P=N/2-w[m]/2+v,R=Ac(_,P,E),D=!l.arrow&&js(s)!=null&&P!==R&&i.reference[m]/2-(P<_?q:C)-w[m]/2<0,G=D?P<_?P-_:P-E:0;return{[h]:p[h]+G,data:{[h]:R,centerOffset:P-R-G,...D&&{alignmentOffset:G}},reset:D}}}),D1=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:w=!0,...x}=vn(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const g=mn(s),S=Kr(a),b=mn(a)===a,y=await(l.isRTL==null?void 0:l.isRTL(u.floating)),T=p||(b||!w?[va(a)]:C1(a)),k=m!=="none";!p&&k&&T.push(...A1(a,w,m,y));const N=[a,...T],v=await l.detectOverflow(t,x),B=[];let q=((n=i.flip)==null?void 0:n.overflows)||[];if(c&&B.push(v[g]),d){const P=S1(s,o,y);B.push(v[P[0]],v[P[1]])}if(q=[...q,{placement:s,overflows:B}],!B.every(P=>P<=0)){var C,_;const P=(((C=i.flip)==null?void 0:C.index)||0)+1,R=N[P];if(R&&(!(d==="alignment"&&S!==Kr(R))||q.every(G=>Kr(G.placement)===S?G.overflows[0]>0:!0)))return{data:{index:P,overflows:q},reset:{placement:R}};let D=(_=q.filter(G=>G.overflows[0]<=0).sort((G,W)=>G.overflows[1]-W.overflows[1])[0])==null?void 0:_.placement;if(!D)switch(h){case"bestFit":{var E;const G=(E=q.filter(W=>{if(k){const ae=Kr(W.placement);return ae===S||ae==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(ae=>ae>0).reduce((ae,Y)=>ae+Y,0)]).sort((W,ae)=>W[1]-ae[1])[0])==null?void 0:E[0];G&&(D=G);break}case"initialPlacement":D=a;break}if(s!==D)return{reset:{placement:D}}}return{}}}};function Bh(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Lh(e){return b1.some(t=>e[t]>=0)}var O1=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:s="referenceHidden",...i}=vn(e,t);switch(s){case"referenceHidden":{const o=Bh(await n.detectOverflow(t,{...i,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Lh(o)}}}case"escaped":{const o=Bh(await n.detectOverflow(t,{...i,altBoundary:!0}),r.floating);return{data:{escapedOffsets:o,escaped:Lh(o)}}}default:return{}}}}},Fh=new Set(["left","top"]);async function H1(e,t){const{placement:r,platform:n,elements:s}=e,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=mn(r),a=js(r),l=Kr(r)==="y",u=Fh.has(o)?-1:1,c=i&&l?-1:1,d=vn(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof m=="number"&&(h=a==="end"?m*-1:m),l?{x:h*c,y:p*u}:{x:p*u,y:h*c}}var M1=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:i,placement:o,middlewareData:a}=t,l=await H1(t,e);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},N1=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s,platform:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:g=>{let{x:S,y:b}=g;return{x:S,y:b}}},...u}=vn(e,t),c={x:r,y:n},d=await i.detectOverflow(t,u),p=Kr(mn(s)),h=kc(p);let m=c[h],w=c[p];if(o){const g=h==="y"?"top":"left",S=h==="y"?"bottom":"right",b=m+d[g],y=m-d[S];m=Ac(b,m,y)}if(a){const g=p==="y"?"top":"left",S=p==="y"?"bottom":"right",b=w+d[g],y=w-d[S];w=Ac(b,w,y)}const x=l.fn({...t,[h]:m,[p]:w});return{...x,data:{x:x.x-r,y:x.y-n,enabled:{[h]:o,[p]:a}}}}}},q1=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=vn(e,t),c={x:r,y:n},d=Kr(s),p=kc(d);let h=c[p],m=c[d];const w=vn(a,t),x=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const b=p==="y"?"height":"width",y=i.reference[p]-i.floating[b]+x.mainAxis,T=i.reference[p]+i.reference[b]-x.mainAxis;h<y?h=y:h>T&&(h=T)}if(u){var g,S;const b=p==="y"?"width":"height",y=Fh.has(mn(s)),T=i.reference[d]-i.floating[b]+(y&&((g=o.offset)==null?void 0:g[d])||0)+(y?0:x.crossAxis),k=i.reference[d]+i.reference[b]+(y?0:((S=o.offset)==null?void 0:S[d])||0)-(y?x.crossAxis:0);m<T?m=T:m>k&&(m=k)}return{[p]:h,[d]:m}}}},B1=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:i,platform:o,elements:a}=t,{apply:l=()=>{},...u}=vn(e,t),c=await o.detectOverflow(t,u),d=mn(s),p=js(s),h=Kr(s)==="y",{width:m,height:w}=i.floating;let x,g;d==="top"||d==="bottom"?(x=d,g=p===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(g=d,x=p==="end"?"top":"bottom");const S=w-c.top-c.bottom,b=m-c.left-c.right,y=jn(w-c[x],S),T=jn(m-c[g],b),k=!t.middlewareData.shift;let N=y,v=T;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(v=b),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(N=S),k&&!p){const q=ar(c.left,0),C=ar(c.right,0),_=ar(c.top,0),E=ar(c.bottom,0);h?v=m-2*(q!==0||C!==0?q+C:ar(c.left,c.right)):N=w-2*(_!==0||E!==0?_+E:ar(c.top,c.bottom))}await l({...t,availableWidth:v,availableHeight:N});const B=await o.getDimensions(a.floating);return m!==B.width||w!==B.height?{reset:{rects:!0}}:{}}}};function wa(){return typeof window<"u"}function fs(e){return Pc(e)?(e.nodeName||"").toLowerCase():"#document"}function lr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Wr(e){var t;return(t=(Pc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Pc(e){return wa()?e instanceof Node||e instanceof lr(e).Node:!1}function Or(e){return wa()?e instanceof Element||e instanceof lr(e).Element:!1}function wn(e){return wa()?e instanceof HTMLElement||e instanceof lr(e).HTMLElement:!1}function Vh(e){return!wa()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof lr(e).ShadowRoot}function Bi(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=Hr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&s!=="inline"&&s!=="contents"}function L1(e){return/^(table|td|th)$/.test(fs(e))}function ya(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var F1=/transform|translate|scale|rotate|perspective|filter/,V1=/paint|layout|strict|content/,ps=e=>!!e&&e!=="none",Dc;function Oc(e){const t=Or(e)?Hr(e):e;return ps(t.transform)||ps(t.translate)||ps(t.scale)||ps(t.rotate)||ps(t.perspective)||!Hc()&&(ps(t.backdropFilter)||ps(t.filter))||F1.test(t.willChange||"")||V1.test(t.contain||"")}function j1(e){let t=Un(e);for(;wn(t)&&!Us(t);){if(Oc(t))return t;if(ya(t))return null;t=Un(t)}return null}function Hc(){return Dc==null&&(Dc=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Dc}function Us(e){return/^(html|body|#document)$/.test(fs(e))}function Hr(e){return lr(e).getComputedStyle(e)}function ba(e){return Or(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Un(e){if(fs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Vh(e)&&e.host||Wr(e);return Vh(t)?t.host:t}function jh(e){const t=Un(e);return Us(t)?e.ownerDocument?e.ownerDocument.body:e.body:wn(t)&&Bi(t)?t:jh(t)}function Li(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=jh(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=lr(s);if(i){const a=Mc(o);return t.concat(o,o.visualViewport||[],Bi(s)?s:[],a&&r?Li(a):[])}else return t.concat(s,Li(s,[],r))}function Mc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Uh(e){const t=Hr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=wn(e),i=s?e.offsetWidth:r,o=s?e.offsetHeight:n,a=ha(r)!==i||ha(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function Nc(e){return Or(e)?e:e.contextElement}function zs(e){const t=Nc(e);if(!wn(t))return zr(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:i}=Uh(t);let o=(i?ha(r.width):r.width)/n,a=(i?ha(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var U1=zr(0);function zh(e){const t=lr(e);return!Hc()||!t.visualViewport?U1:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function z1(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==lr(e)?!1:t}function hs(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),i=Nc(e);let o=zr(1);t&&(n?Or(n)&&(o=zs(n)):o=zs(e));const a=z1(i,r,n)?zh(i):zr(0);let l=(s.left+a.x)/o.x,u=(s.top+a.y)/o.y,c=s.width/o.x,d=s.height/o.y;if(i){const p=lr(i),h=n&&Or(n)?lr(n):n;let m=p,w=Mc(m);for(;w&&n&&h!==m;){const x=zs(w),g=w.getBoundingClientRect(),S=Hr(w),b=g.left+(w.clientLeft+parseFloat(S.paddingLeft))*x.x,y=g.top+(w.clientTop+parseFloat(S.paddingTop))*x.y;l*=x.x,u*=x.y,c*=x.x,d*=x.y,l+=b,u+=y,m=lr(w),w=Mc(m)}}return ma({width:c,height:d,x:l,y:u})}function _a(e,t){const r=ba(e).scrollLeft;return t?t.left+r:hs(Wr(e)).left+r}function Kh(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-_a(e,r),y:r.top+t.scrollTop}}function K1(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const i=s==="fixed",o=Wr(n),a=t?ya(t.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},u=zr(1);const c=zr(0),d=wn(n);if((d||!d&&!i)&&((fs(n)!=="body"||Bi(o))&&(l=ba(n)),d)){const h=hs(n);u=zs(n),c.x=h.x+n.clientLeft,c.y=h.y+n.clientTop}const p=o&&!d&&!i?Kh(o,l):zr(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+p.x,y:r.y*u.y-l.scrollTop*u.y+c.y+p.y}}function W1(e){return Array.from(e.getClientRects())}function G1(e){const t=Wr(e),r=ba(e),n=e.ownerDocument.body,s=ar(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=ar(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+_a(e);const a=-r.scrollTop;return Hr(n).direction==="rtl"&&(o+=ar(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}var Wh=25;function J1(e,t){const r=lr(e),n=Wr(e),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const c=Hc();(!c||c&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}const u=_a(n);if(u<=0){const c=n.ownerDocument,d=c.body,p=getComputedStyle(d),h=c.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,m=Math.abs(n.clientWidth-d.clientWidth-h);m<=Wh&&(i-=m)}else u<=Wh&&(i+=u);return{width:i,height:o,x:a,y:l}}function Y1(e,t){const r=hs(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,i=wn(e)?zs(e):zr(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:s*i.x,y:n*i.y}}function Gh(e,t,r){let n;if(t==="viewport")n=J1(e,r);else if(t==="document")n=G1(Wr(e));else if(Or(t))n=Y1(t,r);else{const s=zh(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return ma(n)}function Jh(e,t){const r=Un(e);return r===t||!Or(r)||Us(r)?!1:Hr(r).position==="fixed"||Jh(r,t)}function Z1(e,t){const r=t.get(e);if(r)return r;let n=Li(e,[],!1).filter(a=>Or(a)&&fs(a)!=="body"),s=null;const i=Hr(e).position==="fixed";let o=i?Un(e):e;for(;Or(o)&&!Us(o);){const a=Hr(o),l=Oc(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&s&&(s.position==="absolute"||s.position==="fixed")||Bi(o)&&!l&&Jh(e,o))?n=n.filter(u=>u!==o):s=a,o=Un(o)}return t.set(e,n),n}function X1(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const i=[...r==="clippingAncestors"?ya(t)?[]:Z1(t,this._c):[].concat(r),n],o=Gh(t,i[0],s);let a=o.top,l=o.right,u=o.bottom,c=o.left;for(let d=1;d<i.length;d++){const p=Gh(t,i[d],s);a=ar(p.top,a),l=jn(p.right,l),u=jn(p.bottom,u),c=ar(p.left,c)}return{width:l-c,height:u-a,x:c,y:a}}function Q1(e){const{width:t,height:r}=Uh(e);return{width:t,height:r}}function e2(e,t,r){const n=wn(t),s=Wr(t),i=r==="fixed",o=hs(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=zr(0);function u(){l.x=_a(s)}if(n||!n&&!i)if((fs(t)!=="body"||Bi(s))&&(a=ba(t)),n){const d=hs(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else s&&u();i&&!n&&s&&u();const c=s&&!n&&!i?Kh(s,a):zr(0);return{x:o.left+a.scrollLeft-l.x-c.x,y:o.top+a.scrollTop-l.y-c.y,width:o.width,height:o.height}}function qc(e){return Hr(e).position==="static"}function Yh(e,t){if(!wn(e)||Hr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Wr(e)===r&&(r=r.ownerDocument.body),r}function Zh(e,t){const r=lr(e);if(ya(e))return r;if(!wn(e)){let s=Un(e);for(;s&&!Us(s);){if(Or(s)&&!qc(s))return s;s=Un(s)}return r}let n=Yh(e,t);for(;n&&L1(n)&&qc(n);)n=Yh(n,t);return n&&Us(n)&&qc(n)&&!Oc(n)?r:n||j1(e)||r}var t2=async function(e){const t=this.getOffsetParent||Zh,r=this.getDimensions,n=await r(e.floating);return{reference:e2(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function r2(e){return Hr(e).direction==="rtl"}var n2={convertOffsetParentRelativeRectToViewportRelativeRect:K1,getDocumentElement:Wr,getClippingRect:X1,getOffsetParent:Zh,getElementRects:t2,getClientRects:W1,getDimensions:Q1,getScale:zs,isElement:Or,isRTL:r2};function Xh(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function s2(e,t){let r=null,n;const s=Wr(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:c,top:d,width:p,height:h}=u;if(a||t(),!p||!h)return;const m=ga(d),w=ga(s.clientWidth-(c+p)),x=ga(s.clientHeight-(d+h)),g=ga(c),S={rootMargin:-m+"px "+-w+"px "+-x+"px "+-g+"px",threshold:ar(0,jn(1,l))||1};let b=!0;function y(T){const k=T[0].intersectionRatio;if(k!==l){if(!b)return o();k?o(!1,k):n=setTimeout(()=>{o(!1,1e-7)},1e3)}k===1&&!Xh(u,e.getBoundingClientRect())&&o(),b=!1}try{r=new IntersectionObserver(y,{...S,root:s.ownerDocument})}catch{r=new IntersectionObserver(y,S)}r.observe(e)}return o(!0),i}function i2(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=Nc(e),c=s||i?[...u?Li(u):[],...t?Li(t):[]]:[];c.forEach(g=>{s&&g.addEventListener("scroll",r,{passive:!0}),i&&g.addEventListener("resize",r)});const d=u&&a?s2(u,r):null;let p=-1,h=null;o&&(h=new ResizeObserver(g=>{let[S]=g;S&&S.target===u&&h&&t&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=h)==null||b.observe(t)})),r()}),u&&!l&&h.observe(u),t&&h.observe(t));let m,w=l?hs(e):null;l&&x();function x(){const g=hs(e);w&&!Xh(w,g)&&r(),w=g,m=requestAnimationFrame(x)}return r(),()=>{var g;c.forEach(S=>{s&&S.removeEventListener("scroll",r),i&&S.removeEventListener("resize",r)}),d?.(),(g=h)==null||g.disconnect(),h=null,l&&cancelAnimationFrame(m)}}var o2=M1,a2=N1,Qh=D1,l2=B1,c2=O1,u2=P1,d2=q1,f2=(e,t,r)=>{const n=new Map,s={platform:n2,...r},i={...s.platform,_c:n};return $1(e,t,{...s,platform:i})};function p2(e){return e!=null&&typeof e=="object"&&"$el"in e}function Bc(e){if(p2(e)){const t=e.$el;return Pc(t)&&fs(t)==="#comment"?null:t}return e}function Ks(e){return typeof e=="function"?e():f(e)}function h2(e){return{name:"arrow",options:e,fn(t){const r=Bc(Ks(e.element));return r==null?{}:u2({element:r,padding:e.padding}).fn(t)}}}function eg(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tg(e,t){const r=eg(e);return Math.round(t*r)/r}function g2(e,t,r){r===void 0&&(r={});const n=r.whileElementsMounted,s=V(()=>{var N;return(N=Ks(r.open))!=null?N:!0}),i=V(()=>Ks(r.middleware)),o=V(()=>{var N;return(N=Ks(r.placement))!=null?N:"bottom"}),a=V(()=>{var N;return(N=Ks(r.strategy))!=null?N:"absolute"}),l=V(()=>{var N;return(N=Ks(r.transform))!=null?N:!0}),u=V(()=>Bc(e.value)),c=V(()=>Bc(t.value)),d=F(0),p=F(0),h=F(a.value),m=F(o.value),w=ft({}),x=F(!1),g=V(()=>{const N={position:h.value,left:"0",top:"0"};if(!c.value)return N;const v=tg(c.value,d.value),B=tg(c.value,p.value);return l.value?{...N,transform:"translate("+v+"px, "+B+"px)",...eg(c.value)>=1.5&&{willChange:"transform"}}:{position:h.value,left:v+"px",top:B+"px"}});let S;function b(){if(u.value==null||c.value==null)return;const N=s.value;f2(u.value,c.value,{middleware:i.value,placement:o.value,strategy:a.value}).then(v=>{d.value=v.x,p.value=v.y,h.value=v.strategy,m.value=v.placement,w.value=v.middlewareData,x.value=N!==!1})}function y(){typeof S=="function"&&(S(),S=void 0)}function T(){if(y(),n===void 0){b();return}if(u.value!=null&&c.value!=null){S=n(u.value,c.value,b);return}}function k(){s.value||(x.value=!1)}return Me([i,o,a,s],b,{flush:"sync"}),Me([u,c],T,{flush:"sync"}),Me(s,k,{flush:"sync"}),ro()&&qa(y),{x:en(d),y:en(p),strategy:en(h),placement:en(m),middlewareData:en(w),isPositioned:en(x),floatingStyles:g,update:b}}var v2={side:"bottom",sideOffset:0,sideFlip:!0,align:"center",alignOffset:0,alignFlip:!0,arrowPadding:0,hideShiftedArrow:!0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[m2,w2]=Pt("PopperContent"),rg=X({inheritAttrs:!1,__name:"PopperContent",props:kd({side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...v2}),emits:["placed"],setup(e,{emit:t}){const r=e,n=t,s=Ph(),{forwardRef:i,currentElement:o}=Pe(),a=F(),l=F(),{width:u,height:c}=wh(l),d=V(()=>r.side+(r.align!=="center"?`-${r.align}`:"")),p=V(()=>typeof r.collisionPadding=="number"?r.collisionPadding:{top:0,right:0,bottom:0,left:0,...r.collisionPadding}),h=V(()=>Array.isArray(r.collisionBoundary)?r.collisionBoundary:[r.collisionBoundary]),m=V(()=>({padding:p.value,boundary:h.value.filter(w1),altBoundary:h.value.length>0})),w=V(()=>({mainAxis:r.sideFlip,crossAxis:r.alignFlip})),x=zy(()=>[o2({mainAxis:r.sideOffset+c.value,alignmentAxis:r.alignOffset}),r.prioritizePosition&&r.avoidCollisions&&Qh({...m.value,...w.value}),r.avoidCollisions&&a2({mainAxis:!0,crossAxis:!!r.prioritizePosition,limiter:r.sticky==="partial"?d2():void 0,...m.value}),!r.prioritizePosition&&r.avoidCollisions&&Qh({...m.value,...w.value}),l2({...m.value,apply:({elements:q,rects:C,availableWidth:_,availableHeight:E})=>{const{width:P,height:R}=C.reference,D=q.floating.style;D.setProperty("--reka-popper-available-width",`${_}px`),D.setProperty("--reka-popper-available-height",`${E}px`),D.setProperty("--reka-popper-anchor-width",`${P}px`),D.setProperty("--reka-popper-anchor-height",`${R}px`)}}),l.value&&h2({element:l.value,padding:r.arrowPadding}),y1({arrowWidth:u.value,arrowHeight:c.value}),r.hideWhenDetached&&c2({strategy:"referenceHidden",...m.value})]),{floatingStyles:g,placement:S,isPositioned:b,middlewareData:y,update:T}=g2(V(()=>r.reference??s.anchor.value),a,{strategy:r.positionStrategy,placement:d,whileElementsMounted:(...q)=>i2(...q,{layoutShift:!r.disableUpdateOnLayoutShift,animationFrame:r.updatePositionStrategy==="always"}),middleware:x}),k=V(()=>Ec(S.value)[0]),N=V(()=>Ec(S.value)[1]);Xa(()=>{b.value&&n("placed")});const v=V(()=>{const q=y.value.arrow?.centerOffset!==0;return r.hideShiftedArrow&&q}),B=F("");return ct(()=>{o.value&&(B.value=window.getComputedStyle(o.value).zIndex)}),w2({placedSide:k,onArrowChange:q=>l.value=q,arrowX:V(()=>y.value.arrow?.x??0),arrowY:V(()=>y.value.arrow?.y??0),shouldHideArrow:v}),(q,C)=>($(),Se("div",{ref_key:"floatingRef",ref:a,"data-reka-popper-content-wrapper":"",style:St({...f(g),transform:f(b)?f(g).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:B.value,"--reka-popper-transform-origin":[f(y).transformOrigin?.x,f(y).transformOrigin?.y].join(" "),...f(y).hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}})},[O(f(We),we({ref:f(i)},q.$attrs,{"as-child":r.asChild,as:q.as,"data-side":k.value,"data-align":N.value,style:{animation:f(b)?void 0:"none"}}),{default:I(()=>[ne(q.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4))}}),y2={top:"bottom",right:"left",bottom:"top",left:"right"},b2=X({inheritAttrs:!1,__name:"PopperArrow",props:{width:{type:Number,required:!1},height:{type:Number,required:!1},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(e){const{forwardRef:t}=Pe(),r=m2(),n=V(()=>y2[r.placedSide.value]);return(s,i)=>($(),Se("span",{ref:o=>{f(r).onArrowChange(o)},style:St({position:"absolute",left:f(r).arrowX?.value?`${f(r).arrowX?.value}px`:void 0,top:f(r).arrowY?.value?`${f(r).arrowY?.value}px`:void 0,[n.value]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[f(r).placedSide.value],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[f(r).placedSide.value],visibility:f(r).shouldHideArrow.value?"hidden":void 0})},[O(m1,we(s.$attrs,{ref:f(t),style:{display:"block"},as:s.as,"as-child":s.asChild,rounded:s.rounded,width:s.width,height:s.height}),{default:I(()=>[ne(s.$slots,"default")]),_:3},16,["as","as-child","rounded","width","height"])],4))}});function ng(e){const t=oa({nonce:F()});return V(()=>e?.value||t.nonce?.value)}function _2(e=[],t,r){const n=[...e];return n[r]=t,n.sort((s,i)=>s-i)}function sg(e,t,r){return qi(100/(r-t)*(e-t),0,100)}function S2(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function C2(e,t){if(e.length===1)return 0;const r=e.map(s=>Math.abs(s-t)),n=Math.min(...r);return r.indexOf(n)}function x2(e,t,r){const n=e/2;return(n-Lc([0,50],[0,n])(t)*r)*r}function T2(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function E2(e,t){if(t>0){const r=T2(e);return Math.min(...r)>=t}return!0}function Lc(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function A2(e){return(String(e).split(".")[1]||"").length}function k2(e,t){const r=10**t;return Math.round(e*r)/r}var ig=["PageUp","PageDown"],og=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ag={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageUp","ArrowUp","ArrowLeft"]},[lg,cg]=Pt(["SliderVertical","SliderHorizontal"]),I2=X({__name:"SliderHorizontal",props:{dir:{type:String,required:!1},min:{type:Number,required:!0},max:{type:Number,required:!0},inverted:{type:Boolean,required:!0}},emits:["slideEnd","slideStart","slideMove","homeKeyDown","endKeyDown","stepKeyDown"],setup(e,{emit:t}){const r=e,n=t,{max:s,min:i,dir:o,inverted:a}=Mt(r),{forwardRef:l,currentElement:u}=Pe(),c=Ws(),d=F(),p=F(),h=V(()=>o?.value!=="rtl"&&!a.value||o?.value!=="ltr"&&a.value);function m(w,x){const g=p.value||u.value.getBoundingClientRect(),S=[...c.thumbElements.value][c.valueIndexToChangeRef.value],b=c.thumbAlignment.value==="contain"?S.clientWidth:0;!d.value&&!x&&c.thumbAlignment.value==="contain"&&(d.value=w.clientX-S.getBoundingClientRect().left);const y=Lc([0,g.width-b],h.value?[i.value,s.value]:[s.value,i.value]);return p.value=g,y(x?w.clientX-g.left-b/2:w.clientX-g.left-(d.value??0))}return cg({startEdge:V(()=>h.value?"left":"right"),endEdge:V(()=>h.value?"right":"left"),direction:V(()=>h.value?1:-1),size:"width"}),(w,x)=>($(),U(ug,{ref:f(l),dir:f(o),"data-orientation":"horizontal",style:St({"--reka-slider-thumb-transform":!h.value&&f(c).thumbAlignment.value==="overflow"?"translateX(50%)":"translateX(-50%)"}),onSlideStart:x[0]||(x[0]=g=>{n("slideStart",m(g,!0))}),onSlideMove:x[1]||(x[1]=g=>{n("slideMove",m(g))}),onSlideEnd:x[2]||(x[2]=()=>{p.value=void 0,d.value=void 0,n("slideEnd")}),onStepKeyDown:x[3]||(x[3]=g=>{const S=h.value?"from-left":"from-right";n("stepKeyDown",g,f(ag)[S].includes(g.key)?-1:1)}),onEndKeyDown:x[4]||(x[4]=g=>n("endKeyDown",g)),onHomeKeyDown:x[5]||(x[5]=g=>n("homeKeyDown",g))},{default:I(()=>[ne(w.$slots,"default")]),_:3},8,["dir","style"]))}}),R2=X({__name:"SliderVertical",props:{min:{type:Number,required:!0},max:{type:Number,required:!0},inverted:{type:Boolean,required:!0}},emits:["slideEnd","slideStart","slideMove","homeKeyDown","endKeyDown","stepKeyDown"],setup(e,{emit:t}){const r=e,n=t,{max:s,min:i,inverted:o}=Mt(r),a=Ws(),{forwardRef:l,currentElement:u}=Pe(),c=F(),d=F(),p=V(()=>!o.value);function h(m,w){const x=d.value||u.value.getBoundingClientRect(),g=[...a.thumbElements.value][a.valueIndexToChangeRef.value],S=a.thumbAlignment.value==="contain"?g.clientHeight:0;!c.value&&!w&&a.thumbAlignment.value==="contain"&&(c.value=m.clientY-g.getBoundingClientRect().top);const b=Lc([0,x.height-S],p.value?[s.value,i.value]:[i.value,s.value]),y=w?m.clientY-x.top-S/2:m.clientY-x.top-(c.value??0);return d.value=x,b(y)}return cg({startEdge:V(()=>p.value?"bottom":"top"),endEdge:V(()=>p.value?"top":"bottom"),direction:V(()=>p.value?1:-1),size:"height"}),(m,w)=>($(),U(ug,{ref:f(l),"data-orientation":"vertical",style:St({"--reka-slider-thumb-transform":!p.value&&f(a).thumbAlignment.value==="overflow"?"translateY(-50%)":"translateY(50%)"}),onSlideStart:w[0]||(w[0]=x=>{n("slideStart",h(x,!0))}),onSlideMove:w[1]||(w[1]=x=>{n("slideMove",h(x))}),onSlideEnd:w[2]||(w[2]=()=>{d.value=void 0,c.value=void 0,n("slideEnd")}),onStepKeyDown:w[3]||(w[3]=x=>{const g=p.value?"from-bottom":"from-top";n("stepKeyDown",x,f(ag)[g].includes(x.key)?-1:1)}),onEndKeyDown:w[4]||(w[4]=x=>n("endKeyDown",x)),onHomeKeyDown:w[5]||(w[5]=x=>n("homeKeyDown",x))},{default:I(()=>[ne(m.$slots,"default")]),_:3},8,["style"]))}}),[Ws,$2]=Pt("SliderRoot"),P2=X({inheritAttrs:!1,__name:"SliderRoot",props:{defaultValue:{type:Array,required:!1,default:()=>[0]},modelValue:{type:[Array,null],required:!1},disabled:{type:Boolean,required:!1,default:!1},orientation:{type:String,required:!1,default:"horizontal"},dir:{type:String,required:!1},inverted:{type:Boolean,required:!1,default:!1},min:{type:Number,required:!1,default:0},max:{type:Number,required:!1,default:100},step:{type:Number,required:!1,default:1},minStepsBetweenThumbs:{type:Number,required:!1,default:0},thumbAlignment:{type:String,required:!1,default:"contain"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","valueCommit"],setup(e,{emit:t}){const r=e,n=t,{min:s,max:i,step:o,minStepsBetweenThumbs:a,orientation:l,disabled:u,thumbAlignment:c,dir:d}=Mt(r),p=hc(d),{forwardRef:h,currentElement:m}=Pe(),w=vc(m),{CollectionSlot:x}=gn({isProvider:!0}),g=ds(r,"modelValue",n,{defaultValue:r.defaultValue,passive:r.modelValue===void 0}),S=V(()=>Array.isArray(g.value)?[...g.value]:[]),b=F(0),y=F(S.value);function T(q){v(q,C2(S.value,q))}function k(q){v(q,b.value)}function N(){const q=y.value[b.value];S.value[b.value]!==q&&n("valueCommit",ze(S.value))}function v(q,C,{commit:_}={commit:!1}){const E=A2(o.value),P=qi(k2(Math.round((q-s.value)/o.value)*o.value+s.value,E),s.value,i.value),R=_2(S.value,P,C);if(E2(R,a.value*o.value)){b.value=R.indexOf(P);const D=String(R)!==String(g.value);D&&_&&n("valueCommit",R),D&&(B.value[b.value]?.focus(),g.value=R)}}const B=F([]);return $2({modelValue:g,currentModelValue:S,valueIndexToChangeRef:b,thumbElements:B,orientation:l,min:s,max:i,disabled:u,thumbAlignment:c}),(q,C)=>($(),U(f(x),null,{default:I(()=>[($(),U(wi(f(l)==="horizontal"?I2:R2),we(q.$attrs,{ref:f(h),"as-child":q.asChild,as:q.as,min:f(s),max:f(i),dir:f(p),inverted:q.inverted,"aria-disabled":f(u),"data-disabled":f(u)?"":void 0,onPointerdown:C[0]||(C[0]=()=>{f(u)||(y.value=S.value)}),onSlideStart:C[1]||(C[1]=_=>!f(u)&&T(_)),onSlideMove:C[2]||(C[2]=_=>!f(u)&&k(_)),onSlideEnd:C[3]||(C[3]=_=>!f(u)&&N()),onHomeKeyDown:C[4]||(C[4]=_=>!f(u)&&v(f(s),0,{commit:!0})),onEndKeyDown:C[5]||(C[5]=_=>!f(u)&&v(f(i),S.value.length-1,{commit:!0})),onStepKeyDown:C[6]||(C[6]=(_,E)=>{if(!f(u)){const P=f(ig).includes(_.key)||_.shiftKey&&f(og).includes(_.key)?10:1,R=b.value,D=S.value[R];v(D+f(o)*P*E,R,{commit:!0})}})}),{default:I(()=>[ne(q.$slots,"default",{modelValue:f(g)}),f(w)&&q.name?($(),U(f($h),{key:0,type:"number",value:f(g),name:q.name,required:q.required,disabled:f(u),step:f(o)},null,8,["value","name","required","disabled","step"])):Be("v-if",!0)]),_:3},16,["as-child","as","min","max","dir","inverted","aria-disabled","data-disabled"]))]),_:3}))}}),ug=X({__name:"SliderImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},emits:["slideStart","slideMove","slideEnd","homeKeyDown","endKeyDown","stepKeyDown"],setup(e,{emit:t}){const r=e,n=t,s=Ws();return(i,o)=>($(),U(f(We),we({"data-slider-impl":""},r,{onKeydown:o[0]||(o[0]=a=>{a.key==="Home"?(n("homeKeyDown",a),a.preventDefault()):a.key==="End"?(n("endKeyDown",a),a.preventDefault()):f(ig).concat(f(og)).includes(a.key)&&(n("stepKeyDown",a),a.preventDefault())}),onPointerdown:o[1]||(o[1]=a=>{const l=a.target;l.setPointerCapture(a.pointerId),a.preventDefault(),f(s).thumbElements.value.includes(l)?l.focus():n("slideStart",a)}),onPointermove:o[2]||(o[2]=a=>{a.target.hasPointerCapture(a.pointerId)&&n("slideMove",a)}),onPointerup:o[3]||(o[3]=a=>{const l=a.target;l.hasPointerCapture(a.pointerId)&&(l.releasePointerCapture(a.pointerId),n("slideEnd",a))})}),{default:I(()=>[ne(i.$slots,"default")]),_:3},16))}}),D2=X({__name:"SliderRange",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=Ws(),r=lg();Pe();const n=V(()=>t.currentModelValue.value.map(o=>sg(o,t.min.value,t.max.value))),s=V(()=>t.currentModelValue.value.length>1?Math.min(...n.value):0),i=V(()=>100-Math.max(...n.value,0));return(o,a)=>($(),U(f(We),{"data-disabled":f(t).disabled.value?"":void 0,"data-orientation":f(t).orientation.value,"as-child":o.asChild,as:o.as,style:St({[f(r).startEdge.value]:`${s.value}%`,[f(r).endEdge.value]:`${i.value}%`})},{default:I(()=>[ne(o.$slots,"default")]),_:3},8,["data-disabled","data-orientation","as-child","as","style"]))}}),O2=X({inheritAttrs:!1,__name:"SliderThumbImpl",props:{index:{type:Number,required:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=Ws(),n=lg(),{forwardRef:s,currentElement:i}=Pe(),{CollectionItem:o}=gn(),a=V(()=>r.modelValue?.value?.[t.index]),l=V(()=>a.value===void 0?0:sg(a.value,r.min.value??0,r.max.value??100)),u=V(()=>S2(t.index,r.modelValue?.value?.length??0)),c=wh(i),d=V(()=>c[n.size].value),p=V(()=>r.thumbAlignment.value==="overflow"||!d.value?0:x2(d.value,l.value,n.direction.value)),h=uc();return tt(()=>{r.thumbElements.value.push(i.value)}),Vt(()=>{const m=r.thumbElements.value.findIndex(w=>w===i.value)??-1;r.thumbElements.value.splice(m,1)}),(m,w)=>($(),U(f(o),null,{default:I(()=>[O(f(We),we(m.$attrs,{ref:f(s),role:"slider",tabindex:f(r).disabled.value?void 0:0,"aria-label":m.$attrs["aria-label"]||u.value,"data-disabled":f(r).disabled.value?"":void 0,"data-orientation":f(r).orientation.value,"aria-valuenow":a.value,"aria-valuemin":f(r).min.value,"aria-valuemax":f(r).max.value,"aria-orientation":f(r).orientation.value,"as-child":m.asChild,as:m.as,style:{transform:"var(--reka-slider-thumb-transform)",position:"absolute",[f(n).startEdge.value]:`calc(${l.value}% + ${p.value}px)`,display:!f(h)&&a.value===void 0?"none":void 0},onFocus:w[0]||(w[0]=()=>{f(r).valueIndexToChangeRef.value=m.index})}),{default:I(()=>[ne(m.$slots,"default")]),_:3},16,["tabindex","aria-label","data-disabled","data-orientation","aria-valuenow","aria-valuemin","aria-valuemax","aria-orientation","as-child","as","style"])]),_:3}))}}),H2=X({__name:"SliderThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,{getItems:r}=gn(),{forwardRef:n,currentElement:s}=Pe(),i=V(()=>s.value?r(!0).findIndex(o=>o.ref===s.value):-1);return(o,a)=>($(),U(O2,we({ref:f(n)},t,{index:i.value}),{default:I(()=>[ne(o.$slots,"default")]),_:3},16,["index"]))}}),M2=X({__name:"SliderTrack",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=Ws();return Pe(),(r,n)=>($(),U(f(We),{"as-child":r.asChild,as:r.as,"data-disabled":f(t).disabled.value?"":void 0,"data-orientation":f(t).orientation.value},{default:I(()=>[ne(r.$slots,"default")]),_:3},8,["as-child","as","data-disabled","data-orientation"]))}}),N2=X({__name:"Label",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"label"}},setup(e){const t=e;return Pe(),(r,n)=>($(),U(f(We),we(t,{onMousedown:n[0]||(n[0]=s=>{!s.defaultPrevented&&s.detail>1&&s.preventDefault()})}),{default:I(()=>[ne(r.$slots,"default")]),_:3},16))}}),[cr,q2]=Pt("ScrollAreaRoot"),B2=X({__name:"ScrollAreaRoot",props:{type:{type:String,required:!1,default:"hover"},dir:{type:String,required:!1},scrollHideDelay:{type:Number,required:!1,default:600},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e,{expose:t}){const r=e,n=F(0),s=F(0),i=F(),o=F(),a=F(),l=F(),u=F(!1),c=F(!1),{type:d,dir:p,scrollHideDelay:h}=Mt(r),m=hc(p);function w(){i.value?.scrollTo({top:0})}function x(){i.value?.scrollTo({top:0,left:0})}t({viewport:i,scrollTop:w,scrollTopLeft:x});const{forwardRef:g,currentElement:S}=Pe();return q2({type:d,dir:m,scrollHideDelay:h,scrollArea:S,viewport:i,onViewportChange:b=>{i.value=b||void 0},content:o,onContentChange:b=>{o.value=b},scrollbarX:a,scrollbarXEnabled:u,scrollbarY:l,scrollbarYEnabled:c,onScrollbarXChange:b=>{a.value=b||void 0},onScrollbarYChange:b=>{l.value=b||void 0},onScrollbarXEnabledChange:b=>{u.value=b},onScrollbarYEnabledChange:b=>{c.value=b},onCornerWidthChange:b=>{n.value=b},onCornerHeightChange:b=>{s.value=b}}),(b,y)=>($(),U(f(We),{ref:f(g),"as-child":r.asChild,as:b.as,dir:f(m),style:St({position:"relative","--reka-scroll-area-corner-width":`${n.value}px`,"--reka-scroll-area-corner-height":`${s.value}px`})},{default:I(()=>[ne(b.$slots,"default")]),_:3},8,["as-child","as","dir","style"]))}}),L2=X({__name:"ScrollAreaCornerImpl",setup(e){const t=cr(),r=F(0),n=F(0),s=V(()=>!!r.value&&!!n.value);function i(){const a=t.scrollbarX.value?.offsetHeight||0;t.onCornerHeightChange(a),n.value=a}function o(){const a=t.scrollbarY.value?.offsetWidth||0;t.onCornerWidthChange(a),r.value=a}return us(t.scrollbarX.value,i),us(t.scrollbarY.value,o),Me(()=>t.scrollbarX.value,i),Me(()=>t.scrollbarY.value,o),(a,l)=>s.value?($(),U(f(We),we({key:0,style:{width:`${r.value}px`,height:`${n.value}px`,position:"absolute",right:f(t).dir.value==="ltr"?0:void 0,left:f(t).dir.value==="rtl"?0:void 0,bottom:0}},a.$parent?.$props),{default:I(()=>[ne(a.$slots,"default")]),_:3},16,["style"])):Be("v-if",!0)}}),F2=X({__name:"ScrollAreaCorner",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:r}=Pe(),n=cr(),s=V(()=>!!n.scrollbarX.value&&!!n.scrollbarY.value),i=V(()=>n.type.value!=="scroll"&&s.value);return(o,a)=>i.value?($(),U(L2,we({key:0},t,{ref:f(r)}),{default:I(()=>[ne(o.$slots,"default")]),_:3},16)):Be("v-if",!0)}});function dg(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function Sa(e){const t=fg(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function fg(e,t){const r=e/t;return Number.isNaN(r)?0:r}function V2(e,t=()=>{}){let r={left:e.scrollLeft,top:e.scrollTop},n=0;return(function s(){const i={left:e.scrollLeft,top:e.scrollTop},o=r.left!==i.left,a=r.top!==i.top;(o||a)&&t(),r=i,n=window.requestAnimationFrame(s)})(),()=>window.cancelAnimationFrame(n)}function pg(e,t,r="ltr"){const n=Sa(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-s,o=t.content-t.viewport,a=i-n,l=r==="ltr"?[0,o]:[o*-1,0],u=qi(e,l[0],l[1]);return dg([0,o],[0,a])(u)}function Ca(e){return e?Number.parseInt(e,10):0}function j2(e,t,r,n="ltr"){const s=Sa(r),i=s/2,o=t||i,a=s-o,l=r.scrollbar.paddingStart+o,u=r.scrollbar.size-r.scrollbar.paddingEnd-a,c=r.content-r.viewport,d=n==="ltr"?[0,c]:[c*-1,0];return dg([l,u],d)(e)}function hg(e,t){return e>0&&e<t}var U2=X({__name:"ScrollAreaScrollbarX",setup(e){const t=cr(),r=xa(),{forwardRef:n,currentElement:s}=Pe();tt(()=>{s.value&&t.onScrollbarXChange(s.value)});const i=V(()=>r.sizes.value);return(o,a)=>($(),U(gg,{ref:f(n),"is-horizontal":!0,"data-orientation":"horizontal",style:St({bottom:0,left:f(t).dir.value==="rtl"?"var(--reka-scroll-area-corner-width)":0,right:f(t).dir.value==="ltr"?"var(--reka-scroll-area-corner-width)":0,"--reka-scroll-area-thumb-width":i.value?`${f(Sa)(i.value)}px`:void 0}),onOnDragScroll:a[0]||(a[0]=l=>f(r).onDragScroll(l.x))},{default:I(()=>[ne(o.$slots,"default")]),_:3},8,["style"]))}}),z2=X({__name:"ScrollAreaScrollbarY",setup(e){const t=cr(),r=xa(),{forwardRef:n,currentElement:s}=Pe();tt(()=>{s.value&&t.onScrollbarYChange(s.value)});const i=V(()=>r.sizes.value);return(o,a)=>($(),U(gg,{ref:f(n),"is-horizontal":!1,"data-orientation":"vertical",style:St({top:0,right:f(t).dir.value==="ltr"?0:void 0,left:f(t).dir.value==="rtl"?0:void 0,bottom:"var(--reka-scroll-area-corner-height)","--reka-scroll-area-thumb-height":i.value?`${f(Sa)(i.value)}px`:void 0}),onOnDragScroll:a[0]||(a[0]=l=>f(r).onDragScroll(l.y))},{default:I(()=>[ne(o.$slots,"default")]),_:3},8,["style"]))}}),Fc=X({__name:"ScrollAreaScrollbarAuto",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=cr(),r=Fi(),{forwardRef:n}=Pe(),s=F(!1),i=cc(()=>{if(t.viewport.value){const o=t.viewport.value.offsetWidth<t.viewport.value.scrollWidth,a=t.viewport.value.offsetHeight<t.viewport.value.scrollHeight;s.value=r.isHorizontal.value?o:a}},10);return tt(()=>i()),us(t.viewport,i),us(t.content,i),(o,a)=>($(),U(f(Ln),{present:o.forceMount||s.value},{default:I(()=>[O(Vc,we(o.$attrs,{ref:f(n),"data-state":s.value?"visible":"hidden"}),{default:I(()=>[ne(o.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),K2=X({inheritAttrs:!1,__name:"ScrollAreaScrollbarGlimpse",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=cr(),r=Fi(),{forwardRef:n}=Pe(),{state:s,dispatch:i}=wc("hidden",{hidden:{POINTER_ENTER:"glimpse",SCROLL:"scrolling"},glimpse:{HIDE:"hidden",POINTER_LEAVE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"glimpse"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}}),o=V(()=>s.value!=="hidden");function a(){i("POINTER_ENTER")}function l(){i("POINTER_LEAVE")}const u=cc(()=>i("SCROLL_END"),100);return ct(c=>{if(s.value==="glimpse"){const d=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);c(()=>{window.clearTimeout(d)})}}),ct(c=>{if(s.value==="idle"){const d=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);c(()=>{window.clearTimeout(d)})}}),ct(c=>{const d=t.viewport.value,p=r.isHorizontal.value?"scrollLeft":"scrollTop";if(d){let h=d[p];const m=()=>{const w=d[p];h!==w&&(i("SCROLL"),u()),h=w};d.addEventListener("scroll",m),c(()=>{d.removeEventListener("scroll",m)})}}),tt(()=>{const c=t.scrollArea.value;c&&(c.addEventListener("pointerenter",a),c.addEventListener("pointerleave",l))}),Vt(()=>{const c=t.scrollArea.value;c&&(c.removeEventListener("pointerenter",a),c.removeEventListener("pointerleave",l))}),(c,d)=>($(),U(f(Ln),{present:c.forceMount||o.value},{default:I(()=>[O(Fc,we(c.$attrs,{ref:f(n),"data-state":o.value?"visible":"hidden"}),{default:I(()=>[ne(c.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),W2=X({inheritAttrs:!1,__name:"ScrollAreaScrollbarHover",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=cr(),{forwardRef:r}=Pe();let n;const s=F(!1);function i(){window.clearTimeout(n),s.value=!0}function o(){n=window.setTimeout(()=>{s.value=!1},t.scrollHideDelay.value)}return tt(()=>{const a=t.scrollArea.value;a&&(a.addEventListener("pointerenter",i),a.addEventListener("pointerleave",o))}),Vt(()=>{const a=t.scrollArea.value;a&&(window.clearTimeout(n),a.removeEventListener("pointerenter",i),a.removeEventListener("pointerleave",o))}),(a,l)=>($(),U(f(Ln),{present:a.forceMount||s.value},{default:I(()=>[O(Fc,we(a.$attrs,{ref:f(r),"data-state":s.value?"visible":"hidden"}),{default:I(()=>[ne(a.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),G2=X({__name:"ScrollAreaScrollbarScroll",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=cr(),r=Fi(),{forwardRef:n}=Pe(),{state:s,dispatch:i}=wc("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}}),o=V(()=>s.value!=="hidden");ct(l=>{if(s.value==="idle"){const u=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);l(()=>{window.clearTimeout(u)})}});const a=cc(()=>i("SCROLL_END"),100);return ct(l=>{const u=t.viewport.value,c=r.isHorizontal.value?"scrollLeft":"scrollTop";if(u){let d=u[c];const p=()=>{const h=u[c];d!==h&&(i("SCROLL"),a()),d=h};u.addEventListener("scroll",p),l(()=>{u.removeEventListener("scroll",p)})}}),(l,u)=>($(),U(f(Ln),{present:l.forceMount||o.value},{default:I(()=>[O(Vc,we(l.$attrs,{ref:f(n),"data-state":o.value?"visible":"hidden"}),{default:I(()=>[ne(l.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),[Fi,J2]=Pt("ScrollAreaScrollbar"),Y2=X({inheritAttrs:!1,__name:"ScrollAreaScrollbar",props:{orientation:{type:String,required:!1,default:"vertical"},forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(e){const t=e,{forwardRef:r}=Pe(),n=cr(),s=V(()=>t.orientation==="horizontal");Me(s,()=>{s.value?n.onScrollbarXEnabledChange(!0):n.onScrollbarYEnabledChange(!0)},{immediate:!0}),Vt(()=>{n.onScrollbarXEnabledChange(!1),n.onScrollbarYEnabledChange(!1)});const{orientation:i,forceMount:o,asChild:a,as:l}=Mt(t);return J2({orientation:i,forceMount:o,isHorizontal:s,as:l,asChild:a}),(u,c)=>f(n).type.value==="hover"?($(),U(W2,we({key:0},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:I(()=>[ne(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="scroll"?($(),U(G2,we({key:1},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:I(()=>[ne(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="glimpse"?($(),U(K2,we({key:2},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:I(()=>[ne(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="auto"?($(),U(Fc,we({key:3},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:I(()=>[ne(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="always"?($(),U(Vc,we({key:4},u.$attrs,{ref:f(r),"data-state":"visible"}),{default:I(()=>[ne(u.$slots,"default")]),_:3},16)):Be("v-if",!0)}}),[xa,Z2]=Pt("ScrollAreaScrollbarVisible"),Vc=X({__name:"ScrollAreaScrollbarVisible",setup(e){const t=cr(),r=Fi(),{forwardRef:n}=Pe(),s=F({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),i=V(()=>{const g=fg(s.value.viewport,s.value.content);return g>0&&g<1}),o=F(),a=F(0);function l(g,S){if(h.value){const b=t.viewport.value.scrollLeft+g.deltaY;t.viewport.value.scrollLeft=b,hg(b,S)&&g.preventDefault()}else{const b=t.viewport.value.scrollTop+g.deltaY;t.viewport.value.scrollTop=b,hg(b,S)&&g.preventDefault()}}function u(g,S){h.value?a.value=S.x:a.value=S.y}function c(g){a.value=0}function d(g){s.value=g}function p(g,S){return j2(g,a.value,s.value,S)}const h=V(()=>r.isHorizontal.value);function m(g){h.value?t.viewport.value.scrollLeft=p(g,t.dir.value):t.viewport.value.scrollTop=p(g)}function w(){if(h.value){if(t.viewport.value&&o.value){const g=t.viewport.value.scrollLeft,S=pg(g,s.value,t.dir.value);o.value.style.transform=`translate3d(${S}px, 0, 0)`}}else if(t.viewport.value&&o.value){const g=t.viewport.value.scrollTop,S=pg(g,s.value);o.value.style.transform=`translate3d(0, ${S}px, 0)`}}function x(g){o.value=g}return Z2({sizes:s,hasThumb:i,handleWheelScroll:l,handleThumbDown:u,handleThumbUp:c,handleSizeChange:d,onThumbPositionChange:w,onThumbChange:x,onDragScroll:m}),(g,S)=>h.value?($(),U(U2,we({key:0},g.$attrs,{ref:f(n)}),{default:I(()=>[ne(g.$slots,"default")]),_:3},16)):($(),U(z2,we({key:1},g.$attrs,{ref:f(n)}),{default:I(()=>[ne(g.$slots,"default")]),_:3},16))}}),gg=X({__name:"ScrollAreaScrollbarImpl",props:{isHorizontal:{type:Boolean,required:!0}},emits:["onDragScroll","onWheelScroll","onThumbPointerDown"],setup(e,{emit:t}){const r=e,n=t,s=cr(),i=xa(),o=Fi(),{forwardRef:a,currentElement:l}=Pe(),u=F(""),c=F();function d(g){c.value&&n("onDragScroll",{x:g.clientX-c.value?.left,y:g.clientY-c.value?.top})}function p(g){g.button===0&&(g.target.setPointerCapture(g.pointerId),c.value=l.value.getBoundingClientRect(),u.value=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",s.viewport&&(s.viewport.value.style.scrollBehavior="auto"),d(g))}function h(g){d(g)}function m(g){const S=g.target;S.hasPointerCapture(g.pointerId)&&S.releasePointerCapture(g.pointerId),document.body.style.webkitUserSelect=u.value,s.viewport&&(s.viewport.value.style.scrollBehavior=""),c.value=void 0}function w(g){const S=g.target,b=l.value?.contains(S),y=i.sizes.value.content-i.sizes.value.viewport;b&&i.handleWheelScroll(g,y)}tt(()=>{document.addEventListener("wheel",w,{passive:!1})}),Vt(()=>{document.removeEventListener("wheel",w)});function x(){l.value&&(r.isHorizontal?i.handleSizeChange({content:s.viewport.value?.scrollWidth??0,viewport:s.viewport.value?.offsetWidth??0,scrollbar:{size:l.value.clientWidth??0,paddingStart:Ca(getComputedStyle(l.value).paddingLeft),paddingEnd:Ca(getComputedStyle(l.value).paddingRight)}}):i.handleSizeChange({content:s.viewport.value?.scrollHeight??0,viewport:s.viewport.value?.offsetHeight??0,scrollbar:{size:l.value?.clientHeight??0,paddingStart:Ca(getComputedStyle(l.value).paddingTop),paddingEnd:Ca(getComputedStyle(l.value).paddingBottom)}}),i.onThumbPositionChange())}return us(l,x),us(s.content,x),(g,S)=>($(),U(f(We),{ref:f(a),style:{position:"absolute"},"data-scrollbarimpl":"",as:f(o).as.value,"as-child":f(o).asChild.value,onPointerdown:p,onPointermove:h,onPointerup:m},{default:I(()=>[ne(g.$slots,"default")]),_:3},8,["as","as-child"]))}}),X2=X({__name:"ScrollAreaThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=cr(),n=xa();function s(d){const p=d.target.getBoundingClientRect(),h=d.clientX-p.left,m=d.clientY-p.top;n.handleThumbDown(d,{x:h,y:m})}function i(d){n.handleThumbUp(d)}const{forwardRef:o,currentElement:a}=Pe(),l=F(),u=V(()=>r.viewport.value);function c(){l.value||(l.value=V2(u.value,n.onThumbPositionChange),n.onThumbPositionChange())}return pb(V(()=>n.sizes.value),()=>{n.onThumbChange(a.value),u.value&&(n.onThumbPositionChange(),u.value.addEventListener("scroll",c))}),Vt(()=>{u.value.removeEventListener("scroll",c),r.viewport.value?.removeEventListener("scroll",c)}),(d,p)=>($(),U(f(We),{ref:f(o),"data-state":f(n).hasThumb?"visible":"hidden",style:{width:"var(--reka-scroll-area-thumb-width)",height:"var(--reka-scroll-area-thumb-height)"},"as-child":t.asChild,as:d.as,onPointerdown:s,onPointerup:i},{default:I(()=>[ne(d.$slots,"default")]),_:3},8,["data-state","as-child","as"]))}}),Q2=X({inheritAttrs:!1,__name:"ScrollAreaViewport",props:{nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e,{expose:t}){const r=e,{nonce:n}=Mt(r),s=ng(n),i=cr(),o=F();tt(()=>{i.onViewportChange(o.value),i.onContentChange(l.value)}),t({viewportElement:o});const{forwardRef:a,currentElement:l}=Pe();return(u,c)=>($(),Se(Ke,null,[Q("div",we({ref_key:"viewportElement",ref:o,"data-reka-scroll-area-viewport":"",style:{overflowX:f(i).scrollbarXEnabled.value?"scroll":"hidden",overflowY:f(i).scrollbarYEnabled.value?"scroll":"hidden"}},u.$attrs,{tabindex:0}),[O(f(We),{ref:f(a),style:St({minWidth:f(i).scrollbarXEnabled.value?"fit-content":void 0}),"as-child":r.asChild,as:u.as},{default:I(()=>[ne(u.$slots,"default")]),_:3},8,["style","as-child","as"])],16),O(f(We),{as:"style",nonce:f(s)},{default:I(()=>c[0]||(c[0]=[qe(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-scroll-area-viewport] { scrollbar-width:none; -ms-overflow-style:none; -webkit-overflow-scrolling:touch; } [data-reka-scroll-area-viewport]::-webkit-scrollbar { display:none; } ")])),_:1,__:[0]},8,["nonce"])],64))}}),e_=[" ","Enter","ArrowUp","ArrowDown"],t_=[" ","Enter"],ET=10;function Vi(e,t,r){return e===void 0?!1:Array.isArray(e)?e.some(n=>jc(n,t,r)):jc(e,t,r)}function jc(e,t,r){return e===void 0||t===void 0?!1:typeof e=="string"?e===t:typeof r=="function"?r(e,t):typeof r=="string"?e?.[r]===t?.[r]:Uy(e,t)}function r_(e){return e==null||e===""||Array.isArray(e)&&e.length===0}var n_={key:0,value:""},[zn,vg]=Pt("SelectRoot"),s_=X({inheritAttrs:!1,__name:"SelectRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},by:{type:[String,Function],required:!1},dir:{type:String,required:!1},multiple:{type:Boolean,required:!1},autocomplete:{type:String,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","update:open"],setup(e,{emit:t}){const r=e,n=t,{required:s,disabled:i,multiple:o,dir:a}=Mt(r),l=ds(r,"modelValue",n,{defaultValue:r.defaultValue??(o.value?[]:void 0),passive:r.modelValue===void 0,deep:!0}),u=ds(r,"open",n,{defaultValue:r.defaultOpen,passive:r.open===void 0}),c=F(),d=F(),p=F({x:0,y:0}),h=V(()=>o.value&&Array.isArray(l.value)?l.value?.length===0:ic(l.value));gn({isProvider:!0});const m=hc(a),w=vc(c),x=F(new Set),g=V(()=>Array.from(x.value).map(y=>y.value).join(";"));function S(y){if(o.value){const T=Array.isArray(l.value)?[...l.value]:[],k=T.findIndex(N=>jc(N,y,r.by));k===-1?T.push(y):T.splice(k,1),l.value=[...T]}else l.value=y}function b(y){return Array.from(x.value).find(T=>Vi(y,T.value,r.by))}return vg({triggerElement:c,onTriggerChange:y=>{c.value=y},valueElement:d,onValueElementChange:y=>{d.value=y},contentId:"",modelValue:l,onValueChange:S,by:r.by,open:u,multiple:o,required:s,onOpenChange:y=>{u.value=y},dir:m,triggerPointerDownPosRef:p,disabled:i,isEmptyModelValue:h,optionsSet:x,onOptionAdd:y=>{const T=b(y.value);T&&x.value.delete(T),x.value.add(y)},onOptionRemove:y=>{const T=b(y.value);T&&x.value.delete(T)}}),(y,T)=>($(),U(f(Dh),null,{default:I(()=>[ne(y.$slots,"default",{modelValue:f(l),open:f(u)}),f(w)?($(),U(i_,{key:g.value,"aria-hidden":"true",tabindex:"-1",multiple:f(o),required:f(s),name:y.name,autocomplete:y.autocomplete,disabled:f(i),value:f(l)},{default:I(()=>[f(ic)(f(l))?($(),Se("option",n_)):Be("v-if",!0),($(!0),Se(Ke,null,vr(Array.from(x.value),k=>($(),Se("option",we({key:k.value??""},{ref_for:!0},k),null,16))),128))]),_:1},8,["multiple","required","name","autocomplete","disabled","value"])):Be("v-if",!0)]),_:3}))}}),i_=X({__name:"BubbleSelect",props:{autocomplete:{type:String,required:!1},autofocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},form:{type:String,required:!1},multiple:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},size:{type:Number,required:!1},value:{type:null,required:!1}},setup(e){const t=e,r=F(),n=zn();Me(()=>t.value,(i,o)=>{const a=window.HTMLSelectElement.prototype,l=Object.getOwnPropertyDescriptor(a,"value").set;if(i!==o&&l&&r.value){const u=new Event("change",{bubbles:!0});l.call(r.value,i),r.value.dispatchEvent(u)}});function s(i){n.onValueChange(i.target.value)}return(i,o)=>($(),U(f(Tc),{"as-child":""},{default:I(()=>[Q("select",we({ref_key:"selectElement",ref:r},t,{onInput:s}),[ne(i.$slots,"default")],16)]),_:3}))}}),o_=X({__name:"SelectPopperPosition",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1,default:10},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=hn(e);return(r,n)=>($(),U(f(rg),we(f(t),{style:{boxSizing:"border-box","--reka-select-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-select-content-available-width":"var(--reka-popper-available-width)","--reka-select-content-available-height":"var(--reka-popper-available-height)","--reka-select-trigger-width":"var(--reka-popper-anchor-width)","--reka-select-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:I(()=>[ne(r.$slots,"default")]),_:3},16))}}),a_={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[gs,mg]=Pt("SelectContent"),l_=X({__name:"SelectContentImpl",props:{position:{type:String,required:!1,default:"item-aligned"},bodyLock:{type:Boolean,required:!1,default:!0},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:!0}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=t,s=zn();kb(),ph(r.bodyLock);const{CollectionSlot:i,getItems:o}=gn(),a=F();mh(a);const{search:l,handleTypeaheadSearch:u}=yh(),c=F(),d=F(),p=F(),h=F(!1),m=F(!1),w=F(!1);function x(){d.value&&a.value&&Ah([d.value,a.value])}Me(h,()=>{x()});const{onOpenChange:g,triggerPointerDownPosRef:S}=s;ct(T=>{if(!a.value)return;let k={x:0,y:0};const N=B=>{k={x:Math.abs(Math.round(B.pageX)-(S.value?.x??0)),y:Math.abs(Math.round(B.pageY)-(S.value?.y??0))}},v=B=>{B.pointerType!=="touch"&&(k.x<=10&&k.y<=10?B.preventDefault():a.value?.contains(B.target)||g(!1),document.removeEventListener("pointermove",N),S.value=null)};S.value!==null&&(document.addEventListener("pointermove",N),document.addEventListener("pointerup",v,{capture:!0,once:!0})),T(()=>{document.removeEventListener("pointermove",N),document.removeEventListener("pointerup",v,{capture:!0})})});function b(T){const k=T.ctrlKey||T.altKey||T.metaKey;if(T.key==="Tab"&&T.preventDefault(),!k&&T.key.length===1&&u(T.key,o()),["ArrowUp","ArrowDown","Home","End"].includes(T.key)){let N=[...o().map(v=>v.ref)];if(["ArrowUp","End"].includes(T.key)&&(N=N.slice().reverse()),["ArrowUp","ArrowDown"].includes(T.key)){const v=T.target,B=N.indexOf(v);N=N.slice(B+1)}setTimeout(()=>Ah(N)),T.preventDefault()}}const y=hn(V(()=>r.position==="popper"?r:{}).value);return mg({content:a,viewport:c,onViewportChange:T=>{c.value=T},itemRefCallback:(T,k,N)=>{const v=!m.value&&!N,B=Vi(s.modelValue.value,k,s.by);if(s.multiple.value){if(w.value)return;(B||v)&&(d.value=T,B&&(w.value=!0))}else(B||v)&&(d.value=T);v&&(m.value=!0)},selectedItem:d,selectedItemText:p,onItemLeave:()=>{a.value?.focus()},itemTextRefCallback:(T,k,N)=>{const v=!m.value&&!N;(Vi(s.modelValue.value,k,s.by)||v)&&(p.value=T)},focusSelectedItem:x,position:r.position,isPositioned:h,searchRef:l}),(T,k)=>($(),U(f(i),null,{default:I(()=>[O(f(Th),{"as-child":"",onMountAutoFocus:k[6]||(k[6]=Xt(()=>{},["prevent"])),onUnmountAutoFocus:k[7]||(k[7]=N=>{n("closeAutoFocus",N),!N.defaultPrevented&&(f(s).triggerElement.value?.focus({preventScroll:!0}),N.preventDefault())})},{default:I(()=>[O(f(_c),{"as-child":"","disable-outside-pointer-events":T.disableOutsidePointerEvents,onFocusOutside:k[2]||(k[2]=Xt(()=>{},["prevent"])),onDismiss:k[3]||(k[3]=N=>f(s).onOpenChange(!1)),onEscapeKeyDown:k[4]||(k[4]=N=>n("escapeKeyDown",N)),onPointerDownOutside:k[5]||(k[5]=N=>n("pointerDownOutside",N))},{default:I(()=>[($(),U(wi(T.position==="popper"?o_:u_),we({...T.$attrs,...f(y)},{id:f(s).contentId,ref:N=>{const v=f(tr)(N);v?.hasAttribute("data-reka-popper-content-wrapper")?a.value=v.firstElementChild:a.value=v},role:"listbox","data-state":f(s).open.value?"open":"closed",dir:f(s).dir.value,style:{display:"flex",flexDirection:"column",outline:"none"},onContextmenu:k[0]||(k[0]=Xt(()=>{},["prevent"])),onPlaced:k[1]||(k[1]=N=>h.value=!0),onKeydown:b}),{default:I(()=>[ne(T.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3},8,["disable-outside-pointer-events"])]),_:3})]),_:3}))}}),[Uc,c_]=Pt("SelectItemAlignedPosition"),u_=X({inheritAttrs:!1,__name:"SelectItemAlignedPosition",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["placed"],setup(e,{emit:t}){const r=e,n=t,{getItems:s}=gn(),i=zn(),o=gs(),a=F(!1),l=F(!0),u=F(),{forwardRef:c,currentElement:d}=Pe(),{viewport:p,selectedItem:h,selectedItemText:m,focusSelectedItem:w}=o;function x(){if(i.triggerElement.value&&i.valueElement.value&&u.value&&d.value&&p?.value&&h?.value&&m?.value){const b=i.triggerElement.value.getBoundingClientRect(),y=d.value.getBoundingClientRect(),T=i.valueElement.value.getBoundingClientRect(),k=m.value.getBoundingClientRect();if(i.dir.value!=="rtl"){const Oe=k.left-y.left,Xe=T.left-Oe,yt=b.left-Xe,Ne=b.width+yt,at=Math.max(Ne,y.width),bt=window.innerWidth-10,Tt=qi(Xe,10,Math.max(10,bt-at));u.value.style.minWidth=`${Ne}px`,u.value.style.left=`${Tt}px`}else{const Oe=y.right-k.right,Xe=window.innerWidth-T.right-Oe,yt=window.innerWidth-b.right-Xe,Ne=b.width+yt,at=Math.max(Ne,y.width),bt=window.innerWidth-10,Tt=qi(Xe,10,Math.max(10,bt-at));u.value.style.minWidth=`${Ne}px`,u.value.style.right=`${Tt}px`}const N=s().map(Oe=>Oe.ref),v=window.innerHeight-20,B=p.value.scrollHeight,q=window.getComputedStyle(d.value),C=Number.parseInt(q.borderTopWidth,10),_=Number.parseInt(q.paddingTop,10),E=Number.parseInt(q.borderBottomWidth,10),P=Number.parseInt(q.paddingBottom,10),R=C+_+B+P+E,D=Math.min(h.value.offsetHeight*5,R),G=window.getComputedStyle(p.value),W=Number.parseInt(G.paddingTop,10),ae=Number.parseInt(G.paddingBottom,10),Y=b.top+b.height/2-10,le=v-Y,pe=h.value.offsetHeight/2,Ae=h.value.offsetTop+pe,je=C+_+Ae,Ie=R-je;if(je<=Y){const Oe=h.value===N[N.length-1];u.value.style.bottom="0px";const Xe=d.value.clientHeight-p.value.offsetTop-p.value.offsetHeight,yt=je+Math.max(le,pe+(Oe?ae:0)+Xe+E);u.value.style.height=`${yt}px`}else{const Oe=h.value===N[0];u.value.style.top="0px";const Xe=Math.max(Y,C+p.value.offsetTop+(Oe?W:0)+pe)+Ie;u.value.style.height=`${Xe}px`,p.value.scrollTop=je-Y+p.value.offsetTop}u.value.style.margin="10px 0",u.value.style.minHeight=`${D}px`,u.value.style.maxHeight=`${v}px`,n("placed"),requestAnimationFrame(()=>a.value=!0)}}const g=F("");tt(async()=>{await Et(),x(),d.value&&(g.value=window.getComputedStyle(d.value).zIndex)});function S(b){b&&l.value===!0&&(x(),w?.(),l.value=!1)}return us(i.triggerElement,()=>{x()}),c_({contentWrapper:u,shouldExpandOnScrollRef:a,onScrollButtonChange:S}),(b,y)=>($(),Se("div",{ref_key:"contentWrapperElement",ref:u,style:St({display:"flex",flexDirection:"column",position:"fixed",zIndex:g.value})},[O(f(We),we({ref:f(c),style:{boxSizing:"border-box",maxHeight:"100%"}},{...b.$attrs,...r}),{default:I(()=>[ne(b.$slots,"default")]),_:3},16)],4))}}),d_=X({inheritAttrs:!1,__name:"SelectProvider",props:{context:{type:Object,required:!0}},setup(e){return vg(e.context),mg(a_),(t,r)=>ne(t.$slots,"default")}}),f_={key:1},p_=X({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean,required:!1},position:{type:String,required:!1},bodyLock:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=Ur(r,t),s=zn(),i=F();tt(()=>{i.value=new DocumentFragment});const o=F(),a=V(()=>r.forceMount||s.open.value),l=F(a.value);return Me(a,()=>{setTimeout(()=>l.value=a.value)}),(u,c)=>a.value||l.value||o.value?.present?($(),U(f(Ln),{key:0,ref_key:"presenceRef",ref:o,present:a.value},{default:I(()=>[O(l_,pr(rr({...f(n),...u.$attrs})),{default:I(()=>[ne(u.$slots,"default")]),_:3},16)]),_:3},8,["present"])):i.value?($(),Se("div",f_,[($(),U(el,{to:i.value},[O(d_,{context:f(s)},{default:I(()=>[ne(u.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):Be("v-if",!0)}}),[AT,h_]=Pt("SelectGroup"),g_=X({__name:"SelectGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=Vs(void 0,"reka-select-group");return h_({id:r}),(n,s)=>($(),U(f(We),we({role:"group"},t,{"aria-labelledby":f(r)}),{default:I(()=>[ne(n.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),v_=X({__name:"SelectIcon",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){return(t,r)=>($(),U(f(We),{"aria-hidden":"true",as:t.as,"as-child":t.asChild},{default:I(()=>[ne(t.$slots,"default",{},()=>[r[0]||(r[0]=qe("▼"))])]),_:3},8,["as","as-child"]))}}),[wg,m_]=Pt("SelectItem"),w_=X({__name:"SelectItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(e,{emit:t}){const r=e,n=t,{disabled:s}=Mt(r),i=zn(),o=gs(),{forwardRef:a,currentElement:l}=Pe(),{CollectionItem:u}=gn(),c=V(()=>Vi(i.modelValue?.value,r.value,i.by)),d=F(!1),p=F(r.textValue??""),h=Vs(void 0,"reka-select-item-text"),m="select.select";async function w(y){y.defaultPrevented||sc(m,x,{originalEvent:y,value:r.value})}async function x(y){await Et(),n("select",y),!y.defaultPrevented&&(s.value||(i.onValueChange(r.value),i.multiple.value||i.onOpenChange(!1)))}async function g(y){await Et(),!y.defaultPrevented&&(s.value?o.onItemLeave?.():y.currentTarget?.focus({preventScroll:!0}))}async function S(y){await Et(),!y.defaultPrevented&&y.currentTarget===or()&&o.onItemLeave?.()}async function b(y){await Et(),!y.defaultPrevented&&(o.searchRef?.value!==""&&y.key===" "||(t_.includes(y.key)&&w(y),y.key===" "&&y.preventDefault()))}if(r.value==="")throw new Error("A <SelectItem /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return tt(()=>{l.value&&o.itemRefCallback(l.value,r.value,r.disabled)}),m_({value:r.value,disabled:s,textId:h,isSelected:c,onItemTextChange:y=>{p.value=((p.value||y?.textContent)??"").trim()}}),(y,T)=>($(),U(f(u),{value:{textValue:p.value}},{default:I(()=>[O(f(We),{ref:f(a),role:"option","aria-labelledby":f(h),"data-highlighted":d.value?"":void 0,"aria-selected":c.value,"data-state":c.value?"checked":"unchecked","aria-disabled":f(s)||void 0,"data-disabled":f(s)?"":void 0,tabindex:f(s)?void 0:-1,as:y.as,"as-child":y.asChild,onFocus:T[0]||(T[0]=k=>d.value=!0),onBlur:T[1]||(T[1]=k=>d.value=!1),onPointerup:w,onPointerdown:T[2]||(T[2]=k=>{k.currentTarget.focus({preventScroll:!0})}),onTouchend:T[3]||(T[3]=Xt(()=>{},["prevent","stop"])),onPointermove:g,onPointerleave:S,onKeydown:b},{default:I(()=>[ne(y.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"])]),_:3},8,["value"]))}}),y_=X({__name:"SelectItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,r=wg();return(n,s)=>f(r).isSelected.value?($(),U(f(We),we({key:0,"aria-hidden":"true"},t),{default:I(()=>[ne(n.$slots,"default")]),_:3},16)):Be("v-if",!0)}}),b_=X({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,r=zn(),n=gs(),s=wg(),{forwardRef:i,currentElement:o}=Pe(),a=V(()=>({value:s.value,disabled:s.disabled.value,textContent:o.value?.textContent??s.value?.toString()??""}));return tt(()=>{o.value&&(s.onItemTextChange(o.value),n.itemTextRefCallback(o.value,s.value,s.disabled.value),r.onOptionAdd(a.value))}),Vt(()=>{r.onOptionRemove(a.value)}),(l,u)=>($(),U(f(We),we({id:f(s).textId,ref:f(i)},{...t,...l.$attrs}),{default:I(()=>[ne(l.$slots,"default")]),_:3},16,["id"]))}}),__=X({__name:"SelectPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=e;return(r,n)=>($(),U(f(xc),pr(rr(t)),{default:I(()=>[ne(r.$slots,"default")]),_:3},16))}}),yg=X({__name:"SelectScrollButtonImpl",emits:["autoScroll"],setup(e,{emit:t}){const r=t,{getItems:n}=gn(),s=gs(),i=F(null);function o(){i.value!==null&&(window.clearInterval(i.value),i.value=null)}ct(()=>{n().map(u=>u.ref).find(u=>u===or())?.scrollIntoView({block:"nearest"})});function a(){i.value===null&&(i.value=window.setInterval(()=>{r("autoScroll")},50))}function l(){s.onItemLeave?.(),i.value===null&&(i.value=window.setInterval(()=>{r("autoScroll")},50))}return Ps(()=>o()),(u,c)=>($(),U(f(We),we({"aria-hidden":"true",style:{flexShrink:0}},u.$parent?.$props,{onPointerdown:a,onPointermove:l,onPointerleave:c[0]||(c[0]=()=>{o()})}),{default:I(()=>[ne(u.$slots,"default")]),_:3},16))}}),S_=X({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=gs(),r=t.position==="item-aligned"?Uc():void 0,{forwardRef:n,currentElement:s}=Pe(),i=F(!1);return ct(o=>{if(t.viewport?.value&&t.isPositioned?.value){let u=function(){const c=l.scrollHeight-l.clientHeight;i.value=Math.ceil(l.scrollTop)<c};var a=u;const l=t.viewport.value;u(),l.addEventListener("scroll",u),o(()=>l.removeEventListener("scroll",u))}}),Me(s,()=>{s.value&&r?.onScrollButtonChange(s.value)}),(o,a)=>i.value?($(),U(yg,{key:0,ref:f(n),onAutoScroll:a[0]||(a[0]=()=>{const{viewport:l,selectedItem:u}=f(t);l?.value&&u?.value&&(l.value.scrollTop=l.value.scrollTop+u.value.offsetHeight)})},{default:I(()=>[ne(o.$slots,"default")]),_:3},512)):Be("v-if",!0)}}),C_=X({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=gs(),r=t.position==="item-aligned"?Uc():void 0,{forwardRef:n,currentElement:s}=Pe(),i=F(!1);return ct(o=>{if(t.viewport?.value&&t.isPositioned?.value){let u=function(){i.value=l.scrollTop>0};var a=u;const l=t.viewport.value;u(),l.addEventListener("scroll",u),o(()=>l.removeEventListener("scroll",u))}}),Me(s,()=>{s.value&&r?.onScrollButtonChange(s.value)}),(o,a)=>i.value?($(),U(yg,{key:0,ref:f(n),onAutoScroll:a[0]||(a[0]=()=>{const{viewport:l,selectedItem:u}=f(t);l?.value&&u?.value&&(l.value.scrollTop=l.value.scrollTop-u.value.offsetHeight)})},{default:I(()=>[ne(o.$slots,"default")]),_:3},512)):Be("v-if",!0)}}),x_=X({__name:"SelectTrigger",props:{disabled:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,r=zn(),{forwardRef:n,currentElement:s}=Pe(),i=V(()=>r.disabled?.value||t.disabled);r.contentId||(r.contentId=Vs(void 0,"reka-select-content")),tt(()=>{r.onTriggerChange(s.value)});const{getItems:o}=gn(),{search:a,handleTypeaheadSearch:l,resetTypeahead:u}=yh();function c(){i.value||(r.onOpenChange(!0),u())}function d(p){c(),r.triggerPointerDownPosRef.value={x:Math.round(p.pageX),y:Math.round(p.pageY)}}return(p,h)=>($(),U(f(Oh),{"as-child":"",reference:p.reference},{default:I(()=>[O(f(We),{ref:f(n),role:"combobox",type:p.as==="button"?"button":void 0,"aria-controls":f(r).contentId,"aria-expanded":f(r).open.value||!1,"aria-required":f(r).required?.value,"aria-autocomplete":"none",disabled:i.value,dir:f(r)?.dir.value,"data-state":f(r)?.open.value?"open":"closed","data-disabled":i.value?"":void 0,"data-placeholder":f(r_)(f(r).modelValue?.value)?"":void 0,"as-child":p.asChild,as:p.as,onClick:h[0]||(h[0]=m=>{m?.currentTarget?.focus()}),onPointerdown:h[1]||(h[1]=m=>{if(m.pointerType==="touch")return m.preventDefault();const w=m.target;w.hasPointerCapture(m.pointerId)&&w.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&(d(m),m.preventDefault())}),onPointerup:h[2]||(h[2]=Xt(m=>{m.pointerType==="touch"&&d(m)},["prevent"])),onKeydown:h[3]||(h[3]=m=>{const w=f(a)!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&w&&m.key===" "||(f(l)(m.key,f(o)()),f(e_).includes(m.key)&&(c(),m.preventDefault()))})},{default:I(()=>[ne(p.$slots,"default")]),_:3},8,["type","aria-controls","aria-expanded","aria-required","disabled","dir","data-state","data-disabled","data-placeholder","as-child","as"])]),_:3},8,["reference"]))}}),T_=X({__name:"SelectValue",props:{placeholder:{type:String,required:!1,default:""},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,{forwardRef:r,currentElement:n}=Pe(),s=zn();tt(()=>{s.valueElement=n});const i=V(()=>{let a=[];const l=Array.from(s.optionsSet.value),u=c=>l.find(d=>Vi(c,d.value,s.by));return Array.isArray(s.modelValue.value)?a=s.modelValue.value.map(c=>u(c)?.textContent??""):a=[u(s.modelValue.value)?.textContent??""],a.filter(Boolean)}),o=V(()=>i.value.length?i.value.join(", "):t.placeholder);return(a,l)=>($(),U(f(We),{ref:f(r),as:a.as,"as-child":a.asChild,style:{pointerEvents:"none"},"data-placeholder":i.value.length?void 0:t.placeholder},{default:I(()=>[ne(a.$slots,"default",{selectedLabel:i.value,modelValue:f(s).modelValue.value},()=>[qe(Le(o.value),1)])]),_:3},8,["as","as-child","data-placeholder"]))}}),E_=X({__name:"SelectViewport",props:{nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{nonce:r}=Mt(t),n=ng(r),s=gs(),i=s.position==="item-aligned"?Uc():void 0,{forwardRef:o,currentElement:a}=Pe();tt(()=>{s?.onViewportChange(a.value)});const l=F(0);function u(c){const d=c.currentTarget,{shouldExpandOnScrollRef:p,contentWrapper:h}=i??{};if(p?.value&&h?.value){const m=Math.abs(l.value-d.scrollTop);if(m>0){const w=window.innerHeight-20,x=Number.parseFloat(h.value.style.minHeight),g=Number.parseFloat(h.value.style.height),S=Math.max(x,g);if(S<w){const b=S+m,y=Math.min(w,b),T=b-y;h.value.style.height=`${y}px`,h.value.style.bottom==="0px"&&(d.scrollTop=T>0?T:0,h.value.style.justifyContent="flex-end")}}}l.value=d.scrollTop}return(c,d)=>($(),Se(Ke,null,[O(f(We),we({ref:f(o),"data-reka-select-viewport":"",role:"presentation"},{...c.$attrs,...t},{style:{position:"relative",flex:1,overflow:"hidden auto"},onScroll:u}),{default:I(()=>[ne(c.$slots,"default")]),_:3},16),O(f(We),{as:"style",nonce:f(n)},{default:I(()=>d[0]||(d[0]=[qe(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-reka-select-viewport]::-webkit-scrollbar { display: none; } ")])),_:1,__:[0]},8,["nonce"])],64))}}),A_=X({__name:"BaseSeparator",props:{orientation:{type:String,required:!1,default:"horizontal"},decorative:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=["horizontal","vertical"];function n(a){return r.includes(a)}const s=V(()=>n(t.orientation)?t.orientation:"horizontal"),i=V(()=>s.value==="vertical"?t.orientation:void 0),o=V(()=>t.decorative?{role:"none"}:{"aria-orientation":i.value,role:"separator"});return(a,l)=>($(),U(f(We),we({as:a.as,"as-child":a.asChild,"data-orientation":s.value},o.value),{default:I(()=>[ne(a.$slots,"default")]),_:3},16,["as","as-child","data-orientation"]))}}),k_=X({__name:"Separator",props:{orientation:{type:String,required:!1,default:"horizontal"},decorative:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(r,n)=>($(),U(A_,pr(rr(t)),{default:I(()=>[ne(r.$slots,"default")]),_:3},16))}}),[I_,kT]=Pt("ToggleGroupRoot"),R_=X({__name:"Toggle",props:{defaultValue:{type:Boolean,required:!1},modelValue:{type:[Boolean,null],required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=t,{forwardRef:s,currentElement:i}=Pe(),o=I_(null),a=ds(r,"modelValue",n,{defaultValue:r.defaultValue,passive:r.modelValue===void 0});function l(){a.value=!a.value}const u=V(()=>a.value?"on":"off"),c=vc(i);return(d,p)=>($(),U(f(We),{ref:f(s),type:d.as==="button"?"button":void 0,"as-child":r.asChild,as:d.as,"aria-pressed":f(a),"data-state":u.value,"data-disabled":d.disabled?"":void 0,disabled:d.disabled,onClick:l},{default:I(()=>[ne(d.$slots,"default",{modelValue:f(a),disabled:d.disabled,pressed:f(a),state:u.value}),f(c)&&d.name&&!f(o)?($(),U($h,{key:0,type:"checkbox",name:d.name,value:f(a),required:d.required},null,8,["name","value","required"])):Be("v-if",!0)]),_:3},8,["type","as-child","as","aria-pressed","data-state","data-disabled","disabled"]))}}),$_=X({__name:"TooltipArrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(e){const t=e;return Pe(),(r,n)=>($(),U(f(b2),pr(rr(t)),{default:I(()=>[ne(r.$slots,"default")]),_:3},16))}}),[Ta,P_]=Pt("TooltipProvider"),D_=X({inheritAttrs:!1,__name:"TooltipProvider",props:{delayDuration:{type:Number,required:!1,default:700},skipDelayDuration:{type:Number,required:!1,default:300},disableHoverableContent:{type:Boolean,required:!1,default:!1},disableClosingTrigger:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},ignoreNonKeyboardFocus:{type:Boolean,required:!1,default:!1},content:{type:Object,required:!1}},setup(e){const{delayDuration:t,skipDelayDuration:r,disableHoverableContent:n,disableClosingTrigger:s,ignoreNonKeyboardFocus:i,disabled:o,content:a}=Mt(e);Pe();const l=F(!0),u=F(!1),{start:c,stop:d}=lh(()=>{l.value=!0},r,{immediate:!1});return P_({isOpenDelayed:l,delayDuration:t,onOpen(){d(),l.value=!1},onClose(){c()},isPointerInTransitRef:u,disableHoverableContent:n,disableClosingTrigger:s,disabled:o,ignoreNonKeyboardFocus:i,content:a}),(p,h)=>ne(p.$slots,"default")}}),bg="tooltip.open",[Ea,O_]=Pt("TooltipRoot"),H_=X({__name:"TooltipRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},delayDuration:{type:Number,required:!1,default:void 0},disableHoverableContent:{type:Boolean,required:!1,default:void 0},disableClosingTrigger:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},ignoreNonKeyboardFocus:{type:Boolean,required:!1,default:void 0}},emits:["update:open"],setup(e,{emit:t}){const r=e,n=t;Pe();const s=Ta(),i=V(()=>r.disableHoverableContent??s.disableHoverableContent.value),o=V(()=>r.disableClosingTrigger??s.disableClosingTrigger.value),a=V(()=>r.disabled??s.disabled.value),l=V(()=>r.delayDuration??s.delayDuration.value),u=V(()=>r.ignoreNonKeyboardFocus??s.ignoreNonKeyboardFocus.value),c=ds(r,"open",n,{defaultValue:r.defaultOpen,passive:r.open===void 0});Me(c,b=>{s.onClose&&(b?(s.onOpen(),document.dispatchEvent(new CustomEvent(bg))):s.onClose())});const d=F(!1),p=F(),h=V(()=>c.value?d.value?"delayed-open":"instant-open":"closed"),{start:m,stop:w}=lh(()=>{d.value=!0,c.value=!0},l,{immediate:!1});function x(){w(),d.value=!1,c.value=!0}function g(){w(),c.value=!1}function S(){m()}return O_({contentId:"",open:c,stateAttribute:h,trigger:p,onTriggerChange(b){p.value=b},onTriggerEnter(){s.isOpenDelayed.value?S():x()},onTriggerLeave(){i.value?g():w()},onOpen:x,onClose:g,disableHoverableContent:i,disableClosingTrigger:o,disabled:a,ignoreNonKeyboardFocus:u}),(b,y)=>($(),U(f(Dh),null,{default:I(()=>[ne(b.$slots,"default",{open:f(c)})]),_:3}))}}),_g=X({__name:"TooltipContentImpl",props:{ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1,default:void 0},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1,default:void 0},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1,default:void 0},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=t,s=Ea(),i=Ta(),{forwardRef:o,currentElement:a}=Pe(),l=V(()=>r.ariaLabel||a.value?.textContent),u=V(()=>{const{ariaLabel:c,...d}=r;return fh(d,i.content.value??{},{side:"top",sideOffset:0,align:"center",avoidCollisions:!0,collisionBoundary:[],collisionPadding:0,arrowPadding:0,sticky:"partial",hideWhenDetached:!1})});return tt(()=>{zt(window,"scroll",c=>{c.target?.contains(s.trigger.value)&&s.onClose()}),zt(window,bg,s.onClose)}),(c,d)=>($(),U(f(_c),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:d[0]||(d[0]=p=>n("escapeKeyDown",p)),onPointerDownOutside:d[1]||(d[1]=p=>{f(s).disableClosingTrigger.value&&f(s).trigger.value?.contains(p.target)&&p.preventDefault(),n("pointerDownOutside",p)}),onFocusOutside:d[2]||(d[2]=Xt(()=>{},["prevent"])),onDismiss:d[3]||(d[3]=p=>f(s).onClose())},{default:I(()=>[O(f(rg),we({ref:f(o),"data-state":f(s).stateAttribute.value},{...c.$attrs,...u.value},{style:{"--reka-tooltip-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-tooltip-content-available-width":"var(--reka-popper-available-width)","--reka-tooltip-content-available-height":"var(--reka-popper-available-height)","--reka-tooltip-trigger-width":"var(--reka-popper-anchor-width)","--reka-tooltip-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:I(()=>[ne(c.$slots,"default"),O(f(Tc),{id:f(s).contentId,role:"tooltip"},{default:I(()=>[qe(Le(l.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),M_=X({__name:"TooltipContentHoverable",props:{ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},setup(e){const t=hn(e),{forwardRef:r,currentElement:n}=Pe(),{trigger:s,onClose:i}=Ea(),o=Ta(),{isPointerInTransit:a,onPointerExit:l}=Ib(s,n);return o.isPointerInTransitRef=a,l(()=>{i()}),(u,c)=>($(),U(_g,we({ref:f(r)},f(t)),{default:I(()=>[ne(u.$slots,"default")]),_:3},16))}}),N_=X({__name:"TooltipContent",props:{forceMount:{type:Boolean,required:!1},ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=t,s=Ea(),i=Ur(r,n),{forwardRef:o}=Pe();return(a,l)=>($(),U(f(Ln),{present:a.forceMount||f(s).open.value},{default:I(()=>[($(),U(wi(f(s).disableHoverableContent.value?_g:M_),we({ref:f(o)},f(i)),{default:I(()=>[ne(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),q_=X({__name:"TooltipPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=e;return(r,n)=>($(),U(f(xc),pr(rr(t)),{default:I(()=>[ne(r.$slots,"default")]),_:3},16))}}),B_=X({__name:"TooltipTrigger",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,r=Ea(),n=Ta();r.contentId||(r.contentId=Vs(void 0,"reka-tooltip-content"));const{forwardRef:s,currentElement:i}=Pe(),o=F(!1),a=F(!1),l=V(()=>r.disabled.value?{}:{click:w,focus:h,pointermove:d,pointerleave:p,pointerdown:c,blur:m});tt(()=>{r.onTriggerChange(i.value)});function u(){setTimeout(()=>{o.value=!1},1)}function c(){r.open&&!r.disableClosingTrigger.value&&r.onClose(),o.value=!0,document.addEventListener("pointerup",u,{once:!0})}function d(x){x.pointerType!=="touch"&&!a.value&&!n.isPointerInTransitRef.value&&(r.onTriggerEnter(),a.value=!0)}function p(){r.onTriggerLeave(),a.value=!1}function h(x){o.value||r.ignoreNonKeyboardFocus.value&&!x.target.matches?.(":focus-visible")||r.onOpen()}function m(){r.onClose()}function w(){r.disableClosingTrigger.value||r.onClose()}return(x,g)=>($(),U(f(Oh),{"as-child":"",reference:x.reference},{default:I(()=>[O(f(We),we({ref:f(s),"aria-describedby":f(r).open.value?f(r).contentId:void 0,"data-state":f(r).stateAttribute.value,as:x.as,"as-child":t.asChild,"data-grace-area-trigger":""},Ed(l.value)),{default:I(()=>[ne(x.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3},8,["reference"]))}}),L_=X({__name:"Button",props:{variant:{},size:{},class:{type:[Boolean,null,String,Object,Array]},type:{default:"button"},asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e;return(r,n)=>($(),U(f(We),{"data-slot":"button",as:e.as,"as-child":e.asChild,type:e.as==="button"?e.type:void 0,class:et(f(dt)(f(F_)({variant:e.variant,size:e.size}),t.class))},{default:I(()=>[ne(r.$slots,"default")]),_:3},8,["as","as-child","type","class"]))}}),pt=L_;const F_=th("wp:inline-flex wp:items-center wp:justify-center wp:gap-2 wp:whitespace-nowrap wp:rounded-md wp:text-sm wp:font-medium wp:transition-all wp:disabled:pointer-events-none wp:disabled:opacity-50 wp:[&_svg]:pointer-events-none wp:[&_svg:not([class*='size-'])]:size-4 wp:shrink-0 wp:[&_svg]:shrink-0 wp:outline-none wp:focus-visible:border-ring wp:focus-visible:ring-ring/50 wp:focus-visible:ring-[3px] wp:aria-invalid:ring-destructive/20 wp:dark:aria-invalid:ring-destructive/40 wp:aria-invalid:border-destructive",{variants:{variant:{default:"wp:bg-primary wp:text-primary-foreground wp:hover:bg-primary/90",destructive:"wp:bg-destructive wp:text-white wp:hover:bg-destructive/90 wp:focus-visible:ring-destructive/20 wp:dark:focus-visible:ring-destructive/40 wp:dark:bg-destructive/60",outline:"wp:border wp:bg-background wp:shadow-xs wp:hover:bg-accent wp:hover:text-accent-foreground wp:dark:bg-input/30 wp:dark:border-input wp:dark:hover:bg-input/50",secondary:"wp:bg-secondary wp:text-secondary-foreground wp:hover:bg-secondary/80",ghost:"wp:hover:bg-accent wp:hover:text-accent-foreground wp:dark:hover:bg-accent/50",link:"wp:text-primary wp:underline-offset-4 wp:hover:underline"},size:{default:"wp:h-9 wp:px-4 wp:py-2 wp:has-[>svg]:px-3",sm:"wp:h-8 wp:rounded-md wp:gap-1.5 wp:px-3 wp:has-[>svg]:px-2.5",lg:"wp:h-10 wp:rounded-md wp:px-6 wp:has-[>svg]:px-4",icon:"wp:size-9","icon-sm":"wp:size-8","icon-lg":"wp:size-10"}},defaultVariants:{variant:"default",size:"default"}});var V_={class:"webphone-keypad wp:grid wp:grid-cols-3 wp:gap-y-3 wp:gap-x-6 wp:px-4 wp:py-2 wp:mx-auto wp:place-items-center"},j_=X({__name:"KeyPad",setup(e){const t=Ft("webphone"),{sendDTMF:r}=Ft("sip"),{playDtmf:n}=Ep(),s=["1","2","3","4","5","6","7","8","9","*","0","#"],i=o=>{n(o),t.callStatus==="connected"&&r(o),t.appendKeypad(o)};return(o,a)=>($(),Se("div",V_,[($(),Se(Ke,null,vr(s,l=>O(f(pt),{key:l,type:"button",onClick:u=>i(l),variant:"ghost",size:"icon",class:"webphone-keypad__key wp:flex wp:items-center wp:justify-center wp:h-10 wp:w-full wp:rounded-xs wp:text-lg wp:bg-neutral-100 wp:dark:bg-neutral-700 wp:hover:bg-neutral-200 wp:dark:hover:bg-neutral-600 wp:hover:text-primary wp:dark:hover:text-neutral-100 wp:text-primary wp:dark:text-white wp:transition-all wp:duration-150 wp:active:scale-95 wp:font-light montserrat","data-key":l},{default:I(()=>[qe(Le(l),1)]),_:2},1032,["onClick","data-key"])),64))]))}}),zc=j_;var Sg=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),U_=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),z_=e=>{const t=U_(e);return t.charAt(0).toUpperCase()+t.slice(1)},K_=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),Cg=e=>e==="";var ji={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};var W_=({name:e,iconNode:t,absoluteStrokeWidth:r,"absolute-stroke-width":n,strokeWidth:s,"stroke-width":i,size:o=ji.width,color:a=ji.stroke,...l},{slots:u})=>mr("svg",{...ji,...l,width:o,height:o,stroke:a,"stroke-width":Cg(r)||Cg(n)||r===!0||n===!0?Number(s||i||ji["stroke-width"])*24/Number(o):s||i||ji["stroke-width"],class:K_("lucide",l.class,...e?[`lucide-${Sg(z_(e))}-icon`,`lucide-${Sg(e)}`]:["lucide-icon"])},[...t.map(c=>mr(...c)),...u.default?[u.default()]:[]]);var vt=(e,t)=>(r,{slots:n,attrs:s})=>mr(W_,{...s,...r,iconNode:t,name:e},n);var xg=vt("building-2",[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]]);var Kc=vt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);var Tg=vt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);var G_=vt("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);var Wc=vt("circle-user",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);var J_=vt("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);var Y_=vt("mic-off",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M16.95 16.95A7 7 0 0 1 5 12v-2",key:"cqa7eg"}],["path",{d:"M18.89 13.23A7 7 0 0 0 19 12v-2",key:"16hl24"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}]]);var Z_=vt("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]]);var X_=vt("pause",[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]]);var Q_=vt("phone-call",[["path",{d:"M13 2a9 9 0 0 1 9 9",key:"1itnx2"}],["path",{d:"M13 6a5 5 0 0 1 5 5",key:"11nki7"}],["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);var eS=vt("phone-incoming",[["path",{d:"M16 2v6h6",key:"1mfrl5"}],["path",{d:"m22 2-6 6",key:"6f0sa0"}],["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);var tS=vt("phone-missed",[["path",{d:"m16 2 6 6",key:"1gw87d"}],["path",{d:"m22 2-6 6",key:"6f0sa0"}],["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);var rS=vt("phone-outgoing",[["path",{d:"m16 8 6-6",key:"oawc05"}],["path",{d:"M22 8V2h-6",key:"oqy2zc"}],["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);var Eg=vt("phone",[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);var nS=vt("picture-in-picture-2",[["path",{d:"M21 9V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h4",key:"daa4of"}],["rect",{width:"10",height:"7",x:"12",y:"13",rx:"2",key:"1nb8gs"}]]);var sS=vt("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);var iS=vt("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);var oS=vt("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var aS=vt("video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);var Ag=vt("voicemail",[["circle",{cx:"6",cy:"12",r:"4",key:"1ehtga"}],["circle",{cx:"18",cy:"12",r:"4",key:"4vafl8"}],["line",{x1:"6",x2:"18",y1:"16",y2:"16",key:"pmt8us"}]]);var kg=vt("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]);var Gc=vt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),lS=X({__name:"Input",props:{defaultValue:{},modelValue:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=ds(r,"modelValue",t,{passive:!0,defaultValue:r.defaultValue});return(s,i)=>mo(($(),Se("input",{"onUpdate:modelValue":i[0]||(i[0]=o=>rt(n)?n.value=o:null),"data-slot":"input",class:et(f(dt)("wp:file:text-foreground wp:placeholder:text-muted-foreground wp:selection:bg-primary wp:selection:text-primary-foreground wp:dark:bg-input/30 wp:border-blue-500 wp:h-9 wp:w-full wp:min-w-0 wp:rounded-md wp:border wp:bg-transparent wp:px-3 wp:py-1 wp:text-base wp:shadow-xs wp:transition-[color,box-shadow] wp:outline-none wp:file:inline-flex wp:file:h-7 wp:file:border-0 wp:file:bg-transparent wp:file:text-sm wp:file:font-medium wp:disabled:pointer-events-none wp:disabled:cursor-not-allowed wp:disabled:opacity-50 wp:md:text-sm","wp:focus-visible:border-ring wp:focus-visible:ring-ring/50 wp:focus-visible:ring-[3px]","wp:aria-invalid:ring-destructive/20 wp:dark:aria-invalid:ring-destructive/40 wp:aria-invalid:border-destructive",r.class))},null,2)),[[ki,f(n)]])}}),Ui=lS,cS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 14 14"};function uS(e,t){return $(),Se("svg",cS,[...t[0]||(t[0]=[Cl('<g clip-path="url(#a)"><path fill="currentColor" d="m1.913 7.003.035.49c0 .605.49 1.095 1.095 1.095.015 0 1.08-.14 1.08-.14a1.1 1.1 0 0 0 1.07-1.07l.075-.655c1.192-.463 2.33-.465 3.47-.005l.072.657c.01.585.485 1.06 1.07 1.07 0 0 1.065.14 1.08.14.605 0 1.095-.49 1.095-1.07l.038-.537c0-.575-.23-1.12-.65-1.54-1.91-1.91-6.973-1.908-8.88 0-.418.417-.65.965-.648 1.562zM10.94 5.94c.285.285.443.653.44 1.015l-.037.538a.39.39 0 0 1-.368.387s-1.057-.137-1.072-.137a.4.4 0 0 1-.388-.388c0-.015-.1-.92-.1-.92a.35.35 0 0 0-.207-.282c-1.43-.64-2.913-.643-4.408-.003a.36.36 0 0 0-.212.288s-.103.907-.103.917a.386.386 0 0 1-.387.388c-.015 0-1.073.137-1.073.137a.395.395 0 0 1-.37-.41l-.035-.49c0-.385.155-.755.44-1.04 1.74-1.74 6.383-1.497 7.88 0"></path></g><circle cx="7" cy="7" r="6.6" stroke="currentColor" stroke-width=".8"></circle><defs><clipPath id="a"><path fill="#fff" d="M7 13 1 7l6-6 6 6z"></path></clipPath></defs>',3)])])}var Jc={render:uS},dS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 9 9"};function fS(e,t){return $(),Se("svg",dS,[...t[0]||(t[0]=[Q("g",{"clip-path":"url(#a)"},[Q("path",{fill:"currentColor",d:"M0 8.625V6a3.38 3.38 0 0 1 3.375-3.375h1.811V2.03a.75.75 0 0 1 1.28-.53l2.206 2.205a1.125 1.125 0 0 1 0 1.59L6.466 7.5a.75.75 0 0 1-1.28-.53v-.595H3a2.25 2.25 0 0 0-2.25 2.25.375.375 0 0 1-.75 0M5.936 3a.375.375 0 0 1-.375.375H3.375A2.63 2.63 0 0 0 .75 6v.643A3 3 0 0 1 3 5.625h2.561A.375.375 0 0 1 5.936 6v.97l2.205-2.205a.375.375 0 0 0 0-.53L5.936 2.03z"})],-1),Q("defs",null,[Q("clipPath",{id:"a"},[Q("path",{fill:"#fff",d:"M0 0h9v9H0z"})])],-1)])])}var pS={render:fS},hS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20"};function gS(e,t){return $(),Se("svg",hS,[...t[0]||(t[0]=[Cl('<g clip-path="url(#a)"><path fill="currentColor" d="m13.499 13.495.321-.371a1.095 1.095 0 0 0 0-1.549c-.01-.01-.862-.665-.862-.665a1.1 1.1 0 0 0-1.514 0l-.516.41c-1.17-.516-1.976-1.318-2.457-2.45l.414-.516a1.09 1.09 0 0 0 0-1.513s-.654-.852-.665-.863c-.428-.427-1.12-.427-1.53-.017l-.407.353c-.407.407-.63.955-.63 1.549 0 2.701 3.582 6.279 6.28 6.279.59 0 1.141-.223 1.562-.647zM6.364 7.863c0-.403.148-.774.406-1.029l.407-.354a.39.39 0 0 1 .534-.014s.65.845.661.856a.4.4 0 0 1 0 .548c-.01.01-.58.721-.58.721a.35.35 0 0 0-.053.347c.559 1.463 1.605 2.513 3.115 3.118a.36.36 0 0 0 .354-.053l.72-.576a.386.386 0 0 1 .549 0c.01.01.855.66.855.66a.395.395 0 0 1-.028.552l-.322.372a1.47 1.47 0 0 1-1.046.424c-2.46 0-5.572-3.454-5.572-5.572"></path></g><circle cx="9.899" cy="9.899" r="6.6" stroke="currentColor" stroke-width=".8" transform="rotate(-135 9.9 9.9)"></circle><defs><clipPath id="a"><path fill="#fff" d="M14.143 5.657v8.485H5.658V5.657z"></path></clipPath></defs>',3)])])}var vS={render:gS},mS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"2.8 2.8 14.2 14.2"};function wS(e,t){return $(),Se("svg",mS,[...t[0]||(t[0]=[Q("circle",{cx:"9.899",cy:"9.899",r:"6.6",stroke:"currentColor","stroke-width":".8",transform:"rotate(-135 9.9 9.9)"},null,-1),Q("path",{fill:"currentColor",d:"M13.634 8.18a.66.66 0 0 0-.729.094l-.585.591a1.663 1.663 0 0 0-1.653-1.531h-3C6.747 7.334 6 8.08 6 9v2a1.67 1.67 0 0 0 1.667 1.667h3c.876 0 1.589-.683 1.654-1.543l.585.585.036.03a.66.66 0 0 0 .692.063.66.66 0 0 0 .366-.591V8.77a.66.66 0 0 0-.366-.592M10.667 12h-3c-.552 0-1-.449-1-1V9c0-.551.448-1 1-1h3c.551 0 1 .449 1 1v2c0 .551-.449 1-1 1m1.666-1.806v-.396l1-1.01.009 2.413z"},null,-1)])])}var yS={render:wS},bS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 19 19"};function _S(e,t){return $(),Se("svg",bS,[...t[0]||(t[0]=[Q("path",{fill:"currentColor","fill-rule":"evenodd",stroke:"currentColor","stroke-width":".5",d:"M3.91 5.867a1.7 1.7 0 0 1-.946-.248 1.9 1.9 0 0 1-.606-.594l-.117-.223a1.93 1.93 0 0 1 .07-1.722q.077-.143.18-.264a1.8 1.8 0 0 1 .33-.322q.063-.048.13-.086c.05-.03.093-.052.145-.079a1.75 1.75 0 0 1 1.653.07l.07.044c.244.162.446.383.59.645a1.92 1.92 0 0 1 .003 1.847 2 2 0 0 1-.183.27c-.02.026-.029.038-.05.062q-.134.147-.293.264a1.7 1.7 0 0 1-.983.336zM1.88 3.923c-.017.333.048.665.188.965.027.055.048.104.075.156l.145.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.05.15-.078.35-.209.63-.525.8-.905a2.14 2.14 0 0 0-.276-2.205L5.2 2.494c-.03-.023-.037-.036-.064-.057a1.94 1.94 0 0 0-1.212-.483 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.79zm7.442 1.944a1.7 1.7 0 0 1-.942-.248 1.9 1.9 0 0 1-.606-.595L7.657 4.8a1.93 1.93 0 0 1 .071-1.722q.076-.142.18-.264a1.8 1.8 0 0 1 .33-.321q.062-.048.13-.086a1.75 1.75 0 0 1 1.798-.008l.076.043c.243.163.445.384.588.645a1.92 1.92 0 0 1-.001 1.847 2 2 0 0 1-.183.27c-.02.026-.029.039-.05.063a2 2 0 0 1-.29.264 1.73 1.73 0 0 1-.984.336zM7.296 3.923c-.017.333.048.665.188.965.027.055.047.104.075.156l.144.223c.192.26.44.468.726.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.05.15-.078.35-.208.63-.524.802-.905a2.14 2.14 0 0 0-.278-2.205l-.173-.191c-.031-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.214-.482 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.79zm7.442 1.944a1.7 1.7 0 0 1-.944-.248 1.9 1.9 0 0 1-.602-.594l-.117-.223a1.93 1.93 0 0 1 .072-1.722q.075-.141.18-.263a1.8 1.8 0 0 1 .326-.323q.062-.048.13-.086c.05-.03.093-.052.144-.079a1.75 1.75 0 0 1 1.654.07l.07.044c.242.163.444.384.587.645a1.93 1.93 0 0 1 0 1.847 2 2 0 0 1-.184.27c-.02.026-.028.039-.05.063a2 2 0 0 1-.29.264 1.7 1.7 0 0 1-.983.336zM12.71 3.923c-.017.333.048.665.188.965.027.055.048.104.076.156l.144.223a1.97 1.97 0 0 0 1.569.802c.292 0 .58-.067.844-.196.053-.028.1-.05.15-.078a2 2 0 0 0 .795-.904 2.14 2.14 0 0 0-.27-2.206l-.175-.191c-.031-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.213-.482 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.187.79zm-8.8 7.281a1.7 1.7 0 0 1-.942-.246 1.9 1.9 0 0 1-.606-.595l-.121-.224a1.93 1.93 0 0 1 .071-1.722q.077-.142.18-.263a1.8 1.8 0 0 1 .464-.407 1.75 1.75 0 0 1 1.798-.008l.07.043c.242.163.444.384.587.645a1.92 1.92 0 0 1-.001 1.847 2 2 0 0 1-.183.27c-.02.026-.029.039-.05.063a2 2 0 0 1-.29.263 1.7 1.7 0 0 1-.984.337zM1.88 9.261c-.017.333.048.664.188.964.027.056.048.105.075.156l.145.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.049.15-.078.348-.209.626-.525.795-.904a2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.03-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.207-.483 1.8 1.8 0 0 0-.908.195c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.791zm7.442 1.943a1.7 1.7 0 0 1-.941-.246 1.9 1.9 0 0 1-.606-.595l-.117-.223a1.93 1.93 0 0 1 .071-1.722q.075-.143.18-.264a1.8 1.8 0 0 1 .463-.407c.05-.03.093-.051.145-.078a1.74 1.74 0 0 1 1.653.07l.07.043c.243.163.444.385.588.646a1.93 1.93 0 0 1-.001 1.847 2 2 0 0 1-.184.27c-.02.026-.028.039-.05.063a2 2 0 0 1-.29.263c-.288.212-.63.33-.983.337zM7.293 9.261c-.017.333.048.664.188.964.027.056.047.105.075.156l.145.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.049.15-.078.352-.207.633-.524.805-.905a2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.031-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.214-.482 1.8 1.8 0 0 0-.908.195c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.791zm7.445 1.944a1.7 1.7 0 0 1-.944-.246 1.9 1.9 0 0 1-.606-.596l-.117-.222a1.93 1.93 0 0 1 .071-1.723q.075-.141.18-.263a1.8 1.8 0 0 1 .463-.407 1.74 1.74 0 0 1 1.798-.008l.07.043c.243.163.444.384.588.646a1.92 1.92 0 0 1-.001 1.847 2 2 0 0 1-.184.27c-.02.026-.028.038-.05.063a2 2 0 0 1-.29.263c-.288.212-.63.329-.983.337zm-2.03-1.943c-.017.332.048.664.188.964.027.055.048.104.075.156l.145.223a1.97 1.97 0 0 0 1.569.802c.292 0 .58-.067.844-.196.053-.028.1-.05.15-.078a2 2 0 0 0 .795-.904 2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.03-.024-.037-.037-.064-.059a1.94 1.94 0 0 0-1.211-.482 1.8 1.8 0 0 0-.909.196c-.418.2-.754.55-.947.985a2 2 0 0 0-.188.79zM3.91 16.543a1.7 1.7 0 0 1-.942-.246 1.9 1.9 0 0 1-.606-.596l-.121-.223a1.93 1.93 0 0 1 .071-1.723q.077-.141.18-.263a1.8 1.8 0 0 1 .464-.407 1.75 1.75 0 0 1 1.798-.008l.07.043c.242.163.444.385.587.646a1.92 1.92 0 0 1-.001 1.847 2 2 0 0 1-.183.27l-.05.063a2 2 0 0 1-.29.26 1.7 1.7 0 0 1-.984.337zm-2.03-1.944c-.017.333.048.665.188.965.027.055.048.104.075.156l.145.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.05.15-.078a2 2 0 0 0 .795-.904 2.14 2.14 0 0 0-.276-2.205l-.175-.191c-.03-.023-.037-.037-.064-.058a1.94 1.94 0 0 0-1.207-.483 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.79zm7.442 1.944a1.7 1.7 0 0 1-.941-.246 1.9 1.9 0 0 1-.606-.596l-.117-.223a1.93 1.93 0 0 1 .071-1.722q.075-.141.18-.263a1.8 1.8 0 0 1 .463-.407 1.75 1.75 0 0 1 1.797-.008l.07.043c.244.163.445.384.589.645a1.93 1.93 0 0 1-.001 1.848 2 2 0 0 1-.184.27c-.02.026-.028.038-.05.062a2 2 0 0 1-.29.264c-.288.212-.63.329-.983.337zm-2.029-1.944c-.017.333.048.665.188.965.027.055.047.104.075.156l.145.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.05.15-.078.352-.208.633-.524.805-.905a2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.031-.024-.037-.037-.064-.059a1.94 1.94 0 0 0-1.214-.482 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.79zm7.445 1.944a1.7 1.7 0 0 1-.944-.246 1.9 1.9 0 0 1-.606-.595l-.117-.223a1.93 1.93 0 0 1 .071-1.722q.075-.141.18-.263a1.8 1.8 0 0 1 .463-.407c.05-.03.093-.052.145-.079a1.74 1.74 0 0 1 1.653.07l.07.044c.243.163.444.384.588.645a1.92 1.92 0 0 1-.001 1.847 2 2 0 0 1-.184.27c-.02.026-.028.039-.05.063a2 2 0 0 1-.29.264 1.7 1.7 0 0 1-.983.336zm-2.03-1.943c-.017.333.048.665.188.964.027.056.048.105.075.157l.145.222a1.97 1.97 0 0 0 1.569.803c.292 0 .58-.067.844-.196.053-.029.1-.05.15-.079a2 2 0 0 0 .795-.904 2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.03-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.211-.482 1.8 1.8 0 0 0-.909.195c-.418.2-.754.55-.947.986a2 2 0 0 0-.188.79z","clip-rule":"evenodd"},null,-1)])])}var Yc={render:_S},SS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 19 19"};function CS(e,t){return $(),Se("svg",SS,[...t[0]||(t[0]=[Q("path",{fill:"currentColor","fill-rule":"evenodd",stroke:"currentColor","stroke-width":".5",d:"M3.91 5.867a1.7 1.7 0 0 1-.946-.248 1.9 1.9 0 0 1-.606-.594l-.117-.223a1.93 1.93 0 0 1 .07-1.722q.077-.143.18-.264a1.8 1.8 0 0 1 .33-.322q.063-.048.13-.086c.05-.03.093-.052.145-.079a1.75 1.75 0 0 1 1.653.07l.07.044c.244.162.446.383.59.645a1.92 1.92 0 0 1 .003 1.847 2 2 0 0 1-.183.27c-.02.026-.029.038-.05.062q-.134.147-.293.264a1.7 1.7 0 0 1-.983.336zM1.88 3.923c-.017.333.048.665.188.965.027.055.048.104.075.156l.145.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.05.15-.078.35-.209.63-.525.8-.905a2.14 2.14 0 0 0-.276-2.205L5.2 2.494c-.03-.023-.037-.036-.064-.057a1.94 1.94 0 0 0-1.212-.483 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.79zm7.442 1.944a1.7 1.7 0 0 1-.942-.248 1.9 1.9 0 0 1-.606-.595L7.657 4.8a1.93 1.93 0 0 1 .071-1.722q.077-.142.18-.264a1.8 1.8 0 0 1 .33-.321q.062-.048.13-.086a1.75 1.75 0 0 1 1.798-.008l.076.043c.243.163.445.384.588.645a1.93 1.93 0 0 1-.001 1.847 2 2 0 0 1-.183.27c-.02.026-.029.039-.05.063a2 2 0 0 1-.29.264 1.73 1.73 0 0 1-.984.336zM7.296 3.923c-.017.333.048.665.188.965.027.055.047.104.075.156l.145.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.05.15-.078.35-.208.63-.524.802-.905a2.14 2.14 0 0 0-.278-2.205l-.173-.191c-.031-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.214-.482 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.79zm7.442 1.944a1.7 1.7 0 0 1-.944-.248 1.9 1.9 0 0 1-.602-.594l-.117-.223a1.93 1.93 0 0 1 .072-1.722q.075-.141.18-.263a1.8 1.8 0 0 1 .326-.323q.062-.048.13-.086c.05-.03.093-.052.144-.079a1.74 1.74 0 0 1 1.654.07l.07.044c.242.163.444.384.587.645a1.92 1.92 0 0 1 0 1.847 2 2 0 0 1-.184.27c-.02.026-.028.039-.05.063a2 2 0 0 1-.29.264 1.7 1.7 0 0 1-.983.336zM12.71 3.923c-.017.333.048.665.188.965.027.055.048.104.076.156l.144.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.05.15-.078a2 2 0 0 0 .795-.904 2.14 2.14 0 0 0-.27-2.206l-.175-.191c-.031-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.213-.482 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.187.79zm-8.8 7.281a1.7 1.7 0 0 1-.942-.246 1.9 1.9 0 0 1-.606-.595l-.121-.224a1.93 1.93 0 0 1 .071-1.722q.077-.142.18-.263a1.8 1.8 0 0 1 .464-.407 1.74 1.74 0 0 1 1.798-.008l.07.043c.242.163.444.384.587.645a1.92 1.92 0 0 1-.001 1.847 2 2 0 0 1-.183.27c-.02.026-.029.039-.05.063a2 2 0 0 1-.29.263 1.7 1.7 0 0 1-.984.337zM1.88 9.261c-.017.333.048.664.188.964.027.056.048.105.075.156l.145.223a1.97 1.97 0 0 0 1.569.802c.291 0 .58-.067.844-.196.053-.028.1-.049.15-.078.348-.209.626-.525.795-.904a2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.03-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.207-.483 1.8 1.8 0 0 0-.908.195c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.791zm7.442 1.943a1.7 1.7 0 0 1-.941-.246 1.9 1.9 0 0 1-.606-.595l-.117-.223a1.93 1.93 0 0 1 .071-1.722q.075-.142.18-.264a1.8 1.8 0 0 1 .463-.407c.05-.03.093-.051.145-.078a1.75 1.75 0 0 1 1.653.07l.07.043c.243.163.444.385.588.646a1.92 1.92 0 0 1-.001 1.847 2 2 0 0 1-.184.27c-.02.026-.028.039-.05.063a2 2 0 0 1-.29.263c-.288.212-.63.33-.983.337zM7.293 9.261c-.017.333.048.664.188.964.027.056.047.105.075.156l.145.223a1.97 1.97 0 0 0 1.569.802c.291 0 .58-.067.844-.196.053-.028.1-.049.15-.078.352-.207.633-.524.805-.905a2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.031-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.214-.482 1.8 1.8 0 0 0-.908.195c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.791zm7.444 1.944a1.7 1.7 0 0 1-.943-.246 1.9 1.9 0 0 1-.606-.596l-.117-.222a1.93 1.93 0 0 1 .071-1.723q.075-.141.18-.263a1.8 1.8 0 0 1 .463-.407c.05-.03.093-.051.145-.078a1.74 1.74 0 0 1 1.653.07l.07.043c.243.163.444.384.588.646a1.93 1.93 0 0 1-.001 1.847 2 2 0 0 1-.184.27c-.02.026-.028.038-.05.063a2 2 0 0 1-.29.263c-.288.212-.63.329-.983.337zm-2.029-1.943c-.017.332.048.664.188.964.027.055.048.104.075.156l.145.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.05.15-.078a2 2 0 0 0 .795-.904 2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.03-.024-.037-.037-.064-.059a1.94 1.94 0 0 0-1.211-.482 1.8 1.8 0 0 0-.909.196c-.418.2-.754.55-.947.985a2 2 0 0 0-.188.79zM3.91 16.543a1.7 1.7 0 0 1-.942-.246 1.9 1.9 0 0 1-.606-.596l-.121-.223a1.93 1.93 0 0 1 .071-1.723q.077-.141.18-.263a1.8 1.8 0 0 1 .464-.407 1.75 1.75 0 0 1 1.798-.008l.07.043c.242.163.444.385.587.646a1.92 1.92 0 0 1-.001 1.847 2 2 0 0 1-.183.27l-.05.063a2 2 0 0 1-.29.26 1.7 1.7 0 0 1-.984.337zm-2.03-1.944c-.017.333.048.665.188.964.027.056.048.105.075.157l.145.223a1.97 1.97 0 0 0 1.569.802c.291 0 .58-.067.844-.196.053-.028.1-.05.15-.078a2 2 0 0 0 .795-.904 2.14 2.14 0 0 0-.276-2.205l-.175-.191c-.03-.023-.037-.037-.064-.058a1.94 1.94 0 0 0-1.207-.483 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.79zm7.442 1.944a1.7 1.7 0 0 1-.941-.246 1.9 1.9 0 0 1-.606-.596l-.117-.223a1.93 1.93 0 0 1 .071-1.722q.075-.141.18-.263a1.8 1.8 0 0 1 .463-.407 1.75 1.75 0 0 1 1.798-.008l.07.043c.243.163.444.384.588.645a1.92 1.92 0 0 1-.001 1.848 2 2 0 0 1-.184.27c-.02.026-.028.038-.05.062a2 2 0 0 1-.29.264c-.288.212-.63.329-.983.337zm-2.029-1.944c-.017.333.048.665.188.964.027.056.047.105.075.157l.145.223a1.97 1.97 0 0 0 1.569.802c.291 0 .58-.067.844-.196.053-.028.1-.05.15-.078.352-.208.633-.524.805-.905a2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.031-.024-.037-.037-.064-.059a1.94 1.94 0 0 0-1.214-.482 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.79zm7.444 1.944a1.7 1.7 0 0 1-.943-.246 1.9 1.9 0 0 1-.606-.595l-.117-.223a1.93 1.93 0 0 1 .071-1.722q.075-.141.18-.263a1.8 1.8 0 0 1 .463-.407c.05-.03.093-.052.145-.079a1.75 1.75 0 0 1 1.653.07l.07.044c.243.163.444.384.588.645a1.93 1.93 0 0 1-.001 1.847 2 2 0 0 1-.184.27c-.02.026-.028.039-.05.063a2 2 0 0 1-.29.264 1.7 1.7 0 0 1-.983.336zM12.708 14.6c-.017.333.048.665.188.964.027.056.048.105.075.157l.145.222c.19.26.44.468.725.607a1.92 1.92 0 0 0 1.688 0c.053-.029.1-.05.15-.079a2 2 0 0 0 .795-.904 2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.03-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.211-.482 1.8 1.8 0 0 0-.909.195c-.418.2-.754.55-.947.986a2 2 0 0 0-.188.79z","clip-rule":"evenodd"},null,-1),Q("path",{stroke:"currentColor","stroke-linecap":"round",d:"M2 16.293 16.293 2"},null,-1)])])}var Zc={render:CS},xS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 12 12"};function TS(e,t){return $(),Se("svg",xS,[...t[0]||(t[0]=[Q("path",{fill:"currentColor",d:"M9.75 1H4.5c-.678 0-1.314.302-1.743.828L.513 4.578a2.26 2.26 0 0 0 0 2.844l2.243 2.75A2.24 2.24 0 0 0 4.5 11h5.25C10.99 11 12 9.99 12 8.75v-5.5C12 2.01 10.99 1 9.75 1m1.75 7.75c0 .965-.785 1.75-1.75 1.75H4.5a1.74 1.74 0 0 1-1.356-.644L.901 7.106a1.755 1.755 0 0 1 0-2.212l2.243-2.75A1.74 1.74 0 0 1 4.5 1.499h5.25c.965 0 1.75.785 1.75 1.75zM8.927 4.427 7.354 6l1.573 1.573a.25.25 0 0 1-.354.353L7 6.355 5.427 7.926a.25.25 0 0 1-.354 0 .25.25 0 0 1 0-.353L6.646 6 5.073 4.427a.25.25 0 0 1 .354-.353L7 5.646l1.573-1.572a.25.25 0 0 1 .353.353z"},null,-1)])])}var Xc={render:TS},ES=["data-call-status"],AS={key:0,class:"webphone-actions__idle wp:!w-full wp:flex wp:flex-col wp:items-center wp:space-y-2 wp:mb-4"},kS={key:2,class:"webphone-actions__connected wp:w-full wp:flex wp:flex-col wp:items-center wp:gap-3"},IS={class:"webphone-actions__row wp:flex wp:items-center wp:gap-6"},RS={class:"webphone-actions__dialer wp:w-full wp:max-w-80 wp:relative"},$S=["data-visible"],PS={key:3,class:"webphone-actions__calling wp:w-full wp:flex wp:flex-col wp:items-center wp:gap-3"},DS={class:"webphone-actions__dialer wp:w-full wp:max-w-80 wp:relative"},OS=["data-visible"],HS={key:4,class:"webphone-actions__transfer-state wp:absolute wp:inset-x-0 wp:bottom-full wp:mb-2 wp:flex wp:justify-center wp:gap-2"},MS=X({__name:"CallActions",props:{destination:{},isVideo:{type:Boolean},onAnswer:{type:Function},onHangup:{type:Function},onReject:{type:Function}},emits:["transfer","completeTransfer","cancelTransfer"],setup(e,{emit:t}){const r=Ft("webphone"),{makeCall:n,hangupCall:s,answerCall:i,toggleMute:o,toggleHold:a,sendDTMF:l}=Ft("sip"),u=/^[0-9*#]+$/,c=C=>{if(u.test(C)){for(const _ of C)l(_);for(const _ of C)r.appendKeypad(_)}},d=C=>{C.ctrlKey||C.metaKey||C.altKey||C.key.length!==1||(C.preventDefault(),C.stopPropagation(),c(C.key))},p=C=>{C.data&&(C.preventDefault(),C.stopPropagation(),c(C.data))},h=C=>{C.preventDefault(),C.stopPropagation(),c(C.clipboardData?.getData("text").replace(/\s/g,"")||"")};Me(()=>r.callStatus,(C,_)=>{C==="connected"&&_!=="connected"&&r.clearKeypad()});const m=e,w=t,x=V(()=>!!r.transferInProgress),g=V(()=>m.destination||r.keypadValue||r.lastDialedNumber||""),S=V(()=>!!m.destination||/^[+]?[0-9*#]+$/.test(r.keypadValue)),b=V(()=>S.value||!!r.lastDialedNumber),y=V(()=>!m.isVideo||!S.value?!1:g.value?/^[0-9*#]{1,5}$/.test(g.value):!0),T=async C=>{try{m.destination?await n(m.destination,C):r.keypadValue?await n(r.keypadValue,C):r.lastDialedNumber&&(r.keypadValue=r.lastDialedNumber)}catch(_){if(console.error("Error initiating call:",_),C){let E="No se pudo acceder a la cámara.";const P=_ instanceof Error?_.name:String(_);P==="NotReadableError"?E="La cámara parece estar en uso por otra aplicación (ej: Zoom, Meet) o no se puede acceder al hardware.":P==="NotAllowedError"||P==="PermissionDeniedError"?E="Permiso de cámara denegado. Por favor, permita el acceso a la cámara.":P==="NotFoundError"?E="No se detectó ninguna cámara en el sistema.":E+=" "+(_ instanceof Error?_.message:String(_)),confirm(`${E}
74
+ `))}return()=>s.value||n.value||o.value?vr(t.default({present:o.value})[0],{ref:u=>{const c=rr(u);return typeof c?.hasAttribute>"u"||(c?.hasAttribute("data-reka-popper-content-wrapper")?i.value=c.firstElementChild:i.value=c),c}}):null}}),yc=X({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:r}){return()=>{if(!r.default)return null;const n=oc(r.default()),s=n.findIndex(l=>l.type!==ht);if(s===-1)return n;const i=n[s];delete i.props?.ref;const o=i.props?me(t,i.props):t,a=Ir({...i,props:{}},o);return n.length===1?a:(n[s]=a,n)}}}),Xb=["area","img","input"],We=X({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(e,{attrs:t,slots:r}){const n=e.asChild?"template":e.as;return typeof n=="string"&&Xb.includes(n)?()=>vr(n,t):n!=="template"?()=>vr(e.as,t,{default:r.default}):()=>vr(yc,t,{default:r.default})}});function bc(){const e=F();return{primitiveElement:e,currentElement:V(()=>["#text","#comment"].includes(e.value?.$el.nodeName)?e.value?.$el.nextElementSibling:rr(e))}}var[Fn,Qb]=Pt("DialogRoot"),e1=X({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1,default:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(e,{emit:t}){const r=e,n=ds(r,"open",t,{defaultValue:r.defaultOpen,passive:r.open===void 0}),s=F(),i=F(),{modal:o}=Nt(r);return Qb({open:n,modal:o,openModal:()=>{n.value=!0},onOpenChange:a=>{n.value=a},onOpenToggle:()=>{n.value=!n.value},contentId:"",titleId:"",descriptionId:"",triggerElement:s,contentElement:i}),(a,l)=>ne(a.$slots,"default",{open:f(n),close:()=>n.value=!1})}}),t1=X({__name:"DialogClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e;Pe();const r=Fn();return(n,s)=>($(),U(f(We),me(t,{type:n.as==="button"?"button":void 0,onClick:s[0]||(s[0]=i=>f(r).onOpenChange(!1))}),{default:k(()=>[ne(n.$slots,"default")]),_:3},16,["type"]))}}),r1="dismissableLayer.pointerDownOutside",n1="dismissableLayer.focusOutside";function _h(e,t){const r=t.closest("[data-dismissable-layer]"),n=e.dataset.dismissableLayer===""?e:e.querySelector("[data-dismissable-layer]"),s=Array.from(e.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(r&&(n===r||s.indexOf(n)<s.indexOf(r)))}function s1(e,t,r=!0){const n=t?.value?.ownerDocument??globalThis?.document,s=F(!1),i=F(()=>{});return ct(o=>{if(!Bt||!$e(r))return;const a=async u=>{const c=u.target;if(!(!t?.value||!c)){if(_h(t.value,c)){s.value=!1;return}if(u.target&&!s.value){let h=function(){sc(r1,e,p)};var d=h;const p={originalEvent:u};u.pointerType==="touch"?(n.removeEventListener("click",i.value),i.value=h,n.addEventListener("click",i.value,{once:!0})):h()}else n.removeEventListener("click",i.value);s.value=!1}},l=window.setTimeout(()=>{n.addEventListener("pointerdown",a)},0);o(()=>{window.clearTimeout(l),n.removeEventListener("pointerdown",a),n.removeEventListener("click",i.value)})}),{onPointerDownCapture:()=>{$e(r)&&(s.value=!0)}}}function i1(e,t,r=!0){const n=t?.value?.ownerDocument??globalThis?.document,s=F(!1);return ct(i=>{if(!Bt||!$e(r))return;const o=async a=>{if(!t?.value)return;await Et(),await Et();const l=a.target;!t.value||!l||_h(t.value,l)||a.target&&!s.value&&sc(n1,e,{originalEvent:a})};n.addEventListener("focusin",o),i(()=>n.removeEventListener("focusin",o))}),{onFocusCapture:()=>{$e(r)&&(s.value=!0)},onBlurCapture:()=>{$e(r)&&(s.value=!1)}}}var _r=Qr({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,originalBodyPointerEvents:void 0,branches:new Set}),_c=X({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(e,{emit:t}){const r=e,n=t,{forwardRef:s,currentElement:i}=Pe(),o=V(()=>i.value?.ownerDocument??globalThis.document),a=V(()=>_r.layersRoot),l=V(()=>i.value?Array.from(a.value).indexOf(i.value):-1),u=V(()=>_r.layersWithOutsidePointerEventsDisabled.size>0),c=V(()=>{const h=Array.from(a.value),[m]=[..._r.layersWithOutsidePointerEventsDisabled].slice(-1),w=h.indexOf(m);return l.value>=w}),d=s1(async h=>{const m=[..._r.branches].some(w=>w?.contains(h.target));!c.value||m||(n("pointerDownOutside",h),n("interactOutside",h),await Et(),h.defaultPrevented||n("dismiss"))},i),p=i1(h=>{[..._r.branches].some(m=>m?.contains(h.target))||(n("focusOutside",h),n("interactOutside",h),h.defaultPrevented||n("dismiss"))},i);return xb("Escape",h=>{l.value===a.value.size-1&&(n("escapeKeyDown",h),h.defaultPrevented||n("dismiss"))}),ct(h=>{i.value&&(r.disableOutsidePointerEvents&&(_r.layersWithOutsidePointerEventsDisabled.size===0&&(_r.originalBodyPointerEvents=o.value.body.style.pointerEvents,o.value.body.style.pointerEvents="none"),_r.layersWithOutsidePointerEventsDisabled.add(i.value)),a.value.add(i.value),h(()=>{r.disableOutsidePointerEvents&&_r.layersWithOutsidePointerEventsDisabled.size===1&&!ic(_r.originalBodyPointerEvents)&&(o.value.body.style.pointerEvents=_r.originalBodyPointerEvents)}))}),ct(h=>{h(()=>{i.value&&(a.value.delete(i.value),_r.layersWithOutsidePointerEventsDisabled.delete(i.value))})}),(h,m)=>($(),U(f(We),{ref:f(s),"as-child":h.asChild,as:h.as,"data-dismissable-layer":"",style:St({pointerEvents:u.value?c.value?"auto":"none":void 0}),onFocusCapture:f(p).onFocusCapture,onBlurCapture:f(p).onBlurCapture,onPointerdownCapture:f(d).onPointerDownCapture},{default:k(()=>[ne(h.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),o1=tb(()=>F([]));function a1(){const e=o1();return{add(t){const r=e.value[0];t!==r&&r?.pause(),e.value=Sh(e.value,t),e.value.unshift(t)},remove(t){e.value=Sh(e.value,t),e.value[0]?.resume()}}}function Sh(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}var Sc="focusScope.autoFocusOnMount",Cc="focusScope.autoFocusOnUnmount",Ch={bubbles:!1,cancelable:!0};function l1(e,{select:t=!1}={}){const r=ar();for(const n of e)if(Vn(n,{select:t}),ar()!==r)return!0}function c1(e){const t=xh(e);return[Th(t,e),Th(t.reverse(),e)]}function xh(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Th(e,t){for(const r of e)if(!u1(r,{upTo:t}))return r}function u1(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function d1(e){return e instanceof HTMLInputElement&&"select"in e}function Vn(e,{select:t=!1}={}){if(e&&e.focus){const r=ar();e.focus({preventScroll:!0}),e!==r&&d1(e)&&t&&e.select()}}var Eh=X({__name:"FocusScope",props:{loop:{type:Boolean,required:!1,default:!1},trapped:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["mountAutoFocus","unmountAutoFocus"],setup(e,{emit:t}){const r=e,n=t,{currentRef:s,currentElement:i}=Pe(),o=F(null),a=a1(),l=Qr({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});ct(c=>{if(!Bt)return;const d=i.value;if(!r.trapped)return;function p(x){if(l.paused||!d)return;const v=x.target;d.contains(v)?o.value=v:Vn(o.value,{select:!0})}function h(x){if(l.paused||!d)return;const v=x.relatedTarget;v!==null&&(d.contains(v)||Vn(o.value,{select:!0}))}function m(x){d.contains(o.value)||Vn(d)}document.addEventListener("focusin",p),document.addEventListener("focusout",h);const w=new MutationObserver(m);d&&w.observe(d,{childList:!0,subtree:!0}),c(()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",h),w.disconnect()})}),ct(async c=>{const d=i.value;if(await Et(),!d)return;a.add(l);const p=ar();if(!d.contains(p)){const h=new CustomEvent(Sc,Ch);d.addEventListener(Sc,m=>n("mountAutoFocus",m)),d.dispatchEvent(h),h.defaultPrevented||(l1(xh(d),{select:!0}),ar()===p&&Vn(d))}c(()=>{d.removeEventListener(Sc,w=>n("mountAutoFocus",w));const h=new CustomEvent(Cc,Ch),m=w=>{n("unmountAutoFocus",w)};d.addEventListener(Cc,m),d.dispatchEvent(h),setTimeout(()=>{h.defaultPrevented||Vn(p??document.body,{select:!0}),d.removeEventListener(Cc,m),a.remove(l)},0)})});function u(c){if(!r.loop&&!r.trapped||l.paused)return;const d=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,p=ar();if(d&&p){const h=c.currentTarget,[m,w]=c1(h);m&&w?!c.shiftKey&&p===w?(c.preventDefault(),r.loop&&Vn(m,{select:!0})):c.shiftKey&&p===m&&(c.preventDefault(),r.loop&&Vn(w,{select:!0})):p===h&&c.preventDefault()}}return(c,d)=>($(),U(f(We),{ref_key:"currentRef",ref:s,tabindex:"-1","as-child":c.asChild,as:c.as,onKeydown:u},{default:k(()=>[ne(c.$slots,"default")]),_:3},8,["as-child","as"]))}}),Ah=["Enter"," "],f1=["ArrowDown","PageUp","Home"],p1=["ArrowUp","PageDown","End"],OT=[...f1,...p1],HT={ltr:[...Ah,"ArrowRight"],rtl:[...Ah,"ArrowLeft"]};function h1(e){return e?"open":"closed"}function kh(e){const t=ar();for(const r of e)if(r===t||(r.focus(),ar()!==t))return}var Ih=X({__name:"DialogContentImpl",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=e,n=t,s=Fn(),{forwardRef:i,currentElement:o}=Pe();return s.titleId||(s.titleId=js(void 0,"reka-dialog-title")),s.descriptionId||(s.descriptionId=js(void 0,"reka-dialog-description")),tt(()=>{s.contentElement=o,ar()!==document.body&&(s.triggerElement.value=ar())}),(a,l)=>($(),U(f(Eh),{"as-child":"",loop:"",trapped:r.trapFocus,onMountAutoFocus:l[5]||(l[5]=u=>n("openAutoFocus",u)),onUnmountAutoFocus:l[6]||(l[6]=u=>n("closeAutoFocus",u))},{default:k(()=>[O(f(_c),me({id:f(s).contentId,ref:f(i),as:a.as,"as-child":a.asChild,"disable-outside-pointer-events":a.disableOutsidePointerEvents,role:"dialog","aria-describedby":f(s).descriptionId,"aria-labelledby":f(s).titleId,"data-state":f(h1)(f(s).open.value)},a.$attrs,{onDismiss:l[0]||(l[0]=u=>f(s).onOpenChange(!1)),onEscapeKeyDown:l[1]||(l[1]=u=>n("escapeKeyDown",u)),onFocusOutside:l[2]||(l[2]=u=>n("focusOutside",u)),onInteractOutside:l[3]||(l[3]=u=>n("interactOutside",u)),onPointerDownOutside:l[4]||(l[4]=u=>n("pointerDownOutside",u))}),{default:k(()=>[ne(a.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),g1=X({__name:"DialogContentModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=e,n=t,s=Fn(),i=da(n),{forwardRef:o,currentElement:a}=Pe();return wh(a),(l,u)=>($(),U(Ih,me({...r,...f(i)},{ref:f(o),"trap-focus":f(s).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:u[0]||(u[0]=c=>{c.defaultPrevented||(c.preventDefault(),f(s).triggerElement.value?.focus())}),onPointerDownOutside:u[1]||(u[1]=c=>{const d=c.detail.originalEvent,p=d.button===0&&d.ctrlKey===!0;(d.button===2||p)&&c.preventDefault()}),onFocusOutside:u[2]||(u[2]=c=>{c.preventDefault()})}),{default:k(()=>[ne(l.$slots,"default")]),_:3},16,["trap-focus"]))}}),v1=X({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=e,n=da(t);Pe();const s=Fn(),i=F(!1),o=F(!1);return(a,l)=>($(),U(Ih,me({...r,...f(n)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:l[0]||(l[0]=u=>{u.defaultPrevented||(i.value||f(s).triggerElement.value?.focus(),u.preventDefault()),i.value=!1,o.value=!1}),onInteractOutside:l[1]||(l[1]=u=>{u.defaultPrevented||(i.value=!0,u.detail.originalEvent.type==="pointerdown"&&(o.value=!0));const c=u.target;f(s).triggerElement.value?.contains(c)&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&o.value&&u.preventDefault()})}),{default:k(()=>[ne(a.$slots,"default")]),_:3},16))}}),m1=X({__name:"DialogContent",props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=e,n=t,s=Fn(),i=da(n),{forwardRef:o}=Pe();return(a,l)=>($(),U(f(Ln),{present:a.forceMount||f(s).open.value},{default:k(()=>[f(s).modal.value?($(),U(g1,me({key:0,ref:f(o)},{...r,...f(i),...a.$attrs}),{default:k(()=>[ne(a.$slots,"default")]),_:3},16)):($(),U(v1,me({key:1,ref:f(o)},{...r,...f(i),...a.$attrs}),{default:k(()=>[ne(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),w1=X({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=Fn();return hh(!0),Pe(),(r,n)=>($(),U(f(We),{as:r.as,"as-child":r.asChild,"data-state":f(t).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:k(()=>[ne(r.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),y1=X({__name:"DialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=Fn(),{forwardRef:r}=Pe();return(n,s)=>f(t)?.modal.value?($(),U(f(Ln),{key:0,present:n.forceMount||f(t).open.value},{default:k(()=>[O(w1,me(n.$attrs,{ref:f(r),as:n.as,"as-child":n.asChild}),{default:k(()=>[ne(n.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):Be("v-if",!0)}}),xc=X({__name:"Teleport",props:{to:{type:null,required:!1,default:"body"},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=uc();return(r,n)=>f(t)||r.forceMount?($(),U(el,{key:0,to:r.to,disabled:r.disabled,defer:r.defer},[ne(r.$slots,"default")],8,["to","disabled","defer"])):Be("v-if",!0)}}),b1=X({__name:"DialogPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=e;return(r,n)=>($(),U(f(xc),fr(nr(t)),{default:k(()=>[ne(r.$slots,"default")]),_:3},16))}}),_1=X({__name:"DialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(e){const t=e,r=Fn();return Pe(),(n,s)=>($(),U(f(We),me(t,{id:f(r).titleId}),{default:k(()=>[ne(n.$slots,"default")]),_:3},16,["id"]))}}),Rh="data-reka-collection-item";function gn(e={}){const{key:t="",isProvider:r=!1}=e,n=`${t}CollectionProvider`;let s;r?(s={collectionRef:F(),itemMap:F(new Map)},Xn(n,s)):s=Vt(n);const i=(l=!1)=>{const u=s.collectionRef.value;if(!u)return[];const c=Array.from(u.querySelectorAll(`[${Rh}]`)),d=Array.from(s.itemMap.value.values()).sort((p,h)=>c.indexOf(p.ref)-c.indexOf(h.ref));return l?d:d.filter(p=>p.ref.dataset.disabled!=="")},o=X({name:"CollectionSlot",inheritAttrs:!1,setup(l,{slots:u,attrs:c}){const{primitiveElement:d,currentElement:p}=bc();return He(p,()=>{s.collectionRef.value=p.value}),()=>vr(yc,{ref:d,...c},u)}}),a=X({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(l,{slots:u,attrs:c}){const{primitiveElement:d,currentElement:p}=bc();return ct(h=>{if(p.value){const m=Ga(p.value);s.itemMap.value.set(m,{ref:p.value,value:l.value}),h(()=>s.itemMap.value.delete(m))}}),()=>vr(yc,{...c,[Rh]:"",ref:d},u)}});return{getItems:i,reactiveItems:V(()=>Array.from(s.itemMap.value.values())),itemMapSize:V(()=>s.itemMap.value.size),CollectionSlot:o,CollectionItem:a}}var Tc=X({__name:"VisuallyHidden",props:{feature:{type:String,required:!1,default:"focusable"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){return(t,r)=>($(),U(f(We),{as:t.as,"as-child":t.asChild,"aria-hidden":t.feature==="focusable"?"true":void 0,"data-hidden":t.feature==="fully-hidden"?"":void 0,tabindex:t.feature==="fully-hidden"?"-1":void 0,style:{position:"absolute",border:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",wordWrap:"normal",top:"-1px",left:"-1px"}},{default:k(()=>[ne(t.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}}),$h=X({inheritAttrs:!1,__name:"VisuallyHiddenInputBubble",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(e){const t=e,{primitiveElement:r,currentElement:n}=bc();return He(V(()=>t.checked??t.value),(s,i)=>{if(!n.value)return;const o=n.value,a=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(a,"value").set;if(l&&s!==i){const u=new Event("input",{bubbles:!0}),c=new Event("change",{bubbles:!0});l.call(o,s),o.dispatchEvent(u),o.dispatchEvent(c)}}),(s,i)=>($(),U(Tc,me({ref_key:"primitiveElement",ref:r},{...t,...s.$attrs},{as:"input"}),null,16))}}),Ph=X({inheritAttrs:!1,__name:"VisuallyHiddenInput",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(e){const t=e,r=V(()=>typeof t.value=="object"&&Array.isArray(t.value)&&t.value.length===0&&t.required),n=V(()=>typeof t.value=="string"||typeof t.value=="number"||typeof t.value=="boolean"||t.value===null||t.value===void 0?[{name:t.name,value:t.value}]:typeof t.value=="object"&&Array.isArray(t.value)?t.value.flatMap((s,i)=>typeof s=="object"?Object.entries(s).map(([o,a])=>({name:`${t.name}[${i}][${o}]`,value:a})):{name:`${t.name}[${i}]`,value:s}):t.value!==null&&typeof t.value=="object"&&!Array.isArray(t.value)?Object.entries(t.value).map(([s,i])=>({name:`${t.name}[${s}]`,value:i})):[]);return(s,i)=>($(),Ce(Ke,null,[Be(" We render single input if it's required "),r.value?($(),U($h,me({key:s.name},{...t,...s.$attrs},{name:s.name,value:s.value}),null,16,["name","value"])):($(!0),Ce(Ke,{key:1},gr(n.value,o=>($(),U($h,me({key:o.name},{ref_for:!0},{...t,...s.$attrs},{name:o.name,value:o.value}),null,16,["name","value"]))),128))],2112))}}),[Dh,S1]=Pt("PopperRoot"),Oh=X({inheritAttrs:!1,__name:"PopperRoot",setup(e){const t=F();return S1({anchor:t,onAnchorChange:r=>t.value=r}),(r,n)=>ne(r.$slots,"default")}}),Hh=X({__name:"PopperAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:r,currentElement:n}=Pe(),s=Dh();return Xa(()=>{s.onAnchorChange(t.reference??n.value)}),(i,o)=>($(),U(f(We),{ref:f(r),as:i.as,"as-child":i.asChild},{default:k(()=>[ne(i.$slots,"default")]),_:3},8,["as","as-child"]))}}),C1={key:0,d:"M0 0L6 6L12 0"},x1={key:1,d:"M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0"},T1=X({__name:"Arrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(e){const t=e;return Pe(),(r,n)=>($(),U(f(We),me(t,{width:r.width,height:r.height,viewBox:r.asChild?void 0:"0 0 12 6",preserveAspectRatio:r.asChild?void 0:"none"}),{default:k(()=>[ne(r.$slots,"default",{},()=>[r.rounded?($(),Ce("path",x1)):($(),Ce("path",C1))])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}});function E1(e){return e!==null}function A1(e){return{name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:s}=t,i=s.arrow?.centerOffset!==0,o=i?0:e.arrowWidth,a=i?0:e.arrowHeight,[l,u]=Ec(r),c={start:"0%",center:"50%",end:"100%"}[u],d=(s.arrow?.x??0)+o/2,p=(s.arrow?.y??0)+a/2;let h="",m="";return l==="bottom"?(h=i?c:`${d}px`,m=`${-a}px`):l==="top"?(h=i?c:`${d}px`,m=`${n.floating.height+a}px`):l==="right"?(h=`${-a}px`,m=i?c:`${p}px`):l==="left"&&(h=`${n.floating.width+a}px`,m=i?c:`${p}px`),{data:{x:h,y:m}}}}}function Ec(e){const[t,r="center"]=e.split("-");return[t,r]}var k1=["top","right","bottom","left"],jn=Math.min,lr=Math.max,ga=Math.round,va=Math.floor,Ur=e=>({x:e,y:e}),I1={left:"right",right:"left",bottom:"top",top:"bottom"};function Ac(e,t,r){return lr(e,jn(t,r))}function vn(e,t){return typeof e=="function"?e(t):e}function mn(e){return e.split("-")[0]}function Us(e){return e.split("-")[1]}function kc(e){return e==="x"?"y":"x"}function Ic(e){return e==="y"?"height":"width"}function zr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Rc(e){return kc(zr(e))}function R1(e,t,r){r===void 0&&(r=!1);const n=Us(e),s=Rc(e),i=Ic(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=ma(o)),[o,ma(o)]}function $1(e){const t=ma(e);return[$c(e),t,$c(t)]}function $c(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Mh=["left","right"],Nh=["right","left"],P1=["top","bottom"],D1=["bottom","top"];function O1(e,t,r){switch(e){case"top":case"bottom":return r?t?Nh:Mh:t?Mh:Nh;case"left":case"right":return t?P1:D1;default:return[]}}function H1(e,t,r,n){const s=Us(e);let i=O1(mn(e),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map($c)))),i}function ma(e){const t=mn(e);return I1[t]+e.slice(t.length)}function M1(e){return{top:0,right:0,bottom:0,left:0,...e}}function qh(e){return typeof e!="number"?M1(e):{top:e,right:e,bottom:e,left:e}}function wa(e){const{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function Bh(e,t,r){let{reference:n,floating:s}=e;const i=zr(t),o=Rc(t),a=Ic(o),l=mn(t),u=i==="y",c=n.x+n.width/2-s.width/2,d=n.y+n.height/2-s.height/2,p=n[a]/2-s[a]/2;let h;switch(l){case"top":h={x:c,y:n.y-s.height};break;case"bottom":h={x:c,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:d};break;case"left":h={x:n.x-s.width,y:d};break;default:h={x:n.x,y:n.y}}switch(Us(t)){case"start":h[o]-=p*(r&&u?-1:1);break;case"end":h[o]+=p*(r&&u?-1:1);break}return h}async function N1(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=vn(t,e),m=qh(h),w=a[p?d==="floating"?"reference":"floating":d],x=wa(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(w)))==null||r?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),v=d==="floating"?{x:n,y:s,width:o.floating.width,height:o.floating.height}:o.reference,S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),b=await(i.isElement==null?void 0:i.isElement(S))?await(i.getScale==null?void 0:i.getScale(S))||{x:1,y:1}:{x:1,y:1},y=wa(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:S,strategy:l}):v);return{top:(x.top-y.top+m.top)/b.y,bottom:(y.bottom-x.bottom+m.bottom)/b.y,left:(x.left-y.left+m.left)/b.x,right:(y.right-x.right+m.right)/b.x}}var q1=50,B1=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:N1},l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:c,y:d}=Bh(u,n,l),p=n,h=0;const m={};for(let w=0;w<i.length;w++){const x=i[w];if(!x)continue;const{name:v,fn:S}=x,{x:b,y,data:T,reset:I}=await S({x:c,y:d,initialPlacement:n,placement:p,strategy:s,middlewareData:m,rects:u,platform:a,elements:{reference:e,floating:t}});c=b??c,d=y??d,m[v]={...m[v],...T},I&&h<q1&&(h++,typeof I=="object"&&(I.placement&&(p=I.placement),I.rects&&(u=I.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):I.rects),{x:c,y:d}=Bh(u,p,l)),w=-1)}return{x:c,y:d,placement:p,strategy:s,middlewareData:m}},L1=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:u,padding:c=0}=vn(e,t)||{};if(u==null)return{};const d=qh(c),p={x:r,y:n},h=Rc(s),m=Ic(h),w=await o.getDimensions(u),x=h==="y",v=x?"top":"left",S=x?"bottom":"right",b=x?"clientHeight":"clientWidth",y=i.reference[m]+i.reference[h]-p[h]-i.floating[m],T=p[h]-i.reference[h],I=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let N=I?I[b]:0;(!N||!await(o.isElement==null?void 0:o.isElement(I)))&&(N=a.floating[b]||i.floating[m]);const g=y/2-T/2,B=N/2-w[m]/2-1,q=jn(d[v],B),C=jn(d[S],B),_=q,E=N-w[m]-C,P=N/2-w[m]/2+g,R=Ac(_,P,E),D=!l.arrow&&Us(s)!=null&&P!==R&&i.reference[m]/2-(P<_?q:C)-w[m]/2<0,G=D?P<_?P-_:P-E:0;return{[h]:p[h]+G,data:{[h]:R,centerOffset:P-R-G,...D&&{alignmentOffset:G}},reset:D}}}),F1=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:w=!0,...x}=vn(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const v=mn(s),S=zr(a),b=mn(a)===a,y=await(l.isRTL==null?void 0:l.isRTL(u.floating)),T=p||(b||!w?[ma(a)]:$1(a)),I=m!=="none";!p&&I&&T.push(...H1(a,w,m,y));const N=[a,...T],g=await l.detectOverflow(t,x),B=[];let q=((n=i.flip)==null?void 0:n.overflows)||[];if(c&&B.push(g[v]),d){const P=R1(s,o,y);B.push(g[P[0]],g[P[1]])}if(q=[...q,{placement:s,overflows:B}],!B.every(P=>P<=0)){var C,_;const P=(((C=i.flip)==null?void 0:C.index)||0)+1,R=N[P];if(R&&(!(d==="alignment"&&S!==zr(R))||q.every(G=>zr(G.placement)===S?G.overflows[0]>0:!0)))return{data:{index:P,overflows:q},reset:{placement:R}};let D=(_=q.filter(G=>G.overflows[0]<=0).sort((G,W)=>G.overflows[1]-W.overflows[1])[0])==null?void 0:_.placement;if(!D)switch(h){case"bestFit":{var E;const G=(E=q.filter(W=>{if(I){const ae=zr(W.placement);return ae===S||ae==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(ae=>ae>0).reduce((ae,Y)=>ae+Y,0)]).sort((W,ae)=>W[1]-ae[1])[0])==null?void 0:E[0];G&&(D=G);break}case"initialPlacement":D=a;break}if(s!==D)return{reset:{placement:D}}}return{}}}};function Lh(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Fh(e){return k1.some(t=>e[t]>=0)}var V1=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:s="referenceHidden",...i}=vn(e,t);switch(s){case"referenceHidden":{const o=Lh(await n.detectOverflow(t,{...i,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Fh(o)}}}case"escaped":{const o=Lh(await n.detectOverflow(t,{...i,altBoundary:!0}),r.floating);return{data:{escapedOffsets:o,escaped:Fh(o)}}}default:return{}}}}},Vh=new Set(["left","top"]);async function j1(e,t){const{placement:r,platform:n,elements:s}=e,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=mn(r),a=Us(r),l=zr(r)==="y",u=Vh.has(o)?-1:1,c=i&&l?-1:1,d=vn(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof m=="number"&&(h=a==="end"?m*-1:m),l?{x:h*c,y:p*u}:{x:p*u,y:h*c}}var U1=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:i,placement:o,middlewareData:a}=t,l=await j1(t,e);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},z1=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s,platform:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:v=>{let{x:S,y:b}=v;return{x:S,y:b}}},...u}=vn(e,t),c={x:r,y:n},d=await i.detectOverflow(t,u),p=zr(mn(s)),h=kc(p);let m=c[h],w=c[p];if(o){const v=h==="y"?"top":"left",S=h==="y"?"bottom":"right",b=m+d[v],y=m-d[S];m=Ac(b,m,y)}if(a){const v=p==="y"?"top":"left",S=p==="y"?"bottom":"right",b=w+d[v],y=w-d[S];w=Ac(b,w,y)}const x=l.fn({...t,[h]:m,[p]:w});return{...x,data:{x:x.x-r,y:x.y-n,enabled:{[h]:o,[p]:a}}}}}},K1=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=vn(e,t),c={x:r,y:n},d=zr(s),p=kc(d);let h=c[p],m=c[d];const w=vn(a,t),x=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const b=p==="y"?"height":"width",y=i.reference[p]-i.floating[b]+x.mainAxis,T=i.reference[p]+i.reference[b]-x.mainAxis;h<y?h=y:h>T&&(h=T)}if(u){var v,S;const b=p==="y"?"width":"height",y=Vh.has(mn(s)),T=i.reference[d]-i.floating[b]+(y&&((v=o.offset)==null?void 0:v[d])||0)+(y?0:x.crossAxis),I=i.reference[d]+i.reference[b]+(y?0:((S=o.offset)==null?void 0:S[d])||0)-(y?x.crossAxis:0);m<T?m=T:m>I&&(m=I)}return{[p]:h,[d]:m}}}},W1=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:i,platform:o,elements:a}=t,{apply:l=()=>{},...u}=vn(e,t),c=await o.detectOverflow(t,u),d=mn(s),p=Us(s),h=zr(s)==="y",{width:m,height:w}=i.floating;let x,v;d==="top"||d==="bottom"?(x=d,v=p===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,x=p==="end"?"top":"bottom");const S=w-c.top-c.bottom,b=m-c.left-c.right,y=jn(w-c[x],S),T=jn(m-c[v],b),I=!t.middlewareData.shift;let N=y,g=T;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(g=b),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(N=S),I&&!p){const q=lr(c.left,0),C=lr(c.right,0),_=lr(c.top,0),E=lr(c.bottom,0);h?g=m-2*(q!==0||C!==0?q+C:lr(c.left,c.right)):N=w-2*(_!==0||E!==0?_+E:lr(c.top,c.bottom))}await l({...t,availableWidth:g,availableHeight:N});const B=await o.getDimensions(a.floating);return m!==B.width||w!==B.height?{reset:{rects:!0}}:{}}}};function ya(){return typeof window<"u"}function fs(e){return Pc(e)?(e.nodeName||"").toLowerCase():"#document"}function cr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Kr(e){var t;return(t=(Pc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Pc(e){return ya()?e instanceof Node||e instanceof cr(e).Node:!1}function Dr(e){return ya()?e instanceof Element||e instanceof cr(e).Element:!1}function wn(e){return ya()?e instanceof HTMLElement||e instanceof cr(e).HTMLElement:!1}function jh(e){return!ya()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof cr(e).ShadowRoot}function Li(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=Or(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&s!=="inline"&&s!=="contents"}function G1(e){return/^(table|td|th)$/.test(fs(e))}function ba(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var J1=/transform|translate|scale|rotate|perspective|filter/,Y1=/paint|layout|strict|content/,ps=e=>!!e&&e!=="none",Dc;function Oc(e){const t=Dr(e)?Or(e):e;return ps(t.transform)||ps(t.translate)||ps(t.scale)||ps(t.rotate)||ps(t.perspective)||!Hc()&&(ps(t.backdropFilter)||ps(t.filter))||J1.test(t.willChange||"")||Y1.test(t.contain||"")}function Z1(e){let t=Un(e);for(;wn(t)&&!zs(t);){if(Oc(t))return t;if(ba(t))return null;t=Un(t)}return null}function Hc(){return Dc==null&&(Dc=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Dc}function zs(e){return/^(html|body|#document)$/.test(fs(e))}function Or(e){return cr(e).getComputedStyle(e)}function _a(e){return Dr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Un(e){if(fs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||jh(e)&&e.host||Kr(e);return jh(t)?t.host:t}function Uh(e){const t=Un(e);return zs(t)?e.ownerDocument?e.ownerDocument.body:e.body:wn(t)&&Li(t)?t:Uh(t)}function Fi(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=Uh(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=cr(s);if(i){const a=Mc(o);return t.concat(o,o.visualViewport||[],Li(s)?s:[],a&&r?Fi(a):[])}else return t.concat(s,Fi(s,[],r))}function Mc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function zh(e){const t=Or(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=wn(e),i=s?e.offsetWidth:r,o=s?e.offsetHeight:n,a=ga(r)!==i||ga(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function Nc(e){return Dr(e)?e:e.contextElement}function Ks(e){const t=Nc(e);if(!wn(t))return Ur(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:i}=zh(t);let o=(i?ga(r.width):r.width)/n,a=(i?ga(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var X1=Ur(0);function Kh(e){const t=cr(e);return!Hc()||!t.visualViewport?X1:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Q1(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==cr(e)?!1:t}function hs(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),i=Nc(e);let o=Ur(1);t&&(n?Dr(n)&&(o=Ks(n)):o=Ks(e));const a=Q1(i,r,n)?Kh(i):Ur(0);let l=(s.left+a.x)/o.x,u=(s.top+a.y)/o.y,c=s.width/o.x,d=s.height/o.y;if(i){const p=cr(i),h=n&&Dr(n)?cr(n):n;let m=p,w=Mc(m);for(;w&&n&&h!==m;){const x=Ks(w),v=w.getBoundingClientRect(),S=Or(w),b=v.left+(w.clientLeft+parseFloat(S.paddingLeft))*x.x,y=v.top+(w.clientTop+parseFloat(S.paddingTop))*x.y;l*=x.x,u*=x.y,c*=x.x,d*=x.y,l+=b,u+=y,m=cr(w),w=Mc(m)}}return wa({width:c,height:d,x:l,y:u})}function Sa(e,t){const r=_a(e).scrollLeft;return t?t.left+r:hs(Kr(e)).left+r}function Wh(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-Sa(e,r),y:r.top+t.scrollTop}}function e2(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const i=s==="fixed",o=Kr(n),a=t?ba(t.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},u=Ur(1);const c=Ur(0),d=wn(n);if((d||!d&&!i)&&((fs(n)!=="body"||Li(o))&&(l=_a(n)),d)){const h=hs(n);u=Ks(n),c.x=h.x+n.clientLeft,c.y=h.y+n.clientTop}const p=o&&!d&&!i?Wh(o,l):Ur(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+p.x,y:r.y*u.y-l.scrollTop*u.y+c.y+p.y}}function t2(e){return Array.from(e.getClientRects())}function r2(e){const t=Kr(e),r=_a(e),n=e.ownerDocument.body,s=lr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=lr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+Sa(e);const a=-r.scrollTop;return Or(n).direction==="rtl"&&(o+=lr(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}var Gh=25;function n2(e,t){const r=cr(e),n=Kr(e),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const c=Hc();(!c||c&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}const u=Sa(n);if(u<=0){const c=n.ownerDocument,d=c.body,p=getComputedStyle(d),h=c.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,m=Math.abs(n.clientWidth-d.clientWidth-h);m<=Gh&&(i-=m)}else u<=Gh&&(i+=u);return{width:i,height:o,x:a,y:l}}function s2(e,t){const r=hs(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,i=wn(e)?Ks(e):Ur(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:s*i.x,y:n*i.y}}function Jh(e,t,r){let n;if(t==="viewport")n=n2(e,r);else if(t==="document")n=r2(Kr(e));else if(Dr(t))n=s2(t,r);else{const s=Kh(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return wa(n)}function Yh(e,t){const r=Un(e);return r===t||!Dr(r)||zs(r)?!1:Or(r).position==="fixed"||Yh(r,t)}function i2(e,t){const r=t.get(e);if(r)return r;let n=Fi(e,[],!1).filter(a=>Dr(a)&&fs(a)!=="body"),s=null;const i=Or(e).position==="fixed";let o=i?Un(e):e;for(;Dr(o)&&!zs(o);){const a=Or(o),l=Oc(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&s&&(s.position==="absolute"||s.position==="fixed")||Li(o)&&!l&&Yh(e,o))?n=n.filter(u=>u!==o):s=a,o=Un(o)}return t.set(e,n),n}function o2(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const i=[...r==="clippingAncestors"?ba(t)?[]:i2(t,this._c):[].concat(r),n],o=Jh(t,i[0],s);let a=o.top,l=o.right,u=o.bottom,c=o.left;for(let d=1;d<i.length;d++){const p=Jh(t,i[d],s);a=lr(p.top,a),l=jn(p.right,l),u=jn(p.bottom,u),c=lr(p.left,c)}return{width:l-c,height:u-a,x:c,y:a}}function a2(e){const{width:t,height:r}=zh(e);return{width:t,height:r}}function l2(e,t,r){const n=wn(t),s=Kr(t),i=r==="fixed",o=hs(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Ur(0);function u(){l.x=Sa(s)}if(n||!n&&!i)if((fs(t)!=="body"||Li(s))&&(a=_a(t)),n){const d=hs(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else s&&u();i&&!n&&s&&u();const c=s&&!n&&!i?Wh(s,a):Ur(0);return{x:o.left+a.scrollLeft-l.x-c.x,y:o.top+a.scrollTop-l.y-c.y,width:o.width,height:o.height}}function qc(e){return Or(e).position==="static"}function Zh(e,t){if(!wn(e)||Or(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Kr(e)===r&&(r=r.ownerDocument.body),r}function Xh(e,t){const r=cr(e);if(ba(e))return r;if(!wn(e)){let s=Un(e);for(;s&&!zs(s);){if(Dr(s)&&!qc(s))return s;s=Un(s)}return r}let n=Zh(e,t);for(;n&&G1(n)&&qc(n);)n=Zh(n,t);return n&&zs(n)&&qc(n)&&!Oc(n)?r:n||Z1(e)||r}var c2=async function(e){const t=this.getOffsetParent||Xh,r=this.getDimensions,n=await r(e.floating);return{reference:l2(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function u2(e){return Or(e).direction==="rtl"}var d2={convertOffsetParentRelativeRectToViewportRelativeRect:e2,getDocumentElement:Kr,getClippingRect:o2,getOffsetParent:Xh,getElementRects:c2,getClientRects:t2,getDimensions:a2,getScale:Ks,isElement:Dr,isRTL:u2};function Qh(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function f2(e,t){let r=null,n;const s=Kr(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:c,top:d,width:p,height:h}=u;if(a||t(),!p||!h)return;const m=va(d),w=va(s.clientWidth-(c+p)),x=va(s.clientHeight-(d+h)),v=va(c),S={rootMargin:-m+"px "+-w+"px "+-x+"px "+-v+"px",threshold:lr(0,jn(1,l))||1};let b=!0;function y(T){const I=T[0].intersectionRatio;if(I!==l){if(!b)return o();I?o(!1,I):n=setTimeout(()=>{o(!1,1e-7)},1e3)}I===1&&!Qh(u,e.getBoundingClientRect())&&o(),b=!1}try{r=new IntersectionObserver(y,{...S,root:s.ownerDocument})}catch{r=new IntersectionObserver(y,S)}r.observe(e)}return o(!0),i}function p2(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=Nc(e),c=s||i?[...u?Fi(u):[],...t?Fi(t):[]]:[];c.forEach(v=>{s&&v.addEventListener("scroll",r,{passive:!0}),i&&v.addEventListener("resize",r)});const d=u&&a?f2(u,r):null;let p=-1,h=null;o&&(h=new ResizeObserver(v=>{let[S]=v;S&&S.target===u&&h&&t&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=h)==null||b.observe(t)})),r()}),u&&!l&&h.observe(u),t&&h.observe(t));let m,w=l?hs(e):null;l&&x();function x(){const v=hs(e);w&&!Qh(w,v)&&r(),w=v,m=requestAnimationFrame(x)}return r(),()=>{var v;c.forEach(S=>{s&&S.removeEventListener("scroll",r),i&&S.removeEventListener("resize",r)}),d?.(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(m)}}var h2=U1,g2=z1,eg=F1,v2=W1,m2=V1,w2=L1,y2=K1,b2=(e,t,r)=>{const n=new Map,s={platform:d2,...r},i={...s.platform,_c:n};return B1(e,t,{...s,platform:i})};function _2(e){return e!=null&&typeof e=="object"&&"$el"in e}function Bc(e){if(_2(e)){const t=e.$el;return Pc(t)&&fs(t)==="#comment"?null:t}return e}function Ws(e){return typeof e=="function"?e():f(e)}function S2(e){return{name:"arrow",options:e,fn(t){const r=Bc(Ws(e.element));return r==null?{}:w2({element:r,padding:e.padding}).fn(t)}}}function tg(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function rg(e,t){const r=tg(e);return Math.round(t*r)/r}function C2(e,t,r){r===void 0&&(r={});const n=r.whileElementsMounted,s=V(()=>{var N;return(N=Ws(r.open))!=null?N:!0}),i=V(()=>Ws(r.middleware)),o=V(()=>{var N;return(N=Ws(r.placement))!=null?N:"bottom"}),a=V(()=>{var N;return(N=Ws(r.strategy))!=null?N:"absolute"}),l=V(()=>{var N;return(N=Ws(r.transform))!=null?N:!0}),u=V(()=>Bc(e.value)),c=V(()=>Bc(t.value)),d=F(0),p=F(0),h=F(a.value),m=F(o.value),w=ft({}),x=F(!1),v=V(()=>{const N={position:h.value,left:"0",top:"0"};if(!c.value)return N;const g=rg(c.value,d.value),B=rg(c.value,p.value);return l.value?{...N,transform:"translate("+g+"px, "+B+"px)",...tg(c.value)>=1.5&&{willChange:"transform"}}:{position:h.value,left:g+"px",top:B+"px"}});let S;function b(){if(u.value==null||c.value==null)return;const N=s.value;b2(u.value,c.value,{middleware:i.value,placement:o.value,strategy:a.value}).then(g=>{d.value=g.x,p.value=g.y,h.value=g.strategy,m.value=g.placement,w.value=g.middlewareData,x.value=N!==!1})}function y(){typeof S=="function"&&(S(),S=void 0)}function T(){if(y(),n===void 0){b();return}if(u.value!=null&&c.value!=null){S=n(u.value,c.value,b);return}}function I(){s.value||(x.value=!1)}return He([i,o,a,s],b,{flush:"sync"}),He([u,c],T,{flush:"sync"}),He(s,I,{flush:"sync"}),no()&&qa(y),{x:en(d),y:en(p),strategy:en(h),placement:en(m),middlewareData:en(w),isPositioned:en(x),floatingStyles:v,update:b}}var x2={side:"bottom",sideOffset:0,sideFlip:!0,align:"center",alignOffset:0,alignFlip:!0,arrowPadding:0,hideShiftedArrow:!0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[T2,E2]=Pt("PopperContent"),ng=X({inheritAttrs:!1,__name:"PopperContent",props:kd({side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...x2}),emits:["placed"],setup(e,{emit:t}){const r=e,n=t,s=Dh(),{forwardRef:i,currentElement:o}=Pe(),a=F(),l=F(),{width:u,height:c}=yh(l),d=V(()=>r.side+(r.align!=="center"?`-${r.align}`:"")),p=V(()=>typeof r.collisionPadding=="number"?r.collisionPadding:{top:0,right:0,bottom:0,left:0,...r.collisionPadding}),h=V(()=>Array.isArray(r.collisionBoundary)?r.collisionBoundary:[r.collisionBoundary]),m=V(()=>({padding:p.value,boundary:h.value.filter(E1),altBoundary:h.value.length>0})),w=V(()=>({mainAxis:r.sideFlip,crossAxis:r.alignFlip})),x=Qy(()=>[h2({mainAxis:r.sideOffset+c.value,alignmentAxis:r.alignOffset}),r.prioritizePosition&&r.avoidCollisions&&eg({...m.value,...w.value}),r.avoidCollisions&&g2({mainAxis:!0,crossAxis:!!r.prioritizePosition,limiter:r.sticky==="partial"?y2():void 0,...m.value}),!r.prioritizePosition&&r.avoidCollisions&&eg({...m.value,...w.value}),v2({...m.value,apply:({elements:q,rects:C,availableWidth:_,availableHeight:E})=>{const{width:P,height:R}=C.reference,D=q.floating.style;D.setProperty("--reka-popper-available-width",`${_}px`),D.setProperty("--reka-popper-available-height",`${E}px`),D.setProperty("--reka-popper-anchor-width",`${P}px`),D.setProperty("--reka-popper-anchor-height",`${R}px`)}}),l.value&&S2({element:l.value,padding:r.arrowPadding}),A1({arrowWidth:u.value,arrowHeight:c.value}),r.hideWhenDetached&&m2({strategy:"referenceHidden",...m.value})]),{floatingStyles:v,placement:S,isPositioned:b,middlewareData:y,update:T}=C2(V(()=>r.reference??s.anchor.value),a,{strategy:r.positionStrategy,placement:d,whileElementsMounted:(...q)=>p2(...q,{layoutShift:!r.disableUpdateOnLayoutShift,animationFrame:r.updatePositionStrategy==="always"}),middleware:x}),I=V(()=>Ec(S.value)[0]),N=V(()=>Ec(S.value)[1]);Xa(()=>{b.value&&n("placed")});const g=V(()=>{const q=y.value.arrow?.centerOffset!==0;return r.hideShiftedArrow&&q}),B=F("");return ct(()=>{o.value&&(B.value=window.getComputedStyle(o.value).zIndex)}),E2({placedSide:I,onArrowChange:q=>l.value=q,arrowX:V(()=>y.value.arrow?.x??0),arrowY:V(()=>y.value.arrow?.y??0),shouldHideArrow:g}),(q,C)=>($(),Ce("div",{ref_key:"floatingRef",ref:a,"data-reka-popper-content-wrapper":"",style:St({...f(v),transform:f(b)?f(v).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:B.value,"--reka-popper-transform-origin":[f(y).transformOrigin?.x,f(y).transformOrigin?.y].join(" "),...f(y).hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}})},[O(f(We),me({ref:f(i)},q.$attrs,{"as-child":r.asChild,as:q.as,"data-side":I.value,"data-align":N.value,style:{animation:f(b)?void 0:"none"}}),{default:k(()=>[ne(q.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4))}}),A2={top:"bottom",right:"left",bottom:"top",left:"right"},k2=X({inheritAttrs:!1,__name:"PopperArrow",props:{width:{type:Number,required:!1},height:{type:Number,required:!1},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(e){const{forwardRef:t}=Pe(),r=T2(),n=V(()=>A2[r.placedSide.value]);return(s,i)=>($(),Ce("span",{ref:o=>{f(r).onArrowChange(o)},style:St({position:"absolute",left:f(r).arrowX?.value?`${f(r).arrowX?.value}px`:void 0,top:f(r).arrowY?.value?`${f(r).arrowY?.value}px`:void 0,[n.value]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[f(r).placedSide.value],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[f(r).placedSide.value],visibility:f(r).shouldHideArrow.value?"hidden":void 0})},[O(T1,me(s.$attrs,{ref:f(t),style:{display:"block"},as:s.as,"as-child":s.asChild,rounded:s.rounded,width:s.width,height:s.height}),{default:k(()=>[ne(s.$slots,"default")]),_:3},16,["as","as-child","rounded","width","height"])],4))}});function sg(e){const t=aa({nonce:F()});return V(()=>e?.value||t.nonce?.value)}function I2(e=[],t,r){const n=[...e];return n[r]=t,n.sort((s,i)=>s-i)}function ig(e,t,r){return Bi(100/(r-t)*(e-t),0,100)}function R2(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function $2(e,t){if(e.length===1)return 0;const r=e.map(s=>Math.abs(s-t)),n=Math.min(...r);return r.indexOf(n)}function P2(e,t,r){const n=e/2;return(n-Lc([0,50],[0,n])(t)*r)*r}function D2(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function O2(e,t){if(t>0){const r=D2(e);return Math.min(...r)>=t}return!0}function Lc(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function H2(e){return(String(e).split(".")[1]||"").length}function M2(e,t){const r=10**t;return Math.round(e*r)/r}var og=["PageUp","PageDown"],ag=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],lg={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageUp","ArrowUp","ArrowLeft"]},[cg,ug]=Pt(["SliderVertical","SliderHorizontal"]),N2=X({__name:"SliderHorizontal",props:{dir:{type:String,required:!1},min:{type:Number,required:!0},max:{type:Number,required:!0},inverted:{type:Boolean,required:!0}},emits:["slideEnd","slideStart","slideMove","homeKeyDown","endKeyDown","stepKeyDown"],setup(e,{emit:t}){const r=e,n=t,{max:s,min:i,dir:o,inverted:a}=Nt(r),{forwardRef:l,currentElement:u}=Pe(),c=Gs(),d=F(),p=F(),h=V(()=>o?.value!=="rtl"&&!a.value||o?.value!=="ltr"&&a.value);function m(w,x){const v=p.value||u.value.getBoundingClientRect(),S=[...c.thumbElements.value][c.valueIndexToChangeRef.value],b=c.thumbAlignment.value==="contain"?S.clientWidth:0;!d.value&&!x&&c.thumbAlignment.value==="contain"&&(d.value=w.clientX-S.getBoundingClientRect().left);const y=Lc([0,v.width-b],h.value?[i.value,s.value]:[s.value,i.value]);return p.value=v,y(x?w.clientX-v.left-b/2:w.clientX-v.left-(d.value??0))}return ug({startEdge:V(()=>h.value?"left":"right"),endEdge:V(()=>h.value?"right":"left"),direction:V(()=>h.value?1:-1),size:"width"}),(w,x)=>($(),U(dg,{ref:f(l),dir:f(o),"data-orientation":"horizontal",style:St({"--reka-slider-thumb-transform":!h.value&&f(c).thumbAlignment.value==="overflow"?"translateX(50%)":"translateX(-50%)"}),onSlideStart:x[0]||(x[0]=v=>{n("slideStart",m(v,!0))}),onSlideMove:x[1]||(x[1]=v=>{n("slideMove",m(v))}),onSlideEnd:x[2]||(x[2]=()=>{p.value=void 0,d.value=void 0,n("slideEnd")}),onStepKeyDown:x[3]||(x[3]=v=>{const S=h.value?"from-left":"from-right";n("stepKeyDown",v,f(lg)[S].includes(v.key)?-1:1)}),onEndKeyDown:x[4]||(x[4]=v=>n("endKeyDown",v)),onHomeKeyDown:x[5]||(x[5]=v=>n("homeKeyDown",v))},{default:k(()=>[ne(w.$slots,"default")]),_:3},8,["dir","style"]))}}),q2=X({__name:"SliderVertical",props:{min:{type:Number,required:!0},max:{type:Number,required:!0},inverted:{type:Boolean,required:!0}},emits:["slideEnd","slideStart","slideMove","homeKeyDown","endKeyDown","stepKeyDown"],setup(e,{emit:t}){const r=e,n=t,{max:s,min:i,inverted:o}=Nt(r),a=Gs(),{forwardRef:l,currentElement:u}=Pe(),c=F(),d=F(),p=V(()=>!o.value);function h(m,w){const x=d.value||u.value.getBoundingClientRect(),v=[...a.thumbElements.value][a.valueIndexToChangeRef.value],S=a.thumbAlignment.value==="contain"?v.clientHeight:0;!c.value&&!w&&a.thumbAlignment.value==="contain"&&(c.value=m.clientY-v.getBoundingClientRect().top);const b=Lc([0,x.height-S],p.value?[s.value,i.value]:[i.value,s.value]),y=w?m.clientY-x.top-S/2:m.clientY-x.top-(c.value??0);return d.value=x,b(y)}return ug({startEdge:V(()=>p.value?"bottom":"top"),endEdge:V(()=>p.value?"top":"bottom"),direction:V(()=>p.value?1:-1),size:"height"}),(m,w)=>($(),U(dg,{ref:f(l),"data-orientation":"vertical",style:St({"--reka-slider-thumb-transform":!p.value&&f(a).thumbAlignment.value==="overflow"?"translateY(-50%)":"translateY(50%)"}),onSlideStart:w[0]||(w[0]=x=>{n("slideStart",h(x,!0))}),onSlideMove:w[1]||(w[1]=x=>{n("slideMove",h(x))}),onSlideEnd:w[2]||(w[2]=()=>{d.value=void 0,c.value=void 0,n("slideEnd")}),onStepKeyDown:w[3]||(w[3]=x=>{const v=p.value?"from-bottom":"from-top";n("stepKeyDown",x,f(lg)[v].includes(x.key)?-1:1)}),onEndKeyDown:w[4]||(w[4]=x=>n("endKeyDown",x)),onHomeKeyDown:w[5]||(w[5]=x=>n("homeKeyDown",x))},{default:k(()=>[ne(m.$slots,"default")]),_:3},8,["style"]))}}),[Gs,B2]=Pt("SliderRoot"),L2=X({inheritAttrs:!1,__name:"SliderRoot",props:{defaultValue:{type:Array,required:!1,default:()=>[0]},modelValue:{type:[Array,null],required:!1},disabled:{type:Boolean,required:!1,default:!1},orientation:{type:String,required:!1,default:"horizontal"},dir:{type:String,required:!1},inverted:{type:Boolean,required:!1,default:!1},min:{type:Number,required:!1,default:0},max:{type:Number,required:!1,default:100},step:{type:Number,required:!1,default:1},minStepsBetweenThumbs:{type:Number,required:!1,default:0},thumbAlignment:{type:String,required:!1,default:"contain"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","valueCommit"],setup(e,{emit:t}){const r=e,n=t,{min:s,max:i,step:o,minStepsBetweenThumbs:a,orientation:l,disabled:u,thumbAlignment:c,dir:d}=Nt(r),p=hc(d),{forwardRef:h,currentElement:m}=Pe(),w=vc(m),{CollectionSlot:x}=gn({isProvider:!0}),v=ds(r,"modelValue",n,{defaultValue:r.defaultValue,passive:r.modelValue===void 0}),S=V(()=>Array.isArray(v.value)?[...v.value]:[]),b=F(0),y=F(S.value);function T(q){g(q,$2(S.value,q))}function I(q){g(q,b.value)}function N(){const q=y.value[b.value];S.value[b.value]!==q&&n("valueCommit",ze(S.value))}function g(q,C,{commit:_}={commit:!1}){const E=H2(o.value),P=Bi(M2(Math.round((q-s.value)/o.value)*o.value+s.value,E),s.value,i.value),R=I2(S.value,P,C);if(O2(R,a.value*o.value)){b.value=R.indexOf(P);const D=String(R)!==String(v.value);D&&_&&n("valueCommit",R),D&&(B.value[b.value]?.focus(),v.value=R)}}const B=F([]);return B2({modelValue:v,currentModelValue:S,valueIndexToChangeRef:b,thumbElements:B,orientation:l,min:s,max:i,disabled:u,thumbAlignment:c}),(q,C)=>($(),U(f(x),null,{default:k(()=>[($(),U(yi(f(l)==="horizontal"?N2:q2),me(q.$attrs,{ref:f(h),"as-child":q.asChild,as:q.as,min:f(s),max:f(i),dir:f(p),inverted:q.inverted,"aria-disabled":f(u),"data-disabled":f(u)?"":void 0,onPointerdown:C[0]||(C[0]=()=>{f(u)||(y.value=S.value)}),onSlideStart:C[1]||(C[1]=_=>!f(u)&&T(_)),onSlideMove:C[2]||(C[2]=_=>!f(u)&&I(_)),onSlideEnd:C[3]||(C[3]=_=>!f(u)&&N()),onHomeKeyDown:C[4]||(C[4]=_=>!f(u)&&g(f(s),0,{commit:!0})),onEndKeyDown:C[5]||(C[5]=_=>!f(u)&&g(f(i),S.value.length-1,{commit:!0})),onStepKeyDown:C[6]||(C[6]=(_,E)=>{if(!f(u)){const P=f(og).includes(_.key)||_.shiftKey&&f(ag).includes(_.key)?10:1,R=b.value,D=S.value[R];g(D+f(o)*P*E,R,{commit:!0})}})}),{default:k(()=>[ne(q.$slots,"default",{modelValue:f(v)}),f(w)&&q.name?($(),U(f(Ph),{key:0,type:"number",value:f(v),name:q.name,required:q.required,disabled:f(u),step:f(o)},null,8,["value","name","required","disabled","step"])):Be("v-if",!0)]),_:3},16,["as-child","as","min","max","dir","inverted","aria-disabled","data-disabled"]))]),_:3}))}}),dg=X({__name:"SliderImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},emits:["slideStart","slideMove","slideEnd","homeKeyDown","endKeyDown","stepKeyDown"],setup(e,{emit:t}){const r=e,n=t,s=Gs();return(i,o)=>($(),U(f(We),me({"data-slider-impl":""},r,{onKeydown:o[0]||(o[0]=a=>{a.key==="Home"?(n("homeKeyDown",a),a.preventDefault()):a.key==="End"?(n("endKeyDown",a),a.preventDefault()):f(og).concat(f(ag)).includes(a.key)&&(n("stepKeyDown",a),a.preventDefault())}),onPointerdown:o[1]||(o[1]=a=>{const l=a.target;l.setPointerCapture(a.pointerId),a.preventDefault(),f(s).thumbElements.value.includes(l)?l.focus():n("slideStart",a)}),onPointermove:o[2]||(o[2]=a=>{a.target.hasPointerCapture(a.pointerId)&&n("slideMove",a)}),onPointerup:o[3]||(o[3]=a=>{const l=a.target;l.hasPointerCapture(a.pointerId)&&(l.releasePointerCapture(a.pointerId),n("slideEnd",a))})}),{default:k(()=>[ne(i.$slots,"default")]),_:3},16))}}),F2=X({__name:"SliderRange",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=Gs(),r=cg();Pe();const n=V(()=>t.currentModelValue.value.map(o=>ig(o,t.min.value,t.max.value))),s=V(()=>t.currentModelValue.value.length>1?Math.min(...n.value):0),i=V(()=>100-Math.max(...n.value,0));return(o,a)=>($(),U(f(We),{"data-disabled":f(t).disabled.value?"":void 0,"data-orientation":f(t).orientation.value,"as-child":o.asChild,as:o.as,style:St({[f(r).startEdge.value]:`${s.value}%`,[f(r).endEdge.value]:`${i.value}%`})},{default:k(()=>[ne(o.$slots,"default")]),_:3},8,["data-disabled","data-orientation","as-child","as","style"]))}}),V2=X({inheritAttrs:!1,__name:"SliderThumbImpl",props:{index:{type:Number,required:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=Gs(),n=cg(),{forwardRef:s,currentElement:i}=Pe(),{CollectionItem:o}=gn(),a=V(()=>r.modelValue?.value?.[t.index]),l=V(()=>a.value===void 0?0:ig(a.value,r.min.value??0,r.max.value??100)),u=V(()=>R2(t.index,r.modelValue?.value?.length??0)),c=yh(i),d=V(()=>c[n.size].value),p=V(()=>r.thumbAlignment.value==="overflow"||!d.value?0:P2(d.value,l.value,n.direction.value)),h=uc();return tt(()=>{r.thumbElements.value.push(i.value)}),jt(()=>{const m=r.thumbElements.value.findIndex(w=>w===i.value)??-1;r.thumbElements.value.splice(m,1)}),(m,w)=>($(),U(f(o),null,{default:k(()=>[O(f(We),me(m.$attrs,{ref:f(s),role:"slider",tabindex:f(r).disabled.value?void 0:0,"aria-label":m.$attrs["aria-label"]||u.value,"data-disabled":f(r).disabled.value?"":void 0,"data-orientation":f(r).orientation.value,"aria-valuenow":a.value,"aria-valuemin":f(r).min.value,"aria-valuemax":f(r).max.value,"aria-orientation":f(r).orientation.value,"as-child":m.asChild,as:m.as,style:{transform:"var(--reka-slider-thumb-transform)",position:"absolute",[f(n).startEdge.value]:`calc(${l.value}% + ${p.value}px)`,display:!f(h)&&a.value===void 0?"none":void 0},onFocus:w[0]||(w[0]=()=>{f(r).valueIndexToChangeRef.value=m.index})}),{default:k(()=>[ne(m.$slots,"default")]),_:3},16,["tabindex","aria-label","data-disabled","data-orientation","aria-valuenow","aria-valuemin","aria-valuemax","aria-orientation","as-child","as","style"])]),_:3}))}}),j2=X({__name:"SliderThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,{getItems:r}=gn(),{forwardRef:n,currentElement:s}=Pe(),i=V(()=>s.value?r(!0).findIndex(o=>o.ref===s.value):-1);return(o,a)=>($(),U(V2,me({ref:f(n)},t,{index:i.value}),{default:k(()=>[ne(o.$slots,"default")]),_:3},16,["index"]))}}),U2=X({__name:"SliderTrack",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=Gs();return Pe(),(r,n)=>($(),U(f(We),{"as-child":r.asChild,as:r.as,"data-disabled":f(t).disabled.value?"":void 0,"data-orientation":f(t).orientation.value},{default:k(()=>[ne(r.$slots,"default")]),_:3},8,["as-child","as","data-disabled","data-orientation"]))}}),z2=X({__name:"Label",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"label"}},setup(e){const t=e;return Pe(),(r,n)=>($(),U(f(We),me(t,{onMousedown:n[0]||(n[0]=s=>{!s.defaultPrevented&&s.detail>1&&s.preventDefault()})}),{default:k(()=>[ne(r.$slots,"default")]),_:3},16))}}),[ur,K2]=Pt("ScrollAreaRoot"),W2=X({__name:"ScrollAreaRoot",props:{type:{type:String,required:!1,default:"hover"},dir:{type:String,required:!1},scrollHideDelay:{type:Number,required:!1,default:600},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e,{expose:t}){const r=e,n=F(0),s=F(0),i=F(),o=F(),a=F(),l=F(),u=F(!1),c=F(!1),{type:d,dir:p,scrollHideDelay:h}=Nt(r),m=hc(p);function w(){i.value?.scrollTo({top:0})}function x(){i.value?.scrollTo({top:0,left:0})}t({viewport:i,scrollTop:w,scrollTopLeft:x});const{forwardRef:v,currentElement:S}=Pe();return K2({type:d,dir:m,scrollHideDelay:h,scrollArea:S,viewport:i,onViewportChange:b=>{i.value=b||void 0},content:o,onContentChange:b=>{o.value=b},scrollbarX:a,scrollbarXEnabled:u,scrollbarY:l,scrollbarYEnabled:c,onScrollbarXChange:b=>{a.value=b||void 0},onScrollbarYChange:b=>{l.value=b||void 0},onScrollbarXEnabledChange:b=>{u.value=b},onScrollbarYEnabledChange:b=>{c.value=b},onCornerWidthChange:b=>{n.value=b},onCornerHeightChange:b=>{s.value=b}}),(b,y)=>($(),U(f(We),{ref:f(v),"as-child":r.asChild,as:b.as,dir:f(m),style:St({position:"relative","--reka-scroll-area-corner-width":`${n.value}px`,"--reka-scroll-area-corner-height":`${s.value}px`})},{default:k(()=>[ne(b.$slots,"default")]),_:3},8,["as-child","as","dir","style"]))}}),G2=X({__name:"ScrollAreaCornerImpl",setup(e){const t=ur(),r=F(0),n=F(0),s=V(()=>!!r.value&&!!n.value);function i(){const a=t.scrollbarX.value?.offsetHeight||0;t.onCornerHeightChange(a),n.value=a}function o(){const a=t.scrollbarY.value?.offsetWidth||0;t.onCornerWidthChange(a),r.value=a}return us(t.scrollbarX.value,i),us(t.scrollbarY.value,o),He(()=>t.scrollbarX.value,i),He(()=>t.scrollbarY.value,o),(a,l)=>s.value?($(),U(f(We),me({key:0,style:{width:`${r.value}px`,height:`${n.value}px`,position:"absolute",right:f(t).dir.value==="ltr"?0:void 0,left:f(t).dir.value==="rtl"?0:void 0,bottom:0}},a.$parent?.$props),{default:k(()=>[ne(a.$slots,"default")]),_:3},16,["style"])):Be("v-if",!0)}}),J2=X({__name:"ScrollAreaCorner",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:r}=Pe(),n=ur(),s=V(()=>!!n.scrollbarX.value&&!!n.scrollbarY.value),i=V(()=>n.type.value!=="scroll"&&s.value);return(o,a)=>i.value?($(),U(G2,me({key:0},t,{ref:f(r)}),{default:k(()=>[ne(o.$slots,"default")]),_:3},16)):Be("v-if",!0)}});function fg(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function Ca(e){const t=pg(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function pg(e,t){const r=e/t;return Number.isNaN(r)?0:r}function Y2(e,t=()=>{}){let r={left:e.scrollLeft,top:e.scrollTop},n=0;return(function s(){const i={left:e.scrollLeft,top:e.scrollTop},o=r.left!==i.left,a=r.top!==i.top;(o||a)&&t(),r=i,n=window.requestAnimationFrame(s)})(),()=>window.cancelAnimationFrame(n)}function hg(e,t,r="ltr"){const n=Ca(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-s,o=t.content-t.viewport,a=i-n,l=r==="ltr"?[0,o]:[o*-1,0],u=Bi(e,l[0],l[1]);return fg([0,o],[0,a])(u)}function xa(e){return e?Number.parseInt(e,10):0}function Z2(e,t,r,n="ltr"){const s=Ca(r),i=s/2,o=t||i,a=s-o,l=r.scrollbar.paddingStart+o,u=r.scrollbar.size-r.scrollbar.paddingEnd-a,c=r.content-r.viewport,d=n==="ltr"?[0,c]:[c*-1,0];return fg([l,u],d)(e)}function gg(e,t){return e>0&&e<t}var X2=X({__name:"ScrollAreaScrollbarX",setup(e){const t=ur(),r=Ta(),{forwardRef:n,currentElement:s}=Pe();tt(()=>{s.value&&t.onScrollbarXChange(s.value)});const i=V(()=>r.sizes.value);return(o,a)=>($(),U(vg,{ref:f(n),"is-horizontal":!0,"data-orientation":"horizontal",style:St({bottom:0,left:f(t).dir.value==="rtl"?"var(--reka-scroll-area-corner-width)":0,right:f(t).dir.value==="ltr"?"var(--reka-scroll-area-corner-width)":0,"--reka-scroll-area-thumb-width":i.value?`${f(Ca)(i.value)}px`:void 0}),onOnDragScroll:a[0]||(a[0]=l=>f(r).onDragScroll(l.x))},{default:k(()=>[ne(o.$slots,"default")]),_:3},8,["style"]))}}),Q2=X({__name:"ScrollAreaScrollbarY",setup(e){const t=ur(),r=Ta(),{forwardRef:n,currentElement:s}=Pe();tt(()=>{s.value&&t.onScrollbarYChange(s.value)});const i=V(()=>r.sizes.value);return(o,a)=>($(),U(vg,{ref:f(n),"is-horizontal":!1,"data-orientation":"vertical",style:St({top:0,right:f(t).dir.value==="ltr"?0:void 0,left:f(t).dir.value==="rtl"?0:void 0,bottom:"var(--reka-scroll-area-corner-height)","--reka-scroll-area-thumb-height":i.value?`${f(Ca)(i.value)}px`:void 0}),onOnDragScroll:a[0]||(a[0]=l=>f(r).onDragScroll(l.y))},{default:k(()=>[ne(o.$slots,"default")]),_:3},8,["style"]))}}),Fc=X({__name:"ScrollAreaScrollbarAuto",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=ur(),r=Vi(),{forwardRef:n}=Pe(),s=F(!1),i=cc(()=>{if(t.viewport.value){const o=t.viewport.value.offsetWidth<t.viewport.value.scrollWidth,a=t.viewport.value.offsetHeight<t.viewport.value.scrollHeight;s.value=r.isHorizontal.value?o:a}},10);return tt(()=>i()),us(t.viewport,i),us(t.content,i),(o,a)=>($(),U(f(Ln),{present:o.forceMount||s.value},{default:k(()=>[O(Vc,me(o.$attrs,{ref:f(n),"data-state":s.value?"visible":"hidden"}),{default:k(()=>[ne(o.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),e_=X({inheritAttrs:!1,__name:"ScrollAreaScrollbarGlimpse",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=ur(),r=Vi(),{forwardRef:n}=Pe(),{state:s,dispatch:i}=wc("hidden",{hidden:{POINTER_ENTER:"glimpse",SCROLL:"scrolling"},glimpse:{HIDE:"hidden",POINTER_LEAVE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"glimpse"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}}),o=V(()=>s.value!=="hidden");function a(){i("POINTER_ENTER")}function l(){i("POINTER_LEAVE")}const u=cc(()=>i("SCROLL_END"),100);return ct(c=>{if(s.value==="glimpse"){const d=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);c(()=>{window.clearTimeout(d)})}}),ct(c=>{if(s.value==="idle"){const d=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);c(()=>{window.clearTimeout(d)})}}),ct(c=>{const d=t.viewport.value,p=r.isHorizontal.value?"scrollLeft":"scrollTop";if(d){let h=d[p];const m=()=>{const w=d[p];h!==w&&(i("SCROLL"),u()),h=w};d.addEventListener("scroll",m),c(()=>{d.removeEventListener("scroll",m)})}}),tt(()=>{const c=t.scrollArea.value;c&&(c.addEventListener("pointerenter",a),c.addEventListener("pointerleave",l))}),jt(()=>{const c=t.scrollArea.value;c&&(c.removeEventListener("pointerenter",a),c.removeEventListener("pointerleave",l))}),(c,d)=>($(),U(f(Ln),{present:c.forceMount||o.value},{default:k(()=>[O(Fc,me(c.$attrs,{ref:f(n),"data-state":o.value?"visible":"hidden"}),{default:k(()=>[ne(c.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),t_=X({inheritAttrs:!1,__name:"ScrollAreaScrollbarHover",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=ur(),{forwardRef:r}=Pe();let n;const s=F(!1);function i(){window.clearTimeout(n),s.value=!0}function o(){n=window.setTimeout(()=>{s.value=!1},t.scrollHideDelay.value)}return tt(()=>{const a=t.scrollArea.value;a&&(a.addEventListener("pointerenter",i),a.addEventListener("pointerleave",o))}),jt(()=>{const a=t.scrollArea.value;a&&(window.clearTimeout(n),a.removeEventListener("pointerenter",i),a.removeEventListener("pointerleave",o))}),(a,l)=>($(),U(f(Ln),{present:a.forceMount||s.value},{default:k(()=>[O(Fc,me(a.$attrs,{ref:f(r),"data-state":s.value?"visible":"hidden"}),{default:k(()=>[ne(a.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),r_=X({__name:"ScrollAreaScrollbarScroll",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=ur(),r=Vi(),{forwardRef:n}=Pe(),{state:s,dispatch:i}=wc("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}}),o=V(()=>s.value!=="hidden");ct(l=>{if(s.value==="idle"){const u=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);l(()=>{window.clearTimeout(u)})}});const a=cc(()=>i("SCROLL_END"),100);return ct(l=>{const u=t.viewport.value,c=r.isHorizontal.value?"scrollLeft":"scrollTop";if(u){let d=u[c];const p=()=>{const h=u[c];d!==h&&(i("SCROLL"),a()),d=h};u.addEventListener("scroll",p),l(()=>{u.removeEventListener("scroll",p)})}}),(l,u)=>($(),U(f(Ln),{present:l.forceMount||o.value},{default:k(()=>[O(Vc,me(l.$attrs,{ref:f(n),"data-state":o.value?"visible":"hidden"}),{default:k(()=>[ne(l.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),[Vi,n_]=Pt("ScrollAreaScrollbar"),s_=X({inheritAttrs:!1,__name:"ScrollAreaScrollbar",props:{orientation:{type:String,required:!1,default:"vertical"},forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(e){const t=e,{forwardRef:r}=Pe(),n=ur(),s=V(()=>t.orientation==="horizontal");He(s,()=>{s.value?n.onScrollbarXEnabledChange(!0):n.onScrollbarYEnabledChange(!0)},{immediate:!0}),jt(()=>{n.onScrollbarXEnabledChange(!1),n.onScrollbarYEnabledChange(!1)});const{orientation:i,forceMount:o,asChild:a,as:l}=Nt(t);return n_({orientation:i,forceMount:o,isHorizontal:s,as:l,asChild:a}),(u,c)=>f(n).type.value==="hover"?($(),U(t_,me({key:0},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:k(()=>[ne(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="scroll"?($(),U(r_,me({key:1},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:k(()=>[ne(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="glimpse"?($(),U(e_,me({key:2},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:k(()=>[ne(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="auto"?($(),U(Fc,me({key:3},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:k(()=>[ne(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="always"?($(),U(Vc,me({key:4},u.$attrs,{ref:f(r),"data-state":"visible"}),{default:k(()=>[ne(u.$slots,"default")]),_:3},16)):Be("v-if",!0)}}),[Ta,i_]=Pt("ScrollAreaScrollbarVisible"),Vc=X({__name:"ScrollAreaScrollbarVisible",setup(e){const t=ur(),r=Vi(),{forwardRef:n}=Pe(),s=F({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),i=V(()=>{const v=pg(s.value.viewport,s.value.content);return v>0&&v<1}),o=F(),a=F(0);function l(v,S){if(h.value){const b=t.viewport.value.scrollLeft+v.deltaY;t.viewport.value.scrollLeft=b,gg(b,S)&&v.preventDefault()}else{const b=t.viewport.value.scrollTop+v.deltaY;t.viewport.value.scrollTop=b,gg(b,S)&&v.preventDefault()}}function u(v,S){h.value?a.value=S.x:a.value=S.y}function c(v){a.value=0}function d(v){s.value=v}function p(v,S){return Z2(v,a.value,s.value,S)}const h=V(()=>r.isHorizontal.value);function m(v){h.value?t.viewport.value.scrollLeft=p(v,t.dir.value):t.viewport.value.scrollTop=p(v)}function w(){if(h.value){if(t.viewport.value&&o.value){const v=t.viewport.value.scrollLeft,S=hg(v,s.value,t.dir.value);o.value.style.transform=`translate3d(${S}px, 0, 0)`}}else if(t.viewport.value&&o.value){const v=t.viewport.value.scrollTop,S=hg(v,s.value);o.value.style.transform=`translate3d(0, ${S}px, 0)`}}function x(v){o.value=v}return i_({sizes:s,hasThumb:i,handleWheelScroll:l,handleThumbDown:u,handleThumbUp:c,handleSizeChange:d,onThumbPositionChange:w,onThumbChange:x,onDragScroll:m}),(v,S)=>h.value?($(),U(X2,me({key:0},v.$attrs,{ref:f(n)}),{default:k(()=>[ne(v.$slots,"default")]),_:3},16)):($(),U(Q2,me({key:1},v.$attrs,{ref:f(n)}),{default:k(()=>[ne(v.$slots,"default")]),_:3},16))}}),vg=X({__name:"ScrollAreaScrollbarImpl",props:{isHorizontal:{type:Boolean,required:!0}},emits:["onDragScroll","onWheelScroll","onThumbPointerDown"],setup(e,{emit:t}){const r=e,n=t,s=ur(),i=Ta(),o=Vi(),{forwardRef:a,currentElement:l}=Pe(),u=F(""),c=F();function d(v){c.value&&n("onDragScroll",{x:v.clientX-c.value?.left,y:v.clientY-c.value?.top})}function p(v){v.button===0&&(v.target.setPointerCapture(v.pointerId),c.value=l.value.getBoundingClientRect(),u.value=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",s.viewport&&(s.viewport.value.style.scrollBehavior="auto"),d(v))}function h(v){d(v)}function m(v){const S=v.target;S.hasPointerCapture(v.pointerId)&&S.releasePointerCapture(v.pointerId),document.body.style.webkitUserSelect=u.value,s.viewport&&(s.viewport.value.style.scrollBehavior=""),c.value=void 0}function w(v){const S=v.target,b=l.value?.contains(S),y=i.sizes.value.content-i.sizes.value.viewport;b&&i.handleWheelScroll(v,y)}tt(()=>{document.addEventListener("wheel",w,{passive:!1})}),jt(()=>{document.removeEventListener("wheel",w)});function x(){l.value&&(r.isHorizontal?i.handleSizeChange({content:s.viewport.value?.scrollWidth??0,viewport:s.viewport.value?.offsetWidth??0,scrollbar:{size:l.value.clientWidth??0,paddingStart:xa(getComputedStyle(l.value).paddingLeft),paddingEnd:xa(getComputedStyle(l.value).paddingRight)}}):i.handleSizeChange({content:s.viewport.value?.scrollHeight??0,viewport:s.viewport.value?.offsetHeight??0,scrollbar:{size:l.value?.clientHeight??0,paddingStart:xa(getComputedStyle(l.value).paddingTop),paddingEnd:xa(getComputedStyle(l.value).paddingBottom)}}),i.onThumbPositionChange())}return us(l,x),us(s.content,x),(v,S)=>($(),U(f(We),{ref:f(a),style:{position:"absolute"},"data-scrollbarimpl":"",as:f(o).as.value,"as-child":f(o).asChild.value,onPointerdown:p,onPointermove:h,onPointerup:m},{default:k(()=>[ne(v.$slots,"default")]),_:3},8,["as","as-child"]))}}),o_=X({__name:"ScrollAreaThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=ur(),n=Ta();function s(d){const p=d.target.getBoundingClientRect(),h=d.clientX-p.left,m=d.clientY-p.top;n.handleThumbDown(d,{x:h,y:m})}function i(d){n.handleThumbUp(d)}const{forwardRef:o,currentElement:a}=Pe(),l=F(),u=V(()=>r.viewport.value);function c(){l.value||(l.value=Y2(u.value,n.onThumbPositionChange),n.onThumbPositionChange())}return _b(V(()=>n.sizes.value),()=>{n.onThumbChange(a.value),u.value&&(n.onThumbPositionChange(),u.value.addEventListener("scroll",c))}),jt(()=>{u.value.removeEventListener("scroll",c),r.viewport.value?.removeEventListener("scroll",c)}),(d,p)=>($(),U(f(We),{ref:f(o),"data-state":f(n).hasThumb?"visible":"hidden",style:{width:"var(--reka-scroll-area-thumb-width)",height:"var(--reka-scroll-area-thumb-height)"},"as-child":t.asChild,as:d.as,onPointerdown:s,onPointerup:i},{default:k(()=>[ne(d.$slots,"default")]),_:3},8,["data-state","as-child","as"]))}}),a_=X({inheritAttrs:!1,__name:"ScrollAreaViewport",props:{nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e,{expose:t}){const r=e,{nonce:n}=Nt(r),s=sg(n),i=ur(),o=F();tt(()=>{i.onViewportChange(o.value),i.onContentChange(l.value)}),t({viewportElement:o});const{forwardRef:a,currentElement:l}=Pe();return(u,c)=>($(),Ce(Ke,null,[Q("div",me({ref_key:"viewportElement",ref:o,"data-reka-scroll-area-viewport":"",style:{overflowX:f(i).scrollbarXEnabled.value?"scroll":"hidden",overflowY:f(i).scrollbarYEnabled.value?"scroll":"hidden"}},u.$attrs,{tabindex:0}),[O(f(We),{ref:f(a),style:St({minWidth:f(i).scrollbarXEnabled.value?"fit-content":void 0}),"as-child":r.asChild,as:u.as},{default:k(()=>[ne(u.$slots,"default")]),_:3},8,["style","as-child","as"])],16),O(f(We),{as:"style",nonce:f(s)},{default:k(()=>c[0]||(c[0]=[qe(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-scroll-area-viewport] { scrollbar-width:none; -ms-overflow-style:none; -webkit-overflow-scrolling:touch; } [data-reka-scroll-area-viewport]::-webkit-scrollbar { display:none; } ")])),_:1,__:[0]},8,["nonce"])],64))}}),l_=[" ","Enter","ArrowUp","ArrowDown"],c_=[" ","Enter"],MT=10;function ji(e,t,r){return e===void 0?!1:Array.isArray(e)?e.some(n=>jc(n,t,r)):jc(e,t,r)}function jc(e,t,r){return e===void 0||t===void 0?!1:typeof e=="string"?e===t:typeof r=="function"?r(e,t):typeof r=="string"?e?.[r]===t?.[r]:Xy(e,t)}function u_(e){return e==null||e===""||Array.isArray(e)&&e.length===0}var d_={key:0,value:""},[zn,mg]=Pt("SelectRoot"),f_=X({inheritAttrs:!1,__name:"SelectRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},by:{type:[String,Function],required:!1},dir:{type:String,required:!1},multiple:{type:Boolean,required:!1},autocomplete:{type:String,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","update:open"],setup(e,{emit:t}){const r=e,n=t,{required:s,disabled:i,multiple:o,dir:a}=Nt(r),l=ds(r,"modelValue",n,{defaultValue:r.defaultValue??(o.value?[]:void 0),passive:r.modelValue===void 0,deep:!0}),u=ds(r,"open",n,{defaultValue:r.defaultOpen,passive:r.open===void 0}),c=F(),d=F(),p=F({x:0,y:0}),h=V(()=>o.value&&Array.isArray(l.value)?l.value?.length===0:ic(l.value));gn({isProvider:!0});const m=hc(a),w=vc(c),x=F(new Set),v=V(()=>Array.from(x.value).map(y=>y.value).join(";"));function S(y){if(o.value){const T=Array.isArray(l.value)?[...l.value]:[],I=T.findIndex(N=>jc(N,y,r.by));I===-1?T.push(y):T.splice(I,1),l.value=[...T]}else l.value=y}function b(y){return Array.from(x.value).find(T=>ji(y,T.value,r.by))}return mg({triggerElement:c,onTriggerChange:y=>{c.value=y},valueElement:d,onValueElementChange:y=>{d.value=y},contentId:"",modelValue:l,onValueChange:S,by:r.by,open:u,multiple:o,required:s,onOpenChange:y=>{u.value=y},dir:m,triggerPointerDownPosRef:p,disabled:i,isEmptyModelValue:h,optionsSet:x,onOptionAdd:y=>{const T=b(y.value);T&&x.value.delete(T),x.value.add(y)},onOptionRemove:y=>{const T=b(y.value);T&&x.value.delete(T)}}),(y,T)=>($(),U(f(Oh),null,{default:k(()=>[ne(y.$slots,"default",{modelValue:f(l),open:f(u)}),f(w)?($(),U(p_,{key:v.value,"aria-hidden":"true",tabindex:"-1",multiple:f(o),required:f(s),name:y.name,autocomplete:y.autocomplete,disabled:f(i),value:f(l)},{default:k(()=>[f(ic)(f(l))?($(),Ce("option",d_)):Be("v-if",!0),($(!0),Ce(Ke,null,gr(Array.from(x.value),I=>($(),Ce("option",me({key:I.value??""},{ref_for:!0},I),null,16))),128))]),_:1},8,["multiple","required","name","autocomplete","disabled","value"])):Be("v-if",!0)]),_:3}))}}),p_=X({__name:"BubbleSelect",props:{autocomplete:{type:String,required:!1},autofocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},form:{type:String,required:!1},multiple:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},size:{type:Number,required:!1},value:{type:null,required:!1}},setup(e){const t=e,r=F(),n=zn();He(()=>t.value,(i,o)=>{const a=window.HTMLSelectElement.prototype,l=Object.getOwnPropertyDescriptor(a,"value").set;if(i!==o&&l&&r.value){const u=new Event("change",{bubbles:!0});l.call(r.value,i),r.value.dispatchEvent(u)}});function s(i){n.onValueChange(i.target.value)}return(i,o)=>($(),U(f(Tc),{"as-child":""},{default:k(()=>[Q("select",me({ref_key:"selectElement",ref:r},t,{onInput:s}),[ne(i.$slots,"default")],16)]),_:3}))}}),h_=X({__name:"SelectPopperPosition",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1,default:10},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=hn(e);return(r,n)=>($(),U(f(ng),me(f(t),{style:{boxSizing:"border-box","--reka-select-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-select-content-available-width":"var(--reka-popper-available-width)","--reka-select-content-available-height":"var(--reka-popper-available-height)","--reka-select-trigger-width":"var(--reka-popper-anchor-width)","--reka-select-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:k(()=>[ne(r.$slots,"default")]),_:3},16))}}),g_={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[gs,wg]=Pt("SelectContent"),v_=X({__name:"SelectContentImpl",props:{position:{type:String,required:!1,default:"item-aligned"},bodyLock:{type:Boolean,required:!1,default:!0},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:!0}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=t,s=zn();Mb(),hh(r.bodyLock);const{CollectionSlot:i,getItems:o}=gn(),a=F();wh(a);const{search:l,handleTypeaheadSearch:u}=bh(),c=F(),d=F(),p=F(),h=F(!1),m=F(!1),w=F(!1);function x(){d.value&&a.value&&kh([d.value,a.value])}He(h,()=>{x()});const{onOpenChange:v,triggerPointerDownPosRef:S}=s;ct(T=>{if(!a.value)return;let I={x:0,y:0};const N=B=>{I={x:Math.abs(Math.round(B.pageX)-(S.value?.x??0)),y:Math.abs(Math.round(B.pageY)-(S.value?.y??0))}},g=B=>{B.pointerType!=="touch"&&(I.x<=10&&I.y<=10?B.preventDefault():a.value?.contains(B.target)||v(!1),document.removeEventListener("pointermove",N),S.value=null)};S.value!==null&&(document.addEventListener("pointermove",N),document.addEventListener("pointerup",g,{capture:!0,once:!0})),T(()=>{document.removeEventListener("pointermove",N),document.removeEventListener("pointerup",g,{capture:!0})})});function b(T){const I=T.ctrlKey||T.altKey||T.metaKey;if(T.key==="Tab"&&T.preventDefault(),!I&&T.key.length===1&&u(T.key,o()),["ArrowUp","ArrowDown","Home","End"].includes(T.key)){let N=[...o().map(g=>g.ref)];if(["ArrowUp","End"].includes(T.key)&&(N=N.slice().reverse()),["ArrowUp","ArrowDown"].includes(T.key)){const g=T.target,B=N.indexOf(g);N=N.slice(B+1)}setTimeout(()=>kh(N)),T.preventDefault()}}const y=hn(V(()=>r.position==="popper"?r:{}).value);return wg({content:a,viewport:c,onViewportChange:T=>{c.value=T},itemRefCallback:(T,I,N)=>{const g=!m.value&&!N,B=ji(s.modelValue.value,I,s.by);if(s.multiple.value){if(w.value)return;(B||g)&&(d.value=T,B&&(w.value=!0))}else(B||g)&&(d.value=T);g&&(m.value=!0)},selectedItem:d,selectedItemText:p,onItemLeave:()=>{a.value?.focus()},itemTextRefCallback:(T,I,N)=>{const g=!m.value&&!N;(ji(s.modelValue.value,I,s.by)||g)&&(p.value=T)},focusSelectedItem:x,position:r.position,isPositioned:h,searchRef:l}),(T,I)=>($(),U(f(i),null,{default:k(()=>[O(f(Eh),{"as-child":"",onMountAutoFocus:I[6]||(I[6]=Qt(()=>{},["prevent"])),onUnmountAutoFocus:I[7]||(I[7]=N=>{n("closeAutoFocus",N),!N.defaultPrevented&&(f(s).triggerElement.value?.focus({preventScroll:!0}),N.preventDefault())})},{default:k(()=>[O(f(_c),{"as-child":"","disable-outside-pointer-events":T.disableOutsidePointerEvents,onFocusOutside:I[2]||(I[2]=Qt(()=>{},["prevent"])),onDismiss:I[3]||(I[3]=N=>f(s).onOpenChange(!1)),onEscapeKeyDown:I[4]||(I[4]=N=>n("escapeKeyDown",N)),onPointerDownOutside:I[5]||(I[5]=N=>n("pointerDownOutside",N))},{default:k(()=>[($(),U(yi(T.position==="popper"?h_:w_),me({...T.$attrs,...f(y)},{id:f(s).contentId,ref:N=>{const g=f(rr)(N);g?.hasAttribute("data-reka-popper-content-wrapper")?a.value=g.firstElementChild:a.value=g},role:"listbox","data-state":f(s).open.value?"open":"closed",dir:f(s).dir.value,style:{display:"flex",flexDirection:"column",outline:"none"},onContextmenu:I[0]||(I[0]=Qt(()=>{},["prevent"])),onPlaced:I[1]||(I[1]=N=>h.value=!0),onKeydown:b}),{default:k(()=>[ne(T.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3},8,["disable-outside-pointer-events"])]),_:3})]),_:3}))}}),[Uc,m_]=Pt("SelectItemAlignedPosition"),w_=X({inheritAttrs:!1,__name:"SelectItemAlignedPosition",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["placed"],setup(e,{emit:t}){const r=e,n=t,{getItems:s}=gn(),i=zn(),o=gs(),a=F(!1),l=F(!0),u=F(),{forwardRef:c,currentElement:d}=Pe(),{viewport:p,selectedItem:h,selectedItemText:m,focusSelectedItem:w}=o;function x(){if(i.triggerElement.value&&i.valueElement.value&&u.value&&d.value&&p?.value&&h?.value&&m?.value){const b=i.triggerElement.value.getBoundingClientRect(),y=d.value.getBoundingClientRect(),T=i.valueElement.value.getBoundingClientRect(),I=m.value.getBoundingClientRect();if(i.dir.value!=="rtl"){const Re=I.left-y.left,st=T.left-Re,mt=b.left-st,Ge=b.width+mt,je=Math.max(Ge,y.width),bt=window.innerWidth-10,Tt=Bi(st,10,Math.max(10,bt-je));u.value.style.minWidth=`${Ge}px`,u.value.style.left=`${Tt}px`}else{const Re=y.right-I.right,st=window.innerWidth-T.right-Re,mt=window.innerWidth-b.right-st,Ge=b.width+mt,je=Math.max(Ge,y.width),bt=window.innerWidth-10,Tt=Bi(st,10,Math.max(10,bt-je));u.value.style.minWidth=`${Ge}px`,u.value.style.right=`${Tt}px`}const N=s().map(Re=>Re.ref),g=window.innerHeight-20,B=p.value.scrollHeight,q=window.getComputedStyle(d.value),C=Number.parseInt(q.borderTopWidth,10),_=Number.parseInt(q.paddingTop,10),E=Number.parseInt(q.borderBottomWidth,10),P=Number.parseInt(q.paddingBottom,10),R=C+_+B+P+E,D=Math.min(h.value.offsetHeight*5,R),G=window.getComputedStyle(p.value),W=Number.parseInt(G.paddingTop,10),ae=Number.parseInt(G.paddingBottom,10),Y=b.top+b.height/2-10,le=g-Y,he=h.value.offsetHeight/2,Ie=h.value.offsetTop+he,Ne=C+_+Ie,De=R-Ne;if(Ne<=Y){const Re=h.value===N[N.length-1];u.value.style.bottom="0px";const st=d.value.clientHeight-p.value.offsetTop-p.value.offsetHeight,mt=Ne+Math.max(le,he+(Re?ae:0)+st+E);u.value.style.height=`${mt}px`}else{const Re=h.value===N[0];u.value.style.top="0px";const st=Math.max(Y,C+p.value.offsetTop+(Re?W:0)+he)+De;u.value.style.height=`${st}px`,p.value.scrollTop=Ne-Y+p.value.offsetTop}u.value.style.margin="10px 0",u.value.style.minHeight=`${D}px`,u.value.style.maxHeight=`${g}px`,n("placed"),requestAnimationFrame(()=>a.value=!0)}}const v=F("");tt(async()=>{await Et(),x(),d.value&&(v.value=window.getComputedStyle(d.value).zIndex)});function S(b){b&&l.value===!0&&(x(),w?.(),l.value=!1)}return us(i.triggerElement,()=>{x()}),m_({contentWrapper:u,shouldExpandOnScrollRef:a,onScrollButtonChange:S}),(b,y)=>($(),Ce("div",{ref_key:"contentWrapperElement",ref:u,style:St({display:"flex",flexDirection:"column",position:"fixed",zIndex:v.value})},[O(f(We),me({ref:f(c),style:{boxSizing:"border-box",maxHeight:"100%"}},{...b.$attrs,...r}),{default:k(()=>[ne(b.$slots,"default")]),_:3},16)],4))}}),y_=X({inheritAttrs:!1,__name:"SelectProvider",props:{context:{type:Object,required:!0}},setup(e){return mg(e.context),wg(g_),(t,r)=>ne(t.$slots,"default")}}),b_={key:1},__=X({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean,required:!1},position:{type:String,required:!1},bodyLock:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=jr(r,t),s=zn(),i=F();tt(()=>{i.value=new DocumentFragment});const o=F(),a=V(()=>r.forceMount||s.open.value),l=F(a.value);return He(a,()=>{setTimeout(()=>l.value=a.value)}),(u,c)=>a.value||l.value||o.value?.present?($(),U(f(Ln),{key:0,ref_key:"presenceRef",ref:o,present:a.value},{default:k(()=>[O(v_,fr(nr({...f(n),...u.$attrs})),{default:k(()=>[ne(u.$slots,"default")]),_:3},16)]),_:3},8,["present"])):i.value?($(),Ce("div",b_,[($(),U(el,{to:i.value},[O(y_,{context:f(s)},{default:k(()=>[ne(u.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):Be("v-if",!0)}}),[NT,S_]=Pt("SelectGroup"),C_=X({__name:"SelectGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=js(void 0,"reka-select-group");return S_({id:r}),(n,s)=>($(),U(f(We),me({role:"group"},t,{"aria-labelledby":f(r)}),{default:k(()=>[ne(n.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),x_=X({__name:"SelectIcon",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){return(t,r)=>($(),U(f(We),{"aria-hidden":"true",as:t.as,"as-child":t.asChild},{default:k(()=>[ne(t.$slots,"default",{},()=>[r[0]||(r[0]=qe("▼"))])]),_:3},8,["as","as-child"]))}}),[yg,T_]=Pt("SelectItem"),E_=X({__name:"SelectItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(e,{emit:t}){const r=e,n=t,{disabled:s}=Nt(r),i=zn(),o=gs(),{forwardRef:a,currentElement:l}=Pe(),{CollectionItem:u}=gn(),c=V(()=>ji(i.modelValue?.value,r.value,i.by)),d=F(!1),p=F(r.textValue??""),h=js(void 0,"reka-select-item-text"),m="select.select";async function w(y){y.defaultPrevented||sc(m,x,{originalEvent:y,value:r.value})}async function x(y){await Et(),n("select",y),!y.defaultPrevented&&(s.value||(i.onValueChange(r.value),i.multiple.value||i.onOpenChange(!1)))}async function v(y){await Et(),!y.defaultPrevented&&(s.value?o.onItemLeave?.():y.currentTarget?.focus({preventScroll:!0}))}async function S(y){await Et(),!y.defaultPrevented&&y.currentTarget===ar()&&o.onItemLeave?.()}async function b(y){await Et(),!y.defaultPrevented&&(o.searchRef?.value!==""&&y.key===" "||(c_.includes(y.key)&&w(y),y.key===" "&&y.preventDefault()))}if(r.value==="")throw new Error("A <SelectItem /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return tt(()=>{l.value&&o.itemRefCallback(l.value,r.value,r.disabled)}),T_({value:r.value,disabled:s,textId:h,isSelected:c,onItemTextChange:y=>{p.value=((p.value||y?.textContent)??"").trim()}}),(y,T)=>($(),U(f(u),{value:{textValue:p.value}},{default:k(()=>[O(f(We),{ref:f(a),role:"option","aria-labelledby":f(h),"data-highlighted":d.value?"":void 0,"aria-selected":c.value,"data-state":c.value?"checked":"unchecked","aria-disabled":f(s)||void 0,"data-disabled":f(s)?"":void 0,tabindex:f(s)?void 0:-1,as:y.as,"as-child":y.asChild,onFocus:T[0]||(T[0]=I=>d.value=!0),onBlur:T[1]||(T[1]=I=>d.value=!1),onPointerup:w,onPointerdown:T[2]||(T[2]=I=>{I.currentTarget.focus({preventScroll:!0})}),onTouchend:T[3]||(T[3]=Qt(()=>{},["prevent","stop"])),onPointermove:v,onPointerleave:S,onKeydown:b},{default:k(()=>[ne(y.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"])]),_:3},8,["value"]))}}),A_=X({__name:"SelectItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,r=yg();return(n,s)=>f(r).isSelected.value?($(),U(f(We),me({key:0,"aria-hidden":"true"},t),{default:k(()=>[ne(n.$slots,"default")]),_:3},16)):Be("v-if",!0)}}),k_=X({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,r=zn(),n=gs(),s=yg(),{forwardRef:i,currentElement:o}=Pe(),a=V(()=>({value:s.value,disabled:s.disabled.value,textContent:o.value?.textContent??s.value?.toString()??""}));return tt(()=>{o.value&&(s.onItemTextChange(o.value),n.itemTextRefCallback(o.value,s.value,s.disabled.value),r.onOptionAdd(a.value))}),jt(()=>{r.onOptionRemove(a.value)}),(l,u)=>($(),U(f(We),me({id:f(s).textId,ref:f(i)},{...t,...l.$attrs}),{default:k(()=>[ne(l.$slots,"default")]),_:3},16,["id"]))}}),I_=X({__name:"SelectPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=e;return(r,n)=>($(),U(f(xc),fr(nr(t)),{default:k(()=>[ne(r.$slots,"default")]),_:3},16))}}),bg=X({__name:"SelectScrollButtonImpl",emits:["autoScroll"],setup(e,{emit:t}){const r=t,{getItems:n}=gn(),s=gs(),i=F(null);function o(){i.value!==null&&(window.clearInterval(i.value),i.value=null)}ct(()=>{n().map(u=>u.ref).find(u=>u===ar())?.scrollIntoView({block:"nearest"})});function a(){i.value===null&&(i.value=window.setInterval(()=>{r("autoScroll")},50))}function l(){s.onItemLeave?.(),i.value===null&&(i.value=window.setInterval(()=>{r("autoScroll")},50))}return Ds(()=>o()),(u,c)=>($(),U(f(We),me({"aria-hidden":"true",style:{flexShrink:0}},u.$parent?.$props,{onPointerdown:a,onPointermove:l,onPointerleave:c[0]||(c[0]=()=>{o()})}),{default:k(()=>[ne(u.$slots,"default")]),_:3},16))}}),R_=X({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=gs(),r=t.position==="item-aligned"?Uc():void 0,{forwardRef:n,currentElement:s}=Pe(),i=F(!1);return ct(o=>{if(t.viewport?.value&&t.isPositioned?.value){let u=function(){const c=l.scrollHeight-l.clientHeight;i.value=Math.ceil(l.scrollTop)<c};var a=u;const l=t.viewport.value;u(),l.addEventListener("scroll",u),o(()=>l.removeEventListener("scroll",u))}}),He(s,()=>{s.value&&r?.onScrollButtonChange(s.value)}),(o,a)=>i.value?($(),U(bg,{key:0,ref:f(n),onAutoScroll:a[0]||(a[0]=()=>{const{viewport:l,selectedItem:u}=f(t);l?.value&&u?.value&&(l.value.scrollTop=l.value.scrollTop+u.value.offsetHeight)})},{default:k(()=>[ne(o.$slots,"default")]),_:3},512)):Be("v-if",!0)}}),$_=X({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=gs(),r=t.position==="item-aligned"?Uc():void 0,{forwardRef:n,currentElement:s}=Pe(),i=F(!1);return ct(o=>{if(t.viewport?.value&&t.isPositioned?.value){let u=function(){i.value=l.scrollTop>0};var a=u;const l=t.viewport.value;u(),l.addEventListener("scroll",u),o(()=>l.removeEventListener("scroll",u))}}),He(s,()=>{s.value&&r?.onScrollButtonChange(s.value)}),(o,a)=>i.value?($(),U(bg,{key:0,ref:f(n),onAutoScroll:a[0]||(a[0]=()=>{const{viewport:l,selectedItem:u}=f(t);l?.value&&u?.value&&(l.value.scrollTop=l.value.scrollTop-u.value.offsetHeight)})},{default:k(()=>[ne(o.$slots,"default")]),_:3},512)):Be("v-if",!0)}}),P_=X({__name:"SelectTrigger",props:{disabled:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,r=zn(),{forwardRef:n,currentElement:s}=Pe(),i=V(()=>r.disabled?.value||t.disabled);r.contentId||(r.contentId=js(void 0,"reka-select-content")),tt(()=>{r.onTriggerChange(s.value)});const{getItems:o}=gn(),{search:a,handleTypeaheadSearch:l,resetTypeahead:u}=bh();function c(){i.value||(r.onOpenChange(!0),u())}function d(p){c(),r.triggerPointerDownPosRef.value={x:Math.round(p.pageX),y:Math.round(p.pageY)}}return(p,h)=>($(),U(f(Hh),{"as-child":"",reference:p.reference},{default:k(()=>[O(f(We),{ref:f(n),role:"combobox",type:p.as==="button"?"button":void 0,"aria-controls":f(r).contentId,"aria-expanded":f(r).open.value||!1,"aria-required":f(r).required?.value,"aria-autocomplete":"none",disabled:i.value,dir:f(r)?.dir.value,"data-state":f(r)?.open.value?"open":"closed","data-disabled":i.value?"":void 0,"data-placeholder":f(u_)(f(r).modelValue?.value)?"":void 0,"as-child":p.asChild,as:p.as,onClick:h[0]||(h[0]=m=>{m?.currentTarget?.focus()}),onPointerdown:h[1]||(h[1]=m=>{if(m.pointerType==="touch")return m.preventDefault();const w=m.target;w.hasPointerCapture(m.pointerId)&&w.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&(d(m),m.preventDefault())}),onPointerup:h[2]||(h[2]=Qt(m=>{m.pointerType==="touch"&&d(m)},["prevent"])),onKeydown:h[3]||(h[3]=m=>{const w=f(a)!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&w&&m.key===" "||(f(l)(m.key,f(o)()),f(l_).includes(m.key)&&(c(),m.preventDefault()))})},{default:k(()=>[ne(p.$slots,"default")]),_:3},8,["type","aria-controls","aria-expanded","aria-required","disabled","dir","data-state","data-disabled","data-placeholder","as-child","as"])]),_:3},8,["reference"]))}}),D_=X({__name:"SelectValue",props:{placeholder:{type:String,required:!1,default:""},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,{forwardRef:r,currentElement:n}=Pe(),s=zn();tt(()=>{s.valueElement=n});const i=V(()=>{let a=[];const l=Array.from(s.optionsSet.value),u=c=>l.find(d=>ji(c,d.value,s.by));return Array.isArray(s.modelValue.value)?a=s.modelValue.value.map(c=>u(c)?.textContent??""):a=[u(s.modelValue.value)?.textContent??""],a.filter(Boolean)}),o=V(()=>i.value.length?i.value.join(", "):t.placeholder);return(a,l)=>($(),U(f(We),{ref:f(r),as:a.as,"as-child":a.asChild,style:{pointerEvents:"none"},"data-placeholder":i.value.length?void 0:t.placeholder},{default:k(()=>[ne(a.$slots,"default",{selectedLabel:i.value,modelValue:f(s).modelValue.value},()=>[qe(Le(o.value),1)])]),_:3},8,["as","as-child","data-placeholder"]))}}),O_=X({__name:"SelectViewport",props:{nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{nonce:r}=Nt(t),n=sg(r),s=gs(),i=s.position==="item-aligned"?Uc():void 0,{forwardRef:o,currentElement:a}=Pe();tt(()=>{s?.onViewportChange(a.value)});const l=F(0);function u(c){const d=c.currentTarget,{shouldExpandOnScrollRef:p,contentWrapper:h}=i??{};if(p?.value&&h?.value){const m=Math.abs(l.value-d.scrollTop);if(m>0){const w=window.innerHeight-20,x=Number.parseFloat(h.value.style.minHeight),v=Number.parseFloat(h.value.style.height),S=Math.max(x,v);if(S<w){const b=S+m,y=Math.min(w,b),T=b-y;h.value.style.height=`${y}px`,h.value.style.bottom==="0px"&&(d.scrollTop=T>0?T:0,h.value.style.justifyContent="flex-end")}}}l.value=d.scrollTop}return(c,d)=>($(),Ce(Ke,null,[O(f(We),me({ref:f(o),"data-reka-select-viewport":"",role:"presentation"},{...c.$attrs,...t},{style:{position:"relative",flex:1,overflow:"hidden auto"},onScroll:u}),{default:k(()=>[ne(c.$slots,"default")]),_:3},16),O(f(We),{as:"style",nonce:f(n)},{default:k(()=>d[0]||(d[0]=[qe(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-reka-select-viewport]::-webkit-scrollbar { display: none; } ")])),_:1,__:[0]},8,["nonce"])],64))}}),H_=X({__name:"BaseSeparator",props:{orientation:{type:String,required:!1,default:"horizontal"},decorative:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=["horizontal","vertical"];function n(a){return r.includes(a)}const s=V(()=>n(t.orientation)?t.orientation:"horizontal"),i=V(()=>s.value==="vertical"?t.orientation:void 0),o=V(()=>t.decorative?{role:"none"}:{"aria-orientation":i.value,role:"separator"});return(a,l)=>($(),U(f(We),me({as:a.as,"as-child":a.asChild,"data-orientation":s.value},o.value),{default:k(()=>[ne(a.$slots,"default")]),_:3},16,["as","as-child","data-orientation"]))}}),M_=X({__name:"Separator",props:{orientation:{type:String,required:!1,default:"horizontal"},decorative:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(r,n)=>($(),U(H_,fr(nr(t)),{default:k(()=>[ne(r.$slots,"default")]),_:3},16))}}),[N_,qT]=Pt("ToggleGroupRoot"),q_=X({__name:"Toggle",props:{defaultValue:{type:Boolean,required:!1},modelValue:{type:[Boolean,null],required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=t,{forwardRef:s,currentElement:i}=Pe(),o=N_(null),a=ds(r,"modelValue",n,{defaultValue:r.defaultValue,passive:r.modelValue===void 0});function l(){a.value=!a.value}const u=V(()=>a.value?"on":"off"),c=vc(i);return(d,p)=>($(),U(f(We),{ref:f(s),type:d.as==="button"?"button":void 0,"as-child":r.asChild,as:d.as,"aria-pressed":f(a),"data-state":u.value,"data-disabled":d.disabled?"":void 0,disabled:d.disabled,onClick:l},{default:k(()=>[ne(d.$slots,"default",{modelValue:f(a),disabled:d.disabled,pressed:f(a),state:u.value}),f(c)&&d.name&&!f(o)?($(),U(Ph,{key:0,type:"checkbox",name:d.name,value:f(a),required:d.required},null,8,["name","value","required"])):Be("v-if",!0)]),_:3},8,["type","as-child","as","aria-pressed","data-state","data-disabled","disabled"]))}}),B_=X({__name:"TooltipArrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(e){const t=e;return Pe(),(r,n)=>($(),U(f(k2),fr(nr(t)),{default:k(()=>[ne(r.$slots,"default")]),_:3},16))}}),[Ea,L_]=Pt("TooltipProvider"),F_=X({inheritAttrs:!1,__name:"TooltipProvider",props:{delayDuration:{type:Number,required:!1,default:700},skipDelayDuration:{type:Number,required:!1,default:300},disableHoverableContent:{type:Boolean,required:!1,default:!1},disableClosingTrigger:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},ignoreNonKeyboardFocus:{type:Boolean,required:!1,default:!1},content:{type:Object,required:!1}},setup(e){const{delayDuration:t,skipDelayDuration:r,disableHoverableContent:n,disableClosingTrigger:s,ignoreNonKeyboardFocus:i,disabled:o,content:a}=Nt(e);Pe();const l=F(!0),u=F(!1),{start:c,stop:d}=ch(()=>{l.value=!0},r,{immediate:!1});return L_({isOpenDelayed:l,delayDuration:t,onOpen(){d(),l.value=!1},onClose(){c()},isPointerInTransitRef:u,disableHoverableContent:n,disableClosingTrigger:s,disabled:o,ignoreNonKeyboardFocus:i,content:a}),(p,h)=>ne(p.$slots,"default")}}),_g="tooltip.open",[Aa,V_]=Pt("TooltipRoot"),j_=X({__name:"TooltipRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},delayDuration:{type:Number,required:!1,default:void 0},disableHoverableContent:{type:Boolean,required:!1,default:void 0},disableClosingTrigger:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},ignoreNonKeyboardFocus:{type:Boolean,required:!1,default:void 0}},emits:["update:open"],setup(e,{emit:t}){const r=e,n=t;Pe();const s=Ea(),i=V(()=>r.disableHoverableContent??s.disableHoverableContent.value),o=V(()=>r.disableClosingTrigger??s.disableClosingTrigger.value),a=V(()=>r.disabled??s.disabled.value),l=V(()=>r.delayDuration??s.delayDuration.value),u=V(()=>r.ignoreNonKeyboardFocus??s.ignoreNonKeyboardFocus.value),c=ds(r,"open",n,{defaultValue:r.defaultOpen,passive:r.open===void 0});He(c,b=>{s.onClose&&(b?(s.onOpen(),document.dispatchEvent(new CustomEvent(_g))):s.onClose())});const d=F(!1),p=F(),h=V(()=>c.value?d.value?"delayed-open":"instant-open":"closed"),{start:m,stop:w}=ch(()=>{d.value=!0,c.value=!0},l,{immediate:!1});function x(){w(),d.value=!1,c.value=!0}function v(){w(),c.value=!1}function S(){m()}return V_({contentId:"",open:c,stateAttribute:h,trigger:p,onTriggerChange(b){p.value=b},onTriggerEnter(){s.isOpenDelayed.value?S():x()},onTriggerLeave(){i.value?v():w()},onOpen:x,onClose:v,disableHoverableContent:i,disableClosingTrigger:o,disabled:a,ignoreNonKeyboardFocus:u}),(b,y)=>($(),U(f(Oh),null,{default:k(()=>[ne(b.$slots,"default",{open:f(c)})]),_:3}))}}),Sg=X({__name:"TooltipContentImpl",props:{ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1,default:void 0},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1,default:void 0},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1,default:void 0},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=t,s=Aa(),i=Ea(),{forwardRef:o,currentElement:a}=Pe(),l=V(()=>r.ariaLabel||a.value?.textContent),u=V(()=>{const{ariaLabel:c,...d}=r;return ph(d,i.content.value??{},{side:"top",sideOffset:0,align:"center",avoidCollisions:!0,collisionBoundary:[],collisionPadding:0,arrowPadding:0,sticky:"partial",hideWhenDetached:!1})});return tt(()=>{Kt(window,"scroll",c=>{c.target?.contains(s.trigger.value)&&s.onClose()}),Kt(window,_g,s.onClose)}),(c,d)=>($(),U(f(_c),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:d[0]||(d[0]=p=>n("escapeKeyDown",p)),onPointerDownOutside:d[1]||(d[1]=p=>{f(s).disableClosingTrigger.value&&f(s).trigger.value?.contains(p.target)&&p.preventDefault(),n("pointerDownOutside",p)}),onFocusOutside:d[2]||(d[2]=Qt(()=>{},["prevent"])),onDismiss:d[3]||(d[3]=p=>f(s).onClose())},{default:k(()=>[O(f(ng),me({ref:f(o),"data-state":f(s).stateAttribute.value},{...c.$attrs,...u.value},{style:{"--reka-tooltip-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-tooltip-content-available-width":"var(--reka-popper-available-width)","--reka-tooltip-content-available-height":"var(--reka-popper-available-height)","--reka-tooltip-trigger-width":"var(--reka-popper-anchor-width)","--reka-tooltip-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:k(()=>[ne(c.$slots,"default"),O(f(Tc),{id:f(s).contentId,role:"tooltip"},{default:k(()=>[qe(Le(l.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),U_=X({__name:"TooltipContentHoverable",props:{ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},setup(e){const t=hn(e),{forwardRef:r,currentElement:n}=Pe(),{trigger:s,onClose:i}=Aa(),o=Ea(),{isPointerInTransit:a,onPointerExit:l}=Nb(s,n);return o.isPointerInTransitRef=a,l(()=>{i()}),(u,c)=>($(),U(Sg,me({ref:f(r)},f(t)),{default:k(()=>[ne(u.$slots,"default")]),_:3},16))}}),z_=X({__name:"TooltipContent",props:{forceMount:{type:Boolean,required:!1},ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=t,s=Aa(),i=jr(r,n),{forwardRef:o}=Pe();return(a,l)=>($(),U(f(Ln),{present:a.forceMount||f(s).open.value},{default:k(()=>[($(),U(yi(f(s).disableHoverableContent.value?Sg:U_),me({ref:f(o)},f(i)),{default:k(()=>[ne(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),K_=X({__name:"TooltipPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=e;return(r,n)=>($(),U(f(xc),fr(nr(t)),{default:k(()=>[ne(r.$slots,"default")]),_:3},16))}}),W_=X({__name:"TooltipTrigger",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,r=Aa(),n=Ea();r.contentId||(r.contentId=js(void 0,"reka-tooltip-content"));const{forwardRef:s,currentElement:i}=Pe(),o=F(!1),a=F(!1),l=V(()=>r.disabled.value?{}:{click:w,focus:h,pointermove:d,pointerleave:p,pointerdown:c,blur:m});tt(()=>{r.onTriggerChange(i.value)});function u(){setTimeout(()=>{o.value=!1},1)}function c(){r.open&&!r.disableClosingTrigger.value&&r.onClose(),o.value=!0,document.addEventListener("pointerup",u,{once:!0})}function d(x){x.pointerType!=="touch"&&!a.value&&!n.isPointerInTransitRef.value&&(r.onTriggerEnter(),a.value=!0)}function p(){r.onTriggerLeave(),a.value=!1}function h(x){o.value||r.ignoreNonKeyboardFocus.value&&!x.target.matches?.(":focus-visible")||r.onOpen()}function m(){r.onClose()}function w(){r.disableClosingTrigger.value||r.onClose()}return(x,v)=>($(),U(f(Hh),{"as-child":"",reference:x.reference},{default:k(()=>[O(f(We),me({ref:f(s),"aria-describedby":f(r).open.value?f(r).contentId:void 0,"data-state":f(r).stateAttribute.value,as:x.as,"as-child":t.asChild,"data-grace-area-trigger":""},Ed(l.value)),{default:k(()=>[ne(x.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3},8,["reference"]))}}),G_=X({__name:"Button",props:{variant:{},size:{},class:{type:[Boolean,null,String,Object,Array]},type:{default:"button"},asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e;return(r,n)=>($(),U(f(We),{"data-slot":"button",as:e.as,"as-child":e.asChild,type:e.as==="button"?e.type:void 0,class:et(f(dt)(f(J_)({variant:e.variant,size:e.size}),t.class))},{default:k(()=>[ne(r.$slots,"default")]),_:3},8,["as","as-child","type","class"]))}}),pt=G_;const J_=rh("wp:inline-flex wp:items-center wp:justify-center wp:gap-2 wp:whitespace-nowrap wp:rounded-md wp:text-sm wp:font-medium wp:transition-all wp:disabled:pointer-events-none wp:disabled:opacity-50 wp:[&_svg]:pointer-events-none wp:[&_svg:not([class*='size-'])]:size-4 wp:shrink-0 wp:[&_svg]:shrink-0 wp:outline-none wp:focus-visible:border-ring wp:focus-visible:ring-ring/50 wp:focus-visible:ring-[3px] wp:aria-invalid:ring-destructive/20 wp:dark:aria-invalid:ring-destructive/40 wp:aria-invalid:border-destructive",{variants:{variant:{default:"wp:bg-primary wp:text-primary-foreground wp:hover:bg-primary/90",destructive:"wp:bg-destructive wp:text-white wp:hover:bg-destructive/90 wp:focus-visible:ring-destructive/20 wp:dark:focus-visible:ring-destructive/40 wp:dark:bg-destructive/60",outline:"wp:border wp:bg-background wp:shadow-xs wp:hover:bg-accent wp:hover:text-accent-foreground wp:dark:bg-input/30 wp:dark:border-input wp:dark:hover:bg-input/50",secondary:"wp:bg-secondary wp:text-secondary-foreground wp:hover:bg-secondary/80",ghost:"wp:hover:bg-accent wp:hover:text-accent-foreground wp:dark:hover:bg-accent/50",link:"wp:text-primary wp:underline-offset-4 wp:hover:underline"},size:{default:"wp:h-9 wp:px-4 wp:py-2 wp:has-[>svg]:px-3",sm:"wp:h-8 wp:rounded-md wp:gap-1.5 wp:px-3 wp:has-[>svg]:px-2.5",lg:"wp:h-10 wp:rounded-md wp:px-6 wp:has-[>svg]:px-4",icon:"wp:size-9","icon-sm":"wp:size-8","icon-lg":"wp:size-10"}},defaultVariants:{variant:"default",size:"default"}});var Y_={class:"webphone-keypad wp:grid wp:grid-cols-3 wp:gap-y-3 wp:gap-x-6 wp:px-4 wp:py-2 wp:mx-auto wp:place-items-center"},Z_=X({__name:"KeyPad",setup(e){const t=Vt("webphone"),{sendDTMF:r}=Vt("sip"),{playDtmf:n}=Ep(),s=["1","2","3","4","5","6","7","8","9","*","0","#"],i=o=>{n(o),t.callStatus==="connected"&&r(o),t.appendKeypad(o)};return(o,a)=>($(),Ce("div",Y_,[($(),Ce(Ke,null,gr(s,l=>O(f(pt),{key:l,type:"button",onClick:u=>i(l),variant:"ghost",size:"icon",class:"webphone-keypad__key wp:flex wp:items-center wp:justify-center wp:h-10 wp:w-full wp:rounded-xs wp:text-lg wp:bg-neutral-100 wp:dark:bg-neutral-700 wp:hover:bg-neutral-200 wp:dark:hover:bg-neutral-600 wp:hover:text-primary wp:dark:hover:text-neutral-100 wp:text-primary wp:dark:text-white wp:transition-all wp:duration-150 wp:active:scale-95 wp:font-light montserrat","data-key":l},{default:k(()=>[qe(Le(l),1)]),_:2},1032,["onClick","data-key"])),64))]))}}),zc=Z_;var Cg=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),X_=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),Q_=e=>{const t=X_(e);return t.charAt(0).toUpperCase()+t.slice(1)},eS=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),xg=e=>e==="";var Ui={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};var tS=({name:e,iconNode:t,absoluteStrokeWidth:r,"absolute-stroke-width":n,strokeWidth:s,"stroke-width":i,size:o=Ui.width,color:a=Ui.stroke,...l},{slots:u})=>vr("svg",{...Ui,...l,width:o,height:o,stroke:a,"stroke-width":xg(r)||xg(n)||r===!0||n===!0?Number(s||i||Ui["stroke-width"])*24/Number(o):s||i||Ui["stroke-width"],class:eS("lucide",l.class,...e?[`lucide-${Cg(Q_(e))}-icon`,`lucide-${Cg(e)}`]:["lucide-icon"])},[...t.map(c=>vr(...c)),...u.default?[u.default()]:[]]);var vt=(e,t)=>(r,{slots:n,attrs:s})=>vr(tS,{...s,...r,iconNode:t,name:e},n);var Tg=vt("building-2",[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]]);var Kc=vt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);var Eg=vt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);var rS=vt("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);var Wc=vt("circle-user",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);var nS=vt("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);var sS=vt("mic-off",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M16.95 16.95A7 7 0 0 1 5 12v-2",key:"cqa7eg"}],["path",{d:"M18.89 13.23A7 7 0 0 0 19 12v-2",key:"16hl24"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}]]);var iS=vt("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]]);var oS=vt("pause",[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]]);var aS=vt("phone-call",[["path",{d:"M13 2a9 9 0 0 1 9 9",key:"1itnx2"}],["path",{d:"M13 6a5 5 0 0 1 5 5",key:"11nki7"}],["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);var lS=vt("phone-incoming",[["path",{d:"M16 2v6h6",key:"1mfrl5"}],["path",{d:"m22 2-6 6",key:"6f0sa0"}],["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);var cS=vt("phone-missed",[["path",{d:"m16 2 6 6",key:"1gw87d"}],["path",{d:"m22 2-6 6",key:"6f0sa0"}],["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);var uS=vt("phone-outgoing",[["path",{d:"m16 8 6-6",key:"oawc05"}],["path",{d:"M22 8V2h-6",key:"oqy2zc"}],["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);var Ag=vt("phone",[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);var dS=vt("picture-in-picture-2",[["path",{d:"M21 9V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h4",key:"daa4of"}],["rect",{width:"10",height:"7",x:"12",y:"13",rx:"2",key:"1nb8gs"}]]);var fS=vt("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);var pS=vt("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);var hS=vt("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var gS=vt("video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);var kg=vt("voicemail",[["circle",{cx:"6",cy:"12",r:"4",key:"1ehtga"}],["circle",{cx:"18",cy:"12",r:"4",key:"4vafl8"}],["line",{x1:"6",x2:"18",y1:"16",y2:"16",key:"pmt8us"}]]);var Ig=vt("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]);var Gc=vt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),vS=X({__name:"Input",props:{defaultValue:{},modelValue:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=ds(r,"modelValue",t,{passive:!0,defaultValue:r.defaultValue});return(s,i)=>wo(($(),Ce("input",{"onUpdate:modelValue":i[0]||(i[0]=o=>rt(n)?n.value=o:null),"data-slot":"input",class:et(f(dt)("wp:file:text-foreground wp:placeholder:text-muted-foreground wp:selection:bg-primary wp:selection:text-primary-foreground wp:dark:bg-input/30 wp:border-blue-500 wp:h-9 wp:w-full wp:min-w-0 wp:rounded-md wp:border wp:bg-transparent wp:px-3 wp:py-1 wp:text-base wp:shadow-xs wp:transition-[color,box-shadow] wp:outline-none wp:file:inline-flex wp:file:h-7 wp:file:border-0 wp:file:bg-transparent wp:file:text-sm wp:file:font-medium wp:disabled:pointer-events-none wp:disabled:cursor-not-allowed wp:disabled:opacity-50 wp:md:text-sm","wp:focus-visible:border-ring wp:focus-visible:ring-ring/50 wp:focus-visible:ring-[3px]","wp:aria-invalid:ring-destructive/20 wp:dark:aria-invalid:ring-destructive/40 wp:aria-invalid:border-destructive",r.class))},null,2)),[[Ii,f(n)]])}}),zi=vS,mS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 14 14"};function wS(e,t){return $(),Ce("svg",mS,[...t[0]||(t[0]=[Cl('<g clip-path="url(#a)"><path fill="currentColor" d="m1.913 7.003.035.49c0 .605.49 1.095 1.095 1.095.015 0 1.08-.14 1.08-.14a1.1 1.1 0 0 0 1.07-1.07l.075-.655c1.192-.463 2.33-.465 3.47-.005l.072.657c.01.585.485 1.06 1.07 1.07 0 0 1.065.14 1.08.14.605 0 1.095-.49 1.095-1.07l.038-.537c0-.575-.23-1.12-.65-1.54-1.91-1.91-6.973-1.908-8.88 0-.418.417-.65.965-.648 1.562zM10.94 5.94c.285.285.443.653.44 1.015l-.037.538a.39.39 0 0 1-.368.387s-1.057-.137-1.072-.137a.4.4 0 0 1-.388-.388c0-.015-.1-.92-.1-.92a.35.35 0 0 0-.207-.282c-1.43-.64-2.913-.643-4.408-.003a.36.36 0 0 0-.212.288s-.103.907-.103.917a.386.386 0 0 1-.387.388c-.015 0-1.073.137-1.073.137a.395.395 0 0 1-.37-.41l-.035-.49c0-.385.155-.755.44-1.04 1.74-1.74 6.383-1.497 7.88 0"></path></g><circle cx="7" cy="7" r="6.6" stroke="currentColor" stroke-width=".8"></circle><defs><clipPath id="a"><path fill="#fff" d="M7 13 1 7l6-6 6 6z"></path></clipPath></defs>',3)])])}var Jc={render:wS},yS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 9 9"};function bS(e,t){return $(),Ce("svg",yS,[...t[0]||(t[0]=[Q("g",{"clip-path":"url(#a)"},[Q("path",{fill:"currentColor",d:"M0 8.625V6a3.38 3.38 0 0 1 3.375-3.375h1.811V2.03a.75.75 0 0 1 1.28-.53l2.206 2.205a1.125 1.125 0 0 1 0 1.59L6.466 7.5a.75.75 0 0 1-1.28-.53v-.595H3a2.25 2.25 0 0 0-2.25 2.25.375.375 0 0 1-.75 0M5.936 3a.375.375 0 0 1-.375.375H3.375A2.63 2.63 0 0 0 .75 6v.643A3 3 0 0 1 3 5.625h2.561A.375.375 0 0 1 5.936 6v.97l2.205-2.205a.375.375 0 0 0 0-.53L5.936 2.03z"})],-1),Q("defs",null,[Q("clipPath",{id:"a"},[Q("path",{fill:"#fff",d:"M0 0h9v9H0z"})])],-1)])])}var _S={render:bS},SS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20"};function CS(e,t){return $(),Ce("svg",SS,[...t[0]||(t[0]=[Cl('<g clip-path="url(#a)"><path fill="currentColor" d="m13.499 13.495.321-.371a1.095 1.095 0 0 0 0-1.549c-.01-.01-.862-.665-.862-.665a1.1 1.1 0 0 0-1.514 0l-.516.41c-1.17-.516-1.976-1.318-2.457-2.45l.414-.516a1.09 1.09 0 0 0 0-1.513s-.654-.852-.665-.863c-.428-.427-1.12-.427-1.53-.017l-.407.353c-.407.407-.63.955-.63 1.549 0 2.701 3.582 6.279 6.28 6.279.59 0 1.141-.223 1.562-.647zM6.364 7.863c0-.403.148-.774.406-1.029l.407-.354a.39.39 0 0 1 .534-.014s.65.845.661.856a.4.4 0 0 1 0 .548c-.01.01-.58.721-.58.721a.35.35 0 0 0-.053.347c.559 1.463 1.605 2.513 3.115 3.118a.36.36 0 0 0 .354-.053l.72-.576a.386.386 0 0 1 .549 0c.01.01.855.66.855.66a.395.395 0 0 1-.028.552l-.322.372a1.47 1.47 0 0 1-1.046.424c-2.46 0-5.572-3.454-5.572-5.572"></path></g><circle cx="9.899" cy="9.899" r="6.6" stroke="currentColor" stroke-width=".8" transform="rotate(-135 9.9 9.9)"></circle><defs><clipPath id="a"><path fill="#fff" d="M14.143 5.657v8.485H5.658V5.657z"></path></clipPath></defs>',3)])])}var xS={render:CS},TS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"2.8 2.8 14.2 14.2"};function ES(e,t){return $(),Ce("svg",TS,[...t[0]||(t[0]=[Q("circle",{cx:"9.899",cy:"9.899",r:"6.6",stroke:"currentColor","stroke-width":".8",transform:"rotate(-135 9.9 9.9)"},null,-1),Q("path",{fill:"currentColor",d:"M13.634 8.18a.66.66 0 0 0-.729.094l-.585.591a1.663 1.663 0 0 0-1.653-1.531h-3C6.747 7.334 6 8.08 6 9v2a1.67 1.67 0 0 0 1.667 1.667h3c.876 0 1.589-.683 1.654-1.543l.585.585.036.03a.66.66 0 0 0 .692.063.66.66 0 0 0 .366-.591V8.77a.66.66 0 0 0-.366-.592M10.667 12h-3c-.552 0-1-.449-1-1V9c0-.551.448-1 1-1h3c.551 0 1 .449 1 1v2c0 .551-.449 1-1 1m1.666-1.806v-.396l1-1.01.009 2.413z"},null,-1)])])}var AS={render:ES},kS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 19 19"};function IS(e,t){return $(),Ce("svg",kS,[...t[0]||(t[0]=[Q("path",{fill:"currentColor","fill-rule":"evenodd",stroke:"currentColor","stroke-width":".5",d:"M3.91 5.867a1.7 1.7 0 0 1-.946-.248 1.9 1.9 0 0 1-.606-.594l-.117-.223a1.93 1.93 0 0 1 .07-1.722q.077-.143.18-.264a1.8 1.8 0 0 1 .33-.322q.063-.048.13-.086c.05-.03.093-.052.145-.079a1.75 1.75 0 0 1 1.653.07l.07.044c.244.162.446.383.59.645a1.92 1.92 0 0 1 .003 1.847 2 2 0 0 1-.183.27c-.02.026-.029.038-.05.062q-.134.147-.293.264a1.7 1.7 0 0 1-.983.336zM1.88 3.923c-.017.333.048.665.188.965.027.055.048.104.075.156l.145.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.05.15-.078.35-.209.63-.525.8-.905a2.14 2.14 0 0 0-.276-2.205L5.2 2.494c-.03-.023-.037-.036-.064-.057a1.94 1.94 0 0 0-1.212-.483 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.79zm7.442 1.944a1.7 1.7 0 0 1-.942-.248 1.9 1.9 0 0 1-.606-.595L7.657 4.8a1.93 1.93 0 0 1 .071-1.722q.076-.142.18-.264a1.8 1.8 0 0 1 .33-.321q.062-.048.13-.086a1.75 1.75 0 0 1 1.798-.008l.076.043c.243.163.445.384.588.645a1.92 1.92 0 0 1-.001 1.847 2 2 0 0 1-.183.27c-.02.026-.029.039-.05.063a2 2 0 0 1-.29.264 1.73 1.73 0 0 1-.984.336zM7.296 3.923c-.017.333.048.665.188.965.027.055.047.104.075.156l.144.223c.192.26.44.468.726.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.05.15-.078.35-.208.63-.524.802-.905a2.14 2.14 0 0 0-.278-2.205l-.173-.191c-.031-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.214-.482 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.79zm7.442 1.944a1.7 1.7 0 0 1-.944-.248 1.9 1.9 0 0 1-.602-.594l-.117-.223a1.93 1.93 0 0 1 .072-1.722q.075-.141.18-.263a1.8 1.8 0 0 1 .326-.323q.062-.048.13-.086c.05-.03.093-.052.144-.079a1.75 1.75 0 0 1 1.654.07l.07.044c.242.163.444.384.587.645a1.93 1.93 0 0 1 0 1.847 2 2 0 0 1-.184.27c-.02.026-.028.039-.05.063a2 2 0 0 1-.29.264 1.7 1.7 0 0 1-.983.336zM12.71 3.923c-.017.333.048.665.188.965.027.055.048.104.076.156l.144.223a1.97 1.97 0 0 0 1.569.802c.292 0 .58-.067.844-.196.053-.028.1-.05.15-.078a2 2 0 0 0 .795-.904 2.14 2.14 0 0 0-.27-2.206l-.175-.191c-.031-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.213-.482 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.187.79zm-8.8 7.281a1.7 1.7 0 0 1-.942-.246 1.9 1.9 0 0 1-.606-.595l-.121-.224a1.93 1.93 0 0 1 .071-1.722q.077-.142.18-.263a1.8 1.8 0 0 1 .464-.407 1.75 1.75 0 0 1 1.798-.008l.07.043c.242.163.444.384.587.645a1.92 1.92 0 0 1-.001 1.847 2 2 0 0 1-.183.27c-.02.026-.029.039-.05.063a2 2 0 0 1-.29.263 1.7 1.7 0 0 1-.984.337zM1.88 9.261c-.017.333.048.664.188.964.027.056.048.105.075.156l.145.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.049.15-.078.348-.209.626-.525.795-.904a2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.03-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.207-.483 1.8 1.8 0 0 0-.908.195c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.791zm7.442 1.943a1.7 1.7 0 0 1-.941-.246 1.9 1.9 0 0 1-.606-.595l-.117-.223a1.93 1.93 0 0 1 .071-1.722q.075-.143.18-.264a1.8 1.8 0 0 1 .463-.407c.05-.03.093-.051.145-.078a1.74 1.74 0 0 1 1.653.07l.07.043c.243.163.444.385.588.646a1.93 1.93 0 0 1-.001 1.847 2 2 0 0 1-.184.27c-.02.026-.028.039-.05.063a2 2 0 0 1-.29.263c-.288.212-.63.33-.983.337zM7.293 9.261c-.017.333.048.664.188.964.027.056.047.105.075.156l.145.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.049.15-.078.352-.207.633-.524.805-.905a2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.031-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.214-.482 1.8 1.8 0 0 0-.908.195c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.791zm7.445 1.944a1.7 1.7 0 0 1-.944-.246 1.9 1.9 0 0 1-.606-.596l-.117-.222a1.93 1.93 0 0 1 .071-1.723q.075-.141.18-.263a1.8 1.8 0 0 1 .463-.407 1.74 1.74 0 0 1 1.798-.008l.07.043c.243.163.444.384.588.646a1.92 1.92 0 0 1-.001 1.847 2 2 0 0 1-.184.27c-.02.026-.028.038-.05.063a2 2 0 0 1-.29.263c-.288.212-.63.329-.983.337zm-2.03-1.943c-.017.332.048.664.188.964.027.055.048.104.075.156l.145.223a1.97 1.97 0 0 0 1.569.802c.292 0 .58-.067.844-.196.053-.028.1-.05.15-.078a2 2 0 0 0 .795-.904 2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.03-.024-.037-.037-.064-.059a1.94 1.94 0 0 0-1.211-.482 1.8 1.8 0 0 0-.909.196c-.418.2-.754.55-.947.985a2 2 0 0 0-.188.79zM3.91 16.543a1.7 1.7 0 0 1-.942-.246 1.9 1.9 0 0 1-.606-.596l-.121-.223a1.93 1.93 0 0 1 .071-1.723q.077-.141.18-.263a1.8 1.8 0 0 1 .464-.407 1.75 1.75 0 0 1 1.798-.008l.07.043c.242.163.444.385.587.646a1.92 1.92 0 0 1-.001 1.847 2 2 0 0 1-.183.27l-.05.063a2 2 0 0 1-.29.26 1.7 1.7 0 0 1-.984.337zm-2.03-1.944c-.017.333.048.665.188.965.027.055.048.104.075.156l.145.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.05.15-.078a2 2 0 0 0 .795-.904 2.14 2.14 0 0 0-.276-2.205l-.175-.191c-.03-.023-.037-.037-.064-.058a1.94 1.94 0 0 0-1.207-.483 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.79zm7.442 1.944a1.7 1.7 0 0 1-.941-.246 1.9 1.9 0 0 1-.606-.596l-.117-.223a1.93 1.93 0 0 1 .071-1.722q.075-.141.18-.263a1.8 1.8 0 0 1 .463-.407 1.75 1.75 0 0 1 1.797-.008l.07.043c.244.163.445.384.589.645a1.93 1.93 0 0 1-.001 1.848 2 2 0 0 1-.184.27c-.02.026-.028.038-.05.062a2 2 0 0 1-.29.264c-.288.212-.63.329-.983.337zm-2.029-1.944c-.017.333.048.665.188.965.027.055.047.104.075.156l.145.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.05.15-.078.352-.208.633-.524.805-.905a2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.031-.024-.037-.037-.064-.059a1.94 1.94 0 0 0-1.214-.482 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.79zm7.445 1.944a1.7 1.7 0 0 1-.944-.246 1.9 1.9 0 0 1-.606-.595l-.117-.223a1.93 1.93 0 0 1 .071-1.722q.075-.141.18-.263a1.8 1.8 0 0 1 .463-.407c.05-.03.093-.052.145-.079a1.74 1.74 0 0 1 1.653.07l.07.044c.243.163.444.384.588.645a1.92 1.92 0 0 1-.001 1.847 2 2 0 0 1-.184.27c-.02.026-.028.039-.05.063a2 2 0 0 1-.29.264 1.7 1.7 0 0 1-.983.336zm-2.03-1.943c-.017.333.048.665.188.964.027.056.048.105.075.157l.145.222a1.97 1.97 0 0 0 1.569.803c.292 0 .58-.067.844-.196.053-.029.1-.05.15-.079a2 2 0 0 0 .795-.904 2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.03-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.211-.482 1.8 1.8 0 0 0-.909.195c-.418.2-.754.55-.947.986a2 2 0 0 0-.188.79z","clip-rule":"evenodd"},null,-1)])])}var Yc={render:IS},RS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 19 19"};function $S(e,t){return $(),Ce("svg",RS,[...t[0]||(t[0]=[Q("path",{fill:"currentColor","fill-rule":"evenodd",stroke:"currentColor","stroke-width":".5",d:"M3.91 5.867a1.7 1.7 0 0 1-.946-.248 1.9 1.9 0 0 1-.606-.594l-.117-.223a1.93 1.93 0 0 1 .07-1.722q.077-.143.18-.264a1.8 1.8 0 0 1 .33-.322q.063-.048.13-.086c.05-.03.093-.052.145-.079a1.75 1.75 0 0 1 1.653.07l.07.044c.244.162.446.383.59.645a1.92 1.92 0 0 1 .003 1.847 2 2 0 0 1-.183.27c-.02.026-.029.038-.05.062q-.134.147-.293.264a1.7 1.7 0 0 1-.983.336zM1.88 3.923c-.017.333.048.665.188.965.027.055.048.104.075.156l.145.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.05.15-.078.35-.209.63-.525.8-.905a2.14 2.14 0 0 0-.276-2.205L5.2 2.494c-.03-.023-.037-.036-.064-.057a1.94 1.94 0 0 0-1.212-.483 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.79zm7.442 1.944a1.7 1.7 0 0 1-.942-.248 1.9 1.9 0 0 1-.606-.595L7.657 4.8a1.93 1.93 0 0 1 .071-1.722q.077-.142.18-.264a1.8 1.8 0 0 1 .33-.321q.062-.048.13-.086a1.75 1.75 0 0 1 1.798-.008l.076.043c.243.163.445.384.588.645a1.93 1.93 0 0 1-.001 1.847 2 2 0 0 1-.183.27c-.02.026-.029.039-.05.063a2 2 0 0 1-.29.264 1.73 1.73 0 0 1-.984.336zM7.296 3.923c-.017.333.048.665.188.965.027.055.047.104.075.156l.145.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.05.15-.078.35-.208.63-.524.802-.905a2.14 2.14 0 0 0-.278-2.205l-.173-.191c-.031-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.214-.482 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.79zm7.442 1.944a1.7 1.7 0 0 1-.944-.248 1.9 1.9 0 0 1-.602-.594l-.117-.223a1.93 1.93 0 0 1 .072-1.722q.075-.141.18-.263a1.8 1.8 0 0 1 .326-.323q.062-.048.13-.086c.05-.03.093-.052.144-.079a1.74 1.74 0 0 1 1.654.07l.07.044c.242.163.444.384.587.645a1.92 1.92 0 0 1 0 1.847 2 2 0 0 1-.184.27c-.02.026-.028.039-.05.063a2 2 0 0 1-.29.264 1.7 1.7 0 0 1-.983.336zM12.71 3.923c-.017.333.048.665.188.965.027.055.048.104.076.156l.144.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.05.15-.078a2 2 0 0 0 .795-.904 2.14 2.14 0 0 0-.27-2.206l-.175-.191c-.031-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.213-.482 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.187.79zm-8.8 7.281a1.7 1.7 0 0 1-.942-.246 1.9 1.9 0 0 1-.606-.595l-.121-.224a1.93 1.93 0 0 1 .071-1.722q.077-.142.18-.263a1.8 1.8 0 0 1 .464-.407 1.74 1.74 0 0 1 1.798-.008l.07.043c.242.163.444.384.587.645a1.92 1.92 0 0 1-.001 1.847 2 2 0 0 1-.183.27c-.02.026-.029.039-.05.063a2 2 0 0 1-.29.263 1.7 1.7 0 0 1-.984.337zM1.88 9.261c-.017.333.048.664.188.964.027.056.048.105.075.156l.145.223a1.97 1.97 0 0 0 1.569.802c.291 0 .58-.067.844-.196.053-.028.1-.049.15-.078.348-.209.626-.525.795-.904a2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.03-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.207-.483 1.8 1.8 0 0 0-.908.195c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.791zm7.442 1.943a1.7 1.7 0 0 1-.941-.246 1.9 1.9 0 0 1-.606-.595l-.117-.223a1.93 1.93 0 0 1 .071-1.722q.075-.142.18-.264a1.8 1.8 0 0 1 .463-.407c.05-.03.093-.051.145-.078a1.75 1.75 0 0 1 1.653.07l.07.043c.243.163.444.385.588.646a1.92 1.92 0 0 1-.001 1.847 2 2 0 0 1-.184.27c-.02.026-.028.039-.05.063a2 2 0 0 1-.29.263c-.288.212-.63.33-.983.337zM7.293 9.261c-.017.333.048.664.188.964.027.056.047.105.075.156l.145.223a1.97 1.97 0 0 0 1.569.802c.291 0 .58-.067.844-.196.053-.028.1-.049.15-.078.352-.207.633-.524.805-.905a2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.031-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.214-.482 1.8 1.8 0 0 0-.908.195c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.791zm7.444 1.944a1.7 1.7 0 0 1-.943-.246 1.9 1.9 0 0 1-.606-.596l-.117-.222a1.93 1.93 0 0 1 .071-1.723q.075-.141.18-.263a1.8 1.8 0 0 1 .463-.407c.05-.03.093-.051.145-.078a1.74 1.74 0 0 1 1.653.07l.07.043c.243.163.444.384.588.646a1.93 1.93 0 0 1-.001 1.847 2 2 0 0 1-.184.27c-.02.026-.028.038-.05.063a2 2 0 0 1-.29.263c-.288.212-.63.329-.983.337zm-2.029-1.943c-.017.332.048.664.188.964.027.055.048.104.075.156l.145.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.05.15-.078a2 2 0 0 0 .795-.904 2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.03-.024-.037-.037-.064-.059a1.94 1.94 0 0 0-1.211-.482 1.8 1.8 0 0 0-.909.196c-.418.2-.754.55-.947.985a2 2 0 0 0-.188.79zM3.91 16.543a1.7 1.7 0 0 1-.942-.246 1.9 1.9 0 0 1-.606-.596l-.121-.223a1.93 1.93 0 0 1 .071-1.723q.077-.141.18-.263a1.8 1.8 0 0 1 .464-.407 1.75 1.75 0 0 1 1.798-.008l.07.043c.242.163.444.385.587.646a1.92 1.92 0 0 1-.001 1.847 2 2 0 0 1-.183.27l-.05.063a2 2 0 0 1-.29.26 1.7 1.7 0 0 1-.984.337zm-2.03-1.944c-.017.333.048.665.188.964.027.056.048.105.075.157l.145.223a1.97 1.97 0 0 0 1.569.802c.291 0 .58-.067.844-.196.053-.028.1-.05.15-.078a2 2 0 0 0 .795-.904 2.14 2.14 0 0 0-.276-2.205l-.175-.191c-.03-.023-.037-.037-.064-.058a1.94 1.94 0 0 0-1.207-.483 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.79zm7.442 1.944a1.7 1.7 0 0 1-.941-.246 1.9 1.9 0 0 1-.606-.596l-.117-.223a1.93 1.93 0 0 1 .071-1.722q.075-.141.18-.263a1.8 1.8 0 0 1 .463-.407 1.75 1.75 0 0 1 1.798-.008l.07.043c.243.163.444.384.588.645a1.92 1.92 0 0 1-.001 1.848 2 2 0 0 1-.184.27c-.02.026-.028.038-.05.062a2 2 0 0 1-.29.264c-.288.212-.63.329-.983.337zm-2.029-1.944c-.017.333.048.665.188.964.027.056.047.105.075.157l.145.223a1.97 1.97 0 0 0 1.569.802c.291 0 .58-.067.844-.196.053-.028.1-.05.15-.078.352-.208.633-.524.805-.905a2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.031-.024-.037-.037-.064-.059a1.94 1.94 0 0 0-1.214-.482 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.79zm7.444 1.944a1.7 1.7 0 0 1-.943-.246 1.9 1.9 0 0 1-.606-.595l-.117-.223a1.93 1.93 0 0 1 .071-1.722q.075-.141.18-.263a1.8 1.8 0 0 1 .463-.407c.05-.03.093-.052.145-.079a1.75 1.75 0 0 1 1.653.07l.07.044c.243.163.444.384.588.645a1.93 1.93 0 0 1-.001 1.847 2 2 0 0 1-.184.27c-.02.026-.028.039-.05.063a2 2 0 0 1-.29.264 1.7 1.7 0 0 1-.983.336zM12.708 14.6c-.017.333.048.665.188.964.027.056.048.105.075.157l.145.222c.19.26.44.468.725.607a1.92 1.92 0 0 0 1.688 0c.053-.029.1-.05.15-.079a2 2 0 0 0 .795-.904 2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.03-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.211-.482 1.8 1.8 0 0 0-.909.195c-.418.2-.754.55-.947.986a2 2 0 0 0-.188.79z","clip-rule":"evenodd"},null,-1),Q("path",{stroke:"currentColor","stroke-linecap":"round",d:"M2 16.293 16.293 2"},null,-1)])])}var Zc={render:$S},PS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 12 12"};function DS(e,t){return $(),Ce("svg",PS,[...t[0]||(t[0]=[Q("path",{fill:"currentColor",d:"M9.75 1H4.5c-.678 0-1.314.302-1.743.828L.513 4.578a2.26 2.26 0 0 0 0 2.844l2.243 2.75A2.24 2.24 0 0 0 4.5 11h5.25C10.99 11 12 9.99 12 8.75v-5.5C12 2.01 10.99 1 9.75 1m1.75 7.75c0 .965-.785 1.75-1.75 1.75H4.5a1.74 1.74 0 0 1-1.356-.644L.901 7.106a1.755 1.755 0 0 1 0-2.212l2.243-2.75A1.74 1.74 0 0 1 4.5 1.499h5.25c.965 0 1.75.785 1.75 1.75zM8.927 4.427 7.354 6l1.573 1.573a.25.25 0 0 1-.354.353L7 6.355 5.427 7.926a.25.25 0 0 1-.354 0 .25.25 0 0 1 0-.353L6.646 6 5.073 4.427a.25.25 0 0 1 .354-.353L7 5.646l1.573-1.572a.25.25 0 0 1 .353.353z"},null,-1)])])}var Xc={render:DS},OS=["data-call-status"],HS={key:0,class:"webphone-actions__idle wp:!w-full wp:flex wp:flex-col wp:items-center wp:space-y-2 wp:mb-4"},MS={key:2,class:"webphone-actions__connected wp:w-full wp:flex wp:flex-col wp:items-center wp:gap-3"},NS={class:"webphone-actions__row wp:flex wp:items-center wp:gap-6"},qS={class:"webphone-actions__dialer wp:w-full wp:max-w-80 wp:relative"},BS=["data-visible"],LS={key:3,class:"webphone-actions__calling wp:w-full wp:flex wp:flex-col wp:items-center wp:gap-3"},FS={class:"webphone-actions__dialer wp:w-full wp:max-w-80 wp:relative"},VS=["data-visible"],jS={key:4,class:"webphone-actions__transfer-state wp:absolute wp:inset-x-0 wp:bottom-full wp:mb-2 wp:flex wp:justify-center wp:gap-2"},US=X({__name:"CallActions",props:{destination:{},isVideo:{type:Boolean},onAnswer:{type:Function},onHangup:{type:Function},onReject:{type:Function}},emits:["transfer","completeTransfer","cancelTransfer"],setup(e,{emit:t}){const r=Vt("webphone"),{makeCall:n,hangupCall:s,answerCall:i,toggleMute:o,toggleHold:a,sendDTMF:l}=Vt("sip"),u=/^[0-9*#]+$/,c=C=>{if(u.test(C)){for(const _ of C)l(_);for(const _ of C)r.appendKeypad(_)}},d=C=>{C.ctrlKey||C.metaKey||C.altKey||C.key.length!==1||(C.preventDefault(),C.stopPropagation(),c(C.key))},p=C=>{C.data&&(C.preventDefault(),C.stopPropagation(),c(C.data))},h=C=>{C.preventDefault(),C.stopPropagation(),c(C.clipboardData?.getData("text").replace(/\s/g,"")||"")};He(()=>r.callStatus,(C,_)=>{C==="connected"&&_!=="connected"&&r.clearKeypad()});const m=e,w=t,x=V(()=>!!r.transferInProgress),v=V(()=>m.destination||r.keypadValue||r.lastDialedNumber||""),S=V(()=>!!m.destination||/^[+]?[0-9*#]+$/.test(r.keypadValue)),b=V(()=>S.value||!!r.lastDialedNumber),y=V(()=>!m.isVideo||!S.value?!1:v.value?/^[0-9*#]{1,5}$/.test(v.value):!0),T=async C=>{try{m.destination?await n(m.destination,C):r.keypadValue?await n(r.keypadValue,C):r.lastDialedNumber&&(r.keypadValue=r.lastDialedNumber)}catch(_){if(console.error("Error initiating call:",_),C){let E="No se pudo acceder a la cámara.";const P=_ instanceof Error?_.name:String(_);P==="NotReadableError"?E="La cámara parece estar en uso por otra aplicación (ej: Zoom, Meet) o no se puede acceder al hardware.":P==="NotAllowedError"||P==="PermissionDeniedError"?E="Permiso de cámara denegado. Por favor, permita el acceso a la cámara.":P==="NotFoundError"?E="No se detectó ninguna cámara en el sistema.":E+=" "+(_ instanceof Error?_.message:String(_)),confirm(`${E}
75
75
 
76
- ¿Desea realizar la llamada solo con AUDIO?`)&&T(!1)}else alert("Error al iniciar la llamada: "+(_ instanceof Error?_.message:String(_)))}},k=(C=!1)=>{if(m.onAnswer){m.onAnswer(C);return}i(C)},N=async()=>{await s(),await m.onHangup?.()},v=()=>{if(m.onReject){m.onReject();return}s()},B=V(()=>{const C={};return r.channels.forEach(_=>{const E=_.status==="connected"||_.status==="calling"||_.status==="incoming";C[_.id]=E?"wp:text-[var(--color-red)]":"wp:text-[var(--color-avaible)]"}),C}),q=V(()=>B.value[r.activeChannelId]??"wp:text-[var(--p-primary-color)]");return(C,_)=>($(),Se("div",{class:"webphone-actions wp:flex wp:justify-center wp:items-center wp:gap-2 wp:px-4 wp:relative wp:mb-4","data-call-status":f(r).callStatus},[f(r).callStatus==="idle"?($(),Se("div",AS,[b.value?($(),U(f(pt),{key:0,variant:"default",size:"icon",onClick:_[0]||(_[0]=E=>T(!1)),"aria-label":"Audio Call",class:"webphone-actions__button webphone-actions__button--call wp:w-full wp:px-4 wp:border-0 wp:bg-gradient-to-r wp:from-[color:var(--p-primary-color)]/80 wp:to-[color:var(--p-primary-color)]/100 wp:hover:from-[color:var(--p-primary-color)]/75 wp:hover:to-[color:var(--p-primary-color)]"},{default:I(()=>[O(f(vS),{class:"webphone-actions__button-icon wp:size-7 wp:text-white"}),_[12]||(_[12]=Q("span",{class:"webphone-actions__button-label wp:w-full wp:text-white wp:text-xs"},"Llamar",-1))]),_:1})):Be("",!0),y.value?($(),U(f(pt),{key:1,variant:"outline",size:"icon",onClick:_[1]||(_[1]=E=>T(!0)),"aria-label":"Video Call",class:"webphone-actions__button webphone-actions__button--video wp:w-full wp:px-4 wp:bg-transparent wp:border wp:border-primary wp:hover:bg-[var(--p-primary-color)]/8"},{default:I(()=>[O(f(yS),{class:et(["webphone-actions__button-icon wp:size-6 wp:text-primary wp:dark:text-white",q.value])},null,8,["class"]),_[13]||(_[13]=Q("span",{class:"webphone-actions__button-label wp:w-full wp:text-primary wp:text-xs wp:dark:text-white"}," Video llamada a extensiones ",-1))]),_:1})):Be("",!0)])):Be("",!0),f(r).callStatus==="incoming"?($(),Se(Ke,{key:1},[f(r).activeChannel?.hasVideo?($(),U(f(pt),{key:0,variant:"default",size:"icon",onClick:_[2]||(_[2]=E=>k(!0)),class:"webphone-actions__button webphone-actions__button--answer-video wp:animate-pulse wp:w-12 wp:h-12 wp:rounded-full wp:bg-transparent wp:hover:bg-[var(--p-primary-color)]/10","aria-label":"Answer Video"},{default:I(()=>[O(f(aS),{class:"webphone-actions__button-icon wp:w-5 wp:h-5 wp:text-[var(--p-primary-color)]"})]),_:1})):Be("",!0),O(f(pt),{variant:"default",size:"icon",onClick:_[3]||(_[3]=E=>k(!1)),class:"webphone-actions__button webphone-actions__button--answer wp:animate-pulse wp:w-12 wp:h-12 wp:rounded-full wp:border-0 wp:bg-status-available wp:hover:bg-status-available/90","aria-label":"Answer"},{default:I(()=>[O(f(Eg),{class:"webphone-actions__button-icon wp:w-5 wp:h-5 wp:text-white"})]),_:1}),O(f(pt),{variant:"destructive",size:"icon",onClick:v,"aria-label":"Reject",class:"webphone-actions__button webphone-actions__button--hangup webphone-actions__button--reject wp:w-12 wp:h-12 wp:rounded-full wp:border-0 wp:bg-gradient-to-r wp:from-destructive/60 wp:to-destructive/90 wp:hover:from-destructive/70 wp:hover:to-destructive/95"},{default:I(()=>[O(f(Jc),{class:"webphone-actions__button-icon wp:w-5 wp:h-5 wp:text-white"})]),_:1})],64)):Be("",!0),f(r).callStatus==="connected"?($(),Se("div",kS,[Q("div",IS,[O(f(pt),{variant:f(r).isMuted?"destructive":"secondary",size:"icon",onClick:f(o),"aria-label":"Mute",class:"webphone-actions__button webphone-actions__button--mute wp:w-12 wp:h-12 wp:rounded-full wp:bg-primary/10 wp:hover:bg-[var(--p-primary-color)]/20"},{default:I(()=>[f(r).isMuted?($(),U(f(Y_),{key:0,class:"webphone-actions__button-icon wp:size-5 wp:text-status-disconnected"})):($(),U(f(Z_),{key:1,class:"webphone-actions__button-icon wp:size-5 wp:text-[var(--p-primary-color)]"}))]),_:1},8,["variant","onClick"]),O(f(pt),{variant:(f(r).isHeld,"secondary"),size:"icon",onClick:f(a),"aria-label":"Hold",class:"webphone-actions__button webphone-actions__button--hold wp:w-12 wp:h-12 wp:rounded-full wp:bg-primary/10 wp:hover:bg-[var(--p-primary-color)]/20"},{default:I(()=>[f(r).isHeld?($(),U(f(sS),{key:0,class:"webphone-actions__button-icon wp:size-5 wp:text-status-hold"})):($(),U(f(X_),{key:1,class:"webphone-actions__button-icon wp:size-5 wp:text-[var(--p-primary-color)]"}))]),_:1},8,["variant","onClick"]),x.value?Be("",!0):($(),U(f(pt),{key:0,variant:"secondary",size:"icon",onClick:_[4]||(_[4]=E=>w("transfer")),"aria-label":"Transfer",class:"webphone-actions__button webphone-actions__button--transfer wp:w-12 wp:h-12 wp:rounded-full wp:bg-primary/10 wp:hover:bg-[var(--p-primary-color)]/20"},{default:I(()=>[O(f(pS),{class:"webphone-actions__button-icon wp:size-5 wp:text-[var(--p-primary-color)]"})]),_:1}))]),Q("div",RS,[O(f(pt),{variant:"ghost",size:"icon",onClick:_[5]||(_[5]=E=>f(r).toggleKeypad()),"aria-label":f(r).isKeypadVisible?"Ocultar teclado":"Mostrar teclado",class:"webphone-actions__keypad-toggle wp:absolute wp:left-0.5 wp:top-1/2 wp:-translate-y-1/2 wp:z-10 wp:h-9 wp:w-9 wp:rounded-full wp:text-[var(--p-primary-color)] wp:hover:opacity-80"},{default:I(()=>[f(r).isKeypadVisible?($(),U(f(Zc),{key:0,class:"webphone-actions__keypad-toggle-icon wp:size-6"})):($(),U(f(Yc),{key:1,class:"webphone-actions__keypad-toggle-icon wp:size-6"}))]),_:1},8,["aria-label"]),O(f(Ui),{"model-value":f(r).keypadValue,type:"text",inputmode:"tel",pattern:"[0-9*#]*",placeholder:"Marcar opción (0-9, * o #)...","aria-label":"Tonos de marcación",onKeydown:d,onBeforeinput:p,onPaste:h,class:"p-input webphone-actions__input wp:h-10 wp:text-center wp:select-text wp:px-14 wp:text-base hover:wp:border-[var(--p-primary-color)] wp:dark:hover:bg-neutral-900 focus-visible:wp:border-[var(--p-primary-color)] focus-visible:wp:ring-2 montserrat"},null,8,["model-value"]),Q("div",{class:"webphone-actions__backspace wp:absolute wp:right-1 wp:top-1/2 wp:-translate-y-1/2 wp:z-10 wp:flex wp:h-8 wp:w-8 wp:cursor-pointer wp:items-center wp:justify-center wp:hover:bg-accent wp:rounded-full",onClick:_[6]||(_[6]=Xt(E=>f(r).backspaceKeypad(),["stop"]))},[O(f(Xc),{class:"webphone-actions__backspace-icon wp:w-[16px] wp:h-[16px] wp:text-black wp:hover:text-status-disconnected wp:dark:text-neutral-500 wp:dark:hover:text-status-disconnected wp:transition-colors"})])]),Q("div",{class:et(["webphone-actions__keypad wp:w-full wp:transition-all wp:duration-300 wp:ease-in-out wp:overflow-hidden",f(r).isKeypadVisible?"wp:max-h-[300px] wp:opacity-100":"wp:max-h-0 wp:opacity-0"]),"data-visible":f(r).isKeypadVisible?"true":"false"},[O(zc)],10,$S),O(f(pt),{size:"icon",onClick:N,"aria-label":"Hangup",class:"webphone-actions__button webphone-actions__button--hangup wp:w-full wp:px-4 wp:border-0 wp:bg-gradient-to-r wp:from-destructive/60 wp:to-destructive/90 wp:hover:from-destructive/70 wp:hover:to-destructive/95"},{default:I(()=>[O(f(Jc),{class:"webphone-actions__button-icon wp:size-6 wp:text-white"}),_[14]||(_[14]=Q("span",{class:"webphone-actions__button-label wp:w-full wp:text-white wp:text-xs"},"Colgar",-1))]),_:1})])):Be("",!0),f(r).callStatus==="calling"?($(),Se("div",PS,[Q("div",DS,[O(f(pt),{variant:"ghost",size:"icon",onClick:_[7]||(_[7]=E=>f(r).toggleKeypad()),"aria-label":f(r).isKeypadVisible?"Ocultar teclado":"Mostrar teclado",class:"webphone-actions__keypad-toggle wp:absolute wp:left-0.5 wp:top-1/2 wp:-translate-y-1/2 wp:z-10 wp:h-9 wp:w-9 wp:rounded-full wp:text-[var(--p-primary-color)] wp:hover:opacity-80"},{default:I(()=>[f(r).isKeypadVisible?($(),U(f(Zc),{key:0,class:"webphone-actions__keypad-toggle-icon wp:size-6"})):($(),U(f(Yc),{key:1,class:"webphone-actions__keypad-toggle-icon wp:size-6"}))]),_:1},8,["aria-label"]),O(f(Ui),{modelValue:f(r).keypadValue,"onUpdate:modelValue":_[8]||(_[8]=E=>f(r).keypadValue=E),placeholder:"Ingresa el numero a llamar...",class:"p-input webphone-actions__input wp:h-10 wp:text-center wp:select-text wp:px-14 wp:text-base hover:wp:border-[var(--p-primary-color)] wp:dark:hover:bg-neutral-900 focus-visible:wp:border-[var(--p-primary-color)] focus-visible:wp:ring-2 montserrat"},null,8,["modelValue"]),Q("div",{class:"webphone-actions__backspace wp:absolute wp:right-1 wp:top-1/2 wp:-translate-y-1/2 wp:z-10 wp:flex wp:h-8 wp:w-8 wp:cursor-pointer wp:items-center wp:justify-center wp:hover:bg-accent wp:rounded-full",onClick:_[9]||(_[9]=Xt(E=>f(r).backspaceKeypad(),["stop"]))},[O(f(Xc),{class:"webphone-actions__backspace-icon wp:w-[16px] wp:h-[16px] wp:text-black wp:hover:text-status-disconnected wp:dark:text-neutral-500 wp:dark:hover:text-status-disconnected wp:transition-colors"})])]),Q("div",{class:et(["webphone-actions__keypad wp:w-full wp:transition-all wp:duration-300 wp:ease-in-out wp:overflow-hidden",f(r).isKeypadVisible?"wp:max-h-[300px] wp:opacity-100":"wp:max-h-0 wp:opacity-0"]),"data-visible":f(r).isKeypadVisible?"true":"false"},[O(zc)],10,OS),O(f(pt),{variant:"destructive",size:"lg",onClick:N,"aria-label":"Cancel",class:"webphone-actions__button webphone-actions__button--hangup webphone-actions__button--cancel wp:w-full wp:px-4 wp:border-0 wp:bg-gradient-to-r wp:from-destructive/60 wp:to-destructive/90 wp:hover:from-destructive/70 wp:hover:to-destructive/95"},{default:I(()=>[O(f(Jc),{class:"webphone-actions__button-icon wp:size-6 wp:text-white"}),_[15]||(_[15]=Q("span",{class:"webphone-actions__button-label wp:w-full wp:text-white"},"Colgar",-1))]),_:1})])):Be("",!0),x.value&&f(r).callStatus==="connected"?($(),Se("div",HS,[O(f(pt),{variant:"default",size:"sm",onClick:_[10]||(_[10]=E=>w("completeTransfer")),class:"webphone-actions__button webphone-actions__button--complete-transfer wp:gap-2 wp:bg-status-available wp:hover:bg-status-available/90 wp:text-white"},{default:I(()=>[O(f(Kc),{class:"wp:w-4 wp:h-4"}),_[16]||(_[16]=qe(" Completar Transferencia ",-1))]),_:1}),O(f(pt),{variant:"destructive",size:"sm",onClick:_[11]||(_[11]=E=>w("cancelTransfer")),class:"webphone-actions__button webphone-actions__button--cancel-transfer wp:gap-2"},{default:I(()=>[O(f(Gc),{class:"wp:w-4 wp:h-4"}),_[17]||(_[17]=qe(" Cancelar ",-1))]),_:1})])):Be("",!0)],8,ES))}}),NS=MS,qS=X({__name:"Kbd",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(r,n)=>($(),Se("kbd",{class:et(f(dt)("wp:bg-muted wp:text-muted-foreground wp:pointer-events-none wp:inline-flex wp:h-5 wp:w-fit wp:min-w-5 wp:items-center wp:justify-center wp:gap-1 wp:rounded-sm wp:px-1 wp:font-sans wp:text-xs wp:font-medium wp:select-none","wp:[&_svg:not([class*='size-'])]:size-3","wp:[[data-slot=tooltip-content]_&]:bg-background/20 wp:[[data-slot=tooltip-content]_&]:text-background wp:dark:[[data-slot=tooltip-content]_&]:bg-background/10",t.class))},[ne(r.$slots,"default")],2))}}),yn=qS,BS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 30 23"};function LS(e,t){return $(),Se("svg",BS,[...t[0]||(t[0]=[Q("path",{stroke:"currentColor","stroke-miterlimit":"22.926","stroke-width":"1.2",d:"m12.317 2.51 15.123-.027c2.609 1.773 1.65 19.836 0 18.746l-15.124.026zM1.593 2.484h1.45V21.29h-1.45c-1.79-2.697-1.79-17.855 0-18.806ZM6.244.25h3.078a1.573 1.573 0 0 1 1.574 1.566v18.902a1.58 1.58 0 0 1-1.574 1.574H6.244a1.58 1.58 0 0 1-1.574-1.576v-18.9A1.573 1.573 0 0 1 6.244.25Z","clip-rule":"evenodd"},null,-1)])])}var Qc={render:LS},FS=X({__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=Ur(e,t);return(n,s)=>($(),U(f(H_),we({"data-slot":"tooltip"},f(r)),{default:I(i=>[ne(n.$slots,"default",pr(rr(i)))]),_:3},16))}}),Gs=FS,VS=X({inheritAttrs:!1,__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=t,s=Ur(Ut(r,"class"),n);return(i,o)=>($(),U(f(q_),null,{default:I(()=>[O(f(N_),we({"data-slot":"tooltip-content"},{...f(s),...i.$attrs},{class:f(dt)("wp:bg-foreground wp:text-background wp:animate-in wp:fade-in-0 wp:zoom-in-95 wp:data-[state=closed]:animate-out wp:data-[state=closed]:fade-out-0 wp:data-[state=closed]:zoom-out-95 wp:data-[side=bottom]:slide-in-from-top-2 wp:data-[side=left]:slide-in-from-right-2 wp:data-[side=right]:slide-in-from-left-2 wp:data-[side=top]:slide-in-from-bottom-2 wp:z-50 wp:w-fit wp:rounded-md wp:px-3 wp:py-1.5 wp:text-xs wp:text-balance",r.class)}),{default:I(()=>[ne(i.$slots,"default"),O(f($_),{class:"wp:bg-foreground wp:fill-foreground wp:z-50 wp:size-2.5 wp:translate-y-[calc(-50%_-_2px)] wp:rotate-45 wp:rounded-[2px]"})]),_:3},16,["class"])]),_:3}))}}),Js=VS,jS=X({__name:"TooltipProvider",props:{delayDuration:{default:0},skipDelayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean},content:{}},setup(e){const t=e;return(r,n)=>($(),U(f(D_),pr(rr(t)),{default:I(()=>[ne(r.$slots,"default")]),_:3},16))}}),zi=jS,US=X({__name:"TooltipTrigger",props:{reference:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>($(),U(f(B_),we({"data-slot":"tooltip-trigger"},t),{default:I(()=>[ne(r.$slots,"default")]),_:3},16))}}),Ys=US,zS=["data-call-status"],KS={class:"webphone-display__connected-status-label wp:flex wp:gap-2 wp:items-center"},WS={class:"webphone-display__duration wp:ibrad wp:font-medium wp:text-sm"},GS={class:"webphone-display__user-row wp:flex wp:items-center wp:gap-2 wp:text-sm font-semibold"},JS={key:2,class:"webphone-display__dialer wp:w-full wp:flex wp:items-center wp:justify-center wp:min-h-10"},YS={class:"webphone-display__dialer-field wp:relative"},ZS={class:"webphone-display__suggestions wp:absolute wp:bottom-full wp:left-0 wp:w-full wp:z-50 wp:bg-popover wp:text-popover-foreground wp:shadow-md wp:rounded-md wp:border wp:mb-1 wp:max-h-40 wp:overflow-y-auto"},XS=["onPointerdown"],QS={class:"webphone-display__contact-content wp:flex wp:flex-col wp:min-w-0"},eC={class:"webphone-display__contact-name wp:truncate"},tC={class:"webphone-display__contact-number wp:text-xs wp:text-muted-foreground wp:truncate"},rC={key:3,class:"webphone-display__connected-summary wp:flex wp:flex-col wp:items-center wp:justify-center wp:gap-2 wp:w-full"},nC={class:"webphone-display__caller wp:flex wp:flex-col wp:items-center wp:gap-1"},sC={class:"webphone-display__caller-name wp:text-sm wp:font-semibold wp:text-neutral-800 wp:dark:text-white"},iC={key:0,class:"webphone-display__caller-number wp:text-[10px] wp:text-muted-foreground"},oC={key:4,class:"webphone-display__non-idle wp:flex wp:flex-col wp:items-center wp:justify-center wp:gap-2"},aC={class:"webphone-display__non-idle-row wp:flex wp:items-center wp:gap-4"},lC={class:"webphone-display__non-idle-caller wp:flex wp:flex-col wp:items-center"},cC={class:"webphone-display__non-idle-name wp:text-sm wp:font-medium wp:text-neutral-800 wp:dark:text-white"},uC={key:0,class:"webphone-display__non-idle-number wp:text-sm wp:text-muted-foreground"},dC=X({__name:"CallDisplay",props:{allowInput:{type:Boolean,default:!0},isWebCall:{type:Boolean,default:!1},isOnline:{type:Boolean,default:!0},user:{},contacts:{default:()=>[]},channelId:{default:void 0},maskNumber:{type:Boolean,default:!1},extensions:{default:()=>[]}},setup(e){const t=Ft("webphone"),r=Ft("sip"),n=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd+":"Ctrl+",s=e,i=V(()=>s.channelId!==void 0?t.channels.find(P=>P.id===s.channelId):t.activeChannel),o=V(()=>{if(!t.isConnected)return"wp:text-status-disconnected";const P=i.value;return P&&P.status!=="idle"?P.isHeld||P.status==="held"?"wp:text-status-hold":P.status==="incoming"?"wp:text-status-incoming":"wp:text-primary":"wp:text-primary"}),a=F(!1),l=F(null),u=F(null),c=P=>P.replace(/[^0-9*#]/g,""),d=P=>{P.ctrlKey||P.metaKey||P.altKey||P.key.length!==1||/[0-9*#]/.test(P.key)||P.preventDefault()},p=P=>{P.data&&c(P.data)!==P.data&&P.preventDefault()};hb(l,()=>{a.value=!1});const h=V({get:()=>i.value?.keypadValue||"",set:P=>{i.value&&t.updateChannelState(i.value.id,{keypadValue:c(P)})}}),m=V(()=>/^[0-9*#]+$/.test(h.value)),w=P=>s.maskNumber?_r(P.number,s.extensions):P.number,x=V(()=>{if(!h.value)return s.contacts.slice(0,10);const P=h.value.toLowerCase(),R=[];for(const D of s.contacts)if((D.name.toLowerCase().includes(P)||w(D).includes(P))&&(R.push(D),R.length>=10))break;return R}),g=P=>{i.value&&t.updateChannelState(i.value.id,{keypadValue:c(P.number)}),a.value=!1},S=()=>{!h.value||!m.value||(a.value=!1,r.makeCall(h.value))};Me(h,()=>{a.value=!0});const b=()=>{h.value&&m.value&&S()},y=()=>{a.value=!1},T=()=>{a.value=!0},k=()=>{setTimeout(()=>{a.value=!1},150)},N=F(Date.now());db(()=>{N.value=Date.now()},1e3);const v=V(()=>{const P=i.value?.startTime,R=i.value?.status||"idle";if(!P||R!=="connected")return"00:00:00";const D=Math.floor((N.value-P)/1e3);return D<0?"00:00:00":`${Math.floor(D/3600).toString().padStart(2,"0")}:${Math.floor(D%3600/60).toString().padStart(2,"0")}:${(D%60).toString().padStart(2,"0")}`}),B=V(()=>{if(!s.isOnline)return"Sin internet";if(!t.isConnected)return"Sin conexión";const P=i.value,R=P?.status||"idle";if(R==="idle")return"Disponible";if(R==="calling")return"Llamando...";if(P?.isHeld){const D=P.remoteNumber||P.keypadValue||"Unknown";return`En espera - ${s.maskNumber?_r(D,s.extensions):D}`}return R==="connected"?"Conectado":R.charAt(0).toUpperCase()+R.slice(1)}),q=P=>{if(!P)return"";const R=P.trim(),D=R.startsWith("+"),G=R.replace(/[^\d]/g,"");return D?`+${G}`:G},C=P=>/\d/.test(P)&&/^[+\d\s().*#-]+$/.test(P.trim()),_=V(()=>{const P=i.value,R=P?.remoteNumber||P?.keypadValue,D=P?.remoteDisplayName;if(!R)return"Unknown";const G=q(R),W=s.contacts?.find(ae=>q(ae.number)===G);return W?s.maskNumber&&C(W.name)?_r(W.name,s.extensions):W.name:D&&D!==R?s.maskNumber&&C(D)?q(D)===G?_r(R,s.extensions):_r(D,s.extensions):D:s.maskNumber?_r(R,s.extensions):R}),E=V(()=>{const P=i.value,R=P?.remoteNumber||P?.keypadValue||"";return s.maskNumber?_r(R,s.extensions):R});return(P,R)=>($(),Se("div",{class:"webphone-display wp:flex wp:flex-col wp:items-center wp:px-4 wp:space-y-6","data-call-status":i.value?.status||"idle"},[(i.value?.status||"idle")==="connected"?($(),Se("div",{key:0,class:et([o.value,"webphone-display__connected-status wp:w-full wp:flex wp:items-center wp:justify-between wp:gap-2 wp:text-3xl wp:font-light wp:mb-5"])},[Q("div",KS,[O(f(Qc),{class:"webphone-display__connected-status-icon wp:w-4 wp:h-4"}),R[3]||(R[3]=Q("span",{class:"webphone-display__connected-status-text wp:text-sm wp:montserrat wp:font-medium"},"En llamada",-1))]),Q("span",WS,Le(v.value),1)],2)):Be("",!0),s.user?($(),Se("span",{key:1,class:et([o.value,"webphone-display__user wp:font-bold wp:text-lg wp:flex wp:items-center wp:gap-1 wp:transition-colors wp:duration-300"])},[Q("div",GS,[O(f(Qc),{class:"webphone-display__user-icon wp:size-6 wp:shrink-0 montserrat"}),qe(" "+Le(s.user),1)]),Q("div",{class:et(["webphone-display__status-text wp:font-semibold wp:tracking-wider wp:text-sm wp:text-[var(--color-primary)] montserrat",o.value])},Le(B.value),3)],2)):Be("",!0),(i.value?.status||"idle")==="idle"&&s.allowInput?($(),Se("div",JS,[Q("div",{class:"webphone-display__dialer-container wp:relative wp:w-full wp:max-w-80",ref_key:"containerRef",ref:l},[Q("div",YS,[O(f(zi),null,{default:I(()=>[O(f(Gs),null,{default:I(()=>[O(f(Ys),{"as-child":""},{default:I(()=>[O(f(pt),{onClick:R[0]||(R[0]=D=>f(t).toggleKeypad()),variant:"ghost",size:"icon",class:et(f(dt)("webphone-display__keypad-toggle wp:absolute wp:left-0.5 wp:top-1/2 wp:-translate-y-1/2 wp:z-10 wp:h-9 wp:w-9 wp:rounded-full wp:text-[var(--p-primary-color)] wp:hover:opacity-80"))},{default:I(()=>[f(t).isKeypadVisible?($(),U(f(Zc),{key:0,class:"webphone-display__keypad-toggle-icon wp:size-5"})):($(),U(f(Yc),{key:1,class:"webphone-display__keypad-toggle-icon wp:size-5"}))]),_:1},8,["class"])]),_:1}),O(f(Js),{class:"wp:flex wp:items-center wp:gap-2"},{default:I(()=>[Q("span",null,Le(f(t).isKeypadVisible?"Ocultar":"Mostrar")+" teclado",1),O(f(yn),null,{default:I(()=>[qe(Le(f(n))+"K",1)]),_:1})]),_:1})]),_:1})]),_:1}),O(f(Ui),{ref_key:"inputRef",ref:u,modelValue:h.value,"onUpdate:modelValue":R[1]||(R[1]=D=>h.value=D),type:"text",inputmode:"tel",pattern:"[0-9*#]*",onFocus:T,onBlur:k,onKeydown:[d,ql(b,["enter"]),ql(y,["escape"])],onBeforeinput:p,placeholder:"Ingresa el numero a llamar...",class:"p-input webphone-display__input wp:h-10 wp:text-center wp:select-text wp:px-14 wp:text-base hover:wp:border-[var(--p-primary-color)] wp:dark:hover:bg-neutral-900 focus-visible:wp:border-[var(--p-primary-color)] focus-visible:wp:ring-2 montserrat"},null,8,["modelValue"]),Q("div",{class:"webphone-display__backspace wp:absolute wp:right-1 wp:top-1/2 wp:-translate-y-1/2 wp:z-10 wp:flex wp:h-8 wp:w-8 wp:cursor-pointer wp:items-center wp:justify-center wp:hover:bg-accent wp:rounded-full",onClick:R[2]||(R[2]=Xt(D=>f(t).backspaceKeypad(),["stop"]))},[O(f(Xc),{class:"webphone-display__backspace-icon wp:w-[15px] wp:h-[15px] wp:text-black wp:hover:text-status-disconnected wp:dark:text-neutral-100 wp:dark:hover:text-status-disconnected wp:transition-colors"})])]),mo(Q("div",ZS,[m.value?($(),Se("div",{key:0,class:"webphone-display__suggestion webphone-display__suggestion--raw wp:cursor-pointer wp:hover:bg-accent wp:flex wp:items-center wp:gap-2 wp:p-2 wp:px-3 wp:text-sm",onPointerdown:Xt(S,["prevent"])},[O(f(Eg),{class:"webphone-display__suggestion-icon wp:w-4 wp:h-4 wp:shrink-0"}),Q("span",null,"Marcar "+Le(h.value),1)],32)):Be("",!0),($(!0),Se(Ke,null,vr(x.value,D=>($(),Se("div",{key:D.number,class:"webphone-display__suggestion webphone-display__suggestion--contact wp:cursor-pointer wp:hover:bg-accent wp:flex wp:items-center wp:gap-2 wp:p-2 wp:px-3 wp:text-sm",onPointerdown:Xt(G=>g(D),["prevent"])},[Q("div",{class:et(f(dt)("webphone-display__contact-badge wp:flex wp:items-center wp:justify-center wp:w-6 wp:h-6 wp:rounded-full wp:shrink-0",D.type==="extension"?"wp:bg-blue-100 wp:text-blue-600 wp:dark:bg-blue-900/30 wp:dark:text-blue-400":D.type==="contact"?"wp:bg-emerald-100 wp:text-emerald-600 wp:dark:bg-emerald-900/30 wp:dark:text-emerald-400":D.type==="voicemail"?"wp:bg-purple-100 wp:text-purple-600 wp:dark:bg-purple-900/30 wp:dark:text-purple-400":D.type==="tool"?"wp:bg-amber-100 wp:text-amber-600 wp:dark:bg-amber-900/30 wp:dark:text-amber-400":"wp:bg-neutral-100 wp:text-neutral-600 wp:dark:bg-neutral-800 wp:dark:text-neutral-400"))},[D.type==="extension"?($(),U(f(xg),{key:0,class:"wp:w-3 wp:h-3"})):D.type==="contact"?($(),U(f(Wc),{key:1,class:"wp:w-3 wp:h-3"})):D.type==="voicemail"?($(),U(f(Ag),{key:2,class:"wp:w-3 wp:h-3"})):D.type==="tool"?($(),U(f(kg),{key:3,class:"wp:w-3 wp:h-3"})):($(),U(f(Wc),{key:4,class:"wp:w-3 wp:h-3"}))],2),Q("div",QS,[Q("span",eC,Le(D.name),1),Q("span",tC,Le(w(D)),1)])],40,XS))),128))],512),[[qo,a.value&&h.value&&(x.value.length>0||m.value)]])],512)])):(i.value?.status||"idle")==="connected"?($(),Se("div",rC,[Q("div",nC,[Q("div",sC," En llamada con "+Le(_.value),1),_.value!==E.value?($(),Se("div",iC,Le(E.value),1)):Be("",!0)])])):(i.value?.status||"idle")!=="idle"?($(),Se("div",oC,[Q("div",aC,[Q("div",lC,[Q("div",cC,Le(_.value),1),_.value!==E.value?($(),Se("div",uC,Le(E.value),1)):Be("",!0)]),O(f(zi),null,{default:I(()=>[O(f(Gs),null,{default:I(()=>[O(f(Ys),{"as-child":""}),O(f(Js),{class:"wp:flex wp:items-center wp:gap-2"},{default:I(()=>[Q("span",null,Le(f(t).isKeypadVisible?"Ocultar":"Mostrar")+" teclado",1),O(f(yn),null,{default:I(()=>[qe(Le(f(n))+"K",1)]),_:1})]),_:1})]),_:1})]),_:1})])])):Be("",!0)],8,zS))}}),fC=dC,pC=X({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=Ur(e,t);return(n,s)=>($(),U(f(Kb),we({"data-slot":"dialog"},f(r)),{default:I(i=>[ne(n.$slots,"default",pr(rr(i)))]),_:3},16))}}),eu=pC,hC=X({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Ut(t,"class");return(n,s)=>($(),U(f(d1),we({"data-slot":"dialog-overlay"},f(r),{class:f(dt)("wp:data-[state=open]:animate-in wp:data-[state=closed]:animate-out wp:data-[state=closed]:fade-out-0 wp:data-[state=open]:fade-in-0 wp:fixed wp:inset-0 wp:z-50 wp:bg-black/80",t.class)}),{default:I(()=>[ne(n.$slots,"default")]),_:3},16,["class"]))}}),gC=hC,vC=X({inheritAttrs:!1,__name:"DialogContent",props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]},showCloseButton:{type:Boolean,default:!0}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=e,n=t,s=Ur(Ut(r,"class"),n);return(i,o)=>($(),U(f(f1),null,{default:I(()=>[O(gC),O(f(c1),we({"data-slot":"dialog-content"},{...i.$attrs,...f(s)},{class:f(dt)("wp:bg-background wp:data-[state=open]:animate-in wp:data-[state=closed]:animate-out wp:data-[state=closed]:fade-out-0 wp:data-[state=open]:fade-in-0 wp:data-[state=closed]:zoom-out-95 wp:data-[state=open]:zoom-in-95 wp:fixed wp:top-[50%] wp:left-[50%] wp:z-50 wp:grid wp:w-full wp:max-w-[calc(100%-2rem)] wp:translate-x-[-50%] wp:translate-y-[-50%] wp:gap-4 wp:rounded-lg wp:border wp:p-6 wp:shadow-lg wp:duration-200 wp:sm:max-w-lg",r.class)}),{default:I(()=>[ne(i.$slots,"default"),e.showCloseButton?($(),U(f(Wb),{key:0,"data-slot":"dialog-close",class:"wp:ring-offset-background wp:focus:ring-ring wp:data-[state=open]:bg-accent wp:data-[state=open]:text-muted-foreground wp:absolute wp:top-4 wp:right-4 wp:rounded-xs wp:opacity-70 wp:transition-opacity wp:hover:opacity-100 wp:focus:ring-2 wp:focus:ring-offset-2 wp:focus:outline-hidden wp:disabled:pointer-events-none wp:[&_svg]:pointer-events-none wp:[&_svg]:shrink-0 wp:[&_svg:not([class*='size-'])]:size-4"},{default:I(()=>[O(f(Gc)),o[0]||(o[0]=Q("span",{class:"wp:sr-only"},"Close",-1))]),_:1})):Be("",!0)]),_:3},16,["class"])]),_:3}))}}),tu=vC,mC=X({__name:"DialogFooter",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(r,n)=>($(),Se("div",{"data-slot":"dialog-footer",class:et(f(dt)("wp:flex wp:flex-col-reverse wp:gap-2 wp:sm:flex-row wp:sm:justify-end",t.class))},[ne(r.$slots,"default")],2))}}),Ig=mC,wC=X({__name:"DialogHeader",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(r,n)=>($(),Se("div",{"data-slot":"dialog-header",class:et(f(dt)("wp:flex wp:flex-col wp:gap-2 wp:text-center wp:sm:text-left",t.class))},[ne(r.$slots,"default")],2))}}),ru=wC,yC=X({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=hn(Ut(t,"class"));return(n,s)=>($(),U(f(p1),we({"data-slot":"dialog-title"},f(r),{class:f(dt)("wp:text-lg wp:leading-none wp:font-semibold",t.class)}),{default:I(()=>[ne(n.$slots,"default")]),_:3},16,["class"]))}}),nu=yC,bC=X({__name:"Select",props:{open:{type:Boolean},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{},by:{type:[String,Function]},dir:{},multiple:{type:Boolean},autocomplete:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(e,{emit:t}){const r=Ur(e,t);return(n,s)=>($(),U(f(s_),we({"data-slot":"select"},f(r)),{default:I(i=>[ne(n.$slots,"default",pr(rr(i)))]),_:3},16))}}),su=bC,_C=X({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},hideShiftedArrow:{type:Boolean},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=t,s=Ur(Ut(r,"class"),n);return(i,o)=>($(),U(f(__),null,{default:I(()=>[O(f(p_),we({"data-slot":"select-content"},{...i.$attrs,...f(s)},{class:f(dt)("wp:bg-popover wp:text-popover-foreground wp:data-[state=open]:animate-in wp:data-[state=closed]:animate-out wp:data-[state=closed]:fade-out-0 wp:data-[state=open]:fade-in-0 wp:data-[state=closed]:zoom-out-95 wp:data-[state=open]:zoom-in-95 wp:data-[side=bottom]:slide-in-from-top-2 wp:data-[side=left]:slide-in-from-right-2 wp:data-[side=right]:slide-in-from-left-2 wp:data-[side=top]:slide-in-from-bottom-2 wp:relative wp:z-50 wp:max-h-(--reka-select-content-available-height) wp:min-w-[8rem] wp:overflow-x-hidden wp:overflow-y-auto wp:rounded-md wp:border wp:shadow-md",e.position==="popper"&&"wp:data-[side=bottom]:translate-y-1 wp:data-[side=left]:-translate-x-1 wp:data-[side=right]:translate-x-1 wp:data-[side=top]:-translate-y-1",r.class)}),{default:I(()=>[O(f(kC)),O(f(E_),{class:et(f(dt)("wp:p-1",e.position==="popper"&&"wp:h-[var(--reka-select-trigger-height)] wp:w-full wp:min-w-[var(--reka-select-trigger-width)] wp:scroll-my-1"))},{default:I(()=>[ne(i.$slots,"default")]),_:3},8,["class"]),O(f(EC))]),_:3},16,["class"])]),_:3}))}}),iu=_C,SC=X({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>($(),U(f(g_),we({"data-slot":"select-group"},t),{default:I(()=>[ne(r.$slots,"default")]),_:3},16))}}),ou=SC,CC={class:"wp:absolute wp:right-2 wp:flex wp:size-3.5 wp:items-center wp:justify-center"},xC=X({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=hn(Ut(t,"class"));return(n,s)=>($(),U(f(w_),we({"data-slot":"select-item"},f(r),{class:f(dt)("wp:focus:bg-accent wp:focus:text-accent-foreground wp:[&_svg:not([class*='text-'])]:text-muted-foreground wp:relative wp:flex wp:w-full wp:cursor-default wp:items-center wp:gap-2 wp:rounded-sm wp:py-1.5 wp:pr-8 wp:pl-2 wp:text-sm wp:outline-hidden wp:select-none wp:data-[disabled]:pointer-events-none wp:data-[disabled]:opacity-50 wp:[&_svg]:pointer-events-none wp:[&_svg]:shrink-0 wp:[&_svg:not([class*='size-'])]:size-4 wp:*:[span]:last:flex wp:*:[span]:last:items-center wp:*:[span]:last:gap-2",t.class)}),{default:I(()=>[Q("span",CC,[O(f(y_),null,{default:I(()=>[ne(n.$slots,"indicator-icon",{},()=>[O(f(Kc),{class:"wp:size-4"})])]),_:3})]),O(f(b_),null,{default:I(()=>[ne(n.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),Ki=xC,TC=X({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=hn(Ut(t,"class"));return(n,s)=>($(),U(f(S_),we({"data-slot":"select-scroll-down-button"},f(r),{class:f(dt)("wp:flex wp:cursor-default wp:items-center wp:justify-center wp:py-1",t.class)}),{default:I(()=>[ne(n.$slots,"default",{},()=>[O(f(Tg),{class:"wp:size-4"})])]),_:3},16,["class"]))}}),EC=TC,AC=X({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=hn(Ut(t,"class"));return(n,s)=>($(),U(f(C_),we({"data-slot":"select-scroll-up-button"},f(r),{class:f(dt)("wp:flex wp:cursor-default wp:items-center wp:justify-center wp:py-1",t.class)}),{default:I(()=>[ne(n.$slots,"default",{},()=>[O(f(G_),{class:"wp:size-4"})])]),_:3},16,["class"]))}}),kC=AC,IC=X({__name:"SelectTrigger",props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]},size:{default:"default"}},setup(e){const t=e,r=hn(Ut(t,"class","size"));return(n,s)=>($(),U(f(x_),we({"data-slot":"select-trigger","data-size":e.size},f(r),{class:f(dt)("wp:border-input wp:data-[placeholder]:text-muted-foreground wp:[&_svg:not([class*='text-'])]:text-muted-foreground wp:focus-visible:border-ring wp:focus-visible:ring-ring/50 wp:aria-invalid:ring-destructive/20 wp:dark:aria-invalid:ring-destructive/40 wp:aria-invalid:border-destructive wp:dark:bg-input/30 wp:dark:hover:bg-input/50 wp:flex wp:w-fit wp:items-center wp:justify-between wp:gap-2 wp:rounded-md wp:border wp:bg-transparent wp:px-3 wp:py-2 wp:text-sm wp:whitespace-nowrap wp:shadow-xs wp:transition-[color,box-shadow] wp:outline-none wp:focus-visible:ring-[3px] wp:disabled:cursor-not-allowed wp:disabled:opacity-50 wp:data-[size=default]:h-9 wp:data-[size=sm]:h-8 wp:*:data-[slot=select-value]:line-clamp-1 wp:*:data-[slot=select-value]:flex wp:*:data-[slot=select-value]:items-center wp:*:data-[slot=select-value]:gap-2 wp:[&_svg]:pointer-events-none wp:[&_svg]:shrink-0 wp:[&_svg:not([class*='size-'])]:size-4",t.class)}),{default:I(()=>[ne(n.$slots,"default"),O(f(v_),{"as-child":""},{default:I(()=>[O(f(Tg),{class:"wp:size-4 wp:opacity-50"})]),_:1})]),_:3},16,["data-size","class"]))}}),au=IC,RC=X({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>($(),U(f(T_),we({"data-slot":"select-value"},t),{default:I(()=>[ne(r.$slots,"default")]),_:3},16))}}),lu=RC,$C=X({__name:"Slider",props:{defaultValue:{},modelValue:{},disabled:{type:Boolean},orientation:{},dir:{},inverted:{type:Boolean},min:{},max:{},step:{},minStepsBetweenThumbs:{},thumbAlignment:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue","valueCommit"],setup(e,{emit:t}){const r=e,n=t,s=Ur(Ut(r,"class"),n);return(i,o)=>($(),U(f(P2),we({"data-slot":"slider",class:f(dt)("wp:relative wp:flex wp:w-full wp:touch-none wp:items-center wp:select-none wp:data-[disabled]:opacity-50 wp:data-[orientation=vertical]:h-full wp:data-[orientation=vertical]:min-h-44 wp:data-[orientation=vertical]:w-auto wp:data-[orientation=vertical]:flex-col",r.class)},f(s)),{default:I(({modelValue:a})=>[O(f(M2),{"data-slot":"slider-track",class:"wp:bg-muted wp:relative wp:grow wp:overflow-hidden wp:rounded-full wp:data-[orientation=horizontal]:h-1.5 wp:data-[orientation=horizontal]:w-full wp:data-[orientation=vertical]:h-full wp:data-[orientation=vertical]:w-1.5"},{default:I(()=>[O(f(D2),{"data-slot":"slider-range",class:"wp:bg-primary wp:absolute wp:data-[orientation=horizontal]:h-full wp:data-[orientation=vertical]:w-full"})]),_:1}),($(!0),Se(Ke,null,vr(a,(l,u)=>($(),U(f(H2),{key:u,"data-slot":"slider-thumb",class:"wp:bg-white wp:border-primary wp:ring-ring/50 wp:block wp:size-4 wp:shrink-0 wp:rounded-full wp:border wp:shadow-sm wp:transition-[color,box-shadow] wp:hover:ring-4 wp:focus-visible:ring-4 wp:focus-visible:outline-hidden wp:disabled:pointer-events-none wp:disabled:opacity-50"}))),128))]),_:1},16,["class"]))}}),cu=$C,PC=X({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Ut(t,"class");return(n,s)=>($(),U(f(N2),we({"data-slot":"label"},f(r),{class:f(dt)("wp:flex wp:items-center wp:gap-2 wp:text-sm wp:leading-none wp:font-medium wp:select-none wp:group-data-[disabled=true]:pointer-events-none wp:group-data-[disabled=true]:opacity-50 wp:peer-disabled:cursor-not-allowed wp:peer-disabled:opacity-50",t.class)}),{default:I(()=>[ne(n.$slots,"default")]),_:3},16,["class"]))}}),bn=PC,DC=X({__name:"Separator",props:{orientation:{default:"horizontal"},decorative:{type:Boolean,default:!0},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Ut(t,"class");return(n,s)=>($(),U(f(k_),we({"data-slot":"separator"},f(r),{class:f(dt)("wp:bg-border wp:shrink-0 wp:data-[orientation=horizontal]:h-px wp:data-[orientation=horizontal]:w-full wp:data-[orientation=vertical]:h-full wp:data-[orientation=vertical]:w-px",t.class)}),null,16,["class"]))}}),Rg=DC,OC=X({__name:"Toggle",props:{defaultValue:{type:Boolean},modelValue:{type:[Boolean,null]},disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]},variant:{default:"default"},size:{default:"default"}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=t,s=Ur(Ut(r,"class","size","variant"),n);return(i,o)=>($(),U(f(R_),we({"data-slot":"toggle"},f(s),{class:f(dt)(f(MC)({variant:e.variant,size:e.size}),r.class)}),{default:I(a=>[ne(i.$slots,"default",pr(rr(a)))]),_:3},16,["class"]))}}),HC=OC;const MC=th("wp:inline-flex wp:items-center wp:justify-center wp:gap-2 wp:rounded-md wp:text-sm wp:font-medium wp:hover:bg-muted wp:hover:text-muted-foreground wp:disabled:pointer-events-none wp:disabled:opacity-50 wp:data-[state=on]:bg-accent wp:data-[state=on]:text-accent-foreground wp:[&_svg]:pointer-events-none wp:[&_svg:not([class*='size-'])]:size-4 wp:[&_svg]:shrink-0 wp:focus-visible:border-ring wp:focus-visible:ring-ring/50 wp:focus-visible:ring-[3px] wp:outline-none wp:transition-[color,box-shadow] wp:aria-invalid:ring-destructive/20 wp:dark:aria-invalid:ring-destructive/40 wp:aria-invalid:border-destructive wp:whitespace-nowrap",{variants:{variant:{default:"wp:bg-transparent",outline:"wp:border wp:border-input wp:bg-transparent wp:shadow-xs wp:hover:bg-accent wp:hover:text-accent-foreground"},size:{default:"wp:h-9 wp:px-2 wp:min-w-9",sm:"wp:h-8 wp:px-1.5 wp:min-w-8",lg:"wp:h-10 wp:px-2.5 wp:min-w-10"}},defaultVariants:{variant:"default",size:"default"}});var NC={class:"wp:flex wp:flex-col wp:gap-6 wp:py-4"},qC={class:"wp:flex wp:flex-col wp:gap-2"},BC={class:"wp:flex wp:flex-col wp:gap-2"},LC={class:"wp:flex wp:flex-col wp:gap-4"},FC={class:"wp:flex wp:justify-between"},VC={class:"wp:text-sm wp:text-muted-foreground"},jC={class:"wp:flex wp:flex-col wp:gap-4"},UC={class:"wp:flex wp:justify-between"},zC={class:"wp:text-sm wp:text-muted-foreground"},KC={class:"wp:flex wp:flex-col wp:gap-2"},WC={class:"wp:flex wp:justify-between"},GC={class:"wp:text-sm wp:text-muted-foreground"},JC={class:"wp:flex wp:flex-col wp:gap-2"},YC={class:"wp:flex wp:items-center wp:justify-between wp:gap-4"},ZC={class:"wp:flex wp:flex-col wp:gap-1"},XC={class:"wp:flex wp:flex-col wp:gap-3"},QC={class:"wp:grid wp:grid-cols-2 wp:gap-2 wp:text-sm"},ex={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},tx={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},rx={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},nx={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},sx={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},ix={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},ox=X({__name:"AudioSettingsDialog",props:{visible:{type:Boolean}},emits:["update:visible"],setup(e,{emit:t}){const r=t,n=navigator.platform.toUpperCase().indexOf("MAC")>=0?"⌘":"Ctrl+",s=Ft("sip"),{setVolume:i,setOutputDevice:o,setInputDevice:a,setNotificationVolume:l}=s,u=s.setRingtoneVolume??(()=>{}),c=s.setRingtoneTone??(()=>{}),d=F([]),p=F([]),h=cs("webphone-input-device",""),m=cs("webphone-output-device",""),w=cs("webphone-volume",100),x=cs("webphone-notification-volume",100),g=cs("webphone-ringtone-volume",100),S=cs("webphone-ringtone-tone","original"),b=cs(Zp,!1),y={classic:"original","original-loud":"aurora","original-intense":"resonancia"},T=async()=>{try{await navigator.mediaDevices.getUserMedia({audio:!0});const P=await navigator.mediaDevices.enumerateDevices();d.value=P.filter(G=>G.kind==="audioinput").map((G,W)=>({deviceId:G.deviceId,label:G.label||`Microphone ${W+1}`})),p.value=P.filter(G=>G.kind==="audiooutput").map((G,W)=>({deviceId:G.deviceId,label:G.label||`Speaker ${W+1}`}));const R=d.value.some(G=>G.deviceId===h.value);(!h.value||!R)&&d.value.length>0&&(h.value=d.value[0]?.deviceId??"");const D=p.value.some(G=>G.deviceId===m.value);(!m.value||!D)&&p.value.length>0&&(m.value=p.value[0]?.deviceId??""),h.value&&a(h.value),m.value&&o(m.value)}catch(P){console.error("Error loading devices",P)}},k=P=>{const R=String(P);h.value=R,a(R)},N=P=>{const R=String(P);m.value=R,o(R)},v=(P,R=35)=>P.length<=R?P:P.substring(0,R)+"...",B=V({get:()=>[w.value],set:P=>{w.value=P[0],i(w.value)}}),q=V({get:()=>[x.value],set:P=>{x.value=P[0],l(x.value)}}),C=V({get:()=>[g.value],set:P=>{g.value=P[0]??100,u(g.value)}}),_=P=>{S.value=String(P),c(S.value)},E=P=>{b.value=P};return tt(()=>{T(),i(w.value),l(x.value),u(g.value),localStorage.removeItem("webphone-custom-ringtone");const P=y[S.value]??S.value;S.value=["original","aurora","resonancia"].includes(P)?P:"original",c(S.value)}),(P,R)=>e.visible?($(),U(f(eu),{key:0,open:e.visible,"onUpdate:open":R[6]||(R[6]=D=>r("update:visible",D))},{default:I(()=>[O(f(tu),{class:"wp:sm:max-w-sm"},{default:I(()=>[O(f(ru),null,{default:I(()=>[O(f(nu),null,{default:I(()=>[...R[7]||(R[7]=[qe("Audio Settings",-1)])]),_:1})]),_:1}),Q("div",NC,[Q("div",qC,[O(f(bn),null,{default:I(()=>[...R[8]||(R[8]=[qe("Microphone",-1)])]),_:1}),O(f(su),{modelValue:f(h),"onUpdate:modelValue":[R[0]||(R[0]=D=>rt(h)?h.value=D:null),k]},{default:I(()=>[O(f(au),{class:"wp:w-full"},{default:I(()=>[O(f(lu),{placeholder:"Select Microphone"})]),_:1}),O(f(iu),null,{default:I(()=>[O(f(ou),null,{default:I(()=>[($(!0),Se(Ke,null,vr(d.value,D=>($(),U(f(Ki),{key:D.deviceId,value:D.deviceId,title:D.label},{default:I(()=>[qe(Le(v(D.label)),1)]),_:2},1032,["value","title"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),Q("div",BC,[O(f(bn),null,{default:I(()=>[...R[9]||(R[9]=[qe("Speaker",-1)])]),_:1}),O(f(su),{modelValue:f(m),"onUpdate:modelValue":[R[1]||(R[1]=D=>rt(m)?m.value=D:null),N]},{default:I(()=>[O(f(au),{class:"wp:w-full"},{default:I(()=>[O(f(lu),{placeholder:"Select Speaker"})]),_:1}),O(f(iu),null,{default:I(()=>[O(f(ou),null,{default:I(()=>[($(!0),Se(Ke,null,vr(p.value,D=>($(),U(f(Ki),{key:D.deviceId,value:D.deviceId,title:D.label},{default:I(()=>[qe(Le(v(D.label)),1)]),_:2},1032,["value","title"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),Q("div",LC,[Q("div",FC,[O(f(bn),null,{default:I(()=>[...R[10]||(R[10]=[qe("Media Volume",-1)])]),_:1}),Q("span",VC,Le(f(w))+"%",1)]),O(f(cu),{modelValue:B.value,"onUpdate:modelValue":R[2]||(R[2]=D=>B.value=D),max:100,step:1},null,8,["modelValue"])]),Q("div",jC,[Q("div",UC,[O(f(bn),null,{default:I(()=>[...R[11]||(R[11]=[qe("Notification Volume",-1)])]),_:1}),Q("span",zC,Le(f(x))+"%",1)]),O(f(cu),{modelValue:q.value,"onUpdate:modelValue":R[3]||(R[3]=D=>q.value=D),max:100,step:1},null,8,["modelValue"])]),Q("div",KC,[Q("div",WC,[O(f(bn),null,{default:I(()=>[...R[12]||(R[12]=[qe("Volumen del tono",-1)])]),_:1}),Q("span",GC,Le(f(g))+"%",1)]),O(f(cu),{modelValue:C.value,"onUpdate:modelValue":R[4]||(R[4]=D=>C.value=D),max:100,step:1},null,8,["modelValue"])]),Q("div",JC,[O(f(bn),null,{default:I(()=>[...R[13]||(R[13]=[qe("Tono de llamada",-1)])]),_:1}),O(f(su),{"model-value":f(S),"onUpdate:modelValue":_},{default:I(()=>[O(f(au),{class:"wp:w-full"},{default:I(()=>[O(f(lu),{placeholder:"Seleccionar tono"})]),_:1}),O(f(iu),null,{default:I(()=>[O(f(ou),null,{default:I(()=>[O(f(Ki),{value:"original"},{default:I(()=>[...R[14]||(R[14]=[qe("Original",-1)])]),_:1}),O(f(Ki),{value:"aurora"},{default:I(()=>[...R[15]||(R[15]=[qe("Aurora",-1)])]),_:1}),O(f(Ki),{value:"resonancia"},{default:I(()=>[...R[16]||(R[16]=[qe("Resonancia",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["model-value"])]),O(f(Rg)),Q("div",YC,[Q("div",ZC,[O(f(bn),{for:"auto-answer-toggle"},{default:I(()=>[...R[17]||(R[17]=[qe("Respuesta automática",-1)])]),_:1})]),O(f(HC),{id:"auto-answer-toggle","model-value":f(b),role:"switch","aria-checked":f(b),"aria-label":f(b)?"Desactivar respuesta automática":"Activar respuesta automática",class:et(["wp:flex wp:h-7 wp:w-12 wp:shrink-0 wp:cursor-pointer wp:items-center wp:justify-start wp:rounded-full wp:border-0 wp:p-0.5 wp:transition-colors wp:focus-visible:ring-2 wp:focus-visible:ring-primary/50"]),style:St({backgroundColor:f(b)?"var(--color-primary-500)":"var(--muted)"}),"onUpdate:modelValue":E},{default:I(()=>[Q("span",{class:et(["wp:pointer-events-none wp:block wp:h-6 wp:w-6 wp:shrink-0 wp:rounded-full wp:bg-white wp:shadow-sm wp:transition-transform",f(b)?"wp:translate-x-5":"wp:translate-x-0"])},null,2)]),_:1},8,["model-value","aria-checked","aria-label","style"])]),O(f(Rg)),Q("div",XC,[O(f(bn),{class:"wp:text-base"},{default:I(()=>[...R[18]||(R[18]=[qe("Atajos de teclado",-1)])]),_:1}),Q("div",QC,[Q("div",ex,[R[19]||(R[19]=Q("span",{class:"wp:text-muted-foreground"},"Historial",-1)),O(f(yn),null,{default:I(()=>[qe(Le(f(n))+"H",1)]),_:1})]),Q("div",tx,[R[20]||(R[20]=Q("span",{class:"wp:text-muted-foreground"},"Configuración",-1)),O(f(yn),null,{default:I(()=>[qe(Le(f(n))+",",1)]),_:1})]),Q("div",rx,[R[21]||(R[21]=Q("span",{class:"wp:text-muted-foreground"},"Teclado",-1)),O(f(yn),null,{default:I(()=>[qe(Le(f(n))+"K",1)]),_:1})]),Q("div",nx,[R[22]||(R[22]=Q("span",{class:"wp:text-muted-foreground"},"Línea 1",-1)),O(f(yn),null,{default:I(()=>[qe(Le(f(n))+"1",1)]),_:1})]),Q("div",sx,[R[23]||(R[23]=Q("span",{class:"wp:text-muted-foreground"},"Línea 2",-1)),O(f(yn),null,{default:I(()=>[qe(Le(f(n))+"2",1)]),_:1})]),Q("div",ix,[R[24]||(R[24]=Q("span",{class:"wp:text-muted-foreground"},"Línea 3",-1)),O(f(yn),null,{default:I(()=>[qe(Le(f(n))+"3",1)]),_:1})])])])]),O(f(Ig),null,{default:I(()=>[O(f(pt),{variant:"secondary",onClick:R[5]||(R[5]=D=>r("update:visible",!1))},{default:I(()=>[...R[25]||(R[25]=[qe("Close",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])):Be("",!0)}}),ax=ox,lx=X({__name:"ScrollBar",props:{orientation:{default:"vertical"},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Ut(t,"class");return(n,s)=>($(),U(f(Y2),we({"data-slot":"scroll-area-scrollbar"},f(r),{class:f(dt)("wp:flex wp:touch-none wp:p-px wp:transition-colors wp:select-none",e.orientation==="vertical"&&"wp:h-full wp:w-2.5 wp:border-l wp:border-l-transparent",e.orientation==="horizontal"&&"wp:h-2.5 wp:flex-col wp:border-t wp:border-t-transparent",t.class)}),{default:I(()=>[O(f(X2),{"data-slot":"scroll-area-thumb",class:"wp:bg-border wp:relative wp:flex-1 wp:rounded-full"})]),_:1},16,["class"]))}}),cx=lx,ux=X({__name:"ScrollArea",props:{type:{},dir:{},scrollHideDelay:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Ut(t,"class");return(n,s)=>($(),U(f(B2),we({"data-slot":"scroll-area"},f(r),{class:f(dt)("wp:relative",t.class)}),{default:I(()=>[O(f(Q2),{"data-slot":"scroll-area-viewport",class:"wp:focus-visible:ring-ring/50 wp:size-full wp:rounded-[inherit] wp:transition-[color,box-shadow] wp:outline-none wp:focus-visible:ring-[3px] wp:focus-visible:outline-1"},{default:I(()=>[ne(n.$slots,"default")]),_:3}),O(cx),O(f(F2))]),_:3},16,["class"]))}}),$g=ux,dx={class:"wp:relative wp:my-2"},fx={class:"wp:flex wp:flex-col wp:gap-2"},px=["onClick"],hx={class:"wp:flex wp:min-w-0 wp:items-center wp:gap-3"},gx={class:"wp:flex wp:min-w-0 wp:flex-col"},vx={class:"wp:truncate wp:text-sm wp:font-medium"},mx={class:"wp:text-[10px] wp:text-muted-foreground"},wx={class:"wp:flex wp:shrink-0 wp:items-center wp:gap-1"},yx={class:"wp:flex wp:flex-col wp:items-end"},bx={key:0,class:"wp:text-xs wp:font-mono wp:text-muted-foreground"},_x={class:"wp:text-[10px] wp:text-muted-foreground wp:capitalize"},Sx=["aria-label","onClick"],Cx=["aria-label","onClick"],xx={key:0,class:"wp:py-8 wp:text-center wp:text-muted-foreground"},Tx={key:1,class:"wp:py-8 wp:text-center wp:text-muted-foreground"},Ex=X({__name:"CallHistoryDialog",props:{visible:{type:Boolean},maskNumber:{type:Boolean},extensions:{},contacts:{}},emits:["update:visible","call"],setup(e,{emit:t}){const r=e,n=t,s=Ft("webphone"),i=F(""),o=F(null);let a=null;const l=y=>{if(!r.contacts)return y;const T=r.contacts.find(k=>k.number===y);return T?T.name:y},u=y=>{const T=l(y);return r.maskNumber&&T===y?_r(y,r.extensions):T},c=y=>!!r.maskNumber&&!tc(y,r.extensions),d=y=>r.maskNumber?_r(y,r.extensions):y,p=V(()=>{if(!i.value)return s.callHistory;const y=i.value.toLowerCase();return s.callHistory.filter(T=>{const k=l(T.number).toLowerCase(),N=d(T.number).toLowerCase();return k.includes(y)||N.includes(y)})}),h=y=>y===0?"":`${Math.floor(y/60)}:${(y%60).toString().padStart(2,"0")}`,m=y=>y.direction==="incoming"?y.status==="missed"?tS:eS:rS,w=y=>({answered:"Contestada",missed:"Perdida",cancelled:"Cancelada"})[y],x=y=>y.status==="missed"?"wp:text-red-500":y.direction==="incoming"?"wp:text-green-500":"wp:text-blue-500",g=y=>{n("update:visible",!1),n("call",y)},S=async y=>{if(navigator.clipboard?.writeText){await navigator.clipboard.writeText(y);return}const T=document.createElement("textarea");T.value=y,T.setAttribute("readonly",""),T.style.position="fixed",T.style.opacity="0",document.body.appendChild(T),T.select();const k=document.execCommand("copy");if(T.remove(),!k)throw new Error("Clipboard is not available")},b=async y=>{if(!c(y.number))try{await S(y.number),o.value=y.id,a!==null&&window.clearTimeout(a),a=window.setTimeout(()=>{o.value===y.id&&(o.value=null),a=null},1600)}catch(T){console.warn("Could not copy call history number:",T)}};return(y,T)=>e.visible?($(),U(f(eu),{key:0,open:e.visible,"onUpdate:open":T[1]||(T[1]=k=>n("update:visible",k))},{default:I(()=>[O(f(tu),{class:"wp:sm:max-w-sm"},{default:I(()=>[O(f(ru),null,{default:I(()=>[O(f(nu),null,{default:I(()=>[...T[2]||(T[2]=[qe("Historial de llamadas",-1)])]),_:1})]),_:1}),Q("div",dx,[O(f(iS),{class:"wp:absolute wp:left-2 wp:top-2.5 wp:h-4 wp:w-4 wp:text-muted-foreground"}),O(f(Ui),{modelValue:i.value,"onUpdate:modelValue":T[0]||(T[0]=k=>i.value=k),placeholder:"Buscar en el historial...",class:"wp:pl-8"},null,8,["modelValue"])]),O(f($g),{class:"wp:h-[60vh] wp:pr-4"},{default:I(()=>[O(f(zi),null,{default:I(()=>[Q("div",fx,[($(!0),Se(Ke,null,vr(p.value,k=>($(),Se("div",{key:k.id,class:"wp:flex wp:items-center wp:justify-between wp:gap-2 wp:rounded-lg wp:p-2 wp:hover:bg-accent wp:cursor-pointer wp:transition-colors",onClick:N=>g(k.number)},[Q("div",hx,[($(),U(wi(m(k)),{class:et([x(k),"wp:h-4 wp:w-4"])},null,8,["class"])),Q("div",gx,[Q("span",vx,Le(u(k.number)),1),Q("span",mx,Le(new Date(k.startTime).toLocaleString("es-CO")),1)])]),Q("div",wx,[Q("div",yx,[k.duration>0?($(),Se("span",bx,Le(h(k.duration)),1)):Be("",!0),Q("span",_x,Le(w(k.status)),1)]),c(k.number)?Be("",!0):($(),U(f(Gs),{key:0},{default:I(()=>[O(f(Ys),{"as-child":""},{default:I(()=>[Q("button",{type:"button",class:"wp:inline-flex wp:h-8 wp:w-8 wp:items-center wp:justify-center wp:rounded-md wp:text-muted-foreground wp:transition-colors wp:hover:bg-muted wp:hover:text-foreground","aria-label":o.value===k.id?"Número copiado":"Copiar número",onClick:Xt(N=>b(k),["stop"])},[o.value===k.id?($(),U(f(Kc),{key:0,class:"wp:h-4 wp:w-4"})):($(),U(f(J_),{key:1,class:"wp:h-4 wp:w-4"}))],8,Sx)]),_:2},1024),O(f(Js),null,{default:I(()=>[qe(Le(o.value===k.id?"Número copiado":"Copiar número"),1)]),_:2},1024)]),_:2},1024)),O(f(Gs),null,{default:I(()=>[O(f(Ys),{"as-child":""},{default:I(()=>[Q("button",{type:"button",class:"wp:inline-flex wp:h-8 wp:w-8 wp:items-center wp:justify-center wp:rounded-md wp:text-primary wp:transition-colors wp:hover:bg-primary/10","aria-label":"Llamar a "+u(k.number),onClick:Xt(N=>g(k.number),["stop"])},[O(f(Q_),{class:"wp:h-4 wp:w-4"})],8,Cx)]),_:2},1024),O(f(Js),null,{default:I(()=>[...T[3]||(T[3]=[qe("Llamar",-1)])]),_:1})]),_:2},1024)])],8,px))),128)),f(s).callHistory.length===0?($(),Se("div",xx," No hay historial de llamadas ")):p.value.length===0?($(),Se("div",Tx," No se encontraron resultados ")):Be("",!0)])]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])):Be("",!0)}}),Ax=Ex,kx={class:"wp:grid wp:gap-4 wp:py-4"},Ix={class:"wp:grid wp:gap-2 wp:relative"},Rx={class:"wp:relative"},$x={key:0,class:"wp:absolute wp:top-full wp:left-0 wp:right-0 wp:mt-1 wp:bg-popover wp:border wp:rounded-md wp:shadow-lg wp:z-50 wp:max-h-60 wp:overflow-auto"},Px={class:"wp:p-1"},Dx=["onClick"],Ox={class:"wp:flex wp:flex-col wp:min-w-0 wp:flex-1"},Hx={class:"wp:font-medium wp:text-sm wp:truncate"},Mx={class:"wp:text-xs wp:text-muted-foreground"},Nx=X({__name:"TransferDialog",props:{visible:{type:Boolean},contacts:{default:()=>[]},maskNumber:{type:Boolean,default:!1},extensions:{default:()=>[]}},emits:["update:visible","transfer"],setup(e,{emit:t}){const r=e,n=t,s=F(""),i=F(!1),o=F(null);Me(()=>r.visible,h=>{h&&(s.value="",i.value=!1)}),Me(s,h=>{i.value=h.length>0&&l.value.length>0});const a=V(()=>r.maskNumber?r.contacts.filter(h=>tc(h.number,r.extensions)):r.contacts),l=V(()=>{if(!s.value)return a.value;const h=s.value.toLowerCase();return a.value.filter(m=>m.name.toLowerCase().includes(h)||m.number.includes(h))}),u=h=>{s.value=h.number,i.value=!1},c=()=>{s.value="",i.value=!1,o.value?.focus()},d=h=>{const m=s.value.trim();m&&(n("transfer",m,h),n("update:visible",!1),s.value="",i.value=!1)},p=h=>{h.key==="Enter"&&s.value.trim()?(h.preventDefault(),d("blind")):h.key==="Escape"&&(i.value=!1)};return(h,m)=>e.visible?($(),U(f(eu),{key:0,open:e.visible,"onUpdate:open":m[5]||(m[5]=w=>n("update:visible",w))},{default:I(()=>[O(f(tu),{class:"wp:sm:max-w-md"},{default:I(()=>[O(f(ru),null,{default:I(()=>[O(f(nu),null,{default:I(()=>[...m[6]||(m[6]=[qe("Transferir Llamada",-1)])]),_:1})]),_:1}),Q("div",kx,[Q("div",Ix,[O(f(bn),{for:"transfer-input"},{default:I(()=>[...m[7]||(m[7]=[qe("Número o Contacto",-1)])]),_:1}),Q("div",Rx,[O(f(Ui),{id:"transfer-input",ref_key:"inputRef",ref:o,modelValue:s.value,"onUpdate:modelValue":m[0]||(m[0]=w=>s.value=w),type:"text",placeholder:"Escribe un número o busca un contacto...",class:"wp:pr-8",onKeydown:p,onFocus:m[1]||(m[1]=w=>i.value=s.value.length>0&&l.value.length>0),autocomplete:"off"},null,8,["modelValue"]),s.value?($(),U(f(pt),{key:0,variant:"ghost",size:"icon",class:"wp:absolute wp:right-0 wp:top-0 wp:h-full wp:w-8 wp:hover:bg-transparent",onClick:c},{default:I(()=>[O(f(Gc),{class:"wp:h-4 wp:w-4"})]),_:1})):Be("",!0)]),i.value&&l.value.length>0?($(),Se("div",$x,[O(f($g),{class:"wp:max-h-60"},{default:I(()=>[Q("div",Px,[($(!0),Se(Ke,null,vr(l.value,w=>($(),Se("div",{key:w.number,class:"wp:flex wp:items-center wp:gap-2 wp:p-2 wp:rounded-sm wp:cursor-pointer wp:hover:bg-accent wp:transition-colors",onClick:x=>u(w)},[w.type?($(),Se("div",{key:0,class:et(f(dt)("wp:flex wp:items-center wp:justify-center wp:w-8 wp:h-8 wp:rounded-full wp:shrink-0",w.type==="extension"?"wp:bg-blue-100 wp:text-blue-600 wp:dark:bg-blue-900/30 wp:dark:text-blue-400":w.type==="contact"?"wp:bg-emerald-100 wp:text-emerald-600 wp:dark:bg-emerald-900/30 wp:dark:text-emerald-400":w.type==="voicemail"?"wp:bg-purple-100 wp:text-purple-600 wp:dark:bg-purple-900/30 wp:dark:text-purple-400":"wp:bg-amber-100 wp:text-amber-600 wp:dark:bg-amber-900/30 wp:dark:text-amber-400"))},[w.type==="extension"?($(),U(f(xg),{key:0,class:"wp:w-4 wp:h-4"})):w.type==="contact"?($(),U(f(Wc),{key:1,class:"wp:w-4 wp:h-4"})):w.type==="voicemail"?($(),U(f(Ag),{key:2,class:"wp:w-4 wp:h-4"})):($(),U(f(kg),{key:3,class:"wp:w-4 wp:h-4"}))],2)):Be("",!0),Q("div",Ox,[Q("span",Hx,Le(w.name),1),Q("span",Mx,Le(w.number),1)])],8,Dx))),128))])]),_:1})])):Be("",!0),m[8]||(m[8]=Q("p",{class:"wp:text-xs wp:text-muted-foreground"}," Presiona Enter para transferir directamente ",-1))])]),O(f(Ig),{class:"wp:flex-col wp:gap-2 sm:wp:flex-row"},{default:I(()=>[O(f(pt),{variant:"secondary",onClick:m[2]||(m[2]=w=>n("update:visible",!1)),class:"wp:w-full sm:wp:w-auto"},{default:I(()=>[...m[9]||(m[9]=[qe(" Cancelar ",-1)])]),_:1}),O(f(pt),{onClick:m[3]||(m[3]=w=>d("blind")),disabled:!s.value.trim(),variant:"outline",class:"wp:w-full sm:wp:flex-1"},{default:I(()=>[...m[10]||(m[10]=[qe(" Transferencia Ciega ",-1)])]),_:1},8,["disabled"]),O(f(pt),{onClick:m[4]||(m[4]=w=>d("attended")),disabled:!s.value.trim(),class:"wp:w-full sm:wp:flex-1"},{default:I(()=>[...m[11]||(m[11]=[qe(" Con Consulta ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["open"])):Be("",!0)}}),qx=Nx,Bx=X({__name:"DocumentPip",props:{remoteStream:{},localStream:{},hasVideo:{type:Boolean},remoteNumber:{},isConnected:{type:Boolean},callStatus:{},isMuted:{type:Boolean},isHeld:{type:Boolean},destination:{},isVideo:{type:Boolean},active:{type:Boolean},autoOpenOnBlur:{type:Boolean}},emits:["transfer","update:active","hangup","answer","toggleMute","toggleHold"],setup(e,{expose:t,emit:r}){const n=e,s=r,i=F(!1),o=F(!1),a=F(!1),l=F(null),u=F(0),c=F(null);let d=null,p=null;tt(()=>{i.value="documentPictureInPicture"in window,document.addEventListener("visibilitychange",w),window.addEventListener("blur",x)}),Vt(()=>{document.removeEventListener("visibilitychange",w),window.removeEventListener("blur",x),p&&(clearTimeout(p),p=null),S(),D()});const h=()=>{const W=n.callStatus!=="idle",ae=document.hidden||!document.hasFocus();return n.autoOpenOnBlur!==!1&&W&&i.value&&ae&&!o.value&&!a.value},m=()=>{h()&&(p&&clearTimeout(p),p=setTimeout(()=>{h()&&R()},120))},w=()=>{m()},x=()=>{m()},g=()=>{c.value||(u.value=0,c.value=setInterval(()=>{u.value++},1e3))},S=()=>{c.value&&(clearInterval(c.value),c.value=null)},b=W=>{const ae=Math.floor(W/60),Y=W%60;return`${ae.toString().padStart(2,"0")}:${Y.toString().padStart(2,"0")}`};Me(()=>n.callStatus,(W,ae)=>{W==="connected"&&ae!=="connected"?g():W==="idle"&&ae!=="idle"&&(S(),o.value&&D())},{immediate:!0}),Me(()=>n.isConnected,W=>{!W&&o.value&&(S(),D())}),Me(()=>[n.callStatus,n.isMuted,n.isHeld],()=>{l.value&&(C(l.value.document),B(l.value.document))});const y=V(()=>i.value&&n.isConnected),T={phone:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"/></svg>',phoneOff:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z" transform="rotate(135 12 12)"/><line x1="1" y1="1" x2="23" y2="23"/></svg>',mic:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z"/><path d="M19 10v2a7 7 0 0 1-14 0v-2"/><line x1="12" x2="12" y1="19" y2="22"/></svg>',micOff:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="2" x2="22" y1="2" y2="22"/><path d="M18.89 13.23A7.12 7.12 0 0 0 19 12v-2"/><path d="M5 10v2a7 7 0 0 0 12 5"/><path d="M15 9.34V5a3 3 0 0 0-5.68-1.33"/><path d="M9 9v3a3 3 0 0 0 5.12 2.12"/><line x1="12" x2="12" y1="19" y2="22"/></svg>',pause:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="14" y="4" width="4" height="16" rx="1"/><rect x="6" y="4" width="4" height="16" rx="1"/></svg>',play:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="6 3 20 12 6 21 6 3"/></svg>',transfer:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m16 3 4 4-4 4"/><path d="M20 7H4"/><path d="m8 21-4-4 4-4"/><path d="M4 17h16"/></svg>',video:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"/><rect x="2" y="6" width="14" height="12" rx="2"/></svg>',user:'<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>'},k=W=>{const ae=W.createElement("style");ae.textContent=`
76
+ ¿Desea realizar la llamada solo con AUDIO?`)&&T(!1)}else alert("Error al iniciar la llamada: "+(_ instanceof Error?_.message:String(_)))}},I=(C=!1)=>{if(m.onAnswer){m.onAnswer(C);return}i(C)},N=async()=>{await s(),await m.onHangup?.()},g=()=>{if(m.onReject){m.onReject();return}s()},B=V(()=>{const C={};return r.channels.forEach(_=>{const E=_.status==="connected"||_.status==="calling"||_.status==="incoming";C[_.id]=E?"wp:text-[var(--color-red)]":"wp:text-[var(--color-avaible)]"}),C}),q=V(()=>B.value[r.activeChannelId]??"wp:text-[var(--p-primary-color)]");return(C,_)=>($(),Ce("div",{class:"webphone-actions wp:flex wp:justify-center wp:items-center wp:gap-2 wp:px-4 wp:relative wp:mb-4","data-call-status":f(r).callStatus},[f(r).callStatus==="idle"?($(),Ce("div",HS,[b.value?($(),U(f(pt),{key:0,variant:"default",size:"icon",onClick:_[0]||(_[0]=E=>T(!1)),"aria-label":"Audio Call",class:"webphone-actions__button webphone-actions__button--call wp:w-full wp:px-4 wp:border-0 wp:bg-gradient-to-r wp:from-[color:var(--p-primary-color)]/80 wp:to-[color:var(--p-primary-color)]/100 wp:hover:from-[color:var(--p-primary-color)]/75 wp:hover:to-[color:var(--p-primary-color)]"},{default:k(()=>[O(f(xS),{class:"webphone-actions__button-icon wp:size-7 wp:text-white"}),_[12]||(_[12]=Q("span",{class:"webphone-actions__button-label wp:w-full wp:text-white wp:text-xs"},"Llamar",-1))]),_:1})):Be("",!0),y.value?($(),U(f(pt),{key:1,variant:"outline",size:"icon",onClick:_[1]||(_[1]=E=>T(!0)),"aria-label":"Video Call",class:"webphone-actions__button webphone-actions__button--video wp:w-full wp:px-4 wp:bg-transparent wp:border wp:border-primary wp:hover:bg-[var(--p-primary-color)]/8"},{default:k(()=>[O(f(AS),{class:et(["webphone-actions__button-icon wp:size-6 wp:text-primary wp:dark:text-white",q.value])},null,8,["class"]),_[13]||(_[13]=Q("span",{class:"webphone-actions__button-label wp:w-full wp:text-primary wp:text-xs wp:dark:text-white"}," Video llamada a extensiones ",-1))]),_:1})):Be("",!0)])):Be("",!0),f(r).callStatus==="incoming"?($(),Ce(Ke,{key:1},[f(r).activeChannel?.hasVideo?($(),U(f(pt),{key:0,variant:"default",size:"icon",onClick:_[2]||(_[2]=E=>I(!0)),class:"webphone-actions__button webphone-actions__button--answer-video wp:animate-pulse wp:w-12 wp:h-12 wp:rounded-full wp:bg-transparent wp:hover:bg-[var(--p-primary-color)]/10","aria-label":"Answer Video"},{default:k(()=>[O(f(gS),{class:"webphone-actions__button-icon wp:w-5 wp:h-5 wp:text-[var(--p-primary-color)]"})]),_:1})):Be("",!0),O(f(pt),{variant:"default",size:"icon",onClick:_[3]||(_[3]=E=>I(!1)),class:"webphone-actions__button webphone-actions__button--answer wp:animate-pulse wp:w-12 wp:h-12 wp:rounded-full wp:border-0 wp:bg-status-available wp:hover:bg-status-available/90","aria-label":"Answer"},{default:k(()=>[O(f(Ag),{class:"webphone-actions__button-icon wp:w-5 wp:h-5 wp:text-white"})]),_:1}),O(f(pt),{variant:"destructive",size:"icon",onClick:g,"aria-label":"Reject",class:"webphone-actions__button webphone-actions__button--hangup webphone-actions__button--reject wp:w-12 wp:h-12 wp:rounded-full wp:border-0 wp:bg-gradient-to-r wp:from-destructive/60 wp:to-destructive/90 wp:hover:from-destructive/70 wp:hover:to-destructive/95"},{default:k(()=>[O(f(Jc),{class:"webphone-actions__button-icon wp:w-5 wp:h-5 wp:text-white"})]),_:1})],64)):Be("",!0),f(r).callStatus==="connected"?($(),Ce("div",MS,[Q("div",NS,[O(f(pt),{variant:f(r).isMuted?"destructive":"secondary",size:"icon",onClick:f(o),"aria-label":"Mute",class:"webphone-actions__button webphone-actions__button--mute wp:w-12 wp:h-12 wp:rounded-full wp:bg-primary/10 wp:hover:bg-[var(--p-primary-color)]/20"},{default:k(()=>[f(r).isMuted?($(),U(f(sS),{key:0,class:"webphone-actions__button-icon wp:size-5 wp:text-status-disconnected"})):($(),U(f(iS),{key:1,class:"webphone-actions__button-icon wp:size-5 wp:text-[var(--p-primary-color)]"}))]),_:1},8,["variant","onClick"]),O(f(pt),{variant:(f(r).isHeld,"secondary"),size:"icon",onClick:f(a),"aria-label":"Hold",class:"webphone-actions__button webphone-actions__button--hold wp:w-12 wp:h-12 wp:rounded-full wp:bg-primary/10 wp:hover:bg-[var(--p-primary-color)]/20"},{default:k(()=>[f(r).isHeld?($(),U(f(fS),{key:0,class:"webphone-actions__button-icon wp:size-5 wp:text-status-hold"})):($(),U(f(oS),{key:1,class:"webphone-actions__button-icon wp:size-5 wp:text-[var(--p-primary-color)]"}))]),_:1},8,["variant","onClick"]),x.value?Be("",!0):($(),U(f(pt),{key:0,variant:"secondary",size:"icon",onClick:_[4]||(_[4]=E=>w("transfer")),"aria-label":"Transfer",class:"webphone-actions__button webphone-actions__button--transfer wp:w-12 wp:h-12 wp:rounded-full wp:bg-primary/10 wp:hover:bg-[var(--p-primary-color)]/20"},{default:k(()=>[O(f(_S),{class:"webphone-actions__button-icon wp:size-5 wp:text-[var(--p-primary-color)]"})]),_:1}))]),Q("div",qS,[O(f(pt),{variant:"ghost",size:"icon",onClick:_[5]||(_[5]=E=>f(r).toggleKeypad()),"aria-label":f(r).isKeypadVisible?"Ocultar teclado":"Mostrar teclado",class:"webphone-actions__keypad-toggle wp:absolute wp:left-0.5 wp:top-1/2 wp:-translate-y-1/2 wp:z-10 wp:h-9 wp:w-9 wp:rounded-full wp:text-[var(--p-primary-color)] wp:hover:opacity-80"},{default:k(()=>[f(r).isKeypadVisible?($(),U(f(Zc),{key:0,class:"webphone-actions__keypad-toggle-icon wp:size-6"})):($(),U(f(Yc),{key:1,class:"webphone-actions__keypad-toggle-icon wp:size-6"}))]),_:1},8,["aria-label"]),O(f(zi),{"model-value":f(r).keypadValue,type:"text",inputmode:"tel",pattern:"[0-9*#]*",placeholder:"Marcar opción (0-9, * o #)...","aria-label":"Tonos de marcación",onKeydown:d,onBeforeinput:p,onPaste:h,class:"p-input webphone-actions__input wp:h-10 wp:text-center wp:select-text wp:px-14 wp:text-base hover:wp:border-[var(--p-primary-color)] wp:dark:hover:bg-neutral-900 focus-visible:wp:border-[var(--p-primary-color)] focus-visible:wp:ring-2 montserrat"},null,8,["model-value"]),Q("div",{class:"webphone-actions__backspace wp:absolute wp:right-1 wp:top-1/2 wp:-translate-y-1/2 wp:z-10 wp:flex wp:h-8 wp:w-8 wp:cursor-pointer wp:items-center wp:justify-center wp:hover:bg-accent wp:rounded-full",onClick:_[6]||(_[6]=Qt(E=>f(r).backspaceKeypad(),["stop"]))},[O(f(Xc),{class:"webphone-actions__backspace-icon wp:w-[16px] wp:h-[16px] wp:text-black wp:hover:text-status-disconnected wp:dark:text-neutral-500 wp:dark:hover:text-status-disconnected wp:transition-colors"})])]),Q("div",{class:et(["webphone-actions__keypad wp:w-full wp:transition-all wp:duration-300 wp:ease-in-out wp:overflow-hidden",f(r).isKeypadVisible?"wp:max-h-[300px] wp:opacity-100":"wp:max-h-0 wp:opacity-0"]),"data-visible":f(r).isKeypadVisible?"true":"false"},[O(zc)],10,BS),O(f(pt),{size:"icon",onClick:N,"aria-label":"Hangup",class:"webphone-actions__button webphone-actions__button--hangup wp:w-full wp:px-4 wp:border-0 wp:bg-gradient-to-r wp:from-destructive/60 wp:to-destructive/90 wp:hover:from-destructive/70 wp:hover:to-destructive/95"},{default:k(()=>[O(f(Jc),{class:"webphone-actions__button-icon wp:size-6 wp:text-white"}),_[14]||(_[14]=Q("span",{class:"webphone-actions__button-label wp:w-full wp:text-white wp:text-xs"},"Colgar",-1))]),_:1})])):Be("",!0),f(r).callStatus==="calling"?($(),Ce("div",LS,[Q("div",FS,[O(f(pt),{variant:"ghost",size:"icon",onClick:_[7]||(_[7]=E=>f(r).toggleKeypad()),"aria-label":f(r).isKeypadVisible?"Ocultar teclado":"Mostrar teclado",class:"webphone-actions__keypad-toggle wp:absolute wp:left-0.5 wp:top-1/2 wp:-translate-y-1/2 wp:z-10 wp:h-9 wp:w-9 wp:rounded-full wp:text-[var(--p-primary-color)] wp:hover:opacity-80"},{default:k(()=>[f(r).isKeypadVisible?($(),U(f(Zc),{key:0,class:"webphone-actions__keypad-toggle-icon wp:size-6"})):($(),U(f(Yc),{key:1,class:"webphone-actions__keypad-toggle-icon wp:size-6"}))]),_:1},8,["aria-label"]),O(f(zi),{modelValue:f(r).keypadValue,"onUpdate:modelValue":_[8]||(_[8]=E=>f(r).keypadValue=E),placeholder:"Ingresa el numero a llamar...",class:"p-input webphone-actions__input wp:h-10 wp:text-center wp:select-text wp:px-14 wp:text-base hover:wp:border-[var(--p-primary-color)] wp:dark:hover:bg-neutral-900 focus-visible:wp:border-[var(--p-primary-color)] focus-visible:wp:ring-2 montserrat"},null,8,["modelValue"]),Q("div",{class:"webphone-actions__backspace wp:absolute wp:right-1 wp:top-1/2 wp:-translate-y-1/2 wp:z-10 wp:flex wp:h-8 wp:w-8 wp:cursor-pointer wp:items-center wp:justify-center wp:hover:bg-accent wp:rounded-full",onClick:_[9]||(_[9]=Qt(E=>f(r).backspaceKeypad(),["stop"]))},[O(f(Xc),{class:"webphone-actions__backspace-icon wp:w-[16px] wp:h-[16px] wp:text-black wp:hover:text-status-disconnected wp:dark:text-neutral-500 wp:dark:hover:text-status-disconnected wp:transition-colors"})])]),Q("div",{class:et(["webphone-actions__keypad wp:w-full wp:transition-all wp:duration-300 wp:ease-in-out wp:overflow-hidden",f(r).isKeypadVisible?"wp:max-h-[300px] wp:opacity-100":"wp:max-h-0 wp:opacity-0"]),"data-visible":f(r).isKeypadVisible?"true":"false"},[O(zc)],10,VS),O(f(pt),{variant:"destructive",size:"lg",onClick:N,"aria-label":"Cancel",class:"webphone-actions__button webphone-actions__button--hangup webphone-actions__button--cancel wp:w-full wp:px-4 wp:border-0 wp:bg-gradient-to-r wp:from-destructive/60 wp:to-destructive/90 wp:hover:from-destructive/70 wp:hover:to-destructive/95"},{default:k(()=>[O(f(Jc),{class:"webphone-actions__button-icon wp:size-6 wp:text-white"}),_[15]||(_[15]=Q("span",{class:"webphone-actions__button-label wp:w-full wp:text-white"},"Colgar",-1))]),_:1})])):Be("",!0),x.value&&f(r).callStatus==="connected"?($(),Ce("div",jS,[O(f(pt),{variant:"default",size:"sm",onClick:_[10]||(_[10]=E=>w("completeTransfer")),class:"webphone-actions__button webphone-actions__button--complete-transfer wp:gap-2 wp:bg-status-available wp:hover:bg-status-available/90 wp:text-white"},{default:k(()=>[O(f(Kc),{class:"wp:w-4 wp:h-4"}),_[16]||(_[16]=qe(" Completar Transferencia ",-1))]),_:1}),O(f(pt),{variant:"destructive",size:"sm",onClick:_[11]||(_[11]=E=>w("cancelTransfer")),class:"webphone-actions__button webphone-actions__button--cancel-transfer wp:gap-2"},{default:k(()=>[O(f(Gc),{class:"wp:w-4 wp:h-4"}),_[17]||(_[17]=qe(" Cancelar ",-1))]),_:1})])):Be("",!0)],8,OS))}}),zS=US,KS=X({__name:"Kbd",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(r,n)=>($(),Ce("kbd",{class:et(f(dt)("wp:bg-muted wp:text-muted-foreground wp:pointer-events-none wp:inline-flex wp:h-5 wp:w-fit wp:min-w-5 wp:items-center wp:justify-center wp:gap-1 wp:rounded-sm wp:px-1 wp:font-sans wp:text-xs wp:font-medium wp:select-none","wp:[&_svg:not([class*='size-'])]:size-3","wp:[[data-slot=tooltip-content]_&]:bg-background/20 wp:[[data-slot=tooltip-content]_&]:text-background wp:dark:[[data-slot=tooltip-content]_&]:bg-background/10",t.class))},[ne(r.$slots,"default")],2))}}),yn=KS,WS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 30 23"};function GS(e,t){return $(),Ce("svg",WS,[...t[0]||(t[0]=[Q("path",{stroke:"currentColor","stroke-miterlimit":"22.926","stroke-width":"1.2",d:"m12.317 2.51 15.123-.027c2.609 1.773 1.65 19.836 0 18.746l-15.124.026zM1.593 2.484h1.45V21.29h-1.45c-1.79-2.697-1.79-17.855 0-18.806ZM6.244.25h3.078a1.573 1.573 0 0 1 1.574 1.566v18.902a1.58 1.58 0 0 1-1.574 1.574H6.244a1.58 1.58 0 0 1-1.574-1.576v-18.9A1.573 1.573 0 0 1 6.244.25Z","clip-rule":"evenodd"},null,-1)])])}var Qc={render:GS},JS=X({__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=jr(e,t);return(n,s)=>($(),U(f(j_),me({"data-slot":"tooltip"},f(r)),{default:k(i=>[ne(n.$slots,"default",fr(nr(i)))]),_:3},16))}}),Js=JS,YS=X({inheritAttrs:!1,__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=t,s=jr(zt(r,"class"),n);return(i,o)=>($(),U(f(K_),null,{default:k(()=>[O(f(z_),me({"data-slot":"tooltip-content"},{...f(s),...i.$attrs},{class:f(dt)("wp:bg-foreground wp:text-background wp:animate-in wp:fade-in-0 wp:zoom-in-95 wp:data-[state=closed]:animate-out wp:data-[state=closed]:fade-out-0 wp:data-[state=closed]:zoom-out-95 wp:data-[side=bottom]:slide-in-from-top-2 wp:data-[side=left]:slide-in-from-right-2 wp:data-[side=right]:slide-in-from-left-2 wp:data-[side=top]:slide-in-from-bottom-2 wp:z-50 wp:w-fit wp:rounded-md wp:px-3 wp:py-1.5 wp:text-xs wp:text-balance",r.class)}),{default:k(()=>[ne(i.$slots,"default"),O(f(B_),{class:"wp:bg-foreground wp:fill-foreground wp:z-50 wp:size-2.5 wp:translate-y-[calc(-50%_-_2px)] wp:rotate-45 wp:rounded-[2px]"})]),_:3},16,["class"])]),_:3}))}}),Ys=YS,ZS=X({__name:"TooltipProvider",props:{delayDuration:{default:0},skipDelayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean},content:{}},setup(e){const t=e;return(r,n)=>($(),U(f(F_),fr(nr(t)),{default:k(()=>[ne(r.$slots,"default")]),_:3},16))}}),Ki=ZS,XS=X({__name:"TooltipTrigger",props:{reference:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>($(),U(f(W_),me({"data-slot":"tooltip-trigger"},t),{default:k(()=>[ne(r.$slots,"default")]),_:3},16))}}),Zs=XS,QS=["data-call-status"],eC={class:"webphone-display__connected-status-label wp:flex wp:gap-2 wp:items-center"},tC={class:"webphone-display__duration wp:ibrad wp:font-medium wp:text-sm"},rC={class:"webphone-display__user-row wp:flex wp:items-center wp:gap-2 wp:text-sm font-semibold"},nC={key:2,class:"webphone-display__dialer wp:w-full wp:flex wp:items-center wp:justify-center wp:min-h-10"},sC={class:"webphone-display__dialer-field wp:relative"},iC={class:"webphone-display__suggestions wp:absolute wp:bottom-full wp:left-0 wp:w-full wp:z-50 wp:bg-popover wp:text-popover-foreground wp:shadow-md wp:rounded-md wp:border wp:mb-1 wp:max-h-40 wp:overflow-y-auto"},oC=["onPointerdown"],aC={class:"webphone-display__contact-content wp:flex wp:flex-col wp:min-w-0"},lC={class:"webphone-display__contact-name wp:truncate"},cC={class:"webphone-display__contact-number wp:text-xs wp:text-muted-foreground wp:truncate"},uC={key:3,class:"webphone-display__connected-summary wp:flex wp:flex-col wp:items-center wp:justify-center wp:gap-2 wp:w-full"},dC={class:"webphone-display__caller wp:flex wp:flex-col wp:items-center wp:gap-1"},fC={class:"webphone-display__caller-name wp:text-sm wp:font-semibold wp:text-neutral-800 wp:dark:text-white"},pC={key:0,class:"webphone-display__caller-number wp:text-[10px] wp:text-muted-foreground"},hC={key:4,class:"webphone-display__non-idle wp:flex wp:flex-col wp:items-center wp:justify-center wp:gap-2"},gC={class:"webphone-display__non-idle-row wp:flex wp:items-center wp:gap-4"},vC={class:"webphone-display__non-idle-caller wp:flex wp:flex-col wp:items-center"},mC={class:"webphone-display__non-idle-name wp:text-sm wp:font-medium wp:text-neutral-800 wp:dark:text-white"},wC={key:0,class:"webphone-display__non-idle-number wp:text-sm wp:text-muted-foreground"},yC=X({__name:"CallDisplay",props:{allowInput:{type:Boolean,default:!0},isWebCall:{type:Boolean,default:!1},isOnline:{type:Boolean,default:!0},user:{},contacts:{default:()=>[]},channelId:{default:void 0},maskNumber:{type:Boolean,default:!1},extensions:{default:()=>[]}},setup(e){const t=Vt("webphone"),r=Vt("sip"),n=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd+":"Ctrl+",s=e,i=V(()=>s.channelId!==void 0?t.channels.find(P=>P.id===s.channelId):t.activeChannel),o=V(()=>{if(!t.isConnected)return"wp:text-status-disconnected";const P=i.value;return P&&P.status!=="idle"?P.isHeld||P.status==="held"?"wp:text-status-hold":P.status==="incoming"?"wp:text-status-incoming":"wp:text-primary":"wp:text-primary"}),a=F(!1),l=F(null),u=F(null),c=P=>P.replace(/[^0-9*#]/g,""),d=P=>{P.ctrlKey||P.metaKey||P.altKey||P.key.length!==1||/[0-9*#]/.test(P.key)||P.preventDefault()},p=P=>{P.data&&c(P.data)!==P.data&&P.preventDefault()};Sb(l,()=>{a.value=!1});const h=V({get:()=>i.value?.keypadValue||"",set:P=>{i.value&&t.updateChannelState(i.value.id,{keypadValue:c(P)})}}),m=V(()=>/^[0-9*#]+$/.test(h.value)),w=P=>s.maskNumber?br(P.number,s.extensions):P.number,x=V(()=>{if(!h.value)return s.contacts.slice(0,10);const P=h.value.toLowerCase(),R=[];for(const D of s.contacts)if((D.name.toLowerCase().includes(P)||w(D).includes(P))&&(R.push(D),R.length>=10))break;return R}),v=P=>{i.value&&t.updateChannelState(i.value.id,{keypadValue:c(P.number)}),a.value=!1},S=()=>{!h.value||!m.value||(a.value=!1,r.makeCall(h.value))};He(h,()=>{a.value=!0});const b=()=>{h.value&&m.value&&S()},y=()=>{a.value=!1},T=()=>{a.value=!0},I=()=>{setTimeout(()=>{a.value=!1},150)},N=F(Date.now());yb(()=>{N.value=Date.now()},1e3);const g=V(()=>{const P=i.value?.startTime,R=i.value?.status||"idle";if(!P||R!=="connected")return"00:00:00";const D=Math.floor((N.value-P)/1e3);return D<0?"00:00:00":`${Math.floor(D/3600).toString().padStart(2,"0")}:${Math.floor(D%3600/60).toString().padStart(2,"0")}:${(D%60).toString().padStart(2,"0")}`}),B=V(()=>{if(!s.isOnline)return"Sin internet";if(!t.isConnected)return"Sin conexión";const P=i.value,R=P?.status||"idle";if(R==="idle")return"Disponible";if(R==="calling")return"Llamando...";if(P?.isHeld){const D=P.remoteNumber||P.keypadValue||"Unknown";return`En espera - ${s.maskNumber?br(D,s.extensions):D}`}return R==="connected"?"Conectado":R.charAt(0).toUpperCase()+R.slice(1)}),q=P=>{if(!P)return"";const R=P.trim(),D=R.startsWith("+"),G=R.replace(/[^\d]/g,"");return D?`+${G}`:G},C=P=>/\d/.test(P)&&/^[+\d\s().*#-]+$/.test(P.trim()),_=V(()=>{const P=i.value,R=P?.remoteNumber||P?.keypadValue,D=P?.remoteDisplayName;if(!R)return"Unknown";const G=q(R),W=s.contacts?.find(ae=>q(ae.number)===G);return W?s.maskNumber&&C(W.name)?br(W.name,s.extensions):W.name:D&&D!==R?s.maskNumber&&C(D)?q(D)===G?br(R,s.extensions):br(D,s.extensions):D:s.maskNumber?br(R,s.extensions):R}),E=V(()=>{const P=i.value,R=P?.remoteNumber||P?.keypadValue||"";return s.maskNumber?br(R,s.extensions):R});return(P,R)=>($(),Ce("div",{class:"webphone-display wp:flex wp:flex-col wp:items-center wp:px-4 wp:space-y-6","data-call-status":i.value?.status||"idle"},[(i.value?.status||"idle")==="connected"?($(),Ce("div",{key:0,class:et([o.value,"webphone-display__connected-status wp:w-full wp:flex wp:items-center wp:justify-between wp:gap-2 wp:text-3xl wp:font-light wp:mb-5"])},[Q("div",eC,[O(f(Qc),{class:"webphone-display__connected-status-icon wp:w-4 wp:h-4"}),R[3]||(R[3]=Q("span",{class:"webphone-display__connected-status-text wp:text-sm wp:montserrat wp:font-medium"},"En llamada",-1))]),Q("span",tC,Le(g.value),1)],2)):Be("",!0),s.user?($(),Ce("span",{key:1,class:et([o.value,"webphone-display__user wp:font-bold wp:text-lg wp:flex wp:items-center wp:gap-1 wp:transition-colors wp:duration-300"])},[Q("div",rC,[O(f(Qc),{class:"webphone-display__user-icon wp:size-6 wp:shrink-0 montserrat"}),qe(" "+Le(s.user),1)]),Q("div",{class:et(["webphone-display__status-text wp:font-semibold wp:tracking-wider wp:text-sm wp:text-[var(--color-primary)] montserrat",o.value])},Le(B.value),3)],2)):Be("",!0),(i.value?.status||"idle")==="idle"&&s.allowInput?($(),Ce("div",nC,[Q("div",{class:"webphone-display__dialer-container wp:relative wp:w-full wp:max-w-80",ref_key:"containerRef",ref:l},[Q("div",sC,[O(f(Ki),null,{default:k(()=>[O(f(Js),null,{default:k(()=>[O(f(Zs),{"as-child":""},{default:k(()=>[O(f(pt),{onClick:R[0]||(R[0]=D=>f(t).toggleKeypad()),variant:"ghost",size:"icon",class:et(f(dt)("webphone-display__keypad-toggle wp:absolute wp:left-0.5 wp:top-1/2 wp:-translate-y-1/2 wp:z-10 wp:h-9 wp:w-9 wp:rounded-full wp:text-[var(--p-primary-color)] wp:hover:opacity-80"))},{default:k(()=>[f(t).isKeypadVisible?($(),U(f(Zc),{key:0,class:"webphone-display__keypad-toggle-icon wp:size-5"})):($(),U(f(Yc),{key:1,class:"webphone-display__keypad-toggle-icon wp:size-5"}))]),_:1},8,["class"])]),_:1}),O(f(Ys),{class:"wp:flex wp:items-center wp:gap-2"},{default:k(()=>[Q("span",null,Le(f(t).isKeypadVisible?"Ocultar":"Mostrar")+" teclado",1),O(f(yn),null,{default:k(()=>[qe(Le(f(n))+"K",1)]),_:1})]),_:1})]),_:1})]),_:1}),O(f(zi),{ref_key:"inputRef",ref:u,modelValue:h.value,"onUpdate:modelValue":R[1]||(R[1]=D=>h.value=D),type:"text",inputmode:"tel",pattern:"[0-9*#]*",onFocus:T,onBlur:I,onKeydown:[d,ql(b,["enter"]),ql(y,["escape"])],onBeforeinput:p,placeholder:"Ingresa el numero a llamar...",class:"p-input webphone-display__input wp:h-10 wp:text-center wp:select-text wp:px-14 wp:text-base hover:wp:border-[var(--p-primary-color)] wp:dark:hover:bg-neutral-900 focus-visible:wp:border-[var(--p-primary-color)] focus-visible:wp:ring-2 montserrat"},null,8,["modelValue"]),Q("div",{class:"webphone-display__backspace wp:absolute wp:right-1 wp:top-1/2 wp:-translate-y-1/2 wp:z-10 wp:flex wp:h-8 wp:w-8 wp:cursor-pointer wp:items-center wp:justify-center wp:hover:bg-accent wp:rounded-full",onClick:R[2]||(R[2]=Qt(D=>f(t).backspaceKeypad(),["stop"]))},[O(f(Xc),{class:"webphone-display__backspace-icon wp:w-[15px] wp:h-[15px] wp:text-black wp:hover:text-status-disconnected wp:dark:text-neutral-100 wp:dark:hover:text-status-disconnected wp:transition-colors"})])]),wo(Q("div",iC,[m.value?($(),Ce("div",{key:0,class:"webphone-display__suggestion webphone-display__suggestion--raw wp:cursor-pointer wp:hover:bg-accent wp:flex wp:items-center wp:gap-2 wp:p-2 wp:px-3 wp:text-sm",onPointerdown:Qt(S,["prevent"])},[O(f(Ag),{class:"webphone-display__suggestion-icon wp:w-4 wp:h-4 wp:shrink-0"}),Q("span",null,"Marcar "+Le(h.value),1)],32)):Be("",!0),($(!0),Ce(Ke,null,gr(x.value,D=>($(),Ce("div",{key:D.number,class:"webphone-display__suggestion webphone-display__suggestion--contact wp:cursor-pointer wp:hover:bg-accent wp:flex wp:items-center wp:gap-2 wp:p-2 wp:px-3 wp:text-sm",onPointerdown:Qt(G=>v(D),["prevent"])},[Q("div",{class:et(f(dt)("webphone-display__contact-badge wp:flex wp:items-center wp:justify-center wp:w-6 wp:h-6 wp:rounded-full wp:shrink-0",D.type==="extension"?"wp:bg-blue-100 wp:text-blue-600 wp:dark:bg-blue-900/30 wp:dark:text-blue-400":D.type==="contact"?"wp:bg-emerald-100 wp:text-emerald-600 wp:dark:bg-emerald-900/30 wp:dark:text-emerald-400":D.type==="voicemail"?"wp:bg-purple-100 wp:text-purple-600 wp:dark:bg-purple-900/30 wp:dark:text-purple-400":D.type==="tool"?"wp:bg-amber-100 wp:text-amber-600 wp:dark:bg-amber-900/30 wp:dark:text-amber-400":"wp:bg-neutral-100 wp:text-neutral-600 wp:dark:bg-neutral-800 wp:dark:text-neutral-400"))},[D.type==="extension"?($(),U(f(Tg),{key:0,class:"wp:w-3 wp:h-3"})):D.type==="contact"?($(),U(f(Wc),{key:1,class:"wp:w-3 wp:h-3"})):D.type==="voicemail"?($(),U(f(kg),{key:2,class:"wp:w-3 wp:h-3"})):D.type==="tool"?($(),U(f(Ig),{key:3,class:"wp:w-3 wp:h-3"})):($(),U(f(Wc),{key:4,class:"wp:w-3 wp:h-3"}))],2),Q("div",aC,[Q("span",lC,Le(D.name),1),Q("span",cC,Le(w(D)),1)])],40,oC))),128))],512),[[Bo,a.value&&h.value&&(x.value.length>0||m.value)]])],512)])):(i.value?.status||"idle")==="connected"?($(),Ce("div",uC,[Q("div",dC,[Q("div",fC," En llamada con "+Le(_.value),1),_.value!==E.value?($(),Ce("div",pC,Le(E.value),1)):Be("",!0)])])):(i.value?.status||"idle")!=="idle"?($(),Ce("div",hC,[Q("div",gC,[Q("div",vC,[Q("div",mC,Le(_.value),1),_.value!==E.value?($(),Ce("div",wC,Le(E.value),1)):Be("",!0)]),O(f(Ki),null,{default:k(()=>[O(f(Js),null,{default:k(()=>[O(f(Zs),{"as-child":""}),O(f(Ys),{class:"wp:flex wp:items-center wp:gap-2"},{default:k(()=>[Q("span",null,Le(f(t).isKeypadVisible?"Ocultar":"Mostrar")+" teclado",1),O(f(yn),null,{default:k(()=>[qe(Le(f(n))+"K",1)]),_:1})]),_:1})]),_:1})]),_:1})])])):Be("",!0)],8,QS))}}),bC=yC,_C=X({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=jr(e,t);return(n,s)=>($(),U(f(e1),me({"data-slot":"dialog"},f(r)),{default:k(i=>[ne(n.$slots,"default",fr(nr(i)))]),_:3},16))}}),eu=_C,SC=X({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=zt(t,"class");return(n,s)=>($(),U(f(y1),me({"data-slot":"dialog-overlay"},f(r),{class:f(dt)("wp:data-[state=open]:animate-in wp:data-[state=closed]:animate-out wp:data-[state=closed]:fade-out-0 wp:data-[state=open]:fade-in-0 wp:fixed wp:inset-0 wp:z-50 wp:bg-black/80",t.class)}),{default:k(()=>[ne(n.$slots,"default")]),_:3},16,["class"]))}}),CC=SC,xC=X({inheritAttrs:!1,__name:"DialogContent",props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]},showCloseButton:{type:Boolean,default:!0}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=e,n=t,s=jr(zt(r,"class"),n);return(i,o)=>($(),U(f(b1),null,{default:k(()=>[O(CC),O(f(m1),me({"data-slot":"dialog-content"},{...i.$attrs,...f(s)},{class:f(dt)("wp:bg-background wp:data-[state=open]:animate-in wp:data-[state=closed]:animate-out wp:data-[state=closed]:fade-out-0 wp:data-[state=open]:fade-in-0 wp:data-[state=closed]:zoom-out-95 wp:data-[state=open]:zoom-in-95 wp:fixed wp:top-[50%] wp:left-[50%] wp:z-50 wp:grid wp:w-full wp:max-w-[calc(100%-2rem)] wp:translate-x-[-50%] wp:translate-y-[-50%] wp:gap-4 wp:rounded-lg wp:border wp:p-6 wp:shadow-lg wp:duration-200 wp:sm:max-w-lg",r.class)}),{default:k(()=>[ne(i.$slots,"default"),e.showCloseButton?($(),U(f(t1),{key:0,"data-slot":"dialog-close",class:"wp:ring-offset-background wp:focus:ring-ring wp:data-[state=open]:bg-accent wp:data-[state=open]:text-muted-foreground wp:absolute wp:top-4 wp:right-4 wp:rounded-xs wp:opacity-70 wp:transition-opacity wp:hover:opacity-100 wp:focus:ring-2 wp:focus:ring-offset-2 wp:focus:outline-hidden wp:disabled:pointer-events-none wp:[&_svg]:pointer-events-none wp:[&_svg]:shrink-0 wp:[&_svg:not([class*='size-'])]:size-4"},{default:k(()=>[O(f(Gc)),o[0]||(o[0]=Q("span",{class:"wp:sr-only"},"Close",-1))]),_:1})):Be("",!0)]),_:3},16,["class"])]),_:3}))}}),tu=xC,TC=X({__name:"DialogFooter",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(r,n)=>($(),Ce("div",{"data-slot":"dialog-footer",class:et(f(dt)("wp:flex wp:flex-col-reverse wp:gap-2 wp:sm:flex-row wp:sm:justify-end",t.class))},[ne(r.$slots,"default")],2))}}),Rg=TC,EC=X({__name:"DialogHeader",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(r,n)=>($(),Ce("div",{"data-slot":"dialog-header",class:et(f(dt)("wp:flex wp:flex-col wp:gap-2 wp:text-center wp:sm:text-left",t.class))},[ne(r.$slots,"default")],2))}}),ru=EC,AC=X({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=hn(zt(t,"class"));return(n,s)=>($(),U(f(_1),me({"data-slot":"dialog-title"},f(r),{class:f(dt)("wp:text-lg wp:leading-none wp:font-semibold",t.class)}),{default:k(()=>[ne(n.$slots,"default")]),_:3},16,["class"]))}}),nu=AC,kC=X({__name:"Select",props:{open:{type:Boolean},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{},by:{type:[String,Function]},dir:{},multiple:{type:Boolean},autocomplete:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(e,{emit:t}){const r=jr(e,t);return(n,s)=>($(),U(f(f_),me({"data-slot":"select"},f(r)),{default:k(i=>[ne(n.$slots,"default",fr(nr(i)))]),_:3},16))}}),su=kC,IC=X({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},hideShiftedArrow:{type:Boolean},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=t,s=jr(zt(r,"class"),n);return(i,o)=>($(),U(f(I_),null,{default:k(()=>[O(f(__),me({"data-slot":"select-content"},{...i.$attrs,...f(s)},{class:f(dt)("wp:bg-popover wp:text-popover-foreground wp:data-[state=open]:animate-in wp:data-[state=closed]:animate-out wp:data-[state=closed]:fade-out-0 wp:data-[state=open]:fade-in-0 wp:data-[state=closed]:zoom-out-95 wp:data-[state=open]:zoom-in-95 wp:data-[side=bottom]:slide-in-from-top-2 wp:data-[side=left]:slide-in-from-right-2 wp:data-[side=right]:slide-in-from-left-2 wp:data-[side=top]:slide-in-from-bottom-2 wp:relative wp:z-50 wp:max-h-(--reka-select-content-available-height) wp:min-w-[8rem] wp:overflow-x-hidden wp:overflow-y-auto wp:rounded-md wp:border wp:shadow-md",e.position==="popper"&&"wp:data-[side=bottom]:translate-y-1 wp:data-[side=left]:-translate-x-1 wp:data-[side=right]:translate-x-1 wp:data-[side=top]:-translate-y-1",r.class)}),{default:k(()=>[O(f(MC)),O(f(O_),{class:et(f(dt)("wp:p-1",e.position==="popper"&&"wp:h-[var(--reka-select-trigger-height)] wp:w-full wp:min-w-[var(--reka-select-trigger-width)] wp:scroll-my-1"))},{default:k(()=>[ne(i.$slots,"default")]),_:3},8,["class"]),O(f(OC))]),_:3},16,["class"])]),_:3}))}}),iu=IC,RC=X({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>($(),U(f(C_),me({"data-slot":"select-group"},t),{default:k(()=>[ne(r.$slots,"default")]),_:3},16))}}),ou=RC,$C={class:"wp:absolute wp:right-2 wp:flex wp:size-3.5 wp:items-center wp:justify-center"},PC=X({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=hn(zt(t,"class"));return(n,s)=>($(),U(f(E_),me({"data-slot":"select-item"},f(r),{class:f(dt)("wp:focus:bg-accent wp:focus:text-accent-foreground wp:[&_svg:not([class*='text-'])]:text-muted-foreground wp:relative wp:flex wp:w-full wp:cursor-default wp:items-center wp:gap-2 wp:rounded-sm wp:py-1.5 wp:pr-8 wp:pl-2 wp:text-sm wp:outline-hidden wp:select-none wp:data-[disabled]:pointer-events-none wp:data-[disabled]:opacity-50 wp:[&_svg]:pointer-events-none wp:[&_svg]:shrink-0 wp:[&_svg:not([class*='size-'])]:size-4 wp:*:[span]:last:flex wp:*:[span]:last:items-center wp:*:[span]:last:gap-2",t.class)}),{default:k(()=>[Q("span",$C,[O(f(A_),null,{default:k(()=>[ne(n.$slots,"indicator-icon",{},()=>[O(f(Kc),{class:"wp:size-4"})])]),_:3})]),O(f(k_),null,{default:k(()=>[ne(n.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),Wi=PC,DC=X({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=hn(zt(t,"class"));return(n,s)=>($(),U(f(R_),me({"data-slot":"select-scroll-down-button"},f(r),{class:f(dt)("wp:flex wp:cursor-default wp:items-center wp:justify-center wp:py-1",t.class)}),{default:k(()=>[ne(n.$slots,"default",{},()=>[O(f(Eg),{class:"wp:size-4"})])]),_:3},16,["class"]))}}),OC=DC,HC=X({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=hn(zt(t,"class"));return(n,s)=>($(),U(f($_),me({"data-slot":"select-scroll-up-button"},f(r),{class:f(dt)("wp:flex wp:cursor-default wp:items-center wp:justify-center wp:py-1",t.class)}),{default:k(()=>[ne(n.$slots,"default",{},()=>[O(f(rS),{class:"wp:size-4"})])]),_:3},16,["class"]))}}),MC=HC,NC=X({__name:"SelectTrigger",props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]},size:{default:"default"}},setup(e){const t=e,r=hn(zt(t,"class","size"));return(n,s)=>($(),U(f(P_),me({"data-slot":"select-trigger","data-size":e.size},f(r),{class:f(dt)("wp:border-input wp:data-[placeholder]:text-muted-foreground wp:[&_svg:not([class*='text-'])]:text-muted-foreground wp:focus-visible:border-ring wp:focus-visible:ring-ring/50 wp:aria-invalid:ring-destructive/20 wp:dark:aria-invalid:ring-destructive/40 wp:aria-invalid:border-destructive wp:dark:bg-input/30 wp:dark:hover:bg-input/50 wp:flex wp:w-fit wp:items-center wp:justify-between wp:gap-2 wp:rounded-md wp:border wp:bg-transparent wp:px-3 wp:py-2 wp:text-sm wp:whitespace-nowrap wp:shadow-xs wp:transition-[color,box-shadow] wp:outline-none wp:focus-visible:ring-[3px] wp:disabled:cursor-not-allowed wp:disabled:opacity-50 wp:data-[size=default]:h-9 wp:data-[size=sm]:h-8 wp:*:data-[slot=select-value]:line-clamp-1 wp:*:data-[slot=select-value]:flex wp:*:data-[slot=select-value]:items-center wp:*:data-[slot=select-value]:gap-2 wp:[&_svg]:pointer-events-none wp:[&_svg]:shrink-0 wp:[&_svg:not([class*='size-'])]:size-4",t.class)}),{default:k(()=>[ne(n.$slots,"default"),O(f(x_),{"as-child":""},{default:k(()=>[O(f(Eg),{class:"wp:size-4 wp:opacity-50"})]),_:1})]),_:3},16,["data-size","class"]))}}),au=NC,qC=X({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>($(),U(f(D_),me({"data-slot":"select-value"},t),{default:k(()=>[ne(r.$slots,"default")]),_:3},16))}}),lu=qC,BC=X({__name:"Slider",props:{defaultValue:{},modelValue:{},disabled:{type:Boolean},orientation:{},dir:{},inverted:{type:Boolean},min:{},max:{},step:{},minStepsBetweenThumbs:{},thumbAlignment:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue","valueCommit"],setup(e,{emit:t}){const r=e,n=t,s=jr(zt(r,"class"),n);return(i,o)=>($(),U(f(L2),me({"data-slot":"slider",class:f(dt)("wp:relative wp:flex wp:w-full wp:touch-none wp:items-center wp:select-none wp:data-[disabled]:opacity-50 wp:data-[orientation=vertical]:h-full wp:data-[orientation=vertical]:min-h-44 wp:data-[orientation=vertical]:w-auto wp:data-[orientation=vertical]:flex-col",r.class)},f(s)),{default:k(({modelValue:a})=>[O(f(U2),{"data-slot":"slider-track",class:"wp:bg-muted wp:relative wp:grow wp:overflow-hidden wp:rounded-full wp:data-[orientation=horizontal]:h-1.5 wp:data-[orientation=horizontal]:w-full wp:data-[orientation=vertical]:h-full wp:data-[orientation=vertical]:w-1.5"},{default:k(()=>[O(f(F2),{"data-slot":"slider-range",class:"wp:bg-primary wp:absolute wp:data-[orientation=horizontal]:h-full wp:data-[orientation=vertical]:w-full"})]),_:1}),($(!0),Ce(Ke,null,gr(a,(l,u)=>($(),U(f(j2),{key:u,"data-slot":"slider-thumb",class:"wp:bg-white wp:border-primary wp:ring-ring/50 wp:block wp:size-4 wp:shrink-0 wp:rounded-full wp:border wp:shadow-sm wp:transition-[color,box-shadow] wp:hover:ring-4 wp:focus-visible:ring-4 wp:focus-visible:outline-hidden wp:disabled:pointer-events-none wp:disabled:opacity-50"}))),128))]),_:1},16,["class"]))}}),cu=BC,LC=X({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=zt(t,"class");return(n,s)=>($(),U(f(z2),me({"data-slot":"label"},f(r),{class:f(dt)("wp:flex wp:items-center wp:gap-2 wp:text-sm wp:leading-none wp:font-medium wp:select-none wp:group-data-[disabled=true]:pointer-events-none wp:group-data-[disabled=true]:opacity-50 wp:peer-disabled:cursor-not-allowed wp:peer-disabled:opacity-50",t.class)}),{default:k(()=>[ne(n.$slots,"default")]),_:3},16,["class"]))}}),bn=LC,FC=X({__name:"Separator",props:{orientation:{default:"horizontal"},decorative:{type:Boolean,default:!0},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=zt(t,"class");return(n,s)=>($(),U(f(M_),me({"data-slot":"separator"},f(r),{class:f(dt)("wp:bg-border wp:shrink-0 wp:data-[orientation=horizontal]:h-px wp:data-[orientation=horizontal]:w-full wp:data-[orientation=vertical]:h-full wp:data-[orientation=vertical]:w-px",t.class)}),null,16,["class"]))}}),$g=FC,VC=X({__name:"Toggle",props:{defaultValue:{type:Boolean},modelValue:{type:[Boolean,null]},disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]},variant:{default:"default"},size:{default:"default"}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=t,s=jr(zt(r,"class","size","variant"),n);return(i,o)=>($(),U(f(q_),me({"data-slot":"toggle"},f(s),{class:f(dt)(f(UC)({variant:e.variant,size:e.size}),r.class)}),{default:k(a=>[ne(i.$slots,"default",fr(nr(a)))]),_:3},16,["class"]))}}),jC=VC;const UC=rh("wp:inline-flex wp:items-center wp:justify-center wp:gap-2 wp:rounded-md wp:text-sm wp:font-medium wp:hover:bg-muted wp:hover:text-muted-foreground wp:disabled:pointer-events-none wp:disabled:opacity-50 wp:data-[state=on]:bg-accent wp:data-[state=on]:text-accent-foreground wp:[&_svg]:pointer-events-none wp:[&_svg:not([class*='size-'])]:size-4 wp:[&_svg]:shrink-0 wp:focus-visible:border-ring wp:focus-visible:ring-ring/50 wp:focus-visible:ring-[3px] wp:outline-none wp:transition-[color,box-shadow] wp:aria-invalid:ring-destructive/20 wp:dark:aria-invalid:ring-destructive/40 wp:aria-invalid:border-destructive wp:whitespace-nowrap",{variants:{variant:{default:"wp:bg-transparent",outline:"wp:border wp:border-input wp:bg-transparent wp:shadow-xs wp:hover:bg-accent wp:hover:text-accent-foreground"},size:{default:"wp:h-9 wp:px-2 wp:min-w-9",sm:"wp:h-8 wp:px-1.5 wp:min-w-8",lg:"wp:h-10 wp:px-2.5 wp:min-w-10"}},defaultVariants:{variant:"default",size:"default"}});var zC={class:"wp:flex wp:flex-col wp:gap-6 wp:py-4"},KC={class:"wp:flex wp:flex-col wp:gap-2"},WC={class:"wp:flex wp:flex-col wp:gap-2"},GC={class:"wp:flex wp:flex-col wp:gap-4"},JC={class:"wp:flex wp:justify-between"},YC={class:"wp:text-sm wp:text-muted-foreground"},ZC={class:"wp:flex wp:flex-col wp:gap-4"},XC={class:"wp:flex wp:justify-between"},QC={class:"wp:text-sm wp:text-muted-foreground"},ex={class:"wp:flex wp:flex-col wp:gap-2"},tx={class:"wp:flex wp:justify-between"},rx={class:"wp:text-sm wp:text-muted-foreground"},nx={class:"wp:flex wp:flex-col wp:gap-2"},sx={class:"wp:flex wp:items-center wp:justify-between wp:gap-4"},ix={class:"wp:flex wp:flex-col wp:gap-1"},ox={class:"wp:flex wp:flex-col wp:gap-3"},ax={class:"wp:grid wp:grid-cols-2 wp:gap-2 wp:text-sm"},lx={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},cx={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},ux={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},dx={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},fx={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},px={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},hx=X({__name:"AudioSettingsDialog",props:{visible:{type:Boolean}},emits:["update:visible"],setup(e,{emit:t}){const r=t,n=navigator.platform.toUpperCase().indexOf("MAC")>=0?"⌘":"Ctrl+",s=Vt("sip"),{setVolume:i,setOutputDevice:o,setInputDevice:a,setNotificationVolume:l}=s,u=s.setRingtoneVolume??(()=>{}),c=s.setRingtoneTone??(()=>{}),d=F([]),p=F([]),h=cs("webphone-input-device",""),m=cs("webphone-output-device",""),w=cs("webphone-volume",100),x=cs("webphone-notification-volume",100),v=cs("webphone-ringtone-volume",100),S=cs("webphone-ringtone-tone","original"),b=cs(Zp,!1),y={classic:"original","original-loud":"aurora","original-intense":"resonancia"},T=async()=>{try{await navigator.mediaDevices.getUserMedia({audio:!0});const P=await navigator.mediaDevices.enumerateDevices();d.value=P.filter(G=>G.kind==="audioinput").map((G,W)=>({deviceId:G.deviceId,label:G.label||`Microphone ${W+1}`})),p.value=P.filter(G=>G.kind==="audiooutput").map((G,W)=>({deviceId:G.deviceId,label:G.label||`Speaker ${W+1}`}));const R=d.value.some(G=>G.deviceId===h.value);(!h.value||!R)&&d.value.length>0&&(h.value=d.value[0]?.deviceId??"");const D=p.value.some(G=>G.deviceId===m.value);(!m.value||!D)&&p.value.length>0&&(m.value=p.value[0]?.deviceId??""),h.value&&a(h.value),m.value&&o(m.value)}catch(P){console.error("Error loading devices",P)}},I=P=>{const R=String(P);h.value=R,a(R)},N=P=>{const R=String(P);m.value=R,o(R)},g=(P,R=35)=>P.length<=R?P:P.substring(0,R)+"...",B=V({get:()=>[w.value],set:P=>{w.value=P[0],i(w.value)}}),q=V({get:()=>[x.value],set:P=>{x.value=P[0],l(x.value)}}),C=V({get:()=>[v.value],set:P=>{v.value=P[0]??100,u(v.value)}}),_=P=>{S.value=String(P),c(S.value)},E=P=>{b.value=P};return tt(()=>{T(),i(w.value),l(x.value),u(v.value),localStorage.removeItem("webphone-custom-ringtone");const P=y[S.value]??S.value;S.value=["original","aurora","resonancia"].includes(P)?P:"original",c(S.value)}),(P,R)=>e.visible?($(),U(f(eu),{key:0,open:e.visible,"onUpdate:open":R[6]||(R[6]=D=>r("update:visible",D))},{default:k(()=>[O(f(tu),{class:"wp:sm:max-w-sm"},{default:k(()=>[O(f(ru),null,{default:k(()=>[O(f(nu),null,{default:k(()=>[...R[7]||(R[7]=[qe("Audio Settings",-1)])]),_:1})]),_:1}),Q("div",zC,[Q("div",KC,[O(f(bn),null,{default:k(()=>[...R[8]||(R[8]=[qe("Microphone",-1)])]),_:1}),O(f(su),{modelValue:f(h),"onUpdate:modelValue":[R[0]||(R[0]=D=>rt(h)?h.value=D:null),I]},{default:k(()=>[O(f(au),{class:"wp:w-full"},{default:k(()=>[O(f(lu),{placeholder:"Select Microphone"})]),_:1}),O(f(iu),null,{default:k(()=>[O(f(ou),null,{default:k(()=>[($(!0),Ce(Ke,null,gr(d.value,D=>($(),U(f(Wi),{key:D.deviceId,value:D.deviceId,title:D.label},{default:k(()=>[qe(Le(g(D.label)),1)]),_:2},1032,["value","title"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),Q("div",WC,[O(f(bn),null,{default:k(()=>[...R[9]||(R[9]=[qe("Speaker",-1)])]),_:1}),O(f(su),{modelValue:f(m),"onUpdate:modelValue":[R[1]||(R[1]=D=>rt(m)?m.value=D:null),N]},{default:k(()=>[O(f(au),{class:"wp:w-full"},{default:k(()=>[O(f(lu),{placeholder:"Select Speaker"})]),_:1}),O(f(iu),null,{default:k(()=>[O(f(ou),null,{default:k(()=>[($(!0),Ce(Ke,null,gr(p.value,D=>($(),U(f(Wi),{key:D.deviceId,value:D.deviceId,title:D.label},{default:k(()=>[qe(Le(g(D.label)),1)]),_:2},1032,["value","title"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),Q("div",GC,[Q("div",JC,[O(f(bn),null,{default:k(()=>[...R[10]||(R[10]=[qe("Media Volume",-1)])]),_:1}),Q("span",YC,Le(f(w))+"%",1)]),O(f(cu),{modelValue:B.value,"onUpdate:modelValue":R[2]||(R[2]=D=>B.value=D),max:100,step:1},null,8,["modelValue"])]),Q("div",ZC,[Q("div",XC,[O(f(bn),null,{default:k(()=>[...R[11]||(R[11]=[qe("Notification Volume",-1)])]),_:1}),Q("span",QC,Le(f(x))+"%",1)]),O(f(cu),{modelValue:q.value,"onUpdate:modelValue":R[3]||(R[3]=D=>q.value=D),max:100,step:1},null,8,["modelValue"])]),Q("div",ex,[Q("div",tx,[O(f(bn),null,{default:k(()=>[...R[12]||(R[12]=[qe("Volumen del tono",-1)])]),_:1}),Q("span",rx,Le(f(v))+"%",1)]),O(f(cu),{modelValue:C.value,"onUpdate:modelValue":R[4]||(R[4]=D=>C.value=D),max:100,step:1},null,8,["modelValue"])]),Q("div",nx,[O(f(bn),null,{default:k(()=>[...R[13]||(R[13]=[qe("Tono de llamada",-1)])]),_:1}),O(f(su),{"model-value":f(S),"onUpdate:modelValue":_},{default:k(()=>[O(f(au),{class:"wp:w-full"},{default:k(()=>[O(f(lu),{placeholder:"Seleccionar tono"})]),_:1}),O(f(iu),null,{default:k(()=>[O(f(ou),null,{default:k(()=>[O(f(Wi),{value:"original"},{default:k(()=>[...R[14]||(R[14]=[qe("Original",-1)])]),_:1}),O(f(Wi),{value:"aurora"},{default:k(()=>[...R[15]||(R[15]=[qe("Aurora",-1)])]),_:1}),O(f(Wi),{value:"resonancia"},{default:k(()=>[...R[16]||(R[16]=[qe("Resonancia",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["model-value"])]),O(f($g)),Q("div",sx,[Q("div",ix,[O(f(bn),{for:"auto-answer-toggle"},{default:k(()=>[...R[17]||(R[17]=[qe("Respuesta automática",-1)])]),_:1})]),O(f(jC),{id:"auto-answer-toggle","model-value":f(b),role:"switch","aria-checked":f(b),"aria-label":f(b)?"Desactivar respuesta automática":"Activar respuesta automática",class:et(["wp:flex wp:h-7 wp:w-12 wp:shrink-0 wp:cursor-pointer wp:items-center wp:justify-start wp:rounded-full wp:border-0 wp:p-0.5 wp:transition-colors wp:focus-visible:ring-2 wp:focus-visible:ring-primary/50"]),style:St({backgroundColor:f(b)?"var(--color-primary-500)":"var(--muted)"}),"onUpdate:modelValue":E},{default:k(()=>[Q("span",{class:et(["wp:pointer-events-none wp:block wp:h-6 wp:w-6 wp:shrink-0 wp:rounded-full wp:bg-white wp:shadow-sm wp:transition-transform",f(b)?"wp:translate-x-5":"wp:translate-x-0"])},null,2)]),_:1},8,["model-value","aria-checked","aria-label","style"])]),O(f($g)),Q("div",ox,[O(f(bn),{class:"wp:text-base"},{default:k(()=>[...R[18]||(R[18]=[qe("Atajos de teclado",-1)])]),_:1}),Q("div",ax,[Q("div",lx,[R[19]||(R[19]=Q("span",{class:"wp:text-muted-foreground"},"Historial",-1)),O(f(yn),null,{default:k(()=>[qe(Le(f(n))+"H",1)]),_:1})]),Q("div",cx,[R[20]||(R[20]=Q("span",{class:"wp:text-muted-foreground"},"Configuración",-1)),O(f(yn),null,{default:k(()=>[qe(Le(f(n))+",",1)]),_:1})]),Q("div",ux,[R[21]||(R[21]=Q("span",{class:"wp:text-muted-foreground"},"Teclado",-1)),O(f(yn),null,{default:k(()=>[qe(Le(f(n))+"K",1)]),_:1})]),Q("div",dx,[R[22]||(R[22]=Q("span",{class:"wp:text-muted-foreground"},"Línea 1",-1)),O(f(yn),null,{default:k(()=>[qe(Le(f(n))+"1",1)]),_:1})]),Q("div",fx,[R[23]||(R[23]=Q("span",{class:"wp:text-muted-foreground"},"Línea 2",-1)),O(f(yn),null,{default:k(()=>[qe(Le(f(n))+"2",1)]),_:1})]),Q("div",px,[R[24]||(R[24]=Q("span",{class:"wp:text-muted-foreground"},"Línea 3",-1)),O(f(yn),null,{default:k(()=>[qe(Le(f(n))+"3",1)]),_:1})])])])]),O(f(Rg),null,{default:k(()=>[O(f(pt),{variant:"secondary",onClick:R[5]||(R[5]=D=>r("update:visible",!1))},{default:k(()=>[...R[25]||(R[25]=[qe("Close",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])):Be("",!0)}}),gx=hx,vx=X({__name:"ScrollBar",props:{orientation:{default:"vertical"},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=zt(t,"class");return(n,s)=>($(),U(f(s_),me({"data-slot":"scroll-area-scrollbar"},f(r),{class:f(dt)("wp:flex wp:touch-none wp:p-px wp:transition-colors wp:select-none",e.orientation==="vertical"&&"wp:h-full wp:w-2.5 wp:border-l wp:border-l-transparent",e.orientation==="horizontal"&&"wp:h-2.5 wp:flex-col wp:border-t wp:border-t-transparent",t.class)}),{default:k(()=>[O(f(o_),{"data-slot":"scroll-area-thumb",class:"wp:bg-border wp:relative wp:flex-1 wp:rounded-full"})]),_:1},16,["class"]))}}),mx=vx,wx=X({__name:"ScrollArea",props:{type:{},dir:{},scrollHideDelay:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=zt(t,"class");return(n,s)=>($(),U(f(W2),me({"data-slot":"scroll-area"},f(r),{class:f(dt)("wp:relative",t.class)}),{default:k(()=>[O(f(a_),{"data-slot":"scroll-area-viewport",class:"wp:focus-visible:ring-ring/50 wp:size-full wp:rounded-[inherit] wp:transition-[color,box-shadow] wp:outline-none wp:focus-visible:ring-[3px] wp:focus-visible:outline-1"},{default:k(()=>[ne(n.$slots,"default")]),_:3}),O(mx),O(f(J2))]),_:3},16,["class"]))}}),Pg=wx,yx={class:"wp:relative wp:my-2"},bx={class:"wp:flex wp:flex-col wp:gap-2"},_x=["onClick"],Sx={class:"wp:flex wp:min-w-0 wp:items-center wp:gap-3"},Cx={class:"wp:flex wp:min-w-0 wp:flex-col"},xx={class:"wp:truncate wp:text-sm wp:font-medium"},Tx={class:"wp:text-[10px] wp:text-muted-foreground"},Ex={class:"wp:flex wp:shrink-0 wp:items-center wp:gap-1"},Ax={class:"wp:flex wp:flex-col wp:items-end"},kx={key:0,class:"wp:text-xs wp:font-mono wp:text-muted-foreground"},Ix={class:"wp:text-[10px] wp:text-muted-foreground wp:capitalize"},Rx=["aria-label","onClick"],$x=["aria-label","onClick"],Px={key:0,class:"wp:py-8 wp:text-center wp:text-muted-foreground"},Dx={key:1,class:"wp:py-8 wp:text-center wp:text-muted-foreground"},Ox=X({__name:"CallHistoryDialog",props:{visible:{type:Boolean},maskNumber:{type:Boolean},extensions:{},contacts:{}},emits:["update:visible","call"],setup(e,{emit:t}){const r=e,n=t,s=Vt("webphone"),i=F(""),o=F(null);let a=null;const l=y=>{if(!r.contacts)return y;const T=r.contacts.find(I=>I.number===y);return T?T.name:y},u=y=>{const T=l(y);return r.maskNumber&&T===y?br(y,r.extensions):T},c=y=>!!r.maskNumber&&!tc(y,r.extensions),d=y=>r.maskNumber?br(y,r.extensions):y,p=V(()=>{if(!i.value)return s.callHistory;const y=i.value.toLowerCase();return s.callHistory.filter(T=>{const I=l(T.number).toLowerCase(),N=d(T.number).toLowerCase();return I.includes(y)||N.includes(y)})}),h=y=>y===0?"":`${Math.floor(y/60)}:${(y%60).toString().padStart(2,"0")}`,m=y=>y.direction==="incoming"?y.status==="missed"?cS:lS:uS,w=y=>({answered:"Contestada",missed:"Perdida",cancelled:"Cancelada"})[y],x=y=>y.status==="missed"?"wp:text-red-500":y.direction==="incoming"?"wp:text-green-500":"wp:text-blue-500",v=y=>{n("update:visible",!1),n("call",y)},S=async y=>{if(navigator.clipboard?.writeText){await navigator.clipboard.writeText(y);return}const T=document.createElement("textarea");T.value=y,T.setAttribute("readonly",""),T.style.position="fixed",T.style.opacity="0",document.body.appendChild(T),T.select();const I=document.execCommand("copy");if(T.remove(),!I)throw new Error("Clipboard is not available")},b=async y=>{if(!c(y.number))try{await S(y.number),o.value=y.id,a!==null&&window.clearTimeout(a),a=window.setTimeout(()=>{o.value===y.id&&(o.value=null),a=null},1600)}catch(T){console.warn("Could not copy call history number:",T)}};return(y,T)=>e.visible?($(),U(f(eu),{key:0,open:e.visible,"onUpdate:open":T[1]||(T[1]=I=>n("update:visible",I))},{default:k(()=>[O(f(tu),{class:"wp:sm:max-w-sm"},{default:k(()=>[O(f(ru),null,{default:k(()=>[O(f(nu),null,{default:k(()=>[...T[2]||(T[2]=[qe("Historial de llamadas",-1)])]),_:1})]),_:1}),Q("div",yx,[O(f(pS),{class:"wp:absolute wp:left-2 wp:top-2.5 wp:h-4 wp:w-4 wp:text-muted-foreground"}),O(f(zi),{modelValue:i.value,"onUpdate:modelValue":T[0]||(T[0]=I=>i.value=I),placeholder:"Buscar en el historial...",class:"wp:pl-8"},null,8,["modelValue"])]),O(f(Pg),{class:"wp:h-[60vh] wp:pr-4"},{default:k(()=>[O(f(Ki),null,{default:k(()=>[Q("div",bx,[($(!0),Ce(Ke,null,gr(p.value,I=>($(),Ce("div",{key:I.id,class:"wp:flex wp:items-center wp:justify-between wp:gap-2 wp:rounded-lg wp:p-2 wp:hover:bg-accent wp:cursor-pointer wp:transition-colors",onClick:N=>v(I.number)},[Q("div",Sx,[($(),U(yi(m(I)),{class:et([x(I),"wp:h-4 wp:w-4"])},null,8,["class"])),Q("div",Cx,[Q("span",xx,Le(u(I.number)),1),Q("span",Tx,Le(new Date(I.startTime).toLocaleString("es-CO")),1)])]),Q("div",Ex,[Q("div",Ax,[I.duration>0?($(),Ce("span",kx,Le(h(I.duration)),1)):Be("",!0),Q("span",Ix,Le(w(I.status)),1)]),c(I.number)?Be("",!0):($(),U(f(Js),{key:0},{default:k(()=>[O(f(Zs),{"as-child":""},{default:k(()=>[Q("button",{type:"button",class:"wp:inline-flex wp:h-8 wp:w-8 wp:items-center wp:justify-center wp:rounded-md wp:text-muted-foreground wp:transition-colors wp:hover:bg-muted wp:hover:text-foreground","aria-label":o.value===I.id?"Número copiado":"Copiar número",onClick:Qt(N=>b(I),["stop"])},[o.value===I.id?($(),U(f(Kc),{key:0,class:"wp:h-4 wp:w-4"})):($(),U(f(nS),{key:1,class:"wp:h-4 wp:w-4"}))],8,Rx)]),_:2},1024),O(f(Ys),null,{default:k(()=>[qe(Le(o.value===I.id?"Número copiado":"Copiar número"),1)]),_:2},1024)]),_:2},1024)),O(f(Js),null,{default:k(()=>[O(f(Zs),{"as-child":""},{default:k(()=>[Q("button",{type:"button",class:"wp:inline-flex wp:h-8 wp:w-8 wp:items-center wp:justify-center wp:rounded-md wp:text-primary wp:transition-colors wp:hover:bg-primary/10","aria-label":"Llamar a "+u(I.number),onClick:Qt(N=>v(I.number),["stop"])},[O(f(aS),{class:"wp:h-4 wp:w-4"})],8,$x)]),_:2},1024),O(f(Ys),null,{default:k(()=>[...T[3]||(T[3]=[qe("Llamar",-1)])]),_:1})]),_:2},1024)])],8,_x))),128)),f(s).callHistory.length===0?($(),Ce("div",Px," No hay historial de llamadas ")):p.value.length===0?($(),Ce("div",Dx," No se encontraron resultados ")):Be("",!0)])]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])):Be("",!0)}}),Hx=Ox,Mx={class:"wp:grid wp:gap-4 wp:py-4"},Nx={class:"wp:grid wp:gap-2 wp:relative"},qx={class:"wp:relative"},Bx={key:0,class:"wp:absolute wp:top-full wp:left-0 wp:right-0 wp:mt-1 wp:bg-popover wp:border wp:rounded-md wp:shadow-lg wp:z-50 wp:max-h-60 wp:overflow-auto"},Lx={class:"wp:p-1"},Fx=["onClick"],Vx={class:"wp:flex wp:flex-col wp:min-w-0 wp:flex-1"},jx={class:"wp:font-medium wp:text-sm wp:truncate"},Ux={class:"wp:text-xs wp:text-muted-foreground"},zx=X({__name:"TransferDialog",props:{visible:{type:Boolean},contacts:{default:()=>[]},maskNumber:{type:Boolean,default:!1},extensions:{default:()=>[]}},emits:["update:visible","transfer"],setup(e,{emit:t}){const r=e,n=t,s=F(""),i=F(!1),o=F(null);He(()=>r.visible,h=>{h&&(s.value="",i.value=!1)}),He(s,h=>{i.value=h.length>0&&l.value.length>0});const a=V(()=>r.maskNumber?r.contacts.filter(h=>tc(h.number,r.extensions)):r.contacts),l=V(()=>{if(!s.value)return a.value;const h=s.value.toLowerCase();return a.value.filter(m=>m.name.toLowerCase().includes(h)||m.number.includes(h))}),u=h=>{s.value=h.number,i.value=!1},c=()=>{s.value="",i.value=!1,o.value?.focus()},d=h=>{const m=s.value.trim();m&&(n("transfer",m,h),n("update:visible",!1),s.value="",i.value=!1)},p=h=>{h.key==="Enter"&&s.value.trim()?(h.preventDefault(),d("blind")):h.key==="Escape"&&(i.value=!1)};return(h,m)=>e.visible?($(),U(f(eu),{key:0,open:e.visible,"onUpdate:open":m[5]||(m[5]=w=>n("update:visible",w))},{default:k(()=>[O(f(tu),{class:"wp:sm:max-w-md"},{default:k(()=>[O(f(ru),null,{default:k(()=>[O(f(nu),null,{default:k(()=>[...m[6]||(m[6]=[qe("Transferir Llamada",-1)])]),_:1})]),_:1}),Q("div",Mx,[Q("div",Nx,[O(f(bn),{for:"transfer-input"},{default:k(()=>[...m[7]||(m[7]=[qe("Número o Contacto",-1)])]),_:1}),Q("div",qx,[O(f(zi),{id:"transfer-input",ref_key:"inputRef",ref:o,modelValue:s.value,"onUpdate:modelValue":m[0]||(m[0]=w=>s.value=w),type:"text",placeholder:"Escribe un número o busca un contacto...",class:"wp:pr-8",onKeydown:p,onFocus:m[1]||(m[1]=w=>i.value=s.value.length>0&&l.value.length>0),autocomplete:"off"},null,8,["modelValue"]),s.value?($(),U(f(pt),{key:0,variant:"ghost",size:"icon",class:"wp:absolute wp:right-0 wp:top-0 wp:h-full wp:w-8 wp:hover:bg-transparent",onClick:c},{default:k(()=>[O(f(Gc),{class:"wp:h-4 wp:w-4"})]),_:1})):Be("",!0)]),i.value&&l.value.length>0?($(),Ce("div",Bx,[O(f(Pg),{class:"wp:max-h-60"},{default:k(()=>[Q("div",Lx,[($(!0),Ce(Ke,null,gr(l.value,w=>($(),Ce("div",{key:w.number,class:"wp:flex wp:items-center wp:gap-2 wp:p-2 wp:rounded-sm wp:cursor-pointer wp:hover:bg-accent wp:transition-colors",onClick:x=>u(w)},[w.type?($(),Ce("div",{key:0,class:et(f(dt)("wp:flex wp:items-center wp:justify-center wp:w-8 wp:h-8 wp:rounded-full wp:shrink-0",w.type==="extension"?"wp:bg-blue-100 wp:text-blue-600 wp:dark:bg-blue-900/30 wp:dark:text-blue-400":w.type==="contact"?"wp:bg-emerald-100 wp:text-emerald-600 wp:dark:bg-emerald-900/30 wp:dark:text-emerald-400":w.type==="voicemail"?"wp:bg-purple-100 wp:text-purple-600 wp:dark:bg-purple-900/30 wp:dark:text-purple-400":"wp:bg-amber-100 wp:text-amber-600 wp:dark:bg-amber-900/30 wp:dark:text-amber-400"))},[w.type==="extension"?($(),U(f(Tg),{key:0,class:"wp:w-4 wp:h-4"})):w.type==="contact"?($(),U(f(Wc),{key:1,class:"wp:w-4 wp:h-4"})):w.type==="voicemail"?($(),U(f(kg),{key:2,class:"wp:w-4 wp:h-4"})):($(),U(f(Ig),{key:3,class:"wp:w-4 wp:h-4"}))],2)):Be("",!0),Q("div",Vx,[Q("span",jx,Le(w.name),1),Q("span",Ux,Le(w.number),1)])],8,Fx))),128))])]),_:1})])):Be("",!0),m[8]||(m[8]=Q("p",{class:"wp:text-xs wp:text-muted-foreground"}," Presiona Enter para transferir directamente ",-1))])]),O(f(Rg),{class:"wp:flex-col wp:gap-2 sm:wp:flex-row"},{default:k(()=>[O(f(pt),{variant:"secondary",onClick:m[2]||(m[2]=w=>n("update:visible",!1)),class:"wp:w-full sm:wp:w-auto"},{default:k(()=>[...m[9]||(m[9]=[qe(" Cancelar ",-1)])]),_:1}),O(f(pt),{onClick:m[3]||(m[3]=w=>d("blind")),disabled:!s.value.trim(),variant:"outline",class:"wp:w-full sm:wp:flex-1"},{default:k(()=>[...m[10]||(m[10]=[qe(" Transferencia Ciega ",-1)])]),_:1},8,["disabled"]),O(f(pt),{onClick:m[4]||(m[4]=w=>d("attended")),disabled:!s.value.trim(),class:"wp:w-full sm:wp:flex-1"},{default:k(()=>[...m[11]||(m[11]=[qe(" Con Consulta ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["open"])):Be("",!0)}}),Kx=zx,Wx=X({__name:"DocumentPip",props:{remoteStream:{},localStream:{},hasVideo:{type:Boolean},remoteNumber:{},isConnected:{type:Boolean},callStatus:{},isMuted:{type:Boolean},isHeld:{type:Boolean},destination:{},isVideo:{type:Boolean},active:{type:Boolean},autoOpenOnBlur:{type:Boolean}},emits:["transfer","update:active","hangup","answer","toggleMute","toggleHold"],setup(e,{expose:t,emit:r}){const n=e,s=r,i=F(!1),o=F(!1),a=F(!1),l=F(null),u=F(0),c=F(null);let d=null,p=null;tt(()=>{i.value="documentPictureInPicture"in window,document.addEventListener("visibilitychange",w),window.addEventListener("blur",x)}),jt(()=>{document.removeEventListener("visibilitychange",w),window.removeEventListener("blur",x),p&&(clearTimeout(p),p=null),S(),D()});const h=()=>{const W=n.callStatus!=="idle",ae=document.hidden||!document.hasFocus();return n.autoOpenOnBlur!==!1&&W&&i.value&&ae&&!o.value&&!a.value},m=()=>{h()&&(p&&clearTimeout(p),p=setTimeout(()=>{h()&&R()},120))},w=()=>{m()},x=()=>{m()},v=()=>{c.value||(u.value=0,c.value=setInterval(()=>{u.value++},1e3))},S=()=>{c.value&&(clearInterval(c.value),c.value=null)},b=W=>{const ae=Math.floor(W/60),Y=W%60;return`${ae.toString().padStart(2,"0")}:${Y.toString().padStart(2,"0")}`};He(()=>n.callStatus,(W,ae)=>{W==="connected"&&ae!=="connected"?v():W==="idle"&&ae!=="idle"&&(S(),o.value&&D())},{immediate:!0}),He(()=>n.isConnected,W=>{!W&&o.value&&(S(),D())}),He(()=>[n.callStatus,n.isMuted,n.isHeld],()=>{l.value&&(C(l.value.document),B(l.value.document))});const y=V(()=>i.value&&n.isConnected),T={phone:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"/></svg>',phoneOff:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z" transform="rotate(135 12 12)"/><line x1="1" y1="1" x2="23" y2="23"/></svg>',mic:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z"/><path d="M19 10v2a7 7 0 0 1-14 0v-2"/><line x1="12" x2="12" y1="19" y2="22"/></svg>',micOff:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="2" x2="22" y1="2" y2="22"/><path d="M18.89 13.23A7.12 7.12 0 0 0 19 12v-2"/><path d="M5 10v2a7 7 0 0 0 12 5"/><path d="M15 9.34V5a3 3 0 0 0-5.68-1.33"/><path d="M9 9v3a3 3 0 0 0 5.12 2.12"/><line x1="12" x2="12" y1="19" y2="22"/></svg>',pause:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="14" y="4" width="4" height="16" rx="1"/><rect x="6" y="4" width="4" height="16" rx="1"/></svg>',play:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="6 3 20 12 6 21 6 3"/></svg>',transfer:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m16 3 4 4-4 4"/><path d="M20 7H4"/><path d="m8 21-4-4 4-4"/><path d="M4 17h16"/></svg>',video:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"/><rect x="2" y="6" width="14" height="12" rx="2"/></svg>',user:'<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>'},I=W=>{const ae=W.createElement("style");ae.textContent=`
77
77
  * { box-sizing: border-box; margin: 0; padding: 0; }
78
78
 
79
79
  body {
@@ -279,7 +279,7 @@ Duration=160`,contentType:"application/dtmf-relay",contentDisposition:"signal"}}
279
279
  0%, 100% { opacity: 1; }
280
280
  50% { opacity: 0.7; }
281
281
  }
282
- `,W.head.appendChild(ae)},N=()=>{switch(n.callStatus){case"calling":return"Llamando...";case"incoming":return"Entrante";case"connected":return n.isHeld?"En espera":"En llamada";case"held":return"En espera";default:return""}},v=()=>{switch(n.callStatus){case"calling":return"pip-status-calling";case"incoming":return"pip-status-incoming";case"connected":return n.isHeld?"pip-status-held":"pip-status-connected";case"held":return"pip-status-held";default:return""}},B=W=>{const ae=W.querySelector(".pip-status-text");ae&&(ae.textContent=N(),ae.className=`pip-status-text ${v()}`)},q=W=>{const ae=W.createElement("div");return ae.className="pip-wrapper",n.hasVideo?ae.innerHTML=`
282
+ `,W.head.appendChild(ae)},N=()=>{switch(n.callStatus){case"calling":return"Llamando...";case"incoming":return"Entrante";case"connected":return n.isHeld?"En espera":"En llamada";case"held":return"En espera";default:return""}},g=()=>{switch(n.callStatus){case"calling":return"pip-status-calling";case"incoming":return"pip-status-incoming";case"connected":return n.isHeld?"pip-status-held":"pip-status-connected";case"held":return"pip-status-held";default:return""}},B=W=>{const ae=W.querySelector(".pip-status-text");ae&&(ae.textContent=N(),ae.className=`pip-status-text ${g()}`)},q=W=>{const ae=W.createElement("div");return ae.className="pip-wrapper",n.hasVideo?ae.innerHTML=`
283
283
  <div class="pip-video-area">
284
284
  <video id="pip-remote-video" autoplay playsinline></video>
285
285
  <div class="pip-local-container">
@@ -294,8 +294,8 @@ Duration=160`,contentType:"application/dtmf-relay",contentDisposition:"signal"}}
294
294
  `:ae.innerHTML=`
295
295
  <div class="pip-audio-area">
296
296
  <div class="pip-caller-name">${n.remoteNumber||"Llamada"}</div>
297
- <div class="pip-status-text ${v()}">${N()}</div>
297
+ <div class="pip-status-text ${g()}">${N()}</div>
298
298
  <div class="pip-duration" id="pip-timer">${b(u.value)}</div>
299
299
  </div>
300
300
  <div class="pip-actions" id="pip-actions"></div>
301
- `,ae},C=W=>{const ae=W.getElementById("pip-actions");if(ae){if(ae.innerHTML="",n.callStatus==="incoming"){if(n.hasVideo){const pe=W.createElement("button");pe.className="pip-btn pip-btn-video",pe.title="Contestar con Video",pe.innerHTML=T.video,pe.onclick=()=>s("answer",!0),ae.appendChild(pe)}const Y=W.createElement("button");Y.className="pip-btn pip-btn-answer",Y.title="Contestar",Y.innerHTML=T.phone,Y.onclick=()=>s("answer",!1),ae.appendChild(Y);const le=W.createElement("button");le.className="pip-btn pip-btn-hangup",le.title="Rechazar",le.innerHTML=T.phoneOff,le.onclick=()=>{s("hangup"),D()},ae.appendChild(le)}else if(n.callStatus==="connected"){const Y=W.createElement("button");Y.className=`pip-btn pip-btn-mute ${n.isMuted?"active":""}`,Y.title=n.isMuted?"Activar micrófono":"Silenciar",Y.innerHTML=n.isMuted?T.micOff:T.mic,Y.onclick=()=>s("toggleMute"),ae.appendChild(Y);const le=W.createElement("button");le.className=`pip-btn pip-btn-hold ${n.isHeld?"active":""}`,le.title=n.isHeld?"Reanudar":"Pausar",le.innerHTML=n.isHeld?T.play:T.pause,le.onclick=()=>s("toggleHold"),ae.appendChild(le);const pe=W.createElement("button");pe.className="pip-btn pip-btn-transfer",pe.title="Transferir",pe.innerHTML=T.transfer,pe.onclick=()=>s("transfer"),ae.appendChild(pe);const Ae=W.createElement("button");Ae.className="pip-btn pip-btn-hangup",Ae.title="Colgar",Ae.innerHTML=T.phoneOff,Ae.onclick=()=>{s("hangup"),D()},ae.appendChild(Ae)}else if(n.callStatus==="calling"){const Y=W.createElement("button");Y.className="pip-btn pip-btn-hangup",Y.title="Cancelar",Y.innerHTML=T.phoneOff,Y.onclick=()=>{s("hangup"),D()},ae.appendChild(Y)}}},_=W=>{setTimeout(()=>{const ae=W.getElementById("pip-remote-video"),Y=W.getElementById("pip-local-video");ae&&n.remoteStream&&(ae.srcObject=n.remoteStream,ae.play().catch(()=>{})),Y&&n.localStream&&(Y.srcObject=n.localStream,Y.play().catch(()=>{}))},50)},E=W=>{const ae=W.getElementById("pip-timer");ae&&(d=setInterval(()=>{ae.textContent=b(u.value)},1e3))},P=()=>{d&&(clearInterval(d),d=null)},R=async()=>{if(!(!i.value||o.value||a.value)){a.value=!0;try{const W=n.hasVideo?340:280,ae=n.hasVideo?280:200,Y=await window.documentPictureInPicture.requestWindow({width:W,height:ae,preferInitialWindowPlacement:!0});l.value=Y,o.value=!0,s("update:active",!0),k(Y.document);const le=q(Y.document);Y.document.body.appendChild(le),n.hasVideo&&_(Y.document),C(Y.document),E(Y.document),Y.addEventListener("pagehide",()=>{P(),o.value=!1,l.value=null,s("update:active",!1)})}catch(W){console.error("[DocumentPip] Error:",W)}finally{a.value=!1}}},D=()=>{P(),l.value&&(l.value.close(),l.value=null,o.value=!1,s("update:active",!1))};return t({open:R,close:D,toggle:()=>{o.value?D():R()},isActive:o,isSupported:i,canUsePip:y}),(W,ae)=>ne(W.$slots,"default")}}),Lx=Bx,Fx=["data-mode","data-call-status","data-network-status"],Vx={key:0,class:"webphone__video-area wp:relative wp:w-full wp:aspect-video wp:bg-black"},jx={class:"webphone__video-local-frame wp:absolute wp:bottom-2 wp:right-2 wp:w-24 wp:aspect-video wp:bg-neutral-800 wp:rounded wp:overflow-hidden wp:border wp:border-white/20 wp:shadow-lg"},Ux={class:"webphone__body wp:flex wp:flex-col wp:gap-1 wp:space-y-2"},zx={key:0,class:"webphone__channel-switcher-wrap wp:flex wp:flex-col wp:items-center wp:justify-center wp:py-3 wp:px-4 wp:gap-2"},Kx={role:"radiogroup","aria-label":"Canales",class:"webphone__channel-switcher wp:w-full wp:max-w-[330px] wp:flex wp:items-center wp:justify-between wp:gap-1"},Wx={class:"wp:flex"},Gx=["aria-checked","disabled","title","data-channel-id","data-state","data-call-state","onClick"],Jx={class:"webphone__display wp:py-1"},Yx=["data-visible"],Zx={key:1,class:"webphone__offline-overlay wp:absolute wp:inset-0 wp:z-40 wp:flex wp:items-center wp:justify-center wp:bg-white/70 wp:dark:bg-neutral-900/70 wp:backdrop-blur-[1px] wp:px-6 wp:text-center"},Xx={key:2,class:"webphone__footer wp:flex wp:flex-col wp:items-center wp:p-2 wp:gap-0"},Qx=X({__name:"WebPhone",props:{host:{},wsUrl:{},extension:{},password:{},to:{},mode:{default:"call"},logo:{},contacts:{default:()=>[]},position:{default:()=>({})},initialKeypadVisible:{type:Boolean,default:!0},enablePictureInPicture:{type:Boolean,default:!0},maskNumber:{type:Boolean,default:!1},extensions:{default:()=>[]},earlyMedia:{type:Boolean,default:!1},appName:{},onAnswer:{},onHangup:{},onReject:{}},emits:["back","call-context","call-state","media-ready"],setup(e,{expose:t,emit:r}){const n=new Map,s=e,i=r,o=V(()=>{if(s.wsUrl)return s.wsUrl;if(s.host)return`wss://${s.host}/ws`}),a=V(()=>!o.value||!s.extension?"":`${o.value}::${s.extension}`),l=a.value?n.get(a.value):void 0,u=Q0({server:o.value,extension:s.extension,initialConnected:l,initialKeypadVisible:s.initialKeypadVisible}),c=Qr(u),d=By(u,{onCallContext:Z=>i("call-context",Z),onCallState:Z=>i("call-state",Z),onMediaReady:Z=>i("media-ready",Z)}),{initUserAgent:p,switchChannel:h,remoteStream:m,localStream:w}=d;Xn("webphone",c),Xn("sip",d),t({stop:d.stop}),ct(()=>{s.mode==="webcall"&&(s.to||console.error('WebPhone: "to" prop is required when mode is "webcall"'),s.logo||console.error('WebPhone: "logo" prop is required when mode is "webcall"'))});const x=F(!1),g=F(!1),S=F(!1),b=F(null),y=F(null),T=F(null),k=navigator.platform.toUpperCase().indexOf("MAC")>=0?"⌘":"Ctrl+",N=V(()=>s.mode==="webcall"),v=F(0),B=Z=>!!Z&&Z.getVideoTracks().length>0;Me(()=>c.callStatus,Z=>{if(Z==="idle"&&!c.isKeypadVisible){c.toggleKeypad();return}Z!=="idle"&&c.isKeypadVisible&&c.toggleKeypad()});const q=V(()=>c.channels.find(Z=>Z.id===c.activeChannelId)??null),C=Z=>{if(!Z)return"";const ce=Z.trim(),he=ce.startsWith("+"),st=ce.replace(/[^\d]/g,"");return he?`+${st}`:st},_=V(()=>{const Z=q.value?.remoteNumber||c.remoteNumber,ce=C(Z),he=s.contacts.find(st=>C(st.number)===ce);return he?.name?s.maskNumber&&/^[+\d\s().*#-]+$/.test(he.name.trim())?_r(he.name,s.extensions):he.name:s.maskNumber&&Z?_r(Z,s.extensions):Z||"Llamada"}),E=V(()=>{const Z=q.value?.remoteNumber||c.remoteNumber;return s.maskNumber?_r(Z,s.extensions):Z}),P=V(()=>(v.value,!!q.value?.hasVideo||B(m.value)||B(w.value))),{isOnline:R}=Tb(),D=V(()=>!R.value),G=F(null),W=F(!1),ae=V(()=>s.enablePictureInPicture),Y=()=>{ae.value&&G.value?.toggle()},le=async(Z,ce)=>{try{ce==="blind"?await d.transferCall(Z):await d.startAttendedTransfer(Z)}catch(he){console.error("[WebPhone] Transfer error:",he),alert(he instanceof Error?he.message:"Transfer failed. Please try again.")}},pe=async()=>{try{await d.completeAttendedTransfer()}catch(Z){console.error("[WebPhone] Complete transfer error:",Z),alert(Z instanceof Error?Z.message:"Failed to complete transfer.")}},Ae=async()=>{try{await d.cancelAttendedTransfer()}catch(Z){console.error("[WebPhone] Cancel transfer error:",Z),alert(Z instanceof Error?Z.message:"Failed to cancel transfer.")}},je=Z=>{c.keypadValue=Z,d.makeCall(Z)},Ie=Z=>{if(s.onAnswer){s.onAnswer(Z);return}d.answerCall(Z)},Oe=async()=>{await d.hangupCall(),await s.onHangup?.()},Xe=()=>{if(s.onReject){s.onReject();return}d.hangupCall()},yt=()=>{S.value=!0,G.value?.close(),window.focus()},Ne=()=>{if(!ae.value)return!1;const Z=c.callStatus!=="idle",ce=document.hidden||!document.hasFocus();return Z&&ce&&!W.value},at=()=>{window.setTimeout(()=>{Ne()&&G.value?.open()},150)};ct(()=>{y.value&&(W.value||!m.value?y.value.srcObject=null:y.value.srcObject=m.value),T.value&&(W.value||!w.value?T.value.srcObject=null:T.value.srcObject=w.value)});const bt=Z=>{if(!Z||typeof Z.addEventListener!="function"||typeof Z.removeEventListener!="function")return()=>{};const ce=()=>{v.value+=1};return Z.addEventListener("addtrack",ce),Z.addEventListener("removetrack",ce),()=>{Z.removeEventListener("addtrack",ce),Z.removeEventListener("removetrack",ce)}};Me(m,(Z,ce,he)=>{v.value+=1,he(bt(Z))},{immediate:!0}),Me(w,(Z,ce,he)=>{v.value+=1,he(bt(Z))},{immediate:!0});const Tt=["button","a","input","textarea","select","label","video",'[role="button"]','[role="radio"]',"[data-no-drag]"].join(", "),A=()=>{const Z=window.innerWidth<640,ce=window.innerWidth<1024;let he=360;return Z?he=window.innerWidth*.9:ce&&(he=340),{x:Math.max(0,(window.innerWidth-he)/2),y:Z?30:80}},{x:H,y:J,style:se}=xb(b,{initialValue:V(()=>{const Z=A();return{x:s.position.x??Z.x,y:s.position.y??Z.y}}).value,preventDefault:!0,onStart:(Z,ce)=>{const he=ce.target;if(he instanceof HTMLElement&&he.closest(Tt))return!1}});Me(()=>s.position,Z=>{const ce=A();H.value=Z.x??ce.x,J.value=Z.y??ce.y},{deep:!0});const re=[{label:"Canal 1",value:0},{label:"Canal 2",value:1},{label:"Canal 3",value:2}],ee=F(!1),fe=V({get:()=>c.activeChannelId.toString(),set:async Z=>{if(!D.value&&Z&&!ee.value){ee.value=!0;try{await h(parseInt(Z))}finally{ee.value=!1}}}}),de=Z=>{const ce=c.channels.find(he=>he.id===Z);return ce?ce.status==="connected"||ce.status==="calling"||ce.status==="incoming":!1},ue=Z=>{const ce=c.channels.find(he=>he.id===Z);return ce?ce.isHeld||ce.status==="held":!1},ie=Z=>{D.value||(fe.value=Z.toString())},Re=Z=>{if(!D.value&&((Z.metaKey||Z.ctrlKey)&&Z.key.toLowerCase()==="h"&&(Z.preventDefault(),g.value=!0),(Z.metaKey||Z.ctrlKey)&&Z.key===","&&(Z.preventDefault(),x.value=!0),(Z.metaKey||Z.ctrlKey)&&Z.key.toLowerCase()==="k"&&(Z.preventDefault(),c.toggleKeypad()),(Z.metaKey||Z.ctrlKey)&&["1","2","3"].includes(Z.key))){Z.preventDefault();const ce=parseInt(Z.key)-1;ee.value||(ee.value=!0,h(ce).finally(()=>{ee.value=!1}))}};Me(()=>c.callStatus,()=>{Ne()&&at()}),Me(()=>c.isConnected,Z=>{a.value&&n.set(a.value,Z)},{immediate:!0}),Me(ae,Z=>{!Z&&W.value&&G.value?.close()});const ge=F(!1),Te=async()=>{ge.value||D.value||!s.host||!s.extension||!s.password||(await p({uri:`sip:${s.extension}@${s.host}`,transportOptions:{server:o.value},authorizationUsername:s.extension,authorizationPassword:s.password,earlyMedia:s.earlyMedia,appName:s.appName}),d.extension.value&&(ge.value=!0,s.mode==="webcall"&&s.to&&d.makeCall(s.to)))},He=()=>Te(),Ve=async()=>{await d.stop(),ge.value=!1};return Xn("webphoneRegistration",{isConnected:V(()=>c.isConnected),register:He,unregister:Ve}),tt(async()=>{window.addEventListener("keydown",Re),document.addEventListener("visibilitychange",at),window.addEventListener("blur",at),window.addEventListener("pagehide",at),!(s.mode==="webcall"&&(!s.to||!s.logo))&&await Te()}),Me(()=>R.value,async Z=>{Z&&await Te()}),Vt(()=>{d.stop(),window.removeEventListener("keydown",Re),document.removeEventListener("visibilitychange",at),window.removeEventListener("blur",at),window.removeEventListener("pagehide",at)}),(Z,ce)=>($(),Se(Ke,null,[Q("div",{ref_key:"phoneRef",ref:b,style:St(f(se)),class:et(["webphone webphone-container wp:bg-white wp:dark:bg-neutral-800 wp:rounded-lg wp:shadow-sm wp:inset-shadow-2xs wp:w-[min(92vw,330px)] wp:fixed wp:z-50 wp:select-none wp:[&_button]:cursor-pointer wp:**:[[role=button]]:cursor-pointer",D.value?"wp:opacity-70":""]),"data-mode":s.mode,"data-call-status":c.callStatus,"data-network-status":D.value?"offline":"online"},[P.value&&!W.value?($(),Se("div",Vx,[Q("video",{ref_key:"remoteVideoRef",ref:y,autoplay:"",playsinline:"",class:"webphone__video-remote wp:w-full wp:h-full wp:object-cover"},null,512),Q("div",jx,[Q("video",{ref_key:"localVideoRef",ref:T,autoplay:"",playsinline:"",muted:"",class:"webphone__video-local wp:w-full wp:h-full wp:object-cover"},null,512)])])):Be("",!0),Q("div",Ux,[N.value?Be("",!0):($(),Se("div",zx,[Q("div",Kx,[Q("div",Wx,[($(),Se(Ke,null,vr(re,he=>Q("button",{key:he.value,type:"button",role:"radio","aria-checked":fe.value===he.value.toString(),disabled:D.value,title:`${he.label} (${f(k)}${he.value+1})`,class:et(["webphone__channel-button wp:flex wp:items-center wp:gap-1 wp:px-2 wp:py-2 wp:rounded-lg wp:transition-colors wp:duration-200 wp:outline-none wp:focus-visible:ring-2 wp:focus-visible:ring-[var(--p-primary-color)] wp:focus-visible:ring-offset-2 wp:focus-visible:ring-offset-white wp:dark:focus-visible:ring-offset-neutral-900",ue(he.value)?"wp:bg-status-hold/12 hover:wp:bg-status-hold/18":de(he.value)?"wp:bg-[var(--color-red)]/12 hover:wp:bg-[var(--color-red)]/18":fe.value===he.value.toString()?"wp:bg-[var(--p-primary-color)]/12":"wp:hover:bg-neutral-100 wp:dark:hover:bg-neutral-800/80"]),"data-channel-id":he.value,"data-state":fe.value===he.value.toString()?"active":"idle","data-call-state":ue(he.value)?"held":de(he.value)?"busy":"available",onClick:st=>ie(he.value)},[O(f(Qc),{class:et(["webphone__channel-icon wp:size-3 wp:shrink-0",ue(he.value)?"wp:text-status-hold":de(he.value)?"wp:text-[var(--color-red)]":fe.value===he.value.toString()?"wp:text-[var(--p-primary-color)]":"wp:text-neutral-400"]),"stroke-width":1.8},null,8,["class"]),Q("span",{class:et(["webphone__channel-label wp:text-[11px] wp:leading-none manrope wp:font-bold",ue(he.value)?"wp:text-status-hold":de(he.value)?"wp:text-[var(--color-red)]":fe.value===he.value.toString()?"wp:text-[var(--p-primary-color)]":"wp:text-neutral-500 wp:dark:text-neutral-400"])},Le(he.label),3)],10,Gx)),64))]),O(f(zi),null,{default:I(()=>[O(f(Gs),null,{default:I(()=>[O(f(Ys),{"as-child":""},{default:I(()=>[O(f(pt),{variant:"ghost",size:"icon",class:et(["wp:h-8 wp:w-8 wp:rounded-full",W.value?"wp:text-primary":""]),title:"Picture-in-Picture",onClick:Y},{default:I(()=>[O(f(nS),{class:"wp:w-4 wp:h-4 wp:text-[var(--color-settings)]"})]),_:1},8,["class"])]),_:1}),O(f(Js),{class:"wp:flex wp:items-center wp:gap-2"},{default:I(()=>[...ce[8]||(ce[8]=[Q("span",null,"Picture-in-Picture",-1)])]),_:1})]),_:1})]),_:1}),O(f(zi),null,{default:I(()=>[O(f(Gs),null,{default:I(()=>[O(f(Ys),{"as-child":""},{default:I(()=>[O(f(pt),{variant:"ghost",size:"icon",class:"wp:h-8 wp:w-8 wp:rounded-full",onClick:ce[0]||(ce[0]=he=>x.value=!0)},{default:I(()=>[O(f(oS),{class:"wp:w-4 wp:h-4 wp:text-[var(--color-settings)]"})]),_:1})]),_:1}),O(f(Js),{class:"wp:flex wp:items-center wp:gap-2"},{default:I(()=>[ce[9]||(ce[9]=Q("span",null,"Configuración",-1)),O(f(yn),null,{default:I(()=>[qe(Le(f(k))+",",1)]),_:1})]),_:1})]),_:1})]),_:1})])])),Q("div",Jx,[($(!0),Se(Ke,null,vr(c.channels,he=>mo(($(),U(fC,{key:he.id,"channel-id":he.id,"allow-input":!N.value,"is-web-call":N.value,"is-online":f(R),contacts:s.contacts,user:s.extension,"mask-number":s.maskNumber,extensions:s.extensions},null,8,["channel-id","allow-input","is-web-call","is-online","contacts","user","mask-number","extensions"])),[[qo,he.id===c.activeChannelId]])),128))]),Q("div",{class:et(["webphone__keypad wp:transition-all wp:duration-300 wp:ease-in-out wp:overflow-hidden",c.isKeypadVisible&&c.callStatus==="idle"?"wp:max-h-[300px] wp:opacity-100 wp:pb-0":"wp:max-h-0 wp:opacity-0 wp:pb-0"]),"data-visible":c.isKeypadVisible&&c.callStatus==="idle"?"true":"false"},[O(zc)],10,Yx),O(NS,{class:"webphone__actions",style:St(D.value?"pointer-events: none;":void 0),destination:N.value?s.to:void 0,"is-video":s.mode==="video","on-answer":s.onAnswer,"on-hangup":s.onHangup,"on-reject":s.onReject,onTransfer:ce[1]||(ce[1]=he=>S.value=!0),onCompleteTransfer:pe,onCancelTransfer:Ae},null,8,["style","destination","is-video","on-answer","on-hangup","on-reject"])]),D.value?($(),Se("div",Zx,[...ce[10]||(ce[10]=[Q("span",{class:"wp:text-sm wp:font-semibold wp:text-status-disconnected"},"Sin internet",-1)])])):Be("",!0),N.value?($(),Se("div",Xx,[...ce[11]||(ce[11]=[Q("div",{class:"webphone__footer-label wp:text-[10px] wp:text-primary"},"Powered By",-1),Q("div",{class:"webphone__footer-content wp:flex wp:items-center wp:gap-2"},[Q("a",{href:"https://www.nebula123.com",target:"_blank",class:"webphone__footer-link wp:text-[10px] wp:text-primary wp:hover:underline"}," www.nebula123.com ")],-1)])])):Be("",!0)],14,Fx),O(ax,{visible:x.value,"onUpdate:visible":ce[2]||(ce[2]=he=>x.value=he)},null,8,["visible"]),O(Ax,{visible:g.value,"onUpdate:visible":ce[3]||(ce[3]=he=>g.value=he),contacts:s.contacts,"mask-number":s.maskNumber,extensions:s.extensions,onCall:je},null,8,["visible","contacts","mask-number","extensions"]),O(qx,{visible:S.value,"onUpdate:visible":ce[4]||(ce[4]=he=>S.value=he),contacts:s.contacts,"mask-number":s.maskNumber,extensions:s.extensions,onTransfer:le},null,8,["visible","contacts","mask-number","extensions"]),O(Lx,{ref_key:"documentPipRef",ref:G,active:W.value,"onUpdate:active":ce[5]||(ce[5]=he=>W.value=he),"auto-open-on-blur":ae.value,"is-connected":c.isConnected,"remote-number":E.value,"caller-name":_.value,"has-video":P.value??!1,"remote-stream":f(m),"local-stream":f(w),destination:N.value?s.to:void 0,"is-video":s.mode==="video","call-status":c.callStatus,"is-muted":c.isMuted,"is-held":c.isHeld,onTransfer:yt,onTransferRequest:le,onHangup:Oe,onReject:Xe,onAnswer:Ie,onToggleMute:ce[6]||(ce[6]=he=>f(d).toggleMute()),onToggleHold:ce[7]||(ce[7]=he=>f(d).toggleHold())},null,8,["active","auto-open-on-blur","is-connected","remote-number","caller-name","has-video","remote-stream","local-stream","destination","is-video","call-status","is-muted","is-held"])],64))}}),eT=(e,t)=>{const r=e.__vccOpts||e;for(const[n,s]of t)r[n]=s;return r},tT=eT(Qx,[["__scopeId","data-v-9b88a405"]]),rT=Hl({props:{host:String,wsUrl:String,extension:String,password:String,to:String,mode:{type:String,default:"call"},logo:String,contacts:{type:[String,Array],default:()=>[]},initialKeypadVisible:{type:[Boolean,String],default:!0},enablePictureInPicture:{type:Boolean,default:!0},maskNumber:{type:[Boolean,String],default:!1},earlyMedia:{type:[Boolean,String],default:!1},onAnswer:Function,onHangup:Function,onReject:Function},setup(e){return()=>{let t=e.contacts;if(typeof e.contacts=="string")try{t=JSON.parse(e.contacts)}catch{t=[]}return mr(tT,{...e,contacts:t,initialKeypadVisible:!(e.initialKeypadVisible===!1||e.initialKeypadVisible==="false"),maskNumber:e.maskNumber===!0||e.maskNumber==="true",earlyMedia:e.earlyMedia===!0||e.earlyMedia==="true"})}}},{shadowRoot:!1});customElements.define("web-phone",rT)})();
301
+ `,ae},C=W=>{const ae=W.getElementById("pip-actions");if(ae){if(ae.innerHTML="",n.callStatus==="incoming"){if(n.hasVideo){const he=W.createElement("button");he.className="pip-btn pip-btn-video",he.title="Contestar con Video",he.innerHTML=T.video,he.onclick=()=>s("answer",!0),ae.appendChild(he)}const Y=W.createElement("button");Y.className="pip-btn pip-btn-answer",Y.title="Contestar",Y.innerHTML=T.phone,Y.onclick=()=>s("answer",!1),ae.appendChild(Y);const le=W.createElement("button");le.className="pip-btn pip-btn-hangup",le.title="Rechazar",le.innerHTML=T.phoneOff,le.onclick=()=>{s("hangup"),D()},ae.appendChild(le)}else if(n.callStatus==="connected"){const Y=W.createElement("button");Y.className=`pip-btn pip-btn-mute ${n.isMuted?"active":""}`,Y.title=n.isMuted?"Activar micrófono":"Silenciar",Y.innerHTML=n.isMuted?T.micOff:T.mic,Y.onclick=()=>s("toggleMute"),ae.appendChild(Y);const le=W.createElement("button");le.className=`pip-btn pip-btn-hold ${n.isHeld?"active":""}`,le.title=n.isHeld?"Reanudar":"Pausar",le.innerHTML=n.isHeld?T.play:T.pause,le.onclick=()=>s("toggleHold"),ae.appendChild(le);const he=W.createElement("button");he.className="pip-btn pip-btn-transfer",he.title="Transferir",he.innerHTML=T.transfer,he.onclick=()=>s("transfer"),ae.appendChild(he);const Ie=W.createElement("button");Ie.className="pip-btn pip-btn-hangup",Ie.title="Colgar",Ie.innerHTML=T.phoneOff,Ie.onclick=()=>{s("hangup"),D()},ae.appendChild(Ie)}else if(n.callStatus==="calling"){const Y=W.createElement("button");Y.className="pip-btn pip-btn-hangup",Y.title="Cancelar",Y.innerHTML=T.phoneOff,Y.onclick=()=>{s("hangup"),D()},ae.appendChild(Y)}}},_=W=>{setTimeout(()=>{const ae=W.getElementById("pip-remote-video"),Y=W.getElementById("pip-local-video");ae&&n.remoteStream&&(ae.srcObject=n.remoteStream,ae.play().catch(()=>{})),Y&&n.localStream&&(Y.srcObject=n.localStream,Y.play().catch(()=>{}))},50)},E=W=>{const ae=W.getElementById("pip-timer");ae&&(d=setInterval(()=>{ae.textContent=b(u.value)},1e3))},P=()=>{d&&(clearInterval(d),d=null)},R=async()=>{if(!(!i.value||o.value||a.value)){a.value=!0;try{const W=n.hasVideo?340:280,ae=n.hasVideo?280:200,Y=await window.documentPictureInPicture.requestWindow({width:W,height:ae,preferInitialWindowPlacement:!0});l.value=Y,o.value=!0,s("update:active",!0),I(Y.document);const le=q(Y.document);Y.document.body.appendChild(le),n.hasVideo&&_(Y.document),C(Y.document),E(Y.document),Y.addEventListener("pagehide",()=>{P(),o.value=!1,l.value=null,s("update:active",!1)})}catch(W){console.error("[DocumentPip] Error:",W)}finally{a.value=!1}}},D=()=>{P(),l.value&&(l.value.close(),l.value=null,o.value=!1,s("update:active",!1))};return t({open:R,close:D,toggle:()=>{o.value?D():R()},isActive:o,isSupported:i,canUsePip:y}),(W,ae)=>ne(W.$slots,"default")}}),Gx=Wx,Jx=["data-mode","data-call-status","data-network-status"],Yx={key:0,class:"webphone__video-area wp:relative wp:w-full wp:aspect-video wp:bg-black"},Zx={class:"webphone__video-local-frame wp:absolute wp:bottom-2 wp:right-2 wp:w-24 wp:aspect-video wp:bg-neutral-800 wp:rounded wp:overflow-hidden wp:border wp:border-white/20 wp:shadow-lg"},Xx={class:"webphone__body wp:flex wp:flex-col wp:gap-1 wp:space-y-2"},Qx={key:0,class:"webphone__channel-switcher-wrap wp:flex wp:flex-col wp:items-center wp:justify-center wp:py-3 wp:px-4 wp:gap-2"},eT={role:"radiogroup","aria-label":"Canales",class:"webphone__channel-switcher wp:w-full wp:max-w-[330px] wp:flex wp:items-center wp:justify-between wp:gap-1"},tT={class:"wp:flex"},rT=["aria-checked","disabled","title","data-channel-id","data-state","data-call-state","onClick"],nT={class:"webphone__display wp:py-1"},sT=["data-visible"],iT={key:1,class:"webphone__offline-overlay wp:absolute wp:inset-0 wp:z-40 wp:flex wp:items-center wp:justify-center wp:bg-white/70 wp:dark:bg-neutral-900/70 wp:backdrop-blur-[1px] wp:px-6 wp:text-center"},oT={key:2,class:"webphone__footer wp:flex wp:flex-col wp:items-center wp:p-2 wp:gap-0"},aT=X({__name:"WebPhone",props:{host:{},wsUrl:{},extension:{},password:{},to:{},mode:{default:"call"},logo:{},contacts:{default:()=>[]},position:{default:()=>({})},initialKeypadVisible:{type:Boolean,default:!0},enablePictureInPicture:{type:Boolean,default:!0},maskNumber:{type:Boolean,default:!1},extensions:{default:()=>[]},earlyMedia:{type:Boolean,default:!1},appName:{},onAnswer:{},onHangup:{},onReject:{}},emits:["back","call-context","call-state","media-ready"],setup(e,{expose:t,emit:r}){const n=new Map,s=e,i=r,o=V(()=>{if(s.wsUrl)return s.wsUrl;if(s.host)return`wss://${s.host}/ws`}),a=V(()=>!o.value||!s.extension?"":`${o.value}::${s.extension}`),l=a.value?n.get(a.value):void 0,u=ew({server:o.value,extension:s.extension,initialConnected:l,initialKeypadVisible:s.initialKeypadVisible}),c=Qr(u),d=Wy(u,{onCallContext:Z=>i("call-context",Z),onCallState:Z=>i("call-state",Z),onMediaReady:Z=>i("media-ready",Z)}),{initUserAgent:p,switchChannel:h,remoteStream:m,localStream:w}=d;Xn("webphone",c),Xn("sip",d),t({stop:d.stop}),ct(()=>{s.mode==="webcall"&&(s.to||console.error('WebPhone: "to" prop is required when mode is "webcall"'),s.logo||console.error('WebPhone: "logo" prop is required when mode is "webcall"'))});const x=F(!1),v=F(!1),S=F(!1),b=F(null),y=F(null),T=F(null),I=navigator.platform.toUpperCase().indexOf("MAC")>=0?"⌘":"Ctrl+",N=V(()=>s.mode==="webcall"),g=F(0),B=Z=>!!Z&&Z.getVideoTracks().length>0;He(()=>c.callStatus,Z=>{if(Z==="idle"&&!c.isKeypadVisible){c.toggleKeypad();return}Z!=="idle"&&c.isKeypadVisible&&c.toggleKeypad()});const q=V(()=>c.channels.find(Z=>Z.id===c.activeChannelId)??null),C=Z=>{if(!Z)return"";const ue=Z.trim(),pe=ue.startsWith("+"),lt=ue.replace(/[^\d]/g,"");return pe?`+${lt}`:lt},_=V(()=>{const Z=q.value?.remoteNumber||c.remoteNumber,ue=C(Z),pe=s.contacts.find(lt=>C(lt.number)===ue);return pe?.name?s.maskNumber&&/^[+\d\s().*#-]+$/.test(pe.name.trim())?br(pe.name,s.extensions):pe.name:s.maskNumber&&Z?br(Z,s.extensions):Z||"Llamada"}),E=V(()=>{const Z=q.value?.remoteNumber||c.remoteNumber;return s.maskNumber?br(Z,s.extensions):Z}),P=V(()=>(g.value,!!q.value?.hasVideo||B(m.value)||B(w.value))),{isOnline:R}=Db(),D=V(()=>!R.value),G=F(null),W=F(!1),ae=V(()=>s.enablePictureInPicture),Y=()=>{ae.value&&G.value?.toggle()},le=async(Z,ue)=>{try{ue==="blind"?await d.transferCall(Z):await d.startAttendedTransfer(Z)}catch(pe){console.error("[WebPhone] Transfer error:",pe),alert(pe instanceof Error?pe.message:"Transfer failed. Please try again.")}},he=async()=>{try{await d.completeAttendedTransfer()}catch(Z){console.error("[WebPhone] Complete transfer error:",Z),alert(Z instanceof Error?Z.message:"Failed to complete transfer.")}},Ie=async()=>{try{await d.cancelAttendedTransfer()}catch(Z){console.error("[WebPhone] Cancel transfer error:",Z),alert(Z instanceof Error?Z.message:"Failed to cancel transfer.")}},Ne=Z=>{c.keypadValue=Z,d.makeCall(Z)},De=Z=>{if(s.onAnswer){s.onAnswer(Z);return}d.answerCall(Z)},Re=async()=>{await d.hangupCall(),await s.onHangup?.()},st=()=>{if(s.onReject){s.onReject();return}d.hangupCall()},mt=()=>{S.value=!0,G.value?.close(),window.focus()},Ge=()=>{if(!ae.value)return!1;const Z=c.callStatus!=="idle",ue=document.hidden||!document.hasFocus();return Z&&ue&&!W.value},je=()=>{window.setTimeout(()=>{Ge()&&G.value?.open()},150)};ct(()=>{y.value&&(W.value||!m.value?y.value.srcObject=null:y.value.srcObject=m.value),T.value&&(W.value||!w.value?T.value.srcObject=null:T.value.srcObject=w.value)});const bt=Z=>{if(!Z||typeof Z.addEventListener!="function"||typeof Z.removeEventListener!="function")return()=>{};const ue=()=>{g.value+=1};return Z.addEventListener("addtrack",ue),Z.addEventListener("removetrack",ue),()=>{Z.removeEventListener("addtrack",ue),Z.removeEventListener("removetrack",ue)}};He(m,(Z,ue,pe)=>{g.value+=1,pe(bt(Z))},{immediate:!0}),He(w,(Z,ue,pe)=>{g.value+=1,pe(bt(Z))},{immediate:!0});const Tt=["button","a","input","textarea","select","label","video",'[role="button"]','[role="radio"]',"[data-no-drag]"].join(", "),A=()=>{const Z=window.innerWidth<640,ue=window.innerWidth<1024;let pe=360;return Z?pe=window.innerWidth*.9:ue&&(pe=340),{x:Math.max(0,(window.innerWidth-pe)/2),y:Z?30:80}},{x:H,y:J,style:ie}=Pb(b,{initialValue:V(()=>{const Z=A();return{x:s.position.x??Z.x,y:s.position.y??Z.y}}).value,preventDefault:!0,onStart:(Z,ue)=>{const pe=ue.target;if(pe instanceof HTMLElement&&pe.closest(Tt))return!1}});He(()=>s.position,Z=>{const ue=A();H.value=Z.x??ue.x,J.value=Z.y??ue.y},{deep:!0});const ee=[{label:"Canal 1",value:0},{label:"Canal 2",value:1},{label:"Canal 3",value:2}],re=F(!1),fe=V({get:()=>c.activeChannelId.toString(),set:async Z=>{if(!D.value&&Z&&!re.value){re.value=!0;try{await h(parseInt(Z))}finally{re.value=!1}}}}),de=Z=>{const ue=c.channels.find(pe=>pe.id===Z);return ue?ue.status==="connected"||ue.status==="calling"||ue.status==="incoming":!1},ce=Z=>{const ue=c.channels.find(pe=>pe.id===Z);return ue?ue.isHeld||ue.status==="held":!1},se=Z=>{D.value||(fe.value=Z.toString())},ke=Z=>{if(!D.value&&((Z.metaKey||Z.ctrlKey)&&Z.key.toLowerCase()==="h"&&(Z.preventDefault(),v.value=!0),(Z.metaKey||Z.ctrlKey)&&Z.key===","&&(Z.preventDefault(),x.value=!0),(Z.metaKey||Z.ctrlKey)&&Z.key.toLowerCase()==="k"&&(Z.preventDefault(),c.toggleKeypad()),(Z.metaKey||Z.ctrlKey)&&["1","2","3"].includes(Z.key))){Z.preventDefault();const ue=parseInt(Z.key)-1;re.value||(re.value=!0,h(ue).finally(()=>{re.value=!1}))}};He(()=>c.callStatus,()=>{Ge()&&je()}),He(()=>c.isConnected,Z=>{a.value&&n.set(a.value,Z)},{immediate:!0}),He(ae,Z=>{!Z&&W.value&&G.value?.close()});const we=F(!1),_e=async()=>{we.value||D.value||!s.host||!s.extension||!s.password||(await p({uri:`sip:${s.extension}@${s.host}`,transportOptions:{server:o.value},authorizationUsername:s.extension,authorizationPassword:s.password,earlyMedia:s.earlyMedia,appName:s.appName}),d.extension.value&&(we.value=!0,s.mode==="webcall"&&s.to&&d.makeCall(s.to)))},Me=()=>_e(),Ve=async()=>{await d.stop(),we.value=!1};return Xn("webphoneRegistration",{isConnected:V(()=>c.isConnected),register:Me,unregister:Ve}),tt(async()=>{window.addEventListener("keydown",ke),document.addEventListener("visibilitychange",je),window.addEventListener("blur",je),window.addEventListener("pagehide",je),!(s.mode==="webcall"&&(!s.to||!s.logo))&&await _e()}),He(()=>R.value,async Z=>{Z&&await _e()}),jt(()=>{d.stop(),window.removeEventListener("keydown",ke),document.removeEventListener("visibilitychange",je),window.removeEventListener("blur",je),window.removeEventListener("pagehide",je)}),(Z,ue)=>($(),Ce(Ke,null,[Q("div",{ref_key:"phoneRef",ref:b,style:St(f(ie)),class:et(["webphone webphone-container wp:bg-white wp:dark:bg-neutral-800 wp:rounded-lg wp:shadow-sm wp:inset-shadow-2xs wp:w-[min(92vw,330px)] wp:fixed wp:z-50 wp:select-none wp:[&_button]:cursor-pointer wp:**:[[role=button]]:cursor-pointer",D.value?"wp:opacity-70":""]),"data-mode":s.mode,"data-call-status":c.callStatus,"data-network-status":D.value?"offline":"online"},[P.value&&!W.value?($(),Ce("div",Yx,[Q("video",{ref_key:"remoteVideoRef",ref:y,autoplay:"",playsinline:"",class:"webphone__video-remote wp:w-full wp:h-full wp:object-cover"},null,512),Q("div",Zx,[Q("video",{ref_key:"localVideoRef",ref:T,autoplay:"",playsinline:"",muted:"",class:"webphone__video-local wp:w-full wp:h-full wp:object-cover"},null,512)])])):Be("",!0),Q("div",Xx,[N.value?Be("",!0):($(),Ce("div",Qx,[Q("div",eT,[Q("div",tT,[($(),Ce(Ke,null,gr(ee,pe=>Q("button",{key:pe.value,type:"button",role:"radio","aria-checked":fe.value===pe.value.toString(),disabled:D.value,title:`${pe.label} (${f(I)}${pe.value+1})`,class:et(["webphone__channel-button wp:flex wp:items-center wp:gap-1 wp:px-2 wp:py-2 wp:rounded-lg wp:transition-colors wp:duration-200 wp:outline-none wp:focus-visible:ring-2 wp:focus-visible:ring-[var(--p-primary-color)] wp:focus-visible:ring-offset-2 wp:focus-visible:ring-offset-white wp:dark:focus-visible:ring-offset-neutral-900",ce(pe.value)?"wp:bg-status-hold/12 hover:wp:bg-status-hold/18":de(pe.value)?"wp:bg-[var(--color-red)]/12 hover:wp:bg-[var(--color-red)]/18":fe.value===pe.value.toString()?"wp:bg-[var(--p-primary-color)]/12":"wp:hover:bg-neutral-100 wp:dark:hover:bg-neutral-800/80"]),"data-channel-id":pe.value,"data-state":fe.value===pe.value.toString()?"active":"idle","data-call-state":ce(pe.value)?"held":de(pe.value)?"busy":"available",onClick:lt=>se(pe.value)},[O(f(Qc),{class:et(["webphone__channel-icon wp:size-3 wp:shrink-0",ce(pe.value)?"wp:text-status-hold":de(pe.value)?"wp:text-[var(--color-red)]":fe.value===pe.value.toString()?"wp:text-[var(--p-primary-color)]":"wp:text-neutral-400"]),"stroke-width":1.8},null,8,["class"]),Q("span",{class:et(["webphone__channel-label wp:text-[11px] wp:leading-none manrope wp:font-bold",ce(pe.value)?"wp:text-status-hold":de(pe.value)?"wp:text-[var(--color-red)]":fe.value===pe.value.toString()?"wp:text-[var(--p-primary-color)]":"wp:text-neutral-500 wp:dark:text-neutral-400"])},Le(pe.label),3)],10,rT)),64))]),O(f(Ki),null,{default:k(()=>[O(f(Js),null,{default:k(()=>[O(f(Zs),{"as-child":""},{default:k(()=>[O(f(pt),{variant:"ghost",size:"icon",class:et(["wp:h-8 wp:w-8 wp:rounded-full",W.value?"wp:text-primary":""]),title:"Picture-in-Picture",onClick:Y},{default:k(()=>[O(f(dS),{class:"wp:w-4 wp:h-4 wp:text-[var(--color-settings)]"})]),_:1},8,["class"])]),_:1}),O(f(Ys),{class:"wp:flex wp:items-center wp:gap-2"},{default:k(()=>[...ue[8]||(ue[8]=[Q("span",null,"Picture-in-Picture",-1)])]),_:1})]),_:1})]),_:1}),O(f(Ki),null,{default:k(()=>[O(f(Js),null,{default:k(()=>[O(f(Zs),{"as-child":""},{default:k(()=>[O(f(pt),{variant:"ghost",size:"icon",class:"wp:h-8 wp:w-8 wp:rounded-full",onClick:ue[0]||(ue[0]=pe=>x.value=!0)},{default:k(()=>[O(f(hS),{class:"wp:w-4 wp:h-4 wp:text-[var(--color-settings)]"})]),_:1})]),_:1}),O(f(Ys),{class:"wp:flex wp:items-center wp:gap-2"},{default:k(()=>[ue[9]||(ue[9]=Q("span",null,"Configuración",-1)),O(f(yn),null,{default:k(()=>[qe(Le(f(I))+",",1)]),_:1})]),_:1})]),_:1})]),_:1})])])),Q("div",nT,[($(!0),Ce(Ke,null,gr(c.channels,pe=>wo(($(),U(bC,{key:pe.id,"channel-id":pe.id,"allow-input":!N.value,"is-web-call":N.value,"is-online":f(R),contacts:s.contacts,user:s.extension,"mask-number":s.maskNumber,extensions:s.extensions},null,8,["channel-id","allow-input","is-web-call","is-online","contacts","user","mask-number","extensions"])),[[Bo,pe.id===c.activeChannelId]])),128))]),Q("div",{class:et(["webphone__keypad wp:transition-all wp:duration-300 wp:ease-in-out wp:overflow-hidden",c.isKeypadVisible&&c.callStatus==="idle"?"wp:max-h-[300px] wp:opacity-100 wp:pb-0":"wp:max-h-0 wp:opacity-0 wp:pb-0"]),"data-visible":c.isKeypadVisible&&c.callStatus==="idle"?"true":"false"},[O(zc)],10,sT),O(zS,{class:"webphone__actions",style:St(D.value?"pointer-events: none;":void 0),destination:N.value?s.to:void 0,"is-video":s.mode==="video","on-answer":s.onAnswer,"on-hangup":s.onHangup,"on-reject":s.onReject,onTransfer:ue[1]||(ue[1]=pe=>S.value=!0),onCompleteTransfer:he,onCancelTransfer:Ie},null,8,["style","destination","is-video","on-answer","on-hangup","on-reject"])]),D.value?($(),Ce("div",iT,[...ue[10]||(ue[10]=[Q("span",{class:"wp:text-sm wp:font-semibold wp:text-status-disconnected"},"Sin internet",-1)])])):Be("",!0),N.value?($(),Ce("div",oT,[...ue[11]||(ue[11]=[Q("div",{class:"webphone__footer-label wp:text-[10px] wp:text-primary"},"Powered By",-1),Q("div",{class:"webphone__footer-content wp:flex wp:items-center wp:gap-2"},[Q("a",{href:"https://www.nebula123.com",target:"_blank",class:"webphone__footer-link wp:text-[10px] wp:text-primary wp:hover:underline"}," www.nebula123.com ")],-1)])])):Be("",!0)],14,Jx),O(gx,{visible:x.value,"onUpdate:visible":ue[2]||(ue[2]=pe=>x.value=pe)},null,8,["visible"]),O(Hx,{visible:v.value,"onUpdate:visible":ue[3]||(ue[3]=pe=>v.value=pe),contacts:s.contacts,"mask-number":s.maskNumber,extensions:s.extensions,onCall:Ne},null,8,["visible","contacts","mask-number","extensions"]),O(Kx,{visible:S.value,"onUpdate:visible":ue[4]||(ue[4]=pe=>S.value=pe),contacts:s.contacts,"mask-number":s.maskNumber,extensions:s.extensions,onTransfer:le},null,8,["visible","contacts","mask-number","extensions"]),O(Gx,{ref_key:"documentPipRef",ref:G,active:W.value,"onUpdate:active":ue[5]||(ue[5]=pe=>W.value=pe),"auto-open-on-blur":ae.value,"is-connected":c.isConnected,"remote-number":E.value,"caller-name":_.value,"has-video":P.value??!1,"remote-stream":f(m),"local-stream":f(w),destination:N.value?s.to:void 0,"is-video":s.mode==="video","call-status":c.callStatus,"is-muted":c.isMuted,"is-held":c.isHeld,onTransfer:mt,onTransferRequest:le,onHangup:Re,onReject:st,onAnswer:De,onToggleMute:ue[6]||(ue[6]=pe=>f(d).toggleMute()),onToggleHold:ue[7]||(ue[7]=pe=>f(d).toggleHold())},null,8,["active","auto-open-on-blur","is-connected","remote-number","caller-name","has-video","remote-stream","local-stream","destination","is-video","call-status","is-muted","is-held"])],64))}}),lT=(e,t)=>{const r=e.__vccOpts||e;for(const[n,s]of t)r[n]=s;return r},cT=lT(aT,[["__scopeId","data-v-9b88a405"]]),uT=Hl({props:{host:String,wsUrl:String,extension:String,password:String,to:String,mode:{type:String,default:"call"},logo:String,contacts:{type:[String,Array],default:()=>[]},initialKeypadVisible:{type:[Boolean,String],default:!0},enablePictureInPicture:{type:Boolean,default:!0},maskNumber:{type:[Boolean,String],default:!1},earlyMedia:{type:[Boolean,String],default:!1},onAnswer:Function,onHangup:Function,onReject:Function},setup(e){return()=>{let t=e.contacts;if(typeof e.contacts=="string")try{t=JSON.parse(e.contacts)}catch{t=[]}return vr(cT,{...e,contacts:t,initialKeypadVisible:!(e.initialKeypadVisible===!1||e.initialKeypadVisible==="false"),maskNumber:e.maskNumber===!0||e.maskNumber==="true",earlyMedia:e.earlyMedia===!0||e.earlyMedia==="true"})}}},{shadowRoot:!1});customElements.define("web-phone",uT)})();