@tmsoft/webphone 3.0.25 → 5.0.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,31 +1,31 @@
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-de97971c],[data-v-de97971c]:before,[data-v-de97971c]: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-de97971c]::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-de97971c]:root,[data-v-de97971c]: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-de97971c]:root,[data-v-de97971c]: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-de97971c]:root,[data-v-de97971c]: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-de97971c],[data-v-de97971c]:after,[data-v-de97971c]:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}[data-v-de97971c]::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}[data-v-de97971c]::-webkit-file-upload-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}[data-v-de97971c]::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html[data-v-de97971c],[data-v-de97971c]: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-de97971c]{height:0;color:inherit;border-top-width:1px}abbr[data-v-de97971c]:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1[data-v-de97971c],h2[data-v-de97971c],h3[data-v-de97971c],h4[data-v-de97971c],h5[data-v-de97971c],h6[data-v-de97971c]{font-size:inherit;font-weight:inherit}a[data-v-de97971c]{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b[data-v-de97971c],strong[data-v-de97971c]{font-weight:bolder}code[data-v-de97971c],kbd[data-v-de97971c],samp[data-v-de97971c],pre[data-v-de97971c]{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-de97971c]{font-size:80%}sub[data-v-de97971c],sup[data-v-de97971c]{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub[data-v-de97971c]{bottom:-.25em}sup[data-v-de97971c]{top:-.5em}table[data-v-de97971c]{text-indent:0;border-color:inherit;border-collapse:collapse}[data-v-de97971c]:-moz-focusring{outline:auto}progress[data-v-de97971c]{vertical-align:baseline}summary[data-v-de97971c]{display:list-item}ol[data-v-de97971c],ul[data-v-de97971c],menu[data-v-de97971c]{list-style:none}img[data-v-de97971c],svg[data-v-de97971c],video[data-v-de97971c],canvas[data-v-de97971c],audio[data-v-de97971c],iframe[data-v-de97971c],embed[data-v-de97971c],object[data-v-de97971c]{vertical-align:middle;display:block}img[data-v-de97971c],video[data-v-de97971c]{max-width:100%;height:auto}button[data-v-de97971c],input[data-v-de97971c],select[data-v-de97971c],optgroup[data-v-de97971c],textarea[data-v-de97971c]{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-de97971c]::-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-de97971c]::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-de97971c]{font-weight:bolder}:where(select:is([multiple],[size])) optgroup[data-v-de97971c]{font-weight:bolder}:where(select:-webkit-any([multiple],[size])) optgroup option[data-v-de97971c]{padding-inline-start:20px}:where(select:is([multiple],[size])) optgroup option[data-v-de97971c]{padding-inline-start:20px}[data-v-de97971c]::-webkit-file-upload-button{margin-inline-end:4px}[data-v-de97971c]::file-selector-button{margin-inline-end:4px}[data-v-de97971c]::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){[data-v-de97971c]::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){[data-v-de97971c]::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea[data-v-de97971c]{resize:vertical}[data-v-de97971c]::-webkit-search-decoration{-webkit-appearance:none}[data-v-de97971c]::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}[data-v-de97971c]::-webkit-datetime-edit{display:inline-flex}[data-v-de97971c]::-webkit-datetime-edit-fields-wrapper{padding:0}[data-v-de97971c]::-webkit-datetime-edit{padding-block-start:0;padding-block-end:0}[data-v-de97971c]::-webkit-datetime-edit-year-field{padding-block-start:0;padding-block-end:0}[data-v-de97971c]::-webkit-datetime-edit-month-field{padding-block-start:0;padding-block-end:0}[data-v-de97971c]::-webkit-datetime-edit-day-field{padding-block-start:0;padding-block-end:0}[data-v-de97971c]::-webkit-datetime-edit-hour-field{padding-block-start:0;padding-block-end:0}[data-v-de97971c]::-webkit-datetime-edit-minute-field{padding-block-start:0;padding-block-end:0}[data-v-de97971c]::-webkit-datetime-edit-second-field{padding-block-start:0;padding-block-end:0}[data-v-de97971c]::-webkit-datetime-edit-millisecond-field{padding-block-start:0;padding-block-end:0}[data-v-de97971c]::-webkit-datetime-edit-meridiem-field{padding-block-start:0;padding-block-end:0}[data-v-de97971c]::-webkit-calendar-picker-indicator{line-height:1}[data-v-de97971c]:-moz-ui-invalid{box-shadow:none}button[data-v-de97971c]{-webkit-appearance:button;appearance:button}input[data-v-de97971c]:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;appearance:button}[data-v-de97971c]::-webkit-file-upload-button{-webkit-appearance:button;appearance:button}[data-v-de97971c]::file-selector-button{-webkit-appearance:button;appearance:button}[data-v-de97971c]::-webkit-inner-spin-button{height:auto}[data-v-de97971c]::-webkit-outer-spin-button{height:auto}[hidden][data-v-de97971c]:where(:not([hidden=until-found])){display:none!important}[data-v-de97971c]{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){[data-v-de97971c]{outline-color:color-mix(in oklab, var(--ring) 50%, transparent)}}body[data-v-de97971c]{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-\\[-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\\:gap-0{gap:calc(var(--wp-spacing) * 0)}.wp\\:gap-0\\.5{gap:calc(var(--wp-spacing) * .5)}.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\\/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-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-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-de97971c]{container:card-header/inline-size}.wp\\:pointer-events-none[data-v-de97971c]{pointer-events:none}.wp\\:sr-only[data-v-de97971c]{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-de97971c]{position:absolute}.wp\\:fixed[data-v-de97971c]{position:fixed}.wp\\:relative[data-v-de97971c]{position:relative}.wp\\:sticky[data-v-de97971c]{position:sticky}.wp\\:inset-0[data-v-de97971c]{inset:calc(var(--wp-spacing) * 0)}.wp\\:inset-x-0[data-v-de97971c]{inset-inline:calc(var(--wp-spacing) * 0)}.wp\\:top-0[data-v-de97971c]{top:calc(var(--wp-spacing) * 0)}.wp\\:top-1\\/2[data-v-de97971c]{top:50%}.wp\\:top-2\\.5[data-v-de97971c]{top:calc(var(--wp-spacing) * 2.5)}.wp\\:top-4[data-v-de97971c]{top:calc(var(--wp-spacing) * 4)}.wp\\:top-\\[50\\%\\][data-v-de97971c]{top:50%}.wp\\:top-full[data-v-de97971c]{top:100%}.wp\\:right-0[data-v-de97971c]{right:calc(var(--wp-spacing) * 0)}.wp\\:right-1[data-v-de97971c]{right:calc(var(--wp-spacing) * 1)}.wp\\:right-2[data-v-de97971c]{right:calc(var(--wp-spacing) * 2)}.wp\\:right-4[data-v-de97971c]{right:calc(var(--wp-spacing) * 4)}.wp\\:bottom-2[data-v-de97971c]{bottom:calc(var(--wp-spacing) * 2)}.wp\\:bottom-full[data-v-de97971c]{bottom:100%}.wp\\:left-0[data-v-de97971c]{left:calc(var(--wp-spacing) * 0)}.wp\\:left-0\\.5[data-v-de97971c]{left:calc(var(--wp-spacing) * .5)}.wp\\:left-2[data-v-de97971c]{left:calc(var(--wp-spacing) * 2)}.wp\\:left-\\[50\\%\\][data-v-de97971c]{left:50%}.wp\\:z-10[data-v-de97971c]{z-index:10}.wp\\:z-40[data-v-de97971c]{z-index:40}.wp\\:z-50[data-v-de97971c]{z-index:50}.wp\\:order-first[data-v-de97971c]{order:-9999}.wp\\:col-start-2[data-v-de97971c]{grid-column-start:2}.wp\\:row-span-2[data-v-de97971c]{grid-row:span 2/span 2}.wp\\:row-start-1[data-v-de97971c]{grid-row-start:1}.wp\\:container[data-v-de97971c]{width:100%}@media (min-width:40rem){.wp\\:container[data-v-de97971c]{max-width:40rem}}@media (min-width:48rem){.wp\\:container[data-v-de97971c]{max-width:48rem}}@media (min-width:64rem){.wp\\:container[data-v-de97971c]{max-width:64rem}}@media (min-width:80rem){.wp\\:container[data-v-de97971c]{max-width:80rem}}@media (min-width:96rem){.wp\\:container[data-v-de97971c]{max-width:96rem}}.wp\\:-mx-1[data-v-de97971c]{margin-inline:calc(var(--wp-spacing) * -1)}.wp\\:mx-2[data-v-de97971c]{margin-inline:calc(var(--wp-spacing) * 2)}.wp\\:mx-auto[data-v-de97971c]{margin-inline-start:auto;margin-inline-end:auto}.wp\\:my-1[data-v-de97971c]{margin-block:calc(var(--wp-spacing) * 1)}.wp\\:my-2[data-v-de97971c]{margin-block:calc(var(--wp-spacing) * 2)}.wp\\:my-8[data-v-de97971c]{margin-block:calc(var(--wp-spacing) * 8)}.wp\\:mt-1[data-v-de97971c]{margin-top:calc(var(--wp-spacing) * 1)}.wp\\:mr-4[data-v-de97971c]{margin-right:calc(var(--wp-spacing) * 4)}.wp\\:mr-auto[data-v-de97971c]{margin-right:auto}.wp\\:mb-1[data-v-de97971c]{margin-bottom:calc(var(--wp-spacing) * 1)}.wp\\:mb-2[data-v-de97971c]{margin-bottom:calc(var(--wp-spacing) * 2)}.wp\\:mb-4[data-v-de97971c]{margin-bottom:calc(var(--wp-spacing) * 4)}.wp\\:mb-5[data-v-de97971c]{margin-bottom:calc(var(--wp-spacing) * 5)}.wp\\:ml-auto[data-v-de97971c]{margin-left:auto}.wp\\:block[data-v-de97971c]{display:block}.wp\\:flex[data-v-de97971c]{display:flex}.wp\\:grid[data-v-de97971c]{display:grid}.wp\\:hidden[data-v-de97971c]{display:none}.wp\\:inline-flex[data-v-de97971c]{display:inline-flex}.wp\\:aspect-square[data-v-de97971c]{aspect-ratio:1}.wp\\:aspect-video[data-v-de97971c]{aspect-ratio:var(--wp-aspect-video)}.wp\\:size-2[data-v-de97971c]{width:calc(var(--wp-spacing) * 2);height:calc(var(--wp-spacing) * 2)}.wp\\:size-2\\.5[data-v-de97971c]{width:calc(var(--wp-spacing) * 2.5);height:calc(var(--wp-spacing) * 2.5)}.wp\\:size-3[data-v-de97971c]{width:calc(var(--wp-spacing) * 3);height:calc(var(--wp-spacing) * 3)}.wp\\:size-3\\.5[data-v-de97971c]{width:calc(var(--wp-spacing) * 3.5);height:calc(var(--wp-spacing) * 3.5)}.wp\\:size-4[data-v-de97971c]{width:calc(var(--wp-spacing) * 4);height:calc(var(--wp-spacing) * 4)}.wp\\:size-5[data-v-de97971c]{width:calc(var(--wp-spacing) * 5);height:calc(var(--wp-spacing) * 5)}.wp\\:size-6[data-v-de97971c]{width:calc(var(--wp-spacing) * 6);height:calc(var(--wp-spacing) * 6)}.wp\\:size-7[data-v-de97971c]{width:calc(var(--wp-spacing) * 7);height:calc(var(--wp-spacing) * 7)}.wp\\:size-8[data-v-de97971c]{width:calc(var(--wp-spacing) * 8);height:calc(var(--wp-spacing) * 8)}.wp\\:size-9[data-v-de97971c]{width:calc(var(--wp-spacing) * 9);height:calc(var(--wp-spacing) * 9)}.wp\\:size-10[data-v-de97971c]{width:calc(var(--wp-spacing) * 10);height:calc(var(--wp-spacing) * 10)}.wp\\:size-12[data-v-de97971c]{width:calc(var(--wp-spacing) * 12);height:calc(var(--wp-spacing) * 12)}.wp\\:size-full[data-v-de97971c]{width:100%;height:100%}.wp\\:h-2\\.5[data-v-de97971c]{height:calc(var(--wp-spacing) * 2.5)}.wp\\:h-3[data-v-de97971c]{height:calc(var(--wp-spacing) * 3)}.wp\\:h-4[data-v-de97971c]{height:calc(var(--wp-spacing) * 4)}.wp\\:h-5[data-v-de97971c]{height:calc(var(--wp-spacing) * 5)}.wp\\:h-6[data-v-de97971c]{height:calc(var(--wp-spacing) * 6)}.wp\\:h-7[data-v-de97971c]{height:calc(var(--wp-spacing) * 7)}.wp\\:h-8[data-v-de97971c]{height:calc(var(--wp-spacing) * 8)}.wp\\:h-9[data-v-de97971c]{height:calc(var(--wp-spacing) * 9)}.wp\\:h-10[data-v-de97971c]{height:calc(var(--wp-spacing) * 10)}.wp\\:h-12[data-v-de97971c]{height:calc(var(--wp-spacing) * 12)}.wp\\:h-14[data-v-de97971c]{height:calc(var(--wp-spacing) * 14)}.wp\\:h-16[data-v-de97971c]{height:calc(var(--wp-spacing) * 16)}.wp\\:h-64[data-v-de97971c]{height:calc(var(--wp-spacing) * 64)}.wp\\:h-80[data-v-de97971c]{height:calc(var(--wp-spacing) * 80)}.wp\\:h-\\[15px\\][data-v-de97971c]{height:15px}.wp\\:h-\\[16px\\][data-v-de97971c]{height:16px}.wp\\:h-\\[60vh\\][data-v-de97971c]{height:60vh}.wp\\:h-\\[var\\(--reka-select-trigger-height\\)\\][data-v-de97971c]{height:var(--reka-select-trigger-height)}.wp\\:h-full[data-v-de97971c]{height:100%}.wp\\:h-px[data-v-de97971c]{height:1px}.wp\\:max-h-\\(--reka-dropdown-menu-content-available-height\\)[data-v-de97971c]{max-height:var(--reka-dropdown-menu-content-available-height)}.wp\\:max-h-\\(--reka-select-content-available-height\\)[data-v-de97971c]{max-height:var(--reka-select-content-available-height)}.wp\\:max-h-0[data-v-de97971c]{max-height:calc(var(--wp-spacing) * 0)}.wp\\:max-h-40[data-v-de97971c]{max-height:calc(var(--wp-spacing) * 40)}.wp\\:max-h-60[data-v-de97971c]{max-height:calc(var(--wp-spacing) * 60)}.wp\\:max-h-\\[300px\\][data-v-de97971c]{max-height:300px}.wp\\:min-h-10[data-v-de97971c]{min-height:calc(var(--wp-spacing) * 10)}.wp\\:min-h-\\[calc\\(100vh-3\\.5rem\\)\\][data-v-de97971c]{min-height:calc(100vh - 3.5rem)}.wp\\:min-h-screen[data-v-de97971c]{min-height:100vh}.wp\\:\\!w-full[data-v-de97971c]{width:100%!important}.wp\\:w-2\\.5[data-v-de97971c]{width:calc(var(--wp-spacing) * 2.5)}.wp\\:w-3[data-v-de97971c]{width:calc(var(--wp-spacing) * 3)}.wp\\:w-4[data-v-de97971c]{width:calc(var(--wp-spacing) * 4)}.wp\\:w-5[data-v-de97971c]{width:calc(var(--wp-spacing) * 5)}.wp\\:w-6[data-v-de97971c]{width:calc(var(--wp-spacing) * 6)}.wp\\:w-8[data-v-de97971c]{width:calc(var(--wp-spacing) * 8)}.wp\\:w-9[data-v-de97971c]{width:calc(var(--wp-spacing) * 9)}.wp\\:w-12[data-v-de97971c]{width:calc(var(--wp-spacing) * 12)}.wp\\:w-16[data-v-de97971c]{width:calc(var(--wp-spacing) * 16)}.wp\\:w-24[data-v-de97971c]{width:calc(var(--wp-spacing) * 24)}.wp\\:w-48[data-v-de97971c]{width:calc(var(--wp-spacing) * 48)}.wp\\:w-72[data-v-de97971c]{width:calc(var(--wp-spacing) * 72)}.wp\\:w-\\[15px\\][data-v-de97971c]{width:15px}.wp\\:w-\\[16px\\][data-v-de97971c]{width:16px}.wp\\:w-\\[min\\(92vw\\,330px\\)\\][data-v-de97971c]{width:min(92vw,330px)}.wp\\:w-auto[data-v-de97971c]{width:auto}.wp\\:w-fit[data-v-de97971c]{width:-moz-fit-content;width:fit-content}.wp\\:w-full[data-v-de97971c]{width:100%}.wp\\:max-w-80[data-v-de97971c]{max-width:calc(var(--wp-spacing) * 80)}.wp\\:max-w-\\[330px\\][data-v-de97971c]{max-width:330px}.wp\\:max-w-\\[calc\\(100\\%-2rem\\)\\][data-v-de97971c]{max-width:calc(100% - 2rem)}.wp\\:max-w-lg[data-v-de97971c]{max-width:var(--wp-container-lg)}.wp\\:max-w-md[data-v-de97971c]{max-width:var(--wp-container-md)}.wp\\:max-w-screen-2xl[data-v-de97971c]{max-width:var(--wp-breakpoint-2xl)}.wp\\:min-w-0[data-v-de97971c]{min-width:calc(var(--wp-spacing) * 0)}.wp\\:min-w-5[data-v-de97971c]{min-width:calc(var(--wp-spacing) * 5)}.wp\\:min-w-8[data-v-de97971c]{min-width:calc(var(--wp-spacing) * 8)}.wp\\:min-w-9[data-v-de97971c]{min-width:calc(var(--wp-spacing) * 9)}.wp\\:min-w-10[data-v-de97971c]{min-width:calc(var(--wp-spacing) * 10)}.wp\\:min-w-\\[8rem\\][data-v-de97971c]{min-width:8rem}.wp\\:min-w-\\[var\\(--reka-select-trigger-width\\)\\][data-v-de97971c]{min-width:var(--reka-select-trigger-width)}.wp\\:flex-1[data-v-de97971c]{flex:1}.wp\\:shrink-0[data-v-de97971c]{flex-shrink:0}.wp\\:grow[data-v-de97971c]{flex-grow:1}.wp\\:origin-\\(--reka-dropdown-menu-content-transform-origin\\)[data-v-de97971c]{transform-origin:var(--reka-dropdown-menu-content-transform-origin)}.wp\\:origin-\\(--reka-popover-content-transform-origin\\)[data-v-de97971c]{transform-origin:var(--reka-popover-content-transform-origin)}.wp\\:translate-x-\\[-50\\%\\][data-v-de97971c]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:-translate-y-1\\/2[data-v-de97971c]{--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-de97971c]{--tw-translate-y:calc(var(--wp-spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:translate-y-\\[-50\\%\\][data-v-de97971c]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:translate-y-\\[calc\\(-50\\%_-_2px\\)\\][data-v-de97971c]{--tw-translate-y:calc(-50% - 2px);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:rotate-45[data-v-de97971c]{rotate:45deg}.wp\\:animate-in[data-v-de97971c]{animation:enter-de97971c 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-de97971c]{animation:var(--wp-animate-pulse)}.wp\\:cursor-default[data-v-de97971c]{cursor:default}.wp\\:cursor-move[data-v-de97971c]{cursor:move}.wp\\:cursor-pointer[data-v-de97971c]{cursor:pointer}.wp\\:touch-none[data-v-de97971c]{touch-action:none}.wp\\:scroll-my-1[data-v-de97971c]{scroll-margin-block:calc(var(--wp-spacing) * 1)}.wp\\:scroll-py-1[data-v-de97971c]{scroll-padding-block:calc(var(--wp-spacing) * 1)}.wp\\:auto-rows-min[data-v-de97971c]{grid-auto-rows:min-content}.wp\\:grid-cols-2[data-v-de97971c]{grid-template-columns:repeat(2,minmax(0,1fr))}.wp\\:grid-cols-3[data-v-de97971c]{grid-template-columns:repeat(3,minmax(0,1fr))}.wp\\:grid-rows-\\[auto_auto\\][data-v-de97971c]{grid-template-rows:auto auto}.wp\\:flex-col[data-v-de97971c]{flex-direction:column}.wp\\:flex-col-reverse[data-v-de97971c]{flex-direction:column-reverse}.wp\\:place-items-center[data-v-de97971c]{place-items:center}.wp\\:items-center[data-v-de97971c]{align-items:center}.wp\\:items-end[data-v-de97971c]{align-items:flex-end}.wp\\:items-start[data-v-de97971c]{align-items:flex-start}.wp\\:justify-between[data-v-de97971c]{justify-content:space-between}.wp\\:justify-center[data-v-de97971c]{justify-content:center}.wp\\:gap-0[data-v-de97971c]{gap:calc(var(--wp-spacing) * 0)}.wp\\:gap-0\\.5[data-v-de97971c]{gap:calc(var(--wp-spacing) * .5)}.wp\\:gap-1[data-v-de97971c]{gap:calc(var(--wp-spacing) * 1)}.wp\\:gap-1\\.5[data-v-de97971c]{gap:calc(var(--wp-spacing) * 1.5)}.wp\\:gap-2[data-v-de97971c]{gap:calc(var(--wp-spacing) * 2)}.wp\\:gap-3[data-v-de97971c]{gap:calc(var(--wp-spacing) * 3)}.wp\\:gap-4[data-v-de97971c]{gap:calc(var(--wp-spacing) * 4)}.wp\\:gap-6[data-v-de97971c]{gap:calc(var(--wp-spacing) * 6)}.wp\\:gap-\\[--spacing\\(var\\(--gap\\)\\)\\][data-v-de97971c]{gap:calc(var(--wp-spacing) * var(--gap))}:where(.wp\\:space-y-2[data-v-de97971c]>: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-de97971c]>: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-de97971c]>: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-de97971c]{column-gap:calc(var(--wp-spacing) * 6)}.wp\\:gap-y-3[data-v-de97971c]{row-gap:calc(var(--wp-spacing) * 3)}.wp\\:self-start[data-v-de97971c]{align-self:flex-start}.wp\\:justify-self-end[data-v-de97971c]{justify-self:flex-end}.wp\\:truncate[data-v-de97971c]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.wp\\:overflow-auto[data-v-de97971c]{overflow:auto}.wp\\:overflow-hidden[data-v-de97971c]{overflow:hidden}.wp\\:overflow-x-hidden[data-v-de97971c]{overflow-x:hidden}.wp\\:overflow-y-auto[data-v-de97971c]{overflow-y:auto}.wp\\:rounded[data-v-de97971c]{border-radius:.25rem}.wp\\:rounded-2xl[data-v-de97971c]{border-radius:var(--wp-radius-2xl)}.wp\\:rounded-\\[2px\\][data-v-de97971c]{border-radius:2px}.wp\\:rounded-\\[inherit\\][data-v-de97971c]{border-radius:inherit}.wp\\:rounded-full[data-v-de97971c]{border-radius:3.40282e38px}.wp\\:rounded-lg[data-v-de97971c]{border-radius:var(--radius)}.wp\\:rounded-md[data-v-de97971c]{border-radius:calc(var(--radius) - 2px)}.wp\\:rounded-sm[data-v-de97971c]{border-radius:calc(var(--radius) - 4px)}.wp\\:rounded-xl[data-v-de97971c]{border-radius:calc(var(--radius) + 4px)}.wp\\:rounded-xs[data-v-de97971c]{border-radius:var(--wp-radius-xs)}.wp\\:border[data-v-de97971c]{border-style:var(--tw-border-style);border-width:1px}.wp\\:border-0[data-v-de97971c]{border-style:var(--tw-border-style);border-width:0}.wp\\:border-t[data-v-de97971c]{border-top-style:var(--tw-border-style);border-top-width:1px}.wp\\:border-b[data-v-de97971c]{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.wp\\:border-l[data-v-de97971c]{border-left-style:var(--tw-border-style);border-left-width:1px}.wp\\:border-blue-500[data-v-de97971c]{border-color:var(--wp-color-blue-500)}.wp\\:border-border[data-v-de97971c]{border-color:var(--border)}.wp\\:border-destructive[data-v-de97971c]{border-color:var(--destructive)}.wp\\:border-input[data-v-de97971c]{border-color:var(--input)}.wp\\:border-primary[data-v-de97971c]{border-color:var(--primary)}.wp\\:border-white\\/20[data-v-de97971c]{border-color:var(--wp-color-white)}@supports (color:color-mix(in lab, red, red)){.wp\\:border-white\\/20[data-v-de97971c]{border-color:color-mix(in oklab, var(--wp-color-white) 20%, transparent)}}.wp\\:border-t-transparent[data-v-de97971c]{border-top-color:#0000}.wp\\:border-l-transparent[data-v-de97971c]{border-left-color:#0000}.wp\\:bg-\\[var\\(--color-red\\)\\]\\/12[data-v-de97971c]{background-color:var(--color-red)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-\\[var\\(--color-red\\)\\]\\/12[data-v-de97971c]{background-color:color-mix(in oklab, var(--color-red) 12%, transparent)}}.wp\\:bg-\\[var\\(--p-primary-color\\)\\]\\/12[data-v-de97971c]{background-color:var(--p-primary-color)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-\\[var\\(--p-primary-color\\)\\]\\/12[data-v-de97971c]{background-color:color-mix(in oklab, var(--p-primary-color) 12%, transparent)}}.wp\\:bg-amber-100[data-v-de97971c]{background-color:var(--wp-color-amber-100)}.wp\\:bg-background[data-v-de97971c],.wp\\:bg-background\\/95[data-v-de97971c]{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-background\\/95[data-v-de97971c]{background-color:color-mix(in oklab, var(--background) 95%, transparent)}}.wp\\:bg-black[data-v-de97971c],.wp\\:bg-black\\/80[data-v-de97971c]{background-color:var(--wp-color-black)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-black\\/80[data-v-de97971c]{background-color:color-mix(in oklab, var(--wp-color-black) 80%, transparent)}}.wp\\:bg-blue-100[data-v-de97971c]{background-color:var(--wp-color-blue-100)}.wp\\:bg-border[data-v-de97971c]{background-color:var(--border)}.wp\\:bg-card[data-v-de97971c]{background-color:var(--card)}.wp\\:bg-destructive[data-v-de97971c]{background-color:var(--destructive)}.wp\\:bg-emerald-100[data-v-de97971c]{background-color:var(--wp-color-emerald-100)}.wp\\:bg-foreground[data-v-de97971c]{background-color:var(--foreground)}.wp\\:bg-muted[data-v-de97971c]{background-color:var(--muted)}.wp\\:bg-neutral-100[data-v-de97971c]{background-color:var(--wp-color-neutral-100)}.wp\\:bg-neutral-800[data-v-de97971c]{background-color:var(--wp-color-neutral-800)}.wp\\:bg-popover[data-v-de97971c]{background-color:var(--popover)}.wp\\:bg-primary[data-v-de97971c],.wp\\:bg-primary\\/10[data-v-de97971c]{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-primary\\/10[data-v-de97971c]{background-color:color-mix(in oklab, var(--primary) 10%, transparent)}}.wp\\:bg-purple-100[data-v-de97971c]{background-color:var(--wp-color-purple-100)}.wp\\:bg-secondary[data-v-de97971c]{background-color:var(--secondary)}.wp\\:bg-status-available[data-v-de97971c]{background-color:var(--status-available)}.wp\\:bg-status-hold\\/12[data-v-de97971c]{background-color:var(--status-hold)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-status-hold\\/12[data-v-de97971c]{background-color:color-mix(in oklab, var(--status-hold) 12%, transparent)}}.wp\\:bg-transparent[data-v-de97971c]{background-color:#0000}.wp\\:bg-white[data-v-de97971c],.wp\\:bg-white\\/70[data-v-de97971c]{background-color:var(--wp-color-white)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-white\\/70[data-v-de97971c]{background-color:color-mix(in oklab, var(--wp-color-white) 70%, transparent)}}.wp\\:bg-gradient-to-r[data-v-de97971c]{--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-de97971c]{--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-de97971c]{--tw-gradient-from:color-mix(in oklab, var(--p-primary-color) 80%, transparent)}}.wp\\:from-\\[color\\:var\\(--p-primary-color\\)\\]\\/80[data-v-de97971c]{--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-de97971c]{--tw-gradient-from:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:from-destructive\\/60[data-v-de97971c]{--tw-gradient-from:color-mix(in oklab, var(--destructive) 60%, transparent)}}.wp\\:from-destructive\\/60[data-v-de97971c]{--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-de97971c]{--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-de97971c]{--tw-gradient-to:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:to-destructive\\/90[data-v-de97971c]{--tw-gradient-to:color-mix(in oklab, var(--destructive) 90%, transparent)}}.wp\\:to-destructive\\/90[data-v-de97971c]{--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-de97971c]{fill:currentColor}.wp\\:fill-foreground[data-v-de97971c]{fill:var(--foreground)}.wp\\:object-contain[data-v-de97971c]{object-fit:contain}.wp\\:object-cover[data-v-de97971c]{object-fit:cover}.wp\\:p-0[data-v-de97971c]{padding:calc(var(--wp-spacing) * 0)}.wp\\:p-0\\.5[data-v-de97971c]{padding:calc(var(--wp-spacing) * .5)}.wp\\:p-1[data-v-de97971c]{padding:calc(var(--wp-spacing) * 1)}.wp\\:p-2[data-v-de97971c]{padding:calc(var(--wp-spacing) * 2)}.wp\\:p-3[data-v-de97971c]{padding:calc(var(--wp-spacing) * 3)}.wp\\:p-4[data-v-de97971c]{padding:calc(var(--wp-spacing) * 4)}.wp\\:p-6[data-v-de97971c]{padding:calc(var(--wp-spacing) * 6)}.wp\\:p-px[data-v-de97971c]{padding:1px}.wp\\:px-1[data-v-de97971c]{padding-inline:calc(var(--wp-spacing) * 1)}.wp\\:px-1\\.5[data-v-de97971c]{padding-inline:calc(var(--wp-spacing) * 1.5)}.wp\\:px-2[data-v-de97971c]{padding-inline:calc(var(--wp-spacing) * 2)}.wp\\:px-2\\.5[data-v-de97971c]{padding-inline:calc(var(--wp-spacing) * 2.5)}.wp\\:px-3[data-v-de97971c]{padding-inline:calc(var(--wp-spacing) * 3)}.wp\\:px-4[data-v-de97971c]{padding-inline:calc(var(--wp-spacing) * 4)}.wp\\:px-6[data-v-de97971c]{padding-inline:calc(var(--wp-spacing) * 6)}.wp\\:px-10[data-v-de97971c]{padding-inline:calc(var(--wp-spacing) * 10)}.wp\\:px-14[data-v-de97971c]{padding-inline:calc(var(--wp-spacing) * 14)}.wp\\:py-1[data-v-de97971c]{padding-block:calc(var(--wp-spacing) * 1)}.wp\\:py-1\\.5[data-v-de97971c]{padding-block:calc(var(--wp-spacing) * 1.5)}.wp\\:py-2[data-v-de97971c]{padding-block:calc(var(--wp-spacing) * 2)}.wp\\:py-3[data-v-de97971c]{padding-block:calc(var(--wp-spacing) * 3)}.wp\\:py-4[data-v-de97971c]{padding-block:calc(var(--wp-spacing) * 4)}.wp\\:py-6[data-v-de97971c]{padding-block:calc(var(--wp-spacing) * 6)}.wp\\:py-8[data-v-de97971c]{padding-block:calc(var(--wp-spacing) * 8)}.wp\\:pt-0[data-v-de97971c]{padding-top:calc(var(--wp-spacing) * 0)}.wp\\:pr-2[data-v-de97971c]{padding-right:calc(var(--wp-spacing) * 2)}.wp\\:pr-4[data-v-de97971c]{padding-right:calc(var(--wp-spacing) * 4)}.wp\\:pr-8[data-v-de97971c]{padding-right:calc(var(--wp-spacing) * 8)}.wp\\:pb-0[data-v-de97971c]{padding-bottom:calc(var(--wp-spacing) * 0)}.wp\\:pb-4[data-v-de97971c]{padding-bottom:calc(var(--wp-spacing) * 4)}.wp\\:pl-2[data-v-de97971c]{padding-left:calc(var(--wp-spacing) * 2)}.wp\\:pl-8[data-v-de97971c]{padding-left:calc(var(--wp-spacing) * 8)}.wp\\:text-center[data-v-de97971c]{text-align:center}.wp\\:text-left[data-v-de97971c]{text-align:left}.wp\\:font-mono[data-v-de97971c]{font-family:var(--wp-font-mono)}.wp\\:font-sans[data-v-de97971c]{font-family:Montserrat,sans-serif}.wp\\:text-3xl[data-v-de97971c]{font-size:var(--wp-text-3xl);line-height:var(--tw-leading,var(--wp-text-3xl--line-height))}.wp\\:text-base[data-v-de97971c]{font-size:var(--wp-text-base);line-height:var(--tw-leading,var(--wp-text-base--line-height))}.wp\\:text-lg[data-v-de97971c]{font-size:var(--wp-text-lg);line-height:var(--tw-leading,var(--wp-text-lg--line-height))}.wp\\:text-sm[data-v-de97971c]{font-size:var(--wp-text-sm);line-height:var(--tw-leading,var(--wp-text-sm--line-height))}.wp\\:text-xs[data-v-de97971c]{font-size:var(--wp-text-xs);line-height:var(--tw-leading,var(--wp-text-xs--line-height))}.wp\\:text-\\[10px\\][data-v-de97971c]{font-size:10px}.wp\\:text-\\[11px\\][data-v-de97971c]{font-size:11px}.wp\\:leading-none[data-v-de97971c]{--tw-leading:1;line-height:1}.wp\\:font-bold[data-v-de97971c]{--tw-font-weight:var(--wp-font-weight-bold);font-weight:var(--wp-font-weight-bold)}.wp\\:font-light[data-v-de97971c]{--tw-font-weight:var(--wp-font-weight-light);font-weight:var(--wp-font-weight-light)}.wp\\:font-medium[data-v-de97971c]{--tw-font-weight:var(--wp-font-weight-medium);font-weight:var(--wp-font-weight-medium)}.wp\\:font-semibold[data-v-de97971c]{--tw-font-weight:var(--wp-font-weight-semibold);font-weight:var(--wp-font-weight-semibold)}.wp\\:tracking-wider[data-v-de97971c]{--tw-tracking:var(--wp-tracking-wider);letter-spacing:var(--wp-tracking-wider)}.wp\\:tracking-widest[data-v-de97971c]{--tw-tracking:var(--wp-tracking-widest);letter-spacing:var(--wp-tracking-widest)}.wp\\:text-balance[data-v-de97971c]{text-wrap:balance}.wp\\:whitespace-nowrap[data-v-de97971c]{white-space:nowrap}.wp\\:text-\\[var\\(--color-avaible\\)\\][data-v-de97971c]{color:var(--color-avaible)}.wp\\:text-\\[var\\(--color-primary\\)\\][data-v-de97971c]{color:var(--color-primary)}.wp\\:text-\\[var\\(--color-red\\)\\][data-v-de97971c]{color:var(--color-red)}.wp\\:text-\\[var\\(--color-settings\\)\\][data-v-de97971c]{color:var(--color-settings)}.wp\\:text-\\[var\\(--p-primary-color\\)\\][data-v-de97971c]{color:var(--p-primary-color)}.wp\\:text-\\[var\\(--primary\\)\\][data-v-de97971c]{color:var(--primary)}.wp\\:text-amber-500[data-v-de97971c]{color:var(--wp-color-amber-500)}.wp\\:text-amber-600[data-v-de97971c]{color:var(--wp-color-amber-600)}.wp\\:text-background[data-v-de97971c]{color:var(--background)}.wp\\:text-black[data-v-de97971c]{color:var(--wp-color-black)}.wp\\:text-blue-500[data-v-de97971c]{color:var(--wp-color-blue-500)}.wp\\:text-blue-600[data-v-de97971c]{color:var(--wp-color-blue-600)}.wp\\:text-card-foreground[data-v-de97971c]{color:var(--card-foreground)}.wp\\:text-destructive[data-v-de97971c]{color:var(--destructive)}.wp\\:text-emerald-600[data-v-de97971c]{color:var(--wp-color-emerald-600)}.wp\\:text-foreground[data-v-de97971c]{color:var(--foreground)}.wp\\:text-green-500[data-v-de97971c]{color:var(--wp-color-green-500)}.wp\\:text-muted-foreground[data-v-de97971c]{color:var(--muted-foreground)}.wp\\:text-neutral-400[data-v-de97971c]{color:var(--wp-color-neutral-400)}.wp\\:text-neutral-500[data-v-de97971c]{color:var(--wp-color-neutral-500)}.wp\\:text-neutral-600[data-v-de97971c]{color:var(--wp-color-neutral-600)}.wp\\:text-neutral-800[data-v-de97971c]{color:var(--wp-color-neutral-800)}.wp\\:text-neutral-900[data-v-de97971c]{color:var(--wp-color-neutral-900)}.wp\\:text-popover-foreground[data-v-de97971c]{color:var(--popover-foreground)}.wp\\:text-primary[data-v-de97971c]{color:var(--primary)}.wp\\:text-primary-foreground[data-v-de97971c]{color:var(--primary-foreground)}.wp\\:text-purple-600[data-v-de97971c]{color:var(--wp-color-purple-600)}.wp\\:text-red-500[data-v-de97971c]{color:var(--wp-color-red-500)}.wp\\:text-secondary-foreground[data-v-de97971c]{color:var(--secondary-foreground)}.wp\\:text-status-available[data-v-de97971c]{color:var(--status-available)}.wp\\:text-status-disconnected[data-v-de97971c]{color:var(--status-disconnected)}.wp\\:text-status-hold[data-v-de97971c]{color:var(--status-hold)}.wp\\:text-status-incall[data-v-de97971c]{color:var(--status-incall)}.wp\\:text-status-incoming[data-v-de97971c]{color:var(--status-incoming)}.wp\\:text-white[data-v-de97971c]{color:var(--wp-color-white)}.wp\\:capitalize[data-v-de97971c]{text-transform:capitalize}.wp\\:underline-offset-4[data-v-de97971c]{text-underline-offset:4px}.wp\\:opacity-0[data-v-de97971c]{opacity:0}.wp\\:opacity-50[data-v-de97971c]{opacity:.5}.wp\\:opacity-70[data-v-de97971c]{opacity:.7}.wp\\:opacity-100[data-v-de97971c]{opacity:1}.wp\\:shadow-lg[data-v-de97971c]{--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-de97971c]{--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-de97971c]{--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-de97971c]{--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-de97971c]{--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-de97971c]{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.wp\\:ring-ring\\/50[data-v-de97971c]{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.wp\\:ring-offset-background[data-v-de97971c]{--tw-ring-offset-color:var(--background)}.wp\\:outline-hidden[data-v-de97971c]{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.wp\\:outline-hidden[data-v-de97971c]{outline-offset:2px;outline:2px solid #0000}}.wp\\:backdrop-blur[data-v-de97971c]{--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-de97971c]{--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-de97971c]{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-de97971c]{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-de97971c]{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-de97971c]{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-de97971c]{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-de97971c]{--tw-duration:.15s;transition-duration:.15s}.wp\\:duration-200[data-v-de97971c]{--tw-duration:.2s;transition-duration:.2s}.wp\\:duration-300[data-v-de97971c]{--tw-duration:.3s;transition-duration:.3s}.wp\\:ease-in-out[data-v-de97971c]{--tw-ease:var(--wp-ease-in-out);transition-timing-function:var(--wp-ease-in-out)}.wp\\:fade-in-0[data-v-de97971c]{--tw-enter-opacity:0}.wp\\:outline-none[data-v-de97971c]{--tw-outline-style:none;outline-style:none}.wp\\:select-none[data-v-de97971c]{-webkit-user-select:none;user-select:none}.wp\\:select-text[data-v-de97971c]{-webkit-user-select:text;user-select:text}.wp\\:zoom-in-95[data-v-de97971c]{--tw-enter-scale:.95}.wp\\:group-data-\\[disabled\\=true\\]\\:pointer-events-none[data-v-de97971c]:is(:where(.wp\\:group)[data-disabled=true] *){pointer-events:none}.wp\\:group-data-\\[disabled\\=true\\]\\:opacity-50[data-v-de97971c]:is(:where(.wp\\:group)[data-disabled=true] *){opacity:.5}.wp\\:peer-disabled\\:cursor-not-allowed[data-v-de97971c]:is(:where(.wp\\:peer):disabled~*){cursor:not-allowed}.wp\\:peer-disabled\\:opacity-50[data-v-de97971c]:is(:where(.wp\\:peer):disabled~*){opacity:.5}.wp\\:selection\\:bg-primary[data-v-de97971c] ::selection,.wp\\:selection\\:bg-primary[data-v-de97971c]::selection{background-color:var(--primary)}.wp\\:selection\\:text-primary-foreground[data-v-de97971c] ::selection,.wp\\:selection\\:text-primary-foreground[data-v-de97971c]::selection{color:var(--primary-foreground)}.wp\\:file\\:inline-flex[data-v-de97971c]::-webkit-file-upload-button{display:inline-flex}.wp\\:file\\:inline-flex[data-v-de97971c]::file-selector-button{display:inline-flex}.wp\\:file\\:h-7[data-v-de97971c]::-webkit-file-upload-button{height:calc(var(--wp-spacing) * 7)}.wp\\:file\\:h-7[data-v-de97971c]::file-selector-button{height:calc(var(--wp-spacing) * 7)}.wp\\:file\\:border-0[data-v-de97971c]::-webkit-file-upload-button{border-style:var(--tw-border-style);border-width:0}.wp\\:file\\:border-0[data-v-de97971c]::file-selector-button{border-style:var(--tw-border-style);border-width:0}.wp\\:file\\:bg-transparent[data-v-de97971c]::-webkit-file-upload-button{background-color:#0000}.wp\\:file\\:bg-transparent[data-v-de97971c]::file-selector-button{background-color:#0000}.wp\\:file\\:text-sm[data-v-de97971c]::-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-de97971c]::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-de97971c]::-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-de97971c]::file-selector-button{--tw-font-weight:var(--wp-font-weight-medium);font-weight:var(--wp-font-weight-medium)}.wp\\:file\\:text-foreground[data-v-de97971c]::-webkit-file-upload-button{color:var(--foreground)}.wp\\:file\\:text-foreground[data-v-de97971c]::file-selector-button{color:var(--foreground)}.wp\\:placeholder\\:text-muted-foreground[data-v-de97971c]::placeholder{color:var(--muted-foreground)}.wp\\:last\\:border-b-0[data-v-de97971c]: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-de97971c]: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-de97971c]:hover{background-color:color-mix(in oklab, var(--p-primary-color) 8%, transparent)}}.wp\\:hover\\:bg-\\[var\\(--p-primary-color\\)\\]\\/10[data-v-de97971c]: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-de97971c]:hover{background-color:color-mix(in oklab, var(--p-primary-color) 10%, transparent)}}.wp\\:hover\\:bg-\\[var\\(--p-primary-color\\)\\]\\/20[data-v-de97971c]: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-de97971c]:hover{background-color:color-mix(in oklab, var(--p-primary-color) 20%, transparent)}}.wp\\:hover\\:bg-accent[data-v-de97971c]:hover,.wp\\:hover\\:bg-accent\\/50[data-v-de97971c]:hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-accent\\/50[data-v-de97971c]:hover{background-color:color-mix(in oklab, var(--accent) 50%, transparent)}}.wp\\:hover\\:bg-destructive\\/90[data-v-de97971c]:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-destructive\\/90[data-v-de97971c]:hover{background-color:color-mix(in oklab, var(--destructive) 90%, transparent)}}.wp\\:hover\\:bg-muted[data-v-de97971c]:hover{background-color:var(--muted)}.wp\\:hover\\:bg-neutral-100[data-v-de97971c]:hover{background-color:var(--wp-color-neutral-100)}.wp\\:hover\\:bg-neutral-200[data-v-de97971c]:hover{background-color:var(--wp-color-neutral-200)}.wp\\:hover\\:bg-primary\\/90[data-v-de97971c]:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-primary\\/90[data-v-de97971c]:hover{background-color:color-mix(in oklab, var(--primary) 90%, transparent)}}.wp\\:hover\\:bg-secondary[data-v-de97971c]:hover,.wp\\:hover\\:bg-secondary\\/80[data-v-de97971c]:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-secondary\\/80[data-v-de97971c]:hover{background-color:color-mix(in oklab, var(--secondary) 80%, transparent)}}.wp\\:hover\\:bg-status-available\\/90[data-v-de97971c]:hover{background-color:var(--status-available)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-status-available\\/90[data-v-de97971c]:hover{background-color:color-mix(in oklab, var(--status-available) 90%, transparent)}}.wp\\:hover\\:bg-transparent[data-v-de97971c]:hover{background-color:#0000}.wp\\:hover\\:from-\\[color\\:var\\(--p-primary-color\\)\\]\\/75[data-v-de97971c]: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-de97971c]: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-de97971c]: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-de97971c]:hover{--tw-gradient-from:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:from-destructive\\/70[data-v-de97971c]:hover{--tw-gradient-from:color-mix(in oklab, var(--destructive) 70%, transparent)}}.wp\\:hover\\:from-destructive\\/70[data-v-de97971c]: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-de97971c]: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-de97971c]:hover{--tw-gradient-to:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:to-destructive\\/95[data-v-de97971c]:hover{--tw-gradient-to:color-mix(in oklab, var(--destructive) 95%, transparent)}}.wp\\:hover\\:to-destructive\\/95[data-v-de97971c]: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-de97971c]:hover{color:var(--accent-foreground)}.wp\\:hover\\:text-destructive[data-v-de97971c]:hover{color:var(--destructive)}.wp\\:hover\\:text-muted-foreground[data-v-de97971c]:hover{color:var(--muted-foreground)}.wp\\:hover\\:text-primary[data-v-de97971c]:hover{color:var(--primary)}.wp\\:hover\\:text-status-available\\/80[data-v-de97971c]:hover{color:var(--status-available)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-available\\/80[data-v-de97971c]:hover{color:color-mix(in oklab, var(--status-available) 80%, transparent)}}.wp\\:hover\\:text-status-disconnected[data-v-de97971c]:hover,.wp\\:hover\\:text-status-disconnected\\/80[data-v-de97971c]:hover{color:var(--status-disconnected)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-disconnected\\/80[data-v-de97971c]:hover{color:color-mix(in oklab, var(--status-disconnected) 80%, transparent)}}.wp\\:hover\\:text-status-hold\\/80[data-v-de97971c]:hover{color:var(--status-hold)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-hold\\/80[data-v-de97971c]:hover{color:color-mix(in oklab, var(--status-hold) 80%, transparent)}}.wp\\:hover\\:text-status-incall\\/80[data-v-de97971c]:hover{color:var(--status-incall)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-incall\\/80[data-v-de97971c]:hover{color:color-mix(in oklab, var(--status-incall) 80%, transparent)}}.wp\\:hover\\:text-status-incoming\\/80[data-v-de97971c]:hover{color:var(--status-incoming)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-incoming\\/80[data-v-de97971c]:hover{color:color-mix(in oklab, var(--status-incoming) 80%, transparent)}}.wp\\:hover\\:underline[data-v-de97971c]:hover{text-decoration-line:underline}.wp\\:hover\\:opacity-80[data-v-de97971c]:hover{opacity:.8}.wp\\:hover\\:opacity-100[data-v-de97971c]:hover{opacity:1}.wp\\:hover\\:ring-4[data-v-de97971c]: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-de97971c]:focus{z-index:10}.wp\\:focus\\:bg-accent[data-v-de97971c]:focus{background-color:var(--accent)}.wp\\:focus\\:text-accent-foreground[data-v-de97971c]:focus{color:var(--accent-foreground)}.wp\\:focus\\:ring-2[data-v-de97971c]: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-de97971c]:focus{--tw-ring-color:var(--ring)}.wp\\:focus\\:ring-offset-2[data-v-de97971c]: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-de97971c]:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.wp\\:focus\\:outline-hidden[data-v-de97971c]:focus{outline-offset:2px;outline:2px solid #0000}}.wp\\:focus-visible\\:z-10[data-v-de97971c]:focus-visible{z-index:10}.wp\\:focus-visible\\:border-ring[data-v-de97971c]:focus-visible{border-color:var(--ring)}.wp\\:focus-visible\\:ring-2[data-v-de97971c]: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-de97971c]: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-de97971c]: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-de97971c]:focus-visible{--tw-ring-color:var(--p-primary-color)}.wp\\:focus-visible\\:ring-destructive\\/20[data-v-de97971c]:focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:focus-visible\\:ring-destructive\\/20[data-v-de97971c]:focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.wp\\:focus-visible\\:ring-ring\\/50[data-v-de97971c]:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.wp\\:focus-visible\\:ring-ring\\/50[data-v-de97971c]:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.wp\\:focus-visible\\:ring-offset-2[data-v-de97971c]: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-de97971c]:focus-visible{--tw-ring-offset-color:var(--wp-color-white)}.wp\\:focus-visible\\:outline-hidden[data-v-de97971c]:focus-visible{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.wp\\:focus-visible\\:outline-hidden[data-v-de97971c]:focus-visible{outline-offset:2px;outline:2px solid #0000}}.wp\\:focus-visible\\:outline-1[data-v-de97971c]:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.wp\\:active\\:scale-95[data-v-de97971c]: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-de97971c]:disabled{pointer-events:none}.wp\\:disabled\\:cursor-not-allowed[data-v-de97971c]:disabled{cursor:not-allowed}.wp\\:disabled\\:opacity-50[data-v-de97971c]:disabled{opacity:.5}.wp\\:has-data-\\[slot\\=card-action\\]\\:grid-cols-\\[1fr_auto\\][data-v-de97971c]:has([data-slot=card-action]){grid-template-columns:1fr auto}.wp\\:has-\\[\\>svg\\]\\:px-2\\.5[data-v-de97971c]:has(>svg){padding-inline:calc(var(--wp-spacing) * 2.5)}.wp\\:has-\\[\\>svg\\]\\:px-3[data-v-de97971c]:has(>svg){padding-inline:calc(var(--wp-spacing) * 3)}.wp\\:has-\\[\\>svg\\]\\:px-4[data-v-de97971c]:has(>svg){padding-inline:calc(var(--wp-spacing) * 4)}.wp\\:aria-invalid\\:border-destructive[aria-invalid=true][data-v-de97971c]{border-color:var(--destructive)}.wp\\:aria-invalid\\:ring-destructive\\/20[aria-invalid=true][data-v-de97971c]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:aria-invalid\\:ring-destructive\\/20[aria-invalid=true][data-v-de97971c]{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.wp\\:data-\\[disabled\\]\\:pointer-events-none[data-disabled][data-v-de97971c]{pointer-events:none}.wp\\:data-\\[disabled\\]\\:opacity-50[data-disabled][data-v-de97971c]{opacity:.5}.wp\\:data-\\[highlighted\\]\\:bg-accent[data-highlighted][data-v-de97971c]{background-color:var(--accent)}.wp\\:data-\\[highlighted\\]\\:text-accent-foreground[data-highlighted][data-v-de97971c]{color:var(--accent-foreground)}.wp\\:data-\\[inset\\]\\:pl-8[data-inset][data-v-de97971c]{padding-left:calc(var(--wp-spacing) * 8)}.wp\\:data-\\[orientation\\=horizontal\\]\\:h-1\\.5[data-orientation=horizontal][data-v-de97971c]{height:calc(var(--wp-spacing) * 1.5)}.wp\\:data-\\[orientation\\=horizontal\\]\\:h-full[data-orientation=horizontal][data-v-de97971c]{height:100%}.wp\\:data-\\[orientation\\=horizontal\\]\\:h-px[data-orientation=horizontal][data-v-de97971c]{height:1px}.wp\\:data-\\[orientation\\=horizontal\\]\\:w-full[data-orientation=horizontal][data-v-de97971c]{width:100%}.wp\\:data-\\[orientation\\=vertical\\]\\:h-full[data-orientation=vertical][data-v-de97971c]{height:100%}.wp\\:data-\\[orientation\\=vertical\\]\\:min-h-44[data-orientation=vertical][data-v-de97971c]{min-height:calc(var(--wp-spacing) * 44)}.wp\\:data-\\[orientation\\=vertical\\]\\:w-1\\.5[data-orientation=vertical][data-v-de97971c]{width:calc(var(--wp-spacing) * 1.5)}.wp\\:data-\\[orientation\\=vertical\\]\\:w-auto[data-orientation=vertical][data-v-de97971c]{width:auto}.wp\\:data-\\[orientation\\=vertical\\]\\:w-full[data-orientation=vertical][data-v-de97971c]{width:100%}.wp\\:data-\\[orientation\\=vertical\\]\\:w-px[data-orientation=vertical][data-v-de97971c]{width:1px}.wp\\:data-\\[orientation\\=vertical\\]\\:flex-col[data-orientation=vertical][data-v-de97971c]{flex-direction:column}.wp\\:data-\\[placeholder\\]\\:text-muted-foreground[data-placeholder][data-v-de97971c]{color:var(--muted-foreground)}.wp\\:data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom][data-v-de97971c]{--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-de97971c]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.wp\\:data-\\[side\\=left\\]\\:-translate-x-1[data-side=left][data-v-de97971c]{--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-de97971c]{--tw-enter-translate-x:calc(2*var(--spacing))}.wp\\:data-\\[side\\=right\\]\\:translate-x-1[data-side=right][data-v-de97971c]{--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-de97971c]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.wp\\:data-\\[side\\=top\\]\\:-translate-y-1[data-side=top][data-v-de97971c]{--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-de97971c]{--tw-enter-translate-y:calc(2*var(--spacing))}.wp\\:data-\\[size\\=default\\]\\:h-9[data-size=default][data-v-de97971c]{height:calc(var(--wp-spacing) * 9)}.wp\\:data-\\[size\\=sm\\]\\:h-8[data-size=sm][data-v-de97971c]{height:calc(var(--wp-spacing) * 8)}:is(.wp\\:\\*\\:data-\\[slot\\=select-value\\]\\:line-clamp-1>*)[data-slot=select-value][data-v-de97971c]{-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-de97971c]{display:flex}:is(.wp\\:\\*\\:data-\\[slot\\=select-value\\]\\:items-center>*)[data-slot=select-value][data-v-de97971c]{align-items:center}:is(.wp\\:\\*\\:data-\\[slot\\=select-value\\]\\:gap-2>*)[data-slot=select-value][data-v-de97971c]{gap:calc(var(--wp-spacing) * 2)}.wp\\:data-\\[spacing\\=0\\]\\:rounded-none[data-spacing="0"][data-v-de97971c]{border-radius:0}.wp\\:data-\\[spacing\\=0\\]\\:shadow-none[data-spacing="0"][data-v-de97971c]{--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-de97971c]: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-de97971c]: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-de97971c]{animation:accordion-up-de97971c 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-de97971c]{animation:exit-de97971c 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-de97971c]{--tw-exit-opacity:0}.wp\\:data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed][data-v-de97971c]{--tw-exit-scale:.95}.wp\\:data-\\[state\\=on\\]\\:bg-accent[data-state=on][data-v-de97971c]{background-color:var(--accent)}.wp\\:data-\\[state\\=on\\]\\:text-accent-foreground[data-state=on][data-v-de97971c]{color:var(--accent-foreground)}.wp\\:data-\\[state\\=open\\]\\:animate-accordion-down[data-state=open][data-v-de97971c]{animation:accordion-down-de97971c 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-de97971c]{animation:enter-de97971c 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-de97971c]{background-color:var(--accent)}.wp\\:data-\\[state\\=open\\]\\:text-accent-foreground[data-state=open][data-v-de97971c]{color:var(--accent-foreground)}.wp\\:data-\\[state\\=open\\]\\:text-muted-foreground[data-state=open][data-v-de97971c]{color:var(--muted-foreground)}.wp\\:data-\\[state\\=open\\]\\:fade-in-0[data-state=open][data-v-de97971c]{--tw-enter-opacity:0}.wp\\:data-\\[state\\=open\\]\\:zoom-in-95[data-state=open][data-v-de97971c]{--tw-enter-scale:.95}.wp\\:data-\\[variant\\=destructive\\]\\:text-destructive[data-variant=destructive][data-v-de97971c]{color:var(--destructive)}.wp\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/10[data-variant=destructive][data-v-de97971c]: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-de97971c]:focus{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.wp\\:data-\\[variant\\=destructive\\]\\:focus\\:text-destructive[data-variant=destructive][data-v-de97971c]:focus{color:var(--destructive)}.wp\\:data-\\[variant\\=outline\\]\\:border-\\[color\\:var\\(--color-primary-500\\)\\][data-variant=outline][data-v-de97971c]{border-color:var(--color-primary-500)}.wp\\:data-\\[variant\\=outline\\]\\:focus-visible\\:ring-\\[color\\:var\\(--color-primary-500\\)\\][data-variant=outline][data-v-de97971c]: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-de97971c]{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-de97971c]{border-color:var(--color-primary-500)}.wp\\:data-\\[spacing\\=default\\]\\:data-\\[variant\\=outline\\]\\:shadow-xs[data-spacing=default][data-variant=outline][data-v-de97971c]{--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-de97971c]{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.wp\\:supports-backdrop-filter\\:bg-background\\/60[data-v-de97971c]{background-color:color-mix(in oklab, var(--background) 60%, transparent)}}}@media (min-width:40rem){.wp\\:sm\\:block[data-v-de97971c]{display:block}.wp\\:sm\\:inline[data-v-de97971c]{display:inline}.wp\\:sm\\:inline-block[data-v-de97971c]{display:inline-block}.wp\\:sm\\:max-w-lg[data-v-de97971c]{max-width:var(--wp-container-lg)}.wp\\:sm\\:max-w-md[data-v-de97971c]{max-width:var(--wp-container-md)}.wp\\:sm\\:max-w-sm[data-v-de97971c]{max-width:var(--wp-container-sm)}.wp\\:sm\\:flex-row[data-v-de97971c]{flex-direction:row}.wp\\:sm\\:justify-end[data-v-de97971c]{justify-content:flex-end}.wp\\:sm\\:gap-0[data-v-de97971c]{gap:calc(var(--wp-spacing) * 0)}.wp\\:sm\\:rounded-lg[data-v-de97971c]{border-radius:var(--radius)}.wp\\:sm\\:text-left[data-v-de97971c]{text-align:left}}@media (min-width:48rem){.wp\\:md\\:w-full[data-v-de97971c]{width:100%}.wp\\:md\\:text-sm[data-v-de97971c]{font-size:var(--wp-text-sm);line-height:var(--tw-leading,var(--wp-text-sm--line-height))}}.wp\\:dark\\:border-input[data-v-de97971c]:where(.dark,.dark *){border-color:var(--input)}.wp\\:dark\\:bg-amber-900\\/30[data-v-de97971c]: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-de97971c]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-amber-900) 30%, transparent)}}.wp\\:dark\\:bg-blue-900\\/30[data-v-de97971c]: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-de97971c]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-blue-900) 30%, transparent)}}.wp\\:dark\\:bg-destructive\\/60[data-v-de97971c]:where(.dark,.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-destructive\\/60[data-v-de97971c]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--destructive) 60%, transparent)}}.wp\\:dark\\:bg-emerald-900\\/30[data-v-de97971c]: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-de97971c]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-emerald-900) 30%, transparent)}}.wp\\:dark\\:bg-input\\/30[data-v-de97971c]:where(.dark,.dark *){background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-input\\/30[data-v-de97971c]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--input) 30%, transparent)}}.wp\\:dark\\:bg-neutral-700[data-v-de97971c]:where(.dark,.dark *){background-color:var(--wp-color-neutral-700)}.wp\\:dark\\:bg-neutral-800[data-v-de97971c]:where(.dark,.dark *){background-color:var(--wp-color-neutral-800)}.wp\\:dark\\:bg-neutral-900[data-v-de97971c]:where(.dark,.dark *){background-color:var(--wp-color-neutral-900)}.wp\\:dark\\:bg-neutral-900\\/70[data-v-de97971c]: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-de97971c]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-neutral-900) 70%, transparent)}}.wp\\:dark\\:bg-purple-900\\/30[data-v-de97971c]: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-de97971c]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-purple-900) 30%, transparent)}}.wp\\:dark\\:text-amber-400[data-v-de97971c]:where(.dark,.dark *){color:var(--wp-color-amber-400)}.wp\\:dark\\:text-blue-400[data-v-de97971c]:where(.dark,.dark *){color:var(--wp-color-blue-400)}.wp\\:dark\\:text-emerald-400[data-v-de97971c]:where(.dark,.dark *){color:var(--wp-color-emerald-400)}.wp\\:dark\\:text-neutral-100[data-v-de97971c]:where(.dark,.dark *){color:var(--wp-color-neutral-100)}.wp\\:dark\\:text-neutral-400[data-v-de97971c]:where(.dark,.dark *){color:var(--wp-color-neutral-400)}.wp\\:dark\\:text-neutral-500[data-v-de97971c]:where(.dark,.dark *){color:var(--wp-color-neutral-500)}.wp\\:dark\\:text-purple-400[data-v-de97971c]:where(.dark,.dark *){color:var(--wp-color-purple-400)}.wp\\:dark\\:text-white[data-v-de97971c]:where(.dark,.dark *){color:var(--wp-color-white)}@media (hover:hover){.wp\\:dark\\:hover\\:bg-accent\\/50[data-v-de97971c]:where(.dark,.dark *):hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:hover\\:bg-accent\\/50[data-v-de97971c]:where(.dark,.dark *):hover{background-color:color-mix(in oklab, var(--accent) 50%, transparent)}}.wp\\:dark\\:hover\\:bg-input\\/50[data-v-de97971c]:where(.dark,.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:hover\\:bg-input\\/50[data-v-de97971c]:where(.dark,.dark *):hover{background-color:color-mix(in oklab, var(--input) 50%, transparent)}}.wp\\:dark\\:hover\\:bg-neutral-600[data-v-de97971c]:where(.dark,.dark *):hover{background-color:var(--wp-color-neutral-600)}.wp\\:dark\\:hover\\:bg-neutral-800\\/80[data-v-de97971c]: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-de97971c]: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-de97971c]:where(.dark,.dark *):hover{background-color:var(--wp-color-neutral-900)}.wp\\:dark\\:hover\\:text-neutral-100[data-v-de97971c]:where(.dark,.dark *):hover{color:var(--wp-color-neutral-100)}.wp\\:dark\\:hover\\:text-status-disconnected[data-v-de97971c]:where(.dark,.dark *):hover{color:var(--status-disconnected)}}.wp\\:dark\\:focus-visible\\:ring-destructive\\/40[data-v-de97971c]: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-de97971c]: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-de97971c]: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-de97971c]{--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-de97971c]{--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-de97971c]: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-de97971c]:focus{background-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.wp\\:\\[\\&_button\\]\\:cursor-pointer button[data-v-de97971c]{cursor:pointer}.wp\\:\\[\\&_svg\\]\\:pointer-events-none svg[data-v-de97971c]{pointer-events:none}.wp\\:\\[\\&_svg\\]\\:shrink-0 svg[data-v-de97971c]{flex-shrink:0}.wp\\:\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4 svg[data-v-de97971c]: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-de97971c]: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-de97971c]: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-de97971c]:not([class*="'text-'"]){color:var(--muted-foreground)}.wp\\:\\[\\.border-b\\]\\:pb-6.border-b[data-v-de97971c]{padding-bottom:calc(var(--wp-spacing) * 6)}.wp\\:\\[\\.border-t\\]\\:pt-6.border-t[data-v-de97971c]{padding-top:calc(var(--wp-spacing) * 6)}:is(.wp\\:\\*\\*\\:\\[\\[role\\=button\\]\\]\\:cursor-pointer *)[role=button][data-v-de97971c]{cursor:pointer}:-webkit-any(.wp\\:\\*\\:\\[span\\]\\:last\\:flex[data-v-de97971c]>*):-webkit-any(span):last-child{display:flex}:is(.wp\\:\\*\\:\\[span\\]\\:last\\:flex[data-v-de97971c]>*):is(span):last-child{display:flex}:-webkit-any(.wp\\:\\*\\:\\[span\\]\\:last\\:items-center[data-v-de97971c]>*):-webkit-any(span):last-child{align-items:center}:is(.wp\\:\\*\\:\\[span\\]\\:last\\:items-center[data-v-de97971c]>*):is(span):last-child{align-items:center}:-webkit-any(.wp\\:\\*\\:\\[span\\]\\:last\\:gap-2[data-v-de97971c]>*):-webkit-any(span):last-child{gap:calc(var(--wp-spacing) * 2)}:is(.wp\\:\\*\\:\\[span\\]\\:last\\:gap-2[data-v-de97971c]>*):is(span):last-child{gap:calc(var(--wp-spacing) * 2)}:-webkit-any(.wp\\:data-\\[variant\\=destructive\\]\\:\\*\\:\\[svg\\]\\:\\!text-destructive[data-variant=destructive][data-v-de97971c]>*):-webkit-any(svg){color:var(--destructive)!important}:is(.wp\\:data-\\[variant\\=destructive\\]\\:\\*\\:\\[svg\\]\\:\\!text-destructive[data-variant=destructive][data-v-de97971c]>*):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-de97971c]: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-de97971c]{rotate:180deg}[data-slot=tooltip-content] .wp\\:\\[\\[data-slot\\=tooltip-content\\]_\\&\\]\\:bg-background\\/20[data-v-de97971c]{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-de97971c]{background-color:color-mix(in oklab, var(--background) 20%, transparent)}}[data-slot=tooltip-content] .wp\\:\\[\\[data-slot\\=tooltip-content\\]_\\&\\]\\:text-background[data-v-de97971c]{color:var(--background)}[data-slot=tooltip-content] .wp\\:dark\\:\\[\\[data-slot\\=tooltip-content\\]_\\&\\]\\:bg-background\\/10[data-v-de97971c]: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-de97971c]: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-de97971c]{clip-path:none!important}[data-v-de97971c]: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-de97971c]: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-de97971c]: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-de97971c]{--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-de97971c]{--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-de97971c]{--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-de97971c]{font-family:Ibrand,sans-serif}.montserrat[data-v-de97971c]{font-family:Montserrat}.quicksand[data-v-de97971c]{font-family:Quicksand}.manrope[data-v-de97971c]{font-family:Manrope}@keyframes pulse-de97971c{50%{opacity:.5}}@keyframes enter-de97971c{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-de97971c{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-de97971c{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-de97971c{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 Ic=Object.defineProperty,ig=(e,t)=>{let r={};for(var n in e)Ic(r,n,{get:e[n],enumerable:!0});return t&&Ic(r,Symbol.toStringTag,{value:"Module"}),r};function Ps(e){const t=Object.create(null);for(const r of e.split(","))t[r]=1;return r=>r in t}var qe={},es=[],er=()=>{},Rc=()=>!1,Ds=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),oa=e=>e.startsWith("onUpdate:"),Ke=Object.assign,aa=(e,t)=>{const r=e.indexOf(t);r>-1&&e.splice(r,1)},og=Object.prototype.hasOwnProperty,ze=(e,t)=>og.call(e,t),we=Array.isArray,ts=e=>rs(e)==="[object Map]",Pn=e=>rs(e)==="[object Set]",$c=e=>rs(e)==="[object Date]",ag=e=>rs(e)==="[object RegExp]",Ee=e=>typeof e=="function",et=e=>typeof e=="string",fr=e=>typeof e=="symbol",je=e=>e!==null&&typeof e=="object",la=e=>(je(e)||Ee(e))&&Ee(e.then)&&Ee(e.catch),Pc=Object.prototype.toString,rs=e=>Pc.call(e),lg=e=>rs(e).slice(8,-1),Ei=e=>rs(e)==="[object Object]",Ai=e=>et(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Dn=Ps(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ki=e=>{const t=Object.create(null);return(r=>t[r]||(t[r]=e(r)))},cg=/-\w/g,ft=ki(e=>e.replace(cg,t=>t.slice(1).toUpperCase())),ug=/\B([A-Z])/g,Bt=ki(e=>e.replace(ug,"-$1").toLowerCase()),Os=ki(e=>e.charAt(0).toUpperCase()+e.slice(1)),ns=ki(e=>e?`on${Os(e)}`:""),Dt=(e,t)=>!Object.is(e,t),ss=(e,...t)=>{for(let r=0;r<e.length;r++)e[r](...t)},Dc=(e,t,r,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:r})},Ii=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Ri=e=>{const t=et(e)?Number(e):NaN;return isNaN(t)?e:t},Oc,$i=()=>Oc||(Oc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),dg=Ps("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 mt(e){if(we(e)){const t={};for(let r=0;r<e.length;r++){const n=e[r],s=et(n)?gg(n):mt(n);if(s)for(const i in s)t[i]=s[i]}return t}else if(et(e)||je(e))return e}var fg=/;(?![^(]*\))/g,pg=/:([^]+)/,hg=/\/\*[^]*?\*\//g;function gg(e){const t={};return e.replace(hg,"").split(fg).forEach(r=>{if(r){const n=r.split(pg);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Xe(e){let t="";if(et(e))t=e;else if(we(e))for(let r=0;r<e.length;r++){const n=Xe(e[r]);n&&(t+=n+" ")}else if(je(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&&!et(t)&&(e.class=Xe(t)),r&&(e.style=mt(r)),e}var Hc="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",vg=Ps(Hc),nx=Ps(Hc+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function Mc(e){return!!e||e===""}function mg(e,t){if(e.length!==t.length)return!1;let r=!0;for(let n=0;r&&n<e.length;n++)r=Dr(e[n],t[n]);return r}function Dr(e,t){if(e===t)return!0;let r=$c(e),n=$c(t);if(r||n)return r&&n?e.getTime()===t.getTime():!1;if(r=fr(e),n=fr(t),r||n)return e===t;if(r=we(e),n=we(t),r||n)return r&&n?mg(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||!Dr(e[s],t[s]))return!1}}return String(e)===String(t)}function Pi(e,t){return e.findIndex(r=>Dr(r,t))}var Nc=e=>!!(e&&e.__v_isRef===!0),He=e=>et(e)?e:e==null?"":we(e)||je(e)&&(e.toString===Pc||!Ee(e.toString))?Nc(e)?He(e.value):JSON.stringify(e,qc,2):String(e),qc=(e,t)=>Nc(t)?qc(e,t.value):ts(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((r,[n,s],i)=>(r[ca(n,i)+" =>"]=s,r),{})}:Pn(t)?{[`Set(${t.size})`]:[...t.values()].map(r=>ca(r))}:fr(t)?ca(t):je(t)&&!we(t)&&!Ei(t)?String(t):t,ca=(e,t="")=>{var r;return fr(e)?`Symbol(${(r=e.description)!=null?r:t})`:e};function wg(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:(typeof e!="number"||Number.isFinite(e),String(e))}var Et,ua=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=Et,!e&&Et&&(this.index=(Et.scopes||(Et.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=Et;try{return Et=this,e()}finally{Et=t}}}on(){++this._on===1&&(this.prevScope=Et,Et=this)}off(){this._on>0&&--this._on===0&&(Et=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 da(e){return new ua(e)}function Di(){return Et}function fa(e,t=!1){Et&&Et.cleanups.push(e)}var tt,pa=new WeakSet,Hs=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,Et&&Et.active&&Et.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,pa.has(this)&&(pa.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Lc(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,zc(this),Fc(this);const e=tt,t=hr;tt=this,hr=!0;try{return this.fn()}finally{Vc(this),tt=e,hr=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)ma(e);this.deps=this.depsTail=void 0,zc(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?pa.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){va(this)&&this.run()}get dirty(){return va(this)}},Bc=0,Ms,Ns;function Lc(e,t=!1){if(e.flags|=8,t){e.next=Ns,Ns=e;return}e.next=Ms,Ms=e}function ha(){Bc++}function ga(){if(--Bc>0)return;if(Ns){let t=Ns;for(Ns=void 0;t;){const r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;for(;Ms;){let t=Ms;for(Ms=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 Fc(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Vc(e){let t,r=e.depsTail,n=r;for(;n;){const s=n.prevDep;n.version===-1?(n===r&&(r=s),ma(n),yg(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&&(jc(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function jc(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===qs)||(e.globalVersion=qs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!va(e))))return;e.flags|=2;const t=e.dep,r=tt,n=hr;tt=e,hr=!0;try{Fc(e);const s=e.fn(e._value);(t.version===0||Dt(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{tt=r,hr=n,Vc(e),e.flags&=-3}}function ma(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)ma(i,!0)}!t&&!--r.sc&&r.map&&r.map.delete(r.key)}function yg(e){const{prevDep:t,nextDep:r}=e;t&&(t.nextDep=r,e.prevDep=void 0),r&&(r.prevDep=t,e.nextDep=void 0)}function bg(e,t){e.effect instanceof Hs&&(e=e.effect.fn);const r=new Hs(e);t&&Ke(r,t);try{r.run()}catch(s){throw r.stop(),s}const n=r.run.bind(r);return n.effect=r,n}function _g(e){e.effect.stop()}var hr=!0,Uc=[];function Or(){Uc.push(hr),hr=!1}function Hr(){const e=Uc.pop();hr=e===void 0?!0:e}function zc(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const r=tt;tt=void 0;try{t()}finally{tt=r}}}var qs=0,Sg=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}},Oi=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(!tt||!hr||tt===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==tt)t=this.activeLink=new Sg(tt,this),tt.deps?(t.prevDep=tt.depsTail,tt.depsTail.nextDep=t,tt.depsTail=t):tt.deps=tt.depsTail=t,Kc(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=tt.depsTail,t.nextDep=void 0,tt.depsTail.nextDep=t,tt.depsTail=t,tt.deps===t&&(tt.deps=r)}return t}trigger(e){this.version++,qs++,this.notify(e)}notify(e){ha();try{for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{ga()}}};function Kc(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)Kc(n)}const r=e.dep.subs;r!==e&&(e.prevSub=r,r&&(r.nextSub=e)),e.dep.subs=e}}var Hi=new WeakMap,On=Symbol(""),wa=Symbol(""),Bs=Symbol("");function At(e,t,r){if(hr&&tt){let n=Hi.get(e);n||Hi.set(e,n=new Map);let s=n.get(r);s||(n.set(r,s=new Oi),s.map=n,s.key=r),s.track()}}function Mr(e,t,r,n,s,i){const o=Hi.get(e);if(!o){qs++;return}const a=l=>{l&&l.trigger()};if(ha(),t==="clear")o.forEach(a);else{const l=we(e),u=l&&Ai(r);if(l&&r==="length"){const c=Number(n);o.forEach((d,p)=>{(p==="length"||p===Bs||!fr(p)&&p>=c)&&a(d)})}else switch((r!==void 0||o.has(void 0))&&a(o.get(r)),u&&a(o.get(Bs)),t){case"add":l?u&&a(o.get("length")):(a(o.get(On)),ts(e)&&a(o.get(wa)));break;case"delete":l||(a(o.get(On)),ts(e)&&a(o.get(wa)));break;case"set":ts(e)&&a(o.get(On));break}}ga()}function Cg(e,t){const r=Hi.get(e);return r&&r.get(t)}function is(e){const t=Be(e);return t===e?t:(At(t,"iterate",Bs),Lt(e)?t:t.map(gr))}function Mi(e){return At(e=Be(e),"iterate",Bs),e}function on(e,t){return Cr(e)?os(Lr(e)?gr(t):t):gr(t)}var xg={__proto__:null,[Symbol.iterator](){return ya(this,Symbol.iterator,e=>on(this,e))},concat(...e){return is(this).concat(...e.map(t=>we(t)?is(t):t))},entries(){return ya(this,"entries",e=>(e[1]=on(this,e[1]),e))},every(e,t){return Nr(this,"every",e,t,void 0,arguments)},filter(e,t){return Nr(this,"filter",e,t,r=>r.map(n=>on(this,n)),arguments)},find(e,t){return Nr(this,"find",e,t,r=>on(this,r),arguments)},findIndex(e,t){return Nr(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Nr(this,"findLast",e,t,r=>on(this,r),arguments)},findLastIndex(e,t){return Nr(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Nr(this,"forEach",e,t,void 0,arguments)},includes(...e){return ba(this,"includes",e)},indexOf(...e){return ba(this,"indexOf",e)},join(e){return is(this).join(e)},lastIndexOf(...e){return ba(this,"lastIndexOf",e)},map(e,t){return Nr(this,"map",e,t,void 0,arguments)},pop(){return Ls(this,"pop")},push(...e){return Ls(this,"push",e)},reduce(e,...t){return Wc(this,"reduce",e,t)},reduceRight(e,...t){return Wc(this,"reduceRight",e,t)},shift(){return Ls(this,"shift")},some(e,t){return Nr(this,"some",e,t,void 0,arguments)},splice(...e){return Ls(this,"splice",e)},toReversed(){return is(this).toReversed()},toSorted(e){return is(this).toSorted(e)},toSpliced(...e){return is(this).toSpliced(...e)},unshift(...e){return Ls(this,"unshift",e)},values(){return ya(this,"values",e=>on(this,e))}};function ya(e,t,r){const n=Mi(e),s=n[t]();return n!==e&&!Lt(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=r(i.value)),i}),s}var Tg=Array.prototype;function Nr(e,t,r,n,s,i){const o=Mi(e),a=o!==e&&!Lt(e),l=o[t];if(l!==Tg[t]){const d=l.apply(e,i);return a?gr(d):d}let u=r;o!==e&&(a?u=function(d,p){return r.call(this,on(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 Wc(e,t,r,n){const s=Mi(e);let i=r;return s!==e&&(Lt(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,on(e,a),l,e)}),s[t](i,...n)}function ba(e,t,r){const n=Be(e);At(n,"iterate",Bs);const s=n[t](...r);return(s===-1||s===!1)&&Fs(r[0])?(r[0]=Be(r[0]),n[t](...r)):s}function Ls(e,t,r=[]){Or(),ha();const n=Be(e)[t].apply(e,r);return ga(),Hr(),n}var Eg=Ps("__proto__,__v_isRef,__isVue"),Gc=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(fr));function Ag(e){fr(e)||(e=String(e));const t=Be(this);return At(t,"has",e),t.hasOwnProperty(e)}var Jc=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?tu:eu:s?Qc:Xc).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r)?e:void 0;const i=we(e);if(!n){let a;if(i&&(a=xg[t]))return a;if(t==="hasOwnProperty")return Ag}const o=Reflect.get(e,t,Je(e)?e:r);if((fr(t)?Gc.has(t):Eg(t))||(n||At(e,"get",t),s))return o;if(Je(o)){const a=i&&Ai(t)?o:o.value;return n&&je(a)?kt(a):a}return je(o)?n?kt(o):qr(o):o}},Yc=class extends Jc{constructor(e=!1){super(!1,e)}set(e,t,r,n){let s=e[t];const i=we(e)&&Ai(t);if(!this._isShallow){const l=Cr(s);if(!Lt(r)&&!Cr(r)&&(s=Be(s),r=Be(r)),!i&&Je(s)&&!Je(r))return l||(s.value=r),!0}const o=i?Number(t)<e.length:ze(e,t),a=Reflect.set(e,t,r,Je(e)?e:n);return e===Be(n)&&(o?Dt(r,s)&&Mr(e,"set",t,r,s):Mr(e,"add",t,r)),a}deleteProperty(e,t){const r=ze(e,t),n=e[t],s=Reflect.deleteProperty(e,t);return s&&r&&Mr(e,"delete",t,void 0,n),s}has(e,t){const r=Reflect.has(e,t);return(!fr(t)||!Gc.has(t))&&At(e,"has",t),r}ownKeys(e){return At(e,"iterate",we(e)?"length":On),Reflect.ownKeys(e)}},Zc=class extends Jc{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},kg=new Yc,Ig=new Zc,Rg=new Yc(!0),$g=new Zc(!0),_a=e=>e,Ni=e=>Reflect.getPrototypeOf(e);function Pg(e,t,r){return function(...n){const s=this.__v_raw,i=Be(s),o=ts(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,u=s[e](...n),c=r?_a:t?os:gr;return!t&&At(i,"iterate",l?wa:On),Ke(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 qi(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Dg(e,t){const r={get(n){const s=this.__v_raw,i=Be(s),o=Be(n);e||(Dt(n,o)&&At(i,"get",n),At(i,"get",o));const{has:a}=Ni(i),l=t?_a:e?os:gr;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&&At(Be(n),"iterate",On),n.size},has(n){const s=this.__v_raw,i=Be(s),o=Be(n);return e||(Dt(n,o)&&At(i,"has",n),At(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=Be(o),l=t?_a:e?os:gr;return!e&&At(a,"iterate",On),o.forEach((u,c)=>n.call(s,l(u),l(c),i))}};return Ke(r,e?{add:qi("add"),set:qi("set"),delete:qi("delete"),clear:qi("clear")}:{add(n){!t&&!Lt(n)&&!Cr(n)&&(n=Be(n));const s=Be(this);return Ni(s).has.call(s,n)||(s.add(n),Mr(s,"add",n,n)),this},set(n,s){!t&&!Lt(s)&&!Cr(s)&&(s=Be(s));const i=Be(this),{has:o,get:a}=Ni(i);let l=o.call(i,n);l||(n=Be(n),l=o.call(i,n));const u=a.call(i,n);return i.set(n,s),l?Dt(s,u)&&Mr(i,"set",n,s,u):Mr(i,"add",n,s),this},delete(n){const s=Be(this),{has:i,get:o}=Ni(s);let a=i.call(s,n);a||(n=Be(n),a=i.call(s,n));const l=o?o.call(s,n):void 0,u=s.delete(n);return a&&Mr(s,"delete",n,void 0,l),u},clear(){const n=Be(this),s=n.size!==0,i=void 0,o=n.clear();return s&&Mr(n,"clear",void 0,void 0,i),o}}),["keys","values","entries",Symbol.iterator].forEach(n=>{r[n]=Pg(n,e,t)}),r}function Bi(e,t){const r=Dg(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 Og={get:Bi(!1,!1)},Hg={get:Bi(!1,!0)},Mg={get:Bi(!0,!1)},Ng={get:Bi(!0,!0)},Xc=new WeakMap,Qc=new WeakMap,eu=new WeakMap,tu=new WeakMap;function qg(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Bg(e){return e.__v_skip||!Object.isExtensible(e)?0:qg(lg(e))}function qr(e){return Cr(e)?e:Li(e,!1,kg,Og,Xc)}function ru(e){return Li(e,!1,Rg,Hg,Qc)}function kt(e){return Li(e,!0,Ig,Mg,eu)}function Br(e){return Li(e,!0,$g,Ng,tu)}function Li(e,t,r,n,s){if(!je(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=Bg(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 Lr(e){return Cr(e)?Lr(e.__v_raw):!!(e&&e.__v_isReactive)}function Cr(e){return!!(e&&e.__v_isReadonly)}function Lt(e){return!!(e&&e.__v_isShallow)}function Fs(e){return e?!!e.__v_raw:!1}function Be(e){const t=e&&e.__v_raw;return t?Be(t):e}function Sa(e){return!ze(e,"__v_skip")&&Object.isExtensible(e)&&Dc(e,"__v_skip",!0),e}var gr=e=>je(e)?qr(e):e,os=e=>je(e)?kt(e):e;function Je(e){return e?e.__v_isRef===!0:!1}function U(e){return nu(e,!1)}function nt(e){return nu(e,!0)}function nu(e,t){return Je(e)?e:new Lg(e,t)}var Lg=class{constructor(e,t){this.dep=new Oi,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:Be(e),this._value=t?e:gr(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,r=this.__v_isShallow||Lt(e)||Cr(e);e=r?e:Be(e),Dt(e,t)&&(this._rawValue=e,this._value=r?e:gr(e),this.dep.trigger())}};function su(e){e.dep&&e.dep.trigger()}function f(e){return Je(e)?e.value:e}function xe(e){return Ee(e)?e():f(e)}var Fg={get:(e,t,r)=>t==="__v_raw"?e:f(Reflect.get(e,t,r)),set:(e,t,r,n)=>{const s=e[t];return Je(s)&&!Je(r)?(s.value=r,!0):Reflect.set(e,t,r,n)}};function Ca(e){return Lr(e)?e:new Proxy(e,Fg)}var Vg=class{constructor(e){this.__v_isRef=!0,this._value=void 0;const t=this.dep=new Oi,{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 Vs(e){return new Vg(e)}function It(e){const t=we(e)?new Array(e.length):{};for(const r in e)t[r]=iu(e,r);return t}var jg=class{constructor(e,t,r){this._object=e,this._key=t,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0,this._raw=Be(e);let n=!0,s=e;if(!we(e)||!Ai(String(t)))do n=!Fs(s)||Lt(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&&Je(this._raw[this._key])){const t=this._object[this._key];if(Je(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return Cg(this._raw,this._key)}},Ug=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 xa(e,t,r){return Je(e)?e:Ee(e)?new Ug(e):je(e)&&arguments.length>1?iu(e,t,r):U(e)}function iu(e,t,r){return new jg(e,t,r)}var zg=class{constructor(e,t,r){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Oi(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=qs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&tt!==this)return Lc(this,!0),!0}get value(){const e=this.dep.track();return jc(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function Kg(e,t,r=!1){let n,s;return Ee(e)?n=e:(n=e.get,s=e.set),new zg(n,s,r)}var Wg={GET:"get",HAS:"has",ITERATE:"iterate"},Gg={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},Fi={},Vi=new WeakMap,an=void 0;function Jg(){return an}function ou(e,t=!1,r=an){if(r){let n=Vi.get(r);n||Vi.set(r,n=[]),n.push(e)}}function Yg(e,t,r=qe){const{immediate:n,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=r,u=_=>s?_:Lt(_)||s===!1||s===0?Fr(_,1):Fr(_);let c,d,p,h,m=!1,y=!1;if(Je(e)?(d=()=>e.value,m=Lt(e)):Lr(e)?(d=()=>u(e),m=!0):we(e)?(y=!0,m=e.some(_=>Lr(_)||Lt(_)),d=()=>e.map(_=>{if(Je(_))return _.value;if(Lr(_))return u(_);if(Ee(_))return l?l(_,2):_()})):Ee(e)?t?d=l?()=>l(e,2):e:d=()=>{if(p){Or();try{p()}finally{Hr()}}const _=an;an=c;try{return l?l(e,3,[h]):e(h)}finally{an=_}}:d=er,t&&s){const _=d,C=s===!0?1/0:s;d=()=>Fr(_(),C)}const T=Di(),v=()=>{c.stop(),T&&T.active&&aa(T.effects,c)};if(i&&t){const _=t;t=(...C)=>{_(...C),v()}}let x=y?new Array(e.length).fill(Fi):Fi;const b=_=>{if(!(!(c.flags&1)||!c.dirty&&!_))if(t){const C=c.run();if(s||m||(y?C.some((k,O)=>Dt(k,x[O])):Dt(C,x))){p&&p();const k=an;an=c;try{const O=[C,x===Fi?void 0:y&&x[0]===Fi?[]:x,h];x=C,l?l(t,3,O):t(...O)}finally{an=k}}}else c.run()};return a&&a(b),c=new Hs(d),c.scheduler=o?()=>o(b,!1):b,h=_=>ou(_,!1,c),p=c.onStop=()=>{const _=Vi.get(c);if(_){if(l)l(_,4);else for(const C of _)C();Vi.delete(c)}},t?n?b(!0):x=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 Fr(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--,Je(e))Fr(e.value,t,r);else if(we(e))for(let n=0;n<e.length;n++)Fr(e[n],t,r);else if(Pn(e)||ts(e))e.forEach(n=>{Fr(n,t,r)});else if(Ei(e)){for(const n in e)Fr(e[n],t,r);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&Fr(e[n],t,r)}return e}var au=[];function Zg(e){au.push(e)}function Xg(){au.pop()}function Qg(e,t){}var ev={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"},tv={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 as(e,t,r,n){try{return n?e(...n):e()}catch(s){Hn(s,t,r)}}function tr(e,t,r,n){if(Ee(e)){const s=as(e,t,r,n);return s&&la(s)&&s.catch(i=>{Hn(i,t,r)}),s}if(we(e)){const s=[];for(let i=0;i<e.length;i++)s.push(tr(e[i],t,r,n));return s}}function Hn(e,t,r,n=!0){const s=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||qe;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){Or(),as(i,null,10,[e,l,u]),Hr();return}}rv(e,r,s,n,o)}function rv(e,t,r,n=!0,s=!1){if(s)throw e;console.error(e)}var Ot=[],xr=-1,ls=[],ln=null,cs=0,lu=Promise.resolve(),ji=null;function wt(e){const t=ji||lu;return e?t.then(this?e.bind(this):e):t}function nv(e){let t=xr+1,r=Ot.length;for(;t<r;){const n=t+r>>>1,s=Ot[n],i=Us(s);i<e||i===e&&s.flags&2?t=n+1:r=n}return t}function Ta(e){if(!(e.flags&1)){const t=Us(e),r=Ot[Ot.length-1];!r||!(e.flags&2)&&t>=Us(r)?Ot.push(e):Ot.splice(nv(t),0,e),e.flags|=1,cu()}}function cu(){ji||(ji=lu.then(du))}function js(e){we(e)?ls.push(...e):ln&&e.id===-1?ln.splice(cs+1,0,e):e.flags&1||(ls.push(e),e.flags|=1),cu()}function uu(e,t,r=xr+1){for(;r<Ot.length;r++){const n=Ot[r];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;Ot.splice(r,1),r--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function Ui(e){if(ls.length){const t=[...new Set(ls)].sort((r,n)=>Us(r)-Us(n));if(ls.length=0,ln){ln.push(...t);return}for(ln=t,cs=0;cs<ln.length;cs++){const r=ln[cs];r.flags&4&&(r.flags&=-2),r.flags&8||r(),r.flags&=-2}ln=null,cs=0}}var Us=e=>e.id==null?e.flags&2?-1:1/0:e.id;function du(e){try{for(xr=0;xr<Ot.length;xr++){const t=Ot[xr];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),as(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;xr<Ot.length;xr++){const t=Ot[xr];t&&(t.flags&=-2)}xr=-1,Ot.length=0,Ui(e),ji=null,(Ot.length||ls.length)&&du(e)}}var us,zi=[];function fu(e,t){var r,n;us=e,us?(us.enabled=!0,zi.forEach(({event:s,args:i})=>us.emit(s,...i)),zi=[]):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=>{fu(s,t)}),setTimeout(()=>{us||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,zi=[])},3e3)):zi=[]}var St=null,Ki=null;function zs(e){const t=St;return St=e,Ki=e&&e.type.__scopeId||null,t}function sv(e){Ki=e}function iv(){Ki=null}var ov=e=>R;function R(e,t=St,r){if(!t||e._n)return e;const n=(...s)=>{n._d&&si(-1);const i=zs(t);let o;try{o=e(...s)}finally{zs(i),n._d&&si(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function Wi(e,t){if(St===null)return e;const r=ii(St),n=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[i,o,a,l=qe]=t[s];i&&(Ee(i)&&(i={mounted:i,updated:i}),i.deep&&Fr(o),n.push({dir:i,instance:r,value:o,oldValue:void 0,arg:a,modifiers:l}))}return e}function Tr(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&&(Or(),tr(l,r,8,[e.el,a,e,t]),Hr())}}function Mn(e,t){if(Ct){let r=Ct.provides;const n=Ct.parent&&Ct.parent.provides;n===r&&(r=Ct.provides=Object.create(n)),r[e]=t}}function Ht(e,t,r=!1){const n=at();if(n||Nn){let s=Nn?Nn._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&&Ee(t)?t.call(n&&n.proxy):t}}function av(){return!!(at()||Nn)}var pu=Symbol.for("v-scx"),hu=()=>{{const e=Ht(pu);return e}};function rt(e,t){return Ks(e,null,t)}function Ea(e,t){return Ks(e,null,{flush:"post"})}function gu(e,t){return Ks(e,null,{flush:"sync"})}function Re(e,t,r){return Ks(e,t,r)}function Ks(e,t,r=qe){const{immediate:n,deep:s,flush:i,once:o}=r,a=Ke({},r),l=t&&n||!t&&i!=="post";let u;if(ms){if(i==="sync"){const h=hu();u=h.__watcherHandles||(h.__watcherHandles=[])}else if(!l){const h=()=>{};return h.stop=er,h.resume=er,h.pause=er,h}}const c=Ct;a.call=(h,m,y)=>tr(h,c,m,y);let d=!1;i==="post"?a.scheduler=h=>{lt(h,c&&c.suspense)}:i!=="sync"&&(d=!0,a.scheduler=(h,m)=>{m?h():Ta(h)}),a.augmentJob=h=>{t&&(h.flags|=4),d&&(h.flags|=2,c&&(h.id=c.uid,h.i=c))};const p=Yg(e,t,a);return ms&&(u?u.push(p):l&&p()),p}function lv(e,t,r){const n=this.proxy,s=et(e)?e.includes(".")?vu(n,e):()=>n[e]:e.bind(n,n);let i;Ee(t)?i=t:(i=t.handler,r=t);const o=Fn(this),a=Ks(s,i.bind(n),r);return o(),a}function vu(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 mu=Symbol("_vte"),wu=e=>e.__isTeleport,Ws=e=>e&&(e.disabled||e.disabled===""),yu=e=>e&&(e.defer||e.defer===""),bu=e=>typeof SVGElement<"u"&&e instanceof SVGElement,_u=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Aa=(e,t)=>{const r=e&&e.to;return et(r)?t?t(r):null:r},Su={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:y,createComment:T}}=u,v=Ws(t.props);let{shapeFlag:x,children:b,dynamicChildren:_}=t;if(e==null){const C=t.el=y(""),k=t.anchor=y("");h(C,r,n),h(k,r,n);const O=(B,N)=>{x&16&&c(b,B,N,s,i,o,a,l)},g=()=>{const B=t.target=Aa(t.props,m),N=Ia(B,t,y,h);B&&(o!=="svg"&&bu(B)?o="svg":o!=="mathml"&&_u(B)&&(o="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(B),v||(O(B,N),Ji(t,!1)))};v&&(O(r,k),Ji(t,!0)),yu(t.props)?(t.el.__isMounted=!1,lt(()=>{g(),delete t.el.__isMounted},i)):g()}else{if(yu(t.props)&&e.el.__isMounted===!1){lt(()=>{Su.process(e,t,r,n,s,i,o,a,l,u)},i);return}t.el=e.el,t.targetStart=e.targetStart;const C=t.anchor=e.anchor,k=t.target=e.target,O=t.targetAnchor=e.targetAnchor,g=Ws(e.props),B=g?r:k,N=g?C:O;if(o==="svg"||bu(k)?o="svg":(o==="mathml"||_u(k))&&(o="mathml"),_?(p(e.dynamicChildren,_,B,s,i,o,a),Ja(e,t,!0)):l||d(e,t,B,N,s,i,o,a,!1),v)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Gi(t,r,C,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const S=t.target=Aa(t.props,m);S&&Gi(t,S,null,u,0)}else g&&Gi(t,k,O,u,1);Ji(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||!Ws(p);for(let m=0;m<a.length;m++){const y=a[m];n(y,t,r,h,!!y.dynamicChildren)}}},move:Gi,hydrate:cv};function Gi(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||Ws(c))&&l&16)for(let p=0;p<u.length;p++)s(u[p],t,r,2);d&&n(a,t,r)}function cv(e,t,r,n,s,i,{o:{nextSibling:o,parentNode:a,querySelector:l,insert:u,createText:c}},d){function p(T,v){let x=v;for(;x;){if(x&&x.nodeType===8){if(x.data==="teleport start anchor")t.targetStart=x;else if(x.data==="teleport anchor"){t.targetAnchor=x,T._lpa=t.targetAnchor&&o(t.targetAnchor);break}}x=o(x)}}function h(T,v){v.anchor=d(o(T),v,a(T),r,n,s,i)}const m=t.target=Aa(t.props,l),y=Ws(t.props);if(m){const T=m._lpa||m.firstChild;t.shapeFlag&16&&(y?(h(e,t),p(m,T),t.targetAnchor||Ia(m,t,c,u,a(e)===m?e:null)):(t.anchor=o(e),p(m,T),t.targetAnchor||Ia(m,t,c,u),d(T&&o(T),t,m,r,n,s,i))),Ji(t,y)}else y&&t.shapeFlag&16&&(h(e,t),t.targetStart=e,t.targetAnchor=o(e));return t.anchor&&o(t.anchor)}var ka=Su;function Ji(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 Ia(e,t,r,n,s=null){const i=t.targetStart=r(""),o=t.targetAnchor=r("");return i[mu]=o,e&&(n(i,e,s),n(o,e,s)),o}var Er=Symbol("_leaveCb"),Gs=Symbol("_enterCb");function Ra(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return We(()=>{e.isMounted=!0}),gs(()=>{e.isUnmounting=!0}),e}var rr=[Function,Array],$a={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:rr,onEnter:rr,onAfterEnter:rr,onEnterCancelled:rr,onBeforeLeave:rr,onLeave:rr,onAfterLeave:rr,onLeaveCancelled:rr,onBeforeAppear:rr,onAppear:rr,onAfterAppear:rr,onAppearCancelled:rr},Cu=e=>{const t=e.subTree;return t.component?Cu(t.component):t},uv={name:"BaseTransition",props:$a,setup(e,{slots:t}){const r=at(),n=Ra();return()=>{const s=t.default&&Yi(t.default(),!0);if(!s||!s.length)return;const i=xu(s),o=Be(e),{mode:a}=o;if(n.isLeaving)return Pa(i);const l=Au(i);if(!l)return Pa(i);let u=ds(l,o,n,r,d=>u=d);l.type!==ot&&Vr(l,u);let c=r.subTree&&Au(r.subTree);if(c&&c.type!==ot&&!vr(c,l)&&Cu(r).type!==ot){let d=ds(c,o,n,r);if(Vr(c,d),a==="out-in"&&l.type!==ot)return n.isLeaving=!0,d.afterLeave=()=>{n.isLeaving=!1,r.job.flags&8||r.update(),delete d.afterLeave,c=void 0},Pa(i);a==="in-out"&&l.type!==ot?d.delayLeave=(p,h,m)=>{const y=Eu(n,c);y[String(c.key)]=c,p[Er]=()=>{h(),p[Er]=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 xu(e){let t=e[0];if(e.length>1){for(const r of e)if(r.type!==ot){t=r;break}}return t}var Tu=uv;function Eu(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 ds(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:y,onBeforeAppear:T,onAppear:v,onAfterAppear:x,onAppearCancelled:b}=t,_=String(e.key),C=Eu(r,e),k=(B,N)=>{B&&tr(B,n,9,N)},O=(B,N)=>{const S=N[1];k(B,N),we(B)?B.every(w=>w.length<=1)&&S():B.length<=1&&S()},g={mode:o,persisted:a,beforeEnter(B){let N=l;if(!r.isMounted)if(i)N=T||l;else return;B[Er]&&B[Er](!0);const S=C[_];S&&vr(e,S)&&S.el[Er]&&S.el[Er](),k(N,[B])},enter(B){if(C[_]===e)return;let N=u,S=c,w=d;if(!r.isMounted)if(i)N=v||u,S=x||c,w=b||d;else return;let E=!1;B[Gs]=Q=>{E||(E=!0,Q?k(w,[B]):k(S,[B]),g.delayedLeave&&g.delayedLeave(),B[Gs]=void 0)};const q=B[Gs].bind(null,!1);N?O(N,[B,q]):q()},leave(B,N){const S=String(e.key);if(B[Gs]&&B[Gs](!0),r.isUnmounting)return N();k(p,[B]);let w=!1;B[Er]=q=>{w||(w=!0,N(),q?k(y,[B]):k(m,[B]),B[Er]=void 0,C[S]===e&&delete C[S])};const E=B[Er].bind(null,!1);C[S]=e,h?O(h,[B,E]):E()},clone(B){const N=ds(B,t,r,n,s);return s&&s(N),N}};return g}function Pa(e){if(Js(e))return e=mr(e),e.children=null,e}function Au(e){if(!Js(e))return wu(e.type)&&e.children?xu(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&&Ee(r.default))return r.default()}}function Vr(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Vr(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 Yi(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===Le?(o.patchFlag&128&&s++,n=n.concat(Yi(o.children,t,a))):(t||o.type!==ot)&&n.push(a!=null?mr(o,{key:a}):o)}if(s>1)for(let i=0;i<n.length;i++)n[i].patchFlag=-2;return n}function ee(e,t){return Ee(e)?Ke({name:e.name},t,{setup:e}):e}function ku(){const e=at();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function Da(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function dv(e){const t=at(),r=nt(null);if(t){const n=t.refs===qe?t.refs={}:t.refs;Object.defineProperty(n,e,{enumerable:!0,get:()=>r.value,set:s=>r.value=s})}return r}function Iu(e,t){let r;return!!((r=Object.getOwnPropertyDescriptor(e,t))&&!r.configurable)}var Zi=new WeakMap;function fs(e,t,r,n,s=!1){if(we(e)){e.forEach((y,T)=>fs(y,t&&(we(t)?t[T]:t),r,n,s));return}if(jr(n)&&!s){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&fs(e,t,r,n.component.subTree);return}const i=n.shapeFlag&4?ii(n.component):n.el,o=s?null:i,{i:a,r:l}=e,u=t&&t.r,c=a.refs===qe?a.refs={}:a.refs,d=a.setupState,p=Be(d),h=d===qe?Rc:y=>Iu(c,y)?!1:ze(p,y),m=(y,T)=>!(T&&Iu(c,T));if(u!=null&&u!==l){if(Ru(t),et(u))c[u]=null,h(u)&&(d[u]=null);else if(Je(u)){const y=t;m(u,y.k)&&(u.value=null),y.k&&(c[y.k]=null)}}if(Ee(l))as(l,a,12,[o,c]);else{const y=et(l),T=Je(l);if(y||T){const v=()=>{if(e.f){const x=y?h(l)?d[l]:c[l]:m(l)||!e.k?l.value:c[e.k];if(s)we(x)&&aa(x,i);else if(we(x))x.includes(i)||x.push(i);else if(y)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 y?(c[l]=o,h(l)&&(d[l]=o)):T&&(m(l,e.k)&&(l.value=o),e.k&&(c[e.k]=o))};if(o){const x=()=>{v(),Zi.delete(e)};x.id=-1,Zi.set(e,x),lt(x,r)}else Ru(e),v()}}}function Ru(e){const t=Zi.get(e);t&&(t.flags|=8,Zi.delete(e))}var $u=!1,ps=()=>{$u||(console.error("Hydration completed but contains mismatches."),$u=!0)},fv=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",pv=e=>e.namespaceURI.includes("MathML"),Xi=e=>{if(e.nodeType===1){if(fv(e))return"svg";if(pv(e))return"mathml"}},hs=e=>e.nodeType===8;function hv(e){const{mt:t,p:r,o:{patchProp:n,createText:s,nextSibling:i,parentNode:o,remove:a,insert:l,createComment:u}}=e,c=(b,_)=>{if(!_.hasChildNodes()){r(null,b,_),Ui(),_._vnode=b;return}d(_.firstChild,b,null,null,null),Ui(),_._vnode=b},d=(b,_,C,k,O,g=!1)=>{g=g||!!_.dynamicChildren;const B=hs(b)&&b.data==="[",N=()=>y(b,_,C,k,O,B),{type:S,ref:w,shapeFlag:E,patchFlag:q}=_;let Q=b.nodeType;_.el=b,q===-2&&(g=!1,_.dynamicChildren=null);let z=null;switch(S){case cn:Q!==3?_.children===""?(l(_.el=s(""),o(b),b),z=b):z=N():(b.data!==_.children&&(ps(),b.data=_.children),z=i(b));break;case ot:x(b)?(z=i(b),v(_.el=b.content.firstChild,b,C)):Q!==8||B?z=N():z=i(b);break;case Bn:if(B&&(b=i(b),Q=b.nodeType),Q===1||Q===3){z=b;const X=!_.children.length;for(let Y=0;Y<_.staticCount;Y++)X&&(_.children+=z.nodeType===1?z.outerHTML:z.data),Y===_.staticCount-1&&(_.anchor=z),z=i(z);return B?i(z):z}else N();break;case Le:B?z=m(b,_,C,k,O,g):z=N();break;default:if(E&1)(Q!==1||_.type.toLowerCase()!==b.tagName.toLowerCase())&&!x(b)?z=N():z=p(b,_,C,k,O,g);else if(E&6){_.slotScopeIds=O;const X=o(b);if(B?z=T(b):hs(b)&&b.data==="teleport start"?z=T(b,b.data,"teleport end"):z=i(b),t(_,X,null,C,k,Xi(X),g),jr(_)&&!_.type.__asyncResolved){let Y;B?(Y=H(Le),Y.anchor=z?z.previousSibling:X.lastChild):Y=b.nodeType===3?Ne(""):H("div"),Y.el=b,_.component.subTree=Y}}else E&64?Q!==8?z=N():z=_.type.hydrate(b,_,C,k,O,g,e,h):E&128&&(z=_.type.hydrate(b,_,C,k,Xi(o(b)),O,g,e,d))}return w!=null&&fs(w,null,k,_),z},p=(b,_,C,k,O,g)=>{g=g||!!_.dynamicChildren;const{type:B,props:N,patchFlag:S,shapeFlag:w,dirs:E,transition:q}=_,Q=B==="input"||B==="option";if(Q||S!==-1){E&&Tr(_,null,C,"created");let z=!1;if(x(b)){z=pd(null,q)&&C&&C.vnode.props&&C.vnode.props.appear;const Y=b.content.firstChild;if(z){const le=Y.getAttribute("class");le&&(Y.$cls=le),q.beforeEnter(Y)}v(Y,b,C),_.el=b=Y}if(w&16&&!(N&&(N.innerHTML||N.textContent))){let Y=h(b.firstChild,_,b,C,k,O,g);for(;Y;){Qi(b,1)||ps();const le=Y;Y=Y.nextSibling,a(le)}}else if(w&8){let Y=_.children;Y[0]===`
4
- `&&(b.tagName==="PRE"||b.tagName==="TEXTAREA")&&(Y=Y.slice(1));const{textContent:le}=b;le!==Y&&le!==Y.replace(/\r\n|\r/g,`
5
- `)&&(Qi(b,0)||ps(),b.textContent=_.children)}if(N){if(Q||!g||S&48){const Y=b.tagName.includes("-");for(const le in N)(Q&&(le.endsWith("value")||le==="indeterminate")||Ds(le)&&!Dn(le)||le[0]==="."||Y&&!Dn(le))&&n(b,le,null,N[le],void 0,C)}else if(N.onClick)n(b,"onClick",null,N.onClick,void 0,C);else if(S&4&&Lr(N.style))for(const Y in N.style)N.style[Y]}let X;(X=N&&N.onVnodeBeforeMount)&&Vt(X,C,_),E&&Tr(_,null,C,"beforeMount"),((X=N&&N.onVnodeMounted)||E||z)&&wd(()=>{X&&Vt(X,C,_),z&&q.enter(b),E&&Tr(_,null,C,"mounted")},k)}return b.nextSibling},h=(b,_,C,k,O,g,B)=>{B=B||!!_.dynamicChildren;const N=_.children,S=N.length;for(let w=0;w<S;w++){const E=B?N[w]:N[w]=Ft(N[w]),q=E.type===cn;b?(q&&!B&&w+1<S&&Ft(N[w+1]).type===cn&&(l(s(b.data.slice(E.children.length)),C,i(b)),b.data=E.children),b=d(b,E,k,O,g,B)):q&&!E.children?l(E.el=s(""),C):(Qi(C,1)||ps(),r(null,E,C,null,k,O,Xi(C),g))}return b},m=(b,_,C,k,O,g)=>{const{slotScopeIds:B}=_;B&&(O=O?O.concat(B):B);const N=o(b),S=h(i(b),_,N,C,k,O,g);return S&&hs(S)&&S.data==="]"?i(_.anchor=S):(ps(),l(_.anchor=u("]"),N,S),S)},y=(b,_,C,k,O,g)=>{if(Qi(b.parentElement,1)||ps(),_.el=null,g){const S=T(b);for(;;){const w=i(b);if(w&&w!==S)a(w);else break}}const B=i(b),N=o(b);return a(b),r(null,_,N,B,C,k,Xi(N),O),C&&(C.vnode.el=_.el,oo(C,_.el)),B},T=(b,_="[",C="]")=>{let k=0;for(;b;)if(b=i(b),b&&hs(b)&&(b.data===_&&k++,b.data===C)){if(k===0)return i(b);k--}return b},v=(b,_,C)=>{const k=_.parentNode;k&&k.replaceChild(b,_);let O=C;for(;O;)O.vnode.el===_&&(O.vnode.el=O.subTree.el=b),O=O.parent},x=b=>b.nodeType===1&&b.tagName==="TEMPLATE";return[c,d]}var Pu="data-allow-mismatch",gv={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Qi(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(Pu);)e=e.parentElement;const r=e&&e.getAttribute(Pu);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 vv=$i().requestIdleCallback||(e=>setTimeout(e,1)),mv=$i().cancelIdleCallback||(e=>clearTimeout(e)),wv=(e=1e4)=>t=>{const r=vv(t,{timeout:e});return()=>mv(r)};function yv(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 bv=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(yv(s))return t(),n.disconnect(),!1;n.observe(s)}}),()=>n.disconnect()},_v=e=>t=>{if(e){const r=matchMedia(e);if(r.matches)t();else return r.addEventListener("change",t,{once:!0}),()=>r.removeEventListener("change",t)}},Sv=(e=[])=>(t,r)=>{et(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 Cv(e,t){if(hs(e)&&e.data==="["){let r=1,n=e.nextSibling;for(;n;){if(n.nodeType===1){if(t(n)===!1)break}else if(hs(n))if(n.data==="]"){if(--r===0)break}else n.data==="["&&r++;n=n.nextSibling}}else t(e)}var jr=e=>!!e.type.__asyncLoader;function xv(e){Ee(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(y=>{if(y=y instanceof Error?y:new Error(String(y)),l)return new Promise((T,v)=>{l(y,()=>T(p()),()=>v(y),d+1)});throw y}).then(y=>m!==u&&u?u:(y&&(y.__esModule||y[Symbol.toStringTag]==="Module")&&(y=y.default),c=y,y)))};return ee({name:"AsyncComponentWrapper",__asyncLoader:h,__asyncHydrate(m,y,T){let v=!1;(y.bu||(y.bu=[])).push(()=>v=!0);const x=()=>{v||T()},b=i?()=>{const _=i(x,C=>Cv(m,C));_&&(y.bum||(y.bum=[])).push(_)}:x;c?b():h().then(()=>!y.isUnmounted&&b())},get __asyncResolved(){return c},setup(){const m=Ct;if(Da(m),c)return()=>eo(c,m);const y=b=>{u=null,Hn(b,m,13,!n)};if(a&&m.suspense||ms)return h().then(b=>()=>eo(b,m)).catch(b=>(y(b),()=>n?H(n,{error:b}):null));const T=U(!1),v=U(),x=U(!!s);return s&&setTimeout(()=>{x.value=!1},s),o!=null&&setTimeout(()=>{if(!T.value&&!v.value){const b=new Error(`Async component timed out after ${o}ms.`);y(b),v.value=b}},o),h().then(()=>{T.value=!0,m.parent&&Js(m.parent.vnode)&&m.parent.update()}).catch(b=>{y(b),v.value=b}),()=>{if(T.value&&c)return eo(c,m);if(v.value&&n)return H(n,{error:v.value});if(r&&!x.value)return eo(r,m)}}})}function eo(e,t){const{ref:r,props:n,children:s,ce:i}=t.vnode,o=H(e,n,s);return o.ref=r,o.ce=i,delete t.vnode.ce,o}var Js=e=>e.type.__isKeepAlive,Tv={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const r=at(),n=r.ctx;if(!n.renderer)return()=>{const x=t.default&&t.default();return x&&x.length===1?x[0]:x};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=(x,b,_,C,k)=>{const O=x.component;u(x,b,_,0,a),l(O.vnode,x,b,_,O,a,C,x.slotScopeIds,k),lt(()=>{O.isDeactivated=!1,O.a&&ss(O.a);const g=x.props&&x.props.onVnodeMounted;g&&Vt(g,O.parent,x)},a)},n.deactivate=x=>{const b=x.component;ao(b.m),ao(b.a),u(x,p,null,1,a),lt(()=>{b.da&&ss(b.da);const _=x.props&&x.props.onVnodeUnmounted;_&&Vt(_,b.parent,x),b.isDeactivated=!0},a)};function h(x){Oa(x),c(x,r,a,!0)}function m(x){s.forEach((b,_)=>{const C=rl(jr(b)?b.type.__asyncResolved||{}:b.type);C&&!x(C)&&y(_)})}function y(x){const b=s.get(x);b&&(!o||!vr(b,o))?h(b):o&&Oa(o),s.delete(x),i.delete(x)}Re(()=>[e.include,e.exclude],([x,b])=>{x&&m(_=>Ys(x,_)),b&&m(_=>!Ys(b,_))},{flush:"post",deep:!0});let T=null;const v=()=>{T!=null&&(lo(r.subTree.type)?lt(()=>{s.set(T,to(r.subTree))},r.subTree.suspense):s.set(T,to(r.subTree)))};return We(v),Zs(v),gs(()=>{s.forEach(x=>{const{subTree:b,suspense:_}=r,C=to(b);if(x.type===C.type&&x.key===C.key){Oa(C);const k=C.component.da;k&&lt(k,_);return}h(x)})}),()=>{if(T=null,!t.default)return o=null;const x=t.default(),b=x[0];if(x.length>1)return o=null,x;if(!zr(b)||!(b.shapeFlag&4)&&!(b.shapeFlag&128))return o=null,b;let _=to(b);if(_.type===ot)return o=null,_;const C=_.type,k=rl(jr(_)?_.type.__asyncResolved||{}:C),{include:O,exclude:g,max:B}=e;if(O&&(!k||!Ys(O,k))||g&&k&&Ys(g,k))return _.shapeFlag&=-257,o=_,b;const N=_.key==null?C:_.key,S=s.get(N);return _.el&&(_=mr(_),b.shapeFlag&128&&(b.ssContent=_)),T=N,S?(_.el=S.el,_.component=S.component,_.transition&&Vr(_,_.transition),_.shapeFlag|=512,i.delete(N),i.add(N)):(i.add(N),B&&i.size>parseInt(B,10)&&y(i.values().next().value)),_.shapeFlag|=256,o=_,lo(b.type)?b:_}}};function Ys(e,t){return we(e)?e.some(r=>Ys(r,t)):et(e)?e.split(",").includes(t):ag(e)?(e.lastIndex=0,e.test(t)):!1}function Du(e,t){Hu(e,"a",t)}function Ou(e,t){Hu(e,"da",t)}function Hu(e,t,r=Ct){const n=e.__wdc||(e.__wdc=()=>{let s=r;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(ro(t,n,r),r){let s=r.parent;for(;s&&s.parent;)Js(s.parent.vnode)&&Ev(n,t,r,s),s=s.parent}}function Ev(e,t,r,n){const s=ro(t,e,n,!0);Mt(()=>{aa(n[t],s)},r)}function Oa(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function to(e){return e.shapeFlag&128?e.ssContent:e}function ro(e,t,r=Ct,n=!1){if(r){const s=r[e]||(r[e]=[]),i=t.__weh||(t.__weh=(...o)=>{Or();const a=Fn(r),l=tr(t,r,e,o);return a(),Hr(),l});return n?s.unshift(i):s.push(i),i}}var Ur=e=>(t,r=Ct)=>{(!ms||e==="sp")&&ro(e,(...n)=>t(...n),r)},Mu=Ur("bm"),We=Ur("m"),Ha=Ur("bu"),Zs=Ur("u"),gs=Ur("bum"),Mt=Ur("um"),Nu=Ur("sp"),qu=Ur("rtg"),Bu=Ur("rtc");function Lu(e,t=Ct){ro("ec",e,t)}var Ma="components",Av="directives";function kv(e,t){return Na(Ma,e,!0,t)||e}var Fu=Symbol.for("v-ndc");function Xs(e){return et(e)?Na(Ma,e,!1)||e:e||Fu}function Iv(e){return Na(Av,e)}function Na(e,t,r=!0,n=!1){const s=St||Ct;if(s){const i=s.type;if(e===Ma){const a=rl(i,!1);if(a&&(a===t||a===ft(t)||a===Os(ft(t))))return i}const o=Vu(s[e]||i[e],t)||Vu(s.appContext[e],t);return!o&&n?i:o}}function Vu(e,t){return e&&(e[t]||e[ft(t)]||e[Os(ft(t))])}function nr(e,t,r,n){let s;const i=r&&r[n],o=we(e);if(o||et(e)){const a=o&&Lr(e);let l=!1,u=!1;a&&(l=!Lt(e),u=Cr(e),e=Mi(e)),s=new Array(e.length);for(let c=0,d=e.length;c<d;c++)s[c]=t(l?u?os(gr(e[c])):gr(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 Rv(e,t){for(let r=0;r<t.length;r++){const n=t[r];if(we(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 se(e,t,r={},n,s){if(St.ce||St.parent&&jr(St.parent)&&St.parent.ce){const u=Object.keys(r).length>0;return t!=="default"&&(r.name=t),P(),W(Le,null,[H("slot",r,n&&n())],u?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),P();const o=i&&qa(i(r)),a=r.key||o&&o.key,l=W(Le,{key:(a&&!fr(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 qa(e){return e.some(t=>zr(t)?!(t.type===ot||t.type===Le&&!qa(t.children)):!0)?e:null}function ju(e,t){const r={};for(const n in e)r[t&&/[A-Z]/.test(n)?`on:${n}`:ns(n)]=e[n];return r}var Ba=e=>e?Cd(e)?ii(e):Ba(e.parent):null,Qs=Ke(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=>Ba(e.parent),$root:e=>Ba(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ja(e),$forceUpdate:e=>e.f||(e.f=()=>{Ta(e.update)}),$nextTick:e=>e.n||(e.n=wt.bind(e.proxy)),$watch:e=>lv.bind(e)}),La=(e,t)=>e!==qe&&!e.__isScriptSetup&&ze(e,t),Fa={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(La(n,t))return o[t]=1,n[t];if(s!==qe&&ze(s,t))return o[t]=2,s[t];if(ze(i,t))return o[t]=3,i[t];if(r!==qe&&ze(r,t))return o[t]=4,r[t];Va&&(o[t]=0)}}const u=Qs[t];let c,d;if(u)return t==="$attrs"&&At(e.attrs,"get",""),u(e);if((c=a.__cssModules)&&(c=c[t]))return c;if(r!==qe&&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 La(s,t)?(s[t]=r,!0):n!==qe&&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!==qe&&a[0]!=="$"&&ze(e,a)||La(t,a)||ze(i,a)||ze(n,a)||ze(Qs,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)}},$v=Ke({},Fa,{get(e,t){if(t!==Symbol.unscopables)return Fa.get(e,t,e)},has(e,t){return t[0]!=="_"&&!dg(t)}});function Pv(){return null}function Dv(){return null}function Ov(e){}function Hv(e){}function Mv(){return null}function Nv(){}function qv(e,t){return null}function Bv(){return Uu("useSlots").slots}function Lv(){return Uu("useAttrs").attrs}function Uu(e){const t=at();return t.setupContext||(t.setupContext=Ed(t))}function ei(e){return we(e)?e.reduce((t,r)=>(t[r]=null,t),{}):e}function zu(e,t){const r=ei(e);for(const n in t){if(n.startsWith("__skip"))continue;let s=r[n];s?we(s)||Ee(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 Fv(e,t){return!e||!t?e||t:we(e)&&we(t)?e.concat(t):Ke({},ei(e),ei(t))}function Vv(e,t){const r={};for(const n in e)t.includes(n)||Object.defineProperty(r,n,{enumerable:!0,get:()=>e[n]});return r}function jv(e){const t=at();let r=e();fo();const n=()=>{at()!==t&&t.scope.off(),fo()};return la(r)&&(r=r.catch(s=>{throw Fn(t),Promise.resolve().then(()=>Promise.resolve().then(n)),s})),[r,()=>{Fn(t),Promise.resolve().then(n)}]}var Va=!0;function Uv(e){const t=ja(e),r=e.proxy,n=e.ctx;Va=!1,t.beforeCreate&&Ku(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:y,deactivated:T,beforeDestroy:v,beforeUnmount:x,destroyed:b,unmounted:_,render:C,renderTracked:k,renderTriggered:O,errorCaptured:g,serverPrefetch:B,expose:N,inheritAttrs:S,components:w,directives:E,filters:q}=t;if(u&&zv(u,n,null),o)for(const X in o){const Y=o[X];Ee(Y)&&(n[X]=Y.bind(r))}if(s){const X=s.call(r,r);je(X)&&(e.data=qr(X))}if(Va=!0,i)for(const X in i){const Y=i[X],le=j({get:Ee(Y)?Y.bind(r,r):Ee(Y.get)?Y.get.bind(r,r):er,set:!Ee(Y)&&Ee(Y.set)?Y.set.bind(r):er});Object.defineProperty(n,X,{enumerable:!0,configurable:!0,get:()=>le.value,set:K=>le.value=K})}if(a)for(const X in a)Wu(a[X],n,r,X);if(l){const X=Ee(l)?l.call(r):l;Reflect.ownKeys(X).forEach(Y=>{Mn(Y,X[Y])})}c&&Ku(c,e,"c");function z(X,Y){we(Y)?Y.forEach(le=>X(le.bind(r))):Y&&X(Y.bind(r))}if(z(Mu,d),z(We,p),z(Ha,h),z(Zs,m),z(Du,y),z(Ou,T),z(Lu,g),z(Bu,k),z(qu,O),z(gs,x),z(Mt,_),z(Nu,B),we(N))if(N.length){const X=e.exposed||(e.exposed={});N.forEach(Y=>{Object.defineProperty(X,Y,{get:()=>r[Y],set:le=>r[Y]=le,enumerable:!0})})}else e.exposed||(e.exposed={});C&&e.render===er&&(e.render=C),S!=null&&(e.inheritAttrs=S),w&&(e.components=w),E&&(e.directives=E),B&&Da(e)}function zv(e,t,r=er){we(e)&&(e=Ua(e));for(const n in e){const s=e[n];let i;je(s)?"default"in s?i=Ht(s.from||n,s.default,!0):i=Ht(s.from||n):i=Ht(s),Je(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[n]=i}}function Ku(e,t,r){tr(we(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,r)}function Wu(e,t,r,n){let s=n.includes(".")?vu(r,n):()=>r[n];if(et(e)){const i=t[e];Ee(i)&&Re(s,i)}else if(Ee(e))Re(s,e.bind(r));else if(je(e))if(we(e))e.forEach(i=>Wu(i,t,r,n));else{const i=Ee(e.handler)?e.handler.bind(r):t[e.handler];Ee(i)&&Re(s,i,e)}}function ja(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=>no(l,u,o,!0)),no(l,t,o)),je(t)&&i.set(t,l),l}function no(e,t,r,n=!1){const{mixins:s,extends:i}=t;i&&no(e,i,r,!0),s&&s.forEach(o=>no(e,o,r,!0));for(const o in t)if(!(n&&o==="expose")){const a=Kv[o]||r&&r[o];e[o]=a?a(e[o],t[o]):t[o]}return e}var Kv={data:Gu,props:Ju,emits:Ju,methods:ti,computed:ti,beforeCreate:Nt,created:Nt,beforeMount:Nt,mounted:Nt,beforeUpdate:Nt,updated:Nt,beforeDestroy:Nt,beforeUnmount:Nt,destroyed:Nt,unmounted:Nt,activated:Nt,deactivated:Nt,errorCaptured:Nt,serverPrefetch:Nt,components:ti,directives:ti,watch:Gv,provide:Gu,inject:Wv};function Gu(e,t){return t?e?function(){return Ke(Ee(e)?e.call(this,this):e,Ee(t)?t.call(this,this):t)}:t:e}function Wv(e,t){return ti(Ua(e),Ua(t))}function Ua(e){if(we(e)){const t={};for(let r=0;r<e.length;r++)t[e[r]]=e[r];return t}return e}function Nt(e,t){return e?[...new Set([].concat(e,t))]:t}function ti(e,t){return e?Ke(Object.create(null),e,t):t}function Ju(e,t){return e?we(e)&&we(t)?[...new Set([...e,...t])]:Ke(Object.create(null),ei(e),ei(t??{})):t}function Gv(e,t){if(!e)return t;if(!t)return e;const r=Ke(Object.create(null),e);for(const n in t)r[n]=Nt(e[n],t[n]);return r}function Yu(){return{app:null,config:{isNativeTag:Rc,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 Jv=0;function Yv(e,t){return function(n,s=null){Ee(n)||(n=Ke({},n)),s!=null&&!je(s)&&(s=null);const i=Yu(),o=new WeakSet,a=[];let l=!1;const u=i.app={_uid:Jv++,_component:n,_props:s,_container:null,_context:i,_instance:null,version:kd,get config(){return i.config},set config(c){},use(c,...d){return o.has(c)||(c&&Ee(c.install)?(o.add(c),c.install(u,...d)):Ee(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||H(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,ii(h.component)}},onUnmount(c){a.push(c)},unmount(){l&&(tr(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=Nn;Nn=u;try{return c()}finally{Nn=d}}};return u}}var Nn=null;function Zv(e,t,r=qe){const n=at(),s=ft(t),i=Bt(t),o=Zu(e,s),a=Vs((l,u)=>{let c,d=qe,p;return gu(()=>{const h=e[s];Dt(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(!Dt(m,c)&&!(d!==qe&&Dt(h,d)))return;const y=n.vnode.props;y&&(t in y||s in y||i in y)&&(`onUpdate:${t}`in y||`onUpdate:${s}`in y||`onUpdate:${i}`in y)||(c=h,u()),n.emit(`update:${t}`,m),Dt(h,m)&&Dt(h,d)&&!Dt(m,p)&&u(),d=h,p=m}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?o||qe:a,done:!1}:{done:!0}}}},a}var Zu=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ft(t)}Modifiers`]||e[`${Bt(t)}Modifiers`];function Xv(e,t,...r){if(e.isUnmounted)return;const n=e.vnode.props||qe;let s=r;const i=t.startsWith("update:"),o=i&&Zu(n,t.slice(7));o&&(o.trim&&(s=r.map(c=>et(c)?c.trim():c)),o.number&&(s=r.map(Ii)));let a,l=n[a=ns(t)]||n[a=ns(ft(t))];!l&&i&&(l=n[a=ns(Bt(t))]),l&&tr(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,tr(u,e,6,s)}}var Qv=new WeakMap;function Xu(e,t,r=!1){const n=r?Qv:t.emitsCache,s=n.get(e);if(s!==void 0)return s;const i=e.emits;let o={},a=!1;if(!Ee(e)){const l=u=>{const c=Xu(u,t,!0);c&&(a=!0,Ke(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):(we(i)?i.forEach(l=>o[l]=null):Ke(o,i),je(e)&&n.set(e,o),o)}function so(e,t){return!e||!Ds(t)?!1:(t=t.slice(2).replace(/Once$/,""),ze(e,t[0].toLowerCase()+t.slice(1))||ze(e,Bt(t))||ze(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:y}=e,T=zs(e);let v,x;try{if(r.shapeFlag&4){const _=s||n,C=_;v=Ft(u.call(C,_,c,d,h,p,m)),x=a}else{const _=t;v=Ft(_.length>1?_(d,{attrs:a,slots:o,emit:l}):_(d,null)),x=t.props?a:tm(a)}}catch(_){ni.length=0,Hn(_,e,1),v=H(ot)}let b=v;if(x&&y!==!1){const _=Object.keys(x),{shapeFlag:C}=b;_.length&&C&7&&(i&&_.some(oa)&&(x=rm(x,i)),b=mr(b,x,!1,!0))}return r.dirs&&(b=mr(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(r.dirs):r.dirs),r.transition&&Vr(b,r.transition),v=b,zs(T),v}function em(e,t=!0){let r;for(let n=0;n<e.length;n++){const s=e[n];if(zr(s)){if(s.type!==ot||s.children==="v-if"){if(r)return;r=s}}else return}return r}var tm=e=>{let t;for(const r in e)(r==="class"||r==="style"||Ds(r))&&((t||(t={}))[r]=e[r]);return t},rm=(e,t)=>{const r={};for(const n in e)(!oa(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?Qu(n,o,u):!!o;if(l&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const p=c[d];if(ed(o,n,p)&&!so(u,p))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:n===o?!1:n?o?Qu(n,o,u):!0:!!o;return!1}function Qu(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(ed(t,e,i)&&!so(r,i))return!0}return!1}function ed(e,t,r){const n=e[r],s=t[r];return r==="style"&&je(n)&&je(s)?!Dr(n,s):n!==s}function oo({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 td={},rd=()=>Object.create(td),nd=e=>Object.getPrototypeOf(e)===td;function sm(e,t,r,n=!1){const s={},i=rd();e.propsDefaults=Object.create(null),sd(e,t,s,i);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);r?e.props=n?s:ru(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function im(e,t,r,n){const{props:s,attrs:i,vnode:{patchFlag:o}}=e,a=Be(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(so(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=ft(p);s[m]=za(l,a,m,h,e,!1)}else h!==i[p]&&(i[p]=h,u=!0)}}}else{sd(e,t,s,i)&&(u=!0);let c;for(const d in a)(!t||!ze(t,d)&&((c=Bt(d))===d||!ze(t,c)))&&(l?r&&(r[d]!==void 0||r[c]!==void 0)&&(s[d]=za(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&&Mr(e.attrs,"set","")}function sd(e,t,r,n){const[s,i]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(Dn(l))continue;const u=t[l];let c;s&&ze(s,c=ft(l))?!i||!i.includes(c)?r[c]=u:(a||(a={}))[c]=u:so(e.emitsOptions,l)||(!(l in n)||u!==n[l])&&(n[l]=u,o=!0)}if(i){const l=Be(r),u=a||qe;for(let c=0;c<i.length;c++){const d=i[c];r[d]=za(s,l,d,u[d],e,!ze(u,d))}}return o}function za(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&&Ee(l)){const{propsDefaults:u}=s;if(r in u)n=u[r];else{const c=Fn(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===Bt(r))&&(n=!0))}return n}var om=new WeakMap;function id(e,t,r=!1){const n=r?om:t.propsCache,s=n.get(e);if(s)return s;const i=e.props,o={},a=[];let l=!1;if(!Ee(e)){const c=d=>{l=!0;const[p,h]=id(d,t,!0);Ke(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,es),es;if(we(i))for(let c=0;c<i.length;c++){const d=ft(i[c]);od(d)&&(o[d]=qe)}else if(i)for(const c in i){const d=ft(c);if(od(d)){const p=i[c],h=o[d]=we(p)||Ee(p)?{type:p}:Ke({},p),m=h.type;let y=!1,T=!0;if(we(m))for(let v=0;v<m.length;++v){const x=m[v],b=Ee(x)&&x.name;if(b==="Boolean"){y=!0;break}else b==="String"&&(T=!1)}else y=Ee(m)&&m.name==="Boolean";h[0]=y,h[1]=T,(y||ze(h,"default"))&&a.push(d)}}const u=[o,a];return je(e)&&n.set(e,u),u}function od(e){return e[0]!=="$"&&!Dn(e)}var Ka=e=>e==="_"||e==="_ctx"||e==="$stable",Wa=e=>we(e)?e.map(Ft):[Ft(e)],am=(e,t,r)=>{if(t._n)return t;const n=R((...s)=>Wa(t(...s)),r);return n._c=!1,n},ad=(e,t,r)=>{const n=e._ctx;for(const s in e){if(Ka(s))continue;const i=e[s];if(Ee(i))t[s]=am(s,i,n);else if(i!=null){const o=Wa(i);t[s]=()=>o}}},ld=(e,t)=>{const r=Wa(t);e.slots.default=()=>r},cd=(e,t,r)=>{for(const n in t)(r||!Ka(n))&&(e[n]=t[n])},lm=(e,t,r)=>{const n=e.slots=rd();if(e.vnode.shapeFlag&32){const s=t._;s?(cd(n,t,r),r&&Dc(n,"_",s,!0)):ad(t,n)}else t&&ld(e,t)},cm=(e,t,r)=>{const{vnode:n,slots:s}=e;let i=!0,o=qe;if(n.shapeFlag&32){const a=t._;a?r&&a===1?i=!1:cd(s,t,r):(i=!t.$stable,ad(t,s)),o=t}else t&&(ld(e,t),o={default:1});if(i)for(const a in s)!Ka(a)&&o[a]==null&&delete s[a]};function sx(){}var lt=wd;function ud(e){return fd(e)}function dd(e){return fd(e,hv)}function fd(e,t){const r=$i();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=er,insertStaticContent:m}=e,y=(A,$,J,oe=null,ne=null,te=null,de=void 0,ue=null,ce=!!$.dynamicChildren)=>{if(A===$)return;A&&!vr(A,$)&&(oe=Ze(A),fe(A,ne,te,!0),A=null),$.patchFlag===-2&&(ce=!1,$.dynamicChildren=null);const{type:ie,ref:Se,shapeFlag:he}=$;switch(ie){case cn:T(A,$,J,oe);break;case ot:v(A,$,J,oe);break;case Bn:A==null&&x($,J,oe,de);break;case Le:w(A,$,J,oe,ne,te,de,ue,ce);break;default:he&1?C(A,$,J,oe,ne,te,de,ue,ce):he&6?E(A,$,J,oe,ne,te,de,ue,ce):(he&64||he&128)&&ie.process(A,$,J,oe,ne,te,de,ue,ce,Qe)}Se!=null&&ne?fs(Se,A&&A.ref,te,$||A,!$):Se==null&&A&&A.ref!=null&&fs(A.ref,null,te,A,!0)},T=(A,$,J,oe)=>{if(A==null)n($.el=a($.children),J,oe);else{const ne=$.el=A.el;$.children!==A.children&&u(ne,$.children)}},v=(A,$,J,oe)=>{A==null?n($.el=l($.children||""),J,oe):$.el=A.el},x=(A,$,J,oe)=>{[A.el,A.anchor]=m(A.children,$,J,oe,A.el,A.anchor)},b=({el:A,anchor:$},J,oe)=>{let ne;for(;A&&A!==$;)ne=p(A),n(A,J,oe),A=ne;n($,J,oe)},_=({el:A,anchor:$})=>{let J;for(;A&&A!==$;)J=p(A),s(A),A=J;s($)},C=(A,$,J,oe,ne,te,de,ue,ce)=>{if($.type==="svg"?de="svg":$.type==="math"&&(de="mathml"),A==null)k($,J,oe,ne,te,de,ue,ce);else{const ie=A.el&&A.el._isVueCE?A.el:null;try{ie&&ie._beginPatch(),B(A,$,ne,te,de,ue,ce)}finally{ie&&ie._endPatch()}}},k=(A,$,J,oe,ne,te,de,ue)=>{let ce,ie;const{props:Se,shapeFlag:he,transition:I,dirs:F}=A;if(ce=A.el=o(A.type,te,Se&&Se.is,Se),he&8?c(ce,A.children):he&16&&g(A.children,ce,null,oe,ne,Ga(A,te),de,ue),F&&Tr(A,null,oe,"created"),O(ce,A,A.scopeId,de,oe),Se){for(const D in Se)D!=="value"&&!Dn(D)&&i(ce,D,null,Se[D],te,oe);"value"in Se&&i(ce,"value",null,Se.value,te),(ie=Se.onVnodeBeforeMount)&&Vt(ie,oe,A)}F&&Tr(A,null,oe,"beforeMount");const M=pd(ne,I);M&&I.beforeEnter(ce),n(ce,$,J),((ie=Se&&Se.onVnodeMounted)||M||F)&&lt(()=>{ie&&Vt(ie,oe,A),M&&I.enter(ce),F&&Tr(A,null,oe,"mounted")},ne)},O=(A,$,J,oe,ne)=>{if(J&&h(A,J),oe)for(let te=0;te<oe.length;te++)h(A,oe[te]);if(ne){let te=ne.subTree;if($===te||lo(te.type)&&(te.ssContent===$||te.ssFallback===$)){const de=ne.vnode;O(A,de,de.scopeId,de.slotScopeIds,ne.parent)}}},g=(A,$,J,oe,ne,te,de,ue,ce=0)=>{for(let ie=ce;ie<A.length;ie++)y(null,A[ie]=ue?Kr(A[ie]):Ft(A[ie]),$,J,oe,ne,te,de,ue)},B=(A,$,J,oe,ne,te,de)=>{const ue=$.el=A.el;let{patchFlag:ce,dynamicChildren:ie,dirs:Se}=$;ce|=A.patchFlag&16;const he=A.props||qe,I=$.props||qe;let F;if(J&&qn(J,!1),(F=I.onVnodeBeforeUpdate)&&Vt(F,J,$,A),Se&&Tr($,A,J,"beforeUpdate"),J&&qn(J,!0),(he.innerHTML&&I.innerHTML==null||he.textContent&&I.textContent==null)&&c(ue,""),ie?N(A.dynamicChildren,ie,ue,J,oe,Ga($,ne),te):de||Y(A,$,ue,null,J,oe,Ga($,ne),te,!1),ce>0){if(ce&16)S(ue,he,I,J,ne);else if(ce&2&&he.class!==I.class&&i(ue,"class",null,I.class,ne),ce&4&&i(ue,"style",he.style,I.style,ne),ce&8){const M=$.dynamicProps;for(let D=0;D<M.length;D++){const L=M[D],Z=he[L],me=I[L];(me!==Z||L==="value")&&i(ue,L,Z,me,ne,J)}}ce&1&&A.children!==$.children&&c(ue,$.children)}else!de&&ie==null&&S(ue,he,I,J,ne);((F=I.onVnodeUpdated)||Se)&&lt(()=>{F&&Vt(F,J,$,A),Se&&Tr($,A,J,"updated")},oe)},N=(A,$,J,oe,ne,te,de)=>{for(let ue=0;ue<$.length;ue++){const ce=A[ue],ie=$[ue];y(ce,ie,ce.el&&(ce.type===Le||!vr(ce,ie)||ce.shapeFlag&198)?d(ce.el):J,null,oe,ne,te,de,!0)}},S=(A,$,J,oe,ne)=>{if($!==J){if($!==qe)for(const te in $)!Dn(te)&&!(te in J)&&i(A,te,$[te],null,ne,oe);for(const te in J){if(Dn(te))continue;const de=J[te],ue=$[te];de!==ue&&te!=="value"&&i(A,te,ue,de,ne,oe)}"value"in J&&i(A,"value",$.value,J.value,ne)}},w=(A,$,J,oe,ne,te,de,ue,ce)=>{const ie=$.el=A?A.el:a(""),Se=$.anchor=A?A.anchor:a("");let{patchFlag:he,dynamicChildren:I,slotScopeIds:F}=$;F&&(ue=ue?ue.concat(F):F),A==null?(n(ie,J,oe),n(Se,J,oe),g($.children||[],J,Se,ne,te,de,ue,ce)):he>0&&he&64&&I&&A.dynamicChildren&&A.dynamicChildren.length===I.length?(N(A.dynamicChildren,I,J,ne,te,de,ue),($.key!=null||ne&&$===ne.subTree)&&Ja(A,$,!0)):Y(A,$,J,Se,ne,te,de,ue,ce)},E=(A,$,J,oe,ne,te,de,ue,ce)=>{$.slotScopeIds=ue,A==null?$.shapeFlag&512?ne.ctx.activate($,J,oe,de,ce):q($,J,oe,ne,te,de,ce):Q(A,$,ce)},q=(A,$,J,oe,ne,te,de)=>{const ue=A.component=Sd(A,oe,ne);if(Js(A)&&(ue.ctx.renderer=Qe),xd(ue,!1,de),ue.asyncDep){if(ne&&ne.registerDep(ue,z,de),!A.el){const ce=ue.subTree=H(ot);v(null,ce,$,J),A.placeholder=ce.el}}else z(ue,A,$,J,ne,te,de)},Q=(A,$,J)=>{const oe=$.component=A.component;if(nm(A,$,J))if(oe.asyncDep&&!oe.asyncResolved){X(oe,$,J);return}else oe.next=$,oe.update();else $.el=A.el,oe.vnode=$},z=(A,$,J,oe,ne,te,de)=>{const ue=()=>{if(A.isMounted){let{next:he,bu:I,u:F,parent:M,vnode:D}=A;{const Me=hd(A);if(Me){he&&(he.el=D.el,X(A,he,de)),Me.asyncDep.then(()=>{lt(()=>{A.isUnmounted||ie()},ne)});return}}let L=he,Z;qn(A,!1),he?(he.el=D.el,X(A,he,de)):he=D,I&&ss(I),(Z=he.props&&he.props.onVnodeBeforeUpdate)&&Vt(Z,M,he,D),qn(A,!0);const me=io(A),Ie=A.subTree;A.subTree=me,y(Ie,me,d(Ie.el),Ze(Ie),A,ne,te),he.el=me.el,L===null&&oo(A,me.el),F&&lt(F,ne),(Z=he.props&&he.props.onVnodeUpdated)&&lt(()=>Vt(Z,M,he,D),ne)}else{let he;const{el:I,props:F}=$,{bm:M,m:D,parent:L,root:Z,type:me}=A,Ie=jr($);if(qn(A,!1),M&&ss(M),!Ie&&(he=F&&F.onVnodeBeforeMount)&&Vt(he,L,$),qn(A,!0),I&&gt){const Me=()=>{A.subTree=io(A),gt(I,A.subTree,A,ne,null)};Ie&&me.__asyncHydrate?me.__asyncHydrate(I,A,Me):Me()}else{Z.ce&&Z.ce._hasShadowRoot()&&Z.ce._injectChildStyle(me);const Me=A.subTree=io(A);y(null,Me,J,oe,A,ne,te),$.el=Me.el}if(D&&lt(D,ne),!Ie&&(he=F&&F.onVnodeMounted)){const Me=$;lt(()=>Vt(he,L,Me),ne)}($.shapeFlag&256||L&&jr(L.vnode)&&L.vnode.shapeFlag&256)&&A.a&&lt(A.a,ne),A.isMounted=!0,$=J=oe=null}};A.scope.on();const ce=A.effect=new Hs(ue);A.scope.off();const ie=A.update=ce.run.bind(ce),Se=A.job=ce.runIfDirty.bind(ce);Se.i=A,Se.id=A.uid,ce.scheduler=()=>Ta(Se),qn(A,!0),ie()},X=(A,$,J)=>{$.component=A;const oe=A.vnode.props;A.vnode=$,A.next=null,im(A,$.props,oe,J),cm(A,$.children,J),Or(),uu(A),Hr()},Y=(A,$,J,oe,ne,te,de,ue,ce=!1)=>{const ie=A&&A.children,Se=A?A.shapeFlag:0,he=$.children,{patchFlag:I,shapeFlag:F}=$;if(I>0){if(I&128){K(ie,he,J,oe,ne,te,de,ue,ce);return}else if(I&256){le(ie,he,J,oe,ne,te,de,ue,ce);return}}F&8?(Se&16&&ke(ie,ne,te),he!==ie&&c(J,he)):Se&16?F&16?K(ie,he,J,oe,ne,te,de,ue,ce):ke(ie,ne,te,!0):(Se&8&&c(J,""),F&16&&g(he,J,oe,ne,te,de,ue,ce))},le=(A,$,J,oe,ne,te,de,ue,ce)=>{A=A||es,$=$||es;const ie=A.length,Se=$.length,he=Math.min(ie,Se);let I;for(I=0;I<he;I++){const F=$[I]=ce?Kr($[I]):Ft($[I]);y(A[I],F,J,null,ne,te,de,ue,ce)}ie>Se?ke(A,ne,te,!0,!1,he):g($,J,oe,ne,te,de,ue,ce,he)},K=(A,$,J,oe,ne,te,de,ue,ce)=>{let ie=0;const Se=$.length;let he=A.length-1,I=Se-1;for(;ie<=he&&ie<=I;){const F=A[ie],M=$[ie]=ce?Kr($[ie]):Ft($[ie]);if(vr(F,M))y(F,M,J,null,ne,te,de,ue,ce);else break;ie++}for(;ie<=he&&ie<=I;){const F=A[he],M=$[I]=ce?Kr($[I]):Ft($[I]);if(vr(F,M))y(F,M,J,null,ne,te,de,ue,ce);else break;he--,I--}if(ie>he){if(ie<=I){const F=I+1,M=F<Se?$[F].el:oe;for(;ie<=I;)y(null,$[ie]=ce?Kr($[ie]):Ft($[ie]),J,M,ne,te,de,ue,ce),ie++}}else if(ie>I)for(;ie<=he;)fe(A[ie],ne,te,!0),ie++;else{const F=ie,M=ie,D=new Map;for(ie=M;ie<=I;ie++){const vt=$[ie]=ce?Kr($[ie]):Ft($[ie]);vt.key!=null&&D.set(vt.key,ie)}let L,Z=0;const me=I-M+1;let Ie=!1,Me=0;const Ge=new Array(me);for(ie=0;ie<me;ie++)Ge[ie]=0;for(ie=F;ie<=he;ie++){const vt=A[ie];if(Z>=me){fe(vt,ne,te,!0);continue}let Kt;if(vt.key!=null)Kt=D.get(vt.key);else for(L=M;L<=I;L++)if(Ge[L-M]===0&&vr(vt,$[L])){Kt=L;break}Kt===void 0?fe(vt,ne,te,!0):(Ge[Kt-M]=ie+1,Kt>=Me?Me=Kt:Ie=!0,y(vt,$[Kt],J,null,ne,te,de,ue,ce),Z++)}const Tt=Ie?um(Ge):es;for(L=Tt.length-1,ie=me-1;ie>=0;ie--){const vt=M+ie,Kt=$[vt],Xn=$[vt+1],Xh=vt+1<Se?Xn.el||gd(Xn):oe;Ge[ie]===0?y(null,Kt,J,Xh,ne,te,de,ue,ce):Ie&&(L<0||ie!==Tt[L]?ae(Kt,J,Xh,2):L--)}}},ae=(A,$,J,oe,ne=null)=>{const{el:te,type:de,transition:ue,children:ce,shapeFlag:ie}=A;if(ie&6){ae(A.component.subTree,$,J,oe);return}if(ie&128){A.suspense.move($,J,oe);return}if(ie&64){de.move(A,$,J,Qe);return}if(de===Le){n(te,$,J);for(let Se=0;Se<ce.length;Se++)ae(ce[Se],$,J,oe);n(A.anchor,$,J);return}if(de===Bn){b(A,$,J);return}if(oe!==2&&ie&1&&ue)if(oe===0)ue.beforeEnter(te),n(te,$,J),lt(()=>ue.enter(te),ne);else{const{leave:Se,delayLeave:he,afterLeave:I}=ue,F=()=>{A.ctx.isUnmounted?s(te):n(te,$,J)},M=()=>{te._isLeaving&&te[Er](!0),Se(te,()=>{F(),I&&I()})};he?he(te,F,M):M()}else n(te,$,J)},fe=(A,$,J,oe=!1,ne=!1)=>{const{type:te,props:de,ref:ue,children:ce,dynamicChildren:ie,shapeFlag:Se,patchFlag:he,dirs:I,cacheIndex:F}=A;if(he===-2&&(ne=!1),ue!=null&&(Or(),fs(ue,null,J,A,!0),Hr()),F!=null&&($.renderCache[F]=void 0),Se&256){$.ctx.deactivate(A);return}const M=Se&1&&I,D=!jr(A);let L;if(D&&(L=de&&de.onVnodeBeforeUnmount)&&Vt(L,$,A),Se&6)Te(A.component,J,oe);else{if(Se&128){A.suspense.unmount(J,oe);return}M&&Tr(A,null,$,"beforeUnmount"),Se&64?A.type.remove(A,$,J,Qe,oe):ie&&!ie.hasOnce&&(te!==Le||he>0&&he&64)?ke(ie,$,J,!1,!0):(te===Le&&he&384||!ne&&Se&16)&&ke(ce,$,J),oe&&Ce(A)}(D&&(L=de&&de.onVnodeUnmounted)||M)&&lt(()=>{L&&Vt(L,$,A),M&&Tr(A,null,$,"unmounted")},J)},Ce=A=>{const{type:$,el:J,anchor:oe,transition:ne}=A;if($===Le){Oe(J,oe);return}if($===Bn){_(A);return}const te=()=>{s(J),ne&&!ne.persisted&&ne.afterLeave&&ne.afterLeave()};if(A.shapeFlag&1&&ne&&!ne.persisted){const{leave:de,delayLeave:ue}=ne,ce=()=>de(J,te);ue?ue(A.el,te,ce):ce()}else te()},Oe=(A,$)=>{let J;for(;A!==$;)J=p(A),s(A),A=J;s($)},Te=(A,$,J)=>{const{bum:oe,scope:ne,job:te,subTree:de,um:ue,m:ce,a:ie}=A;ao(ce),ao(ie),oe&&ss(oe),ne.stop(),te&&(te.flags|=8,fe(de,A,$,J)),ue&&lt(ue,$),lt(()=>{A.isUnmounted=!0},$)},ke=(A,$,J,oe=!1,ne=!1,te=0)=>{for(let de=te;de<A.length;de++)fe(A[de],$,J,oe,ne)},Ze=A=>{if(A.shapeFlag&6)return Ze(A.component.subTree);if(A.shapeFlag&128)return A.suspense.next();const $=p(A.anchor||A.el),J=$&&$[mu];return J?p(J):$};let ut=!1;const Ve=(A,$,J)=>{let oe;A==null?$._vnode&&(fe($._vnode,null,null,!0),oe=$._vnode.component):y($._vnode||null,A,$,null,null,null,J),$._vnode=A,ut||(ut=!0,uu(oe),Ui(),ut=!1)},Qe={p:y,um:fe,m:ae,r:Ce,mt:q,mc:g,pc:Y,pbc:N,n:Ze,o:e};let dt,gt;return t&&([dt,gt]=t(Qe)),{render:Ve,hydrate:dt,createApp:Yv(Ve,dt)}}function Ga({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 qn({effect:e,job:t},r){r?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function pd(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ja(e,t,r=!1){const n=e.children,s=t.children;if(we(n)&&we(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]=Kr(s[i]),a.el=o.el),!r&&a.patchFlag!==-2&&Ja(o,a)),a.type===cn&&(a.patchFlag===-1&&(a=s[i]=Kr(a)),a.el=o.el),a.type===ot&&!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 hd(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:hd(t)}function ao(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function gd(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?gd(t.subTree):null}var lo=e=>e.__isSuspense,Ya=0,dm={name:"Suspense",__isSuspense:!0,process(e,t,r,n,s,i,o,a,l,u){if(e==null)fm(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}pm(e,t,r,n,s,o,a,l,u)}},hydrate:hm,normalize:gm};function ri(e,t){const r=e.props&&e.props[t];Ee(r)&&r()}function fm(e,t,r,n,s,i,o,a,l){const{p:u,o:{createElement:c}}=l,d=c("div"),p=e.suspense=vd(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?(ri(e,"onPending"),ri(e,"onFallback"),u(null,e.ssFallback,t,r,n,null,i,o),vs(p,e.ssFallback)):p.resolve(!1,!0)}function pm(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:y,isInFallback:T,isHydrating:v}=d;if(y)d.pendingBranch=p,vr(y,p)?(l(y,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0?d.resolve():T&&(v||(l(m,h,r,n,s,null,i,o,a),vs(d,h)))):(d.pendingId=Ya++,v?(d.isHydrating=!1,d.activeBranch=y):u(y,s,d),d.deps=0,d.effects.length=0,d.hiddenContainer=c("div"),T?(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),vs(d,h))):m&&vr(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&&vr(m,p))l(m,p,r,n,s,d,i,o,a),vs(d,p);else if(ri(t,"onPending"),d.pendingBranch=p,p.shapeFlag&512?d.pendingId=p.component.suspenseId:d.pendingId=Ya++,l(null,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0)d.resolve();else{const{timeout:x,pendingId:b}=d;x>0?setTimeout(()=>{d.pendingId===b&&d.fallback(h)},x):x===0&&d.fallback(h)}}function vd(e,t,r,n,s,i,o,a,l,u,c=!1){const{p:d,m:p,um:h,n:m,o:{parentNode:y,remove:T}}=u;let v;const x=vm(e);x&&t&&t.pendingBranch&&(v=t.pendingId,t.deps++);const b=e.props?Ri(e.props.timeout):void 0,_=i,C={vnode:e,parent:t,parentComponent:r,namespace:o,container:n,hiddenContainer:s,deps:0,pendingId:Ya++,timeout:typeof b=="number"?b:-1,activeBranch:null,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(k=!1,O=!1){const{vnode:g,activeBranch:B,pendingBranch:N,pendingId:S,effects:w,parentComponent:E,container:q,isInFallback:Q}=C;let z=!1;C.isHydrating?C.isHydrating=!1:k||(z=B&&N.transition&&N.transition.mode==="out-in",z&&(B.transition.afterLeave=()=>{S===C.pendingId&&(p(N,q,i===_?m(B):i,0),js(w),Q&&g.ssFallback&&(g.ssFallback.el=null))}),B&&(y(B.el)===q&&(i=m(B)),h(B,E,C,!0),!z&&Q&&g.ssFallback&&lt(()=>g.ssFallback.el=null,C)),z||p(N,q,i,0)),vs(C,N),C.pendingBranch=null,C.isInFallback=!1;let X=C.parent,Y=!1;for(;X;){if(X.pendingBranch){X.effects.push(...w),Y=!0;break}X=X.parent}!Y&&!z&&js(w),C.effects=[],x&&t&&t.pendingBranch&&v===t.pendingId&&(t.deps--,t.deps===0&&!O&&t.resolve()),ri(g,"onResolve")},fallback(k){if(!C.pendingBranch)return;const{vnode:O,activeBranch:g,parentComponent:B,container:N,namespace:S}=C;ri(O,"onFallback");const w=m(g),E=()=>{C.isInFallback&&(d(null,k,N,w,B,null,S,a,l),vs(C,k))},q=k.transition&&k.transition.mode==="out-in";q&&(g.transition.afterLeave=E),C.isInFallback=!0,h(g,B,null,!0),q||E()},move(k,O,g){C.activeBranch&&p(C.activeBranch,k,O,g),C.container=k},next(){return C.activeBranch&&m(C.activeBranch)},registerDep(k,O,g){const B=!!C.pendingBranch;B&&C.deps++;const N=k.vnode.el;k.asyncDep.catch(S=>{Hn(S,k,0)}).then(S=>{if(k.isUnmounted||C.isUnmounted||C.pendingId!==k.suspenseId)return;k.asyncResolved=!0;const{vnode:w}=k;el(k,S,!1),N&&(w.el=N);const E=!N&&k.subTree.el;O(k,w,y(N||k.subTree.el),N?null:m(k.subTree),C,o,g),E&&(w.placeholder=null,T(E)),oo(k,w.el),B&&--C.deps===0&&C.resolve()})},unmount(k,O){C.isUnmounted=!0,C.activeBranch&&h(C.activeBranch,r,k,O),C.pendingBranch&&h(C.pendingBranch,r,k,O)}};return C}function hm(e,t,r,n,s,i,o,a,l){const u=t.suspense=vd(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=md(n?r.default:r),e.ssFallback=n?md(r.fallback):H(ot)}function md(e){let t;if(Ee(e)){const r=Ln&&e._c;r&&(e._d=!1,P()),e=e(),r&&(e._d=!0,t=Rt,yd())}return we(e)&&(e=em(e)),e=Ft(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(r=>r!==e)),e}function wd(e,t){t&&t.pendingBranch?we(e)?t.effects.push(...e):t.effects.push(e):js(e)}function vs(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,oo(n,s))}function vm(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}var Le=Symbol.for("v-fgt"),cn=Symbol.for("v-txt"),ot=Symbol.for("v-cmt"),Bn=Symbol.for("v-stc"),ni=[],Rt=null;function P(e=!1){ni.push(Rt=e?null:[])}function yd(){ni.pop(),Rt=ni[ni.length-1]||null}var Ln=1;function si(e,t=!1){Ln+=e,e<0&&Rt&&t&&(Rt.hasOnce=!0)}function bd(e){return e.dynamicChildren=Ln>0?Rt||es:null,yd(),Ln>0&&Rt&&Rt.push(e),e}function ye(e,t,r,n,s,i){return bd(re(e,t,r,n,s,i,!0))}function W(e,t,r,n,s){return bd(H(e,t,r,n,s,!0))}function zr(e){return e?e.__v_isVNode===!0:!1}function vr(e,t){return e.type===t.type&&e.key===t.key}function mm(e){}var _d=({key:e})=>e??null,co=({ref:e,ref_key:t,ref_for:r})=>(typeof e=="number"&&(e=""+e),e!=null?et(e)||Je(e)||Ee(e)?{i:St,r:e,k:t,f:!!r}:e:null);function re(e,t=null,r=null,n=0,s=null,i=e===Le?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&_d(t),ref:t&&co(t),scopeId:Ki,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:St};return a?(Xa(l,r),i&128&&e.normalize(l)):r&&(l.shapeFlag|=et(r)?8:16),Ln>0&&!o&&Rt&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&Rt.push(l),l}var H=wm;function wm(e,t=null,r=null,n=0,s=null,i=!1){if((!e||e===Fu)&&(e=ot),zr(e)){const a=mr(e,t,!0);return r&&Xa(a,r),Ln>0&&!i&&Rt&&(a.shapeFlag&6?Rt[Rt.indexOf(e)]=a:Rt.push(a)),a.patchFlag=-2,a}if(Tm(e)&&(e=e.__vccOpts),t){t=sr(t);let{class:a,style:l}=t;a&&!et(a)&&(t.class=Xe(a)),je(l)&&(Fs(l)&&!we(l)&&(l=Ke({},l)),t.style=mt(l))}const o=et(e)?1:lo(e)?128:wu(e)?64:je(e)?4:Ee(e)?2:0;return re(e,t,r,n,s,o,i,!0)}function sr(e){return e?Fs(e)||nd(e)?Ke({},e):e:null}function mr(e,t,r=!1,n=!1){const{props:s,ref:i,patchFlag:o,children:a,transition:l}=e,u=t?ge(s||{},t):s,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&_d(u),ref:t&&t.ref?r&&i?we(i)?i.concat(co(t)):[i,co(t)]:co(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!==Le?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&&mr(e.ssContent),ssFallback:e.ssFallback&&mr(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&n&&Vr(c,l.clone(c)),c}function Ne(e=" ",t=0){return H(cn,null,e,t)}function Za(e,t){const r=H(Bn,null,e);return r.staticCount=t,r}function Pe(e="",t=!1){return t?(P(),W(ot,null,e)):H(ot,null,e)}function Ft(e){return e==null||typeof e=="boolean"?H(ot):we(e)?H(Le,null,e.slice()):zr(e)?Kr(e):H(cn,null,String(e))}function Kr(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:mr(e)}function Xa(e,t){let r=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(we(t))r=16;else if(typeof t=="object")if(n&65){const s=t.default;s&&(s._c&&(s._d=!1),Xa(e,s()),s._c&&(s._d=!0));return}else{r=32;const s=t._;!s&&!nd(t)?t._ctx=St:s===3&&St&&(St.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Ee(t)?(t={default:t,_ctx:St},r=32):(t=String(t),n&64?(r=16,t=[Ne(t)]):r=8);e.children=t,e.shapeFlag|=r}function ge(...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=Xe([t.class,n.class]));else if(s==="style")t.style=mt([t.style,n.style]);else if(Ds(s)){const i=t[s],o=n[s];o&&i!==o&&!(we(i)&&i.includes(o))&&(t[s]=i?[].concat(i,o):o)}else s!==""&&(t[s]=n[s])}return t}function Vt(e,t,r,n=null){tr(e,t,7,[r,n])}var ym=Yu(),bm=0;function Sd(e,t,r){const n=e.type,s=(t?t.appContext:e.appContext)||ym,i={uid:bm++,vnode:e,type:n,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ua(!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:id(n,s),emitsOptions:Xu(n,s),emit:null,emitted:null,propsDefaults:qe,inheritAttrs:n.inheritAttrs,ctx:qe,data:qe,props:qe,attrs:qe,slots:qe,refs:qe,setupState:qe,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=Xv.bind(null,i),e.ce&&e.ce(i),i}var Ct=null,at=()=>Ct||St,uo,Qa;{const e=$i(),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)}};uo=t("__VUE_INSTANCE_SETTERS__",r=>Ct=r),Qa=t("__VUE_SSR_SETTERS__",r=>ms=r)}var Fn=e=>{const t=Ct;return uo(e),e.scope.on(),()=>{e.scope.off(),uo(t)}},fo=()=>{Ct&&Ct.scope.off(),uo(null)};function Cd(e){return e.vnode.shapeFlag&4}var ms=!1;function xd(e,t=!1,r=!1){t&&Qa(t);const{props:n,children:s}=e.vnode,i=Cd(e);sm(e,n,i,t),lm(e,s,r||t);const o=i?_m(e,t):void 0;return t&&Qa(!1),o}function _m(e,t){const r=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Fa);const{setup:n}=r;if(n){Or();const s=e.setupContext=n.length>1?Ed(e):null,i=Fn(e),o=as(n,e,0,[e.props,s]),a=la(o);if(Hr(),i(),(a||e.sp)&&!jr(e)&&Da(e),a){if(o.then(fo,fo),t)return o.then(l=>{el(e,l,t)}).catch(l=>{Hn(l,e,0)});e.asyncDep=o}else el(e,o,t)}else Td(e,t)}function el(e,t,r){Ee(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:je(t)&&(e.setupState=Ca(t)),Td(e,r)}var po,tl;function Sm(e){po=e,tl=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,$v))}}var Cm=()=>!po;function Td(e,t,r){const n=e.type;if(!e.render){if(!t&&po&&!n.render){const s=n.template||ja(e).template;if(s){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:a,compilerOptions:l}=n,u=Ke(Ke({isCustomElement:i,delimiters:a},o),l);n.render=po(s,u)}}e.render=n.render||er,tl&&tl(e)}{const s=Fn(e);Or();try{Uv(e)}finally{Hr(),s()}}}var xm={get(e,t){return At(e,"get",""),e[t]}};function Ed(e){const t=r=>{e.exposed=r||{}};return{attrs:new Proxy(e.attrs,xm),slots:e.slots,emit:e.emit,expose:t}}function ii(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ca(Sa(e.exposed)),{get(t,r){if(r in t)return t[r];if(r in Qs)return Qs[r](e)},has(t,r){return r in t||r in Qs}})):e.proxy}function rl(e,t=!0){return Ee(e)?e.displayName||e.name:e.name||t&&e.__name}function Tm(e){return Ee(e)&&"__vccOpts"in e}var j=(e,t)=>Kg(e,t,ms);function ir(e,t,r){try{si(-1);const n=arguments.length;return n===2?je(t)&&!we(t)?zr(t)?H(e,null,[t]):H(e,t):H(e,null,t):(n>3?r=Array.prototype.slice.call(arguments,2):n===3&&zr(r)&&(r=[r]),H(e,t,r))}finally{si(1)}}function Em(){return;function e(t,r,n){const s=t[n];if(we(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 Am(e,t,r,n){const s=r[n];if(s&&Ad(s,e))return s;const i=t();return i.memo=e.slice(),i.cacheIndex=n,r[n]=i}function Ad(e,t){const r=e.memo;if(r.length!=t.length)return!1;for(let n=0;n<r.length;n++)if(Dt(r[n],t[n]))return!1;return Ln>0&&Rt&&Rt.push(e),!0}var kd="3.5.29",km=er,Im=tv,Rm=us,$m=fu,Pm={createComponentInstance:Sd,setupComponent:xd,renderComponentRoot:io,setCurrentRenderingInstance:zs,isVNode:zr,normalizeVNode:Ft,getComponentPublicInstance:ii,ensureValidVNode:qa,pushWarningContext:Zg,popWarningContext:Xg},ix=null,ox=null,ax=null;var nl=void 0,Id=typeof window<"u"&&window.trustedTypes;if(Id)try{nl=Id.createPolicy("vue",{createHTML:e=>e})}catch{}var Rd=nl?e=>nl.createHTML(e):e=>e,Dm="http://www.w3.org/2000/svg",Om="http://www.w3.org/1998/Math/MathML",Wr=typeof document<"u"?document:null,$d=Wr&&Wr.createElement("template"),Pd={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"?Wr.createElementNS(Dm,e):t==="mathml"?Wr.createElementNS(Om,e):r?Wr.createElement(e,{is:r}):Wr.createElement(e);return e==="select"&&n&&n.multiple!=null&&s.setAttribute("multiple",n.multiple),s},createText:e=>Wr.createTextNode(e),createComment:e=>Wr.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Wr.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{$d.innerHTML=Rd(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=$d.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]}},un="transition",oi="animation",ws=Symbol("_vtc"),Dd={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},Od=Ke({},$a,Dd),Hm=e=>(e.displayName="Transition",e.props=Od,e),Mm=Hm((e,{slots:t})=>ir(Tu,Md(e),t)),Vn=(e,t=[])=>{we(e)?e.forEach(r=>r(...t)):e&&e(...t)},Hd=e=>e?we(e)?e.some(t=>t.length>1):e.length>1:!1;function Md(e){const t={};for(const w in e)w in Dd||(t[w]=e[w]);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=Nm(s),y=m&&m[0],T=m&&m[1],{onBeforeEnter:v,onEnter:x,onEnterCancelled:b,onLeave:_,onLeaveCancelled:C,onBeforeAppear:k=v,onAppear:O=x,onAppearCancelled:g=b}=t,B=(w,E,q,Q)=>{w._enterCancelled=Q,dn(w,E?c:a),dn(w,E?u:o),q&&q()},N=(w,E)=>{w._isLeaving=!1,dn(w,d),dn(w,h),dn(w,p),E&&E()},S=w=>(E,q)=>{const Q=w?O:x,z=()=>B(E,w,q);Vn(Q,[E,z]),Nd(()=>{dn(E,w?l:i),Ar(E,w?c:a),Hd(Q)||qd(E,n,y,z)})};return Ke(t,{onBeforeEnter(w){Vn(v,[w]),Ar(w,i),Ar(w,o)},onBeforeAppear(w){Vn(k,[w]),Ar(w,l),Ar(w,u)},onEnter:S(!1),onAppear:S(!0),onLeave(w,E){w._isLeaving=!0;const q=()=>N(w,E);Ar(w,d),w._enterCancelled?(Ar(w,p),il(w)):(il(w),Ar(w,p)),Nd(()=>{w._isLeaving&&(dn(w,d),Ar(w,h),Hd(_)||qd(w,n,T,q))}),Vn(_,[w,q])},onEnterCancelled(w){B(w,!1,void 0,!0),Vn(b,[w])},onAppearCancelled(w){B(w,!0,void 0,!0),Vn(g,[w])},onLeaveCancelled(w){N(w),Vn(C,[w])}})}function Nm(e){if(e==null)return null;if(je(e))return[sl(e.enter),sl(e.leave)];{const t=sl(e);return[t,t]}}function sl(e){return Ri(e)}function Ar(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.add(r)),(e[ws]||(e[ws]=new Set)).add(t)}function dn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const r=e[ws];r&&(r.delete(t),r.size||(e[ws]=void 0))}function Nd(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var qm=0;function qd(e,t,r,n){const s=e._endId=++qm,i=()=>{s===e._endId&&n()};if(r!=null)return setTimeout(i,r);const{type:o,timeout:a,propCount:l}=Bd(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 Bd(e,t){const r=window.getComputedStyle(e),n=m=>(r[m]||"").split(", "),s=n(`${un}Delay`),i=n(`${un}Duration`),o=Ld(s,i),a=n(`${oi}Delay`),l=n(`${oi}Duration`),u=Ld(a,l);let c=null,d=0,p=0;t===un?o>0&&(c=un,d=o,p=i.length):t===oi?u>0&&(c=oi,d=u,p=l.length):(d=Math.max(o,u),c=d>0?o>u?un:oi:null,p=c?c===un?i.length:l.length:0);const h=c===un&&/\b(?:transform|all)(?:,|$)/.test(n(`${un}Property`).toString());return{type:c,timeout:d,propCount:p,hasTransform:h}}function Ld(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((r,n)=>Fd(r)+Fd(e[n])))}function Fd(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function il(e){return(e?e.ownerDocument:document).body.offsetHeight}function Bm(e,t,r){const n=e[ws];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):r?e.setAttribute("class",t):e.className=t}var ho=Symbol("_vod"),Vd=Symbol("_vsh"),go={name:"show",beforeMount(e,{value:t},{transition:r}){e[ho]=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[ho]:"none",e[Vd]=!t}function Lm(){go.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}var jd=Symbol("");function Fm(e){const t=at();if(!t)return;const r=t.ut=(s=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(i=>vo(i,s))},n=()=>{const s=e(t.proxy);t.ce?vo(t.ce,s):ol(t.subTree,s),r(s)};Ha(()=>{js(n)}),We(()=>{Re(n,er,{flush:"post"});const s=new MutationObserver(n);s.observe(t.subTree.el.parentNode,{childList:!0}),Mt(()=>s.disconnect())})}function ol(e,t){if(e.shapeFlag&128){const r=e.suspense;e=r.activeBranch,r.pendingBranch&&!r.isHydrating&&r.effects.push(()=>{ol(r.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)vo(e.el,t);else if(e.type===Le)e.children.forEach(r=>ol(r,t));else if(e.type===Bn){let{el:r,anchor:n}=e;for(;r&&(vo(r,t),r!==n);)r=r.nextSibling}}function vo(e,t){if(e.nodeType===1){const r=e.style;let n="";for(const s in t){const i=wg(t[s]);r.setProperty(`--${s}`,i),n+=`--${s}: ${i};`}r[jd]=n}}var Vm=/(?:^|;)\s*display\s*:/;function jm(e,t,r){const n=e.style,s=et(r);let i=!1;if(r&&!s){if(t)if(et(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();r[a]==null&&mo(n,a,"")}else for(const o in t)r[o]==null&&mo(n,o,"");for(const o in r)o==="display"&&(i=!0),mo(n,o,r[o])}else if(s){if(t!==r){const o=n[jd];o&&(r+=";"+o),n.cssText=r,i=Vm.test(r)}}else t&&e.removeAttribute("style");ho in e&&(e[ho]=i?n.display:"",e[Vd]&&(n.display="none"))}var Ud=/\s*!important$/;function mo(e,t,r){if(we(r))r.forEach(n=>mo(e,t,n));else if(r==null&&(r=""),t.startsWith("--"))e.setProperty(t,r);else{const n=Um(e,t);Ud.test(r)?e.setProperty(Bt(n),r.replace(Ud,""),"important"):e[n]=r}}var zd=["Webkit","Moz","ms"],al={};function Um(e,t){const r=al[t];if(r)return r;let n=ft(t);if(n!=="filter"&&n in e)return al[t]=n;n=Os(n);for(let s=0;s<zd.length;s++){const i=zd[s]+n;if(i in e)return al[t]=i}return t}var Kd="http://www.w3.org/1999/xlink";function Wd(e,t,r,n,s,i=vg(t)){n&&t.startsWith("xlink:")?r==null?e.removeAttributeNS(Kd,t.slice(6,t.length)):e.setAttributeNS(Kd,t,r):r==null||i&&!Mc(r)?e.removeAttribute(t):e.setAttribute(t,i?"":fr(r)?String(r):r)}function Gd(e,t,r,n,s){if(t==="innerHTML"||t==="textContent"){r!=null&&(e[t]=t==="innerHTML"?Rd(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=Mc(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 Gr(e,t,r,n){e.addEventListener(t,r,n)}function zm(e,t,r,n){e.removeEventListener(t,r,n)}var Jd=Symbol("_vei");function Km(e,t,r,n,s=null){const i=e[Jd]||(e[Jd]={}),o=i[t];if(n&&o)o.value=n;else{const[a,l]=Wm(t);n?Gr(e,a,i[t]=Ym(n,s),l):o&&(zm(e,a,o,l),i[t]=void 0)}}var Yd=/(?:Once|Passive|Capture)$/;function Wm(e){let t;if(Yd.test(e)){t={};let r;for(;r=e.match(Yd);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Bt(e.slice(2)),t]}var ll=0,Gm=Promise.resolve(),Jm=()=>ll||(Gm.then(()=>ll=0),ll=Date.now());function Ym(e,t){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;tr(Zm(n,r.value),t,5,[n])};return r.value=e,r.attached=Jm(),r}function Zm(e,t){if(we(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 Zd=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Xd=(e,t,r,n,s,i)=>{const o=s==="svg";t==="class"?Bm(e,n,o):t==="style"?jm(e,r,n):Ds(t)?oa(t)||Km(e,t,r,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Xm(e,t,n,o))?(Gd(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Wd(e,t,n,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!et(n))?Gd(e,ft(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Wd(e,t,n,o))};function Xm(e,t,r,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Zd(t)&&Ee(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 Zd(t)&&et(r)?!1:t in e}var Qd={};function cl(e,t,r){let n=ee(e,t);Ei(n)&&(n=Ke({},n,t));class s extends ef{constructor(o){super(n,o,r)}}return s.def=n,s}var Qm=((e,t)=>cl(e,t,bf)),e0=typeof HTMLElement<"u"?HTMLElement:class{},ef=class Qh extends e0{constructor(t,r={},n=pl){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!==pl?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(Ke({},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 Qh){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,wt(()=>{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&&!we(i))for(const l in i){const u=i[l];(u===Number||u&&u.type===Number)&&(l in this._props&&(this._props[l]=Ri(this._props[l])),(a||(a=Object.create(null)))[ft(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=we(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(ft))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):Qd;const s=ft(t);r&&this._numberProps&&this._numberProps[s]&&(n=Ri(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===Qd?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(Bt(t),""):typeof r=="string"||typeof r=="number"?this.setAttribute(Bt(t),r+""):r||this.removeAttribute(Bt(t)),i&&i.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),yf(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const r=H(this._def,Ke(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,Ei(o[0])?Ke({detail:o},o[0]):{detail:o}))};n.emit=(i,...o)=>{s(i,o),Bt(i)!==i&&s(Bt(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 tf(e){const t=at(),r=t&&t.ce;return r||null}function t0(){const e=tf();return e&&e.shadowRoot}function r0(e="$style"){{const t=at();if(!t)return qe;const r=t.type.__cssModules;if(!r)return qe;const n=r[e];return n||qe}}var rf=new WeakMap,nf=new WeakMap,wo=Symbol("_moveCb"),sf=Symbol("_enterCb"),n0=e=>(delete e.props.mode,e),s0=n0({name:"TransitionGroup",props:Ke({},Od,{tag:String,moveClass:String}),setup(e,{slots:t}){const r=at(),n=Ra();let s,i;return Zs(()=>{if(!s.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!l0(s[0].el,r.vnode.el,o)){s=[];return}s.forEach(i0),s.forEach(o0);const a=s.filter(a0);il(r.vnode.el),a.forEach(l=>{const u=l.el,c=u.style;Ar(u,o),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[wo]=p=>{p&&p.target!==u||(!p||p.propertyName.endsWith("transform"))&&(u.removeEventListener("transitionend",d),u[wo]=null,dn(u,o))};u.addEventListener("transitionend",d)}),s=[]}),()=>{const o=Be(e),a=Md(o);let l=o.tag||Le;if(s=[],i)for(let u=0;u<i.length;u++){const c=i[u];c.el&&c.el instanceof Element&&(s.push(c),Vr(c,ds(c,a,n,r)),rf.set(c,of(c.el)))}i=t.default?Yi(t.default()):[];for(let u=0;u<i.length;u++){const c=i[u];c.key!=null&&Vr(c,ds(c,a,n,r))}return H(l,null,i)}}});function i0(e){const t=e.el;t[wo]&&t[wo](),t[sf]&&t[sf]()}function o0(e){nf.set(e,of(e.el))}function a0(e){const t=rf.get(e),r=nf.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 of(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function l0(e,t,r){const n=e.cloneNode(),s=e[ws];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}=Bd(n);return i.removeChild(n),o}var fn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return we(t)?r=>ss(t,r):t};function c0(e){e.target.composing=!0}function af(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}var or=Symbol("_assign");function lf(e,t,r){return t&&(e=e.trim()),r&&(e=Ii(e)),e}var li={created(e,{modifiers:{lazy:t,trim:r,number:n}},s){e[or]=fn(s);const i=n||s.props&&s.props.type==="number";Gr(e,t?"change":"input",o=>{o.target.composing||e[or](lf(e.value,r,i))}),(r||i)&&Gr(e,"change",()=>{e.value=lf(e.value,r,i)}),t||(Gr(e,"compositionstart",c0),Gr(e,"compositionend",af),Gr(e,"change",af))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:r,modifiers:{lazy:n,trim:s,number:i}},o){if(e[or]=fn(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?Ii(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))}},ul={deep:!0,created(e,t,r){e[or]=fn(r),Gr(e,"change",()=>{const n=e._modelValue,s=ys(e),i=e.checked,o=e[or];if(we(n)){const a=Pi(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(Pn(n)){const a=new Set(n);i?a.add(s):a.delete(s),o(a)}else o(ff(e,i))})},mounted:cf,beforeUpdate(e,t,r){e[or]=fn(r),cf(e,t,r)}};function cf(e,{value:t,oldValue:r},n){e._modelValue=t;let s;if(we(t))s=Pi(t,n.props.value)>-1;else if(Pn(t))s=t.has(n.props.value);else{if(t===r)return;s=Dr(t,ff(e,!0))}e.checked!==s&&(e.checked=s)}var dl={created(e,{value:t},r){e.checked=Dr(t,r.props.value),e[or]=fn(r),Gr(e,"change",()=>{e[or](ys(e))})},beforeUpdate(e,{value:t,oldValue:r},n){e[or]=fn(n),t!==r&&(e.checked=Dr(t,n.props.value))}},uf={deep:!0,created(e,{value:t,modifiers:{number:r}},n){const s=Pn(t);Gr(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>r?Ii(ys(o)):ys(o));e[or](e.multiple?s?new Set(i):i:i[0]),e._assigning=!0,wt(()=>{e._assigning=!1})}),e[or]=fn(n)},mounted(e,{value:t}){df(e,t)},beforeUpdate(e,t,r){e[or]=fn(r)},updated(e,{value:t}){e._assigning||df(e,t)}};function df(e,t){const r=e.multiple,n=we(t);if(!(r&&!n&&!Pn(t))){for(let s=0,i=e.options.length;s<i;s++){const o=e.options[s],a=ys(o);if(r)if(n){const l=typeof a;l==="string"||l==="number"?o.selected=t.some(u=>String(u)===String(a)):o.selected=Pi(t,a)>-1}else o.selected=t.has(a);else if(Dr(ys(o),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!r&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ys(e){return"_value"in e?e._value:e.value}function ff(e,t){const r=t?"_trueValue":"_falseValue";return r in e?e[r]:t}var pf={created(e,t,r){yo(e,t,r,null,"created")},mounted(e,t,r){yo(e,t,r,null,"mounted")},beforeUpdate(e,t,r,n){yo(e,t,r,n,"beforeUpdate")},updated(e,t,r,n){yo(e,t,r,n,"updated")}};function hf(e,t){switch(e){case"SELECT":return uf;case"TEXTAREA":return li;default:switch(t){case"checkbox":return ul;case"radio":return dl;default:return li}}}function yo(e,t,r,n,s){const i=hf(e.tagName,r.props&&r.props.type)[s];i&&i(e,t,r,n)}function u0(){li.getSSRProps=({value:e})=>({value:e}),dl.getSSRProps=({value:e},t)=>{if(t.props&&Dr(t.props.value,e))return{checked:!0}},ul.getSSRProps=({value:e},t)=>{if(we(e)){if(t.props&&Pi(e,t.props.value)>-1)return{checked:!0}}else if(Pn(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},pf.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const r=hf(t.type.toUpperCase(),t.props&&t.props.type);if(r.getSSRProps)return r.getSSRProps(e,t)}}var d0=["ctrl","shift","alt","meta"],f0={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)=>d0.some(r=>e[`${r}Key`]&&!t.includes(r))},ar=(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=f0[t[o]];if(a&&a(s,t))return}return e(s,...i)}))},p0={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},fl=(e,t)=>{const r=e._withKeys||(e._withKeys={}),n=t.join(".");return r[n]||(r[n]=(s=>{if(!("key"in s))return;const i=Bt(s.key);if(t.some(o=>o===i||p0[o]===i))return e(s)}))},gf=Ke({patchProp:Xd},Pd),ci,vf=!1;function mf(){return ci||(ci=ud(gf))}function wf(){return ci=vf?ci:dd(gf),vf=!0,ci}var yf=((...e)=>{mf().render(...e)}),h0=((...e)=>{wf().hydrate(...e)}),pl=((...e)=>{const t=mf().createApp(...e),{mount:r}=t;return t.mount=n=>{const s=Sf(n);if(!s)return;const i=t._component;!Ee(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=r(s,!1,_f(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},t}),bf=((...e)=>{const t=wf().createApp(...e),{mount:r}=t;return t.mount=n=>{const s=Sf(n);if(s)return r(s,!0,_f(s))},t});function _f(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Sf(e){return et(e)?document.querySelector(e):e}var Cf=!1,g0=()=>{Cf||(Cf=!0,u0(),Lm())},v0=ig({BaseTransition:()=>Tu,BaseTransitionPropsValidators:()=>$a,Comment:()=>ot,DeprecationTypes:()=>null,EffectScope:()=>ua,ErrorCodes:()=>ev,ErrorTypeStrings:()=>Im,Fragment:()=>Le,KeepAlive:()=>Tv,ReactiveEffect:()=>Hs,Static:()=>Bn,Suspense:()=>dm,Teleport:()=>ka,Text:()=>cn,TrackOpTypes:()=>Wg,Transition:()=>Mm,TransitionGroup:()=>s0,TriggerOpTypes:()=>Gg,VueElement:()=>ef,assertNumber:()=>Qg,callWithAsyncErrorHandling:()=>tr,callWithErrorHandling:()=>as,camelize:()=>ft,capitalize:()=>Os,cloneVNode:()=>mr,compatUtils:()=>null,compile:()=>m0,computed:()=>j,createApp:()=>pl,createBlock:()=>W,createCommentVNode:()=>Pe,createElementBlock:()=>ye,createElementVNode:()=>re,createHydrationRenderer:()=>dd,createPropsRestProxy:()=>Vv,createRenderer:()=>ud,createSSRApp:()=>bf,createSlots:()=>Rv,createStaticVNode:()=>Za,createTextVNode:()=>Ne,createVNode:()=>H,customRef:()=>Vs,defineAsyncComponent:()=>xv,defineComponent:()=>ee,defineCustomElement:()=>cl,defineEmits:()=>Dv,defineExpose:()=>Ov,defineModel:()=>Nv,defineOptions:()=>Hv,defineProps:()=>Pv,defineSSRCustomElement:()=>Qm,defineSlots:()=>Mv,devtools:()=>Rm,effect:()=>bg,effectScope:()=>da,getCurrentInstance:()=>at,getCurrentScope:()=>Di,getCurrentWatcher:()=>Jg,getTransitionRawChildren:()=>Yi,guardReactiveProps:()=>sr,h:()=>ir,handleError:()=>Hn,hasInjectionContext:()=>av,hydrate:()=>h0,hydrateOnIdle:()=>wv,hydrateOnInteraction:()=>Sv,hydrateOnMediaQuery:()=>_v,hydrateOnVisible:()=>bv,initCustomFormatter:()=>Em,initDirectivesForSSR:()=>g0,inject:()=>Ht,isMemoSame:()=>Ad,isProxy:()=>Fs,isReactive:()=>Lr,isReadonly:()=>Cr,isRef:()=>Je,isRuntimeOnly:()=>Cm,isShallow:()=>Lt,isVNode:()=>zr,markRaw:()=>Sa,mergeDefaults:()=>zu,mergeModels:()=>Fv,mergeProps:()=>ge,nextTick:()=>wt,nodeOps:()=>Pd,normalizeClass:()=>Xe,normalizeProps:()=>pr,normalizeStyle:()=>mt,onActivated:()=>Du,onBeforeMount:()=>Mu,onBeforeUnmount:()=>gs,onBeforeUpdate:()=>Ha,onDeactivated:()=>Ou,onErrorCaptured:()=>Lu,onMounted:()=>We,onRenderTracked:()=>Bu,onRenderTriggered:()=>qu,onScopeDispose:()=>fa,onServerPrefetch:()=>Nu,onUnmounted:()=>Mt,onUpdated:()=>Zs,onWatcherCleanup:()=>ou,openBlock:()=>P,patchProp:()=>Xd,popScopeId:()=>iv,provide:()=>Mn,proxyRefs:()=>Ca,pushScopeId:()=>sv,queuePostFlushCb:()=>js,reactive:()=>qr,readonly:()=>kt,ref:()=>U,registerRuntimeCompiler:()=>Sm,render:()=>yf,renderList:()=>nr,renderSlot:()=>se,resolveComponent:()=>kv,resolveDirective:()=>Iv,resolveDynamicComponent:()=>Xs,resolveFilter:()=>null,resolveTransitionHooks:()=>ds,setBlockTracking:()=>si,setDevtoolsHook:()=>$m,setTransitionHooks:()=>Vr,shallowReactive:()=>ru,shallowReadonly:()=>Br,shallowRef:()=>nt,ssrContextKey:()=>pu,ssrUtils:()=>Pm,stop:()=>_g,toDisplayString:()=>He,toHandlerKey:()=>ns,toHandlers:()=>ju,toRaw:()=>Be,toRef:()=>xa,toRefs:()=>It,toValue:()=>xe,transformVNodeArgs:()=>mm,triggerRef:()=>su,unref:()=>f,useAttrs:()=>Lv,useCssModule:()=>r0,useCssVars:()=>Fm,useHost:()=>tf,useId:()=>ku,useModel:()=>Zv,useSSRContext:()=>hu,useShadowRoot:()=>t0,useSlots:()=>Bv,useTemplateRef:()=>dv,useTransitionState:()=>Ra,vModelCheckbox:()=>ul,vModelDynamic:()=>pf,vModelRadio:()=>dl,vModelSelect:()=>uf,vModelText:()=>li,vShow:()=>go,version:()=>kd,warn:()=>km,watch:()=>Re,watchEffect:()=>rt,watchPostEffect:()=>Ea,watchSyncEffect:()=>gu,withAsyncContext:()=>jv,withCtx:()=>R,withDefaults:()=>qv,withDirectives:()=>Wi,withKeys:()=>fl,withMemo:()=>Am,withModifiers:()=>ar,withScopeId:()=>ov},1),m0=()=>{},w0=2;const wr={CALL_HISTORY:"call_history",CONTACTS:"contacts",CONNECTIONS:"connections"},y0=(e="webphone_db")=>{const t=U(null),r=U(!1);return{initDB:()=>new Promise((l,u)=>{if(t.value){l();return}const c=indexedDB.open(e,w0);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(wr.CALL_HISTORY)||p.createObjectStore(wr.CALL_HISTORY,{keyPath:"id"}),p.objectStoreNames.contains(wr.CONTACTS)||p.createObjectStore(wr.CONTACTS,{keyPath:"number"}),p.objectStoreNames.contains(wr.CONNECTIONS)||p.createObjectStore(wr.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}},b0=e=>{const t=U(e?.initialConnected??!1),r=U(0),n=U(null),s=U([]),i=U([]),{initDB:o,getAll:a,add:l}=y0(e?.server&&e?.extension?`webphone_${e.server}_${e.extension}`.replace(/[^a-z0-9_]/gi,"_"):"webphone_db");o().then(async()=>{try{s.value=(await a(wr.CALL_HISTORY)).sort((K,ae)=>ae.startTime-K.startTime),i.value=await a(wr.CONTACTS)}catch(K){console.error("Error loading data from IndexedDB:",K)}});const u=U([{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=U(e?.initialKeypadVisible??!0),d=U(""),p=U(!1),h=j(()=>u.value.find(K=>K.id===r.value)||u.value[0]),m=j(()=>h.value?.status||"idle"),y=j(()=>h.value?.remoteNumber||""),T=j(()=>h.value?.isMuted||!1),v=j(()=>h.value?.isHeld||!1),x=j({get:()=>h.value?.keypadValue||"",set:K=>{h.value&&(h.value.keypadValue=K)}}),b=K=>{t.value=K},_=K=>{u.value.some(ae=>ae.id===K)&&(r.value=K)},C=(K,ae)=>{const fe=u.value.find(Ce=>Ce.id===K);fe&&Object.assign(fe,ae)};return{isConnected:t,activeChannelId:r,channels:u,activeChannel:h,callStatus:m,remoteNumber:y,isMuted:T,isHeld:v,keypadValue:x,isKeypadVisible:c,lastDialedNumber:d,videoModeEnabled:p,transferInProgress:n,setConnected:b,setActiveChannelId:_,updateChannelState:C,setCallStatus:K=>{C(r.value,{status:K})},setIncomingCall:K=>{C(r.value,{remoteNumber:K})},resetCall:()=>{C(r.value,{status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1})},addCallLog:async K=>{const ae={id:crypto.randomUUID(),...K};s.value.unshift(ae);try{await l(wr.CALL_HISTORY,ae)}catch(fe){console.error("Error saving call log:",fe)}},callHistory:s,contacts:i,addContact:async K=>{try{await l(wr.CONTACTS,K),i.value=await a(wr.CONTACTS)}catch(ae){console.error("Error saving contact:",ae)}},setMuted:K=>{C(r.value,{isMuted:K})},setHeld:K=>{C(r.value,{isHeld:K})},appendKeypad:K=>{x.value+=K},clearKeypad:()=>{x.value=""},backspaceKeypad:()=>{x.value=x.value.slice(0,-1)},toggleKeypad:()=>{c.value=!c.value},setLastDialedNumber:K=>{d.value=K},setTransferInProgress:K=>{n.value=K},toggleVideoMode:()=>{p.value=!p.value}}},_0="0.21.1";var jn=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}},hl=class extends jn{constructor(e){super(e||"Unsupported content type.")}},gl=class extends jn{constructor(e){super(e||"Request pending.")}},S0=class extends jn{constructor(e){super(e||"Unspecified session description handler error.")}},vl=class extends jn{constructor(){super("The session has terminated.")}},ui=class extends jn{constructor(e){super(e||"An error occurred during state transition.")}},C0=class{constructor(e){this.incomingAckRequest=e}get request(){return this.incomingAckRequest.message}},x0=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()}},T0=class{constructor(e){this.incomingCancelRequest=e}get request(){return this.incomingCancelRequest}},di=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})}},E0=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()}},xf=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={}}},lr=class eg extends xf{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 eg(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}},pn=class tg extends xf{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 tg(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 Tf(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 ml(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,r+=r.repeat(t),e+r.slice(0,t))}var Ef=class na 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,na.prototype):this.__proto__=na.prototype,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,na)}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=ml("",i.line.toString().length," "),u=n[i.line-1],c=i.line===a.line?a.column:u.length+1;r+=`
3
+ (function(){var Ic=Object.defineProperty,ig=(e,t)=>{let r={};for(var n in e)Ic(r,n,{get:e[n],enumerable:!0});return t&&Ic(r,Symbol.toStringTag,{value:"Module"}),r};function Ds(e){const t=Object.create(null);for(const r of e.split(","))t[r]=1;return r=>r in t}var qe={},ts=[],er=()=>{},Rc=()=>!1,Os=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),oa=e=>e.startsWith("onUpdate:"),Ke=Object.assign,aa=(e,t)=>{const r=e.indexOf(t);r>-1&&e.splice(r,1)},og=Object.prototype.hasOwnProperty,ze=(e,t)=>og.call(e,t),we=Array.isArray,rs=e=>ns(e)==="[object Map]",Pn=e=>ns(e)==="[object Set]",$c=e=>ns(e)==="[object Date]",ag=e=>ns(e)==="[object RegExp]",Ee=e=>typeof e=="function",et=e=>typeof e=="string",fr=e=>typeof e=="symbol",je=e=>e!==null&&typeof e=="object",la=e=>(je(e)||Ee(e))&&Ee(e.then)&&Ee(e.catch),Pc=Object.prototype.toString,ns=e=>Pc.call(e),lg=e=>ns(e).slice(8,-1),Ei=e=>ns(e)==="[object Object]",Ai=e=>et(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Dn=Ds(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ki=e=>{const t=Object.create(null);return(r=>t[r]||(t[r]=e(r)))},cg=/-\w/g,ft=ki(e=>e.replace(cg,t=>t.slice(1).toUpperCase())),ug=/\B([A-Z])/g,Bt=ki(e=>e.replace(ug,"-$1").toLowerCase()),Hs=ki(e=>e.charAt(0).toUpperCase()+e.slice(1)),ss=ki(e=>e?`on${Hs(e)}`:""),Dt=(e,t)=>!Object.is(e,t),is=(e,...t)=>{for(let r=0;r<e.length;r++)e[r](...t)},Dc=(e,t,r,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:r})},Ii=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Ri=e=>{const t=et(e)?Number(e):NaN;return isNaN(t)?e:t},Oc,$i=()=>Oc||(Oc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),dg=Ds("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 mt(e){if(we(e)){const t={};for(let r=0;r<e.length;r++){const n=e[r],s=et(n)?gg(n):mt(n);if(s)for(const i in s)t[i]=s[i]}return t}else if(et(e)||je(e))return e}var fg=/;(?![^(]*\))/g,pg=/:([^]+)/,hg=/\/\*[^]*?\*\//g;function gg(e){const t={};return e.replace(hg,"").split(fg).forEach(r=>{if(r){const n=r.split(pg);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Xe(e){let t="";if(et(e))t=e;else if(we(e))for(let r=0;r<e.length;r++){const n=Xe(e[r]);n&&(t+=n+" ")}else if(je(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&&!et(t)&&(e.class=Xe(t)),r&&(e.style=mt(r)),e}var Hc="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",vg=Ds(Hc),nx=Ds(Hc+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function Mc(e){return!!e||e===""}function mg(e,t){if(e.length!==t.length)return!1;let r=!0;for(let n=0;r&&n<e.length;n++)r=Dr(e[n],t[n]);return r}function Dr(e,t){if(e===t)return!0;let r=$c(e),n=$c(t);if(r||n)return r&&n?e.getTime()===t.getTime():!1;if(r=fr(e),n=fr(t),r||n)return e===t;if(r=we(e),n=we(t),r||n)return r&&n?mg(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||!Dr(e[s],t[s]))return!1}}return String(e)===String(t)}function Pi(e,t){return e.findIndex(r=>Dr(r,t))}var Nc=e=>!!(e&&e.__v_isRef===!0),He=e=>et(e)?e:e==null?"":we(e)||je(e)&&(e.toString===Pc||!Ee(e.toString))?Nc(e)?He(e.value):JSON.stringify(e,qc,2):String(e),qc=(e,t)=>Nc(t)?qc(e,t.value):rs(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((r,[n,s],i)=>(r[ca(n,i)+" =>"]=s,r),{})}:Pn(t)?{[`Set(${t.size})`]:[...t.values()].map(r=>ca(r))}:fr(t)?ca(t):je(t)&&!we(t)&&!Ei(t)?String(t):t,ca=(e,t="")=>{var r;return fr(e)?`Symbol(${(r=e.description)!=null?r:t})`:e};function wg(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:(typeof e!="number"||Number.isFinite(e),String(e))}var Et,ua=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=Et,!e&&Et&&(this.index=(Et.scopes||(Et.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=Et;try{return Et=this,e()}finally{Et=t}}}on(){++this._on===1&&(this.prevScope=Et,Et=this)}off(){this._on>0&&--this._on===0&&(Et=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 da(e){return new ua(e)}function Di(){return Et}function fa(e,t=!1){Et&&Et.cleanups.push(e)}var tt,pa=new WeakSet,Ms=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,Et&&Et.active&&Et.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,pa.has(this)&&(pa.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Lc(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,zc(this),Fc(this);const e=tt,t=hr;tt=this,hr=!0;try{return this.fn()}finally{Vc(this),tt=e,hr=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)ma(e);this.deps=this.depsTail=void 0,zc(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?pa.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){va(this)&&this.run()}get dirty(){return va(this)}},Bc=0,Ns,qs;function Lc(e,t=!1){if(e.flags|=8,t){e.next=qs,qs=e;return}e.next=Ns,Ns=e}function ha(){Bc++}function ga(){if(--Bc>0)return;if(qs){let t=qs;for(qs=void 0;t;){const r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;for(;Ns;){let t=Ns;for(Ns=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 Fc(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Vc(e){let t,r=e.depsTail,n=r;for(;n;){const s=n.prevDep;n.version===-1?(n===r&&(r=s),ma(n),yg(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&&(jc(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function jc(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Bs)||(e.globalVersion=Bs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!va(e))))return;e.flags|=2;const t=e.dep,r=tt,n=hr;tt=e,hr=!0;try{Fc(e);const s=e.fn(e._value);(t.version===0||Dt(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{tt=r,hr=n,Vc(e),e.flags&=-3}}function ma(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)ma(i,!0)}!t&&!--r.sc&&r.map&&r.map.delete(r.key)}function yg(e){const{prevDep:t,nextDep:r}=e;t&&(t.nextDep=r,e.prevDep=void 0),r&&(r.prevDep=t,e.nextDep=void 0)}function bg(e,t){e.effect instanceof Ms&&(e=e.effect.fn);const r=new Ms(e);t&&Ke(r,t);try{r.run()}catch(s){throw r.stop(),s}const n=r.run.bind(r);return n.effect=r,n}function _g(e){e.effect.stop()}var hr=!0,Uc=[];function Or(){Uc.push(hr),hr=!1}function Hr(){const e=Uc.pop();hr=e===void 0?!0:e}function zc(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const r=tt;tt=void 0;try{t()}finally{tt=r}}}var Bs=0,Sg=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}},Oi=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(!tt||!hr||tt===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==tt)t=this.activeLink=new Sg(tt,this),tt.deps?(t.prevDep=tt.depsTail,tt.depsTail.nextDep=t,tt.depsTail=t):tt.deps=tt.depsTail=t,Kc(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=tt.depsTail,t.nextDep=void 0,tt.depsTail.nextDep=t,tt.depsTail=t,tt.deps===t&&(tt.deps=r)}return t}trigger(e){this.version++,Bs++,this.notify(e)}notify(e){ha();try{for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{ga()}}};function Kc(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)Kc(n)}const r=e.dep.subs;r!==e&&(e.prevSub=r,r&&(r.nextSub=e)),e.dep.subs=e}}var Hi=new WeakMap,On=Symbol(""),wa=Symbol(""),Ls=Symbol("");function At(e,t,r){if(hr&&tt){let n=Hi.get(e);n||Hi.set(e,n=new Map);let s=n.get(r);s||(n.set(r,s=new Oi),s.map=n,s.key=r),s.track()}}function Mr(e,t,r,n,s,i){const o=Hi.get(e);if(!o){Bs++;return}const a=l=>{l&&l.trigger()};if(ha(),t==="clear")o.forEach(a);else{const l=we(e),u=l&&Ai(r);if(l&&r==="length"){const c=Number(n);o.forEach((d,p)=>{(p==="length"||p===Ls||!fr(p)&&p>=c)&&a(d)})}else switch((r!==void 0||o.has(void 0))&&a(o.get(r)),u&&a(o.get(Ls)),t){case"add":l?u&&a(o.get("length")):(a(o.get(On)),rs(e)&&a(o.get(wa)));break;case"delete":l||(a(o.get(On)),rs(e)&&a(o.get(wa)));break;case"set":rs(e)&&a(o.get(On));break}}ga()}function Cg(e,t){const r=Hi.get(e);return r&&r.get(t)}function os(e){const t=Be(e);return t===e?t:(At(t,"iterate",Ls),Lt(e)?t:t.map(gr))}function Mi(e){return At(e=Be(e),"iterate",Ls),e}function on(e,t){return Cr(e)?as(Lr(e)?gr(t):t):gr(t)}var xg={__proto__:null,[Symbol.iterator](){return ya(this,Symbol.iterator,e=>on(this,e))},concat(...e){return os(this).concat(...e.map(t=>we(t)?os(t):t))},entries(){return ya(this,"entries",e=>(e[1]=on(this,e[1]),e))},every(e,t){return Nr(this,"every",e,t,void 0,arguments)},filter(e,t){return Nr(this,"filter",e,t,r=>r.map(n=>on(this,n)),arguments)},find(e,t){return Nr(this,"find",e,t,r=>on(this,r),arguments)},findIndex(e,t){return Nr(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Nr(this,"findLast",e,t,r=>on(this,r),arguments)},findLastIndex(e,t){return Nr(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Nr(this,"forEach",e,t,void 0,arguments)},includes(...e){return ba(this,"includes",e)},indexOf(...e){return ba(this,"indexOf",e)},join(e){return os(this).join(e)},lastIndexOf(...e){return ba(this,"lastIndexOf",e)},map(e,t){return Nr(this,"map",e,t,void 0,arguments)},pop(){return Fs(this,"pop")},push(...e){return Fs(this,"push",e)},reduce(e,...t){return Wc(this,"reduce",e,t)},reduceRight(e,...t){return Wc(this,"reduceRight",e,t)},shift(){return Fs(this,"shift")},some(e,t){return Nr(this,"some",e,t,void 0,arguments)},splice(...e){return Fs(this,"splice",e)},toReversed(){return os(this).toReversed()},toSorted(e){return os(this).toSorted(e)},toSpliced(...e){return os(this).toSpliced(...e)},unshift(...e){return Fs(this,"unshift",e)},values(){return ya(this,"values",e=>on(this,e))}};function ya(e,t,r){const n=Mi(e),s=n[t]();return n!==e&&!Lt(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=r(i.value)),i}),s}var Tg=Array.prototype;function Nr(e,t,r,n,s,i){const o=Mi(e),a=o!==e&&!Lt(e),l=o[t];if(l!==Tg[t]){const d=l.apply(e,i);return a?gr(d):d}let u=r;o!==e&&(a?u=function(d,p){return r.call(this,on(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 Wc(e,t,r,n){const s=Mi(e);let i=r;return s!==e&&(Lt(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,on(e,a),l,e)}),s[t](i,...n)}function ba(e,t,r){const n=Be(e);At(n,"iterate",Ls);const s=n[t](...r);return(s===-1||s===!1)&&Vs(r[0])?(r[0]=Be(r[0]),n[t](...r)):s}function Fs(e,t,r=[]){Or(),ha();const n=Be(e)[t].apply(e,r);return ga(),Hr(),n}var Eg=Ds("__proto__,__v_isRef,__isVue"),Gc=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(fr));function Ag(e){fr(e)||(e=String(e));const t=Be(this);return At(t,"has",e),t.hasOwnProperty(e)}var Jc=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?tu:eu:s?Qc:Xc).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r)?e:void 0;const i=we(e);if(!n){let a;if(i&&(a=xg[t]))return a;if(t==="hasOwnProperty")return Ag}const o=Reflect.get(e,t,Je(e)?e:r);if((fr(t)?Gc.has(t):Eg(t))||(n||At(e,"get",t),s))return o;if(Je(o)){const a=i&&Ai(t)?o:o.value;return n&&je(a)?kt(a):a}return je(o)?n?kt(o):qr(o):o}},Yc=class extends Jc{constructor(e=!1){super(!1,e)}set(e,t,r,n){let s=e[t];const i=we(e)&&Ai(t);if(!this._isShallow){const l=Cr(s);if(!Lt(r)&&!Cr(r)&&(s=Be(s),r=Be(r)),!i&&Je(s)&&!Je(r))return l||(s.value=r),!0}const o=i?Number(t)<e.length:ze(e,t),a=Reflect.set(e,t,r,Je(e)?e:n);return e===Be(n)&&(o?Dt(r,s)&&Mr(e,"set",t,r,s):Mr(e,"add",t,r)),a}deleteProperty(e,t){const r=ze(e,t),n=e[t],s=Reflect.deleteProperty(e,t);return s&&r&&Mr(e,"delete",t,void 0,n),s}has(e,t){const r=Reflect.has(e,t);return(!fr(t)||!Gc.has(t))&&At(e,"has",t),r}ownKeys(e){return At(e,"iterate",we(e)?"length":On),Reflect.ownKeys(e)}},Zc=class extends Jc{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},kg=new Yc,Ig=new Zc,Rg=new Yc(!0),$g=new Zc(!0),_a=e=>e,Ni=e=>Reflect.getPrototypeOf(e);function Pg(e,t,r){return function(...n){const s=this.__v_raw,i=Be(s),o=rs(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,u=s[e](...n),c=r?_a:t?as:gr;return!t&&At(i,"iterate",l?wa:On),Ke(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 qi(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Dg(e,t){const r={get(n){const s=this.__v_raw,i=Be(s),o=Be(n);e||(Dt(n,o)&&At(i,"get",n),At(i,"get",o));const{has:a}=Ni(i),l=t?_a:e?as:gr;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&&At(Be(n),"iterate",On),n.size},has(n){const s=this.__v_raw,i=Be(s),o=Be(n);return e||(Dt(n,o)&&At(i,"has",n),At(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=Be(o),l=t?_a:e?as:gr;return!e&&At(a,"iterate",On),o.forEach((u,c)=>n.call(s,l(u),l(c),i))}};return Ke(r,e?{add:qi("add"),set:qi("set"),delete:qi("delete"),clear:qi("clear")}:{add(n){!t&&!Lt(n)&&!Cr(n)&&(n=Be(n));const s=Be(this);return Ni(s).has.call(s,n)||(s.add(n),Mr(s,"add",n,n)),this},set(n,s){!t&&!Lt(s)&&!Cr(s)&&(s=Be(s));const i=Be(this),{has:o,get:a}=Ni(i);let l=o.call(i,n);l||(n=Be(n),l=o.call(i,n));const u=a.call(i,n);return i.set(n,s),l?Dt(s,u)&&Mr(i,"set",n,s,u):Mr(i,"add",n,s),this},delete(n){const s=Be(this),{has:i,get:o}=Ni(s);let a=i.call(s,n);a||(n=Be(n),a=i.call(s,n));const l=o?o.call(s,n):void 0,u=s.delete(n);return a&&Mr(s,"delete",n,void 0,l),u},clear(){const n=Be(this),s=n.size!==0,i=void 0,o=n.clear();return s&&Mr(n,"clear",void 0,void 0,i),o}}),["keys","values","entries",Symbol.iterator].forEach(n=>{r[n]=Pg(n,e,t)}),r}function Bi(e,t){const r=Dg(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 Og={get:Bi(!1,!1)},Hg={get:Bi(!1,!0)},Mg={get:Bi(!0,!1)},Ng={get:Bi(!0,!0)},Xc=new WeakMap,Qc=new WeakMap,eu=new WeakMap,tu=new WeakMap;function qg(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Bg(e){return e.__v_skip||!Object.isExtensible(e)?0:qg(lg(e))}function qr(e){return Cr(e)?e:Li(e,!1,kg,Og,Xc)}function ru(e){return Li(e,!1,Rg,Hg,Qc)}function kt(e){return Li(e,!0,Ig,Mg,eu)}function Br(e){return Li(e,!0,$g,Ng,tu)}function Li(e,t,r,n,s){if(!je(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=Bg(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 Lr(e){return Cr(e)?Lr(e.__v_raw):!!(e&&e.__v_isReactive)}function Cr(e){return!!(e&&e.__v_isReadonly)}function Lt(e){return!!(e&&e.__v_isShallow)}function Vs(e){return e?!!e.__v_raw:!1}function Be(e){const t=e&&e.__v_raw;return t?Be(t):e}function Sa(e){return!ze(e,"__v_skip")&&Object.isExtensible(e)&&Dc(e,"__v_skip",!0),e}var gr=e=>je(e)?qr(e):e,as=e=>je(e)?kt(e):e;function Je(e){return e?e.__v_isRef===!0:!1}function K(e){return nu(e,!1)}function nt(e){return nu(e,!0)}function nu(e,t){return Je(e)?e:new Lg(e,t)}var Lg=class{constructor(e,t){this.dep=new Oi,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:Be(e),this._value=t?e:gr(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,r=this.__v_isShallow||Lt(e)||Cr(e);e=r?e:Be(e),Dt(e,t)&&(this._rawValue=e,this._value=r?e:gr(e),this.dep.trigger())}};function su(e){e.dep&&e.dep.trigger()}function f(e){return Je(e)?e.value:e}function xe(e){return Ee(e)?e():f(e)}var Fg={get:(e,t,r)=>t==="__v_raw"?e:f(Reflect.get(e,t,r)),set:(e,t,r,n)=>{const s=e[t];return Je(s)&&!Je(r)?(s.value=r,!0):Reflect.set(e,t,r,n)}};function Ca(e){return Lr(e)?e:new Proxy(e,Fg)}var Vg=class{constructor(e){this.__v_isRef=!0,this._value=void 0;const t=this.dep=new Oi,{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 js(e){return new Vg(e)}function It(e){const t=we(e)?new Array(e.length):{};for(const r in e)t[r]=iu(e,r);return t}var jg=class{constructor(e,t,r){this._object=e,this._key=t,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0,this._raw=Be(e);let n=!0,s=e;if(!we(e)||!Ai(String(t)))do n=!Vs(s)||Lt(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&&Je(this._raw[this._key])){const t=this._object[this._key];if(Je(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return Cg(this._raw,this._key)}},Ug=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 xa(e,t,r){return Je(e)?e:Ee(e)?new Ug(e):je(e)&&arguments.length>1?iu(e,t,r):K(e)}function iu(e,t,r){return new jg(e,t,r)}var zg=class{constructor(e,t,r){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Oi(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Bs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&tt!==this)return Lc(this,!0),!0}get value(){const e=this.dep.track();return jc(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function Kg(e,t,r=!1){let n,s;return Ee(e)?n=e:(n=e.get,s=e.set),new zg(n,s,r)}var Wg={GET:"get",HAS:"has",ITERATE:"iterate"},Gg={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},Fi={},Vi=new WeakMap,an=void 0;function Jg(){return an}function ou(e,t=!1,r=an){if(r){let n=Vi.get(r);n||Vi.set(r,n=[]),n.push(e)}}function Yg(e,t,r=qe){const{immediate:n,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=r,u=b=>s?b:Lt(b)||s===!1||s===0?Fr(b,1):Fr(b);let c,d,p,h,m=!1,w=!1;if(Je(e)?(d=()=>e.value,m=Lt(e)):Lr(e)?(d=()=>u(e),m=!0):we(e)?(w=!0,m=e.some(b=>Lr(b)||Lt(b)),d=()=>e.map(b=>{if(Je(b))return b.value;if(Lr(b))return u(b);if(Ee(b))return l?l(b,2):b()})):Ee(e)?t?d=l?()=>l(e,2):e:d=()=>{if(p){Or();try{p()}finally{Hr()}}const b=an;an=c;try{return l?l(e,3,[h]):e(h)}finally{an=b}}:d=er,t&&s){const b=d,x=s===!0?1/0:s;d=()=>Fr(b(),x)}const E=Di(),v=()=>{c.stop(),E&&E.active&&aa(E.effects,c)};if(i&&t){const b=t;t=(...x)=>{b(...x),v()}}let T=w?new Array(e.length).fill(Fi):Fi;const y=b=>{if(!(!(c.flags&1)||!c.dirty&&!b))if(t){const x=c.run();if(s||m||(w?x.some((k,O)=>Dt(k,T[O])):Dt(x,T))){p&&p();const k=an;an=c;try{const O=[x,T===Fi?void 0:w&&T[0]===Fi?[]:T,h];T=x,l?l(t,3,O):t(...O)}finally{an=k}}}else c.run()};return a&&a(y),c=new Ms(d),c.scheduler=o?()=>o(y,!1):y,h=b=>ou(b,!1,c),p=c.onStop=()=>{const b=Vi.get(c);if(b){if(l)l(b,4);else for(const x of b)x();Vi.delete(c)}},t?n?y(!0):T=c.run():o?o(y.bind(null,!0),!0):c.run(),v.pause=c.pause.bind(c),v.resume=c.resume.bind(c),v.stop=v,v}function Fr(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--,Je(e))Fr(e.value,t,r);else if(we(e))for(let n=0;n<e.length;n++)Fr(e[n],t,r);else if(Pn(e)||rs(e))e.forEach(n=>{Fr(n,t,r)});else if(Ei(e)){for(const n in e)Fr(e[n],t,r);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&Fr(e[n],t,r)}return e}var au=[];function Zg(e){au.push(e)}function Xg(){au.pop()}function Qg(e,t){}var ev={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"},tv={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 ls(e,t,r,n){try{return n?e(...n):e()}catch(s){Hn(s,t,r)}}function tr(e,t,r,n){if(Ee(e)){const s=ls(e,t,r,n);return s&&la(s)&&s.catch(i=>{Hn(i,t,r)}),s}if(we(e)){const s=[];for(let i=0;i<e.length;i++)s.push(tr(e[i],t,r,n));return s}}function Hn(e,t,r,n=!0){const s=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||qe;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){Or(),ls(i,null,10,[e,l,u]),Hr();return}}rv(e,r,s,n,o)}function rv(e,t,r,n=!0,s=!1){if(s)throw e;console.error(e)}var Ot=[],xr=-1,cs=[],ln=null,us=0,lu=Promise.resolve(),ji=null;function wt(e){const t=ji||lu;return e?t.then(this?e.bind(this):e):t}function nv(e){let t=xr+1,r=Ot.length;for(;t<r;){const n=t+r>>>1,s=Ot[n],i=zs(s);i<e||i===e&&s.flags&2?t=n+1:r=n}return t}function Ta(e){if(!(e.flags&1)){const t=zs(e),r=Ot[Ot.length-1];!r||!(e.flags&2)&&t>=zs(r)?Ot.push(e):Ot.splice(nv(t),0,e),e.flags|=1,cu()}}function cu(){ji||(ji=lu.then(du))}function Us(e){we(e)?cs.push(...e):ln&&e.id===-1?ln.splice(us+1,0,e):e.flags&1||(cs.push(e),e.flags|=1),cu()}function uu(e,t,r=xr+1){for(;r<Ot.length;r++){const n=Ot[r];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;Ot.splice(r,1),r--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function Ui(e){if(cs.length){const t=[...new Set(cs)].sort((r,n)=>zs(r)-zs(n));if(cs.length=0,ln){ln.push(...t);return}for(ln=t,us=0;us<ln.length;us++){const r=ln[us];r.flags&4&&(r.flags&=-2),r.flags&8||r(),r.flags&=-2}ln=null,us=0}}var zs=e=>e.id==null?e.flags&2?-1:1/0:e.id;function du(e){try{for(xr=0;xr<Ot.length;xr++){const t=Ot[xr];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),ls(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;xr<Ot.length;xr++){const t=Ot[xr];t&&(t.flags&=-2)}xr=-1,Ot.length=0,Ui(e),ji=null,(Ot.length||cs.length)&&du(e)}}var ds,zi=[];function fu(e,t){var r,n;ds=e,ds?(ds.enabled=!0,zi.forEach(({event:s,args:i})=>ds.emit(s,...i)),zi=[]):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=>{fu(s,t)}),setTimeout(()=>{ds||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,zi=[])},3e3)):zi=[]}var St=null,Ki=null;function Ks(e){const t=St;return St=e,Ki=e&&e.type.__scopeId||null,t}function sv(e){Ki=e}function iv(){Ki=null}var ov=e=>R;function R(e,t=St,r){if(!t||e._n)return e;const n=(...s)=>{n._d&&ii(-1);const i=Ks(t);let o;try{o=e(...s)}finally{Ks(i),n._d&&ii(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function Wi(e,t){if(St===null)return e;const r=oi(St),n=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[i,o,a,l=qe]=t[s];i&&(Ee(i)&&(i={mounted:i,updated:i}),i.deep&&Fr(o),n.push({dir:i,instance:r,value:o,oldValue:void 0,arg:a,modifiers:l}))}return e}function Tr(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&&(Or(),tr(l,r,8,[e.el,a,e,t]),Hr())}}function Mn(e,t){if(Ct){let r=Ct.provides;const n=Ct.parent&&Ct.parent.provides;n===r&&(r=Ct.provides=Object.create(n)),r[e]=t}}function Ht(e,t,r=!1){const n=at();if(n||Nn){let s=Nn?Nn._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&&Ee(t)?t.call(n&&n.proxy):t}}function av(){return!!(at()||Nn)}var pu=Symbol.for("v-scx"),hu=()=>{{const e=Ht(pu);return e}};function rt(e,t){return Ws(e,null,t)}function Ea(e,t){return Ws(e,null,{flush:"post"})}function gu(e,t){return Ws(e,null,{flush:"sync"})}function Re(e,t,r){return Ws(e,t,r)}function Ws(e,t,r=qe){const{immediate:n,deep:s,flush:i,once:o}=r,a=Ke({},r),l=t&&n||!t&&i!=="post";let u;if(ws){if(i==="sync"){const h=hu();u=h.__watcherHandles||(h.__watcherHandles=[])}else if(!l){const h=()=>{};return h.stop=er,h.resume=er,h.pause=er,h}}const c=Ct;a.call=(h,m,w)=>tr(h,c,m,w);let d=!1;i==="post"?a.scheduler=h=>{lt(h,c&&c.suspense)}:i!=="sync"&&(d=!0,a.scheduler=(h,m)=>{m?h():Ta(h)}),a.augmentJob=h=>{t&&(h.flags|=4),d&&(h.flags|=2,c&&(h.id=c.uid,h.i=c))};const p=Yg(e,t,a);return ws&&(u?u.push(p):l&&p()),p}function lv(e,t,r){const n=this.proxy,s=et(e)?e.includes(".")?vu(n,e):()=>n[e]:e.bind(n,n);let i;Ee(t)?i=t:(i=t.handler,r=t);const o=Fn(this),a=Ws(s,i.bind(n),r);return o(),a}function vu(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 mu=Symbol("_vte"),wu=e=>e.__isTeleport,Gs=e=>e&&(e.disabled||e.disabled===""),yu=e=>e&&(e.defer||e.defer===""),bu=e=>typeof SVGElement<"u"&&e instanceof SVGElement,_u=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Aa=(e,t)=>{const r=e&&e.to;return et(r)?t?t(r):null:r},Su={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:E}}=u,v=Gs(t.props);let{shapeFlag:T,children:y,dynamicChildren:b}=t;if(e==null){const x=t.el=w(""),k=t.anchor=w("");h(x,r,n),h(k,r,n);const O=(q,B)=>{T&16&&c(y,q,B,s,i,o,a,l)},g=()=>{const q=t.target=Aa(t.props,m),B=Ia(q,t,w,h);q&&(o!=="svg"&&bu(q)?o="svg":o!=="mathml"&&_u(q)&&(o="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(q),v||(O(q,B),Ji(t,!1)))};v&&(O(r,k),Ji(t,!0)),yu(t.props)?(t.el.__isMounted=!1,lt(()=>{g(),delete t.el.__isMounted},i)):g()}else{if(yu(t.props)&&e.el.__isMounted===!1){lt(()=>{Su.process(e,t,r,n,s,i,o,a,l,u)},i);return}t.el=e.el,t.targetStart=e.targetStart;const x=t.anchor=e.anchor,k=t.target=e.target,O=t.targetAnchor=e.targetAnchor,g=Gs(e.props),q=g?r:k,B=g?x:O;if(o==="svg"||bu(k)?o="svg":(o==="mathml"||_u(k))&&(o="mathml"),b?(p(e.dynamicChildren,b,q,s,i,o,a),Ja(e,t,!0)):l||d(e,t,q,B,s,i,o,a,!1),v)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Gi(t,r,x,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const S=t.target=Aa(t.props,m);S&&Gi(t,S,null,u,0)}else g&&Gi(t,k,O,u,1);Ji(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||!Gs(p);for(let m=0;m<a.length;m++){const w=a[m];n(w,t,r,h,!!w.dynamicChildren)}}},move:Gi,hydrate:cv};function Gi(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||Gs(c))&&l&16)for(let p=0;p<u.length;p++)s(u[p],t,r,2);d&&n(a,t,r)}function cv(e,t,r,n,s,i,{o:{nextSibling:o,parentNode:a,querySelector:l,insert:u,createText:c}},d){function p(E,v){let T=v;for(;T;){if(T&&T.nodeType===8){if(T.data==="teleport start anchor")t.targetStart=T;else if(T.data==="teleport anchor"){t.targetAnchor=T,E._lpa=t.targetAnchor&&o(t.targetAnchor);break}}T=o(T)}}function h(E,v){v.anchor=d(o(E),v,a(E),r,n,s,i)}const m=t.target=Aa(t.props,l),w=Gs(t.props);if(m){const E=m._lpa||m.firstChild;t.shapeFlag&16&&(w?(h(e,t),p(m,E),t.targetAnchor||Ia(m,t,c,u,a(e)===m?e:null)):(t.anchor=o(e),p(m,E),t.targetAnchor||Ia(m,t,c,u),d(E&&o(E),t,m,r,n,s,i))),Ji(t,w)}else w&&t.shapeFlag&16&&(h(e,t),t.targetStart=e,t.targetAnchor=o(e));return t.anchor&&o(t.anchor)}var ka=Su;function Ji(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 Ia(e,t,r,n,s=null){const i=t.targetStart=r(""),o=t.targetAnchor=r("");return i[mu]=o,e&&(n(i,e,s),n(o,e,s)),o}var Er=Symbol("_leaveCb"),Js=Symbol("_enterCb");function Ra(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return We(()=>{e.isMounted=!0}),vs(()=>{e.isUnmounting=!0}),e}var rr=[Function,Array],$a={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:rr,onEnter:rr,onAfterEnter:rr,onEnterCancelled:rr,onBeforeLeave:rr,onLeave:rr,onAfterLeave:rr,onLeaveCancelled:rr,onBeforeAppear:rr,onAppear:rr,onAfterAppear:rr,onAppearCancelled:rr},Cu=e=>{const t=e.subTree;return t.component?Cu(t.component):t},uv={name:"BaseTransition",props:$a,setup(e,{slots:t}){const r=at(),n=Ra();return()=>{const s=t.default&&Yi(t.default(),!0);if(!s||!s.length)return;const i=xu(s),o=Be(e),{mode:a}=o;if(n.isLeaving)return Pa(i);const l=Au(i);if(!l)return Pa(i);let u=fs(l,o,n,r,d=>u=d);l.type!==ot&&Vr(l,u);let c=r.subTree&&Au(r.subTree);if(c&&c.type!==ot&&!vr(c,l)&&Cu(r).type!==ot){let d=fs(c,o,n,r);if(Vr(c,d),a==="out-in"&&l.type!==ot)return n.isLeaving=!0,d.afterLeave=()=>{n.isLeaving=!1,r.job.flags&8||r.update(),delete d.afterLeave,c=void 0},Pa(i);a==="in-out"&&l.type!==ot?d.delayLeave=(p,h,m)=>{const w=Eu(n,c);w[String(c.key)]=c,p[Er]=()=>{h(),p[Er]=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 xu(e){let t=e[0];if(e.length>1){for(const r of e)if(r.type!==ot){t=r;break}}return t}var Tu=uv;function Eu(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 fs(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:E,onAppear:v,onAfterAppear:T,onAppearCancelled:y}=t,b=String(e.key),x=Eu(r,e),k=(q,B)=>{q&&tr(q,n,9,B)},O=(q,B)=>{const S=B[1];k(q,B),we(q)?q.every(_=>_.length<=1)&&S():q.length<=1&&S()},g={mode:o,persisted:a,beforeEnter(q){let B=l;if(!r.isMounted)if(i)B=E||l;else return;q[Er]&&q[Er](!0);const S=x[b];S&&vr(e,S)&&S.el[Er]&&S.el[Er](),k(B,[q])},enter(q){if(x[b]===e)return;let B=u,S=c,_=d;if(!r.isMounted)if(i)B=v||u,S=T||c,_=y||d;else return;let C=!1;q[Js]=V=>{C||(C=!0,V?k(_,[q]):k(S,[q]),g.delayedLeave&&g.delayedLeave(),q[Js]=void 0)};const N=q[Js].bind(null,!1);B?O(B,[q,N]):N()},leave(q,B){const S=String(e.key);if(q[Js]&&q[Js](!0),r.isUnmounting)return B();k(p,[q]);let _=!1;q[Er]=N=>{_||(_=!0,B(),N?k(w,[q]):k(m,[q]),q[Er]=void 0,x[S]===e&&delete x[S])};const C=q[Er].bind(null,!1);x[S]=e,h?O(h,[q,C]):C()},clone(q){const B=fs(q,t,r,n,s);return s&&s(B),B}};return g}function Pa(e){if(Ys(e))return e=mr(e),e.children=null,e}function Au(e){if(!Ys(e))return wu(e.type)&&e.children?xu(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&&Ee(r.default))return r.default()}}function Vr(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Vr(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 Yi(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===Le?(o.patchFlag&128&&s++,n=n.concat(Yi(o.children,t,a))):(t||o.type!==ot)&&n.push(a!=null?mr(o,{key:a}):o)}if(s>1)for(let i=0;i<n.length;i++)n[i].patchFlag=-2;return n}function ee(e,t){return Ee(e)?Ke({name:e.name},t,{setup:e}):e}function ku(){const e=at();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function Da(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function dv(e){const t=at(),r=nt(null);if(t){const n=t.refs===qe?t.refs={}:t.refs;Object.defineProperty(n,e,{enumerable:!0,get:()=>r.value,set:s=>r.value=s})}return r}function Iu(e,t){let r;return!!((r=Object.getOwnPropertyDescriptor(e,t))&&!r.configurable)}var Zi=new WeakMap;function ps(e,t,r,n,s=!1){if(we(e)){e.forEach((w,E)=>ps(w,t&&(we(t)?t[E]:t),r,n,s));return}if(jr(n)&&!s){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&ps(e,t,r,n.component.subTree);return}const i=n.shapeFlag&4?oi(n.component):n.el,o=s?null:i,{i:a,r:l}=e,u=t&&t.r,c=a.refs===qe?a.refs={}:a.refs,d=a.setupState,p=Be(d),h=d===qe?Rc:w=>Iu(c,w)?!1:ze(p,w),m=(w,E)=>!(E&&Iu(c,E));if(u!=null&&u!==l){if(Ru(t),et(u))c[u]=null,h(u)&&(d[u]=null);else if(Je(u)){const w=t;m(u,w.k)&&(u.value=null),w.k&&(c[w.k]=null)}}if(Ee(l))ls(l,a,12,[o,c]);else{const w=et(l),E=Je(l);if(w||E){const v=()=>{if(e.f){const T=w?h(l)?d[l]:c[l]:m(l)||!e.k?l.value:c[e.k];if(s)we(T)&&aa(T,i);else if(we(T))T.includes(i)||T.push(i);else if(w)c[l]=[i],h(l)&&(d[l]=c[l]);else{const y=[i];m(l,e.k)&&(l.value=y),e.k&&(c[e.k]=y)}}else w?(c[l]=o,h(l)&&(d[l]=o)):E&&(m(l,e.k)&&(l.value=o),e.k&&(c[e.k]=o))};if(o){const T=()=>{v(),Zi.delete(e)};T.id=-1,Zi.set(e,T),lt(T,r)}else Ru(e),v()}}}function Ru(e){const t=Zi.get(e);t&&(t.flags|=8,Zi.delete(e))}var $u=!1,hs=()=>{$u||(console.error("Hydration completed but contains mismatches."),$u=!0)},fv=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",pv=e=>e.namespaceURI.includes("MathML"),Xi=e=>{if(e.nodeType===1){if(fv(e))return"svg";if(pv(e))return"mathml"}},gs=e=>e.nodeType===8;function hv(e){const{mt:t,p:r,o:{patchProp:n,createText:s,nextSibling:i,parentNode:o,remove:a,insert:l,createComment:u}}=e,c=(y,b)=>{if(!b.hasChildNodes()){r(null,y,b),Ui(),b._vnode=y;return}d(b.firstChild,y,null,null,null),Ui(),b._vnode=y},d=(y,b,x,k,O,g=!1)=>{g=g||!!b.dynamicChildren;const q=gs(y)&&y.data==="[",B=()=>w(y,b,x,k,O,q),{type:S,ref:_,shapeFlag:C,patchFlag:N}=b;let V=y.nodeType;b.el=y,N===-2&&(g=!1,b.dynamicChildren=null);let j=null;switch(S){case cn:V!==3?b.children===""?(l(b.el=s(""),o(y),y),j=y):j=B():(y.data!==b.children&&(hs(),y.data=b.children),j=i(y));break;case ot:T(y)?(j=i(y),v(b.el=y.content.firstChild,y,x)):V!==8||q?j=B():j=i(y);break;case Bn:if(q&&(y=i(y),V=y.nodeType),V===1||V===3){j=y;const X=!b.children.length;for(let Z=0;Z<b.staticCount;Z++)X&&(b.children+=j.nodeType===1?j.outerHTML:j.data),Z===b.staticCount-1&&(b.anchor=j),j=i(j);return q?i(j):j}else B();break;case Le:q?j=m(y,b,x,k,O,g):j=B();break;default:if(C&1)(V!==1||b.type.toLowerCase()!==y.tagName.toLowerCase())&&!T(y)?j=B():j=p(y,b,x,k,O,g);else if(C&6){b.slotScopeIds=O;const X=o(y);if(q?j=E(y):gs(y)&&y.data==="teleport start"?j=E(y,y.data,"teleport end"):j=i(y),t(b,X,null,x,k,Xi(X),g),jr(b)&&!b.type.__asyncResolved){let Z;q?(Z=H(Le),Z.anchor=j?j.previousSibling:X.lastChild):Z=y.nodeType===3?Ne(""):H("div"),Z.el=y,b.component.subTree=Z}}else C&64?V!==8?j=B():j=b.type.hydrate(y,b,x,k,O,g,e,h):C&128&&(j=b.type.hydrate(y,b,x,k,Xi(o(y)),O,g,e,d))}return _!=null&&ps(_,null,k,b),j},p=(y,b,x,k,O,g)=>{g=g||!!b.dynamicChildren;const{type:q,props:B,patchFlag:S,shapeFlag:_,dirs:C,transition:N}=b,V=q==="input"||q==="option";if(V||S!==-1){C&&Tr(b,null,x,"created");let j=!1;if(T(y)){j=pd(null,N)&&x&&x.vnode.props&&x.vnode.props.appear;const Z=y.content.firstChild;if(j){const le=Z.getAttribute("class");le&&(Z.$cls=le),N.beforeEnter(Z)}v(Z,y,x),b.el=y=Z}if(_&16&&!(B&&(B.innerHTML||B.textContent))){let Z=h(y.firstChild,b,y,x,k,O,g);for(;Z;){Qi(y,1)||hs();const le=Z;Z=Z.nextSibling,a(le)}}else if(_&8){let Z=b.children;Z[0]===`
4
+ `&&(y.tagName==="PRE"||y.tagName==="TEXTAREA")&&(Z=Z.slice(1));const{textContent:le}=y;le!==Z&&le!==Z.replace(/\r\n|\r/g,`
5
+ `)&&(Qi(y,0)||hs(),y.textContent=b.children)}if(B){if(V||!g||S&48){const Z=y.tagName.includes("-");for(const le in B)(V&&(le.endsWith("value")||le==="indeterminate")||Os(le)&&!Dn(le)||le[0]==="."||Z&&!Dn(le))&&n(y,le,null,B[le],void 0,x)}else if(B.onClick)n(y,"onClick",null,B.onClick,void 0,x);else if(S&4&&Lr(B.style))for(const Z in B.style)B.style[Z]}let X;(X=B&&B.onVnodeBeforeMount)&&Vt(X,x,b),C&&Tr(b,null,x,"beforeMount"),((X=B&&B.onVnodeMounted)||C||j)&&wd(()=>{X&&Vt(X,x,b),j&&N.enter(y),C&&Tr(b,null,x,"mounted")},k)}return y.nextSibling},h=(y,b,x,k,O,g,q)=>{q=q||!!b.dynamicChildren;const B=b.children,S=B.length;for(let _=0;_<S;_++){const C=q?B[_]:B[_]=Ft(B[_]),N=C.type===cn;y?(N&&!q&&_+1<S&&Ft(B[_+1]).type===cn&&(l(s(y.data.slice(C.children.length)),x,i(y)),y.data=C.children),y=d(y,C,k,O,g,q)):N&&!C.children?l(C.el=s(""),x):(Qi(x,1)||hs(),r(null,C,x,null,k,O,Xi(x),g))}return y},m=(y,b,x,k,O,g)=>{const{slotScopeIds:q}=b;q&&(O=O?O.concat(q):q);const B=o(y),S=h(i(y),b,B,x,k,O,g);return S&&gs(S)&&S.data==="]"?i(b.anchor=S):(hs(),l(b.anchor=u("]"),B,S),S)},w=(y,b,x,k,O,g)=>{if(Qi(y.parentElement,1)||hs(),b.el=null,g){const S=E(y);for(;;){const _=i(y);if(_&&_!==S)a(_);else break}}const q=i(y),B=o(y);return a(y),r(null,b,B,q,x,k,Xi(B),O),x&&(x.vnode.el=b.el,oo(x,b.el)),q},E=(y,b="[",x="]")=>{let k=0;for(;y;)if(y=i(y),y&&gs(y)&&(y.data===b&&k++,y.data===x)){if(k===0)return i(y);k--}return y},v=(y,b,x)=>{const k=b.parentNode;k&&k.replaceChild(y,b);let O=x;for(;O;)O.vnode.el===b&&(O.vnode.el=O.subTree.el=y),O=O.parent},T=y=>y.nodeType===1&&y.tagName==="TEMPLATE";return[c,d]}var Pu="data-allow-mismatch",gv={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Qi(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(Pu);)e=e.parentElement;const r=e&&e.getAttribute(Pu);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 vv=$i().requestIdleCallback||(e=>setTimeout(e,1)),mv=$i().cancelIdleCallback||(e=>clearTimeout(e)),wv=(e=1e4)=>t=>{const r=vv(t,{timeout:e});return()=>mv(r)};function yv(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 bv=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(yv(s))return t(),n.disconnect(),!1;n.observe(s)}}),()=>n.disconnect()},_v=e=>t=>{if(e){const r=matchMedia(e);if(r.matches)t();else return r.addEventListener("change",t,{once:!0}),()=>r.removeEventListener("change",t)}},Sv=(e=[])=>(t,r)=>{et(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 Cv(e,t){if(gs(e)&&e.data==="["){let r=1,n=e.nextSibling;for(;n;){if(n.nodeType===1){if(t(n)===!1)break}else if(gs(n))if(n.data==="]"){if(--r===0)break}else n.data==="["&&r++;n=n.nextSibling}}else t(e)}var jr=e=>!!e.type.__asyncLoader;function xv(e){Ee(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((E,v)=>{l(w,()=>E(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 ee({name:"AsyncComponentWrapper",__asyncLoader:h,__asyncHydrate(m,w,E){let v=!1;(w.bu||(w.bu=[])).push(()=>v=!0);const T=()=>{v||E()},y=i?()=>{const b=i(T,x=>Cv(m,x));b&&(w.bum||(w.bum=[])).push(b)}:T;c?y():h().then(()=>!w.isUnmounted&&y())},get __asyncResolved(){return c},setup(){const m=Ct;if(Da(m),c)return()=>eo(c,m);const w=y=>{u=null,Hn(y,m,13,!n)};if(a&&m.suspense||ws)return h().then(y=>()=>eo(y,m)).catch(y=>(w(y),()=>n?H(n,{error:y}):null));const E=K(!1),v=K(),T=K(!!s);return s&&setTimeout(()=>{T.value=!1},s),o!=null&&setTimeout(()=>{if(!E.value&&!v.value){const y=new Error(`Async component timed out after ${o}ms.`);w(y),v.value=y}},o),h().then(()=>{E.value=!0,m.parent&&Ys(m.parent.vnode)&&m.parent.update()}).catch(y=>{w(y),v.value=y}),()=>{if(E.value&&c)return eo(c,m);if(v.value&&n)return H(n,{error:v.value});if(r&&!T.value)return eo(r,m)}}})}function eo(e,t){const{ref:r,props:n,children:s,ce:i}=t.vnode,o=H(e,n,s);return o.ref=r,o.ce=i,delete t.vnode.ce,o}var Ys=e=>e.type.__isKeepAlive,Tv={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const r=at(),n=r.ctx;if(!n.renderer)return()=>{const T=t.default&&t.default();return T&&T.length===1?T[0]:T};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=(T,y,b,x,k)=>{const O=T.component;u(T,y,b,0,a),l(O.vnode,T,y,b,O,a,x,T.slotScopeIds,k),lt(()=>{O.isDeactivated=!1,O.a&&is(O.a);const g=T.props&&T.props.onVnodeMounted;g&&Vt(g,O.parent,T)},a)},n.deactivate=T=>{const y=T.component;ao(y.m),ao(y.a),u(T,p,null,1,a),lt(()=>{y.da&&is(y.da);const b=T.props&&T.props.onVnodeUnmounted;b&&Vt(b,y.parent,T),y.isDeactivated=!0},a)};function h(T){Oa(T),c(T,r,a,!0)}function m(T){s.forEach((y,b)=>{const x=rl(jr(y)?y.type.__asyncResolved||{}:y.type);x&&!T(x)&&w(b)})}function w(T){const y=s.get(T);y&&(!o||!vr(y,o))?h(y):o&&Oa(o),s.delete(T),i.delete(T)}Re(()=>[e.include,e.exclude],([T,y])=>{T&&m(b=>Zs(T,b)),y&&m(b=>!Zs(y,b))},{flush:"post",deep:!0});let E=null;const v=()=>{E!=null&&(lo(r.subTree.type)?lt(()=>{s.set(E,to(r.subTree))},r.subTree.suspense):s.set(E,to(r.subTree)))};return We(v),Xs(v),vs(()=>{s.forEach(T=>{const{subTree:y,suspense:b}=r,x=to(y);if(T.type===x.type&&T.key===x.key){Oa(x);const k=x.component.da;k&&lt(k,b);return}h(T)})}),()=>{if(E=null,!t.default)return o=null;const T=t.default(),y=T[0];if(T.length>1)return o=null,T;if(!zr(y)||!(y.shapeFlag&4)&&!(y.shapeFlag&128))return o=null,y;let b=to(y);if(b.type===ot)return o=null,b;const x=b.type,k=rl(jr(b)?b.type.__asyncResolved||{}:x),{include:O,exclude:g,max:q}=e;if(O&&(!k||!Zs(O,k))||g&&k&&Zs(g,k))return b.shapeFlag&=-257,o=b,y;const B=b.key==null?x:b.key,S=s.get(B);return b.el&&(b=mr(b),y.shapeFlag&128&&(y.ssContent=b)),E=B,S?(b.el=S.el,b.component=S.component,b.transition&&Vr(b,b.transition),b.shapeFlag|=512,i.delete(B),i.add(B)):(i.add(B),q&&i.size>parseInt(q,10)&&w(i.values().next().value)),b.shapeFlag|=256,o=b,lo(y.type)?y:b}}};function Zs(e,t){return we(e)?e.some(r=>Zs(r,t)):et(e)?e.split(",").includes(t):ag(e)?(e.lastIndex=0,e.test(t)):!1}function Du(e,t){Hu(e,"a",t)}function Ou(e,t){Hu(e,"da",t)}function Hu(e,t,r=Ct){const n=e.__wdc||(e.__wdc=()=>{let s=r;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(ro(t,n,r),r){let s=r.parent;for(;s&&s.parent;)Ys(s.parent.vnode)&&Ev(n,t,r,s),s=s.parent}}function Ev(e,t,r,n){const s=ro(t,e,n,!0);Mt(()=>{aa(n[t],s)},r)}function Oa(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function to(e){return e.shapeFlag&128?e.ssContent:e}function ro(e,t,r=Ct,n=!1){if(r){const s=r[e]||(r[e]=[]),i=t.__weh||(t.__weh=(...o)=>{Or();const a=Fn(r),l=tr(t,r,e,o);return a(),Hr(),l});return n?s.unshift(i):s.push(i),i}}var Ur=e=>(t,r=Ct)=>{(!ws||e==="sp")&&ro(e,(...n)=>t(...n),r)},Mu=Ur("bm"),We=Ur("m"),Ha=Ur("bu"),Xs=Ur("u"),vs=Ur("bum"),Mt=Ur("um"),Nu=Ur("sp"),qu=Ur("rtg"),Bu=Ur("rtc");function Lu(e,t=Ct){ro("ec",e,t)}var Ma="components",Av="directives";function kv(e,t){return Na(Ma,e,!0,t)||e}var Fu=Symbol.for("v-ndc");function Qs(e){return et(e)?Na(Ma,e,!1)||e:e||Fu}function Iv(e){return Na(Av,e)}function Na(e,t,r=!0,n=!1){const s=St||Ct;if(s){const i=s.type;if(e===Ma){const a=rl(i,!1);if(a&&(a===t||a===ft(t)||a===Hs(ft(t))))return i}const o=Vu(s[e]||i[e],t)||Vu(s.appContext[e],t);return!o&&n?i:o}}function Vu(e,t){return e&&(e[t]||e[ft(t)]||e[Hs(ft(t))])}function nr(e,t,r,n){let s;const i=r&&r[n],o=we(e);if(o||et(e)){const a=o&&Lr(e);let l=!1,u=!1;a&&(l=!Lt(e),u=Cr(e),e=Mi(e)),s=new Array(e.length);for(let c=0,d=e.length;c<d;c++)s[c]=t(l?u?as(gr(e[c])):gr(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 Rv(e,t){for(let r=0;r<t.length;r++){const n=t[r];if(we(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 se(e,t,r={},n,s){if(St.ce||St.parent&&jr(St.parent)&&St.parent.ce){const u=Object.keys(r).length>0;return t!=="default"&&(r.name=t),P(),G(Le,null,[H("slot",r,n&&n())],u?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),P();const o=i&&qa(i(r)),a=r.key||o&&o.key,l=G(Le,{key:(a&&!fr(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 qa(e){return e.some(t=>zr(t)?!(t.type===ot||t.type===Le&&!qa(t.children)):!0)?e:null}function ju(e,t){const r={};for(const n in e)r[t&&/[A-Z]/.test(n)?`on:${n}`:ss(n)]=e[n];return r}var Ba=e=>e?Cd(e)?oi(e):Ba(e.parent):null,ei=Ke(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=>Ba(e.parent),$root:e=>Ba(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ja(e),$forceUpdate:e=>e.f||(e.f=()=>{Ta(e.update)}),$nextTick:e=>e.n||(e.n=wt.bind(e.proxy)),$watch:e=>lv.bind(e)}),La=(e,t)=>e!==qe&&!e.__isScriptSetup&&ze(e,t),Fa={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(La(n,t))return o[t]=1,n[t];if(s!==qe&&ze(s,t))return o[t]=2,s[t];if(ze(i,t))return o[t]=3,i[t];if(r!==qe&&ze(r,t))return o[t]=4,r[t];Va&&(o[t]=0)}}const u=ei[t];let c,d;if(u)return t==="$attrs"&&At(e.attrs,"get",""),u(e);if((c=a.__cssModules)&&(c=c[t]))return c;if(r!==qe&&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 La(s,t)?(s[t]=r,!0):n!==qe&&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!==qe&&a[0]!=="$"&&ze(e,a)||La(t,a)||ze(i,a)||ze(n,a)||ze(ei,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)}},$v=Ke({},Fa,{get(e,t){if(t!==Symbol.unscopables)return Fa.get(e,t,e)},has(e,t){return t[0]!=="_"&&!dg(t)}});function Pv(){return null}function Dv(){return null}function Ov(e){}function Hv(e){}function Mv(){return null}function Nv(){}function qv(e,t){return null}function Bv(){return Uu("useSlots").slots}function Lv(){return Uu("useAttrs").attrs}function Uu(e){const t=at();return t.setupContext||(t.setupContext=Ed(t))}function ti(e){return we(e)?e.reduce((t,r)=>(t[r]=null,t),{}):e}function zu(e,t){const r=ti(e);for(const n in t){if(n.startsWith("__skip"))continue;let s=r[n];s?we(s)||Ee(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 Fv(e,t){return!e||!t?e||t:we(e)&&we(t)?e.concat(t):Ke({},ti(e),ti(t))}function Vv(e,t){const r={};for(const n in e)t.includes(n)||Object.defineProperty(r,n,{enumerable:!0,get:()=>e[n]});return r}function jv(e){const t=at();let r=e();fo();const n=()=>{at()!==t&&t.scope.off(),fo()};return la(r)&&(r=r.catch(s=>{throw Fn(t),Promise.resolve().then(()=>Promise.resolve().then(n)),s})),[r,()=>{Fn(t),Promise.resolve().then(n)}]}var Va=!0;function Uv(e){const t=ja(e),r=e.proxy,n=e.ctx;Va=!1,t.beforeCreate&&Ku(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:E,beforeDestroy:v,beforeUnmount:T,destroyed:y,unmounted:b,render:x,renderTracked:k,renderTriggered:O,errorCaptured:g,serverPrefetch:q,expose:B,inheritAttrs:S,components:_,directives:C,filters:N}=t;if(u&&zv(u,n,null),o)for(const X in o){const Z=o[X];Ee(Z)&&(n[X]=Z.bind(r))}if(s){const X=s.call(r,r);je(X)&&(e.data=qr(X))}if(Va=!0,i)for(const X in i){const Z=i[X],le=z({get:Ee(Z)?Z.bind(r,r):Ee(Z.get)?Z.get.bind(r,r):er,set:!Ee(Z)&&Ee(Z.set)?Z.set.bind(r):er});Object.defineProperty(n,X,{enumerable:!0,configurable:!0,get:()=>le.value,set:W=>le.value=W})}if(a)for(const X in a)Wu(a[X],n,r,X);if(l){const X=Ee(l)?l.call(r):l;Reflect.ownKeys(X).forEach(Z=>{Mn(Z,X[Z])})}c&&Ku(c,e,"c");function j(X,Z){we(Z)?Z.forEach(le=>X(le.bind(r))):Z&&X(Z.bind(r))}if(j(Mu,d),j(We,p),j(Ha,h),j(Xs,m),j(Du,w),j(Ou,E),j(Lu,g),j(Bu,k),j(qu,O),j(vs,T),j(Mt,b),j(Nu,q),we(B))if(B.length){const X=e.exposed||(e.exposed={});B.forEach(Z=>{Object.defineProperty(X,Z,{get:()=>r[Z],set:le=>r[Z]=le,enumerable:!0})})}else e.exposed||(e.exposed={});x&&e.render===er&&(e.render=x),S!=null&&(e.inheritAttrs=S),_&&(e.components=_),C&&(e.directives=C),q&&Da(e)}function zv(e,t,r=er){we(e)&&(e=Ua(e));for(const n in e){const s=e[n];let i;je(s)?"default"in s?i=Ht(s.from||n,s.default,!0):i=Ht(s.from||n):i=Ht(s),Je(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[n]=i}}function Ku(e,t,r){tr(we(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,r)}function Wu(e,t,r,n){let s=n.includes(".")?vu(r,n):()=>r[n];if(et(e)){const i=t[e];Ee(i)&&Re(s,i)}else if(Ee(e))Re(s,e.bind(r));else if(je(e))if(we(e))e.forEach(i=>Wu(i,t,r,n));else{const i=Ee(e.handler)?e.handler.bind(r):t[e.handler];Ee(i)&&Re(s,i,e)}}function ja(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=>no(l,u,o,!0)),no(l,t,o)),je(t)&&i.set(t,l),l}function no(e,t,r,n=!1){const{mixins:s,extends:i}=t;i&&no(e,i,r,!0),s&&s.forEach(o=>no(e,o,r,!0));for(const o in t)if(!(n&&o==="expose")){const a=Kv[o]||r&&r[o];e[o]=a?a(e[o],t[o]):t[o]}return e}var Kv={data:Gu,props:Ju,emits:Ju,methods:ri,computed:ri,beforeCreate:Nt,created:Nt,beforeMount:Nt,mounted:Nt,beforeUpdate:Nt,updated:Nt,beforeDestroy:Nt,beforeUnmount:Nt,destroyed:Nt,unmounted:Nt,activated:Nt,deactivated:Nt,errorCaptured:Nt,serverPrefetch:Nt,components:ri,directives:ri,watch:Gv,provide:Gu,inject:Wv};function Gu(e,t){return t?e?function(){return Ke(Ee(e)?e.call(this,this):e,Ee(t)?t.call(this,this):t)}:t:e}function Wv(e,t){return ri(Ua(e),Ua(t))}function Ua(e){if(we(e)){const t={};for(let r=0;r<e.length;r++)t[e[r]]=e[r];return t}return e}function Nt(e,t){return e?[...new Set([].concat(e,t))]:t}function ri(e,t){return e?Ke(Object.create(null),e,t):t}function Ju(e,t){return e?we(e)&&we(t)?[...new Set([...e,...t])]:Ke(Object.create(null),ti(e),ti(t??{})):t}function Gv(e,t){if(!e)return t;if(!t)return e;const r=Ke(Object.create(null),e);for(const n in t)r[n]=Nt(e[n],t[n]);return r}function Yu(){return{app:null,config:{isNativeTag:Rc,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 Jv=0;function Yv(e,t){return function(n,s=null){Ee(n)||(n=Ke({},n)),s!=null&&!je(s)&&(s=null);const i=Yu(),o=new WeakSet,a=[];let l=!1;const u=i.app={_uid:Jv++,_component:n,_props:s,_container:null,_context:i,_instance:null,version:kd,get config(){return i.config},set config(c){},use(c,...d){return o.has(c)||(c&&Ee(c.install)?(o.add(c),c.install(u,...d)):Ee(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||H(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,oi(h.component)}},onUnmount(c){a.push(c)},unmount(){l&&(tr(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=Nn;Nn=u;try{return c()}finally{Nn=d}}};return u}}var Nn=null;function Zv(e,t,r=qe){const n=at(),s=ft(t),i=Bt(t),o=Zu(e,s),a=js((l,u)=>{let c,d=qe,p;return gu(()=>{const h=e[s];Dt(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(!Dt(m,c)&&!(d!==qe&&Dt(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),Dt(h,m)&&Dt(h,d)&&!Dt(m,p)&&u(),d=h,p=m}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?o||qe:a,done:!1}:{done:!0}}}},a}var Zu=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ft(t)}Modifiers`]||e[`${Bt(t)}Modifiers`];function Xv(e,t,...r){if(e.isUnmounted)return;const n=e.vnode.props||qe;let s=r;const i=t.startsWith("update:"),o=i&&Zu(n,t.slice(7));o&&(o.trim&&(s=r.map(c=>et(c)?c.trim():c)),o.number&&(s=r.map(Ii)));let a,l=n[a=ss(t)]||n[a=ss(ft(t))];!l&&i&&(l=n[a=ss(Bt(t))]),l&&tr(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,tr(u,e,6,s)}}var Qv=new WeakMap;function Xu(e,t,r=!1){const n=r?Qv:t.emitsCache,s=n.get(e);if(s!==void 0)return s;const i=e.emits;let o={},a=!1;if(!Ee(e)){const l=u=>{const c=Xu(u,t,!0);c&&(a=!0,Ke(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):(we(i)?i.forEach(l=>o[l]=null):Ke(o,i),je(e)&&n.set(e,o),o)}function so(e,t){return!e||!Os(t)?!1:(t=t.slice(2).replace(/Once$/,""),ze(e,t[0].toLowerCase()+t.slice(1))||ze(e,Bt(t))||ze(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,E=Ks(e);let v,T;try{if(r.shapeFlag&4){const b=s||n,x=b;v=Ft(u.call(x,b,c,d,h,p,m)),T=a}else{const b=t;v=Ft(b.length>1?b(d,{attrs:a,slots:o,emit:l}):b(d,null)),T=t.props?a:tm(a)}}catch(b){si.length=0,Hn(b,e,1),v=H(ot)}let y=v;if(T&&w!==!1){const b=Object.keys(T),{shapeFlag:x}=y;b.length&&x&7&&(i&&b.some(oa)&&(T=rm(T,i)),y=mr(y,T,!1,!0))}return r.dirs&&(y=mr(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(r.dirs):r.dirs),r.transition&&Vr(y,r.transition),v=y,Ks(E),v}function em(e,t=!0){let r;for(let n=0;n<e.length;n++){const s=e[n];if(zr(s)){if(s.type!==ot||s.children==="v-if"){if(r)return;r=s}}else return}return r}var tm=e=>{let t;for(const r in e)(r==="class"||r==="style"||Os(r))&&((t||(t={}))[r]=e[r]);return t},rm=(e,t)=>{const r={};for(const n in e)(!oa(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?Qu(n,o,u):!!o;if(l&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const p=c[d];if(ed(o,n,p)&&!so(u,p))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:n===o?!1:n?o?Qu(n,o,u):!0:!!o;return!1}function Qu(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(ed(t,e,i)&&!so(r,i))return!0}return!1}function ed(e,t,r){const n=e[r],s=t[r];return r==="style"&&je(n)&&je(s)?!Dr(n,s):n!==s}function oo({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 td={},rd=()=>Object.create(td),nd=e=>Object.getPrototypeOf(e)===td;function sm(e,t,r,n=!1){const s={},i=rd();e.propsDefaults=Object.create(null),sd(e,t,s,i);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);r?e.props=n?s:ru(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function im(e,t,r,n){const{props:s,attrs:i,vnode:{patchFlag:o}}=e,a=Be(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(so(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=ft(p);s[m]=za(l,a,m,h,e,!1)}else h!==i[p]&&(i[p]=h,u=!0)}}}else{sd(e,t,s,i)&&(u=!0);let c;for(const d in a)(!t||!ze(t,d)&&((c=Bt(d))===d||!ze(t,c)))&&(l?r&&(r[d]!==void 0||r[c]!==void 0)&&(s[d]=za(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&&Mr(e.attrs,"set","")}function sd(e,t,r,n){const[s,i]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(Dn(l))continue;const u=t[l];let c;s&&ze(s,c=ft(l))?!i||!i.includes(c)?r[c]=u:(a||(a={}))[c]=u:so(e.emitsOptions,l)||(!(l in n)||u!==n[l])&&(n[l]=u,o=!0)}if(i){const l=Be(r),u=a||qe;for(let c=0;c<i.length;c++){const d=i[c];r[d]=za(s,l,d,u[d],e,!ze(u,d))}}return o}function za(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&&Ee(l)){const{propsDefaults:u}=s;if(r in u)n=u[r];else{const c=Fn(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===Bt(r))&&(n=!0))}return n}var om=new WeakMap;function id(e,t,r=!1){const n=r?om:t.propsCache,s=n.get(e);if(s)return s;const i=e.props,o={},a=[];let l=!1;if(!Ee(e)){const c=d=>{l=!0;const[p,h]=id(d,t,!0);Ke(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,ts),ts;if(we(i))for(let c=0;c<i.length;c++){const d=ft(i[c]);od(d)&&(o[d]=qe)}else if(i)for(const c in i){const d=ft(c);if(od(d)){const p=i[c],h=o[d]=we(p)||Ee(p)?{type:p}:Ke({},p),m=h.type;let w=!1,E=!0;if(we(m))for(let v=0;v<m.length;++v){const T=m[v],y=Ee(T)&&T.name;if(y==="Boolean"){w=!0;break}else y==="String"&&(E=!1)}else w=Ee(m)&&m.name==="Boolean";h[0]=w,h[1]=E,(w||ze(h,"default"))&&a.push(d)}}const u=[o,a];return je(e)&&n.set(e,u),u}function od(e){return e[0]!=="$"&&!Dn(e)}var Ka=e=>e==="_"||e==="_ctx"||e==="$stable",Wa=e=>we(e)?e.map(Ft):[Ft(e)],am=(e,t,r)=>{if(t._n)return t;const n=R((...s)=>Wa(t(...s)),r);return n._c=!1,n},ad=(e,t,r)=>{const n=e._ctx;for(const s in e){if(Ka(s))continue;const i=e[s];if(Ee(i))t[s]=am(s,i,n);else if(i!=null){const o=Wa(i);t[s]=()=>o}}},ld=(e,t)=>{const r=Wa(t);e.slots.default=()=>r},cd=(e,t,r)=>{for(const n in t)(r||!Ka(n))&&(e[n]=t[n])},lm=(e,t,r)=>{const n=e.slots=rd();if(e.vnode.shapeFlag&32){const s=t._;s?(cd(n,t,r),r&&Dc(n,"_",s,!0)):ad(t,n)}else t&&ld(e,t)},cm=(e,t,r)=>{const{vnode:n,slots:s}=e;let i=!0,o=qe;if(n.shapeFlag&32){const a=t._;a?r&&a===1?i=!1:cd(s,t,r):(i=!t.$stable,ad(t,s)),o=t}else t&&(ld(e,t),o={default:1});if(i)for(const a in s)!Ka(a)&&o[a]==null&&delete s[a]};function sx(){}var lt=wd;function ud(e){return fd(e)}function dd(e){return fd(e,hv)}function fd(e,t){const r=$i();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=er,insertStaticContent:m}=e,w=(A,$,Y,oe=null,ne=null,te=null,de=void 0,ue=null,ce=!!$.dynamicChildren)=>{if(A===$)return;A&&!vr(A,$)&&(oe=Ze(A),fe(A,ne,te,!0),A=null),$.patchFlag===-2&&(ce=!1,$.dynamicChildren=null);const{type:ie,ref:Se,shapeFlag:he}=$;switch(ie){case cn:E(A,$,Y,oe);break;case ot:v(A,$,Y,oe);break;case Bn:A==null&&T($,Y,oe,de);break;case Le:_(A,$,Y,oe,ne,te,de,ue,ce);break;default:he&1?x(A,$,Y,oe,ne,te,de,ue,ce):he&6?C(A,$,Y,oe,ne,te,de,ue,ce):(he&64||he&128)&&ie.process(A,$,Y,oe,ne,te,de,ue,ce,Qe)}Se!=null&&ne?ps(Se,A&&A.ref,te,$||A,!$):Se==null&&A&&A.ref!=null&&ps(A.ref,null,te,A,!0)},E=(A,$,Y,oe)=>{if(A==null)n($.el=a($.children),Y,oe);else{const ne=$.el=A.el;$.children!==A.children&&u(ne,$.children)}},v=(A,$,Y,oe)=>{A==null?n($.el=l($.children||""),Y,oe):$.el=A.el},T=(A,$,Y,oe)=>{[A.el,A.anchor]=m(A.children,$,Y,oe,A.el,A.anchor)},y=({el:A,anchor:$},Y,oe)=>{let ne;for(;A&&A!==$;)ne=p(A),n(A,Y,oe),A=ne;n($,Y,oe)},b=({el:A,anchor:$})=>{let Y;for(;A&&A!==$;)Y=p(A),s(A),A=Y;s($)},x=(A,$,Y,oe,ne,te,de,ue,ce)=>{if($.type==="svg"?de="svg":$.type==="math"&&(de="mathml"),A==null)k($,Y,oe,ne,te,de,ue,ce);else{const ie=A.el&&A.el._isVueCE?A.el:null;try{ie&&ie._beginPatch(),q(A,$,ne,te,de,ue,ce)}finally{ie&&ie._endPatch()}}},k=(A,$,Y,oe,ne,te,de,ue)=>{let ce,ie;const{props:Se,shapeFlag:he,transition:I,dirs:F}=A;if(ce=A.el=o(A.type,te,Se&&Se.is,Se),he&8?c(ce,A.children):he&16&&g(A.children,ce,null,oe,ne,Ga(A,te),de,ue),F&&Tr(A,null,oe,"created"),O(ce,A,A.scopeId,de,oe),Se){for(const D in Se)D!=="value"&&!Dn(D)&&i(ce,D,null,Se[D],te,oe);"value"in Se&&i(ce,"value",null,Se.value,te),(ie=Se.onVnodeBeforeMount)&&Vt(ie,oe,A)}F&&Tr(A,null,oe,"beforeMount");const M=pd(ne,I);M&&I.beforeEnter(ce),n(ce,$,Y),((ie=Se&&Se.onVnodeMounted)||M||F)&&lt(()=>{ie&&Vt(ie,oe,A),M&&I.enter(ce),F&&Tr(A,null,oe,"mounted")},ne)},O=(A,$,Y,oe,ne)=>{if(Y&&h(A,Y),oe)for(let te=0;te<oe.length;te++)h(A,oe[te]);if(ne){let te=ne.subTree;if($===te||lo(te.type)&&(te.ssContent===$||te.ssFallback===$)){const de=ne.vnode;O(A,de,de.scopeId,de.slotScopeIds,ne.parent)}}},g=(A,$,Y,oe,ne,te,de,ue,ce=0)=>{for(let ie=ce;ie<A.length;ie++)w(null,A[ie]=ue?Kr(A[ie]):Ft(A[ie]),$,Y,oe,ne,te,de,ue)},q=(A,$,Y,oe,ne,te,de)=>{const ue=$.el=A.el;let{patchFlag:ce,dynamicChildren:ie,dirs:Se}=$;ce|=A.patchFlag&16;const he=A.props||qe,I=$.props||qe;let F;if(Y&&qn(Y,!1),(F=I.onVnodeBeforeUpdate)&&Vt(F,Y,$,A),Se&&Tr($,A,Y,"beforeUpdate"),Y&&qn(Y,!0),(he.innerHTML&&I.innerHTML==null||he.textContent&&I.textContent==null)&&c(ue,""),ie?B(A.dynamicChildren,ie,ue,Y,oe,Ga($,ne),te):de||Z(A,$,ue,null,Y,oe,Ga($,ne),te,!1),ce>0){if(ce&16)S(ue,he,I,Y,ne);else if(ce&2&&he.class!==I.class&&i(ue,"class",null,I.class,ne),ce&4&&i(ue,"style",he.style,I.style,ne),ce&8){const M=$.dynamicProps;for(let D=0;D<M.length;D++){const L=M[D],Q=he[L],me=I[L];(me!==Q||L==="value")&&i(ue,L,Q,me,ne,Y)}}ce&1&&A.children!==$.children&&c(ue,$.children)}else!de&&ie==null&&S(ue,he,I,Y,ne);((F=I.onVnodeUpdated)||Se)&&lt(()=>{F&&Vt(F,Y,$,A),Se&&Tr($,A,Y,"updated")},oe)},B=(A,$,Y,oe,ne,te,de)=>{for(let ue=0;ue<$.length;ue++){const ce=A[ue],ie=$[ue];w(ce,ie,ce.el&&(ce.type===Le||!vr(ce,ie)||ce.shapeFlag&198)?d(ce.el):Y,null,oe,ne,te,de,!0)}},S=(A,$,Y,oe,ne)=>{if($!==Y){if($!==qe)for(const te in $)!Dn(te)&&!(te in Y)&&i(A,te,$[te],null,ne,oe);for(const te in Y){if(Dn(te))continue;const de=Y[te],ue=$[te];de!==ue&&te!=="value"&&i(A,te,ue,de,ne,oe)}"value"in Y&&i(A,"value",$.value,Y.value,ne)}},_=(A,$,Y,oe,ne,te,de,ue,ce)=>{const ie=$.el=A?A.el:a(""),Se=$.anchor=A?A.anchor:a("");let{patchFlag:he,dynamicChildren:I,slotScopeIds:F}=$;F&&(ue=ue?ue.concat(F):F),A==null?(n(ie,Y,oe),n(Se,Y,oe),g($.children||[],Y,Se,ne,te,de,ue,ce)):he>0&&he&64&&I&&A.dynamicChildren&&A.dynamicChildren.length===I.length?(B(A.dynamicChildren,I,Y,ne,te,de,ue),($.key!=null||ne&&$===ne.subTree)&&Ja(A,$,!0)):Z(A,$,Y,Se,ne,te,de,ue,ce)},C=(A,$,Y,oe,ne,te,de,ue,ce)=>{$.slotScopeIds=ue,A==null?$.shapeFlag&512?ne.ctx.activate($,Y,oe,de,ce):N($,Y,oe,ne,te,de,ce):V(A,$,ce)},N=(A,$,Y,oe,ne,te,de)=>{const ue=A.component=Sd(A,oe,ne);if(Ys(A)&&(ue.ctx.renderer=Qe),xd(ue,!1,de),ue.asyncDep){if(ne&&ne.registerDep(ue,j,de),!A.el){const ce=ue.subTree=H(ot);v(null,ce,$,Y),A.placeholder=ce.el}}else j(ue,A,$,Y,ne,te,de)},V=(A,$,Y)=>{const oe=$.component=A.component;if(nm(A,$,Y))if(oe.asyncDep&&!oe.asyncResolved){X(oe,$,Y);return}else oe.next=$,oe.update();else $.el=A.el,oe.vnode=$},j=(A,$,Y,oe,ne,te,de)=>{const ue=()=>{if(A.isMounted){let{next:he,bu:I,u:F,parent:M,vnode:D}=A;{const Me=hd(A);if(Me){he&&(he.el=D.el,X(A,he,de)),Me.asyncDep.then(()=>{lt(()=>{A.isUnmounted||ie()},ne)});return}}let L=he,Q;qn(A,!1),he?(he.el=D.el,X(A,he,de)):he=D,I&&is(I),(Q=he.props&&he.props.onVnodeBeforeUpdate)&&Vt(Q,M,he,D),qn(A,!0);const me=io(A),Ie=A.subTree;A.subTree=me,w(Ie,me,d(Ie.el),Ze(Ie),A,ne,te),he.el=me.el,L===null&&oo(A,me.el),F&&lt(F,ne),(Q=he.props&&he.props.onVnodeUpdated)&&lt(()=>Vt(Q,M,he,D),ne)}else{let he;const{el:I,props:F}=$,{bm:M,m:D,parent:L,root:Q,type:me}=A,Ie=jr($);if(qn(A,!1),M&&is(M),!Ie&&(he=F&&F.onVnodeBeforeMount)&&Vt(he,L,$),qn(A,!0),I&&gt){const Me=()=>{A.subTree=io(A),gt(I,A.subTree,A,ne,null)};Ie&&me.__asyncHydrate?me.__asyncHydrate(I,A,Me):Me()}else{Q.ce&&Q.ce._hasShadowRoot()&&Q.ce._injectChildStyle(me);const Me=A.subTree=io(A);w(null,Me,Y,oe,A,ne,te),$.el=Me.el}if(D&&lt(D,ne),!Ie&&(he=F&&F.onVnodeMounted)){const Me=$;lt(()=>Vt(he,L,Me),ne)}($.shapeFlag&256||L&&jr(L.vnode)&&L.vnode.shapeFlag&256)&&A.a&&lt(A.a,ne),A.isMounted=!0,$=Y=oe=null}};A.scope.on();const ce=A.effect=new Ms(ue);A.scope.off();const ie=A.update=ce.run.bind(ce),Se=A.job=ce.runIfDirty.bind(ce);Se.i=A,Se.id=A.uid,ce.scheduler=()=>Ta(Se),qn(A,!0),ie()},X=(A,$,Y)=>{$.component=A;const oe=A.vnode.props;A.vnode=$,A.next=null,im(A,$.props,oe,Y),cm(A,$.children,Y),Or(),uu(A),Hr()},Z=(A,$,Y,oe,ne,te,de,ue,ce=!1)=>{const ie=A&&A.children,Se=A?A.shapeFlag:0,he=$.children,{patchFlag:I,shapeFlag:F}=$;if(I>0){if(I&128){W(ie,he,Y,oe,ne,te,de,ue,ce);return}else if(I&256){le(ie,he,Y,oe,ne,te,de,ue,ce);return}}F&8?(Se&16&&ke(ie,ne,te),he!==ie&&c(Y,he)):Se&16?F&16?W(ie,he,Y,oe,ne,te,de,ue,ce):ke(ie,ne,te,!0):(Se&8&&c(Y,""),F&16&&g(he,Y,oe,ne,te,de,ue,ce))},le=(A,$,Y,oe,ne,te,de,ue,ce)=>{A=A||ts,$=$||ts;const ie=A.length,Se=$.length,he=Math.min(ie,Se);let I;for(I=0;I<he;I++){const F=$[I]=ce?Kr($[I]):Ft($[I]);w(A[I],F,Y,null,ne,te,de,ue,ce)}ie>Se?ke(A,ne,te,!0,!1,he):g($,Y,oe,ne,te,de,ue,ce,he)},W=(A,$,Y,oe,ne,te,de,ue,ce)=>{let ie=0;const Se=$.length;let he=A.length-1,I=Se-1;for(;ie<=he&&ie<=I;){const F=A[ie],M=$[ie]=ce?Kr($[ie]):Ft($[ie]);if(vr(F,M))w(F,M,Y,null,ne,te,de,ue,ce);else break;ie++}for(;ie<=he&&ie<=I;){const F=A[he],M=$[I]=ce?Kr($[I]):Ft($[I]);if(vr(F,M))w(F,M,Y,null,ne,te,de,ue,ce);else break;he--,I--}if(ie>he){if(ie<=I){const F=I+1,M=F<Se?$[F].el:oe;for(;ie<=I;)w(null,$[ie]=ce?Kr($[ie]):Ft($[ie]),Y,M,ne,te,de,ue,ce),ie++}}else if(ie>I)for(;ie<=he;)fe(A[ie],ne,te,!0),ie++;else{const F=ie,M=ie,D=new Map;for(ie=M;ie<=I;ie++){const vt=$[ie]=ce?Kr($[ie]):Ft($[ie]);vt.key!=null&&D.set(vt.key,ie)}let L,Q=0;const me=I-M+1;let Ie=!1,Me=0;const Ge=new Array(me);for(ie=0;ie<me;ie++)Ge[ie]=0;for(ie=F;ie<=he;ie++){const vt=A[ie];if(Q>=me){fe(vt,ne,te,!0);continue}let Kt;if(vt.key!=null)Kt=D.get(vt.key);else for(L=M;L<=I;L++)if(Ge[L-M]===0&&vr(vt,$[L])){Kt=L;break}Kt===void 0?fe(vt,ne,te,!0):(Ge[Kt-M]=ie+1,Kt>=Me?Me=Kt:Ie=!0,w(vt,$[Kt],Y,null,ne,te,de,ue,ce),Q++)}const Tt=Ie?um(Ge):ts;for(L=Tt.length-1,ie=me-1;ie>=0;ie--){const vt=M+ie,Kt=$[vt],Qn=$[vt+1],Xh=vt+1<Se?Qn.el||gd(Qn):oe;Ge[ie]===0?w(null,Kt,Y,Xh,ne,te,de,ue,ce):Ie&&(L<0||ie!==Tt[L]?ae(Kt,Y,Xh,2):L--)}}},ae=(A,$,Y,oe,ne=null)=>{const{el:te,type:de,transition:ue,children:ce,shapeFlag:ie}=A;if(ie&6){ae(A.component.subTree,$,Y,oe);return}if(ie&128){A.suspense.move($,Y,oe);return}if(ie&64){de.move(A,$,Y,Qe);return}if(de===Le){n(te,$,Y);for(let Se=0;Se<ce.length;Se++)ae(ce[Se],$,Y,oe);n(A.anchor,$,Y);return}if(de===Bn){y(A,$,Y);return}if(oe!==2&&ie&1&&ue)if(oe===0)ue.beforeEnter(te),n(te,$,Y),lt(()=>ue.enter(te),ne);else{const{leave:Se,delayLeave:he,afterLeave:I}=ue,F=()=>{A.ctx.isUnmounted?s(te):n(te,$,Y)},M=()=>{te._isLeaving&&te[Er](!0),Se(te,()=>{F(),I&&I()})};he?he(te,F,M):M()}else n(te,$,Y)},fe=(A,$,Y,oe=!1,ne=!1)=>{const{type:te,props:de,ref:ue,children:ce,dynamicChildren:ie,shapeFlag:Se,patchFlag:he,dirs:I,cacheIndex:F}=A;if(he===-2&&(ne=!1),ue!=null&&(Or(),ps(ue,null,Y,A,!0),Hr()),F!=null&&($.renderCache[F]=void 0),Se&256){$.ctx.deactivate(A);return}const M=Se&1&&I,D=!jr(A);let L;if(D&&(L=de&&de.onVnodeBeforeUnmount)&&Vt(L,$,A),Se&6)Te(A.component,Y,oe);else{if(Se&128){A.suspense.unmount(Y,oe);return}M&&Tr(A,null,$,"beforeUnmount"),Se&64?A.type.remove(A,$,Y,Qe,oe):ie&&!ie.hasOnce&&(te!==Le||he>0&&he&64)?ke(ie,$,Y,!1,!0):(te===Le&&he&384||!ne&&Se&16)&&ke(ce,$,Y),oe&&Ce(A)}(D&&(L=de&&de.onVnodeUnmounted)||M)&&lt(()=>{L&&Vt(L,$,A),M&&Tr(A,null,$,"unmounted")},Y)},Ce=A=>{const{type:$,el:Y,anchor:oe,transition:ne}=A;if($===Le){Oe(Y,oe);return}if($===Bn){b(A);return}const te=()=>{s(Y),ne&&!ne.persisted&&ne.afterLeave&&ne.afterLeave()};if(A.shapeFlag&1&&ne&&!ne.persisted){const{leave:de,delayLeave:ue}=ne,ce=()=>de(Y,te);ue?ue(A.el,te,ce):ce()}else te()},Oe=(A,$)=>{let Y;for(;A!==$;)Y=p(A),s(A),A=Y;s($)},Te=(A,$,Y)=>{const{bum:oe,scope:ne,job:te,subTree:de,um:ue,m:ce,a:ie}=A;ao(ce),ao(ie),oe&&is(oe),ne.stop(),te&&(te.flags|=8,fe(de,A,$,Y)),ue&&lt(ue,$),lt(()=>{A.isUnmounted=!0},$)},ke=(A,$,Y,oe=!1,ne=!1,te=0)=>{for(let de=te;de<A.length;de++)fe(A[de],$,Y,oe,ne)},Ze=A=>{if(A.shapeFlag&6)return Ze(A.component.subTree);if(A.shapeFlag&128)return A.suspense.next();const $=p(A.anchor||A.el),Y=$&&$[mu];return Y?p(Y):$};let ut=!1;const Ve=(A,$,Y)=>{let oe;A==null?$._vnode&&(fe($._vnode,null,null,!0),oe=$._vnode.component):w($._vnode||null,A,$,null,null,null,Y),$._vnode=A,ut||(ut=!0,uu(oe),Ui(),ut=!1)},Qe={p:w,um:fe,m:ae,r:Ce,mt:N,mc:g,pc:Z,pbc:B,n:Ze,o:e};let dt,gt;return t&&([dt,gt]=t(Qe)),{render:Ve,hydrate:dt,createApp:Yv(Ve,dt)}}function Ga({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 qn({effect:e,job:t},r){r?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function pd(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ja(e,t,r=!1){const n=e.children,s=t.children;if(we(n)&&we(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]=Kr(s[i]),a.el=o.el),!r&&a.patchFlag!==-2&&Ja(o,a)),a.type===cn&&(a.patchFlag===-1&&(a=s[i]=Kr(a)),a.el=o.el),a.type===ot&&!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 hd(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:hd(t)}function ao(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function gd(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?gd(t.subTree):null}var lo=e=>e.__isSuspense,Ya=0,dm={name:"Suspense",__isSuspense:!0,process(e,t,r,n,s,i,o,a,l,u){if(e==null)fm(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}pm(e,t,r,n,s,o,a,l,u)}},hydrate:hm,normalize:gm};function ni(e,t){const r=e.props&&e.props[t];Ee(r)&&r()}function fm(e,t,r,n,s,i,o,a,l){const{p:u,o:{createElement:c}}=l,d=c("div"),p=e.suspense=vd(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?(ni(e,"onPending"),ni(e,"onFallback"),u(null,e.ssFallback,t,r,n,null,i,o),ms(p,e.ssFallback)):p.resolve(!1,!0)}function pm(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:E,isHydrating:v}=d;if(w)d.pendingBranch=p,vr(w,p)?(l(w,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0?d.resolve():E&&(v||(l(m,h,r,n,s,null,i,o,a),ms(d,h)))):(d.pendingId=Ya++,v?(d.isHydrating=!1,d.activeBranch=w):u(w,s,d),d.deps=0,d.effects.length=0,d.hiddenContainer=c("div"),E?(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),ms(d,h))):m&&vr(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&&vr(m,p))l(m,p,r,n,s,d,i,o,a),ms(d,p);else if(ni(t,"onPending"),d.pendingBranch=p,p.shapeFlag&512?d.pendingId=p.component.suspenseId:d.pendingId=Ya++,l(null,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0)d.resolve();else{const{timeout:T,pendingId:y}=d;T>0?setTimeout(()=>{d.pendingId===y&&d.fallback(h)},T):T===0&&d.fallback(h)}}function vd(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:E}}=u;let v;const T=vm(e);T&&t&&t.pendingBranch&&(v=t.pendingId,t.deps++);const y=e.props?Ri(e.props.timeout):void 0,b=i,x={vnode:e,parent:t,parentComponent:r,namespace:o,container:n,hiddenContainer:s,deps:0,pendingId:Ya++,timeout:typeof y=="number"?y:-1,activeBranch:null,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(k=!1,O=!1){const{vnode:g,activeBranch:q,pendingBranch:B,pendingId:S,effects:_,parentComponent:C,container:N,isInFallback:V}=x;let j=!1;x.isHydrating?x.isHydrating=!1:k||(j=q&&B.transition&&B.transition.mode==="out-in",j&&(q.transition.afterLeave=()=>{S===x.pendingId&&(p(B,N,i===b?m(q):i,0),Us(_),V&&g.ssFallback&&(g.ssFallback.el=null))}),q&&(w(q.el)===N&&(i=m(q)),h(q,C,x,!0),!j&&V&&g.ssFallback&&lt(()=>g.ssFallback.el=null,x)),j||p(B,N,i,0)),ms(x,B),x.pendingBranch=null,x.isInFallback=!1;let X=x.parent,Z=!1;for(;X;){if(X.pendingBranch){X.effects.push(..._),Z=!0;break}X=X.parent}!Z&&!j&&Us(_),x.effects=[],T&&t&&t.pendingBranch&&v===t.pendingId&&(t.deps--,t.deps===0&&!O&&t.resolve()),ni(g,"onResolve")},fallback(k){if(!x.pendingBranch)return;const{vnode:O,activeBranch:g,parentComponent:q,container:B,namespace:S}=x;ni(O,"onFallback");const _=m(g),C=()=>{x.isInFallback&&(d(null,k,B,_,q,null,S,a,l),ms(x,k))},N=k.transition&&k.transition.mode==="out-in";N&&(g.transition.afterLeave=C),x.isInFallback=!0,h(g,q,null,!0),N||C()},move(k,O,g){x.activeBranch&&p(x.activeBranch,k,O,g),x.container=k},next(){return x.activeBranch&&m(x.activeBranch)},registerDep(k,O,g){const q=!!x.pendingBranch;q&&x.deps++;const B=k.vnode.el;k.asyncDep.catch(S=>{Hn(S,k,0)}).then(S=>{if(k.isUnmounted||x.isUnmounted||x.pendingId!==k.suspenseId)return;k.asyncResolved=!0;const{vnode:_}=k;el(k,S,!1),B&&(_.el=B);const C=!B&&k.subTree.el;O(k,_,w(B||k.subTree.el),B?null:m(k.subTree),x,o,g),C&&(_.placeholder=null,E(C)),oo(k,_.el),q&&--x.deps===0&&x.resolve()})},unmount(k,O){x.isUnmounted=!0,x.activeBranch&&h(x.activeBranch,r,k,O),x.pendingBranch&&h(x.pendingBranch,r,k,O)}};return x}function hm(e,t,r,n,s,i,o,a,l){const u=t.suspense=vd(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=md(n?r.default:r),e.ssFallback=n?md(r.fallback):H(ot)}function md(e){let t;if(Ee(e)){const r=Ln&&e._c;r&&(e._d=!1,P()),e=e(),r&&(e._d=!0,t=Rt,yd())}return we(e)&&(e=em(e)),e=Ft(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(r=>r!==e)),e}function wd(e,t){t&&t.pendingBranch?we(e)?t.effects.push(...e):t.effects.push(e):Us(e)}function ms(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,oo(n,s))}function vm(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}var Le=Symbol.for("v-fgt"),cn=Symbol.for("v-txt"),ot=Symbol.for("v-cmt"),Bn=Symbol.for("v-stc"),si=[],Rt=null;function P(e=!1){si.push(Rt=e?null:[])}function yd(){si.pop(),Rt=si[si.length-1]||null}var Ln=1;function ii(e,t=!1){Ln+=e,e<0&&Rt&&t&&(Rt.hasOnce=!0)}function bd(e){return e.dynamicChildren=Ln>0?Rt||ts:null,yd(),Ln>0&&Rt&&Rt.push(e),e}function ye(e,t,r,n,s,i){return bd(re(e,t,r,n,s,i,!0))}function G(e,t,r,n,s){return bd(H(e,t,r,n,s,!0))}function zr(e){return e?e.__v_isVNode===!0:!1}function vr(e,t){return e.type===t.type&&e.key===t.key}function mm(e){}var _d=({key:e})=>e??null,co=({ref:e,ref_key:t,ref_for:r})=>(typeof e=="number"&&(e=""+e),e!=null?et(e)||Je(e)||Ee(e)?{i:St,r:e,k:t,f:!!r}:e:null);function re(e,t=null,r=null,n=0,s=null,i=e===Le?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&_d(t),ref:t&&co(t),scopeId:Ki,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:St};return a?(Xa(l,r),i&128&&e.normalize(l)):r&&(l.shapeFlag|=et(r)?8:16),Ln>0&&!o&&Rt&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&Rt.push(l),l}var H=wm;function wm(e,t=null,r=null,n=0,s=null,i=!1){if((!e||e===Fu)&&(e=ot),zr(e)){const a=mr(e,t,!0);return r&&Xa(a,r),Ln>0&&!i&&Rt&&(a.shapeFlag&6?Rt[Rt.indexOf(e)]=a:Rt.push(a)),a.patchFlag=-2,a}if(Tm(e)&&(e=e.__vccOpts),t){t=sr(t);let{class:a,style:l}=t;a&&!et(a)&&(t.class=Xe(a)),je(l)&&(Vs(l)&&!we(l)&&(l=Ke({},l)),t.style=mt(l))}const o=et(e)?1:lo(e)?128:wu(e)?64:je(e)?4:Ee(e)?2:0;return re(e,t,r,n,s,o,i,!0)}function sr(e){return e?Vs(e)||nd(e)?Ke({},e):e:null}function mr(e,t,r=!1,n=!1){const{props:s,ref:i,patchFlag:o,children:a,transition:l}=e,u=t?ge(s||{},t):s,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&_d(u),ref:t&&t.ref?r&&i?we(i)?i.concat(co(t)):[i,co(t)]:co(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!==Le?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&&mr(e.ssContent),ssFallback:e.ssFallback&&mr(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&n&&Vr(c,l.clone(c)),c}function Ne(e=" ",t=0){return H(cn,null,e,t)}function Za(e,t){const r=H(Bn,null,e);return r.staticCount=t,r}function Pe(e="",t=!1){return t?(P(),G(ot,null,e)):H(ot,null,e)}function Ft(e){return e==null||typeof e=="boolean"?H(ot):we(e)?H(Le,null,e.slice()):zr(e)?Kr(e):H(cn,null,String(e))}function Kr(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:mr(e)}function Xa(e,t){let r=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(we(t))r=16;else if(typeof t=="object")if(n&65){const s=t.default;s&&(s._c&&(s._d=!1),Xa(e,s()),s._c&&(s._d=!0));return}else{r=32;const s=t._;!s&&!nd(t)?t._ctx=St:s===3&&St&&(St.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Ee(t)?(t={default:t,_ctx:St},r=32):(t=String(t),n&64?(r=16,t=[Ne(t)]):r=8);e.children=t,e.shapeFlag|=r}function ge(...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=Xe([t.class,n.class]));else if(s==="style")t.style=mt([t.style,n.style]);else if(Os(s)){const i=t[s],o=n[s];o&&i!==o&&!(we(i)&&i.includes(o))&&(t[s]=i?[].concat(i,o):o)}else s!==""&&(t[s]=n[s])}return t}function Vt(e,t,r,n=null){tr(e,t,7,[r,n])}var ym=Yu(),bm=0;function Sd(e,t,r){const n=e.type,s=(t?t.appContext:e.appContext)||ym,i={uid:bm++,vnode:e,type:n,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ua(!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:id(n,s),emitsOptions:Xu(n,s),emit:null,emitted:null,propsDefaults:qe,inheritAttrs:n.inheritAttrs,ctx:qe,data:qe,props:qe,attrs:qe,slots:qe,refs:qe,setupState:qe,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=Xv.bind(null,i),e.ce&&e.ce(i),i}var Ct=null,at=()=>Ct||St,uo,Qa;{const e=$i(),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)}};uo=t("__VUE_INSTANCE_SETTERS__",r=>Ct=r),Qa=t("__VUE_SSR_SETTERS__",r=>ws=r)}var Fn=e=>{const t=Ct;return uo(e),e.scope.on(),()=>{e.scope.off(),uo(t)}},fo=()=>{Ct&&Ct.scope.off(),uo(null)};function Cd(e){return e.vnode.shapeFlag&4}var ws=!1;function xd(e,t=!1,r=!1){t&&Qa(t);const{props:n,children:s}=e.vnode,i=Cd(e);sm(e,n,i,t),lm(e,s,r||t);const o=i?_m(e,t):void 0;return t&&Qa(!1),o}function _m(e,t){const r=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Fa);const{setup:n}=r;if(n){Or();const s=e.setupContext=n.length>1?Ed(e):null,i=Fn(e),o=ls(n,e,0,[e.props,s]),a=la(o);if(Hr(),i(),(a||e.sp)&&!jr(e)&&Da(e),a){if(o.then(fo,fo),t)return o.then(l=>{el(e,l,t)}).catch(l=>{Hn(l,e,0)});e.asyncDep=o}else el(e,o,t)}else Td(e,t)}function el(e,t,r){Ee(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:je(t)&&(e.setupState=Ca(t)),Td(e,r)}var po,tl;function Sm(e){po=e,tl=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,$v))}}var Cm=()=>!po;function Td(e,t,r){const n=e.type;if(!e.render){if(!t&&po&&!n.render){const s=n.template||ja(e).template;if(s){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:a,compilerOptions:l}=n,u=Ke(Ke({isCustomElement:i,delimiters:a},o),l);n.render=po(s,u)}}e.render=n.render||er,tl&&tl(e)}{const s=Fn(e);Or();try{Uv(e)}finally{Hr(),s()}}}var xm={get(e,t){return At(e,"get",""),e[t]}};function Ed(e){const t=r=>{e.exposed=r||{}};return{attrs:new Proxy(e.attrs,xm),slots:e.slots,emit:e.emit,expose:t}}function oi(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ca(Sa(e.exposed)),{get(t,r){if(r in t)return t[r];if(r in ei)return ei[r](e)},has(t,r){return r in t||r in ei}})):e.proxy}function rl(e,t=!0){return Ee(e)?e.displayName||e.name:e.name||t&&e.__name}function Tm(e){return Ee(e)&&"__vccOpts"in e}var z=(e,t)=>Kg(e,t,ws);function ir(e,t,r){try{ii(-1);const n=arguments.length;return n===2?je(t)&&!we(t)?zr(t)?H(e,null,[t]):H(e,t):H(e,null,t):(n>3?r=Array.prototype.slice.call(arguments,2):n===3&&zr(r)&&(r=[r]),H(e,t,r))}finally{ii(1)}}function Em(){return;function e(t,r,n){const s=t[n];if(we(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 Am(e,t,r,n){const s=r[n];if(s&&Ad(s,e))return s;const i=t();return i.memo=e.slice(),i.cacheIndex=n,r[n]=i}function Ad(e,t){const r=e.memo;if(r.length!=t.length)return!1;for(let n=0;n<r.length;n++)if(Dt(r[n],t[n]))return!1;return Ln>0&&Rt&&Rt.push(e),!0}var kd="3.5.29",km=er,Im=tv,Rm=ds,$m=fu,Pm={createComponentInstance:Sd,setupComponent:xd,renderComponentRoot:io,setCurrentRenderingInstance:Ks,isVNode:zr,normalizeVNode:Ft,getComponentPublicInstance:oi,ensureValidVNode:qa,pushWarningContext:Zg,popWarningContext:Xg},ix=null,ox=null,ax=null;var nl=void 0,Id=typeof window<"u"&&window.trustedTypes;if(Id)try{nl=Id.createPolicy("vue",{createHTML:e=>e})}catch{}var Rd=nl?e=>nl.createHTML(e):e=>e,Dm="http://www.w3.org/2000/svg",Om="http://www.w3.org/1998/Math/MathML",Wr=typeof document<"u"?document:null,$d=Wr&&Wr.createElement("template"),Pd={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"?Wr.createElementNS(Dm,e):t==="mathml"?Wr.createElementNS(Om,e):r?Wr.createElement(e,{is:r}):Wr.createElement(e);return e==="select"&&n&&n.multiple!=null&&s.setAttribute("multiple",n.multiple),s},createText:e=>Wr.createTextNode(e),createComment:e=>Wr.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Wr.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{$d.innerHTML=Rd(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=$d.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]}},un="transition",ai="animation",ys=Symbol("_vtc"),Dd={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},Od=Ke({},$a,Dd),Hm=e=>(e.displayName="Transition",e.props=Od,e),Mm=Hm((e,{slots:t})=>ir(Tu,Md(e),t)),Vn=(e,t=[])=>{we(e)?e.forEach(r=>r(...t)):e&&e(...t)},Hd=e=>e?we(e)?e.some(t=>t.length>1):e.length>1:!1;function Md(e){const t={};for(const _ in e)_ in Dd||(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=Nm(s),w=m&&m[0],E=m&&m[1],{onBeforeEnter:v,onEnter:T,onEnterCancelled:y,onLeave:b,onLeaveCancelled:x,onBeforeAppear:k=v,onAppear:O=T,onAppearCancelled:g=y}=t,q=(_,C,N,V)=>{_._enterCancelled=V,dn(_,C?c:a),dn(_,C?u:o),N&&N()},B=(_,C)=>{_._isLeaving=!1,dn(_,d),dn(_,h),dn(_,p),C&&C()},S=_=>(C,N)=>{const V=_?O:T,j=()=>q(C,_,N);Vn(V,[C,j]),Nd(()=>{dn(C,_?l:i),Ar(C,_?c:a),Hd(V)||qd(C,n,w,j)})};return Ke(t,{onBeforeEnter(_){Vn(v,[_]),Ar(_,i),Ar(_,o)},onBeforeAppear(_){Vn(k,[_]),Ar(_,l),Ar(_,u)},onEnter:S(!1),onAppear:S(!0),onLeave(_,C){_._isLeaving=!0;const N=()=>B(_,C);Ar(_,d),_._enterCancelled?(Ar(_,p),il(_)):(il(_),Ar(_,p)),Nd(()=>{_._isLeaving&&(dn(_,d),Ar(_,h),Hd(b)||qd(_,n,E,N))}),Vn(b,[_,N])},onEnterCancelled(_){q(_,!1,void 0,!0),Vn(y,[_])},onAppearCancelled(_){q(_,!0,void 0,!0),Vn(g,[_])},onLeaveCancelled(_){B(_),Vn(x,[_])}})}function Nm(e){if(e==null)return null;if(je(e))return[sl(e.enter),sl(e.leave)];{const t=sl(e);return[t,t]}}function sl(e){return Ri(e)}function Ar(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.add(r)),(e[ys]||(e[ys]=new Set)).add(t)}function dn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const r=e[ys];r&&(r.delete(t),r.size||(e[ys]=void 0))}function Nd(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var qm=0;function qd(e,t,r,n){const s=e._endId=++qm,i=()=>{s===e._endId&&n()};if(r!=null)return setTimeout(i,r);const{type:o,timeout:a,propCount:l}=Bd(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 Bd(e,t){const r=window.getComputedStyle(e),n=m=>(r[m]||"").split(", "),s=n(`${un}Delay`),i=n(`${un}Duration`),o=Ld(s,i),a=n(`${ai}Delay`),l=n(`${ai}Duration`),u=Ld(a,l);let c=null,d=0,p=0;t===un?o>0&&(c=un,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?un:ai:null,p=c?c===un?i.length:l.length:0);const h=c===un&&/\b(?:transform|all)(?:,|$)/.test(n(`${un}Property`).toString());return{type:c,timeout:d,propCount:p,hasTransform:h}}function Ld(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((r,n)=>Fd(r)+Fd(e[n])))}function Fd(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function il(e){return(e?e.ownerDocument:document).body.offsetHeight}function Bm(e,t,r){const n=e[ys];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):r?e.setAttribute("class",t):e.className=t}var ho=Symbol("_vod"),Vd=Symbol("_vsh"),go={name:"show",beforeMount(e,{value:t},{transition:r}){e[ho]=e.style.display==="none"?"":e.style.display,r&&t?r.beforeEnter(e):li(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),li(e,!0),n.enter(e)):n.leave(e,()=>{li(e,!1)}):li(e,t))},beforeUnmount(e,{value:t}){li(e,t)}};function li(e,t){e.style.display=t?e[ho]:"none",e[Vd]=!t}function Lm(){go.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}var jd=Symbol("");function Fm(e){const t=at();if(!t)return;const r=t.ut=(s=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(i=>vo(i,s))},n=()=>{const s=e(t.proxy);t.ce?vo(t.ce,s):ol(t.subTree,s),r(s)};Ha(()=>{Us(n)}),We(()=>{Re(n,er,{flush:"post"});const s=new MutationObserver(n);s.observe(t.subTree.el.parentNode,{childList:!0}),Mt(()=>s.disconnect())})}function ol(e,t){if(e.shapeFlag&128){const r=e.suspense;e=r.activeBranch,r.pendingBranch&&!r.isHydrating&&r.effects.push(()=>{ol(r.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)vo(e.el,t);else if(e.type===Le)e.children.forEach(r=>ol(r,t));else if(e.type===Bn){let{el:r,anchor:n}=e;for(;r&&(vo(r,t),r!==n);)r=r.nextSibling}}function vo(e,t){if(e.nodeType===1){const r=e.style;let n="";for(const s in t){const i=wg(t[s]);r.setProperty(`--${s}`,i),n+=`--${s}: ${i};`}r[jd]=n}}var Vm=/(?:^|;)\s*display\s*:/;function jm(e,t,r){const n=e.style,s=et(r);let i=!1;if(r&&!s){if(t)if(et(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();r[a]==null&&mo(n,a,"")}else for(const o in t)r[o]==null&&mo(n,o,"");for(const o in r)o==="display"&&(i=!0),mo(n,o,r[o])}else if(s){if(t!==r){const o=n[jd];o&&(r+=";"+o),n.cssText=r,i=Vm.test(r)}}else t&&e.removeAttribute("style");ho in e&&(e[ho]=i?n.display:"",e[Vd]&&(n.display="none"))}var Ud=/\s*!important$/;function mo(e,t,r){if(we(r))r.forEach(n=>mo(e,t,n));else if(r==null&&(r=""),t.startsWith("--"))e.setProperty(t,r);else{const n=Um(e,t);Ud.test(r)?e.setProperty(Bt(n),r.replace(Ud,""),"important"):e[n]=r}}var zd=["Webkit","Moz","ms"],al={};function Um(e,t){const r=al[t];if(r)return r;let n=ft(t);if(n!=="filter"&&n in e)return al[t]=n;n=Hs(n);for(let s=0;s<zd.length;s++){const i=zd[s]+n;if(i in e)return al[t]=i}return t}var Kd="http://www.w3.org/1999/xlink";function Wd(e,t,r,n,s,i=vg(t)){n&&t.startsWith("xlink:")?r==null?e.removeAttributeNS(Kd,t.slice(6,t.length)):e.setAttributeNS(Kd,t,r):r==null||i&&!Mc(r)?e.removeAttribute(t):e.setAttribute(t,i?"":fr(r)?String(r):r)}function Gd(e,t,r,n,s){if(t==="innerHTML"||t==="textContent"){r!=null&&(e[t]=t==="innerHTML"?Rd(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=Mc(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 Gr(e,t,r,n){e.addEventListener(t,r,n)}function zm(e,t,r,n){e.removeEventListener(t,r,n)}var Jd=Symbol("_vei");function Km(e,t,r,n,s=null){const i=e[Jd]||(e[Jd]={}),o=i[t];if(n&&o)o.value=n;else{const[a,l]=Wm(t);n?Gr(e,a,i[t]=Ym(n,s),l):o&&(zm(e,a,o,l),i[t]=void 0)}}var Yd=/(?:Once|Passive|Capture)$/;function Wm(e){let t;if(Yd.test(e)){t={};let r;for(;r=e.match(Yd);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Bt(e.slice(2)),t]}var ll=0,Gm=Promise.resolve(),Jm=()=>ll||(Gm.then(()=>ll=0),ll=Date.now());function Ym(e,t){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;tr(Zm(n,r.value),t,5,[n])};return r.value=e,r.attached=Jm(),r}function Zm(e,t){if(we(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 Zd=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Xd=(e,t,r,n,s,i)=>{const o=s==="svg";t==="class"?Bm(e,n,o):t==="style"?jm(e,r,n):Os(t)?oa(t)||Km(e,t,r,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Xm(e,t,n,o))?(Gd(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Wd(e,t,n,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!et(n))?Gd(e,ft(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Wd(e,t,n,o))};function Xm(e,t,r,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Zd(t)&&Ee(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 Zd(t)&&et(r)?!1:t in e}var Qd={};function cl(e,t,r){let n=ee(e,t);Ei(n)&&(n=Ke({},n,t));class s extends ef{constructor(o){super(n,o,r)}}return s.def=n,s}var Qm=((e,t)=>cl(e,t,bf)),e0=typeof HTMLElement<"u"?HTMLElement:class{},ef=class Qh extends e0{constructor(t,r={},n=pl){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!==pl?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(Ke({},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 Qh){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,wt(()=>{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&&!we(i))for(const l in i){const u=i[l];(u===Number||u&&u.type===Number)&&(l in this._props&&(this._props[l]=Ri(this._props[l])),(a||(a=Object.create(null)))[ft(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=we(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(ft))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):Qd;const s=ft(t);r&&this._numberProps&&this._numberProps[s]&&(n=Ri(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===Qd?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(Bt(t),""):typeof r=="string"||typeof r=="number"?this.setAttribute(Bt(t),r+""):r||this.removeAttribute(Bt(t)),i&&i.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),yf(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const r=H(this._def,Ke(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,Ei(o[0])?Ke({detail:o},o[0]):{detail:o}))};n.emit=(i,...o)=>{s(i,o),Bt(i)!==i&&s(Bt(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 tf(e){const t=at(),r=t&&t.ce;return r||null}function t0(){const e=tf();return e&&e.shadowRoot}function r0(e="$style"){{const t=at();if(!t)return qe;const r=t.type.__cssModules;if(!r)return qe;const n=r[e];return n||qe}}var rf=new WeakMap,nf=new WeakMap,wo=Symbol("_moveCb"),sf=Symbol("_enterCb"),n0=e=>(delete e.props.mode,e),s0=n0({name:"TransitionGroup",props:Ke({},Od,{tag:String,moveClass:String}),setup(e,{slots:t}){const r=at(),n=Ra();let s,i;return Xs(()=>{if(!s.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!l0(s[0].el,r.vnode.el,o)){s=[];return}s.forEach(i0),s.forEach(o0);const a=s.filter(a0);il(r.vnode.el),a.forEach(l=>{const u=l.el,c=u.style;Ar(u,o),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[wo]=p=>{p&&p.target!==u||(!p||p.propertyName.endsWith("transform"))&&(u.removeEventListener("transitionend",d),u[wo]=null,dn(u,o))};u.addEventListener("transitionend",d)}),s=[]}),()=>{const o=Be(e),a=Md(o);let l=o.tag||Le;if(s=[],i)for(let u=0;u<i.length;u++){const c=i[u];c.el&&c.el instanceof Element&&(s.push(c),Vr(c,fs(c,a,n,r)),rf.set(c,of(c.el)))}i=t.default?Yi(t.default()):[];for(let u=0;u<i.length;u++){const c=i[u];c.key!=null&&Vr(c,fs(c,a,n,r))}return H(l,null,i)}}});function i0(e){const t=e.el;t[wo]&&t[wo](),t[sf]&&t[sf]()}function o0(e){nf.set(e,of(e.el))}function a0(e){const t=rf.get(e),r=nf.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 of(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function l0(e,t,r){const n=e.cloneNode(),s=e[ys];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}=Bd(n);return i.removeChild(n),o}var fn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return we(t)?r=>is(t,r):t};function c0(e){e.target.composing=!0}function af(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}var or=Symbol("_assign");function lf(e,t,r){return t&&(e=e.trim()),r&&(e=Ii(e)),e}var ci={created(e,{modifiers:{lazy:t,trim:r,number:n}},s){e[or]=fn(s);const i=n||s.props&&s.props.type==="number";Gr(e,t?"change":"input",o=>{o.target.composing||e[or](lf(e.value,r,i))}),(r||i)&&Gr(e,"change",()=>{e.value=lf(e.value,r,i)}),t||(Gr(e,"compositionstart",c0),Gr(e,"compositionend",af),Gr(e,"change",af))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:r,modifiers:{lazy:n,trim:s,number:i}},o){if(e[or]=fn(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?Ii(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))}},ul={deep:!0,created(e,t,r){e[or]=fn(r),Gr(e,"change",()=>{const n=e._modelValue,s=bs(e),i=e.checked,o=e[or];if(we(n)){const a=Pi(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(Pn(n)){const a=new Set(n);i?a.add(s):a.delete(s),o(a)}else o(ff(e,i))})},mounted:cf,beforeUpdate(e,t,r){e[or]=fn(r),cf(e,t,r)}};function cf(e,{value:t,oldValue:r},n){e._modelValue=t;let s;if(we(t))s=Pi(t,n.props.value)>-1;else if(Pn(t))s=t.has(n.props.value);else{if(t===r)return;s=Dr(t,ff(e,!0))}e.checked!==s&&(e.checked=s)}var dl={created(e,{value:t},r){e.checked=Dr(t,r.props.value),e[or]=fn(r),Gr(e,"change",()=>{e[or](bs(e))})},beforeUpdate(e,{value:t,oldValue:r},n){e[or]=fn(n),t!==r&&(e.checked=Dr(t,n.props.value))}},uf={deep:!0,created(e,{value:t,modifiers:{number:r}},n){const s=Pn(t);Gr(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>r?Ii(bs(o)):bs(o));e[or](e.multiple?s?new Set(i):i:i[0]),e._assigning=!0,wt(()=>{e._assigning=!1})}),e[or]=fn(n)},mounted(e,{value:t}){df(e,t)},beforeUpdate(e,t,r){e[or]=fn(r)},updated(e,{value:t}){e._assigning||df(e,t)}};function df(e,t){const r=e.multiple,n=we(t);if(!(r&&!n&&!Pn(t))){for(let s=0,i=e.options.length;s<i;s++){const o=e.options[s],a=bs(o);if(r)if(n){const l=typeof a;l==="string"||l==="number"?o.selected=t.some(u=>String(u)===String(a)):o.selected=Pi(t,a)>-1}else o.selected=t.has(a);else if(Dr(bs(o),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!r&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function bs(e){return"_value"in e?e._value:e.value}function ff(e,t){const r=t?"_trueValue":"_falseValue";return r in e?e[r]:t}var pf={created(e,t,r){yo(e,t,r,null,"created")},mounted(e,t,r){yo(e,t,r,null,"mounted")},beforeUpdate(e,t,r,n){yo(e,t,r,n,"beforeUpdate")},updated(e,t,r,n){yo(e,t,r,n,"updated")}};function hf(e,t){switch(e){case"SELECT":return uf;case"TEXTAREA":return ci;default:switch(t){case"checkbox":return ul;case"radio":return dl;default:return ci}}}function yo(e,t,r,n,s){const i=hf(e.tagName,r.props&&r.props.type)[s];i&&i(e,t,r,n)}function u0(){ci.getSSRProps=({value:e})=>({value:e}),dl.getSSRProps=({value:e},t)=>{if(t.props&&Dr(t.props.value,e))return{checked:!0}},ul.getSSRProps=({value:e},t)=>{if(we(e)){if(t.props&&Pi(e,t.props.value)>-1)return{checked:!0}}else if(Pn(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},pf.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const r=hf(t.type.toUpperCase(),t.props&&t.props.type);if(r.getSSRProps)return r.getSSRProps(e,t)}}var d0=["ctrl","shift","alt","meta"],f0={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)=>d0.some(r=>e[`${r}Key`]&&!t.includes(r))},ar=(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=f0[t[o]];if(a&&a(s,t))return}return e(s,...i)}))},p0={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},fl=(e,t)=>{const r=e._withKeys||(e._withKeys={}),n=t.join(".");return r[n]||(r[n]=(s=>{if(!("key"in s))return;const i=Bt(s.key);if(t.some(o=>o===i||p0[o]===i))return e(s)}))},gf=Ke({patchProp:Xd},Pd),ui,vf=!1;function mf(){return ui||(ui=ud(gf))}function wf(){return ui=vf?ui:dd(gf),vf=!0,ui}var yf=((...e)=>{mf().render(...e)}),h0=((...e)=>{wf().hydrate(...e)}),pl=((...e)=>{const t=mf().createApp(...e),{mount:r}=t;return t.mount=n=>{const s=Sf(n);if(!s)return;const i=t._component;!Ee(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=r(s,!1,_f(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},t}),bf=((...e)=>{const t=wf().createApp(...e),{mount:r}=t;return t.mount=n=>{const s=Sf(n);if(s)return r(s,!0,_f(s))},t});function _f(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Sf(e){return et(e)?document.querySelector(e):e}var Cf=!1,g0=()=>{Cf||(Cf=!0,u0(),Lm())},v0=ig({BaseTransition:()=>Tu,BaseTransitionPropsValidators:()=>$a,Comment:()=>ot,DeprecationTypes:()=>null,EffectScope:()=>ua,ErrorCodes:()=>ev,ErrorTypeStrings:()=>Im,Fragment:()=>Le,KeepAlive:()=>Tv,ReactiveEffect:()=>Ms,Static:()=>Bn,Suspense:()=>dm,Teleport:()=>ka,Text:()=>cn,TrackOpTypes:()=>Wg,Transition:()=>Mm,TransitionGroup:()=>s0,TriggerOpTypes:()=>Gg,VueElement:()=>ef,assertNumber:()=>Qg,callWithAsyncErrorHandling:()=>tr,callWithErrorHandling:()=>ls,camelize:()=>ft,capitalize:()=>Hs,cloneVNode:()=>mr,compatUtils:()=>null,compile:()=>m0,computed:()=>z,createApp:()=>pl,createBlock:()=>G,createCommentVNode:()=>Pe,createElementBlock:()=>ye,createElementVNode:()=>re,createHydrationRenderer:()=>dd,createPropsRestProxy:()=>Vv,createRenderer:()=>ud,createSSRApp:()=>bf,createSlots:()=>Rv,createStaticVNode:()=>Za,createTextVNode:()=>Ne,createVNode:()=>H,customRef:()=>js,defineAsyncComponent:()=>xv,defineComponent:()=>ee,defineCustomElement:()=>cl,defineEmits:()=>Dv,defineExpose:()=>Ov,defineModel:()=>Nv,defineOptions:()=>Hv,defineProps:()=>Pv,defineSSRCustomElement:()=>Qm,defineSlots:()=>Mv,devtools:()=>Rm,effect:()=>bg,effectScope:()=>da,getCurrentInstance:()=>at,getCurrentScope:()=>Di,getCurrentWatcher:()=>Jg,getTransitionRawChildren:()=>Yi,guardReactiveProps:()=>sr,h:()=>ir,handleError:()=>Hn,hasInjectionContext:()=>av,hydrate:()=>h0,hydrateOnIdle:()=>wv,hydrateOnInteraction:()=>Sv,hydrateOnMediaQuery:()=>_v,hydrateOnVisible:()=>bv,initCustomFormatter:()=>Em,initDirectivesForSSR:()=>g0,inject:()=>Ht,isMemoSame:()=>Ad,isProxy:()=>Vs,isReactive:()=>Lr,isReadonly:()=>Cr,isRef:()=>Je,isRuntimeOnly:()=>Cm,isShallow:()=>Lt,isVNode:()=>zr,markRaw:()=>Sa,mergeDefaults:()=>zu,mergeModels:()=>Fv,mergeProps:()=>ge,nextTick:()=>wt,nodeOps:()=>Pd,normalizeClass:()=>Xe,normalizeProps:()=>pr,normalizeStyle:()=>mt,onActivated:()=>Du,onBeforeMount:()=>Mu,onBeforeUnmount:()=>vs,onBeforeUpdate:()=>Ha,onDeactivated:()=>Ou,onErrorCaptured:()=>Lu,onMounted:()=>We,onRenderTracked:()=>Bu,onRenderTriggered:()=>qu,onScopeDispose:()=>fa,onServerPrefetch:()=>Nu,onUnmounted:()=>Mt,onUpdated:()=>Xs,onWatcherCleanup:()=>ou,openBlock:()=>P,patchProp:()=>Xd,popScopeId:()=>iv,provide:()=>Mn,proxyRefs:()=>Ca,pushScopeId:()=>sv,queuePostFlushCb:()=>Us,reactive:()=>qr,readonly:()=>kt,ref:()=>K,registerRuntimeCompiler:()=>Sm,render:()=>yf,renderList:()=>nr,renderSlot:()=>se,resolveComponent:()=>kv,resolveDirective:()=>Iv,resolveDynamicComponent:()=>Qs,resolveFilter:()=>null,resolveTransitionHooks:()=>fs,setBlockTracking:()=>ii,setDevtoolsHook:()=>$m,setTransitionHooks:()=>Vr,shallowReactive:()=>ru,shallowReadonly:()=>Br,shallowRef:()=>nt,ssrContextKey:()=>pu,ssrUtils:()=>Pm,stop:()=>_g,toDisplayString:()=>He,toHandlerKey:()=>ss,toHandlers:()=>ju,toRaw:()=>Be,toRef:()=>xa,toRefs:()=>It,toValue:()=>xe,transformVNodeArgs:()=>mm,triggerRef:()=>su,unref:()=>f,useAttrs:()=>Lv,useCssModule:()=>r0,useCssVars:()=>Fm,useHost:()=>tf,useId:()=>ku,useModel:()=>Zv,useSSRContext:()=>hu,useShadowRoot:()=>t0,useSlots:()=>Bv,useTemplateRef:()=>dv,useTransitionState:()=>Ra,vModelCheckbox:()=>ul,vModelDynamic:()=>pf,vModelRadio:()=>dl,vModelSelect:()=>uf,vModelText:()=>ci,vShow:()=>go,version:()=>kd,warn:()=>km,watch:()=>Re,watchEffect:()=>rt,watchPostEffect:()=>Ea,watchSyncEffect:()=>gu,withAsyncContext:()=>jv,withCtx:()=>R,withDefaults:()=>qv,withDirectives:()=>Wi,withKeys:()=>fl,withMemo:()=>Am,withModifiers:()=>ar,withScopeId:()=>ov},1),m0=()=>{},w0=2;const wr={CALL_HISTORY:"call_history",CONTACTS:"contacts",CONNECTIONS:"connections"},y0=(e="webphone_db")=>{const t=K(null),r=K(!1);return{initDB:()=>new Promise((l,u)=>{if(t.value){l();return}const c=indexedDB.open(e,w0);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(wr.CALL_HISTORY)||p.createObjectStore(wr.CALL_HISTORY,{keyPath:"id"}),p.objectStoreNames.contains(wr.CONTACTS)||p.createObjectStore(wr.CONTACTS,{keyPath:"number"}),p.objectStoreNames.contains(wr.CONNECTIONS)||p.createObjectStore(wr.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}},b0=e=>{const t=K(e?.initialConnected??!1),r=K(0),n=K(null),s=K([]),i=K([]),{initDB:o,getAll:a,add:l}=y0(e?.server&&e?.extension?`webphone_${e.server}_${e.extension}`.replace(/[^a-z0-9_]/gi,"_"):"webphone_db");o().then(async()=>{try{s.value=(await a(wr.CALL_HISTORY)).sort((W,ae)=>ae.startTime-W.startTime),i.value=await a(wr.CONTACTS)}catch(W){console.error("Error loading data from IndexedDB:",W)}});const u=K([{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=K(e?.initialKeypadVisible??!0),d=K(""),p=K(!1),h=z(()=>u.value.find(W=>W.id===r.value)||u.value[0]),m=z(()=>h.value?.status||"idle"),w=z(()=>h.value?.remoteNumber||""),E=z(()=>h.value?.isMuted||!1),v=z(()=>h.value?.isHeld||!1),T=z({get:()=>h.value?.keypadValue||"",set:W=>{h.value&&(h.value.keypadValue=W)}}),y=W=>{t.value=W},b=W=>{u.value.some(ae=>ae.id===W)&&(r.value=W)},x=(W,ae)=>{const fe=u.value.find(Ce=>Ce.id===W);fe&&Object.assign(fe,ae)};return{isConnected:t,activeChannelId:r,channels:u,activeChannel:h,callStatus:m,remoteNumber:w,isMuted:E,isHeld:v,keypadValue:T,isKeypadVisible:c,lastDialedNumber:d,videoModeEnabled:p,transferInProgress:n,setConnected:y,setActiveChannelId:b,updateChannelState:x,setCallStatus:W=>{x(r.value,{status:W})},setIncomingCall:W=>{x(r.value,{remoteNumber:W})},resetCall:()=>{x(r.value,{status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1})},addCallLog:async W=>{const ae={id:crypto.randomUUID(),...W};s.value.unshift(ae);try{await l(wr.CALL_HISTORY,ae)}catch(fe){console.error("Error saving call log:",fe)}},callHistory:s,contacts:i,addContact:async W=>{try{await l(wr.CONTACTS,W),i.value=await a(wr.CONTACTS)}catch(ae){console.error("Error saving contact:",ae)}},setMuted:W=>{x(r.value,{isMuted:W})},setHeld:W=>{x(r.value,{isHeld:W})},appendKeypad:W=>{T.value+=W},clearKeypad:()=>{T.value=""},backspaceKeypad:()=>{T.value=T.value.slice(0,-1)},toggleKeypad:()=>{c.value=!c.value},setLastDialedNumber:W=>{d.value=W},setTransferInProgress:W=>{n.value=W},toggleVideoMode:()=>{p.value=!p.value}}},_0="0.21.1";var jn=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}},hl=class extends jn{constructor(e){super(e||"Unsupported content type.")}},gl=class extends jn{constructor(e){super(e||"Request pending.")}},S0=class extends jn{constructor(e){super(e||"Unspecified session description handler error.")}},vl=class extends jn{constructor(){super("The session has terminated.")}},di=class extends jn{constructor(e){super(e||"An error occurred during state transition.")}},C0=class{constructor(e){this.incomingAckRequest=e}get request(){return this.incomingAckRequest.message}},x0=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()}},T0=class{constructor(e){this.incomingCancelRequest=e}get request(){return this.incomingCancelRequest}},fi=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})}},E0=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()}},xf=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={}}},lr=class eg extends xf{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 eg(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}},pn=class tg extends xf{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 tg(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 Tf(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 ml(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,r+=r.repeat(t),e+r.slice(0,t))}var Ef=class na 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,na.prototype):this.__proto__=na.prototype,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,na)}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=ml("",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+" | "+ml("",i.column-1," ")+ml("",c-i.column,"^")}else r+=`
10
10
  at `+o}return r}};function A0(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
11
  `,v(`\r
12
- `,!1),/^[0-9]/,x([["0","9"]],!1,!1),/^[a-zA-Z]/,x([["a","z"],["A","Z"]],!1,!1),/^[0-9a-fA-F]/,x([["0","9"],["a","f"],["A","F"]],!1,!1),/^[\0-\xFF]/,x([["\0","ÿ"]],!1,!1),/^["]/,x(['"'],!1,!1)," ",v(" ",!1)," ",v(" ",!1),/^[a-zA-Z0-9]/,x([["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":"},/^[!-~]/,x([["!","~"]],!1,!1),/^[\x80-\uFFFF]/,x([["€","￿"]],!1,!1),/^[\x80-\xBF]/,x([["€","¿"]],!1,!1),/^[a-f]/,x([["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'"'},/^[!-']/,x([["!","'"]],!1,!1),/^[*-[]/,x([["*","["]],!1,!1),/^[\]-~]/,x([["]","~"]],!1,!1),function(S){return S},/^[#-[]/,x([["#","["]],!1,!1),/^[\0-\t]/,x([["\0"," "]],!1,!1),/^[\v-\f]/,x([["\v","\f"]],!1,!1),/^[\x0E-\x7F]/,x([["",""]],!1,!1),function(){t=t||{data:{}},t.data.uri=new pn(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 pn(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(S){t=t||{data:{}},t.data.scheme=S},function(){t=t||{data:{}},t.data.user=decodeURIComponent(y().slice(0,-1))},function(){t=t||{data:{}},t.data.password=y()},function(){return t=t||{data:{}},t.data.host=y(),t.data.host},function(){return t=t||{data:{}},t.data.host_type="domain",y()},/^[a-zA-Z0-9_\-]/,x([["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),/^[a-zA-Z0-9\-]/,x([["a","z"],["A","Z"],["0","9"],"-"],!1,!1),function(){return t=t||{data:{}},t.data.host_type="IPv6",y()},"::",v("::",!1),function(){return t=t||{data:{}},t.data.host_type="IPv6",y()},function(){return t=t||{data:{}},t.data.host_type="IPv4",y()},"25",v("25",!1),/^[0-5]/,x([["0","5"]],!1,!1),"2",v("2",!1),/^[0-4]/,x([["0","4"]],!1,!1),"1",v("1",!1),/^[1-9]/,x([["1","9"]],!1,!1),function(S){return t=t||{data:{}},S=parseInt(S.join("")),t.data.port=S,S},"transport=",v("transport=",!0),"udp",v("udp",!0),"tcp",v("tcp",!0),"sctp",v("sctp",!0),"tls",v("tls",!0),function(S){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.transport=S.toLowerCase()},"user=",v("user=",!0),"phone",v("phone",!0),"ip",v("ip",!0),function(S){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.user=S.toLowerCase()},"method=",v("method=",!0),function(S){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.method=S},"ttl=",v("ttl=",!0),function(S){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.ttl=S},"maddr=",v("maddr=",!0),function(S){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.maddr=S},"lr",v("lr",!0),function(){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.lr=void 0},function(S,w){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),w===null?w=void 0:w=w[1],t.data.uri_params[S.toLowerCase()]=w},function(S,w){S=S.join("").toLowerCase(),w=w.join(""),t=t||{data:{}},t.data.uri_headers||(t.data.uri_headers={}),t.data.uri_headers[S]?t.data.uri_headers[S].push(w):t.data.uri_headers[S]=[w]},function(){t=t||{data:{}},t.startRule==="Refer_To"&&(t.data.uri=new pn(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=y()},v("SIP",!0),function(){t=t||{data:{}},t.data.sip_version=y()},"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=y(),t.data.method},function(S){t=t||{data:{}},t.data.status_code=parseInt(S.join(""))},function(){t=t||{data:{}},t.data.reason_phrase=y()},function(){t=t||{data:{}},t.data=y()},function(){var S,w;for(t=t||{data:{}},w=t.data.multi_header.length,S=0;S<w;S++)if(t.data.multi_header[S].parsed===null){t.data=null;break}t.data!==null?t.data=t.data.multi_header:t.data=-1},function(){var S;t=t||{data:{}},t.data.multi_header||(t.data.multi_header=[]);try{S=new lr(t.data.uri,t.data.displayName,t.data.params),delete t.data.uri,delete t.data.displayName,delete t.data.params}catch{S=null}t.data.multi_header.push({position:l,offset:T().start.offset,parsed:S})},function(S){S=y().trim(),S[0]==='"'&&(S=S.substring(1,S.length-1)),t=t||{data:{}},t.data.displayName=S},"q",v("q",!0),function(S){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.q=S},"expires",v("expires",!0),function(S){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.expires=S},function(S){return parseInt(S.join(""))},"0",v("0",!1),function(){return parseFloat(y())},function(S,w){t=t||{data:{}},t.data.params||(t.data.params={}),w===null?w=void 0:w=w[1],t.data.params[S.toLowerCase()]=w},"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=y().toLowerCase())},"handling",v("handling",!0),"optional",v("optional",!0),"required",v("required",!0),function(S){t=t||{data:{}},t.data=parseInt(S.join(""))},function(){t=t||{data:{}},t.data=y()},"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(S){t=t||{data:{}},t.data.value=parseInt(S.join(""))},function(S){t=t||{data:{}},t.data=S},function(S){t=t||{data:{}},t.data.event=S.toLowerCase()},function(){t=t||{data:{}};var S=t.data.tag;t.data=new lr(t.data.uri,t.data.displayName,t.data.params),S&&t.data.setParam("tag",S)},"tag",v("tag",!0),function(S){t=t||{data:{}},t.data.tag=S},function(S){t=t||{data:{}},t.data=parseInt(S.join(""))},function(S){t=t||{data:{}},t.data=S},function(){t=t||{data:{}},t.data=new lr(t.data.uri,t.data.displayName,t.data.params)},"digest",v("Digest",!0),"realm",v("realm",!0),function(S){t=t||{data:{}},t.data.realm=S},"domain",v("domain",!0),"nonce",v("nonce",!0),function(S){t=t||{data:{}},t.data.nonce=S},"opaque",v("opaque",!0),function(S){t=t||{data:{}},t.data.opaque=S},"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(S){t=t||{data:{}},t.data.algorithm=S.toUpperCase()},"qop",v("qop",!0),"auth-int",v("auth-int",!0),"auth",v("auth",!0),function(S){t=t||{data:{}},t.data.qop||(t.data.qop=[]),t.data.qop.push(S.toLowerCase())},function(S){t=t||{data:{}},t.data.value=parseInt(S.join(""))},function(){var S,w;for(t=t||{data:{}},w=t.data.multi_header.length,S=0;S<w;S++)if(t.data.multi_header[S].parsed===null){t.data=null;break}t.data!==null?t.data=t.data.multi_header:t.data=-1},function(){var S;t=t||{data:{}},t.data.multi_header||(t.data.multi_header=[]);try{S=new lr(t.data.uri,t.data.displayName,t.data.params),delete t.data.uri,delete t.data.displayName,delete t.data.params}catch{S=null}t.data.multi_header.push({position:l,offset:T().start.offset,parsed:S})},function(){t=t||{data:{}},t.data=new lr(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(S){t=t||{data:{}},t.data.replaces_from_tag=S},"to-tag",v("to-tag",!0),function(S){t=t||{data:{}},t.data.replaces_to_tag=S},"early-only",v("early-only",!0),function(){t=t||{data:{}},t.data.early_only=!0},function(S,w){return w},function(S,w){return N(S,w)},function(S){t=t||{data:{}},t.startRule==="Require"&&(t.data=S||[])},function(S){t=t||{data:{}},t.data.value=parseInt(S.join(""))},"active",v("active",!0),"pending",v("pending",!0),"terminated",v("terminated",!0),function(){t=t||{data:{}},t.data.state=y()},"reason",v("reason",!0),function(S){t=t||{data:{}},typeof S<"u"&&(t.data.reason=S)},function(S){t=t||{data:{}},typeof S<"u"&&(t.data.expires=S)},"retry_after",v("retry_after",!0),function(S){t=t||{data:{}},typeof S<"u"&&(t.data.retry_after=S)},"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(S){t=t||{data:{}},t.startRule==="Supported"&&(t.data=S||[])},function(){t=t||{data:{}};var S=t.data.tag;t.data=new lr(t.data.uri,t.data.displayName,t.data.params),S&&t.data.setParam("tag",S)},"ttl",v("ttl",!0),function(S){t=t||{data:{}},t.data.ttl=S},"maddr",v("maddr",!0),function(S){t=t||{data:{}},t.data.maddr=S},"received",v("received",!0),function(S){t=t||{data:{}},t.data.received=S},"branch",v("branch",!0),function(S){t=t||{data:{}},t.data.branch=S},"rport",v("rport",!0),function(S){t=t||{data:{}},typeof S<"u"&&(t.data.rport=S.join(""))},function(S){t=t||{data:{}},t.data.protocol=S},v("UDP",!0),v("TCP",!0),v("TLS",!0),v("SCTP",!0),function(S){t=t||{data:{}},t.data.transport=S},function(){t=t||{data:{}},t.data.host=y()},function(S){t=t||{data:{}},t.data.port=parseInt(S.join(""))},function(S){return parseInt(S.join(""))},function(S){t=t||{data:{}},t.startRule==="Session_Expires"&&(t.data.deltaSeconds=S)},"refresher",v("refresher",!1),"uas",v("uas",!1),"uac",v("uac",!1),function(S){t=t||{data:{}},t.startRule==="Session_Expires"&&(t.data.refresher=S)},function(S){t=t||{data:{}},t.startRule==="Min_SE"&&(t.data=S)},"stuns",v("stuns",!0),"stun",v("stun",!0),function(S){t=t||{data:{}},t.data.scheme=S},function(S){t=t||{data:{}},t.data.host=S},"?transport=",v("?transport=",!1),"turns",v("turns",!0),"turn",v("turn",!0),function(S){t=t||{data:{}},t.data.transport=S},function(){t=t||{data:{}},t.data=y()},"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 y(){return e.substring(u,l)}function T(){return C(u,l)}function v(S,w){return{type:"literal",text:S,ignoreCase:w}}function x(S,w,E){return{type:"class",parts:S,inverted:w,ignoreCase:E}}function b(){return{type:"end"}}function _(S){let w=c[S],E;if(w)return w;for(E=S-1;!c[E];)E--;for(w=c[E],w={line:w.line,column:w.column};E<S;)e.charCodeAt(E)===10?(w.line++,w.column=1):w.column++,E++;return c[S]=w,w}function C(S,w){const E=_(S),q=_(w);return{source:n,start:{offset:S,line:E.line,column:E.column},end:{offset:w,line:q.line,column:q.column}}}function k(S){l<d||(l>d&&(d=l,p=[]),p.push(S))}function O(S,w,E){return new Ef(Ef.buildMessage(S,w),S,w,E)}function g(S){return S.split("").map(w=>w.charCodeAt(0)-32)}function B(S){const w=a[S];let E=0;const q=[];let Q=w.length;const z=[],X=[];let Y;for(;;){for(;E<Q;)switch(w[E]){case 0:X.push(o[w[E+1]]),E+=2;break;case 1:X.push(void 0),E++;break;case 2:X.push(null),E++;break;case 3:X.push(r),E++;break;case 4:X.push([]),E++;break;case 5:X.push(l),E++;break;case 6:X.pop(),E++;break;case 7:l=X.pop(),E++;break;case 8:X.length-=w[E+1],E+=2;break;case 9:X.splice(-2,1),E++;break;case 10:X[X.length-2].push(X.pop()),E++;break;case 11:X.push(X.splice(X.length-w[E+1],w[E+1])),E+=2;break;case 12:X.push(e.substring(X.pop(),l)),E++;break;case 13:z.push(Q),q.push(E+3+w[E+1]+w[E+2]),X[X.length-1]?(Q=E+3+w[E+1],E+=3):(Q=E+3+w[E+1]+w[E+2],E+=3+w[E+1]);break;case 14:z.push(Q),q.push(E+3+w[E+1]+w[E+2]),X[X.length-1]===r?(Q=E+3+w[E+1],E+=3):(Q=E+3+w[E+1]+w[E+2],E+=3+w[E+1]);break;case 15:z.push(Q),q.push(E+3+w[E+1]+w[E+2]),X[X.length-1]!==r?(Q=E+3+w[E+1],E+=3):(Q=E+3+w[E+1]+w[E+2],E+=3+w[E+1]);break;case 16:X[X.length-1]!==r?(z.push(Q),q.push(E),Q=E+2+w[E+1],E+=2):E+=2+w[E+1];break;case 17:z.push(Q),q.push(E+3+w[E+1]+w[E+2]),e.length>l?(Q=E+3+w[E+1],E+=3):(Q=E+3+w[E+1]+w[E+2],E+=3+w[E+1]);break;case 18:z.push(Q),q.push(E+4+w[E+2]+w[E+3]),e.substr(l,o[w[E+1]].length)===o[w[E+1]]?(Q=E+4+w[E+2],E+=4):(Q=E+4+w[E+2]+w[E+3],E+=4+w[E+2]);break;case 19:z.push(Q),q.push(E+4+w[E+2]+w[E+3]),e.substr(l,o[w[E+1]].length).toLowerCase()===o[w[E+1]]?(Q=E+4+w[E+2],E+=4):(Q=E+4+w[E+2]+w[E+3],E+=4+w[E+2]);break;case 20:z.push(Q),q.push(E+4+w[E+2]+w[E+3]),o[w[E+1]].test(e.charAt(l))?(Q=E+4+w[E+2],E+=4):(Q=E+4+w[E+2]+w[E+3],E+=4+w[E+2]);break;case 21:X.push(e.substr(l,w[E+1])),l+=w[E+1],E+=2;break;case 22:X.push(o[w[E+1]]),l+=o[w[E+1]].length,E+=2;break;case 23:X.push(r),h===0&&k(o[w[E+1]]),E+=2;break;case 24:u=X[X.length-1-w[E+1]],E+=2;break;case 25:u=l,E++;break;case 26:Y=w.slice(E+4,E+4+w[E+3]).map(function(le){return X[X.length-1-le]}),X.splice(X.length-w[E+2],w[E+2],o[w[E+1]].apply(null,Y)),E+=4+w[E+3];break;case 27:X.push(B(w[E+1])),E+=2;break;case 28:h++,E++;break;case 29:h--,E++;break;default:throw new Error("Invalid opcode: "+w[E]+".")}if(z.length>0)Q=z.pop(),E=q.pop();else break}return X[0]}t.data={};function N(S,w){return[S].concat(w)}if(m=B(i),m!==r&&l===e.length)return m;throw m!==r&&l<e.length&&k(b()),O(p,d<e.length?e.charAt(d):null,d<e.length?C(d,d+1):C(d,d))}const k0=A0;var pt;(function(e){function t(s,i){const o={startRule:i};try{k0(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})(pt=pt||(pt={}));var I0={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 Un(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 bo(e){return I0[e]||""}function _o(){return Un(10)}function kr(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 fi(e){return encodeURIComponent(e).replace(/%[A-F\d]{2}/g,"U").length}var Af=class{constructor(){this.headers={}}addHeader(e,t){const r={raw:t};e=kr(e),this.headers[e]?this.headers[e].push(r):this.headers[e]=[r]}getHeader(e){const t=this.headers[kr(e)];if(t){if(t[0])return t[0].raw}else return}getHeaders(e){const t=this.headers[kr(e)],r=[];if(!t)return[];for(const n of t)r.push(n.raw);return r}hasHeader(e){return!!this.headers[kr(e)]}parseHeader(e,t=0){if(e=kr(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=pt.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[kr(e)]=[{raw:t}]}toString(){return this.data}},bs=class extends Af{constructor(){super()}},hn=class extends Af{constructor(){super()}},wl=class sa{constructor(t,r,n,s,i,o,a){this.headers={},this.extraHeaders=[],this.options=sa.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:_o(),this.from=sa.makeNameAddrHeader(this.fromURI,this.options.fromDisplayName,this.fromTag),this.toURI=s.clone(),this.toTag=this.options.toTag,this.to=sa.makeNameAddrHeader(this.toURI,this.options.toDisplayName,this.toTag),this.callId=this.options.callId?this.options.callId:this.options.callIdPrefix+Un(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 lr(t,r,s)}getHeader(t){const r=this.headers[kr(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[kr(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[kr(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[kr(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
12
+ `,!1),/^[0-9]/,T([["0","9"]],!1,!1),/^[a-zA-Z]/,T([["a","z"],["A","Z"]],!1,!1),/^[0-9a-fA-F]/,T([["0","9"],["a","f"],["A","F"]],!1,!1),/^[\0-\xFF]/,T([["\0","ÿ"]],!1,!1),/^["]/,T(['"'],!1,!1)," ",v(" ",!1)," ",v(" ",!1),/^[a-zA-Z0-9]/,T([["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":"},/^[!-~]/,T([["!","~"]],!1,!1),/^[\x80-\uFFFF]/,T([["€","￿"]],!1,!1),/^[\x80-\xBF]/,T([["€","¿"]],!1,!1),/^[a-f]/,T([["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'"'},/^[!-']/,T([["!","'"]],!1,!1),/^[*-[]/,T([["*","["]],!1,!1),/^[\]-~]/,T([["]","~"]],!1,!1),function(S){return S},/^[#-[]/,T([["#","["]],!1,!1),/^[\0-\t]/,T([["\0"," "]],!1,!1),/^[\v-\f]/,T([["\v","\f"]],!1,!1),/^[\x0E-\x7F]/,T([["",""]],!1,!1),function(){t=t||{data:{}},t.data.uri=new pn(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 pn(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(S){t=t||{data:{}},t.data.scheme=S},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_\-]/,T([["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),/^[a-zA-Z0-9\-]/,T([["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]/,T([["0","5"]],!1,!1),"2",v("2",!1),/^[0-4]/,T([["0","4"]],!1,!1),"1",v("1",!1),/^[1-9]/,T([["1","9"]],!1,!1),function(S){return t=t||{data:{}},S=parseInt(S.join("")),t.data.port=S,S},"transport=",v("transport=",!0),"udp",v("udp",!0),"tcp",v("tcp",!0),"sctp",v("sctp",!0),"tls",v("tls",!0),function(S){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.transport=S.toLowerCase()},"user=",v("user=",!0),"phone",v("phone",!0),"ip",v("ip",!0),function(S){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.user=S.toLowerCase()},"method=",v("method=",!0),function(S){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.method=S},"ttl=",v("ttl=",!0),function(S){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.ttl=S},"maddr=",v("maddr=",!0),function(S){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.maddr=S},"lr",v("lr",!0),function(){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.lr=void 0},function(S,_){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),_===null?_=void 0:_=_[1],t.data.uri_params[S.toLowerCase()]=_},function(S,_){S=S.join("").toLowerCase(),_=_.join(""),t=t||{data:{}},t.data.uri_headers||(t.data.uri_headers={}),t.data.uri_headers[S]?t.data.uri_headers[S].push(_):t.data.uri_headers[S]=[_]},function(){t=t||{data:{}},t.startRule==="Refer_To"&&(t.data.uri=new pn(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(S){t=t||{data:{}},t.data.status_code=parseInt(S.join(""))},function(){t=t||{data:{}},t.data.reason_phrase=w()},function(){t=t||{data:{}},t.data=w()},function(){var S,_;for(t=t||{data:{}},_=t.data.multi_header.length,S=0;S<_;S++)if(t.data.multi_header[S].parsed===null){t.data=null;break}t.data!==null?t.data=t.data.multi_header:t.data=-1},function(){var S;t=t||{data:{}},t.data.multi_header||(t.data.multi_header=[]);try{S=new lr(t.data.uri,t.data.displayName,t.data.params),delete t.data.uri,delete t.data.displayName,delete t.data.params}catch{S=null}t.data.multi_header.push({position:l,offset:E().start.offset,parsed:S})},function(S){S=w().trim(),S[0]==='"'&&(S=S.substring(1,S.length-1)),t=t||{data:{}},t.data.displayName=S},"q",v("q",!0),function(S){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.q=S},"expires",v("expires",!0),function(S){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.expires=S},function(S){return parseInt(S.join(""))},"0",v("0",!1),function(){return parseFloat(w())},function(S,_){t=t||{data:{}},t.data.params||(t.data.params={}),_===null?_=void 0:_=_[1],t.data.params[S.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(S){t=t||{data:{}},t.data=parseInt(S.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(S){t=t||{data:{}},t.data.value=parseInt(S.join(""))},function(S){t=t||{data:{}},t.data=S},function(S){t=t||{data:{}},t.data.event=S.toLowerCase()},function(){t=t||{data:{}};var S=t.data.tag;t.data=new lr(t.data.uri,t.data.displayName,t.data.params),S&&t.data.setParam("tag",S)},"tag",v("tag",!0),function(S){t=t||{data:{}},t.data.tag=S},function(S){t=t||{data:{}},t.data=parseInt(S.join(""))},function(S){t=t||{data:{}},t.data=S},function(){t=t||{data:{}},t.data=new lr(t.data.uri,t.data.displayName,t.data.params)},"digest",v("Digest",!0),"realm",v("realm",!0),function(S){t=t||{data:{}},t.data.realm=S},"domain",v("domain",!0),"nonce",v("nonce",!0),function(S){t=t||{data:{}},t.data.nonce=S},"opaque",v("opaque",!0),function(S){t=t||{data:{}},t.data.opaque=S},"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(S){t=t||{data:{}},t.data.algorithm=S.toUpperCase()},"qop",v("qop",!0),"auth-int",v("auth-int",!0),"auth",v("auth",!0),function(S){t=t||{data:{}},t.data.qop||(t.data.qop=[]),t.data.qop.push(S.toLowerCase())},function(S){t=t||{data:{}},t.data.value=parseInt(S.join(""))},function(){var S,_;for(t=t||{data:{}},_=t.data.multi_header.length,S=0;S<_;S++)if(t.data.multi_header[S].parsed===null){t.data=null;break}t.data!==null?t.data=t.data.multi_header:t.data=-1},function(){var S;t=t||{data:{}},t.data.multi_header||(t.data.multi_header=[]);try{S=new lr(t.data.uri,t.data.displayName,t.data.params),delete t.data.uri,delete t.data.displayName,delete t.data.params}catch{S=null}t.data.multi_header.push({position:l,offset:E().start.offset,parsed:S})},function(){t=t||{data:{}},t.data=new lr(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(S){t=t||{data:{}},t.data.replaces_from_tag=S},"to-tag",v("to-tag",!0),function(S){t=t||{data:{}},t.data.replaces_to_tag=S},"early-only",v("early-only",!0),function(){t=t||{data:{}},t.data.early_only=!0},function(S,_){return _},function(S,_){return B(S,_)},function(S){t=t||{data:{}},t.startRule==="Require"&&(t.data=S||[])},function(S){t=t||{data:{}},t.data.value=parseInt(S.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(S){t=t||{data:{}},typeof S<"u"&&(t.data.reason=S)},function(S){t=t||{data:{}},typeof S<"u"&&(t.data.expires=S)},"retry_after",v("retry_after",!0),function(S){t=t||{data:{}},typeof S<"u"&&(t.data.retry_after=S)},"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(S){t=t||{data:{}},t.startRule==="Supported"&&(t.data=S||[])},function(){t=t||{data:{}};var S=t.data.tag;t.data=new lr(t.data.uri,t.data.displayName,t.data.params),S&&t.data.setParam("tag",S)},"ttl",v("ttl",!0),function(S){t=t||{data:{}},t.data.ttl=S},"maddr",v("maddr",!0),function(S){t=t||{data:{}},t.data.maddr=S},"received",v("received",!0),function(S){t=t||{data:{}},t.data.received=S},"branch",v("branch",!0),function(S){t=t||{data:{}},t.data.branch=S},"rport",v("rport",!0),function(S){t=t||{data:{}},typeof S<"u"&&(t.data.rport=S.join(""))},function(S){t=t||{data:{}},t.data.protocol=S},v("UDP",!0),v("TCP",!0),v("TLS",!0),v("SCTP",!0),function(S){t=t||{data:{}},t.data.transport=S},function(){t=t||{data:{}},t.data.host=w()},function(S){t=t||{data:{}},t.data.port=parseInt(S.join(""))},function(S){return parseInt(S.join(""))},function(S){t=t||{data:{}},t.startRule==="Session_Expires"&&(t.data.deltaSeconds=S)},"refresher",v("refresher",!1),"uas",v("uas",!1),"uac",v("uac",!1),function(S){t=t||{data:{}},t.startRule==="Session_Expires"&&(t.data.refresher=S)},function(S){t=t||{data:{}},t.startRule==="Min_SE"&&(t.data=S)},"stuns",v("stuns",!0),"stun",v("stun",!0),function(S){t=t||{data:{}},t.data.scheme=S},function(S){t=t||{data:{}},t.data.host=S},"?transport=",v("?transport=",!1),"turns",v("turns",!0),"turn",v("turn",!0),function(S){t=t||{data:{}},t.data.transport=S},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 E(){return x(u,l)}function v(S,_){return{type:"literal",text:S,ignoreCase:_}}function T(S,_,C){return{type:"class",parts:S,inverted:_,ignoreCase:C}}function y(){return{type:"end"}}function b(S){let _=c[S],C;if(_)return _;for(C=S-1;!c[C];)C--;for(_=c[C],_={line:_.line,column:_.column};C<S;)e.charCodeAt(C)===10?(_.line++,_.column=1):_.column++,C++;return c[S]=_,_}function x(S,_){const C=b(S),N=b(_);return{source:n,start:{offset:S,line:C.line,column:C.column},end:{offset:_,line:N.line,column:N.column}}}function k(S){l<d||(l>d&&(d=l,p=[]),p.push(S))}function O(S,_,C){return new Ef(Ef.buildMessage(S,_),S,_,C)}function g(S){return S.split("").map(_=>_.charCodeAt(0)-32)}function q(S){const _=a[S];let C=0;const N=[];let V=_.length;const j=[],X=[];let Z;for(;;){for(;C<V;)switch(_[C]){case 0:X.push(o[_[C+1]]),C+=2;break;case 1:X.push(void 0),C++;break;case 2:X.push(null),C++;break;case 3:X.push(r),C++;break;case 4:X.push([]),C++;break;case 5:X.push(l),C++;break;case 6:X.pop(),C++;break;case 7:l=X.pop(),C++;break;case 8:X.length-=_[C+1],C+=2;break;case 9:X.splice(-2,1),C++;break;case 10:X[X.length-2].push(X.pop()),C++;break;case 11:X.push(X.splice(X.length-_[C+1],_[C+1])),C+=2;break;case 12:X.push(e.substring(X.pop(),l)),C++;break;case 13:j.push(V),N.push(C+3+_[C+1]+_[C+2]),X[X.length-1]?(V=C+3+_[C+1],C+=3):(V=C+3+_[C+1]+_[C+2],C+=3+_[C+1]);break;case 14:j.push(V),N.push(C+3+_[C+1]+_[C+2]),X[X.length-1]===r?(V=C+3+_[C+1],C+=3):(V=C+3+_[C+1]+_[C+2],C+=3+_[C+1]);break;case 15:j.push(V),N.push(C+3+_[C+1]+_[C+2]),X[X.length-1]!==r?(V=C+3+_[C+1],C+=3):(V=C+3+_[C+1]+_[C+2],C+=3+_[C+1]);break;case 16:X[X.length-1]!==r?(j.push(V),N.push(C),V=C+2+_[C+1],C+=2):C+=2+_[C+1];break;case 17:j.push(V),N.push(C+3+_[C+1]+_[C+2]),e.length>l?(V=C+3+_[C+1],C+=3):(V=C+3+_[C+1]+_[C+2],C+=3+_[C+1]);break;case 18:j.push(V),N.push(C+4+_[C+2]+_[C+3]),e.substr(l,o[_[C+1]].length)===o[_[C+1]]?(V=C+4+_[C+2],C+=4):(V=C+4+_[C+2]+_[C+3],C+=4+_[C+2]);break;case 19:j.push(V),N.push(C+4+_[C+2]+_[C+3]),e.substr(l,o[_[C+1]].length).toLowerCase()===o[_[C+1]]?(V=C+4+_[C+2],C+=4):(V=C+4+_[C+2]+_[C+3],C+=4+_[C+2]);break;case 20:j.push(V),N.push(C+4+_[C+2]+_[C+3]),o[_[C+1]].test(e.charAt(l))?(V=C+4+_[C+2],C+=4):(V=C+4+_[C+2]+_[C+3],C+=4+_[C+2]);break;case 21:X.push(e.substr(l,_[C+1])),l+=_[C+1],C+=2;break;case 22:X.push(o[_[C+1]]),l+=o[_[C+1]].length,C+=2;break;case 23:X.push(r),h===0&&k(o[_[C+1]]),C+=2;break;case 24:u=X[X.length-1-_[C+1]],C+=2;break;case 25:u=l,C++;break;case 26:Z=_.slice(C+4,C+4+_[C+3]).map(function(le){return X[X.length-1-le]}),X.splice(X.length-_[C+2],_[C+2],o[_[C+1]].apply(null,Z)),C+=4+_[C+3];break;case 27:X.push(q(_[C+1])),C+=2;break;case 28:h++,C++;break;case 29:h--,C++;break;default:throw new Error("Invalid opcode: "+_[C]+".")}if(j.length>0)V=j.pop(),C=N.pop();else break}return X[0]}t.data={};function B(S,_){return[S].concat(_)}if(m=q(i),m!==r&&l===e.length)return m;throw m!==r&&l<e.length&&k(y()),O(p,d<e.length?e.charAt(d):null,d<e.length?x(d,d+1):x(d,d))}const k0=A0;var pt;(function(e){function t(s,i){const o={startRule:i};try{k0(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})(pt=pt||(pt={}));var I0={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 Un(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 bo(e){return I0[e]||""}function _o(){return Un(10)}function kr(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 Af=class{constructor(){this.headers={}}addHeader(e,t){const r={raw:t};e=kr(e),this.headers[e]?this.headers[e].push(r):this.headers[e]=[r]}getHeader(e){const t=this.headers[kr(e)];if(t){if(t[0])return t[0].raw}else return}getHeaders(e){const t=this.headers[kr(e)],r=[];if(!t)return[];for(const n of t)r.push(n.raw);return r}hasHeader(e){return!!this.headers[kr(e)]}parseHeader(e,t=0){if(e=kr(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=pt.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[kr(e)]=[{raw:t}]}toString(){return this.data}},_s=class extends Af{constructor(){super()}},hn=class extends Af{constructor(){super()}},wl=class sa{constructor(t,r,n,s,i,o,a){this.headers={},this.extraHeaders=[],this.options=sa.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:_o(),this.from=sa.makeNameAddrHeader(this.fromURI,this.options.fromDisplayName,this.fromTag),this.toURI=s.clone(),this.toTag=this.options.toTag,this.to=sa.makeNameAddrHeader(this.toURI,this.options.toDisplayName,this.toTag),this.callId=this.options.callId?this.options.callId:this.options.callIdPrefix+Un(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 lr(t,r,s)}getHeader(t){const r=this.headers[kr(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[kr(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[kr(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[kr(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: "+fi(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: "+fi(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 kf(e){return e==="application/sdp"?"session":"render"}function So(e){const t=typeof e=="string"?e:e.body,r=typeof e=="string"?"application/sdp":e.contentType;return{contentDisposition:kf(r),contentType:r,content:t}}function If(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 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 hn&&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 wl&&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(If(e)&&(t=e.contentDisposition,r=e.contentType,n=e.content),!!n){if(r&&!t&&(t=kf(r)),!t)throw new Error("Content disposition undefined.");if(!r)throw new Error("Content type undefined.");return{contentDisposition:t,contentType:r,content:n}}}var cr;(function(e){e.Initial="Initial",e.Early="Early",e.AckWait="AckWait",e.Confirmed="Confirmed",e.Terminated="Terminated"})(cr=cr||(cr={}));var pe;(function(e){e.Initial="Initial",e.HaveLocalOffer="HaveLocalOffer",e.HaveRemoteOffer="HaveRemoteOffer",e.Stable="Stable",e.Closed="Closed"})(pe=pe||(pe={}));var Jr=500,R0=4e3,yl=5e3;const yt={T1:Jr,T2:R0,T4:yl,TIMER_B:64*Jr,TIMER_D:0*Jr,TIMER_F:64*Jr,TIMER_H:64*Jr,TIMER_I:0*yl,TIMER_J:0*Jr,TIMER_K:0*yl,TIMER_L:64*Jr,TIMER_M:64*Jr,TIMER_N:64*Jr,PROVISIONAL_RESPONSE_INTERVAL:6e4};var gn=class extends jn{constructor(e){super(e||"Transaction state error.")}},ve;(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"})(ve=ve||(ve={}));const vn=[ve.ACK,ve.BYE,ve.CANCEL,ve.INFO,ve.INVITE,ve.MESSAGE,ve.NOTIFY,ve.OPTIONS,ve.PRACK,ve.REFER,ve.REGISTER,ve.SUBSCRIBE];var Rf=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()}},bl=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()}},$0=class{constructor(e,t){this.incomingReferRequest=e,this.session=t}get referTo(){const e=this.incomingReferRequest.message.parseHeader("refer-to");if(!(e instanceof lr))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}},G;(function(e){e.Initial="Initial",e.Establishing="Establishing",e.Established="Established",e.Terminating="Terminating",e.Terminated="Terminated"})(G=G||(G={}));var _l=class rg{constructor(t,r={}){this.pendingReinvite=!1,this.pendingReinviteAck=!1,this._state=G.Initial,this.delegate=r.delegate,this._stateEventEmitter=new di,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 G.Initial:break;case G.Establishing:break;case G.Established:return new Promise(t=>{this._bye({onAccept:()=>t(),onRedirect:()=>t(),onReject:()=>t()})});case G.Terminating:break;case G.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 G.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 G.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 G.Established:{const n=t.requestDelegate,s=this.copyRequestOptions(t.requestOptions);return this._bye(n,s)}case G.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 G.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!==G.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!==G.Established)return Promise.reject(new Error(`Invalid session state ${this.state}`));if(this.pendingReinvite)return Promise.reject(new gl("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(G.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===G.Terminated?i.ack():(this.ackAndBye(i,488,"Bad Media Description"),this.stateTransition(G.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!==G.Terminated?(this.ackAndBye(i,488,"Bad Media Description"),this.stateTransition(G.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!==G.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(G.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: "+vn.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!==G.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!==G.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 rg&&!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 cr.Initial:throw new Error(`Invalid dialog state ${n.sessionState}`);case cr.Early:throw new Error(`Invalid dialog state ${n.sessionState}`);case cr.AckWait:return this.stateTransition(G.Terminating),new Promise(s=>{n.delegate={onAck:()=>{const i=n.bye(t,r);return this.stateTransition(G.Terminated),s(i),Promise.resolve()},onAckTimeout:()=>{const i=n.bye(t,r);this.stateTransition(G.Terminated),s(i)}}});case cr.Confirmed:{const s=n.bye(t,r);return this.stateTransition(G.Terminated),Promise.resolve(s)}case cr.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!==G.Established&&this.state!==G.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 C0(t);this.delegate.onAck(s)}switch(this.pendingReinviteAck=!1,r.signalingState){case pe.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(G.Terminated),Promise.resolve()}case pe.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(G.Terminated)}):Promise.resolve()}case pe.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(G.Terminated),Promise.resolve()}case pe.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(G.Terminated),Promise.resolve()}case pe.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!==G.Established){this.logger.error(`BYE received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onBye){const r=new x0(t);this.delegate.onBye(r)}else t.accept();this.stateTransition(G.Terminated)}onInfoRequest(t){if(this.logger.log("Session.onInfoRequest"),this.state!==G.Established){this.logger.error(`INFO received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onInfo){const r=new E0(t);this.delegate.onInfo(r)}else t.accept()}onInviteRequest(t){if(this.logger.log("Session.onInviteRequest"),this.state!==G.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=pt.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===pe.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!==G.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(G.Terminated)}this.delegate&&this.delegate.onInvite&&this.delegate.onInvite(t.message,o.message,488)})})}onMessageRequest(t){if(this.logger.log("Session.onMessageRequest"),this.state!==G.Established){this.logger.error(`MESSAGE received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onMessage){const r=new Rf(t);this.delegate.onMessage(r)}else t.accept()}onNotifyRequest(t){if(this.logger.log("Session.onNotifyRequest"),this.state!==G.Established){this.logger.error(`NOTIFY received while in state ${this.state}, dropping request`);return}if(this.onNotify){const r=new bl(t);this.onNotify(r);return}if(this.delegate&&this.delegate.onNotify){const r=new bl(t);this.delegate.onNotify(r)}else t.accept()}onPrackRequest(t){if(this.logger.log("Session.onPrackRequest"),this.state!==G.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!==G.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 $0(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 pe.Initial:return this.getOffer(t);case pe.HaveLocalOffer:return Promise.resolve(void 0);case pe.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 pe.Stable:return this.state!==G.Established?Promise.resolve(void 0):this.getOffer(t);case pe.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=>So(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 hl)}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 hl)}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=>So(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 G.Initial:t!==G.Establishing&&t!==G.Established&&t!==G.Terminating&&t!==G.Terminated&&r();break;case G.Establishing:t!==G.Established&&t!==G.Terminating&&t!==G.Terminated&&r();break;case G.Established:t!==G.Terminating&&t!==G.Terminated&&r();break;case G.Terminating:t!==G.Terminated&&r();break;case G.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===G.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=bo(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 pn)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}},yr;(function(e){e.Required="Required",e.Supported="Supported",e.Unsupported="Unsupported"})(yr=yr||(yr={}));const P0={"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 _s=class extends _l{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(G.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===G.Initial&&(t.reject({statusCode:487}),this.stateTransition(G.Terminated))},a)}const i=this.request.getHeader("P-Asserted-Identity");i&&(this._assertedIdentity=pt.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 G.Initial:return this.reject().then(()=>super.dispose());case G.Establishing:return this.reject().then(()=>super.dispose());case G.Established:return super.dispose();case G.Terminating:return super.dispose();case G.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!==G.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(G.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(G.Established),this._replacee&&this._replacee._bye()}).catch(t=>this.handleResponseError(t))}progress(e={}){if(this.logger.log("Invitation.progress"),this.state!==G.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===yr.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!==G.Initial&&this.state!==G.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:bo(t),n=e.extraHeaders||[];if(t<300||t>699)throw new TypeError("Invalid statusCode: "+t);const s=e.body?So(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(G.Terminated),Promise.resolve()}_onCancel(e){if(this.logger.log("Invitation._onCancel"),this.state!==G.Initial&&this.state!==G.Establishing){this.logger.error(`CANCEL received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onCancel){const t=new T0(e);this.delegate.onCancel(t)}this.isCanceled=!0,this.incomingInviteRequest.reject({statusCode:487}),this.stateTransition(G.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 pe.Initial:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);case pe.Stable:return this.setAnswer(t,r).then(()=>{});case pe.HaveLocalOffer:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);case pe.HaveRemoteOffer:return this.setOfferAndGetAnswer(t,r);case pe.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 hl?(this.logger.error("A session description handler occurred while sending response (content type unsupported"),t=415):e instanceof S0?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 gn&&this.logger.error("Session changed state before response could be formulated and sent"),this.state===G.Initial||this.state===G.Establishing)try{this.incomingInviteRequest.reject({statusCode:t}),this.stateTransition(G.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(G.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?So(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:T=>{u=T,clearTimeout(p),clearTimeout(y),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(x){a(x)}}).catch(v=>a(v)))}};const p=setTimeout(()=>{this.waitingForPrack&&(this.waitingForPrack=!1,this.logger.warn("No PRACK received, rejecting INVITE."),clearTimeout(y),this.reject({statusCode:504}).then(()=>a(new vl)).catch(T=>a(T)))},yt.T1*64),h=()=>{try{this.incomingInviteRequest.progress({statusCode:r,reasonPhrase:n,extraHeaders:s,body:i})}catch(T){this.waitingForPrack=!1,a(T);return}y=setTimeout(h,m*=2)};let m=yt.T1,y=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}},Co=class extends _l{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=_o(),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"?pt.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"?pt.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===yr.Required&&u.push("Require: 100rel"),e.configuration.sipExtensionReplaces===yr.Required&&u.push("Require: replaces"),n.extraHeaders=u,this.outgoingRequestMessage=e.userAgentCore.makeOutgoingRequestMessage(ve.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 G.Initial:return this.cancel().then(()=>super.dispose());case G.Establishing:return this.cancel().then(()=>super.dispose());case G.Established:return super.dispose();case G.Terminating:return super.dispose();case G.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!==G.Initial&&this.state!==G.Establishing){const r=new Error(`Invalid session state ${this.state}`);return this.logger.error(r.message),Promise.reject(r)}this.isCanceled=!0,this.stateTransition(G.Terminating);function t(r,n){if(r&&r<200||r>699)throw new TypeError("Invalid statusCode: "+r);if(r){const s=r,i=bo(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(G.Terminated);return Promise.resolve()}invite(e={}){if(this.logger.log("Inviter.invite"),this.state!==G.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(G.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(G.Establishing),this.sendInvite(e))).catch(r=>{throw this.logger.log(r.message),this.state!==G.Terminated&&this.stateTransition(G.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(G.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 _l))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!==G.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=pt.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 pe.Initial:return this.logger.error("Received 2xx response to INVITE without a session description"),this.ackAndBye(e,400,"Missing session description"),this.stateTransition(G.Terminated),Promise.reject(new Error("Bad Media Description"));case pe.HaveLocalOffer:return this.logger.error("Received 2xx response to INVITE without a session description"),this.ackAndBye(e,400,"Missing session description"),this.stateTransition(G.Terminated),Promise.reject(new Error("Bad Media Description"));case pe.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(G.Established)}).catch(s=>{throw this.ackAndBye(e,488,"Invalid session description"),this.stateTransition(G.Terminated),s})}case pe.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(G.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(G.Terminated),Promise.reject(i)}return e.ack(),this.stateTransition(G.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(G.Established)}).catch(i=>{throw this.logger.error(i.message),this.ackAndBye(e,488,"Not Acceptable Here"),this.stateTransition(G.Terminated),i})}case pe.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!==G.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=pt.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 pe.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 pe.HaveLocalOffer:return o&&e.prack({extraHeaders:a}),Promise.resolve();case pe.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(G.Terminated),u})}case pe.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(G.Terminated),c})}return Promise.resolve();case pe.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!==G.Establishing&&this.state!==G.Terminating){this.logger.error(`Redirect received while in state ${this.state}, dropping response`);return}this.stateTransition(G.Terminated)}onReject(e){if(this.logger.log("Inviter.onReject"),this.state!==G.Establishing&&this.state!==G.Terminating){this.logger.error(`Reject received while in state ${this.state}, dropping response`);return}this.stateTransition(G.Terminated)}onTrying(e){if(this.logger.log("Inviter.onTrying"),this.state!==G.Establishing){this.logger.error(`Trying received while in state ${this.state}, dropping response`);return}}},Ye;(function(e){e.Initial="Initial",e.Registered="Registered",e.Unregistered="Unregistered",e.Terminated="Terminated"})(Ye=Ye||(Ye={}));var Sl=class Qn{constructor(t,r={}){this.disposed=!1,this._contacts=[],this._retryAfter=void 0,this._state=Ye.Initial,this._waiting=!1,this._stateEventEmitter=new di,this._waitingEventEmitter=new di,this.userAgent=t;const n=t.configuration.uri.clone();if(n.user=void 0,this.options=Object.assign(Object.assign(Object.assign({},Qn.defaultOptions()),{registrar:n}),Qn.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&&pt.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(ve.REGISTER,s,i,o,a,l,void 0),this.expires=this.options.expires||Qn.defaultExpires,this.expires<0)throw new Error("Invalid expires.");if(this.refreshFrequency=this.options.refreshFrequency||Qn.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:Qn.defaultExpires,extraContactHeaderParams:[],extraHeaders:[],logConfiguration:!0,instanceId:"",params:{},regId:0,registrar:new pn("sip","anonymous","anonymous.invalid"),refreshFrequency:Qn.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===Ye.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===Ye.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 gl("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&&Tf(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(Tf(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=pt.URIParse(l.replace(/"/g,"")))}if(a.hasParam("pub-gruu")){const l=a.getParam("pub-gruu");l&&(this.userAgent.contact.pubGruu=pt.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===Ye.Terminated)throw this.stateError(),new Error("Registerer terminated. Unable to register.");if(this.disposed&&this.state!==Ye.Registered)throw this.stateError(),new Error("Registerer disposed. Unable to register.");if(this.waiting){this.waitingWarning();const s=new gl("REGISTER request already in progress, waiting for final response");return Promise.reject(s)}this._state!==Ye.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!==Ye.Registered&&this.stateTransition(Ye.Registered)}unregistered(){this.clearTimers(),this._state!==Ye.Unregistered&&this.stateTransition(Ye.Unregistered)}terminated(){this.clearTimers(),this._state!==Ye.Terminated&&this.stateTransition(Ye.Terminated)}stateTransition(t){const r=()=>{throw new Error(`Invalid state transition from ${this._state} to ${t}`)};switch(this._state){case Ye.Initial:t!==Ye.Registered&&t!==Ye.Unregistered&&t!==Ye.Terminated&&r();break;case Ye.Registered:t!==Ye.Unregistered&&t!==Ye.Terminated&&r();break;case Ye.Unregistered:t!==Ye.Registered&&t!==Ye.Terminated&&r();break;case Ye.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===Ye.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===Ye.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)}};Sl.defaultExpires=600,Sl.defaultRefreshFrequency=99;var Ue;(function(e){e.Initial="Initial",e.NotifyWait="NotifyWait",e.Pending="Pending",e.Active="Active",e.Terminated="Terminated"})(Ue=Ue||(Ue={}));var $e;(function(e){e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Disconnected="Disconnected"})($e=$e||($e={}));var xt;(function(e){e.Started="Started",e.Stopped="Stopped"})(xt=xt||(xt={}));var mn=class dr{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=dr.hexChars,n=dr.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(dr.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,dr._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,dr._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,dr._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(dr.buffer32Identity.subarray(i),i),r>55&&(dr._md5cycle(this._state,s),s.set(dr.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 dr._md5cycle(this._state,s),t?this._state:dr._hex(this._state)}};mn.stateIdentity=new Int32Array([1732584193,-271733879,-1732584194,271733878]),mn.buffer32Identity=new Int32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),mn.hexChars="0123456789abcdef",mn.hexOut=[],mn.onePassHasher=new mn,mn.hashStr("hello")!=="5d41402abc4b2a76b9719d911017c592"&&console.error("Md5 self test failed.");function wn(e){return mn.hashStr(e)}var D0=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=Un(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=wn(this.username+":"+this.realm+":"+this.password)),this.qop==="auth"?(r=wn(this.method+":"+this.uri),this.response=wn(t+":"+this.nonce+":"+this.ncHex+":"+this.cnonce+":auth:"+r)):this.qop==="auth-int"?(r=wn(this.method+":"+this.uri+":"+wn(e||"")),this.response=wn(t+":"+this.nonce+":"+this.ncHex+":"+this.cnonce+":auth-int:"+r)):this.qop===void 0&&(r=wn(this.method+":"+this.uri),this.response=wn(t+":"+this.nonce+":"+r))}},bt;(function(e){e[e.error=0]="error",e[e.warn=1]="warn",e[e.log=2]="log",e[e.debug=3]="debug"})(bt=bt||(bt={}));var $f=class{constructor(e,t,r){this.logger=e,this.category=t,this.label=r}error(e){this.genericLog(bt.error,e)}warn(e){this.genericLog(bt.warn,e)}log(e){this.genericLog(bt.log,e)}debug(e){this.genericLog(bt.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}},O0=class{constructor(){this.builtinEnabled=!0,this._level=bt.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:bt.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 $f(this,e,t);if(this.loggers[e])return this.loggers[e];{const r=new $f(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(bt[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 bt.error:console.error(n);break;case bt.warn:console.warn(n);break;case bt.log:console.log(n);break;case bt.debug:console.debug(n);break;default:break}}},xo;(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 kf(e){return e==="application/sdp"?"session":"render"}function So(e){const t=typeof e=="string"?e:e.body,r=typeof e=="string"?"application/sdp":e.contentType;return{contentDisposition:kf(r),contentType:r,content:t}}function If(e){return e&&typeof e.content=="string"&&typeof e.contentType=="string"&&e.contentDisposition===void 0?!0:typeof e.contentDisposition=="string"}function hi(e){let t,r,n;if(e instanceof _s&&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 hn&&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 wl&&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(If(e)&&(t=e.contentDisposition,r=e.contentType,n=e.content),!!n){if(r&&!t&&(t=kf(r)),!t)throw new Error("Content disposition undefined.");if(!r)throw new Error("Content type undefined.");return{contentDisposition:t,contentType:r,content:n}}}var cr;(function(e){e.Initial="Initial",e.Early="Early",e.AckWait="AckWait",e.Confirmed="Confirmed",e.Terminated="Terminated"})(cr=cr||(cr={}));var pe;(function(e){e.Initial="Initial",e.HaveLocalOffer="HaveLocalOffer",e.HaveRemoteOffer="HaveRemoteOffer",e.Stable="Stable",e.Closed="Closed"})(pe=pe||(pe={}));var Jr=500,R0=4e3,yl=5e3;const yt={T1:Jr,T2:R0,T4:yl,TIMER_B:64*Jr,TIMER_D:0*Jr,TIMER_F:64*Jr,TIMER_H:64*Jr,TIMER_I:0*yl,TIMER_J:0*Jr,TIMER_K:0*yl,TIMER_L:64*Jr,TIMER_M:64*Jr,TIMER_N:64*Jr,PROVISIONAL_RESPONSE_INTERVAL:6e4};var gn=class extends jn{constructor(e){super(e||"Transaction state error.")}},ve;(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"})(ve=ve||(ve={}));const vn=[ve.ACK,ve.BYE,ve.CANCEL,ve.INFO,ve.INVITE,ve.MESSAGE,ve.NOTIFY,ve.OPTIONS,ve.PRACK,ve.REFER,ve.REGISTER,ve.SUBSCRIBE];var Rf=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()}},bl=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()}},$0=class{constructor(e,t){this.incomingReferRequest=e,this.session=t}get referTo(){const e=this.incomingReferRequest.message.parseHeader("refer-to");if(!(e instanceof lr))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}},J;(function(e){e.Initial="Initial",e.Establishing="Establishing",e.Established="Established",e.Terminating="Terminating",e.Terminated="Terminated"})(J=J||(J={}));var _l=class rg{constructor(t,r={}){this.pendingReinvite=!1,this.pendingReinviteAck=!1,this._state=J.Initial,this.delegate=r.delegate,this._stateEventEmitter=new fi,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 J.Initial:break;case J.Establishing:break;case J.Established:return new Promise(t=>{this._bye({onAccept:()=>t(),onRedirect:()=>t(),onReject:()=>t()})});case J.Terminating:break;case J.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 J.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 J.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 J.Established:{const n=t.requestDelegate,s=this.copyRequestOptions(t.requestOptions);return this._bye(n,s)}case J.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 J.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!==J.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!==J.Established)return Promise.reject(new Error(`Invalid session state ${this.state}`));if(this.pendingReinvite)return Promise.reject(new gl("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=hi(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(J.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===J.Terminated?i.ack():(this.ackAndBye(i,488,"Bad Media Description"),this.stateTransition(J.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!==J.Terminated?(this.ackAndBye(i,488,"Bad Media Description"),this.stateTransition(J.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!==J.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(J.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: "+vn.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!==J.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!==J.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 rg&&!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 cr.Initial:throw new Error(`Invalid dialog state ${n.sessionState}`);case cr.Early:throw new Error(`Invalid dialog state ${n.sessionState}`);case cr.AckWait:return this.stateTransition(J.Terminating),new Promise(s=>{n.delegate={onAck:()=>{const i=n.bye(t,r);return this.stateTransition(J.Terminated),s(i),Promise.resolve()},onAckTimeout:()=>{const i=n.bye(t,r);this.stateTransition(J.Terminated),s(i)}}});case cr.Confirmed:{const s=n.bye(t,r);return this.stateTransition(J.Terminated),Promise.resolve(s)}case cr.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!==J.Established&&this.state!==J.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 C0(t);this.delegate.onAck(s)}switch(this.pendingReinviteAck=!1,r.signalingState){case pe.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(J.Terminated),Promise.resolve()}case pe.Stable:{const s=hi(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(J.Terminated)}):Promise.resolve()}case pe.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(J.Terminated),Promise.resolve()}case pe.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(J.Terminated),Promise.resolve()}case pe.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!==J.Established){this.logger.error(`BYE received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onBye){const r=new x0(t);this.delegate.onBye(r)}else t.accept();this.stateTransition(J.Terminated)}onInfoRequest(t){if(this.logger.log("Session.onInfoRequest"),this.state!==J.Established){this.logger.error(`INFO received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onInfo){const r=new E0(t);this.delegate.onInfo(r)}else t.accept()}onInviteRequest(t){if(this.logger.log("Session.onInviteRequest"),this.state!==J.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=pt.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===pe.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!==J.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(J.Terminated)}this.delegate&&this.delegate.onInvite&&this.delegate.onInvite(t.message,o.message,488)})})}onMessageRequest(t){if(this.logger.log("Session.onMessageRequest"),this.state!==J.Established){this.logger.error(`MESSAGE received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onMessage){const r=new Rf(t);this.delegate.onMessage(r)}else t.accept()}onNotifyRequest(t){if(this.logger.log("Session.onNotifyRequest"),this.state!==J.Established){this.logger.error(`NOTIFY received while in state ${this.state}, dropping request`);return}if(this.onNotify){const r=new bl(t);this.onNotify(r);return}if(this.delegate&&this.delegate.onNotify){const r=new bl(t);this.delegate.onNotify(r)}else t.accept()}onPrackRequest(t){if(this.logger.log("Session.onPrackRequest"),this.state!==J.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!==J.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 $0(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=hi(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 pe.Initial:return this.getOffer(t);case pe.HaveLocalOffer:return Promise.resolve(void 0);case pe.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 pe.Stable:return this.state!==J.Established?Promise.resolve(void 0):this.getOffer(t);case pe.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=>So(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 hl)}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 hl)}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=>So(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 J.Initial:t!==J.Establishing&&t!==J.Established&&t!==J.Terminating&&t!==J.Terminated&&r();break;case J.Establishing:t!==J.Established&&t!==J.Terminating&&t!==J.Terminated&&r();break;case J.Established:t!==J.Terminating&&t!==J.Terminated&&r();break;case J.Terminating:t!==J.Terminated&&r();break;case J.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===J.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=bo(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 pn)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}},yr;(function(e){e.Required="Required",e.Supported="Supported",e.Unsupported="Unsupported"})(yr=yr||(yr={}));const P0={"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 Ss=class extends _l{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(J.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===J.Initial&&(t.reject({statusCode:487}),this.stateTransition(J.Terminated))},a)}const i=this.request.getHeader("P-Asserted-Identity");i&&(this._assertedIdentity=pt.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 J.Initial:return this.reject().then(()=>super.dispose());case J.Establishing:return this.reject().then(()=>super.dispose());case J.Established:return super.dispose();case J.Terminating:return super.dispose();case J.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!==J.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(J.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(J.Established),this._replacee&&this._replacee._bye()}).catch(t=>this.handleResponseError(t))}progress(e={}){if(this.logger.log("Invitation.progress"),this.state!==J.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===yr.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!==J.Initial&&this.state!==J.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:bo(t),n=e.extraHeaders||[];if(t<300||t>699)throw new TypeError("Invalid statusCode: "+t);const s=e.body?So(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(J.Terminated),Promise.resolve()}_onCancel(e){if(this.logger.log("Invitation._onCancel"),this.state!==J.Initial&&this.state!==J.Establishing){this.logger.error(`CANCEL received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onCancel){const t=new T0(e);this.delegate.onCancel(t)}this.isCanceled=!0,this.incomingInviteRequest.reject({statusCode:487}),this.stateTransition(J.Terminated)}handlePrackOfferAnswer(e){if(!this.dialog)throw new Error("Dialog undefined.");const t=hi(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 pe.Initial:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);case pe.Stable:return this.setAnswer(t,r).then(()=>{});case pe.HaveLocalOffer:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);case pe.HaveRemoteOffer:return this.setOfferAndGetAnswer(t,r);case pe.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 hl?(this.logger.error("A session description handler occurred while sending response (content type unsupported"),t=415):e instanceof S0?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 gn&&this.logger.error("Session changed state before response could be formulated and sent"),this.state===J.Initial||this.state===J.Establishing)try{this.incomingInviteRequest.reject({statusCode:t}),this.stateTransition(J.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(J.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?So(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:E=>{u=E,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(T){a(T)}}).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(E=>a(E)))},yt.T1*64),h=()=>{try{this.incomingInviteRequest.progress({statusCode:r,reasonPhrase:n,extraHeaders:s,body:i})}catch(E){this.waitingForPrack=!1,a(E);return}w=setTimeout(h,m*=2)};let m=yt.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}},Co=class extends _l{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=_o(),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"?pt.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"?pt.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===yr.Required&&u.push("Require: 100rel"),e.configuration.sipExtensionReplaces===yr.Required&&u.push("Require: replaces"),n.extraHeaders=u,this.outgoingRequestMessage=e.userAgentCore.makeOutgoingRequestMessage(ve.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 J.Initial:return this.cancel().then(()=>super.dispose());case J.Establishing:return this.cancel().then(()=>super.dispose());case J.Established:return super.dispose();case J.Terminating:return super.dispose();case J.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!==J.Initial&&this.state!==J.Establishing){const r=new Error(`Invalid session state ${this.state}`);return this.logger.error(r.message),Promise.reject(r)}this.isCanceled=!0,this.stateTransition(J.Terminating);function t(r,n){if(r&&r<200||r>699)throw new TypeError("Invalid statusCode: "+r);if(r){const s=r,i=bo(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(J.Terminated);return Promise.resolve()}invite(e={}){if(this.logger.log("Inviter.invite"),this.state!==J.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(J.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(J.Establishing),this.sendInvite(e))).catch(r=>{throw this.logger.log(r.message),this.state!==J.Terminated&&this.stateTransition(J.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(J.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 _l))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!==J.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=pt.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 pe.Initial:return this.logger.error("Received 2xx response to INVITE without a session description"),this.ackAndBye(e,400,"Missing session description"),this.stateTransition(J.Terminated),Promise.reject(new Error("Bad Media Description"));case pe.HaveLocalOffer:return this.logger.error("Received 2xx response to INVITE without a session description"),this.ackAndBye(e,400,"Missing session description"),this.stateTransition(J.Terminated),Promise.reject(new Error("Bad Media Description"));case pe.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(J.Established)}).catch(s=>{throw this.ackAndBye(e,488,"Invalid session description"),this.stateTransition(J.Terminated),s})}case pe.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(J.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(J.Terminated),Promise.reject(i)}return e.ack(),this.stateTransition(J.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(J.Established)}).catch(i=>{throw this.logger.error(i.message),this.ackAndBye(e,488,"Not Acceptable Here"),this.stateTransition(J.Terminated),i})}case pe.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!==J.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=pt.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 pe.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 pe.HaveLocalOffer:return o&&e.prack({extraHeaders:a}),Promise.resolve();case pe.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(J.Terminated),u})}case pe.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(J.Terminated),c})}return Promise.resolve();case pe.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!==J.Establishing&&this.state!==J.Terminating){this.logger.error(`Redirect received while in state ${this.state}, dropping response`);return}this.stateTransition(J.Terminated)}onReject(e){if(this.logger.log("Inviter.onReject"),this.state!==J.Establishing&&this.state!==J.Terminating){this.logger.error(`Reject received while in state ${this.state}, dropping response`);return}this.stateTransition(J.Terminated)}onTrying(e){if(this.logger.log("Inviter.onTrying"),this.state!==J.Establishing){this.logger.error(`Trying received while in state ${this.state}, dropping response`);return}}},Ye;(function(e){e.Initial="Initial",e.Registered="Registered",e.Unregistered="Unregistered",e.Terminated="Terminated"})(Ye=Ye||(Ye={}));var Sl=class es{constructor(t,r={}){this.disposed=!1,this._contacts=[],this._retryAfter=void 0,this._state=Ye.Initial,this._waiting=!1,this._stateEventEmitter=new fi,this._waitingEventEmitter=new fi,this.userAgent=t;const n=t.configuration.uri.clone();if(n.user=void 0,this.options=Object.assign(Object.assign(Object.assign({},es.defaultOptions()),{registrar:n}),es.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&&pt.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(ve.REGISTER,s,i,o,a,l,void 0),this.expires=this.options.expires||es.defaultExpires,this.expires<0)throw new Error("Invalid expires.");if(this.refreshFrequency=this.options.refreshFrequency||es.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:es.defaultExpires,extraContactHeaderParams:[],extraHeaders:[],logConfiguration:!0,instanceId:"",params:{},regId:0,registrar:new pn("sip","anonymous","anonymous.invalid"),refreshFrequency:es.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===Ye.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===Ye.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 gl("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&&Tf(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(Tf(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=pt.URIParse(l.replace(/"/g,"")))}if(a.hasParam("pub-gruu")){const l=a.getParam("pub-gruu");l&&(this.userAgent.contact.pubGruu=pt.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===Ye.Terminated)throw this.stateError(),new Error("Registerer terminated. Unable to register.");if(this.disposed&&this.state!==Ye.Registered)throw this.stateError(),new Error("Registerer disposed. Unable to register.");if(this.waiting){this.waitingWarning();const s=new gl("REGISTER request already in progress, waiting for final response");return Promise.reject(s)}this._state!==Ye.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!==Ye.Registered&&this.stateTransition(Ye.Registered)}unregistered(){this.clearTimers(),this._state!==Ye.Unregistered&&this.stateTransition(Ye.Unregistered)}terminated(){this.clearTimers(),this._state!==Ye.Terminated&&this.stateTransition(Ye.Terminated)}stateTransition(t){const r=()=>{throw new Error(`Invalid state transition from ${this._state} to ${t}`)};switch(this._state){case Ye.Initial:t!==Ye.Registered&&t!==Ye.Unregistered&&t!==Ye.Terminated&&r();break;case Ye.Registered:t!==Ye.Unregistered&&t!==Ye.Terminated&&r();break;case Ye.Unregistered:t!==Ye.Registered&&t!==Ye.Terminated&&r();break;case Ye.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===Ye.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===Ye.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)}};Sl.defaultExpires=600,Sl.defaultRefreshFrequency=99;var Ue;(function(e){e.Initial="Initial",e.NotifyWait="NotifyWait",e.Pending="Pending",e.Active="Active",e.Terminated="Terminated"})(Ue=Ue||(Ue={}));var $e;(function(e){e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Disconnected="Disconnected"})($e=$e||($e={}));var xt;(function(e){e.Started="Started",e.Stopped="Stopped"})(xt=xt||(xt={}));var mn=class dr{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=dr.hexChars,n=dr.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(dr.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,dr._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,dr._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,dr._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(dr.buffer32Identity.subarray(i),i),r>55&&(dr._md5cycle(this._state,s),s.set(dr.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 dr._md5cycle(this._state,s),t?this._state:dr._hex(this._state)}};mn.stateIdentity=new Int32Array([1732584193,-271733879,-1732584194,271733878]),mn.buffer32Identity=new Int32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),mn.hexChars="0123456789abcdef",mn.hexOut=[],mn.onePassHasher=new mn,mn.hashStr("hello")!=="5d41402abc4b2a76b9719d911017c592"&&console.error("Md5 self test failed.");function wn(e){return mn.hashStr(e)}var D0=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=Un(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=wn(this.username+":"+this.realm+":"+this.password)),this.qop==="auth"?(r=wn(this.method+":"+this.uri),this.response=wn(t+":"+this.nonce+":"+this.ncHex+":"+this.cnonce+":auth:"+r)):this.qop==="auth-int"?(r=wn(this.method+":"+this.uri+":"+wn(e||"")),this.response=wn(t+":"+this.nonce+":"+this.ncHex+":"+this.cnonce+":auth-int:"+r)):this.qop===void 0&&(r=wn(this.method+":"+this.uri),this.response=wn(t+":"+this.nonce+":"+r))}},bt;(function(e){e[e.error=0]="error",e[e.warn=1]="warn",e[e.log=2]="log",e[e.debug=3]="debug"})(bt=bt||(bt={}));var $f=class{constructor(e,t,r){this.logger=e,this.category=t,this.label=r}error(e){this.genericLog(bt.error,e)}warn(e){this.genericLog(bt.warn,e)}log(e){this.genericLog(bt.log,e)}debug(e){this.genericLog(bt.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}},O0=class{constructor(){this.builtinEnabled=!0,this._level=bt.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:bt.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 $f(this,e,t);if(this.loggers[e])return this.loggers[e];{const r=new $f(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(bt[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 bt.error:console.error(n);break;case bt.warn:console.warn(n);break;case bt.log:console.log(n);break;case bt.debug:console.debug(n);break;default:break}}},xo;(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=pt.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=pt.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 hn&&(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=pt.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 hn,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})(xo=xo||(xo={}));function Pf(e,t){if(t.statusCode<100||t.statusCode>699)throw new TypeError("Invalid statusCode: "+t.statusCode);const n=t.reasonPhrase?t.reasonPhrase:bo(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=pt.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 hn,c.statusCode=u.status_code,c.reasonPhrase=u.reason_phrase):(c=new _s,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})(xo=xo||(xo={}));function Pf(e,t){if(t.statusCode<100||t.statusCode>699)throw new TypeError("Invalid statusCode: "+t.statusCode);const n=t.reasonPhrase?t.reasonPhrase:bo(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
@@ -35,11 +35,11 @@
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: "+fi(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 Cl=class extends jn{constructor(e){super(e||"Unspecified transport error.")}},Df=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 Cl)throw this.onTransportError(t),t;let r;throw t&&typeof t.message=="string"?r=new Cl(t.message):r=new Cl,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"}},Of=class extends Df{constructor(e,t,r,n,s){super(t,r,e.viaBranch,n,s),this._request=e,this.user=r}get request(){return this._request}},V;(function(e){e.Accepted="Accepted",e.Calling="Calling",e.Completed="Completed",e.Confirmed="Confirmed",e.Proceeding="Proceeding",e.Terminated="Terminated",e.Trying="Trying"})(V=V||(V={}));var jt=class extends Of{constructor(e,t,r){super(e,t,r,V.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 V.Proceeding:if(e.method===ve.INVITE){this.lastProvisionalResponse&&this.send(this.lastProvisionalResponse).catch(r=>{this.logTransportError(r,"Failed to send retransmission of provisional response.")});return}break;case V.Accepted:if(e.method===ve.INVITE)return;break;case V.Completed:if(e.method===ve.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===ve.ACK){this.stateTransition(V.Confirmed);return}break;case V.Confirmed:if(e.method===ve.INVITE||e.method===ve.ACK)return;break;case V.Terminated:if(e.method===ve.INVITE||e.method===ve.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 V.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(V.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(V.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send non-2xx final response.")});return}break;case V.Accepted:if(e>=200&&e<=299){this.send(t).catch(n=>{this.logTransportError(n,"Failed to send 2xx response.")});return}break;case V.Completed:break;case V.Confirmed:break;case V.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===V.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 V.Proceeding:t();break;case V.Accepted:case V.Completed:this.state!==V.Proceeding&&t();break;case V.Confirmed:this.state!==V.Completed&&t();break;case V.Terminated:this.state!==V.Accepted&&this.state!==V.Completed&&this.state!==V.Confirmed&&t();break;default:t()}this.stopProgressExtensionTimer(),e===V.Accepted&&(this.L=setTimeout(()=>this.timerL(),yt.TIMER_L)),e===V.Completed&&(this.H=setTimeout(()=>this.timerH(),yt.TIMER_H)),e===V.Confirmed&&(this.I=setTimeout(()=>this.timerI(),yt.TIMER_I)),e===V.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.")})},yt.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===V.Completed&&(this.logger.warn("ACK to negative final response was never received, terminating transaction."),this.stateTransition(V.Terminated))}timerI(){this.logger.debug(`Timer I expired for INVITE server transaction ${this.id}.`),this.stateTransition(V.Terminated)}timerL(){this.logger.debug(`Timer L expired for INVITE server transaction ${this.id}.`),this.state===V.Accepted&&this.stateTransition(V.Terminated)}},Hf=class ng extends Df{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()}},Wt=class extends Hf{constructor(e,t,r){super(e,t,r,V.Trying,"sip.transaction.nict"),this.F=setTimeout(()=>this.timerF(),yt.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 V.Trying:if(t>=100&&t<=199){this.stateTransition(V.Proceeding),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=200&&t<=699){if(this.stateTransition(V.Completed),t===408){this.onRequestTimeout();return}this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case V.Proceeding:if(t>=100&&t<=199&&this.user.receiveResponse)return this.user.receiveResponse(e);if(t>=200&&t<=699){if(this.stateTransition(V.Completed),t===408){this.onRequestTimeout();return}this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case V.Completed:return;case V.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(V.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 V.Trying:r();break;case V.Proceeding:this.state!==V.Trying&&r();break;case V.Completed:this.state!==V.Trying&&this.state!==V.Proceeding&&r();break;case V.Terminated:this.state!==V.Trying&&this.state!==V.Proceeding&&this.state!==V.Completed&&(t||r());break;default:r()}e===V.Completed&&(this.F&&(clearTimeout(this.F),this.F=void 0),this.K=setTimeout(()=>this.timerK(),yt.TIMER_K)),e===V.Terminated&&this.dispose(),this.setState(e)}timerF(){this.logger.debug(`Timer F expired for non-INVITE client transaction ${this.id}.`),(this.state===V.Trying||this.state===V.Proceeding)&&(this.onRequestTimeout(),this.stateTransition(V.Terminated))}timerK(){this.state===V.Completed&&this.stateTransition(V.Terminated)}},Ss=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 lr))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 lr))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!==ve.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===ve.ACK?!0:this.remoteSequenceNumber&&e.cseq<=this.remoteSequenceNumber?(this.core.replyStateless(e,{statusCode:500}),!1):!0}},yn=class extends Hf{constructor(e,t,r){super(e,t,r,V.Calling,"sip.transaction.ict"),this.ackRetransmissionCache=new Map,this.B=setTimeout(()=>this.timerB(),yt.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 V.Calling:if(t>=100&&t<=199){this.stateTransition(V.Proceeding),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=200&&t<=299){this.ackRetransmissionCache.set(e.toTag,void 0),this.stateTransition(V.Accepted),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=300&&t<=699){this.stateTransition(V.Completed),this.ack(e),this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case V.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(V.Accepted),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=300&&t<=699){this.stateTransition(V.Completed),this.ack(e),this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case V.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 V.Completed:if(t>=300&&t<=699){this.ack(e);return}break;case V.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(V.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 Cl=class extends jn{constructor(e){super(e||"Unspecified transport error.")}},Df=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 Cl)throw this.onTransportError(t),t;let r;throw t&&typeof t.message=="string"?r=new Cl(t.message):r=new Cl,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"}},Of=class extends Df{constructor(e,t,r,n,s){super(t,r,e.viaBranch,n,s),this._request=e,this.user=r}get request(){return this._request}},U;(function(e){e.Accepted="Accepted",e.Calling="Calling",e.Completed="Completed",e.Confirmed="Confirmed",e.Proceeding="Proceeding",e.Terminated="Terminated",e.Trying="Trying"})(U=U||(U={}));var jt=class extends Of{constructor(e,t,r){super(e,t,r,U.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 U.Proceeding:if(e.method===ve.INVITE){this.lastProvisionalResponse&&this.send(this.lastProvisionalResponse).catch(r=>{this.logTransportError(r,"Failed to send retransmission of provisional response.")});return}break;case U.Accepted:if(e.method===ve.INVITE)return;break;case U.Completed:if(e.method===ve.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===ve.ACK){this.stateTransition(U.Confirmed);return}break;case U.Confirmed:if(e.method===ve.INVITE||e.method===ve.ACK)return;break;case U.Terminated:if(e.method===ve.INVITE||e.method===ve.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 U.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(U.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(U.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send non-2xx final response.")});return}break;case U.Accepted:if(e>=200&&e<=299){this.send(t).catch(n=>{this.logTransportError(n,"Failed to send 2xx response.")});return}break;case U.Completed:break;case U.Confirmed:break;case U.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===U.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 U.Proceeding:t();break;case U.Accepted:case U.Completed:this.state!==U.Proceeding&&t();break;case U.Confirmed:this.state!==U.Completed&&t();break;case U.Terminated:this.state!==U.Accepted&&this.state!==U.Completed&&this.state!==U.Confirmed&&t();break;default:t()}this.stopProgressExtensionTimer(),e===U.Accepted&&(this.L=setTimeout(()=>this.timerL(),yt.TIMER_L)),e===U.Completed&&(this.H=setTimeout(()=>this.timerH(),yt.TIMER_H)),e===U.Confirmed&&(this.I=setTimeout(()=>this.timerI(),yt.TIMER_I)),e===U.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.")})},yt.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===U.Completed&&(this.logger.warn("ACK to negative final response was never received, terminating transaction."),this.stateTransition(U.Terminated))}timerI(){this.logger.debug(`Timer I expired for INVITE server transaction ${this.id}.`),this.stateTransition(U.Terminated)}timerL(){this.logger.debug(`Timer L expired for INVITE server transaction ${this.id}.`),this.state===U.Accepted&&this.stateTransition(U.Terminated)}},Hf=class ng extends Df{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()}},Wt=class extends Hf{constructor(e,t,r){super(e,t,r,U.Trying,"sip.transaction.nict"),this.F=setTimeout(()=>this.timerF(),yt.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 U.Trying:if(t>=100&&t<=199){this.stateTransition(U.Proceeding),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=200&&t<=699){if(this.stateTransition(U.Completed),t===408){this.onRequestTimeout();return}this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case U.Proceeding:if(t>=100&&t<=199&&this.user.receiveResponse)return this.user.receiveResponse(e);if(t>=200&&t<=699){if(this.stateTransition(U.Completed),t===408){this.onRequestTimeout();return}this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case U.Completed:return;case U.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(U.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 U.Trying:r();break;case U.Proceeding:this.state!==U.Trying&&r();break;case U.Completed:this.state!==U.Trying&&this.state!==U.Proceeding&&r();break;case U.Terminated:this.state!==U.Trying&&this.state!==U.Proceeding&&this.state!==U.Completed&&(t||r());break;default:r()}e===U.Completed&&(this.F&&(clearTimeout(this.F),this.F=void 0),this.K=setTimeout(()=>this.timerK(),yt.TIMER_K)),e===U.Terminated&&this.dispose(),this.setState(e)}timerF(){this.logger.debug(`Timer F expired for non-INVITE client transaction ${this.id}.`),(this.state===U.Trying||this.state===U.Proceeding)&&(this.onRequestTimeout(),this.stateTransition(U.Terminated))}timerK(){this.state===U.Completed&&this.stateTransition(U.Terminated)}},Cs=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 lr))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 lr))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!==ve.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===ve.ACK?!0:this.remoteSequenceNumber&&e.cseq<=this.remoteSequenceNumber?(this.core.replyStateless(e,{statusCode:500}),!1):!0}},yn=class extends Hf{constructor(e,t,r){super(e,t,r,U.Calling,"sip.transaction.ict"),this.ackRetransmissionCache=new Map,this.B=setTimeout(()=>this.timerB(),yt.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 U.Calling:if(t>=100&&t<=199){this.stateTransition(U.Proceeding),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=200&&t<=299){this.ackRetransmissionCache.set(e.toTag,void 0),this.stateTransition(U.Accepted),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=300&&t<=699){this.stateTransition(U.Completed),this.ack(e),this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case U.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(U.Accepted),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=300&&t<=699){this.stateTransition(U.Completed),this.ack(e),this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case U.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 U.Completed:if(t>=300&&t<=699){this.ack(e);return}break;case U.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(U.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 V.Calling:r();break;case V.Proceeding:this.state!==V.Calling&&r();break;case V.Accepted:case V.Completed:this.state!==V.Calling&&this.state!==V.Proceeding&&r();break;case V.Terminated:this.state!==V.Calling&&this.state!==V.Accepted&&this.state!==V.Completed&&(t||r());break;default:r()}this.B&&(clearTimeout(this.B),this.B=void 0),V.Proceeding,e===V.Completed&&(this.D=setTimeout(()=>this.timerD(),yt.TIMER_D)),e===V.Accepted&&(this.M=setTimeout(()=>this.timerM(),yt.TIMER_M)),e===V.Terminated&&this.dispose(),this.setState(e)}timerA(){}timerB(){this.logger.debug(`Timer B expired for INVITE client transaction ${this.id}.`),this.state===V.Calling&&(this.onRequestTimeout(),this.stateTransition(V.Terminated))}timerD(){this.logger.debug(`Timer D expired for INVITE client transaction ${this.id}.`),this.state===V.Completed&&this.stateTransition(V.Terminated)}timerM(){this.logger.debug(`Timer M expired for INVITE client transaction ${this.id}.`),this.state===V.Accepted&&this.stateTransition(V.Terminated)}},Gt=class kc{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(ve.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===V.Proceeding?new kc(Wt,this.core,n):this.transaction.addStateChangeListener(()=>{this.transaction&&this.transaction.state===V.Proceeding&&new kc(Wt,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 hn;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 hn;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===V.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)}},H0=class extends Gt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ve.BYE,r);super(Wt,e.userAgentCore,n,t),e.dispose()}},Jt=class extends Of{constructor(e,t,r){super(e,t,r,V.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 V.Trying:break;case V.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 V.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 V.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 V.Trying:if(this.lastResponse=t,e>=100&&e<200){this.stateTransition(V.Proceeding),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send provisional response.")});return}if(e>=200&&e<=699){this.stateTransition(V.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send final response.")});return}break;case V.Proceeding:if(this.lastResponse=t,e>=200&&e<=699){this.stateTransition(V.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send final response.")});return}break;case V.Completed:return;case V.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(V.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 V.Trying:r();break;case V.Proceeding:this.state!==V.Trying&&r();break;case V.Completed:this.state!==V.Trying&&this.state!==V.Proceeding&&r();break;case V.Terminated:this.state!==V.Proceeding&&this.state!==V.Completed&&(t||r());break;default:r()}e===V.Completed&&(this.J=setTimeout(()=>this.timerJ(),yt.TIMER_J)),e===V.Terminated&&this.dispose(),this.setState(e)}timerJ(){this.logger.debug(`Timer J expired for NON-INVITE server transaction ${this.id}.`),this.state===V.Completed&&this.stateTransition(V.Terminated)}},Ir=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:_o(),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 gn(`${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 gn(`${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 gn(`${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 gn(`${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 gn(`${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 jt)return this.transaction.state===V.Proceeding||this.transaction.state===V.Accepted;if(this.transaction instanceof Jt)return this.transaction.state===V.Trying||this.transaction.state===V.Proceeding;throw new Error("Unknown transaction type.")}get progressable(){if(this.transaction instanceof jt)return this.transaction.state===V.Proceeding;if(this.transaction instanceof Jt)return!1;throw new Error("Unknown transaction type.")}get redirectable(){if(this.transaction instanceof jt)return this.transaction.state===V.Proceeding;if(this.transaction instanceof Jt)return this.transaction.state===V.Trying||this.transaction.state===V.Proceeding;throw new Error("Unknown transaction type.")}get rejectable(){if(this.transaction instanceof jt)return this.transaction.state===V.Proceeding;if(this.transaction instanceof Jt)return this.transaction.state===V.Trying||this.transaction.state===V.Proceeding;throw new Error("Unknown transaction type.")}get tryingable(){if(this.transaction instanceof jt)return this.transaction.state===V.Proceeding;if(this.transaction instanceof Jt)return this.transaction.state===V.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=Pf(this.message,e);return this.transaction.receiveResponse(e.statusCode,t.message),t}init(){const e={loggerFactory:this.loggerFactory,onStateChange:n=>{n===V.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)}},M0=class extends Ir{constructor(e,t,r){super(Jt,e.userAgentCore,t,r)}},N0=class extends Gt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ve.INFO,r);super(Wt,e.userAgentCore,n,t)}},q0=class extends Ir{constructor(e,t,r){super(Jt,e.userAgentCore,t,r)}},Mf=class extends Gt{constructor(e,t,r){super(Wt,e,t,r)}},Nf=class extends Ir{constructor(e,t,r){super(Jt,e,t,r)}},B0=class extends Gt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ve.NOTIFY,r);super(Wt,e.userAgentCore,n,t)}};function L0(e){return e.userAgentCore!==void 0}var To=class extends Ir{constructor(e,t,r){const n=L0(e)?e.userAgentCore:e;super(Jt,n,t,r)}},F0=class extends Gt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ve.PRACK,r);super(Wt,e.userAgentCore,n,t),e.signalingStateTransition(n)}},V0=class extends Ir{constructor(e,t,r){super(Jt,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)}},j0=class extends Gt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ve.INVITE,r);super(yn,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}`)}}},U0=class extends Ir{constructor(e,t,r){super(jt,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)}},z0=class extends Gt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ve.REFER,r);super(Wt,e.userAgentCore,n,t)}};function K0(e){return e.userAgentCore!==void 0}var qf=class extends Ir{constructor(e,t,r){const n=K0(e)?e.userAgentCore:e;super(Jt,n,t,r)}},Eo=class extends Ss{constructor(e,t,r,n){super(t,r),this.initialTransaction=e,this._signalingState=pe.Initial,this.ackWait=!1,this.ackProcessing=!1,this.delegate=n,e instanceof jt&&(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=pe.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?cr.Early:this.ackWait?cr.AckWait:this._signalingState===pe.Closed?cr.Terminated:cr.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 yn))throw new Error("Transaction not instance of InviteClientTransaction.");t=this.reinviteUserAgentClient.transaction,this.reinviteUserAgentClient=void 0}else{if(!(this.initialTransaction instanceof yn))throw new Error("Initial transaction not instance of InviteClientTransaction.");t=this.initialTransaction}const r=this.createOutgoingRequestMessage(ve.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 jt){if(this.early)throw new Error("UAS MUST NOT send a BYE on early dialogs.");if(this.ackWait&&this.initialTransaction.state!==V.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 H0(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 N0(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 j0(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(ve.MESSAGE,t);return new Mf(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 B0(this,e,t)}prack(e,t){return this.logger.log(`INVITE dialog ${this.id} sending PRACK request`),new F0(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 z0(this,e,t)}receiveRequest(e){if(this.logger.log(`INVITE dialog ${this.id} received ${e.method} request`),e.method===ve.ACK){if(this.ackWait){if(this.initialTransaction instanceof yn){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===ve.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!==pe.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===ve.INVITE){const t=e.parseHeader("contact");if(!t)throw new Error("Contact undefined.");if(!(t instanceof lr))throw new Error("Contact not instance of NameAddrHeader.");this.dialogState.remoteTarget=t.uri}switch(e.method){case ve.BYE:{const t=new M0(this,e);this.delegate&&this.delegate.onBye?this.delegate.onBye(t):t.accept(),this.dispose()}break;case ve.INFO:{const t=new q0(this,e);this.delegate&&this.delegate.onInfo?this.delegate.onInfo(t):t.reject({statusCode:469,extraHeaders:["Recv-Info:"]})}break;case ve.INVITE:{const t=new U0(this,e);this.signalingStateTransition(e),this.delegate&&this.delegate.onInvite?this.delegate.onInvite(t):t.reject({statusCode:488})}break;case ve.MESSAGE:{const t=new Nf(this.core,e);this.delegate&&this.delegate.onMessage?this.delegate.onMessage(t):t.accept()}break;case ve.NOTIFY:{const t=new To(this,e);this.delegate&&this.delegate.onNotify?this.delegate.onNotify(t):t.accept()}break;case ve.PRACK:{const t=new V0(this,e);this.delegate&&this.delegate.onPrack?this.delegate.onPrack(t):t.accept()}break;case ve.REFER:{const t=new qf(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===pe.HaveLocalOffer||this.signalingState===pe.HaveRemoteOffer)&&this._rollbackOffer&&this._rollbackAnswer&&(this._signalingState=pe.Stable,this._offer=this._rollbackOffer,this._answer=this._rollbackAnswer)}signalingStateTransition(e){const t=pi(e);if(!(!t||t.contentDisposition!=="session")){if(this._signalingState===pe.Stable&&(this._rollbackOffer=this._offer,this._rollbackAnswer=this._answer),e instanceof bs)switch(this._signalingState){case pe.Initial:case pe.Stable:this._signalingState=pe.HaveRemoteOffer,this._offer=t,this._answer=void 0;break;case pe.HaveLocalOffer:this._signalingState=pe.Stable,this._answer=t;break;case pe.HaveRemoteOffer:break;case pe.Closed:break;default:throw new Error("Unexpected signaling state.")}if(e instanceof hn)switch(this._signalingState){case pe.Initial:case pe.Stable:this._signalingState=pe.HaveRemoteOffer,this._offer=t,this._answer=void 0;break;case pe.HaveLocalOffer:this._signalingState=pe.Stable,this._answer=t;break;case pe.HaveRemoteOffer:break;case pe.Closed:break;default:throw new Error("Unexpected signaling state.")}if(e instanceof wl)switch(this._signalingState){case pe.Initial:case pe.Stable:this._signalingState=pe.HaveLocalOffer,this._offer=t,this._answer=void 0;break;case pe.HaveLocalOffer:break;case pe.HaveRemoteOffer:this._signalingState=pe.Stable,this._answer=t;break;case pe.Closed:break;default:throw new Error("Unexpected signaling state.")}if(If(e))switch(this._signalingState){case pe.Initial:case pe.Stable:this._signalingState=pe.HaveLocalOffer,this._offer=t,this._answer=void 0;break;case pe.HaveLocalOffer:break;case pe.HaveRemoteOffer:this._signalingState=pe.Stable,this._answer=t;break;case pe.Closed:break;default:throw new Error("Unexpected signaling state.")}}}start2xxRetransmissionTimer(){if(this.initialTransaction instanceof jt){const e=this.initialTransaction;let t=yt.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,yt.T2),this.invite2xxTimer=setTimeout(r,t)};this.invite2xxTimer=setTimeout(r,t);const n=()=>{e.state===V.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 jt){const e=this.reinviteUserAgentServer.transaction;let t=yt.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,yt.T2),this.invite2xxTimer=setTimeout(r,t)};this.invite2xxTimer=setTimeout(r,t);const n=()=>{e.state===V.Terminated&&(e.removeStateChangeListener(n),this.invite2xxTimer&&(clearTimeout(this.invite2xxTimer),this.invite2xxTimer=void 0),this.reinviteUserAgentServer)};e.addStateChangeListener(n)}}},W0=class extends Gt{constructor(e,t,r){super(yn,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===V.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=Ss.initialDialogStateForUserAgentClient(this.message,e);let n=this.earlyDialogs.get(r.id);if(!n){const i=this.transaction;if(!(i instanceof yn))throw new Error("Transaction not instance of InviteClientTransaction.");n=new Eo(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===pe.Initial||n.signalingState===pe.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=Ss.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 yn))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 yn))throw new Error("Transaction not instance of InviteClientTransaction.");n=new Eo(i,this.core,r),this.confirmedDialogs.set(n.id,n)}(n.signalingState===pe.Initial||n.signalingState===pe.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.`)}},xl=class extends Ir{constructor(e,t,r){super(jt,e,t,r),this.core=e}dispose(){this.earlyDialog&&this.earlyDialog.dispose(),super.dispose()}accept(e={statusCode:200}){if(!this.acceptable)throw new gn(`${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 jt))throw new Error("Transaction not instance of InviteClientTransaction.");const l=Ss.initialDialogStateForUserAgentServer(this.message,this.toTag);this.confirmedDialog=new Eo(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: "+vn.toString();if(!e.body){if(this.confirmedDialog.signalingState===pe.Stable)e.body=this.confirmedDialog.answer;else if(this.confirmedDialog.signalingState===pe.Initial||this.confirmedDialog.signalingState===pe.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!==pe.Stable&&this.confirmedDialog.signalingStateTransition(e.body),o}progress(e={statusCode:180}){if(!this.progressable)throw new gn(`${this.message.method} not progressable in state ${this.transaction.state}.`);if(!this.earlyDialog){const o=this.transaction;if(!(o instanceof jt))throw new Error("Transaction not instance of InviteClientTransaction.");const a=Ss.initialDialogStateForUserAgentServer(this.message,this.toTag,!0);this.earlyDialog=new Eo(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!==pe.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)}},G0=class extends Gt{constructor(e,t,r){super(Wt,e,t,r)}},J0=class extends Gt{constructor(e,t,r){super(Wt,e,t,r)}},Y0=class extends Ir{constructor(e,t,r){super(Jt,e,t,r),this.core=e}},Z0=class extends Gt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ve.SUBSCRIBE,r);super(Wt,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)}},Bf=class extends Ss{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 lr))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===ve.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: "+vn.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!==Ue.Pending&&this.subscriptionState!==Ue.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 Z0(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(),yt.TIMER_N)),n}terminate(){this.stateTransition(Ue.Terminated),this.onTerminated()}unsubscribe(){const e="Allow: "+vn.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(Ue.Pending,s);break;case"active":this.stateTransition(Ue.Active,s);break;case"terminated":this.stateTransition(Ue.Terminated,s);break;default:this.logger.warn("Unrecognized subscription state.");break}const i=new To(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 Ue.Initial:r();return;case Ue.NotifyWait:r();return;case Ue.Pending:if(this.subscriptionState!==Ue.NotifyWait&&this.subscriptionState!==Ue.Pending){r();return}break;case Ue.Active:if(this.subscriptionState!==Ue.NotifyWait&&this.subscriptionState!==Ue.Pending&&this.subscriptionState!==Ue.Active){r();return}break;case Ue.Terminated:if(this.subscriptionState!==Ue.NotifyWait&&this.subscriptionState!==Ue.Pending&&this.subscriptionState!==Ue.Active){r();return}break;default:r();return}e===Ue.Pending&&t&&(this.subscriptionExpires=t),e===Ue.Active&&t&&(this.subscriptionExpires=t),e===Ue.Terminated&&this.dispose(),this._subscriptionState=e}timerN(){this.logger.warn("Timer N expired for SUBSCRIBE dialog. Timed out waiting for NOTIFY."),this.subscriptionState!==Ue.Terminated&&(this.stateTransition(Ue.Terminated),this.onTerminated())}},X0=class extends Gt{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(Wt,e,t,r),this.delegate=r,this.subscriberId=t.callId+t.fromTag+n,this.subscriptionExpiresRequested=this.subscriptionExpires=Number(s),this.subscriptionEvent=n,this.subscriptionState=Ue.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=Ue.Pending;break;case"active":this.subscriptionState=Ue.Active;break;case"terminated":this.subscriptionState=Ue.Terminated;break;default:throw new Error(`Unrecognized state ${n}.`)}if(this.subscriptionState!==Ue.Terminated){const s=Bf.initialDialogStateForSubscription(this.message,e.message);this.dialog=new Bf(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(),yt.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()}},Q0=class extends Ir{constructor(e,t,r){super(Jt,e,t,r),this.core=e}},Lf=["application/sdp","application/dtmf-relay"],ew=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 W0(this,e,t)}message(e,t){return new Mf(this,e,t)}publish(e,t){return new G0(this,e,t)}register(e,t){return new J0(this,e,t)}subscribe(e,t){return new X0(this,e,t)}request(e,t){return new Gt(Wt,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===ve.REGISTER&&d.push("path","gruu"),e===ve.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 wl(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=Pf(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===ve.ACK&&r&&r.transaction.state===V.Accepted&&r instanceof xl){this.logger.warn(`Discarding out of dialog ACK after 2xx response sent on transaction ${t}.`);return}if(e.method===ve.CANCEL){r?(this.replyStateless(e,{statusCode:200}),r.transaction instanceof jt&&r.transaction.state===V.Proceeding&&r instanceof xl&&r.receiveCancel(e)):this.replyStateless(e,{statusCode:481});return}if(r){r.transaction.receiveRequest(e);return}this.receiveRequest(e)}receiveRequest(e){if(!vn.includes(e.method)){const n="Allow: "+vn.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!==ve.ACK&&this.replyStateless(e,{statusCode:404});return}if(e.method===ve.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===ve.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 To(this,e);i.onNotify(o);return}}const t=e.callId+e.toTag+e.fromTag,r=this.dialogs.get(t);if(r){if(e.method===ve.OPTIONS){const n="Allow: "+vn.toString(),s="Accept: "+Lf.toString();this.replyStateless(e,{statusCode:200,extraHeaders:[n,s]});return}r.receiveRequest(e);return}e.method!==ve.ACK&&this.replyStateless(e,{statusCode:481})}receiveOutsideDialogRequest(e){switch(e.method){case ve.ACK:break;case ve.BYE:this.replyStateless(e,{statusCode:481});break;case ve.CANCEL:throw new Error(`Unexpected out of dialog request method ${e.method}.`);case ve.INFO:this.replyStateless(e,{statusCode:405});break;case ve.INVITE:{const t=new xl(this,e);this.delegate.onInvite?this.delegate.onInvite(t):t.reject()}break;case ve.MESSAGE:{const t=new Nf(this,e);this.delegate.onMessage?this.delegate.onMessage(t):t.accept()}break;case ve.NOTIFY:{const t=new To(this,e);this.delegate.onNotify?this.delegate.onNotify(t):t.reject({statusCode:405})}break;case ve.OPTIONS:{const t="Allow: "+vn.toString(),r="Accept: "+Lf.toString();this.replyStateless(e,{statusCode:200,extraHeaders:[t,r]})}break;case ve.REFER:{const t=new qf(this,e);this.delegate.onRefer?this.delegate.onRefer(t):t.reject({statusCode:405})}break;case ve.REGISTER:{const t=new Y0(this,e);this.delegate.onRegister?this.delegate.onRegister(t):t.reject({statusCode:405})}break;case ve.SUBSCRIBE:{const t=new Q0(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 tw(){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 rw(){return{bundlePolicy:"balanced",certificates:void 0,iceCandidatePoolSize:0,iceServers:[{urls:"stun:stun.l.google.com:19302"}],iceTransportPolicy:"all",rtcpMuxPolicy:"require"}}var nw=class $n{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),$n.dispatchRemoveTrackEvent(n,d)),n.addTrack(l),$n.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),$n.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),$n.dispatchRemoveTrackEvent(r,n)}),r.addTrack(t),$n.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),$n.dispatchRemoveTrackEvent(r,n)}),r.addTrack(t),$n.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 U.Calling:r();break;case U.Proceeding:this.state!==U.Calling&&r();break;case U.Accepted:case U.Completed:this.state!==U.Calling&&this.state!==U.Proceeding&&r();break;case U.Terminated:this.state!==U.Calling&&this.state!==U.Accepted&&this.state!==U.Completed&&(t||r());break;default:r()}this.B&&(clearTimeout(this.B),this.B=void 0),U.Proceeding,e===U.Completed&&(this.D=setTimeout(()=>this.timerD(),yt.TIMER_D)),e===U.Accepted&&(this.M=setTimeout(()=>this.timerM(),yt.TIMER_M)),e===U.Terminated&&this.dispose(),this.setState(e)}timerA(){}timerB(){this.logger.debug(`Timer B expired for INVITE client transaction ${this.id}.`),this.state===U.Calling&&(this.onRequestTimeout(),this.stateTransition(U.Terminated))}timerD(){this.logger.debug(`Timer D expired for INVITE client transaction ${this.id}.`),this.state===U.Completed&&this.stateTransition(U.Terminated)}timerM(){this.logger.debug(`Timer M expired for INVITE client transaction ${this.id}.`),this.state===U.Accepted&&this.stateTransition(U.Terminated)}},Gt=class kc{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(ve.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===U.Proceeding?new kc(Wt,this.core,n):this.transaction.addStateChangeListener(()=>{this.transaction&&this.transaction.state===U.Proceeding&&new kc(Wt,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 hn;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 hn;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===U.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)}},H0=class extends Gt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ve.BYE,r);super(Wt,e.userAgentCore,n,t),e.dispose()}},Jt=class extends Of{constructor(e,t,r){super(e,t,r,U.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 U.Trying:break;case U.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 U.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 U.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 U.Trying:if(this.lastResponse=t,e>=100&&e<200){this.stateTransition(U.Proceeding),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send provisional response.")});return}if(e>=200&&e<=699){this.stateTransition(U.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send final response.")});return}break;case U.Proceeding:if(this.lastResponse=t,e>=200&&e<=699){this.stateTransition(U.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send final response.")});return}break;case U.Completed:return;case U.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(U.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 U.Trying:r();break;case U.Proceeding:this.state!==U.Trying&&r();break;case U.Completed:this.state!==U.Trying&&this.state!==U.Proceeding&&r();break;case U.Terminated:this.state!==U.Proceeding&&this.state!==U.Completed&&(t||r());break;default:r()}e===U.Completed&&(this.J=setTimeout(()=>this.timerJ(),yt.TIMER_J)),e===U.Terminated&&this.dispose(),this.setState(e)}timerJ(){this.logger.debug(`Timer J expired for NON-INVITE server transaction ${this.id}.`),this.state===U.Completed&&this.stateTransition(U.Terminated)}},Ir=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:_o(),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 gn(`${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 gn(`${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 gn(`${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 gn(`${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 gn(`${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 jt)return this.transaction.state===U.Proceeding||this.transaction.state===U.Accepted;if(this.transaction instanceof Jt)return this.transaction.state===U.Trying||this.transaction.state===U.Proceeding;throw new Error("Unknown transaction type.")}get progressable(){if(this.transaction instanceof jt)return this.transaction.state===U.Proceeding;if(this.transaction instanceof Jt)return!1;throw new Error("Unknown transaction type.")}get redirectable(){if(this.transaction instanceof jt)return this.transaction.state===U.Proceeding;if(this.transaction instanceof Jt)return this.transaction.state===U.Trying||this.transaction.state===U.Proceeding;throw new Error("Unknown transaction type.")}get rejectable(){if(this.transaction instanceof jt)return this.transaction.state===U.Proceeding;if(this.transaction instanceof Jt)return this.transaction.state===U.Trying||this.transaction.state===U.Proceeding;throw new Error("Unknown transaction type.")}get tryingable(){if(this.transaction instanceof jt)return this.transaction.state===U.Proceeding;if(this.transaction instanceof Jt)return this.transaction.state===U.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=Pf(this.message,e);return this.transaction.receiveResponse(e.statusCode,t.message),t}init(){const e={loggerFactory:this.loggerFactory,onStateChange:n=>{n===U.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)}},M0=class extends Ir{constructor(e,t,r){super(Jt,e.userAgentCore,t,r)}},N0=class extends Gt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ve.INFO,r);super(Wt,e.userAgentCore,n,t)}},q0=class extends Ir{constructor(e,t,r){super(Jt,e.userAgentCore,t,r)}},Mf=class extends Gt{constructor(e,t,r){super(Wt,e,t,r)}},Nf=class extends Ir{constructor(e,t,r){super(Jt,e,t,r)}},B0=class extends Gt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ve.NOTIFY,r);super(Wt,e.userAgentCore,n,t)}};function L0(e){return e.userAgentCore!==void 0}var To=class extends Ir{constructor(e,t,r){const n=L0(e)?e.userAgentCore:e;super(Jt,n,t,r)}},F0=class extends Gt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ve.PRACK,r);super(Wt,e.userAgentCore,n,t),e.signalingStateTransition(n)}},V0=class extends Ir{constructor(e,t,r){super(Jt,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)}},j0=class extends Gt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ve.INVITE,r);super(yn,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}`)}}},U0=class extends Ir{constructor(e,t,r){super(jt,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)}},z0=class extends Gt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ve.REFER,r);super(Wt,e.userAgentCore,n,t)}};function K0(e){return e.userAgentCore!==void 0}var qf=class extends Ir{constructor(e,t,r){const n=K0(e)?e.userAgentCore:e;super(Jt,n,t,r)}},Eo=class extends Cs{constructor(e,t,r,n){super(t,r),this.initialTransaction=e,this._signalingState=pe.Initial,this.ackWait=!1,this.ackProcessing=!1,this.delegate=n,e instanceof jt&&(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=pe.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?cr.Early:this.ackWait?cr.AckWait:this._signalingState===pe.Closed?cr.Terminated:cr.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 yn))throw new Error("Transaction not instance of InviteClientTransaction.");t=this.reinviteUserAgentClient.transaction,this.reinviteUserAgentClient=void 0}else{if(!(this.initialTransaction instanceof yn))throw new Error("Initial transaction not instance of InviteClientTransaction.");t=this.initialTransaction}const r=this.createOutgoingRequestMessage(ve.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 jt){if(this.early)throw new Error("UAS MUST NOT send a BYE on early dialogs.");if(this.ackWait&&this.initialTransaction.state!==U.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 H0(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 N0(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 j0(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(ve.MESSAGE,t);return new Mf(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 B0(this,e,t)}prack(e,t){return this.logger.log(`INVITE dialog ${this.id} sending PRACK request`),new F0(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 z0(this,e,t)}receiveRequest(e){if(this.logger.log(`INVITE dialog ${this.id} received ${e.method} request`),e.method===ve.ACK){if(this.ackWait){if(this.initialTransaction instanceof yn){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===ve.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!==pe.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===ve.INVITE){const t=e.parseHeader("contact");if(!t)throw new Error("Contact undefined.");if(!(t instanceof lr))throw new Error("Contact not instance of NameAddrHeader.");this.dialogState.remoteTarget=t.uri}switch(e.method){case ve.BYE:{const t=new M0(this,e);this.delegate&&this.delegate.onBye?this.delegate.onBye(t):t.accept(),this.dispose()}break;case ve.INFO:{const t=new q0(this,e);this.delegate&&this.delegate.onInfo?this.delegate.onInfo(t):t.reject({statusCode:469,extraHeaders:["Recv-Info:"]})}break;case ve.INVITE:{const t=new U0(this,e);this.signalingStateTransition(e),this.delegate&&this.delegate.onInvite?this.delegate.onInvite(t):t.reject({statusCode:488})}break;case ve.MESSAGE:{const t=new Nf(this.core,e);this.delegate&&this.delegate.onMessage?this.delegate.onMessage(t):t.accept()}break;case ve.NOTIFY:{const t=new To(this,e);this.delegate&&this.delegate.onNotify?this.delegate.onNotify(t):t.accept()}break;case ve.PRACK:{const t=new V0(this,e);this.delegate&&this.delegate.onPrack?this.delegate.onPrack(t):t.accept()}break;case ve.REFER:{const t=new qf(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===pe.HaveLocalOffer||this.signalingState===pe.HaveRemoteOffer)&&this._rollbackOffer&&this._rollbackAnswer&&(this._signalingState=pe.Stable,this._offer=this._rollbackOffer,this._answer=this._rollbackAnswer)}signalingStateTransition(e){const t=hi(e);if(!(!t||t.contentDisposition!=="session")){if(this._signalingState===pe.Stable&&(this._rollbackOffer=this._offer,this._rollbackAnswer=this._answer),e instanceof _s)switch(this._signalingState){case pe.Initial:case pe.Stable:this._signalingState=pe.HaveRemoteOffer,this._offer=t,this._answer=void 0;break;case pe.HaveLocalOffer:this._signalingState=pe.Stable,this._answer=t;break;case pe.HaveRemoteOffer:break;case pe.Closed:break;default:throw new Error("Unexpected signaling state.")}if(e instanceof hn)switch(this._signalingState){case pe.Initial:case pe.Stable:this._signalingState=pe.HaveRemoteOffer,this._offer=t,this._answer=void 0;break;case pe.HaveLocalOffer:this._signalingState=pe.Stable,this._answer=t;break;case pe.HaveRemoteOffer:break;case pe.Closed:break;default:throw new Error("Unexpected signaling state.")}if(e instanceof wl)switch(this._signalingState){case pe.Initial:case pe.Stable:this._signalingState=pe.HaveLocalOffer,this._offer=t,this._answer=void 0;break;case pe.HaveLocalOffer:break;case pe.HaveRemoteOffer:this._signalingState=pe.Stable,this._answer=t;break;case pe.Closed:break;default:throw new Error("Unexpected signaling state.")}if(If(e))switch(this._signalingState){case pe.Initial:case pe.Stable:this._signalingState=pe.HaveLocalOffer,this._offer=t,this._answer=void 0;break;case pe.HaveLocalOffer:break;case pe.HaveRemoteOffer:this._signalingState=pe.Stable,this._answer=t;break;case pe.Closed:break;default:throw new Error("Unexpected signaling state.")}}}start2xxRetransmissionTimer(){if(this.initialTransaction instanceof jt){const e=this.initialTransaction;let t=yt.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,yt.T2),this.invite2xxTimer=setTimeout(r,t)};this.invite2xxTimer=setTimeout(r,t);const n=()=>{e.state===U.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 jt){const e=this.reinviteUserAgentServer.transaction;let t=yt.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,yt.T2),this.invite2xxTimer=setTimeout(r,t)};this.invite2xxTimer=setTimeout(r,t);const n=()=>{e.state===U.Terminated&&(e.removeStateChangeListener(n),this.invite2xxTimer&&(clearTimeout(this.invite2xxTimer),this.invite2xxTimer=void 0),this.reinviteUserAgentServer)};e.addStateChangeListener(n)}}},W0=class extends Gt{constructor(e,t,r){super(yn,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===U.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=Cs.initialDialogStateForUserAgentClient(this.message,e);let n=this.earlyDialogs.get(r.id);if(!n){const i=this.transaction;if(!(i instanceof yn))throw new Error("Transaction not instance of InviteClientTransaction.");n=new Eo(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===pe.Initial||n.signalingState===pe.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=Cs.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 yn))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 yn))throw new Error("Transaction not instance of InviteClientTransaction.");n=new Eo(i,this.core,r),this.confirmedDialogs.set(n.id,n)}(n.signalingState===pe.Initial||n.signalingState===pe.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.`)}},xl=class extends Ir{constructor(e,t,r){super(jt,e,t,r),this.core=e}dispose(){this.earlyDialog&&this.earlyDialog.dispose(),super.dispose()}accept(e={statusCode:200}){if(!this.acceptable)throw new gn(`${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 jt))throw new Error("Transaction not instance of InviteClientTransaction.");const l=Cs.initialDialogStateForUserAgentServer(this.message,this.toTag);this.confirmedDialog=new Eo(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: "+vn.toString();if(!e.body){if(this.confirmedDialog.signalingState===pe.Stable)e.body=this.confirmedDialog.answer;else if(this.confirmedDialog.signalingState===pe.Initial||this.confirmedDialog.signalingState===pe.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!==pe.Stable&&this.confirmedDialog.signalingStateTransition(e.body),o}progress(e={statusCode:180}){if(!this.progressable)throw new gn(`${this.message.method} not progressable in state ${this.transaction.state}.`);if(!this.earlyDialog){const o=this.transaction;if(!(o instanceof jt))throw new Error("Transaction not instance of InviteClientTransaction.");const a=Cs.initialDialogStateForUserAgentServer(this.message,this.toTag,!0);this.earlyDialog=new Eo(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!==pe.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)}},G0=class extends Gt{constructor(e,t,r){super(Wt,e,t,r)}},J0=class extends Gt{constructor(e,t,r){super(Wt,e,t,r)}},Y0=class extends Ir{constructor(e,t,r){super(Jt,e,t,r),this.core=e}},Z0=class extends Gt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ve.SUBSCRIBE,r);super(Wt,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)}},Bf=class extends Cs{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 lr))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===ve.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: "+vn.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!==Ue.Pending&&this.subscriptionState!==Ue.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 Z0(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(),yt.TIMER_N)),n}terminate(){this.stateTransition(Ue.Terminated),this.onTerminated()}unsubscribe(){const e="Allow: "+vn.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(Ue.Pending,s);break;case"active":this.stateTransition(Ue.Active,s);break;case"terminated":this.stateTransition(Ue.Terminated,s);break;default:this.logger.warn("Unrecognized subscription state.");break}const i=new To(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 Ue.Initial:r();return;case Ue.NotifyWait:r();return;case Ue.Pending:if(this.subscriptionState!==Ue.NotifyWait&&this.subscriptionState!==Ue.Pending){r();return}break;case Ue.Active:if(this.subscriptionState!==Ue.NotifyWait&&this.subscriptionState!==Ue.Pending&&this.subscriptionState!==Ue.Active){r();return}break;case Ue.Terminated:if(this.subscriptionState!==Ue.NotifyWait&&this.subscriptionState!==Ue.Pending&&this.subscriptionState!==Ue.Active){r();return}break;default:r();return}e===Ue.Pending&&t&&(this.subscriptionExpires=t),e===Ue.Active&&t&&(this.subscriptionExpires=t),e===Ue.Terminated&&this.dispose(),this._subscriptionState=e}timerN(){this.logger.warn("Timer N expired for SUBSCRIBE dialog. Timed out waiting for NOTIFY."),this.subscriptionState!==Ue.Terminated&&(this.stateTransition(Ue.Terminated),this.onTerminated())}},X0=class extends Gt{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(Wt,e,t,r),this.delegate=r,this.subscriberId=t.callId+t.fromTag+n,this.subscriptionExpiresRequested=this.subscriptionExpires=Number(s),this.subscriptionEvent=n,this.subscriptionState=Ue.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=Ue.Pending;break;case"active":this.subscriptionState=Ue.Active;break;case"terminated":this.subscriptionState=Ue.Terminated;break;default:throw new Error(`Unrecognized state ${n}.`)}if(this.subscriptionState!==Ue.Terminated){const s=Bf.initialDialogStateForSubscription(this.message,e.message);this.dialog=new Bf(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(),yt.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()}},Q0=class extends Ir{constructor(e,t,r){super(Jt,e,t,r),this.core=e}},Lf=["application/sdp","application/dtmf-relay"],ew=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 W0(this,e,t)}message(e,t){return new Mf(this,e,t)}publish(e,t){return new G0(this,e,t)}register(e,t){return new J0(this,e,t)}subscribe(e,t){return new X0(this,e,t)}request(e,t){return new Gt(Wt,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===ve.REGISTER&&d.push("path","gruu"),e===ve.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 wl(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=Pf(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===ve.ACK&&r&&r.transaction.state===U.Accepted&&r instanceof xl){this.logger.warn(`Discarding out of dialog ACK after 2xx response sent on transaction ${t}.`);return}if(e.method===ve.CANCEL){r?(this.replyStateless(e,{statusCode:200}),r.transaction instanceof jt&&r.transaction.state===U.Proceeding&&r instanceof xl&&r.receiveCancel(e)):this.replyStateless(e,{statusCode:481});return}if(r){r.transaction.receiveRequest(e);return}this.receiveRequest(e)}receiveRequest(e){if(!vn.includes(e.method)){const n="Allow: "+vn.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!==ve.ACK&&this.replyStateless(e,{statusCode:404});return}if(e.method===ve.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===ve.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 To(this,e);i.onNotify(o);return}}const t=e.callId+e.toTag+e.fromTag,r=this.dialogs.get(t);if(r){if(e.method===ve.OPTIONS){const n="Allow: "+vn.toString(),s="Accept: "+Lf.toString();this.replyStateless(e,{statusCode:200,extraHeaders:[n,s]});return}r.receiveRequest(e);return}e.method!==ve.ACK&&this.replyStateless(e,{statusCode:481})}receiveOutsideDialogRequest(e){switch(e.method){case ve.ACK:break;case ve.BYE:this.replyStateless(e,{statusCode:481});break;case ve.CANCEL:throw new Error(`Unexpected out of dialog request method ${e.method}.`);case ve.INFO:this.replyStateless(e,{statusCode:405});break;case ve.INVITE:{const t=new xl(this,e);this.delegate.onInvite?this.delegate.onInvite(t):t.reject()}break;case ve.MESSAGE:{const t=new Nf(this,e);this.delegate.onMessage?this.delegate.onMessage(t):t.accept()}break;case ve.NOTIFY:{const t=new To(this,e);this.delegate.onNotify?this.delegate.onNotify(t):t.reject({statusCode:405})}break;case ve.OPTIONS:{const t="Allow: "+vn.toString(),r="Accept: "+Lf.toString();this.replyStateless(e,{statusCode:200,extraHeaders:[t,r]})}break;case ve.REFER:{const t=new qf(this,e);this.delegate.onRefer?this.delegate.onRefer(t):t.reject({statusCode:405})}break;case ve.REGISTER:{const t=new Y0(this,e);this.delegate.onRegister?this.delegate.onRegister(t):t.reject({statusCode:405})}break;case ve.SUBSCRIBE:{const t=new Q0(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 tw(){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 rw(){return{bundlePolicy:"balanced",certificates:void 0,iceCandidatePoolSize:0,iceServers:[{urls:"stun:stun.l.google.com:19302"}],iceTransportPolicy:"all",rtcpMuxPolicy:"require"}}var nw=class $n{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),$n.dispatchRemoveTrackEvent(n,d)),n.addTrack(l),$n.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),$n.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),$n.dispatchRemoveTrackEvent(r,n)}),r.addTrack(t),$n.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),$n.dispatchRemoveTrackEvent(r,n)}),r.addTrack(t),$n.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 sw(e){return(t,r)=>{e===void 0&&(e=tw());const n={iceGatheringTimeout:r?.iceGatheringTimeout!==void 0?r?.iceGatheringTimeout:5e3,peerConnectionConfiguration:Object.assign(Object.assign({},rw()),r?.peerConnectionConfiguration)};return new nw(t.userAgent.getLogger("sip.SessionDescriptionHandler"),e,n)}}var Ff=class sg{constructor(t,r){if(this._state=$e.Disconnected,this.transitioningState=!1,this._stateEventEmitter=new di,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({},sg.defaultOptions),r);const n=this.configuration.server,s=pt.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===$e.Connected}send(t){return this._send(t)}_connect(){switch(this.logger.log(`Connecting ${this.server}`),this.state){case $e.Connecting:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError($e.Connecting));if(!this.connectPromise)throw new Error("Connect promise must be defined.");return this.connectPromise;case $e.Connected:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError($e.Connecting));if(this.connectPromise)throw new Error("Connect promise must not be defined.");return Promise.resolve();case $e.Disconnecting:if(this.connectPromise)throw new Error("Connect promise must not be defined.");try{this.transitionState($e.Connecting)}catch(r){if(r instanceof ui)return Promise.reject(r);throw r}break;case $e.Disconnected:if(this.connectPromise)throw new Error("Connect promise must not be defined.");try{this.transitionState($e.Connecting)}catch(r){if(r instanceof ui)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($e.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 $e.Connecting:if(this.disconnectPromise)throw new Error("Disconnect promise must not be defined.");try{this.transitionState($e.Disconnecting)}catch(r){if(r instanceof ui)return Promise.reject(r);throw r}break;case $e.Connected:if(this.disconnectPromise)throw new Error("Disconnect promise must not be defined.");try{this.transitionState($e.Disconnecting)}catch(r){if(r instanceof ui)return Promise.reject(r);throw r}break;case $e.Disconnecting:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError($e.Disconnecting));if(!this.disconnectPromise)throw new Error("Disconnect promise must be defined.");return this.disconnectPromise;case $e.Disconnected:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError($e.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 sw(e){return(t,r)=>{e===void 0&&(e=tw());const n={iceGatheringTimeout:r?.iceGatheringTimeout!==void 0?r?.iceGatheringTimeout:5e3,peerConnectionConfiguration:Object.assign(Object.assign({},rw()),r?.peerConnectionConfiguration)};return new nw(t.userAgent.getLogger("sip.SessionDescriptionHandler"),e,n)}}var Ff=class sg{constructor(t,r){if(this._state=$e.Disconnected,this.transitioningState=!1,this._stateEventEmitter=new fi,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({},sg.defaultOptions),r);const n=this.configuration.server,s=pt.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===$e.Connected}send(t){return this._send(t)}_connect(){switch(this.logger.log(`Connecting ${this.server}`),this.state){case $e.Connecting:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError($e.Connecting));if(!this.connectPromise)throw new Error("Connect promise must be defined.");return this.connectPromise;case $e.Connected:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError($e.Connecting));if(this.connectPromise)throw new Error("Connect promise must not be defined.");return Promise.resolve();case $e.Disconnecting:if(this.connectPromise)throw new Error("Connect promise must not be defined.");try{this.transitionState($e.Connecting)}catch(r){if(r instanceof di)return Promise.reject(r);throw r}break;case $e.Disconnected:if(this.connectPromise)throw new Error("Connect promise must not be defined.");try{this.transitionState($e.Connecting)}catch(r){if(r instanceof di)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($e.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 $e.Connecting:if(this.disconnectPromise)throw new Error("Disconnect promise must not be defined.");try{this.transitionState($e.Disconnecting)}catch(r){if(r instanceof di)return Promise.reject(r);throw r}break;case $e.Connected:if(this.disconnectPromise)throw new Error("Disconnect promise must not be defined.");try{this.transitionState($e.Disconnecting)}catch(r){if(r instanceof di)return Promise.reject(r);throw r}break;case $e.Disconnecting:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError($e.Disconnecting));if(!this.disconnectPromise)throw new Error("Disconnect promise must be defined.");return this.disconnectPromise;case $e.Disconnected:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError($e.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!==$e.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($e.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!==$e.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===$e.Connecting&&(this.logger.log(`WebSocket opened ${this.server}`),this.transitionState($e.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 ui("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 $e.Connecting:t!==$e.Connected&&t!==$e.Disconnecting&&t!==$e.Disconnected&&n();break;case $e.Connected:t!==$e.Disconnecting&&t!==$e.Disconnected&&n();break;case $e.Disconnecting:t!==$e.Connecting&&t!==$e.Disconnected&&n();break;case $e.Disconnected:t!==$e.Connecting&&n();break;default:throw new Error("Unknown state.")}const s=this._state;this._state=t;const i=this.connectResolve,o=this.connectReject;s===$e.Connecting&&(this.connectPromise=void 0,this.connectResolve=void 0,this.connectReject=void 0);const a=this.disconnectResolve,l=this.disconnectReject;if(s===$e.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===$e.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===$e.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===$e.Connecting){if(!i)throw new Error("Connect resolve undefined.");if(!o)throw new Error("Connect reject undefined.");t===$e.Connected?i():o(r||new Error("Connect aborted."))}if(s===$e.Disconnecting){if(!a)throw new Error("Disconnect resolve undefined.");if(!l)throw new Error("Disconnect reject undefined.");t===$e.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!==$e.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===$e.Connecting&&(this.logger.log(`WebSocket opened ${this.server}`),this.transitionState($e.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 di("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 $e.Connecting:t!==$e.Connected&&t!==$e.Disconnecting&&t!==$e.Disconnected&&n();break;case $e.Connected:t!==$e.Disconnecting&&t!==$e.Disconnected&&n();break;case $e.Disconnecting:t!==$e.Connecting&&t!==$e.Disconnected&&n();break;case $e.Disconnected:t!==$e.Connecting&&n();break;default:throw new Error("Unknown state.")}const s=this._state;this._state=t;const i=this.connectResolve,o=this.connectReject;s===$e.Connecting&&(this.connectPromise=void 0,this.connectResolve=void 0,this.connectReject=void 0);const a=this.disconnectResolve,l=this.disconnectReject;if(s===$e.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===$e.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===$e.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===$e.Connecting){if(!i)throw new Error("Connect resolve undefined.");if(!o)throw new Error("Connect reject undefined.");t===$e.Connected?i():o(r||new Error("Connect aborted."))}if(s===$e.Disconnecting){if(!a)throw new Error("Disconnect resolve undefined.");if(!l)throw new Error("Disconnect reject undefined.");t===$e.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}};Ff.defaultOptions={server:"",connectionTimeout:5,keepAliveInterval:0,keepAliveDebounce:10,traceSip:!0};var bn=class ia{constructor(t={}){if(this._publishers={},this._registerers={},this._sessions={},this._subscriptions={},this._state=xt.Stopped,this._stateEventEmitter=new di,this.delegate=t.delegate,this.options=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},ia.defaultOptions()),{sipjsId:Un(5)}),{uri:new pn("sip","anonymous."+Un(6),"anonymous.invalid")}),{viaHost:Un(12)+".invalid"}),ia.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 O0,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=bt.error;break;case"warn":this.loggerFactory.level=bt.warn;break;case"log":this.loggerFactory.level=bt.log;break;case"debug":this.loggerFactory.level=bt.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:ia.newUUID(),pt.parse(this._instanceId,"uuid")===-1)throw new Error("Invalid instanceId.");this._userAgentCore=this.initCore()}static makeURI(t){return pt.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:sw(),sessionDescriptionHandlerFactoryOptions:{},sipExtension100rel:yr.Unsupported,sipExtensionReplaces:yr.Unsupported,sipExtensionExtraSupported:[],sipjsId:"",transportConstructor:Ff,transportOptions:{},uri:new pn("sip","anonymous","anonymous.invalid"),userAgentString:"SIP.js/"+_0,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===xt.Stopped?Promise.reject(new Error("User agent stopped.")):Promise.resolve().then(()=>this.transport.connect())}start(){return this.state===xt.Started?(this.logger.warn("User agent already started"),Promise.resolve()):(this.logger.log(`Starting ${this.configuration.uri}`),this.transitionState(xt.Started),this.transport.connect())}async stop(){if(this.state===xt.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(xt.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(xt.Stopped)}_makeInviter(t,r){return new Co(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:Un(8),r=this.options.contactParams;return{pubGruu:void 0,tempGruu:void 0,uri:new pn("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===yr.Supported&&t.push("100rel"),this.options.sipExtensionReplaces===yr.Supported&&t.push("replaces"),this.options.sipExtensionExtraSupported&&t.push(...this.options.sipExtensionExtraSupported),this.options.hackAllowUnregisteredOptionTags||(t=t.filter(n=>P0[n])),t=Array.from(new Set(t));const r=t.slice();return(this.contact.pubGruu||this.contact.tempGruu)&&r.push("gruu"),new ew({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 D0(this.getLoggerFactory(),i,n,s)},transportAccessor:()=>this.transport},{onInvite:n=>{var s;const i=new _s(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!==yr.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 Rf(n);this.delegate.onMessage(s)}else n.accept()},onNotify:n=>{if(this.delegate&&this.delegate.onNotify){const s=new bl(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!==xt.Stopped&&this.delegate&&this.delegate.onConnect&&this.delegate.onConnect()}onTransportDisconnect(t){this.state!==xt.Stopped&&(this.delegate&&this.delegate.onDisconnect&&this.delegate.onDisconnect(t),t&&this.options.reconnectionAttempts>0&&this.attemptReconnection())}onTransportMessage(t){const r=xo.parseMessage(t,this.getLogger("sip.Parser"));if(!r){this.logger.warn("Failed to parse incoming message. Dropping.");return}if(this.state===xt.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=fi(r.body),i=r.getHeader("content-length");if(i&&s<Number(i)){this.userAgentCore.replyStateless(r,{statusCode:400});return}}if(r instanceof hn){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=fi(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 hn){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 xt.Started:t!==xt.Stopped&&n();break;case xt.Stopped:t!==xt.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)}},_t=new window.AudioContext,iw={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]},hi=U(null),gi=U(null),vi=U(.5);const Vf=()=>({playDtmf:(o,a=150)=>{_t.state==="suspended"&&_t.resume();const l=iw[o.toUpperCase()];if(!l)return;const u=_t.createOscillator(),c=_t.createOscillator(),d=_t.createGain();u.frequency.value=l[0],c.frequency.value=l[1],u.type="sine",c.type="sine",d.gain.value=.1*vi.value,u.connect(d),c.connect(d),d.connect(_t.destination),u.start(),c.start(),setTimeout(()=>{u.stop(),c.stop(),u.disconnect(),c.disconnect(),d.disconnect()},a)},startRingtone:()=>{if(hi.value)return;_t.state==="suspended"&&_t.resume();const o=()=>{const a=_t.currentTime,l=_t.createOscillator(),u=_t.createGain();l.type="sine",l.frequency.setValueAtTime(523.25,a),l.frequency.setValueAtTime(659.25,a+.1),l.frequency.setValueAtTime(783.99,a+.2),u.gain.setValueAtTime(.1*vi.value,a),u.gain.exponentialRampToValueAtTime(.001,a+.5),l.connect(u),u.connect(_t.destination),l.start(a),l.stop(a+.5)};o(),hi.value=window.setInterval(()=>{o(),setTimeout(o,400)},3e3)},stopRingtone:()=>{hi.value&&(clearInterval(hi.value),hi.value=null)},startRingback:()=>{if(gi.value)return;_t.state==="suspended"&&_t.resume();const o=()=>{const a=_t.currentTime,l=_t.createOscillator(),u=_t.createGain();l.type="sine",l.frequency.value=425,u.gain.setValueAtTime(.1*vi.value,a),u.gain.linearRampToValueAtTime(.1*vi.value,a+1),u.gain.linearRampToValueAtTime(0,a+1.1),l.connect(u),u.connect(_t.destination),l.start(a),l.stop(a+1.1)};o(),gi.value=window.setInterval(()=>{o()},4e3)},stopRingback:()=>{gi.value&&(clearInterval(gi.value),gi.value=null)},setNotificationVolume:o=>{vi.value=Math.max(0,Math.min(1,o/100))}});function jf(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=jf(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Uf(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=jf(e))&&(n&&(n+=" "),n+=t);return n}var ow=(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},aw=(e,t)=>({classGroupId:e,validator:t}),zf=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Ao="-",Kf=[],lw="arbitrary..",cw=e=>{const t=dw(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return uw(o);const a=o.split(Ao);return Wf(a,a[0]===""&&a.length>1?1:0,t)},getConflictingClassGroupIds:(o,a)=>{if(a){const l=n[o],u=r[o];return l?u?ow(u,l):l:u||Kf}return r[o]||Kf}}},Wf=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const n=e[t],s=r.nextPart.get(n);if(s){const l=Wf(e,t+1,s);if(l)return l}const i=r.validators;if(i===null)return;const o=t===0?e.join(Ao):e.slice(t).join(Ao),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?lw+n:void 0})(),dw=e=>{const{theme:t,classGroups:r}=e;return fw(r,t)},fw=(e,t)=>{const r=zf();for(const n in e){const s=e[n];Tl(s,r,n,t)}return r},Tl=(e,t,r,n)=>{const s=e.length;for(let i=0;i<s;i++){const o=e[i];pw(o,t,r,n)}},pw=(e,t,r,n)=>{if(typeof e=="string"){hw(e,t,r);return}if(typeof e=="function"){gw(e,t,r,n);return}vw(e,t,r,n)},hw=(e,t,r)=>{const n=e===""?t:Gf(t,e);n.classGroupId=r},gw=(e,t,r,n)=>{if(mw(e)){Tl(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(aw(r,e))},vw=(e,t,r,n)=>{const s=Object.entries(e),i=s.length;for(let o=0;o<i;o++){const[a,l]=s[o];Tl(l,Gf(t,a),r,n)}},Gf=(e,t)=>{let r=e;const n=t.split(Ao),s=n.length;for(let i=0;i<s;i++){const o=n[i];let a=r.nextPart.get(o);a||(a=zf(),r.nextPart.set(o,a)),r=a}return r},mw=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,ww=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)}}},El="!",Jf=":",yw=[],Yf=(e,t,r,n,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:s}),bw=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 y=0;y<c;y++){const T=s[y];if(o===0&&a===0){if(T===Jf){i.push(s.slice(l,y)),l=y+1;continue}if(T==="/"){u=y;continue}}T==="["?o++:T==="]"?o--:T==="("?a++:T===")"&&a--}const d=i.length===0?s:s.slice(l);let p=d,h=!1;d.endsWith(El)?(p=d.slice(0,-1),h=!0):d.startsWith(El)&&(p=d.slice(1),h=!0);const m=u&&u>l?u-l:void 0;return Yf(i,h,p,m)};if(t){const s=t+Jf,i=n;n=o=>o.startsWith(s)?i(o.slice(s.length)):Yf(yw,!1,o,void 0,!0)}if(r){const s=n;n=i=>r({className:i,parseClassName:s})}return n},_w=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}},Sw=e=>({cache:ww(e.cacheSize),parseClassName:bw(e),sortModifiers:_w(e),...cw(e)}),Cw=/\s+/,xw=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:i}=t,o=[],a=e.trim().split(Cw);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:y}=r(c);if(d){l=c+(l.length>0?" "+l:l);continue}let T=!!y,v=n(T?m.substring(0,y):m);if(!v){if(!T){l=c+(l.length>0?" "+l:l);continue}if(v=n(m),!v){l=c+(l.length>0?" "+l:l);continue}T=!1}const x=p.length===0?"":p.length===1?p[0]:i(p).join(":"),b=h?x+El:x,_=b+v;if(o.indexOf(_)>-1)continue;o.push(_);const C=s(v,T);for(let k=0;k<C.length;++k){const O=C[k];o.push(b+O)}l=c+(l.length>0?" "+l:l)}return l},Tw=(...e)=>{let t=0,r,n,s="";for(;t<e.length;)(r=e[t++])&&(n=Zf(r))&&(s&&(s+=" "),s+=n);return s},Zf=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Zf(e[n]))&&(r&&(r+=" "),r+=t);return r},Ew=(e,...t)=>{let r,n,s,i;const o=l=>(r=Sw(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=xw(l,r);return s(l,c),c};return i=o,(...l)=>i(Tw(...l))},Aw=[],ht=e=>{const t=r=>r[e]||Aw;return t.isThemeGetter=!0,t},Xf=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Qf=/^\((?:(\w[\w-]*):)?(.+)\)$/i,kw=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Iw=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Rw=/\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$/,$w=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Pw=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Dw=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_n=e=>kw.test(e),De=e=>!!e&&!Number.isNaN(Number(e)),Sn=e=>!!e&&Number.isInteger(Number(e)),Al=e=>e.endsWith("%")&&De(e.slice(0,-1)),Yr=e=>Iw.test(e),ep=()=>!0,Ow=e=>Rw.test(e)&&!$w.test(e),kl=()=>!1,Hw=e=>Pw.test(e),Mw=e=>Dw.test(e),Nw=e=>!be(e)&&!_e(e),qw=e=>Cn(e,op,kl),be=e=>Xf.test(e),zn=e=>Cn(e,ap,Ow),tp=e=>Cn(e,Kw,De),Bw=e=>Cn(e,cp,ep),Lw=e=>Cn(e,lp,kl),rp=e=>Cn(e,sp,kl),Fw=e=>Cn(e,ip,Mw),ko=e=>Cn(e,up,Hw),_e=e=>Qf.test(e),mi=e=>Kn(e,ap),Vw=e=>Kn(e,lp),np=e=>Kn(e,sp),jw=e=>Kn(e,op),Uw=e=>Kn(e,ip),Io=e=>Kn(e,up,!0),zw=e=>Kn(e,cp,!0),Cn=(e,t,r)=>{const n=Xf.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Kn=(e,t,r=!1)=>{const n=Qf.exec(e);return n?n[1]?t(n[1]):r:!1},sp=e=>e==="position"||e==="percentage",ip=e=>e==="image"||e==="url",op=e=>e==="length"||e==="size"||e==="bg-size",ap=e=>e==="length",Kw=e=>e==="number",lp=e=>e==="family-name",cp=e=>e==="number"||e==="weight",up=e=>e==="shadow",Ww=()=>{const e=ht("color"),t=ht("font"),r=ht("text"),n=ht("font-weight"),s=ht("tracking"),i=ht("leading"),o=ht("breakpoint"),a=ht("container"),l=ht("spacing"),u=ht("radius"),c=ht("shadow"),d=ht("inset-shadow"),p=ht("text-shadow"),h=ht("drop-shadow"),m=ht("blur"),y=ht("perspective"),T=ht("aspect"),v=ht("ease"),x=ht("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],_=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[..._(),_e,be],k=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],g=()=>[_e,be,l],B=()=>[_n,"full","auto",...g()],N=()=>[Sn,"none","subgrid",_e,be],S=()=>["auto",{span:["full",Sn,_e,be]},Sn,_e,be],w=()=>[Sn,"auto",_e,be],E=()=>["auto","min","max","fr",_e,be],q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...g()],X=()=>[_n,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...g()],Y=()=>[_n,"screen","full","dvw","lvw","svw","min","max","fit",...g()],le=()=>[_n,"screen","full","lh","dvh","lvh","svh","min","max","fit",...g()],K=()=>[e,_e,be],ae=()=>[..._(),np,rp,{position:[_e,be]}],fe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Ce=()=>["auto","cover","contain",jw,qw,{size:[_e,be]}],Oe=()=>[Al,mi,zn],Te=()=>["","none","full",u,_e,be],ke=()=>["",De,mi,zn],Ze=()=>["solid","dashed","dotted","double"],ut=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ve=()=>[De,Al,np,rp],Qe=()=>["","none",m,_e,be],dt=()=>["none",De,_e,be],gt=()=>["none",De,_e,be],A=()=>[De,_e,be],$=()=>[_n,"full",...g()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Yr],breakpoint:[Yr],color:[ep],container:[Yr],"drop-shadow":[Yr],ease:["in","out","in-out"],font:[Nw],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Yr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Yr],shadow:[Yr],spacing:["px",De],text:[Yr],"text-shadow":[Yr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",_n,be,_e,T]}],container:["container"],columns:[{columns:[De,be,_e,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:C()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],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:[Sn,"auto",_e,be]}],basis:[{basis:[_n,"full","auto",a,...g()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[De,_n,"auto","initial","none",be]}],grow:[{grow:["",De,_e,be]}],shrink:[{shrink:["",De,_e,be]}],order:[{order:[Sn,"first","last","none",_e,be]}],"grid-cols":[{"grid-cols":N()}],"col-start-end":[{col:S()}],"col-start":[{"col-start":w()}],"col-end":[{"col-end":w()}],"grid-rows":[{"grid-rows":N()}],"row-start-end":[{row:S()}],"row-start":[{"row-start":w()}],"row-end":[{"row-end":w()}],"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:[...q(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...q()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":q()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],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:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mbs:[{mbs:z()}],mbe:[{mbe:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":g()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":g()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],"inline-size":[{inline:["auto",...Y()]}],"min-inline-size":[{"min-inline":["auto",...Y()]}],"max-inline-size":[{"max-inline":["none",...Y()]}],"block-size":[{block:["auto",...le()]}],"min-block-size":[{"min-block":["auto",...le()]}],"max-block-size":[{"max-block":["none",...le()]}],w:[{w:[a,"screen",...X()]}],"min-w":[{"min-w":[a,"screen","none",...X()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",r,mi,zn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,zw,Bw]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Al,be]}],"font-family":[{font:[Vw,Lw,t]}],"font-features":[{"font-features":[be]}],"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,_e,be]}],"line-clamp":[{"line-clamp":[De,"none",_e,tp]}],leading:[{leading:[i,...g()]}],"list-image":[{"list-image":["none",_e,be]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",_e,be]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:K()}],"text-color":[{text:K()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ze(),"wavy"]}],"text-decoration-thickness":[{decoration:[De,"from-font","auto",_e,zn]}],"text-decoration-color":[{decoration:K()}],"underline-offset":[{"underline-offset":[De,"auto",_e,be]}],"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",_e,be]}],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",_e,be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ae()}],"bg-repeat":[{bg:fe()}],"bg-size":[{bg:Ce()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Sn,_e,be],radial:["",_e,be],conic:[Sn,_e,be]},Uw,Fw]}],"bg-color":[{bg:K()}],"gradient-from-pos":[{from:Oe()}],"gradient-via-pos":[{via:Oe()}],"gradient-to-pos":[{to:Oe()}],"gradient-from":[{from:K()}],"gradient-via":[{via:K()}],"gradient-to":[{to:K()}],rounded:[{rounded:Te()}],"rounded-s":[{"rounded-s":Te()}],"rounded-e":[{"rounded-e":Te()}],"rounded-t":[{"rounded-t":Te()}],"rounded-r":[{"rounded-r":Te()}],"rounded-b":[{"rounded-b":Te()}],"rounded-l":[{"rounded-l":Te()}],"rounded-ss":[{"rounded-ss":Te()}],"rounded-se":[{"rounded-se":Te()}],"rounded-ee":[{"rounded-ee":Te()}],"rounded-es":[{"rounded-es":Te()}],"rounded-tl":[{"rounded-tl":Te()}],"rounded-tr":[{"rounded-tr":Te()}],"rounded-br":[{"rounded-br":Te()}],"rounded-bl":[{"rounded-bl":Te()}],"border-w":[{border:ke()}],"border-w-x":[{"border-x":ke()}],"border-w-y":[{"border-y":ke()}],"border-w-s":[{"border-s":ke()}],"border-w-e":[{"border-e":ke()}],"border-w-bs":[{"border-bs":ke()}],"border-w-be":[{"border-be":ke()}],"border-w-t":[{"border-t":ke()}],"border-w-r":[{"border-r":ke()}],"border-w-b":[{"border-b":ke()}],"border-w-l":[{"border-l":ke()}],"divide-x":[{"divide-x":ke()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ke()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ze(),"hidden","none"]}],"divide-style":[{divide:[...Ze(),"hidden","none"]}],"border-color":[{border:K()}],"border-color-x":[{"border-x":K()}],"border-color-y":[{"border-y":K()}],"border-color-s":[{"border-s":K()}],"border-color-e":[{"border-e":K()}],"border-color-bs":[{"border-bs":K()}],"border-color-be":[{"border-be":K()}],"border-color-t":[{"border-t":K()}],"border-color-r":[{"border-r":K()}],"border-color-b":[{"border-b":K()}],"border-color-l":[{"border-l":K()}],"divide-color":[{divide:K()}],"outline-style":[{outline:[...Ze(),"none","hidden"]}],"outline-offset":[{"outline-offset":[De,_e,be]}],"outline-w":[{outline:["",De,mi,zn]}],"outline-color":[{outline:K()}],shadow:[{shadow:["","none",c,Io,ko]}],"shadow-color":[{shadow:K()}],"inset-shadow":[{"inset-shadow":["none",d,Io,ko]}],"inset-shadow-color":[{"inset-shadow":K()}],"ring-w":[{ring:ke()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:K()}],"ring-offset-w":[{"ring-offset":[De,zn]}],"ring-offset-color":[{"ring-offset":K()}],"inset-ring-w":[{"inset-ring":ke()}],"inset-ring-color":[{"inset-ring":K()}],"text-shadow":[{"text-shadow":["none",p,Io,ko]}],"text-shadow-color":[{"text-shadow":K()}],opacity:[{opacity:[De,_e,be]}],"mix-blend":[{"mix-blend":[...ut(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ut()}],"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":[De]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ve()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ve()}],"mask-image-linear-from-color":[{"mask-linear-from":K()}],"mask-image-linear-to-color":[{"mask-linear-to":K()}],"mask-image-t-from-pos":[{"mask-t-from":Ve()}],"mask-image-t-to-pos":[{"mask-t-to":Ve()}],"mask-image-t-from-color":[{"mask-t-from":K()}],"mask-image-t-to-color":[{"mask-t-to":K()}],"mask-image-r-from-pos":[{"mask-r-from":Ve()}],"mask-image-r-to-pos":[{"mask-r-to":Ve()}],"mask-image-r-from-color":[{"mask-r-from":K()}],"mask-image-r-to-color":[{"mask-r-to":K()}],"mask-image-b-from-pos":[{"mask-b-from":Ve()}],"mask-image-b-to-pos":[{"mask-b-to":Ve()}],"mask-image-b-from-color":[{"mask-b-from":K()}],"mask-image-b-to-color":[{"mask-b-to":K()}],"mask-image-l-from-pos":[{"mask-l-from":Ve()}],"mask-image-l-to-pos":[{"mask-l-to":Ve()}],"mask-image-l-from-color":[{"mask-l-from":K()}],"mask-image-l-to-color":[{"mask-l-to":K()}],"mask-image-x-from-pos":[{"mask-x-from":Ve()}],"mask-image-x-to-pos":[{"mask-x-to":Ve()}],"mask-image-x-from-color":[{"mask-x-from":K()}],"mask-image-x-to-color":[{"mask-x-to":K()}],"mask-image-y-from-pos":[{"mask-y-from":Ve()}],"mask-image-y-to-pos":[{"mask-y-to":Ve()}],"mask-image-y-from-color":[{"mask-y-from":K()}],"mask-image-y-to-color":[{"mask-y-to":K()}],"mask-image-radial":[{"mask-radial":[_e,be]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ve()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ve()}],"mask-image-radial-from-color":[{"mask-radial-from":K()}],"mask-image-radial-to-color":[{"mask-radial-to":K()}],"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":_()}],"mask-image-conic-pos":[{"mask-conic":[De]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ve()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ve()}],"mask-image-conic-from-color":[{"mask-conic-from":K()}],"mask-image-conic-to-color":[{"mask-conic-to":K()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ae()}],"mask-repeat":[{mask:fe()}],"mask-size":[{mask:Ce()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",_e,be]}],filter:[{filter:["","none",_e,be]}],blur:[{blur:Qe()}],brightness:[{brightness:[De,_e,be]}],contrast:[{contrast:[De,_e,be]}],"drop-shadow":[{"drop-shadow":["","none",h,Io,ko]}],"drop-shadow-color":[{"drop-shadow":K()}],grayscale:[{grayscale:["",De,_e,be]}],"hue-rotate":[{"hue-rotate":[De,_e,be]}],invert:[{invert:["",De,_e,be]}],saturate:[{saturate:[De,_e,be]}],sepia:[{sepia:["",De,_e,be]}],"backdrop-filter":[{"backdrop-filter":["","none",_e,be]}],"backdrop-blur":[{"backdrop-blur":Qe()}],"backdrop-brightness":[{"backdrop-brightness":[De,_e,be]}],"backdrop-contrast":[{"backdrop-contrast":[De,_e,be]}],"backdrop-grayscale":[{"backdrop-grayscale":["",De,_e,be]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[De,_e,be]}],"backdrop-invert":[{"backdrop-invert":["",De,_e,be]}],"backdrop-opacity":[{"backdrop-opacity":[De,_e,be]}],"backdrop-saturate":[{"backdrop-saturate":[De,_e,be]}],"backdrop-sepia":[{"backdrop-sepia":["",De,_e,be]}],"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",_e,be]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[De,"initial",_e,be]}],ease:[{ease:["linear","initial",v,_e,be]}],delay:[{delay:[De,_e,be]}],animate:[{animate:["none",x,_e,be]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,_e,be]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:dt()}],"rotate-x":[{"rotate-x":dt()}],"rotate-y":[{"rotate-y":dt()}],"rotate-z":[{"rotate-z":dt()}],scale:[{scale:gt()}],"scale-x":[{"scale-x":gt()}],"scale-y":[{"scale-y":gt()}],"scale-z":[{"scale-z":gt()}],"scale-3d":["scale-3d"],skew:[{skew:A()}],"skew-x":[{"skew-x":A()}],"skew-y":[{"skew-y":A()}],transform:[{transform:[_e,be,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:$()}],"translate-x":[{"translate-x":$()}],"translate-y":[{"translate-y":$()}],"translate-z":[{"translate-z":$()}],"translate-none":["translate-none"],accent:[{accent:K()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:K()}],"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",_e,be]}],"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",_e,be]}],fill:[{fill:["none",...K()]}],"stroke-w":[{stroke:[De,mi,zn,tp]}],stroke:[{stroke:["none",...K()]}],"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"]}},Gw=Ew(Ww);const st=(...e)=>Gw(Uf(e)),wi=e=>e.length<=3?e:`${e.slice(0,3)}${"*".repeat(e.length-3)}`,dp=(e,t)=>{if(e){const r=Il(e);if(r&&fp(r))return r;if(e.trim())return e.trim()}if(t){const r=Il(t);if(r&&fp(r))return r;const n=Jw(t);if(n)return n;if(t.trim()&&!t.includes("@"))return t.trim()}return"Unknown"};var Il=e=>e.replace(/[^\d+*#]/g,""),fp=e=>/^\+?[\d*#]{2,}$/.test(e),Jw=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]?Il(t[1]):null)},Yw="X-Nebula-Queue",Zw="X-Nebula-Queue-Id";const lx=30,Xw=(e,t={})=>{const r=nt(null),n=nt(null),s=nt(new Map),i=new Audio;i.autoplay=!0;const o=nt(void 0),a=nt(null),l=nt(null),u=new Map,c=new Map,d=new Set;let p=!1,h=null,m=null,y=null,T=null,v=null;const x=j(()=>r.value?.configuration.uri?.user||""),{startRingtone:b,stopRingtone:_,startRingback:C,stopRingback:k,setNotificationVolume:O}=Vf(),g=I=>I instanceof Co||I instanceof _s?I.request?.callId||I.dialog?.callId||I.id||crypto.randomUUID():I.dialog?.callId||I.id||crypto.randomUUID(),B=I=>{if(!(I instanceof _s))return;const F=I.request;if(!F)return;const M=F.getHeader(Yw)?.trim(),D=F.getHeader(Zw)?.trim();if(!(!M&&!D))return{...D?{id:D}:{},...M?{name:M}:{}}},N=(I,F,M,D)=>{const L=B(I),Z={channelId:F,sipCallId:g(I),direction:M,remoteNumber:D,...L?{queue:L}:{}};return u.set(F,Z),t.onCallContext?.(Z),Z},S=(I,F)=>{const M=u.get(I);M&&t.onCallState?.({...M,state:F,timestamp:Date.now()})},w=(I,F)=>{if(I.state!==G.Established)return;const M=u.get(F),D=I.sessionDescriptionHandler,L=D?.localMediaStream??l.value,Z=D?.remoteMediaStream??a.value,me=L?.getAudioTracks()??[],Ie=Z?.getAudioTracks()??[];if(!M||!L||!Z||me.length===0||Ie.length===0)return;const Me=[M.sipCallId,...me.map(Ge=>`local:${Ge.id}`),...Ie.map(Ge=>`remote:${Ge.id}`)].join("|");c.get(F)!==Me&&(c.set(F,Me),t.onMediaReady?.({...M,localStream:L,remoteStream:Z}))},E=I=>{u.delete(I),c.delete(I),d.delete(I)},q=()=>{e.channels.value.some(I=>I.status==="incoming")?b():_(),e.activeChannel.value?.status==="calling"?C():k()},Q=I=>{i.volume=I/100},z=async I=>{typeof i.setSinkId=="function"&&await i.setSinkId(I)},X=I=>{o.value=I},Y=(I,F)=>{let M=!1;const D=I.sessionDescriptionHandler;return D?.peerConnection&&D.peerConnection.getSenders().forEach(L=>{L.track&&L.track.kind==="audio"&&(L.track.enabled=F,M=!0)}),M},le=I=>{let F=!1;return l.value&&l.value.getAudioTracks().forEach(M=>{M.enabled=I,F=!0}),F},K=(I,F)=>{const M=!(F?.isHeld||F?.isMuted),D=Y(I,M),L=le(M);!D&&!L&&console.warn("[SipJs] No audio tracks found to apply channel audio state")},ae=I=>{for(const[F,M]of s.value.entries())if(M===I)return e.channels.value.find(D=>D.id===F)||null;return e.activeChannel.value||null},fe=async I=>{const F=I.sessionDescriptionHandler?.peerConnection;if(!F)return;const M=ae(I),D=!(M?.isHeld||M?.isMuted),L=F.getSenders().find(Z=>Z.track?.kind==="audio");if(L?.track){L.track.enabled=D,M&&w(I,M.id);return}try{const[Z]=(await navigator.mediaDevices.getUserMedia(Ce(!1))).getAudioTracks();if(!Z)return;Z.enabled=D;const me=new MediaStream([Z]);l.value=me;const Ie=F.getSenders().find(Me=>Me.track===null);Ie?await Ie.replaceTrack(Z):F.addTrack(Z,me),K(I,M),M&&w(I,M.id)}catch(Z){console.warn("[SipJs] Failed to recover outbound audio track:",Z)}},Ce=(I=!1)=>{const F={echoCancellation:{ideal:!0},noiseSuppression:{ideal:!1},autoGainControl:{ideal:!1},channelCount:1};return o.value&&(F.deviceId={exact:o.value}),{audio:F,video:I}},Oe=async()=>{const I=n.value;I&&await I.register({requestDelegate:{onAccept:()=>{e.setConnected(!0)},onReject:()=>{e.setConnected(!1)}}})},Te=async I=>{if(!r.value){try{(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(F=>F.stop())}catch(F){console.error("Microphone permission denied",F);return}try{const F=bn.makeURI(I.uri);if(!F)throw new Error("Invalid URI");p=I.earlyMedia??!1,r.value=new bn({uri:F,logLevel:"error",transportOptions:{server:I.transportOptions.server,keepAliveInterval:I.transportOptions.keepAliveInterval??30},authorizationUsername:I.authorizationUsername,authorizationPassword:I.authorizationPassword,reconnectionDelay:5,reconnectionAttempts:3,delegate:{onConnect:()=>{},onDisconnect:()=>e.setConnected(!1),onInvite:M=>Ve(M)}}),await r.value.start(),n.value=new Sl(r.value),await Oe(),ke()}catch{}}},ke=()=>{y=new AbortController;const{signal:I}=y;let F=Date.now();const M=5e3,D=(Tt=1e3)=>{T&&clearTimeout(T),T=setTimeout(async()=>{T=null,await Ze()},Tt)},L=()=>{if(document.visibilityState==="visible"){const Tt=Date.now()-F;Tt>M?(console.log(`[SipJs] Device was suspended for ${Math.round(Tt/1e3)}s, reconnecting...`),D(1500)):D(500)}F=Date.now()},Z=()=>{console.log("[SipJs] Network online, reconnecting..."),D(1e3)},me=()=>{console.log("[SipJs] Network offline"),e.setConnected(!1),T&&(clearTimeout(T),T=null)},Ie=()=>{v=setInterval(()=>{const Tt=Date.now(),vt=Tt-F;vt>3e4&&(console.log(`[SipJs] Heartbeat drift detected (${Math.round(vt/1e3)}s), device may have woken from sleep`),D(1500)),F=Tt},1e3)},Me=()=>{console.log("[SipJs] Page frozen"),v&&(clearInterval(v),v=null)},Ge=()=>{console.log("[SipJs] Page resumed"),F=Date.now(),Ie(),D(1e3)};document.addEventListener("visibilitychange",L,{signal:I}),window.addEventListener("online",Z,{signal:I}),window.addEventListener("offline",me,{signal:I}),document.addEventListener("freeze",Me,{signal:I}),document.addEventListener("resume",Ge,{signal:I}),Ie()},Ze=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 Oe()}catch{}}catch(I){console.error("[SipJs] Reconnection failed:",I)}}},ut=async()=>{y?.abort(),y=null,T&&(clearTimeout(T),T=null),v&&(clearInterval(v),v=null);const I=n.value,F=r.value;if(n.value=null,r.value=null,I)try{await I.unregister()}catch(M){console.warn("[SipJs] Unregister failed:",M)}if(F)try{await F.stop()}catch(M){console.warn("[SipJs] UserAgent stop failed:",M)}},Ve=I=>{console.log("[SipJs] 📞 Llamada entrante recibida"),console.log("[SipJs] Remote Identity URI:",I.remoteIdentity.uri.toString()),console.log("[SipJs] Remote Identity URI user:",I.remoteIdentity.uri.user),console.log("[SipJs] Remote Identity displayName:",I.remoteIdentity.displayName);const F=e.channels.value.find(Z=>Z.status==="idle");if(!F){console.warn("[SipJs] ⚠️ No hay canales disponibles, rechazando llamada"),I.reject();return}const M=F.id;s.value.set(M,I);const D=I.body?I.body.includes("m=video"):!1,L=dp(I.remoteIdentity.uri.user,I.remoteIdentity.displayName);console.log("[SipJs] 📋 Caller number extraído:",L),console.log("[SipJs] 🎥 Video:",D?"Sí":"No"),e.updateChannelState(M,{status:"incoming",remoteNumber:L,remoteDisplayName:I.remoteIdentity.displayName||void 0,hasVideo:D}),N(I,M,"incoming",L),S(M,"ringing"),q(),e.setActiveChannelId(M),I.stateChange.addListener(Z=>{switch(Z){case G.Terminated:{const me=e.channels.value.find(Me=>Me.id===M),Ie=dp(I.remoteIdentity.uri.user,I.remoteIdentity.displayName);if(me?.status==="connected"){const Me=Math.floor((Date.now()-(me.startTime||Date.now()))/1e3);e.addCallLog({number:Ie,direction:"incoming",status:"answered",startTime:me.startTime||Date.now(),duration:Me})}else me?.status==="incoming"&&e.addCallLog({number:Ie,direction:"incoming",status:"missed",startTime:Date.now(),duration:0});S(M,d.has(M)?"ended":"failed"),E(M),e.updateChannelState(M,{status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,hasVideo:!1,hasEarlyMedia:!1}),s.value.delete(M),e.activeChannelId.value===M&&he(),q();break}case G.Established:d.add(M),e.updateChannelState(M,{status:"connected",startTime:Date.now()}),S(M,"connected"),e.activeChannelId.value===M&&(Se(I),fe(I).then(()=>w(I,M))),q();break}})},Qe=async(I,F=!1)=>{if(!r.value)return;const M=e.activeChannelId.value;if(s.value.has(M))return;let D=bn.makeURI(I);if(!D&&r.value.configuration.uri){const me=r.value.configuration.uri.host;D=bn.makeURI(`sip:${I}@${me}`)}if(!D)return;const L=new Co(r.value,D,{earlyMedia:p});s.value.set(M,L),N(L,M,"outgoing",I),S(M,"dialing"),e.updateChannelState(M,{status:"calling",remoteNumber:I,hasVideo:F}),e.setLastDialedNumber(I),q(),L.stateChange.addListener(me=>{switch(me){case G.Established:d.add(M),e.channels.value.find(Ie=>Ie.id===M)?.status!=="connected"&&(e.updateChannelState(M,{status:"connected",startTime:Date.now()}),S(M,"connected"),Se(L),fe(L).then(()=>w(L,M)),q());break;case G.Terminated:{const Ie=e.channels.value.find(Me=>Me.id===M);if(Ie?.status==="connected"){const Me=Math.floor((Date.now()-(Ie.startTime||Date.now()))/1e3);e.addCallLog({number:I,direction:"outgoing",status:"answered",startTime:Ie.startTime||Date.now(),duration:Me})}else e.addCallLog({number:I,direction:"outgoing",status:"cancelled",startTime:Date.now(),duration:0});S(M,d.has(M)?"ended":"failed"),E(M),e.updateChannelState(M,{status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1}),s.value.delete(M),e.activeChannelId.value===M&&he(),q();break}}});const Z={sessionDescriptionHandlerOptions:{constraints:Ce(F)},requestDelegate:{onProgress:me=>{(me.message.statusCode===180||me.message.statusCode===183)&&(me.message.body&&(e.updateChannelState(M,{hasEarlyMedia:!0}),Se(L)),q())},onAccept:me=>{e.channels.value.find(Ie=>Ie.id===M)?.status!=="connected"&&(d.add(M),e.updateChannelState(M,{status:"connected",startTime:Date.now()}),S(M,"connected"),Se(L),fe(L).then(()=>w(L,M)),q())}}};await L.invite(Z)},dt=async(I=!1)=>{const F=e.activeChannelId.value,M=s.value.get(F);if(M instanceof _s&&M.state===G.Initial){for(const[L,Z]of s.value.entries())if(L!==e.activeChannelId.value&&Z.state===G.Established&&!e.channels.value.find(me=>me.id===L)?.isHeld)try{await $(Z,!0),e.updateChannelState(L,{isHeld:!0})}catch(me){console.error(`[SipJs] Failed to hold channel ${L}:`,me)}const D={sessionDescriptionHandlerOptions:{constraints:Ce(I)}};e.updateChannelState(F,{status:"connected",startTime:Date.now()});try{await M.accept(D),await fe(M),q()}catch(L){const Z=s.value.get(F);throw Z instanceof _s&&Z.state===G.Initial&&e.updateChannelState(F,{status:"incoming",startTime:void 0}),L}}},gt=async()=>{const I=s.value.get(e.activeChannelId.value);if(I)switch(I.state){case G.Initial:case G.Establishing:I instanceof Co?await I.cancel():I instanceof _s&&await I.reject();break;case G.Established:await I.bye();break}},A=()=>{const I=s.value.get(e.activeChannelId.value);if(!I)return;const F=!e.isMuted.value;e.setMuted(F),K(I,e.channels.value.find(M=>M.id===e.activeChannelId.value))},$=async(I,F)=>{const M={sessionDescriptionHandlerOptions:{hold:F}};await I.invite(M)},J=async()=>{const I=s.value.get(e.activeChannelId.value);if(I?.state!==G.Established)return;const F=!e.isHeld.value;try{await $(I,F),e.setHeld(F),K(I,e.channels.value.find(M=>M.id===e.activeChannelId.value))}catch{}},oe=async I=>{const F=e.activeChannelId.value;if(F===I)return;const M=s.value.get(F),D=s.value.get(I),L=e.channels.value.find(me=>me.id===F),Z=e.channels.value.find(me=>me.id===I);if(M&&M.state===G.Established&&!L?.isHeld)try{await $(M,!0),e.updateChannelState(F,{isHeld:!0}),K(M,e.channels.value.find(me=>me.id===F))}catch{}if(e.setActiveChannelId(I),q(),D&&D.state===G.Established){if(Z?.isHeld)try{await $(D,!1),e.updateChannelState(I,{isHeld:!1})}catch{}K(D,e.channels.value.find(me=>me.id===I)),Se(D)}else he()},ne=I=>{if(!/^[0-9*#]$/.test(I))return;const F=s.value.get(e.activeChannelId.value);if(F?.state!==G.Established)return;const M=F.sessionDescriptionHandler?.peerConnection?.getSenders().find(L=>L.track?.kind==="audio")?.dtmf;if(M?.canInsertDTMF){M.insertDTMF(I,160,70);return}const D={requestOptions:{body:{content:`Signal=${I}\r
68
- Duration=160`,contentType:"application/dtmf-relay",contentDisposition:"signal"}}};F.info(D)},te=(I,F)=>{const M=e.channels.value.find(D=>D.id===I);!M||M.status!=="connected"||(Se(F),K(F,M),fe(F),i.play().catch(()=>{}))},de=async I=>{console.log("[SipJs] 🔄 transferCall iniciado"),console.log("[SipJs] Target:",I);const F=e.activeChannelId.value,M=s.value.get(F);if(!M)throw console.error("[SipJs] ❌ No hay sesión activa en el canal",F),new Error("No active session to transfer");if(console.log("[SipJs] Sesión encontrada - Estado:",M.state),console.log("[SipJs] Dialog ID:",M.dialog?.id),console.log("[SipJs] Call ID:",M.dialog?.callId),M.state!==G.Established)throw console.error("[SipJs] ❌ Sesión no establecida. Estado actual:",M.state),new Error(`Cannot transfer call. Call is not established (state: ${M.state})`);let D=bn.makeURI(I);if(!D&&r.value?.configuration.uri){const L=r.value.configuration.uri.host;console.log("[SipJs] Construyendo URI con dominio:",L),D=bn.makeURI(`sip:${I}@${L}`)}if(!D)throw console.error("[SipJs] ❌ URI de destino inválida:",I),new Error(`Invalid transfer target: ${I}`);console.log("[SipJs] 📤 URI de transferencia:",D.toString()),console.log("[SipJs] URI scheme:",D.scheme),console.log("[SipJs] URI user:",D.user),console.log("[SipJs] URI host:",D.host);try{console.log("[SipJs] 🚀 Enviando REFER..."),await M.refer(D,{requestDelegate:{onAccept:L=>{console.log("[SipJs] ✅ Transfer REFER aceptado por el servidor (202 Accepted)"),console.log("[SipJs] Response:",L.message)},onReject:L=>{const Z=L.message.statusCode;console.error("[SipJs] ❌ Transfer REFER rechazado:",Z),console.error("[SipJs] Response completo:",L.message),te(F,M)}},onNotify:L=>{console.log("[SipJs] 📬 NOTIFY recibido para transferencia"),console.log("[SipJs] NOTIFY request:",L.request),L.accept();const Z=L.request.body;if(console.log("[SipJs] NOTIFY body:",Z),Z){const me=Z.match(/SIP\/2\.0\s+(\d{3})(.*)/);if(me&&me[1]){const Ie=parseInt(me[1],10),Me=me[2]?.trim()||"";if(console.log("[SipJs] 📊 Status code:",Ie),console.log("[SipJs] 📊 Status text:",Me),Ie>=200&&Ie<300)console.log("[SipJs] ✅ Transferencia exitosa! Terminando sesión..."),setTimeout(()=>{M.bye().catch(Ge=>{console.warn("[SipJs] Error hanging up after successful transfer:",Ge)})},500);else if(Ie>=400){console.error("[SipJs] ❌ Transfer falló con status:",Ie,Me),console.log("[SipJs] 🔄 Manteniendo la sesión activa para el usuario");const Ge={404:"Número no encontrado",486:"Número ocupado",487:"Transferencia cancelada",503:"Servicio no disponible - el destino puede estar fuera de línea"}[Ie]||`Error en transferencia (código ${Ie})`;console.warn("[SipJs] 💬",Ge),te(F,M)}else Ie>=100&&Ie<200&&console.log("[SipJs] 📞 Transferencia en progreso:",Ie,Me)}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(L){throw console.error("[SipJs] ❌ Error en transferCall:",L),console.error("[SipJs] Error type:",L?.constructor?.name),console.error("[SipJs] Error message:",L instanceof Error?L.message:String(L)),console.error("[SipJs] Error stack:",L instanceof Error?L.stack:"N/A"),L}},ue=async I=>{console.log("[SipJs] 🔄 startAttendedTransfer iniciado"),console.log("[SipJs] Target:",I);const F=e.activeChannelId.value,M=s.value.get(F);if(console.log("[SipJs] Canal original:",F),console.log("[SipJs] Sesión original:",M?.state),!M||M.state!==G.Established)throw console.error("[SipJs] ❌ No hay llamada establecida para transferir"),new Error("No established call to transfer");const D=e.channels.value.find(L=>L.status==="idle");if(console.log("[SipJs] Canal de consulta encontrado:",D?.id),!D)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 $(M,!0),e.updateChannelState(F,{isHeld:!0}),console.log("[SipJs] ✅ Llamada original en hold")}catch(L){throw console.error("[SipJs] ❌ Failed to hold original call:",L),new Error("Failed to put call on hold")}console.log("[SipJs] 🔄 Cambiando al canal de consulta:",D.id),e.setActiveChannelId(D.id);try{console.log("[SipJs] 📞 Iniciando llamada de consulta a:",I),await Qe(I,!1),console.log("[SipJs] ✅ Llamada de consulta iniciada"),e.setTransferInProgress({originalChannelId:F,consultationChannelId:D.id,targetNumber:I}),console.log("[SipJs] 📋 Transferencia en progreso registrada")}catch(L){throw console.error("[SipJs] ❌ Failed to start consultation call:",L),console.log("[SipJs] 🔄 Volviendo al canal original y quitando hold..."),e.setActiveChannelId(F),await $(M,!1).catch(()=>{}),e.updateChannelState(F,{isHeld:!1}),new Error("Failed to initiate consultation call")}},ce=async()=>{console.log("[SipJs] 🔄 completeAttendedTransfer iniciado");const I=e.transferInProgress.value;if(!I)throw console.error("[SipJs] ❌ No hay transferencia en progreso"),new Error("No transfer in progress");console.log("[SipJs] Estado de transferencia:",I);const F=s.value.get(I.originalChannelId),M=s.value.get(I.consultationChannelId);if(console.log("[SipJs] Sesión original:",F?.state),console.log("[SipJs] Sesión de consulta:",M?.state),!F||!M)throw console.error("[SipJs] ❌ Falta una o ambas sesiones"),new Error("Missing session for transfer");if(M.state!==G.Established)throw console.error("[SipJs] ❌ Llamada de consulta no está establecida. Estado:",M.state),new Error("Consultation call not established");const D=M.dialog;if(!D)throw new Error("No dialog available for consultation session");const L=D.callId,Z=D.remoteTag,me=D.localTag;let Ie=bn.makeURI(I.targetNumber);if(!Ie&&r.value?.configuration.uri){const Ge=r.value.configuration.uri.host;Ie=bn.makeURI(`sip:${I.targetNumber}@${Ge}`)}if(!Ie)throw new Error("Invalid transfer target URI");const Me=`${encodeURIComponent(L)}%3Bto-tag%3D${encodeURIComponent(Z)}%3Bfrom-tag%3D${encodeURIComponent(me)}`;Ie.setHeader("Replaces",Me);try{await F.refer(Ie,{onNotify:Ge=>{Ge.accept();const Tt=Ge.request.body,vt=typeof Tt=="string"?Tt:Tt&&typeof Tt=="object"&&"content"in Tt?Tt.content:void 0;if(vt){const Kt=vt.match(/SIP\/2\.0\s+(\d+)/);if(Kt&&Kt[1]){const Xn=parseInt(Kt[1]);Xn>=200&&Xn<300?setTimeout(()=>{F.bye().catch(()=>{}),M.bye().catch(()=>{}),e.setTransferInProgress(null)},500):Xn>=400&&(console.error("[SipJs] Attended transfer failed with status:",Xn),e.setTransferInProgress(null))}}},requestDelegate:{onAccept:()=>{},onReject:Ge=>{console.error("[SipJs] Attended transfer REFER rejected:",Ge.message.statusCode),e.setTransferInProgress(null)}}})}catch(Ge){throw console.error("[SipJs] Attended transfer failed:",Ge),Ge}},ie=async()=>{const I=e.transferInProgress.value;if(!I)throw new Error("No transfer in progress");console.log("[SipJs] Canceling attended transfer...");const F=s.value.get(I.originalChannelId),M=s.value.get(I.consultationChannelId);if(M)try{await M.bye(),console.log("[SipJs] Consultation call ended")}catch(D){console.warn("[SipJs] Error ending consultation:",D)}if(F)try{e.setActiveChannelId(I.originalChannelId),await $(F,!1),e.updateChannelState(I.originalChannelId,{isHeld:!1}),console.log("[SipJs] Returned to original call")}catch(D){console.warn("[SipJs] Error resuming original call:",D)}e.setTransferInProgress(null)},Se=I=>{const F=I.sessionDescriptionHandler;if(!F){console.error("[SipJs] setupRemoteMedia: no sessionDescriptionHandler");return}const M=F.remoteMediaStream;if(!M){console.error("[SipJs] setupRemoteMedia: no remoteMediaStream on SDH");return}if(a.value===M)return;i.pause(),i.srcObject=null,h?.abort(),h=new AbortController,a.value=M,l.value=F.localMediaStream??null;const D=ae(I);K(I,D),D&&w(I,D.id);const L=me=>{m?.abort(),m=new AbortController;const{signal:Ie}=m,Me=()=>{i.play().catch(Ge=>{Ge.name!=="AbortError"&&console.error("[SipJs] play() failed:",Ge.name,Ge.message)})};me.addEventListener("unmute",()=>{Me()},{signal:Ie}),Me()};M.addEventListener("addtrack",me=>{me.track.kind==="audio"&&(i.srcObject=null,i.srcObject=M,L(me.track),D&&w(I,D.id))},{signal:h.signal});const[Z]=M.getTracks();Z&&(i.srcObject=M,L(Z),D&&w(I,D.id))},he=()=>{m?.abort(),m=null,h?.abort(),h=null,i.pause(),i.srcObject=null,a.value=null,l.value=null};return{initUserAgent:Te,stop:ut,makeCall:Qe,answerCall:dt,hangupCall:gt,toggleMute:A,toggleHold:J,sendDTMF:ne,transferCall:de,startAttendedTransfer:ue,completeAttendedTransfer:ce,cancelAttendedTransfer:ie,switchChannel:oe,extension:x,setVolume:Q,setNotificationVolume:O,setOutputDevice:z,setInputDevice:X,remoteStream:a,localStream:l}};var pp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e;const hp=Uf,Qw=(e,t)=>r=>{var n;if(t?.variants==null)return hp(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=pp(u)||pp(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 hp(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,y]=h;return Array.isArray(y)?y.includes({...i,...a}[m]):{...i,...a}[m]===y})?[...l,c,d]:l},[]),r?.class,r?.className)};function ey(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ty(e,t,r){ey(e,t),t.set(e,r)}function ry(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 Ro(e,t){return e.get(ry(e,t))}function gp(e){return typeof e=="string"?`'${e}'`:new ny().serialize(e)}var ny=(function(){var e=new WeakMap;class t{constructor(){ty(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=Ro(e,this).get(n);return s===void 0&&(Ro(e,this).set(n,`#${Ro(e,this).size}`),s=this.serializeObject(n),Ro(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 sy(e,t){return e===t||gp(e)===gp(t)}function yi(e,t=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY){return Math.min(r,Math.max(t,e))}function $t(e,t){const r=typeof e=="string"&&!t?`${e}Context`:t,n=Symbol(r);return[o=>{const a=Ht(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=>(Mn(n,o),o)]}function Yt(){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 Rl(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 $l(e){return e==null}function Pl(e){return e?e.flatMap(t=>t.type===Le?Pl(t.children):[t]):[]}var[$o,ux]=$t("ConfigProvider");function iy(e,t){var r;const n=nt();return rt(()=>{n.value=e()},{...t,flush:(r=t?.flush)!==null&&r!==void 0?r:"sync"}),kt(n)}function xn(e,t){return Di()?(fa(e,t),!0):!1}function oy(){const e=new Set,t=i=>{e.delete(i)};return{on:i=>{e.add(i);const o=()=>t(i);return xn(o),{off:o}},off:t,trigger:(...i)=>Promise.all(Array.from(e).map(o=>o(...i))),clear:()=>{e.clear()}}}function ay(e){let t=!1,r;const n=da(!0);return((...s)=>(t||(r=n.run(()=>e(...s)),t=!0),r))}var Pt=typeof window<"u"&&typeof document<"u",dx=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,ly=e=>typeof e<"u",cy=Object.prototype.toString,uy=e=>cy.call(e)==="[object Object]",Zr=()=>{},Dl=dy();function dy(){var e,t,r;return Pt&&!!(!((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 fy(...e){if(e.length!==1)return xa(...e);const t=e[0];return typeof t=="function"?kt(Vs(()=>({get:t,set:Zr}))):U(t)}function vp(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 mp=e=>e();function py(e,t={}){let r,n,s=Zr;const i=l=>{clearTimeout(l),s(),s=Zr};let o;return l=>{const u=xe(e),c=xe(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 hy(e=mp,t={}){const{initialState:r="active"}=t,n=fy(r==="active");function s(){n.value=!1}function i(){n.value=!0}return{isActive:kt(n),pause:s,resume:i,eventFilter:(...a)=>{n.value&&e(...a)}}}function Ol(e){return Array.isArray(e)?e:[e]}function wp(e){const t=Object.create(null);return(r=>t[r]||(t[r]=e(r)))}var gy=/\B([A-Z])/g,fx=wp(e=>e.replace(gy,"-$1").toLowerCase()),vy=/-(\w)/g,px=wp(e=>e.replace(vy,(t,r)=>r?r.toUpperCase():""));function yp(e){return e||at()}function my(e){if(!Pt)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=da(!0),r=n.run(()=>e(...i))),xn(s),r))}function wy(e){return qr(Je(e)?new Proxy({},{get(t,r,n){return f(Reflect.get(e.value,r,n))},set(t,r,n){return Je(e.value[r])&&!Je(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 yy(e){return wy(j(e))}function Ut(e,...t){const r=t.flat(),n=r[0];return yy(()=>Object.fromEntries(typeof n=="function"?Object.entries(It(e)).filter(([s,i])=>!n(xe(i),s)):Object.entries(It(e)).filter(s=>!r.includes(s[0]))))}function bp(e,t=1e4){return Vs((r,n)=>{let s=xe(e),i;const o=()=>setTimeout(()=>{s=xe(e),n()},xe(t));return xn(()=>{clearTimeout(i)}),{get(){return r(),s},set(a){s=a,n(),clearTimeout(i),i=o()}}})}function Hl(e,t=200,r={}){return vp(py(t,r),e)}function by(e,t,r={}){const{eventFilter:n=mp,...s}=r;return Re(e,vp(n,t),s)}function _y(e,t,r={}){const{eventFilter:n,initialState:s="active",...i}=r,{eventFilter:o,pause:a,resume:l,isActive:u}=hy(n,{initialState:s});return{stop:by(e,t,{...i,eventFilter:o}),pause:a,resume:l,isActive:u}}function Sy(e,t={}){if(!Je(e))return It(e);const r=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const n in e.value)r[n]=Vs(()=>({get(){return e.value[n]},set(s){var i;if(!((i=xe(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 Cy(e,t){yp(t)&&gs(e,t)}function xy(e,t=!0,r){yp(r)?We(e,r):t?e():wt(e)}function Ty(e,t=1e3,r={}){const{immediate:n=!0,immediateCallback:s=!1}=r;let i=null;const o=nt(!1);function a(){i&&(clearInterval(i),i=null)}function l(){o.value=!1,a()}function u(){const c=xe(t);c<=0||(o.value=!0,s&&e(),a(),o.value&&(i=setInterval(e,c)))}return n&&Pt&&u(),(Je(t)||typeof t=="function")&&xn(Re(t,()=>{o.value&&Pt&&u()})),xn(l),{isActive:Br(o),pause:l,resume:u}}function _p(e,t,r={}){const{immediate:n=!0,immediateCallback:s=!1}=r,i=nt(!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)},xe(t))}return n&&(i.value=!0,Pt&&u()),xn(l),{isPending:Br(i),start:u,stop:l}}function Ey(e,t,r){return Re(e,t,{...r,immediate:!0})}function Ay(e,t,r){return Re(e,t,{...r,once:!0})}var br=Pt?window:void 0,hx=Pt?window.document:void 0,gx=Pt?window.navigator:void 0,vx=Pt?window.location:void 0;function zt(e){var t;const r=xe(e);return(t=r?.$el)!==null&&t!==void 0?t:r}function qt(...e){const t=(n,s,i,o)=>(n.addEventListener(s,i,o),()=>n.removeEventListener(s,i,o)),r=j(()=>{const n=Ol(xe(e[0])).filter(s=>s!=null);return n.every(s=>typeof s!="string")?n:void 0});return Ey(()=>{var n,s;return[(n=(s=r.value)===null||s===void 0?void 0:s.map(i=>zt(i)))!==null&&n!==void 0?n:[br].filter(i=>i!=null),Ol(xe(r.value?e[1]:e[0])),Ol(f(r.value?e[2]:e[1])),xe(r.value?e[3]:e[2])]},([n,s,i,o],a,l)=>{if(!n?.length||!s?.length||!i?.length)return;const u=uy(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 Sp=!1;function ky(e,t,r={}){const{window:n=br,ignore:s=[],capture:i=!0,detectIframe:o=!1,controls:a=!1}=r;if(!n)return a?{stop:Zr,cancel:Zr,trigger:Zr}:Zr;if(Dl&&!Sp){Sp=!0;const T={passive:!0};Array.from(n.document.body.children).forEach(v=>v.addEventListener("click",Zr,T)),n.document.documentElement.addEventListener("click",Zr,T)}let l=!0;const u=T=>xe(s).some(v=>{if(typeof v=="string")return Array.from(n.document.querySelectorAll(v)).some(x=>x===T.target||T.composedPath().includes(x));{const x=zt(v);return x&&(T.target===x||T.composedPath().includes(x))}});function c(T){const v=xe(T);return v&&v.$.subTree.shapeFlag===16}function d(T,v){const x=xe(T),b=x.$.subTree&&x.$.subTree.children;return b==null||!Array.isArray(b)?!1:b.some(_=>_.el===v.target||v.composedPath().includes(_.el))}const p=T=>{const v=zt(e);if(T.target!=null&&!(!(v instanceof Element)&&c(e)&&d(e,T))&&!(!v||v===T.target||T.composedPath().includes(v))){if("detail"in T&&T.detail===0&&(l=!u(T)),!l){l=!0;return}t(T)}};let h=!1;const m=[qt(n,"click",T=>{h||(h=!0,setTimeout(()=>{h=!1},0),p(T))},{passive:!0,capture:i}),qt(n,"pointerdown",T=>{const v=zt(e);l=!u(T)&&!!(v&&!T.composedPath().includes(v))},{passive:!0}),o&&qt(n,"blur",T=>{setTimeout(()=>{var v;const x=zt(e);((v=n.document.activeElement)===null||v===void 0?void 0:v.tagName)==="IFRAME"&&!x?.contains(n.document.activeElement)&&t(T)},0)},{passive:!0})].filter(Boolean),y=()=>m.forEach(T=>T());return a?{stop:y,cancel:()=>{l=!1},trigger:T=>{l=!0,p(T),l=!1}}:y}function Ml(){const e=nt(!1),t=at();return t&&We(()=>{e.value=!0},t),e}function Cp(e){const t=Ml();return j(()=>(t.value,!!e()))}function Iy(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Ry(...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=br,eventName:i="keydown",passive:o=!1,dedupe:a=!1}=n,l=Iy(t);return qt(s,i,c=>{c.repeat&&xe(a)||l(c)&&r(c)},o)}function $y(e){return JSON.parse(JSON.stringify(e))}var Po=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Do="__vueuse_ssr_handlers__",Py=Dy();function Dy(){return Do in Po||(Po[Do]=Po[Do]||{}),Po[Do]}function Oy(e,t){return Py[e]||t}function Hy(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 My={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()}},xp="vueuse-storage";function Oo(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=br,eventFilter:p,onError:h=q=>{console.error(q)},initOnMounted:m}=n,y=(c?nt:U)(typeof t=="function"?t():t),T=j(()=>xe(e));if(!r)try{r=Oy("getDefaultStorage",()=>br?.localStorage)()}catch(q){h(q)}if(!r)return y;const v=xe(t),x=Hy(v),b=(s=n.serializer)!==null&&s!==void 0?s:My[x],{pause:_,resume:C}=_y(y,q=>N(q),{flush:i,deep:o,eventFilter:p});Re(T,()=>w(),{flush:i});let k=!1;const O=q=>{m&&!k||w(q)},g=q=>{m&&!k||E(q)};d&&a&&(r instanceof Storage?qt(d,"storage",O,{passive:!0}):qt(d,xp,g)),m?xy(()=>{k=!0,w()}):w();function B(q,Q){if(d){const z={key:T.value,oldValue:q,newValue:Q,storageArea:r};d.dispatchEvent(r instanceof Storage?new StorageEvent("storage",z):new CustomEvent(xp,{detail:z}))}}function N(q){try{const Q=r.getItem(T.value);if(q==null)B(Q,null),r.removeItem(T.value);else{const z=b.write(q);Q!==z&&(r.setItem(T.value,z),B(Q,z))}}catch(Q){h(Q)}}function S(q){const Q=q?q.newValue:r.getItem(T.value);if(Q==null)return l&&v!=null&&r.setItem(T.value,b.write(v)),v;if(!q&&u){const z=b.read(Q);return typeof u=="function"?u(z,v):x==="object"&&!Array.isArray(z)?{...v,...z}:z}else return typeof Q!="string"?Q:b.read(Q)}function w(q){if(!(q&&q.storageArea!==r)){if(q&&q.key==null){y.value=v;return}if(!(q&&q.key!==T.value)){_();try{const Q=b.write(y.value);(q===void 0||q?.newValue!==Q)&&(y.value=S(q))}catch(Q){h(Q)}finally{q?wt(C):C()}}}}function E(q){w(q.detail)}return y}var Ho={speed:2,margin:30,direction:"both"};function Ny(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 qy(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:y=br,containerElement:T,handle:v=e,buttons:x=[0],restrictInView:b,autoScroll:_=!1}=t,C=U((r=xe(h))!==null&&r!==void 0?r:{x:0,y:0}),k=U(),O=ae=>o?o.includes(ae.pointerType):!0,g=ae=>{xe(a)&&ae.preventDefault(),xe(l)&&ae.stopPropagation()},B=xe(_),N=typeof B=="object"?{speed:(n=xe(B.speed))!==null&&n!==void 0?n:Ho.speed,margin:(s=xe(B.margin))!==null&&s!==void 0?s:Ho.margin,direction:(i=B.direction)!==null&&i!==void 0?i:Ho.direction}:Ho,S=ae=>typeof ae=="number"?[ae,ae]:[ae.x,ae.y],w=(ae,fe,Ce)=>{const{clientWidth:Oe,clientHeight:Te,scrollLeft:ke,scrollTop:Ze,scrollWidth:ut,scrollHeight:Ve}=ae,[Qe,dt]=S(N.margin),[gt,A]=S(N.speed);let $=0,J=0;(N.direction==="x"||N.direction==="both")&&(Ce.x<Qe&&ke>0?$=-gt:Ce.x+fe.width>Oe-Qe&&ke<ut-Oe&&($=gt)),(N.direction==="y"||N.direction==="both")&&(Ce.y<dt&&Ze>0?J=-A:Ce.y+fe.height>Te-dt&&Ze<Ve-Te&&(J=A)),($||J)&&ae.scrollBy({left:$,top:J,behavior:"auto"})};let E=null;const q=()=>{const ae=xe(T);ae&&!E&&(E=setInterval(()=>{const fe=xe(e).getBoundingClientRect(),{x:Ce,y:Oe}=C.value,Te={x:Ce-ae.scrollLeft,y:Oe-ae.scrollTop};Te.x>=0&&Te.y>=0&&(w(ae,fe,Te),Te.x+=ae.scrollLeft,Te.y+=ae.scrollTop,C.value=Te)},1e3/60))},Q=()=>{E&&(clearInterval(E),E=null)},z=(ae,fe,Ce,Oe)=>{const[Te,ke]=typeof Ce=="number"?[Ce,Ce]:[Ce.x,Ce.y],{clientWidth:Ze,clientHeight:ut}=fe;return ae.x<Te||ae.x+Oe.width>Ze-Te||ae.y<ke||ae.y+Oe.height>ut-ke},X=()=>{if(xe(t.disabled)||!k.value)return;const ae=xe(T);if(!ae)return;const fe=xe(e).getBoundingClientRect(),{x:Ce,y:Oe}=C.value;z({x:Ce-ae.scrollLeft,y:Oe-ae.scrollTop},ae,N.margin,fe)?q():Q()};xe(_)&&Re(C,X);const Y=ae=>{var fe;if(!xe(x).includes(ae.button)||xe(t.disabled)||!O(ae)||xe(u)&&ae.target!==xe(e))return;const Ce=xe(T),Oe=Ce==null||(fe=Ce.getBoundingClientRect)===null||fe===void 0?void 0:fe.call(Ce),Te=xe(e).getBoundingClientRect(),ke={x:ae.clientX-(Ce?Te.left-Oe.left+(_?0:Ce.scrollLeft):Te.left),y:ae.clientY-(Ce?Te.top-Oe.top+(_?0:Ce.scrollTop):Te.top)};p?.(ke,ae)!==!1&&(k.value=ke,g(ae))},le=ae=>{if(xe(t.disabled)||!O(ae)||!k.value)return;const fe=xe(T);fe instanceof HTMLElement&&Ny(fe);const Ce=xe(e).getBoundingClientRect();let{x:Oe,y:Te}=C.value;if((m==="x"||m==="both")&&(Oe=ae.clientX-k.value.x,fe&&(Oe=Math.min(Math.max(0,Oe),fe.scrollWidth-Ce.width))),(m==="y"||m==="both")&&(Te=ae.clientY-k.value.y,fe&&(Te=Math.min(Math.max(0,Te),fe.scrollHeight-Ce.height))),xe(_)&&fe&&(E===null&&w(fe,Ce,{x:Oe,y:Te}),Oe+=fe.scrollLeft,Te+=fe.scrollTop),fe&&(b||_)){if(m!=="y"){const ke=Oe-fe.scrollLeft;ke<0?Oe=fe.scrollLeft:ke>fe.clientWidth-Ce.width&&(Oe=fe.clientWidth-Ce.width+fe.scrollLeft)}if(m!=="x"){const ke=Te-fe.scrollTop;ke<0?Te=fe.scrollTop:ke>fe.clientHeight-Ce.height&&(Te=fe.clientHeight-Ce.height+fe.scrollTop)}}C.value={x:Oe,y:Te},c?.(C.value,ae),g(ae)},K=ae=>{xe(t.disabled)||!O(ae)||k.value&&(k.value=void 0,_&&Q(),d?.(C.value,ae),g(ae))};if(Pt){const ae=()=>{var fe;return{capture:(fe=t.capture)!==null&&fe!==void 0?fe:!0,passive:!xe(a)}};qt(v,"pointerdown",Y,ae),qt(y,"pointermove",le,ae),qt(y,"pointerup",K,ae)}return{...Sy(C),position:C,isDragging:j(()=>!!k.value),style:j(()=>`
69
- left: ${C.value.x}px;
70
- top: ${C.value.y}px;
71
- ${_?"text-wrap: nowrap;":""}
72
- `)}}function Wn(e,t,r={}){const{window:n=br,...s}=r;let i;const o=Cp(()=>n&&"ResizeObserver"in n),a=()=>{i&&(i.disconnect(),i=void 0)},l=Re(j(()=>{const c=xe(e);return Array.isArray(c)?c.map(d=>zt(d)):[zt(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 xn(u),{isSupported:o,stop:u}}function By(e={}){const{window:t=br}=e,r=t?.navigator,n=Cp(()=>r&&"connection"in r),s=nt(!0),i=nt(!1),o=nt(void 0),a=nt(void 0),l=nt(void 0),u=nt(void 0),c=nt(void 0),d=nt(void 0),p=nt("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 y={passive:!0};return t&&(qt(t,"offline",()=>{s.value=!1,o.value=Date.now()},y),qt(t,"online",()=>{s.value=!0,a.value=Date.now()},y)),h&&qt(h,"change",m,y),m(),{isSupported:n,isOnline:kt(s),saveData:kt(i),offlineAt:kt(o),onlineAt:kt(a),downlink:kt(l),downlinkMax:kt(u),effectiveType:kt(d),rtt:kt(c),type:kt(p)}}var mx=[{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 Cs(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=at(),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 y=x=>o?typeof o=="function"?o(x):$y(x):x,T=()=>ly(e[t])?y(e[t]):c,v=x=>{d?d(x)&&h(m,x):h(m,x)};if(a){const x=U(T());let b=!1;return Re(()=>e[t],_=>{b||(b=!0,x.value=y(_),wt(()=>b=!1))}),Re(x,_=>{!b&&(_!==e[t]||u)&&v(_)},{deep:u}),x}else return j({get(){return T()},set(x){v(x)}})}function Nl(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 ql(e,t,r=".",n){if(!Nl(t))return ql(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]]:Nl(o)&&Nl(s[i])?s[i]=ql(o,s[i],(r?`${r}.`:"")+i.toString(),n):s[i]=o))}return s}function Bl(e){return(...t)=>t.reduce((r,n)=>ql(r,n,"",e),{})}var Tp=Bl(),wx=Bl((e,t,r)=>{if(e[t]!==void 0&&typeof r=="function")return e[t]=r(e[t]),!0}),yx=Bl((e,t,r)=>{if(Array.isArray(e[t])&&typeof r=="function")return e[t]=r(e[t]),!0}),Ly=my(()=>{const e=U(new Map),t=U(),r=j(()=>{for(const o of e.value.values())if(o)return!0;return!1}),n=$o({scrollBody:U(!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??"",Dl&&s?.(),t.value=void 0};return Re(r,(o,a)=>{if(!Pt)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"?Tp({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"),Dl&&(s=qt(document,"touchmove",d=>Fy(d),{passive:!1})),wt(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),e});function Ep(e){const t=Math.random().toString(36).substring(2,7),r=Ly();r.value.set(t,e??!1);const n=j({get:()=>r.value.get(t)??!1,set:s=>r.value.set(t,s)});return Cy(()=>{r.value.delete(t)}),n}function Ap(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:Ap(r)}}function Fy(e){const t=e||window.event,r=t.target;return r instanceof Element&&Ap(r)?!1:t.touches.length>1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}function Ll(e){const t=$o({dir:U("ltr")});return j(()=>e?.value||t.dir?.value||"ltr")}function Mo(e){const t=at(),r=t?.type.emits,n={};return r?.length||console.warn(`No emitted event found. Please check component: ${t?.type.__name}`),r?.forEach(s=>{n[ns(ft(s))]=(...i)=>e(s,...i)}),n}var Fl=0;function Vy(){rt(e=>{if(!Pt)return;const t=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",t[0]??kp()),document.body.insertAdjacentElement("beforeend",t[1]??kp()),Fl++,e(()=>{Fl===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(r=>r.remove()),Fl--})})}function kp(){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 Ip(e){return j(()=>xe(e)?!!zt(e)?.closest("form"):!0)}function Ae(){const e=at(),t=U(),r=j(()=>n());Zs(()=>{r.value!==n()&&su(t)});function n(){return t.value&&"$el"in t.value&&["#text","#comment"].includes(t.value.$el.nodeName)?t.value.$el.nextElementSibling:zt(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 Xr(e){const t=at(),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=xa(e);return j(()=>{const s={},i=t?.vnode.props??{};return Object.keys(i).forEach(o=>{s[ft(o)]=i[o]}),Object.keys({...r,...s}).reduce((o,a)=>(n.value[a]!==void 0&&(o[a]=n.value[a]),o),{})})}function Qr(e,t){const r=Xr(e),n=t?Mo(t):{};return j(()=>({...r.value,...n}))}function jy(e,t){const r=bp(!1,300);xn(()=>{r.value=!1});const n=U(null),s=oy();function i(){n.value=null,r.value=!1}function o(a,l){const u=a.currentTarget,c={x:a.clientX,y:a.clientY},d=zy(c,Uy(c,u.getBoundingClientRect()),1),p=Ky(l.getBoundingClientRect());n.value=Gy([...d,...p]),r.value=!0}return rt(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)})}}),rt(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=!Wy(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 Uy(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 zy(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 Ky(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 Wy(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 Gy(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),Jy(t)}function Jy(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 Yy=function(e){return typeof document>"u"?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},xs=new WeakMap,No=new WeakMap,qo={},Vl=0,Rp=function(e){return e&&(e.host||Rp(e.parentNode))},Zy=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Rp(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})},Xy=function(e,t,r,n){var s=Zy(t,Array.isArray(e)?e:[e]);qo[r]||(qo[r]=new WeakMap);var i=qo[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",y=(xs.get(p)||0)+1,T=(i.get(p)||0)+1;xs.set(p,y),i.set(p,T),o.push(p),y===1&&m&&No.set(p,!0),T===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(),Vl++,function(){o.forEach(function(d){var p=xs.get(d)-1,h=i.get(d)-1;xs.set(d,p),i.set(d,h),p||(No.has(d)||d.removeAttribute(n),No.delete(d)),h||d.removeAttribute(r)}),Vl--,Vl||(xs=new WeakMap,xs=new WeakMap,No=new WeakMap,qo={})}},Qy=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=t||Yy(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live], script"))),Xy(n,s,r,"aria-hidden")):function(){return null}};function $p(e){let t;Re(()=>zt(e),r=>{r?t=Qy(r):t&&t()}),Mt(()=>{t&&t()})}var eb=0;function Ts(e,t="reka"){if(e)return e;let r;return"useId"in v0?r=ku?.():r=$o({useId:void 0}).useId?.()??`${++eb}`,t?`${t}-${r}`:r}function Pp(e){const t=U(),r=j(()=>t.value?.width??0),n=j(()=>t.value?.height??0);return We(()=>{const s=zt(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 jl(e,t){const r=U(e);function n(i){return t[r.value][i]??r.value}return{state:r,dispatch:i=>{r.value=n(i)}}}function Dp(e){const t=bp("",1e3);return{search:t,handleTypeaheadSearch:(s,i)=>{if(t.value=t.value+s,e)e(s);else{const o=Yt(),a=i.map(d=>({...d,textValue:d.value?.textValue??d.ref.textContent?.trim()??""})),l=a.find(d=>d.ref===o),u=rb(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 tb(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function rb(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=tb(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 nb(e,t){const r=U({}),n=U("none"),s=U(e),i=e.value?"mounted":"unmounted";let o;const a=t.value?.ownerDocument.defaultView??br,{state:l,dispatch:u}=jl(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),c=y=>{if(Pt){const T=new CustomEvent(y,{bubbles:!1,cancelable:!1});t.value?.dispatchEvent(T)}};Re(e,async(y,T)=>{const v=T!==y;if(await wt(),v){const x=n.value,b=Bo(t.value);y?(u("MOUNT"),c("enter"),b==="none"&&c("after-enter")):b==="none"||b==="undefined"||r.value?.display==="none"?(u("UNMOUNT"),c("leave"),c("after-leave")):T&&x!==b?(u("ANIMATION_OUT"),c("leave")):(u("UNMOUNT"),c("after-leave"))}},{immediate:!0});const d=y=>{const T=Bo(t.value),v=T.includes(CSS.escape(y.animationName)),x=l.value==="mounted"?"enter":"leave";if(y.target===t.value&&v&&(c(`after-${x}`),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)})}y.target===t.value&&T==="none"&&u("ANIMATION_END")},p=y=>{y.target===t.value&&(n.value=Bo(t.value))},h=Re(t,(y,T)=>{y?(r.value=getComputedStyle(y),y.addEventListener("animationstart",p),y.addEventListener("animationcancel",d),y.addEventListener("animationend",d)):(u("ANIMATION_END"),o!==void 0&&a?.clearTimeout(o),T?.removeEventListener("animationstart",p),T?.removeEventListener("animationcancel",d),T?.removeEventListener("animationend",d))},{immediate:!0}),m=Re(l,()=>{const y=Bo(t.value);n.value=l.value==="mounted"?y:"none"});return Mt(()=>{h(),m()}),{isPresent:j(()=>["mounted","unmountSuspended"].includes(l.value))}}function Bo(e){return e&&getComputedStyle(e).animationName||"none"}var Tn=ee({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:r}){const{present:n,forceMount:s}=It(e),i=U(),{isPresent:o}=nb(n,i);r({present:o});let a=t.default({present:o.value});a=Pl(a||[]);const l=at();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(`
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}};Ff.defaultOptions={server:"",connectionTimeout:5,keepAliveInterval:0,keepAliveDebounce:10,traceSip:!0};var bn=class ia{constructor(t={}){if(this._publishers={},this._registerers={},this._sessions={},this._subscriptions={},this._state=xt.Stopped,this._stateEventEmitter=new fi,this.delegate=t.delegate,this.options=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},ia.defaultOptions()),{sipjsId:Un(5)}),{uri:new pn("sip","anonymous."+Un(6),"anonymous.invalid")}),{viaHost:Un(12)+".invalid"}),ia.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 O0,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=bt.error;break;case"warn":this.loggerFactory.level=bt.warn;break;case"log":this.loggerFactory.level=bt.log;break;case"debug":this.loggerFactory.level=bt.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:ia.newUUID(),pt.parse(this._instanceId,"uuid")===-1)throw new Error("Invalid instanceId.");this._userAgentCore=this.initCore()}static makeURI(t){return pt.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:sw(),sessionDescriptionHandlerFactoryOptions:{},sipExtension100rel:yr.Unsupported,sipExtensionReplaces:yr.Unsupported,sipExtensionExtraSupported:[],sipjsId:"",transportConstructor:Ff,transportOptions:{},uri:new pn("sip","anonymous","anonymous.invalid"),userAgentString:"SIP.js/"+_0,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===xt.Stopped?Promise.reject(new Error("User agent stopped.")):Promise.resolve().then(()=>this.transport.connect())}start(){return this.state===xt.Started?(this.logger.warn("User agent already started"),Promise.resolve()):(this.logger.log(`Starting ${this.configuration.uri}`),this.transitionState(xt.Started),this.transport.connect())}async stop(){if(this.state===xt.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(xt.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(xt.Stopped)}_makeInviter(t,r){return new Co(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:Un(8),r=this.options.contactParams;return{pubGruu:void 0,tempGruu:void 0,uri:new pn("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===yr.Supported&&t.push("100rel"),this.options.sipExtensionReplaces===yr.Supported&&t.push("replaces"),this.options.sipExtensionExtraSupported&&t.push(...this.options.sipExtensionExtraSupported),this.options.hackAllowUnregisteredOptionTags||(t=t.filter(n=>P0[n])),t=Array.from(new Set(t));const r=t.slice();return(this.contact.pubGruu||this.contact.tempGruu)&&r.push("gruu"),new ew({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 D0(this.getLoggerFactory(),i,n,s)},transportAccessor:()=>this.transport},{onInvite:n=>{var s;const i=new Ss(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!==yr.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 Rf(n);this.delegate.onMessage(s)}else n.accept()},onNotify:n=>{if(this.delegate&&this.delegate.onNotify){const s=new bl(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!==xt.Stopped&&this.delegate&&this.delegate.onConnect&&this.delegate.onConnect()}onTransportDisconnect(t){this.state!==xt.Stopped&&(this.delegate&&this.delegate.onDisconnect&&this.delegate.onDisconnect(t),t&&this.options.reconnectionAttempts>0&&this.attemptReconnection())}onTransportMessage(t){const r=xo.parseMessage(t,this.getLogger("sip.Parser"));if(!r){this.logger.warn("Failed to parse incoming message. Dropping.");return}if(this.state===xt.Stopped&&r instanceof _s){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 _s){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 hn){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 _s){this.userAgentCore.receiveIncomingRequestFromTransport(r);return}if(r instanceof hn){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 xt.Started:t!==xt.Stopped&&n();break;case xt.Stopped:t!==xt.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)}},_t=new window.AudioContext,iw={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]},gi=K(null),vi=K(null),mi=K(.5);const Vf=()=>({playDtmf:(o,a=150)=>{_t.state==="suspended"&&_t.resume();const l=iw[o.toUpperCase()];if(!l)return;const u=_t.createOscillator(),c=_t.createOscillator(),d=_t.createGain();u.frequency.value=l[0],c.frequency.value=l[1],u.type="sine",c.type="sine",d.gain.value=.1*mi.value,u.connect(d),c.connect(d),d.connect(_t.destination),u.start(),c.start(),setTimeout(()=>{u.stop(),c.stop(),u.disconnect(),c.disconnect(),d.disconnect()},a)},startRingtone:()=>{if(gi.value)return;_t.state==="suspended"&&_t.resume();const o=()=>{const a=_t.currentTime,l=_t.createOscillator(),u=_t.createGain();l.type="sine",l.frequency.setValueAtTime(523.25,a),l.frequency.setValueAtTime(659.25,a+.1),l.frequency.setValueAtTime(783.99,a+.2),u.gain.setValueAtTime(.1*mi.value,a),u.gain.exponentialRampToValueAtTime(.001,a+.5),l.connect(u),u.connect(_t.destination),l.start(a),l.stop(a+.5)};o(),gi.value=window.setInterval(()=>{o(),setTimeout(o,400)},3e3)},stopRingtone:()=>{gi.value&&(clearInterval(gi.value),gi.value=null)},startRingback:()=>{if(vi.value)return;_t.state==="suspended"&&_t.resume();const o=()=>{const a=_t.currentTime,l=_t.createOscillator(),u=_t.createGain();l.type="sine",l.frequency.value=425,u.gain.setValueAtTime(.1*mi.value,a),u.gain.linearRampToValueAtTime(.1*mi.value,a+1),u.gain.linearRampToValueAtTime(0,a+1.1),l.connect(u),u.connect(_t.destination),l.start(a),l.stop(a+1.1)};o(),vi.value=window.setInterval(()=>{o()},4e3)},stopRingback:()=>{vi.value&&(clearInterval(vi.value),vi.value=null)},setNotificationVolume:o=>{mi.value=Math.max(0,Math.min(1,o/100))}});function jf(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=jf(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Uf(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=jf(e))&&(n&&(n+=" "),n+=t);return n}var ow=(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},aw=(e,t)=>({classGroupId:e,validator:t}),zf=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Ao="-",Kf=[],lw="arbitrary..",cw=e=>{const t=dw(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return uw(o);const a=o.split(Ao);return Wf(a,a[0]===""&&a.length>1?1:0,t)},getConflictingClassGroupIds:(o,a)=>{if(a){const l=n[o],u=r[o];return l?u?ow(u,l):l:u||Kf}return r[o]||Kf}}},Wf=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const n=e[t],s=r.nextPart.get(n);if(s){const l=Wf(e,t+1,s);if(l)return l}const i=r.validators;if(i===null)return;const o=t===0?e.join(Ao):e.slice(t).join(Ao),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?lw+n:void 0})(),dw=e=>{const{theme:t,classGroups:r}=e;return fw(r,t)},fw=(e,t)=>{const r=zf();for(const n in e){const s=e[n];Tl(s,r,n,t)}return r},Tl=(e,t,r,n)=>{const s=e.length;for(let i=0;i<s;i++){const o=e[i];pw(o,t,r,n)}},pw=(e,t,r,n)=>{if(typeof e=="string"){hw(e,t,r);return}if(typeof e=="function"){gw(e,t,r,n);return}vw(e,t,r,n)},hw=(e,t,r)=>{const n=e===""?t:Gf(t,e);n.classGroupId=r},gw=(e,t,r,n)=>{if(mw(e)){Tl(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(aw(r,e))},vw=(e,t,r,n)=>{const s=Object.entries(e),i=s.length;for(let o=0;o<i;o++){const[a,l]=s[o];Tl(l,Gf(t,a),r,n)}},Gf=(e,t)=>{let r=e;const n=t.split(Ao),s=n.length;for(let i=0;i<s;i++){const o=n[i];let a=r.nextPart.get(o);a||(a=zf(),r.nextPart.set(o,a)),r=a}return r},mw=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,ww=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)}}},El="!",Jf=":",yw=[],Yf=(e,t,r,n,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:s}),bw=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 E=s[w];if(o===0&&a===0){if(E===Jf){i.push(s.slice(l,w)),l=w+1;continue}if(E==="/"){u=w;continue}}E==="["?o++:E==="]"?o--:E==="("?a++:E===")"&&a--}const d=i.length===0?s:s.slice(l);let p=d,h=!1;d.endsWith(El)?(p=d.slice(0,-1),h=!0):d.startsWith(El)&&(p=d.slice(1),h=!0);const m=u&&u>l?u-l:void 0;return Yf(i,h,p,m)};if(t){const s=t+Jf,i=n;n=o=>o.startsWith(s)?i(o.slice(s.length)):Yf(yw,!1,o,void 0,!0)}if(r){const s=n;n=i=>r({className:i,parseClassName:s})}return n},_w=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}},Sw=e=>({cache:ww(e.cacheSize),parseClassName:bw(e),sortModifiers:_w(e),...cw(e)}),Cw=/\s+/,xw=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:i}=t,o=[],a=e.trim().split(Cw);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 E=!!w,v=n(E?m.substring(0,w):m);if(!v){if(!E){l=c+(l.length>0?" "+l:l);continue}if(v=n(m),!v){l=c+(l.length>0?" "+l:l);continue}E=!1}const T=p.length===0?"":p.length===1?p[0]:i(p).join(":"),y=h?T+El:T,b=y+v;if(o.indexOf(b)>-1)continue;o.push(b);const x=s(v,E);for(let k=0;k<x.length;++k){const O=x[k];o.push(y+O)}l=c+(l.length>0?" "+l:l)}return l},Tw=(...e)=>{let t=0,r,n,s="";for(;t<e.length;)(r=e[t++])&&(n=Zf(r))&&(s&&(s+=" "),s+=n);return s},Zf=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Zf(e[n]))&&(r&&(r+=" "),r+=t);return r},Ew=(e,...t)=>{let r,n,s,i;const o=l=>(r=Sw(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=xw(l,r);return s(l,c),c};return i=o,(...l)=>i(Tw(...l))},Aw=[],ht=e=>{const t=r=>r[e]||Aw;return t.isThemeGetter=!0,t},Xf=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Qf=/^\((?:(\w[\w-]*):)?(.+)\)$/i,kw=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Iw=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Rw=/\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$/,$w=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Pw=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Dw=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_n=e=>kw.test(e),De=e=>!!e&&!Number.isNaN(Number(e)),Sn=e=>!!e&&Number.isInteger(Number(e)),Al=e=>e.endsWith("%")&&De(e.slice(0,-1)),Yr=e=>Iw.test(e),ep=()=>!0,Ow=e=>Rw.test(e)&&!$w.test(e),kl=()=>!1,Hw=e=>Pw.test(e),Mw=e=>Dw.test(e),Nw=e=>!be(e)&&!_e(e),qw=e=>Cn(e,op,kl),be=e=>Xf.test(e),zn=e=>Cn(e,ap,Ow),tp=e=>Cn(e,Kw,De),Bw=e=>Cn(e,cp,ep),Lw=e=>Cn(e,lp,kl),rp=e=>Cn(e,sp,kl),Fw=e=>Cn(e,ip,Mw),ko=e=>Cn(e,up,Hw),_e=e=>Qf.test(e),wi=e=>Kn(e,ap),Vw=e=>Kn(e,lp),np=e=>Kn(e,sp),jw=e=>Kn(e,op),Uw=e=>Kn(e,ip),Io=e=>Kn(e,up,!0),zw=e=>Kn(e,cp,!0),Cn=(e,t,r)=>{const n=Xf.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Kn=(e,t,r=!1)=>{const n=Qf.exec(e);return n?n[1]?t(n[1]):r:!1},sp=e=>e==="position"||e==="percentage",ip=e=>e==="image"||e==="url",op=e=>e==="length"||e==="size"||e==="bg-size",ap=e=>e==="length",Kw=e=>e==="number",lp=e=>e==="family-name",cp=e=>e==="number"||e==="weight",up=e=>e==="shadow",Ww=()=>{const e=ht("color"),t=ht("font"),r=ht("text"),n=ht("font-weight"),s=ht("tracking"),i=ht("leading"),o=ht("breakpoint"),a=ht("container"),l=ht("spacing"),u=ht("radius"),c=ht("shadow"),d=ht("inset-shadow"),p=ht("text-shadow"),h=ht("drop-shadow"),m=ht("blur"),w=ht("perspective"),E=ht("aspect"),v=ht("ease"),T=ht("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],x=()=>[...b(),_e,be],k=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],g=()=>[_e,be,l],q=()=>[_n,"full","auto",...g()],B=()=>[Sn,"none","subgrid",_e,be],S=()=>["auto",{span:["full",Sn,_e,be]},Sn,_e,be],_=()=>[Sn,"auto",_e,be],C=()=>["auto","min","max","fr",_e,be],N=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],j=()=>["auto",...g()],X=()=>[_n,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...g()],Z=()=>[_n,"screen","full","dvw","lvw","svw","min","max","fit",...g()],le=()=>[_n,"screen","full","lh","dvh","lvh","svh","min","max","fit",...g()],W=()=>[e,_e,be],ae=()=>[...b(),np,rp,{position:[_e,be]}],fe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Ce=()=>["auto","cover","contain",jw,qw,{size:[_e,be]}],Oe=()=>[Al,wi,zn],Te=()=>["","none","full",u,_e,be],ke=()=>["",De,wi,zn],Ze=()=>["solid","dashed","dotted","double"],ut=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ve=()=>[De,Al,np,rp],Qe=()=>["","none",m,_e,be],dt=()=>["none",De,_e,be],gt=()=>["none",De,_e,be],A=()=>[De,_e,be],$=()=>[_n,"full",...g()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Yr],breakpoint:[Yr],color:[ep],container:[Yr],"drop-shadow":[Yr],ease:["in","out","in-out"],font:[Nw],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Yr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Yr],shadow:[Yr],spacing:["px",De],text:[Yr],"text-shadow":[Yr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",_n,be,_e,E]}],container:["container"],columns:[{columns:[De,be,_e,a]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:x()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:q()}],"inset-x":[{"inset-x":q()}],"inset-y":[{"inset-y":q()}],start:[{"inset-s":q(),start:q()}],end:[{"inset-e":q(),end:q()}],"inset-bs":[{"inset-bs":q()}],"inset-be":[{"inset-be":q()}],top:[{top:q()}],right:[{right:q()}],bottom:[{bottom:q()}],left:[{left:q()}],visibility:["visible","invisible","collapse"],z:[{z:[Sn,"auto",_e,be]}],basis:[{basis:[_n,"full","auto",a,...g()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[De,_n,"auto","initial","none",be]}],grow:[{grow:["",De,_e,be]}],shrink:[{shrink:["",De,_e,be]}],order:[{order:[Sn,"first","last","none",_e,be]}],"grid-cols":[{"grid-cols":B()}],"col-start-end":[{col:S()}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":B()}],"row-start-end":[{row:S()}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":C()}],"auto-rows":[{"auto-rows":C()}],gap:[{gap:g()}],"gap-x":[{"gap-x":g()}],"gap-y":[{"gap-y":g()}],"justify-content":[{justify:[...N(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...N()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":N()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],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:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mbs:[{mbs:j()}],mbe:[{mbe:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":g()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":g()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],"inline-size":[{inline:["auto",...Z()]}],"min-inline-size":[{"min-inline":["auto",...Z()]}],"max-inline-size":[{"max-inline":["none",...Z()]}],"block-size":[{block:["auto",...le()]}],"min-block-size":[{"min-block":["auto",...le()]}],"max-block-size":[{"max-block":["none",...le()]}],w:[{w:[a,"screen",...X()]}],"min-w":[{"min-w":[a,"screen","none",...X()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",r,wi,zn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,zw,Bw]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Al,be]}],"font-family":[{font:[Vw,Lw,t]}],"font-features":[{"font-features":[be]}],"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,_e,be]}],"line-clamp":[{"line-clamp":[De,"none",_e,tp]}],leading:[{leading:[i,...g()]}],"list-image":[{"list-image":["none",_e,be]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",_e,be]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:W()}],"text-color":[{text:W()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ze(),"wavy"]}],"text-decoration-thickness":[{decoration:[De,"from-font","auto",_e,zn]}],"text-decoration-color":[{decoration:W()}],"underline-offset":[{"underline-offset":[De,"auto",_e,be]}],"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",_e,be]}],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",_e,be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ae()}],"bg-repeat":[{bg:fe()}],"bg-size":[{bg:Ce()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Sn,_e,be],radial:["",_e,be],conic:[Sn,_e,be]},Uw,Fw]}],"bg-color":[{bg:W()}],"gradient-from-pos":[{from:Oe()}],"gradient-via-pos":[{via:Oe()}],"gradient-to-pos":[{to:Oe()}],"gradient-from":[{from:W()}],"gradient-via":[{via:W()}],"gradient-to":[{to:W()}],rounded:[{rounded:Te()}],"rounded-s":[{"rounded-s":Te()}],"rounded-e":[{"rounded-e":Te()}],"rounded-t":[{"rounded-t":Te()}],"rounded-r":[{"rounded-r":Te()}],"rounded-b":[{"rounded-b":Te()}],"rounded-l":[{"rounded-l":Te()}],"rounded-ss":[{"rounded-ss":Te()}],"rounded-se":[{"rounded-se":Te()}],"rounded-ee":[{"rounded-ee":Te()}],"rounded-es":[{"rounded-es":Te()}],"rounded-tl":[{"rounded-tl":Te()}],"rounded-tr":[{"rounded-tr":Te()}],"rounded-br":[{"rounded-br":Te()}],"rounded-bl":[{"rounded-bl":Te()}],"border-w":[{border:ke()}],"border-w-x":[{"border-x":ke()}],"border-w-y":[{"border-y":ke()}],"border-w-s":[{"border-s":ke()}],"border-w-e":[{"border-e":ke()}],"border-w-bs":[{"border-bs":ke()}],"border-w-be":[{"border-be":ke()}],"border-w-t":[{"border-t":ke()}],"border-w-r":[{"border-r":ke()}],"border-w-b":[{"border-b":ke()}],"border-w-l":[{"border-l":ke()}],"divide-x":[{"divide-x":ke()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ke()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ze(),"hidden","none"]}],"divide-style":[{divide:[...Ze(),"hidden","none"]}],"border-color":[{border:W()}],"border-color-x":[{"border-x":W()}],"border-color-y":[{"border-y":W()}],"border-color-s":[{"border-s":W()}],"border-color-e":[{"border-e":W()}],"border-color-bs":[{"border-bs":W()}],"border-color-be":[{"border-be":W()}],"border-color-t":[{"border-t":W()}],"border-color-r":[{"border-r":W()}],"border-color-b":[{"border-b":W()}],"border-color-l":[{"border-l":W()}],"divide-color":[{divide:W()}],"outline-style":[{outline:[...Ze(),"none","hidden"]}],"outline-offset":[{"outline-offset":[De,_e,be]}],"outline-w":[{outline:["",De,wi,zn]}],"outline-color":[{outline:W()}],shadow:[{shadow:["","none",c,Io,ko]}],"shadow-color":[{shadow:W()}],"inset-shadow":[{"inset-shadow":["none",d,Io,ko]}],"inset-shadow-color":[{"inset-shadow":W()}],"ring-w":[{ring:ke()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:W()}],"ring-offset-w":[{"ring-offset":[De,zn]}],"ring-offset-color":[{"ring-offset":W()}],"inset-ring-w":[{"inset-ring":ke()}],"inset-ring-color":[{"inset-ring":W()}],"text-shadow":[{"text-shadow":["none",p,Io,ko]}],"text-shadow-color":[{"text-shadow":W()}],opacity:[{opacity:[De,_e,be]}],"mix-blend":[{"mix-blend":[...ut(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ut()}],"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":[De]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ve()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ve()}],"mask-image-linear-from-color":[{"mask-linear-from":W()}],"mask-image-linear-to-color":[{"mask-linear-to":W()}],"mask-image-t-from-pos":[{"mask-t-from":Ve()}],"mask-image-t-to-pos":[{"mask-t-to":Ve()}],"mask-image-t-from-color":[{"mask-t-from":W()}],"mask-image-t-to-color":[{"mask-t-to":W()}],"mask-image-r-from-pos":[{"mask-r-from":Ve()}],"mask-image-r-to-pos":[{"mask-r-to":Ve()}],"mask-image-r-from-color":[{"mask-r-from":W()}],"mask-image-r-to-color":[{"mask-r-to":W()}],"mask-image-b-from-pos":[{"mask-b-from":Ve()}],"mask-image-b-to-pos":[{"mask-b-to":Ve()}],"mask-image-b-from-color":[{"mask-b-from":W()}],"mask-image-b-to-color":[{"mask-b-to":W()}],"mask-image-l-from-pos":[{"mask-l-from":Ve()}],"mask-image-l-to-pos":[{"mask-l-to":Ve()}],"mask-image-l-from-color":[{"mask-l-from":W()}],"mask-image-l-to-color":[{"mask-l-to":W()}],"mask-image-x-from-pos":[{"mask-x-from":Ve()}],"mask-image-x-to-pos":[{"mask-x-to":Ve()}],"mask-image-x-from-color":[{"mask-x-from":W()}],"mask-image-x-to-color":[{"mask-x-to":W()}],"mask-image-y-from-pos":[{"mask-y-from":Ve()}],"mask-image-y-to-pos":[{"mask-y-to":Ve()}],"mask-image-y-from-color":[{"mask-y-from":W()}],"mask-image-y-to-color":[{"mask-y-to":W()}],"mask-image-radial":[{"mask-radial":[_e,be]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ve()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ve()}],"mask-image-radial-from-color":[{"mask-radial-from":W()}],"mask-image-radial-to-color":[{"mask-radial-to":W()}],"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":b()}],"mask-image-conic-pos":[{"mask-conic":[De]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ve()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ve()}],"mask-image-conic-from-color":[{"mask-conic-from":W()}],"mask-image-conic-to-color":[{"mask-conic-to":W()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ae()}],"mask-repeat":[{mask:fe()}],"mask-size":[{mask:Ce()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",_e,be]}],filter:[{filter:["","none",_e,be]}],blur:[{blur:Qe()}],brightness:[{brightness:[De,_e,be]}],contrast:[{contrast:[De,_e,be]}],"drop-shadow":[{"drop-shadow":["","none",h,Io,ko]}],"drop-shadow-color":[{"drop-shadow":W()}],grayscale:[{grayscale:["",De,_e,be]}],"hue-rotate":[{"hue-rotate":[De,_e,be]}],invert:[{invert:["",De,_e,be]}],saturate:[{saturate:[De,_e,be]}],sepia:[{sepia:["",De,_e,be]}],"backdrop-filter":[{"backdrop-filter":["","none",_e,be]}],"backdrop-blur":[{"backdrop-blur":Qe()}],"backdrop-brightness":[{"backdrop-brightness":[De,_e,be]}],"backdrop-contrast":[{"backdrop-contrast":[De,_e,be]}],"backdrop-grayscale":[{"backdrop-grayscale":["",De,_e,be]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[De,_e,be]}],"backdrop-invert":[{"backdrop-invert":["",De,_e,be]}],"backdrop-opacity":[{"backdrop-opacity":[De,_e,be]}],"backdrop-saturate":[{"backdrop-saturate":[De,_e,be]}],"backdrop-sepia":[{"backdrop-sepia":["",De,_e,be]}],"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",_e,be]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[De,"initial",_e,be]}],ease:[{ease:["linear","initial",v,_e,be]}],delay:[{delay:[De,_e,be]}],animate:[{animate:["none",T,_e,be]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,_e,be]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:dt()}],"rotate-x":[{"rotate-x":dt()}],"rotate-y":[{"rotate-y":dt()}],"rotate-z":[{"rotate-z":dt()}],scale:[{scale:gt()}],"scale-x":[{"scale-x":gt()}],"scale-y":[{"scale-y":gt()}],"scale-z":[{"scale-z":gt()}],"scale-3d":["scale-3d"],skew:[{skew:A()}],"skew-x":[{"skew-x":A()}],"skew-y":[{"skew-y":A()}],transform:[{transform:[_e,be,"","none","gpu","cpu"]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:$()}],"translate-x":[{"translate-x":$()}],"translate-y":[{"translate-y":$()}],"translate-z":[{"translate-z":$()}],"translate-none":["translate-none"],accent:[{accent:W()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:W()}],"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",_e,be]}],"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",_e,be]}],fill:[{fill:["none",...W()]}],"stroke-w":[{stroke:[De,wi,zn,tp]}],stroke:[{stroke:["none",...W()]}],"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"]}},Gw=Ew(Ww);const st=(...e)=>Gw(Uf(e)),Wn=e=>e.length<=3?e:`${e.slice(0,3)}${"*".repeat(e.length-3)}`,dp=(e,t)=>{if(e){const r=Il(e);if(r&&fp(r))return r;if(e.trim())return e.trim()}if(t){const r=Il(t);if(r&&fp(r))return r;const n=Jw(t);if(n)return n;if(t.trim()&&!t.includes("@"))return t.trim()}return"Unknown"};var Il=e=>e.replace(/[^\d+*#]/g,""),fp=e=>/^\+?[\d*#]{2,}$/.test(e),Jw=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]?Il(t[1]):null)},Yw="X-Nebula-Queue",Zw="X-Nebula-Queue-Id";const lx=30,Xw=(e,t={})=>{const r=nt(null),n=nt(null),s=nt(new Map),i=new Audio;i.autoplay=!0;const o=nt(void 0),a=nt(null),l=nt(null),u=new Map,c=new Map,d=new Set;let p=!1,h=null,m=null,w=null,E=null,v=null;const T=z(()=>r.value?.configuration.uri?.user||""),{startRingtone:y,stopRingtone:b,startRingback:x,stopRingback:k,setNotificationVolume:O}=Vf(),g=I=>I instanceof Co||I instanceof Ss?I.request?.callId||I.dialog?.callId||I.id||crypto.randomUUID():I.dialog?.callId||I.id||crypto.randomUUID(),q=I=>{if(!(I instanceof Ss))return;const F=I.request;if(!F)return;const M=F.getHeader(Yw)?.trim(),D=F.getHeader(Zw)?.trim();if(!(!M&&!D))return{...D?{id:D}:{},...M?{name:M}:{}}},B=(I,F,M,D)=>{const L=q(I),Q={channelId:F,sipCallId:g(I),direction:M,remoteNumber:D,...L?{queue:L}:{}};return u.set(F,Q),t.onCallContext?.(Q),Q},S=(I,F)=>{const M=u.get(I);M&&t.onCallState?.({...M,state:F,timestamp:Date.now()})},_=(I,F)=>{if(I.state!==J.Established)return;const M=u.get(F),D=I.sessionDescriptionHandler,L=D?.localMediaStream??l.value,Q=D?.remoteMediaStream??a.value,me=L?.getAudioTracks()??[],Ie=Q?.getAudioTracks()??[];if(!M||!L||!Q||me.length===0||Ie.length===0)return;const Me=[M.sipCallId,...me.map(Ge=>`local:${Ge.id}`),...Ie.map(Ge=>`remote:${Ge.id}`)].join("|");c.get(F)!==Me&&(c.set(F,Me),t.onMediaReady?.({...M,localStream:L,remoteStream:Q}))},C=I=>{u.delete(I),c.delete(I),d.delete(I)},N=()=>{e.channels.value.some(I=>I.status==="incoming")?y():b(),e.activeChannel.value?.status==="calling"?x():k()},V=I=>{i.volume=I/100},j=async I=>{typeof i.setSinkId=="function"&&await i.setSinkId(I)},X=I=>{o.value=I},Z=(I,F)=>{let M=!1;const D=I.sessionDescriptionHandler;return D?.peerConnection&&D.peerConnection.getSenders().forEach(L=>{L.track&&L.track.kind==="audio"&&(L.track.enabled=F,M=!0)}),M},le=I=>{let F=!1;return l.value&&l.value.getAudioTracks().forEach(M=>{M.enabled=I,F=!0}),F},W=(I,F)=>{const M=!(F?.isHeld||F?.isMuted),D=Z(I,M),L=le(M);!D&&!L&&console.warn("[SipJs] No audio tracks found to apply channel audio state")},ae=I=>{for(const[F,M]of s.value.entries())if(M===I)return e.channels.value.find(D=>D.id===F)||null;return e.activeChannel.value||null},fe=async I=>{const F=I.sessionDescriptionHandler?.peerConnection;if(!F)return;const M=ae(I),D=!(M?.isHeld||M?.isMuted),L=F.getSenders().find(Q=>Q.track?.kind==="audio");if(L?.track){L.track.enabled=D,M&&_(I,M.id);return}try{const[Q]=(await navigator.mediaDevices.getUserMedia(Ce(!1))).getAudioTracks();if(!Q)return;Q.enabled=D;const me=new MediaStream([Q]);l.value=me;const Ie=F.getSenders().find(Me=>Me.track===null);Ie?await Ie.replaceTrack(Q):F.addTrack(Q,me),W(I,M),M&&_(I,M.id)}catch(Q){console.warn("[SipJs] Failed to recover outbound audio track:",Q)}},Ce=(I=!1)=>{const F={echoCancellation:{ideal:!0},noiseSuppression:{ideal:!1},autoGainControl:{ideal:!1},channelCount:1};return o.value&&(F.deviceId={exact:o.value}),{audio:F,video:I}},Oe=async()=>{const I=n.value;I&&await I.register({requestDelegate:{onAccept:()=>{e.setConnected(!0)},onReject:()=>{e.setConnected(!1)}}})},Te=async I=>{if(!r.value){try{(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(F=>F.stop())}catch(F){console.error("Microphone permission denied",F);return}try{const F=bn.makeURI(I.uri);if(!F)throw new Error("Invalid URI");p=I.earlyMedia??!1,r.value=new bn({uri:F,logLevel:"error",transportOptions:{server:I.transportOptions.server,keepAliveInterval:I.transportOptions.keepAliveInterval??30},authorizationUsername:I.authorizationUsername,authorizationPassword:I.authorizationPassword,reconnectionDelay:5,reconnectionAttempts:3,delegate:{onConnect:()=>{},onDisconnect:()=>e.setConnected(!1),onInvite:M=>Ve(M)}}),await r.value.start(),n.value=new Sl(r.value),await Oe(),ke()}catch{}}},ke=()=>{w=new AbortController;const{signal:I}=w;let F=Date.now();const M=5e3,D=(Tt=1e3)=>{E&&clearTimeout(E),E=setTimeout(async()=>{E=null,await Ze()},Tt)},L=()=>{if(document.visibilityState==="visible"){const Tt=Date.now()-F;Tt>M?(console.log(`[SipJs] Device was suspended for ${Math.round(Tt/1e3)}s, reconnecting...`),D(1500)):D(500)}F=Date.now()},Q=()=>{console.log("[SipJs] Network online, reconnecting..."),D(1e3)},me=()=>{console.log("[SipJs] Network offline"),e.setConnected(!1),E&&(clearTimeout(E),E=null)},Ie=()=>{v=setInterval(()=>{const Tt=Date.now(),vt=Tt-F;vt>3e4&&(console.log(`[SipJs] Heartbeat drift detected (${Math.round(vt/1e3)}s), device may have woken from sleep`),D(1500)),F=Tt},1e3)},Me=()=>{console.log("[SipJs] Page frozen"),v&&(clearInterval(v),v=null)},Ge=()=>{console.log("[SipJs] Page resumed"),F=Date.now(),Ie(),D(1e3)};document.addEventListener("visibilitychange",L,{signal:I}),window.addEventListener("online",Q,{signal:I}),window.addEventListener("offline",me,{signal:I}),document.addEventListener("freeze",Me,{signal:I}),document.addEventListener("resume",Ge,{signal:I}),Ie()},Ze=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 Oe()}catch{}}catch(I){console.error("[SipJs] Reconnection failed:",I)}}},ut=async()=>{w?.abort(),w=null,E&&(clearTimeout(E),E=null),v&&(clearInterval(v),v=null);const I=n.value,F=r.value;if(n.value=null,r.value=null,I)try{await I.unregister()}catch(M){console.warn("[SipJs] Unregister failed:",M)}if(F)try{await F.stop()}catch(M){console.warn("[SipJs] UserAgent stop failed:",M)}},Ve=I=>{console.log("[SipJs] 📞 Llamada entrante recibida"),console.log("[SipJs] Remote Identity URI:",I.remoteIdentity.uri.toString()),console.log("[SipJs] Remote Identity URI user:",I.remoteIdentity.uri.user),console.log("[SipJs] Remote Identity displayName:",I.remoteIdentity.displayName);const F=e.channels.value.find(Q=>Q.status==="idle");if(!F){console.warn("[SipJs] ⚠️ No hay canales disponibles, rechazando llamada"),I.reject();return}const M=F.id;s.value.set(M,I);const D=I.body?I.body.includes("m=video"):!1,L=dp(I.remoteIdentity.uri.user,I.remoteIdentity.displayName);console.log("[SipJs] 📋 Caller number extraído:",L),console.log("[SipJs] 🎥 Video:",D?"Sí":"No"),e.updateChannelState(M,{status:"incoming",remoteNumber:L,remoteDisplayName:I.remoteIdentity.displayName||void 0,hasVideo:D}),B(I,M,"incoming",L),S(M,"ringing"),N(),e.setActiveChannelId(M),I.stateChange.addListener(Q=>{switch(Q){case J.Terminated:{const me=e.channels.value.find(Me=>Me.id===M),Ie=dp(I.remoteIdentity.uri.user,I.remoteIdentity.displayName);if(me?.status==="connected"){const Me=Math.floor((Date.now()-(me.startTime||Date.now()))/1e3);e.addCallLog({number:Ie,direction:"incoming",status:"answered",startTime:me.startTime||Date.now(),duration:Me})}else me?.status==="incoming"&&e.addCallLog({number:Ie,direction:"incoming",status:"missed",startTime:Date.now(),duration:0});S(M,d.has(M)?"ended":"failed"),C(M),e.updateChannelState(M,{status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,hasVideo:!1,hasEarlyMedia:!1}),s.value.delete(M),e.activeChannelId.value===M&&he(),N();break}case J.Established:d.add(M),e.updateChannelState(M,{status:"connected",startTime:Date.now()}),S(M,"connected"),e.activeChannelId.value===M&&(Se(I),fe(I).then(()=>_(I,M))),N();break}})},Qe=async(I,F=!1)=>{if(!r.value)return;const M=e.activeChannelId.value;if(s.value.has(M))return;let D=bn.makeURI(I);if(!D&&r.value.configuration.uri){const me=r.value.configuration.uri.host;D=bn.makeURI(`sip:${I}@${me}`)}if(!D)return;const L=new Co(r.value,D,{earlyMedia:p});s.value.set(M,L),B(L,M,"outgoing",I),S(M,"dialing"),e.updateChannelState(M,{status:"calling",remoteNumber:I,hasVideo:F}),e.setLastDialedNumber(I),N(),L.stateChange.addListener(me=>{switch(me){case J.Established:d.add(M),e.channels.value.find(Ie=>Ie.id===M)?.status!=="connected"&&(e.updateChannelState(M,{status:"connected",startTime:Date.now()}),S(M,"connected"),Se(L),fe(L).then(()=>_(L,M)),N());break;case J.Terminated:{const Ie=e.channels.value.find(Me=>Me.id===M);if(Ie?.status==="connected"){const Me=Math.floor((Date.now()-(Ie.startTime||Date.now()))/1e3);e.addCallLog({number:I,direction:"outgoing",status:"answered",startTime:Ie.startTime||Date.now(),duration:Me})}else e.addCallLog({number:I,direction:"outgoing",status:"cancelled",startTime:Date.now(),duration:0});S(M,d.has(M)?"ended":"failed"),C(M),e.updateChannelState(M,{status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1}),s.value.delete(M),e.activeChannelId.value===M&&he(),N();break}}});const Q={sessionDescriptionHandlerOptions:{constraints:Ce(F)},requestDelegate:{onProgress:me=>{(me.message.statusCode===180||me.message.statusCode===183)&&(me.message.body&&(e.updateChannelState(M,{hasEarlyMedia:!0}),Se(L)),N())},onAccept:me=>{e.channels.value.find(Ie=>Ie.id===M)?.status!=="connected"&&(d.add(M),e.updateChannelState(M,{status:"connected",startTime:Date.now()}),S(M,"connected"),Se(L),fe(L).then(()=>_(L,M)),N())}}};await L.invite(Q)},dt=async(I=!1)=>{const F=e.activeChannelId.value,M=s.value.get(F);if(M instanceof Ss&&M.state===J.Initial){for(const[L,Q]of s.value.entries())if(L!==e.activeChannelId.value&&Q.state===J.Established&&!e.channels.value.find(me=>me.id===L)?.isHeld)try{await $(Q,!0),e.updateChannelState(L,{isHeld:!0})}catch(me){console.error(`[SipJs] Failed to hold channel ${L}:`,me)}const D={sessionDescriptionHandlerOptions:{constraints:Ce(I)}};e.updateChannelState(F,{status:"connected",startTime:Date.now()});try{await M.accept(D),await fe(M),N()}catch(L){const Q=s.value.get(F);throw Q instanceof Ss&&Q.state===J.Initial&&e.updateChannelState(F,{status:"incoming",startTime:void 0}),L}}},gt=async()=>{const I=s.value.get(e.activeChannelId.value);if(I)switch(I.state){case J.Initial:case J.Establishing:I instanceof Co?await I.cancel():I instanceof Ss&&await I.reject();break;case J.Established:await I.bye();break}},A=()=>{const I=s.value.get(e.activeChannelId.value);if(!I)return;const F=!e.isMuted.value;e.setMuted(F),W(I,e.channels.value.find(M=>M.id===e.activeChannelId.value))},$=async(I,F)=>{const M={sessionDescriptionHandlerOptions:{hold:F}};await I.invite(M)},Y=async()=>{const I=s.value.get(e.activeChannelId.value);if(I?.state!==J.Established)return;const F=!e.isHeld.value;try{await $(I,F),e.setHeld(F),W(I,e.channels.value.find(M=>M.id===e.activeChannelId.value))}catch{}},oe=async I=>{const F=e.activeChannelId.value;if(F===I)return;const M=s.value.get(F),D=s.value.get(I),L=e.channels.value.find(me=>me.id===F),Q=e.channels.value.find(me=>me.id===I);if(M&&M.state===J.Established&&!L?.isHeld)try{await $(M,!0),e.updateChannelState(F,{isHeld:!0}),W(M,e.channels.value.find(me=>me.id===F))}catch{}if(e.setActiveChannelId(I),N(),D&&D.state===J.Established){if(Q?.isHeld)try{await $(D,!1),e.updateChannelState(I,{isHeld:!1})}catch{}W(D,e.channels.value.find(me=>me.id===I)),Se(D)}else he()},ne=I=>{if(!/^[0-9*#]$/.test(I))return;const F=s.value.get(e.activeChannelId.value);if(F?.state!==J.Established)return;const M=F.sessionDescriptionHandler?.peerConnection?.getSenders().find(L=>L.track?.kind==="audio")?.dtmf;if(M?.canInsertDTMF){M.insertDTMF(I,160,70);return}const D={requestOptions:{body:{content:`Signal=${I}\r
68
+ Duration=160`,contentType:"application/dtmf-relay",contentDisposition:"signal"}}};F.info(D)},te=(I,F)=>{const M=e.channels.value.find(D=>D.id===I);!M||M.status!=="connected"||(Se(F),W(F,M),fe(F),i.play().catch(()=>{}))},de=async I=>{console.log("[SipJs] 🔄 transferCall iniciado"),console.log("[SipJs] Target:",I);const F=e.activeChannelId.value,M=s.value.get(F);if(!M)throw console.error("[SipJs] ❌ No hay sesión activa en el canal",F),new Error("No active session to transfer");if(console.log("[SipJs] Sesión encontrada - Estado:",M.state),console.log("[SipJs] Dialog ID:",M.dialog?.id),console.log("[SipJs] Call ID:",M.dialog?.callId),M.state!==J.Established)throw console.error("[SipJs] ❌ Sesión no establecida. Estado actual:",M.state),new Error(`Cannot transfer call. Call is not established (state: ${M.state})`);let D=bn.makeURI(I);if(!D&&r.value?.configuration.uri){const L=r.value.configuration.uri.host;console.log("[SipJs] Construyendo URI con dominio:",L),D=bn.makeURI(`sip:${I}@${L}`)}if(!D)throw console.error("[SipJs] ❌ URI de destino inválida:",I),new Error(`Invalid transfer target: ${I}`);console.log("[SipJs] 📤 URI de transferencia:",D.toString()),console.log("[SipJs] URI scheme:",D.scheme),console.log("[SipJs] URI user:",D.user),console.log("[SipJs] URI host:",D.host);try{console.log("[SipJs] 🚀 Enviando REFER..."),await M.refer(D,{requestDelegate:{onAccept:L=>{console.log("[SipJs] ✅ Transfer REFER aceptado por el servidor (202 Accepted)"),console.log("[SipJs] Response:",L.message)},onReject:L=>{const Q=L.message.statusCode;console.error("[SipJs] ❌ Transfer REFER rechazado:",Q),console.error("[SipJs] Response completo:",L.message),te(F,M)}},onNotify:L=>{console.log("[SipJs] 📬 NOTIFY recibido para transferencia"),console.log("[SipJs] NOTIFY request:",L.request),L.accept();const Q=L.request.body;if(console.log("[SipJs] NOTIFY body:",Q),Q){const me=Q.match(/SIP\/2\.0\s+(\d{3})(.*)/);if(me&&me[1]){const Ie=parseInt(me[1],10),Me=me[2]?.trim()||"";if(console.log("[SipJs] 📊 Status code:",Ie),console.log("[SipJs] 📊 Status text:",Me),Ie>=200&&Ie<300)console.log("[SipJs] ✅ Transferencia exitosa! Terminando sesión..."),setTimeout(()=>{M.bye().catch(Ge=>{console.warn("[SipJs] Error hanging up after successful transfer:",Ge)})},500);else if(Ie>=400){console.error("[SipJs] ❌ Transfer falló con status:",Ie,Me),console.log("[SipJs] 🔄 Manteniendo la sesión activa para el usuario");const Ge={404:"Número no encontrado",486:"Número ocupado",487:"Transferencia cancelada",503:"Servicio no disponible - el destino puede estar fuera de línea"}[Ie]||`Error en transferencia (código ${Ie})`;console.warn("[SipJs] 💬",Ge),te(F,M)}else Ie>=100&&Ie<200&&console.log("[SipJs] 📞 Transferencia en progreso:",Ie,Me)}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(L){throw console.error("[SipJs] ❌ Error en transferCall:",L),console.error("[SipJs] Error type:",L?.constructor?.name),console.error("[SipJs] Error message:",L instanceof Error?L.message:String(L)),console.error("[SipJs] Error stack:",L instanceof Error?L.stack:"N/A"),L}},ue=async I=>{console.log("[SipJs] 🔄 startAttendedTransfer iniciado"),console.log("[SipJs] Target:",I);const F=e.activeChannelId.value,M=s.value.get(F);if(console.log("[SipJs] Canal original:",F),console.log("[SipJs] Sesión original:",M?.state),!M||M.state!==J.Established)throw console.error("[SipJs] ❌ No hay llamada establecida para transferir"),new Error("No established call to transfer");const D=e.channels.value.find(L=>L.status==="idle");if(console.log("[SipJs] Canal de consulta encontrado:",D?.id),!D)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 $(M,!0),e.updateChannelState(F,{isHeld:!0}),console.log("[SipJs] ✅ Llamada original en hold")}catch(L){throw console.error("[SipJs] ❌ Failed to hold original call:",L),new Error("Failed to put call on hold")}console.log("[SipJs] 🔄 Cambiando al canal de consulta:",D.id),e.setActiveChannelId(D.id);try{console.log("[SipJs] 📞 Iniciando llamada de consulta a:",I),await Qe(I,!1),console.log("[SipJs] ✅ Llamada de consulta iniciada"),e.setTransferInProgress({originalChannelId:F,consultationChannelId:D.id,targetNumber:I}),console.log("[SipJs] 📋 Transferencia en progreso registrada")}catch(L){throw console.error("[SipJs] ❌ Failed to start consultation call:",L),console.log("[SipJs] 🔄 Volviendo al canal original y quitando hold..."),e.setActiveChannelId(F),await $(M,!1).catch(()=>{}),e.updateChannelState(F,{isHeld:!1}),new Error("Failed to initiate consultation call")}},ce=async()=>{console.log("[SipJs] 🔄 completeAttendedTransfer iniciado");const I=e.transferInProgress.value;if(!I)throw console.error("[SipJs] ❌ No hay transferencia en progreso"),new Error("No transfer in progress");console.log("[SipJs] Estado de transferencia:",I);const F=s.value.get(I.originalChannelId),M=s.value.get(I.consultationChannelId);if(console.log("[SipJs] Sesión original:",F?.state),console.log("[SipJs] Sesión de consulta:",M?.state),!F||!M)throw console.error("[SipJs] ❌ Falta una o ambas sesiones"),new Error("Missing session for transfer");if(M.state!==J.Established)throw console.error("[SipJs] ❌ Llamada de consulta no está establecida. Estado:",M.state),new Error("Consultation call not established");const D=M.dialog;if(!D)throw new Error("No dialog available for consultation session");const L=D.callId,Q=D.remoteTag,me=D.localTag;let Ie=bn.makeURI(I.targetNumber);if(!Ie&&r.value?.configuration.uri){const Ge=r.value.configuration.uri.host;Ie=bn.makeURI(`sip:${I.targetNumber}@${Ge}`)}if(!Ie)throw new Error("Invalid transfer target URI");const Me=`${encodeURIComponent(L)}%3Bto-tag%3D${encodeURIComponent(Q)}%3Bfrom-tag%3D${encodeURIComponent(me)}`;Ie.setHeader("Replaces",Me);try{await F.refer(Ie,{onNotify:Ge=>{Ge.accept();const Tt=Ge.request.body,vt=typeof Tt=="string"?Tt:Tt&&typeof Tt=="object"&&"content"in Tt?Tt.content:void 0;if(vt){const Kt=vt.match(/SIP\/2\.0\s+(\d+)/);if(Kt&&Kt[1]){const Qn=parseInt(Kt[1]);Qn>=200&&Qn<300?setTimeout(()=>{F.bye().catch(()=>{}),M.bye().catch(()=>{}),e.setTransferInProgress(null)},500):Qn>=400&&(console.error("[SipJs] Attended transfer failed with status:",Qn),e.setTransferInProgress(null))}}},requestDelegate:{onAccept:()=>{},onReject:Ge=>{console.error("[SipJs] Attended transfer REFER rejected:",Ge.message.statusCode),e.setTransferInProgress(null)}}})}catch(Ge){throw console.error("[SipJs] Attended transfer failed:",Ge),Ge}},ie=async()=>{const I=e.transferInProgress.value;if(!I)throw new Error("No transfer in progress");console.log("[SipJs] Canceling attended transfer...");const F=s.value.get(I.originalChannelId),M=s.value.get(I.consultationChannelId);if(M)try{await M.bye(),console.log("[SipJs] Consultation call ended")}catch(D){console.warn("[SipJs] Error ending consultation:",D)}if(F)try{e.setActiveChannelId(I.originalChannelId),await $(F,!1),e.updateChannelState(I.originalChannelId,{isHeld:!1}),console.log("[SipJs] Returned to original call")}catch(D){console.warn("[SipJs] Error resuming original call:",D)}e.setTransferInProgress(null)},Se=I=>{const F=I.sessionDescriptionHandler;if(!F){console.error("[SipJs] setupRemoteMedia: no sessionDescriptionHandler");return}const M=F.remoteMediaStream;if(!M){console.error("[SipJs] setupRemoteMedia: no remoteMediaStream on SDH");return}if(a.value===M)return;i.pause(),i.srcObject=null,h?.abort(),h=new AbortController,a.value=M,l.value=F.localMediaStream??null;const D=ae(I);W(I,D),D&&_(I,D.id);const L=me=>{m?.abort(),m=new AbortController;const{signal:Ie}=m,Me=()=>{i.play().catch(Ge=>{Ge.name!=="AbortError"&&console.error("[SipJs] play() failed:",Ge.name,Ge.message)})};me.addEventListener("unmute",()=>{Me()},{signal:Ie}),Me()};M.addEventListener("addtrack",me=>{me.track.kind==="audio"&&(i.srcObject=null,i.srcObject=M,L(me.track),D&&_(I,D.id))},{signal:h.signal});const[Q]=M.getTracks();Q&&(i.srcObject=M,L(Q),D&&_(I,D.id))},he=()=>{m?.abort(),m=null,h?.abort(),h=null,i.pause(),i.srcObject=null,a.value=null,l.value=null};return{initUserAgent:Te,stop:ut,makeCall:Qe,answerCall:dt,hangupCall:gt,toggleMute:A,toggleHold:Y,sendDTMF:ne,transferCall:de,startAttendedTransfer:ue,completeAttendedTransfer:ce,cancelAttendedTransfer:ie,switchChannel:oe,extension:T,setVolume:V,setNotificationVolume:O,setOutputDevice:j,setInputDevice:X,remoteStream:a,localStream:l}};var pp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e;const hp=Uf,Qw=(e,t)=>r=>{var n;if(t?.variants==null)return hp(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=pp(u)||pp(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 hp(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 ey(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ty(e,t,r){ey(e,t),t.set(e,r)}function ry(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 Ro(e,t){return e.get(ry(e,t))}function gp(e){return typeof e=="string"?`'${e}'`:new ny().serialize(e)}var ny=(function(){var e=new WeakMap;class t{constructor(){ty(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=Ro(e,this).get(n);return s===void 0&&(Ro(e,this).set(n,`#${Ro(e,this).size}`),s=this.serializeObject(n),Ro(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 sy(e,t){return e===t||gp(e)===gp(t)}function yi(e,t=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY){return Math.min(r,Math.max(t,e))}function $t(e,t){const r=typeof e=="string"&&!t?`${e}Context`:t,n=Symbol(r);return[o=>{const a=Ht(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=>(Mn(n,o),o)]}function Yt(){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 Rl(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 $l(e){return e==null}function Pl(e){return e?e.flatMap(t=>t.type===Le?Pl(t.children):[t]):[]}var[$o,ux]=$t("ConfigProvider");function iy(e,t){var r;const n=nt();return rt(()=>{n.value=e()},{...t,flush:(r=t?.flush)!==null&&r!==void 0?r:"sync"}),kt(n)}function xn(e,t){return Di()?(fa(e,t),!0):!1}function oy(){const e=new Set,t=i=>{e.delete(i)};return{on:i=>{e.add(i);const o=()=>t(i);return xn(o),{off:o}},off:t,trigger:(...i)=>Promise.all(Array.from(e).map(o=>o(...i))),clear:()=>{e.clear()}}}function ay(e){let t=!1,r;const n=da(!0);return((...s)=>(t||(r=n.run(()=>e(...s)),t=!0),r))}var Pt=typeof window<"u"&&typeof document<"u",dx=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,ly=e=>typeof e<"u",cy=Object.prototype.toString,uy=e=>cy.call(e)==="[object Object]",Zr=()=>{},Dl=dy();function dy(){var e,t,r;return Pt&&!!(!((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 fy(...e){if(e.length!==1)return xa(...e);const t=e[0];return typeof t=="function"?kt(js(()=>({get:t,set:Zr}))):K(t)}function vp(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 mp=e=>e();function py(e,t={}){let r,n,s=Zr;const i=l=>{clearTimeout(l),s(),s=Zr};let o;return l=>{const u=xe(e),c=xe(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 hy(e=mp,t={}){const{initialState:r="active"}=t,n=fy(r==="active");function s(){n.value=!1}function i(){n.value=!0}return{isActive:kt(n),pause:s,resume:i,eventFilter:(...a)=>{n.value&&e(...a)}}}function Ol(e){return Array.isArray(e)?e:[e]}function wp(e){const t=Object.create(null);return(r=>t[r]||(t[r]=e(r)))}var gy=/\B([A-Z])/g,fx=wp(e=>e.replace(gy,"-$1").toLowerCase()),vy=/-(\w)/g,px=wp(e=>e.replace(vy,(t,r)=>r?r.toUpperCase():""));function yp(e){return e||at()}function my(e){if(!Pt)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=da(!0),r=n.run(()=>e(...i))),xn(s),r))}function wy(e){return qr(Je(e)?new Proxy({},{get(t,r,n){return f(Reflect.get(e.value,r,n))},set(t,r,n){return Je(e.value[r])&&!Je(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 yy(e){return wy(z(e))}function Ut(e,...t){const r=t.flat(),n=r[0];return yy(()=>Object.fromEntries(typeof n=="function"?Object.entries(It(e)).filter(([s,i])=>!n(xe(i),s)):Object.entries(It(e)).filter(s=>!r.includes(s[0]))))}function bp(e,t=1e4){return js((r,n)=>{let s=xe(e),i;const o=()=>setTimeout(()=>{s=xe(e),n()},xe(t));return xn(()=>{clearTimeout(i)}),{get(){return r(),s},set(a){s=a,n(),clearTimeout(i),i=o()}}})}function Hl(e,t=200,r={}){return vp(py(t,r),e)}function by(e,t,r={}){const{eventFilter:n=mp,...s}=r;return Re(e,vp(n,t),s)}function _y(e,t,r={}){const{eventFilter:n,initialState:s="active",...i}=r,{eventFilter:o,pause:a,resume:l,isActive:u}=hy(n,{initialState:s});return{stop:by(e,t,{...i,eventFilter:o}),pause:a,resume:l,isActive:u}}function Sy(e,t={}){if(!Je(e))return It(e);const r=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const n in e.value)r[n]=js(()=>({get(){return e.value[n]},set(s){var i;if(!((i=xe(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 Cy(e,t){yp(t)&&vs(e,t)}function xy(e,t=!0,r){yp(r)?We(e,r):t?e():wt(e)}function Ty(e,t=1e3,r={}){const{immediate:n=!0,immediateCallback:s=!1}=r;let i=null;const o=nt(!1);function a(){i&&(clearInterval(i),i=null)}function l(){o.value=!1,a()}function u(){const c=xe(t);c<=0||(o.value=!0,s&&e(),a(),o.value&&(i=setInterval(e,c)))}return n&&Pt&&u(),(Je(t)||typeof t=="function")&&xn(Re(t,()=>{o.value&&Pt&&u()})),xn(l),{isActive:Br(o),pause:l,resume:u}}function _p(e,t,r={}){const{immediate:n=!0,immediateCallback:s=!1}=r,i=nt(!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)},xe(t))}return n&&(i.value=!0,Pt&&u()),xn(l),{isPending:Br(i),start:u,stop:l}}function Ey(e,t,r){return Re(e,t,{...r,immediate:!0})}function Ay(e,t,r){return Re(e,t,{...r,once:!0})}var br=Pt?window:void 0,hx=Pt?window.document:void 0,gx=Pt?window.navigator:void 0,vx=Pt?window.location:void 0;function zt(e){var t;const r=xe(e);return(t=r?.$el)!==null&&t!==void 0?t:r}function qt(...e){const t=(n,s,i,o)=>(n.addEventListener(s,i,o),()=>n.removeEventListener(s,i,o)),r=z(()=>{const n=Ol(xe(e[0])).filter(s=>s!=null);return n.every(s=>typeof s!="string")?n:void 0});return Ey(()=>{var n,s;return[(n=(s=r.value)===null||s===void 0?void 0:s.map(i=>zt(i)))!==null&&n!==void 0?n:[br].filter(i=>i!=null),Ol(xe(r.value?e[1]:e[0])),Ol(f(r.value?e[2]:e[1])),xe(r.value?e[3]:e[2])]},([n,s,i,o],a,l)=>{if(!n?.length||!s?.length||!i?.length)return;const u=uy(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 Sp=!1;function ky(e,t,r={}){const{window:n=br,ignore:s=[],capture:i=!0,detectIframe:o=!1,controls:a=!1}=r;if(!n)return a?{stop:Zr,cancel:Zr,trigger:Zr}:Zr;if(Dl&&!Sp){Sp=!0;const E={passive:!0};Array.from(n.document.body.children).forEach(v=>v.addEventListener("click",Zr,E)),n.document.documentElement.addEventListener("click",Zr,E)}let l=!0;const u=E=>xe(s).some(v=>{if(typeof v=="string")return Array.from(n.document.querySelectorAll(v)).some(T=>T===E.target||E.composedPath().includes(T));{const T=zt(v);return T&&(E.target===T||E.composedPath().includes(T))}});function c(E){const v=xe(E);return v&&v.$.subTree.shapeFlag===16}function d(E,v){const T=xe(E),y=T.$.subTree&&T.$.subTree.children;return y==null||!Array.isArray(y)?!1:y.some(b=>b.el===v.target||v.composedPath().includes(b.el))}const p=E=>{const v=zt(e);if(E.target!=null&&!(!(v instanceof Element)&&c(e)&&d(e,E))&&!(!v||v===E.target||E.composedPath().includes(v))){if("detail"in E&&E.detail===0&&(l=!u(E)),!l){l=!0;return}t(E)}};let h=!1;const m=[qt(n,"click",E=>{h||(h=!0,setTimeout(()=>{h=!1},0),p(E))},{passive:!0,capture:i}),qt(n,"pointerdown",E=>{const v=zt(e);l=!u(E)&&!!(v&&!E.composedPath().includes(v))},{passive:!0}),o&&qt(n,"blur",E=>{setTimeout(()=>{var v;const T=zt(e);((v=n.document.activeElement)===null||v===void 0?void 0:v.tagName)==="IFRAME"&&!T?.contains(n.document.activeElement)&&t(E)},0)},{passive:!0})].filter(Boolean),w=()=>m.forEach(E=>E());return a?{stop:w,cancel:()=>{l=!1},trigger:E=>{l=!0,p(E),l=!1}}:w}function Ml(){const e=nt(!1),t=at();return t&&We(()=>{e.value=!0},t),e}function Cp(e){const t=Ml();return z(()=>(t.value,!!e()))}function Iy(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Ry(...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=br,eventName:i="keydown",passive:o=!1,dedupe:a=!1}=n,l=Iy(t);return qt(s,i,c=>{c.repeat&&xe(a)||l(c)&&r(c)},o)}function $y(e){return JSON.parse(JSON.stringify(e))}var Po=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Do="__vueuse_ssr_handlers__",Py=Dy();function Dy(){return Do in Po||(Po[Do]=Po[Do]||{}),Po[Do]}function Oy(e,t){return Py[e]||t}function Hy(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 My={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()}},xp="vueuse-storage";function Oo(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=br,eventFilter:p,onError:h=N=>{console.error(N)},initOnMounted:m}=n,w=(c?nt:K)(typeof t=="function"?t():t),E=z(()=>xe(e));if(!r)try{r=Oy("getDefaultStorage",()=>br?.localStorage)()}catch(N){h(N)}if(!r)return w;const v=xe(t),T=Hy(v),y=(s=n.serializer)!==null&&s!==void 0?s:My[T],{pause:b,resume:x}=_y(w,N=>B(N),{flush:i,deep:o,eventFilter:p});Re(E,()=>_(),{flush:i});let k=!1;const O=N=>{m&&!k||_(N)},g=N=>{m&&!k||C(N)};d&&a&&(r instanceof Storage?qt(d,"storage",O,{passive:!0}):qt(d,xp,g)),m?xy(()=>{k=!0,_()}):_();function q(N,V){if(d){const j={key:E.value,oldValue:N,newValue:V,storageArea:r};d.dispatchEvent(r instanceof Storage?new StorageEvent("storage",j):new CustomEvent(xp,{detail:j}))}}function B(N){try{const V=r.getItem(E.value);if(N==null)q(V,null),r.removeItem(E.value);else{const j=y.write(N);V!==j&&(r.setItem(E.value,j),q(V,j))}}catch(V){h(V)}}function S(N){const V=N?N.newValue:r.getItem(E.value);if(V==null)return l&&v!=null&&r.setItem(E.value,y.write(v)),v;if(!N&&u){const j=y.read(V);return typeof u=="function"?u(j,v):T==="object"&&!Array.isArray(j)?{...v,...j}:j}else return typeof V!="string"?V:y.read(V)}function _(N){if(!(N&&N.storageArea!==r)){if(N&&N.key==null){w.value=v;return}if(!(N&&N.key!==E.value)){b();try{const V=y.write(w.value);(N===void 0||N?.newValue!==V)&&(w.value=S(N))}catch(V){h(V)}finally{N?wt(x):x()}}}}function C(N){_(N.detail)}return w}var Ho={speed:2,margin:30,direction:"both"};function Ny(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 qy(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=br,containerElement:E,handle:v=e,buttons:T=[0],restrictInView:y,autoScroll:b=!1}=t,x=K((r=xe(h))!==null&&r!==void 0?r:{x:0,y:0}),k=K(),O=ae=>o?o.includes(ae.pointerType):!0,g=ae=>{xe(a)&&ae.preventDefault(),xe(l)&&ae.stopPropagation()},q=xe(b),B=typeof q=="object"?{speed:(n=xe(q.speed))!==null&&n!==void 0?n:Ho.speed,margin:(s=xe(q.margin))!==null&&s!==void 0?s:Ho.margin,direction:(i=q.direction)!==null&&i!==void 0?i:Ho.direction}:Ho,S=ae=>typeof ae=="number"?[ae,ae]:[ae.x,ae.y],_=(ae,fe,Ce)=>{const{clientWidth:Oe,clientHeight:Te,scrollLeft:ke,scrollTop:Ze,scrollWidth:ut,scrollHeight:Ve}=ae,[Qe,dt]=S(B.margin),[gt,A]=S(B.speed);let $=0,Y=0;(B.direction==="x"||B.direction==="both")&&(Ce.x<Qe&&ke>0?$=-gt:Ce.x+fe.width>Oe-Qe&&ke<ut-Oe&&($=gt)),(B.direction==="y"||B.direction==="both")&&(Ce.y<dt&&Ze>0?Y=-A:Ce.y+fe.height>Te-dt&&Ze<Ve-Te&&(Y=A)),($||Y)&&ae.scrollBy({left:$,top:Y,behavior:"auto"})};let C=null;const N=()=>{const ae=xe(E);ae&&!C&&(C=setInterval(()=>{const fe=xe(e).getBoundingClientRect(),{x:Ce,y:Oe}=x.value,Te={x:Ce-ae.scrollLeft,y:Oe-ae.scrollTop};Te.x>=0&&Te.y>=0&&(_(ae,fe,Te),Te.x+=ae.scrollLeft,Te.y+=ae.scrollTop,x.value=Te)},1e3/60))},V=()=>{C&&(clearInterval(C),C=null)},j=(ae,fe,Ce,Oe)=>{const[Te,ke]=typeof Ce=="number"?[Ce,Ce]:[Ce.x,Ce.y],{clientWidth:Ze,clientHeight:ut}=fe;return ae.x<Te||ae.x+Oe.width>Ze-Te||ae.y<ke||ae.y+Oe.height>ut-ke},X=()=>{if(xe(t.disabled)||!k.value)return;const ae=xe(E);if(!ae)return;const fe=xe(e).getBoundingClientRect(),{x:Ce,y:Oe}=x.value;j({x:Ce-ae.scrollLeft,y:Oe-ae.scrollTop},ae,B.margin,fe)?N():V()};xe(b)&&Re(x,X);const Z=ae=>{var fe;if(!xe(T).includes(ae.button)||xe(t.disabled)||!O(ae)||xe(u)&&ae.target!==xe(e))return;const Ce=xe(E),Oe=Ce==null||(fe=Ce.getBoundingClientRect)===null||fe===void 0?void 0:fe.call(Ce),Te=xe(e).getBoundingClientRect(),ke={x:ae.clientX-(Ce?Te.left-Oe.left+(b?0:Ce.scrollLeft):Te.left),y:ae.clientY-(Ce?Te.top-Oe.top+(b?0:Ce.scrollTop):Te.top)};p?.(ke,ae)!==!1&&(k.value=ke,g(ae))},le=ae=>{if(xe(t.disabled)||!O(ae)||!k.value)return;const fe=xe(E);fe instanceof HTMLElement&&Ny(fe);const Ce=xe(e).getBoundingClientRect();let{x:Oe,y:Te}=x.value;if((m==="x"||m==="both")&&(Oe=ae.clientX-k.value.x,fe&&(Oe=Math.min(Math.max(0,Oe),fe.scrollWidth-Ce.width))),(m==="y"||m==="both")&&(Te=ae.clientY-k.value.y,fe&&(Te=Math.min(Math.max(0,Te),fe.scrollHeight-Ce.height))),xe(b)&&fe&&(C===null&&_(fe,Ce,{x:Oe,y:Te}),Oe+=fe.scrollLeft,Te+=fe.scrollTop),fe&&(y||b)){if(m!=="y"){const ke=Oe-fe.scrollLeft;ke<0?Oe=fe.scrollLeft:ke>fe.clientWidth-Ce.width&&(Oe=fe.clientWidth-Ce.width+fe.scrollLeft)}if(m!=="x"){const ke=Te-fe.scrollTop;ke<0?Te=fe.scrollTop:ke>fe.clientHeight-Ce.height&&(Te=fe.clientHeight-Ce.height+fe.scrollTop)}}x.value={x:Oe,y:Te},c?.(x.value,ae),g(ae)},W=ae=>{xe(t.disabled)||!O(ae)||k.value&&(k.value=void 0,b&&V(),d?.(x.value,ae),g(ae))};if(Pt){const ae=()=>{var fe;return{capture:(fe=t.capture)!==null&&fe!==void 0?fe:!0,passive:!xe(a)}};qt(v,"pointerdown",Z,ae),qt(w,"pointermove",le,ae),qt(w,"pointerup",W,ae)}return{...Sy(x),position:x,isDragging:z(()=>!!k.value),style:z(()=>`
69
+ left: ${x.value.x}px;
70
+ top: ${x.value.y}px;
71
+ ${b?"text-wrap: nowrap;":""}
72
+ `)}}function Gn(e,t,r={}){const{window:n=br,...s}=r;let i;const o=Cp(()=>n&&"ResizeObserver"in n),a=()=>{i&&(i.disconnect(),i=void 0)},l=Re(z(()=>{const c=xe(e);return Array.isArray(c)?c.map(d=>zt(d)):[zt(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 xn(u),{isSupported:o,stop:u}}function By(e={}){const{window:t=br}=e,r=t?.navigator,n=Cp(()=>r&&"connection"in r),s=nt(!0),i=nt(!1),o=nt(void 0),a=nt(void 0),l=nt(void 0),u=nt(void 0),c=nt(void 0),d=nt(void 0),p=nt("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&&(qt(t,"offline",()=>{s.value=!1,o.value=Date.now()},w),qt(t,"online",()=>{s.value=!0,a.value=Date.now()},w)),h&&qt(h,"change",m,w),m(),{isSupported:n,isOnline:kt(s),saveData:kt(i),offlineAt:kt(o),onlineAt:kt(a),downlink:kt(l),downlinkMax:kt(u),effectiveType:kt(d),rtt:kt(c),type:kt(p)}}var mx=[{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 xs(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=at(),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=T=>o?typeof o=="function"?o(T):$y(T):T,E=()=>ly(e[t])?w(e[t]):c,v=T=>{d?d(T)&&h(m,T):h(m,T)};if(a){const T=K(E());let y=!1;return Re(()=>e[t],b=>{y||(y=!0,T.value=w(b),wt(()=>y=!1))}),Re(T,b=>{!y&&(b!==e[t]||u)&&v(b)},{deep:u}),T}else return z({get(){return E()},set(T){v(T)}})}function Nl(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 ql(e,t,r=".",n){if(!Nl(t))return ql(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]]:Nl(o)&&Nl(s[i])?s[i]=ql(o,s[i],(r?`${r}.`:"")+i.toString(),n):s[i]=o))}return s}function Bl(e){return(...t)=>t.reduce((r,n)=>ql(r,n,"",e),{})}var Tp=Bl(),wx=Bl((e,t,r)=>{if(e[t]!==void 0&&typeof r=="function")return e[t]=r(e[t]),!0}),yx=Bl((e,t,r)=>{if(Array.isArray(e[t])&&typeof r=="function")return e[t]=r(e[t]),!0}),Ly=my(()=>{const e=K(new Map),t=K(),r=z(()=>{for(const o of e.value.values())if(o)return!0;return!1}),n=$o({scrollBody:K(!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??"",Dl&&s?.(),t.value=void 0};return Re(r,(o,a)=>{if(!Pt)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"?Tp({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"),Dl&&(s=qt(document,"touchmove",d=>Fy(d),{passive:!1})),wt(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),e});function Ep(e){const t=Math.random().toString(36).substring(2,7),r=Ly();r.value.set(t,e??!1);const n=z({get:()=>r.value.get(t)??!1,set:s=>r.value.set(t,s)});return Cy(()=>{r.value.delete(t)}),n}function Ap(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:Ap(r)}}function Fy(e){const t=e||window.event,r=t.target;return r instanceof Element&&Ap(r)?!1:t.touches.length>1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}function Ll(e){const t=$o({dir:K("ltr")});return z(()=>e?.value||t.dir?.value||"ltr")}function Mo(e){const t=at(),r=t?.type.emits,n={};return r?.length||console.warn(`No emitted event found. Please check component: ${t?.type.__name}`),r?.forEach(s=>{n[ss(ft(s))]=(...i)=>e(s,...i)}),n}var Fl=0;function Vy(){rt(e=>{if(!Pt)return;const t=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",t[0]??kp()),document.body.insertAdjacentElement("beforeend",t[1]??kp()),Fl++,e(()=>{Fl===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(r=>r.remove()),Fl--})})}function kp(){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 Ip(e){return z(()=>xe(e)?!!zt(e)?.closest("form"):!0)}function Ae(){const e=at(),t=K(),r=z(()=>n());Xs(()=>{r.value!==n()&&su(t)});function n(){return t.value&&"$el"in t.value&&["#text","#comment"].includes(t.value.$el.nodeName)?t.value.$el.nextElementSibling:zt(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 Xr(e){const t=at(),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=xa(e);return z(()=>{const s={},i=t?.vnode.props??{};return Object.keys(i).forEach(o=>{s[ft(o)]=i[o]}),Object.keys({...r,...s}).reduce((o,a)=>(n.value[a]!==void 0&&(o[a]=n.value[a]),o),{})})}function Qr(e,t){const r=Xr(e),n=t?Mo(t):{};return z(()=>({...r.value,...n}))}function jy(e,t){const r=bp(!1,300);xn(()=>{r.value=!1});const n=K(null),s=oy();function i(){n.value=null,r.value=!1}function o(a,l){const u=a.currentTarget,c={x:a.clientX,y:a.clientY},d=zy(c,Uy(c,u.getBoundingClientRect()),1),p=Ky(l.getBoundingClientRect());n.value=Gy([...d,...p]),r.value=!0}return rt(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)})}}),rt(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=!Wy(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 Uy(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 zy(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 Ky(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 Wy(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 Gy(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),Jy(t)}function Jy(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 Yy=function(e){return typeof document>"u"?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Ts=new WeakMap,No=new WeakMap,qo={},Vl=0,Rp=function(e){return e&&(e.host||Rp(e.parentNode))},Zy=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Rp(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})},Xy=function(e,t,r,n){var s=Zy(t,Array.isArray(e)?e:[e]);qo[r]||(qo[r]=new WeakMap);var i=qo[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=(Ts.get(p)||0)+1,E=(i.get(p)||0)+1;Ts.set(p,w),i.set(p,E),o.push(p),w===1&&m&&No.set(p,!0),E===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(),Vl++,function(){o.forEach(function(d){var p=Ts.get(d)-1,h=i.get(d)-1;Ts.set(d,p),i.set(d,h),p||(No.has(d)||d.removeAttribute(n),No.delete(d)),h||d.removeAttribute(r)}),Vl--,Vl||(Ts=new WeakMap,Ts=new WeakMap,No=new WeakMap,qo={})}},Qy=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=t||Yy(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live], script"))),Xy(n,s,r,"aria-hidden")):function(){return null}};function $p(e){let t;Re(()=>zt(e),r=>{r?t=Qy(r):t&&t()}),Mt(()=>{t&&t()})}var eb=0;function Es(e,t="reka"){if(e)return e;let r;return"useId"in v0?r=ku?.():r=$o({useId:void 0}).useId?.()??`${++eb}`,t?`${t}-${r}`:r}function Pp(e){const t=K(),r=z(()=>t.value?.width??0),n=z(()=>t.value?.height??0);return We(()=>{const s=zt(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 jl(e,t){const r=K(e);function n(i){return t[r.value][i]??r.value}return{state:r,dispatch:i=>{r.value=n(i)}}}function Dp(e){const t=bp("",1e3);return{search:t,handleTypeaheadSearch:(s,i)=>{if(t.value=t.value+s,e)e(s);else{const o=Yt(),a=i.map(d=>({...d,textValue:d.value?.textValue??d.ref.textContent?.trim()??""})),l=a.find(d=>d.ref===o),u=rb(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 tb(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function rb(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=tb(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 nb(e,t){const r=K({}),n=K("none"),s=K(e),i=e.value?"mounted":"unmounted";let o;const a=t.value?.ownerDocument.defaultView??br,{state:l,dispatch:u}=jl(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),c=w=>{if(Pt){const E=new CustomEvent(w,{bubbles:!1,cancelable:!1});t.value?.dispatchEvent(E)}};Re(e,async(w,E)=>{const v=E!==w;if(await wt(),v){const T=n.value,y=Bo(t.value);w?(u("MOUNT"),c("enter"),y==="none"&&c("after-enter")):y==="none"||y==="undefined"||r.value?.display==="none"?(u("UNMOUNT"),c("leave"),c("after-leave")):E&&T!==y?(u("ANIMATION_OUT"),c("leave")):(u("UNMOUNT"),c("after-leave"))}},{immediate:!0});const d=w=>{const E=Bo(t.value),v=E.includes(CSS.escape(w.animationName)),T=l.value==="mounted"?"enter":"leave";if(w.target===t.value&&v&&(c(`after-${T}`),u("ANIMATION_END"),!s.value)){const y=t.value.style.animationFillMode;t.value.style.animationFillMode="forwards",o=a?.setTimeout(()=>{t.value?.style.animationFillMode==="forwards"&&(t.value.style.animationFillMode=y)})}w.target===t.value&&E==="none"&&u("ANIMATION_END")},p=w=>{w.target===t.value&&(n.value=Bo(t.value))},h=Re(t,(w,E)=>{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),E?.removeEventListener("animationstart",p),E?.removeEventListener("animationcancel",d),E?.removeEventListener("animationend",d))},{immediate:!0}),m=Re(l,()=>{const w=Bo(t.value);n.value=l.value==="mounted"?w:"none"});return Mt(()=>{h(),m()}),{isPresent:z(()=>["mounted","unmountSuspended"].includes(l.value))}}function Bo(e){return e&&getComputedStyle(e).animationName||"none"}var Tn=ee({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:r}){const{present:n,forceMount:s}=It(e),i=K(),{isPresent:o}=nb(n,i);r({present:o});let a=t.default({present:o.value});a=Pl(a||[]);const l=at();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?ir(t.default({present:o.value})[0],{ref:u=>{const c=zt(u);return typeof c?.hasAttribute>"u"||(c?.hasAttribute("data-reka-popper-content-wrapper")?i.value=c.firstElementChild:i.value=c),c}}):null}}),Ul=ee({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:r}){return()=>{if(!r.default)return null;const n=Pl(r.default()),s=n.findIndex(l=>l.type!==ot);if(s===-1)return n;const i=n[s];delete i.props?.ref;const o=i.props?ge(t,i.props):t,a=mr({...i,props:{}},o);return n.length===1?a:(n[s]=a,n)}}}),sb=["area","img","input"],Fe=ee({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"&&sb.includes(n)?()=>ir(n,t):n!=="template"?()=>ir(e.as,t,{default:r.default}):()=>ir(Ul,t,{default:r.default})}});function zl(){const e=U();return{primitiveElement:e,currentElement:j(()=>["#text","#comment"].includes(e.value?.$el.nodeName)?e.value?.$el.nextElementSibling:zt(e))}}var[En,ib]=$t("DialogRoot"),ob=ee({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=Cs(r,"open",t,{defaultValue:r.defaultOpen,passive:r.open===void 0}),s=U(),i=U(),{modal:o}=It(r);return ib({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)=>se(a.$slots,"default",{open:f(n),close:()=>n.value=!1})}}),ab=ee({__name:"DialogClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e;Ae();const r=En();return(n,s)=>(P(),W(f(Fe),ge(t,{type:n.as==="button"?"button":void 0,onClick:s[0]||(s[0]=i=>f(r).onOpenChange(!1))}),{default:R(()=>[se(n.$slots,"default")]),_:3},16,["type"]))}}),lb="dismissableLayer.pointerDownOutside",cb="dismissableLayer.focusOutside";function Op(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 ub(e,t,r=!0){const n=t?.value?.ownerDocument??globalThis?.document,s=U(!1),i=U(()=>{});return rt(o=>{if(!Pt||!xe(r))return;const a=async u=>{const c=u.target;if(!(!t?.value||!c)){if(Op(t.value,c)){s.value=!1;return}if(u.target&&!s.value){let h=function(){Rl(lb,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:()=>{xe(r)&&(s.value=!0)}}}function db(e,t,r=!0){const n=t?.value?.ownerDocument??globalThis?.document,s=U(!1);return rt(i=>{if(!Pt||!xe(r))return;const o=async a=>{if(!t?.value)return;await wt(),await wt();const l=a.target;!t.value||!l||Op(t.value,l)||a.target&&!s.value&&Rl(cb,e,{originalEvent:a})};n.addEventListener("focusin",o),i(()=>n.removeEventListener("focusin",o))}),{onFocusCapture:()=>{xe(r)&&(s.value=!0)},onBlurCapture:()=>{xe(r)&&(s.value=!1)}}}var ur=qr({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,originalBodyPointerEvents:void 0,branches:new Set}),Kl=ee({__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}=Ae(),o=j(()=>i.value?.ownerDocument??globalThis.document),a=j(()=>ur.layersRoot),l=j(()=>i.value?Array.from(a.value).indexOf(i.value):-1),u=j(()=>ur.layersWithOutsidePointerEventsDisabled.size>0),c=j(()=>{const h=Array.from(a.value),[m]=[...ur.layersWithOutsidePointerEventsDisabled].slice(-1),y=h.indexOf(m);return l.value>=y}),d=ub(async h=>{const m=[...ur.branches].some(y=>y?.contains(h.target));!c.value||m||(n("pointerDownOutside",h),n("interactOutside",h),await wt(),h.defaultPrevented||n("dismiss"))},i),p=db(h=>{[...ur.branches].some(m=>m?.contains(h.target))||(n("focusOutside",h),n("interactOutside",h),h.defaultPrevented||n("dismiss"))},i);return Ry("Escape",h=>{l.value===a.value.size-1&&(n("escapeKeyDown",h),h.defaultPrevented||n("dismiss"))}),rt(h=>{i.value&&(r.disableOutsidePointerEvents&&(ur.layersWithOutsidePointerEventsDisabled.size===0&&(ur.originalBodyPointerEvents=o.value.body.style.pointerEvents,o.value.body.style.pointerEvents="none"),ur.layersWithOutsidePointerEventsDisabled.add(i.value)),a.value.add(i.value),h(()=>{r.disableOutsidePointerEvents&&ur.layersWithOutsidePointerEventsDisabled.size===1&&!$l(ur.originalBodyPointerEvents)&&(o.value.body.style.pointerEvents=ur.originalBodyPointerEvents)}))}),rt(h=>{h(()=>{i.value&&(a.value.delete(i.value),ur.layersWithOutsidePointerEventsDisabled.delete(i.value))})}),(h,m)=>(P(),W(f(Fe),{ref:f(s),"as-child":h.asChild,as:h.as,"data-dismissable-layer":"",style:mt({pointerEvents:u.value?c.value?"auto":"none":void 0}),onFocusCapture:f(p).onFocusCapture,onBlurCapture:f(p).onBlurCapture,onPointerdownCapture:f(d).onPointerDownCapture},{default:R(()=>[se(h.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),fb=ay(()=>U([]));function pb(){const e=fb();return{add(t){const r=e.value[0];t!==r&&r?.pause(),e.value=Hp(e.value,t),e.value.unshift(t)},remove(t){e.value=Hp(e.value,t),e.value[0]?.resume()}}}function Hp(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}var Wl="focusScope.autoFocusOnMount",Gl="focusScope.autoFocusOnUnmount",Mp={bubbles:!1,cancelable:!0};function hb(e,{select:t=!1}={}){const r=Yt();for(const n of e)if(An(n,{select:t}),Yt()!==r)return!0}function gb(e){const t=Np(e);return[qp(t,e),qp(t.reverse(),e)]}function Np(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 qp(e,t){for(const r of e)if(!vb(r,{upTo:t}))return r}function vb(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 mb(e){return e instanceof HTMLInputElement&&"select"in e}function An(e,{select:t=!1}={}){if(e&&e.focus){const r=Yt();e.focus({preventScroll:!0}),e!==r&&mb(e)&&t&&e.select()}}var Bp=ee({__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}=Ae(),o=U(null),a=pb(),l=qr({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});rt(c=>{if(!Pt)return;const d=i.value;if(!r.trapped)return;function p(T){if(l.paused||!d)return;const v=T.target;d.contains(v)?o.value=v:An(o.value,{select:!0})}function h(T){if(l.paused||!d)return;const v=T.relatedTarget;v!==null&&(d.contains(v)||An(o.value,{select:!0}))}function m(T){d.contains(o.value)||An(d)}document.addEventListener("focusin",p),document.addEventListener("focusout",h);const y=new MutationObserver(m);d&&y.observe(d,{childList:!0,subtree:!0}),c(()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",h),y.disconnect()})}),rt(async c=>{const d=i.value;if(await wt(),!d)return;a.add(l);const p=Yt();if(!d.contains(p)){const h=new CustomEvent(Wl,Mp);d.addEventListener(Wl,m=>n("mountAutoFocus",m)),d.dispatchEvent(h),h.defaultPrevented||(hb(Np(d),{select:!0}),Yt()===p&&An(d))}c(()=>{d.removeEventListener(Wl,y=>n("mountAutoFocus",y));const h=new CustomEvent(Gl,Mp),m=y=>{n("unmountAutoFocus",y)};d.addEventListener(Gl,m),d.dispatchEvent(h),setTimeout(()=>{h.defaultPrevented||An(p??document.body,{select:!0}),d.removeEventListener(Gl,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=Yt();if(d&&p){const h=c.currentTarget,[m,y]=gb(h);m&&y?!c.shiftKey&&p===y?(c.preventDefault(),r.loop&&An(m,{select:!0})):c.shiftKey&&p===m&&(c.preventDefault(),r.loop&&An(y,{select:!0})):p===h&&c.preventDefault()}}return(c,d)=>(P(),W(f(Fe),{ref_key:"currentRef",ref:s,tabindex:"-1","as-child":c.asChild,as:c.as,onKeydown:u},{default:R(()=>[se(c.$slots,"default")]),_:3},8,["as-child","as"]))}}),Lp=["Enter"," "],wb=["ArrowDown","PageUp","Home"],yb=["ArrowUp","PageDown","End"],bx=[...wb,...yb],_x={ltr:[...Lp,"ArrowRight"],rtl:[...Lp,"ArrowLeft"]};function bb(e){return e?"open":"closed"}function Fp(e){const t=Yt();for(const r of e)if(r===t||(r.focus(),Yt()!==t))return}var Vp=ee({__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=En(),{forwardRef:i,currentElement:o}=Ae();return s.titleId||(s.titleId=Ts(void 0,"reka-dialog-title")),s.descriptionId||(s.descriptionId=Ts(void 0,"reka-dialog-description")),We(()=>{s.contentElement=o,Yt()!==document.body&&(s.triggerElement.value=Yt())}),(a,l)=>(P(),W(f(Bp),{"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:R(()=>[H(f(Kl),ge({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(bb)(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:R(()=>[se(a.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),_b=ee({__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=En(),i=Mo(n),{forwardRef:o,currentElement:a}=Ae();return $p(a),(l,u)=>(P(),W(Vp,ge({...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:R(()=>[se(l.$slots,"default")]),_:3},16,["trap-focus"]))}}),Sb=ee({__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=Mo(t);Ae();const s=En(),i=U(!1),o=U(!1);return(a,l)=>(P(),W(Vp,ge({...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:R(()=>[se(a.$slots,"default")]),_:3},16))}}),Cb=ee({__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=En(),i=Mo(n),{forwardRef:o}=Ae();return(a,l)=>(P(),W(f(Tn),{present:a.forceMount||f(s).open.value},{default:R(()=>[f(s).modal.value?(P(),W(_b,ge({key:0,ref:f(o)},{...r,...f(i),...a.$attrs}),{default:R(()=>[se(a.$slots,"default")]),_:3},16)):(P(),W(Sb,ge({key:1,ref:f(o)},{...r,...f(i),...a.$attrs}),{default:R(()=>[se(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),xb=ee({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=En();return Ep(!0),Ae(),(r,n)=>(P(),W(f(Fe),{as:r.as,"as-child":r.asChild,"data-state":f(t).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:R(()=>[se(r.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),Tb=ee({__name:"DialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=En(),{forwardRef:r}=Ae();return(n,s)=>f(t)?.modal.value?(P(),W(f(Tn),{key:0,present:n.forceMount||f(t).open.value},{default:R(()=>[H(xb,ge(n.$attrs,{ref:f(r),as:n.as,"as-child":n.asChild}),{default:R(()=>[se(n.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):Pe("v-if",!0)}}),Jl=ee({__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=Ml();return(r,n)=>f(t)||r.forceMount?(P(),W(ka,{key:0,to:r.to,disabled:r.disabled,defer:r.defer},[se(r.$slots,"default")],8,["to","disabled","defer"])):Pe("v-if",!0)}}),Eb=ee({__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)=>(P(),W(f(Jl),pr(sr(t)),{default:R(()=>[se(r.$slots,"default")]),_:3},16))}}),Ab=ee({__name:"DialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(e){const t=e,r=En();return Ae(),(n,s)=>(P(),W(f(Fe),ge(t,{id:f(r).titleId}),{default:R(()=>[se(n.$slots,"default")]),_:3},16,["id"]))}}),jp="data-reka-collection-item";function en(e={}){const{key:t="",isProvider:r=!1}=e,n=`${t}CollectionProvider`;let s;r?(s={collectionRef:U(),itemMap:U(new Map)},Mn(n,s)):s=Ht(n);const i=(l=!1)=>{const u=s.collectionRef.value;if(!u)return[];const c=Array.from(u.querySelectorAll(`[${jp}]`)),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=ee({name:"CollectionSlot",inheritAttrs:!1,setup(l,{slots:u,attrs:c}){const{primitiveElement:d,currentElement:p}=zl();return Re(p,()=>{s.collectionRef.value=p.value}),()=>ir(Ul,{ref:d,...c},u)}}),a=ee({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(l,{slots:u,attrs:c}){const{primitiveElement:d,currentElement:p}=zl();return rt(h=>{if(p.value){const m=Sa(p.value);s.itemMap.value.set(m,{ref:p.value,value:l.value}),h(()=>s.itemMap.value.delete(m))}}),()=>ir(Ul,{...c,[jp]:"",ref:d},u)}});return{getItems:i,reactiveItems:j(()=>Array.from(s.itemMap.value.values())),itemMapSize:j(()=>s.itemMap.value.size),CollectionSlot:o,CollectionItem:a}}var Yl=ee({__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)=>(P(),W(f(Fe),{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:R(()=>[se(t.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}}),Up=ee({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}=zl();return Re(j(()=>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)=>(P(),W(Yl,ge({ref_key:"primitiveElement",ref:r},{...t,...s.$attrs},{as:"input"}),null,16))}}),kb=ee({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=j(()=>typeof t.value=="object"&&Array.isArray(t.value)&&t.value.length===0&&t.required),n=j(()=>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)=>(P(),ye(Le,null,[Pe(" We render single input if it's required "),r.value?(P(),W(Up,ge({key:s.name},{...t,...s.$attrs},{name:s.name,value:s.value}),null,16,["name","value"])):(P(!0),ye(Le,{key:1},nr(n.value,o=>(P(),W(Up,ge({key:o.name},{ref_for:!0},{...t,...s.$attrs},{name:o.name,value:o.value}),null,16,["name","value"]))),128))],2112))}}),[zp,Ib]=$t("PopperRoot"),Kp=ee({inheritAttrs:!1,__name:"PopperRoot",setup(e){const t=U();return Ib({anchor:t,onAnchorChange:r=>t.value=r}),(r,n)=>se(r.$slots,"default")}}),Wp=ee({__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}=Ae(),s=zp();return Ea(()=>{s.onAnchorChange(t.reference??n.value)}),(i,o)=>(P(),W(f(Fe),{ref:f(r),as:i.as,"as-child":i.asChild},{default:R(()=>[se(i.$slots,"default")]),_:3},8,["as","as-child"]))}}),Rb={key:0,d:"M0 0L6 6L12 0"},$b={key:1,d:"M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0"},Pb=ee({__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 Ae(),(r,n)=>(P(),W(f(Fe),ge(t,{width:r.width,height:r.height,viewBox:r.asChild?void 0:"0 0 12 6",preserveAspectRatio:r.asChild?void 0:"none"}),{default:R(()=>[se(r.$slots,"default",{},()=>[r.rounded?(P(),ye("path",$b)):(P(),ye("path",Rb))])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}});function Db(e){return e!==null}function Ob(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]=Zl(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 Zl(e){const[t,r="center"]=e.split("-");return[t,r]}var Hb=["top","right","bottom","left"],kn=Math.min,Zt=Math.max,Lo=Math.round,Fo=Math.floor,Rr=e=>({x:e,y:e}),Mb={left:"right",right:"left",bottom:"top",top:"bottom"};function Xl(e,t,r){return Zt(e,kn(t,r))}function tn(e,t){return typeof e=="function"?e(t):e}function rn(e){return e.split("-")[0]}function Es(e){return e.split("-")[1]}function Ql(e){return e==="x"?"y":"x"}function ec(e){return e==="y"?"height":"width"}function $r(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function tc(e){return Ql($r(e))}function Nb(e,t,r){r===void 0&&(r=!1);const n=Es(e),s=tc(e),i=ec(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Vo(o)),[o,Vo(o)]}function qb(e){const t=Vo(e);return[rc(e),t,rc(t)]}function rc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Gp=["left","right"],Jp=["right","left"],Bb=["top","bottom"],Lb=["bottom","top"];function Fb(e,t,r){switch(e){case"top":case"bottom":return r?t?Jp:Gp:t?Gp:Jp;case"left":case"right":return t?Bb:Lb;default:return[]}}function Vb(e,t,r,n){const s=Es(e);let i=Fb(rn(e),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(rc)))),i}function Vo(e){const t=rn(e);return Mb[t]+e.slice(t.length)}function jb(e){return{top:0,right:0,bottom:0,left:0,...e}}function Yp(e){return typeof e!="number"?jb(e):{top:e,right:e,bottom:e,left:e}}function jo(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 Zp(e,t,r){let{reference:n,floating:s}=e;const i=$r(t),o=tc(t),a=ec(o),l=rn(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(Es(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 Ub(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}=tn(t,e),m=Yp(h),y=a[p?d==="floating"?"reference":"floating":d],T=jo(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(y)))==null||r?y:y.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,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),b=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},_=jo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:x,strategy:l}):v);return{top:(T.top-_.top+m.top)/b.y,bottom:(_.bottom-T.bottom+m.bottom)/b.y,left:(T.left-_.left+m.left)/b.x,right:(_.right-T.right+m.right)/b.x}}var zb=50,Kb=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:Ub},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}=Zp(u,n,l),p=n,h=0;const m={};for(let y=0;y<i.length;y++){const T=i[y];if(!T)continue;const{name:v,fn:x}=T,{x:b,y:_,data:C,reset:k}=await x({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=_??d,m[v]={...m[v],...C},k&&h<zb&&(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}=Zp(u,p,l)),y=-1)}return{x:c,y:d,placement:p,strategy:s,middlewareData:m}},Wb=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}=tn(e,t)||{};if(u==null)return{};const d=Yp(c),p={x:r,y:n},h=tc(s),m=ec(h),y=await o.getDimensions(u),T=h==="y",v=T?"top":"left",x=T?"bottom":"right",b=T?"clientHeight":"clientWidth",_=i.reference[m]+i.reference[h]-p[h]-i.floating[m],C=p[h]-i.reference[h],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let O=k?k[b]:0;(!O||!await(o.isElement==null?void 0:o.isElement(k)))&&(O=a.floating[b]||i.floating[m]);const g=_/2-C/2,B=O/2-y[m]/2-1,N=kn(d[v],B),S=kn(d[x],B),w=N,E=O-y[m]-S,q=O/2-y[m]/2+g,Q=Xl(w,q,E),z=!l.arrow&&Es(s)!=null&&q!==Q&&i.reference[m]/2-(q<w?N:S)-y[m]/2<0,X=z?q<w?q-w:q-E:0;return{[h]:p[h]+X,data:{[h]:Q,centerOffset:q-Q-X,...z&&{alignmentOffset:X}},reset:z}}}),Gb=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:y=!0,...T}=tn(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const v=rn(s),x=$r(a),b=rn(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=p||(b||!y?[Vo(a)]:qb(a)),k=m!=="none";!p&&k&&C.push(...Vb(a,y,m,_));const O=[a,...C],g=await l.detectOverflow(t,T),B=[];let N=((n=i.flip)==null?void 0:n.overflows)||[];if(c&&B.push(g[v]),d){const q=Nb(s,o,_);B.push(g[q[0]],g[q[1]])}if(N=[...N,{placement:s,overflows:B}],!B.every(q=>q<=0)){var S,w;const q=(((S=i.flip)==null?void 0:S.index)||0)+1,Q=O[q];if(Q&&(!(d==="alignment"&&x!==$r(Q))||N.every(X=>$r(X.placement)===x?X.overflows[0]>0:!0)))return{data:{index:q,overflows:N},reset:{placement:Q}};let z=(w=N.filter(X=>X.overflows[0]<=0).sort((X,Y)=>X.overflows[1]-Y.overflows[1])[0])==null?void 0:w.placement;if(!z)switch(h){case"bestFit":{var E;const X=(E=N.filter(Y=>{if(k){const le=$r(Y.placement);return le===x||le==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(le=>le>0).reduce((le,K)=>le+K,0)]).sort((Y,le)=>Y[1]-le[1])[0])==null?void 0:E[0];X&&(z=X);break}case"initialPlacement":z=a;break}if(s!==z)return{reset:{placement:z}}}return{}}}};function Xp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Qp(e){return Hb.some(t=>e[t]>=0)}var Jb=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:s="referenceHidden",...i}=tn(e,t);switch(s){case"referenceHidden":{const o=Xp(await n.detectOverflow(t,{...i,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Qp(o)}}}case"escaped":{const o=Xp(await n.detectOverflow(t,{...i,altBoundary:!0}),r.floating);return{data:{escapedOffsets:o,escaped:Qp(o)}}}default:return{}}}}},eh=new Set(["left","top"]);async function Yb(e,t){const{placement:r,platform:n,elements:s}=e,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=rn(r),a=Es(r),l=$r(r)==="y",u=eh.has(o)?-1:1,c=i&&l?-1:1,d=tn(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 Zb=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 Yb(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}}}}},Xb=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,y:b}=v;return{x,y:b}}},...u}=tn(e,t),c={x:r,y:n},d=await i.detectOverflow(t,u),p=$r(rn(s)),h=Ql(p);let m=c[h],y=c[p];if(o){const v=h==="y"?"top":"left",x=h==="y"?"bottom":"right",b=m+d[v],_=m-d[x];m=Xl(b,m,_)}if(a){const v=p==="y"?"top":"left",x=p==="y"?"bottom":"right",b=y+d[v],_=y-d[x];y=Xl(b,y,_)}const T=l.fn({...t,[h]:m,[p]:y});return{...T,data:{x:T.x-r,y:T.y-n,enabled:{[h]:o,[p]:a}}}}}},Qb=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}=tn(e,t),c={x:r,y:n},d=$r(s),p=Ql(d);let h=c[p],m=c[d];const y=tn(a,t),T=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const b=p==="y"?"height":"width",_=i.reference[p]-i.floating[b]+T.mainAxis,C=i.reference[p]+i.reference[b]-T.mainAxis;h<_?h=_:h>C&&(h=C)}if(u){var v,x;const b=p==="y"?"width":"height",_=eh.has(rn(s)),C=i.reference[d]-i.floating[b]+(_&&((v=o.offset)==null?void 0:v[d])||0)+(_?0:T.crossAxis),k=i.reference[d]+i.reference[b]+(_?0:((x=o.offset)==null?void 0:x[d])||0)-(_?T.crossAxis:0);m<C?m=C:m>k&&(m=k)}return{[p]:h,[d]:m}}}},e1=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}=tn(e,t),c=await o.detectOverflow(t,u),d=rn(s),p=Es(s),h=$r(s)==="y",{width:m,height:y}=i.floating;let T,v;d==="top"||d==="bottom"?(T=d,v=p===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,T=p==="end"?"top":"bottom");const x=y-c.top-c.bottom,b=m-c.left-c.right,_=kn(y-c[T],x),C=kn(m-c[v],b),k=!t.middlewareData.shift;let O=_,g=C;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(g=b),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(O=x),k&&!p){const N=Zt(c.left,0),S=Zt(c.right,0),w=Zt(c.top,0),E=Zt(c.bottom,0);h?g=m-2*(N!==0||S!==0?N+S:Zt(c.left,c.right)):O=y-2*(w!==0||E!==0?w+E:Zt(c.top,c.bottom))}await l({...t,availableWidth:g,availableHeight:O});const B=await o.getDimensions(a.floating);return m!==B.width||y!==B.height?{reset:{rects:!0}}:{}}}};function Uo(){return typeof window<"u"}function Gn(e){return nc(e)?(e.nodeName||"").toLowerCase():"#document"}function Xt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Pr(e){var t;return(t=(nc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function nc(e){return Uo()?e instanceof Node||e instanceof Xt(e).Node:!1}function _r(e){return Uo()?e instanceof Element||e instanceof Xt(e).Element:!1}function nn(e){return Uo()?e instanceof HTMLElement||e instanceof Xt(e).HTMLElement:!1}function th(e){return!Uo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Xt(e).ShadowRoot}function bi(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=Sr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&s!=="inline"&&s!=="contents"}function t1(e){return/^(table|td|th)$/.test(Gn(e))}function zo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var r1=/transform|translate|scale|rotate|perspective|filter/,n1=/paint|layout|strict|content/,Jn=e=>!!e&&e!=="none",sc;function ic(e){const t=_r(e)?Sr(e):e;return Jn(t.transform)||Jn(t.translate)||Jn(t.scale)||Jn(t.rotate)||Jn(t.perspective)||!oc()&&(Jn(t.backdropFilter)||Jn(t.filter))||r1.test(t.willChange||"")||n1.test(t.contain||"")}function s1(e){let t=In(e);for(;nn(t)&&!As(t);){if(ic(t))return t;if(zo(t))return null;t=In(t)}return null}function oc(){return sc==null&&(sc=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),sc}function As(e){return/^(html|body|#document)$/.test(Gn(e))}function Sr(e){return Xt(e).getComputedStyle(e)}function Ko(e){return _r(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function In(e){if(Gn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||th(e)&&e.host||Pr(e);return th(t)?t.host:t}function rh(e){const t=In(e);return As(t)?e.ownerDocument?e.ownerDocument.body:e.body:nn(t)&&bi(t)?t:rh(t)}function _i(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=rh(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=Xt(s);if(i){const a=ac(o);return t.concat(o,o.visualViewport||[],bi(s)?s:[],a&&r?_i(a):[])}else return t.concat(s,_i(s,[],r))}function ac(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function nh(e){const t=Sr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=nn(e),i=s?e.offsetWidth:r,o=s?e.offsetHeight:n,a=Lo(r)!==i||Lo(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function lc(e){return _r(e)?e:e.contextElement}function ks(e){const t=lc(e);if(!nn(t))return Rr(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:i}=nh(t);let o=(i?Lo(r.width):r.width)/n,a=(i?Lo(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var i1=Rr(0);function sh(e){const t=Xt(e);return!oc()||!t.visualViewport?i1:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function o1(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Xt(e)?!1:t}function Yn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),i=lc(e);let o=Rr(1);t&&(n?_r(n)&&(o=ks(n)):o=ks(e));const a=o1(i,r,n)?sh(i):Rr(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=Xt(i),h=n&&_r(n)?Xt(n):n;let m=p,y=ac(m);for(;y&&n&&h!==m;){const T=ks(y),v=y.getBoundingClientRect(),x=Sr(y),b=v.left+(y.clientLeft+parseFloat(x.paddingLeft))*T.x,_=v.top+(y.clientTop+parseFloat(x.paddingTop))*T.y;l*=T.x,u*=T.y,c*=T.x,d*=T.y,l+=b,u+=_,m=Xt(y),y=ac(m)}}return jo({width:c,height:d,x:l,y:u})}function Wo(e,t){const r=Ko(e).scrollLeft;return t?t.left+r:Yn(Pr(e)).left+r}function ih(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-Wo(e,r),y:r.top+t.scrollTop}}function a1(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const i=s==="fixed",o=Pr(n),a=t?zo(t.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},u=Rr(1);const c=Rr(0),d=nn(n);if((d||!d&&!i)&&((Gn(n)!=="body"||bi(o))&&(l=Ko(n)),d)){const h=Yn(n);u=ks(n),c.x=h.x+n.clientLeft,c.y=h.y+n.clientTop}const p=o&&!d&&!i?ih(o,l):Rr(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 l1(e){return Array.from(e.getClientRects())}function c1(e){const t=Pr(e),r=Ko(e),n=e.ownerDocument.body,s=Zt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Zt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+Wo(e);const a=-r.scrollTop;return Sr(n).direction==="rtl"&&(o+=Zt(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}var oh=25;function u1(e,t){const r=Xt(e),n=Pr(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=oc();(!c||c&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}const u=Wo(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<=oh&&(i-=m)}else u<=oh&&(i+=u);return{width:i,height:o,x:a,y:l}}function d1(e,t){const r=Yn(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,i=nn(e)?ks(e):Rr(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:s*i.x,y:n*i.y}}function ah(e,t,r){let n;if(t==="viewport")n=u1(e,r);else if(t==="document")n=c1(Pr(e));else if(_r(t))n=d1(t,r);else{const s=sh(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return jo(n)}function lh(e,t){const r=In(e);return r===t||!_r(r)||As(r)?!1:Sr(r).position==="fixed"||lh(r,t)}function f1(e,t){const r=t.get(e);if(r)return r;let n=_i(e,[],!1).filter(a=>_r(a)&&Gn(a)!=="body"),s=null;const i=Sr(e).position==="fixed";let o=i?In(e):e;for(;_r(o)&&!As(o);){const a=Sr(o),l=ic(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&s&&(s.position==="absolute"||s.position==="fixed")||bi(o)&&!l&&lh(e,o))?n=n.filter(u=>u!==o):s=a,o=In(o)}return t.set(e,n),n}function p1(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const i=[...r==="clippingAncestors"?zo(t)?[]:f1(t,this._c):[].concat(r),n],o=ah(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=ah(t,i[d],s);a=Zt(p.top,a),l=kn(p.right,l),u=kn(p.bottom,u),c=Zt(p.left,c)}return{width:l-c,height:u-a,x:c,y:a}}function h1(e){const{width:t,height:r}=nh(e);return{width:t,height:r}}function g1(e,t,r){const n=nn(t),s=Pr(t),i=r==="fixed",o=Yn(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Rr(0);function u(){l.x=Wo(s)}if(n||!n&&!i)if((Gn(t)!=="body"||bi(s))&&(a=Ko(t)),n){const d=Yn(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?ih(s,a):Rr(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 cc(e){return Sr(e).position==="static"}function ch(e,t){if(!nn(e)||Sr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Pr(e)===r&&(r=r.ownerDocument.body),r}function uh(e,t){const r=Xt(e);if(zo(e))return r;if(!nn(e)){let s=In(e);for(;s&&!As(s);){if(_r(s)&&!cc(s))return s;s=In(s)}return r}let n=ch(e,t);for(;n&&t1(n)&&cc(n);)n=ch(n,t);return n&&As(n)&&cc(n)&&!ic(n)?r:n||s1(e)||r}var v1=async function(e){const t=this.getOffsetParent||uh,r=this.getDimensions,n=await r(e.floating);return{reference:g1(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function m1(e){return Sr(e).direction==="rtl"}var w1={convertOffsetParentRelativeRectToViewportRelativeRect:a1,getDocumentElement:Pr,getClippingRect:p1,getOffsetParent:uh,getElementRects:v1,getClientRects:l1,getDimensions:h1,getScale:ks,isElement:_r,isRTL:m1};function dh(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function y1(e,t){let r=null,n;const s=Pr(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=Fo(d),y=Fo(s.clientWidth-(c+p)),T=Fo(s.clientHeight-(d+h)),v=Fo(c),x={rootMargin:-m+"px "+-y+"px "+-T+"px "+-v+"px",threshold:Zt(0,kn(1,l))||1};let b=!0;function _(C){const k=C[0].intersectionRatio;if(k!==l){if(!b)return o();k?o(!1,k):n=setTimeout(()=>{o(!1,1e-7)},1e3)}k===1&&!dh(u,e.getBoundingClientRect())&&o(),b=!1}try{r=new IntersectionObserver(_,{...x,root:s.ownerDocument})}catch{r=new IntersectionObserver(_,x)}r.observe(e)}return o(!0),i}function b1(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=lc(e),c=s||i?[...u?_i(u):[],...t?_i(t):[]]:[];c.forEach(v=>{s&&v.addEventListener("scroll",r,{passive:!0}),i&&v.addEventListener("resize",r)});const d=u&&a?y1(u,r):null;let p=-1,h=null;o&&(h=new ResizeObserver(v=>{let[x]=v;x&&x.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,y=l?Yn(e):null;l&&T();function T(){const v=Yn(e);y&&!dh(y,v)&&r(),y=v,m=requestAnimationFrame(T)}return r(),()=>{var v;c.forEach(x=>{s&&x.removeEventListener("scroll",r),i&&x.removeEventListener("resize",r)}),d?.(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(m)}}var _1=Zb,S1=Xb,fh=Gb,C1=e1,x1=Jb,T1=Wb,E1=Qb,A1=(e,t,r)=>{const n=new Map,s={platform:w1,...r},i={...s.platform,_c:n};return Kb(e,t,{...s,platform:i})};function k1(e){return e!=null&&typeof e=="object"&&"$el"in e}function uc(e){if(k1(e)){const t=e.$el;return nc(t)&&Gn(t)==="#comment"?null:t}return e}function Is(e){return typeof e=="function"?e():f(e)}function I1(e){return{name:"arrow",options:e,fn(t){const r=uc(Is(e.element));return r==null?{}:T1({element:r,padding:e.padding}).fn(t)}}}function ph(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function hh(e,t){const r=ph(e);return Math.round(t*r)/r}function R1(e,t,r){r===void 0&&(r={});const n=r.whileElementsMounted,s=j(()=>{var O;return(O=Is(r.open))!=null?O:!0}),i=j(()=>Is(r.middleware)),o=j(()=>{var O;return(O=Is(r.placement))!=null?O:"bottom"}),a=j(()=>{var O;return(O=Is(r.strategy))!=null?O:"absolute"}),l=j(()=>{var O;return(O=Is(r.transform))!=null?O:!0}),u=j(()=>uc(e.value)),c=j(()=>uc(t.value)),d=U(0),p=U(0),h=U(a.value),m=U(o.value),y=nt({}),T=U(!1),v=j(()=>{const O={position:h.value,left:"0",top:"0"};if(!c.value)return O;const g=hh(c.value,d.value),B=hh(c.value,p.value);return l.value?{...O,transform:"translate("+g+"px, "+B+"px)",...ph(c.value)>=1.5&&{willChange:"transform"}}:{position:h.value,left:g+"px",top:B+"px"}});let x;function b(){if(u.value==null||c.value==null)return;const O=s.value;A1(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,y.value=g.middlewareData,T.value=O!==!1})}function _(){typeof x=="function"&&(x(),x=void 0)}function C(){if(_(),n===void 0){b();return}if(u.value!=null&&c.value!=null){x=n(u.value,c.value,b);return}}function k(){s.value||(T.value=!1)}return Re([i,o,a,s],b,{flush:"sync"}),Re([u,c],C,{flush:"sync"}),Re(s,k,{flush:"sync"}),Di()&&fa(_),{x:Br(d),y:Br(p),strategy:Br(h),placement:Br(m),middlewareData:Br(y),isPositioned:Br(T),floatingStyles:v,update:b}}var $1={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},[P1,D1]=$t("PopperContent"),gh=ee({inheritAttrs:!1,__name:"PopperContent",props:zu({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}},{...$1}),emits:["placed"],setup(e,{emit:t}){const r=e,n=t,s=zp(),{forwardRef:i,currentElement:o}=Ae(),a=U(),l=U(),{width:u,height:c}=Pp(l),d=j(()=>r.side+(r.align!=="center"?`-${r.align}`:"")),p=j(()=>typeof r.collisionPadding=="number"?r.collisionPadding:{top:0,right:0,bottom:0,left:0,...r.collisionPadding}),h=j(()=>Array.isArray(r.collisionBoundary)?r.collisionBoundary:[r.collisionBoundary]),m=j(()=>({padding:p.value,boundary:h.value.filter(Db),altBoundary:h.value.length>0})),y=j(()=>({mainAxis:r.sideFlip,crossAxis:r.alignFlip})),T=iy(()=>[_1({mainAxis:r.sideOffset+c.value,alignmentAxis:r.alignOffset}),r.prioritizePosition&&r.avoidCollisions&&fh({...m.value,...y.value}),r.avoidCollisions&&S1({mainAxis:!0,crossAxis:!!r.prioritizePosition,limiter:r.sticky==="partial"?E1():void 0,...m.value}),!r.prioritizePosition&&r.avoidCollisions&&fh({...m.value,...y.value}),C1({...m.value,apply:({elements:N,rects:S,availableWidth:w,availableHeight:E})=>{const{width:q,height:Q}=S.reference,z=N.floating.style;z.setProperty("--reka-popper-available-width",`${w}px`),z.setProperty("--reka-popper-available-height",`${E}px`),z.setProperty("--reka-popper-anchor-width",`${q}px`),z.setProperty("--reka-popper-anchor-height",`${Q}px`)}}),l.value&&I1({element:l.value,padding:r.arrowPadding}),Ob({arrowWidth:u.value,arrowHeight:c.value}),r.hideWhenDetached&&x1({strategy:"referenceHidden",...m.value})]),{floatingStyles:v,placement:x,isPositioned:b,middlewareData:_,update:C}=R1(j(()=>r.reference??s.anchor.value),a,{strategy:r.positionStrategy,placement:d,whileElementsMounted:(...N)=>b1(...N,{layoutShift:!r.disableUpdateOnLayoutShift,animationFrame:r.updatePositionStrategy==="always"}),middleware:T}),k=j(()=>Zl(x.value)[0]),O=j(()=>Zl(x.value)[1]);Ea(()=>{b.value&&n("placed")});const g=j(()=>{const N=_.value.arrow?.centerOffset!==0;return r.hideShiftedArrow&&N}),B=U("");return rt(()=>{o.value&&(B.value=window.getComputedStyle(o.value).zIndex)}),D1({placedSide:k,onArrowChange:N=>l.value=N,arrowX:j(()=>_.value.arrow?.x??0),arrowY:j(()=>_.value.arrow?.y??0),shouldHideArrow:g}),(N,S)=>(P(),ye("div",{ref_key:"floatingRef",ref:a,"data-reka-popper-content-wrapper":"",style:mt({...f(v),transform:f(b)?f(v).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:B.value,"--reka-popper-transform-origin":[f(_).transformOrigin?.x,f(_).transformOrigin?.y].join(" "),...f(_).hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}})},[H(f(Fe),ge({ref:f(i)},N.$attrs,{"as-child":r.asChild,as:N.as,"data-side":k.value,"data-align":O.value,style:{animation:f(b)?void 0:"none"}}),{default:R(()=>[se(N.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4))}}),O1={top:"bottom",right:"left",bottom:"top",left:"right"},H1=ee({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}=Ae(),r=P1(),n=j(()=>O1[r.placedSide.value]);return(s,i)=>(P(),ye("span",{ref:o=>{f(r).onArrowChange(o)},style:mt({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})},[H(Pb,ge(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:R(()=>[se(s.$slots,"default")]),_:3},16,["as","as-child","rounded","width","height"])],4))}});function vh(e){const t=$o({nonce:U()});return j(()=>e?.value||t.nonce?.value)}function M1(e=[],t,r){const n=[...e];return n[r]=t,n.sort((s,i)=>s-i)}function mh(e,t,r){return yi(100/(r-t)*(e-t),0,100)}function N1(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function q1(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 B1(e,t,r){const n=e/2;return(n-dc([0,50],[0,n])(t)*r)*r}function L1(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function F1(e,t){if(t>0){const r=L1(e);return Math.min(...r)>=t}return!0}function dc(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 V1(e){return(String(e).split(".")[1]||"").length}function j1(e,t){const r=10**t;return Math.round(e*r)/r}var wh=["PageUp","PageDown"],yh=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],bh={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageUp","ArrowUp","ArrowLeft"]},[_h,Sh]=$t(["SliderVertical","SliderHorizontal"]),U1=ee({__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}=It(r),{forwardRef:l,currentElement:u}=Ae(),c=Rs(),d=U(),p=U(),h=j(()=>o?.value!=="rtl"&&!a.value||o?.value!=="ltr"&&a.value);function m(y,T){const v=p.value||u.value.getBoundingClientRect(),x=[...c.thumbElements.value][c.valueIndexToChangeRef.value],b=c.thumbAlignment.value==="contain"?x.clientWidth:0;!d.value&&!T&&c.thumbAlignment.value==="contain"&&(d.value=y.clientX-x.getBoundingClientRect().left);const _=dc([0,v.width-b],h.value?[i.value,s.value]:[s.value,i.value]);return p.value=v,_(T?y.clientX-v.left-b/2:y.clientX-v.left-(d.value??0))}return Sh({startEdge:j(()=>h.value?"left":"right"),endEdge:j(()=>h.value?"right":"left"),direction:j(()=>h.value?1:-1),size:"width"}),(y,T)=>(P(),W(Ch,{ref:f(l),dir:f(o),"data-orientation":"horizontal",style:mt({"--reka-slider-thumb-transform":!h.value&&f(c).thumbAlignment.value==="overflow"?"translateX(50%)":"translateX(-50%)"}),onSlideStart:T[0]||(T[0]=v=>{n("slideStart",m(v,!0))}),onSlideMove:T[1]||(T[1]=v=>{n("slideMove",m(v))}),onSlideEnd:T[2]||(T[2]=()=>{p.value=void 0,d.value=void 0,n("slideEnd")}),onStepKeyDown:T[3]||(T[3]=v=>{const x=h.value?"from-left":"from-right";n("stepKeyDown",v,f(bh)[x].includes(v.key)?-1:1)}),onEndKeyDown:T[4]||(T[4]=v=>n("endKeyDown",v)),onHomeKeyDown:T[5]||(T[5]=v=>n("homeKeyDown",v))},{default:R(()=>[se(y.$slots,"default")]),_:3},8,["dir","style"]))}}),z1=ee({__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}=It(r),a=Rs(),{forwardRef:l,currentElement:u}=Ae(),c=U(),d=U(),p=j(()=>!o.value);function h(m,y){const T=d.value||u.value.getBoundingClientRect(),v=[...a.thumbElements.value][a.valueIndexToChangeRef.value],x=a.thumbAlignment.value==="contain"?v.clientHeight:0;!c.value&&!y&&a.thumbAlignment.value==="contain"&&(c.value=m.clientY-v.getBoundingClientRect().top);const b=dc([0,T.height-x],p.value?[s.value,i.value]:[i.value,s.value]),_=y?m.clientY-T.top-x/2:m.clientY-T.top-(c.value??0);return d.value=T,b(_)}return Sh({startEdge:j(()=>p.value?"bottom":"top"),endEdge:j(()=>p.value?"top":"bottom"),direction:j(()=>p.value?1:-1),size:"height"}),(m,y)=>(P(),W(Ch,{ref:f(l),"data-orientation":"vertical",style:mt({"--reka-slider-thumb-transform":!p.value&&f(a).thumbAlignment.value==="overflow"?"translateY(-50%)":"translateY(50%)"}),onSlideStart:y[0]||(y[0]=T=>{n("slideStart",h(T,!0))}),onSlideMove:y[1]||(y[1]=T=>{n("slideMove",h(T))}),onSlideEnd:y[2]||(y[2]=()=>{d.value=void 0,c.value=void 0,n("slideEnd")}),onStepKeyDown:y[3]||(y[3]=T=>{const v=p.value?"from-bottom":"from-top";n("stepKeyDown",T,f(bh)[v].includes(T.key)?-1:1)}),onEndKeyDown:y[4]||(y[4]=T=>n("endKeyDown",T)),onHomeKeyDown:y[5]||(y[5]=T=>n("homeKeyDown",T))},{default:R(()=>[se(m.$slots,"default")]),_:3},8,["style"]))}}),[Rs,K1]=$t("SliderRoot"),W1=ee({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}=It(r),p=Ll(d),{forwardRef:h,currentElement:m}=Ae(),y=Ip(m),{CollectionSlot:T}=en({isProvider:!0}),v=Cs(r,"modelValue",n,{defaultValue:r.defaultValue,passive:r.modelValue===void 0}),x=j(()=>Array.isArray(v.value)?[...v.value]:[]),b=U(0),_=U(x.value);function C(N){g(N,q1(x.value,N))}function k(N){g(N,b.value)}function O(){const N=_.value[b.value];x.value[b.value]!==N&&n("valueCommit",Be(x.value))}function g(N,S,{commit:w}={commit:!1}){const E=V1(o.value),q=yi(j1(Math.round((N-s.value)/o.value)*o.value+s.value,E),s.value,i.value),Q=M1(x.value,q,S);if(F1(Q,a.value*o.value)){b.value=Q.indexOf(q);const z=String(Q)!==String(v.value);z&&w&&n("valueCommit",Q),z&&(B.value[b.value]?.focus(),v.value=Q)}}const B=U([]);return K1({modelValue:v,currentModelValue:x,valueIndexToChangeRef:b,thumbElements:B,orientation:l,min:s,max:i,disabled:u,thumbAlignment:c}),(N,S)=>(P(),W(f(T),null,{default:R(()=>[(P(),W(Xs(f(l)==="horizontal"?U1:z1),ge(N.$attrs,{ref:f(h),"as-child":N.asChild,as:N.as,min:f(s),max:f(i),dir:f(p),inverted:N.inverted,"aria-disabled":f(u),"data-disabled":f(u)?"":void 0,onPointerdown:S[0]||(S[0]=()=>{f(u)||(_.value=x.value)}),onSlideStart:S[1]||(S[1]=w=>!f(u)&&C(w)),onSlideMove:S[2]||(S[2]=w=>!f(u)&&k(w)),onSlideEnd:S[3]||(S[3]=w=>!f(u)&&O()),onHomeKeyDown:S[4]||(S[4]=w=>!f(u)&&g(f(s),0,{commit:!0})),onEndKeyDown:S[5]||(S[5]=w=>!f(u)&&g(f(i),x.value.length-1,{commit:!0})),onStepKeyDown:S[6]||(S[6]=(w,E)=>{if(!f(u)){const q=f(wh).includes(w.key)||w.shiftKey&&f(yh).includes(w.key)?10:1,Q=b.value,z=x.value[Q];g(z+f(o)*q*E,Q,{commit:!0})}})}),{default:R(()=>[se(N.$slots,"default",{modelValue:f(v)}),f(y)&&N.name?(P(),W(f(kb),{key:0,type:"number",value:f(v),name:N.name,required:N.required,disabled:f(u),step:f(o)},null,8,["value","name","required","disabled","step"])):Pe("v-if",!0)]),_:3},16,["as-child","as","min","max","dir","inverted","aria-disabled","data-disabled"]))]),_:3}))}}),Ch=ee({__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=Rs();return(i,o)=>(P(),W(f(Fe),ge({"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(wh).concat(f(yh)).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:R(()=>[se(i.$slots,"default")]),_:3},16))}}),G1=ee({__name:"SliderRange",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=Rs(),r=_h();Ae();const n=j(()=>t.currentModelValue.value.map(o=>mh(o,t.min.value,t.max.value))),s=j(()=>t.currentModelValue.value.length>1?Math.min(...n.value):0),i=j(()=>100-Math.max(...n.value,0));return(o,a)=>(P(),W(f(Fe),{"data-disabled":f(t).disabled.value?"":void 0,"data-orientation":f(t).orientation.value,"as-child":o.asChild,as:o.as,style:mt({[f(r).startEdge.value]:`${s.value}%`,[f(r).endEdge.value]:`${i.value}%`})},{default:R(()=>[se(o.$slots,"default")]),_:3},8,["data-disabled","data-orientation","as-child","as","style"]))}}),J1=ee({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=Rs(),n=_h(),{forwardRef:s,currentElement:i}=Ae(),{CollectionItem:o}=en(),a=j(()=>r.modelValue?.value?.[t.index]),l=j(()=>a.value===void 0?0:mh(a.value,r.min.value??0,r.max.value??100)),u=j(()=>N1(t.index,r.modelValue?.value?.length??0)),c=Pp(i),d=j(()=>c[n.size].value),p=j(()=>r.thumbAlignment.value==="overflow"||!d.value?0:B1(d.value,l.value,n.direction.value)),h=Ml();return We(()=>{r.thumbElements.value.push(i.value)}),Mt(()=>{const m=r.thumbElements.value.findIndex(y=>y===i.value)??-1;r.thumbElements.value.splice(m,1)}),(m,y)=>(P(),W(f(o),null,{default:R(()=>[H(f(Fe),ge(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:y[0]||(y[0]=()=>{f(r).valueIndexToChangeRef.value=m.index})}),{default:R(()=>[se(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}))}}),Y1=ee({__name:"SliderThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,{getItems:r}=en(),{forwardRef:n,currentElement:s}=Ae(),i=j(()=>s.value?r(!0).findIndex(o=>o.ref===s.value):-1);return(o,a)=>(P(),W(J1,ge({ref:f(n)},t,{index:i.value}),{default:R(()=>[se(o.$slots,"default")]),_:3},16,["index"]))}}),Z1=ee({__name:"SliderTrack",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=Rs();return Ae(),(r,n)=>(P(),W(f(Fe),{"as-child":r.asChild,as:r.as,"data-disabled":f(t).disabled.value?"":void 0,"data-orientation":f(t).orientation.value},{default:R(()=>[se(r.$slots,"default")]),_:3},8,["as-child","as","data-disabled","data-orientation"]))}}),X1=ee({__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 Ae(),(r,n)=>(P(),W(f(Fe),ge(t,{onMousedown:n[0]||(n[0]=s=>{!s.defaultPrevented&&s.detail>1&&s.preventDefault()})}),{default:R(()=>[se(r.$slots,"default")]),_:3},16))}}),[Qt,Q1]=$t("ScrollAreaRoot"),e2=ee({__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=U(0),s=U(0),i=U(),o=U(),a=U(),l=U(),u=U(!1),c=U(!1),{type:d,dir:p,scrollHideDelay:h}=It(r),m=Ll(p);function y(){i.value?.scrollTo({top:0})}function T(){i.value?.scrollTo({top:0,left:0})}t({viewport:i,scrollTop:y,scrollTopLeft:T});const{forwardRef:v,currentElement:x}=Ae();return Q1({type:d,dir:m,scrollHideDelay:h,scrollArea:x,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,_)=>(P(),W(f(Fe),{ref:f(v),"as-child":r.asChild,as:b.as,dir:f(m),style:mt({position:"relative","--reka-scroll-area-corner-width":`${n.value}px`,"--reka-scroll-area-corner-height":`${s.value}px`})},{default:R(()=>[se(b.$slots,"default")]),_:3},8,["as-child","as","dir","style"]))}}),t2=ee({__name:"ScrollAreaCornerImpl",setup(e){const t=Qt(),r=U(0),n=U(0),s=j(()=>!!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 Wn(t.scrollbarX.value,i),Wn(t.scrollbarY.value,o),Re(()=>t.scrollbarX.value,i),Re(()=>t.scrollbarY.value,o),(a,l)=>s.value?(P(),W(f(Fe),ge({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:R(()=>[se(a.$slots,"default")]),_:3},16,["style"])):Pe("v-if",!0)}}),r2=ee({__name:"ScrollAreaCorner",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:r}=Ae(),n=Qt(),s=j(()=>!!n.scrollbarX.value&&!!n.scrollbarY.value),i=j(()=>n.type.value!=="scroll"&&s.value);return(o,a)=>i.value?(P(),W(t2,ge({key:0},t,{ref:f(r)}),{default:R(()=>[se(o.$slots,"default")]),_:3},16)):Pe("v-if",!0)}});function xh(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 Go(e){const t=Th(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function Th(e,t){const r=e/t;return Number.isNaN(r)?0:r}function n2(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 Eh(e,t,r="ltr"){const n=Go(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=yi(e,l[0],l[1]);return xh([0,o],[0,a])(u)}function Jo(e){return e?Number.parseInt(e,10):0}function s2(e,t,r,n="ltr"){const s=Go(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 xh([l,u],d)(e)}function Ah(e,t){return e>0&&e<t}var i2=ee({__name:"ScrollAreaScrollbarX",setup(e){const t=Qt(),r=Yo(),{forwardRef:n,currentElement:s}=Ae();We(()=>{s.value&&t.onScrollbarXChange(s.value)});const i=j(()=>r.sizes.value);return(o,a)=>(P(),W(kh,{ref:f(n),"is-horizontal":!0,"data-orientation":"horizontal",style:mt({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(Go)(i.value)}px`:void 0}),onOnDragScroll:a[0]||(a[0]=l=>f(r).onDragScroll(l.x))},{default:R(()=>[se(o.$slots,"default")]),_:3},8,["style"]))}}),o2=ee({__name:"ScrollAreaScrollbarY",setup(e){const t=Qt(),r=Yo(),{forwardRef:n,currentElement:s}=Ae();We(()=>{s.value&&t.onScrollbarYChange(s.value)});const i=j(()=>r.sizes.value);return(o,a)=>(P(),W(kh,{ref:f(n),"is-horizontal":!1,"data-orientation":"vertical",style:mt({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(Go)(i.value)}px`:void 0}),onOnDragScroll:a[0]||(a[0]=l=>f(r).onDragScroll(l.y))},{default:R(()=>[se(o.$slots,"default")]),_:3},8,["style"]))}}),fc=ee({__name:"ScrollAreaScrollbarAuto",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=Qt(),r=Si(),{forwardRef:n}=Ae(),s=U(!1),i=Hl(()=>{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 We(()=>i()),Wn(t.viewport,i),Wn(t.content,i),(o,a)=>(P(),W(f(Tn),{present:o.forceMount||s.value},{default:R(()=>[H(pc,ge(o.$attrs,{ref:f(n),"data-state":s.value?"visible":"hidden"}),{default:R(()=>[se(o.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),a2=ee({inheritAttrs:!1,__name:"ScrollAreaScrollbarGlimpse",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=Qt(),r=Si(),{forwardRef:n}=Ae(),{state:s,dispatch:i}=jl("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=j(()=>s.value!=="hidden");function a(){i("POINTER_ENTER")}function l(){i("POINTER_LEAVE")}const u=Hl(()=>i("SCROLL_END"),100);return rt(c=>{if(s.value==="glimpse"){const d=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);c(()=>{window.clearTimeout(d)})}}),rt(c=>{if(s.value==="idle"){const d=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);c(()=>{window.clearTimeout(d)})}}),rt(c=>{const d=t.viewport.value,p=r.isHorizontal.value?"scrollLeft":"scrollTop";if(d){let h=d[p];const m=()=>{const y=d[p];h!==y&&(i("SCROLL"),u()),h=y};d.addEventListener("scroll",m),c(()=>{d.removeEventListener("scroll",m)})}}),We(()=>{const c=t.scrollArea.value;c&&(c.addEventListener("pointerenter",a),c.addEventListener("pointerleave",l))}),Mt(()=>{const c=t.scrollArea.value;c&&(c.removeEventListener("pointerenter",a),c.removeEventListener("pointerleave",l))}),(c,d)=>(P(),W(f(Tn),{present:c.forceMount||o.value},{default:R(()=>[H(fc,ge(c.$attrs,{ref:f(n),"data-state":o.value?"visible":"hidden"}),{default:R(()=>[se(c.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),l2=ee({inheritAttrs:!1,__name:"ScrollAreaScrollbarHover",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=Qt(),{forwardRef:r}=Ae();let n;const s=U(!1);function i(){window.clearTimeout(n),s.value=!0}function o(){n=window.setTimeout(()=>{s.value=!1},t.scrollHideDelay.value)}return We(()=>{const a=t.scrollArea.value;a&&(a.addEventListener("pointerenter",i),a.addEventListener("pointerleave",o))}),Mt(()=>{const a=t.scrollArea.value;a&&(window.clearTimeout(n),a.removeEventListener("pointerenter",i),a.removeEventListener("pointerleave",o))}),(a,l)=>(P(),W(f(Tn),{present:a.forceMount||s.value},{default:R(()=>[H(fc,ge(a.$attrs,{ref:f(r),"data-state":s.value?"visible":"hidden"}),{default:R(()=>[se(a.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),c2=ee({__name:"ScrollAreaScrollbarScroll",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=Qt(),r=Si(),{forwardRef:n}=Ae(),{state:s,dispatch:i}=jl("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=j(()=>s.value!=="hidden");rt(l=>{if(s.value==="idle"){const u=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);l(()=>{window.clearTimeout(u)})}});const a=Hl(()=>i("SCROLL_END"),100);return rt(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)=>(P(),W(f(Tn),{present:l.forceMount||o.value},{default:R(()=>[H(pc,ge(l.$attrs,{ref:f(n),"data-state":o.value?"visible":"hidden"}),{default:R(()=>[se(l.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),[Si,u2]=$t("ScrollAreaScrollbar"),d2=ee({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}=Ae(),n=Qt(),s=j(()=>t.orientation==="horizontal");Re(s,()=>{s.value?n.onScrollbarXEnabledChange(!0):n.onScrollbarYEnabledChange(!0)},{immediate:!0}),Mt(()=>{n.onScrollbarXEnabledChange(!1),n.onScrollbarYEnabledChange(!1)});const{orientation:i,forceMount:o,asChild:a,as:l}=It(t);return u2({orientation:i,forceMount:o,isHorizontal:s,as:l,asChild:a}),(u,c)=>f(n).type.value==="hover"?(P(),W(l2,ge({key:0},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:R(()=>[se(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="scroll"?(P(),W(c2,ge({key:1},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:R(()=>[se(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="glimpse"?(P(),W(a2,ge({key:2},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:R(()=>[se(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="auto"?(P(),W(fc,ge({key:3},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:R(()=>[se(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="always"?(P(),W(pc,ge({key:4},u.$attrs,{ref:f(r),"data-state":"visible"}),{default:R(()=>[se(u.$slots,"default")]),_:3},16)):Pe("v-if",!0)}}),[Yo,f2]=$t("ScrollAreaScrollbarVisible"),pc=ee({__name:"ScrollAreaScrollbarVisible",setup(e){const t=Qt(),r=Si(),{forwardRef:n}=Ae(),s=U({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),i=j(()=>{const v=Th(s.value.viewport,s.value.content);return v>0&&v<1}),o=U(),a=U(0);function l(v,x){if(h.value){const b=t.viewport.value.scrollLeft+v.deltaY;t.viewport.value.scrollLeft=b,Ah(b,x)&&v.preventDefault()}else{const b=t.viewport.value.scrollTop+v.deltaY;t.viewport.value.scrollTop=b,Ah(b,x)&&v.preventDefault()}}function u(v,x){h.value?a.value=x.x:a.value=x.y}function c(v){a.value=0}function d(v){s.value=v}function p(v,x){return s2(v,a.value,s.value,x)}const h=j(()=>r.isHorizontal.value);function m(v){h.value?t.viewport.value.scrollLeft=p(v,t.dir.value):t.viewport.value.scrollTop=p(v)}function y(){if(h.value){if(t.viewport.value&&o.value){const v=t.viewport.value.scrollLeft,x=Eh(v,s.value,t.dir.value);o.value.style.transform=`translate3d(${x}px, 0, 0)`}}else if(t.viewport.value&&o.value){const v=t.viewport.value.scrollTop,x=Eh(v,s.value);o.value.style.transform=`translate3d(0, ${x}px, 0)`}}function T(v){o.value=v}return f2({sizes:s,hasThumb:i,handleWheelScroll:l,handleThumbDown:u,handleThumbUp:c,handleSizeChange:d,onThumbPositionChange:y,onThumbChange:T,onDragScroll:m}),(v,x)=>h.value?(P(),W(i2,ge({key:0},v.$attrs,{ref:f(n)}),{default:R(()=>[se(v.$slots,"default")]),_:3},16)):(P(),W(o2,ge({key:1},v.$attrs,{ref:f(n)}),{default:R(()=>[se(v.$slots,"default")]),_:3},16))}}),kh=ee({__name:"ScrollAreaScrollbarImpl",props:{isHorizontal:{type:Boolean,required:!0}},emits:["onDragScroll","onWheelScroll","onThumbPointerDown"],setup(e,{emit:t}){const r=e,n=t,s=Qt(),i=Yo(),o=Si(),{forwardRef:a,currentElement:l}=Ae(),u=U(""),c=U();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 x=v.target;x.hasPointerCapture(v.pointerId)&&x.releasePointerCapture(v.pointerId),document.body.style.webkitUserSelect=u.value,s.viewport&&(s.viewport.value.style.scrollBehavior=""),c.value=void 0}function y(v){const x=v.target,b=l.value?.contains(x),_=i.sizes.value.content-i.sizes.value.viewport;b&&i.handleWheelScroll(v,_)}We(()=>{document.addEventListener("wheel",y,{passive:!1})}),Mt(()=>{document.removeEventListener("wheel",y)});function T(){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:Jo(getComputedStyle(l.value).paddingLeft),paddingEnd:Jo(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:Jo(getComputedStyle(l.value).paddingTop),paddingEnd:Jo(getComputedStyle(l.value).paddingBottom)}}),i.onThumbPositionChange())}return Wn(l,T),Wn(s.content,T),(v,x)=>(P(),W(f(Fe),{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:R(()=>[se(v.$slots,"default")]),_:3},8,["as","as-child"]))}}),p2=ee({__name:"ScrollAreaThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=Qt(),n=Yo();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}=Ae(),l=U(),u=j(()=>r.viewport.value);function c(){l.value||(l.value=n2(u.value,n.onThumbPositionChange),n.onThumbPositionChange())}return Ay(j(()=>n.sizes.value),()=>{n.onThumbChange(a.value),u.value&&(n.onThumbPositionChange(),u.value.addEventListener("scroll",c))}),Mt(()=>{u.value.removeEventListener("scroll",c),r.viewport.value?.removeEventListener("scroll",c)}),(d,p)=>(P(),W(f(Fe),{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:R(()=>[se(d.$slots,"default")]),_:3},8,["data-state","as-child","as"]))}}),h2=ee({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}=It(r),s=vh(n),i=Qt(),o=U();We(()=>{i.onViewportChange(o.value),i.onContentChange(l.value)}),t({viewportElement:o});const{forwardRef:a,currentElement:l}=Ae();return(u,c)=>(P(),ye(Le,null,[re("div",ge({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}),[H(f(Fe),{ref:f(a),style:mt({minWidth:f(i).scrollbarXEnabled.value?"fit-content":void 0}),"as-child":r.asChild,as:u.as},{default:R(()=>[se(u.$slots,"default")]),_:3},8,["style","as-child","as"])],16),H(f(Fe),{as:"style",nonce:f(s)},{default:R(()=>c[0]||(c[0]=[Ne(" /* 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))}}),g2=[" ","Enter","ArrowUp","ArrowDown"],v2=[" ","Enter"],Sx=10;function Ci(e,t,r){return e===void 0?!1:Array.isArray(e)?e.some(n=>hc(n,t,r)):hc(e,t,r)}function hc(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]:sy(e,t)}function m2(e){return e==null||e===""||Array.isArray(e)&&e.length===0}var w2={key:0,value:""},[Rn,Ih]=$t("SelectRoot"),y2=ee({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}=It(r),l=Cs(r,"modelValue",n,{defaultValue:r.defaultValue??(o.value?[]:void 0),passive:r.modelValue===void 0,deep:!0}),u=Cs(r,"open",n,{defaultValue:r.defaultOpen,passive:r.open===void 0}),c=U(),d=U(),p=U({x:0,y:0}),h=j(()=>o.value&&Array.isArray(l.value)?l.value?.length===0:$l(l.value));en({isProvider:!0});const m=Ll(a),y=Ip(c),T=U(new Set),v=j(()=>Array.from(T.value).map(_=>_.value).join(";"));function x(_){if(o.value){const C=Array.isArray(l.value)?[...l.value]:[],k=C.findIndex(O=>hc(O,_,r.by));k===-1?C.push(_):C.splice(k,1),l.value=[...C]}else l.value=_}function b(_){return Array.from(T.value).find(C=>Ci(_,C.value,r.by))}return Ih({triggerElement:c,onTriggerChange:_=>{c.value=_},valueElement:d,onValueElementChange:_=>{d.value=_},contentId:"",modelValue:l,onValueChange:x,by:r.by,open:u,multiple:o,required:s,onOpenChange:_=>{u.value=_},dir:m,triggerPointerDownPosRef:p,disabled:i,isEmptyModelValue:h,optionsSet:T,onOptionAdd:_=>{const C=b(_.value);C&&T.value.delete(C),T.value.add(_)},onOptionRemove:_=>{const C=b(_.value);C&&T.value.delete(C)}}),(_,C)=>(P(),W(f(Kp),null,{default:R(()=>[se(_.$slots,"default",{modelValue:f(l),open:f(u)}),f(y)?(P(),W(b2,{key:v.value,"aria-hidden":"true",tabindex:"-1",multiple:f(o),required:f(s),name:_.name,autocomplete:_.autocomplete,disabled:f(i),value:f(l)},{default:R(()=>[f($l)(f(l))?(P(),ye("option",w2)):Pe("v-if",!0),(P(!0),ye(Le,null,nr(Array.from(T.value),k=>(P(),ye("option",ge({key:k.value??""},{ref_for:!0},k),null,16))),128))]),_:1},8,["multiple","required","name","autocomplete","disabled","value"])):Pe("v-if",!0)]),_:3}))}}),b2=ee({__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=U(),n=Rn();Re(()=>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)=>(P(),W(f(Yl),{"as-child":""},{default:R(()=>[re("select",ge({ref_key:"selectElement",ref:r},t,{onInput:s}),[se(i.$slots,"default")],16)]),_:3}))}}),_2=ee({__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=Xr(e);return(r,n)=>(P(),W(f(gh),ge(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:R(()=>[se(r.$slots,"default")]),_:3},16))}}),S2={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[Zn,Rh]=$t("SelectContent"),C2=ee({__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=Rn();Vy(),Ep(r.bodyLock);const{CollectionSlot:i,getItems:o}=en(),a=U();$p(a);const{search:l,handleTypeaheadSearch:u}=Dp(),c=U(),d=U(),p=U(),h=U(!1),m=U(!1),y=U(!1);function T(){d.value&&a.value&&Fp([d.value,a.value])}Re(h,()=>{T()});const{onOpenChange:v,triggerPointerDownPosRef:x}=s;rt(C=>{if(!a.value)return;let k={x:0,y:0};const O=B=>{k={x:Math.abs(Math.round(B.pageX)-(x.value?.x??0)),y:Math.abs(Math.round(B.pageY)-(x.value?.y??0))}},g=B=>{B.pointerType!=="touch"&&(k.x<=10&&k.y<=10?B.preventDefault():a.value?.contains(B.target)||v(!1),document.removeEventListener("pointermove",O),x.value=null)};x.value!==null&&(document.addEventListener("pointermove",O),document.addEventListener("pointerup",g,{capture:!0,once:!0})),C(()=>{document.removeEventListener("pointermove",O),document.removeEventListener("pointerup",g,{capture:!0})})});function b(C){const k=C.ctrlKey||C.altKey||C.metaKey;if(C.key==="Tab"&&C.preventDefault(),!k&&C.key.length===1&&u(C.key,o()),["ArrowUp","ArrowDown","Home","End"].includes(C.key)){let O=[...o().map(g=>g.ref)];if(["ArrowUp","End"].includes(C.key)&&(O=O.slice().reverse()),["ArrowUp","ArrowDown"].includes(C.key)){const g=C.target,B=O.indexOf(g);O=O.slice(B+1)}setTimeout(()=>Fp(O)),C.preventDefault()}}const _=Xr(j(()=>r.position==="popper"?r:{}).value);return Rh({content:a,viewport:c,onViewportChange:C=>{c.value=C},itemRefCallback:(C,k,O)=>{const g=!m.value&&!O,B=Ci(s.modelValue.value,k,s.by);if(s.multiple.value){if(y.value)return;(B||g)&&(d.value=C,B&&(y.value=!0))}else(B||g)&&(d.value=C);g&&(m.value=!0)},selectedItem:d,selectedItemText:p,onItemLeave:()=>{a.value?.focus()},itemTextRefCallback:(C,k,O)=>{const g=!m.value&&!O;(Ci(s.modelValue.value,k,s.by)||g)&&(p.value=C)},focusSelectedItem:T,position:r.position,isPositioned:h,searchRef:l}),(C,k)=>(P(),W(f(i),null,{default:R(()=>[H(f(Bp),{"as-child":"",onMountAutoFocus:k[6]||(k[6]=ar(()=>{},["prevent"])),onUnmountAutoFocus:k[7]||(k[7]=O=>{n("closeAutoFocus",O),!O.defaultPrevented&&(f(s).triggerElement.value?.focus({preventScroll:!0}),O.preventDefault())})},{default:R(()=>[H(f(Kl),{"as-child":"","disable-outside-pointer-events":C.disableOutsidePointerEvents,onFocusOutside:k[2]||(k[2]=ar(()=>{},["prevent"])),onDismiss:k[3]||(k[3]=O=>f(s).onOpenChange(!1)),onEscapeKeyDown:k[4]||(k[4]=O=>n("escapeKeyDown",O)),onPointerDownOutside:k[5]||(k[5]=O=>n("pointerDownOutside",O))},{default:R(()=>[(P(),W(Xs(C.position==="popper"?_2:T2),ge({...C.$attrs,...f(_)},{id:f(s).contentId,ref:O=>{const g=f(zt)(O);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:k[0]||(k[0]=ar(()=>{},["prevent"])),onPlaced:k[1]||(k[1]=O=>h.value=!0),onKeydown:b}),{default:R(()=>[se(C.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3},8,["disable-outside-pointer-events"])]),_:3})]),_:3}))}}),[gc,x2]=$t("SelectItemAlignedPosition"),T2=ee({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}=en(),i=Rn(),o=Zn(),a=U(!1),l=U(!0),u=U(),{forwardRef:c,currentElement:d}=Ae(),{viewport:p,selectedItem:h,selectedItemText:m,focusSelectedItem:y}=o;function T(){if(i.triggerElement.value&&i.valueElement.value&&u.value&&d.value&&p?.value&&h?.value&&m?.value){const b=i.triggerElement.value.getBoundingClientRect(),_=d.value.getBoundingClientRect(),C=i.valueElement.value.getBoundingClientRect(),k=m.value.getBoundingClientRect();if(i.dir.value!=="rtl"){const ke=k.left-_.left,Ze=C.left-ke,ut=b.left-Ze,Ve=b.width+ut,Qe=Math.max(Ve,_.width),dt=window.innerWidth-10,gt=yi(Ze,10,Math.max(10,dt-Qe));u.value.style.minWidth=`${Ve}px`,u.value.style.left=`${gt}px`}else{const ke=_.right-k.right,Ze=window.innerWidth-C.right-ke,ut=window.innerWidth-b.right-Ze,Ve=b.width+ut,Qe=Math.max(Ve,_.width),dt=window.innerWidth-10,gt=yi(Ze,10,Math.max(10,dt-Qe));u.value.style.minWidth=`${Ve}px`,u.value.style.right=`${gt}px`}const O=s().map(ke=>ke.ref),g=window.innerHeight-20,B=p.value.scrollHeight,N=window.getComputedStyle(d.value),S=Number.parseInt(N.borderTopWidth,10),w=Number.parseInt(N.paddingTop,10),E=Number.parseInt(N.borderBottomWidth,10),q=Number.parseInt(N.paddingBottom,10),Q=S+w+B+q+E,z=Math.min(h.value.offsetHeight*5,Q),X=window.getComputedStyle(p.value),Y=Number.parseInt(X.paddingTop,10),le=Number.parseInt(X.paddingBottom,10),K=b.top+b.height/2-10,ae=g-K,fe=h.value.offsetHeight/2,Ce=h.value.offsetTop+fe,Oe=S+w+Ce,Te=Q-Oe;if(Oe<=K){const ke=h.value===O[O.length-1];u.value.style.bottom="0px";const Ze=d.value.clientHeight-p.value.offsetTop-p.value.offsetHeight,ut=Oe+Math.max(ae,fe+(ke?le:0)+Ze+E);u.value.style.height=`${ut}px`}else{const ke=h.value===O[0];u.value.style.top="0px";const Ze=Math.max(K,S+p.value.offsetTop+(ke?Y:0)+fe)+Te;u.value.style.height=`${Ze}px`,p.value.scrollTop=Oe-K+p.value.offsetTop}u.value.style.margin="10px 0",u.value.style.minHeight=`${z}px`,u.value.style.maxHeight=`${g}px`,n("placed"),requestAnimationFrame(()=>a.value=!0)}}const v=U("");We(async()=>{await wt(),T(),d.value&&(v.value=window.getComputedStyle(d.value).zIndex)});function x(b){b&&l.value===!0&&(T(),y?.(),l.value=!1)}return Wn(i.triggerElement,()=>{T()}),x2({contentWrapper:u,shouldExpandOnScrollRef:a,onScrollButtonChange:x}),(b,_)=>(P(),ye("div",{ref_key:"contentWrapperElement",ref:u,style:mt({display:"flex",flexDirection:"column",position:"fixed",zIndex:v.value})},[H(f(Fe),ge({ref:f(c),style:{boxSizing:"border-box",maxHeight:"100%"}},{...b.$attrs,...r}),{default:R(()=>[se(b.$slots,"default")]),_:3},16)],4))}}),E2=ee({inheritAttrs:!1,__name:"SelectProvider",props:{context:{type:Object,required:!0}},setup(e){return Ih(e.context),Rh(S2),(t,r)=>se(t.$slots,"default")}}),A2={key:1},k2=ee({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=Qr(r,t),s=Rn(),i=U();We(()=>{i.value=new DocumentFragment});const o=U(),a=j(()=>r.forceMount||s.open.value),l=U(a.value);return Re(a,()=>{setTimeout(()=>l.value=a.value)}),(u,c)=>a.value||l.value||o.value?.present?(P(),W(f(Tn),{key:0,ref_key:"presenceRef",ref:o,present:a.value},{default:R(()=>[H(C2,pr(sr({...f(n),...u.$attrs})),{default:R(()=>[se(u.$slots,"default")]),_:3},16)]),_:3},8,["present"])):i.value?(P(),ye("div",A2,[(P(),W(ka,{to:i.value},[H(E2,{context:f(s)},{default:R(()=>[se(u.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):Pe("v-if",!0)}}),[Cx,I2]=$t("SelectGroup"),R2=ee({__name:"SelectGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=Ts(void 0,"reka-select-group");return I2({id:r}),(n,s)=>(P(),W(f(Fe),ge({role:"group"},t,{"aria-labelledby":f(r)}),{default:R(()=>[se(n.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),$2=ee({__name:"SelectIcon",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){return(t,r)=>(P(),W(f(Fe),{"aria-hidden":"true",as:t.as,"as-child":t.asChild},{default:R(()=>[se(t.$slots,"default",{},()=>[r[0]||(r[0]=Ne("▼"))])]),_:3},8,["as","as-child"]))}}),[$h,P2]=$t("SelectItem"),D2=ee({__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}=It(r),i=Rn(),o=Zn(),{forwardRef:a,currentElement:l}=Ae(),{CollectionItem:u}=en(),c=j(()=>Ci(i.modelValue?.value,r.value,i.by)),d=U(!1),p=U(r.textValue??""),h=Ts(void 0,"reka-select-item-text"),m="select.select";async function y(_){_.defaultPrevented||Rl(m,T,{originalEvent:_,value:r.value})}async function T(_){await wt(),n("select",_),!_.defaultPrevented&&(s.value||(i.onValueChange(r.value),i.multiple.value||i.onOpenChange(!1)))}async function v(_){await wt(),!_.defaultPrevented&&(s.value?o.onItemLeave?.():_.currentTarget?.focus({preventScroll:!0}))}async function x(_){await wt(),!_.defaultPrevented&&_.currentTarget===Yt()&&o.onItemLeave?.()}async function b(_){await wt(),!_.defaultPrevented&&(o.searchRef?.value!==""&&_.key===" "||(v2.includes(_.key)&&y(_),_.key===" "&&_.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 We(()=>{l.value&&o.itemRefCallback(l.value,r.value,r.disabled)}),P2({value:r.value,disabled:s,textId:h,isSelected:c,onItemTextChange:_=>{p.value=((p.value||_?.textContent)??"").trim()}}),(_,C)=>(P(),W(f(u),{value:{textValue:p.value}},{default:R(()=>[H(f(Fe),{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:_.as,"as-child":_.asChild,onFocus:C[0]||(C[0]=k=>d.value=!0),onBlur:C[1]||(C[1]=k=>d.value=!1),onPointerup:y,onPointerdown:C[2]||(C[2]=k=>{k.currentTarget.focus({preventScroll:!0})}),onTouchend:C[3]||(C[3]=ar(()=>{},["prevent","stop"])),onPointermove:v,onPointerleave:x,onKeydown:b},{default:R(()=>[se(_.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"])]),_:3},8,["value"]))}}),O2=ee({__name:"SelectItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,r=$h();return(n,s)=>f(r).isSelected.value?(P(),W(f(Fe),ge({key:0,"aria-hidden":"true"},t),{default:R(()=>[se(n.$slots,"default")]),_:3},16)):Pe("v-if",!0)}}),H2=ee({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,r=Rn(),n=Zn(),s=$h(),{forwardRef:i,currentElement:o}=Ae(),a=j(()=>({value:s.value,disabled:s.disabled.value,textContent:o.value?.textContent??s.value?.toString()??""}));return We(()=>{o.value&&(s.onItemTextChange(o.value),n.itemTextRefCallback(o.value,s.value,s.disabled.value),r.onOptionAdd(a.value))}),Mt(()=>{r.onOptionRemove(a.value)}),(l,u)=>(P(),W(f(Fe),ge({id:f(s).textId,ref:f(i)},{...t,...l.$attrs}),{default:R(()=>[se(l.$slots,"default")]),_:3},16,["id"]))}}),M2=ee({__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)=>(P(),W(f(Jl),pr(sr(t)),{default:R(()=>[se(r.$slots,"default")]),_:3},16))}}),Ph=ee({__name:"SelectScrollButtonImpl",emits:["autoScroll"],setup(e,{emit:t}){const r=t,{getItems:n}=en(),s=Zn(),i=U(null);function o(){i.value!==null&&(window.clearInterval(i.value),i.value=null)}rt(()=>{n().map(u=>u.ref).find(u=>u===Yt())?.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 gs(()=>o()),(u,c)=>(P(),W(f(Fe),ge({"aria-hidden":"true",style:{flexShrink:0}},u.$parent?.$props,{onPointerdown:a,onPointermove:l,onPointerleave:c[0]||(c[0]=()=>{o()})}),{default:R(()=>[se(u.$slots,"default")]),_:3},16))}}),N2=ee({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=Zn(),r=t.position==="item-aligned"?gc():void 0,{forwardRef:n,currentElement:s}=Ae(),i=U(!1);return rt(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))}}),Re(s,()=>{s.value&&r?.onScrollButtonChange(s.value)}),(o,a)=>i.value?(P(),W(Ph,{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:R(()=>[se(o.$slots,"default")]),_:3},512)):Pe("v-if",!0)}}),q2=ee({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=Zn(),r=t.position==="item-aligned"?gc():void 0,{forwardRef:n,currentElement:s}=Ae(),i=U(!1);return rt(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))}}),Re(s,()=>{s.value&&r?.onScrollButtonChange(s.value)}),(o,a)=>i.value?(P(),W(Ph,{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:R(()=>[se(o.$slots,"default")]),_:3},512)):Pe("v-if",!0)}}),B2=ee({__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=Rn(),{forwardRef:n,currentElement:s}=Ae(),i=j(()=>r.disabled?.value||t.disabled);r.contentId||(r.contentId=Ts(void 0,"reka-select-content")),We(()=>{r.onTriggerChange(s.value)});const{getItems:o}=en(),{search:a,handleTypeaheadSearch:l,resetTypeahead:u}=Dp();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)=>(P(),W(f(Wp),{"as-child":"",reference:p.reference},{default:R(()=>[H(f(Fe),{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(m2)(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 y=m.target;y.hasPointerCapture(m.pointerId)&&y.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&(d(m),m.preventDefault())}),onPointerup:h[2]||(h[2]=ar(m=>{m.pointerType==="touch"&&d(m)},["prevent"])),onKeydown:h[3]||(h[3]=m=>{const y=f(a)!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&y&&m.key===" "||(f(l)(m.key,f(o)()),f(g2).includes(m.key)&&(c(),m.preventDefault()))})},{default:R(()=>[se(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"]))}}),L2=ee({__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}=Ae(),s=Rn();We(()=>{s.valueElement=n});const i=j(()=>{let a=[];const l=Array.from(s.optionsSet.value),u=c=>l.find(d=>Ci(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=j(()=>i.value.length?i.value.join(", "):t.placeholder);return(a,l)=>(P(),W(f(Fe),{ref:f(r),as:a.as,"as-child":a.asChild,style:{pointerEvents:"none"},"data-placeholder":i.value.length?void 0:t.placeholder},{default:R(()=>[se(a.$slots,"default",{selectedLabel:i.value,modelValue:f(s).modelValue.value},()=>[Ne(He(o.value),1)])]),_:3},8,["as","as-child","data-placeholder"]))}}),F2=ee({__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}=It(t),n=vh(r),s=Zn(),i=s.position==="item-aligned"?gc():void 0,{forwardRef:o,currentElement:a}=Ae();We(()=>{s?.onViewportChange(a.value)});const l=U(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 y=window.innerHeight-20,T=Number.parseFloat(h.value.style.minHeight),v=Number.parseFloat(h.value.style.height),x=Math.max(T,v);if(x<y){const b=x+m,_=Math.min(y,b),C=b-_;h.value.style.height=`${_}px`,h.value.style.bottom==="0px"&&(d.scrollTop=C>0?C:0,h.value.style.justifyContent="flex-end")}}}l.value=d.scrollTop}return(c,d)=>(P(),ye(Le,null,[H(f(Fe),ge({ref:f(o),"data-reka-select-viewport":"",role:"presentation"},{...c.$attrs,...t},{style:{position:"relative",flex:1,overflow:"hidden auto"},onScroll:u}),{default:R(()=>[se(c.$slots,"default")]),_:3},16),H(f(Fe),{as:"style",nonce:f(n)},{default:R(()=>d[0]||(d[0]=[Ne(" /* 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))}}),V2=ee({__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=j(()=>n(t.orientation)?t.orientation:"horizontal"),i=j(()=>s.value==="vertical"?t.orientation:void 0),o=j(()=>t.decorative?{role:"none"}:{"aria-orientation":i.value,role:"separator"});return(a,l)=>(P(),W(f(Fe),ge({as:a.as,"as-child":a.asChild,"data-orientation":s.value},o.value),{default:R(()=>[se(a.$slots,"default")]),_:3},16,["as","as-child","data-orientation"]))}}),j2=ee({__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)=>(P(),W(V2,pr(sr(t)),{default:R(()=>[se(r.$slots,"default")]),_:3},16))}}),U2=ee({__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 Ae(),(r,n)=>(P(),W(f(H1),pr(sr(t)),{default:R(()=>[se(r.$slots,"default")]),_:3},16))}}),[Zo,z2]=$t("TooltipProvider"),K2=ee({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}=It(e);Ae();const l=U(!0),u=U(!1),{start:c,stop:d}=_p(()=>{l.value=!0},r,{immediate:!1});return z2({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)=>se(p.$slots,"default")}}),Dh="tooltip.open",[Xo,W2]=$t("TooltipRoot"),G2=ee({__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;Ae();const s=Zo(),i=j(()=>r.disableHoverableContent??s.disableHoverableContent.value),o=j(()=>r.disableClosingTrigger??s.disableClosingTrigger.value),a=j(()=>r.disabled??s.disabled.value),l=j(()=>r.delayDuration??s.delayDuration.value),u=j(()=>r.ignoreNonKeyboardFocus??s.ignoreNonKeyboardFocus.value),c=Cs(r,"open",n,{defaultValue:r.defaultOpen,passive:r.open===void 0});Re(c,b=>{s.onClose&&(b?(s.onOpen(),document.dispatchEvent(new CustomEvent(Dh))):s.onClose())});const d=U(!1),p=U(),h=j(()=>c.value?d.value?"delayed-open":"instant-open":"closed"),{start:m,stop:y}=_p(()=>{d.value=!0,c.value=!0},l,{immediate:!1});function T(){y(),d.value=!1,c.value=!0}function v(){y(),c.value=!1}function x(){m()}return W2({contentId:"",open:c,stateAttribute:h,trigger:p,onTriggerChange(b){p.value=b},onTriggerEnter(){s.isOpenDelayed.value?x():T()},onTriggerLeave(){i.value?v():y()},onOpen:T,onClose:v,disableHoverableContent:i,disableClosingTrigger:o,disabled:a,ignoreNonKeyboardFocus:u}),(b,_)=>(P(),W(f(Kp),null,{default:R(()=>[se(b.$slots,"default",{open:f(c)})]),_:3}))}}),Oh=ee({__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=Xo(),i=Zo(),{forwardRef:o,currentElement:a}=Ae(),l=j(()=>r.ariaLabel||a.value?.textContent),u=j(()=>{const{ariaLabel:c,...d}=r;return Tp(d,i.content.value??{},{side:"top",sideOffset:0,align:"center",avoidCollisions:!0,collisionBoundary:[],collisionPadding:0,arrowPadding:0,sticky:"partial",hideWhenDetached:!1})});return We(()=>{qt(window,"scroll",c=>{c.target?.contains(s.trigger.value)&&s.onClose()}),qt(window,Dh,s.onClose)}),(c,d)=>(P(),W(f(Kl),{"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]=ar(()=>{},["prevent"])),onDismiss:d[3]||(d[3]=p=>f(s).onClose())},{default:R(()=>[H(f(gh),ge({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:R(()=>[se(c.$slots,"default"),H(f(Yl),{id:f(s).contentId,role:"tooltip"},{default:R(()=>[Ne(He(l.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),J2=ee({__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=Xr(e),{forwardRef:r,currentElement:n}=Ae(),{trigger:s,onClose:i}=Xo(),o=Zo(),{isPointerInTransit:a,onPointerExit:l}=jy(s,n);return o.isPointerInTransitRef=a,l(()=>{i()}),(u,c)=>(P(),W(Oh,ge({ref:f(r)},f(t)),{default:R(()=>[se(u.$slots,"default")]),_:3},16))}}),Y2=ee({__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=Xo(),i=Qr(r,n),{forwardRef:o}=Ae();return(a,l)=>(P(),W(f(Tn),{present:a.forceMount||f(s).open.value},{default:R(()=>[(P(),W(Xs(f(s).disableHoverableContent.value?Oh:J2),ge({ref:f(o)},f(i)),{default:R(()=>[se(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Z2=ee({__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)=>(P(),W(f(Jl),pr(sr(t)),{default:R(()=>[se(r.$slots,"default")]),_:3},16))}}),X2=ee({__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=Xo(),n=Zo();r.contentId||(r.contentId=Ts(void 0,"reka-tooltip-content"));const{forwardRef:s,currentElement:i}=Ae(),o=U(!1),a=U(!1),l=j(()=>r.disabled.value?{}:{click:y,focus:h,pointermove:d,pointerleave:p,pointerdown:c,blur:m});We(()=>{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(T){T.pointerType!=="touch"&&!a.value&&!n.isPointerInTransitRef.value&&(r.onTriggerEnter(),a.value=!0)}function p(){r.onTriggerLeave(),a.value=!1}function h(T){o.value||r.ignoreNonKeyboardFocus.value&&!T.target.matches?.(":focus-visible")||r.onOpen()}function m(){r.onClose()}function y(){r.disableClosingTrigger.value||r.onClose()}return(T,v)=>(P(),W(f(Wp),{"as-child":"",reference:T.reference},{default:R(()=>[H(f(Fe),ge({ref:f(s),"aria-describedby":f(r).open.value?f(r).contentId:void 0,"data-state":f(r).stateAttribute.value,as:T.as,"as-child":t.asChild,"data-grace-area-trigger":""},ju(l.value)),{default:R(()=>[se(T.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3},8,["reference"]))}}),Q2=ee({__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)=>(P(),W(f(Fe),{"data-slot":"button",as:e.as,"as-child":e.asChild,type:e.as==="button"?e.type:void 0,class:Xe(f(st)(f(e_)({variant:e.variant,size:e.size}),t.class))},{default:R(()=>[se(r.$slots,"default")]),_:3},8,["as","as-child","type","class"]))}}),it=Q2;const e_=Qw("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 t_={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"},r_=ee({__name:"KeyPad",setup(e){const t=Ht("webphone"),{sendDTMF:r}=Ht("sip"),{playDtmf:n}=Vf(),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)=>(P(),ye("div",t_,[(P(),ye(Le,null,nr(s,l=>H(f(it),{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:R(()=>[Ne(He(l),1)]),_:2},1032,["onClick","data-key"])),64))]))}}),vc=r_;var Hh=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),n_=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),s_=e=>{const t=n_(e);return t.charAt(0).toUpperCase()+t.slice(1)},i_=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),Mh=e=>e==="";var xi={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 o_=({name:e,iconNode:t,absoluteStrokeWidth:r,"absolute-stroke-width":n,strokeWidth:s,"stroke-width":i,size:o=xi.width,color:a=xi.stroke,...l},{slots:u})=>ir("svg",{...xi,...l,width:o,height:o,stroke:a,"stroke-width":Mh(r)||Mh(n)||r===!0||n===!0?Number(s||i||xi["stroke-width"])*24/Number(o):s||i||xi["stroke-width"],class:i_("lucide",l.class,...e?[`lucide-${Hh(s_(e))}-icon`,`lucide-${Hh(e)}`]:["lucide-icon"])},[...t.map(c=>ir(...c)),...u.default?[u.default()]:[]]);var ct=(e,t)=>(r,{slots:n,attrs:s})=>ir(o_,{...s,...r,iconNode:t,name:e},n);var Nh=ct("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 qh=ct("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);var Bh=ct("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);var a_=ct("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);var mc=ct("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 l_=ct("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 c_=ct("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 u_=ct("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 d_=ct("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 f_=ct("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 p_=ct("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 Lh=ct("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 h_=ct("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 g_=ct("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 v_=ct("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);var m_=ct("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 w_=ct("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 Fh=ct("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 Vh=ct("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 wc=ct("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),y_=ee({__name:"Input",props:{defaultValue:{},modelValue:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=Cs(r,"modelValue",t,{passive:!0,defaultValue:r.defaultValue});return(s,i)=>Wi((P(),ye("input",{"onUpdate:modelValue":i[0]||(i[0]=o=>Je(n)?n.value=o:null),"data-slot":"input",class:Xe(f(st)("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)),[[li,f(n)]])}}),Ti=y_,b_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 14 14"};function __(e,t){return P(),ye("svg",b_,[...t[0]||(t[0]=[Za('<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 yc={render:__},S_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 9 9"};function C_(e,t){return P(),ye("svg",S_,[...t[0]||(t[0]=[re("g",{"clip-path":"url(#a)"},[re("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),re("defs",null,[re("clipPath",{id:"a"},[re("path",{fill:"#fff",d:"M0 0h9v9H0z"})])],-1)])])}var x_={render:C_},T_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20"};function E_(e,t){return P(),ye("svg",T_,[...t[0]||(t[0]=[Za('<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 A_={render:E_},k_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"2.8 2.8 14.2 14.2"};function I_(e,t){return P(),ye("svg",k_,[...t[0]||(t[0]=[re("circle",{cx:"9.899",cy:"9.899",r:"6.6",stroke:"currentColor","stroke-width":".8",transform:"rotate(-135 9.9 9.9)"},null,-1),re("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 R_={render:I_},$_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 19 19"};function P_(e,t){return P(),ye("svg",$_,[...t[0]||(t[0]=[re("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 bc={render:P_},D_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 19 19"};function O_(e,t){return P(),ye("svg",D_,[...t[0]||(t[0]=[re("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),re("path",{stroke:"currentColor","stroke-linecap":"round",d:"M2 16.293 16.293 2"},null,-1)])])}var _c={render:O_},H_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 12 12"};function M_(e,t){return P(),ye("svg",H_,[...t[0]||(t[0]=[re("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 Sc={render:M_},N_=["data-call-status"],q_={key:0,class:"webphone-actions__idle wp:!w-full wp:flex wp:flex-col wp:items-center wp:space-y-2 wp:mb-4"},B_={key:2,class:"webphone-actions__connected wp:w-full wp:flex wp:flex-col wp:items-center wp:gap-3"},L_={class:"webphone-actions__row wp:flex wp:items-center wp:gap-6"},F_={class:"webphone-actions__dialer wp:w-full wp:max-w-80 wp:relative"},V_=["data-visible"],j_={key:3,class:"webphone-actions__calling wp:w-full wp:flex wp:flex-col wp:items-center wp:gap-3"},U_={class:"webphone-actions__dialer wp:w-full wp:max-w-80 wp:relative"},z_=["data-visible"],K_={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"},W_=ee({__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=Ht("webphone"),{makeCall:n,hangupCall:s,answerCall:i,toggleMute:o,toggleHold:a,sendDTMF:l}=Ht("sip"),u=/^[0-9*#]+$/,c=S=>{if(u.test(S)){for(const w of S)l(w);for(const w of S)r.appendKeypad(w)}},d=S=>{S.ctrlKey||S.metaKey||S.altKey||S.key.length!==1||(S.preventDefault(),S.stopPropagation(),c(S.key))},p=S=>{S.data&&(S.preventDefault(),S.stopPropagation(),c(S.data))},h=S=>{S.preventDefault(),S.stopPropagation(),c(S.clipboardData?.getData("text").replace(/\s/g,"")||"")};Re(()=>r.callStatus,(S,w)=>{S==="connected"&&w!=="connected"&&r.clearKeypad()});const m=e,y=t,T=j(()=>!!r.transferInProgress),v=j(()=>m.destination||r.keypadValue||r.lastDialedNumber||""),x=j(()=>!!m.destination||/^[+]?[0-9*#]+$/.test(r.keypadValue)),b=j(()=>x.value||!!r.lastDialedNumber),_=j(()=>!m.isVideo||!x.value?!1:v.value?/^[0-9*#]{1,5}$/.test(v.value):!0),C=async S=>{try{m.destination?await n(m.destination,S):r.keypadValue?await n(r.keypadValue,S):r.lastDialedNumber&&(r.keypadValue=r.lastDialedNumber)}catch(w){if(console.error("Error initiating call:",w),S){let E="No se pudo acceder a la cámara.";const q=w instanceof Error?w.name:String(w);q==="NotReadableError"?E="La cámara parece estar en uso por otra aplicación (ej: Zoom, Meet) o no se puede acceder al hardware.":q==="NotAllowedError"||q==="PermissionDeniedError"?E="Permiso de cámara denegado. Por favor, permita el acceso a la cámara.":q==="NotFoundError"?E="No se detectó ninguna cámara en el sistema.":E+=" "+(w instanceof Error?w.message:String(w)),confirm(`${E}
74
+ `))}return()=>s.value||n.value||o.value?ir(t.default({present:o.value})[0],{ref:u=>{const c=zt(u);return typeof c?.hasAttribute>"u"||(c?.hasAttribute("data-reka-popper-content-wrapper")?i.value=c.firstElementChild:i.value=c),c}}):null}}),Ul=ee({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:r}){return()=>{if(!r.default)return null;const n=Pl(r.default()),s=n.findIndex(l=>l.type!==ot);if(s===-1)return n;const i=n[s];delete i.props?.ref;const o=i.props?ge(t,i.props):t,a=mr({...i,props:{}},o);return n.length===1?a:(n[s]=a,n)}}}),sb=["area","img","input"],Fe=ee({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"&&sb.includes(n)?()=>ir(n,t):n!=="template"?()=>ir(e.as,t,{default:r.default}):()=>ir(Ul,t,{default:r.default})}});function zl(){const e=K();return{primitiveElement:e,currentElement:z(()=>["#text","#comment"].includes(e.value?.$el.nodeName)?e.value?.$el.nextElementSibling:zt(e))}}var[En,ib]=$t("DialogRoot"),ob=ee({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=xs(r,"open",t,{defaultValue:r.defaultOpen,passive:r.open===void 0}),s=K(),i=K(),{modal:o}=It(r);return ib({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)=>se(a.$slots,"default",{open:f(n),close:()=>n.value=!1})}}),ab=ee({__name:"DialogClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e;Ae();const r=En();return(n,s)=>(P(),G(f(Fe),ge(t,{type:n.as==="button"?"button":void 0,onClick:s[0]||(s[0]=i=>f(r).onOpenChange(!1))}),{default:R(()=>[se(n.$slots,"default")]),_:3},16,["type"]))}}),lb="dismissableLayer.pointerDownOutside",cb="dismissableLayer.focusOutside";function Op(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 ub(e,t,r=!0){const n=t?.value?.ownerDocument??globalThis?.document,s=K(!1),i=K(()=>{});return rt(o=>{if(!Pt||!xe(r))return;const a=async u=>{const c=u.target;if(!(!t?.value||!c)){if(Op(t.value,c)){s.value=!1;return}if(u.target&&!s.value){let h=function(){Rl(lb,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:()=>{xe(r)&&(s.value=!0)}}}function db(e,t,r=!0){const n=t?.value?.ownerDocument??globalThis?.document,s=K(!1);return rt(i=>{if(!Pt||!xe(r))return;const o=async a=>{if(!t?.value)return;await wt(),await wt();const l=a.target;!t.value||!l||Op(t.value,l)||a.target&&!s.value&&Rl(cb,e,{originalEvent:a})};n.addEventListener("focusin",o),i(()=>n.removeEventListener("focusin",o))}),{onFocusCapture:()=>{xe(r)&&(s.value=!0)},onBlurCapture:()=>{xe(r)&&(s.value=!1)}}}var ur=qr({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,originalBodyPointerEvents:void 0,branches:new Set}),Kl=ee({__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}=Ae(),o=z(()=>i.value?.ownerDocument??globalThis.document),a=z(()=>ur.layersRoot),l=z(()=>i.value?Array.from(a.value).indexOf(i.value):-1),u=z(()=>ur.layersWithOutsidePointerEventsDisabled.size>0),c=z(()=>{const h=Array.from(a.value),[m]=[...ur.layersWithOutsidePointerEventsDisabled].slice(-1),w=h.indexOf(m);return l.value>=w}),d=ub(async h=>{const m=[...ur.branches].some(w=>w?.contains(h.target));!c.value||m||(n("pointerDownOutside",h),n("interactOutside",h),await wt(),h.defaultPrevented||n("dismiss"))},i),p=db(h=>{[...ur.branches].some(m=>m?.contains(h.target))||(n("focusOutside",h),n("interactOutside",h),h.defaultPrevented||n("dismiss"))},i);return Ry("Escape",h=>{l.value===a.value.size-1&&(n("escapeKeyDown",h),h.defaultPrevented||n("dismiss"))}),rt(h=>{i.value&&(r.disableOutsidePointerEvents&&(ur.layersWithOutsidePointerEventsDisabled.size===0&&(ur.originalBodyPointerEvents=o.value.body.style.pointerEvents,o.value.body.style.pointerEvents="none"),ur.layersWithOutsidePointerEventsDisabled.add(i.value)),a.value.add(i.value),h(()=>{r.disableOutsidePointerEvents&&ur.layersWithOutsidePointerEventsDisabled.size===1&&!$l(ur.originalBodyPointerEvents)&&(o.value.body.style.pointerEvents=ur.originalBodyPointerEvents)}))}),rt(h=>{h(()=>{i.value&&(a.value.delete(i.value),ur.layersWithOutsidePointerEventsDisabled.delete(i.value))})}),(h,m)=>(P(),G(f(Fe),{ref:f(s),"as-child":h.asChild,as:h.as,"data-dismissable-layer":"",style:mt({pointerEvents:u.value?c.value?"auto":"none":void 0}),onFocusCapture:f(p).onFocusCapture,onBlurCapture:f(p).onBlurCapture,onPointerdownCapture:f(d).onPointerDownCapture},{default:R(()=>[se(h.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),fb=ay(()=>K([]));function pb(){const e=fb();return{add(t){const r=e.value[0];t!==r&&r?.pause(),e.value=Hp(e.value,t),e.value.unshift(t)},remove(t){e.value=Hp(e.value,t),e.value[0]?.resume()}}}function Hp(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}var Wl="focusScope.autoFocusOnMount",Gl="focusScope.autoFocusOnUnmount",Mp={bubbles:!1,cancelable:!0};function hb(e,{select:t=!1}={}){const r=Yt();for(const n of e)if(An(n,{select:t}),Yt()!==r)return!0}function gb(e){const t=Np(e);return[qp(t,e),qp(t.reverse(),e)]}function Np(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 qp(e,t){for(const r of e)if(!vb(r,{upTo:t}))return r}function vb(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 mb(e){return e instanceof HTMLInputElement&&"select"in e}function An(e,{select:t=!1}={}){if(e&&e.focus){const r=Yt();e.focus({preventScroll:!0}),e!==r&&mb(e)&&t&&e.select()}}var Bp=ee({__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}=Ae(),o=K(null),a=pb(),l=qr({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});rt(c=>{if(!Pt)return;const d=i.value;if(!r.trapped)return;function p(E){if(l.paused||!d)return;const v=E.target;d.contains(v)?o.value=v:An(o.value,{select:!0})}function h(E){if(l.paused||!d)return;const v=E.relatedTarget;v!==null&&(d.contains(v)||An(o.value,{select:!0}))}function m(E){d.contains(o.value)||An(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()})}),rt(async c=>{const d=i.value;if(await wt(),!d)return;a.add(l);const p=Yt();if(!d.contains(p)){const h=new CustomEvent(Wl,Mp);d.addEventListener(Wl,m=>n("mountAutoFocus",m)),d.dispatchEvent(h),h.defaultPrevented||(hb(Np(d),{select:!0}),Yt()===p&&An(d))}c(()=>{d.removeEventListener(Wl,w=>n("mountAutoFocus",w));const h=new CustomEvent(Gl,Mp),m=w=>{n("unmountAutoFocus",w)};d.addEventListener(Gl,m),d.dispatchEvent(h),setTimeout(()=>{h.defaultPrevented||An(p??document.body,{select:!0}),d.removeEventListener(Gl,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=Yt();if(d&&p){const h=c.currentTarget,[m,w]=gb(h);m&&w?!c.shiftKey&&p===w?(c.preventDefault(),r.loop&&An(m,{select:!0})):c.shiftKey&&p===m&&(c.preventDefault(),r.loop&&An(w,{select:!0})):p===h&&c.preventDefault()}}return(c,d)=>(P(),G(f(Fe),{ref_key:"currentRef",ref:s,tabindex:"-1","as-child":c.asChild,as:c.as,onKeydown:u},{default:R(()=>[se(c.$slots,"default")]),_:3},8,["as-child","as"]))}}),Lp=["Enter"," "],wb=["ArrowDown","PageUp","Home"],yb=["ArrowUp","PageDown","End"],bx=[...wb,...yb],_x={ltr:[...Lp,"ArrowRight"],rtl:[...Lp,"ArrowLeft"]};function bb(e){return e?"open":"closed"}function Fp(e){const t=Yt();for(const r of e)if(r===t||(r.focus(),Yt()!==t))return}var Vp=ee({__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=En(),{forwardRef:i,currentElement:o}=Ae();return s.titleId||(s.titleId=Es(void 0,"reka-dialog-title")),s.descriptionId||(s.descriptionId=Es(void 0,"reka-dialog-description")),We(()=>{s.contentElement=o,Yt()!==document.body&&(s.triggerElement.value=Yt())}),(a,l)=>(P(),G(f(Bp),{"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:R(()=>[H(f(Kl),ge({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(bb)(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:R(()=>[se(a.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),_b=ee({__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=En(),i=Mo(n),{forwardRef:o,currentElement:a}=Ae();return $p(a),(l,u)=>(P(),G(Vp,ge({...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:R(()=>[se(l.$slots,"default")]),_:3},16,["trap-focus"]))}}),Sb=ee({__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=Mo(t);Ae();const s=En(),i=K(!1),o=K(!1);return(a,l)=>(P(),G(Vp,ge({...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:R(()=>[se(a.$slots,"default")]),_:3},16))}}),Cb=ee({__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=En(),i=Mo(n),{forwardRef:o}=Ae();return(a,l)=>(P(),G(f(Tn),{present:a.forceMount||f(s).open.value},{default:R(()=>[f(s).modal.value?(P(),G(_b,ge({key:0,ref:f(o)},{...r,...f(i),...a.$attrs}),{default:R(()=>[se(a.$slots,"default")]),_:3},16)):(P(),G(Sb,ge({key:1,ref:f(o)},{...r,...f(i),...a.$attrs}),{default:R(()=>[se(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),xb=ee({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=En();return Ep(!0),Ae(),(r,n)=>(P(),G(f(Fe),{as:r.as,"as-child":r.asChild,"data-state":f(t).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:R(()=>[se(r.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),Tb=ee({__name:"DialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=En(),{forwardRef:r}=Ae();return(n,s)=>f(t)?.modal.value?(P(),G(f(Tn),{key:0,present:n.forceMount||f(t).open.value},{default:R(()=>[H(xb,ge(n.$attrs,{ref:f(r),as:n.as,"as-child":n.asChild}),{default:R(()=>[se(n.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):Pe("v-if",!0)}}),Jl=ee({__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=Ml();return(r,n)=>f(t)||r.forceMount?(P(),G(ka,{key:0,to:r.to,disabled:r.disabled,defer:r.defer},[se(r.$slots,"default")],8,["to","disabled","defer"])):Pe("v-if",!0)}}),Eb=ee({__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)=>(P(),G(f(Jl),pr(sr(t)),{default:R(()=>[se(r.$slots,"default")]),_:3},16))}}),Ab=ee({__name:"DialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(e){const t=e,r=En();return Ae(),(n,s)=>(P(),G(f(Fe),ge(t,{id:f(r).titleId}),{default:R(()=>[se(n.$slots,"default")]),_:3},16,["id"]))}}),jp="data-reka-collection-item";function en(e={}){const{key:t="",isProvider:r=!1}=e,n=`${t}CollectionProvider`;let s;r?(s={collectionRef:K(),itemMap:K(new Map)},Mn(n,s)):s=Ht(n);const i=(l=!1)=>{const u=s.collectionRef.value;if(!u)return[];const c=Array.from(u.querySelectorAll(`[${jp}]`)),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=ee({name:"CollectionSlot",inheritAttrs:!1,setup(l,{slots:u,attrs:c}){const{primitiveElement:d,currentElement:p}=zl();return Re(p,()=>{s.collectionRef.value=p.value}),()=>ir(Ul,{ref:d,...c},u)}}),a=ee({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(l,{slots:u,attrs:c}){const{primitiveElement:d,currentElement:p}=zl();return rt(h=>{if(p.value){const m=Sa(p.value);s.itemMap.value.set(m,{ref:p.value,value:l.value}),h(()=>s.itemMap.value.delete(m))}}),()=>ir(Ul,{...c,[jp]:"",ref:d},u)}});return{getItems:i,reactiveItems:z(()=>Array.from(s.itemMap.value.values())),itemMapSize:z(()=>s.itemMap.value.size),CollectionSlot:o,CollectionItem:a}}var Yl=ee({__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)=>(P(),G(f(Fe),{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:R(()=>[se(t.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}}),Up=ee({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}=zl();return Re(z(()=>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)=>(P(),G(Yl,ge({ref_key:"primitiveElement",ref:r},{...t,...s.$attrs},{as:"input"}),null,16))}}),kb=ee({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=z(()=>typeof t.value=="object"&&Array.isArray(t.value)&&t.value.length===0&&t.required),n=z(()=>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)=>(P(),ye(Le,null,[Pe(" We render single input if it's required "),r.value?(P(),G(Up,ge({key:s.name},{...t,...s.$attrs},{name:s.name,value:s.value}),null,16,["name","value"])):(P(!0),ye(Le,{key:1},nr(n.value,o=>(P(),G(Up,ge({key:o.name},{ref_for:!0},{...t,...s.$attrs},{name:o.name,value:o.value}),null,16,["name","value"]))),128))],2112))}}),[zp,Ib]=$t("PopperRoot"),Kp=ee({inheritAttrs:!1,__name:"PopperRoot",setup(e){const t=K();return Ib({anchor:t,onAnchorChange:r=>t.value=r}),(r,n)=>se(r.$slots,"default")}}),Wp=ee({__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}=Ae(),s=zp();return Ea(()=>{s.onAnchorChange(t.reference??n.value)}),(i,o)=>(P(),G(f(Fe),{ref:f(r),as:i.as,"as-child":i.asChild},{default:R(()=>[se(i.$slots,"default")]),_:3},8,["as","as-child"]))}}),Rb={key:0,d:"M0 0L6 6L12 0"},$b={key:1,d:"M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0"},Pb=ee({__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 Ae(),(r,n)=>(P(),G(f(Fe),ge(t,{width:r.width,height:r.height,viewBox:r.asChild?void 0:"0 0 12 6",preserveAspectRatio:r.asChild?void 0:"none"}),{default:R(()=>[se(r.$slots,"default",{},()=>[r.rounded?(P(),ye("path",$b)):(P(),ye("path",Rb))])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}});function Db(e){return e!==null}function Ob(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]=Zl(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 Zl(e){const[t,r="center"]=e.split("-");return[t,r]}var Hb=["top","right","bottom","left"],kn=Math.min,Zt=Math.max,Lo=Math.round,Fo=Math.floor,Rr=e=>({x:e,y:e}),Mb={left:"right",right:"left",bottom:"top",top:"bottom"};function Xl(e,t,r){return Zt(e,kn(t,r))}function tn(e,t){return typeof e=="function"?e(t):e}function rn(e){return e.split("-")[0]}function As(e){return e.split("-")[1]}function Ql(e){return e==="x"?"y":"x"}function ec(e){return e==="y"?"height":"width"}function $r(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function tc(e){return Ql($r(e))}function Nb(e,t,r){r===void 0&&(r=!1);const n=As(e),s=tc(e),i=ec(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Vo(o)),[o,Vo(o)]}function qb(e){const t=Vo(e);return[rc(e),t,rc(t)]}function rc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Gp=["left","right"],Jp=["right","left"],Bb=["top","bottom"],Lb=["bottom","top"];function Fb(e,t,r){switch(e){case"top":case"bottom":return r?t?Jp:Gp:t?Gp:Jp;case"left":case"right":return t?Bb:Lb;default:return[]}}function Vb(e,t,r,n){const s=As(e);let i=Fb(rn(e),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(rc)))),i}function Vo(e){const t=rn(e);return Mb[t]+e.slice(t.length)}function jb(e){return{top:0,right:0,bottom:0,left:0,...e}}function Yp(e){return typeof e!="number"?jb(e):{top:e,right:e,bottom:e,left:e}}function jo(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 Zp(e,t,r){let{reference:n,floating:s}=e;const i=$r(t),o=tc(t),a=ec(o),l=rn(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(As(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 Ub(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}=tn(t,e),m=Yp(h),w=a[p?d==="floating"?"reference":"floating":d],E=jo(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,T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),y=await(i.isElement==null?void 0:i.isElement(T))?await(i.getScale==null?void 0:i.getScale(T))||{x:1,y:1}:{x:1,y:1},b=jo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:T,strategy:l}):v);return{top:(E.top-b.top+m.top)/y.y,bottom:(b.bottom-E.bottom+m.bottom)/y.y,left:(E.left-b.left+m.left)/y.x,right:(b.right-E.right+m.right)/y.x}}var zb=50,Kb=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:Ub},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}=Zp(u,n,l),p=n,h=0;const m={};for(let w=0;w<i.length;w++){const E=i[w];if(!E)continue;const{name:v,fn:T}=E,{x:y,y:b,data:x,reset:k}=await T({x:c,y:d,initialPlacement:n,placement:p,strategy:s,middlewareData:m,rects:u,platform:a,elements:{reference:e,floating:t}});c=y??c,d=b??d,m[v]={...m[v],...x},k&&h<zb&&(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}=Zp(u,p,l)),w=-1)}return{x:c,y:d,placement:p,strategy:s,middlewareData:m}},Wb=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}=tn(e,t)||{};if(u==null)return{};const d=Yp(c),p={x:r,y:n},h=tc(s),m=ec(h),w=await o.getDimensions(u),E=h==="y",v=E?"top":"left",T=E?"bottom":"right",y=E?"clientHeight":"clientWidth",b=i.reference[m]+i.reference[h]-p[h]-i.floating[m],x=p[h]-i.reference[h],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let O=k?k[y]:0;(!O||!await(o.isElement==null?void 0:o.isElement(k)))&&(O=a.floating[y]||i.floating[m]);const g=b/2-x/2,q=O/2-w[m]/2-1,B=kn(d[v],q),S=kn(d[T],q),_=B,C=O-w[m]-S,N=O/2-w[m]/2+g,V=Xl(_,N,C),j=!l.arrow&&As(s)!=null&&N!==V&&i.reference[m]/2-(N<_?B:S)-w[m]/2<0,X=j?N<_?N-_:N-C:0;return{[h]:p[h]+X,data:{[h]:V,centerOffset:N-V-X,...j&&{alignmentOffset:X}},reset:j}}}),Gb=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,...E}=tn(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const v=rn(s),T=$r(a),y=rn(a)===a,b=await(l.isRTL==null?void 0:l.isRTL(u.floating)),x=p||(y||!w?[Vo(a)]:qb(a)),k=m!=="none";!p&&k&&x.push(...Vb(a,w,m,b));const O=[a,...x],g=await l.detectOverflow(t,E),q=[];let B=((n=i.flip)==null?void 0:n.overflows)||[];if(c&&q.push(g[v]),d){const N=Nb(s,o,b);q.push(g[N[0]],g[N[1]])}if(B=[...B,{placement:s,overflows:q}],!q.every(N=>N<=0)){var S,_;const N=(((S=i.flip)==null?void 0:S.index)||0)+1,V=O[N];if(V&&(!(d==="alignment"&&T!==$r(V))||B.every(X=>$r(X.placement)===T?X.overflows[0]>0:!0)))return{data:{index:N,overflows:B},reset:{placement:V}};let j=(_=B.filter(X=>X.overflows[0]<=0).sort((X,Z)=>X.overflows[1]-Z.overflows[1])[0])==null?void 0:_.placement;if(!j)switch(h){case"bestFit":{var C;const X=(C=B.filter(Z=>{if(k){const le=$r(Z.placement);return le===T||le==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(le=>le>0).reduce((le,W)=>le+W,0)]).sort((Z,le)=>Z[1]-le[1])[0])==null?void 0:C[0];X&&(j=X);break}case"initialPlacement":j=a;break}if(s!==j)return{reset:{placement:j}}}return{}}}};function Xp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Qp(e){return Hb.some(t=>e[t]>=0)}var Jb=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:s="referenceHidden",...i}=tn(e,t);switch(s){case"referenceHidden":{const o=Xp(await n.detectOverflow(t,{...i,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Qp(o)}}}case"escaped":{const o=Xp(await n.detectOverflow(t,{...i,altBoundary:!0}),r.floating);return{data:{escapedOffsets:o,escaped:Qp(o)}}}default:return{}}}}},eh=new Set(["left","top"]);async function Yb(e,t){const{placement:r,platform:n,elements:s}=e,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=rn(r),a=As(r),l=$r(r)==="y",u=eh.has(o)?-1:1,c=i&&l?-1:1,d=tn(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 Zb=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 Yb(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}}}}},Xb=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:T,y}=v;return{x:T,y}}},...u}=tn(e,t),c={x:r,y:n},d=await i.detectOverflow(t,u),p=$r(rn(s)),h=Ql(p);let m=c[h],w=c[p];if(o){const v=h==="y"?"top":"left",T=h==="y"?"bottom":"right",y=m+d[v],b=m-d[T];m=Xl(y,m,b)}if(a){const v=p==="y"?"top":"left",T=p==="y"?"bottom":"right",y=w+d[v],b=w-d[T];w=Xl(y,w,b)}const E=l.fn({...t,[h]:m,[p]:w});return{...E,data:{x:E.x-r,y:E.y-n,enabled:{[h]:o,[p]:a}}}}}},Qb=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}=tn(e,t),c={x:r,y:n},d=$r(s),p=Ql(d);let h=c[p],m=c[d];const w=tn(a,t),E=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const y=p==="y"?"height":"width",b=i.reference[p]-i.floating[y]+E.mainAxis,x=i.reference[p]+i.reference[y]-E.mainAxis;h<b?h=b:h>x&&(h=x)}if(u){var v,T;const y=p==="y"?"width":"height",b=eh.has(rn(s)),x=i.reference[d]-i.floating[y]+(b&&((v=o.offset)==null?void 0:v[d])||0)+(b?0:E.crossAxis),k=i.reference[d]+i.reference[y]+(b?0:((T=o.offset)==null?void 0:T[d])||0)-(b?E.crossAxis:0);m<x?m=x:m>k&&(m=k)}return{[p]:h,[d]:m}}}},e1=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}=tn(e,t),c=await o.detectOverflow(t,u),d=rn(s),p=As(s),h=$r(s)==="y",{width:m,height:w}=i.floating;let E,v;d==="top"||d==="bottom"?(E=d,v=p===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,E=p==="end"?"top":"bottom");const T=w-c.top-c.bottom,y=m-c.left-c.right,b=kn(w-c[E],T),x=kn(m-c[v],y),k=!t.middlewareData.shift;let O=b,g=x;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(g=y),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(O=T),k&&!p){const B=Zt(c.left,0),S=Zt(c.right,0),_=Zt(c.top,0),C=Zt(c.bottom,0);h?g=m-2*(B!==0||S!==0?B+S:Zt(c.left,c.right)):O=w-2*(_!==0||C!==0?_+C:Zt(c.top,c.bottom))}await l({...t,availableWidth:g,availableHeight:O});const q=await o.getDimensions(a.floating);return m!==q.width||w!==q.height?{reset:{rects:!0}}:{}}}};function Uo(){return typeof window<"u"}function Jn(e){return nc(e)?(e.nodeName||"").toLowerCase():"#document"}function Xt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Pr(e){var t;return(t=(nc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function nc(e){return Uo()?e instanceof Node||e instanceof Xt(e).Node:!1}function _r(e){return Uo()?e instanceof Element||e instanceof Xt(e).Element:!1}function nn(e){return Uo()?e instanceof HTMLElement||e instanceof Xt(e).HTMLElement:!1}function th(e){return!Uo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Xt(e).ShadowRoot}function bi(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=Sr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&s!=="inline"&&s!=="contents"}function t1(e){return/^(table|td|th)$/.test(Jn(e))}function zo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var r1=/transform|translate|scale|rotate|perspective|filter/,n1=/paint|layout|strict|content/,Yn=e=>!!e&&e!=="none",sc;function ic(e){const t=_r(e)?Sr(e):e;return Yn(t.transform)||Yn(t.translate)||Yn(t.scale)||Yn(t.rotate)||Yn(t.perspective)||!oc()&&(Yn(t.backdropFilter)||Yn(t.filter))||r1.test(t.willChange||"")||n1.test(t.contain||"")}function s1(e){let t=In(e);for(;nn(t)&&!ks(t);){if(ic(t))return t;if(zo(t))return null;t=In(t)}return null}function oc(){return sc==null&&(sc=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),sc}function ks(e){return/^(html|body|#document)$/.test(Jn(e))}function Sr(e){return Xt(e).getComputedStyle(e)}function Ko(e){return _r(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function In(e){if(Jn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||th(e)&&e.host||Pr(e);return th(t)?t.host:t}function rh(e){const t=In(e);return ks(t)?e.ownerDocument?e.ownerDocument.body:e.body:nn(t)&&bi(t)?t:rh(t)}function _i(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=rh(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=Xt(s);if(i){const a=ac(o);return t.concat(o,o.visualViewport||[],bi(s)?s:[],a&&r?_i(a):[])}else return t.concat(s,_i(s,[],r))}function ac(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function nh(e){const t=Sr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=nn(e),i=s?e.offsetWidth:r,o=s?e.offsetHeight:n,a=Lo(r)!==i||Lo(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function lc(e){return _r(e)?e:e.contextElement}function Is(e){const t=lc(e);if(!nn(t))return Rr(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:i}=nh(t);let o=(i?Lo(r.width):r.width)/n,a=(i?Lo(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var i1=Rr(0);function sh(e){const t=Xt(e);return!oc()||!t.visualViewport?i1:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function o1(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Xt(e)?!1:t}function Zn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),i=lc(e);let o=Rr(1);t&&(n?_r(n)&&(o=Is(n)):o=Is(e));const a=o1(i,r,n)?sh(i):Rr(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=Xt(i),h=n&&_r(n)?Xt(n):n;let m=p,w=ac(m);for(;w&&n&&h!==m;){const E=Is(w),v=w.getBoundingClientRect(),T=Sr(w),y=v.left+(w.clientLeft+parseFloat(T.paddingLeft))*E.x,b=v.top+(w.clientTop+parseFloat(T.paddingTop))*E.y;l*=E.x,u*=E.y,c*=E.x,d*=E.y,l+=y,u+=b,m=Xt(w),w=ac(m)}}return jo({width:c,height:d,x:l,y:u})}function Wo(e,t){const r=Ko(e).scrollLeft;return t?t.left+r:Zn(Pr(e)).left+r}function ih(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-Wo(e,r),y:r.top+t.scrollTop}}function a1(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const i=s==="fixed",o=Pr(n),a=t?zo(t.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},u=Rr(1);const c=Rr(0),d=nn(n);if((d||!d&&!i)&&((Jn(n)!=="body"||bi(o))&&(l=Ko(n)),d)){const h=Zn(n);u=Is(n),c.x=h.x+n.clientLeft,c.y=h.y+n.clientTop}const p=o&&!d&&!i?ih(o,l):Rr(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 l1(e){return Array.from(e.getClientRects())}function c1(e){const t=Pr(e),r=Ko(e),n=e.ownerDocument.body,s=Zt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Zt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+Wo(e);const a=-r.scrollTop;return Sr(n).direction==="rtl"&&(o+=Zt(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}var oh=25;function u1(e,t){const r=Xt(e),n=Pr(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=oc();(!c||c&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}const u=Wo(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<=oh&&(i-=m)}else u<=oh&&(i+=u);return{width:i,height:o,x:a,y:l}}function d1(e,t){const r=Zn(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,i=nn(e)?Is(e):Rr(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:s*i.x,y:n*i.y}}function ah(e,t,r){let n;if(t==="viewport")n=u1(e,r);else if(t==="document")n=c1(Pr(e));else if(_r(t))n=d1(t,r);else{const s=sh(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return jo(n)}function lh(e,t){const r=In(e);return r===t||!_r(r)||ks(r)?!1:Sr(r).position==="fixed"||lh(r,t)}function f1(e,t){const r=t.get(e);if(r)return r;let n=_i(e,[],!1).filter(a=>_r(a)&&Jn(a)!=="body"),s=null;const i=Sr(e).position==="fixed";let o=i?In(e):e;for(;_r(o)&&!ks(o);){const a=Sr(o),l=ic(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&s&&(s.position==="absolute"||s.position==="fixed")||bi(o)&&!l&&lh(e,o))?n=n.filter(u=>u!==o):s=a,o=In(o)}return t.set(e,n),n}function p1(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const i=[...r==="clippingAncestors"?zo(t)?[]:f1(t,this._c):[].concat(r),n],o=ah(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=ah(t,i[d],s);a=Zt(p.top,a),l=kn(p.right,l),u=kn(p.bottom,u),c=Zt(p.left,c)}return{width:l-c,height:u-a,x:c,y:a}}function h1(e){const{width:t,height:r}=nh(e);return{width:t,height:r}}function g1(e,t,r){const n=nn(t),s=Pr(t),i=r==="fixed",o=Zn(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Rr(0);function u(){l.x=Wo(s)}if(n||!n&&!i)if((Jn(t)!=="body"||bi(s))&&(a=Ko(t)),n){const d=Zn(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?ih(s,a):Rr(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 cc(e){return Sr(e).position==="static"}function ch(e,t){if(!nn(e)||Sr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Pr(e)===r&&(r=r.ownerDocument.body),r}function uh(e,t){const r=Xt(e);if(zo(e))return r;if(!nn(e)){let s=In(e);for(;s&&!ks(s);){if(_r(s)&&!cc(s))return s;s=In(s)}return r}let n=ch(e,t);for(;n&&t1(n)&&cc(n);)n=ch(n,t);return n&&ks(n)&&cc(n)&&!ic(n)?r:n||s1(e)||r}var v1=async function(e){const t=this.getOffsetParent||uh,r=this.getDimensions,n=await r(e.floating);return{reference:g1(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function m1(e){return Sr(e).direction==="rtl"}var w1={convertOffsetParentRelativeRectToViewportRelativeRect:a1,getDocumentElement:Pr,getClippingRect:p1,getOffsetParent:uh,getElementRects:v1,getClientRects:l1,getDimensions:h1,getScale:Is,isElement:_r,isRTL:m1};function dh(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function y1(e,t){let r=null,n;const s=Pr(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=Fo(d),w=Fo(s.clientWidth-(c+p)),E=Fo(s.clientHeight-(d+h)),v=Fo(c),T={rootMargin:-m+"px "+-w+"px "+-E+"px "+-v+"px",threshold:Zt(0,kn(1,l))||1};let y=!0;function b(x){const k=x[0].intersectionRatio;if(k!==l){if(!y)return o();k?o(!1,k):n=setTimeout(()=>{o(!1,1e-7)},1e3)}k===1&&!dh(u,e.getBoundingClientRect())&&o(),y=!1}try{r=new IntersectionObserver(b,{...T,root:s.ownerDocument})}catch{r=new IntersectionObserver(b,T)}r.observe(e)}return o(!0),i}function b1(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=lc(e),c=s||i?[...u?_i(u):[],...t?_i(t):[]]:[];c.forEach(v=>{s&&v.addEventListener("scroll",r,{passive:!0}),i&&v.addEventListener("resize",r)});const d=u&&a?y1(u,r):null;let p=-1,h=null;o&&(h=new ResizeObserver(v=>{let[T]=v;T&&T.target===u&&h&&t&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var y;(y=h)==null||y.observe(t)})),r()}),u&&!l&&h.observe(u),t&&h.observe(t));let m,w=l?Zn(e):null;l&&E();function E(){const v=Zn(e);w&&!dh(w,v)&&r(),w=v,m=requestAnimationFrame(E)}return r(),()=>{var v;c.forEach(T=>{s&&T.removeEventListener("scroll",r),i&&T.removeEventListener("resize",r)}),d?.(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(m)}}var _1=Zb,S1=Xb,fh=Gb,C1=e1,x1=Jb,T1=Wb,E1=Qb,A1=(e,t,r)=>{const n=new Map,s={platform:w1,...r},i={...s.platform,_c:n};return Kb(e,t,{...s,platform:i})};function k1(e){return e!=null&&typeof e=="object"&&"$el"in e}function uc(e){if(k1(e)){const t=e.$el;return nc(t)&&Jn(t)==="#comment"?null:t}return e}function Rs(e){return typeof e=="function"?e():f(e)}function I1(e){return{name:"arrow",options:e,fn(t){const r=uc(Rs(e.element));return r==null?{}:T1({element:r,padding:e.padding}).fn(t)}}}function ph(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function hh(e,t){const r=ph(e);return Math.round(t*r)/r}function R1(e,t,r){r===void 0&&(r={});const n=r.whileElementsMounted,s=z(()=>{var O;return(O=Rs(r.open))!=null?O:!0}),i=z(()=>Rs(r.middleware)),o=z(()=>{var O;return(O=Rs(r.placement))!=null?O:"bottom"}),a=z(()=>{var O;return(O=Rs(r.strategy))!=null?O:"absolute"}),l=z(()=>{var O;return(O=Rs(r.transform))!=null?O:!0}),u=z(()=>uc(e.value)),c=z(()=>uc(t.value)),d=K(0),p=K(0),h=K(a.value),m=K(o.value),w=nt({}),E=K(!1),v=z(()=>{const O={position:h.value,left:"0",top:"0"};if(!c.value)return O;const g=hh(c.value,d.value),q=hh(c.value,p.value);return l.value?{...O,transform:"translate("+g+"px, "+q+"px)",...ph(c.value)>=1.5&&{willChange:"transform"}}:{position:h.value,left:g+"px",top:q+"px"}});let T;function y(){if(u.value==null||c.value==null)return;const O=s.value;A1(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,E.value=O!==!1})}function b(){typeof T=="function"&&(T(),T=void 0)}function x(){if(b(),n===void 0){y();return}if(u.value!=null&&c.value!=null){T=n(u.value,c.value,y);return}}function k(){s.value||(E.value=!1)}return Re([i,o,a,s],y,{flush:"sync"}),Re([u,c],x,{flush:"sync"}),Re(s,k,{flush:"sync"}),Di()&&fa(b),{x:Br(d),y:Br(p),strategy:Br(h),placement:Br(m),middlewareData:Br(w),isPositioned:Br(E),floatingStyles:v,update:y}}var $1={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},[P1,D1]=$t("PopperContent"),gh=ee({inheritAttrs:!1,__name:"PopperContent",props:zu({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}},{...$1}),emits:["placed"],setup(e,{emit:t}){const r=e,n=t,s=zp(),{forwardRef:i,currentElement:o}=Ae(),a=K(),l=K(),{width:u,height:c}=Pp(l),d=z(()=>r.side+(r.align!=="center"?`-${r.align}`:"")),p=z(()=>typeof r.collisionPadding=="number"?r.collisionPadding:{top:0,right:0,bottom:0,left:0,...r.collisionPadding}),h=z(()=>Array.isArray(r.collisionBoundary)?r.collisionBoundary:[r.collisionBoundary]),m=z(()=>({padding:p.value,boundary:h.value.filter(Db),altBoundary:h.value.length>0})),w=z(()=>({mainAxis:r.sideFlip,crossAxis:r.alignFlip})),E=iy(()=>[_1({mainAxis:r.sideOffset+c.value,alignmentAxis:r.alignOffset}),r.prioritizePosition&&r.avoidCollisions&&fh({...m.value,...w.value}),r.avoidCollisions&&S1({mainAxis:!0,crossAxis:!!r.prioritizePosition,limiter:r.sticky==="partial"?E1():void 0,...m.value}),!r.prioritizePosition&&r.avoidCollisions&&fh({...m.value,...w.value}),C1({...m.value,apply:({elements:B,rects:S,availableWidth:_,availableHeight:C})=>{const{width:N,height:V}=S.reference,j=B.floating.style;j.setProperty("--reka-popper-available-width",`${_}px`),j.setProperty("--reka-popper-available-height",`${C}px`),j.setProperty("--reka-popper-anchor-width",`${N}px`),j.setProperty("--reka-popper-anchor-height",`${V}px`)}}),l.value&&I1({element:l.value,padding:r.arrowPadding}),Ob({arrowWidth:u.value,arrowHeight:c.value}),r.hideWhenDetached&&x1({strategy:"referenceHidden",...m.value})]),{floatingStyles:v,placement:T,isPositioned:y,middlewareData:b,update:x}=R1(z(()=>r.reference??s.anchor.value),a,{strategy:r.positionStrategy,placement:d,whileElementsMounted:(...B)=>b1(...B,{layoutShift:!r.disableUpdateOnLayoutShift,animationFrame:r.updatePositionStrategy==="always"}),middleware:E}),k=z(()=>Zl(T.value)[0]),O=z(()=>Zl(T.value)[1]);Ea(()=>{y.value&&n("placed")});const g=z(()=>{const B=b.value.arrow?.centerOffset!==0;return r.hideShiftedArrow&&B}),q=K("");return rt(()=>{o.value&&(q.value=window.getComputedStyle(o.value).zIndex)}),D1({placedSide:k,onArrowChange:B=>l.value=B,arrowX:z(()=>b.value.arrow?.x??0),arrowY:z(()=>b.value.arrow?.y??0),shouldHideArrow:g}),(B,S)=>(P(),ye("div",{ref_key:"floatingRef",ref:a,"data-reka-popper-content-wrapper":"",style:mt({...f(v),transform:f(y)?f(v).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:q.value,"--reka-popper-transform-origin":[f(b).transformOrigin?.x,f(b).transformOrigin?.y].join(" "),...f(b).hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}})},[H(f(Fe),ge({ref:f(i)},B.$attrs,{"as-child":r.asChild,as:B.as,"data-side":k.value,"data-align":O.value,style:{animation:f(y)?void 0:"none"}}),{default:R(()=>[se(B.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4))}}),O1={top:"bottom",right:"left",bottom:"top",left:"right"},H1=ee({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}=Ae(),r=P1(),n=z(()=>O1[r.placedSide.value]);return(s,i)=>(P(),ye("span",{ref:o=>{f(r).onArrowChange(o)},style:mt({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})},[H(Pb,ge(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:R(()=>[se(s.$slots,"default")]),_:3},16,["as","as-child","rounded","width","height"])],4))}});function vh(e){const t=$o({nonce:K()});return z(()=>e?.value||t.nonce?.value)}function M1(e=[],t,r){const n=[...e];return n[r]=t,n.sort((s,i)=>s-i)}function mh(e,t,r){return yi(100/(r-t)*(e-t),0,100)}function N1(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function q1(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 B1(e,t,r){const n=e/2;return(n-dc([0,50],[0,n])(t)*r)*r}function L1(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function F1(e,t){if(t>0){const r=L1(e);return Math.min(...r)>=t}return!0}function dc(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 V1(e){return(String(e).split(".")[1]||"").length}function j1(e,t){const r=10**t;return Math.round(e*r)/r}var wh=["PageUp","PageDown"],yh=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],bh={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageUp","ArrowUp","ArrowLeft"]},[_h,Sh]=$t(["SliderVertical","SliderHorizontal"]),U1=ee({__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}=It(r),{forwardRef:l,currentElement:u}=Ae(),c=$s(),d=K(),p=K(),h=z(()=>o?.value!=="rtl"&&!a.value||o?.value!=="ltr"&&a.value);function m(w,E){const v=p.value||u.value.getBoundingClientRect(),T=[...c.thumbElements.value][c.valueIndexToChangeRef.value],y=c.thumbAlignment.value==="contain"?T.clientWidth:0;!d.value&&!E&&c.thumbAlignment.value==="contain"&&(d.value=w.clientX-T.getBoundingClientRect().left);const b=dc([0,v.width-y],h.value?[i.value,s.value]:[s.value,i.value]);return p.value=v,b(E?w.clientX-v.left-y/2:w.clientX-v.left-(d.value??0))}return Sh({startEdge:z(()=>h.value?"left":"right"),endEdge:z(()=>h.value?"right":"left"),direction:z(()=>h.value?1:-1),size:"width"}),(w,E)=>(P(),G(Ch,{ref:f(l),dir:f(o),"data-orientation":"horizontal",style:mt({"--reka-slider-thumb-transform":!h.value&&f(c).thumbAlignment.value==="overflow"?"translateX(50%)":"translateX(-50%)"}),onSlideStart:E[0]||(E[0]=v=>{n("slideStart",m(v,!0))}),onSlideMove:E[1]||(E[1]=v=>{n("slideMove",m(v))}),onSlideEnd:E[2]||(E[2]=()=>{p.value=void 0,d.value=void 0,n("slideEnd")}),onStepKeyDown:E[3]||(E[3]=v=>{const T=h.value?"from-left":"from-right";n("stepKeyDown",v,f(bh)[T].includes(v.key)?-1:1)}),onEndKeyDown:E[4]||(E[4]=v=>n("endKeyDown",v)),onHomeKeyDown:E[5]||(E[5]=v=>n("homeKeyDown",v))},{default:R(()=>[se(w.$slots,"default")]),_:3},8,["dir","style"]))}}),z1=ee({__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}=It(r),a=$s(),{forwardRef:l,currentElement:u}=Ae(),c=K(),d=K(),p=z(()=>!o.value);function h(m,w){const E=d.value||u.value.getBoundingClientRect(),v=[...a.thumbElements.value][a.valueIndexToChangeRef.value],T=a.thumbAlignment.value==="contain"?v.clientHeight:0;!c.value&&!w&&a.thumbAlignment.value==="contain"&&(c.value=m.clientY-v.getBoundingClientRect().top);const y=dc([0,E.height-T],p.value?[s.value,i.value]:[i.value,s.value]),b=w?m.clientY-E.top-T/2:m.clientY-E.top-(c.value??0);return d.value=E,y(b)}return Sh({startEdge:z(()=>p.value?"bottom":"top"),endEdge:z(()=>p.value?"top":"bottom"),direction:z(()=>p.value?1:-1),size:"height"}),(m,w)=>(P(),G(Ch,{ref:f(l),"data-orientation":"vertical",style:mt({"--reka-slider-thumb-transform":!p.value&&f(a).thumbAlignment.value==="overflow"?"translateY(-50%)":"translateY(50%)"}),onSlideStart:w[0]||(w[0]=E=>{n("slideStart",h(E,!0))}),onSlideMove:w[1]||(w[1]=E=>{n("slideMove",h(E))}),onSlideEnd:w[2]||(w[2]=()=>{d.value=void 0,c.value=void 0,n("slideEnd")}),onStepKeyDown:w[3]||(w[3]=E=>{const v=p.value?"from-bottom":"from-top";n("stepKeyDown",E,f(bh)[v].includes(E.key)?-1:1)}),onEndKeyDown:w[4]||(w[4]=E=>n("endKeyDown",E)),onHomeKeyDown:w[5]||(w[5]=E=>n("homeKeyDown",E))},{default:R(()=>[se(m.$slots,"default")]),_:3},8,["style"]))}}),[$s,K1]=$t("SliderRoot"),W1=ee({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}=It(r),p=Ll(d),{forwardRef:h,currentElement:m}=Ae(),w=Ip(m),{CollectionSlot:E}=en({isProvider:!0}),v=xs(r,"modelValue",n,{defaultValue:r.defaultValue,passive:r.modelValue===void 0}),T=z(()=>Array.isArray(v.value)?[...v.value]:[]),y=K(0),b=K(T.value);function x(B){g(B,q1(T.value,B))}function k(B){g(B,y.value)}function O(){const B=b.value[y.value];T.value[y.value]!==B&&n("valueCommit",Be(T.value))}function g(B,S,{commit:_}={commit:!1}){const C=V1(o.value),N=yi(j1(Math.round((B-s.value)/o.value)*o.value+s.value,C),s.value,i.value),V=M1(T.value,N,S);if(F1(V,a.value*o.value)){y.value=V.indexOf(N);const j=String(V)!==String(v.value);j&&_&&n("valueCommit",V),j&&(q.value[y.value]?.focus(),v.value=V)}}const q=K([]);return K1({modelValue:v,currentModelValue:T,valueIndexToChangeRef:y,thumbElements:q,orientation:l,min:s,max:i,disabled:u,thumbAlignment:c}),(B,S)=>(P(),G(f(E),null,{default:R(()=>[(P(),G(Qs(f(l)==="horizontal"?U1:z1),ge(B.$attrs,{ref:f(h),"as-child":B.asChild,as:B.as,min:f(s),max:f(i),dir:f(p),inverted:B.inverted,"aria-disabled":f(u),"data-disabled":f(u)?"":void 0,onPointerdown:S[0]||(S[0]=()=>{f(u)||(b.value=T.value)}),onSlideStart:S[1]||(S[1]=_=>!f(u)&&x(_)),onSlideMove:S[2]||(S[2]=_=>!f(u)&&k(_)),onSlideEnd:S[3]||(S[3]=_=>!f(u)&&O()),onHomeKeyDown:S[4]||(S[4]=_=>!f(u)&&g(f(s),0,{commit:!0})),onEndKeyDown:S[5]||(S[5]=_=>!f(u)&&g(f(i),T.value.length-1,{commit:!0})),onStepKeyDown:S[6]||(S[6]=(_,C)=>{if(!f(u)){const N=f(wh).includes(_.key)||_.shiftKey&&f(yh).includes(_.key)?10:1,V=y.value,j=T.value[V];g(j+f(o)*N*C,V,{commit:!0})}})}),{default:R(()=>[se(B.$slots,"default",{modelValue:f(v)}),f(w)&&B.name?(P(),G(f(kb),{key:0,type:"number",value:f(v),name:B.name,required:B.required,disabled:f(u),step:f(o)},null,8,["value","name","required","disabled","step"])):Pe("v-if",!0)]),_:3},16,["as-child","as","min","max","dir","inverted","aria-disabled","data-disabled"]))]),_:3}))}}),Ch=ee({__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=$s();return(i,o)=>(P(),G(f(Fe),ge({"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(wh).concat(f(yh)).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:R(()=>[se(i.$slots,"default")]),_:3},16))}}),G1=ee({__name:"SliderRange",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=$s(),r=_h();Ae();const n=z(()=>t.currentModelValue.value.map(o=>mh(o,t.min.value,t.max.value))),s=z(()=>t.currentModelValue.value.length>1?Math.min(...n.value):0),i=z(()=>100-Math.max(...n.value,0));return(o,a)=>(P(),G(f(Fe),{"data-disabled":f(t).disabled.value?"":void 0,"data-orientation":f(t).orientation.value,"as-child":o.asChild,as:o.as,style:mt({[f(r).startEdge.value]:`${s.value}%`,[f(r).endEdge.value]:`${i.value}%`})},{default:R(()=>[se(o.$slots,"default")]),_:3},8,["data-disabled","data-orientation","as-child","as","style"]))}}),J1=ee({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=$s(),n=_h(),{forwardRef:s,currentElement:i}=Ae(),{CollectionItem:o}=en(),a=z(()=>r.modelValue?.value?.[t.index]),l=z(()=>a.value===void 0?0:mh(a.value,r.min.value??0,r.max.value??100)),u=z(()=>N1(t.index,r.modelValue?.value?.length??0)),c=Pp(i),d=z(()=>c[n.size].value),p=z(()=>r.thumbAlignment.value==="overflow"||!d.value?0:B1(d.value,l.value,n.direction.value)),h=Ml();return We(()=>{r.thumbElements.value.push(i.value)}),Mt(()=>{const m=r.thumbElements.value.findIndex(w=>w===i.value)??-1;r.thumbElements.value.splice(m,1)}),(m,w)=>(P(),G(f(o),null,{default:R(()=>[H(f(Fe),ge(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:R(()=>[se(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}))}}),Y1=ee({__name:"SliderThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,{getItems:r}=en(),{forwardRef:n,currentElement:s}=Ae(),i=z(()=>s.value?r(!0).findIndex(o=>o.ref===s.value):-1);return(o,a)=>(P(),G(J1,ge({ref:f(n)},t,{index:i.value}),{default:R(()=>[se(o.$slots,"default")]),_:3},16,["index"]))}}),Z1=ee({__name:"SliderTrack",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=$s();return Ae(),(r,n)=>(P(),G(f(Fe),{"as-child":r.asChild,as:r.as,"data-disabled":f(t).disabled.value?"":void 0,"data-orientation":f(t).orientation.value},{default:R(()=>[se(r.$slots,"default")]),_:3},8,["as-child","as","data-disabled","data-orientation"]))}}),X1=ee({__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 Ae(),(r,n)=>(P(),G(f(Fe),ge(t,{onMousedown:n[0]||(n[0]=s=>{!s.defaultPrevented&&s.detail>1&&s.preventDefault()})}),{default:R(()=>[se(r.$slots,"default")]),_:3},16))}}),[Qt,Q1]=$t("ScrollAreaRoot"),e2=ee({__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=K(0),s=K(0),i=K(),o=K(),a=K(),l=K(),u=K(!1),c=K(!1),{type:d,dir:p,scrollHideDelay:h}=It(r),m=Ll(p);function w(){i.value?.scrollTo({top:0})}function E(){i.value?.scrollTo({top:0,left:0})}t({viewport:i,scrollTop:w,scrollTopLeft:E});const{forwardRef:v,currentElement:T}=Ae();return Q1({type:d,dir:m,scrollHideDelay:h,scrollArea:T,viewport:i,onViewportChange:y=>{i.value=y||void 0},content:o,onContentChange:y=>{o.value=y},scrollbarX:a,scrollbarXEnabled:u,scrollbarY:l,scrollbarYEnabled:c,onScrollbarXChange:y=>{a.value=y||void 0},onScrollbarYChange:y=>{l.value=y||void 0},onScrollbarXEnabledChange:y=>{u.value=y},onScrollbarYEnabledChange:y=>{c.value=y},onCornerWidthChange:y=>{n.value=y},onCornerHeightChange:y=>{s.value=y}}),(y,b)=>(P(),G(f(Fe),{ref:f(v),"as-child":r.asChild,as:y.as,dir:f(m),style:mt({position:"relative","--reka-scroll-area-corner-width":`${n.value}px`,"--reka-scroll-area-corner-height":`${s.value}px`})},{default:R(()=>[se(y.$slots,"default")]),_:3},8,["as-child","as","dir","style"]))}}),t2=ee({__name:"ScrollAreaCornerImpl",setup(e){const t=Qt(),r=K(0),n=K(0),s=z(()=>!!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 Gn(t.scrollbarX.value,i),Gn(t.scrollbarY.value,o),Re(()=>t.scrollbarX.value,i),Re(()=>t.scrollbarY.value,o),(a,l)=>s.value?(P(),G(f(Fe),ge({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:R(()=>[se(a.$slots,"default")]),_:3},16,["style"])):Pe("v-if",!0)}}),r2=ee({__name:"ScrollAreaCorner",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:r}=Ae(),n=Qt(),s=z(()=>!!n.scrollbarX.value&&!!n.scrollbarY.value),i=z(()=>n.type.value!=="scroll"&&s.value);return(o,a)=>i.value?(P(),G(t2,ge({key:0},t,{ref:f(r)}),{default:R(()=>[se(o.$slots,"default")]),_:3},16)):Pe("v-if",!0)}});function xh(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 Go(e){const t=Th(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function Th(e,t){const r=e/t;return Number.isNaN(r)?0:r}function n2(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 Eh(e,t,r="ltr"){const n=Go(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=yi(e,l[0],l[1]);return xh([0,o],[0,a])(u)}function Jo(e){return e?Number.parseInt(e,10):0}function s2(e,t,r,n="ltr"){const s=Go(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 xh([l,u],d)(e)}function Ah(e,t){return e>0&&e<t}var i2=ee({__name:"ScrollAreaScrollbarX",setup(e){const t=Qt(),r=Yo(),{forwardRef:n,currentElement:s}=Ae();We(()=>{s.value&&t.onScrollbarXChange(s.value)});const i=z(()=>r.sizes.value);return(o,a)=>(P(),G(kh,{ref:f(n),"is-horizontal":!0,"data-orientation":"horizontal",style:mt({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(Go)(i.value)}px`:void 0}),onOnDragScroll:a[0]||(a[0]=l=>f(r).onDragScroll(l.x))},{default:R(()=>[se(o.$slots,"default")]),_:3},8,["style"]))}}),o2=ee({__name:"ScrollAreaScrollbarY",setup(e){const t=Qt(),r=Yo(),{forwardRef:n,currentElement:s}=Ae();We(()=>{s.value&&t.onScrollbarYChange(s.value)});const i=z(()=>r.sizes.value);return(o,a)=>(P(),G(kh,{ref:f(n),"is-horizontal":!1,"data-orientation":"vertical",style:mt({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(Go)(i.value)}px`:void 0}),onOnDragScroll:a[0]||(a[0]=l=>f(r).onDragScroll(l.y))},{default:R(()=>[se(o.$slots,"default")]),_:3},8,["style"]))}}),fc=ee({__name:"ScrollAreaScrollbarAuto",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=Qt(),r=Si(),{forwardRef:n}=Ae(),s=K(!1),i=Hl(()=>{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 We(()=>i()),Gn(t.viewport,i),Gn(t.content,i),(o,a)=>(P(),G(f(Tn),{present:o.forceMount||s.value},{default:R(()=>[H(pc,ge(o.$attrs,{ref:f(n),"data-state":s.value?"visible":"hidden"}),{default:R(()=>[se(o.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),a2=ee({inheritAttrs:!1,__name:"ScrollAreaScrollbarGlimpse",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=Qt(),r=Si(),{forwardRef:n}=Ae(),{state:s,dispatch:i}=jl("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=z(()=>s.value!=="hidden");function a(){i("POINTER_ENTER")}function l(){i("POINTER_LEAVE")}const u=Hl(()=>i("SCROLL_END"),100);return rt(c=>{if(s.value==="glimpse"){const d=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);c(()=>{window.clearTimeout(d)})}}),rt(c=>{if(s.value==="idle"){const d=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);c(()=>{window.clearTimeout(d)})}}),rt(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)})}}),We(()=>{const c=t.scrollArea.value;c&&(c.addEventListener("pointerenter",a),c.addEventListener("pointerleave",l))}),Mt(()=>{const c=t.scrollArea.value;c&&(c.removeEventListener("pointerenter",a),c.removeEventListener("pointerleave",l))}),(c,d)=>(P(),G(f(Tn),{present:c.forceMount||o.value},{default:R(()=>[H(fc,ge(c.$attrs,{ref:f(n),"data-state":o.value?"visible":"hidden"}),{default:R(()=>[se(c.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),l2=ee({inheritAttrs:!1,__name:"ScrollAreaScrollbarHover",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=Qt(),{forwardRef:r}=Ae();let n;const s=K(!1);function i(){window.clearTimeout(n),s.value=!0}function o(){n=window.setTimeout(()=>{s.value=!1},t.scrollHideDelay.value)}return We(()=>{const a=t.scrollArea.value;a&&(a.addEventListener("pointerenter",i),a.addEventListener("pointerleave",o))}),Mt(()=>{const a=t.scrollArea.value;a&&(window.clearTimeout(n),a.removeEventListener("pointerenter",i),a.removeEventListener("pointerleave",o))}),(a,l)=>(P(),G(f(Tn),{present:a.forceMount||s.value},{default:R(()=>[H(fc,ge(a.$attrs,{ref:f(r),"data-state":s.value?"visible":"hidden"}),{default:R(()=>[se(a.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),c2=ee({__name:"ScrollAreaScrollbarScroll",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=Qt(),r=Si(),{forwardRef:n}=Ae(),{state:s,dispatch:i}=jl("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=z(()=>s.value!=="hidden");rt(l=>{if(s.value==="idle"){const u=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);l(()=>{window.clearTimeout(u)})}});const a=Hl(()=>i("SCROLL_END"),100);return rt(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)=>(P(),G(f(Tn),{present:l.forceMount||o.value},{default:R(()=>[H(pc,ge(l.$attrs,{ref:f(n),"data-state":o.value?"visible":"hidden"}),{default:R(()=>[se(l.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),[Si,u2]=$t("ScrollAreaScrollbar"),d2=ee({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}=Ae(),n=Qt(),s=z(()=>t.orientation==="horizontal");Re(s,()=>{s.value?n.onScrollbarXEnabledChange(!0):n.onScrollbarYEnabledChange(!0)},{immediate:!0}),Mt(()=>{n.onScrollbarXEnabledChange(!1),n.onScrollbarYEnabledChange(!1)});const{orientation:i,forceMount:o,asChild:a,as:l}=It(t);return u2({orientation:i,forceMount:o,isHorizontal:s,as:l,asChild:a}),(u,c)=>f(n).type.value==="hover"?(P(),G(l2,ge({key:0},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:R(()=>[se(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="scroll"?(P(),G(c2,ge({key:1},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:R(()=>[se(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="glimpse"?(P(),G(a2,ge({key:2},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:R(()=>[se(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="auto"?(P(),G(fc,ge({key:3},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:R(()=>[se(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="always"?(P(),G(pc,ge({key:4},u.$attrs,{ref:f(r),"data-state":"visible"}),{default:R(()=>[se(u.$slots,"default")]),_:3},16)):Pe("v-if",!0)}}),[Yo,f2]=$t("ScrollAreaScrollbarVisible"),pc=ee({__name:"ScrollAreaScrollbarVisible",setup(e){const t=Qt(),r=Si(),{forwardRef:n}=Ae(),s=K({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),i=z(()=>{const v=Th(s.value.viewport,s.value.content);return v>0&&v<1}),o=K(),a=K(0);function l(v,T){if(h.value){const y=t.viewport.value.scrollLeft+v.deltaY;t.viewport.value.scrollLeft=y,Ah(y,T)&&v.preventDefault()}else{const y=t.viewport.value.scrollTop+v.deltaY;t.viewport.value.scrollTop=y,Ah(y,T)&&v.preventDefault()}}function u(v,T){h.value?a.value=T.x:a.value=T.y}function c(v){a.value=0}function d(v){s.value=v}function p(v,T){return s2(v,a.value,s.value,T)}const h=z(()=>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,T=Eh(v,s.value,t.dir.value);o.value.style.transform=`translate3d(${T}px, 0, 0)`}}else if(t.viewport.value&&o.value){const v=t.viewport.value.scrollTop,T=Eh(v,s.value);o.value.style.transform=`translate3d(0, ${T}px, 0)`}}function E(v){o.value=v}return f2({sizes:s,hasThumb:i,handleWheelScroll:l,handleThumbDown:u,handleThumbUp:c,handleSizeChange:d,onThumbPositionChange:w,onThumbChange:E,onDragScroll:m}),(v,T)=>h.value?(P(),G(i2,ge({key:0},v.$attrs,{ref:f(n)}),{default:R(()=>[se(v.$slots,"default")]),_:3},16)):(P(),G(o2,ge({key:1},v.$attrs,{ref:f(n)}),{default:R(()=>[se(v.$slots,"default")]),_:3},16))}}),kh=ee({__name:"ScrollAreaScrollbarImpl",props:{isHorizontal:{type:Boolean,required:!0}},emits:["onDragScroll","onWheelScroll","onThumbPointerDown"],setup(e,{emit:t}){const r=e,n=t,s=Qt(),i=Yo(),o=Si(),{forwardRef:a,currentElement:l}=Ae(),u=K(""),c=K();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 T=v.target;T.hasPointerCapture(v.pointerId)&&T.releasePointerCapture(v.pointerId),document.body.style.webkitUserSelect=u.value,s.viewport&&(s.viewport.value.style.scrollBehavior=""),c.value=void 0}function w(v){const T=v.target,y=l.value?.contains(T),b=i.sizes.value.content-i.sizes.value.viewport;y&&i.handleWheelScroll(v,b)}We(()=>{document.addEventListener("wheel",w,{passive:!1})}),Mt(()=>{document.removeEventListener("wheel",w)});function E(){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:Jo(getComputedStyle(l.value).paddingLeft),paddingEnd:Jo(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:Jo(getComputedStyle(l.value).paddingTop),paddingEnd:Jo(getComputedStyle(l.value).paddingBottom)}}),i.onThumbPositionChange())}return Gn(l,E),Gn(s.content,E),(v,T)=>(P(),G(f(Fe),{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:R(()=>[se(v.$slots,"default")]),_:3},8,["as","as-child"]))}}),p2=ee({__name:"ScrollAreaThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=Qt(),n=Yo();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}=Ae(),l=K(),u=z(()=>r.viewport.value);function c(){l.value||(l.value=n2(u.value,n.onThumbPositionChange),n.onThumbPositionChange())}return Ay(z(()=>n.sizes.value),()=>{n.onThumbChange(a.value),u.value&&(n.onThumbPositionChange(),u.value.addEventListener("scroll",c))}),Mt(()=>{u.value.removeEventListener("scroll",c),r.viewport.value?.removeEventListener("scroll",c)}),(d,p)=>(P(),G(f(Fe),{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:R(()=>[se(d.$slots,"default")]),_:3},8,["data-state","as-child","as"]))}}),h2=ee({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}=It(r),s=vh(n),i=Qt(),o=K();We(()=>{i.onViewportChange(o.value),i.onContentChange(l.value)}),t({viewportElement:o});const{forwardRef:a,currentElement:l}=Ae();return(u,c)=>(P(),ye(Le,null,[re("div",ge({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}),[H(f(Fe),{ref:f(a),style:mt({minWidth:f(i).scrollbarXEnabled.value?"fit-content":void 0}),"as-child":r.asChild,as:u.as},{default:R(()=>[se(u.$slots,"default")]),_:3},8,["style","as-child","as"])],16),H(f(Fe),{as:"style",nonce:f(s)},{default:R(()=>c[0]||(c[0]=[Ne(" /* 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))}}),g2=[" ","Enter","ArrowUp","ArrowDown"],v2=[" ","Enter"],Sx=10;function Ci(e,t,r){return e===void 0?!1:Array.isArray(e)?e.some(n=>hc(n,t,r)):hc(e,t,r)}function hc(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]:sy(e,t)}function m2(e){return e==null||e===""||Array.isArray(e)&&e.length===0}var w2={key:0,value:""},[Rn,Ih]=$t("SelectRoot"),y2=ee({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}=It(r),l=xs(r,"modelValue",n,{defaultValue:r.defaultValue??(o.value?[]:void 0),passive:r.modelValue===void 0,deep:!0}),u=xs(r,"open",n,{defaultValue:r.defaultOpen,passive:r.open===void 0}),c=K(),d=K(),p=K({x:0,y:0}),h=z(()=>o.value&&Array.isArray(l.value)?l.value?.length===0:$l(l.value));en({isProvider:!0});const m=Ll(a),w=Ip(c),E=K(new Set),v=z(()=>Array.from(E.value).map(b=>b.value).join(";"));function T(b){if(o.value){const x=Array.isArray(l.value)?[...l.value]:[],k=x.findIndex(O=>hc(O,b,r.by));k===-1?x.push(b):x.splice(k,1),l.value=[...x]}else l.value=b}function y(b){return Array.from(E.value).find(x=>Ci(b,x.value,r.by))}return Ih({triggerElement:c,onTriggerChange:b=>{c.value=b},valueElement:d,onValueElementChange:b=>{d.value=b},contentId:"",modelValue:l,onValueChange:T,by:r.by,open:u,multiple:o,required:s,onOpenChange:b=>{u.value=b},dir:m,triggerPointerDownPosRef:p,disabled:i,isEmptyModelValue:h,optionsSet:E,onOptionAdd:b=>{const x=y(b.value);x&&E.value.delete(x),E.value.add(b)},onOptionRemove:b=>{const x=y(b.value);x&&E.value.delete(x)}}),(b,x)=>(P(),G(f(Kp),null,{default:R(()=>[se(b.$slots,"default",{modelValue:f(l),open:f(u)}),f(w)?(P(),G(b2,{key:v.value,"aria-hidden":"true",tabindex:"-1",multiple:f(o),required:f(s),name:b.name,autocomplete:b.autocomplete,disabled:f(i),value:f(l)},{default:R(()=>[f($l)(f(l))?(P(),ye("option",w2)):Pe("v-if",!0),(P(!0),ye(Le,null,nr(Array.from(E.value),k=>(P(),ye("option",ge({key:k.value??""},{ref_for:!0},k),null,16))),128))]),_:1},8,["multiple","required","name","autocomplete","disabled","value"])):Pe("v-if",!0)]),_:3}))}}),b2=ee({__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=K(),n=Rn();Re(()=>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)=>(P(),G(f(Yl),{"as-child":""},{default:R(()=>[re("select",ge({ref_key:"selectElement",ref:r},t,{onInput:s}),[se(i.$slots,"default")],16)]),_:3}))}}),_2=ee({__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=Xr(e);return(r,n)=>(P(),G(f(gh),ge(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:R(()=>[se(r.$slots,"default")]),_:3},16))}}),S2={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[Xn,Rh]=$t("SelectContent"),C2=ee({__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=Rn();Vy(),Ep(r.bodyLock);const{CollectionSlot:i,getItems:o}=en(),a=K();$p(a);const{search:l,handleTypeaheadSearch:u}=Dp(),c=K(),d=K(),p=K(),h=K(!1),m=K(!1),w=K(!1);function E(){d.value&&a.value&&Fp([d.value,a.value])}Re(h,()=>{E()});const{onOpenChange:v,triggerPointerDownPosRef:T}=s;rt(x=>{if(!a.value)return;let k={x:0,y:0};const O=q=>{k={x:Math.abs(Math.round(q.pageX)-(T.value?.x??0)),y:Math.abs(Math.round(q.pageY)-(T.value?.y??0))}},g=q=>{q.pointerType!=="touch"&&(k.x<=10&&k.y<=10?q.preventDefault():a.value?.contains(q.target)||v(!1),document.removeEventListener("pointermove",O),T.value=null)};T.value!==null&&(document.addEventListener("pointermove",O),document.addEventListener("pointerup",g,{capture:!0,once:!0})),x(()=>{document.removeEventListener("pointermove",O),document.removeEventListener("pointerup",g,{capture:!0})})});function y(x){const k=x.ctrlKey||x.altKey||x.metaKey;if(x.key==="Tab"&&x.preventDefault(),!k&&x.key.length===1&&u(x.key,o()),["ArrowUp","ArrowDown","Home","End"].includes(x.key)){let O=[...o().map(g=>g.ref)];if(["ArrowUp","End"].includes(x.key)&&(O=O.slice().reverse()),["ArrowUp","ArrowDown"].includes(x.key)){const g=x.target,q=O.indexOf(g);O=O.slice(q+1)}setTimeout(()=>Fp(O)),x.preventDefault()}}const b=Xr(z(()=>r.position==="popper"?r:{}).value);return Rh({content:a,viewport:c,onViewportChange:x=>{c.value=x},itemRefCallback:(x,k,O)=>{const g=!m.value&&!O,q=Ci(s.modelValue.value,k,s.by);if(s.multiple.value){if(w.value)return;(q||g)&&(d.value=x,q&&(w.value=!0))}else(q||g)&&(d.value=x);g&&(m.value=!0)},selectedItem:d,selectedItemText:p,onItemLeave:()=>{a.value?.focus()},itemTextRefCallback:(x,k,O)=>{const g=!m.value&&!O;(Ci(s.modelValue.value,k,s.by)||g)&&(p.value=x)},focusSelectedItem:E,position:r.position,isPositioned:h,searchRef:l}),(x,k)=>(P(),G(f(i),null,{default:R(()=>[H(f(Bp),{"as-child":"",onMountAutoFocus:k[6]||(k[6]=ar(()=>{},["prevent"])),onUnmountAutoFocus:k[7]||(k[7]=O=>{n("closeAutoFocus",O),!O.defaultPrevented&&(f(s).triggerElement.value?.focus({preventScroll:!0}),O.preventDefault())})},{default:R(()=>[H(f(Kl),{"as-child":"","disable-outside-pointer-events":x.disableOutsidePointerEvents,onFocusOutside:k[2]||(k[2]=ar(()=>{},["prevent"])),onDismiss:k[3]||(k[3]=O=>f(s).onOpenChange(!1)),onEscapeKeyDown:k[4]||(k[4]=O=>n("escapeKeyDown",O)),onPointerDownOutside:k[5]||(k[5]=O=>n("pointerDownOutside",O))},{default:R(()=>[(P(),G(Qs(x.position==="popper"?_2:T2),ge({...x.$attrs,...f(b)},{id:f(s).contentId,ref:O=>{const g=f(zt)(O);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:k[0]||(k[0]=ar(()=>{},["prevent"])),onPlaced:k[1]||(k[1]=O=>h.value=!0),onKeydown:y}),{default:R(()=>[se(x.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3},8,["disable-outside-pointer-events"])]),_:3})]),_:3}))}}),[gc,x2]=$t("SelectItemAlignedPosition"),T2=ee({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}=en(),i=Rn(),o=Xn(),a=K(!1),l=K(!0),u=K(),{forwardRef:c,currentElement:d}=Ae(),{viewport:p,selectedItem:h,selectedItemText:m,focusSelectedItem:w}=o;function E(){if(i.triggerElement.value&&i.valueElement.value&&u.value&&d.value&&p?.value&&h?.value&&m?.value){const y=i.triggerElement.value.getBoundingClientRect(),b=d.value.getBoundingClientRect(),x=i.valueElement.value.getBoundingClientRect(),k=m.value.getBoundingClientRect();if(i.dir.value!=="rtl"){const ke=k.left-b.left,Ze=x.left-ke,ut=y.left-Ze,Ve=y.width+ut,Qe=Math.max(Ve,b.width),dt=window.innerWidth-10,gt=yi(Ze,10,Math.max(10,dt-Qe));u.value.style.minWidth=`${Ve}px`,u.value.style.left=`${gt}px`}else{const ke=b.right-k.right,Ze=window.innerWidth-x.right-ke,ut=window.innerWidth-y.right-Ze,Ve=y.width+ut,Qe=Math.max(Ve,b.width),dt=window.innerWidth-10,gt=yi(Ze,10,Math.max(10,dt-Qe));u.value.style.minWidth=`${Ve}px`,u.value.style.right=`${gt}px`}const O=s().map(ke=>ke.ref),g=window.innerHeight-20,q=p.value.scrollHeight,B=window.getComputedStyle(d.value),S=Number.parseInt(B.borderTopWidth,10),_=Number.parseInt(B.paddingTop,10),C=Number.parseInt(B.borderBottomWidth,10),N=Number.parseInt(B.paddingBottom,10),V=S+_+q+N+C,j=Math.min(h.value.offsetHeight*5,V),X=window.getComputedStyle(p.value),Z=Number.parseInt(X.paddingTop,10),le=Number.parseInt(X.paddingBottom,10),W=y.top+y.height/2-10,ae=g-W,fe=h.value.offsetHeight/2,Ce=h.value.offsetTop+fe,Oe=S+_+Ce,Te=V-Oe;if(Oe<=W){const ke=h.value===O[O.length-1];u.value.style.bottom="0px";const Ze=d.value.clientHeight-p.value.offsetTop-p.value.offsetHeight,ut=Oe+Math.max(ae,fe+(ke?le:0)+Ze+C);u.value.style.height=`${ut}px`}else{const ke=h.value===O[0];u.value.style.top="0px";const Ze=Math.max(W,S+p.value.offsetTop+(ke?Z:0)+fe)+Te;u.value.style.height=`${Ze}px`,p.value.scrollTop=Oe-W+p.value.offsetTop}u.value.style.margin="10px 0",u.value.style.minHeight=`${j}px`,u.value.style.maxHeight=`${g}px`,n("placed"),requestAnimationFrame(()=>a.value=!0)}}const v=K("");We(async()=>{await wt(),E(),d.value&&(v.value=window.getComputedStyle(d.value).zIndex)});function T(y){y&&l.value===!0&&(E(),w?.(),l.value=!1)}return Gn(i.triggerElement,()=>{E()}),x2({contentWrapper:u,shouldExpandOnScrollRef:a,onScrollButtonChange:T}),(y,b)=>(P(),ye("div",{ref_key:"contentWrapperElement",ref:u,style:mt({display:"flex",flexDirection:"column",position:"fixed",zIndex:v.value})},[H(f(Fe),ge({ref:f(c),style:{boxSizing:"border-box",maxHeight:"100%"}},{...y.$attrs,...r}),{default:R(()=>[se(y.$slots,"default")]),_:3},16)],4))}}),E2=ee({inheritAttrs:!1,__name:"SelectProvider",props:{context:{type:Object,required:!0}},setup(e){return Ih(e.context),Rh(S2),(t,r)=>se(t.$slots,"default")}}),A2={key:1},k2=ee({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=Qr(r,t),s=Rn(),i=K();We(()=>{i.value=new DocumentFragment});const o=K(),a=z(()=>r.forceMount||s.open.value),l=K(a.value);return Re(a,()=>{setTimeout(()=>l.value=a.value)}),(u,c)=>a.value||l.value||o.value?.present?(P(),G(f(Tn),{key:0,ref_key:"presenceRef",ref:o,present:a.value},{default:R(()=>[H(C2,pr(sr({...f(n),...u.$attrs})),{default:R(()=>[se(u.$slots,"default")]),_:3},16)]),_:3},8,["present"])):i.value?(P(),ye("div",A2,[(P(),G(ka,{to:i.value},[H(E2,{context:f(s)},{default:R(()=>[se(u.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):Pe("v-if",!0)}}),[Cx,I2]=$t("SelectGroup"),R2=ee({__name:"SelectGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=Es(void 0,"reka-select-group");return I2({id:r}),(n,s)=>(P(),G(f(Fe),ge({role:"group"},t,{"aria-labelledby":f(r)}),{default:R(()=>[se(n.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),$2=ee({__name:"SelectIcon",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){return(t,r)=>(P(),G(f(Fe),{"aria-hidden":"true",as:t.as,"as-child":t.asChild},{default:R(()=>[se(t.$slots,"default",{},()=>[r[0]||(r[0]=Ne("▼"))])]),_:3},8,["as","as-child"]))}}),[$h,P2]=$t("SelectItem"),D2=ee({__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}=It(r),i=Rn(),o=Xn(),{forwardRef:a,currentElement:l}=Ae(),{CollectionItem:u}=en(),c=z(()=>Ci(i.modelValue?.value,r.value,i.by)),d=K(!1),p=K(r.textValue??""),h=Es(void 0,"reka-select-item-text"),m="select.select";async function w(b){b.defaultPrevented||Rl(m,E,{originalEvent:b,value:r.value})}async function E(b){await wt(),n("select",b),!b.defaultPrevented&&(s.value||(i.onValueChange(r.value),i.multiple.value||i.onOpenChange(!1)))}async function v(b){await wt(),!b.defaultPrevented&&(s.value?o.onItemLeave?.():b.currentTarget?.focus({preventScroll:!0}))}async function T(b){await wt(),!b.defaultPrevented&&b.currentTarget===Yt()&&o.onItemLeave?.()}async function y(b){await wt(),!b.defaultPrevented&&(o.searchRef?.value!==""&&b.key===" "||(v2.includes(b.key)&&w(b),b.key===" "&&b.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 We(()=>{l.value&&o.itemRefCallback(l.value,r.value,r.disabled)}),P2({value:r.value,disabled:s,textId:h,isSelected:c,onItemTextChange:b=>{p.value=((p.value||b?.textContent)??"").trim()}}),(b,x)=>(P(),G(f(u),{value:{textValue:p.value}},{default:R(()=>[H(f(Fe),{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:b.as,"as-child":b.asChild,onFocus:x[0]||(x[0]=k=>d.value=!0),onBlur:x[1]||(x[1]=k=>d.value=!1),onPointerup:w,onPointerdown:x[2]||(x[2]=k=>{k.currentTarget.focus({preventScroll:!0})}),onTouchend:x[3]||(x[3]=ar(()=>{},["prevent","stop"])),onPointermove:v,onPointerleave:T,onKeydown:y},{default:R(()=>[se(b.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"])]),_:3},8,["value"]))}}),O2=ee({__name:"SelectItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,r=$h();return(n,s)=>f(r).isSelected.value?(P(),G(f(Fe),ge({key:0,"aria-hidden":"true"},t),{default:R(()=>[se(n.$slots,"default")]),_:3},16)):Pe("v-if",!0)}}),H2=ee({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,r=Rn(),n=Xn(),s=$h(),{forwardRef:i,currentElement:o}=Ae(),a=z(()=>({value:s.value,disabled:s.disabled.value,textContent:o.value?.textContent??s.value?.toString()??""}));return We(()=>{o.value&&(s.onItemTextChange(o.value),n.itemTextRefCallback(o.value,s.value,s.disabled.value),r.onOptionAdd(a.value))}),Mt(()=>{r.onOptionRemove(a.value)}),(l,u)=>(P(),G(f(Fe),ge({id:f(s).textId,ref:f(i)},{...t,...l.$attrs}),{default:R(()=>[se(l.$slots,"default")]),_:3},16,["id"]))}}),M2=ee({__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)=>(P(),G(f(Jl),pr(sr(t)),{default:R(()=>[se(r.$slots,"default")]),_:3},16))}}),Ph=ee({__name:"SelectScrollButtonImpl",emits:["autoScroll"],setup(e,{emit:t}){const r=t,{getItems:n}=en(),s=Xn(),i=K(null);function o(){i.value!==null&&(window.clearInterval(i.value),i.value=null)}rt(()=>{n().map(u=>u.ref).find(u=>u===Yt())?.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 vs(()=>o()),(u,c)=>(P(),G(f(Fe),ge({"aria-hidden":"true",style:{flexShrink:0}},u.$parent?.$props,{onPointerdown:a,onPointermove:l,onPointerleave:c[0]||(c[0]=()=>{o()})}),{default:R(()=>[se(u.$slots,"default")]),_:3},16))}}),N2=ee({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=Xn(),r=t.position==="item-aligned"?gc():void 0,{forwardRef:n,currentElement:s}=Ae(),i=K(!1);return rt(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))}}),Re(s,()=>{s.value&&r?.onScrollButtonChange(s.value)}),(o,a)=>i.value?(P(),G(Ph,{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:R(()=>[se(o.$slots,"default")]),_:3},512)):Pe("v-if",!0)}}),q2=ee({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=Xn(),r=t.position==="item-aligned"?gc():void 0,{forwardRef:n,currentElement:s}=Ae(),i=K(!1);return rt(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))}}),Re(s,()=>{s.value&&r?.onScrollButtonChange(s.value)}),(o,a)=>i.value?(P(),G(Ph,{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:R(()=>[se(o.$slots,"default")]),_:3},512)):Pe("v-if",!0)}}),B2=ee({__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=Rn(),{forwardRef:n,currentElement:s}=Ae(),i=z(()=>r.disabled?.value||t.disabled);r.contentId||(r.contentId=Es(void 0,"reka-select-content")),We(()=>{r.onTriggerChange(s.value)});const{getItems:o}=en(),{search:a,handleTypeaheadSearch:l,resetTypeahead:u}=Dp();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)=>(P(),G(f(Wp),{"as-child":"",reference:p.reference},{default:R(()=>[H(f(Fe),{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(m2)(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]=ar(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(g2).includes(m.key)&&(c(),m.preventDefault()))})},{default:R(()=>[se(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"]))}}),L2=ee({__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}=Ae(),s=Rn();We(()=>{s.valueElement=n});const i=z(()=>{let a=[];const l=Array.from(s.optionsSet.value),u=c=>l.find(d=>Ci(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=z(()=>i.value.length?i.value.join(", "):t.placeholder);return(a,l)=>(P(),G(f(Fe),{ref:f(r),as:a.as,"as-child":a.asChild,style:{pointerEvents:"none"},"data-placeholder":i.value.length?void 0:t.placeholder},{default:R(()=>[se(a.$slots,"default",{selectedLabel:i.value,modelValue:f(s).modelValue.value},()=>[Ne(He(o.value),1)])]),_:3},8,["as","as-child","data-placeholder"]))}}),F2=ee({__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}=It(t),n=vh(r),s=Xn(),i=s.position==="item-aligned"?gc():void 0,{forwardRef:o,currentElement:a}=Ae();We(()=>{s?.onViewportChange(a.value)});const l=K(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,E=Number.parseFloat(h.value.style.minHeight),v=Number.parseFloat(h.value.style.height),T=Math.max(E,v);if(T<w){const y=T+m,b=Math.min(w,y),x=y-b;h.value.style.height=`${b}px`,h.value.style.bottom==="0px"&&(d.scrollTop=x>0?x:0,h.value.style.justifyContent="flex-end")}}}l.value=d.scrollTop}return(c,d)=>(P(),ye(Le,null,[H(f(Fe),ge({ref:f(o),"data-reka-select-viewport":"",role:"presentation"},{...c.$attrs,...t},{style:{position:"relative",flex:1,overflow:"hidden auto"},onScroll:u}),{default:R(()=>[se(c.$slots,"default")]),_:3},16),H(f(Fe),{as:"style",nonce:f(n)},{default:R(()=>d[0]||(d[0]=[Ne(" /* 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))}}),V2=ee({__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=z(()=>n(t.orientation)?t.orientation:"horizontal"),i=z(()=>s.value==="vertical"?t.orientation:void 0),o=z(()=>t.decorative?{role:"none"}:{"aria-orientation":i.value,role:"separator"});return(a,l)=>(P(),G(f(Fe),ge({as:a.as,"as-child":a.asChild,"data-orientation":s.value},o.value),{default:R(()=>[se(a.$slots,"default")]),_:3},16,["as","as-child","data-orientation"]))}}),j2=ee({__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)=>(P(),G(V2,pr(sr(t)),{default:R(()=>[se(r.$slots,"default")]),_:3},16))}}),U2=ee({__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 Ae(),(r,n)=>(P(),G(f(H1),pr(sr(t)),{default:R(()=>[se(r.$slots,"default")]),_:3},16))}}),[Zo,z2]=$t("TooltipProvider"),K2=ee({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}=It(e);Ae();const l=K(!0),u=K(!1),{start:c,stop:d}=_p(()=>{l.value=!0},r,{immediate:!1});return z2({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)=>se(p.$slots,"default")}}),Dh="tooltip.open",[Xo,W2]=$t("TooltipRoot"),G2=ee({__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;Ae();const s=Zo(),i=z(()=>r.disableHoverableContent??s.disableHoverableContent.value),o=z(()=>r.disableClosingTrigger??s.disableClosingTrigger.value),a=z(()=>r.disabled??s.disabled.value),l=z(()=>r.delayDuration??s.delayDuration.value),u=z(()=>r.ignoreNonKeyboardFocus??s.ignoreNonKeyboardFocus.value),c=xs(r,"open",n,{defaultValue:r.defaultOpen,passive:r.open===void 0});Re(c,y=>{s.onClose&&(y?(s.onOpen(),document.dispatchEvent(new CustomEvent(Dh))):s.onClose())});const d=K(!1),p=K(),h=z(()=>c.value?d.value?"delayed-open":"instant-open":"closed"),{start:m,stop:w}=_p(()=>{d.value=!0,c.value=!0},l,{immediate:!1});function E(){w(),d.value=!1,c.value=!0}function v(){w(),c.value=!1}function T(){m()}return W2({contentId:"",open:c,stateAttribute:h,trigger:p,onTriggerChange(y){p.value=y},onTriggerEnter(){s.isOpenDelayed.value?T():E()},onTriggerLeave(){i.value?v():w()},onOpen:E,onClose:v,disableHoverableContent:i,disableClosingTrigger:o,disabled:a,ignoreNonKeyboardFocus:u}),(y,b)=>(P(),G(f(Kp),null,{default:R(()=>[se(y.$slots,"default",{open:f(c)})]),_:3}))}}),Oh=ee({__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=Xo(),i=Zo(),{forwardRef:o,currentElement:a}=Ae(),l=z(()=>r.ariaLabel||a.value?.textContent),u=z(()=>{const{ariaLabel:c,...d}=r;return Tp(d,i.content.value??{},{side:"top",sideOffset:0,align:"center",avoidCollisions:!0,collisionBoundary:[],collisionPadding:0,arrowPadding:0,sticky:"partial",hideWhenDetached:!1})});return We(()=>{qt(window,"scroll",c=>{c.target?.contains(s.trigger.value)&&s.onClose()}),qt(window,Dh,s.onClose)}),(c,d)=>(P(),G(f(Kl),{"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]=ar(()=>{},["prevent"])),onDismiss:d[3]||(d[3]=p=>f(s).onClose())},{default:R(()=>[H(f(gh),ge({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:R(()=>[se(c.$slots,"default"),H(f(Yl),{id:f(s).contentId,role:"tooltip"},{default:R(()=>[Ne(He(l.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),J2=ee({__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=Xr(e),{forwardRef:r,currentElement:n}=Ae(),{trigger:s,onClose:i}=Xo(),o=Zo(),{isPointerInTransit:a,onPointerExit:l}=jy(s,n);return o.isPointerInTransitRef=a,l(()=>{i()}),(u,c)=>(P(),G(Oh,ge({ref:f(r)},f(t)),{default:R(()=>[se(u.$slots,"default")]),_:3},16))}}),Y2=ee({__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=Xo(),i=Qr(r,n),{forwardRef:o}=Ae();return(a,l)=>(P(),G(f(Tn),{present:a.forceMount||f(s).open.value},{default:R(()=>[(P(),G(Qs(f(s).disableHoverableContent.value?Oh:J2),ge({ref:f(o)},f(i)),{default:R(()=>[se(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Z2=ee({__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)=>(P(),G(f(Jl),pr(sr(t)),{default:R(()=>[se(r.$slots,"default")]),_:3},16))}}),X2=ee({__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=Xo(),n=Zo();r.contentId||(r.contentId=Es(void 0,"reka-tooltip-content"));const{forwardRef:s,currentElement:i}=Ae(),o=K(!1),a=K(!1),l=z(()=>r.disabled.value?{}:{click:w,focus:h,pointermove:d,pointerleave:p,pointerdown:c,blur:m});We(()=>{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(E){E.pointerType!=="touch"&&!a.value&&!n.isPointerInTransitRef.value&&(r.onTriggerEnter(),a.value=!0)}function p(){r.onTriggerLeave(),a.value=!1}function h(E){o.value||r.ignoreNonKeyboardFocus.value&&!E.target.matches?.(":focus-visible")||r.onOpen()}function m(){r.onClose()}function w(){r.disableClosingTrigger.value||r.onClose()}return(E,v)=>(P(),G(f(Wp),{"as-child":"",reference:E.reference},{default:R(()=>[H(f(Fe),ge({ref:f(s),"aria-describedby":f(r).open.value?f(r).contentId:void 0,"data-state":f(r).stateAttribute.value,as:E.as,"as-child":t.asChild,"data-grace-area-trigger":""},ju(l.value)),{default:R(()=>[se(E.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3},8,["reference"]))}}),Q2=ee({__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)=>(P(),G(f(Fe),{"data-slot":"button",as:e.as,"as-child":e.asChild,type:e.as==="button"?e.type:void 0,class:Xe(f(st)(f(e_)({variant:e.variant,size:e.size}),t.class))},{default:R(()=>[se(r.$slots,"default")]),_:3},8,["as","as-child","type","class"]))}}),it=Q2;const e_=Qw("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 t_={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"},r_=ee({__name:"KeyPad",setup(e){const t=Ht("webphone"),{sendDTMF:r}=Ht("sip"),{playDtmf:n}=Vf(),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)=>(P(),ye("div",t_,[(P(),ye(Le,null,nr(s,l=>H(f(it),{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:R(()=>[Ne(He(l),1)]),_:2},1032,["onClick","data-key"])),64))]))}}),vc=r_;var Hh=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),n_=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),s_=e=>{const t=n_(e);return t.charAt(0).toUpperCase()+t.slice(1)},i_=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),Mh=e=>e==="";var xi={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 o_=({name:e,iconNode:t,absoluteStrokeWidth:r,"absolute-stroke-width":n,strokeWidth:s,"stroke-width":i,size:o=xi.width,color:a=xi.stroke,...l},{slots:u})=>ir("svg",{...xi,...l,width:o,height:o,stroke:a,"stroke-width":Mh(r)||Mh(n)||r===!0||n===!0?Number(s||i||xi["stroke-width"])*24/Number(o):s||i||xi["stroke-width"],class:i_("lucide",l.class,...e?[`lucide-${Hh(s_(e))}-icon`,`lucide-${Hh(e)}`]:["lucide-icon"])},[...t.map(c=>ir(...c)),...u.default?[u.default()]:[]]);var ct=(e,t)=>(r,{slots:n,attrs:s})=>ir(o_,{...s,...r,iconNode:t,name:e},n);var Nh=ct("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 qh=ct("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);var Bh=ct("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);var a_=ct("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);var mc=ct("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 l_=ct("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 c_=ct("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 u_=ct("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 d_=ct("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 f_=ct("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 p_=ct("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 Lh=ct("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 h_=ct("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 g_=ct("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 v_=ct("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);var m_=ct("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 w_=ct("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 Fh=ct("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 Vh=ct("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 wc=ct("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),y_=ee({__name:"Input",props:{defaultValue:{},modelValue:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=xs(r,"modelValue",t,{passive:!0,defaultValue:r.defaultValue});return(s,i)=>Wi((P(),ye("input",{"onUpdate:modelValue":i[0]||(i[0]=o=>Je(n)?n.value=o:null),"data-slot":"input",class:Xe(f(st)("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)),[[ci,f(n)]])}}),Ti=y_,b_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 14 14"};function __(e,t){return P(),ye("svg",b_,[...t[0]||(t[0]=[Za('<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 yc={render:__},S_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 9 9"};function C_(e,t){return P(),ye("svg",S_,[...t[0]||(t[0]=[re("g",{"clip-path":"url(#a)"},[re("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),re("defs",null,[re("clipPath",{id:"a"},[re("path",{fill:"#fff",d:"M0 0h9v9H0z"})])],-1)])])}var x_={render:C_},T_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20"};function E_(e,t){return P(),ye("svg",T_,[...t[0]||(t[0]=[Za('<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 A_={render:E_},k_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"2.8 2.8 14.2 14.2"};function I_(e,t){return P(),ye("svg",k_,[...t[0]||(t[0]=[re("circle",{cx:"9.899",cy:"9.899",r:"6.6",stroke:"currentColor","stroke-width":".8",transform:"rotate(-135 9.9 9.9)"},null,-1),re("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 R_={render:I_},$_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 19 19"};function P_(e,t){return P(),ye("svg",$_,[...t[0]||(t[0]=[re("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 bc={render:P_},D_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 19 19"};function O_(e,t){return P(),ye("svg",D_,[...t[0]||(t[0]=[re("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),re("path",{stroke:"currentColor","stroke-linecap":"round",d:"M2 16.293 16.293 2"},null,-1)])])}var _c={render:O_},H_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 12 12"};function M_(e,t){return P(),ye("svg",H_,[...t[0]||(t[0]=[re("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 Sc={render:M_},N_=["data-call-status"],q_={key:0,class:"webphone-actions__idle wp:!w-full wp:flex wp:flex-col wp:items-center wp:space-y-2 wp:mb-4"},B_={key:2,class:"webphone-actions__connected wp:w-full wp:flex wp:flex-col wp:items-center wp:gap-3"},L_={class:"webphone-actions__row wp:flex wp:items-center wp:gap-6"},F_={class:"webphone-actions__dialer wp:w-full wp:max-w-80 wp:relative"},V_=["data-visible"],j_={key:3,class:"webphone-actions__calling wp:w-full wp:flex wp:flex-col wp:items-center wp:gap-3"},U_={class:"webphone-actions__dialer wp:w-full wp:max-w-80 wp:relative"},z_=["data-visible"],K_={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"},W_=ee({__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=Ht("webphone"),{makeCall:n,hangupCall:s,answerCall:i,toggleMute:o,toggleHold:a,sendDTMF:l}=Ht("sip"),u=/^[0-9*#]+$/,c=S=>{if(u.test(S)){for(const _ of S)l(_);for(const _ of S)r.appendKeypad(_)}},d=S=>{S.ctrlKey||S.metaKey||S.altKey||S.key.length!==1||(S.preventDefault(),S.stopPropagation(),c(S.key))},p=S=>{S.data&&(S.preventDefault(),S.stopPropagation(),c(S.data))},h=S=>{S.preventDefault(),S.stopPropagation(),c(S.clipboardData?.getData("text").replace(/\s/g,"")||"")};Re(()=>r.callStatus,(S,_)=>{S==="connected"&&_!=="connected"&&r.clearKeypad()});const m=e,w=t,E=z(()=>!!r.transferInProgress),v=z(()=>m.destination||r.keypadValue||r.lastDialedNumber||""),T=z(()=>!!m.destination||/^[+]?[0-9*#]+$/.test(r.keypadValue)),y=z(()=>T.value||!!r.lastDialedNumber),b=z(()=>!m.isVideo||!T.value?!1:v.value?/^[0-9*#]{1,5}$/.test(v.value):!0),x=async S=>{try{m.destination?await n(m.destination,S):r.keypadValue?await n(r.keypadValue,S):r.lastDialedNumber&&(r.keypadValue=r.lastDialedNumber)}catch(_){if(console.error("Error initiating call:",_),S){let C="No se pudo acceder a la cámara.";const N=_ instanceof Error?_.name:String(_);N==="NotReadableError"?C="La cámara parece estar en uso por otra aplicación (ej: Zoom, Meet) o no se puede acceder al hardware.":N==="NotAllowedError"||N==="PermissionDeniedError"?C="Permiso de cámara denegado. Por favor, permita el acceso a la cámara.":N==="NotFoundError"?C="No se detectó ninguna cámara en el sistema.":C+=" "+(_ instanceof Error?_.message:String(_)),confirm(`${C}
75
75
 
76
- ¿Desea realizar la llamada solo con AUDIO?`)&&C(!1)}else alert("Error al iniciar la llamada: "+(w instanceof Error?w.message:String(w)))}},k=(S=!1)=>{if(m.onAnswer){m.onAnswer(S);return}i(S)},O=()=>{if(m.onHangup){m.onHangup();return}s()},g=()=>{if(m.onReject){m.onReject();return}s()},B=j(()=>{const S={};return r.channels.forEach(w=>{const E=w.status==="connected"||w.status==="calling"||w.status==="incoming";S[w.id]=E?"wp:text-[var(--color-red)]":"wp:text-[var(--color-avaible)]"}),S}),N=j(()=>B.value[r.activeChannelId]??"wp:text-[var(--p-primary-color)]");return(S,w)=>(P(),ye("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"?(P(),ye("div",q_,[b.value?(P(),W(f(it),{key:0,variant:"default",size:"icon",onClick:w[0]||(w[0]=E=>C(!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:R(()=>[H(f(A_),{class:"webphone-actions__button-icon wp:size-7 wp:text-white"}),w[12]||(w[12]=re("span",{class:"webphone-actions__button-label wp:w-full wp:text-white wp:text-xs"},"Llamar",-1))]),_:1})):Pe("",!0),_.value?(P(),W(f(it),{key:1,variant:"outline",size:"icon",onClick:w[1]||(w[1]=E=>C(!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:R(()=>[H(f(R_),{class:Xe(["webphone-actions__button-icon wp:size-6 wp:text-primary wp:dark:text-white",N.value])},null,8,["class"]),w[13]||(w[13]=re("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})):Pe("",!0)])):Pe("",!0),f(r).callStatus==="incoming"?(P(),ye(Le,{key:1},[f(r).activeChannel?.hasVideo?(P(),W(f(it),{key:0,variant:"default",size:"icon",onClick:w[2]||(w[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:R(()=>[H(f(w_),{class:"webphone-actions__button-icon wp:w-5 wp:h-5 wp:text-[var(--p-primary-color)]"})]),_:1})):Pe("",!0),H(f(it),{variant:"default",size:"icon",onClick:w[3]||(w[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:R(()=>[H(f(Lh),{class:"webphone-actions__button-icon wp:w-5 wp:h-5 wp:text-white"})]),_:1}),H(f(it),{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:R(()=>[H(f(yc),{class:"webphone-actions__button-icon wp:w-5 wp:h-5 wp:text-white"})]),_:1})],64)):Pe("",!0),f(r).callStatus==="connected"?(P(),ye("div",B_,[re("div",L_,[H(f(it),{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:R(()=>[f(r).isMuted?(P(),W(f(l_),{key:0,class:"webphone-actions__button-icon wp:size-5 wp:text-status-disconnected"})):(P(),W(f(c_),{key:1,class:"webphone-actions__button-icon wp:size-5 wp:text-[var(--p-primary-color)]"}))]),_:1},8,["variant","onClick"]),H(f(it),{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:R(()=>[f(r).isHeld?(P(),W(f(g_),{key:0,class:"webphone-actions__button-icon wp:size-5 wp:text-status-hold"})):(P(),W(f(u_),{key:1,class:"webphone-actions__button-icon wp:size-5 wp:text-[var(--p-primary-color)]"}))]),_:1},8,["variant","onClick"]),T.value?Pe("",!0):(P(),W(f(it),{key:0,variant:"secondary",size:"icon",onClick:w[4]||(w[4]=E=>y("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:R(()=>[H(f(x_),{class:"webphone-actions__button-icon wp:size-5 wp:text-[var(--p-primary-color)]"})]),_:1}))]),re("div",F_,[H(f(it),{variant:"ghost",size:"icon",onClick:w[5]||(w[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:R(()=>[f(r).isKeypadVisible?(P(),W(f(_c),{key:0,class:"webphone-actions__keypad-toggle-icon wp:size-6"})):(P(),W(f(bc),{key:1,class:"webphone-actions__keypad-toggle-icon wp:size-6"}))]),_:1},8,["aria-label"]),H(f(Ti),{"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"]),re("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:w[6]||(w[6]=ar(E=>f(r).backspaceKeypad(),["stop"]))},[H(f(Sc),{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"})])]),re("div",{class:Xe(["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"},[H(vc)],10,V_),H(f(it),{size:"icon",onClick:O,"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:R(()=>[H(f(yc),{class:"webphone-actions__button-icon wp:size-6 wp:text-white"}),w[14]||(w[14]=re("span",{class:"webphone-actions__button-label wp:w-full wp:text-white wp:text-xs"},"Colgar",-1))]),_:1})])):Pe("",!0),f(r).callStatus==="calling"?(P(),ye("div",j_,[re("div",U_,[H(f(it),{variant:"ghost",size:"icon",onClick:w[7]||(w[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:R(()=>[f(r).isKeypadVisible?(P(),W(f(_c),{key:0,class:"webphone-actions__keypad-toggle-icon wp:size-6"})):(P(),W(f(bc),{key:1,class:"webphone-actions__keypad-toggle-icon wp:size-6"}))]),_:1},8,["aria-label"]),H(f(Ti),{modelValue:f(r).keypadValue,"onUpdate:modelValue":w[8]||(w[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"]),re("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:w[9]||(w[9]=ar(E=>f(r).backspaceKeypad(),["stop"]))},[H(f(Sc),{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"})])]),re("div",{class:Xe(["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"},[H(vc)],10,z_),H(f(it),{variant:"destructive",size:"lg",onClick:O,"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:R(()=>[H(f(yc),{class:"webphone-actions__button-icon wp:size-6 wp:text-white"}),w[15]||(w[15]=re("span",{class:"webphone-actions__button-label wp:w-full wp:text-white"},"Colgar",-1))]),_:1})])):Pe("",!0),T.value&&f(r).callStatus==="connected"?(P(),ye("div",K_,[H(f(it),{variant:"default",size:"sm",onClick:w[10]||(w[10]=E=>y("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:R(()=>[H(f(qh),{class:"wp:w-4 wp:h-4"}),w[16]||(w[16]=Ne(" Completar Transferencia ",-1))]),_:1}),H(f(it),{variant:"destructive",size:"sm",onClick:w[11]||(w[11]=E=>y("cancelTransfer")),class:"webphone-actions__button webphone-actions__button--cancel-transfer wp:gap-2"},{default:R(()=>[H(f(wc),{class:"wp:w-4 wp:h-4"}),w[17]||(w[17]=Ne(" Cancelar ",-1))]),_:1})])):Pe("",!0)],8,N_))}}),G_=W_,J_=ee({__name:"Kbd",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(r,n)=>(P(),ye("kbd",{class:Xe(f(st)("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))},[se(r.$slots,"default")],2))}}),sn=J_,Y_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 30 23"};function Z_(e,t){return P(),ye("svg",Y_,[...t[0]||(t[0]=[re("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 Cc={render:Z_},X_=ee({__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=Qr(e,t);return(n,s)=>(P(),W(f(G2),ge({"data-slot":"tooltip"},f(r)),{default:R(i=>[se(n.$slots,"default",pr(sr(i)))]),_:3},16))}}),Qo=X_,Q_=ee({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=Qr(Ut(r,"class"),n);return(i,o)=>(P(),W(f(Z2),null,{default:R(()=>[H(f(Y2),ge({"data-slot":"tooltip-content"},{...f(s),...i.$attrs},{class:f(st)("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:R(()=>[se(i.$slots,"default"),H(f(U2),{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}))}}),ea=Q_,eS=ee({__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)=>(P(),W(f(K2),pr(sr(t)),{default:R(()=>[se(r.$slots,"default")]),_:3},16))}}),ta=eS,tS=ee({__name:"TooltipTrigger",props:{reference:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>(P(),W(f(X2),ge({"data-slot":"tooltip-trigger"},t),{default:R(()=>[se(r.$slots,"default")]),_:3},16))}}),ra=tS,rS=["data-call-status"],nS={class:"webphone-display__connected-status-label wp:flex wp:gap-2 wp:items-center"},sS={class:"webphone-display__duration wp:ibrad wp:font-medium wp:text-sm"},iS={class:"webphone-display__user-row wp:flex wp:items-center wp:gap-2 wp:text-sm font-semibold"},oS={key:2,class:"webphone-display__dialer wp:w-full wp:flex wp:items-center wp:justify-center wp:min-h-10"},aS={class:"webphone-display__dialer-field wp:relative"},lS={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"},cS=["onPointerdown"],uS={class:"webphone-display__contact-content wp:flex wp:flex-col wp:min-w-0"},dS={class:"webphone-display__contact-name wp:truncate"},fS={class:"webphone-display__contact-number wp:text-xs wp:text-muted-foreground wp:truncate"},pS={key:3,class:"webphone-display__connected-summary wp:flex wp:flex-col wp:items-center wp:justify-center wp:gap-2 wp:w-full"},hS={class:"webphone-display__caller wp:flex wp:flex-col wp:items-center wp:gap-1"},gS={class:"webphone-display__caller-name wp:text-sm wp:font-semibold wp:text-neutral-800 wp:dark:text-white"},vS={key:0,class:"webphone-display__caller-number wp:text-[10px] wp:text-muted-foreground"},mS={key:4,class:"webphone-display__non-idle wp:flex wp:flex-col wp:items-center wp:justify-center wp:gap-2"},wS={class:"webphone-display__non-idle-row wp:flex wp:items-center wp:gap-4"},yS={class:"webphone-display__non-idle-caller wp:flex wp:flex-col wp:items-center"},bS={class:"webphone-display__non-idle-name wp:text-sm wp:font-medium wp:text-neutral-800 wp:dark:text-white"},_S={key:0,class:"webphone-display__non-idle-number wp:text-sm wp:text-muted-foreground"},SS=ee({__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}},setup(e){const t=Ht("webphone"),r=Ht("sip"),n=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd+":"Ctrl+",s=e,i=j(()=>s.channelId!==void 0?t.channels.find(w=>w.id===s.channelId):t.activeChannel),o=j(()=>{if(!t.isConnected)return"wp:text-status-disconnected";const w=i.value;return w&&w.status!=="idle"?w.isHeld||w.status==="held"?"wp:text-status-hold":w.status==="incoming"?"wp:text-status-incoming":"wp:text-primary":"wp:text-primary"}),a=U(!1),l=U(null),u=U(null),c=w=>w.replace(/[^0-9*#]/g,""),d=w=>{w.ctrlKey||w.metaKey||w.altKey||w.key.length!==1||/[0-9*#]/.test(w.key)||w.preventDefault()},p=w=>{w.data&&c(w.data)!==w.data&&w.preventDefault()};ky(l,()=>{a.value=!1});const h=j({get:()=>i.value?.keypadValue||"",set:w=>{i.value&&t.updateChannelState(i.value.id,{keypadValue:c(w)})}}),m=j(()=>/^[0-9*#]+$/.test(h.value)),y=j(()=>{if(!h.value)return s.contacts.slice(0,10);const w=h.value.toLowerCase(),E=[];for(const q of s.contacts)if((q.name.toLowerCase().includes(w)||q.number.includes(w))&&(E.push(q),E.length>=10))break;return E}),T=w=>{i.value&&t.updateChannelState(i.value.id,{keypadValue:c(w.number)}),a.value=!1},v=()=>{!h.value||!m.value||(a.value=!1,r.makeCall(h.value))};Re(h,()=>{a.value=!0});const x=()=>{h.value&&m.value&&v()},b=()=>{a.value=!1},_=()=>{a.value=!0},C=()=>{setTimeout(()=>{a.value=!1},150)},k=U(Date.now());Ty(()=>{k.value=Date.now()},1e3);const O=j(()=>{const w=i.value?.startTime,E=i.value?.status||"idle";if(!w||E!=="connected")return"00:00:00";const q=Math.floor((k.value-w)/1e3);return q<0?"00:00:00":`${Math.floor(q/3600).toString().padStart(2,"0")}:${Math.floor(q%3600/60).toString().padStart(2,"0")}:${(q%60).toString().padStart(2,"0")}`}),g=j(()=>{if(!s.isOnline)return"Sin internet";if(!t.isConnected)return"Sin conexión";const w=i.value,E=w?.status||"idle";if(E==="idle")return"Disponible";if(E==="calling")return"Llamando...";if(w?.isHeld){const q=w.remoteNumber||w.keypadValue||"Unknown";return`En espera - ${s.maskNumber?wi(q):q}`}return E==="connected"?"Conectado":E.charAt(0).toUpperCase()+E.slice(1)}),B=w=>{if(!w)return"";const E=w.trim(),q=E.startsWith("+"),Q=E.replace(/[^\d]/g,"");return q?`+${Q}`:Q},N=j(()=>{const w=i.value,E=w?.remoteNumber||w?.keypadValue,q=w?.remoteDisplayName;if(!E)return"Unknown";const Q=B(E),z=s.contacts?.find(X=>B(X.number)===Q);return z?z.name:q&&q!==E?q:s.maskNumber?wi(E):E}),S=j(()=>{const w=i.value,E=w?.remoteNumber||w?.keypadValue||"";return s.maskNumber?wi(E):E});return(w,E)=>(P(),ye("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"?(P(),ye("div",{key:0,class:Xe([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"])},[re("div",nS,[H(f(Cc),{class:"webphone-display__connected-status-icon wp:w-4 wp:h-4"}),E[3]||(E[3]=re("span",{class:"webphone-display__connected-status-text wp:text-sm wp:montserrat wp:font-medium"},"En llamada",-1))]),re("span",sS,He(O.value),1)],2)):Pe("",!0),s.user?(P(),ye("span",{key:1,class:Xe([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"])},[re("div",iS,[H(f(Cc),{class:"webphone-display__user-icon wp:size-6 wp:shrink-0 montserrat"}),Ne(" "+He(s.user),1)]),re("div",{class:Xe(["webphone-display__status-text wp:font-semibold wp:tracking-wider wp:text-sm wp:text-[var(--color-primary)] montserrat",o.value])},He(g.value),3)],2)):Pe("",!0),(i.value?.status||"idle")==="idle"&&s.allowInput?(P(),ye("div",oS,[re("div",{class:"webphone-display__dialer-container wp:relative wp:w-full wp:max-w-80",ref_key:"containerRef",ref:l},[re("div",aS,[H(f(ta),null,{default:R(()=>[H(f(Qo),null,{default:R(()=>[H(f(ra),{"as-child":""},{default:R(()=>[H(f(it),{onClick:E[0]||(E[0]=q=>f(t).toggleKeypad()),variant:"ghost",size:"icon",class:Xe(f(st)("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:R(()=>[f(t).isKeypadVisible?(P(),W(f(_c),{key:0,class:"webphone-display__keypad-toggle-icon wp:size-5"})):(P(),W(f(bc),{key:1,class:"webphone-display__keypad-toggle-icon wp:size-5"}))]),_:1},8,["class"])]),_:1}),H(f(ea),{class:"wp:flex wp:items-center wp:gap-2"},{default:R(()=>[re("span",null,He(f(t).isKeypadVisible?"Ocultar":"Mostrar")+" teclado",1),H(f(sn),null,{default:R(()=>[Ne(He(f(n))+"K",1)]),_:1})]),_:1})]),_:1})]),_:1}),H(f(Ti),{ref_key:"inputRef",ref:u,modelValue:h.value,"onUpdate:modelValue":E[1]||(E[1]=q=>h.value=q),type:"text",inputmode:"tel",pattern:"[0-9*#]*",onFocus:_,onBlur:C,onKeydown:[d,fl(x,["enter"]),fl(b,["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"]),re("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:E[2]||(E[2]=ar(q=>f(t).backspaceKeypad(),["stop"]))},[H(f(Sc),{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"})])]),Wi(re("div",lS,[m.value?(P(),ye("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:ar(v,["prevent"])},[H(f(Lh),{class:"webphone-display__suggestion-icon wp:w-4 wp:h-4 wp:shrink-0"}),re("span",null,"Marcar "+He(h.value),1)],32)):Pe("",!0),(P(!0),ye(Le,null,nr(y.value,q=>(P(),ye("div",{key:q.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:ar(Q=>T(q),["prevent"])},[re("div",{class:Xe(f(st)("webphone-display__contact-badge wp:flex wp:items-center wp:justify-center wp:w-6 wp:h-6 wp:rounded-full wp:shrink-0",q.type==="extension"?"wp:bg-blue-100 wp:text-blue-600 wp:dark:bg-blue-900/30 wp:dark:text-blue-400":q.type==="contact"?"wp:bg-emerald-100 wp:text-emerald-600 wp:dark:bg-emerald-900/30 wp:dark:text-emerald-400":q.type==="voicemail"?"wp:bg-purple-100 wp:text-purple-600 wp:dark:bg-purple-900/30 wp:dark:text-purple-400":q.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"))},[q.type==="extension"?(P(),W(f(Nh),{key:0,class:"wp:w-3 wp:h-3"})):q.type==="contact"?(P(),W(f(mc),{key:1,class:"wp:w-3 wp:h-3"})):q.type==="voicemail"?(P(),W(f(Fh),{key:2,class:"wp:w-3 wp:h-3"})):q.type==="tool"?(P(),W(f(Vh),{key:3,class:"wp:w-3 wp:h-3"})):(P(),W(f(mc),{key:4,class:"wp:w-3 wp:h-3"}))],2),re("div",uS,[re("span",dS,He(q.name),1),re("span",fS,He(q.number),1)])],40,cS))),128))],512),[[go,a.value&&h.value&&(y.value.length>0||m.value)]])],512)])):(i.value?.status||"idle")==="connected"?(P(),ye("div",pS,[re("div",hS,[re("div",gS," En llamada con "+He(N.value),1),N.value!==S.value?(P(),ye("div",vS,He(S.value),1)):Pe("",!0)])])):(i.value?.status||"idle")!=="idle"?(P(),ye("div",mS,[re("div",wS,[re("div",yS,[re("div",bS,He(N.value),1),N.value!==S.value?(P(),ye("div",_S,He(S.value),1)):Pe("",!0)]),H(f(ta),null,{default:R(()=>[H(f(Qo),null,{default:R(()=>[H(f(ra),{"as-child":""}),H(f(ea),{class:"wp:flex wp:items-center wp:gap-2"},{default:R(()=>[re("span",null,He(f(t).isKeypadVisible?"Ocultar":"Mostrar")+" teclado",1),H(f(sn),null,{default:R(()=>[Ne(He(f(n))+"K",1)]),_:1})]),_:1})]),_:1})]),_:1})])])):Pe("",!0)],8,rS))}}),CS=SS,xS=ee({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=Qr(e,t);return(n,s)=>(P(),W(f(ob),ge({"data-slot":"dialog"},f(r)),{default:R(i=>[se(n.$slots,"default",pr(sr(i)))]),_:3},16))}}),xc=xS,TS=ee({__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)=>(P(),W(f(Tb),ge({"data-slot":"dialog-overlay"},f(r),{class:f(st)("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:R(()=>[se(n.$slots,"default")]),_:3},16,["class"]))}}),ES=TS,AS=ee({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=Qr(Ut(r,"class"),n);return(i,o)=>(P(),W(f(Eb),null,{default:R(()=>[H(ES),H(f(Cb),ge({"data-slot":"dialog-content"},{...i.$attrs,...f(s)},{class:f(st)("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:R(()=>[se(i.$slots,"default"),e.showCloseButton?(P(),W(f(ab),{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:R(()=>[H(f(wc)),o[0]||(o[0]=re("span",{class:"wp:sr-only"},"Close",-1))]),_:1})):Pe("",!0)]),_:3},16,["class"])]),_:3}))}}),Tc=AS,kS=ee({__name:"DialogFooter",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(r,n)=>(P(),ye("div",{"data-slot":"dialog-footer",class:Xe(f(st)("wp:flex wp:flex-col-reverse wp:gap-2 wp:sm:flex-row wp:sm:justify-end",t.class))},[se(r.$slots,"default")],2))}}),jh=kS,IS=ee({__name:"DialogHeader",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(r,n)=>(P(),ye("div",{"data-slot":"dialog-header",class:Xe(f(st)("wp:flex wp:flex-col wp:gap-2 wp:text-center wp:sm:text-left",t.class))},[se(r.$slots,"default")],2))}}),Ec=IS,RS=ee({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Xr(Ut(t,"class"));return(n,s)=>(P(),W(f(Ab),ge({"data-slot":"dialog-title"},f(r),{class:f(st)("wp:text-lg wp:leading-none wp:font-semibold",t.class)}),{default:R(()=>[se(n.$slots,"default")]),_:3},16,["class"]))}}),Ac=RS,$S=ee({__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=Qr(e,t);return(n,s)=>(P(),W(f(y2),ge({"data-slot":"select"},f(r)),{default:R(i=>[se(n.$slots,"default",pr(sr(i)))]),_:3},16))}}),Uh=$S,PS=ee({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=Qr(Ut(r,"class"),n);return(i,o)=>(P(),W(f(M2),null,{default:R(()=>[H(f(k2),ge({"data-slot":"select-content"},{...i.$attrs,...f(s)},{class:f(st)("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:R(()=>[H(f(BS)),H(f(F2),{class:Xe(f(st)("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:R(()=>[se(i.$slots,"default")]),_:3},8,["class"]),H(f(NS))]),_:3},16,["class"])]),_:3}))}}),zh=PS,DS=ee({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>(P(),W(f(R2),ge({"data-slot":"select-group"},t),{default:R(()=>[se(r.$slots,"default")]),_:3},16))}}),Kh=DS,OS={class:"wp:absolute wp:right-2 wp:flex wp:size-3.5 wp:items-center wp:justify-center"},HS=ee({__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=Xr(Ut(t,"class"));return(n,s)=>(P(),W(f(D2),ge({"data-slot":"select-item"},f(r),{class:f(st)("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:R(()=>[re("span",OS,[H(f(O2),null,{default:R(()=>[se(n.$slots,"indicator-icon",{},()=>[H(f(qh),{class:"wp:size-4"})])]),_:3})]),H(f(H2),null,{default:R(()=>[se(n.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),Wh=HS,MS=ee({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Xr(Ut(t,"class"));return(n,s)=>(P(),W(f(N2),ge({"data-slot":"select-scroll-down-button"},f(r),{class:f(st)("wp:flex wp:cursor-default wp:items-center wp:justify-center wp:py-1",t.class)}),{default:R(()=>[se(n.$slots,"default",{},()=>[H(f(Bh),{class:"wp:size-4"})])]),_:3},16,["class"]))}}),NS=MS,qS=ee({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Xr(Ut(t,"class"));return(n,s)=>(P(),W(f(q2),ge({"data-slot":"select-scroll-up-button"},f(r),{class:f(st)("wp:flex wp:cursor-default wp:items-center wp:justify-center wp:py-1",t.class)}),{default:R(()=>[se(n.$slots,"default",{},()=>[H(f(a_),{class:"wp:size-4"})])]),_:3},16,["class"]))}}),BS=qS,LS=ee({__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=Xr(Ut(t,"class","size"));return(n,s)=>(P(),W(f(B2),ge({"data-slot":"select-trigger","data-size":e.size},f(r),{class:f(st)("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:R(()=>[se(n.$slots,"default"),H(f($2),{"as-child":""},{default:R(()=>[H(f(Bh),{class:"wp:size-4 wp:opacity-50"})]),_:1})]),_:3},16,["data-size","class"]))}}),Gh=LS,FS=ee({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>(P(),W(f(L2),ge({"data-slot":"select-value"},t),{default:R(()=>[se(r.$slots,"default")]),_:3},16))}}),Jh=FS,VS=ee({__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=Qr(Ut(r,"class"),n);return(i,o)=>(P(),W(f(W1),ge({"data-slot":"slider",class:f(st)("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:R(({modelValue:a})=>[H(f(Z1),{"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:R(()=>[H(f(G1),{"data-slot":"slider-range",class:"wp:bg-primary wp:absolute wp:data-[orientation=horizontal]:h-full wp:data-[orientation=vertical]:w-full"})]),_:1}),(P(!0),ye(Le,null,nr(a,(l,u)=>(P(),W(f(Y1),{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"]))}}),Yh=VS,jS=ee({__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)=>(P(),W(f(X1),ge({"data-slot":"label"},f(r),{class:f(st)("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:R(()=>[se(n.$slots,"default")]),_:3},16,["class"]))}}),$s=jS,US=ee({__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)=>(P(),W(f(j2),ge({"data-slot":"separator"},f(r),{class:f(st)("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"]))}}),zS=US,KS={class:"wp:flex wp:flex-col wp:gap-6 wp:py-4"},WS={class:"wp:flex wp:flex-col wp:gap-2"},GS={class:"wp:flex wp:flex-col wp:gap-2"},JS={class:"wp:flex wp:flex-col wp:gap-4"},YS={class:"wp:flex wp:justify-between"},ZS={class:"wp:text-sm wp:text-muted-foreground"},XS={class:"wp:flex wp:flex-col wp:gap-4"},QS={class:"wp:flex wp:justify-between"},eC={class:"wp:text-sm wp:text-muted-foreground"},tC={class:"wp:flex wp:flex-col wp:gap-3"},rC={class:"wp:grid wp:grid-cols-2 wp:gap-2 wp:text-sm"},nC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},sC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},iC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},oC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},aC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},lC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},cC=ee({__name:"AudioSettingsDialog",props:{visible:{type:Boolean}},emits:["update:visible"],setup(e,{emit:t}){const r=t,n=navigator.platform.toUpperCase().indexOf("MAC")>=0?"⌘":"Ctrl+",{setVolume:s,setOutputDevice:i,setInputDevice:o,setNotificationVolume:a}=Ht("sip"),l=U([]),u=U([]),c=Oo("webphone-input-device",""),d=Oo("webphone-output-device",""),p=Oo("webphone-volume",100),h=Oo("webphone-notification-volume",100),m=async()=>{try{await navigator.mediaDevices.getUserMedia({audio:!0});const _=await navigator.mediaDevices.enumerateDevices();l.value=_.filter(O=>O.kind==="audioinput").map((O,g)=>({deviceId:O.deviceId,label:O.label||`Microphone ${g+1}`})),u.value=_.filter(O=>O.kind==="audiooutput").map((O,g)=>({deviceId:O.deviceId,label:O.label||`Speaker ${g+1}`}));const C=l.value.some(O=>O.deviceId===c.value);(!c.value||!C)&&l.value.length>0&&(c.value=l.value[0]?.deviceId??"");const k=u.value.some(O=>O.deviceId===d.value);(!d.value||!k)&&u.value.length>0&&(d.value=u.value[0]?.deviceId??""),c.value&&o(c.value),d.value&&i(d.value)}catch(_){console.error("Error loading devices",_)}},y=_=>{const C=String(_);c.value=C,o(C)},T=_=>{const C=String(_);d.value=C,i(C)},v=(_,C=35)=>_.length<=C?_:_.substring(0,C)+"...",x=j({get:()=>[p.value],set:_=>{p.value=_[0],s(p.value)}}),b=j({get:()=>[h.value],set:_=>{h.value=_[0],a(h.value)}});return We(()=>{m(),s(p.value),a(h.value)}),(_,C)=>e.visible?(P(),W(f(xc),{key:0,open:e.visible,"onUpdate:open":C[5]||(C[5]=k=>r("update:visible",k))},{default:R(()=>[H(f(Tc),{class:"wp:sm:max-w-sm"},{default:R(()=>[H(f(Ec),null,{default:R(()=>[H(f(Ac),null,{default:R(()=>[...C[6]||(C[6]=[Ne("Audio Settings",-1)])]),_:1})]),_:1}),re("div",KS,[re("div",WS,[H(f($s),null,{default:R(()=>[...C[7]||(C[7]=[Ne("Microphone",-1)])]),_:1}),H(f(Uh),{modelValue:f(c),"onUpdate:modelValue":[C[0]||(C[0]=k=>Je(c)?c.value=k:null),y]},{default:R(()=>[H(f(Gh),{class:"wp:w-full"},{default:R(()=>[H(f(Jh),{placeholder:"Select Microphone"})]),_:1}),H(f(zh),null,{default:R(()=>[H(f(Kh),null,{default:R(()=>[(P(!0),ye(Le,null,nr(l.value,k=>(P(),W(f(Wh),{key:k.deviceId,value:k.deviceId,title:k.label},{default:R(()=>[Ne(He(v(k.label)),1)]),_:2},1032,["value","title"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),re("div",GS,[H(f($s),null,{default:R(()=>[...C[8]||(C[8]=[Ne("Speaker",-1)])]),_:1}),H(f(Uh),{modelValue:f(d),"onUpdate:modelValue":[C[1]||(C[1]=k=>Je(d)?d.value=k:null),T]},{default:R(()=>[H(f(Gh),{class:"wp:w-full"},{default:R(()=>[H(f(Jh),{placeholder:"Select Speaker"})]),_:1}),H(f(zh),null,{default:R(()=>[H(f(Kh),null,{default:R(()=>[(P(!0),ye(Le,null,nr(u.value,k=>(P(),W(f(Wh),{key:k.deviceId,value:k.deviceId,title:k.label},{default:R(()=>[Ne(He(v(k.label)),1)]),_:2},1032,["value","title"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),re("div",JS,[re("div",YS,[H(f($s),null,{default:R(()=>[...C[9]||(C[9]=[Ne("Media Volume",-1)])]),_:1}),re("span",ZS,He(f(p))+"%",1)]),H(f(Yh),{modelValue:x.value,"onUpdate:modelValue":C[2]||(C[2]=k=>x.value=k),max:100,step:1},null,8,["modelValue"])]),re("div",XS,[re("div",QS,[H(f($s),null,{default:R(()=>[...C[10]||(C[10]=[Ne("Notification Volume",-1)])]),_:1}),re("span",eC,He(f(h))+"%",1)]),H(f(Yh),{modelValue:b.value,"onUpdate:modelValue":C[3]||(C[3]=k=>b.value=k),max:100,step:1},null,8,["modelValue"])]),H(f(zS)),re("div",tC,[H(f($s),{class:"wp:text-base"},{default:R(()=>[...C[11]||(C[11]=[Ne("Atajos de teclado",-1)])]),_:1}),re("div",rC,[re("div",nC,[C[12]||(C[12]=re("span",{class:"wp:text-muted-foreground"},"Historial",-1)),H(f(sn),null,{default:R(()=>[Ne(He(f(n))+"H",1)]),_:1})]),re("div",sC,[C[13]||(C[13]=re("span",{class:"wp:text-muted-foreground"},"Configuración",-1)),H(f(sn),null,{default:R(()=>[Ne(He(f(n))+",",1)]),_:1})]),re("div",iC,[C[14]||(C[14]=re("span",{class:"wp:text-muted-foreground"},"Teclado",-1)),H(f(sn),null,{default:R(()=>[Ne(He(f(n))+"K",1)]),_:1})]),re("div",oC,[C[15]||(C[15]=re("span",{class:"wp:text-muted-foreground"},"Línea 1",-1)),H(f(sn),null,{default:R(()=>[Ne(He(f(n))+"1",1)]),_:1})]),re("div",aC,[C[16]||(C[16]=re("span",{class:"wp:text-muted-foreground"},"Línea 2",-1)),H(f(sn),null,{default:R(()=>[Ne(He(f(n))+"2",1)]),_:1})]),re("div",lC,[C[17]||(C[17]=re("span",{class:"wp:text-muted-foreground"},"Línea 3",-1)),H(f(sn),null,{default:R(()=>[Ne(He(f(n))+"3",1)]),_:1})])])])]),H(f(jh),null,{default:R(()=>[H(f(it),{variant:"secondary",onClick:C[4]||(C[4]=k=>r("update:visible",!1))},{default:R(()=>[...C[18]||(C[18]=[Ne("Close",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])):Pe("",!0)}}),uC=cC,dC=ee({__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)=>(P(),W(f(d2),ge({"data-slot":"scroll-area-scrollbar"},f(r),{class:f(st)("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:R(()=>[H(f(p2),{"data-slot":"scroll-area-thumb",class:"wp:bg-border wp:relative wp:flex-1 wp:rounded-full"})]),_:1},16,["class"]))}}),fC=dC,pC=ee({__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)=>(P(),W(f(e2),ge({"data-slot":"scroll-area"},f(r),{class:f(st)("wp:relative",t.class)}),{default:R(()=>[H(f(h2),{"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:R(()=>[se(n.$slots,"default")]),_:3}),H(fC),H(f(r2))]),_:3},16,["class"]))}}),Zh=pC,hC={class:"wp:relative wp:my-2"},gC={class:"wp:flex wp:flex-col wp:gap-2"},vC=["onClick"],mC={class:"wp:flex wp:items-center wp:gap-3"},wC={class:"wp:flex wp:flex-col"},yC={class:"wp:text-sm wp:font-medium"},bC={class:"wp:text-[10px] wp:text-muted-foreground"},_C={class:"wp:flex wp:flex-col wp:items-end"},SC={key:0,class:"wp:text-xs wp:font-mono wp:text-muted-foreground"},CC={class:"wp:text-[10px] wp:text-muted-foreground wp:capitalize"},xC={key:0,class:"wp:text-center wp:text-muted-foreground wp:py-8"},TC={key:1,class:"wp:text-center wp:text-muted-foreground wp:py-8"},EC=ee({__name:"CallHistoryDialog",props:{visible:{type:Boolean},contacts:{}},emits:["update:visible","call"],setup(e,{emit:t}){const r=e,n=t,s=Ht("webphone"),i=U(""),o=p=>{if(!r.contacts)return p;const h=r.contacts.find(m=>m.number===p);return h?h.name:p},a=j(()=>{if(!i.value)return s.callHistory;const p=i.value.toLowerCase();return s.callHistory.filter(h=>{const m=o(h.number).toLowerCase(),y=h.number.toLowerCase();return m.includes(p)||y.includes(p)})}),l=p=>p===0?"":`${Math.floor(p/60)}:${(p%60).toString().padStart(2,"0")}`,u=p=>p.direction==="incoming"?p.status==="missed"?f_:d_:p_,c=p=>p.status==="missed"?"wp:text-red-500":p.direction==="incoming"?"wp:text-green-500":"wp:text-blue-500",d=p=>{n("update:visible",!1),n("call",p)};return(p,h)=>e.visible?(P(),W(f(xc),{key:0,open:e.visible,"onUpdate:open":h[1]||(h[1]=m=>n("update:visible",m))},{default:R(()=>[H(f(Tc),{class:"wp:sm:max-w-sm"},{default:R(()=>[H(f(Ec),null,{default:R(()=>[H(f(Ac),null,{default:R(()=>[...h[2]||(h[2]=[Ne("Call History",-1)])]),_:1})]),_:1}),re("div",hC,[H(f(v_),{class:"wp:absolute wp:left-2 wp:top-2.5 wp:h-4 wp:w-4 wp:text-muted-foreground"}),H(f(Ti),{modelValue:i.value,"onUpdate:modelValue":h[0]||(h[0]=m=>i.value=m),placeholder:"Search history...",class:"wp:pl-8"},null,8,["modelValue"])]),H(f(Zh),{class:"wp:h-[60vh] wp:pr-4"},{default:R(()=>[re("div",gC,[(P(!0),ye(Le,null,nr(a.value,m=>(P(),ye("div",{key:m.id,class:"wp:flex wp:items-center wp:justify-between wp:p-2 wp:rounded-lg wp:hover:bg-accent wp:cursor-pointer wp:transition-colors",onClick:y=>d(m.number)},[re("div",mC,[(P(),W(Xs(u(m)),{class:Xe([c(m),"wp:w-4 wp:h-4"])},null,8,["class"])),re("div",wC,[re("span",yC,He(o(m.number)),1),re("span",bC,He(new Date(m.startTime).toLocaleString()),1)])]),re("div",_C,[m.duration>0?(P(),ye("span",SC,He(l(m.duration)),1)):Pe("",!0),re("span",CC,He(m.status),1)])],8,vC))),128)),f(s).callHistory.length===0?(P(),ye("div",xC," No call history ")):a.value.length===0?(P(),ye("div",TC," No results found ")):Pe("",!0)])]),_:1})]),_:1})]),_:1},8,["open"])):Pe("",!0)}}),AC=EC,kC={class:"wp:grid wp:gap-4 wp:py-4"},IC={class:"wp:grid wp:gap-2 wp:relative"},RC={class:"wp:relative"},$C={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"},PC={class:"wp:p-1"},DC=["onClick"],OC={class:"wp:flex wp:flex-col wp:min-w-0 wp:flex-1"},HC={class:"wp:font-medium wp:text-sm wp:truncate"},MC={class:"wp:text-xs wp:text-muted-foreground"},NC=ee({__name:"TransferDialog",props:{visible:{type:Boolean},contacts:{default:()=>[]}},emits:["update:visible","transfer"],setup(e,{emit:t}){const r=e,n=t,s=U(""),i=U(!1),o=U(null);Re(()=>r.visible,p=>{p&&(s.value="",i.value=!1)}),Re(s,p=>{i.value=p.length>0&&a.value.length>0});const a=j(()=>{if(!s.value)return r.contacts;const p=s.value.toLowerCase();return r.contacts.filter(h=>h.name.toLowerCase().includes(p)||h.number.includes(p))}),l=p=>{s.value=p.number,i.value=!1},u=()=>{s.value="",i.value=!1,o.value?.focus()},c=p=>{const h=s.value.trim();h&&(n("transfer",h,p),n("update:visible",!1),s.value="",i.value=!1)},d=p=>{p.key==="Enter"&&s.value.trim()?(p.preventDefault(),c("blind")):p.key==="Escape"&&(i.value=!1)};return(p,h)=>e.visible?(P(),W(f(xc),{key:0,open:e.visible,"onUpdate:open":h[5]||(h[5]=m=>n("update:visible",m))},{default:R(()=>[H(f(Tc),{class:"wp:sm:max-w-md"},{default:R(()=>[H(f(Ec),null,{default:R(()=>[H(f(Ac),null,{default:R(()=>[...h[6]||(h[6]=[Ne("Transferir Llamada",-1)])]),_:1})]),_:1}),re("div",kC,[re("div",IC,[H(f($s),{for:"transfer-input"},{default:R(()=>[...h[7]||(h[7]=[Ne("Número o Contacto",-1)])]),_:1}),re("div",RC,[H(f(Ti),{id:"transfer-input",ref_key:"inputRef",ref:o,modelValue:s.value,"onUpdate:modelValue":h[0]||(h[0]=m=>s.value=m),type:"text",placeholder:"Escribe un número o busca un contacto...",class:"wp:pr-8",onKeydown:d,onFocus:h[1]||(h[1]=m=>i.value=s.value.length>0&&a.value.length>0),autocomplete:"off"},null,8,["modelValue"]),s.value?(P(),W(f(it),{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:u},{default:R(()=>[H(f(wc),{class:"wp:h-4 wp:w-4"})]),_:1})):Pe("",!0)]),i.value&&a.value.length>0?(P(),ye("div",$C,[H(f(Zh),{class:"wp:max-h-60"},{default:R(()=>[re("div",PC,[(P(!0),ye(Le,null,nr(a.value,m=>(P(),ye("div",{key:m.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:y=>l(m)},[m.type?(P(),ye("div",{key:0,class:Xe(f(st)("wp:flex wp:items-center wp:justify-center wp:w-8 wp:h-8 wp:rounded-full wp:shrink-0",m.type==="extension"?"wp:bg-blue-100 wp:text-blue-600 wp:dark:bg-blue-900/30 wp:dark:text-blue-400":m.type==="contact"?"wp:bg-emerald-100 wp:text-emerald-600 wp:dark:bg-emerald-900/30 wp:dark:text-emerald-400":m.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"))},[m.type==="extension"?(P(),W(f(Nh),{key:0,class:"wp:w-4 wp:h-4"})):m.type==="contact"?(P(),W(f(mc),{key:1,class:"wp:w-4 wp:h-4"})):m.type==="voicemail"?(P(),W(f(Fh),{key:2,class:"wp:w-4 wp:h-4"})):(P(),W(f(Vh),{key:3,class:"wp:w-4 wp:h-4"}))],2)):Pe("",!0),re("div",OC,[re("span",HC,He(m.name),1),re("span",MC,He(m.number),1)])],8,DC))),128))])]),_:1})])):Pe("",!0),h[8]||(h[8]=re("p",{class:"wp:text-xs wp:text-muted-foreground"}," Presiona Enter para transferir directamente ",-1))])]),H(f(jh),{class:"wp:flex-col wp:gap-2 sm:wp:flex-row"},{default:R(()=>[H(f(it),{variant:"secondary",onClick:h[2]||(h[2]=m=>n("update:visible",!1)),class:"wp:w-full sm:wp:w-auto"},{default:R(()=>[...h[9]||(h[9]=[Ne(" Cancelar ",-1)])]),_:1}),H(f(it),{onClick:h[3]||(h[3]=m=>c("blind")),disabled:!s.value.trim(),variant:"outline",class:"wp:w-full sm:wp:flex-1"},{default:R(()=>[...h[10]||(h[10]=[Ne(" Transferencia Ciega ",-1)])]),_:1},8,["disabled"]),H(f(it),{onClick:h[4]||(h[4]=m=>c("attended")),disabled:!s.value.trim(),class:"wp:w-full sm:wp:flex-1"},{default:R(()=>[...h[11]||(h[11]=[Ne(" Con Consulta ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["open"])):Pe("",!0)}}),qC=NC,BC=ee({__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=U(!1),o=U(!1),a=U(!1),l=U(null),u=U(0),c=U(null);let d=null,p=null;We(()=>{i.value="documentPictureInPicture"in window,document.addEventListener("visibilitychange",y),window.addEventListener("blur",T)}),Mt(()=>{document.removeEventListener("visibilitychange",y),window.removeEventListener("blur",T),p&&(clearTimeout(p),p=null),x(),z()});const h=()=>{const Y=n.callStatus!=="idle",le=document.hidden||!document.hasFocus();return n.autoOpenOnBlur!==!1&&Y&&i.value&&le&&!o.value&&!a.value},m=()=>{h()&&(p&&clearTimeout(p),p=setTimeout(()=>{h()&&Q()},120))},y=()=>{m()},T=()=>{m()},v=()=>{c.value||(u.value=0,c.value=setInterval(()=>{u.value++},1e3))},x=()=>{c.value&&(clearInterval(c.value),c.value=null)},b=Y=>{const le=Math.floor(Y/60),K=Y%60;return`${le.toString().padStart(2,"0")}:${K.toString().padStart(2,"0")}`};Re(()=>n.callStatus,(Y,le)=>{Y==="connected"&&le!=="connected"?v():Y==="idle"&&le!=="idle"&&(x(),o.value&&z())},{immediate:!0}),Re(()=>n.isConnected,Y=>{!Y&&o.value&&(x(),z())}),Re(()=>[n.callStatus,n.isMuted,n.isHeld],()=>{l.value&&(S(l.value.document),B(l.value.document))});const _=j(()=>i.value&&n.isConnected),C={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=Y=>{const le=Y.createElement("style");le.textContent=`
76
+ ¿Desea realizar la llamada solo con AUDIO?`)&&x(!1)}else alert("Error al iniciar la llamada: "+(_ instanceof Error?_.message:String(_)))}},k=(S=!1)=>{if(m.onAnswer){m.onAnswer(S);return}i(S)},O=()=>{if(m.onHangup){m.onHangup();return}s()},g=()=>{if(m.onReject){m.onReject();return}s()},q=z(()=>{const S={};return r.channels.forEach(_=>{const C=_.status==="connected"||_.status==="calling"||_.status==="incoming";S[_.id]=C?"wp:text-[var(--color-red)]":"wp:text-[var(--color-avaible)]"}),S}),B=z(()=>q.value[r.activeChannelId]??"wp:text-[var(--p-primary-color)]");return(S,_)=>(P(),ye("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"?(P(),ye("div",q_,[y.value?(P(),G(f(it),{key:0,variant:"default",size:"icon",onClick:_[0]||(_[0]=C=>x(!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:R(()=>[H(f(A_),{class:"webphone-actions__button-icon wp:size-7 wp:text-white"}),_[12]||(_[12]=re("span",{class:"webphone-actions__button-label wp:w-full wp:text-white wp:text-xs"},"Llamar",-1))]),_:1})):Pe("",!0),b.value?(P(),G(f(it),{key:1,variant:"outline",size:"icon",onClick:_[1]||(_[1]=C=>x(!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:R(()=>[H(f(R_),{class:Xe(["webphone-actions__button-icon wp:size-6 wp:text-primary wp:dark:text-white",B.value])},null,8,["class"]),_[13]||(_[13]=re("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})):Pe("",!0)])):Pe("",!0),f(r).callStatus==="incoming"?(P(),ye(Le,{key:1},[f(r).activeChannel?.hasVideo?(P(),G(f(it),{key:0,variant:"default",size:"icon",onClick:_[2]||(_[2]=C=>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:R(()=>[H(f(w_),{class:"webphone-actions__button-icon wp:w-5 wp:h-5 wp:text-[var(--p-primary-color)]"})]),_:1})):Pe("",!0),H(f(it),{variant:"default",size:"icon",onClick:_[3]||(_[3]=C=>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:R(()=>[H(f(Lh),{class:"webphone-actions__button-icon wp:w-5 wp:h-5 wp:text-white"})]),_:1}),H(f(it),{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:R(()=>[H(f(yc),{class:"webphone-actions__button-icon wp:w-5 wp:h-5 wp:text-white"})]),_:1})],64)):Pe("",!0),f(r).callStatus==="connected"?(P(),ye("div",B_,[re("div",L_,[H(f(it),{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:R(()=>[f(r).isMuted?(P(),G(f(l_),{key:0,class:"webphone-actions__button-icon wp:size-5 wp:text-status-disconnected"})):(P(),G(f(c_),{key:1,class:"webphone-actions__button-icon wp:size-5 wp:text-[var(--p-primary-color)]"}))]),_:1},8,["variant","onClick"]),H(f(it),{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:R(()=>[f(r).isHeld?(P(),G(f(g_),{key:0,class:"webphone-actions__button-icon wp:size-5 wp:text-status-hold"})):(P(),G(f(u_),{key:1,class:"webphone-actions__button-icon wp:size-5 wp:text-[var(--p-primary-color)]"}))]),_:1},8,["variant","onClick"]),E.value?Pe("",!0):(P(),G(f(it),{key:0,variant:"secondary",size:"icon",onClick:_[4]||(_[4]=C=>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:R(()=>[H(f(x_),{class:"webphone-actions__button-icon wp:size-5 wp:text-[var(--p-primary-color)]"})]),_:1}))]),re("div",F_,[H(f(it),{variant:"ghost",size:"icon",onClick:_[5]||(_[5]=C=>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:R(()=>[f(r).isKeypadVisible?(P(),G(f(_c),{key:0,class:"webphone-actions__keypad-toggle-icon wp:size-6"})):(P(),G(f(bc),{key:1,class:"webphone-actions__keypad-toggle-icon wp:size-6"}))]),_:1},8,["aria-label"]),H(f(Ti),{"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"]),re("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]=ar(C=>f(r).backspaceKeypad(),["stop"]))},[H(f(Sc),{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"})])]),re("div",{class:Xe(["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"},[H(vc)],10,V_),H(f(it),{size:"icon",onClick:O,"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:R(()=>[H(f(yc),{class:"webphone-actions__button-icon wp:size-6 wp:text-white"}),_[14]||(_[14]=re("span",{class:"webphone-actions__button-label wp:w-full wp:text-white wp:text-xs"},"Colgar",-1))]),_:1})])):Pe("",!0),f(r).callStatus==="calling"?(P(),ye("div",j_,[re("div",U_,[H(f(it),{variant:"ghost",size:"icon",onClick:_[7]||(_[7]=C=>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:R(()=>[f(r).isKeypadVisible?(P(),G(f(_c),{key:0,class:"webphone-actions__keypad-toggle-icon wp:size-6"})):(P(),G(f(bc),{key:1,class:"webphone-actions__keypad-toggle-icon wp:size-6"}))]),_:1},8,["aria-label"]),H(f(Ti),{modelValue:f(r).keypadValue,"onUpdate:modelValue":_[8]||(_[8]=C=>f(r).keypadValue=C),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"]),re("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]=ar(C=>f(r).backspaceKeypad(),["stop"]))},[H(f(Sc),{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"})])]),re("div",{class:Xe(["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"},[H(vc)],10,z_),H(f(it),{variant:"destructive",size:"lg",onClick:O,"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:R(()=>[H(f(yc),{class:"webphone-actions__button-icon wp:size-6 wp:text-white"}),_[15]||(_[15]=re("span",{class:"webphone-actions__button-label wp:w-full wp:text-white"},"Colgar",-1))]),_:1})])):Pe("",!0),E.value&&f(r).callStatus==="connected"?(P(),ye("div",K_,[H(f(it),{variant:"default",size:"sm",onClick:_[10]||(_[10]=C=>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:R(()=>[H(f(qh),{class:"wp:w-4 wp:h-4"}),_[16]||(_[16]=Ne(" Completar Transferencia ",-1))]),_:1}),H(f(it),{variant:"destructive",size:"sm",onClick:_[11]||(_[11]=C=>w("cancelTransfer")),class:"webphone-actions__button webphone-actions__button--cancel-transfer wp:gap-2"},{default:R(()=>[H(f(wc),{class:"wp:w-4 wp:h-4"}),_[17]||(_[17]=Ne(" Cancelar ",-1))]),_:1})])):Pe("",!0)],8,N_))}}),G_=W_,J_=ee({__name:"Kbd",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(r,n)=>(P(),ye("kbd",{class:Xe(f(st)("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))},[se(r.$slots,"default")],2))}}),sn=J_,Y_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 30 23"};function Z_(e,t){return P(),ye("svg",Y_,[...t[0]||(t[0]=[re("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 Cc={render:Z_},X_=ee({__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=Qr(e,t);return(n,s)=>(P(),G(f(G2),ge({"data-slot":"tooltip"},f(r)),{default:R(i=>[se(n.$slots,"default",pr(sr(i)))]),_:3},16))}}),Qo=X_,Q_=ee({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=Qr(Ut(r,"class"),n);return(i,o)=>(P(),G(f(Z2),null,{default:R(()=>[H(f(Y2),ge({"data-slot":"tooltip-content"},{...f(s),...i.$attrs},{class:f(st)("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:R(()=>[se(i.$slots,"default"),H(f(U2),{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}))}}),ea=Q_,eS=ee({__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)=>(P(),G(f(K2),pr(sr(t)),{default:R(()=>[se(r.$slots,"default")]),_:3},16))}}),ta=eS,tS=ee({__name:"TooltipTrigger",props:{reference:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>(P(),G(f(X2),ge({"data-slot":"tooltip-trigger"},t),{default:R(()=>[se(r.$slots,"default")]),_:3},16))}}),ra=tS,rS=["data-call-status"],nS={class:"webphone-display__connected-status-label wp:flex wp:gap-2 wp:items-center"},sS={class:"webphone-display__duration wp:ibrad wp:font-medium wp:text-sm"},iS={class:"webphone-display__user-row wp:flex wp:items-center wp:gap-2 wp:text-sm font-semibold"},oS={key:2,class:"webphone-display__dialer wp:w-full wp:flex wp:items-center wp:justify-center wp:min-h-10"},aS={class:"webphone-display__dialer-field wp:relative"},lS={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"},cS=["onPointerdown"],uS={class:"webphone-display__contact-content wp:flex wp:flex-col wp:min-w-0"},dS={class:"webphone-display__contact-name wp:truncate"},fS={class:"webphone-display__contact-number wp:text-xs wp:text-muted-foreground wp:truncate"},pS={key:3,class:"webphone-display__connected-summary wp:flex wp:flex-col wp:items-center wp:justify-center wp:gap-2 wp:w-full"},hS={class:"webphone-display__caller wp:flex wp:flex-col wp:items-center wp:gap-1"},gS={class:"webphone-display__caller-name wp:text-sm wp:font-semibold wp:text-neutral-800 wp:dark:text-white"},vS={key:0,class:"webphone-display__caller-number wp:text-[10px] wp:text-muted-foreground"},mS={key:4,class:"webphone-display__non-idle wp:flex wp:flex-col wp:items-center wp:justify-center wp:gap-2"},wS={class:"webphone-display__non-idle-row wp:flex wp:items-center wp:gap-4"},yS={class:"webphone-display__non-idle-caller wp:flex wp:flex-col wp:items-center"},bS={class:"webphone-display__non-idle-name wp:text-sm wp:font-medium wp:text-neutral-800 wp:dark:text-white"},_S={key:0,class:"webphone-display__non-idle-number wp:text-sm wp:text-muted-foreground"},SS=ee({__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}},setup(e){const t=Ht("webphone"),r=Ht("sip"),n=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd+":"Ctrl+",s=e,i=z(()=>s.channelId!==void 0?t.channels.find(C=>C.id===s.channelId):t.activeChannel),o=z(()=>{if(!t.isConnected)return"wp:text-status-disconnected";const C=i.value;return C&&C.status!=="idle"?C.isHeld||C.status==="held"?"wp:text-status-hold":C.status==="incoming"?"wp:text-status-incoming":"wp:text-primary":"wp:text-primary"}),a=K(!1),l=K(null),u=K(null),c=C=>C.replace(/[^0-9*#]/g,""),d=C=>{C.ctrlKey||C.metaKey||C.altKey||C.key.length!==1||/[0-9*#]/.test(C.key)||C.preventDefault()},p=C=>{C.data&&c(C.data)!==C.data&&C.preventDefault()};ky(l,()=>{a.value=!1});const h=z({get:()=>i.value?.keypadValue||"",set:C=>{i.value&&t.updateChannelState(i.value.id,{keypadValue:c(C)})}}),m=z(()=>/^[0-9*#]+$/.test(h.value)),w=z(()=>{if(!h.value)return s.contacts.slice(0,10);const C=h.value.toLowerCase(),N=[];for(const V of s.contacts)if((V.name.toLowerCase().includes(C)||V.number.includes(C))&&(N.push(V),N.length>=10))break;return N}),E=C=>{i.value&&t.updateChannelState(i.value.id,{keypadValue:c(C.number)}),a.value=!1},v=()=>{!h.value||!m.value||(a.value=!1,r.makeCall(h.value))};Re(h,()=>{a.value=!0});const T=()=>{h.value&&m.value&&v()},y=()=>{a.value=!1},b=()=>{a.value=!0},x=()=>{setTimeout(()=>{a.value=!1},150)},k=K(Date.now());Ty(()=>{k.value=Date.now()},1e3);const O=z(()=>{const C=i.value?.startTime,N=i.value?.status||"idle";if(!C||N!=="connected")return"00:00:00";const V=Math.floor((k.value-C)/1e3);return V<0?"00:00:00":`${Math.floor(V/3600).toString().padStart(2,"0")}:${Math.floor(V%3600/60).toString().padStart(2,"0")}:${(V%60).toString().padStart(2,"0")}`}),g=z(()=>{if(!s.isOnline)return"Sin internet";if(!t.isConnected)return"Sin conexión";const C=i.value,N=C?.status||"idle";if(N==="idle")return"Disponible";if(N==="calling")return"Llamando...";if(C?.isHeld){const V=C.remoteNumber||C.keypadValue||"Unknown";return`En espera - ${s.maskNumber?Wn(V):V}`}return N==="connected"?"Conectado":N.charAt(0).toUpperCase()+N.slice(1)}),q=C=>{if(!C)return"";const N=C.trim(),V=N.startsWith("+"),j=N.replace(/[^\d]/g,"");return V?`+${j}`:j},B=C=>/\d/.test(C)&&/^[+\d\s().*#-]+$/.test(C.trim()),S=z(()=>{const C=i.value,N=C?.remoteNumber||C?.keypadValue,V=C?.remoteDisplayName;if(!N)return"Unknown";const j=q(N),X=s.contacts?.find(Z=>q(Z.number)===j);return X?X.name:V&&V!==N?s.maskNumber&&B(V)?q(V)===j?Wn(N):Wn(V):V:s.maskNumber?Wn(N):N}),_=z(()=>{const C=i.value,N=C?.remoteNumber||C?.keypadValue||"";return s.maskNumber?Wn(N):N});return(C,N)=>(P(),ye("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"?(P(),ye("div",{key:0,class:Xe([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"])},[re("div",nS,[H(f(Cc),{class:"webphone-display__connected-status-icon wp:w-4 wp:h-4"}),N[3]||(N[3]=re("span",{class:"webphone-display__connected-status-text wp:text-sm wp:montserrat wp:font-medium"},"En llamada",-1))]),re("span",sS,He(O.value),1)],2)):Pe("",!0),s.user?(P(),ye("span",{key:1,class:Xe([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"])},[re("div",iS,[H(f(Cc),{class:"webphone-display__user-icon wp:size-6 wp:shrink-0 montserrat"}),Ne(" "+He(s.user),1)]),re("div",{class:Xe(["webphone-display__status-text wp:font-semibold wp:tracking-wider wp:text-sm wp:text-[var(--color-primary)] montserrat",o.value])},He(g.value),3)],2)):Pe("",!0),(i.value?.status||"idle")==="idle"&&s.allowInput?(P(),ye("div",oS,[re("div",{class:"webphone-display__dialer-container wp:relative wp:w-full wp:max-w-80",ref_key:"containerRef",ref:l},[re("div",aS,[H(f(ta),null,{default:R(()=>[H(f(Qo),null,{default:R(()=>[H(f(ra),{"as-child":""},{default:R(()=>[H(f(it),{onClick:N[0]||(N[0]=V=>f(t).toggleKeypad()),variant:"ghost",size:"icon",class:Xe(f(st)("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:R(()=>[f(t).isKeypadVisible?(P(),G(f(_c),{key:0,class:"webphone-display__keypad-toggle-icon wp:size-5"})):(P(),G(f(bc),{key:1,class:"webphone-display__keypad-toggle-icon wp:size-5"}))]),_:1},8,["class"])]),_:1}),H(f(ea),{class:"wp:flex wp:items-center wp:gap-2"},{default:R(()=>[re("span",null,He(f(t).isKeypadVisible?"Ocultar":"Mostrar")+" teclado",1),H(f(sn),null,{default:R(()=>[Ne(He(f(n))+"K",1)]),_:1})]),_:1})]),_:1})]),_:1}),H(f(Ti),{ref_key:"inputRef",ref:u,modelValue:h.value,"onUpdate:modelValue":N[1]||(N[1]=V=>h.value=V),type:"text",inputmode:"tel",pattern:"[0-9*#]*",onFocus:b,onBlur:x,onKeydown:[d,fl(T,["enter"]),fl(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"]),re("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:N[2]||(N[2]=ar(V=>f(t).backspaceKeypad(),["stop"]))},[H(f(Sc),{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"})])]),Wi(re("div",lS,[m.value?(P(),ye("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:ar(v,["prevent"])},[H(f(Lh),{class:"webphone-display__suggestion-icon wp:w-4 wp:h-4 wp:shrink-0"}),re("span",null,"Marcar "+He(h.value),1)],32)):Pe("",!0),(P(!0),ye(Le,null,nr(w.value,V=>(P(),ye("div",{key:V.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:ar(j=>E(V),["prevent"])},[re("div",{class:Xe(f(st)("webphone-display__contact-badge wp:flex wp:items-center wp:justify-center wp:w-6 wp:h-6 wp:rounded-full wp:shrink-0",V.type==="extension"?"wp:bg-blue-100 wp:text-blue-600 wp:dark:bg-blue-900/30 wp:dark:text-blue-400":V.type==="contact"?"wp:bg-emerald-100 wp:text-emerald-600 wp:dark:bg-emerald-900/30 wp:dark:text-emerald-400":V.type==="voicemail"?"wp:bg-purple-100 wp:text-purple-600 wp:dark:bg-purple-900/30 wp:dark:text-purple-400":V.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"))},[V.type==="extension"?(P(),G(f(Nh),{key:0,class:"wp:w-3 wp:h-3"})):V.type==="contact"?(P(),G(f(mc),{key:1,class:"wp:w-3 wp:h-3"})):V.type==="voicemail"?(P(),G(f(Fh),{key:2,class:"wp:w-3 wp:h-3"})):V.type==="tool"?(P(),G(f(Vh),{key:3,class:"wp:w-3 wp:h-3"})):(P(),G(f(mc),{key:4,class:"wp:w-3 wp:h-3"}))],2),re("div",uS,[re("span",dS,He(V.name),1),re("span",fS,He(V.number),1)])],40,cS))),128))],512),[[go,a.value&&h.value&&(w.value.length>0||m.value)]])],512)])):(i.value?.status||"idle")==="connected"?(P(),ye("div",pS,[re("div",hS,[re("div",gS," En llamada con "+He(S.value),1),S.value!==_.value?(P(),ye("div",vS,He(_.value),1)):Pe("",!0)])])):(i.value?.status||"idle")!=="idle"?(P(),ye("div",mS,[re("div",wS,[re("div",yS,[re("div",bS,He(S.value),1),S.value!==_.value?(P(),ye("div",_S,He(_.value),1)):Pe("",!0)]),H(f(ta),null,{default:R(()=>[H(f(Qo),null,{default:R(()=>[H(f(ra),{"as-child":""}),H(f(ea),{class:"wp:flex wp:items-center wp:gap-2"},{default:R(()=>[re("span",null,He(f(t).isKeypadVisible?"Ocultar":"Mostrar")+" teclado",1),H(f(sn),null,{default:R(()=>[Ne(He(f(n))+"K",1)]),_:1})]),_:1})]),_:1})]),_:1})])])):Pe("",!0)],8,rS))}}),CS=SS,xS=ee({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=Qr(e,t);return(n,s)=>(P(),G(f(ob),ge({"data-slot":"dialog"},f(r)),{default:R(i=>[se(n.$slots,"default",pr(sr(i)))]),_:3},16))}}),xc=xS,TS=ee({__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)=>(P(),G(f(Tb),ge({"data-slot":"dialog-overlay"},f(r),{class:f(st)("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:R(()=>[se(n.$slots,"default")]),_:3},16,["class"]))}}),ES=TS,AS=ee({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=Qr(Ut(r,"class"),n);return(i,o)=>(P(),G(f(Eb),null,{default:R(()=>[H(ES),H(f(Cb),ge({"data-slot":"dialog-content"},{...i.$attrs,...f(s)},{class:f(st)("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:R(()=>[se(i.$slots,"default"),e.showCloseButton?(P(),G(f(ab),{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:R(()=>[H(f(wc)),o[0]||(o[0]=re("span",{class:"wp:sr-only"},"Close",-1))]),_:1})):Pe("",!0)]),_:3},16,["class"])]),_:3}))}}),Tc=AS,kS=ee({__name:"DialogFooter",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(r,n)=>(P(),ye("div",{"data-slot":"dialog-footer",class:Xe(f(st)("wp:flex wp:flex-col-reverse wp:gap-2 wp:sm:flex-row wp:sm:justify-end",t.class))},[se(r.$slots,"default")],2))}}),jh=kS,IS=ee({__name:"DialogHeader",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(r,n)=>(P(),ye("div",{"data-slot":"dialog-header",class:Xe(f(st)("wp:flex wp:flex-col wp:gap-2 wp:text-center wp:sm:text-left",t.class))},[se(r.$slots,"default")],2))}}),Ec=IS,RS=ee({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Xr(Ut(t,"class"));return(n,s)=>(P(),G(f(Ab),ge({"data-slot":"dialog-title"},f(r),{class:f(st)("wp:text-lg wp:leading-none wp:font-semibold",t.class)}),{default:R(()=>[se(n.$slots,"default")]),_:3},16,["class"]))}}),Ac=RS,$S=ee({__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=Qr(e,t);return(n,s)=>(P(),G(f(y2),ge({"data-slot":"select"},f(r)),{default:R(i=>[se(n.$slots,"default",pr(sr(i)))]),_:3},16))}}),Uh=$S,PS=ee({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=Qr(Ut(r,"class"),n);return(i,o)=>(P(),G(f(M2),null,{default:R(()=>[H(f(k2),ge({"data-slot":"select-content"},{...i.$attrs,...f(s)},{class:f(st)("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:R(()=>[H(f(BS)),H(f(F2),{class:Xe(f(st)("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:R(()=>[se(i.$slots,"default")]),_:3},8,["class"]),H(f(NS))]),_:3},16,["class"])]),_:3}))}}),zh=PS,DS=ee({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>(P(),G(f(R2),ge({"data-slot":"select-group"},t),{default:R(()=>[se(r.$slots,"default")]),_:3},16))}}),Kh=DS,OS={class:"wp:absolute wp:right-2 wp:flex wp:size-3.5 wp:items-center wp:justify-center"},HS=ee({__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=Xr(Ut(t,"class"));return(n,s)=>(P(),G(f(D2),ge({"data-slot":"select-item"},f(r),{class:f(st)("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:R(()=>[re("span",OS,[H(f(O2),null,{default:R(()=>[se(n.$slots,"indicator-icon",{},()=>[H(f(qh),{class:"wp:size-4"})])]),_:3})]),H(f(H2),null,{default:R(()=>[se(n.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),Wh=HS,MS=ee({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Xr(Ut(t,"class"));return(n,s)=>(P(),G(f(N2),ge({"data-slot":"select-scroll-down-button"},f(r),{class:f(st)("wp:flex wp:cursor-default wp:items-center wp:justify-center wp:py-1",t.class)}),{default:R(()=>[se(n.$slots,"default",{},()=>[H(f(Bh),{class:"wp:size-4"})])]),_:3},16,["class"]))}}),NS=MS,qS=ee({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Xr(Ut(t,"class"));return(n,s)=>(P(),G(f(q2),ge({"data-slot":"select-scroll-up-button"},f(r),{class:f(st)("wp:flex wp:cursor-default wp:items-center wp:justify-center wp:py-1",t.class)}),{default:R(()=>[se(n.$slots,"default",{},()=>[H(f(a_),{class:"wp:size-4"})])]),_:3},16,["class"]))}}),BS=qS,LS=ee({__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=Xr(Ut(t,"class","size"));return(n,s)=>(P(),G(f(B2),ge({"data-slot":"select-trigger","data-size":e.size},f(r),{class:f(st)("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:R(()=>[se(n.$slots,"default"),H(f($2),{"as-child":""},{default:R(()=>[H(f(Bh),{class:"wp:size-4 wp:opacity-50"})]),_:1})]),_:3},16,["data-size","class"]))}}),Gh=LS,FS=ee({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>(P(),G(f(L2),ge({"data-slot":"select-value"},t),{default:R(()=>[se(r.$slots,"default")]),_:3},16))}}),Jh=FS,VS=ee({__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=Qr(Ut(r,"class"),n);return(i,o)=>(P(),G(f(W1),ge({"data-slot":"slider",class:f(st)("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:R(({modelValue:a})=>[H(f(Z1),{"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:R(()=>[H(f(G1),{"data-slot":"slider-range",class:"wp:bg-primary wp:absolute wp:data-[orientation=horizontal]:h-full wp:data-[orientation=vertical]:w-full"})]),_:1}),(P(!0),ye(Le,null,nr(a,(l,u)=>(P(),G(f(Y1),{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"]))}}),Yh=VS,jS=ee({__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)=>(P(),G(f(X1),ge({"data-slot":"label"},f(r),{class:f(st)("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:R(()=>[se(n.$slots,"default")]),_:3},16,["class"]))}}),Ps=jS,US=ee({__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)=>(P(),G(f(j2),ge({"data-slot":"separator"},f(r),{class:f(st)("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"]))}}),zS=US,KS={class:"wp:flex wp:flex-col wp:gap-6 wp:py-4"},WS={class:"wp:flex wp:flex-col wp:gap-2"},GS={class:"wp:flex wp:flex-col wp:gap-2"},JS={class:"wp:flex wp:flex-col wp:gap-4"},YS={class:"wp:flex wp:justify-between"},ZS={class:"wp:text-sm wp:text-muted-foreground"},XS={class:"wp:flex wp:flex-col wp:gap-4"},QS={class:"wp:flex wp:justify-between"},eC={class:"wp:text-sm wp:text-muted-foreground"},tC={class:"wp:flex wp:flex-col wp:gap-3"},rC={class:"wp:grid wp:grid-cols-2 wp:gap-2 wp:text-sm"},nC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},sC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},iC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},oC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},aC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},lC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},cC=ee({__name:"AudioSettingsDialog",props:{visible:{type:Boolean}},emits:["update:visible"],setup(e,{emit:t}){const r=t,n=navigator.platform.toUpperCase().indexOf("MAC")>=0?"⌘":"Ctrl+",{setVolume:s,setOutputDevice:i,setInputDevice:o,setNotificationVolume:a}=Ht("sip"),l=K([]),u=K([]),c=Oo("webphone-input-device",""),d=Oo("webphone-output-device",""),p=Oo("webphone-volume",100),h=Oo("webphone-notification-volume",100),m=async()=>{try{await navigator.mediaDevices.getUserMedia({audio:!0});const b=await navigator.mediaDevices.enumerateDevices();l.value=b.filter(O=>O.kind==="audioinput").map((O,g)=>({deviceId:O.deviceId,label:O.label||`Microphone ${g+1}`})),u.value=b.filter(O=>O.kind==="audiooutput").map((O,g)=>({deviceId:O.deviceId,label:O.label||`Speaker ${g+1}`}));const x=l.value.some(O=>O.deviceId===c.value);(!c.value||!x)&&l.value.length>0&&(c.value=l.value[0]?.deviceId??"");const k=u.value.some(O=>O.deviceId===d.value);(!d.value||!k)&&u.value.length>0&&(d.value=u.value[0]?.deviceId??""),c.value&&o(c.value),d.value&&i(d.value)}catch(b){console.error("Error loading devices",b)}},w=b=>{const x=String(b);c.value=x,o(x)},E=b=>{const x=String(b);d.value=x,i(x)},v=(b,x=35)=>b.length<=x?b:b.substring(0,x)+"...",T=z({get:()=>[p.value],set:b=>{p.value=b[0],s(p.value)}}),y=z({get:()=>[h.value],set:b=>{h.value=b[0],a(h.value)}});return We(()=>{m(),s(p.value),a(h.value)}),(b,x)=>e.visible?(P(),G(f(xc),{key:0,open:e.visible,"onUpdate:open":x[5]||(x[5]=k=>r("update:visible",k))},{default:R(()=>[H(f(Tc),{class:"wp:sm:max-w-sm"},{default:R(()=>[H(f(Ec),null,{default:R(()=>[H(f(Ac),null,{default:R(()=>[...x[6]||(x[6]=[Ne("Audio Settings",-1)])]),_:1})]),_:1}),re("div",KS,[re("div",WS,[H(f(Ps),null,{default:R(()=>[...x[7]||(x[7]=[Ne("Microphone",-1)])]),_:1}),H(f(Uh),{modelValue:f(c),"onUpdate:modelValue":[x[0]||(x[0]=k=>Je(c)?c.value=k:null),w]},{default:R(()=>[H(f(Gh),{class:"wp:w-full"},{default:R(()=>[H(f(Jh),{placeholder:"Select Microphone"})]),_:1}),H(f(zh),null,{default:R(()=>[H(f(Kh),null,{default:R(()=>[(P(!0),ye(Le,null,nr(l.value,k=>(P(),G(f(Wh),{key:k.deviceId,value:k.deviceId,title:k.label},{default:R(()=>[Ne(He(v(k.label)),1)]),_:2},1032,["value","title"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),re("div",GS,[H(f(Ps),null,{default:R(()=>[...x[8]||(x[8]=[Ne("Speaker",-1)])]),_:1}),H(f(Uh),{modelValue:f(d),"onUpdate:modelValue":[x[1]||(x[1]=k=>Je(d)?d.value=k:null),E]},{default:R(()=>[H(f(Gh),{class:"wp:w-full"},{default:R(()=>[H(f(Jh),{placeholder:"Select Speaker"})]),_:1}),H(f(zh),null,{default:R(()=>[H(f(Kh),null,{default:R(()=>[(P(!0),ye(Le,null,nr(u.value,k=>(P(),G(f(Wh),{key:k.deviceId,value:k.deviceId,title:k.label},{default:R(()=>[Ne(He(v(k.label)),1)]),_:2},1032,["value","title"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),re("div",JS,[re("div",YS,[H(f(Ps),null,{default:R(()=>[...x[9]||(x[9]=[Ne("Media Volume",-1)])]),_:1}),re("span",ZS,He(f(p))+"%",1)]),H(f(Yh),{modelValue:T.value,"onUpdate:modelValue":x[2]||(x[2]=k=>T.value=k),max:100,step:1},null,8,["modelValue"])]),re("div",XS,[re("div",QS,[H(f(Ps),null,{default:R(()=>[...x[10]||(x[10]=[Ne("Notification Volume",-1)])]),_:1}),re("span",eC,He(f(h))+"%",1)]),H(f(Yh),{modelValue:y.value,"onUpdate:modelValue":x[3]||(x[3]=k=>y.value=k),max:100,step:1},null,8,["modelValue"])]),H(f(zS)),re("div",tC,[H(f(Ps),{class:"wp:text-base"},{default:R(()=>[...x[11]||(x[11]=[Ne("Atajos de teclado",-1)])]),_:1}),re("div",rC,[re("div",nC,[x[12]||(x[12]=re("span",{class:"wp:text-muted-foreground"},"Historial",-1)),H(f(sn),null,{default:R(()=>[Ne(He(f(n))+"H",1)]),_:1})]),re("div",sC,[x[13]||(x[13]=re("span",{class:"wp:text-muted-foreground"},"Configuración",-1)),H(f(sn),null,{default:R(()=>[Ne(He(f(n))+",",1)]),_:1})]),re("div",iC,[x[14]||(x[14]=re("span",{class:"wp:text-muted-foreground"},"Teclado",-1)),H(f(sn),null,{default:R(()=>[Ne(He(f(n))+"K",1)]),_:1})]),re("div",oC,[x[15]||(x[15]=re("span",{class:"wp:text-muted-foreground"},"Línea 1",-1)),H(f(sn),null,{default:R(()=>[Ne(He(f(n))+"1",1)]),_:1})]),re("div",aC,[x[16]||(x[16]=re("span",{class:"wp:text-muted-foreground"},"Línea 2",-1)),H(f(sn),null,{default:R(()=>[Ne(He(f(n))+"2",1)]),_:1})]),re("div",lC,[x[17]||(x[17]=re("span",{class:"wp:text-muted-foreground"},"Línea 3",-1)),H(f(sn),null,{default:R(()=>[Ne(He(f(n))+"3",1)]),_:1})])])])]),H(f(jh),null,{default:R(()=>[H(f(it),{variant:"secondary",onClick:x[4]||(x[4]=k=>r("update:visible",!1))},{default:R(()=>[...x[18]||(x[18]=[Ne("Close",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])):Pe("",!0)}}),uC=cC,dC=ee({__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)=>(P(),G(f(d2),ge({"data-slot":"scroll-area-scrollbar"},f(r),{class:f(st)("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:R(()=>[H(f(p2),{"data-slot":"scroll-area-thumb",class:"wp:bg-border wp:relative wp:flex-1 wp:rounded-full"})]),_:1},16,["class"]))}}),fC=dC,pC=ee({__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)=>(P(),G(f(e2),ge({"data-slot":"scroll-area"},f(r),{class:f(st)("wp:relative",t.class)}),{default:R(()=>[H(f(h2),{"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:R(()=>[se(n.$slots,"default")]),_:3}),H(fC),H(f(r2))]),_:3},16,["class"]))}}),Zh=pC,hC={class:"wp:relative wp:my-2"},gC={class:"wp:flex wp:flex-col wp:gap-2"},vC=["onClick"],mC={class:"wp:flex wp:items-center wp:gap-3"},wC={class:"wp:flex wp:flex-col"},yC={class:"wp:text-sm wp:font-medium"},bC={class:"wp:text-[10px] wp:text-muted-foreground"},_C={class:"wp:flex wp:flex-col wp:items-end"},SC={key:0,class:"wp:text-xs wp:font-mono wp:text-muted-foreground"},CC={class:"wp:text-[10px] wp:text-muted-foreground wp:capitalize"},xC={key:0,class:"wp:text-center wp:text-muted-foreground wp:py-8"},TC={key:1,class:"wp:text-center wp:text-muted-foreground wp:py-8"},EC=ee({__name:"CallHistoryDialog",props:{visible:{type:Boolean},contacts:{}},emits:["update:visible","call"],setup(e,{emit:t}){const r=e,n=t,s=Ht("webphone"),i=K(""),o=p=>{if(!r.contacts)return p;const h=r.contacts.find(m=>m.number===p);return h?h.name:p},a=z(()=>{if(!i.value)return s.callHistory;const p=i.value.toLowerCase();return s.callHistory.filter(h=>{const m=o(h.number).toLowerCase(),w=h.number.toLowerCase();return m.includes(p)||w.includes(p)})}),l=p=>p===0?"":`${Math.floor(p/60)}:${(p%60).toString().padStart(2,"0")}`,u=p=>p.direction==="incoming"?p.status==="missed"?f_:d_:p_,c=p=>p.status==="missed"?"wp:text-red-500":p.direction==="incoming"?"wp:text-green-500":"wp:text-blue-500",d=p=>{n("update:visible",!1),n("call",p)};return(p,h)=>e.visible?(P(),G(f(xc),{key:0,open:e.visible,"onUpdate:open":h[1]||(h[1]=m=>n("update:visible",m))},{default:R(()=>[H(f(Tc),{class:"wp:sm:max-w-sm"},{default:R(()=>[H(f(Ec),null,{default:R(()=>[H(f(Ac),null,{default:R(()=>[...h[2]||(h[2]=[Ne("Call History",-1)])]),_:1})]),_:1}),re("div",hC,[H(f(v_),{class:"wp:absolute wp:left-2 wp:top-2.5 wp:h-4 wp:w-4 wp:text-muted-foreground"}),H(f(Ti),{modelValue:i.value,"onUpdate:modelValue":h[0]||(h[0]=m=>i.value=m),placeholder:"Search history...",class:"wp:pl-8"},null,8,["modelValue"])]),H(f(Zh),{class:"wp:h-[60vh] wp:pr-4"},{default:R(()=>[re("div",gC,[(P(!0),ye(Le,null,nr(a.value,m=>(P(),ye("div",{key:m.id,class:"wp:flex wp:items-center wp:justify-between wp:p-2 wp:rounded-lg wp:hover:bg-accent wp:cursor-pointer wp:transition-colors",onClick:w=>d(m.number)},[re("div",mC,[(P(),G(Qs(u(m)),{class:Xe([c(m),"wp:w-4 wp:h-4"])},null,8,["class"])),re("div",wC,[re("span",yC,He(o(m.number)),1),re("span",bC,He(new Date(m.startTime).toLocaleString()),1)])]),re("div",_C,[m.duration>0?(P(),ye("span",SC,He(l(m.duration)),1)):Pe("",!0),re("span",CC,He(m.status),1)])],8,vC))),128)),f(s).callHistory.length===0?(P(),ye("div",xC," No call history ")):a.value.length===0?(P(),ye("div",TC," No results found ")):Pe("",!0)])]),_:1})]),_:1})]),_:1},8,["open"])):Pe("",!0)}}),AC=EC,kC={class:"wp:grid wp:gap-4 wp:py-4"},IC={class:"wp:grid wp:gap-2 wp:relative"},RC={class:"wp:relative"},$C={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"},PC={class:"wp:p-1"},DC=["onClick"],OC={class:"wp:flex wp:flex-col wp:min-w-0 wp:flex-1"},HC={class:"wp:font-medium wp:text-sm wp:truncate"},MC={class:"wp:text-xs wp:text-muted-foreground"},NC=ee({__name:"TransferDialog",props:{visible:{type:Boolean},contacts:{default:()=>[]}},emits:["update:visible","transfer"],setup(e,{emit:t}){const r=e,n=t,s=K(""),i=K(!1),o=K(null);Re(()=>r.visible,p=>{p&&(s.value="",i.value=!1)}),Re(s,p=>{i.value=p.length>0&&a.value.length>0});const a=z(()=>{if(!s.value)return r.contacts;const p=s.value.toLowerCase();return r.contacts.filter(h=>h.name.toLowerCase().includes(p)||h.number.includes(p))}),l=p=>{s.value=p.number,i.value=!1},u=()=>{s.value="",i.value=!1,o.value?.focus()},c=p=>{const h=s.value.trim();h&&(n("transfer",h,p),n("update:visible",!1),s.value="",i.value=!1)},d=p=>{p.key==="Enter"&&s.value.trim()?(p.preventDefault(),c("blind")):p.key==="Escape"&&(i.value=!1)};return(p,h)=>e.visible?(P(),G(f(xc),{key:0,open:e.visible,"onUpdate:open":h[5]||(h[5]=m=>n("update:visible",m))},{default:R(()=>[H(f(Tc),{class:"wp:sm:max-w-md"},{default:R(()=>[H(f(Ec),null,{default:R(()=>[H(f(Ac),null,{default:R(()=>[...h[6]||(h[6]=[Ne("Transferir Llamada",-1)])]),_:1})]),_:1}),re("div",kC,[re("div",IC,[H(f(Ps),{for:"transfer-input"},{default:R(()=>[...h[7]||(h[7]=[Ne("Número o Contacto",-1)])]),_:1}),re("div",RC,[H(f(Ti),{id:"transfer-input",ref_key:"inputRef",ref:o,modelValue:s.value,"onUpdate:modelValue":h[0]||(h[0]=m=>s.value=m),type:"text",placeholder:"Escribe un número o busca un contacto...",class:"wp:pr-8",onKeydown:d,onFocus:h[1]||(h[1]=m=>i.value=s.value.length>0&&a.value.length>0),autocomplete:"off"},null,8,["modelValue"]),s.value?(P(),G(f(it),{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:u},{default:R(()=>[H(f(wc),{class:"wp:h-4 wp:w-4"})]),_:1})):Pe("",!0)]),i.value&&a.value.length>0?(P(),ye("div",$C,[H(f(Zh),{class:"wp:max-h-60"},{default:R(()=>[re("div",PC,[(P(!0),ye(Le,null,nr(a.value,m=>(P(),ye("div",{key:m.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:w=>l(m)},[m.type?(P(),ye("div",{key:0,class:Xe(f(st)("wp:flex wp:items-center wp:justify-center wp:w-8 wp:h-8 wp:rounded-full wp:shrink-0",m.type==="extension"?"wp:bg-blue-100 wp:text-blue-600 wp:dark:bg-blue-900/30 wp:dark:text-blue-400":m.type==="contact"?"wp:bg-emerald-100 wp:text-emerald-600 wp:dark:bg-emerald-900/30 wp:dark:text-emerald-400":m.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"))},[m.type==="extension"?(P(),G(f(Nh),{key:0,class:"wp:w-4 wp:h-4"})):m.type==="contact"?(P(),G(f(mc),{key:1,class:"wp:w-4 wp:h-4"})):m.type==="voicemail"?(P(),G(f(Fh),{key:2,class:"wp:w-4 wp:h-4"})):(P(),G(f(Vh),{key:3,class:"wp:w-4 wp:h-4"}))],2)):Pe("",!0),re("div",OC,[re("span",HC,He(m.name),1),re("span",MC,He(m.number),1)])],8,DC))),128))])]),_:1})])):Pe("",!0),h[8]||(h[8]=re("p",{class:"wp:text-xs wp:text-muted-foreground"}," Presiona Enter para transferir directamente ",-1))])]),H(f(jh),{class:"wp:flex-col wp:gap-2 sm:wp:flex-row"},{default:R(()=>[H(f(it),{variant:"secondary",onClick:h[2]||(h[2]=m=>n("update:visible",!1)),class:"wp:w-full sm:wp:w-auto"},{default:R(()=>[...h[9]||(h[9]=[Ne(" Cancelar ",-1)])]),_:1}),H(f(it),{onClick:h[3]||(h[3]=m=>c("blind")),disabled:!s.value.trim(),variant:"outline",class:"wp:w-full sm:wp:flex-1"},{default:R(()=>[...h[10]||(h[10]=[Ne(" Transferencia Ciega ",-1)])]),_:1},8,["disabled"]),H(f(it),{onClick:h[4]||(h[4]=m=>c("attended")),disabled:!s.value.trim(),class:"wp:w-full sm:wp:flex-1"},{default:R(()=>[...h[11]||(h[11]=[Ne(" Con Consulta ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["open"])):Pe("",!0)}}),qC=NC,BC=ee({__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=K(!1),o=K(!1),a=K(!1),l=K(null),u=K(0),c=K(null);let d=null,p=null;We(()=>{i.value="documentPictureInPicture"in window,document.addEventListener("visibilitychange",w),window.addEventListener("blur",E)}),Mt(()=>{document.removeEventListener("visibilitychange",w),window.removeEventListener("blur",E),p&&(clearTimeout(p),p=null),T(),j()});const h=()=>{const Z=n.callStatus!=="idle",le=document.hidden||!document.hasFocus();return n.autoOpenOnBlur!==!1&&Z&&i.value&&le&&!o.value&&!a.value},m=()=>{h()&&(p&&clearTimeout(p),p=setTimeout(()=>{h()&&V()},120))},w=()=>{m()},E=()=>{m()},v=()=>{c.value||(u.value=0,c.value=setInterval(()=>{u.value++},1e3))},T=()=>{c.value&&(clearInterval(c.value),c.value=null)},y=Z=>{const le=Math.floor(Z/60),W=Z%60;return`${le.toString().padStart(2,"0")}:${W.toString().padStart(2,"0")}`};Re(()=>n.callStatus,(Z,le)=>{Z==="connected"&&le!=="connected"?v():Z==="idle"&&le!=="idle"&&(T(),o.value&&j())},{immediate:!0}),Re(()=>n.isConnected,Z=>{!Z&&o.value&&(T(),j())}),Re(()=>[n.callStatus,n.isMuted,n.isHeld],()=>{l.value&&(S(l.value.document),q(l.value.document))});const b=z(()=>i.value&&n.isConnected),x={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=Z=>{const le=Z.createElement("style");le.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
- `,Y.head.appendChild(le)},O=()=>{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=Y=>{const le=Y.querySelector(".pip-status-text");le&&(le.textContent=O(),le.className=`pip-status-text ${g()}`)},N=Y=>{const le=Y.createElement("div");return le.className="pip-wrapper",n.hasVideo?le.innerHTML=`
282
+ `,Z.head.appendChild(le)},O=()=>{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""}},q=Z=>{const le=Z.querySelector(".pip-status-text");le&&(le.textContent=O(),le.className=`pip-status-text ${g()}`)},B=Z=>{const le=Z.createElement("div");return le.className="pip-wrapper",n.hasVideo?le.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">
@@ -287,7 +287,7 @@ Duration=160`,contentType:"application/dtmf-relay",contentDisposition:"signal"}}
287
287
  </div>
288
288
  <div class="pip-overlay">
289
289
  <span class="pip-name">${n.remoteNumber||"Llamada"}</span>
290
- <span id="pip-timer" class="pip-timer">${b(u.value)}</span>
290
+ <span id="pip-timer" class="pip-timer">${y(u.value)}</span>
291
291
  </div>
292
292
  </div>
293
293
  <div class="pip-actions" id="pip-actions"></div>
@@ -295,7 +295,7 @@ Duration=160`,contentType:"application/dtmf-relay",contentDisposition:"signal"}}
295
295
  <div class="pip-audio-area">
296
296
  <div class="pip-caller-name">${n.remoteNumber||"Llamada"}</div>
297
297
  <div class="pip-status-text ${g()}">${O()}</div>
298
- <div class="pip-duration" id="pip-timer">${b(u.value)}</div>
298
+ <div class="pip-duration" id="pip-timer">${y(u.value)}</div>
299
299
  </div>
300
300
  <div class="pip-actions" id="pip-actions"></div>
301
- `,le},S=Y=>{const le=Y.getElementById("pip-actions");if(le){if(le.innerHTML="",n.callStatus==="incoming"){if(n.hasVideo){const fe=Y.createElement("button");fe.className="pip-btn pip-btn-video",fe.title="Contestar con Video",fe.innerHTML=C.video,fe.onclick=()=>s("answer",!0),le.appendChild(fe)}const K=Y.createElement("button");K.className="pip-btn pip-btn-answer",K.title="Contestar",K.innerHTML=C.phone,K.onclick=()=>s("answer",!1),le.appendChild(K);const ae=Y.createElement("button");ae.className="pip-btn pip-btn-hangup",ae.title="Rechazar",ae.innerHTML=C.phoneOff,ae.onclick=()=>{s("hangup"),z()},le.appendChild(ae)}else if(n.callStatus==="connected"){const K=Y.createElement("button");K.className=`pip-btn pip-btn-mute ${n.isMuted?"active":""}`,K.title=n.isMuted?"Activar micrófono":"Silenciar",K.innerHTML=n.isMuted?C.micOff:C.mic,K.onclick=()=>s("toggleMute"),le.appendChild(K);const ae=Y.createElement("button");ae.className=`pip-btn pip-btn-hold ${n.isHeld?"active":""}`,ae.title=n.isHeld?"Reanudar":"Pausar",ae.innerHTML=n.isHeld?C.play:C.pause,ae.onclick=()=>s("toggleHold"),le.appendChild(ae);const fe=Y.createElement("button");fe.className="pip-btn pip-btn-transfer",fe.title="Transferir",fe.innerHTML=C.transfer,fe.onclick=()=>s("transfer"),le.appendChild(fe);const Ce=Y.createElement("button");Ce.className="pip-btn pip-btn-hangup",Ce.title="Colgar",Ce.innerHTML=C.phoneOff,Ce.onclick=()=>{s("hangup"),z()},le.appendChild(Ce)}else if(n.callStatus==="calling"){const K=Y.createElement("button");K.className="pip-btn pip-btn-hangup",K.title="Cancelar",K.innerHTML=C.phoneOff,K.onclick=()=>{s("hangup"),z()},le.appendChild(K)}}},w=Y=>{setTimeout(()=>{const le=Y.getElementById("pip-remote-video"),K=Y.getElementById("pip-local-video");le&&n.remoteStream&&(le.srcObject=n.remoteStream,le.play().catch(()=>{})),K&&n.localStream&&(K.srcObject=n.localStream,K.play().catch(()=>{}))},50)},E=Y=>{const le=Y.getElementById("pip-timer");le&&(d=setInterval(()=>{le.textContent=b(u.value)},1e3))},q=()=>{d&&(clearInterval(d),d=null)},Q=async()=>{if(!(!i.value||o.value||a.value)){a.value=!0;try{const Y=n.hasVideo?340:280,le=n.hasVideo?280:200,K=await window.documentPictureInPicture.requestWindow({width:Y,height:le,preferInitialWindowPlacement:!0});l.value=K,o.value=!0,s("update:active",!0),k(K.document);const ae=N(K.document);K.document.body.appendChild(ae),n.hasVideo&&w(K.document),S(K.document),E(K.document),K.addEventListener("pagehide",()=>{q(),o.value=!1,l.value=null,s("update:active",!1)})}catch(Y){console.error("[DocumentPip] Error:",Y)}finally{a.value=!1}}},z=()=>{q(),l.value&&(l.value.close(),l.value=null,o.value=!1,s("update:active",!1))};return t({open:Q,close:z,toggle:()=>{o.value?z():Q()},isActive:o,isSupported:i,canUsePip:_}),(Y,le)=>se(Y.$slots,"default")}}),LC=BC,FC=["data-mode","data-call-status","data-network-status"],VC={key:0,class:"webphone__video-area wp:relative wp:w-full wp:aspect-video wp:bg-black"},jC={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"},UC={class:"webphone__body wp:flex wp:flex-col wp:gap-1 wp:space-y-2"},zC={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"},KC={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"},WC={class:"wp:flex wp:gap-0.5"},GC=["aria-checked","disabled","title","data-channel-id","data-state","data-call-state","onClick"],JC={class:"webphone__display wp:py-1"},YC=["data-visible"],ZC={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"},XC={key:2,class:"webphone__footer wp:flex wp:flex-col wp:items-center wp:p-2 wp:gap-0"},QC=ee({__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},earlyMedia:{type:Boolean,default:!1},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=j(()=>{if(s.wsUrl)return s.wsUrl;if(s.host)return`wss://${s.host}/ws`}),a=j(()=>!o.value||!s.extension?"":`${o.value}::${s.extension}`),l=a.value?n.get(a.value):void 0,u=b0({server:o.value,extension:s.extension,initialConnected:l,initialKeypadVisible:s.initialKeypadVisible}),c=qr(u),d=Xw(u,{onCallContext:D=>i("call-context",D),onCallState:D=>i("call-state",D),onMediaReady:D=>i("media-ready",D)}),{initUserAgent:p,switchChannel:h,remoteStream:m,localStream:y}=d;Mn("webphone",c),Mn("sip",d),t({stop:d.stop}),rt(()=>{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 T=U(!1),v=U(!1),x=U(!1),b=U(null),_=U(null),C=U(null),k=navigator.platform.toUpperCase().indexOf("MAC")>=0?"⌘":"Ctrl+",O=j(()=>s.mode==="webcall"),g=U(0),B=D=>!!D&&D.getVideoTracks().length>0;Re(()=>c.callStatus,D=>{if(D==="idle"&&!c.isKeypadVisible){c.toggleKeypad();return}D!=="idle"&&c.isKeypadVisible&&c.toggleKeypad()});const N=j(()=>c.channels.find(D=>D.id===c.activeChannelId)??null),S=D=>{if(!D)return"";const L=D.trim(),Z=L.startsWith("+"),me=L.replace(/[^\d]/g,"");return Z?`+${me}`:me},w=j(()=>{const D=N.value?.remoteNumber||c.remoteNumber,L=S(D),Z=s.contacts.find(me=>S(me.number)===L);return Z?.name?Z.name:s.maskNumber&&D?wi(D):D||"Llamada"}),E=j(()=>{const D=N.value?.remoteNumber||c.remoteNumber;return s.maskNumber?wi(D):D}),q=j(()=>(g.value,!!N.value?.hasVideo||B(m.value)||B(y.value))),{isOnline:Q}=By(),z=j(()=>!Q.value),X=U(null),Y=U(!1),le=j(()=>s.enablePictureInPicture),K=()=>{le.value&&X.value?.toggle()},ae=async(D,L)=>{try{L==="blind"?await d.transferCall(D):await d.startAttendedTransfer(D)}catch(Z){console.error("[WebPhone] Transfer error:",Z),alert(Z instanceof Error?Z.message:"Transfer failed. Please try again.")}},fe=async()=>{try{await d.completeAttendedTransfer()}catch(D){console.error("[WebPhone] Complete transfer error:",D),alert(D instanceof Error?D.message:"Failed to complete transfer.")}},Ce=async()=>{try{await d.cancelAttendedTransfer()}catch(D){console.error("[WebPhone] Cancel transfer error:",D),alert(D instanceof Error?D.message:"Failed to cancel transfer.")}},Oe=D=>{c.keypadValue=D,d.makeCall(D)},Te=D=>{if(s.onAnswer){s.onAnswer(D);return}d.answerCall(D)},ke=()=>{if(s.onHangup){s.onHangup();return}d.hangupCall()},Ze=()=>{if(s.onReject){s.onReject();return}d.hangupCall()},ut=()=>{x.value=!0,X.value?.close(),window.focus()},Ve=()=>{if(!le.value)return!1;const D=c.callStatus!=="idle",L=document.hidden||!document.hasFocus();return D&&L&&!Y.value},Qe=()=>{window.setTimeout(()=>{Ve()&&X.value?.open()},150)};rt(()=>{_.value&&(Y.value||!m.value?_.value.srcObject=null:_.value.srcObject=m.value),C.value&&(Y.value||!y.value?C.value.srcObject=null:C.value.srcObject=y.value)});const dt=D=>{if(!D||typeof D.addEventListener!="function"||typeof D.removeEventListener!="function")return()=>{};const L=()=>{g.value+=1};return D.addEventListener("addtrack",L),D.addEventListener("removetrack",L),()=>{D.removeEventListener("addtrack",L),D.removeEventListener("removetrack",L)}};Re(m,(D,L,Z)=>{g.value+=1,Z(dt(D))},{immediate:!0}),Re(y,(D,L,Z)=>{g.value+=1,Z(dt(D))},{immediate:!0});const gt=["button","a","input","textarea","select","label","video",'[role="button"]','[role="radio"]',"[data-no-drag]"].join(", "),A=()=>{const D=window.innerWidth<640,L=window.innerWidth<1024;let Z=360;return D?Z=window.innerWidth*.9:L&&(Z=340),{x:Math.max(0,(window.innerWidth-Z)/2),y:D?30:80}},{x:$,y:J,style:oe}=qy(b,{initialValue:j(()=>{const D=A();return{x:s.position.x??D.x,y:s.position.y??D.y}}).value,preventDefault:!0,onStart:(D,L)=>{const Z=L.target;if(Z instanceof HTMLElement&&Z.closest(gt))return!1}});Re(()=>s.position,D=>{const L=A();$.value=D.x??L.x,J.value=D.y??L.y},{deep:!0});const ne=[{label:"Canal 1",value:0},{label:"Canal 2",value:1},{label:"Canal 3",value:2}],te=U(!1),de=j({get:()=>c.activeChannelId.toString(),set:async D=>{if(!z.value&&D&&!te.value){te.value=!0;try{await h(parseInt(D))}finally{te.value=!1}}}}),ue=D=>{const L=c.channels.find(Z=>Z.id===D);return L?L.status==="connected"||L.status==="calling"||L.status==="incoming":!1},ce=D=>{const L=c.channels.find(Z=>Z.id===D);return L?L.isHeld||L.status==="held":!1},ie=D=>{z.value||(de.value=D.toString())},Se=D=>{if(!z.value&&((D.metaKey||D.ctrlKey)&&D.key.toLowerCase()==="h"&&(D.preventDefault(),v.value=!0),(D.metaKey||D.ctrlKey)&&D.key===","&&(D.preventDefault(),T.value=!0),(D.metaKey||D.ctrlKey)&&D.key.toLowerCase()==="k"&&(D.preventDefault(),c.toggleKeypad()),(D.metaKey||D.ctrlKey)&&["1","2","3"].includes(D.key))){D.preventDefault();const L=parseInt(D.key)-1;te.value||(te.value=!0,h(L).finally(()=>{te.value=!1}))}};Re(()=>c.callStatus,()=>{Ve()&&Qe()}),Re(()=>c.isConnected,D=>{a.value&&n.set(a.value,D)},{immediate:!0}),Re(le,D=>{!D&&Y.value&&X.value?.close()});const he=U(!1),I=async()=>{he.value||z.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}),d.extension.value&&(he.value=!0,s.mode==="webcall"&&s.to&&d.makeCall(s.to)))},F=()=>I(),M=async()=>{await d.stop(),he.value=!1};return Mn("webphoneRegistration",{isConnected:j(()=>c.isConnected),register:F,unregister:M}),We(async()=>{window.addEventListener("keydown",Se),document.addEventListener("visibilitychange",Qe),window.addEventListener("blur",Qe),window.addEventListener("pagehide",Qe),!(s.mode==="webcall"&&(!s.to||!s.logo))&&await I()}),Re(()=>Q.value,async D=>{D&&await I()}),Mt(()=>{d.stop(),window.removeEventListener("keydown",Se),document.removeEventListener("visibilitychange",Qe),window.removeEventListener("blur",Qe),window.removeEventListener("pagehide",Qe)}),(D,L)=>(P(),ye(Le,null,[re("div",{ref_key:"phoneRef",ref:b,style:mt(f(oe)),class:Xe(["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",z.value?"wp:opacity-70":""]),"data-mode":s.mode,"data-call-status":c.callStatus,"data-network-status":z.value?"offline":"online"},[q.value&&!Y.value?(P(),ye("div",VC,[re("video",{ref_key:"remoteVideoRef",ref:_,autoplay:"",playsinline:"",class:"webphone__video-remote wp:w-full wp:h-full wp:object-cover"},null,512),re("div",jC,[re("video",{ref_key:"localVideoRef",ref:C,autoplay:"",playsinline:"",muted:"",class:"webphone__video-local wp:w-full wp:h-full wp:object-cover"},null,512)])])):Pe("",!0),re("div",UC,[O.value?Pe("",!0):(P(),ye("div",zC,[re("div",KC,[re("div",WC,[(P(),ye(Le,null,nr(ne,Z=>re("button",{key:Z.value,type:"button",role:"radio","aria-checked":de.value===Z.value.toString(),disabled:z.value,title:`${Z.label} (${f(k)}${Z.value+1})`,class:Xe(["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(Z.value)?"wp:bg-status-hold/12 hover:wp:bg-status-hold/18":ue(Z.value)?"wp:bg-[var(--color-red)]/12 hover:wp:bg-[var(--color-red)]/18":de.value===Z.value.toString()?"wp:bg-[var(--p-primary-color)]/12":"wp:hover:bg-neutral-100 wp:dark:hover:bg-neutral-800/80"]),"data-channel-id":Z.value,"data-state":de.value===Z.value.toString()?"active":"idle","data-call-state":ce(Z.value)?"held":ue(Z.value)?"busy":"available",onClick:me=>ie(Z.value)},[H(f(Cc),{class:Xe(["webphone__channel-icon wp:size-3 wp:shrink-0",ce(Z.value)?"wp:text-status-hold":ue(Z.value)?"wp:text-[var(--color-red)]":de.value===Z.value.toString()?"wp:text-[var(--p-primary-color)]":"wp:text-neutral-400"]),"stroke-width":1.8},null,8,["class"]),re("span",{class:Xe(["webphone__channel-label wp:text-[11px] wp:leading-none manrope wp:font-bold",ce(Z.value)?"wp:text-status-hold":ue(Z.value)?"wp:text-[var(--color-red)]":de.value===Z.value.toString()?"wp:text-[var(--p-primary-color)]":"wp:text-neutral-500 wp:dark:text-neutral-400"])},He(Z.label),3)],10,GC)),64))]),H(f(ta),null,{default:R(()=>[H(f(Qo),null,{default:R(()=>[H(f(ra),{"as-child":""},{default:R(()=>[H(f(it),{variant:"ghost",size:"icon",class:Xe(["wp:h-8 wp:w-8 wp:rounded-full",Y.value?"wp:text-primary":""]),title:"Picture-in-Picture",onClick:K},{default:R(()=>[H(f(h_),{class:"wp:w-4 wp:h-4 wp:text-[var(--color-settings)]"})]),_:1},8,["class"])]),_:1}),H(f(ea),{class:"wp:flex wp:items-center wp:gap-2"},{default:R(()=>[...L[8]||(L[8]=[re("span",null,"Picture-in-Picture",-1)])]),_:1})]),_:1})]),_:1}),H(f(ta),null,{default:R(()=>[H(f(Qo),null,{default:R(()=>[H(f(ra),{"as-child":""},{default:R(()=>[H(f(it),{variant:"ghost",size:"icon",class:"wp:h-8 wp:w-8 wp:rounded-full",onClick:L[0]||(L[0]=Z=>T.value=!0)},{default:R(()=>[H(f(m_),{class:"wp:w-4 wp:h-4 wp:text-[var(--color-settings)]"})]),_:1})]),_:1}),H(f(ea),{class:"wp:flex wp:items-center wp:gap-2"},{default:R(()=>[L[9]||(L[9]=re("span",null,"Configuración",-1)),H(f(sn),null,{default:R(()=>[Ne(He(f(k))+",",1)]),_:1})]),_:1})]),_:1})]),_:1})])])),re("div",JC,[(P(!0),ye(Le,null,nr(c.channels,Z=>Wi((P(),W(CS,{key:Z.id,"channel-id":Z.id,"allow-input":!O.value,"is-web-call":O.value,"is-online":f(Q),contacts:s.contacts,user:s.extension,"mask-number":s.maskNumber},null,8,["channel-id","allow-input","is-web-call","is-online","contacts","user","mask-number"])),[[go,Z.id===c.activeChannelId]])),128))]),re("div",{class:Xe(["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"},[H(vc)],10,YC),H(G_,{class:"webphone__actions",style:mt(z.value?"pointer-events: none;":void 0),destination:O.value?s.to:void 0,"is-video":s.mode==="video","on-answer":s.onAnswer,"on-hangup":s.onHangup,"on-reject":s.onReject,onTransfer:L[1]||(L[1]=Z=>x.value=!0),onCompleteTransfer:fe,onCancelTransfer:Ce},null,8,["style","destination","is-video","on-answer","on-hangup","on-reject"])]),z.value?(P(),ye("div",ZC,[...L[10]||(L[10]=[re("span",{class:"wp:text-sm wp:font-semibold wp:text-status-disconnected"},"Sin internet",-1)])])):Pe("",!0),O.value?(P(),ye("div",XC,[...L[11]||(L[11]=[re("div",{class:"webphone__footer-label wp:text-[10px] wp:text-primary"},"Powered By",-1),re("div",{class:"webphone__footer-content wp:flex wp:items-center wp:gap-2"},[re("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)])])):Pe("",!0)],14,FC),H(uC,{visible:T.value,"onUpdate:visible":L[2]||(L[2]=Z=>T.value=Z)},null,8,["visible"]),H(AC,{visible:v.value,"onUpdate:visible":L[3]||(L[3]=Z=>v.value=Z),contacts:s.contacts,onCall:Oe},null,8,["visible","contacts"]),H(qC,{visible:x.value,"onUpdate:visible":L[4]||(L[4]=Z=>x.value=Z),contacts:s.contacts,onTransfer:ae},null,8,["visible","contacts"]),H(LC,{ref_key:"documentPipRef",ref:X,active:Y.value,"onUpdate:active":L[5]||(L[5]=Z=>Y.value=Z),"auto-open-on-blur":le.value,"is-connected":c.isConnected,"remote-number":E.value,"caller-name":w.value,"has-video":q.value??!1,"remote-stream":f(m),"local-stream":f(y),destination:O.value?s.to:void 0,"is-video":s.mode==="video","call-status":c.callStatus,"is-muted":c.isMuted,"is-held":c.isHeld,onTransfer:ut,onTransferRequest:ae,onHangup:ke,onReject:Ze,onAnswer:Te,onToggleMute:L[6]||(L[6]=Z=>f(d).toggleMute()),onToggleHold:L[7]||(L[7]=Z=>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))}}),ex=(e,t)=>{const r=e.__vccOpts||e;for(const[n,s]of t)r[n]=s;return r},tx=ex(QC,[["__scopeId","data-v-de97971c"]]),rx=cl({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 ir(tx,{...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",rx)})();
301
+ `,le},S=Z=>{const le=Z.getElementById("pip-actions");if(le){if(le.innerHTML="",n.callStatus==="incoming"){if(n.hasVideo){const fe=Z.createElement("button");fe.className="pip-btn pip-btn-video",fe.title="Contestar con Video",fe.innerHTML=x.video,fe.onclick=()=>s("answer",!0),le.appendChild(fe)}const W=Z.createElement("button");W.className="pip-btn pip-btn-answer",W.title="Contestar",W.innerHTML=x.phone,W.onclick=()=>s("answer",!1),le.appendChild(W);const ae=Z.createElement("button");ae.className="pip-btn pip-btn-hangup",ae.title="Rechazar",ae.innerHTML=x.phoneOff,ae.onclick=()=>{s("hangup"),j()},le.appendChild(ae)}else if(n.callStatus==="connected"){const W=Z.createElement("button");W.className=`pip-btn pip-btn-mute ${n.isMuted?"active":""}`,W.title=n.isMuted?"Activar micrófono":"Silenciar",W.innerHTML=n.isMuted?x.micOff:x.mic,W.onclick=()=>s("toggleMute"),le.appendChild(W);const ae=Z.createElement("button");ae.className=`pip-btn pip-btn-hold ${n.isHeld?"active":""}`,ae.title=n.isHeld?"Reanudar":"Pausar",ae.innerHTML=n.isHeld?x.play:x.pause,ae.onclick=()=>s("toggleHold"),le.appendChild(ae);const fe=Z.createElement("button");fe.className="pip-btn pip-btn-transfer",fe.title="Transferir",fe.innerHTML=x.transfer,fe.onclick=()=>s("transfer"),le.appendChild(fe);const Ce=Z.createElement("button");Ce.className="pip-btn pip-btn-hangup",Ce.title="Colgar",Ce.innerHTML=x.phoneOff,Ce.onclick=()=>{s("hangup"),j()},le.appendChild(Ce)}else if(n.callStatus==="calling"){const W=Z.createElement("button");W.className="pip-btn pip-btn-hangup",W.title="Cancelar",W.innerHTML=x.phoneOff,W.onclick=()=>{s("hangup"),j()},le.appendChild(W)}}},_=Z=>{setTimeout(()=>{const le=Z.getElementById("pip-remote-video"),W=Z.getElementById("pip-local-video");le&&n.remoteStream&&(le.srcObject=n.remoteStream,le.play().catch(()=>{})),W&&n.localStream&&(W.srcObject=n.localStream,W.play().catch(()=>{}))},50)},C=Z=>{const le=Z.getElementById("pip-timer");le&&(d=setInterval(()=>{le.textContent=y(u.value)},1e3))},N=()=>{d&&(clearInterval(d),d=null)},V=async()=>{if(!(!i.value||o.value||a.value)){a.value=!0;try{const Z=n.hasVideo?340:280,le=n.hasVideo?280:200,W=await window.documentPictureInPicture.requestWindow({width:Z,height:le,preferInitialWindowPlacement:!0});l.value=W,o.value=!0,s("update:active",!0),k(W.document);const ae=B(W.document);W.document.body.appendChild(ae),n.hasVideo&&_(W.document),S(W.document),C(W.document),W.addEventListener("pagehide",()=>{N(),o.value=!1,l.value=null,s("update:active",!1)})}catch(Z){console.error("[DocumentPip] Error:",Z)}finally{a.value=!1}}},j=()=>{N(),l.value&&(l.value.close(),l.value=null,o.value=!1,s("update:active",!1))};return t({open:V,close:j,toggle:()=>{o.value?j():V()},isActive:o,isSupported:i,canUsePip:b}),(Z,le)=>se(Z.$slots,"default")}}),LC=BC,FC=["data-mode","data-call-status","data-network-status"],VC={key:0,class:"webphone__video-area wp:relative wp:w-full wp:aspect-video wp:bg-black"},jC={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"},UC={class:"webphone__body wp:flex wp:flex-col wp:gap-1 wp:space-y-2"},zC={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"},KC={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"},WC={class:"wp:flex wp:gap-0.5"},GC=["aria-checked","disabled","title","data-channel-id","data-state","data-call-state","onClick"],JC={class:"webphone__display wp:py-1"},YC=["data-visible"],ZC={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"},XC={key:2,class:"webphone__footer wp:flex wp:flex-col wp:items-center wp:p-2 wp:gap-0"},QC=ee({__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},earlyMedia:{type:Boolean,default:!1},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=z(()=>{if(s.wsUrl)return s.wsUrl;if(s.host)return`wss://${s.host}/ws`}),a=z(()=>!o.value||!s.extension?"":`${o.value}::${s.extension}`),l=a.value?n.get(a.value):void 0,u=b0({server:o.value,extension:s.extension,initialConnected:l,initialKeypadVisible:s.initialKeypadVisible}),c=qr(u),d=Xw(u,{onCallContext:D=>i("call-context",D),onCallState:D=>i("call-state",D),onMediaReady:D=>i("media-ready",D)}),{initUserAgent:p,switchChannel:h,remoteStream:m,localStream:w}=d;Mn("webphone",c),Mn("sip",d),t({stop:d.stop}),rt(()=>{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 E=K(!1),v=K(!1),T=K(!1),y=K(null),b=K(null),x=K(null),k=navigator.platform.toUpperCase().indexOf("MAC")>=0?"⌘":"Ctrl+",O=z(()=>s.mode==="webcall"),g=K(0),q=D=>!!D&&D.getVideoTracks().length>0;Re(()=>c.callStatus,D=>{if(D==="idle"&&!c.isKeypadVisible){c.toggleKeypad();return}D!=="idle"&&c.isKeypadVisible&&c.toggleKeypad()});const B=z(()=>c.channels.find(D=>D.id===c.activeChannelId)??null),S=D=>{if(!D)return"";const L=D.trim(),Q=L.startsWith("+"),me=L.replace(/[^\d]/g,"");return Q?`+${me}`:me},_=z(()=>{const D=B.value?.remoteNumber||c.remoteNumber,L=S(D),Q=s.contacts.find(me=>S(me.number)===L);return Q?.name?Q.name:s.maskNumber&&D?Wn(D):D||"Llamada"}),C=z(()=>{const D=B.value?.remoteNumber||c.remoteNumber;return s.maskNumber?Wn(D):D}),N=z(()=>(g.value,!!B.value?.hasVideo||q(m.value)||q(w.value))),{isOnline:V}=By(),j=z(()=>!V.value),X=K(null),Z=K(!1),le=z(()=>s.enablePictureInPicture),W=()=>{le.value&&X.value?.toggle()},ae=async(D,L)=>{try{L==="blind"?await d.transferCall(D):await d.startAttendedTransfer(D)}catch(Q){console.error("[WebPhone] Transfer error:",Q),alert(Q instanceof Error?Q.message:"Transfer failed. Please try again.")}},fe=async()=>{try{await d.completeAttendedTransfer()}catch(D){console.error("[WebPhone] Complete transfer error:",D),alert(D instanceof Error?D.message:"Failed to complete transfer.")}},Ce=async()=>{try{await d.cancelAttendedTransfer()}catch(D){console.error("[WebPhone] Cancel transfer error:",D),alert(D instanceof Error?D.message:"Failed to cancel transfer.")}},Oe=D=>{c.keypadValue=D,d.makeCall(D)},Te=D=>{if(s.onAnswer){s.onAnswer(D);return}d.answerCall(D)},ke=()=>{if(s.onHangup){s.onHangup();return}d.hangupCall()},Ze=()=>{if(s.onReject){s.onReject();return}d.hangupCall()},ut=()=>{T.value=!0,X.value?.close(),window.focus()},Ve=()=>{if(!le.value)return!1;const D=c.callStatus!=="idle",L=document.hidden||!document.hasFocus();return D&&L&&!Z.value},Qe=()=>{window.setTimeout(()=>{Ve()&&X.value?.open()},150)};rt(()=>{b.value&&(Z.value||!m.value?b.value.srcObject=null:b.value.srcObject=m.value),x.value&&(Z.value||!w.value?x.value.srcObject=null:x.value.srcObject=w.value)});const dt=D=>{if(!D||typeof D.addEventListener!="function"||typeof D.removeEventListener!="function")return()=>{};const L=()=>{g.value+=1};return D.addEventListener("addtrack",L),D.addEventListener("removetrack",L),()=>{D.removeEventListener("addtrack",L),D.removeEventListener("removetrack",L)}};Re(m,(D,L,Q)=>{g.value+=1,Q(dt(D))},{immediate:!0}),Re(w,(D,L,Q)=>{g.value+=1,Q(dt(D))},{immediate:!0});const gt=["button","a","input","textarea","select","label","video",'[role="button"]','[role="radio"]',"[data-no-drag]"].join(", "),A=()=>{const D=window.innerWidth<640,L=window.innerWidth<1024;let Q=360;return D?Q=window.innerWidth*.9:L&&(Q=340),{x:Math.max(0,(window.innerWidth-Q)/2),y:D?30:80}},{x:$,y:Y,style:oe}=qy(y,{initialValue:z(()=>{const D=A();return{x:s.position.x??D.x,y:s.position.y??D.y}}).value,preventDefault:!0,onStart:(D,L)=>{const Q=L.target;if(Q instanceof HTMLElement&&Q.closest(gt))return!1}});Re(()=>s.position,D=>{const L=A();$.value=D.x??L.x,Y.value=D.y??L.y},{deep:!0});const ne=[{label:"Canal 1",value:0},{label:"Canal 2",value:1},{label:"Canal 3",value:2}],te=K(!1),de=z({get:()=>c.activeChannelId.toString(),set:async D=>{if(!j.value&&D&&!te.value){te.value=!0;try{await h(parseInt(D))}finally{te.value=!1}}}}),ue=D=>{const L=c.channels.find(Q=>Q.id===D);return L?L.status==="connected"||L.status==="calling"||L.status==="incoming":!1},ce=D=>{const L=c.channels.find(Q=>Q.id===D);return L?L.isHeld||L.status==="held":!1},ie=D=>{j.value||(de.value=D.toString())},Se=D=>{if(!j.value&&((D.metaKey||D.ctrlKey)&&D.key.toLowerCase()==="h"&&(D.preventDefault(),v.value=!0),(D.metaKey||D.ctrlKey)&&D.key===","&&(D.preventDefault(),E.value=!0),(D.metaKey||D.ctrlKey)&&D.key.toLowerCase()==="k"&&(D.preventDefault(),c.toggleKeypad()),(D.metaKey||D.ctrlKey)&&["1","2","3"].includes(D.key))){D.preventDefault();const L=parseInt(D.key)-1;te.value||(te.value=!0,h(L).finally(()=>{te.value=!1}))}};Re(()=>c.callStatus,()=>{Ve()&&Qe()}),Re(()=>c.isConnected,D=>{a.value&&n.set(a.value,D)},{immediate:!0}),Re(le,D=>{!D&&Z.value&&X.value?.close()});const he=K(!1),I=async()=>{he.value||j.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}),d.extension.value&&(he.value=!0,s.mode==="webcall"&&s.to&&d.makeCall(s.to)))},F=()=>I(),M=async()=>{await d.stop(),he.value=!1};return Mn("webphoneRegistration",{isConnected:z(()=>c.isConnected),register:F,unregister:M}),We(async()=>{window.addEventListener("keydown",Se),document.addEventListener("visibilitychange",Qe),window.addEventListener("blur",Qe),window.addEventListener("pagehide",Qe),!(s.mode==="webcall"&&(!s.to||!s.logo))&&await I()}),Re(()=>V.value,async D=>{D&&await I()}),Mt(()=>{d.stop(),window.removeEventListener("keydown",Se),document.removeEventListener("visibilitychange",Qe),window.removeEventListener("blur",Qe),window.removeEventListener("pagehide",Qe)}),(D,L)=>(P(),ye(Le,null,[re("div",{ref_key:"phoneRef",ref:y,style:mt(f(oe)),class:Xe(["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",j.value?"wp:opacity-70":""]),"data-mode":s.mode,"data-call-status":c.callStatus,"data-network-status":j.value?"offline":"online"},[N.value&&!Z.value?(P(),ye("div",VC,[re("video",{ref_key:"remoteVideoRef",ref:b,autoplay:"",playsinline:"",class:"webphone__video-remote wp:w-full wp:h-full wp:object-cover"},null,512),re("div",jC,[re("video",{ref_key:"localVideoRef",ref:x,autoplay:"",playsinline:"",muted:"",class:"webphone__video-local wp:w-full wp:h-full wp:object-cover"},null,512)])])):Pe("",!0),re("div",UC,[O.value?Pe("",!0):(P(),ye("div",zC,[re("div",KC,[re("div",WC,[(P(),ye(Le,null,nr(ne,Q=>re("button",{key:Q.value,type:"button",role:"radio","aria-checked":de.value===Q.value.toString(),disabled:j.value,title:`${Q.label} (${f(k)}${Q.value+1})`,class:Xe(["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(Q.value)?"wp:bg-status-hold/12 hover:wp:bg-status-hold/18":ue(Q.value)?"wp:bg-[var(--color-red)]/12 hover:wp:bg-[var(--color-red)]/18":de.value===Q.value.toString()?"wp:bg-[var(--p-primary-color)]/12":"wp:hover:bg-neutral-100 wp:dark:hover:bg-neutral-800/80"]),"data-channel-id":Q.value,"data-state":de.value===Q.value.toString()?"active":"idle","data-call-state":ce(Q.value)?"held":ue(Q.value)?"busy":"available",onClick:me=>ie(Q.value)},[H(f(Cc),{class:Xe(["webphone__channel-icon wp:size-3 wp:shrink-0",ce(Q.value)?"wp:text-status-hold":ue(Q.value)?"wp:text-[var(--color-red)]":de.value===Q.value.toString()?"wp:text-[var(--p-primary-color)]":"wp:text-neutral-400"]),"stroke-width":1.8},null,8,["class"]),re("span",{class:Xe(["webphone__channel-label wp:text-[11px] wp:leading-none manrope wp:font-bold",ce(Q.value)?"wp:text-status-hold":ue(Q.value)?"wp:text-[var(--color-red)]":de.value===Q.value.toString()?"wp:text-[var(--p-primary-color)]":"wp:text-neutral-500 wp:dark:text-neutral-400"])},He(Q.label),3)],10,GC)),64))]),H(f(ta),null,{default:R(()=>[H(f(Qo),null,{default:R(()=>[H(f(ra),{"as-child":""},{default:R(()=>[H(f(it),{variant:"ghost",size:"icon",class:Xe(["wp:h-8 wp:w-8 wp:rounded-full",Z.value?"wp:text-primary":""]),title:"Picture-in-Picture",onClick:W},{default:R(()=>[H(f(h_),{class:"wp:w-4 wp:h-4 wp:text-[var(--color-settings)]"})]),_:1},8,["class"])]),_:1}),H(f(ea),{class:"wp:flex wp:items-center wp:gap-2"},{default:R(()=>[...L[8]||(L[8]=[re("span",null,"Picture-in-Picture",-1)])]),_:1})]),_:1})]),_:1}),H(f(ta),null,{default:R(()=>[H(f(Qo),null,{default:R(()=>[H(f(ra),{"as-child":""},{default:R(()=>[H(f(it),{variant:"ghost",size:"icon",class:"wp:h-8 wp:w-8 wp:rounded-full",onClick:L[0]||(L[0]=Q=>E.value=!0)},{default:R(()=>[H(f(m_),{class:"wp:w-4 wp:h-4 wp:text-[var(--color-settings)]"})]),_:1})]),_:1}),H(f(ea),{class:"wp:flex wp:items-center wp:gap-2"},{default:R(()=>[L[9]||(L[9]=re("span",null,"Configuración",-1)),H(f(sn),null,{default:R(()=>[Ne(He(f(k))+",",1)]),_:1})]),_:1})]),_:1})]),_:1})])])),re("div",JC,[(P(!0),ye(Le,null,nr(c.channels,Q=>Wi((P(),G(CS,{key:Q.id,"channel-id":Q.id,"allow-input":!O.value,"is-web-call":O.value,"is-online":f(V),contacts:s.contacts,user:s.extension,"mask-number":s.maskNumber},null,8,["channel-id","allow-input","is-web-call","is-online","contacts","user","mask-number"])),[[go,Q.id===c.activeChannelId]])),128))]),re("div",{class:Xe(["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"},[H(vc)],10,YC),H(G_,{class:"webphone__actions",style:mt(j.value?"pointer-events: none;":void 0),destination:O.value?s.to:void 0,"is-video":s.mode==="video","on-answer":s.onAnswer,"on-hangup":s.onHangup,"on-reject":s.onReject,onTransfer:L[1]||(L[1]=Q=>T.value=!0),onCompleteTransfer:fe,onCancelTransfer:Ce},null,8,["style","destination","is-video","on-answer","on-hangup","on-reject"])]),j.value?(P(),ye("div",ZC,[...L[10]||(L[10]=[re("span",{class:"wp:text-sm wp:font-semibold wp:text-status-disconnected"},"Sin internet",-1)])])):Pe("",!0),O.value?(P(),ye("div",XC,[...L[11]||(L[11]=[re("div",{class:"webphone__footer-label wp:text-[10px] wp:text-primary"},"Powered By",-1),re("div",{class:"webphone__footer-content wp:flex wp:items-center wp:gap-2"},[re("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)])])):Pe("",!0)],14,FC),H(uC,{visible:E.value,"onUpdate:visible":L[2]||(L[2]=Q=>E.value=Q)},null,8,["visible"]),H(AC,{visible:v.value,"onUpdate:visible":L[3]||(L[3]=Q=>v.value=Q),contacts:s.contacts,onCall:Oe},null,8,["visible","contacts"]),H(qC,{visible:T.value,"onUpdate:visible":L[4]||(L[4]=Q=>T.value=Q),contacts:s.contacts,onTransfer:ae},null,8,["visible","contacts"]),H(LC,{ref_key:"documentPipRef",ref:X,active:Z.value,"onUpdate:active":L[5]||(L[5]=Q=>Z.value=Q),"auto-open-on-blur":le.value,"is-connected":c.isConnected,"remote-number":C.value,"caller-name":_.value,"has-video":N.value??!1,"remote-stream":f(m),"local-stream":f(w),destination:O.value?s.to:void 0,"is-video":s.mode==="video","call-status":c.callStatus,"is-muted":c.isMuted,"is-held":c.isHeld,onTransfer:ut,onTransferRequest:ae,onHangup:ke,onReject:Ze,onAnswer:Te,onToggleMute:L[6]||(L[6]=Q=>f(d).toggleMute()),onToggleHold:L[7]||(L[7]=Q=>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))}}),ex=(e,t)=>{const r=e.__vccOpts||e;for(const[n,s]of t)r[n]=s;return r},tx=ex(QC,[["__scopeId","data-v-de97971c"]]),rx=cl({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 ir(tx,{...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",rx)})();