@tmsoft/webphone 2.0.16 → 2.0.17

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,16 +1,16 @@
1
1
  (function(){try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */
2
2
  @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-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-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-f7279ee0],[data-v-f7279ee0]:before,[data-v-f7279ee0]:after{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--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-f7279ee0]::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--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-xs:20rem;--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-xl:1.25rem;--wp-text-xl--line-height:calc(1.75/1.25);--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-spin:spin 1s linear infinite;--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.2165 23.111);--wp-color-amber-400:lab(80.1641% 16.6016 99.2089);--wp-color-amber-500:lab(72.7183% 31.8671 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.4146);--wp-color-emerald-600:lab(55.0481% -49.9245 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.2101 -86.5669);--wp-color-purple-900:lab(24.9401% 45.2703 -51.2728);--wp-color-neutral-100:lab(96.52% -.0000298023 0);--wp-color-neutral-200:lab(90.952% 0 -.0000119209);--wp-color-neutral-400:lab(66.128% 0 0);--wp-color-neutral-500:lab(48.496% 0 0);--wp-color-neutral-600:lab(34.924% -.0000149012 -.00000596046);--wp-color-neutral-700:lab(27.036% 0 0);--wp-color-neutral-800:lab(15.204% 0 0);--wp-color-neutral-900:lab(7.78201% -.0000149012 0)}}[data-v-f7279ee0]:root,[data-v-f7279ee0]: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-xs:20rem;--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-xl:1.25rem;--wp-text-xl--line-height:calc(1.75/1.25);--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-spin:spin 1s linear infinite;--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-f7279ee0]:root,[data-v-f7279ee0]: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-f7279ee0]:root,[data-v-f7279ee0]:host{--wp-color-red-500:lab(55.4814% 75.0732 48.8528);--wp-color-amber-100:lab(95.916% -1.2165 23.111);--wp-color-amber-400:lab(80.1641% 16.6016 99.2089);--wp-color-amber-500:lab(72.7183% 31.8671 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.4146);--wp-color-emerald-600:lab(55.0481% -49.9245 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.2101 -86.5669);--wp-color-purple-900:lab(24.9401% 45.2703 -51.2728);--wp-color-neutral-100:lab(96.52% -.0000298023 0);--wp-color-neutral-200:lab(90.952% 0 -.0000119209);--wp-color-neutral-400:lab(66.128% 0 0);--wp-color-neutral-500:lab(48.496% 0 0);--wp-color-neutral-600:lab(34.924% -.0000149012 -.00000596046);--wp-color-neutral-700:lab(27.036% 0 0);--wp-color-neutral-800:lab(15.204% 0 0);--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-f7279ee0],[data-v-f7279ee0]:after,[data-v-f7279ee0]:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}[data-v-f7279ee0]::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}[data-v-f7279ee0]::-webkit-file-upload-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}[data-v-f7279ee0]::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html[data-v-f7279ee0],[data-v-f7279ee0]: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-f7279ee0]{height:0;color:inherit;border-top-width:1px}abbr[data-v-f7279ee0]:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1[data-v-f7279ee0],h2[data-v-f7279ee0],h3[data-v-f7279ee0],h4[data-v-f7279ee0],h5[data-v-f7279ee0],h6[data-v-f7279ee0]{font-size:inherit;font-weight:inherit}a[data-v-f7279ee0]{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b[data-v-f7279ee0],strong[data-v-f7279ee0]{font-weight:bolder}code[data-v-f7279ee0],kbd[data-v-f7279ee0],samp[data-v-f7279ee0],pre[data-v-f7279ee0]{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-f7279ee0]{font-size:80%}sub[data-v-f7279ee0],sup[data-v-f7279ee0]{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub[data-v-f7279ee0]{bottom:-.25em}sup[data-v-f7279ee0]{top:-.5em}table[data-v-f7279ee0]{text-indent:0;border-color:inherit;border-collapse:collapse}[data-v-f7279ee0]:-moz-focusring{outline:auto}progress[data-v-f7279ee0]{vertical-align:baseline}summary[data-v-f7279ee0]{display:list-item}ol[data-v-f7279ee0],ul[data-v-f7279ee0],menu[data-v-f7279ee0]{list-style:none}img[data-v-f7279ee0],svg[data-v-f7279ee0],video[data-v-f7279ee0],canvas[data-v-f7279ee0],audio[data-v-f7279ee0],iframe[data-v-f7279ee0],embed[data-v-f7279ee0],object[data-v-f7279ee0]{vertical-align:middle;display:block}img[data-v-f7279ee0],video[data-v-f7279ee0]{max-width:100%;height:auto}button[data-v-f7279ee0],input[data-v-f7279ee0],select[data-v-f7279ee0],optgroup[data-v-f7279ee0],textarea[data-v-f7279ee0]{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-f7279ee0]::-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-f7279ee0]::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-f7279ee0]{font-weight:bolder}:where(select:is([multiple],[size])) optgroup[data-v-f7279ee0]{font-weight:bolder}:where(select:-webkit-any([multiple],[size])) optgroup option[data-v-f7279ee0]{padding-inline-start:20px}:where(select:is([multiple],[size])) optgroup option[data-v-f7279ee0]{padding-inline-start:20px}[data-v-f7279ee0]::-webkit-file-upload-button{margin-inline-end:4px}[data-v-f7279ee0]::file-selector-button{margin-inline-end:4px}[data-v-f7279ee0]::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){[data-v-f7279ee0]::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){[data-v-f7279ee0]::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea[data-v-f7279ee0]{resize:vertical}[data-v-f7279ee0]::-webkit-search-decoration{-webkit-appearance:none}[data-v-f7279ee0]::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}[data-v-f7279ee0]::-webkit-datetime-edit{display:inline-flex}[data-v-f7279ee0]::-webkit-datetime-edit-fields-wrapper{padding:0}[data-v-f7279ee0]::-webkit-datetime-edit{padding-block-start:0;padding-block-end:0}[data-v-f7279ee0]::-webkit-datetime-edit-year-field{padding-block-start:0;padding-block-end:0}[data-v-f7279ee0]::-webkit-datetime-edit-month-field{padding-block-start:0;padding-block-end:0}[data-v-f7279ee0]::-webkit-datetime-edit-day-field{padding-block-start:0;padding-block-end:0}[data-v-f7279ee0]::-webkit-datetime-edit-hour-field{padding-block-start:0;padding-block-end:0}[data-v-f7279ee0]::-webkit-datetime-edit-minute-field{padding-block-start:0;padding-block-end:0}[data-v-f7279ee0]::-webkit-datetime-edit-second-field{padding-block-start:0;padding-block-end:0}[data-v-f7279ee0]::-webkit-datetime-edit-millisecond-field{padding-block-start:0;padding-block-end:0}[data-v-f7279ee0]::-webkit-datetime-edit-meridiem-field{padding-block-start:0;padding-block-end:0}[data-v-f7279ee0]::-webkit-calendar-picker-indicator{line-height:1}[data-v-f7279ee0]:-moz-ui-invalid{box-shadow:none}button[data-v-f7279ee0]{-webkit-appearance:button;appearance:button}input[data-v-f7279ee0]:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;appearance:button}[data-v-f7279ee0]::-webkit-file-upload-button{-webkit-appearance:button;appearance:button}[data-v-f7279ee0]::file-selector-button{-webkit-appearance:button;appearance:button}[data-v-f7279ee0]::-webkit-inner-spin-button{height:auto}[data-v-f7279ee0]::-webkit-outer-spin-button{height:auto}[hidden][data-v-f7279ee0]:where(:not([hidden=until-found])){display:none!important}[data-v-f7279ee0]{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){[data-v-f7279ee0]{outline-color:color-mix(in oklab,var(--ring)50%,transparent)}}body[data-v-f7279ee0]{background-color:var(--background);color:var(--foreground)}}@layer components;@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-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-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\\: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\\: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\\: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\\.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-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-1\\.5{height:calc(var(--wp-spacing)*1.5)}.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-14\\!{height:calc(var(--wp-spacing)*14)!important}.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-\\[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-5{min-height:calc(var(--wp-spacing)*5)}.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-1\\.5{width:calc(var(--wp-spacing)*1.5)}.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-12{width:calc(var(--wp-spacing)*12)}.wp\\:w-14\\!{width:calc(var(--wp-spacing)*14)!important}.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-\\[min\\(95vw\\,400px\\)\\]{width:min(95vw,400px)}.wp\\:w-auto{width:auto}.wp\\:w-fit{width:-moz-fit-content;width:fit-content}.wp\\:w-full{width:100%}.wp\\:max-w-75{max-width:calc(var(--wp-spacing)*75)}.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\\:max-w-xs{max-width:var(--wp-container-xs)}.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\\:animate-spin{animation:var(--wp-animate-spin)}.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-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)))}.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-full\\!{border-radius:3.40282e38px!important}.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-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-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-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-current{background-color:currentColor}.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-disconnected{background-color:var(--status-disconnected)}.wp\\:bg-status-hold{background-color:var(--status-hold)}.wp\\:bg-status-incall{background-color:var(--status-incall)}.wp\\:bg-status-incoming{background-color:var(--status-incoming)}.wp\\:bg-transparent{background-color:#0000}.wp\\:bg-white{background-color:var(--wp-color-white)}.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\\: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-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-xl{font-size:var(--wp-text-xl);line-height:var(--tw-leading,var(--wp-text-xl--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\\: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-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-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-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\\:normal-case{text-transform:none}.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-\\[0_0_8px_currentColor\\]{--tw-shadow:0 0 8px var(--tw-shadow-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\\: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-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px 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\\: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\\: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-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-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-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-status-disconnected\\/90:hover{background-color:var(--status-disconnected)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-status-disconnected\\/90:hover{background-color:color-mix(in oklab,var(--status-disconnected)90%,transparent)}}.wp\\:hover\\:bg-status-hold\\/90:hover{background-color:var(--status-hold)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-status-hold\\/90:hover{background-color:color-mix(in oklab,var(--status-hold)90%,transparent)}}.wp\\:hover\\:bg-status-incall\\/90:hover{background-color:var(--status-incall)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-status-incall\\/90:hover{background-color:color-mix(in oklab,var(--status-incall)90%,transparent)}}.wp\\:hover\\:bg-transparent:hover{background-color:#0000}.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-status-available:hover,.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:hover,.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:hover,.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:hover,.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-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-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-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\\: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-\\[spacing\\=0\\]\\:data-\\[variant\\=outline\\]\\:border-l-0[data-spacing="0"][data-variant=outline]{border-left-style:var(--tw-border-style);border-left-width:0}.wp\\:data-\\[spacing\\=0\\]\\:data-\\[variant\\=outline\\]\\:first\\:border-l[data-spacing="0"][data-variant=outline]:first-child{border-left-style:var(--tw-border-style);border-left-width:1px}.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-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-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-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-neutral-800:where(.dark,.dark *){color:var(--wp-color-neutral-800)}.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-700:where(.dark,.dark *):hover{background-color:var(--wp-color-neutral-700)}.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\\: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-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-f7279ee0]{container:card-header/inline-size}.wp\\:pointer-events-none[data-v-f7279ee0]{pointer-events:none}.wp\\:sr-only[data-v-f7279ee0]{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-f7279ee0]{position:absolute}.wp\\:fixed[data-v-f7279ee0]{position:fixed}.wp\\:relative[data-v-f7279ee0]{position:relative}.wp\\:sticky[data-v-f7279ee0]{position:sticky}.wp\\:inset-0[data-v-f7279ee0]{inset:calc(var(--wp-spacing)*0)}.wp\\:inset-x-0[data-v-f7279ee0]{inset-inline:calc(var(--wp-spacing)*0)}.wp\\:top-0[data-v-f7279ee0]{top:calc(var(--wp-spacing)*0)}.wp\\:top-1\\/2[data-v-f7279ee0]{top:50%}.wp\\:top-2\\.5[data-v-f7279ee0]{top:calc(var(--wp-spacing)*2.5)}.wp\\:top-4[data-v-f7279ee0]{top:calc(var(--wp-spacing)*4)}.wp\\:top-\\[50\\%\\][data-v-f7279ee0]{top:50%}.wp\\:top-full[data-v-f7279ee0]{top:100%}.wp\\:right-0[data-v-f7279ee0]{right:calc(var(--wp-spacing)*0)}.wp\\:right-2[data-v-f7279ee0]{right:calc(var(--wp-spacing)*2)}.wp\\:right-4[data-v-f7279ee0]{right:calc(var(--wp-spacing)*4)}.wp\\:bottom-2[data-v-f7279ee0]{bottom:calc(var(--wp-spacing)*2)}.wp\\:bottom-full[data-v-f7279ee0]{bottom:100%}.wp\\:left-0[data-v-f7279ee0]{left:calc(var(--wp-spacing)*0)}.wp\\:left-2[data-v-f7279ee0]{left:calc(var(--wp-spacing)*2)}.wp\\:left-\\[50\\%\\][data-v-f7279ee0]{left:50%}.wp\\:z-10[data-v-f7279ee0]{z-index:10}.wp\\:z-40[data-v-f7279ee0]{z-index:40}.wp\\:z-50[data-v-f7279ee0]{z-index:50}.wp\\:col-start-2[data-v-f7279ee0]{grid-column-start:2}.wp\\:row-span-2[data-v-f7279ee0]{grid-row:span 2/span 2}.wp\\:row-start-1[data-v-f7279ee0]{grid-row-start:1}.wp\\:container[data-v-f7279ee0]{width:100%}@media (min-width:40rem){.wp\\:container[data-v-f7279ee0]{max-width:40rem}}@media (min-width:48rem){.wp\\:container[data-v-f7279ee0]{max-width:48rem}}@media (min-width:64rem){.wp\\:container[data-v-f7279ee0]{max-width:64rem}}@media (min-width:80rem){.wp\\:container[data-v-f7279ee0]{max-width:80rem}}@media (min-width:96rem){.wp\\:container[data-v-f7279ee0]{max-width:96rem}}.wp\\:-mx-1[data-v-f7279ee0]{margin-inline:calc(var(--wp-spacing)*-1)}.wp\\:mx-2[data-v-f7279ee0]{margin-inline:calc(var(--wp-spacing)*2)}.wp\\:mx-auto[data-v-f7279ee0]{margin-inline-start:auto;margin-inline-end:auto}.wp\\:my-1[data-v-f7279ee0]{margin-block:calc(var(--wp-spacing)*1)}.wp\\:my-2[data-v-f7279ee0]{margin-block:calc(var(--wp-spacing)*2)}.wp\\:my-8[data-v-f7279ee0]{margin-block:calc(var(--wp-spacing)*8)}.wp\\:mt-1[data-v-f7279ee0]{margin-top:calc(var(--wp-spacing)*1)}.wp\\:mr-4[data-v-f7279ee0]{margin-right:calc(var(--wp-spacing)*4)}.wp\\:mb-1[data-v-f7279ee0]{margin-bottom:calc(var(--wp-spacing)*1)}.wp\\:mb-2[data-v-f7279ee0]{margin-bottom:calc(var(--wp-spacing)*2)}.wp\\:mb-4[data-v-f7279ee0]{margin-bottom:calc(var(--wp-spacing)*4)}.wp\\:ml-auto[data-v-f7279ee0]{margin-left:auto}.wp\\:block[data-v-f7279ee0]{display:block}.wp\\:flex[data-v-f7279ee0]{display:flex}.wp\\:grid[data-v-f7279ee0]{display:grid}.wp\\:hidden[data-v-f7279ee0]{display:none}.wp\\:inline-flex[data-v-f7279ee0]{display:inline-flex}.wp\\:aspect-square[data-v-f7279ee0]{aspect-ratio:1}.wp\\:aspect-video[data-v-f7279ee0]{aspect-ratio:var(--wp-aspect-video)}.wp\\:size-2[data-v-f7279ee0]{width:calc(var(--wp-spacing)*2);height:calc(var(--wp-spacing)*2)}.wp\\:size-2\\.5[data-v-f7279ee0]{width:calc(var(--wp-spacing)*2.5);height:calc(var(--wp-spacing)*2.5)}.wp\\:size-3\\.5[data-v-f7279ee0]{width:calc(var(--wp-spacing)*3.5);height:calc(var(--wp-spacing)*3.5)}.wp\\:size-4[data-v-f7279ee0]{width:calc(var(--wp-spacing)*4);height:calc(var(--wp-spacing)*4)}.wp\\:size-5[data-v-f7279ee0]{width:calc(var(--wp-spacing)*5);height:calc(var(--wp-spacing)*5)}.wp\\:size-8[data-v-f7279ee0]{width:calc(var(--wp-spacing)*8);height:calc(var(--wp-spacing)*8)}.wp\\:size-9[data-v-f7279ee0]{width:calc(var(--wp-spacing)*9);height:calc(var(--wp-spacing)*9)}.wp\\:size-10[data-v-f7279ee0]{width:calc(var(--wp-spacing)*10);height:calc(var(--wp-spacing)*10)}.wp\\:size-12[data-v-f7279ee0]{width:calc(var(--wp-spacing)*12);height:calc(var(--wp-spacing)*12)}.wp\\:size-full[data-v-f7279ee0]{width:100%;height:100%}.wp\\:h-1\\.5[data-v-f7279ee0]{height:calc(var(--wp-spacing)*1.5)}.wp\\:h-2\\.5[data-v-f7279ee0]{height:calc(var(--wp-spacing)*2.5)}.wp\\:h-3[data-v-f7279ee0]{height:calc(var(--wp-spacing)*3)}.wp\\:h-4[data-v-f7279ee0]{height:calc(var(--wp-spacing)*4)}.wp\\:h-5[data-v-f7279ee0]{height:calc(var(--wp-spacing)*5)}.wp\\:h-6[data-v-f7279ee0]{height:calc(var(--wp-spacing)*6)}.wp\\:h-7[data-v-f7279ee0]{height:calc(var(--wp-spacing)*7)}.wp\\:h-8[data-v-f7279ee0]{height:calc(var(--wp-spacing)*8)}.wp\\:h-9[data-v-f7279ee0]{height:calc(var(--wp-spacing)*9)}.wp\\:h-10[data-v-f7279ee0]{height:calc(var(--wp-spacing)*10)}.wp\\:h-12[data-v-f7279ee0]{height:calc(var(--wp-spacing)*12)}.wp\\:h-14[data-v-f7279ee0]{height:calc(var(--wp-spacing)*14)}.wp\\:h-14\\![data-v-f7279ee0]{height:calc(var(--wp-spacing)*14)!important}.wp\\:h-16[data-v-f7279ee0]{height:calc(var(--wp-spacing)*16)}.wp\\:h-64[data-v-f7279ee0]{height:calc(var(--wp-spacing)*64)}.wp\\:h-80[data-v-f7279ee0]{height:calc(var(--wp-spacing)*80)}.wp\\:h-\\[60vh\\][data-v-f7279ee0]{height:60vh}.wp\\:h-\\[var\\(--reka-select-trigger-height\\)\\][data-v-f7279ee0]{height:var(--reka-select-trigger-height)}.wp\\:h-full[data-v-f7279ee0]{height:100%}.wp\\:h-px[data-v-f7279ee0]{height:1px}.wp\\:max-h-\\(--reka-dropdown-menu-content-available-height\\)[data-v-f7279ee0]{max-height:var(--reka-dropdown-menu-content-available-height)}.wp\\:max-h-\\(--reka-select-content-available-height\\)[data-v-f7279ee0]{max-height:var(--reka-select-content-available-height)}.wp\\:max-h-0[data-v-f7279ee0]{max-height:calc(var(--wp-spacing)*0)}.wp\\:max-h-40[data-v-f7279ee0]{max-height:calc(var(--wp-spacing)*40)}.wp\\:max-h-60[data-v-f7279ee0]{max-height:calc(var(--wp-spacing)*60)}.wp\\:max-h-\\[300px\\][data-v-f7279ee0]{max-height:300px}.wp\\:min-h-5[data-v-f7279ee0]{min-height:calc(var(--wp-spacing)*5)}.wp\\:min-h-10[data-v-f7279ee0]{min-height:calc(var(--wp-spacing)*10)}.wp\\:min-h-\\[calc\\(100vh-3\\.5rem\\)\\][data-v-f7279ee0]{min-height:calc(100vh - 3.5rem)}.wp\\:min-h-screen[data-v-f7279ee0]{min-height:100vh}.wp\\:w-1\\.5[data-v-f7279ee0]{width:calc(var(--wp-spacing)*1.5)}.wp\\:w-2\\.5[data-v-f7279ee0]{width:calc(var(--wp-spacing)*2.5)}.wp\\:w-3[data-v-f7279ee0]{width:calc(var(--wp-spacing)*3)}.wp\\:w-4[data-v-f7279ee0]{width:calc(var(--wp-spacing)*4)}.wp\\:w-5[data-v-f7279ee0]{width:calc(var(--wp-spacing)*5)}.wp\\:w-6[data-v-f7279ee0]{width:calc(var(--wp-spacing)*6)}.wp\\:w-8[data-v-f7279ee0]{width:calc(var(--wp-spacing)*8)}.wp\\:w-12[data-v-f7279ee0]{width:calc(var(--wp-spacing)*12)}.wp\\:w-14\\![data-v-f7279ee0]{width:calc(var(--wp-spacing)*14)!important}.wp\\:w-16[data-v-f7279ee0]{width:calc(var(--wp-spacing)*16)}.wp\\:w-24[data-v-f7279ee0]{width:calc(var(--wp-spacing)*24)}.wp\\:w-48[data-v-f7279ee0]{width:calc(var(--wp-spacing)*48)}.wp\\:w-72[data-v-f7279ee0]{width:calc(var(--wp-spacing)*72)}.wp\\:w-\\[min\\(95vw\\,400px\\)\\][data-v-f7279ee0]{width:min(95vw,400px)}.wp\\:w-auto[data-v-f7279ee0]{width:auto}.wp\\:w-fit[data-v-f7279ee0]{width:-moz-fit-content;width:fit-content}.wp\\:w-full[data-v-f7279ee0]{width:100%}.wp\\:max-w-75[data-v-f7279ee0]{max-width:calc(var(--wp-spacing)*75)}.wp\\:max-w-\\[calc\\(100\\%-2rem\\)\\][data-v-f7279ee0]{max-width:calc(100% - 2rem)}.wp\\:max-w-lg[data-v-f7279ee0]{max-width:var(--wp-container-lg)}.wp\\:max-w-md[data-v-f7279ee0]{max-width:var(--wp-container-md)}.wp\\:max-w-screen-2xl[data-v-f7279ee0]{max-width:var(--wp-breakpoint-2xl)}.wp\\:max-w-xs[data-v-f7279ee0]{max-width:var(--wp-container-xs)}.wp\\:min-w-0[data-v-f7279ee0]{min-width:calc(var(--wp-spacing)*0)}.wp\\:min-w-5[data-v-f7279ee0]{min-width:calc(var(--wp-spacing)*5)}.wp\\:min-w-8[data-v-f7279ee0]{min-width:calc(var(--wp-spacing)*8)}.wp\\:min-w-9[data-v-f7279ee0]{min-width:calc(var(--wp-spacing)*9)}.wp\\:min-w-10[data-v-f7279ee0]{min-width:calc(var(--wp-spacing)*10)}.wp\\:min-w-\\[8rem\\][data-v-f7279ee0]{min-width:8rem}.wp\\:min-w-\\[var\\(--reka-select-trigger-width\\)\\][data-v-f7279ee0]{min-width:var(--reka-select-trigger-width)}.wp\\:flex-1[data-v-f7279ee0]{flex:1}.wp\\:shrink-0[data-v-f7279ee0]{flex-shrink:0}.wp\\:grow[data-v-f7279ee0]{flex-grow:1}.wp\\:origin-\\(--reka-dropdown-menu-content-transform-origin\\)[data-v-f7279ee0]{transform-origin:var(--reka-dropdown-menu-content-transform-origin)}.wp\\:origin-\\(--reka-popover-content-transform-origin\\)[data-v-f7279ee0]{transform-origin:var(--reka-popover-content-transform-origin)}.wp\\:translate-x-\\[-50\\%\\][data-v-f7279ee0]{--tw-translate-x:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.wp\\:-translate-y-1\\/2[data-v-f7279ee0]{--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-f7279ee0]{--tw-translate-y:calc(var(--wp-spacing)*.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.wp\\:translate-y-\\[-50\\%\\][data-v-f7279ee0]{--tw-translate-y:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.wp\\:translate-y-\\[calc\\(-50\\%_-_2px\\)\\][data-v-f7279ee0]{--tw-translate-y:calc(-50% - 2px);translate:var(--tw-translate-x)var(--tw-translate-y)}.wp\\:rotate-45[data-v-f7279ee0]{rotate:45deg}.wp\\:animate-in[data-v-f7279ee0]{animation:enter-f7279ee0 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-f7279ee0]{animation:var(--wp-animate-pulse)}.wp\\:animate-spin[data-v-f7279ee0]{animation:var(--wp-animate-spin)}.wp\\:cursor-default[data-v-f7279ee0]{cursor:default}.wp\\:cursor-move[data-v-f7279ee0]{cursor:move}.wp\\:cursor-pointer[data-v-f7279ee0]{cursor:pointer}.wp\\:touch-none[data-v-f7279ee0]{touch-action:none}.wp\\:scroll-my-1[data-v-f7279ee0]{scroll-margin-block:calc(var(--wp-spacing)*1)}.wp\\:scroll-py-1[data-v-f7279ee0]{scroll-padding-block:calc(var(--wp-spacing)*1)}.wp\\:auto-rows-min[data-v-f7279ee0]{grid-auto-rows:min-content}.wp\\:grid-cols-2[data-v-f7279ee0]{grid-template-columns:repeat(2,minmax(0,1fr))}.wp\\:grid-cols-3[data-v-f7279ee0]{grid-template-columns:repeat(3,minmax(0,1fr))}.wp\\:grid-rows-\\[auto_auto\\][data-v-f7279ee0]{grid-template-rows:auto auto}.wp\\:flex-col[data-v-f7279ee0]{flex-direction:column}.wp\\:flex-col-reverse[data-v-f7279ee0]{flex-direction:column-reverse}.wp\\:place-items-center[data-v-f7279ee0]{place-items:center}.wp\\:items-center[data-v-f7279ee0]{align-items:center}.wp\\:items-end[data-v-f7279ee0]{align-items:flex-end}.wp\\:items-start[data-v-f7279ee0]{align-items:flex-start}.wp\\:justify-between[data-v-f7279ee0]{justify-content:space-between}.wp\\:justify-center[data-v-f7279ee0]{justify-content:center}.wp\\:gap-0[data-v-f7279ee0]{gap:calc(var(--wp-spacing)*0)}.wp\\:gap-1[data-v-f7279ee0]{gap:calc(var(--wp-spacing)*1)}.wp\\:gap-1\\.5[data-v-f7279ee0]{gap:calc(var(--wp-spacing)*1.5)}.wp\\:gap-2[data-v-f7279ee0]{gap:calc(var(--wp-spacing)*2)}.wp\\:gap-3[data-v-f7279ee0]{gap:calc(var(--wp-spacing)*3)}.wp\\:gap-4[data-v-f7279ee0]{gap:calc(var(--wp-spacing)*4)}.wp\\:gap-6[data-v-f7279ee0]{gap:calc(var(--wp-spacing)*6)}.wp\\:gap-\\[--spacing\\(var\\(--gap\\)\\)\\][data-v-f7279ee0]{gap:calc(var(--wp-spacing)*var(--gap))}:where(.wp\\:space-y-2[data-v-f7279ee0]>: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-f7279ee0]>: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)))}.wp\\:gap-x-6[data-v-f7279ee0]{column-gap:calc(var(--wp-spacing)*6)}.wp\\:gap-y-3[data-v-f7279ee0]{row-gap:calc(var(--wp-spacing)*3)}.wp\\:self-start[data-v-f7279ee0]{align-self:flex-start}.wp\\:justify-self-end[data-v-f7279ee0]{justify-self:flex-end}.wp\\:truncate[data-v-f7279ee0]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.wp\\:overflow-auto[data-v-f7279ee0]{overflow:auto}.wp\\:overflow-hidden[data-v-f7279ee0]{overflow:hidden}.wp\\:overflow-x-hidden[data-v-f7279ee0]{overflow-x:hidden}.wp\\:overflow-y-auto[data-v-f7279ee0]{overflow-y:auto}.wp\\:rounded[data-v-f7279ee0]{border-radius:.25rem}.wp\\:rounded-2xl[data-v-f7279ee0]{border-radius:var(--wp-radius-2xl)}.wp\\:rounded-\\[2px\\][data-v-f7279ee0]{border-radius:2px}.wp\\:rounded-\\[inherit\\][data-v-f7279ee0]{border-radius:inherit}.wp\\:rounded-full[data-v-f7279ee0]{border-radius:3.40282e38px}.wp\\:rounded-full\\![data-v-f7279ee0]{border-radius:3.40282e38px!important}.wp\\:rounded-lg[data-v-f7279ee0]{border-radius:var(--radius)}.wp\\:rounded-md[data-v-f7279ee0]{border-radius:calc(var(--radius) - 2px)}.wp\\:rounded-sm[data-v-f7279ee0]{border-radius:calc(var(--radius) - 4px)}.wp\\:rounded-xl[data-v-f7279ee0]{border-radius:calc(var(--radius) + 4px)}.wp\\:rounded-xs[data-v-f7279ee0]{border-radius:var(--wp-radius-xs)}.wp\\:border[data-v-f7279ee0]{border-style:var(--tw-border-style);border-width:1px}.wp\\:border-t[data-v-f7279ee0]{border-top-style:var(--tw-border-style);border-top-width:1px}.wp\\:border-b[data-v-f7279ee0]{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.wp\\:border-l[data-v-f7279ee0]{border-left-style:var(--tw-border-style);border-left-width:1px}.wp\\:border-border[data-v-f7279ee0]{border-color:var(--border)}.wp\\:border-destructive[data-v-f7279ee0]{border-color:var(--destructive)}.wp\\:border-input[data-v-f7279ee0]{border-color:var(--input)}.wp\\:border-primary[data-v-f7279ee0]{border-color:var(--primary)}.wp\\:border-white\\/20[data-v-f7279ee0]{border-color:var(--wp-color-white)}@supports (color:color-mix(in lab, red, red)){.wp\\:border-white\\/20[data-v-f7279ee0]{border-color:color-mix(in oklab,var(--wp-color-white)20%,transparent)}}.wp\\:border-t-transparent[data-v-f7279ee0]{border-top-color:#0000}.wp\\:border-l-transparent[data-v-f7279ee0]{border-left-color:#0000}.wp\\:bg-amber-100[data-v-f7279ee0]{background-color:var(--wp-color-amber-100)}.wp\\:bg-background[data-v-f7279ee0],.wp\\:bg-background\\/95[data-v-f7279ee0]{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-background\\/95[data-v-f7279ee0]{background-color:color-mix(in oklab,var(--background)95%,transparent)}}.wp\\:bg-black[data-v-f7279ee0],.wp\\:bg-black\\/80[data-v-f7279ee0]{background-color:var(--wp-color-black)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-black\\/80[data-v-f7279ee0]{background-color:color-mix(in oklab,var(--wp-color-black)80%,transparent)}}.wp\\:bg-blue-100[data-v-f7279ee0]{background-color:var(--wp-color-blue-100)}.wp\\:bg-border[data-v-f7279ee0]{background-color:var(--border)}.wp\\:bg-card[data-v-f7279ee0]{background-color:var(--card)}.wp\\:bg-current[data-v-f7279ee0]{background-color:currentColor}.wp\\:bg-destructive[data-v-f7279ee0]{background-color:var(--destructive)}.wp\\:bg-emerald-100[data-v-f7279ee0]{background-color:var(--wp-color-emerald-100)}.wp\\:bg-foreground[data-v-f7279ee0]{background-color:var(--foreground)}.wp\\:bg-muted[data-v-f7279ee0]{background-color:var(--muted)}.wp\\:bg-neutral-100[data-v-f7279ee0]{background-color:var(--wp-color-neutral-100)}.wp\\:bg-neutral-800[data-v-f7279ee0]{background-color:var(--wp-color-neutral-800)}.wp\\:bg-popover[data-v-f7279ee0]{background-color:var(--popover)}.wp\\:bg-primary[data-v-f7279ee0],.wp\\:bg-primary\\/10[data-v-f7279ee0]{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-primary\\/10[data-v-f7279ee0]{background-color:color-mix(in oklab,var(--primary)10%,transparent)}}.wp\\:bg-purple-100[data-v-f7279ee0]{background-color:var(--wp-color-purple-100)}.wp\\:bg-secondary[data-v-f7279ee0]{background-color:var(--secondary)}.wp\\:bg-status-available[data-v-f7279ee0]{background-color:var(--status-available)}.wp\\:bg-status-disconnected[data-v-f7279ee0]{background-color:var(--status-disconnected)}.wp\\:bg-status-hold[data-v-f7279ee0]{background-color:var(--status-hold)}.wp\\:bg-status-incall[data-v-f7279ee0]{background-color:var(--status-incall)}.wp\\:bg-status-incoming[data-v-f7279ee0]{background-color:var(--status-incoming)}.wp\\:bg-transparent[data-v-f7279ee0]{background-color:#0000}.wp\\:bg-white[data-v-f7279ee0]{background-color:var(--wp-color-white)}.wp\\:fill-current[data-v-f7279ee0]{fill:currentColor}.wp\\:fill-foreground[data-v-f7279ee0]{fill:var(--foreground)}.wp\\:object-contain[data-v-f7279ee0]{object-fit:contain}.wp\\:object-cover[data-v-f7279ee0]{object-fit:cover}.wp\\:p-0[data-v-f7279ee0]{padding:calc(var(--wp-spacing)*0)}.wp\\:p-0\\.5[data-v-f7279ee0]{padding:calc(var(--wp-spacing)*.5)}.wp\\:p-1[data-v-f7279ee0]{padding:calc(var(--wp-spacing)*1)}.wp\\:p-2[data-v-f7279ee0]{padding:calc(var(--wp-spacing)*2)}.wp\\:p-3[data-v-f7279ee0]{padding:calc(var(--wp-spacing)*3)}.wp\\:p-4[data-v-f7279ee0]{padding:calc(var(--wp-spacing)*4)}.wp\\:p-6[data-v-f7279ee0]{padding:calc(var(--wp-spacing)*6)}.wp\\:p-px[data-v-f7279ee0]{padding:1px}.wp\\:px-1[data-v-f7279ee0]{padding-inline:calc(var(--wp-spacing)*1)}.wp\\:px-1\\.5[data-v-f7279ee0]{padding-inline:calc(var(--wp-spacing)*1.5)}.wp\\:px-2[data-v-f7279ee0]{padding-inline:calc(var(--wp-spacing)*2)}.wp\\:px-2\\.5[data-v-f7279ee0]{padding-inline:calc(var(--wp-spacing)*2.5)}.wp\\:px-3[data-v-f7279ee0]{padding-inline:calc(var(--wp-spacing)*3)}.wp\\:px-4[data-v-f7279ee0]{padding-inline:calc(var(--wp-spacing)*4)}.wp\\:px-6[data-v-f7279ee0]{padding-inline:calc(var(--wp-spacing)*6)}.wp\\:py-1[data-v-f7279ee0]{padding-block:calc(var(--wp-spacing)*1)}.wp\\:py-1\\.5[data-v-f7279ee0]{padding-block:calc(var(--wp-spacing)*1.5)}.wp\\:py-2[data-v-f7279ee0]{padding-block:calc(var(--wp-spacing)*2)}.wp\\:py-3[data-v-f7279ee0]{padding-block:calc(var(--wp-spacing)*3)}.wp\\:py-4[data-v-f7279ee0]{padding-block:calc(var(--wp-spacing)*4)}.wp\\:py-6[data-v-f7279ee0]{padding-block:calc(var(--wp-spacing)*6)}.wp\\:py-8[data-v-f7279ee0]{padding-block:calc(var(--wp-spacing)*8)}.wp\\:pt-0[data-v-f7279ee0]{padding-top:calc(var(--wp-spacing)*0)}.wp\\:pr-2[data-v-f7279ee0]{padding-right:calc(var(--wp-spacing)*2)}.wp\\:pr-4[data-v-f7279ee0]{padding-right:calc(var(--wp-spacing)*4)}.wp\\:pr-8[data-v-f7279ee0]{padding-right:calc(var(--wp-spacing)*8)}.wp\\:pb-4[data-v-f7279ee0]{padding-bottom:calc(var(--wp-spacing)*4)}.wp\\:pl-2[data-v-f7279ee0]{padding-left:calc(var(--wp-spacing)*2)}.wp\\:pl-8[data-v-f7279ee0]{padding-left:calc(var(--wp-spacing)*8)}.wp\\:text-center[data-v-f7279ee0]{text-align:center}.wp\\:text-left[data-v-f7279ee0]{text-align:left}.wp\\:font-mono[data-v-f7279ee0]{font-family:var(--wp-font-mono)}.wp\\:font-sans[data-v-f7279ee0]{font-family:Montserrat,sans-serif}.wp\\:text-3xl[data-v-f7279ee0]{font-size:var(--wp-text-3xl);line-height:var(--tw-leading,var(--wp-text-3xl--line-height))}.wp\\:text-base[data-v-f7279ee0]{font-size:var(--wp-text-base);line-height:var(--tw-leading,var(--wp-text-base--line-height))}.wp\\:text-lg[data-v-f7279ee0]{font-size:var(--wp-text-lg);line-height:var(--tw-leading,var(--wp-text-lg--line-height))}.wp\\:text-sm[data-v-f7279ee0]{font-size:var(--wp-text-sm);line-height:var(--tw-leading,var(--wp-text-sm--line-height))}.wp\\:text-xl[data-v-f7279ee0]{font-size:var(--wp-text-xl);line-height:var(--tw-leading,var(--wp-text-xl--line-height))}.wp\\:text-xs[data-v-f7279ee0]{font-size:var(--wp-text-xs);line-height:var(--tw-leading,var(--wp-text-xs--line-height))}.wp\\:text-\\[10px\\][data-v-f7279ee0]{font-size:10px}.wp\\:leading-none[data-v-f7279ee0]{--tw-leading:1;line-height:1}.wp\\:font-bold[data-v-f7279ee0]{--tw-font-weight:var(--wp-font-weight-bold);font-weight:var(--wp-font-weight-bold)}.wp\\:font-light[data-v-f7279ee0]{--tw-font-weight:var(--wp-font-weight-light);font-weight:var(--wp-font-weight-light)}.wp\\:font-medium[data-v-f7279ee0]{--tw-font-weight:var(--wp-font-weight-medium);font-weight:var(--wp-font-weight-medium)}.wp\\:font-semibold[data-v-f7279ee0]{--tw-font-weight:var(--wp-font-weight-semibold);font-weight:var(--wp-font-weight-semibold)}.wp\\:tracking-wider[data-v-f7279ee0]{--tw-tracking:var(--wp-tracking-wider);letter-spacing:var(--wp-tracking-wider)}.wp\\:tracking-widest[data-v-f7279ee0]{--tw-tracking:var(--wp-tracking-widest);letter-spacing:var(--wp-tracking-widest)}.wp\\:text-balance[data-v-f7279ee0]{text-wrap:balance}.wp\\:whitespace-nowrap[data-v-f7279ee0]{white-space:nowrap}.wp\\:text-amber-500[data-v-f7279ee0]{color:var(--wp-color-amber-500)}.wp\\:text-amber-600[data-v-f7279ee0]{color:var(--wp-color-amber-600)}.wp\\:text-background[data-v-f7279ee0]{color:var(--background)}.wp\\:text-blue-500[data-v-f7279ee0]{color:var(--wp-color-blue-500)}.wp\\:text-blue-600[data-v-f7279ee0]{color:var(--wp-color-blue-600)}.wp\\:text-card-foreground[data-v-f7279ee0]{color:var(--card-foreground)}.wp\\:text-destructive[data-v-f7279ee0]{color:var(--destructive)}.wp\\:text-emerald-600[data-v-f7279ee0]{color:var(--wp-color-emerald-600)}.wp\\:text-foreground[data-v-f7279ee0]{color:var(--foreground)}.wp\\:text-green-500[data-v-f7279ee0]{color:var(--wp-color-green-500)}.wp\\:text-muted-foreground[data-v-f7279ee0]{color:var(--muted-foreground)}.wp\\:text-neutral-400[data-v-f7279ee0]{color:var(--wp-color-neutral-400)}.wp\\:text-neutral-600[data-v-f7279ee0]{color:var(--wp-color-neutral-600)}.wp\\:text-neutral-800[data-v-f7279ee0]{color:var(--wp-color-neutral-800)}.wp\\:text-neutral-900[data-v-f7279ee0]{color:var(--wp-color-neutral-900)}.wp\\:text-popover-foreground[data-v-f7279ee0]{color:var(--popover-foreground)}.wp\\:text-primary[data-v-f7279ee0]{color:var(--primary)}.wp\\:text-primary-foreground[data-v-f7279ee0]{color:var(--primary-foreground)}.wp\\:text-purple-600[data-v-f7279ee0]{color:var(--wp-color-purple-600)}.wp\\:text-red-500[data-v-f7279ee0]{color:var(--wp-color-red-500)}.wp\\:text-secondary-foreground[data-v-f7279ee0]{color:var(--secondary-foreground)}.wp\\:text-status-available[data-v-f7279ee0]{color:var(--status-available)}.wp\\:text-status-disconnected[data-v-f7279ee0]{color:var(--status-disconnected)}.wp\\:text-status-hold[data-v-f7279ee0]{color:var(--status-hold)}.wp\\:text-status-incall[data-v-f7279ee0]{color:var(--status-incall)}.wp\\:text-status-incoming[data-v-f7279ee0]{color:var(--status-incoming)}.wp\\:text-white[data-v-f7279ee0]{color:var(--wp-color-white)}.wp\\:capitalize[data-v-f7279ee0]{text-transform:capitalize}.wp\\:normal-case[data-v-f7279ee0]{text-transform:none}.wp\\:underline-offset-4[data-v-f7279ee0]{text-underline-offset:4px}.wp\\:opacity-0[data-v-f7279ee0]{opacity:0}.wp\\:opacity-50[data-v-f7279ee0]{opacity:.5}.wp\\:opacity-70[data-v-f7279ee0]{opacity:.7}.wp\\:opacity-100[data-v-f7279ee0]{opacity:1}.wp\\:shadow-\\[0_0_8px_currentColor\\][data-v-f7279ee0]{--tw-shadow:0 0 8px var(--tw-shadow-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\\:shadow-lg[data-v-f7279ee0]{--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-f7279ee0]{--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-f7279ee0]{--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-xl[data-v-f7279ee0]{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px 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-f7279ee0]{--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\\:ring-ring\\/50[data-v-f7279ee0]{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.wp\\:ring-ring\\/50[data-v-f7279ee0]{--tw-ring-color:color-mix(in oklab,var(--ring)50%,transparent)}}.wp\\:ring-offset-background[data-v-f7279ee0]{--tw-ring-offset-color:var(--background)}.wp\\:outline-hidden[data-v-f7279ee0]{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.wp\\:outline-hidden[data-v-f7279ee0]{outline-offset:2px;outline:2px solid #0000}}.wp\\:backdrop-blur[data-v-f7279ee0]{--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\\:transition-\\[color\\,box-shadow\\][data-v-f7279ee0]{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-f7279ee0]{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-f7279ee0]{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-f7279ee0]{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-f7279ee0]{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-200[data-v-f7279ee0]{--tw-duration:.2s;transition-duration:.2s}.wp\\:duration-300[data-v-f7279ee0]{--tw-duration:.3s;transition-duration:.3s}.wp\\:ease-in-out[data-v-f7279ee0]{--tw-ease:var(--wp-ease-in-out);transition-timing-function:var(--wp-ease-in-out)}.wp\\:fade-in-0[data-v-f7279ee0]{--tw-enter-opacity:0}.wp\\:outline-none[data-v-f7279ee0]{--tw-outline-style:none;outline-style:none}.wp\\:select-none[data-v-f7279ee0]{-webkit-user-select:none;user-select:none}.wp\\:select-text[data-v-f7279ee0]{-webkit-user-select:text;user-select:text}.wp\\:zoom-in-95[data-v-f7279ee0]{--tw-enter-scale:.95}.wp\\:group-data-\\[disabled\\=true\\]\\:pointer-events-none[data-v-f7279ee0]:is(:where(.wp\\:group)[data-disabled=true] *){pointer-events:none}.wp\\:group-data-\\[disabled\\=true\\]\\:opacity-50[data-v-f7279ee0]:is(:where(.wp\\:group)[data-disabled=true] *){opacity:.5}.wp\\:peer-disabled\\:cursor-not-allowed[data-v-f7279ee0]:is(:where(.wp\\:peer):disabled~*){cursor:not-allowed}.wp\\:peer-disabled\\:opacity-50[data-v-f7279ee0]:is(:where(.wp\\:peer):disabled~*){opacity:.5}.wp\\:selection\\:bg-primary[data-v-f7279ee0] ::selection,.wp\\:selection\\:bg-primary[data-v-f7279ee0]::selection{background-color:var(--primary)}.wp\\:selection\\:text-primary-foreground[data-v-f7279ee0] ::selection,.wp\\:selection\\:text-primary-foreground[data-v-f7279ee0]::selection{color:var(--primary-foreground)}.wp\\:file\\:inline-flex[data-v-f7279ee0]::-webkit-file-upload-button{display:inline-flex}.wp\\:file\\:inline-flex[data-v-f7279ee0]::file-selector-button{display:inline-flex}.wp\\:file\\:h-7[data-v-f7279ee0]::-webkit-file-upload-button{height:calc(var(--wp-spacing)*7)}.wp\\:file\\:h-7[data-v-f7279ee0]::file-selector-button{height:calc(var(--wp-spacing)*7)}.wp\\:file\\:border-0[data-v-f7279ee0]::-webkit-file-upload-button{border-style:var(--tw-border-style);border-width:0}.wp\\:file\\:border-0[data-v-f7279ee0]::file-selector-button{border-style:var(--tw-border-style);border-width:0}.wp\\:file\\:bg-transparent[data-v-f7279ee0]::-webkit-file-upload-button{background-color:#0000}.wp\\:file\\:bg-transparent[data-v-f7279ee0]::file-selector-button{background-color:#0000}.wp\\:file\\:text-sm[data-v-f7279ee0]::-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-f7279ee0]::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-f7279ee0]::-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-f7279ee0]::file-selector-button{--tw-font-weight:var(--wp-font-weight-medium);font-weight:var(--wp-font-weight-medium)}.wp\\:file\\:text-foreground[data-v-f7279ee0]::-webkit-file-upload-button{color:var(--foreground)}.wp\\:file\\:text-foreground[data-v-f7279ee0]::file-selector-button{color:var(--foreground)}.wp\\:placeholder\\:text-muted-foreground[data-v-f7279ee0]::placeholder{color:var(--muted-foreground)}.wp\\:last\\:border-b-0[data-v-f7279ee0]:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media (hover:hover){.wp\\:hover\\:bg-accent[data-v-f7279ee0]:hover,.wp\\:hover\\:bg-accent\\/50[data-v-f7279ee0]:hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-accent\\/50[data-v-f7279ee0]:hover{background-color:color-mix(in oklab,var(--accent)50%,transparent)}}.wp\\:hover\\:bg-destructive\\/90[data-v-f7279ee0]:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-destructive\\/90[data-v-f7279ee0]:hover{background-color:color-mix(in oklab,var(--destructive)90%,transparent)}}.wp\\:hover\\:bg-muted[data-v-f7279ee0]:hover{background-color:var(--muted)}.wp\\:hover\\:bg-neutral-200[data-v-f7279ee0]:hover{background-color:var(--wp-color-neutral-200)}.wp\\:hover\\:bg-primary\\/90[data-v-f7279ee0]:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-primary\\/90[data-v-f7279ee0]:hover{background-color:color-mix(in oklab,var(--primary)90%,transparent)}}.wp\\:hover\\:bg-secondary[data-v-f7279ee0]:hover,.wp\\:hover\\:bg-secondary\\/80[data-v-f7279ee0]:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-secondary\\/80[data-v-f7279ee0]:hover{background-color:color-mix(in oklab,var(--secondary)80%,transparent)}}.wp\\:hover\\:bg-status-available\\/90[data-v-f7279ee0]:hover{background-color:var(--status-available)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-status-available\\/90[data-v-f7279ee0]:hover{background-color:color-mix(in oklab,var(--status-available)90%,transparent)}}.wp\\:hover\\:bg-status-disconnected\\/90[data-v-f7279ee0]:hover{background-color:var(--status-disconnected)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-status-disconnected\\/90[data-v-f7279ee0]:hover{background-color:color-mix(in oklab,var(--status-disconnected)90%,transparent)}}.wp\\:hover\\:bg-status-hold\\/90[data-v-f7279ee0]:hover{background-color:var(--status-hold)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-status-hold\\/90[data-v-f7279ee0]:hover{background-color:color-mix(in oklab,var(--status-hold)90%,transparent)}}.wp\\:hover\\:bg-status-incall\\/90[data-v-f7279ee0]:hover{background-color:var(--status-incall)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-status-incall\\/90[data-v-f7279ee0]:hover{background-color:color-mix(in oklab,var(--status-incall)90%,transparent)}}.wp\\:hover\\:bg-transparent[data-v-f7279ee0]:hover{background-color:#0000}.wp\\:hover\\:text-accent-foreground[data-v-f7279ee0]:hover{color:var(--accent-foreground)}.wp\\:hover\\:text-destructive[data-v-f7279ee0]:hover{color:var(--destructive)}.wp\\:hover\\:text-muted-foreground[data-v-f7279ee0]:hover{color:var(--muted-foreground)}.wp\\:hover\\:text-status-available[data-v-f7279ee0]:hover,.wp\\:hover\\:text-status-available\\/80[data-v-f7279ee0]:hover{color:var(--status-available)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-available\\/80[data-v-f7279ee0]:hover{color:color-mix(in oklab,var(--status-available)80%,transparent)}}.wp\\:hover\\:text-status-disconnected[data-v-f7279ee0]:hover,.wp\\:hover\\:text-status-disconnected\\/80[data-v-f7279ee0]:hover{color:var(--status-disconnected)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-disconnected\\/80[data-v-f7279ee0]:hover{color:color-mix(in oklab,var(--status-disconnected)80%,transparent)}}.wp\\:hover\\:text-status-hold[data-v-f7279ee0]:hover,.wp\\:hover\\:text-status-hold\\/80[data-v-f7279ee0]:hover{color:var(--status-hold)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-hold\\/80[data-v-f7279ee0]:hover{color:color-mix(in oklab,var(--status-hold)80%,transparent)}}.wp\\:hover\\:text-status-incall[data-v-f7279ee0]:hover,.wp\\:hover\\:text-status-incall\\/80[data-v-f7279ee0]:hover{color:var(--status-incall)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-incall\\/80[data-v-f7279ee0]:hover{color:color-mix(in oklab,var(--status-incall)80%,transparent)}}.wp\\:hover\\:text-status-incoming[data-v-f7279ee0]:hover,.wp\\:hover\\:text-status-incoming\\/80[data-v-f7279ee0]:hover{color:var(--status-incoming)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-incoming\\/80[data-v-f7279ee0]:hover{color:color-mix(in oklab,var(--status-incoming)80%,transparent)}}.wp\\:hover\\:underline[data-v-f7279ee0]:hover{text-decoration-line:underline}.wp\\:hover\\:opacity-100[data-v-f7279ee0]:hover{opacity:1}.wp\\:hover\\:ring-4[data-v-f7279ee0]: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-f7279ee0]:focus{z-index:10}.wp\\:focus\\:bg-accent[data-v-f7279ee0]:focus{background-color:var(--accent)}.wp\\:focus\\:text-accent-foreground[data-v-f7279ee0]:focus{color:var(--accent-foreground)}.wp\\:focus\\:ring-2[data-v-f7279ee0]: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-f7279ee0]:focus{--tw-ring-color:var(--ring)}.wp\\:focus\\:ring-offset-2[data-v-f7279ee0]: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-f7279ee0]:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.wp\\:focus\\:outline-hidden[data-v-f7279ee0]:focus{outline-offset:2px;outline:2px solid #0000}}.wp\\:focus-visible\\:z-10[data-v-f7279ee0]:focus-visible{z-index:10}.wp\\:focus-visible\\:border-ring[data-v-f7279ee0]:focus-visible{border-color:var(--ring)}.wp\\:focus-visible\\:ring-4[data-v-f7279ee0]: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-f7279ee0]: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-destructive\\/20[data-v-f7279ee0]:focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:focus-visible\\:ring-destructive\\/20[data-v-f7279ee0]:focus-visible{--tw-ring-color:color-mix(in oklab,var(--destructive)20%,transparent)}}.wp\\:focus-visible\\:ring-ring\\/50[data-v-f7279ee0]:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.wp\\:focus-visible\\:ring-ring\\/50[data-v-f7279ee0]:focus-visible{--tw-ring-color:color-mix(in oklab,var(--ring)50%,transparent)}}.wp\\:focus-visible\\:outline-hidden[data-v-f7279ee0]:focus-visible{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.wp\\:focus-visible\\:outline-hidden[data-v-f7279ee0]:focus-visible{outline-offset:2px;outline:2px solid #0000}}.wp\\:focus-visible\\:outline-1[data-v-f7279ee0]:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.wp\\:active\\:scale-95[data-v-f7279ee0]: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-f7279ee0]:disabled{pointer-events:none}.wp\\:disabled\\:cursor-not-allowed[data-v-f7279ee0]:disabled{cursor:not-allowed}.wp\\:disabled\\:opacity-50[data-v-f7279ee0]:disabled{opacity:.5}.wp\\:has-data-\\[slot\\=card-action\\]\\:grid-cols-\\[1fr_auto\\][data-v-f7279ee0]:has([data-slot=card-action]){grid-template-columns:1fr auto}.wp\\:has-\\[\\>svg\\]\\:px-2\\.5[data-v-f7279ee0]:has(>svg){padding-inline:calc(var(--wp-spacing)*2.5)}.wp\\:has-\\[\\>svg\\]\\:px-3[data-v-f7279ee0]:has(>svg){padding-inline:calc(var(--wp-spacing)*3)}.wp\\:has-\\[\\>svg\\]\\:px-4[data-v-f7279ee0]:has(>svg){padding-inline:calc(var(--wp-spacing)*4)}.wp\\:aria-invalid\\:border-destructive[aria-invalid=true][data-v-f7279ee0]{border-color:var(--destructive)}.wp\\:aria-invalid\\:ring-destructive\\/20[aria-invalid=true][data-v-f7279ee0]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:aria-invalid\\:ring-destructive\\/20[aria-invalid=true][data-v-f7279ee0]{--tw-ring-color:color-mix(in oklab,var(--destructive)20%,transparent)}}.wp\\:data-\\[disabled\\]\\:pointer-events-none[data-disabled][data-v-f7279ee0]{pointer-events:none}.wp\\:data-\\[disabled\\]\\:opacity-50[data-disabled][data-v-f7279ee0]{opacity:.5}.wp\\:data-\\[highlighted\\]\\:bg-accent[data-highlighted][data-v-f7279ee0]{background-color:var(--accent)}.wp\\:data-\\[highlighted\\]\\:text-accent-foreground[data-highlighted][data-v-f7279ee0]{color:var(--accent-foreground)}.wp\\:data-\\[inset\\]\\:pl-8[data-inset][data-v-f7279ee0]{padding-left:calc(var(--wp-spacing)*8)}.wp\\:data-\\[orientation\\=horizontal\\]\\:h-1\\.5[data-orientation=horizontal][data-v-f7279ee0]{height:calc(var(--wp-spacing)*1.5)}.wp\\:data-\\[orientation\\=horizontal\\]\\:h-full[data-orientation=horizontal][data-v-f7279ee0]{height:100%}.wp\\:data-\\[orientation\\=horizontal\\]\\:h-px[data-orientation=horizontal][data-v-f7279ee0]{height:1px}.wp\\:data-\\[orientation\\=horizontal\\]\\:w-full[data-orientation=horizontal][data-v-f7279ee0]{width:100%}.wp\\:data-\\[orientation\\=vertical\\]\\:h-full[data-orientation=vertical][data-v-f7279ee0]{height:100%}.wp\\:data-\\[orientation\\=vertical\\]\\:min-h-44[data-orientation=vertical][data-v-f7279ee0]{min-height:calc(var(--wp-spacing)*44)}.wp\\:data-\\[orientation\\=vertical\\]\\:w-1\\.5[data-orientation=vertical][data-v-f7279ee0]{width:calc(var(--wp-spacing)*1.5)}.wp\\:data-\\[orientation\\=vertical\\]\\:w-auto[data-orientation=vertical][data-v-f7279ee0]{width:auto}.wp\\:data-\\[orientation\\=vertical\\]\\:w-full[data-orientation=vertical][data-v-f7279ee0]{width:100%}.wp\\:data-\\[orientation\\=vertical\\]\\:w-px[data-orientation=vertical][data-v-f7279ee0]{width:1px}.wp\\:data-\\[orientation\\=vertical\\]\\:flex-col[data-orientation=vertical][data-v-f7279ee0]{flex-direction:column}.wp\\:data-\\[placeholder\\]\\:text-muted-foreground[data-placeholder][data-v-f7279ee0]{color:var(--muted-foreground)}.wp\\:data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom][data-v-f7279ee0]{--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-f7279ee0]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.wp\\:data-\\[side\\=left\\]\\:-translate-x-1[data-side=left][data-v-f7279ee0]{--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-f7279ee0]{--tw-enter-translate-x:calc(2*var(--spacing))}.wp\\:data-\\[side\\=right\\]\\:translate-x-1[data-side=right][data-v-f7279ee0]{--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-f7279ee0]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.wp\\:data-\\[side\\=top\\]\\:-translate-y-1[data-side=top][data-v-f7279ee0]{--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-f7279ee0]{--tw-enter-translate-y:calc(2*var(--spacing))}.wp\\:data-\\[size\\=default\\]\\:h-9[data-size=default][data-v-f7279ee0]{height:calc(var(--wp-spacing)*9)}.wp\\:data-\\[size\\=sm\\]\\:h-8[data-size=sm][data-v-f7279ee0]{height:calc(var(--wp-spacing)*8)}:is(.wp\\:\\*\\:data-\\[slot\\=select-value\\]\\:line-clamp-1>*)[data-slot=select-value][data-v-f7279ee0]{-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-f7279ee0]{display:flex}:is(.wp\\:\\*\\:data-\\[slot\\=select-value\\]\\:items-center>*)[data-slot=select-value][data-v-f7279ee0]{align-items:center}:is(.wp\\:\\*\\:data-\\[slot\\=select-value\\]\\:gap-2>*)[data-slot=select-value][data-v-f7279ee0]{gap:calc(var(--wp-spacing)*2)}.wp\\:data-\\[spacing\\=0\\]\\:rounded-none[data-spacing="0"][data-v-f7279ee0]{border-radius:0}.wp\\:data-\\[spacing\\=0\\]\\:shadow-none[data-spacing="0"][data-v-f7279ee0]{--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-f7279ee0]: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-f7279ee0]: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-f7279ee0]{animation:accordion-up-f7279ee0 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-f7279ee0]{animation:exit-f7279ee0 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-f7279ee0]{--tw-exit-opacity:0}.wp\\:data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed][data-v-f7279ee0]{--tw-exit-scale:.95}.wp\\:data-\\[state\\=on\\]\\:bg-accent[data-state=on][data-v-f7279ee0]{background-color:var(--accent)}.wp\\:data-\\[state\\=on\\]\\:text-accent-foreground[data-state=on][data-v-f7279ee0]{color:var(--accent-foreground)}.wp\\:data-\\[state\\=open\\]\\:animate-accordion-down[data-state=open][data-v-f7279ee0]{animation:accordion-down-f7279ee0 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-f7279ee0]{animation:enter-f7279ee0 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-f7279ee0]{background-color:var(--accent)}.wp\\:data-\\[state\\=open\\]\\:text-accent-foreground[data-state=open][data-v-f7279ee0]{color:var(--accent-foreground)}.wp\\:data-\\[state\\=open\\]\\:text-muted-foreground[data-state=open][data-v-f7279ee0]{color:var(--muted-foreground)}.wp\\:data-\\[state\\=open\\]\\:fade-in-0[data-state=open][data-v-f7279ee0]{--tw-enter-opacity:0}.wp\\:data-\\[state\\=open\\]\\:zoom-in-95[data-state=open][data-v-f7279ee0]{--tw-enter-scale:.95}.wp\\:data-\\[variant\\=destructive\\]\\:text-destructive[data-variant=destructive][data-v-f7279ee0]{color:var(--destructive)}.wp\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/10[data-variant=destructive][data-v-f7279ee0]: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-f7279ee0]:focus{background-color:color-mix(in oklab,var(--destructive)10%,transparent)}}.wp\\:data-\\[variant\\=destructive\\]\\:focus\\:text-destructive[data-variant=destructive][data-v-f7279ee0]:focus{color:var(--destructive)}.wp\\:data-\\[spacing\\=0\\]\\:data-\\[variant\\=outline\\]\\:border-l-0[data-spacing="0"][data-variant=outline][data-v-f7279ee0]{border-left-style:var(--tw-border-style);border-left-width:0}.wp\\:data-\\[spacing\\=0\\]\\:data-\\[variant\\=outline\\]\\:first\\:border-l[data-spacing="0"][data-variant=outline][data-v-f7279ee0]:first-child{border-left-style:var(--tw-border-style);border-left-width:1px}.wp\\:data-\\[spacing\\=default\\]\\:data-\\[variant\\=outline\\]\\:shadow-xs[data-spacing=default][data-variant=outline][data-v-f7279ee0]{--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-f7279ee0]{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.wp\\:supports-backdrop-filter\\:bg-background\\/60[data-v-f7279ee0]{background-color:color-mix(in oklab,var(--background)60%,transparent)}}}@media (min-width:40rem){.wp\\:sm\\:block[data-v-f7279ee0]{display:block}.wp\\:sm\\:inline[data-v-f7279ee0]{display:inline}.wp\\:sm\\:inline-block[data-v-f7279ee0]{display:inline-block}.wp\\:sm\\:max-w-lg[data-v-f7279ee0]{max-width:var(--wp-container-lg)}.wp\\:sm\\:max-w-md[data-v-f7279ee0]{max-width:var(--wp-container-md)}.wp\\:sm\\:max-w-sm[data-v-f7279ee0]{max-width:var(--wp-container-sm)}.wp\\:sm\\:flex-row[data-v-f7279ee0]{flex-direction:row}.wp\\:sm\\:justify-end[data-v-f7279ee0]{justify-content:flex-end}.wp\\:sm\\:gap-0[data-v-f7279ee0]{gap:calc(var(--wp-spacing)*0)}.wp\\:sm\\:rounded-lg[data-v-f7279ee0]{border-radius:var(--radius)}.wp\\:sm\\:text-left[data-v-f7279ee0]{text-align:left}}@media (min-width:48rem){.wp\\:md\\:w-full[data-v-f7279ee0]{width:100%}.wp\\:md\\:text-sm[data-v-f7279ee0]{font-size:var(--wp-text-sm);line-height:var(--tw-leading,var(--wp-text-sm--line-height))}}.wp\\:dark\\:border-input[data-v-f7279ee0]:where(.dark,.dark *){border-color:var(--input)}.wp\\:dark\\:bg-amber-900\\/30[data-v-f7279ee0]: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-f7279ee0]:where(.dark,.dark *){background-color:color-mix(in oklab,var(--wp-color-amber-900)30%,transparent)}}.wp\\:dark\\:bg-blue-900\\/30[data-v-f7279ee0]: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-f7279ee0]:where(.dark,.dark *){background-color:color-mix(in oklab,var(--wp-color-blue-900)30%,transparent)}}.wp\\:dark\\:bg-destructive\\/60[data-v-f7279ee0]:where(.dark,.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-destructive\\/60[data-v-f7279ee0]:where(.dark,.dark *){background-color:color-mix(in oklab,var(--destructive)60%,transparent)}}.wp\\:dark\\:bg-emerald-900\\/30[data-v-f7279ee0]: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-f7279ee0]:where(.dark,.dark *){background-color:color-mix(in oklab,var(--wp-color-emerald-900)30%,transparent)}}.wp\\:dark\\:bg-input\\/30[data-v-f7279ee0]:where(.dark,.dark *){background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-input\\/30[data-v-f7279ee0]:where(.dark,.dark *){background-color:color-mix(in oklab,var(--input)30%,transparent)}}.wp\\:dark\\:bg-neutral-800[data-v-f7279ee0]:where(.dark,.dark *){background-color:var(--wp-color-neutral-800)}.wp\\:dark\\:bg-neutral-900[data-v-f7279ee0]:where(.dark,.dark *){background-color:var(--wp-color-neutral-900)}.wp\\:dark\\:bg-purple-900\\/30[data-v-f7279ee0]: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-f7279ee0]:where(.dark,.dark *){background-color:color-mix(in oklab,var(--wp-color-purple-900)30%,transparent)}}.wp\\:dark\\:text-amber-400[data-v-f7279ee0]:where(.dark,.dark *){color:var(--wp-color-amber-400)}.wp\\:dark\\:text-blue-400[data-v-f7279ee0]:where(.dark,.dark *){color:var(--wp-color-blue-400)}.wp\\:dark\\:text-emerald-400[data-v-f7279ee0]:where(.dark,.dark *){color:var(--wp-color-emerald-400)}.wp\\:dark\\:text-neutral-400[data-v-f7279ee0]:where(.dark,.dark *){color:var(--wp-color-neutral-400)}.wp\\:dark\\:text-neutral-500[data-v-f7279ee0]:where(.dark,.dark *){color:var(--wp-color-neutral-500)}.wp\\:dark\\:text-neutral-800[data-v-f7279ee0]:where(.dark,.dark *){color:var(--wp-color-neutral-800)}.wp\\:dark\\:text-purple-400[data-v-f7279ee0]:where(.dark,.dark *){color:var(--wp-color-purple-400)}.wp\\:dark\\:text-white[data-v-f7279ee0]:where(.dark,.dark *){color:var(--wp-color-white)}@media (hover:hover){.wp\\:dark\\:hover\\:bg-accent\\/50[data-v-f7279ee0]:where(.dark,.dark *):hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:hover\\:bg-accent\\/50[data-v-f7279ee0]:where(.dark,.dark *):hover{background-color:color-mix(in oklab,var(--accent)50%,transparent)}}.wp\\:dark\\:hover\\:bg-input\\/50[data-v-f7279ee0]:where(.dark,.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:hover\\:bg-input\\/50[data-v-f7279ee0]:where(.dark,.dark *):hover{background-color:color-mix(in oklab,var(--input)50%,transparent)}}.wp\\:dark\\:hover\\:bg-neutral-700[data-v-f7279ee0]:where(.dark,.dark *):hover{background-color:var(--wp-color-neutral-700)}.wp\\:dark\\:hover\\:text-status-disconnected[data-v-f7279ee0]:where(.dark,.dark *):hover{color:var(--status-disconnected)}}.wp\\:dark\\:focus-visible\\:ring-destructive\\/40[data-v-f7279ee0]: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-f7279ee0]:where(.dark,.dark *):focus-visible{--tw-ring-color:color-mix(in oklab,var(--destructive)40%,transparent)}}.wp\\:dark\\:aria-invalid\\:ring-destructive\\/40:where(.dark,.dark *)[aria-invalid=true][data-v-f7279ee0]{--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-f7279ee0]{--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-f7279ee0]: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-f7279ee0]:focus{background-color:color-mix(in oklab,var(--destructive)20%,transparent)}}.wp\\:\\[\\&_button\\]\\:cursor-pointer button[data-v-f7279ee0]{cursor:pointer}.wp\\:\\[\\&_svg\\]\\:pointer-events-none svg[data-v-f7279ee0]{pointer-events:none}.wp\\:\\[\\&_svg\\]\\:shrink-0 svg[data-v-f7279ee0]{flex-shrink:0}.wp\\:\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4 svg[data-v-f7279ee0]: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-f7279ee0]: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-f7279ee0]: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-f7279ee0]:not([class*="'text-'"]){color:var(--muted-foreground)}.wp\\:\\[\\.border-b\\]\\:pb-6.border-b[data-v-f7279ee0]{padding-bottom:calc(var(--wp-spacing)*6)}.wp\\:\\[\\.border-t\\]\\:pt-6.border-t[data-v-f7279ee0]{padding-top:calc(var(--wp-spacing)*6)}:is(.wp\\:\\*\\*\\:\\[\\[role\\=button\\]\\]\\:cursor-pointer *)[role=button][data-v-f7279ee0]{cursor:pointer}:-webkit-any(.wp\\:\\*\\:\\[span\\]\\:last\\:flex[data-v-f7279ee0]>*):-webkit-any(span):last-child{display:flex}:is(.wp\\:\\*\\:\\[span\\]\\:last\\:flex[data-v-f7279ee0]>*):is(span):last-child{display:flex}:-webkit-any(.wp\\:\\*\\:\\[span\\]\\:last\\:items-center[data-v-f7279ee0]>*):-webkit-any(span):last-child{align-items:center}:is(.wp\\:\\*\\:\\[span\\]\\:last\\:items-center[data-v-f7279ee0]>*):is(span):last-child{align-items:center}:-webkit-any(.wp\\:\\*\\:\\[span\\]\\:last\\:gap-2[data-v-f7279ee0]>*):-webkit-any(span):last-child{gap:calc(var(--wp-spacing)*2)}:is(.wp\\:\\*\\:\\[span\\]\\:last\\:gap-2[data-v-f7279ee0]>*):is(span):last-child{gap:calc(var(--wp-spacing)*2)}:-webkit-any(.wp\\:data-\\[variant\\=destructive\\]\\:\\*\\:\\[svg\\]\\:\\!text-destructive[data-variant=destructive][data-v-f7279ee0]>*):-webkit-any(svg){color:var(--destructive)!important}:is(.wp\\:data-\\[variant\\=destructive\\]\\:\\*\\:\\[svg\\]\\:\\!text-destructive[data-variant=destructive][data-v-f7279ee0]>*):is(svg){color:var(--destructive)!important}.wp\\:\\[\\&\\[data-state\\=open\\]\\>svg\\]\\:rotate-180[data-state=open]>svg[data-v-f7279ee0]{rotate:180deg}[data-slot=tooltip-content] .wp\\:\\[\\[data-slot\\=tooltip-content\\]_\\&\\]\\:bg-background\\/20[data-v-f7279ee0]{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-f7279ee0]{background-color:color-mix(in oklab,var(--background)20%,transparent)}}[data-slot=tooltip-content] .wp\\:\\[\\[data-slot\\=tooltip-content\\]_\\&\\]\\:text-background[data-v-f7279ee0]{color:var(--background)}[data-slot=tooltip-content] .wp\\:dark\\:\\[\\[data-slot\\=tooltip-content\\]_\\&\\]\\:bg-background\\/10[data-v-f7279ee0]: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-f7279ee0]: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}:root{--radius:.625rem;--background:#fff;--foreground:#0a0a0a;--card:#fff;--card-foreground:#0a0a0a;--popover:#fff;--popover-foreground:#0a0a0a;--primary:var(--p-primary-color,#171717);--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:#3080ff;--status-hold:#f5c632;--status-incoming:#ac4bff;--status-disconnected:#fb2c36;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 .266422 .491219 .988624);--status-hold:color(display-p3 .930111 .782506 .322764);--status-incoming:color(display-p3 .629519 .30089 .990817);--status-disconnected:color(display-p3 .903738 .262579 .253307)}}@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% -.0000298023 0);--secondary:lab(96.52% -.0000298023 0);--secondary-foreground:lab(7.78201% -.0000149012 0);--muted:lab(96.52% -.0000298023 0);--muted-foreground:lab(48.496% 0 0);--accent:lab(96.52% -.0000298023 0);--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% 0 0);--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.8671 97.9407);--sidebar:lab(98.26% -.0000298023 0);--sidebar-foreground:lab(2.75381% 0 0);--sidebar-primary:lab(7.78201% -.0000149012 0);--sidebar-primary-foreground:lab(98.26% -.0000298023 0);--sidebar-accent:lab(96.52% -.0000298023 0);--sidebar-accent-foreground:lab(7.78201% -.0000149012 0);--sidebar-border:lab(90.952% 0 -.0000119209);--sidebar-ring:lab(66.128% 0 0);--status-available:lab(59.0978% -58.6621 41.2579);--status-incall:lab(54.1736% 13.3369 -74.6839);--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)}}.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% -.0000298023 0);--card:lab(7.78201% -.0000149012 0);--card-foreground:lab(98.26% -.0000298023 0);--popover:lab(7.78201% -.0000149012 0);--popover-foreground:lab(98.26% -.0000298023 0);--primary:var(--p-primary-color,lab(90.952% 0 -.0000119209));--primary-foreground:lab(7.78201% -.0000149012 0);--secondary:lab(15.204% 0 0);--secondary-foreground:lab(98.26% -.0000298023 0);--muted:lab(15.204% 0 0);--muted-foreground:lab(66.128% 0 0);--accent:lab(15.204% 0 0);--accent-foreground:lab(98.26% -.0000298023 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.8671 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% -.0000298023 0);--sidebar-primary:lab(36.9089% 35.0961 -85.6872);--sidebar-primary-foreground:lab(98.26% -.0000298023 0);--sidebar-accent:lab(15.204% 0 0);--sidebar-accent-foreground:lab(98.26% -.0000298023 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.1084 78.1641);--status-incoming:lab(60.4586% 54.1298 -67.8379);--status-disconnected:lab(63.7053% 60.745 31.3109)}}@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-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 spin{to{transform:rotate(360deg)}}@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}}[data-v-f7279ee0]:root{--radius:.625rem;--background:#fff;--foreground:#0a0a0a;--card:#fff;--card-foreground:#0a0a0a;--popover:#fff;--popover-foreground:#0a0a0a;--primary:var(--p-primary-color,#171717);--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:#3080ff;--status-hold:#f5c632;--status-incoming:#ac4bff;--status-disconnected:#fb2c36;font-family:Montserrat,sans-serif}@supports (color:color(display-p3 0 0 0)){[data-v-f7279ee0]: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 .266422 .491219 .988624);--status-hold:color(display-p3 .930111 .782506 .322764);--status-incoming:color(display-p3 .629519 .30089 .990817);--status-disconnected:color(display-p3 .903738 .262579 .253307)}}@supports (color:lab(0% 0 0)){[data-v-f7279ee0]: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% -.0000298023 0);--secondary:lab(96.52% -.0000298023 0);--secondary-foreground:lab(7.78201% -.0000149012 0);--muted:lab(96.52% -.0000298023 0);--muted-foreground:lab(48.496% 0 0);--accent:lab(96.52% -.0000298023 0);--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% 0 0);--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.8671 97.9407);--sidebar:lab(98.26% -.0000298023 0);--sidebar-foreground:lab(2.75381% 0 0);--sidebar-primary:lab(7.78201% -.0000149012 0);--sidebar-primary-foreground:lab(98.26% -.0000298023 0);--sidebar-accent:lab(96.52% -.0000298023 0);--sidebar-accent-foreground:lab(7.78201% -.0000149012 0);--sidebar-border:lab(90.952% 0 -.0000119209);--sidebar-ring:lab(66.128% 0 0);--status-available:lab(59.0978% -58.6621 41.2579);--status-incall:lab(54.1736% 13.3369 -74.6839);--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)}}.dark[data-v-f7279ee0]{--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-f7279ee0]{--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-f7279ee0]{--background:lab(2.75381% 0 0);--foreground:lab(98.26% -.0000298023 0);--card:lab(7.78201% -.0000149012 0);--card-foreground:lab(98.26% -.0000298023 0);--popover:lab(7.78201% -.0000149012 0);--popover-foreground:lab(98.26% -.0000298023 0);--primary:var(--p-primary-color,lab(90.952% 0 -.0000119209));--primary-foreground:lab(7.78201% -.0000149012 0);--secondary:lab(15.204% 0 0);--secondary-foreground:lab(98.26% -.0000298023 0);--muted:lab(15.204% 0 0);--muted-foreground:lab(66.128% 0 0);--accent:lab(15.204% 0 0);--accent-foreground:lab(98.26% -.0000298023 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.8671 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% -.0000298023 0);--sidebar-primary:lab(36.9089% 35.0961 -85.6872);--sidebar-primary-foreground:lab(98.26% -.0000298023 0);--sidebar-accent:lab(15.204% 0 0);--sidebar-accent-foreground:lab(98.26% -.0000298023 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.1084 78.1641);--status-incoming:lab(60.4586% 54.1298 -67.8379);--status-disconnected:lab(63.7053% 60.745 31.3109)}}@keyframes spin-f7279ee0{to{transform:rotate(360deg)}}@keyframes pulse-f7279ee0{50%{opacity:.5}}@keyframes enter-f7279ee0{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-f7279ee0{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-f7279ee0{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-f7279ee0{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}}
3
3
  /*$vite$:1*/`)),document.head.appendChild(a)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
4
- (function(){var Ac=Object.defineProperty,mg=(e,t)=>{let r={};for(var n in e)Ac(r,n,{get:e[n],enumerable:!0});return t&&Ac(r,Symbol.toStringTag,{value:"Module"}),r};function Hs(e){const t=Object.create(null);for(const r of e.split(","))t[r]=1;return r=>r in t}var He={},Qn=[],Jt=()=>{},kc=()=>!1,Ms=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),aa=e=>e.startsWith("onUpdate:"),Ye=Object.assign,la=(e,t)=>{const r=e.indexOf(t);r>-1&&e.splice(r,1)},wg=Object.prototype.hasOwnProperty,Le=(e,t)=>wg.call(e,t),ge=Array.isArray,es=e=>ts(e)==="[object Map]",An=e=>ts(e)==="[object Set]",Ic=e=>ts(e)==="[object Date]",yg=e=>ts(e)==="[object RegExp]",_e=e=>typeof e=="function",Qe=e=>typeof e=="string",ar=e=>typeof e=="symbol",je=e=>e!==null&&typeof e=="object",ca=e=>(je(e)||_e(e))&&_e(e.then)&&_e(e.catch),Rc=Object.prototype.toString,ts=e=>Rc.call(e),bg=e=>ts(e).slice(8,-1),Ii=e=>ts(e)==="[object Object]",Ri=e=>Qe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,rs=Hs(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),$i=e=>{const t=Object.create(null);return(r=>t[r]||(t[r]=e(r)))},Sg=/-\w/g,ct=$i(e=>e.replace(Sg,t=>t.slice(1).toUpperCase())),Cg=/\B([A-Z])/g,Ot=$i(e=>e.replace(Cg,"-$1").toLowerCase()),qs=$i(e=>e.charAt(0).toUpperCase()+e.slice(1)),ns=$i(e=>e?`on${qs(e)}`:""),kt=(e,t)=>!Object.is(e,t),ss=(e,...t)=>{for(let r=0;r<e.length;r++)e[r](...t)},$c=(e,t,r,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:r})},Di=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Pi=e=>{const t=Qe(e)?Number(e):NaN;return isNaN(t)?e:t},Dc,Oi=()=>Dc||(Dc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),_g=Hs("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(ge(e)){const t={};for(let r=0;r<e.length;r++){const n=e[r],s=Qe(n)?Ag(n):mt(n);if(s)for(const i in s)t[i]=s[i]}return t}else if(Qe(e)||je(e))return e}var xg=/;(?![^(]*\))/g,Tg=/:([^]+)/,Eg=/\/\*[^]*?\*\//g;function Ag(e){const t={};return e.replace(Eg,"").split(xg).forEach(r=>{if(r){const n=r.split(Tg);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Ke(e){let t="";if(Qe(e))t=e;else if(ge(e))for(let r=0;r<e.length;r++){const n=Ke(e[r]);n&&(t+=n+" ")}else if(je(e))for(const r in e)e[r]&&(t+=r+" ");return t.trim()}function Ht(e){if(!e)return null;let{class:t,style:r}=e;return t&&!Qe(t)&&(e.class=Ke(t)),r&&(e.style=mt(r)),e}var Pc="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",kg=Hs(Pc),qT=Hs(Pc+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function Oc(e){return!!e||e===""}function Ig(e,t){if(e.length!==t.length)return!1;let r=!0;for(let n=0;r&&n<e.length;n++)r=Xr(e[n],t[n]);return r}function Xr(e,t){if(e===t)return!0;let r=Ic(e),n=Ic(t);if(r||n)return r&&n?e.getTime()===t.getTime():!1;if(r=ar(e),n=ar(t),r||n)return e===t;if(r=ge(e),n=ge(t),r||n)return r&&n?Ig(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||!Xr(e[s],t[s]))return!1}}return String(e)===String(t)}function Hi(e,t){return e.findIndex(r=>Xr(r,t))}var Hc=e=>!!(e&&e.__v_isRef===!0),Re=e=>Qe(e)?e:e==null?"":ge(e)||je(e)&&(e.toString===Rc||!_e(e.toString))?Hc(e)?Re(e.value):JSON.stringify(e,Mc,2):String(e),Mc=(e,t)=>Hc(t)?Mc(e,t.value):es(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((r,[n,s],i)=>(r[ua(n,i)+" =>"]=s,r),{})}:An(t)?{[`Set(${t.size})`]:[...t.values()].map(r=>ua(r))}:ar(t)?ua(t):je(t)&&!ge(t)&&!Ii(t)?String(t):t,ua=(e,t="")=>{var r;return ar(e)?`Symbol(${(r=e.description)!=null?r:t})`:e};function Rg(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:(typeof e!="number"||Number.isFinite(e),String(e))}var _t,da=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=_t,!e&&_t&&(this.index=(_t.scopes||(_t.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=_t;try{return _t=this,e()}finally{_t=t}}}on(){++this._on===1&&(this.prevScope=_t,_t=this)}off(){this._on>0&&--this._on===0&&(_t=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 fa(e){return new da(e)}function is(){return _t}function Mi(e,t=!1){_t&&_t.cleanups.push(e)}var et,pa=new WeakSet,Ns=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,_t&&_t.active&&_t.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||Nc(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,jc(this),Bc(this);const e=et,t=lr;et=this,lr=!0;try{return this.fn()}finally{Fc(this),et=e,lr=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,jc(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)}},qc=0,Bs,Fs;function Nc(e,t=!1){if(e.flags|=8,t){e.next=Fs,Fs=e;return}e.next=Bs,Bs=e}function ha(){qc++}function ga(){if(--qc>0)return;if(Fs){let t=Fs;for(Fs=void 0;t;){const r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;for(;Bs;){let t=Bs;for(Bs=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 Bc(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Fc(e){let t,r=e.depsTail,n=r;for(;n;){const s=n.prevDep;n.version===-1?(n===r&&(r=s),ma(n),$g(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&&(Lc(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Lc(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ls)||(e.globalVersion=Ls,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!va(e))))return;e.flags|=2;const t=e.dep,r=et,n=lr;et=e,lr=!0;try{Bc(e);const s=e.fn(e._value);(t.version===0||kt(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{et=r,lr=n,Fc(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 $g(e){const{prevDep:t,nextDep:r}=e;t&&(t.nextDep=r,e.prevDep=void 0),r&&(r.prevDep=t,e.nextDep=void 0)}function Dg(e,t){e.effect instanceof Ns&&(e=e.effect.fn);const r=new Ns(e);t&&Ye(r,t);try{r.run()}catch(s){throw r.stop(),s}const n=r.run.bind(r);return n.effect=r,n}function Pg(e){e.effect.stop()}var lr=!0,Vc=[];function Or(){Vc.push(lr),lr=!1}function Hr(){const e=Vc.pop();lr=e===void 0?!0:e}function jc(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const r=et;et=void 0;try{t()}finally{et=r}}}var Ls=0,Og=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}},qi=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(!et||!lr||et===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==et)t=this.activeLink=new Og(et,this),et.deps?(t.prevDep=et.depsTail,et.depsTail.nextDep=t,et.depsTail=t):et.deps=et.depsTail=t,Uc(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=et.depsTail,t.nextDep=void 0,et.depsTail.nextDep=t,et.depsTail=t,et.deps===t&&(et.deps=r)}return t}trigger(e){this.version++,Ls++,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 Uc(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)Uc(n)}const r=e.dep.subs;r!==e&&(e.prevSub=r,r&&(r.nextSub=e)),e.dep.subs=e}}var Ni=new WeakMap,kn=Symbol(""),wa=Symbol(""),Vs=Symbol("");function xt(e,t,r){if(lr&&et){let n=Ni.get(e);n||Ni.set(e,n=new Map);let s=n.get(r);s||(n.set(r,s=new qi),s.map=n,s.key=r),s.track()}}function Mr(e,t,r,n,s,i){const o=Ni.get(e);if(!o){Ls++;return}const a=l=>{l&&l.trigger()};if(ha(),t==="clear")o.forEach(a);else{const l=ge(e),c=l&&Ri(r);if(l&&r==="length"){const u=Number(n);o.forEach((d,p)=>{(p==="length"||p===Vs||!ar(p)&&p>=u)&&a(d)})}else switch((r!==void 0||o.has(void 0))&&a(o.get(r)),c&&a(o.get(Vs)),t){case"add":l?c&&a(o.get("length")):(a(o.get(kn)),es(e)&&a(o.get(wa)));break;case"delete":l||(a(o.get(kn)),es(e)&&a(o.get(wa)));break;case"set":es(e)&&a(o.get(kn));break}}ga()}function Hg(e,t){const r=Ni.get(e);return r&&r.get(t)}function os(e){const t=Me(e);return t===e?t:(xt(t,"iterate",Vs),Mt(e)?t:t.map(cr))}function Bi(e){return xt(e=Me(e),"iterate",Vs),e}function Qr(e,t){return wr(e)?Br(e)?as(cr(t)):as(t):cr(t)}var Mg={__proto__:null,[Symbol.iterator](){return ya(this,Symbol.iterator,e=>Qr(this,e))},concat(...e){return os(this).concat(...e.map(t=>ge(t)?os(t):t))},entries(){return ya(this,"entries",e=>(e[1]=Qr(this,e[1]),e))},every(e,t){return qr(this,"every",e,t,void 0,arguments)},filter(e,t){return qr(this,"filter",e,t,r=>r.map(n=>Qr(this,n)),arguments)},find(e,t){return qr(this,"find",e,t,r=>Qr(this,r),arguments)},findIndex(e,t){return qr(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return qr(this,"findLast",e,t,r=>Qr(this,r),arguments)},findLastIndex(e,t){return qr(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return qr(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 qr(this,"map",e,t,void 0,arguments)},pop(){return js(this,"pop")},push(...e){return js(this,"push",e)},reduce(e,...t){return zc(this,"reduce",e,t)},reduceRight(e,...t){return zc(this,"reduceRight",e,t)},shift(){return js(this,"shift")},some(e,t){return qr(this,"some",e,t,void 0,arguments)},splice(...e){return js(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 js(this,"unshift",e)},values(){return ya(this,"values",e=>Qr(this,e))}};function ya(e,t,r){const n=Bi(e),s=n[t]();return n!==e&&!Mt(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=r(i.value)),i}),s}var qg=Array.prototype;function qr(e,t,r,n,s,i){const o=Bi(e),a=o!==e&&!Mt(e),l=o[t];if(l!==qg[t]){const d=l.apply(e,i);return a?cr(d):d}let c=r;o!==e&&(a?c=function(d,p){return r.call(this,Qr(e,d),p,e)}:r.length>2&&(c=function(d,p){return r.call(this,d,p,e)}));const u=l.call(o,c,n);return a&&s?s(u):u}function zc(e,t,r,n){const s=Bi(e);let i=r;return s!==e&&(Mt(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,Qr(e,a),l,e)}),s[t](i,...n)}function ba(e,t,r){const n=Me(e);xt(n,"iterate",Vs);const s=n[t](...r);return(s===-1||s===!1)&&Us(r[0])?(r[0]=Me(r[0]),n[t](...r)):s}function js(e,t,r=[]){Or(),ha();const n=Me(e)[t].apply(e,r);return ga(),Hr(),n}var Ng=Hs("__proto__,__v_isRef,__isVue"),Kc=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ar));function Bg(e){ar(e)||(e=String(e));const t=Me(this);return xt(t,"has",e),t.hasOwnProperty(e)}var Wc=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?Qc:Xc:s?Zc:Yc).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r)?e:void 0;const i=ge(e);if(!n){let a;if(i&&(a=Mg[t]))return a;if(t==="hasOwnProperty")return Bg}const o=Reflect.get(e,t,We(e)?e:r);if((ar(t)?Kc.has(t):Ng(t))||(n||xt(e,"get",t),s))return o;if(We(o)){const a=i&&Ri(t)?o:o.value;return n&&je(a)?wt(a):a}return je(o)?n?wt(o):Nr(o):o}},Gc=class extends Wc{constructor(e=!1){super(!1,e)}set(e,t,r,n){let s=e[t];const i=ge(e)&&Ri(t);if(!this._isShallow){const l=wr(s);if(!Mt(r)&&!wr(r)&&(s=Me(s),r=Me(r)),!i&&We(s)&&!We(r))return l||(s.value=r),!0}const o=i?Number(t)<e.length:Le(e,t),a=Reflect.set(e,t,r,We(e)?e:n);return e===Me(n)&&(o?kt(r,s)&&Mr(e,"set",t,r,s):Mr(e,"add",t,r)),a}deleteProperty(e,t){const r=Le(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(!ar(t)||!Kc.has(t))&&xt(e,"has",t),r}ownKeys(e){return xt(e,"iterate",ge(e)?"length":kn),Reflect.ownKeys(e)}},Jc=class extends Wc{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},Fg=new Gc,Lg=new Jc,Vg=new Gc(!0),jg=new Jc(!0),Sa=e=>e,Fi=e=>Reflect.getPrototypeOf(e);function Ug(e,t,r){return function(...n){const s=this.__v_raw,i=Me(s),o=es(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,c=s[e](...n),u=r?Sa:t?as:cr;return!t&&xt(i,"iterate",l?wa:kn),{next(){const{value:d,done:p}=c.next();return p?{value:d,done:p}:{value:a?[u(d[0]),u(d[1])]:u(d),done:p}},[Symbol.iterator](){return this}}}}function Li(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function zg(e,t){const r={get(n){const s=this.__v_raw,i=Me(s),o=Me(n);e||(kt(n,o)&&xt(i,"get",n),xt(i,"get",o));const{has:a}=Fi(i),l=t?Sa:e?as:cr;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&&xt(Me(n),"iterate",kn),n.size},has(n){const s=this.__v_raw,i=Me(s),o=Me(n);return e||(kt(n,o)&&xt(i,"has",n),xt(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=Me(o),l=t?Sa:e?as:cr;return!e&&xt(a,"iterate",kn),o.forEach((c,u)=>n.call(s,l(c),l(u),i))}};return Ye(r,e?{add:Li("add"),set:Li("set"),delete:Li("delete"),clear:Li("clear")}:{add(n){!t&&!Mt(n)&&!wr(n)&&(n=Me(n));const s=Me(this);return Fi(s).has.call(s,n)||(s.add(n),Mr(s,"add",n,n)),this},set(n,s){!t&&!Mt(s)&&!wr(s)&&(s=Me(s));const i=Me(this),{has:o,get:a}=Fi(i);let l=o.call(i,n);l||(n=Me(n),l=o.call(i,n));const c=a.call(i,n);return i.set(n,s),l?kt(s,c)&&Mr(i,"set",n,s,c):Mr(i,"add",n,s),this},delete(n){const s=Me(this),{has:i,get:o}=Fi(s);let a=i.call(s,n);a||(n=Me(n),a=i.call(s,n));const l=o?o.call(s,n):void 0,c=s.delete(n);return a&&Mr(s,"delete",n,void 0,l),c},clear(){const n=Me(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]=Ug(n,e,t)}),r}function Vi(e,t){const r=zg(e,t);return(n,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?n:Reflect.get(Le(r,s)&&s in n?r:n,s,i)}var Kg={get:Vi(!1,!1)},Wg={get:Vi(!1,!0)},Gg={get:Vi(!0,!1)},Jg={get:Vi(!0,!0)},Yc=new WeakMap,Zc=new WeakMap,Xc=new WeakMap,Qc=new WeakMap;function Yg(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Zg(e){return e.__v_skip||!Object.isExtensible(e)?0:Yg(bg(e))}function Nr(e){return wr(e)?e:ji(e,!1,Fg,Kg,Yc)}function eu(e){return ji(e,!1,Vg,Wg,Zc)}function wt(e){return ji(e,!0,Lg,Gg,Xc)}function en(e){return ji(e,!0,jg,Jg,Qc)}function ji(e,t,r,n,s){if(!je(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=Zg(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 Br(e){return wr(e)?Br(e.__v_raw):!!(e&&e.__v_isReactive)}function wr(e){return!!(e&&e.__v_isReadonly)}function Mt(e){return!!(e&&e.__v_isShallow)}function Us(e){return e?!!e.__v_raw:!1}function Me(e){const t=e&&e.__v_raw;return t?Me(t):e}function Ca(e){return!Le(e,"__v_skip")&&Object.isExtensible(e)&&$c(e,"__v_skip",!0),e}var cr=e=>je(e)?Nr(e):e,as=e=>je(e)?wt(e):e;function We(e){return e?e.__v_isRef===!0:!1}function B(e){return tu(e,!1)}function Ze(e){return tu(e,!0)}function tu(e,t){return We(e)?e:new Xg(e,t)}var Xg=class{constructor(e,t){this.dep=new qi,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:Me(e),this._value=t?e:cr(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,r=this.__v_isShallow||Mt(e)||wr(e);e=r?e:Me(e),kt(e,t)&&(this._rawValue=e,this._value=r?e:cr(e),this.dep.trigger())}};function Qg(e){e.dep&&e.dep.trigger()}function f(e){return We(e)?e.value:e}function xe(e){return _e(e)?e():f(e)}var ev={get:(e,t,r)=>t==="__v_raw"?e:f(Reflect.get(e,t,r)),set:(e,t,r,n)=>{const s=e[t];return We(s)&&!We(r)?(s.value=r,!0):Reflect.set(e,t,r,n)}};function _a(e){return Br(e)?e:new Proxy(e,ev)}var tv=class{constructor(e){this.__v_isRef=!0,this._value=void 0;const t=this.dep=new qi,{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 zs(e){return new tv(e)}function ft(e){const t=ge(e)?new Array(e.length):{};for(const r in e)t[r]=ru(e,r);return t}var rv=class{constructor(e,t,r){this._object=e,this._key=t,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0,this._raw=Me(e);let n=!0,s=e;if(!ge(e)||!Ri(String(t)))do n=!Us(s)||Mt(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&&We(this._raw[this._key])){const t=this._object[this._key];if(We(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return Hg(this._raw,this._key)}},nv=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 We(e)?e:_e(e)?new nv(e):je(e)&&arguments.length>1?ru(e,t,r):B(e)}function ru(e,t,r){return new rv(e,t,r)}var sv=class{constructor(e,t,r){this.fn=e,this.setter=t,this._value=void 0,this.dep=new qi(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ls-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&et!==this)return Nc(this,!0),!0}get value(){const e=this.dep.track();return Lc(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function iv(e,t,r=!1){let n,s;return _e(e)?n=e:(n=e.get,s=e.set),new sv(n,s,r)}var ov={GET:"get",HAS:"has",ITERATE:"iterate"},av={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},Ui={},zi=new WeakMap,tn=void 0;function lv(){return tn}function nu(e,t=!1,r=tn){if(r){let n=zi.get(r);n||zi.set(r,n=[]),n.push(e)}}function cv(e,t,r=He){const{immediate:n,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=r,c=b=>s?b:Mt(b)||s===!1||s===0?Fr(b,1):Fr(b);let u,d,p,h,g=!1,w=!1;if(We(e)?(d=()=>e.value,g=Mt(e)):Br(e)?(d=()=>c(e),g=!0):ge(e)?(w=!0,g=e.some(b=>Br(b)||Mt(b)),d=()=>e.map(b=>{if(We(b))return b.value;if(Br(b))return c(b);if(_e(b))return l?l(b,2):b()})):_e(e)?t?d=l?()=>l(e,2):e:d=()=>{if(p){Or();try{p()}finally{Hr()}}const b=tn;tn=u;try{return l?l(e,3,[h]):e(h)}finally{tn=b}}:d=Jt,t&&s){const b=d,_=s===!0?1/0:s;d=()=>Fr(b(),_)}const C=is(),v=()=>{u.stop(),C&&C.active&&la(C.effects,u)};if(i&&t){const b=t;t=(..._)=>{b(..._),v()}}let x=w?new Array(e.length).fill(Ui):Ui;const y=b=>{if(!(!(u.flags&1)||!u.dirty&&!b))if(t){const _=u.run();if(s||g||(w?_.some(($,R)=>kt($,x[R])):kt(_,x))){p&&p();const $=tn;tn=u;try{const R=[_,x===Ui?void 0:w&&x[0]===Ui?[]:x,h];x=_,l?l(t,3,R):t(...R)}finally{tn=$}}}else u.run()};return a&&a(y),u=new Ns(d),u.scheduler=o?()=>o(y,!1):y,h=b=>nu(b,!1,u),p=u.onStop=()=>{const b=zi.get(u);if(b){if(l)l(b,4);else for(const _ of b)_();zi.delete(u)}},t?n?y(!0):x=u.run():o?o(y.bind(null,!0),!0):u.run(),v.pause=u.pause.bind(u),v.resume=u.resume.bind(u),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--,We(e))Fr(e.value,t,r);else if(ge(e))for(let n=0;n<e.length;n++)Fr(e[n],t,r);else if(An(e)||es(e))e.forEach(n=>{Fr(n,t,r)});else if(Ii(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 su=[];function uv(e){su.push(e)}function dv(){su.pop()}function fv(e,t){}var pv={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},hv={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function ls(e,t,r,n){try{return n?e(...n):e()}catch(s){In(s,t,r)}}function Yt(e,t,r,n){if(_e(e)){const s=ls(e,t,r,n);return s&&ca(s)&&s.catch(i=>{In(i,t,r)}),s}if(ge(e)){const s=[];for(let i=0;i<e.length;i++)s.push(Yt(e[i],t,r,n));return s}}function In(e,t,r,n=!0){const s=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||He;if(t){let a=t.parent;const l=t.proxy,c=`https://vuejs.org/error-reference/#runtime-${r}`;for(;a;){const u=a.ec;if(u){for(let d=0;d<u.length;d++)if(u[d](e,l,c)===!1)return}a=a.parent}if(i){Or(),ls(i,null,10,[e,l,c]),Hr();return}}gv(e,r,s,n,o)}function gv(e,t,r,n=!0,s=!1){if(s)throw e;console.error(e)}var It=[],yr=-1,cs=[],rn=null,us=0,iu=Promise.resolve(),Ki=null;function ot(e){const t=Ki||iu;return e?t.then(this?e.bind(this):e):t}function vv(e){let t=yr+1,r=It.length;for(;t<r;){const n=t+r>>>1,s=It[n],i=Ws(s);i<e||i===e&&s.flags&2?t=n+1:r=n}return t}function Ta(e){if(!(e.flags&1)){const t=Ws(e),r=It[It.length-1];!r||!(e.flags&2)&&t>=Ws(r)?It.push(e):It.splice(vv(t),0,e),e.flags|=1,ou()}}function ou(){Ki||(Ki=iu.then(lu))}function Ks(e){ge(e)?cs.push(...e):rn&&e.id===-1?rn.splice(us+1,0,e):e.flags&1||(cs.push(e),e.flags|=1),ou()}function au(e,t,r=yr+1){for(;r<It.length;r++){const n=It[r];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;It.splice(r,1),r--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function Wi(e){if(cs.length){const t=[...new Set(cs)].sort((r,n)=>Ws(r)-Ws(n));if(cs.length=0,rn){rn.push(...t);return}for(rn=t,us=0;us<rn.length;us++){const r=rn[us];r.flags&4&&(r.flags&=-2),r.flags&8||r(),r.flags&=-2}rn=null,us=0}}var Ws=e=>e.id==null?e.flags&2?-1:1/0:e.id;function lu(e){try{for(yr=0;yr<It.length;yr++){const t=It[yr];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(;yr<It.length;yr++){const t=It[yr];t&&(t.flags&=-2)}yr=-1,It.length=0,Wi(e),Ki=null,(It.length||cs.length)&&lu(e)}}var ds,Gi=[];function cu(e,t){var r,n;ds=e,ds?(ds.enabled=!0,Gi.forEach(({event:s,args:i})=>ds.emit(s,...i)),Gi=[]):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=>{cu(s,t)}),setTimeout(()=>{ds||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Gi=[])},3e3)):Gi=[]}var yt=null,Ji=null;function Gs(e){const t=yt;return yt=e,Ji=e&&e.type.__scopeId||null,t}function mv(e){Ji=e}function wv(){Ji=null}var yv=e=>A;function A(e,t=yt,r){if(!t||e._n)return e;const n=(...s)=>{n._d&&si(-1);const i=Gs(t);let o;try{o=e(...s)}finally{Gs(i),n._d&&si(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function Yi(e,t){if(yt===null)return e;const r=ii(yt),n=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[i,o,a,l=He]=t[s];i&&(_e(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 br(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(),Yt(l,r,8,[e.el,a,e,t]),Hr())}}var uu=Symbol("_vte"),du=e=>e.__isTeleport,Js=e=>e&&(e.disabled||e.disabled===""),fu=e=>e&&(e.defer||e.defer===""),pu=e=>typeof SVGElement<"u"&&e instanceof SVGElement,hu=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Ea=(e,t)=>{const r=e&&e.to;return Qe(r)?t?t(r):null:r},gu={name:"Teleport",__isTeleport:!0,process(e,t,r,n,s,i,o,a,l,c){const{mc:u,pc:d,pbc:p,o:{insert:h,querySelector:g,createText:w,createComment:C}}=c,v=Js(t.props);let{shapeFlag:x,children:y,dynamicChildren:b}=t;if(e==null){const _=t.el=w(""),$=t.anchor=w("");h(_,r,n),h($,r,n);const R=(P,O)=>{x&16&&u(y,P,O,s,i,o,a,l)},m=()=>{const P=t.target=Ea(t.props,g),O=vu(P,t,w,h);P&&(o!=="svg"&&pu(P)?o="svg":o!=="mathml"&&hu(P)&&(o="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(P),v||(R(P,O),Xi(t,!1)))};v&&(R(r,$),Xi(t,!0)),fu(t.props)?(t.el.__isMounted=!1,at(()=>{m(),delete t.el.__isMounted},i)):m()}else{if(fu(t.props)&&e.el.__isMounted===!1){at(()=>{gu.process(e,t,r,n,s,i,o,a,l,c)},i);return}t.el=e.el,t.targetStart=e.targetStart;const _=t.anchor=e.anchor,$=t.target=e.target,R=t.targetAnchor=e.targetAnchor,m=Js(e.props),P=m?r:$,O=m?_:R;if(o==="svg"||pu($)?o="svg":(o==="mathml"||hu($))&&(o="mathml"),b?(p(e.dynamicChildren,b,P,s,i,o,a),Ja(e,t,!0)):l||d(e,t,P,O,s,i,o,a,!1),v)m?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Zi(t,r,_,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const S=t.target=Ea(t.props,g);S&&Zi(t,S,null,c,0)}else m&&Zi(t,$,R,c,1);Xi(t,v)}},remove(e,t,r,{um:n,o:{remove:s}},i){const{shapeFlag:o,children:a,anchor:l,targetStart:c,targetAnchor:u,target:d,props:p}=e;if(d&&(s(c),s(u)),i&&s(l),o&16){const h=i||!Js(p);for(let g=0;g<a.length;g++){const w=a[g];n(w,t,r,h,!!w.dynamicChildren)}}},move:Zi,hydrate:bv};function Zi(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:c,props:u}=e,d=i===2;if(d&&n(o,t,r),(!d||Js(u))&&l&16)for(let p=0;p<c.length;p++)s(c[p],t,r,2);d&&n(a,t,r)}function bv(e,t,r,n,s,i,{o:{nextSibling:o,parentNode:a,querySelector:l,insert:c,createText:u}},d){function p(w,C,v,x){C.anchor=d(o(w),C,a(w),r,n,s,i),C.targetStart=v,C.targetAnchor=x}const h=t.target=Ea(t.props,l),g=Js(t.props);if(h){const w=h._lpa||h.firstChild;if(t.shapeFlag&16)if(g)p(e,t,w,w&&o(w));else{t.anchor=o(e);let C=w;for(;C;){if(C&&C.nodeType===8){if(C.data==="teleport start anchor")t.targetStart=C;else if(C.data==="teleport anchor"){t.targetAnchor=C,h._lpa=t.targetAnchor&&o(t.targetAnchor);break}}C=o(C)}t.targetAnchor||vu(h,t,u,c),d(w&&o(w),t,h,r,n,s,i)}Xi(t,g)}else g&&t.shapeFlag&16&&p(e,t,e,o(e));return t.anchor&&o(t.anchor)}var Aa=gu;function Xi(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 vu(e,t,r,n){const s=t.targetStart=r(""),i=t.targetAnchor=r("");return s[uu]=i,e&&(n(s,e),n(i,e)),i}var Lr=Symbol("_leaveCb"),Qi=Symbol("_enterCb");function ka(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Ue(()=>{e.isMounted=!0}),vs(()=>{e.isUnmounting=!0}),e}var Zt=[Function,Array],Ia={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Zt,onEnter:Zt,onAfterEnter:Zt,onEnterCancelled:Zt,onBeforeLeave:Zt,onLeave:Zt,onAfterLeave:Zt,onLeaveCancelled:Zt,onBeforeAppear:Zt,onAppear:Zt,onAfterAppear:Zt,onAppearCancelled:Zt},mu=e=>{const t=e.subTree;return t.component?mu(t.component):t},Sv={name:"BaseTransition",props:Ia,setup(e,{slots:t}){const r=tt(),n=ka();return()=>{const s=t.default&&eo(t.default(),!0);if(!s||!s.length)return;const i=wu(s),o=Me(e),{mode:a}=o;if(n.isLeaving)return Ra(i);const l=Su(i);if(!l)return Ra(i);let c=fs(l,o,n,r,d=>c=d);l.type!==nt&&Vr(l,c);let u=r.subTree&&Su(r.subTree);if(u&&u.type!==nt&&!ur(u,l)&&mu(r).type!==nt){let d=fs(u,o,n,r);if(Vr(u,d),a==="out-in"&&l.type!==nt)return n.isLeaving=!0,d.afterLeave=()=>{n.isLeaving=!1,r.job.flags&8||r.update(),delete d.afterLeave,u=void 0},Ra(i);a==="in-out"&&l.type!==nt?d.delayLeave=(p,h,g)=>{const w=bu(n,u);w[String(u.key)]=u,p[Lr]=()=>{h(),p[Lr]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{g(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return i}}};function wu(e){let t=e[0];if(e.length>1){for(const r of e)if(r.type!==nt){t=r;break}}return t}var yu=Sv;function bu(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:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:p,onLeave:h,onAfterLeave:g,onLeaveCancelled:w,onBeforeAppear:C,onAppear:v,onAfterAppear:x,onAppearCancelled:y}=t,b=String(e.key),_=bu(r,e),$=(P,O)=>{P&&Yt(P,n,9,O)},R=(P,O)=>{const S=O[1];$(P,O),ge(P)?P.every(T=>T.length<=1)&&S():P.length<=1&&S()},m={mode:o,persisted:a,beforeEnter(P){let O=l;if(!r.isMounted)if(i)O=C||l;else return;P[Lr]&&P[Lr](!0);const S=_[b];S&&ur(e,S)&&S.el[Lr]&&S.el[Lr](),$(O,[P])},enter(P){let O=c,S=u,T=d;if(!r.isMounted)if(i)O=v||c,S=x||u,T=y||d;else return;let E=!1;const M=P[Qi]=j=>{E||(E=!0,j?$(T,[P]):$(S,[P]),m.delayedLeave&&m.delayedLeave(),P[Qi]=void 0)};O?R(O,[P,M]):M()},leave(P,O){const S=String(e.key);if(P[Qi]&&P[Qi](!0),r.isUnmounting)return O();$(p,[P]);let T=!1;const E=P[Lr]=M=>{T||(T=!0,O(),M?$(w,[P]):$(g,[P]),P[Lr]=void 0,_[S]===e&&delete _[S])};_[S]=e,h?R(h,[P,E]):E()},clone(P){const O=fs(P,t,r,n,s);return s&&s(O),O}};return m}function Ra(e){if(Ys(e))return e=dr(e),e.children=null,e}function Su(e){if(!Ys(e))return du(e.type)&&e.children?wu(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&&_e(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 eo(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===Oe?(o.patchFlag&128&&s++,n=n.concat(eo(o.children,t,a))):(t||o.type!==nt)&&n.push(a!=null?dr(o,{key:a}):o)}if(s>1)for(let i=0;i<n.length;i++)n[i].patchFlag=-2;return n}function G(e,t){return _e(e)?Ye({name:e.name},t,{setup:e}):e}function Cu(){const e=tt();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function $a(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Cv(e){const t=tt(),r=Ze(null);if(t){const n=t.refs===He?t.refs={}:t.refs;Object.defineProperty(n,e,{enumerable:!0,get:()=>r.value,set:s=>r.value=s})}return r}var to=new WeakMap;function ps(e,t,r,n,s=!1){if(ge(e)){e.forEach((w,C)=>ps(w,t&&(ge(t)?t[C]:t),r,n,s));return}if(nn(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?ii(n.component):n.el,o=s?null:i,{i:a,r:l}=e,c=t&&t.r,u=a.refs===He?a.refs={}:a.refs,d=a.setupState,p=Me(d),h=d===He?kc:w=>Le(p,w),g=w=>!0;if(c!=null&&c!==l){if(_u(t),Qe(c))u[c]=null,h(c)&&(d[c]=null);else if(We(c)){g(c)&&(c.value=null);const w=t;w.k&&(u[w.k]=null)}}if(_e(l))ls(l,a,12,[o,u]);else{const w=Qe(l),C=We(l);if(w||C){const v=()=>{if(e.f){const x=w?h(l)?d[l]:u[l]:g(l)||!e.k?l.value:u[e.k];if(s)ge(x)&&la(x,i);else if(ge(x))x.includes(i)||x.push(i);else if(w)u[l]=[i],h(l)&&(d[l]=u[l]);else{const y=[i];g(l)&&(l.value=y),e.k&&(u[e.k]=y)}}else w?(u[l]=o,h(l)&&(d[l]=o)):C&&(g(l)&&(l.value=o),e.k&&(u[e.k]=o))};if(o){const x=()=>{v(),to.delete(e)};x.id=-1,to.set(e,x),at(x,r)}else _u(e),v()}}}function _u(e){const t=to.get(e);t&&(t.flags|=8,to.delete(e))}var xu=!1,hs=()=>{xu||(console.error("Hydration completed but contains mismatches."),xu=!0)},_v=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",xv=e=>e.namespaceURI.includes("MathML"),ro=e=>{if(e.nodeType===1){if(_v(e))return"svg";if(xv(e))return"mathml"}},gs=e=>e.nodeType===8;function Tv(e){const{mt:t,p:r,o:{patchProp:n,createText:s,nextSibling:i,parentNode:o,remove:a,insert:l,createComment:c}}=e,u=(y,b)=>{if(!b.hasChildNodes()){r(null,y,b),Wi(),b._vnode=y;return}d(b.firstChild,y,null,null,null),Wi(),b._vnode=y},d=(y,b,_,$,R,m=!1)=>{m=m||!!b.dynamicChildren;const P=gs(y)&&y.data==="[",O=()=>w(y,b,_,$,R,P),{type:S,ref:T,shapeFlag:E,patchFlag:M}=b;let j=y.nodeType;b.el=y,M===-2&&(m=!1,b.dynamicChildren=null);let z=null;switch(S){case sn:j!==3?b.children===""?(l(b.el=s(""),o(y),y),z=y):z=O():(y.data!==b.children&&(hs(),y.data=b.children),z=i(y));break;case nt:x(y)?(z=i(y),v(b.el=y.content.firstChild,y,_)):j!==8||P?z=O():z=i(y);break;case On:if(P&&(y=i(y),j=y.nodeType),j===1||j===3){z=y;const J=!b.children.length;for(let U=0;U<b.staticCount;U++)J&&(b.children+=z.nodeType===1?z.outerHTML:z.data),U===b.staticCount-1&&(b.anchor=z),z=i(z);return P?i(z):z}else O();break;case Oe:P?z=g(y,b,_,$,R,m):z=O();break;default:if(E&1)(j!==1||b.type.toLowerCase()!==y.tagName.toLowerCase())&&!x(y)?z=O():z=p(y,b,_,$,R,m);else if(E&6){b.slotScopeIds=R;const J=o(y);if(P?z=C(y):gs(y)&&y.data==="teleport start"?z=C(y,y.data,"teleport end"):z=i(y),t(b,J,null,_,$,ro(J),m),nn(b)&&!b.type.__asyncResolved){let U;P?(U=D(Oe),U.anchor=z?z.previousSibling:J.lastChild):U=y.nodeType===3?$e(""):D("div"),U.el=y,b.component.subTree=U}}else E&64?j!==8?z=O():z=b.type.hydrate(y,b,_,$,R,m,e,h):E&128&&(z=b.type.hydrate(y,b,_,$,ro(o(y)),R,m,e,d))}return T!=null&&ps(T,null,$,b),z},p=(y,b,_,$,R,m)=>{m=m||!!b.dynamicChildren;const{type:P,props:O,patchFlag:S,shapeFlag:T,dirs:E,transition:M}=b,j=P==="input"||P==="option";if(j||S!==-1){E&&br(b,null,_,"created");let z=!1;if(x(y)){z=ud(null,M)&&_&&_.vnode.props&&_.vnode.props.appear;const U=y.content.firstChild;if(z){const Te=U.getAttribute("class");Te&&(U.$cls=Te),M.beforeEnter(U)}v(U,y,_),b.el=y=U}if(T&16&&!(O&&(O.innerHTML||O.textContent))){let U=h(y.firstChild,b,y,_,$,R,m);for(;U;){no(y,1)||hs();const Te=U;U=U.nextSibling,a(Te)}}else if(T&8){let U=b.children;U[0]===`
5
- `&&(y.tagName==="PRE"||y.tagName==="TEXTAREA")&&(U=U.slice(1));const{textContent:Te}=y;Te!==U&&Te!==U.replace(/\r\n|\r/g,`
6
- `)&&(no(y,0)||hs(),y.textContent=b.children)}if(O){if(j||!m||S&48){const U=y.tagName.includes("-");for(const Te in O)(j&&(Te.endsWith("value")||Te==="indeterminate")||Ms(Te)&&!rs(Te)||Te[0]==="."||U)&&n(y,Te,null,O[Te],void 0,_)}else if(O.onClick)n(y,"onClick",null,O.onClick,void 0,_);else if(S&4&&Br(O.style))for(const U in O.style)O.style[U]}let J;(J=O&&O.onVnodeBeforeMount)&&Nt(J,_,b),E&&br(b,null,_,"beforeMount"),((J=O&&O.onVnodeMounted)||E||z)&&hd(()=>{J&&Nt(J,_,b),z&&M.enter(y),E&&br(b,null,_,"mounted")},$)}return y.nextSibling},h=(y,b,_,$,R,m,P)=>{P=P||!!b.dynamicChildren;const O=b.children,S=O.length;for(let T=0;T<S;T++){const E=P?O[T]:O[T]=qt(O[T]),M=E.type===sn;y?(M&&!P&&T+1<S&&qt(O[T+1]).type===sn&&(l(s(y.data.slice(E.children.length)),_,i(y)),y.data=E.children),y=d(y,E,$,R,m,P)):M&&!E.children?l(E.el=s(""),_):(no(_,1)||hs(),r(null,E,_,null,$,R,ro(_),m))}return y},g=(y,b,_,$,R,m)=>{const{slotScopeIds:P}=b;P&&(R=R?R.concat(P):P);const O=o(y),S=h(i(y),b,O,_,$,R,m);return S&&gs(S)&&S.data==="]"?i(b.anchor=S):(hs(),l(b.anchor=c("]"),O,S),S)},w=(y,b,_,$,R,m)=>{if(no(y.parentElement,1)||hs(),b.el=null,m){const S=C(y);for(;;){const T=i(y);if(T&&T!==S)a(T);else break}}const P=i(y),O=o(y);return a(y),r(null,b,O,P,_,$,ro(O),R),_&&(_.vnode.el=b.el,fo(_,b.el)),P},C=(y,b="[",_="]")=>{let $=0;for(;y;)if(y=i(y),y&&gs(y)&&(y.data===b&&$++,y.data===_)){if($===0)return i(y);$--}return y},v=(y,b,_)=>{const $=b.parentNode;$&&$.replaceChild(y,b);let R=_;for(;R;)R.vnode.el===b&&(R.vnode.el=R.subTree.el=y),R=R.parent},x=y=>y.nodeType===1&&y.tagName==="TEMPLATE";return[u,d]}var Tu="data-allow-mismatch",Ev={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function no(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(Tu);)e=e.parentElement;const r=e&&e.getAttribute(Tu);if(r==null)return!1;if(r==="")return!0;{const n=r.split(",");return t===0&&n.includes("children")?!0:n.includes(Ev[t])}}var Av=Oi().requestIdleCallback||(e=>setTimeout(e,1)),kv=Oi().cancelIdleCallback||(e=>clearTimeout(e)),Iv=(e=1e4)=>t=>{const r=Av(t,{timeout:e});return()=>kv(r)};function Rv(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 $v=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(Rv(s))return t(),n.disconnect(),!1;n.observe(s)}}),()=>n.disconnect()},Dv=e=>t=>{if(e){const r=matchMedia(e);if(r.matches)t();else return r.addEventListener("change",t,{once:!0}),()=>r.removeEventListener("change",t)}},Pv=(e=[])=>(t,r)=>{Qe(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 Ov(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 nn=e=>!!e.type.__asyncLoader;function Hv(e){_e(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 c=null,u,d=0;const p=()=>(d++,c=null,h()),h=()=>{let g;return c||(g=c=t().catch(w=>{if(w=w instanceof Error?w:new Error(String(w)),l)return new Promise((C,v)=>{l(w,()=>C(p()),()=>v(w),d+1)});throw w}).then(w=>g!==c&&c?c:(w&&(w.__esModule||w[Symbol.toStringTag]==="Module")&&(w=w.default),u=w,w)))};return G({name:"AsyncComponentWrapper",__asyncLoader:h,__asyncHydrate(g,w,C){let v=!1;(w.bu||(w.bu=[])).push(()=>v=!0);const x=()=>{v||C()},y=i?()=>{const b=i(x,_=>Ov(g,_));b&&(w.bum||(w.bum=[])).push(b)}:x;u?y():h().then(()=>!w.isUnmounted&&y())},get __asyncResolved(){return u},setup(){const g=St;if($a(g),u)return()=>so(u,g);const w=y=>{c=null,In(y,g,13,!n)};if(a&&g.suspense||ws)return h().then(y=>()=>so(y,g)).catch(y=>(w(y),()=>n?D(n,{error:y}):null));const C=B(!1),v=B(),x=B(!!s);return s&&setTimeout(()=>{x.value=!1},s),o!=null&&setTimeout(()=>{if(!C.value&&!v.value){const y=new Error(`Async component timed out after ${o}ms.`);w(y),v.value=y}},o),h().then(()=>{C.value=!0,g.parent&&Ys(g.parent.vnode)&&g.parent.update()}).catch(y=>{w(y),v.value=y}),()=>{if(C.value&&u)return so(u,g);if(v.value&&n)return D(n,{error:v.value});if(r&&!x.value)return so(r,g)}}})}function so(e,t){const{ref:r,props:n,children:s,ce:i}=t.vnode,o=D(e,n,s);return o.ref=r,o.ce=i,delete t.vnode.ce,o}var Ys=e=>e.type.__isKeepAlive,Mv={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const r=tt(),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:c,um:u,o:{createElement:d}}}=n,p=d("div");n.activate=(x,y,b,_,$)=>{const R=x.component;c(x,y,b,0,a),l(R.vnode,x,y,b,R,a,_,x.slotScopeIds,$),at(()=>{R.isDeactivated=!1,R.a&&ss(R.a);const m=x.props&&x.props.onVnodeMounted;m&&Nt(m,R.parent,x)},a)},n.deactivate=x=>{const y=x.component;po(y.m),po(y.a),c(x,p,null,1,a),at(()=>{y.da&&ss(y.da);const b=x.props&&x.props.onVnodeUnmounted;b&&Nt(b,y.parent,x),y.isDeactivated=!0},a)};function h(x){Da(x),u(x,r,a,!0)}function g(x){s.forEach((y,b)=>{const _=rl(y.type);_&&!x(_)&&w(b)})}function w(x){const y=s.get(x);y&&(!o||!ur(y,o))?h(y):o&&Da(o),s.delete(x),i.delete(x)}Ie(()=>[e.include,e.exclude],([x,y])=>{x&&g(b=>Zs(x,b)),y&&g(b=>!Zs(y,b))},{flush:"post",deep:!0});let C=null;const v=()=>{C!=null&&(ho(r.subTree.type)?at(()=>{s.set(C,io(r.subTree))},r.subTree.suspense):s.set(C,io(r.subTree)))};return Ue(v),ao(v),vs(()=>{s.forEach(x=>{const{subTree:y,suspense:b}=r,_=io(y);if(x.type===_.type&&x.key===_.key){Da(_);const $=_.component.da;$&&at($,b);return}h(x)})}),()=>{if(C=null,!t.default)return o=null;const x=t.default(),y=x[0];if(x.length>1)return o=null,x;if(!Ur(y)||!(y.shapeFlag&4)&&!(y.shapeFlag&128))return o=null,y;let b=io(y);if(b.type===nt)return o=null,b;const _=b.type,$=rl(nn(b)?b.type.__asyncResolved||{}:_),{include:R,exclude:m,max:P}=e;if(R&&(!$||!Zs(R,$))||m&&$&&Zs(m,$))return b.shapeFlag&=-257,o=b,y;const O=b.key==null?_:b.key,S=s.get(O);return b.el&&(b=dr(b),y.shapeFlag&128&&(y.ssContent=b)),C=O,S?(b.el=S.el,b.component=S.component,b.transition&&Vr(b,b.transition),b.shapeFlag|=512,i.delete(O),i.add(O)):(i.add(O),P&&i.size>parseInt(P,10)&&w(i.values().next().value)),b.shapeFlag|=256,o=b,ho(y.type)?y:b}}};function Zs(e,t){return ge(e)?e.some(r=>Zs(r,t)):Qe(e)?e.split(",").includes(t):yg(e)?(e.lastIndex=0,e.test(t)):!1}function Eu(e,t){ku(e,"a",t)}function Au(e,t){ku(e,"da",t)}function ku(e,t,r=St){const n=e.__wdc||(e.__wdc=()=>{let s=r;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(oo(t,n,r),r){let s=r.parent;for(;s&&s.parent;)Ys(s.parent.vnode)&&qv(n,t,r,s),s=s.parent}}function qv(e,t,r,n){const s=oo(t,e,n,!0);Rt(()=>{la(n[t],s)},r)}function Da(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function io(e){return e.shapeFlag&128?e.ssContent:e}function oo(e,t,r=St,n=!1){if(r){const s=r[e]||(r[e]=[]),i=t.__weh||(t.__weh=(...o)=>{Or();const a=Mn(r),l=Yt(t,r,e,o);return a(),Hr(),l});return n?s.unshift(i):s.push(i),i}}var jr=e=>(t,r=St)=>{(!ws||e==="sp")&&oo(e,(...n)=>t(...n),r)},Iu=jr("bm"),Ue=jr("m"),Pa=jr("bu"),ao=jr("u"),vs=jr("bum"),Rt=jr("um"),Ru=jr("sp"),$u=jr("rtg"),Du=jr("rtc");function Pu(e,t=St){oo("ec",e,t)}var Oa="components",Nv="directives";function Bv(e,t){return Ha(Oa,e,!0,t)||e}var Ou=Symbol.for("v-ndc");function Rn(e){return Qe(e)?Ha(Oa,e,!1)||e:e||Ou}function Fv(e){return Ha(Nv,e)}function Ha(e,t,r=!0,n=!1){const s=yt||St;if(s){const i=s.type;if(e===Oa){const a=rl(i,!1);if(a&&(a===t||a===ct(t)||a===qs(ct(t))))return i}const o=Hu(s[e]||i[e],t)||Hu(s.appContext[e],t);return!o&&n?i:o}}function Hu(e,t){return e&&(e[t]||e[ct(t)]||e[qs(ct(t))])}function Xt(e,t,r,n){let s;const i=r&&r[n],o=ge(e);if(o||Qe(e)){const a=o&&Br(e);let l=!1,c=!1;a&&(l=!Mt(e),c=wr(e),e=Bi(e)),s=new Array(e.length);for(let u=0,d=e.length;u<d;u++)s[u]=t(l?c?as(cr(e[u])):cr(e[u]):e[u],u,void 0,i&&i[u])}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,c=a.length;l<c;l++){const u=a[l];s[l]=t(e[u],u,l,i&&i[l])}}else s=[];return r&&(r[n]=s),s}function Lv(e,t){for(let r=0;r<t.length;r++){const n=t[r];if(ge(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 Z(e,t,r={},n,s){if(yt.ce||yt.parent&&nn(yt.parent)&&yt.parent.ce){const c=Object.keys(r).length>0;return t!=="default"&&(r.name=t),I(),q(Oe,null,[D("slot",r,n&&n())],c?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),I();const o=i&&Ma(i(r)),a=r.key||o&&o.key,l=q(Oe,{key:(a&&!ar(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 Ma(e){return e.some(t=>Ur(t)?!(t.type===nt||t.type===Oe&&!Ma(t.children)):!0)?e:null}function Mu(e,t){const r={};for(const n in e)r[t&&/[A-Z]/.test(n)?`on:${n}`:ns(n)]=e[n];return r}var qa=e=>e?yd(e)?ii(e):qa(e.parent):null,Xs=Ye(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=>qa(e.parent),$root:e=>qa(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>La(e),$forceUpdate:e=>e.f||(e.f=()=>{Ta(e.update)}),$nextTick:e=>e.n||(e.n=ot.bind(e.proxy)),$watch:e=>am.bind(e)}),Na=(e,t)=>e!==He&&!e.__isScriptSetup&&Le(e,t),Ba={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(Na(n,t))return o[t]=1,n[t];if(s!==He&&Le(s,t))return o[t]=2,s[t];if(Le(i,t))return o[t]=3,i[t];if(r!==He&&Le(r,t))return o[t]=4,r[t];Fa&&(o[t]=0)}}const c=Xs[t];let u,d;if(c)return t==="$attrs"&&xt(e.attrs,"get",""),c(e);if((u=a.__cssModules)&&(u=u[t]))return u;if(r!==He&&Le(r,t))return o[t]=4,r[t];if(d=l.config.globalProperties,Le(d,t))return d[t]},set({_:e},t,r){const{data:n,setupState:s,ctx:i}=e;return Na(s,t)?(s[t]=r,!0):n!==He&&Le(n,t)?(n[t]=r,!0):Le(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!==He&&a[0]!=="$"&&Le(e,a)||Na(t,a)||Le(i,a)||Le(n,a)||Le(Xs,a)||Le(s.config.globalProperties,a)||(l=o.__cssModules)&&l[a])},defineProperty(e,t,r){return r.get!=null?e._.accessCache[t]=0:Le(r,"value")&&this.set(e,t,r.value,null),Reflect.defineProperty(e,t,r)}},Vv=Ye({},Ba,{get(e,t){if(t!==Symbol.unscopables)return Ba.get(e,t,e)},has(e,t){return t[0]!=="_"&&!_g(t)}});function jv(){return null}function Uv(){return null}function zv(e){}function Kv(e){}function Wv(){return null}function Gv(){}function Jv(e,t){return null}function qu(){return Nu("useSlots").slots}function Yv(){return Nu("useAttrs").attrs}function Nu(e){const t=tt();return t.setupContext||(t.setupContext=Cd(t))}function Qs(e){return ge(e)?e.reduce((t,r)=>(t[r]=null,t),{}):e}function Bu(e,t){const r=Qs(e);for(const n in t){if(n.startsWith("__skip"))continue;let s=r[n];s?ge(s)||_e(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 Zv(e,t){return!e||!t?e||t:ge(e)&&ge(t)?e.concat(t):Ye({},Qs(e),Qs(t))}function Xv(e,t){const r={};for(const n in e)t.includes(n)||Object.defineProperty(r,n,{enumerable:!0,get:()=>e[n]});return r}function Qv(e){const t=tt();let r=e();return Qa(),ca(r)&&(r=r.catch(n=>{throw Mn(t),n})),[r,()=>Mn(t)]}var Fa=!0;function em(e){const t=La(e),r=e.proxy,n=e.ctx;Fa=!1,t.beforeCreate&&Fu(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:o,watch:a,provide:l,inject:c,created:u,beforeMount:d,mounted:p,beforeUpdate:h,updated:g,activated:w,deactivated:C,beforeDestroy:v,beforeUnmount:x,destroyed:y,unmounted:b,render:_,renderTracked:$,renderTriggered:R,errorCaptured:m,serverPrefetch:P,expose:O,inheritAttrs:S,components:T,directives:E,filters:M}=t;if(c&&tm(c,n,null),o)for(const J in o){const U=o[J];_e(U)&&(n[J]=U.bind(r))}if(s){const J=s.call(r,r);je(J)&&(e.data=Nr(J))}if(Fa=!0,i)for(const J in i){const U=i[J],Te=N({get:_e(U)?U.bind(r,r):_e(U.get)?U.get.bind(r,r):Jt,set:!_e(U)&&_e(U.set)?U.set.bind(r):Jt});Object.defineProperty(n,J,{enumerable:!0,configurable:!0,get:()=>Te.value,set:be=>Te.value=be})}if(a)for(const J in a)Lu(a[J],n,r,J);if(l){const J=_e(l)?l.call(r):l;Reflect.ownKeys(J).forEach(U=>{Dn(U,J[U])})}u&&Fu(u,e,"c");function z(J,U){ge(U)?U.forEach(Te=>J(Te.bind(r))):U&&J(U.bind(r))}if(z(Iu,d),z(Ue,p),z(Pa,h),z(ao,g),z(Eu,w),z(Au,C),z(Pu,m),z(Du,$),z($u,R),z(vs,x),z(Rt,b),z(Ru,P),ge(O))if(O.length){const J=e.exposed||(e.exposed={});O.forEach(U=>{Object.defineProperty(J,U,{get:()=>r[U],set:Te=>r[U]=Te,enumerable:!0})})}else e.exposed||(e.exposed={});_&&e.render===Jt&&(e.render=_),S!=null&&(e.inheritAttrs=S),T&&(e.components=T),E&&(e.directives=E),P&&$a(e)}function tm(e,t,r=Jt){ge(e)&&(e=Va(e));for(const n in e){const s=e[n];let i;je(s)?"default"in s?i=bt(s.from||n,s.default,!0):i=bt(s.from||n):i=bt(s),We(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[n]=i}}function Fu(e,t,r){Yt(ge(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,r)}function Lu(e,t,r,n){let s=n.includes(".")?Gu(r,n):()=>r[n];if(Qe(e)){const i=t[e];_e(i)&&Ie(s,i)}else if(_e(e))Ie(s,e.bind(r));else if(je(e))if(ge(e))e.forEach(i=>Lu(i,t,r,n));else{const i=_e(e.handler)?e.handler.bind(r):t[e.handler];_e(i)&&Ie(s,i,e)}}function La(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(c=>lo(l,c,o,!0)),lo(l,t,o)),je(t)&&i.set(t,l),l}function lo(e,t,r,n=!1){const{mixins:s,extends:i}=t;i&&lo(e,i,r,!0),s&&s.forEach(o=>lo(e,o,r,!0));for(const o in t)if(!(n&&o==="expose")){const a=rm[o]||r&&r[o];e[o]=a?a(e[o],t[o]):t[o]}return e}var rm={data:Vu,props:ju,emits:ju,methods:ei,computed:ei,beforeCreate:$t,created:$t,beforeMount:$t,mounted:$t,beforeUpdate:$t,updated:$t,beforeDestroy:$t,beforeUnmount:$t,destroyed:$t,unmounted:$t,activated:$t,deactivated:$t,errorCaptured:$t,serverPrefetch:$t,components:ei,directives:ei,watch:sm,provide:Vu,inject:nm};function Vu(e,t){return t?e?function(){return Ye(_e(e)?e.call(this,this):e,_e(t)?t.call(this,this):t)}:t:e}function nm(e,t){return ei(Va(e),Va(t))}function Va(e){if(ge(e)){const t={};for(let r=0;r<e.length;r++)t[e[r]]=e[r];return t}return e}function $t(e,t){return e?[...new Set([].concat(e,t))]:t}function ei(e,t){return e?Ye(Object.create(null),e,t):t}function ju(e,t){return e?ge(e)&&ge(t)?[...new Set([...e,...t])]:Ye(Object.create(null),Qs(e),Qs(t??{})):t}function sm(e,t){if(!e)return t;if(!t)return e;const r=Ye(Object.create(null),e);for(const n in t)r[n]=$t(e[n],t[n]);return r}function Uu(){return{app:null,config:{isNativeTag:kc,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}var im=0;function om(e,t){return function(n,s=null){_e(n)||(n=Ye({},n)),s!=null&&!je(s)&&(s=null);const i=Uu(),o=new WeakSet,a=[];let l=!1;const c=i.app={_uid:im++,_component:n,_props:s,_container:null,_context:i,_instance:null,version:xd,get config(){return i.config},set config(u){},use(u,...d){return o.has(u)||(u&&_e(u.install)?(o.add(u),u.install(c,...d)):_e(u)&&(o.add(u),u(c,...d))),c},mixin(u){return i.mixins.includes(u)||i.mixins.push(u),c},component(u,d){return d?(i.components[u]=d,c):i.components[u]},directive(u,d){return d?(i.directives[u]=d,c):i.directives[u]},mount(u,d,p){if(!l){const h=c._ceVNode||D(n,s);return h.appContext=i,p===!0?p="svg":p===!1&&(p=void 0),d&&t?t(h,u):e(h,u,p),l=!0,c._container=u,u.__vue_app__=c,ii(h.component)}},onUnmount(u){a.push(u)},unmount(){l&&(Yt(a,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(u,d){return i.provides[u]=d,c},runWithContext(u){const d=$n;$n=c;try{return u()}finally{$n=d}}};return c}}var $n=null;function Dn(e,t){if(St){let r=St.provides;const n=St.parent&&St.parent.provides;n===r&&(r=St.provides=Object.create(n)),r[e]=t}}function bt(e,t,r=!1){const n=tt();if(n||$n){let s=$n?$n._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&&_e(t)?t.call(n&&n.proxy):t}}function ja(){return!!(tt()||$n)}var zu=Symbol.for("v-scx"),Ku=()=>{{const e=bt(zu);return e}};function rt(e,t){return ti(e,null,t)}function Ua(e,t){return ti(e,null,{flush:"post"})}function Wu(e,t){return ti(e,null,{flush:"sync"})}function Ie(e,t,r){return ti(e,t,r)}function ti(e,t,r=He){const{immediate:n,deep:s,flush:i,once:o}=r,a=Ye({},r),l=t&&n||!t&&i!=="post";let c;if(ws){if(i==="sync"){const h=Ku();c=h.__watcherHandles||(h.__watcherHandles=[])}else if(!l){const h=()=>{};return h.stop=Jt,h.resume=Jt,h.pause=Jt,h}}const u=St;a.call=(h,g,w)=>Yt(h,u,g,w);let d=!1;i==="post"?a.scheduler=h=>{at(h,u&&u.suspense)}:i!=="sync"&&(d=!0,a.scheduler=(h,g)=>{g?h():Ta(h)}),a.augmentJob=h=>{t&&(h.flags|=4),d&&(h.flags|=2,u&&(h.id=u.uid,h.i=u))};const p=cv(e,t,a);return ws&&(c?c.push(p):l&&p()),p}function am(e,t,r){const n=this.proxy,s=Qe(e)?e.includes(".")?Gu(n,e):()=>n[e]:e.bind(n,n);let i;_e(t)?i=t:(i=t.handler,r=t);const o=Mn(this),a=ti(s,i.bind(n),r);return o(),a}function Gu(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}}function lm(e,t,r=He){const n=tt(),s=ct(t),i=Ot(t),o=Ju(e,s),a=zs((l,c)=>{let u,d=He,p;return Wu(()=>{const h=e[s];kt(u,h)&&(u=h,c())}),{get(){return l(),r.get?r.get(u):u},set(h){const g=r.set?r.set(h):h;if(!kt(g,u)&&!(d!==He&&kt(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)||(u=h,c()),n.emit(`update:${t}`,g),kt(h,g)&&kt(h,d)&&!kt(g,p)&&c(),d=h,p=g}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?o||He:a,done:!1}:{done:!0}}}},a}var Ju=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ct(t)}Modifiers`]||e[`${Ot(t)}Modifiers`];function cm(e,t,...r){if(e.isUnmounted)return;const n=e.vnode.props||He;let s=r;const i=t.startsWith("update:"),o=i&&Ju(n,t.slice(7));o&&(o.trim&&(s=r.map(u=>Qe(u)?u.trim():u)),o.number&&(s=r.map(Di)));let a,l=n[a=ns(t)]||n[a=ns(ct(t))];!l&&i&&(l=n[a=ns(Ot(t))]),l&&Yt(l,e,6,s);const c=n[a+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Yt(c,e,6,s)}}var um=new WeakMap;function Yu(e,t,r=!1){const n=r?um:t.emitsCache,s=n.get(e);if(s!==void 0)return s;const i=e.emits;let o={},a=!1;if(!_e(e)){const l=c=>{const u=Yu(c,t,!0);u&&(a=!0,Ye(o,u))};!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):(ge(i)?i.forEach(l=>o[l]=null):Ye(o,i),je(e)&&n.set(e,o),o)}function co(e,t){return!e||!Ms(t)?!1:(t=t.slice(2).replace(/Once$/,""),Le(e,t[0].toLowerCase()+t.slice(1))||Le(e,Ot(t))||Le(e,t))}function uo(e){const{type:t,vnode:r,proxy:n,withProxy:s,propsOptions:[i],slots:o,attrs:a,emit:l,render:c,renderCache:u,props:d,data:p,setupState:h,ctx:g,inheritAttrs:w}=e,C=Gs(e);let v,x;try{if(r.shapeFlag&4){const b=s||n,_=b;v=qt(c.call(_,b,u,d,h,p,g)),x=a}else{const b=t;v=qt(b.length>1?b(d,{attrs:a,slots:o,emit:l}):b(d,null)),x=t.props?a:fm(a)}}catch(b){ni.length=0,In(b,e,1),v=D(nt)}let y=v;if(x&&w!==!1){const b=Object.keys(x),{shapeFlag:_}=y;b.length&&_&7&&(i&&b.some(aa)&&(x=pm(x,i)),y=dr(y,x,!1,!0))}return r.dirs&&(y=dr(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(r.dirs):r.dirs),r.transition&&Vr(y,r.transition),v=y,Gs(C),v}function dm(e,t=!0){let r;for(let n=0;n<e.length;n++){const s=e[n];if(Ur(s)){if(s.type!==nt||s.children==="v-if"){if(r)return;r=s}}else return}return r}var fm=e=>{let t;for(const r in e)(r==="class"||r==="style"||Ms(r))&&((t||(t={}))[r]=e[r]);return t},pm=(e,t)=>{const r={};for(const n in e)(!aa(n)||!(n.slice(9)in t))&&(r[n]=e[n]);return r};function hm(e,t,r){const{props:n,children:s,component:i}=e,{props:o,children:a,patchFlag:l}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(r&&l>=0){if(l&1024)return!0;if(l&16)return n?Zu(n,o,c):!!o;if(l&8){const u=t.dynamicProps;for(let d=0;d<u.length;d++){const p=u[d];if(o[p]!==n[p]&&!co(c,p))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:n===o?!1:n?o?Zu(n,o,c):!0:!!o;return!1}function Zu(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(t[i]!==e[i]&&!co(r,i))return!0}return!1}function fo({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 Xu={},Qu=()=>Object.create(Xu),ed=e=>Object.getPrototypeOf(e)===Xu;function gm(e,t,r,n=!1){const s={},i=Qu();e.propsDefaults=Object.create(null),td(e,t,s,i);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);r?e.props=n?s:eu(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function vm(e,t,r,n){const{props:s,attrs:i,vnode:{patchFlag:o}}=e,a=Me(s),[l]=e.propsOptions;let c=!1;if((n||o>0)&&!(o&16)){if(o&8){const u=e.vnode.dynamicProps;for(let d=0;d<u.length;d++){let p=u[d];if(co(e.emitsOptions,p))continue;const h=t[p];if(l)if(Le(i,p))h!==i[p]&&(i[p]=h,c=!0);else{const g=ct(p);s[g]=za(l,a,g,h,e,!1)}else h!==i[p]&&(i[p]=h,c=!0)}}}else{td(e,t,s,i)&&(c=!0);let u;for(const d in a)(!t||!Le(t,d)&&((u=Ot(d))===d||!Le(t,u)))&&(l?r&&(r[d]!==void 0||r[u]!==void 0)&&(s[d]=za(l,a,d,void 0,e,!0)):delete s[d]);if(i!==a)for(const d in i)(!t||!Le(t,d))&&(delete i[d],c=!0)}c&&Mr(e.attrs,"set","")}function td(e,t,r,n){const[s,i]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(rs(l))continue;const c=t[l];let u;s&&Le(s,u=ct(l))?!i||!i.includes(u)?r[u]=c:(a||(a={}))[u]=c:co(e.emitsOptions,l)||(!(l in n)||c!==n[l])&&(n[l]=c,o=!0)}if(i){const l=Me(r),c=a||He;for(let u=0;u<i.length;u++){const d=i[u];r[d]=za(s,l,d,c[d],e,!Le(c,d))}}return o}function za(e,t,r,n,s,i){const o=e[r];if(o!=null){const a=Le(o,"default");if(a&&n===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&_e(l)){const{propsDefaults:c}=s;if(r in c)n=c[r];else{const u=Mn(s);n=c[r]=l.call(null,t),u()}}else n=l;s.ce&&s.ce._setProp(r,n)}o[0]&&(i&&!a?n=!1:o[1]&&(n===""||n===Ot(r))&&(n=!0))}return n}var mm=new WeakMap;function rd(e,t,r=!1){const n=r?mm:t.propsCache,s=n.get(e);if(s)return s;const i=e.props,o={},a=[];let l=!1;if(!_e(e)){const u=d=>{l=!0;const[p,h]=rd(d,t,!0);Ye(o,p),h&&a.push(...h)};!r&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!i&&!l)return je(e)&&n.set(e,Qn),Qn;if(ge(i))for(let u=0;u<i.length;u++){const d=ct(i[u]);nd(d)&&(o[d]=He)}else if(i)for(const u in i){const d=ct(u);if(nd(d)){const p=i[u],h=o[d]=ge(p)||_e(p)?{type:p}:Ye({},p),g=h.type;let w=!1,C=!0;if(ge(g))for(let v=0;v<g.length;++v){const x=g[v],y=_e(x)&&x.name;if(y==="Boolean"){w=!0;break}else y==="String"&&(C=!1)}else w=_e(g)&&g.name==="Boolean";h[0]=w,h[1]=C,(w||Le(h,"default"))&&a.push(d)}}const c=[o,a];return je(e)&&n.set(e,c),c}function nd(e){return e[0]!=="$"&&!rs(e)}var Ka=e=>e==="_"||e==="_ctx"||e==="$stable",Wa=e=>ge(e)?e.map(qt):[qt(e)],wm=(e,t,r)=>{if(t._n)return t;const n=A((...s)=>Wa(t(...s)),r);return n._c=!1,n},sd=(e,t,r)=>{const n=e._ctx;for(const s in e){if(Ka(s))continue;const i=e[s];if(_e(i))t[s]=wm(s,i,n);else if(i!=null){const o=Wa(i);t[s]=()=>o}}},id=(e,t)=>{const r=Wa(t);e.slots.default=()=>r},od=(e,t,r)=>{for(const n in t)(r||!Ka(n))&&(e[n]=t[n])},ym=(e,t,r)=>{const n=e.slots=Qu();if(e.vnode.shapeFlag&32){const s=t._;s?(od(n,t,r),r&&$c(n,"_",s,!0)):sd(t,n)}else t&&id(e,t)},bm=(e,t,r)=>{const{vnode:n,slots:s}=e;let i=!0,o=He;if(n.shapeFlag&32){const a=t._;a?r&&a===1?i=!1:od(s,t,r):(i=!t.$stable,sd(t,s)),o=t}else t&&(id(e,t),o={default:1});if(i)for(const a in s)!Ka(a)&&o[a]==null&&delete s[a]};function NT(){}var at=hd;function ad(e){return cd(e)}function ld(e){return cd(e,Tv)}function cd(e,t){const r=Oi();r.__VUE__=!0;const{insert:n,remove:s,patchProp:i,createElement:o,createText:a,createComment:l,setText:c,setElementText:u,parentNode:d,nextSibling:p,setScopeId:h=Jt,insertStaticContent:g}=e,w=(k,H,W,se=null,X=null,Q=null,de=void 0,ae=null,oe=!!H.dynamicChildren)=>{if(k===H)return;k&&!ur(k,H)&&(se=L(k),te(k,X,Q,!0),k=null),H.patchFlag===-2&&(oe=!1,H.dynamicChildren=null);const{type:ee,ref:Ce,shapeFlag:he}=H;switch(ee){case sn:C(k,H,W,se);break;case nt:v(k,H,W,se);break;case On:k==null&&x(H,W,se,de);break;case Oe:T(k,H,W,se,X,Q,de,ae,oe);break;default:he&1?_(k,H,W,se,X,Q,de,ae,oe):he&6?E(k,H,W,se,X,Q,de,ae,oe):(he&64||he&128)&&ee.process(k,H,W,se,X,Q,de,ae,oe,Ne)}Ce!=null&&X?ps(Ce,k&&k.ref,Q,H||k,!H):Ce==null&&k&&k.ref!=null&&ps(k.ref,null,Q,k,!0)},C=(k,H,W,se)=>{if(k==null)n(H.el=a(H.children),W,se);else{const X=H.el=k.el;H.children!==k.children&&c(X,H.children)}},v=(k,H,W,se)=>{k==null?n(H.el=l(H.children||""),W,se):H.el=k.el},x=(k,H,W,se)=>{[k.el,k.anchor]=g(k.children,H,W,se,k.el,k.anchor)},y=({el:k,anchor:H},W,se)=>{let X;for(;k&&k!==H;)X=p(k),n(k,W,se),k=X;n(H,W,se)},b=({el:k,anchor:H})=>{let W;for(;k&&k!==H;)W=p(k),s(k),k=W;s(H)},_=(k,H,W,se,X,Q,de,ae,oe)=>{if(H.type==="svg"?de="svg":H.type==="math"&&(de="mathml"),k==null)$(H,W,se,X,Q,de,ae,oe);else{const ee=k.el&&k.el._isVueCE?k.el:null;try{ee&&ee._beginPatch(),P(k,H,X,Q,de,ae,oe)}finally{ee&&ee._endPatch()}}},$=(k,H,W,se,X,Q,de,ae)=>{let oe,ee;const{props:Ce,shapeFlag:he,transition:ye,dirs:ke}=k;if(oe=k.el=o(k.type,Q,Ce&&Ce.is,Ce),he&8?u(oe,k.children):he&16&&m(k.children,oe,null,se,X,Ga(k,Q),de,ae),ke&&br(k,null,se,"created"),R(oe,k,k.scopeId,de,se),Ce){for(const it in Ce)it!=="value"&&!rs(it)&&i(oe,it,null,Ce[it],Q,se);"value"in Ce&&i(oe,"value",null,Ce.value,Q),(ee=Ce.onVnodeBeforeMount)&&Nt(ee,se,k)}ke&&br(k,null,se,"beforeMount");const qe=ud(X,ye);qe&&ye.beforeEnter(oe),n(oe,H,W),((ee=Ce&&Ce.onVnodeMounted)||qe||ke)&&at(()=>{ee&&Nt(ee,se,k),qe&&ye.enter(oe),ke&&br(k,null,se,"mounted")},X)},R=(k,H,W,se,X)=>{if(W&&h(k,W),se)for(let Q=0;Q<se.length;Q++)h(k,se[Q]);if(X){let Q=X.subTree;if(H===Q||ho(Q.type)&&(Q.ssContent===H||Q.ssFallback===H)){const de=X.vnode;R(k,de,de.scopeId,de.slotScopeIds,X.parent)}}},m=(k,H,W,se,X,Q,de,ae,oe=0)=>{for(let ee=oe;ee<k.length;ee++)w(null,k[ee]=ae?on(k[ee]):qt(k[ee]),H,W,se,X,Q,de,ae)},P=(k,H,W,se,X,Q,de)=>{const ae=H.el=k.el;let{patchFlag:oe,dynamicChildren:ee,dirs:Ce}=H;oe|=k.patchFlag&16;const he=k.props||He,ye=H.props||He;let ke;if(W&&Pn(W,!1),(ke=ye.onVnodeBeforeUpdate)&&Nt(ke,W,H,k),Ce&&br(H,k,W,"beforeUpdate"),W&&Pn(W,!0),(he.innerHTML&&ye.innerHTML==null||he.textContent&&ye.textContent==null)&&u(ae,""),ee?O(k.dynamicChildren,ee,ae,W,se,Ga(H,X),Q):de||U(k,H,ae,null,W,se,Ga(H,X),Q,!1),oe>0){if(oe&16)S(ae,he,ye,W,X);else if(oe&2&&he.class!==ye.class&&i(ae,"class",null,ye.class,X),oe&4&&i(ae,"style",he.style,ye.style,X),oe&8){const qe=H.dynamicProps;for(let it=0;it<qe.length;it++){const Je=qe[it],Ft=he[Je],At=ye[Je];(At!==Ft||Je==="value")&&i(ae,Je,Ft,At,X,W)}}oe&1&&k.children!==H.children&&u(ae,H.children)}else!de&&ee==null&&S(ae,he,ye,W,X);((ke=ye.onVnodeUpdated)||Ce)&&at(()=>{ke&&Nt(ke,W,H,k),Ce&&br(H,k,W,"updated")},se)},O=(k,H,W,se,X,Q,de)=>{for(let ae=0;ae<H.length;ae++){const oe=k[ae],ee=H[ae];w(oe,ee,oe.el&&(oe.type===Oe||!ur(oe,ee)||oe.shapeFlag&198)?d(oe.el):W,null,se,X,Q,de,!0)}},S=(k,H,W,se,X)=>{if(H!==W){if(H!==He)for(const Q in H)!rs(Q)&&!(Q in W)&&i(k,Q,H[Q],null,X,se);for(const Q in W){if(rs(Q))continue;const de=W[Q],ae=H[Q];de!==ae&&Q!=="value"&&i(k,Q,ae,de,X,se)}"value"in W&&i(k,"value",H.value,W.value,X)}},T=(k,H,W,se,X,Q,de,ae,oe)=>{const ee=H.el=k?k.el:a(""),Ce=H.anchor=k?k.anchor:a("");let{patchFlag:he,dynamicChildren:ye,slotScopeIds:ke}=H;ke&&(ae=ae?ae.concat(ke):ke),k==null?(n(ee,W,se),n(Ce,W,se),m(H.children||[],W,Ce,X,Q,de,ae,oe)):he>0&&he&64&&ye&&k.dynamicChildren?(O(k.dynamicChildren,ye,W,X,Q,de,ae),(H.key!=null||X&&H===X.subTree)&&Ja(k,H,!0)):U(k,H,W,Ce,X,Q,de,ae,oe)},E=(k,H,W,se,X,Q,de,ae,oe)=>{H.slotScopeIds=ae,k==null?H.shapeFlag&512?X.ctx.activate(H,W,se,de,oe):M(H,W,se,X,Q,de,oe):j(k,H,oe)},M=(k,H,W,se,X,Q,de)=>{const ae=k.component=wd(k,se,X);if(Ys(k)&&(ae.ctx.renderer=Ne),bd(ae,!1,de),ae.asyncDep){if(X&&X.registerDep(ae,z,de),!k.el){const oe=ae.subTree=D(nt);v(null,oe,H,W),k.placeholder=oe.el}}else z(ae,k,H,W,X,Q,de)},j=(k,H,W)=>{const se=H.component=k.component;if(hm(k,H,W))if(se.asyncDep&&!se.asyncResolved){J(se,H,W);return}else se.next=H,se.update();else H.el=k.el,se.vnode=H},z=(k,H,W,se,X,Q,de)=>{const ae=()=>{if(k.isMounted){let{next:he,bu:ye,u:ke,parent:qe,vnode:it}=k;{const Wt=dd(k);if(Wt){he&&(he.el=it.el,J(k,he,de)),Wt.asyncDep.then(()=>{k.isUnmounted||ae()});return}}let Je=he,Ft;Pn(k,!1),he?(he.el=it.el,J(k,he,de)):he=it,ye&&ss(ye),(Ft=he.props&&he.props.onVnodeBeforeUpdate)&&Nt(Ft,qe,he,it),Pn(k,!0);const At=uo(k),mr=k.subTree;k.subTree=At,w(mr,At,d(mr.el),L(mr),k,X,Q),he.el=At.el,Je===null&&fo(k,At.el),ke&&at(ke,X),(Ft=he.props&&he.props.onVnodeUpdated)&&at(()=>Nt(Ft,qe,he,it),X)}else{let he;const{el:ye,props:ke}=H,{bm:qe,m:it,parent:Je,root:Ft,type:At}=k,mr=nn(H);if(Pn(k,!1),qe&&ss(qe),!mr&&(he=ke&&ke.onVnodeBeforeMount)&&Nt(he,Je,H),Pn(k,!0),ye&&st){const Wt=()=>{k.subTree=uo(k),st(ye,k.subTree,k,X,null)};mr&&At.__asyncHydrate?At.__asyncHydrate(ye,k,Wt):Wt()}else{Ft.ce&&Ft.ce._def.shadowRoot!==!1&&Ft.ce._injectChildStyle(At);const Wt=k.subTree=uo(k);w(null,Wt,W,se,k,X,Q),H.el=Wt.el}if(it&&at(it,X),!mr&&(he=ke&&ke.onVnodeMounted)){const Wt=H;at(()=>Nt(he,Je,Wt),X)}(H.shapeFlag&256||Je&&nn(Je.vnode)&&Je.vnode.shapeFlag&256)&&k.a&&at(k.a,X),k.isMounted=!0,H=W=se=null}};k.scope.on();const oe=k.effect=new Ns(ae);k.scope.off();const ee=k.update=oe.run.bind(oe),Ce=k.job=oe.runIfDirty.bind(oe);Ce.i=k,Ce.id=k.uid,oe.scheduler=()=>Ta(Ce),Pn(k,!0),ee()},J=(k,H,W)=>{H.component=k;const se=k.vnode.props;k.vnode=H,k.next=null,vm(k,H.props,se,W),bm(k,H.children,W),Or(),au(k),Hr()},U=(k,H,W,se,X,Q,de,ae,oe=!1)=>{const ee=k&&k.children,Ce=k?k.shapeFlag:0,he=H.children,{patchFlag:ye,shapeFlag:ke}=H;if(ye>0){if(ye&128){be(ee,he,W,se,X,Q,de,ae,oe);return}else if(ye&256){Te(ee,he,W,se,X,Q,de,ae,oe);return}}ke&8?(Ce&16&&ie(ee,X,Q),he!==ee&&u(W,he)):Ce&16?ke&16?be(ee,he,W,se,X,Q,de,ae,oe):ie(ee,X,Q,!0):(Ce&8&&u(W,""),ke&16&&m(he,W,se,X,Q,de,ae,oe))},Te=(k,H,W,se,X,Q,de,ae,oe)=>{k=k||Qn,H=H||Qn;const ee=k.length,Ce=H.length,he=Math.min(ee,Ce);let ye;for(ye=0;ye<he;ye++){const ke=H[ye]=oe?on(H[ye]):qt(H[ye]);w(k[ye],ke,W,null,X,Q,de,ae,oe)}ee>Ce?ie(k,X,Q,!0,!1,he):m(H,W,se,X,Q,de,ae,oe,he)},be=(k,H,W,se,X,Q,de,ae,oe)=>{let ee=0;const Ce=H.length;let he=k.length-1,ye=Ce-1;for(;ee<=he&&ee<=ye;){const ke=k[ee],qe=H[ee]=oe?on(H[ee]):qt(H[ee]);if(ur(ke,qe))w(ke,qe,W,null,X,Q,de,ae,oe);else break;ee++}for(;ee<=he&&ee<=ye;){const ke=k[he],qe=H[ye]=oe?on(H[ye]):qt(H[ye]);if(ur(ke,qe))w(ke,qe,W,null,X,Q,de,ae,oe);else break;he--,ye--}if(ee>he){if(ee<=ye){const ke=ye+1,qe=ke<Ce?H[ke].el:se;for(;ee<=ye;)w(null,H[ee]=oe?on(H[ee]):qt(H[ee]),W,qe,X,Q,de,ae,oe),ee++}}else if(ee>ye)for(;ee<=he;)te(k[ee],X,Q,!0),ee++;else{const ke=ee,qe=ee,it=new Map;for(ee=qe;ee<=ye;ee++){const Gt=H[ee]=oe?on(H[ee]):qt(H[ee]);Gt.key!=null&&it.set(Gt.key,ee)}let Je,Ft=0;const At=ye-qe+1;let mr=!1,Wt=0;const ki=new Array(At);for(ee=0;ee<At;ee++)ki[ee]=0;for(ee=ke;ee<=he;ee++){const Gt=k[ee];if(Ft>=At){te(Gt,X,Q,!0);continue}let Pr;if(Gt.key!=null)Pr=it.get(Gt.key);else for(Je=qe;Je<=ye;Je++)if(ki[Je-qe]===0&&ur(Gt,H[Je])){Pr=Je;break}Pr===void 0?te(Gt,X,Q,!0):(ki[Pr-qe]=ee+1,Pr>=Wt?Wt=Pr:mr=!0,w(Gt,H[Pr],W,null,X,Q,de,ae,oe),Ft++)}const lg=mr?Sm(ki):Qn;for(Je=lg.length-1,ee=At-1;ee>=0;ee--){const Gt=qe+ee,Pr=H[Gt],cg=H[Gt+1],ug=Gt+1<Ce?cg.el||cg.placeholder:se;ki[ee]===0?w(null,Pr,W,ug,X,Q,de,ae,oe):mr&&(Je<0||ee!==lg[Je]?K(Pr,W,ug,2):Je--)}}},K=(k,H,W,se,X=null)=>{const{el:Q,type:de,transition:ae,children:oe,shapeFlag:ee}=k;if(ee&6){K(k.component.subTree,H,W,se);return}if(ee&128){k.suspense.move(H,W,se);return}if(ee&64){de.move(k,H,W,Ne);return}if(de===Oe){n(Q,H,W);for(let Ce=0;Ce<oe.length;Ce++)K(oe[Ce],H,W,se);n(k.anchor,H,W);return}if(de===On){y(k,H,W);return}if(se!==2&&ee&1&&ae)if(se===0)ae.beforeEnter(Q),n(Q,H,W),at(()=>ae.enter(Q),X);else{const{leave:Ce,delayLeave:he,afterLeave:ye}=ae,ke=()=>{k.ctx.isUnmounted?s(Q):n(Q,H,W)},qe=()=>{Q._isLeaving&&Q[Lr](!0),Ce(Q,()=>{ke(),ye&&ye()})};he?he(Q,ke,qe):qe()}else n(Q,H,W)},te=(k,H,W,se=!1,X=!1)=>{const{type:Q,props:de,ref:ae,children:oe,dynamicChildren:ee,shapeFlag:Ce,patchFlag:he,dirs:ye,cacheIndex:ke}=k;if(he===-2&&(X=!1),ae!=null&&(Or(),ps(ae,null,W,k,!0),Hr()),ke!=null&&(H.renderCache[ke]=void 0),Ce&256){H.ctx.deactivate(k);return}const qe=Ce&1&&ye,it=!nn(k);let Je;if(it&&(Je=de&&de.onVnodeBeforeUnmount)&&Nt(Je,H,k),Ce&6)pe(k.component,W,se);else{if(Ce&128){k.suspense.unmount(W,se);return}qe&&br(k,null,H,"beforeUnmount"),Ce&64?k.type.remove(k,H,W,Ne,se):ee&&!ee.hasOnce&&(Q!==Oe||he>0&&he&64)?ie(ee,H,W,!1,!0):(Q===Oe&&he&384||!X&&Ce&16)&&ie(oe,H,W),se&&re(k)}(it&&(Je=de&&de.onVnodeUnmounted)||qe)&&at(()=>{Je&&Nt(Je,H,k),qe&&br(k,null,H,"unmounted")},W)},re=k=>{const{type:H,el:W,anchor:se,transition:X}=k;if(H===Oe){le(W,se);return}if(H===On){b(k);return}const Q=()=>{s(W),X&&!X.persisted&&X.afterLeave&&X.afterLeave()};if(k.shapeFlag&1&&X&&!X.persisted){const{leave:de,delayLeave:ae}=X,oe=()=>de(W,Q);ae?ae(k.el,Q,oe):oe()}else Q()},le=(k,H)=>{let W;for(;k!==H;)W=p(k),s(k),k=W;s(H)},pe=(k,H,W)=>{const{bum:se,scope:X,job:Q,subTree:de,um:ae,m:oe,a:ee}=k;po(oe),po(ee),se&&ss(se),X.stop(),Q&&(Q.flags|=8,te(de,k,H,W)),ae&&at(ae,H),at(()=>{k.isUnmounted=!0},H)},ie=(k,H,W,se=!1,X=!1,Q=0)=>{for(let de=Q;de<k.length;de++)te(k[de],H,W,se,X)},L=k=>{if(k.shapeFlag&6)return L(k.component.subTree);if(k.shapeFlag&128)return k.suspense.next();const H=p(k.anchor||k.el),W=H&&H[uu];return W?p(W):H};let Y=!1;const Fe=(k,H,W)=>{k==null?H._vnode&&te(H._vnode,null,null,!0):w(H._vnode||null,k,H,null,null,null,W),H._vnode=k,Y||(Y=!0,au(),Wi(),Y=!1)},Ne={p:w,um:te,m:K,r:re,mt:M,mc:m,pc:U,pbc:O,n:L,o:e};let lt,st;return t&&([lt,st]=t(Ne)),{render:Fe,hydrate:lt,createApp:om(Fe,lt)}}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 Pn({effect:e,job:t},r){r?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ud(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ja(e,t,r=!1){const n=e.children,s=t.children;if(ge(n)&&ge(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]=on(s[i]),a.el=o.el),!r&&a.patchFlag!==-2&&Ja(o,a)),a.type===sn&&a.patchFlag!==-1&&(a.el=o.el),a.type===nt&&!a.el&&(a.el=o.el)}}function Sm(e){const t=e.slice(),r=[0];let n,s,i,o,a;const l=e.length;for(n=0;n<l;n++){const c=e[n];if(c!==0){if(s=r[r.length-1],e[s]<c){t[n]=s,r.push(n);continue}for(i=0,o=r.length-1;i<o;)a=i+o>>1,e[r[a]]<c?i=a+1:o=a;c<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 dd(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:dd(t)}function po(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}var ho=e=>e.__isSuspense,Ya=0,Cm={name:"Suspense",__isSuspense:!0,process(e,t,r,n,s,i,o,a,l,c){if(e==null)_m(t,r,n,s,i,o,a,l,c);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}xm(e,t,r,n,s,o,a,l,c)}},hydrate:Tm,normalize:Em};function ri(e,t){const r=e.props&&e.props[t];_e(r)&&r()}function _m(e,t,r,n,s,i,o,a,l){const{p:c,o:{createElement:u}}=l,d=u("div"),p=e.suspense=fd(e,s,n,t,d,r,i,o,a,l);c(null,p.pendingBranch=e.ssContent,d,null,n,p,i,o),p.deps>0?(ri(e,"onPending"),ri(e,"onFallback"),c(null,e.ssFallback,t,r,n,null,i,o),ms(p,e.ssFallback)):p.resolve(!1,!0)}function xm(e,t,r,n,s,i,o,a,{p:l,um:c,o:{createElement:u}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const p=t.ssContent,h=t.ssFallback,{activeBranch:g,pendingBranch:w,isInFallback:C,isHydrating:v}=d;if(w)d.pendingBranch=p,ur(w,p)?(l(w,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0?d.resolve():C&&(v||(l(g,h,r,n,s,null,i,o,a),ms(d,h)))):(d.pendingId=Ya++,v?(d.isHydrating=!1,d.activeBranch=w):c(w,s,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),C?(l(null,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0?d.resolve():(l(g,h,r,n,s,null,i,o,a),ms(d,h))):g&&ur(g,p)?(l(g,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(g&&ur(g,p))l(g,p,r,n,s,d,i,o,a),ms(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:y}=d;x>0?setTimeout(()=>{d.pendingId===y&&d.fallback(h)},x):x===0&&d.fallback(h)}}function fd(e,t,r,n,s,i,o,a,l,c,u=!1){const{p:d,m:p,um:h,n:g,o:{parentNode:w,remove:C}}=c;let v;const x=Am(e);x&&t&&t.pendingBranch&&(v=t.pendingId,t.deps++);const y=e.props?Pi(e.props.timeout):void 0,b=i,_={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:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve($=!1,R=!1){const{vnode:m,activeBranch:P,pendingBranch:O,pendingId:S,effects:T,parentComponent:E,container:M,isInFallback:j}=_;let z=!1;_.isHydrating?_.isHydrating=!1:$||(z=P&&O.transition&&O.transition.mode==="out-in",z&&(P.transition.afterLeave=()=>{S===_.pendingId&&(p(O,M,i===b?g(P):i,0),Ks(T),j&&m.ssFallback&&(m.ssFallback.el=null))}),P&&(w(P.el)===M&&(i=g(P)),h(P,E,_,!0),!z&&j&&m.ssFallback&&at(()=>m.ssFallback.el=null,_)),z||p(O,M,i,0)),ms(_,O),_.pendingBranch=null,_.isInFallback=!1;let J=_.parent,U=!1;for(;J;){if(J.pendingBranch){J.effects.push(...T),U=!0;break}J=J.parent}!U&&!z&&Ks(T),_.effects=[],x&&t&&t.pendingBranch&&v===t.pendingId&&(t.deps--,t.deps===0&&!R&&t.resolve()),ri(m,"onResolve")},fallback($){if(!_.pendingBranch)return;const{vnode:R,activeBranch:m,parentComponent:P,container:O,namespace:S}=_;ri(R,"onFallback");const T=g(m),E=()=>{_.isInFallback&&(d(null,$,O,T,P,null,S,a,l),ms(_,$))},M=$.transition&&$.transition.mode==="out-in";M&&(m.transition.afterLeave=E),_.isInFallback=!0,h(m,P,null,!0),M||E()},move($,R,m){_.activeBranch&&p(_.activeBranch,$,R,m),_.container=$},next(){return _.activeBranch&&g(_.activeBranch)},registerDep($,R,m){const P=!!_.pendingBranch;P&&_.deps++;const O=$.vnode.el;$.asyncDep.catch(S=>{In(S,$,0)}).then(S=>{if($.isUnmounted||_.isUnmounted||_.pendingId!==$.suspenseId)return;$.asyncResolved=!0;const{vnode:T}=$;el($,S,!1),O&&(T.el=O);const E=!O&&$.subTree.el;R($,T,w(O||$.subTree.el),O?null:g($.subTree),_,o,m),E&&(T.placeholder=null,C(E)),fo($,T.el),P&&--_.deps===0&&_.resolve()})},unmount($,R){_.isUnmounted=!0,_.activeBranch&&h(_.activeBranch,r,$,R),_.pendingBranch&&h(_.pendingBranch,r,$,R)}};return _}function Tm(e,t,r,n,s,i,o,a,l){const c=t.suspense=fd(t,n,r,e.parentNode,document.createElement("div"),null,s,i,o,a,!0),u=l(e,c.pendingBranch=t.ssContent,r,c,i,o);return c.deps===0&&c.resolve(!1,!0),u}function Em(e){const{shapeFlag:t,children:r}=e,n=t&32;e.ssContent=pd(n?r.default:r),e.ssFallback=n?pd(r.fallback):D(nt)}function pd(e){let t;if(_e(e)){const r=Hn&&e._c;r&&(e._d=!1,I()),e=e(),r&&(e._d=!0,t=Tt,gd())}return ge(e)&&(e=dm(e)),e=qt(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(r=>r!==e)),e}function hd(e,t){t&&t.pendingBranch?ge(e)?t.effects.push(...e):t.effects.push(e):Ks(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,fo(n,s))}function Am(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}var Oe=Symbol.for("v-fgt"),sn=Symbol.for("v-txt"),nt=Symbol.for("v-cmt"),On=Symbol.for("v-stc"),ni=[],Tt=null;function I(e=!1){ni.push(Tt=e?null:[])}function gd(){ni.pop(),Tt=ni[ni.length-1]||null}var Hn=1;function si(e,t=!1){Hn+=e,e<0&&Tt&&t&&(Tt.hasOnce=!0)}function vd(e){return e.dynamicChildren=Hn>0?Tt||Qn:null,gd(),Hn>0&&Tt&&Tt.push(e),e}function we(e,t,r,n,s,i){return vd(ne(e,t,r,n,s,i,!0))}function q(e,t,r,n,s){return vd(D(e,t,r,n,s,!0))}function Ur(e){return e?e.__v_isVNode===!0:!1}function ur(e,t){return e.type===t.type&&e.key===t.key}function km(e){}var md=({key:e})=>e??null,go=({ref:e,ref_key:t,ref_for:r})=>(typeof e=="number"&&(e=""+e),e!=null?Qe(e)||We(e)||_e(e)?{i:yt,r:e,k:t,f:!!r}:e:null);function ne(e,t=null,r=null,n=0,s=null,i=e===Oe?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&md(t),ref:t&&go(t),scopeId:Ji,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:yt};return a?(Za(l,r),i&128&&e.normalize(l)):r&&(l.shapeFlag|=Qe(r)?8:16),Hn>0&&!o&&Tt&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&Tt.push(l),l}var D=Im;function Im(e,t=null,r=null,n=0,s=null,i=!1){if((!e||e===Ou)&&(e=nt),Ur(e)){const a=dr(e,t,!0);return r&&Za(a,r),Hn>0&&!i&&Tt&&(a.shapeFlag&6?Tt[Tt.indexOf(e)]=a:Tt.push(a)),a.patchFlag=-2,a}if(qm(e)&&(e=e.__vccOpts),t){t=Dt(t);let{class:a,style:l}=t;a&&!Qe(a)&&(t.class=Ke(a)),je(l)&&(Us(l)&&!ge(l)&&(l=Ye({},l)),t.style=mt(l))}const o=Qe(e)?1:ho(e)?128:du(e)?64:je(e)?4:_e(e)?2:0;return ne(e,t,r,n,s,o,i,!0)}function Dt(e){return e?Us(e)||ed(e)?Ye({},e):e:null}function dr(e,t,r=!1,n=!1){const{props:s,ref:i,patchFlag:o,children:a,transition:l}=e,c=t?ue(s||{},t):s,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&md(c),ref:t&&t.ref?r&&i?ge(i)?i.concat(go(t)):[i,go(t)]:go(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!==Oe?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&&dr(e.ssContent),ssFallback:e.ssFallback&&dr(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&n&&Vr(u,l.clone(u)),u}function $e(e=" ",t=0){return D(sn,null,e,t)}function Rm(e,t){const r=D(On,null,e);return r.staticCount=t,r}function Ee(e="",t=!1){return t?(I(),q(nt,null,e)):D(nt,null,e)}function qt(e){return e==null||typeof e=="boolean"?D(nt):ge(e)?D(Oe,null,e.slice()):Ur(e)?on(e):D(sn,null,String(e))}function on(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:dr(e)}function Za(e,t){let r=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(ge(t))r=16;else if(typeof t=="object")if(n&65){const s=t.default;s&&(s._c&&(s._d=!1),Za(e,s()),s._c&&(s._d=!0));return}else{r=32;const s=t._;!s&&!ed(t)?t._ctx=yt:s===3&&yt&&(yt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else _e(t)?(t={default:t,_ctx:yt},r=32):(t=String(t),n&64?(r=16,t=[$e(t)]):r=8);e.children=t,e.shapeFlag|=r}function ue(...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=Ke([t.class,n.class]));else if(s==="style")t.style=mt([t.style,n.style]);else if(Ms(s)){const i=t[s],o=n[s];o&&i!==o&&!(ge(i)&&i.includes(o))&&(t[s]=i?[].concat(i,o):o)}else s!==""&&(t[s]=n[s])}return t}function Nt(e,t,r,n=null){Yt(e,t,7,[r,n])}var $m=Uu(),Dm=0;function wd(e,t,r){const n=e.type,s=(t?t.appContext:e.appContext)||$m,i={uid:Dm++,vnode:e,type:n,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new da(!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:rd(n,s),emitsOptions:Yu(n,s),emit:null,emitted:null,propsDefaults:He,inheritAttrs:n.inheritAttrs,ctx:He,data:He,props:He,attrs:He,slots:He,refs:He,setupState:He,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=cm.bind(null,i),e.ce&&e.ce(i),i}var St=null,tt=()=>St||yt,vo,Xa;{const e=Oi(),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)}};vo=t("__VUE_INSTANCE_SETTERS__",r=>St=r),Xa=t("__VUE_SSR_SETTERS__",r=>ws=r)}var Mn=e=>{const t=St;return vo(e),e.scope.on(),()=>{e.scope.off(),vo(t)}},Qa=()=>{St&&St.scope.off(),vo(null)};function yd(e){return e.vnode.shapeFlag&4}var ws=!1;function bd(e,t=!1,r=!1){t&&Xa(t);const{props:n,children:s}=e.vnode,i=yd(e);gm(e,n,i,t),ym(e,s,r||t);const o=i?Pm(e,t):void 0;return t&&Xa(!1),o}function Pm(e,t){const r=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ba);const{setup:n}=r;if(n){Or();const s=e.setupContext=n.length>1?Cd(e):null,i=Mn(e),o=ls(n,e,0,[e.props,s]),a=ca(o);if(Hr(),i(),(a||e.sp)&&!nn(e)&&$a(e),a){if(o.then(Qa,Qa),t)return o.then(l=>{el(e,l,t)}).catch(l=>{In(l,e,0)});e.asyncDep=o}else el(e,o,t)}else Sd(e,t)}function el(e,t,r){_e(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:je(t)&&(e.setupState=_a(t)),Sd(e,r)}var mo,tl;function Om(e){mo=e,tl=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,Vv))}}var Hm=()=>!mo;function Sd(e,t,r){const n=e.type;if(!e.render){if(!t&&mo&&!n.render){const s=n.template||La(e).template;if(s){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:a,compilerOptions:l}=n,c=Ye(Ye({isCustomElement:i,delimiters:a},o),l);n.render=mo(s,c)}}e.render=n.render||Jt,tl&&tl(e)}{const s=Mn(e);Or();try{em(e)}finally{Hr(),s()}}}var Mm={get(e,t){return xt(e,"get",""),e[t]}};function Cd(e){const t=r=>{e.exposed=r||{}};return{attrs:new Proxy(e.attrs,Mm),slots:e.slots,emit:e.emit,expose:t}}function ii(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(_a(Ca(e.exposed)),{get(t,r){if(r in t)return t[r];if(r in Xs)return Xs[r](e)},has(t,r){return r in t||r in Xs}})):e.proxy}function rl(e,t=!0){return _e(e)?e.displayName||e.name:e.name||t&&e.__name}function qm(e){return _e(e)&&"__vccOpts"in e}var N=(e,t)=>iv(e,t,ws);function Qt(e,t,r){try{si(-1);const n=arguments.length;return n===2?je(t)&&!ge(t)?Ur(t)?D(e,null,[t]):D(e,t):D(e,null,t):(n>3?r=Array.prototype.slice.call(arguments,2):n===3&&Ur(r)&&(r=[r]),D(e,t,r))}finally{si(1)}}function Nm(){return;function e(t,r,n){const s=t[n];if(ge(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 Bm(e,t,r,n){const s=r[n];if(s&&_d(s,e))return s;const i=t();return i.memo=e.slice(),i.cacheIndex=n,r[n]=i}function _d(e,t){const r=e.memo;if(r.length!=t.length)return!1;for(let n=0;n<r.length;n++)if(kt(r[n],t[n]))return!1;return Hn>0&&Tt&&Tt.push(e),!0}var xd="3.5.25",Fm=Jt,Lm=hv,Vm=ds,jm=cu,Um={createComponentInstance:wd,setupComponent:bd,renderComponentRoot:uo,setCurrentRenderingInstance:Gs,isVNode:Ur,normalizeVNode:qt,getComponentPublicInstance:ii,ensureValidVNode:Ma,pushWarningContext:uv,popWarningContext:dv},BT=null,FT=null,LT=null;var nl=void 0,Td=typeof window<"u"&&window.trustedTypes;if(Td)try{nl=Td.createPolicy("vue",{createHTML:e=>e})}catch{}var Ed=nl?e=>nl.createHTML(e):e=>e,zm="http://www.w3.org/2000/svg",Km="http://www.w3.org/1998/Math/MathML",zr=typeof document<"u"?document:null,Ad=zr&&zr.createElement("template"),kd={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"?zr.createElementNS(zm,e):t==="mathml"?zr.createElementNS(Km,e):r?zr.createElement(e,{is:r}):zr.createElement(e);return e==="select"&&n&&n.multiple!=null&&s.setAttribute("multiple",n.multiple),s},createText:e=>zr.createTextNode(e),createComment:e=>zr.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>zr.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{Ad.innerHTML=Ed(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=Ad.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]}},an="transition",oi="animation",ys=Symbol("_vtc"),Id={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},Rd=Ye({},Ia,Id),Wm=e=>(e.displayName="Transition",e.props=Rd,e),Gm=Wm((e,{slots:t})=>Qt(yu,Dd(e),t)),qn=(e,t=[])=>{ge(e)?e.forEach(r=>r(...t)):e&&e(...t)},$d=e=>e?ge(e)?e.some(t=>t.length>1):e.length>1:!1;function Dd(e){const t={};for(const T in e)T in Id||(t[T]=e[T]);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:c=o,appearToClass:u=a,leaveFromClass:d=`${r}-leave-from`,leaveActiveClass:p=`${r}-leave-active`,leaveToClass:h=`${r}-leave-to`}=e,g=Jm(s),w=g&&g[0],C=g&&g[1],{onBeforeEnter:v,onEnter:x,onEnterCancelled:y,onLeave:b,onLeaveCancelled:_,onBeforeAppear:$=v,onAppear:R=x,onAppearCancelled:m=y}=t,P=(T,E,M,j)=>{T._enterCancelled=j,ln(T,E?u:a),ln(T,E?c:o),M&&M()},O=(T,E)=>{T._isLeaving=!1,ln(T,d),ln(T,h),ln(T,p),E&&E()},S=T=>(E,M)=>{const j=T?R:x,z=()=>P(E,T,M);qn(j,[E,z]),Pd(()=>{ln(E,T?l:i),Sr(E,T?u:a),$d(j)||Od(E,n,w,z)})};return Ye(t,{onBeforeEnter(T){qn(v,[T]),Sr(T,i),Sr(T,o)},onBeforeAppear(T){qn($,[T]),Sr(T,l),Sr(T,c)},onEnter:S(!1),onAppear:S(!0),onLeave(T,E){T._isLeaving=!0;const M=()=>O(T,E);Sr(T,d),T._enterCancelled?(Sr(T,p),il(T)):(il(T),Sr(T,p)),Pd(()=>{T._isLeaving&&(ln(T,d),Sr(T,h),$d(b)||Od(T,n,C,M))}),qn(b,[T,M])},onEnterCancelled(T){P(T,!1,void 0,!0),qn(y,[T])},onAppearCancelled(T){P(T,!0,void 0,!0),qn(m,[T])},onLeaveCancelled(T){O(T),qn(_,[T])}})}function Jm(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 Pi(e)}function Sr(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.add(r)),(e[ys]||(e[ys]=new Set)).add(t)}function ln(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 Pd(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var Ym=0;function Od(e,t,r,n){const s=e._endId=++Ym,i=()=>{s===e._endId&&n()};if(r!=null)return setTimeout(i,r);const{type:o,timeout:a,propCount:l}=Hd(e,t);if(!o)return n();const c=o+"end";let u=0;const d=()=>{e.removeEventListener(c,p),i()},p=h=>{h.target===e&&++u>=l&&d()};setTimeout(()=>{u<l&&d()},a+1),e.addEventListener(c,p)}function Hd(e,t){const r=window.getComputedStyle(e),n=g=>(r[g]||"").split(", "),s=n(`${an}Delay`),i=n(`${an}Duration`),o=Md(s,i),a=n(`${oi}Delay`),l=n(`${oi}Duration`),c=Md(a,l);let u=null,d=0,p=0;t===an?o>0&&(u=an,d=o,p=i.length):t===oi?c>0&&(u=oi,d=c,p=l.length):(d=Math.max(o,c),u=d>0?o>c?an:oi:null,p=u?u===an?i.length:l.length:0);const h=u===an&&/\b(?:transform|all)(?:,|$)/.test(n(`${an}Property`).toString());return{type:u,timeout:d,propCount:p,hasTransform:h}}function Md(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((r,n)=>qd(r)+qd(e[n])))}function qd(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function il(e){return(e?e.ownerDocument:document).body.offsetHeight}function Zm(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 wo=Symbol("_vod"),Nd=Symbol("_vsh"),yo={name:"show",beforeMount(e,{value:t},{transition:r}){e[wo]=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[wo]:"none",e[Nd]=!t}function Xm(){yo.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}var Bd=Symbol("");function Qm(e){const t=tt();if(!t)return;const r=t.ut=(s=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(i=>bo(i,s))},n=()=>{const s=e(t.proxy);t.ce?bo(t.ce,s):ol(t.subTree,s),r(s)};Pa(()=>{Ks(n)}),Ue(()=>{Ie(n,Jt,{flush:"post"});const s=new MutationObserver(n);s.observe(t.subTree.el.parentNode,{childList:!0}),Rt(()=>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)bo(e.el,t);else if(e.type===Oe)e.children.forEach(r=>ol(r,t));else if(e.type===On){let{el:r,anchor:n}=e;for(;r&&(bo(r,t),r!==n);)r=r.nextSibling}}function bo(e,t){if(e.nodeType===1){const r=e.style;let n="";for(const s in t){const i=Rg(t[s]);r.setProperty(`--${s}`,i),n+=`--${s}: ${i};`}r[Bd]=n}}var ew=/(?:^|;)\s*display\s*:/;function tw(e,t,r){const n=e.style,s=Qe(r);let i=!1;if(r&&!s){if(t)if(Qe(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();r[a]==null&&So(n,a,"")}else for(const o in t)r[o]==null&&So(n,o,"");for(const o in r)o==="display"&&(i=!0),So(n,o,r[o])}else if(s){if(t!==r){const o=n[Bd];o&&(r+=";"+o),n.cssText=r,i=ew.test(r)}}else t&&e.removeAttribute("style");wo in e&&(e[wo]=i?n.display:"",e[Nd]&&(n.display="none"))}var Fd=/\s*!important$/;function So(e,t,r){if(ge(r))r.forEach(n=>So(e,t,n));else if(r==null&&(r=""),t.startsWith("--"))e.setProperty(t,r);else{const n=rw(e,t);Fd.test(r)?e.setProperty(Ot(n),r.replace(Fd,""),"important"):e[n]=r}}var Ld=["Webkit","Moz","ms"],al={};function rw(e,t){const r=al[t];if(r)return r;let n=ct(t);if(n!=="filter"&&n in e)return al[t]=n;n=qs(n);for(let s=0;s<Ld.length;s++){const i=Ld[s]+n;if(i in e)return al[t]=i}return t}var Vd="http://www.w3.org/1999/xlink";function jd(e,t,r,n,s,i=kg(t)){n&&t.startsWith("xlink:")?r==null?e.removeAttributeNS(Vd,t.slice(6,t.length)):e.setAttributeNS(Vd,t,r):r==null||i&&!Oc(r)?e.removeAttribute(t):e.setAttribute(t,i?"":ar(r)?String(r):r)}function Ud(e,t,r,n,s){if(t==="innerHTML"||t==="textContent"){r!=null&&(e[t]=t==="innerHTML"?Ed(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=Oc(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 Kr(e,t,r,n){e.addEventListener(t,r,n)}function nw(e,t,r,n){e.removeEventListener(t,r,n)}var zd=Symbol("_vei");function sw(e,t,r,n,s=null){const i=e[zd]||(e[zd]={}),o=i[t];if(n&&o)o.value=n;else{const[a,l]=iw(t);n?Kr(e,a,i[t]=lw(n,s),l):o&&(nw(e,a,o,l),i[t]=void 0)}}var Kd=/(?:Once|Passive|Capture)$/;function iw(e){let t;if(Kd.test(e)){t={};let r;for(;r=e.match(Kd);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Ot(e.slice(2)),t]}var ll=0,ow=Promise.resolve(),aw=()=>ll||(ow.then(()=>ll=0),ll=Date.now());function lw(e,t){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;Yt(cw(n,r.value),t,5,[n])};return r.value=e,r.attached=aw(),r}function cw(e,t){if(ge(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 Wd=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Gd=(e,t,r,n,s,i)=>{const o=s==="svg";t==="class"?Zm(e,n,o):t==="style"?tw(e,r,n):Ms(t)?aa(t)||sw(e,t,r,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):uw(e,t,n,o))?(Ud(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&jd(e,t,n,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Qe(n))?Ud(e,ct(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),jd(e,t,n,o))};function uw(e,t,r,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Wd(t)&&_e(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 Wd(t)&&Qe(r)?!1:t in e}var Jd={};function cl(e,t,r){let n=G(e,t);Ii(n)&&(n=Ye({},n,t));class s extends Yd{constructor(o){super(n,o,r)}}return s.def=n,s}var dw=((e,t)=>cl(e,t,gf)),fw=typeof HTMLElement<"u"?HTMLElement:class{},Yd=class dg extends fw{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(Ye({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof dg){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,ot(()=>{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&&!ge(i))for(const l in i){const c=i[l];(c===Number||c&&c.type===Number)&&(l in this._props&&(this._props[l]=Pi(this._props[l])),(a||(a=Object.create(null)))[ct(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)Le(this,n)||Object.defineProperty(this,n,{get:()=>f(r[n])})}_resolveProps(t){const{props:r}=t,n=ge(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(ct))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):Jd;const s=ct(t);r&&this._numberProps&&this._numberProps[s]&&(n=Pi(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===Jd?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(Ot(t),""):typeof r=="string"||typeof r=="number"?this.setAttribute(Ot(t),r+""):r||this.removeAttribute(Ot(t)),i&&i.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),hf(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const r=D(this._def,Ye(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,Ii(o[0])?Ye({detail:o},o[0]):{detail:o}))};n.emit=(i,...o)=>{s(i,o),Ot(i)!==i&&s(Ot(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 c=r+"-s",u=document.createTreeWalker(l,1);l.setAttribute(c,"");let d;for(;d=u.nextNode();)d.setAttribute(c,"")}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()}_removeChildStyle(t){}};function Zd(e){const t=tt(),r=t&&t.ce;return r||null}function pw(){const e=Zd();return e&&e.shadowRoot}function hw(e="$style"){{const t=tt();if(!t)return He;const r=t.type.__cssModules;if(!r)return He;const n=r[e];return n||He}}var Xd=new WeakMap,Qd=new WeakMap,Co=Symbol("_moveCb"),ef=Symbol("_enterCb"),gw=e=>(delete e.props.mode,e),vw=gw({name:"TransitionGroup",props:Ye({},Rd,{tag:String,moveClass:String}),setup(e,{slots:t}){const r=tt(),n=ka();let s,i;return ao(()=>{if(!s.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!bw(s[0].el,r.vnode.el,o)){s=[];return}s.forEach(mw),s.forEach(ww);const a=s.filter(yw);il(r.vnode.el),a.forEach(l=>{const c=l.el,u=c.style;Sr(c,o),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[Co]=p=>{p&&p.target!==c||(!p||p.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",d),c[Co]=null,ln(c,o))};c.addEventListener("transitionend",d)}),s=[]}),()=>{const o=Me(e),a=Dd(o);let l=o.tag||Oe;if(s=[],i)for(let c=0;c<i.length;c++){const u=i[c];u.el&&u.el instanceof Element&&(s.push(u),Vr(u,fs(u,a,n,r)),Xd.set(u,{left:u.el.offsetLeft,top:u.el.offsetTop}))}i=t.default?eo(t.default()):[];for(let c=0;c<i.length;c++){const u=i[c];u.key!=null&&Vr(u,fs(u,a,n,r))}return D(l,null,i)}}});function mw(e){const t=e.el;t[Co]&&t[Co](),t[ef]&&t[ef]()}function ww(e){Qd.set(e,{left:e.el.offsetLeft,top:e.el.offsetTop})}function yw(e){const t=Xd.get(e),r=Qd.get(e),n=t.left-r.left,s=t.top-r.top;if(n||s){const i=e.el.style;return i.transform=i.webkitTransform=`translate(${n}px,${s}px)`,i.transitionDuration="0s",e}}function bw(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}=Hd(n);return i.removeChild(n),o}var cn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ge(t)?r=>ss(t,r):t};function Sw(e){e.target.composing=!0}function tf(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}var er=Symbol("_assign");function rf(e,t,r){return t&&(e=e.trim()),r&&(e=Di(e)),e}var li={created(e,{modifiers:{lazy:t,trim:r,number:n}},s){e[er]=cn(s);const i=n||s.props&&s.props.type==="number";Kr(e,t?"change":"input",o=>{o.target.composing||e[er](rf(e.value,r,i))}),(r||i)&&Kr(e,"change",()=>{e.value=rf(e.value,r,i)}),t||(Kr(e,"compositionstart",Sw),Kr(e,"compositionend",tf),Kr(e,"change",tf))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:r,modifiers:{lazy:n,trim:s,number:i}},o){if(e[er]=cn(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?Di(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[er]=cn(r),Kr(e,"change",()=>{const n=e._modelValue,s=bs(e),i=e.checked,o=e[er];if(ge(n)){const a=Hi(n,s),l=a!==-1;if(i&&!l)o(n.concat(s));else if(!i&&l){const c=[...n];c.splice(a,1),o(c)}}else if(An(n)){const a=new Set(n);i?a.add(s):a.delete(s),o(a)}else o(af(e,i))})},mounted:nf,beforeUpdate(e,t,r){e[er]=cn(r),nf(e,t,r)}};function nf(e,{value:t,oldValue:r},n){e._modelValue=t;let s;if(ge(t))s=Hi(t,n.props.value)>-1;else if(An(t))s=t.has(n.props.value);else{if(t===r)return;s=Xr(t,af(e,!0))}e.checked!==s&&(e.checked=s)}var dl={created(e,{value:t},r){e.checked=Xr(t,r.props.value),e[er]=cn(r),Kr(e,"change",()=>{e[er](bs(e))})},beforeUpdate(e,{value:t,oldValue:r},n){e[er]=cn(n),t!==r&&(e.checked=Xr(t,n.props.value))}},sf={deep:!0,created(e,{value:t,modifiers:{number:r}},n){const s=An(t);Kr(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>r?Di(bs(o)):bs(o));e[er](e.multiple?s?new Set(i):i:i[0]),e._assigning=!0,ot(()=>{e._assigning=!1})}),e[er]=cn(n)},mounted(e,{value:t}){of(e,t)},beforeUpdate(e,t,r){e[er]=cn(r)},updated(e,{value:t}){e._assigning||of(e,t)}};function of(e,t){const r=e.multiple,n=ge(t);if(!(r&&!n&&!An(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(c=>String(c)===String(a)):o.selected=Hi(t,a)>-1}else o.selected=t.has(a);else if(Xr(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 af(e,t){const r=t?"_trueValue":"_falseValue";return r in e?e[r]:t}var lf={created(e,t,r){_o(e,t,r,null,"created")},mounted(e,t,r){_o(e,t,r,null,"mounted")},beforeUpdate(e,t,r,n){_o(e,t,r,n,"beforeUpdate")},updated(e,t,r,n){_o(e,t,r,n,"updated")}};function cf(e,t){switch(e){case"SELECT":return sf;case"TEXTAREA":return li;default:switch(t){case"checkbox":return ul;case"radio":return dl;default:return li}}}function _o(e,t,r,n,s){const i=cf(e.tagName,r.props&&r.props.type)[s];i&&i(e,t,r,n)}function Cw(){li.getSSRProps=({value:e})=>({value:e}),dl.getSSRProps=({value:e},t)=>{if(t.props&&Xr(t.props.value,e))return{checked:!0}},ul.getSSRProps=({value:e},t)=>{if(ge(e)){if(t.props&&Hi(e,t.props.value)>-1)return{checked:!0}}else if(An(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},lf.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const r=cf(t.type.toUpperCase(),t.props&&t.props.type);if(r.getSSRProps)return r.getSSRProps(e,t)}}var _w=["ctrl","shift","alt","meta"],xw={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)=>_w.some(r=>e[`${r}Key`]&&!t.includes(r))},Cr=(e,t)=>{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=xw[t[o]];if(a&&a(s,t))return}return e(s,...i)}))},Tw={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=Ot(s.key);if(t.some(o=>o===i||Tw[o]===i))return e(s)}))},uf=Ye({patchProp:Gd},kd),ci,df=!1;function ff(){return ci||(ci=ad(uf))}function pf(){return ci=df?ci:ld(uf),df=!0,ci}var hf=((...e)=>{ff().render(...e)}),Ew=((...e)=>{pf().hydrate(...e)}),pl=((...e)=>{const t=ff().createApp(...e),{mount:r}=t;return t.mount=n=>{const s=mf(n);if(!s)return;const i=t._component;!_e(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=r(s,!1,vf(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},t}),gf=((...e)=>{const t=pf().createApp(...e),{mount:r}=t;return t.mount=n=>{const s=mf(n);if(s)return r(s,!0,vf(s))},t});function vf(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function mf(e){return Qe(e)?document.querySelector(e):e}var wf=!1,Aw=()=>{wf||(wf=!0,Cw(),Xm())},kw=mg({BaseTransition:()=>yu,BaseTransitionPropsValidators:()=>Ia,Comment:()=>nt,DeprecationTypes:()=>null,EffectScope:()=>da,ErrorCodes:()=>pv,ErrorTypeStrings:()=>Lm,Fragment:()=>Oe,KeepAlive:()=>Mv,ReactiveEffect:()=>Ns,Static:()=>On,Suspense:()=>Cm,Teleport:()=>Aa,Text:()=>sn,TrackOpTypes:()=>ov,Transition:()=>Gm,TransitionGroup:()=>vw,TriggerOpTypes:()=>av,VueElement:()=>Yd,assertNumber:()=>fv,callWithAsyncErrorHandling:()=>Yt,callWithErrorHandling:()=>ls,camelize:()=>ct,capitalize:()=>qs,cloneVNode:()=>dr,compatUtils:()=>null,compile:()=>Iw,computed:()=>N,createApp:()=>pl,createBlock:()=>q,createCommentVNode:()=>Ee,createElementBlock:()=>we,createElementVNode:()=>ne,createHydrationRenderer:()=>ld,createPropsRestProxy:()=>Xv,createRenderer:()=>ad,createSSRApp:()=>gf,createSlots:()=>Lv,createStaticVNode:()=>Rm,createTextVNode:()=>$e,createVNode:()=>D,customRef:()=>zs,defineAsyncComponent:()=>Hv,defineComponent:()=>G,defineCustomElement:()=>cl,defineEmits:()=>Uv,defineExpose:()=>zv,defineModel:()=>Gv,defineOptions:()=>Kv,defineProps:()=>jv,defineSSRCustomElement:()=>dw,defineSlots:()=>Wv,devtools:()=>Vm,effect:()=>Dg,effectScope:()=>fa,getCurrentInstance:()=>tt,getCurrentScope:()=>is,getCurrentWatcher:()=>lv,getTransitionRawChildren:()=>eo,guardReactiveProps:()=>Dt,h:()=>Qt,handleError:()=>In,hasInjectionContext:()=>ja,hydrate:()=>Ew,hydrateOnIdle:()=>Iv,hydrateOnInteraction:()=>Pv,hydrateOnMediaQuery:()=>Dv,hydrateOnVisible:()=>$v,initCustomFormatter:()=>Nm,initDirectivesForSSR:()=>Aw,inject:()=>bt,isMemoSame:()=>_d,isProxy:()=>Us,isReactive:()=>Br,isReadonly:()=>wr,isRef:()=>We,isRuntimeOnly:()=>Hm,isShallow:()=>Mt,isVNode:()=>Ur,markRaw:()=>Ca,mergeDefaults:()=>Bu,mergeModels:()=>Zv,mergeProps:()=>ue,nextTick:()=>ot,nodeOps:()=>kd,normalizeClass:()=>Ke,normalizeProps:()=>Ht,normalizeStyle:()=>mt,onActivated:()=>Eu,onBeforeMount:()=>Iu,onBeforeUnmount:()=>vs,onBeforeUpdate:()=>Pa,onDeactivated:()=>Au,onErrorCaptured:()=>Pu,onMounted:()=>Ue,onRenderTracked:()=>Du,onRenderTriggered:()=>$u,onScopeDispose:()=>Mi,onServerPrefetch:()=>Ru,onUnmounted:()=>Rt,onUpdated:()=>ao,onWatcherCleanup:()=>nu,openBlock:()=>I,patchProp:()=>Gd,popScopeId:()=>wv,provide:()=>Dn,proxyRefs:()=>_a,pushScopeId:()=>mv,queuePostFlushCb:()=>Ks,reactive:()=>Nr,readonly:()=>wt,ref:()=>B,registerRuntimeCompiler:()=>Om,render:()=>hf,renderList:()=>Xt,renderSlot:()=>Z,resolveComponent:()=>Bv,resolveDirective:()=>Fv,resolveDynamicComponent:()=>Rn,resolveFilter:()=>null,resolveTransitionHooks:()=>fs,setBlockTracking:()=>si,setDevtoolsHook:()=>jm,setTransitionHooks:()=>Vr,shallowReactive:()=>eu,shallowReadonly:()=>en,shallowRef:()=>Ze,ssrContextKey:()=>zu,ssrUtils:()=>Um,stop:()=>Pg,toDisplayString:()=>Re,toHandlerKey:()=>ns,toHandlers:()=>Mu,toRaw:()=>Me,toRef:()=>xa,toRefs:()=>ft,toValue:()=>xe,transformVNodeArgs:()=>km,triggerRef:()=>Qg,unref:()=>f,useAttrs:()=>Yv,useCssModule:()=>hw,useCssVars:()=>Qm,useHost:()=>Zd,useId:()=>Cu,useModel:()=>lm,useSSRContext:()=>Ku,useShadowRoot:()=>pw,useSlots:()=>qu,useTemplateRef:()=>Cv,useTransitionState:()=>ka,vModelCheckbox:()=>ul,vModelDynamic:()=>lf,vModelRadio:()=>dl,vModelSelect:()=>sf,vModelText:()=>li,vShow:()=>yo,version:()=>xd,warn:()=>Fm,watch:()=>Ie,watchEffect:()=>rt,watchPostEffect:()=>Ua,watchSyncEffect:()=>Wu,withAsyncContext:()=>Qv,withCtx:()=>A,withDefaults:()=>Jv,withDirectives:()=>Yi,withKeys:()=>fl,withMemo:()=>Bm,withModifiers:()=>Cr,withScopeId:()=>yv},1),Iw=()=>{},Rw=2;const fr={CALL_HISTORY:"call_history",CONTACTS:"contacts",CONNECTIONS:"connections"},$w=(e="webphone_db")=>{const t=B(null),r=B(!1);return{initDB:()=>new Promise((l,c)=>{if(t.value){l();return}const u=indexedDB.open(e,Rw);u.onerror=d=>{console.error("IndexedDB error:",d),c(d)},u.onsuccess=d=>{t.value=d.target.result,r.value=!0,l()},u.onupgradeneeded=d=>{const p=d.target.result;p.objectStoreNames.contains(fr.CALL_HISTORY)||p.createObjectStore(fr.CALL_HISTORY,{keyPath:"id"}),p.objectStoreNames.contains(fr.CONTACTS)||p.createObjectStore(fr.CONTACTS,{keyPath:"number"}),p.objectStoreNames.contains(fr.CONNECTIONS)||p.createObjectStore(fr.CONNECTIONS,{keyPath:"id"})}}),getAll:l=>new Promise((c,u)=>{if(!t.value)return u("DB not initialized");const d=t.value.transaction([l],"readonly").objectStore(l).getAll();d.onsuccess=()=>c(d.result),d.onerror=()=>u(d.error)}),add:(l,c)=>new Promise((u,d)=>{if(!t.value)return d("DB not initialized");const p=t.value.transaction([l],"readwrite").objectStore(l).add(c);p.onsuccess=()=>u(),p.onerror=()=>d(p.error)}),put:(l,c)=>new Promise((u,d)=>{if(!t.value)return d("DB not initialized");const p=t.value.transaction([l],"readwrite").objectStore(l).put(c);p.onsuccess=()=>u(),p.onerror=()=>d(p.error)}),remove:(l,c)=>new Promise((u,d)=>{if(!t.value)return d("DB not initialized");const p=t.value.transaction([l],"readwrite").objectStore(l).delete(c);p.onsuccess=()=>u(),p.onerror=()=>d(p.error)}),isReady:r}},Dw=e=>{const t=B(!1),r=B(0),n=B(null),s=B([]),i=B([]),{initDB:o,getAll:a,add:l}=$w(e?.server&&e?.extension?`webphone_${e.server}_${e.extension}`.replace(/[^a-z0-9_]/gi,"_"):"webphone_db");o().then(async()=>{try{s.value=(await a(fr.CALL_HISTORY)).sort((be,K)=>K.startTime-be.startTime),i.value=await a(fr.CONTACTS)}catch(be){console.error("Error loading data from IndexedDB:",be)}});const c=B([{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}]),u=B(!0),d=B(""),p=B(!1),h=N(()=>c.value.find(be=>be.id===r.value)||c.value[0]),g=N(()=>h.value?.status||"idle"),w=N(()=>h.value?.remoteNumber||""),C=N(()=>h.value?.isMuted||!1),v=N(()=>h.value?.isHeld||!1),x=N({get:()=>h.value?.keypadValue||"",set:be=>{h.value&&(h.value.keypadValue=be)}}),y=be=>{t.value=be},b=be=>{c.value.some(K=>K.id===be)&&(r.value=be)},_=(be,K)=>{const te=c.value.find(re=>re.id===be);te&&Object.assign(te,K)};return{isConnected:t,activeChannelId:r,channels:c,activeChannel:h,callStatus:g,remoteNumber:w,isMuted:C,isHeld:v,keypadValue:x,isKeypadVisible:u,lastDialedNumber:d,videoModeEnabled:p,transferInProgress:n,setConnected:y,setActiveChannelId:b,updateChannelState:_,setCallStatus:be=>{_(r.value,{status:be})},setIncomingCall:be=>{_(r.value,{remoteNumber:be})},resetCall:()=>{_(r.value,{status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1})},addCallLog:async be=>{const K={id:crypto.randomUUID(),...be};s.value.unshift(K);try{await l(fr.CALL_HISTORY,K)}catch(te){console.error("Error saving call log:",te)}},callHistory:s,contacts:i,addContact:async be=>{try{await l(fr.CONTACTS,be),i.value=await a(fr.CONTACTS)}catch(K){console.error("Error saving contact:",K)}},setMuted:be=>{_(r.value,{isMuted:be})},setHeld:be=>{_(r.value,{isHeld:be})},appendKeypad:be=>{x.value+=be},clearKeypad:()=>{x.value=""},backspaceKeypad:()=>{x.value=x.value.slice(0,-1)},toggleKeypad:()=>{u.value=!u.value},setLastDialedNumber:be=>{d.value=be},setTransferInProgress:be=>{n.value=be},toggleVideoMode:()=>{p.value=!p.value}}},Pw="0.21.1";var Nn=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}},hl=class extends Nn{constructor(e){super(e||"Unsupported content type.")}},gl=class extends Nn{constructor(e){super(e||"Request pending.")}},Ow=class extends Nn{constructor(e){super(e||"Unspecified session description handler error.")}},vl=class extends Nn{constructor(){super("The session has terminated.")}},ui=class extends Nn{constructor(e){super(e||"An error occurred during state transition.")}},Hw=class{constructor(e){this.incomingAckRequest=e}get request(){return this.incomingAckRequest.message}},Mw=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()}},qw=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})}},Nw=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()}},yf=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={}}},tr=class fg extends yf{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 fg(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}},un=class pg extends yf{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 pg(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 bf(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(c=>l.includes(c)).every(c=>i.parameters[c]===o.parameters[c])||!["user","ttl","method","transport"].every(c=>i.hasParam(c)&&o.hasParam(c)||!i.hasParam(c)&&!o.hasParam(c))||!["maddr"].every(c=>i.hasParam(c)&&o.hasParam(c)||!i.hasParam(c)&&!o.hasParam(c)))}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 Sf=class sa 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,sa.prototype):this.__proto__=sa.prototype,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,sa)}static buildMessage(t,r){function n(c){return c.charCodeAt(0).toString(16).toUpperCase()}function s(c){return c.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,u=>"\\x0"+n(u)).replace(/[\x10-\x1F\x7F-\x9F]/g,u=>"\\x"+n(u))}function i(c){return c.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,u=>"\\x0"+n(u)).replace(/[\x10-\x1F\x7F-\x9F]/g,u=>"\\x"+n(u))}function o(c){switch(c.type){case"literal":return'"'+s(c.text)+'"';case"class":const u=c.parts.map(d=>Array.isArray(d)?i(d[0])+"-"+i(d[1]):i(d));return"["+(c.inverted?"^":"")+u+"]";case"any":return"any character";case"end":return"end of input";case"other":return c.description}}function a(c){const u=c.map(o);let d,p;if(u.sort(),u.length>0){for(d=1,p=1;d<u.length;d++)u[d-1]!==u[d]&&(u[p]=u[d],p++);u.length=p}switch(u.length){case 1:return u[0];case 2:return u[0]+" or "+u[1];default:return u.slice(0,-1).join(", ")+", or "+u[u.length-1]}}function l(c){return c?'"'+s(c)+'"':"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," "),c=n[i.line-1],u=i.line===a.line?a.column:c.length+1;r+=`
4
+ (function(){var Ac=Object.defineProperty,mg=(e,t)=>{let r={};for(var n in e)Ac(r,n,{get:e[n],enumerable:!0});return t&&Ac(r,Symbol.toStringTag,{value:"Module"}),r};function Hs(e){const t=Object.create(null);for(const r of e.split(","))t[r]=1;return r=>r in t}var He={},Qn=[],Jt=()=>{},kc=()=>!1,Ms=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),aa=e=>e.startsWith("onUpdate:"),Ye=Object.assign,la=(e,t)=>{const r=e.indexOf(t);r>-1&&e.splice(r,1)},wg=Object.prototype.hasOwnProperty,Le=(e,t)=>wg.call(e,t),pe=Array.isArray,es=e=>ts(e)==="[object Map]",An=e=>ts(e)==="[object Set]",Ic=e=>ts(e)==="[object Date]",yg=e=>ts(e)==="[object RegExp]",Ce=e=>typeof e=="function",tt=e=>typeof e=="string",ar=e=>typeof e=="symbol",je=e=>e!==null&&typeof e=="object",ca=e=>(je(e)||Ce(e))&&Ce(e.then)&&Ce(e.catch),Rc=Object.prototype.toString,ts=e=>Rc.call(e),bg=e=>ts(e).slice(8,-1),Ii=e=>ts(e)==="[object Object]",Ri=e=>tt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,rs=Hs(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),$i=e=>{const t=Object.create(null);return(r=>t[r]||(t[r]=e(r)))},Sg=/-\w/g,ct=$i(e=>e.replace(Sg,t=>t.slice(1).toUpperCase())),Cg=/\B([A-Z])/g,Ot=$i(e=>e.replace(Cg,"-$1").toLowerCase()),qs=$i(e=>e.charAt(0).toUpperCase()+e.slice(1)),ns=$i(e=>e?`on${qs(e)}`:""),kt=(e,t)=>!Object.is(e,t),ss=(e,...t)=>{for(let r=0;r<e.length;r++)e[r](...t)},$c=(e,t,r,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:r})},Di=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Pi=e=>{const t=tt(e)?Number(e):NaN;return isNaN(t)?e:t},Dc,Oi=()=>Dc||(Dc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),_g=Hs("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(pe(e)){const t={};for(let r=0;r<e.length;r++){const n=e[r],s=tt(n)?Ag(n):mt(n);if(s)for(const i in s)t[i]=s[i]}return t}else if(tt(e)||je(e))return e}var xg=/;(?![^(]*\))/g,Tg=/:([^]+)/,Eg=/\/\*[^]*?\*\//g;function Ag(e){const t={};return e.replace(Eg,"").split(xg).forEach(r=>{if(r){const n=r.split(Tg);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Ke(e){let t="";if(tt(e))t=e;else if(pe(e))for(let r=0;r<e.length;r++){const n=Ke(e[r]);n&&(t+=n+" ")}else if(je(e))for(const r in e)e[r]&&(t+=r+" ");return t.trim()}function Ht(e){if(!e)return null;let{class:t,style:r}=e;return t&&!tt(t)&&(e.class=Ke(t)),r&&(e.style=mt(r)),e}var Pc="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",kg=Hs(Pc),qT=Hs(Pc+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function Oc(e){return!!e||e===""}function Ig(e,t){if(e.length!==t.length)return!1;let r=!0;for(let n=0;r&&n<e.length;n++)r=Xr(e[n],t[n]);return r}function Xr(e,t){if(e===t)return!0;let r=Ic(e),n=Ic(t);if(r||n)return r&&n?e.getTime()===t.getTime():!1;if(r=ar(e),n=ar(t),r||n)return e===t;if(r=pe(e),n=pe(t),r||n)return r&&n?Ig(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||!Xr(e[s],t[s]))return!1}}return String(e)===String(t)}function Hi(e,t){return e.findIndex(r=>Xr(r,t))}var Hc=e=>!!(e&&e.__v_isRef===!0),Re=e=>tt(e)?e:e==null?"":pe(e)||je(e)&&(e.toString===Rc||!Ce(e.toString))?Hc(e)?Re(e.value):JSON.stringify(e,Mc,2):String(e),Mc=(e,t)=>Hc(t)?Mc(e,t.value):es(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((r,[n,s],i)=>(r[ua(n,i)+" =>"]=s,r),{})}:An(t)?{[`Set(${t.size})`]:[...t.values()].map(r=>ua(r))}:ar(t)?ua(t):je(t)&&!pe(t)&&!Ii(t)?String(t):t,ua=(e,t="")=>{var r;return ar(e)?`Symbol(${(r=e.description)!=null?r:t})`:e};function Rg(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:(typeof e!="number"||Number.isFinite(e),String(e))}var _t,da=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=_t,!e&&_t&&(this.index=(_t.scopes||(_t.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=_t;try{return _t=this,e()}finally{_t=t}}}on(){++this._on===1&&(this.prevScope=_t,_t=this)}off(){this._on>0&&--this._on===0&&(_t=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 fa(e){return new da(e)}function is(){return _t}function Mi(e,t=!1){_t&&_t.cleanups.push(e)}var rt,pa=new WeakSet,Ns=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,_t&&_t.active&&_t.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||Nc(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,jc(this),Bc(this);const e=rt,t=lr;rt=this,lr=!0;try{return this.fn()}finally{Fc(this),rt=e,lr=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,jc(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)}},qc=0,Bs,Fs;function Nc(e,t=!1){if(e.flags|=8,t){e.next=Fs,Fs=e;return}e.next=Bs,Bs=e}function ha(){qc++}function ga(){if(--qc>0)return;if(Fs){let t=Fs;for(Fs=void 0;t;){const r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;for(;Bs;){let t=Bs;for(Bs=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 Bc(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Fc(e){let t,r=e.depsTail,n=r;for(;n;){const s=n.prevDep;n.version===-1?(n===r&&(r=s),ma(n),$g(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&&(Lc(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Lc(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ls)||(e.globalVersion=Ls,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!va(e))))return;e.flags|=2;const t=e.dep,r=rt,n=lr;rt=e,lr=!0;try{Bc(e);const s=e.fn(e._value);(t.version===0||kt(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{rt=r,lr=n,Fc(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 $g(e){const{prevDep:t,nextDep:r}=e;t&&(t.nextDep=r,e.prevDep=void 0),r&&(r.prevDep=t,e.nextDep=void 0)}function Dg(e,t){e.effect instanceof Ns&&(e=e.effect.fn);const r=new Ns(e);t&&Ye(r,t);try{r.run()}catch(s){throw r.stop(),s}const n=r.run.bind(r);return n.effect=r,n}function Pg(e){e.effect.stop()}var lr=!0,Vc=[];function Or(){Vc.push(lr),lr=!1}function Hr(){const e=Vc.pop();lr=e===void 0?!0:e}function jc(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const r=rt;rt=void 0;try{t()}finally{rt=r}}}var Ls=0,Og=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}},qi=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(!rt||!lr||rt===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==rt)t=this.activeLink=new Og(rt,this),rt.deps?(t.prevDep=rt.depsTail,rt.depsTail.nextDep=t,rt.depsTail=t):rt.deps=rt.depsTail=t,Uc(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=rt.depsTail,t.nextDep=void 0,rt.depsTail.nextDep=t,rt.depsTail=t,rt.deps===t&&(rt.deps=r)}return t}trigger(e){this.version++,Ls++,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 Uc(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)Uc(n)}const r=e.dep.subs;r!==e&&(e.prevSub=r,r&&(r.nextSub=e)),e.dep.subs=e}}var Ni=new WeakMap,kn=Symbol(""),wa=Symbol(""),Vs=Symbol("");function xt(e,t,r){if(lr&&rt){let n=Ni.get(e);n||Ni.set(e,n=new Map);let s=n.get(r);s||(n.set(r,s=new qi),s.map=n,s.key=r),s.track()}}function Mr(e,t,r,n,s,i){const o=Ni.get(e);if(!o){Ls++;return}const a=l=>{l&&l.trigger()};if(ha(),t==="clear")o.forEach(a);else{const l=pe(e),c=l&&Ri(r);if(l&&r==="length"){const u=Number(n);o.forEach((d,p)=>{(p==="length"||p===Vs||!ar(p)&&p>=u)&&a(d)})}else switch((r!==void 0||o.has(void 0))&&a(o.get(r)),c&&a(o.get(Vs)),t){case"add":l?c&&a(o.get("length")):(a(o.get(kn)),es(e)&&a(o.get(wa)));break;case"delete":l||(a(o.get(kn)),es(e)&&a(o.get(wa)));break;case"set":es(e)&&a(o.get(kn));break}}ga()}function Hg(e,t){const r=Ni.get(e);return r&&r.get(t)}function os(e){const t=Me(e);return t===e?t:(xt(t,"iterate",Vs),Mt(e)?t:t.map(cr))}function Bi(e){return xt(e=Me(e),"iterate",Vs),e}function Qr(e,t){return wr(e)?Br(e)?as(cr(t)):as(t):cr(t)}var Mg={__proto__:null,[Symbol.iterator](){return ya(this,Symbol.iterator,e=>Qr(this,e))},concat(...e){return os(this).concat(...e.map(t=>pe(t)?os(t):t))},entries(){return ya(this,"entries",e=>(e[1]=Qr(this,e[1]),e))},every(e,t){return qr(this,"every",e,t,void 0,arguments)},filter(e,t){return qr(this,"filter",e,t,r=>r.map(n=>Qr(this,n)),arguments)},find(e,t){return qr(this,"find",e,t,r=>Qr(this,r),arguments)},findIndex(e,t){return qr(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return qr(this,"findLast",e,t,r=>Qr(this,r),arguments)},findLastIndex(e,t){return qr(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return qr(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 qr(this,"map",e,t,void 0,arguments)},pop(){return js(this,"pop")},push(...e){return js(this,"push",e)},reduce(e,...t){return zc(this,"reduce",e,t)},reduceRight(e,...t){return zc(this,"reduceRight",e,t)},shift(){return js(this,"shift")},some(e,t){return qr(this,"some",e,t,void 0,arguments)},splice(...e){return js(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 js(this,"unshift",e)},values(){return ya(this,"values",e=>Qr(this,e))}};function ya(e,t,r){const n=Bi(e),s=n[t]();return n!==e&&!Mt(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=r(i.value)),i}),s}var qg=Array.prototype;function qr(e,t,r,n,s,i){const o=Bi(e),a=o!==e&&!Mt(e),l=o[t];if(l!==qg[t]){const d=l.apply(e,i);return a?cr(d):d}let c=r;o!==e&&(a?c=function(d,p){return r.call(this,Qr(e,d),p,e)}:r.length>2&&(c=function(d,p){return r.call(this,d,p,e)}));const u=l.call(o,c,n);return a&&s?s(u):u}function zc(e,t,r,n){const s=Bi(e);let i=r;return s!==e&&(Mt(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,Qr(e,a),l,e)}),s[t](i,...n)}function ba(e,t,r){const n=Me(e);xt(n,"iterate",Vs);const s=n[t](...r);return(s===-1||s===!1)&&Us(r[0])?(r[0]=Me(r[0]),n[t](...r)):s}function js(e,t,r=[]){Or(),ha();const n=Me(e)[t].apply(e,r);return ga(),Hr(),n}var Ng=Hs("__proto__,__v_isRef,__isVue"),Kc=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ar));function Bg(e){ar(e)||(e=String(e));const t=Me(this);return xt(t,"has",e),t.hasOwnProperty(e)}var Wc=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?Qc:Xc:s?Zc:Yc).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r)?e:void 0;const i=pe(e);if(!n){let a;if(i&&(a=Mg[t]))return a;if(t==="hasOwnProperty")return Bg}const o=Reflect.get(e,t,We(e)?e:r);if((ar(t)?Kc.has(t):Ng(t))||(n||xt(e,"get",t),s))return o;if(We(o)){const a=i&&Ri(t)?o:o.value;return n&&je(a)?wt(a):a}return je(o)?n?wt(o):Nr(o):o}},Gc=class extends Wc{constructor(e=!1){super(!1,e)}set(e,t,r,n){let s=e[t];const i=pe(e)&&Ri(t);if(!this._isShallow){const l=wr(s);if(!Mt(r)&&!wr(r)&&(s=Me(s),r=Me(r)),!i&&We(s)&&!We(r))return l||(s.value=r),!0}const o=i?Number(t)<e.length:Le(e,t),a=Reflect.set(e,t,r,We(e)?e:n);return e===Me(n)&&(o?kt(r,s)&&Mr(e,"set",t,r,s):Mr(e,"add",t,r)),a}deleteProperty(e,t){const r=Le(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(!ar(t)||!Kc.has(t))&&xt(e,"has",t),r}ownKeys(e){return xt(e,"iterate",pe(e)?"length":kn),Reflect.ownKeys(e)}},Jc=class extends Wc{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},Fg=new Gc,Lg=new Jc,Vg=new Gc(!0),jg=new Jc(!0),Sa=e=>e,Fi=e=>Reflect.getPrototypeOf(e);function Ug(e,t,r){return function(...n){const s=this.__v_raw,i=Me(s),o=es(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,c=s[e](...n),u=r?Sa:t?as:cr;return!t&&xt(i,"iterate",l?wa:kn),{next(){const{value:d,done:p}=c.next();return p?{value:d,done:p}:{value:a?[u(d[0]),u(d[1])]:u(d),done:p}},[Symbol.iterator](){return this}}}}function Li(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function zg(e,t){const r={get(n){const s=this.__v_raw,i=Me(s),o=Me(n);e||(kt(n,o)&&xt(i,"get",n),xt(i,"get",o));const{has:a}=Fi(i),l=t?Sa:e?as:cr;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&&xt(Me(n),"iterate",kn),n.size},has(n){const s=this.__v_raw,i=Me(s),o=Me(n);return e||(kt(n,o)&&xt(i,"has",n),xt(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=Me(o),l=t?Sa:e?as:cr;return!e&&xt(a,"iterate",kn),o.forEach((c,u)=>n.call(s,l(c),l(u),i))}};return Ye(r,e?{add:Li("add"),set:Li("set"),delete:Li("delete"),clear:Li("clear")}:{add(n){!t&&!Mt(n)&&!wr(n)&&(n=Me(n));const s=Me(this);return Fi(s).has.call(s,n)||(s.add(n),Mr(s,"add",n,n)),this},set(n,s){!t&&!Mt(s)&&!wr(s)&&(s=Me(s));const i=Me(this),{has:o,get:a}=Fi(i);let l=o.call(i,n);l||(n=Me(n),l=o.call(i,n));const c=a.call(i,n);return i.set(n,s),l?kt(s,c)&&Mr(i,"set",n,s,c):Mr(i,"add",n,s),this},delete(n){const s=Me(this),{has:i,get:o}=Fi(s);let a=i.call(s,n);a||(n=Me(n),a=i.call(s,n));const l=o?o.call(s,n):void 0,c=s.delete(n);return a&&Mr(s,"delete",n,void 0,l),c},clear(){const n=Me(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]=Ug(n,e,t)}),r}function Vi(e,t){const r=zg(e,t);return(n,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?n:Reflect.get(Le(r,s)&&s in n?r:n,s,i)}var Kg={get:Vi(!1,!1)},Wg={get:Vi(!1,!0)},Gg={get:Vi(!0,!1)},Jg={get:Vi(!0,!0)},Yc=new WeakMap,Zc=new WeakMap,Xc=new WeakMap,Qc=new WeakMap;function Yg(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Zg(e){return e.__v_skip||!Object.isExtensible(e)?0:Yg(bg(e))}function Nr(e){return wr(e)?e:ji(e,!1,Fg,Kg,Yc)}function eu(e){return ji(e,!1,Vg,Wg,Zc)}function wt(e){return ji(e,!0,Lg,Gg,Xc)}function en(e){return ji(e,!0,jg,Jg,Qc)}function ji(e,t,r,n,s){if(!je(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=Zg(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 Br(e){return wr(e)?Br(e.__v_raw):!!(e&&e.__v_isReactive)}function wr(e){return!!(e&&e.__v_isReadonly)}function Mt(e){return!!(e&&e.__v_isShallow)}function Us(e){return e?!!e.__v_raw:!1}function Me(e){const t=e&&e.__v_raw;return t?Me(t):e}function Ca(e){return!Le(e,"__v_skip")&&Object.isExtensible(e)&&$c(e,"__v_skip",!0),e}var cr=e=>je(e)?Nr(e):e,as=e=>je(e)?wt(e):e;function We(e){return e?e.__v_isRef===!0:!1}function F(e){return tu(e,!1)}function Ze(e){return tu(e,!0)}function tu(e,t){return We(e)?e:new Xg(e,t)}var Xg=class{constructor(e,t){this.dep=new qi,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:Me(e),this._value=t?e:cr(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,r=this.__v_isShallow||Mt(e)||wr(e);e=r?e:Me(e),kt(e,t)&&(this._rawValue=e,this._value=r?e:cr(e),this.dep.trigger())}};function Qg(e){e.dep&&e.dep.trigger()}function f(e){return We(e)?e.value:e}function _e(e){return Ce(e)?e():f(e)}var ev={get:(e,t,r)=>t==="__v_raw"?e:f(Reflect.get(e,t,r)),set:(e,t,r,n)=>{const s=e[t];return We(s)&&!We(r)?(s.value=r,!0):Reflect.set(e,t,r,n)}};function _a(e){return Br(e)?e:new Proxy(e,ev)}var tv=class{constructor(e){this.__v_isRef=!0,this._value=void 0;const t=this.dep=new qi,{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 zs(e){return new tv(e)}function ft(e){const t=pe(e)?new Array(e.length):{};for(const r in e)t[r]=ru(e,r);return t}var rv=class{constructor(e,t,r){this._object=e,this._key=t,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0,this._raw=Me(e);let n=!0,s=e;if(!pe(e)||!Ri(String(t)))do n=!Us(s)||Mt(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&&We(this._raw[this._key])){const t=this._object[this._key];if(We(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return Hg(this._raw,this._key)}},nv=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 We(e)?e:Ce(e)?new nv(e):je(e)&&arguments.length>1?ru(e,t,r):F(e)}function ru(e,t,r){return new rv(e,t,r)}var sv=class{constructor(e,t,r){this.fn=e,this.setter=t,this._value=void 0,this.dep=new qi(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ls-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&rt!==this)return Nc(this,!0),!0}get value(){const e=this.dep.track();return Lc(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function iv(e,t,r=!1){let n,s;return Ce(e)?n=e:(n=e.get,s=e.set),new sv(n,s,r)}var ov={GET:"get",HAS:"has",ITERATE:"iterate"},av={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},Ui={},zi=new WeakMap,tn=void 0;function lv(){return tn}function nu(e,t=!1,r=tn){if(r){let n=zi.get(r);n||zi.set(r,n=[]),n.push(e)}}function cv(e,t,r=He){const{immediate:n,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=r,c=b=>s?b:Mt(b)||s===!1||s===0?Fr(b,1):Fr(b);let u,d,p,h,m=!1,w=!1;if(We(e)?(d=()=>e.value,m=Mt(e)):Br(e)?(d=()=>c(e),m=!0):pe(e)?(w=!0,m=e.some(b=>Br(b)||Mt(b)),d=()=>e.map(b=>{if(We(b))return b.value;if(Br(b))return c(b);if(Ce(b))return l?l(b,2):b()})):Ce(e)?t?d=l?()=>l(e,2):e:d=()=>{if(p){Or();try{p()}finally{Hr()}}const b=tn;tn=u;try{return l?l(e,3,[h]):e(h)}finally{tn=b}}:d=Jt,t&&s){const b=d,_=s===!0?1/0:s;d=()=>Fr(b(),_)}const S=is(),g=()=>{u.stop(),S&&S.active&&la(S.effects,u)};if(i&&t){const b=t;t=(..._)=>{b(..._),g()}}let x=w?new Array(e.length).fill(Ui):Ui;const y=b=>{if(!(!(u.flags&1)||!u.dirty&&!b))if(t){const _=u.run();if(s||m||(w?_.some(($,R)=>kt($,x[R])):kt(_,x))){p&&p();const $=tn;tn=u;try{const R=[_,x===Ui?void 0:w&&x[0]===Ui?[]:x,h];x=_,l?l(t,3,R):t(...R)}finally{tn=$}}}else u.run()};return a&&a(y),u=new Ns(d),u.scheduler=o?()=>o(y,!1):y,h=b=>nu(b,!1,u),p=u.onStop=()=>{const b=zi.get(u);if(b){if(l)l(b,4);else for(const _ of b)_();zi.delete(u)}},t?n?y(!0):x=u.run():o?o(y.bind(null,!0),!0):u.run(),g.pause=u.pause.bind(u),g.resume=u.resume.bind(u),g.stop=g,g}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--,We(e))Fr(e.value,t,r);else if(pe(e))for(let n=0;n<e.length;n++)Fr(e[n],t,r);else if(An(e)||es(e))e.forEach(n=>{Fr(n,t,r)});else if(Ii(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 su=[];function uv(e){su.push(e)}function dv(){su.pop()}function fv(e,t){}var pv={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},hv={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function ls(e,t,r,n){try{return n?e(...n):e()}catch(s){In(s,t,r)}}function Yt(e,t,r,n){if(Ce(e)){const s=ls(e,t,r,n);return s&&ca(s)&&s.catch(i=>{In(i,t,r)}),s}if(pe(e)){const s=[];for(let i=0;i<e.length;i++)s.push(Yt(e[i],t,r,n));return s}}function In(e,t,r,n=!0){const s=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||He;if(t){let a=t.parent;const l=t.proxy,c=`https://vuejs.org/error-reference/#runtime-${r}`;for(;a;){const u=a.ec;if(u){for(let d=0;d<u.length;d++)if(u[d](e,l,c)===!1)return}a=a.parent}if(i){Or(),ls(i,null,10,[e,l,c]),Hr();return}}gv(e,r,s,n,o)}function gv(e,t,r,n=!0,s=!1){if(s)throw e;console.error(e)}var It=[],yr=-1,cs=[],rn=null,us=0,iu=Promise.resolve(),Ki=null;function at(e){const t=Ki||iu;return e?t.then(this?e.bind(this):e):t}function vv(e){let t=yr+1,r=It.length;for(;t<r;){const n=t+r>>>1,s=It[n],i=Ws(s);i<e||i===e&&s.flags&2?t=n+1:r=n}return t}function Ta(e){if(!(e.flags&1)){const t=Ws(e),r=It[It.length-1];!r||!(e.flags&2)&&t>=Ws(r)?It.push(e):It.splice(vv(t),0,e),e.flags|=1,ou()}}function ou(){Ki||(Ki=iu.then(lu))}function Ks(e){pe(e)?cs.push(...e):rn&&e.id===-1?rn.splice(us+1,0,e):e.flags&1||(cs.push(e),e.flags|=1),ou()}function au(e,t,r=yr+1){for(;r<It.length;r++){const n=It[r];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;It.splice(r,1),r--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function Wi(e){if(cs.length){const t=[...new Set(cs)].sort((r,n)=>Ws(r)-Ws(n));if(cs.length=0,rn){rn.push(...t);return}for(rn=t,us=0;us<rn.length;us++){const r=rn[us];r.flags&4&&(r.flags&=-2),r.flags&8||r(),r.flags&=-2}rn=null,us=0}}var Ws=e=>e.id==null?e.flags&2?-1:1/0:e.id;function lu(e){try{for(yr=0;yr<It.length;yr++){const t=It[yr];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(;yr<It.length;yr++){const t=It[yr];t&&(t.flags&=-2)}yr=-1,It.length=0,Wi(e),Ki=null,(It.length||cs.length)&&lu(e)}}var ds,Gi=[];function cu(e,t){var r,n;ds=e,ds?(ds.enabled=!0,Gi.forEach(({event:s,args:i})=>ds.emit(s,...i)),Gi=[]):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=>{cu(s,t)}),setTimeout(()=>{ds||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Gi=[])},3e3)):Gi=[]}var yt=null,Ji=null;function Gs(e){const t=yt;return yt=e,Ji=e&&e.type.__scopeId||null,t}function mv(e){Ji=e}function wv(){Ji=null}var yv=e=>A;function A(e,t=yt,r){if(!t||e._n)return e;const n=(...s)=>{n._d&&si(-1);const i=Gs(t);let o;try{o=e(...s)}finally{Gs(i),n._d&&si(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function Yi(e,t){if(yt===null)return e;const r=ii(yt),n=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[i,o,a,l=He]=t[s];i&&(Ce(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 br(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(),Yt(l,r,8,[e.el,a,e,t]),Hr())}}var uu=Symbol("_vte"),du=e=>e.__isTeleport,Js=e=>e&&(e.disabled||e.disabled===""),fu=e=>e&&(e.defer||e.defer===""),pu=e=>typeof SVGElement<"u"&&e instanceof SVGElement,hu=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Ea=(e,t)=>{const r=e&&e.to;return tt(r)?t?t(r):null:r},gu={name:"Teleport",__isTeleport:!0,process(e,t,r,n,s,i,o,a,l,c){const{mc:u,pc:d,pbc:p,o:{insert:h,querySelector:m,createText:w,createComment:S}}=c,g=Js(t.props);let{shapeFlag:x,children:y,dynamicChildren:b}=t;if(e==null){const _=t.el=w(""),$=t.anchor=w("");h(_,r,n),h($,r,n);const R=(P,O)=>{x&16&&u(y,P,O,s,i,o,a,l)},v=()=>{const P=t.target=Ea(t.props,m),O=vu(P,t,w,h);P&&(o!=="svg"&&pu(P)?o="svg":o!=="mathml"&&hu(P)&&(o="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(P),g||(R(P,O),Xi(t,!1)))};g&&(R(r,$),Xi(t,!0)),fu(t.props)?(t.el.__isMounted=!1,lt(()=>{v(),delete t.el.__isMounted},i)):v()}else{if(fu(t.props)&&e.el.__isMounted===!1){lt(()=>{gu.process(e,t,r,n,s,i,o,a,l,c)},i);return}t.el=e.el,t.targetStart=e.targetStart;const _=t.anchor=e.anchor,$=t.target=e.target,R=t.targetAnchor=e.targetAnchor,v=Js(e.props),P=v?r:$,O=v?_:R;if(o==="svg"||pu($)?o="svg":(o==="mathml"||hu($))&&(o="mathml"),b?(p(e.dynamicChildren,b,P,s,i,o,a),Ja(e,t,!0)):l||d(e,t,P,O,s,i,o,a,!1),g)v?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Zi(t,r,_,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const C=t.target=Ea(t.props,m);C&&Zi(t,C,null,c,0)}else v&&Zi(t,$,R,c,1);Xi(t,g)}},remove(e,t,r,{um:n,o:{remove:s}},i){const{shapeFlag:o,children:a,anchor:l,targetStart:c,targetAnchor:u,target:d,props:p}=e;if(d&&(s(c),s(u)),i&&s(l),o&16){const h=i||!Js(p);for(let m=0;m<a.length;m++){const w=a[m];n(w,t,r,h,!!w.dynamicChildren)}}},move:Zi,hydrate:bv};function Zi(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:c,props:u}=e,d=i===2;if(d&&n(o,t,r),(!d||Js(u))&&l&16)for(let p=0;p<c.length;p++)s(c[p],t,r,2);d&&n(a,t,r)}function bv(e,t,r,n,s,i,{o:{nextSibling:o,parentNode:a,querySelector:l,insert:c,createText:u}},d){function p(w,S,g,x){S.anchor=d(o(w),S,a(w),r,n,s,i),S.targetStart=g,S.targetAnchor=x}const h=t.target=Ea(t.props,l),m=Js(t.props);if(h){const w=h._lpa||h.firstChild;if(t.shapeFlag&16)if(m)p(e,t,w,w&&o(w));else{t.anchor=o(e);let S=w;for(;S;){if(S&&S.nodeType===8){if(S.data==="teleport start anchor")t.targetStart=S;else if(S.data==="teleport anchor"){t.targetAnchor=S,h._lpa=t.targetAnchor&&o(t.targetAnchor);break}}S=o(S)}t.targetAnchor||vu(h,t,u,c),d(w&&o(w),t,h,r,n,s,i)}Xi(t,m)}else m&&t.shapeFlag&16&&p(e,t,e,o(e));return t.anchor&&o(t.anchor)}var Aa=gu;function Xi(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 vu(e,t,r,n){const s=t.targetStart=r(""),i=t.targetAnchor=r("");return s[uu]=i,e&&(n(s,e),n(i,e)),i}var Lr=Symbol("_leaveCb"),Qi=Symbol("_enterCb");function ka(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Ue(()=>{e.isMounted=!0}),vs(()=>{e.isUnmounting=!0}),e}var Zt=[Function,Array],Ia={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Zt,onEnter:Zt,onAfterEnter:Zt,onEnterCancelled:Zt,onBeforeLeave:Zt,onLeave:Zt,onAfterLeave:Zt,onLeaveCancelled:Zt,onBeforeAppear:Zt,onAppear:Zt,onAfterAppear:Zt,onAppearCancelled:Zt},mu=e=>{const t=e.subTree;return t.component?mu(t.component):t},Sv={name:"BaseTransition",props:Ia,setup(e,{slots:t}){const r=nt(),n=ka();return()=>{const s=t.default&&eo(t.default(),!0);if(!s||!s.length)return;const i=wu(s),o=Me(e),{mode:a}=o;if(n.isLeaving)return Ra(i);const l=Su(i);if(!l)return Ra(i);let c=fs(l,o,n,r,d=>c=d);l.type!==it&&Vr(l,c);let u=r.subTree&&Su(r.subTree);if(u&&u.type!==it&&!ur(u,l)&&mu(r).type!==it){let d=fs(u,o,n,r);if(Vr(u,d),a==="out-in"&&l.type!==it)return n.isLeaving=!0,d.afterLeave=()=>{n.isLeaving=!1,r.job.flags&8||r.update(),delete d.afterLeave,u=void 0},Ra(i);a==="in-out"&&l.type!==it?d.delayLeave=(p,h,m)=>{const w=bu(n,u);w[String(u.key)]=u,p[Lr]=()=>{h(),p[Lr]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{m(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return i}}};function wu(e){let t=e[0];if(e.length>1){for(const r of e)if(r.type!==it){t=r;break}}return t}var yu=Sv;function bu(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:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:p,onLeave:h,onAfterLeave:m,onLeaveCancelled:w,onBeforeAppear:S,onAppear:g,onAfterAppear:x,onAppearCancelled:y}=t,b=String(e.key),_=bu(r,e),$=(P,O)=>{P&&Yt(P,n,9,O)},R=(P,O)=>{const C=O[1];$(P,O),pe(P)?P.every(T=>T.length<=1)&&C():P.length<=1&&C()},v={mode:o,persisted:a,beforeEnter(P){let O=l;if(!r.isMounted)if(i)O=S||l;else return;P[Lr]&&P[Lr](!0);const C=_[b];C&&ur(e,C)&&C.el[Lr]&&C.el[Lr](),$(O,[P])},enter(P){let O=c,C=u,T=d;if(!r.isMounted)if(i)O=g||c,C=x||u,T=y||d;else return;let E=!1;const q=P[Qi]=j=>{E||(E=!0,j?$(T,[P]):$(C,[P]),v.delayedLeave&&v.delayedLeave(),P[Qi]=void 0)};O?R(O,[P,q]):q()},leave(P,O){const C=String(e.key);if(P[Qi]&&P[Qi](!0),r.isUnmounting)return O();$(p,[P]);let T=!1;const E=P[Lr]=q=>{T||(T=!0,O(),q?$(w,[P]):$(m,[P]),P[Lr]=void 0,_[C]===e&&delete _[C])};_[C]=e,h?R(h,[P,E]):E()},clone(P){const O=fs(P,t,r,n,s);return s&&s(O),O}};return v}function Ra(e){if(Ys(e))return e=dr(e),e.children=null,e}function Su(e){if(!Ys(e))return du(e.type)&&e.children?wu(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&&Ce(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 eo(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===Oe?(o.patchFlag&128&&s++,n=n.concat(eo(o.children,t,a))):(t||o.type!==it)&&n.push(a!=null?dr(o,{key:a}):o)}if(s>1)for(let i=0;i<n.length;i++)n[i].patchFlag=-2;return n}function G(e,t){return Ce(e)?Ye({name:e.name},t,{setup:e}):e}function Cu(){const e=nt();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function $a(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Cv(e){const t=nt(),r=Ze(null);if(t){const n=t.refs===He?t.refs={}:t.refs;Object.defineProperty(n,e,{enumerable:!0,get:()=>r.value,set:s=>r.value=s})}return r}var to=new WeakMap;function ps(e,t,r,n,s=!1){if(pe(e)){e.forEach((w,S)=>ps(w,t&&(pe(t)?t[S]:t),r,n,s));return}if(nn(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?ii(n.component):n.el,o=s?null:i,{i:a,r:l}=e,c=t&&t.r,u=a.refs===He?a.refs={}:a.refs,d=a.setupState,p=Me(d),h=d===He?kc:w=>Le(p,w),m=w=>!0;if(c!=null&&c!==l){if(_u(t),tt(c))u[c]=null,h(c)&&(d[c]=null);else if(We(c)){m(c)&&(c.value=null);const w=t;w.k&&(u[w.k]=null)}}if(Ce(l))ls(l,a,12,[o,u]);else{const w=tt(l),S=We(l);if(w||S){const g=()=>{if(e.f){const x=w?h(l)?d[l]:u[l]:m(l)||!e.k?l.value:u[e.k];if(s)pe(x)&&la(x,i);else if(pe(x))x.includes(i)||x.push(i);else if(w)u[l]=[i],h(l)&&(d[l]=u[l]);else{const y=[i];m(l)&&(l.value=y),e.k&&(u[e.k]=y)}}else w?(u[l]=o,h(l)&&(d[l]=o)):S&&(m(l)&&(l.value=o),e.k&&(u[e.k]=o))};if(o){const x=()=>{g(),to.delete(e)};x.id=-1,to.set(e,x),lt(x,r)}else _u(e),g()}}}function _u(e){const t=to.get(e);t&&(t.flags|=8,to.delete(e))}var xu=!1,hs=()=>{xu||(console.error("Hydration completed but contains mismatches."),xu=!0)},_v=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",xv=e=>e.namespaceURI.includes("MathML"),ro=e=>{if(e.nodeType===1){if(_v(e))return"svg";if(xv(e))return"mathml"}},gs=e=>e.nodeType===8;function Tv(e){const{mt:t,p:r,o:{patchProp:n,createText:s,nextSibling:i,parentNode:o,remove:a,insert:l,createComment:c}}=e,u=(y,b)=>{if(!b.hasChildNodes()){r(null,y,b),Wi(),b._vnode=y;return}d(b.firstChild,y,null,null,null),Wi(),b._vnode=y},d=(y,b,_,$,R,v=!1)=>{v=v||!!b.dynamicChildren;const P=gs(y)&&y.data==="[",O=()=>w(y,b,_,$,R,P),{type:C,ref:T,shapeFlag:E,patchFlag:q}=b;let j=y.nodeType;b.el=y,q===-2&&(v=!1,b.dynamicChildren=null);let z=null;switch(C){case sn:j!==3?b.children===""?(l(b.el=s(""),o(y),y),z=y):z=O():(y.data!==b.children&&(hs(),y.data=b.children),z=i(y));break;case it:x(y)?(z=i(y),g(b.el=y.content.firstChild,y,_)):j!==8||P?z=O():z=i(y);break;case On:if(P&&(y=i(y),j=y.nodeType),j===1||j===3){z=y;const J=!b.children.length;for(let U=0;U<b.staticCount;U++)J&&(b.children+=z.nodeType===1?z.outerHTML:z.data),U===b.staticCount-1&&(b.anchor=z),z=i(z);return P?i(z):z}else O();break;case Oe:P?z=m(y,b,_,$,R,v):z=O();break;default:if(E&1)(j!==1||b.type.toLowerCase()!==y.tagName.toLowerCase())&&!x(y)?z=O():z=p(y,b,_,$,R,v);else if(E&6){b.slotScopeIds=R;const J=o(y);if(P?z=S(y):gs(y)&&y.data==="teleport start"?z=S(y,y.data,"teleport end"):z=i(y),t(b,J,null,_,$,ro(J),v),nn(b)&&!b.type.__asyncResolved){let U;P?(U=D(Oe),U.anchor=z?z.previousSibling:J.lastChild):U=y.nodeType===3?$e(""):D("div"),U.el=y,b.component.subTree=U}}else E&64?j!==8?z=O():z=b.type.hydrate(y,b,_,$,R,v,e,h):E&128&&(z=b.type.hydrate(y,b,_,$,ro(o(y)),R,v,e,d))}return T!=null&&ps(T,null,$,b),z},p=(y,b,_,$,R,v)=>{v=v||!!b.dynamicChildren;const{type:P,props:O,patchFlag:C,shapeFlag:T,dirs:E,transition:q}=b,j=P==="input"||P==="option";if(j||C!==-1){E&&br(b,null,_,"created");let z=!1;if(x(y)){z=ud(null,q)&&_&&_.vnode.props&&_.vnode.props.appear;const U=y.content.firstChild;if(z){const Ae=U.getAttribute("class");Ae&&(U.$cls=Ae),q.beforeEnter(U)}g(U,y,_),b.el=y=U}if(T&16&&!(O&&(O.innerHTML||O.textContent))){let U=h(y.firstChild,b,y,_,$,R,v);for(;U;){no(y,1)||hs();const Ae=U;U=U.nextSibling,a(Ae)}}else if(T&8){let U=b.children;U[0]===`
5
+ `&&(y.tagName==="PRE"||y.tagName==="TEXTAREA")&&(U=U.slice(1));const{textContent:Ae}=y;Ae!==U&&Ae!==U.replace(/\r\n|\r/g,`
6
+ `)&&(no(y,0)||hs(),y.textContent=b.children)}if(O){if(j||!v||C&48){const U=y.tagName.includes("-");for(const Ae in O)(j&&(Ae.endsWith("value")||Ae==="indeterminate")||Ms(Ae)&&!rs(Ae)||Ae[0]==="."||U)&&n(y,Ae,null,O[Ae],void 0,_)}else if(O.onClick)n(y,"onClick",null,O.onClick,void 0,_);else if(C&4&&Br(O.style))for(const U in O.style)O.style[U]}let J;(J=O&&O.onVnodeBeforeMount)&&Nt(J,_,b),E&&br(b,null,_,"beforeMount"),((J=O&&O.onVnodeMounted)||E||z)&&hd(()=>{J&&Nt(J,_,b),z&&q.enter(y),E&&br(b,null,_,"mounted")},$)}return y.nextSibling},h=(y,b,_,$,R,v,P)=>{P=P||!!b.dynamicChildren;const O=b.children,C=O.length;for(let T=0;T<C;T++){const E=P?O[T]:O[T]=qt(O[T]),q=E.type===sn;y?(q&&!P&&T+1<C&&qt(O[T+1]).type===sn&&(l(s(y.data.slice(E.children.length)),_,i(y)),y.data=E.children),y=d(y,E,$,R,v,P)):q&&!E.children?l(E.el=s(""),_):(no(_,1)||hs(),r(null,E,_,null,$,R,ro(_),v))}return y},m=(y,b,_,$,R,v)=>{const{slotScopeIds:P}=b;P&&(R=R?R.concat(P):P);const O=o(y),C=h(i(y),b,O,_,$,R,v);return C&&gs(C)&&C.data==="]"?i(b.anchor=C):(hs(),l(b.anchor=c("]"),O,C),C)},w=(y,b,_,$,R,v)=>{if(no(y.parentElement,1)||hs(),b.el=null,v){const C=S(y);for(;;){const T=i(y);if(T&&T!==C)a(T);else break}}const P=i(y),O=o(y);return a(y),r(null,b,O,P,_,$,ro(O),R),_&&(_.vnode.el=b.el,fo(_,b.el)),P},S=(y,b="[",_="]")=>{let $=0;for(;y;)if(y=i(y),y&&gs(y)&&(y.data===b&&$++,y.data===_)){if($===0)return i(y);$--}return y},g=(y,b,_)=>{const $=b.parentNode;$&&$.replaceChild(y,b);let R=_;for(;R;)R.vnode.el===b&&(R.vnode.el=R.subTree.el=y),R=R.parent},x=y=>y.nodeType===1&&y.tagName==="TEMPLATE";return[u,d]}var Tu="data-allow-mismatch",Ev={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function no(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(Tu);)e=e.parentElement;const r=e&&e.getAttribute(Tu);if(r==null)return!1;if(r==="")return!0;{const n=r.split(",");return t===0&&n.includes("children")?!0:n.includes(Ev[t])}}var Av=Oi().requestIdleCallback||(e=>setTimeout(e,1)),kv=Oi().cancelIdleCallback||(e=>clearTimeout(e)),Iv=(e=1e4)=>t=>{const r=Av(t,{timeout:e});return()=>kv(r)};function Rv(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 $v=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(Rv(s))return t(),n.disconnect(),!1;n.observe(s)}}),()=>n.disconnect()},Dv=e=>t=>{if(e){const r=matchMedia(e);if(r.matches)t();else return r.addEventListener("change",t,{once:!0}),()=>r.removeEventListener("change",t)}},Pv=(e=[])=>(t,r)=>{tt(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 Ov(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 nn=e=>!!e.type.__asyncLoader;function Hv(e){Ce(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 c=null,u,d=0;const p=()=>(d++,c=null,h()),h=()=>{let m;return c||(m=c=t().catch(w=>{if(w=w instanceof Error?w:new Error(String(w)),l)return new Promise((S,g)=>{l(w,()=>S(p()),()=>g(w),d+1)});throw w}).then(w=>m!==c&&c?c:(w&&(w.__esModule||w[Symbol.toStringTag]==="Module")&&(w=w.default),u=w,w)))};return G({name:"AsyncComponentWrapper",__asyncLoader:h,__asyncHydrate(m,w,S){let g=!1;(w.bu||(w.bu=[])).push(()=>g=!0);const x=()=>{g||S()},y=i?()=>{const b=i(x,_=>Ov(m,_));b&&(w.bum||(w.bum=[])).push(b)}:x;u?y():h().then(()=>!w.isUnmounted&&y())},get __asyncResolved(){return u},setup(){const m=St;if($a(m),u)return()=>so(u,m);const w=y=>{c=null,In(y,m,13,!n)};if(a&&m.suspense||ws)return h().then(y=>()=>so(y,m)).catch(y=>(w(y),()=>n?D(n,{error:y}):null));const S=F(!1),g=F(),x=F(!!s);return s&&setTimeout(()=>{x.value=!1},s),o!=null&&setTimeout(()=>{if(!S.value&&!g.value){const y=new Error(`Async component timed out after ${o}ms.`);w(y),g.value=y}},o),h().then(()=>{S.value=!0,m.parent&&Ys(m.parent.vnode)&&m.parent.update()}).catch(y=>{w(y),g.value=y}),()=>{if(S.value&&u)return so(u,m);if(g.value&&n)return D(n,{error:g.value});if(r&&!x.value)return so(r,m)}}})}function so(e,t){const{ref:r,props:n,children:s,ce:i}=t.vnode,o=D(e,n,s);return o.ref=r,o.ce=i,delete t.vnode.ce,o}var Ys=e=>e.type.__isKeepAlive,Mv={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const r=nt(),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:c,um:u,o:{createElement:d}}}=n,p=d("div");n.activate=(x,y,b,_,$)=>{const R=x.component;c(x,y,b,0,a),l(R.vnode,x,y,b,R,a,_,x.slotScopeIds,$),lt(()=>{R.isDeactivated=!1,R.a&&ss(R.a);const v=x.props&&x.props.onVnodeMounted;v&&Nt(v,R.parent,x)},a)},n.deactivate=x=>{const y=x.component;po(y.m),po(y.a),c(x,p,null,1,a),lt(()=>{y.da&&ss(y.da);const b=x.props&&x.props.onVnodeUnmounted;b&&Nt(b,y.parent,x),y.isDeactivated=!0},a)};function h(x){Da(x),u(x,r,a,!0)}function m(x){s.forEach((y,b)=>{const _=rl(y.type);_&&!x(_)&&w(b)})}function w(x){const y=s.get(x);y&&(!o||!ur(y,o))?h(y):o&&Da(o),s.delete(x),i.delete(x)}Ie(()=>[e.include,e.exclude],([x,y])=>{x&&m(b=>Zs(x,b)),y&&m(b=>!Zs(y,b))},{flush:"post",deep:!0});let S=null;const g=()=>{S!=null&&(ho(r.subTree.type)?lt(()=>{s.set(S,io(r.subTree))},r.subTree.suspense):s.set(S,io(r.subTree)))};return Ue(g),ao(g),vs(()=>{s.forEach(x=>{const{subTree:y,suspense:b}=r,_=io(y);if(x.type===_.type&&x.key===_.key){Da(_);const $=_.component.da;$&&lt($,b);return}h(x)})}),()=>{if(S=null,!t.default)return o=null;const x=t.default(),y=x[0];if(x.length>1)return o=null,x;if(!Ur(y)||!(y.shapeFlag&4)&&!(y.shapeFlag&128))return o=null,y;let b=io(y);if(b.type===it)return o=null,b;const _=b.type,$=rl(nn(b)?b.type.__asyncResolved||{}:_),{include:R,exclude:v,max:P}=e;if(R&&(!$||!Zs(R,$))||v&&$&&Zs(v,$))return b.shapeFlag&=-257,o=b,y;const O=b.key==null?_:b.key,C=s.get(O);return b.el&&(b=dr(b),y.shapeFlag&128&&(y.ssContent=b)),S=O,C?(b.el=C.el,b.component=C.component,b.transition&&Vr(b,b.transition),b.shapeFlag|=512,i.delete(O),i.add(O)):(i.add(O),P&&i.size>parseInt(P,10)&&w(i.values().next().value)),b.shapeFlag|=256,o=b,ho(y.type)?y:b}}};function Zs(e,t){return pe(e)?e.some(r=>Zs(r,t)):tt(e)?e.split(",").includes(t):yg(e)?(e.lastIndex=0,e.test(t)):!1}function Eu(e,t){ku(e,"a",t)}function Au(e,t){ku(e,"da",t)}function ku(e,t,r=St){const n=e.__wdc||(e.__wdc=()=>{let s=r;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(oo(t,n,r),r){let s=r.parent;for(;s&&s.parent;)Ys(s.parent.vnode)&&qv(n,t,r,s),s=s.parent}}function qv(e,t,r,n){const s=oo(t,e,n,!0);Rt(()=>{la(n[t],s)},r)}function Da(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function io(e){return e.shapeFlag&128?e.ssContent:e}function oo(e,t,r=St,n=!1){if(r){const s=r[e]||(r[e]=[]),i=t.__weh||(t.__weh=(...o)=>{Or();const a=Mn(r),l=Yt(t,r,e,o);return a(),Hr(),l});return n?s.unshift(i):s.push(i),i}}var jr=e=>(t,r=St)=>{(!ws||e==="sp")&&oo(e,(...n)=>t(...n),r)},Iu=jr("bm"),Ue=jr("m"),Pa=jr("bu"),ao=jr("u"),vs=jr("bum"),Rt=jr("um"),Ru=jr("sp"),$u=jr("rtg"),Du=jr("rtc");function Pu(e,t=St){oo("ec",e,t)}var Oa="components",Nv="directives";function Bv(e,t){return Ha(Oa,e,!0,t)||e}var Ou=Symbol.for("v-ndc");function Rn(e){return tt(e)?Ha(Oa,e,!1)||e:e||Ou}function Fv(e){return Ha(Nv,e)}function Ha(e,t,r=!0,n=!1){const s=yt||St;if(s){const i=s.type;if(e===Oa){const a=rl(i,!1);if(a&&(a===t||a===ct(t)||a===qs(ct(t))))return i}const o=Hu(s[e]||i[e],t)||Hu(s.appContext[e],t);return!o&&n?i:o}}function Hu(e,t){return e&&(e[t]||e[ct(t)]||e[qs(ct(t))])}function Xt(e,t,r,n){let s;const i=r&&r[n],o=pe(e);if(o||tt(e)){const a=o&&Br(e);let l=!1,c=!1;a&&(l=!Mt(e),c=wr(e),e=Bi(e)),s=new Array(e.length);for(let u=0,d=e.length;u<d;u++)s[u]=t(l?c?as(cr(e[u])):cr(e[u]):e[u],u,void 0,i&&i[u])}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,c=a.length;l<c;l++){const u=a[l];s[l]=t(e[u],u,l,i&&i[l])}}else s=[];return r&&(r[n]=s),s}function Lv(e,t){for(let r=0;r<t.length;r++){const n=t[r];if(pe(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 Z(e,t,r={},n,s){if(yt.ce||yt.parent&&nn(yt.parent)&&yt.parent.ce){const c=Object.keys(r).length>0;return t!=="default"&&(r.name=t),I(),N(Oe,null,[D("slot",r,n&&n())],c?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),I();const o=i&&Ma(i(r)),a=r.key||o&&o.key,l=N(Oe,{key:(a&&!ar(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 Ma(e){return e.some(t=>Ur(t)?!(t.type===it||t.type===Oe&&!Ma(t.children)):!0)?e:null}function Mu(e,t){const r={};for(const n in e)r[t&&/[A-Z]/.test(n)?`on:${n}`:ns(n)]=e[n];return r}var qa=e=>e?yd(e)?ii(e):qa(e.parent):null,Xs=Ye(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=>qa(e.parent),$root:e=>qa(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>La(e),$forceUpdate:e=>e.f||(e.f=()=>{Ta(e.update)}),$nextTick:e=>e.n||(e.n=at.bind(e.proxy)),$watch:e=>am.bind(e)}),Na=(e,t)=>e!==He&&!e.__isScriptSetup&&Le(e,t),Ba={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(Na(n,t))return o[t]=1,n[t];if(s!==He&&Le(s,t))return o[t]=2,s[t];if(Le(i,t))return o[t]=3,i[t];if(r!==He&&Le(r,t))return o[t]=4,r[t];Fa&&(o[t]=0)}}const c=Xs[t];let u,d;if(c)return t==="$attrs"&&xt(e.attrs,"get",""),c(e);if((u=a.__cssModules)&&(u=u[t]))return u;if(r!==He&&Le(r,t))return o[t]=4,r[t];if(d=l.config.globalProperties,Le(d,t))return d[t]},set({_:e},t,r){const{data:n,setupState:s,ctx:i}=e;return Na(s,t)?(s[t]=r,!0):n!==He&&Le(n,t)?(n[t]=r,!0):Le(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!==He&&a[0]!=="$"&&Le(e,a)||Na(t,a)||Le(i,a)||Le(n,a)||Le(Xs,a)||Le(s.config.globalProperties,a)||(l=o.__cssModules)&&l[a])},defineProperty(e,t,r){return r.get!=null?e._.accessCache[t]=0:Le(r,"value")&&this.set(e,t,r.value,null),Reflect.defineProperty(e,t,r)}},Vv=Ye({},Ba,{get(e,t){if(t!==Symbol.unscopables)return Ba.get(e,t,e)},has(e,t){return t[0]!=="_"&&!_g(t)}});function jv(){return null}function Uv(){return null}function zv(e){}function Kv(e){}function Wv(){return null}function Gv(){}function Jv(e,t){return null}function qu(){return Nu("useSlots").slots}function Yv(){return Nu("useAttrs").attrs}function Nu(e){const t=nt();return t.setupContext||(t.setupContext=Cd(t))}function Qs(e){return pe(e)?e.reduce((t,r)=>(t[r]=null,t),{}):e}function Bu(e,t){const r=Qs(e);for(const n in t){if(n.startsWith("__skip"))continue;let s=r[n];s?pe(s)||Ce(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 Zv(e,t){return!e||!t?e||t:pe(e)&&pe(t)?e.concat(t):Ye({},Qs(e),Qs(t))}function Xv(e,t){const r={};for(const n in e)t.includes(n)||Object.defineProperty(r,n,{enumerable:!0,get:()=>e[n]});return r}function Qv(e){const t=nt();let r=e();return Qa(),ca(r)&&(r=r.catch(n=>{throw Mn(t),n})),[r,()=>Mn(t)]}var Fa=!0;function em(e){const t=La(e),r=e.proxy,n=e.ctx;Fa=!1,t.beforeCreate&&Fu(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:o,watch:a,provide:l,inject:c,created:u,beforeMount:d,mounted:p,beforeUpdate:h,updated:m,activated:w,deactivated:S,beforeDestroy:g,beforeUnmount:x,destroyed:y,unmounted:b,render:_,renderTracked:$,renderTriggered:R,errorCaptured:v,serverPrefetch:P,expose:O,inheritAttrs:C,components:T,directives:E,filters:q}=t;if(c&&tm(c,n,null),o)for(const J in o){const U=o[J];Ce(U)&&(n[J]=U.bind(r))}if(s){const J=s.call(r,r);je(J)&&(e.data=Nr(J))}if(Fa=!0,i)for(const J in i){const U=i[J],Ae=B({get:Ce(U)?U.bind(r,r):Ce(U.get)?U.get.bind(r,r):Jt,set:!Ce(U)&&Ce(U.set)?U.set.bind(r):Jt});Object.defineProperty(n,J,{enumerable:!0,configurable:!0,get:()=>Ae.value,set:be=>Ae.value=be})}if(a)for(const J in a)Lu(a[J],n,r,J);if(l){const J=Ce(l)?l.call(r):l;Reflect.ownKeys(J).forEach(U=>{Dn(U,J[U])})}u&&Fu(u,e,"c");function z(J,U){pe(U)?U.forEach(Ae=>J(Ae.bind(r))):U&&J(U.bind(r))}if(z(Iu,d),z(Ue,p),z(Pa,h),z(ao,m),z(Eu,w),z(Au,S),z(Pu,v),z(Du,$),z($u,R),z(vs,x),z(Rt,b),z(Ru,P),pe(O))if(O.length){const J=e.exposed||(e.exposed={});O.forEach(U=>{Object.defineProperty(J,U,{get:()=>r[U],set:Ae=>r[U]=Ae,enumerable:!0})})}else e.exposed||(e.exposed={});_&&e.render===Jt&&(e.render=_),C!=null&&(e.inheritAttrs=C),T&&(e.components=T),E&&(e.directives=E),P&&$a(e)}function tm(e,t,r=Jt){pe(e)&&(e=Va(e));for(const n in e){const s=e[n];let i;je(s)?"default"in s?i=bt(s.from||n,s.default,!0):i=bt(s.from||n):i=bt(s),We(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[n]=i}}function Fu(e,t,r){Yt(pe(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,r)}function Lu(e,t,r,n){let s=n.includes(".")?Gu(r,n):()=>r[n];if(tt(e)){const i=t[e];Ce(i)&&Ie(s,i)}else if(Ce(e))Ie(s,e.bind(r));else if(je(e))if(pe(e))e.forEach(i=>Lu(i,t,r,n));else{const i=Ce(e.handler)?e.handler.bind(r):t[e.handler];Ce(i)&&Ie(s,i,e)}}function La(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(c=>lo(l,c,o,!0)),lo(l,t,o)),je(t)&&i.set(t,l),l}function lo(e,t,r,n=!1){const{mixins:s,extends:i}=t;i&&lo(e,i,r,!0),s&&s.forEach(o=>lo(e,o,r,!0));for(const o in t)if(!(n&&o==="expose")){const a=rm[o]||r&&r[o];e[o]=a?a(e[o],t[o]):t[o]}return e}var rm={data:Vu,props:ju,emits:ju,methods:ei,computed:ei,beforeCreate:$t,created:$t,beforeMount:$t,mounted:$t,beforeUpdate:$t,updated:$t,beforeDestroy:$t,beforeUnmount:$t,destroyed:$t,unmounted:$t,activated:$t,deactivated:$t,errorCaptured:$t,serverPrefetch:$t,components:ei,directives:ei,watch:sm,provide:Vu,inject:nm};function Vu(e,t){return t?e?function(){return Ye(Ce(e)?e.call(this,this):e,Ce(t)?t.call(this,this):t)}:t:e}function nm(e,t){return ei(Va(e),Va(t))}function Va(e){if(pe(e)){const t={};for(let r=0;r<e.length;r++)t[e[r]]=e[r];return t}return e}function $t(e,t){return e?[...new Set([].concat(e,t))]:t}function ei(e,t){return e?Ye(Object.create(null),e,t):t}function ju(e,t){return e?pe(e)&&pe(t)?[...new Set([...e,...t])]:Ye(Object.create(null),Qs(e),Qs(t??{})):t}function sm(e,t){if(!e)return t;if(!t)return e;const r=Ye(Object.create(null),e);for(const n in t)r[n]=$t(e[n],t[n]);return r}function Uu(){return{app:null,config:{isNativeTag:kc,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}var im=0;function om(e,t){return function(n,s=null){Ce(n)||(n=Ye({},n)),s!=null&&!je(s)&&(s=null);const i=Uu(),o=new WeakSet,a=[];let l=!1;const c=i.app={_uid:im++,_component:n,_props:s,_container:null,_context:i,_instance:null,version:xd,get config(){return i.config},set config(u){},use(u,...d){return o.has(u)||(u&&Ce(u.install)?(o.add(u),u.install(c,...d)):Ce(u)&&(o.add(u),u(c,...d))),c},mixin(u){return i.mixins.includes(u)||i.mixins.push(u),c},component(u,d){return d?(i.components[u]=d,c):i.components[u]},directive(u,d){return d?(i.directives[u]=d,c):i.directives[u]},mount(u,d,p){if(!l){const h=c._ceVNode||D(n,s);return h.appContext=i,p===!0?p="svg":p===!1&&(p=void 0),d&&t?t(h,u):e(h,u,p),l=!0,c._container=u,u.__vue_app__=c,ii(h.component)}},onUnmount(u){a.push(u)},unmount(){l&&(Yt(a,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(u,d){return i.provides[u]=d,c},runWithContext(u){const d=$n;$n=c;try{return u()}finally{$n=d}}};return c}}var $n=null;function Dn(e,t){if(St){let r=St.provides;const n=St.parent&&St.parent.provides;n===r&&(r=St.provides=Object.create(n)),r[e]=t}}function bt(e,t,r=!1){const n=nt();if(n||$n){let s=$n?$n._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&&Ce(t)?t.call(n&&n.proxy):t}}function ja(){return!!(nt()||$n)}var zu=Symbol.for("v-scx"),Ku=()=>{{const e=bt(zu);return e}};function st(e,t){return ti(e,null,t)}function Ua(e,t){return ti(e,null,{flush:"post"})}function Wu(e,t){return ti(e,null,{flush:"sync"})}function Ie(e,t,r){return ti(e,t,r)}function ti(e,t,r=He){const{immediate:n,deep:s,flush:i,once:o}=r,a=Ye({},r),l=t&&n||!t&&i!=="post";let c;if(ws){if(i==="sync"){const h=Ku();c=h.__watcherHandles||(h.__watcherHandles=[])}else if(!l){const h=()=>{};return h.stop=Jt,h.resume=Jt,h.pause=Jt,h}}const u=St;a.call=(h,m,w)=>Yt(h,u,m,w);let d=!1;i==="post"?a.scheduler=h=>{lt(h,u&&u.suspense)}:i!=="sync"&&(d=!0,a.scheduler=(h,m)=>{m?h():Ta(h)}),a.augmentJob=h=>{t&&(h.flags|=4),d&&(h.flags|=2,u&&(h.id=u.uid,h.i=u))};const p=cv(e,t,a);return ws&&(c?c.push(p):l&&p()),p}function am(e,t,r){const n=this.proxy,s=tt(e)?e.includes(".")?Gu(n,e):()=>n[e]:e.bind(n,n);let i;Ce(t)?i=t:(i=t.handler,r=t);const o=Mn(this),a=ti(s,i.bind(n),r);return o(),a}function Gu(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}}function lm(e,t,r=He){const n=nt(),s=ct(t),i=Ot(t),o=Ju(e,s),a=zs((l,c)=>{let u,d=He,p;return Wu(()=>{const h=e[s];kt(u,h)&&(u=h,c())}),{get(){return l(),r.get?r.get(u):u},set(h){const m=r.set?r.set(h):h;if(!kt(m,u)&&!(d!==He&&kt(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)||(u=h,c()),n.emit(`update:${t}`,m),kt(h,m)&&kt(h,d)&&!kt(m,p)&&c(),d=h,p=m}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?o||He:a,done:!1}:{done:!0}}}},a}var Ju=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ct(t)}Modifiers`]||e[`${Ot(t)}Modifiers`];function cm(e,t,...r){if(e.isUnmounted)return;const n=e.vnode.props||He;let s=r;const i=t.startsWith("update:"),o=i&&Ju(n,t.slice(7));o&&(o.trim&&(s=r.map(u=>tt(u)?u.trim():u)),o.number&&(s=r.map(Di)));let a,l=n[a=ns(t)]||n[a=ns(ct(t))];!l&&i&&(l=n[a=ns(Ot(t))]),l&&Yt(l,e,6,s);const c=n[a+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Yt(c,e,6,s)}}var um=new WeakMap;function Yu(e,t,r=!1){const n=r?um:t.emitsCache,s=n.get(e);if(s!==void 0)return s;const i=e.emits;let o={},a=!1;if(!Ce(e)){const l=c=>{const u=Yu(c,t,!0);u&&(a=!0,Ye(o,u))};!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):(pe(i)?i.forEach(l=>o[l]=null):Ye(o,i),je(e)&&n.set(e,o),o)}function co(e,t){return!e||!Ms(t)?!1:(t=t.slice(2).replace(/Once$/,""),Le(e,t[0].toLowerCase()+t.slice(1))||Le(e,Ot(t))||Le(e,t))}function uo(e){const{type:t,vnode:r,proxy:n,withProxy:s,propsOptions:[i],slots:o,attrs:a,emit:l,render:c,renderCache:u,props:d,data:p,setupState:h,ctx:m,inheritAttrs:w}=e,S=Gs(e);let g,x;try{if(r.shapeFlag&4){const b=s||n,_=b;g=qt(c.call(_,b,u,d,h,p,m)),x=a}else{const b=t;g=qt(b.length>1?b(d,{attrs:a,slots:o,emit:l}):b(d,null)),x=t.props?a:fm(a)}}catch(b){ni.length=0,In(b,e,1),g=D(it)}let y=g;if(x&&w!==!1){const b=Object.keys(x),{shapeFlag:_}=y;b.length&&_&7&&(i&&b.some(aa)&&(x=pm(x,i)),y=dr(y,x,!1,!0))}return r.dirs&&(y=dr(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(r.dirs):r.dirs),r.transition&&Vr(y,r.transition),g=y,Gs(S),g}function dm(e,t=!0){let r;for(let n=0;n<e.length;n++){const s=e[n];if(Ur(s)){if(s.type!==it||s.children==="v-if"){if(r)return;r=s}}else return}return r}var fm=e=>{let t;for(const r in e)(r==="class"||r==="style"||Ms(r))&&((t||(t={}))[r]=e[r]);return t},pm=(e,t)=>{const r={};for(const n in e)(!aa(n)||!(n.slice(9)in t))&&(r[n]=e[n]);return r};function hm(e,t,r){const{props:n,children:s,component:i}=e,{props:o,children:a,patchFlag:l}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(r&&l>=0){if(l&1024)return!0;if(l&16)return n?Zu(n,o,c):!!o;if(l&8){const u=t.dynamicProps;for(let d=0;d<u.length;d++){const p=u[d];if(o[p]!==n[p]&&!co(c,p))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:n===o?!1:n?o?Zu(n,o,c):!0:!!o;return!1}function Zu(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(t[i]!==e[i]&&!co(r,i))return!0}return!1}function fo({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 Xu={},Qu=()=>Object.create(Xu),ed=e=>Object.getPrototypeOf(e)===Xu;function gm(e,t,r,n=!1){const s={},i=Qu();e.propsDefaults=Object.create(null),td(e,t,s,i);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);r?e.props=n?s:eu(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function vm(e,t,r,n){const{props:s,attrs:i,vnode:{patchFlag:o}}=e,a=Me(s),[l]=e.propsOptions;let c=!1;if((n||o>0)&&!(o&16)){if(o&8){const u=e.vnode.dynamicProps;for(let d=0;d<u.length;d++){let p=u[d];if(co(e.emitsOptions,p))continue;const h=t[p];if(l)if(Le(i,p))h!==i[p]&&(i[p]=h,c=!0);else{const m=ct(p);s[m]=za(l,a,m,h,e,!1)}else h!==i[p]&&(i[p]=h,c=!0)}}}else{td(e,t,s,i)&&(c=!0);let u;for(const d in a)(!t||!Le(t,d)&&((u=Ot(d))===d||!Le(t,u)))&&(l?r&&(r[d]!==void 0||r[u]!==void 0)&&(s[d]=za(l,a,d,void 0,e,!0)):delete s[d]);if(i!==a)for(const d in i)(!t||!Le(t,d))&&(delete i[d],c=!0)}c&&Mr(e.attrs,"set","")}function td(e,t,r,n){const[s,i]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(rs(l))continue;const c=t[l];let u;s&&Le(s,u=ct(l))?!i||!i.includes(u)?r[u]=c:(a||(a={}))[u]=c:co(e.emitsOptions,l)||(!(l in n)||c!==n[l])&&(n[l]=c,o=!0)}if(i){const l=Me(r),c=a||He;for(let u=0;u<i.length;u++){const d=i[u];r[d]=za(s,l,d,c[d],e,!Le(c,d))}}return o}function za(e,t,r,n,s,i){const o=e[r];if(o!=null){const a=Le(o,"default");if(a&&n===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&Ce(l)){const{propsDefaults:c}=s;if(r in c)n=c[r];else{const u=Mn(s);n=c[r]=l.call(null,t),u()}}else n=l;s.ce&&s.ce._setProp(r,n)}o[0]&&(i&&!a?n=!1:o[1]&&(n===""||n===Ot(r))&&(n=!0))}return n}var mm=new WeakMap;function rd(e,t,r=!1){const n=r?mm:t.propsCache,s=n.get(e);if(s)return s;const i=e.props,o={},a=[];let l=!1;if(!Ce(e)){const u=d=>{l=!0;const[p,h]=rd(d,t,!0);Ye(o,p),h&&a.push(...h)};!r&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!i&&!l)return je(e)&&n.set(e,Qn),Qn;if(pe(i))for(let u=0;u<i.length;u++){const d=ct(i[u]);nd(d)&&(o[d]=He)}else if(i)for(const u in i){const d=ct(u);if(nd(d)){const p=i[u],h=o[d]=pe(p)||Ce(p)?{type:p}:Ye({},p),m=h.type;let w=!1,S=!0;if(pe(m))for(let g=0;g<m.length;++g){const x=m[g],y=Ce(x)&&x.name;if(y==="Boolean"){w=!0;break}else y==="String"&&(S=!1)}else w=Ce(m)&&m.name==="Boolean";h[0]=w,h[1]=S,(w||Le(h,"default"))&&a.push(d)}}const c=[o,a];return je(e)&&n.set(e,c),c}function nd(e){return e[0]!=="$"&&!rs(e)}var Ka=e=>e==="_"||e==="_ctx"||e==="$stable",Wa=e=>pe(e)?e.map(qt):[qt(e)],wm=(e,t,r)=>{if(t._n)return t;const n=A((...s)=>Wa(t(...s)),r);return n._c=!1,n},sd=(e,t,r)=>{const n=e._ctx;for(const s in e){if(Ka(s))continue;const i=e[s];if(Ce(i))t[s]=wm(s,i,n);else if(i!=null){const o=Wa(i);t[s]=()=>o}}},id=(e,t)=>{const r=Wa(t);e.slots.default=()=>r},od=(e,t,r)=>{for(const n in t)(r||!Ka(n))&&(e[n]=t[n])},ym=(e,t,r)=>{const n=e.slots=Qu();if(e.vnode.shapeFlag&32){const s=t._;s?(od(n,t,r),r&&$c(n,"_",s,!0)):sd(t,n)}else t&&id(e,t)},bm=(e,t,r)=>{const{vnode:n,slots:s}=e;let i=!0,o=He;if(n.shapeFlag&32){const a=t._;a?r&&a===1?i=!1:od(s,t,r):(i=!t.$stable,sd(t,s)),o=t}else t&&(id(e,t),o={default:1});if(i)for(const a in s)!Ka(a)&&o[a]==null&&delete s[a]};function NT(){}var lt=hd;function ad(e){return cd(e)}function ld(e){return cd(e,Tv)}function cd(e,t){const r=Oi();r.__VUE__=!0;const{insert:n,remove:s,patchProp:i,createElement:o,createText:a,createComment:l,setText:c,setElementText:u,parentNode:d,nextSibling:p,setScopeId:h=Jt,insertStaticContent:m}=e,w=(k,H,K,ee=null,X=null,Q=null,ue=void 0,ae=null,oe=!!H.dynamicChildren)=>{if(k===H)return;k&&!ur(k,H)&&(ee=M(k),Be(k,X,Q,!0),k=null),H.patchFlag===-2&&(oe=!1,H.dynamicChildren=null);const{type:te,ref:Se,shapeFlag:fe}=H;switch(te){case sn:S(k,H,K,ee);break;case it:g(k,H,K,ee);break;case On:k==null&&x(H,K,ee,ue);break;case Oe:T(k,H,K,ee,X,Q,ue,ae,oe);break;default:fe&1?_(k,H,K,ee,X,Q,ue,ae,oe):fe&6?E(k,H,K,ee,X,Q,ue,ae,oe):(fe&64||fe&128)&&te.process(k,H,K,ee,X,Q,ue,ae,oe,me)}Se!=null&&X?ps(Se,k&&k.ref,Q,H||k,!H):Se==null&&k&&k.ref!=null&&ps(k.ref,null,Q,k,!0)},S=(k,H,K,ee)=>{if(k==null)n(H.el=a(H.children),K,ee);else{const X=H.el=k.el;H.children!==k.children&&c(X,H.children)}},g=(k,H,K,ee)=>{k==null?n(H.el=l(H.children||""),K,ee):H.el=k.el},x=(k,H,K,ee)=>{[k.el,k.anchor]=m(k.children,H,K,ee,k.el,k.anchor)},y=({el:k,anchor:H},K,ee)=>{let X;for(;k&&k!==H;)X=p(k),n(k,K,ee),k=X;n(H,K,ee)},b=({el:k,anchor:H})=>{let K;for(;k&&k!==H;)K=p(k),s(k),k=K;s(H)},_=(k,H,K,ee,X,Q,ue,ae,oe)=>{if(H.type==="svg"?ue="svg":H.type==="math"&&(ue="mathml"),k==null)$(H,K,ee,X,Q,ue,ae,oe);else{const te=k.el&&k.el._isVueCE?k.el:null;try{te&&te._beginPatch(),P(k,H,X,Q,ue,ae,oe)}finally{te&&te._endPatch()}}},$=(k,H,K,ee,X,Q,ue,ae)=>{let oe,te;const{props:Se,shapeFlag:fe,transition:we,dirs:ke}=k;if(oe=k.el=o(k.type,Q,Se&&Se.is,Se),fe&8?u(oe,k.children):fe&16&&v(k.children,oe,null,ee,X,Ga(k,Q),ue,ae),ke&&br(k,null,ee,"created"),R(oe,k,k.scopeId,ue,ee),Se){for(const ot in Se)ot!=="value"&&!rs(ot)&&i(oe,ot,null,Se[ot],Q,ee);"value"in Se&&i(oe,"value",null,Se.value,Q),(te=Se.onVnodeBeforeMount)&&Nt(te,ee,k)}ke&&br(k,null,ee,"beforeMount");const qe=ud(X,we);qe&&we.beforeEnter(oe),n(oe,H,K),((te=Se&&Se.onVnodeMounted)||qe||ke)&&lt(()=>{te&&Nt(te,ee,k),qe&&we.enter(oe),ke&&br(k,null,ee,"mounted")},X)},R=(k,H,K,ee,X)=>{if(K&&h(k,K),ee)for(let Q=0;Q<ee.length;Q++)h(k,ee[Q]);if(X){let Q=X.subTree;if(H===Q||ho(Q.type)&&(Q.ssContent===H||Q.ssFallback===H)){const ue=X.vnode;R(k,ue,ue.scopeId,ue.slotScopeIds,X.parent)}}},v=(k,H,K,ee,X,Q,ue,ae,oe=0)=>{for(let te=oe;te<k.length;te++)w(null,k[te]=ae?on(k[te]):qt(k[te]),H,K,ee,X,Q,ue,ae)},P=(k,H,K,ee,X,Q,ue)=>{const ae=H.el=k.el;let{patchFlag:oe,dynamicChildren:te,dirs:Se}=H;oe|=k.patchFlag&16;const fe=k.props||He,we=H.props||He;let ke;if(K&&Pn(K,!1),(ke=we.onVnodeBeforeUpdate)&&Nt(ke,K,H,k),Se&&br(H,k,K,"beforeUpdate"),K&&Pn(K,!0),(fe.innerHTML&&we.innerHTML==null||fe.textContent&&we.textContent==null)&&u(ae,""),te?O(k.dynamicChildren,te,ae,K,ee,Ga(H,X),Q):ue||U(k,H,ae,null,K,ee,Ga(H,X),Q,!1),oe>0){if(oe&16)C(ae,fe,we,K,X);else if(oe&2&&fe.class!==we.class&&i(ae,"class",null,we.class,X),oe&4&&i(ae,"style",fe.style,we.style,X),oe&8){const qe=H.dynamicProps;for(let ot=0;ot<qe.length;ot++){const Je=qe[ot],Ft=fe[Je],At=we[Je];(At!==Ft||Je==="value")&&i(ae,Je,Ft,At,X,K)}}oe&1&&k.children!==H.children&&u(ae,H.children)}else!ue&&te==null&&C(ae,fe,we,K,X);((ke=we.onVnodeUpdated)||Se)&&lt(()=>{ke&&Nt(ke,K,H,k),Se&&br(H,k,K,"updated")},ee)},O=(k,H,K,ee,X,Q,ue)=>{for(let ae=0;ae<H.length;ae++){const oe=k[ae],te=H[ae];w(oe,te,oe.el&&(oe.type===Oe||!ur(oe,te)||oe.shapeFlag&198)?d(oe.el):K,null,ee,X,Q,ue,!0)}},C=(k,H,K,ee,X)=>{if(H!==K){if(H!==He)for(const Q in H)!rs(Q)&&!(Q in K)&&i(k,Q,H[Q],null,X,ee);for(const Q in K){if(rs(Q))continue;const ue=K[Q],ae=H[Q];ue!==ae&&Q!=="value"&&i(k,Q,ae,ue,X,ee)}"value"in K&&i(k,"value",H.value,K.value,X)}},T=(k,H,K,ee,X,Q,ue,ae,oe)=>{const te=H.el=k?k.el:a(""),Se=H.anchor=k?k.anchor:a("");let{patchFlag:fe,dynamicChildren:we,slotScopeIds:ke}=H;ke&&(ae=ae?ae.concat(ke):ke),k==null?(n(te,K,ee),n(Se,K,ee),v(H.children||[],K,Se,X,Q,ue,ae,oe)):fe>0&&fe&64&&we&&k.dynamicChildren?(O(k.dynamicChildren,we,K,X,Q,ue,ae),(H.key!=null||X&&H===X.subTree)&&Ja(k,H,!0)):U(k,H,K,Se,X,Q,ue,ae,oe)},E=(k,H,K,ee,X,Q,ue,ae,oe)=>{H.slotScopeIds=ae,k==null?H.shapeFlag&512?X.ctx.activate(H,K,ee,ue,oe):q(H,K,ee,X,Q,ue,oe):j(k,H,oe)},q=(k,H,K,ee,X,Q,ue)=>{const ae=k.component=wd(k,ee,X);if(Ys(k)&&(ae.ctx.renderer=me),bd(ae,!1,ue),ae.asyncDep){if(X&&X.registerDep(ae,z,ue),!k.el){const oe=ae.subTree=D(it);g(null,oe,H,K),k.placeholder=oe.el}}else z(ae,k,H,K,X,Q,ue)},j=(k,H,K)=>{const ee=H.component=k.component;if(hm(k,H,K))if(ee.asyncDep&&!ee.asyncResolved){J(ee,H,K);return}else ee.next=H,ee.update();else H.el=k.el,ee.vnode=H},z=(k,H,K,ee,X,Q,ue)=>{const ae=()=>{if(k.isMounted){let{next:fe,bu:we,u:ke,parent:qe,vnode:ot}=k;{const Wt=dd(k);if(Wt){fe&&(fe.el=ot.el,J(k,fe,ue)),Wt.asyncDep.then(()=>{k.isUnmounted||ae()});return}}let Je=fe,Ft;Pn(k,!1),fe?(fe.el=ot.el,J(k,fe,ue)):fe=ot,we&&ss(we),(Ft=fe.props&&fe.props.onVnodeBeforeUpdate)&&Nt(Ft,qe,fe,ot),Pn(k,!0);const At=uo(k),mr=k.subTree;k.subTree=At,w(mr,At,d(mr.el),M(mr),k,X,Q),fe.el=At.el,Je===null&&fo(k,At.el),ke&&lt(ke,X),(Ft=fe.props&&fe.props.onVnodeUpdated)&&lt(()=>Nt(Ft,qe,fe,ot),X)}else{let fe;const{el:we,props:ke}=H,{bm:qe,m:ot,parent:Je,root:Ft,type:At}=k,mr=nn(H);if(Pn(k,!1),qe&&ss(qe),!mr&&(fe=ke&&ke.onVnodeBeforeMount)&&Nt(fe,Je,H),Pn(k,!0),we&&et){const Wt=()=>{k.subTree=uo(k),et(we,k.subTree,k,X,null)};mr&&At.__asyncHydrate?At.__asyncHydrate(we,k,Wt):Wt()}else{Ft.ce&&Ft.ce._def.shadowRoot!==!1&&Ft.ce._injectChildStyle(At);const Wt=k.subTree=uo(k);w(null,Wt,K,ee,k,X,Q),H.el=Wt.el}if(ot&&lt(ot,X),!mr&&(fe=ke&&ke.onVnodeMounted)){const Wt=H;lt(()=>Nt(fe,Je,Wt),X)}(H.shapeFlag&256||Je&&nn(Je.vnode)&&Je.vnode.shapeFlag&256)&&k.a&&lt(k.a,X),k.isMounted=!0,H=K=ee=null}};k.scope.on();const oe=k.effect=new Ns(ae);k.scope.off();const te=k.update=oe.run.bind(oe),Se=k.job=oe.runIfDirty.bind(oe);Se.i=k,Se.id=k.uid,oe.scheduler=()=>Ta(Se),Pn(k,!0),te()},J=(k,H,K)=>{H.component=k;const ee=k.vnode.props;k.vnode=H,k.next=null,vm(k,H.props,ee,K),bm(k,H.children,K),Or(),au(k),Hr()},U=(k,H,K,ee,X,Q,ue,ae,oe=!1)=>{const te=k&&k.children,Se=k?k.shapeFlag:0,fe=H.children,{patchFlag:we,shapeFlag:ke}=H;if(we>0){if(we&128){be(te,fe,K,ee,X,Q,ue,ae,oe);return}else if(we&256){Ae(te,fe,K,ee,X,Q,ue,ae,oe);return}}ke&8?(Se&16&&Y(te,X,Q),fe!==te&&u(K,fe)):Se&16?ke&16?be(te,fe,K,ee,X,Q,ue,ae,oe):Y(te,X,Q,!0):(Se&8&&u(K,""),ke&16&&v(fe,K,ee,X,Q,ue,ae,oe))},Ae=(k,H,K,ee,X,Q,ue,ae,oe)=>{k=k||Qn,H=H||Qn;const te=k.length,Se=H.length,fe=Math.min(te,Se);let we;for(we=0;we<fe;we++){const ke=H[we]=oe?on(H[we]):qt(H[we]);w(k[we],ke,K,null,X,Q,ue,ae,oe)}te>Se?Y(k,X,Q,!0,!1,fe):v(H,K,ee,X,Q,ue,ae,oe,fe)},be=(k,H,K,ee,X,Q,ue,ae,oe)=>{let te=0;const Se=H.length;let fe=k.length-1,we=Se-1;for(;te<=fe&&te<=we;){const ke=k[te],qe=H[te]=oe?on(H[te]):qt(H[te]);if(ur(ke,qe))w(ke,qe,K,null,X,Q,ue,ae,oe);else break;te++}for(;te<=fe&&te<=we;){const ke=k[fe],qe=H[we]=oe?on(H[we]):qt(H[we]);if(ur(ke,qe))w(ke,qe,K,null,X,Q,ue,ae,oe);else break;fe--,we--}if(te>fe){if(te<=we){const ke=we+1,qe=ke<Se?H[ke].el:ee;for(;te<=we;)w(null,H[te]=oe?on(H[te]):qt(H[te]),K,qe,X,Q,ue,ae,oe),te++}}else if(te>we)for(;te<=fe;)Be(k[te],X,Q,!0),te++;else{const ke=te,qe=te,ot=new Map;for(te=qe;te<=we;te++){const Gt=H[te]=oe?on(H[te]):qt(H[te]);Gt.key!=null&&ot.set(Gt.key,te)}let Je,Ft=0;const At=we-qe+1;let mr=!1,Wt=0;const ki=new Array(At);for(te=0;te<At;te++)ki[te]=0;for(te=ke;te<=fe;te++){const Gt=k[te];if(Ft>=At){Be(Gt,X,Q,!0);continue}let Pr;if(Gt.key!=null)Pr=ot.get(Gt.key);else for(Je=qe;Je<=we;Je++)if(ki[Je-qe]===0&&ur(Gt,H[Je])){Pr=Je;break}Pr===void 0?Be(Gt,X,Q,!0):(ki[Pr-qe]=te+1,Pr>=Wt?Wt=Pr:mr=!0,w(Gt,H[Pr],K,null,X,Q,ue,ae,oe),Ft++)}const lg=mr?Sm(ki):Qn;for(Je=lg.length-1,te=At-1;te>=0;te--){const Gt=qe+te,Pr=H[Gt],cg=H[Gt+1],ug=Gt+1<Se?cg.el||cg.placeholder:ee;ki[te]===0?w(null,Pr,K,ug,X,Q,ue,ae,oe):mr&&(Je<0||te!==lg[Je]?Qe(Pr,K,ug,2):Je--)}}},Qe=(k,H,K,ee,X=null)=>{const{el:Q,type:ue,transition:ae,children:oe,shapeFlag:te}=k;if(te&6){Qe(k.component.subTree,H,K,ee);return}if(te&128){k.suspense.move(H,K,ee);return}if(te&64){ue.move(k,H,K,me);return}if(ue===Oe){n(Q,H,K);for(let Se=0;Se<oe.length;Se++)Qe(oe[Se],H,K,ee);n(k.anchor,H,K);return}if(ue===On){y(k,H,K);return}if(ee!==2&&te&1&&ae)if(ee===0)ae.beforeEnter(Q),n(Q,H,K),lt(()=>ae.enter(Q),X);else{const{leave:Se,delayLeave:fe,afterLeave:we}=ae,ke=()=>{k.ctx.isUnmounted?s(Q):n(Q,H,K)},qe=()=>{Q._isLeaving&&Q[Lr](!0),Se(Q,()=>{ke(),we&&we()})};fe?fe(Q,ke,qe):qe()}else n(Q,H,K)},Be=(k,H,K,ee=!1,X=!1)=>{const{type:Q,props:ue,ref:ae,children:oe,dynamicChildren:te,shapeFlag:Se,patchFlag:fe,dirs:we,cacheIndex:ke}=k;if(fe===-2&&(X=!1),ae!=null&&(Or(),ps(ae,null,K,k,!0),Hr()),ke!=null&&(H.renderCache[ke]=void 0),Se&256){H.ctx.deactivate(k);return}const qe=Se&1&&we,ot=!nn(k);let Je;if(ot&&(Je=ue&&ue.onVnodeBeforeUnmount)&&Nt(Je,H,k),Se&6)ie(k.component,K,ee);else{if(Se&128){k.suspense.unmount(K,ee);return}qe&&br(k,null,H,"beforeUnmount"),Se&64?k.type.remove(k,H,K,me,ee):te&&!te.hasOnce&&(Q!==Oe||fe>0&&fe&64)?Y(te,H,K,!1,!0):(Q===Oe&&fe&384||!X&&Se&16)&&Y(oe,H,K),ee&&W(k)}(ot&&(Je=ue&&ue.onVnodeUnmounted)||qe)&&lt(()=>{Je&&Nt(Je,H,k),qe&&br(k,null,H,"unmounted")},K)},W=k=>{const{type:H,el:K,anchor:ee,transition:X}=k;if(H===Oe){se(K,ee);return}if(H===On){b(k);return}const Q=()=>{s(K),X&&!X.persisted&&X.afterLeave&&X.afterLeave()};if(k.shapeFlag&1&&X&&!X.persisted){const{leave:ue,delayLeave:ae}=X,oe=()=>ue(K,Q);ae?ae(k.el,Q,oe):oe()}else Q()},se=(k,H)=>{let K;for(;k!==H;)K=p(k),s(k),k=K;s(H)},ie=(k,H,K)=>{const{bum:ee,scope:X,job:Q,subTree:ue,um:ae,m:oe,a:te}=k;po(oe),po(te),ee&&ss(ee),X.stop(),Q&&(Q.flags|=8,Be(ue,k,H,K)),ae&&lt(ae,H),lt(()=>{k.isUnmounted=!0},H)},Y=(k,H,K,ee=!1,X=!1,Q=0)=>{for(let ue=Q;ue<k.length;ue++)Be(k[ue],H,K,ee,X)},M=k=>{if(k.shapeFlag&6)return M(k.component.subTree);if(k.shapeFlag&128)return k.suspense.next();const H=p(k.anchor||k.el),K=H&&H[uu];return K?p(K):H};let ne=!1;const Ee=(k,H,K)=>{k==null?H._vnode&&Be(H._vnode,null,null,!0):w(H._vnode||null,k,H,null,null,null,K),H._vnode=k,ne||(ne=!0,au(),Wi(),ne=!1)},me={p:w,um:Be,m:Qe,r:W,mt:q,mc:v,pc:U,pbc:O,n:M,o:e};let Fe,et;return t&&([Fe,et]=t(me)),{render:Ee,hydrate:Fe,createApp:om(Ee,Fe)}}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 Pn({effect:e,job:t},r){r?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ud(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ja(e,t,r=!1){const n=e.children,s=t.children;if(pe(n)&&pe(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]=on(s[i]),a.el=o.el),!r&&a.patchFlag!==-2&&Ja(o,a)),a.type===sn&&a.patchFlag!==-1&&(a.el=o.el),a.type===it&&!a.el&&(a.el=o.el)}}function Sm(e){const t=e.slice(),r=[0];let n,s,i,o,a;const l=e.length;for(n=0;n<l;n++){const c=e[n];if(c!==0){if(s=r[r.length-1],e[s]<c){t[n]=s,r.push(n);continue}for(i=0,o=r.length-1;i<o;)a=i+o>>1,e[r[a]]<c?i=a+1:o=a;c<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 dd(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:dd(t)}function po(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}var ho=e=>e.__isSuspense,Ya=0,Cm={name:"Suspense",__isSuspense:!0,process(e,t,r,n,s,i,o,a,l,c){if(e==null)_m(t,r,n,s,i,o,a,l,c);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}xm(e,t,r,n,s,o,a,l,c)}},hydrate:Tm,normalize:Em};function ri(e,t){const r=e.props&&e.props[t];Ce(r)&&r()}function _m(e,t,r,n,s,i,o,a,l){const{p:c,o:{createElement:u}}=l,d=u("div"),p=e.suspense=fd(e,s,n,t,d,r,i,o,a,l);c(null,p.pendingBranch=e.ssContent,d,null,n,p,i,o),p.deps>0?(ri(e,"onPending"),ri(e,"onFallback"),c(null,e.ssFallback,t,r,n,null,i,o),ms(p,e.ssFallback)):p.resolve(!1,!0)}function xm(e,t,r,n,s,i,o,a,{p:l,um:c,o:{createElement:u}}){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:S,isHydrating:g}=d;if(w)d.pendingBranch=p,ur(w,p)?(l(w,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0?d.resolve():S&&(g||(l(m,h,r,n,s,null,i,o,a),ms(d,h)))):(d.pendingId=Ya++,g?(d.isHydrating=!1,d.activeBranch=w):c(w,s,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),S?(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&&ur(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&&ur(m,p))l(m,p,r,n,s,d,i,o,a),ms(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:y}=d;x>0?setTimeout(()=>{d.pendingId===y&&d.fallback(h)},x):x===0&&d.fallback(h)}}function fd(e,t,r,n,s,i,o,a,l,c,u=!1){const{p:d,m:p,um:h,n:m,o:{parentNode:w,remove:S}}=c;let g;const x=Am(e);x&&t&&t.pendingBranch&&(g=t.pendingId,t.deps++);const y=e.props?Pi(e.props.timeout):void 0,b=i,_={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:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve($=!1,R=!1){const{vnode:v,activeBranch:P,pendingBranch:O,pendingId:C,effects:T,parentComponent:E,container:q,isInFallback:j}=_;let z=!1;_.isHydrating?_.isHydrating=!1:$||(z=P&&O.transition&&O.transition.mode==="out-in",z&&(P.transition.afterLeave=()=>{C===_.pendingId&&(p(O,q,i===b?m(P):i,0),Ks(T),j&&v.ssFallback&&(v.ssFallback.el=null))}),P&&(w(P.el)===q&&(i=m(P)),h(P,E,_,!0),!z&&j&&v.ssFallback&&lt(()=>v.ssFallback.el=null,_)),z||p(O,q,i,0)),ms(_,O),_.pendingBranch=null,_.isInFallback=!1;let J=_.parent,U=!1;for(;J;){if(J.pendingBranch){J.effects.push(...T),U=!0;break}J=J.parent}!U&&!z&&Ks(T),_.effects=[],x&&t&&t.pendingBranch&&g===t.pendingId&&(t.deps--,t.deps===0&&!R&&t.resolve()),ri(v,"onResolve")},fallback($){if(!_.pendingBranch)return;const{vnode:R,activeBranch:v,parentComponent:P,container:O,namespace:C}=_;ri(R,"onFallback");const T=m(v),E=()=>{_.isInFallback&&(d(null,$,O,T,P,null,C,a,l),ms(_,$))},q=$.transition&&$.transition.mode==="out-in";q&&(v.transition.afterLeave=E),_.isInFallback=!0,h(v,P,null,!0),q||E()},move($,R,v){_.activeBranch&&p(_.activeBranch,$,R,v),_.container=$},next(){return _.activeBranch&&m(_.activeBranch)},registerDep($,R,v){const P=!!_.pendingBranch;P&&_.deps++;const O=$.vnode.el;$.asyncDep.catch(C=>{In(C,$,0)}).then(C=>{if($.isUnmounted||_.isUnmounted||_.pendingId!==$.suspenseId)return;$.asyncResolved=!0;const{vnode:T}=$;el($,C,!1),O&&(T.el=O);const E=!O&&$.subTree.el;R($,T,w(O||$.subTree.el),O?null:m($.subTree),_,o,v),E&&(T.placeholder=null,S(E)),fo($,T.el),P&&--_.deps===0&&_.resolve()})},unmount($,R){_.isUnmounted=!0,_.activeBranch&&h(_.activeBranch,r,$,R),_.pendingBranch&&h(_.pendingBranch,r,$,R)}};return _}function Tm(e,t,r,n,s,i,o,a,l){const c=t.suspense=fd(t,n,r,e.parentNode,document.createElement("div"),null,s,i,o,a,!0),u=l(e,c.pendingBranch=t.ssContent,r,c,i,o);return c.deps===0&&c.resolve(!1,!0),u}function Em(e){const{shapeFlag:t,children:r}=e,n=t&32;e.ssContent=pd(n?r.default:r),e.ssFallback=n?pd(r.fallback):D(it)}function pd(e){let t;if(Ce(e)){const r=Hn&&e._c;r&&(e._d=!1,I()),e=e(),r&&(e._d=!0,t=Tt,gd())}return pe(e)&&(e=dm(e)),e=qt(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(r=>r!==e)),e}function hd(e,t){t&&t.pendingBranch?pe(e)?t.effects.push(...e):t.effects.push(e):Ks(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,fo(n,s))}function Am(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}var Oe=Symbol.for("v-fgt"),sn=Symbol.for("v-txt"),it=Symbol.for("v-cmt"),On=Symbol.for("v-stc"),ni=[],Tt=null;function I(e=!1){ni.push(Tt=e?null:[])}function gd(){ni.pop(),Tt=ni[ni.length-1]||null}var Hn=1;function si(e,t=!1){Hn+=e,e<0&&Tt&&t&&(Tt.hasOnce=!0)}function vd(e){return e.dynamicChildren=Hn>0?Tt||Qn:null,gd(),Hn>0&&Tt&&Tt.push(e),e}function ve(e,t,r,n,s,i){return vd(re(e,t,r,n,s,i,!0))}function N(e,t,r,n,s){return vd(D(e,t,r,n,s,!0))}function Ur(e){return e?e.__v_isVNode===!0:!1}function ur(e,t){return e.type===t.type&&e.key===t.key}function km(e){}var md=({key:e})=>e??null,go=({ref:e,ref_key:t,ref_for:r})=>(typeof e=="number"&&(e=""+e),e!=null?tt(e)||We(e)||Ce(e)?{i:yt,r:e,k:t,f:!!r}:e:null);function re(e,t=null,r=null,n=0,s=null,i=e===Oe?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&md(t),ref:t&&go(t),scopeId:Ji,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:yt};return a?(Za(l,r),i&128&&e.normalize(l)):r&&(l.shapeFlag|=tt(r)?8:16),Hn>0&&!o&&Tt&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&Tt.push(l),l}var D=Im;function Im(e,t=null,r=null,n=0,s=null,i=!1){if((!e||e===Ou)&&(e=it),Ur(e)){const a=dr(e,t,!0);return r&&Za(a,r),Hn>0&&!i&&Tt&&(a.shapeFlag&6?Tt[Tt.indexOf(e)]=a:Tt.push(a)),a.patchFlag=-2,a}if(qm(e)&&(e=e.__vccOpts),t){t=Dt(t);let{class:a,style:l}=t;a&&!tt(a)&&(t.class=Ke(a)),je(l)&&(Us(l)&&!pe(l)&&(l=Ye({},l)),t.style=mt(l))}const o=tt(e)?1:ho(e)?128:du(e)?64:je(e)?4:Ce(e)?2:0;return re(e,t,r,n,s,o,i,!0)}function Dt(e){return e?Us(e)||ed(e)?Ye({},e):e:null}function dr(e,t,r=!1,n=!1){const{props:s,ref:i,patchFlag:o,children:a,transition:l}=e,c=t?ce(s||{},t):s,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&md(c),ref:t&&t.ref?r&&i?pe(i)?i.concat(go(t)):[i,go(t)]:go(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!==Oe?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&&dr(e.ssContent),ssFallback:e.ssFallback&&dr(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&n&&Vr(u,l.clone(u)),u}function $e(e=" ",t=0){return D(sn,null,e,t)}function Rm(e,t){const r=D(On,null,e);return r.staticCount=t,r}function xe(e="",t=!1){return t?(I(),N(it,null,e)):D(it,null,e)}function qt(e){return e==null||typeof e=="boolean"?D(it):pe(e)?D(Oe,null,e.slice()):Ur(e)?on(e):D(sn,null,String(e))}function on(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:dr(e)}function Za(e,t){let r=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(pe(t))r=16;else if(typeof t=="object")if(n&65){const s=t.default;s&&(s._c&&(s._d=!1),Za(e,s()),s._c&&(s._d=!0));return}else{r=32;const s=t._;!s&&!ed(t)?t._ctx=yt:s===3&&yt&&(yt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Ce(t)?(t={default:t,_ctx:yt},r=32):(t=String(t),n&64?(r=16,t=[$e(t)]):r=8);e.children=t,e.shapeFlag|=r}function ce(...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=Ke([t.class,n.class]));else if(s==="style")t.style=mt([t.style,n.style]);else if(Ms(s)){const i=t[s],o=n[s];o&&i!==o&&!(pe(i)&&i.includes(o))&&(t[s]=i?[].concat(i,o):o)}else s!==""&&(t[s]=n[s])}return t}function Nt(e,t,r,n=null){Yt(e,t,7,[r,n])}var $m=Uu(),Dm=0;function wd(e,t,r){const n=e.type,s=(t?t.appContext:e.appContext)||$m,i={uid:Dm++,vnode:e,type:n,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new da(!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:rd(n,s),emitsOptions:Yu(n,s),emit:null,emitted:null,propsDefaults:He,inheritAttrs:n.inheritAttrs,ctx:He,data:He,props:He,attrs:He,slots:He,refs:He,setupState:He,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=cm.bind(null,i),e.ce&&e.ce(i),i}var St=null,nt=()=>St||yt,vo,Xa;{const e=Oi(),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)}};vo=t("__VUE_INSTANCE_SETTERS__",r=>St=r),Xa=t("__VUE_SSR_SETTERS__",r=>ws=r)}var Mn=e=>{const t=St;return vo(e),e.scope.on(),()=>{e.scope.off(),vo(t)}},Qa=()=>{St&&St.scope.off(),vo(null)};function yd(e){return e.vnode.shapeFlag&4}var ws=!1;function bd(e,t=!1,r=!1){t&&Xa(t);const{props:n,children:s}=e.vnode,i=yd(e);gm(e,n,i,t),ym(e,s,r||t);const o=i?Pm(e,t):void 0;return t&&Xa(!1),o}function Pm(e,t){const r=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ba);const{setup:n}=r;if(n){Or();const s=e.setupContext=n.length>1?Cd(e):null,i=Mn(e),o=ls(n,e,0,[e.props,s]),a=ca(o);if(Hr(),i(),(a||e.sp)&&!nn(e)&&$a(e),a){if(o.then(Qa,Qa),t)return o.then(l=>{el(e,l,t)}).catch(l=>{In(l,e,0)});e.asyncDep=o}else el(e,o,t)}else Sd(e,t)}function el(e,t,r){Ce(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:je(t)&&(e.setupState=_a(t)),Sd(e,r)}var mo,tl;function Om(e){mo=e,tl=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,Vv))}}var Hm=()=>!mo;function Sd(e,t,r){const n=e.type;if(!e.render){if(!t&&mo&&!n.render){const s=n.template||La(e).template;if(s){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:a,compilerOptions:l}=n,c=Ye(Ye({isCustomElement:i,delimiters:a},o),l);n.render=mo(s,c)}}e.render=n.render||Jt,tl&&tl(e)}{const s=Mn(e);Or();try{em(e)}finally{Hr(),s()}}}var Mm={get(e,t){return xt(e,"get",""),e[t]}};function Cd(e){const t=r=>{e.exposed=r||{}};return{attrs:new Proxy(e.attrs,Mm),slots:e.slots,emit:e.emit,expose:t}}function ii(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(_a(Ca(e.exposed)),{get(t,r){if(r in t)return t[r];if(r in Xs)return Xs[r](e)},has(t,r){return r in t||r in Xs}})):e.proxy}function rl(e,t=!0){return Ce(e)?e.displayName||e.name:e.name||t&&e.__name}function qm(e){return Ce(e)&&"__vccOpts"in e}var B=(e,t)=>iv(e,t,ws);function Qt(e,t,r){try{si(-1);const n=arguments.length;return n===2?je(t)&&!pe(t)?Ur(t)?D(e,null,[t]):D(e,t):D(e,null,t):(n>3?r=Array.prototype.slice.call(arguments,2):n===3&&Ur(r)&&(r=[r]),D(e,t,r))}finally{si(1)}}function Nm(){return;function e(t,r,n){const s=t[n];if(pe(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 Bm(e,t,r,n){const s=r[n];if(s&&_d(s,e))return s;const i=t();return i.memo=e.slice(),i.cacheIndex=n,r[n]=i}function _d(e,t){const r=e.memo;if(r.length!=t.length)return!1;for(let n=0;n<r.length;n++)if(kt(r[n],t[n]))return!1;return Hn>0&&Tt&&Tt.push(e),!0}var xd="3.5.25",Fm=Jt,Lm=hv,Vm=ds,jm=cu,Um={createComponentInstance:wd,setupComponent:bd,renderComponentRoot:uo,setCurrentRenderingInstance:Gs,isVNode:Ur,normalizeVNode:qt,getComponentPublicInstance:ii,ensureValidVNode:Ma,pushWarningContext:uv,popWarningContext:dv},BT=null,FT=null,LT=null;var nl=void 0,Td=typeof window<"u"&&window.trustedTypes;if(Td)try{nl=Td.createPolicy("vue",{createHTML:e=>e})}catch{}var Ed=nl?e=>nl.createHTML(e):e=>e,zm="http://www.w3.org/2000/svg",Km="http://www.w3.org/1998/Math/MathML",zr=typeof document<"u"?document:null,Ad=zr&&zr.createElement("template"),kd={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"?zr.createElementNS(zm,e):t==="mathml"?zr.createElementNS(Km,e):r?zr.createElement(e,{is:r}):zr.createElement(e);return e==="select"&&n&&n.multiple!=null&&s.setAttribute("multiple",n.multiple),s},createText:e=>zr.createTextNode(e),createComment:e=>zr.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>zr.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{Ad.innerHTML=Ed(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=Ad.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]}},an="transition",oi="animation",ys=Symbol("_vtc"),Id={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},Rd=Ye({},Ia,Id),Wm=e=>(e.displayName="Transition",e.props=Rd,e),Gm=Wm((e,{slots:t})=>Qt(yu,Dd(e),t)),qn=(e,t=[])=>{pe(e)?e.forEach(r=>r(...t)):e&&e(...t)},$d=e=>e?pe(e)?e.some(t=>t.length>1):e.length>1:!1;function Dd(e){const t={};for(const T in e)T in Id||(t[T]=e[T]);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:c=o,appearToClass:u=a,leaveFromClass:d=`${r}-leave-from`,leaveActiveClass:p=`${r}-leave-active`,leaveToClass:h=`${r}-leave-to`}=e,m=Jm(s),w=m&&m[0],S=m&&m[1],{onBeforeEnter:g,onEnter:x,onEnterCancelled:y,onLeave:b,onLeaveCancelled:_,onBeforeAppear:$=g,onAppear:R=x,onAppearCancelled:v=y}=t,P=(T,E,q,j)=>{T._enterCancelled=j,ln(T,E?u:a),ln(T,E?c:o),q&&q()},O=(T,E)=>{T._isLeaving=!1,ln(T,d),ln(T,h),ln(T,p),E&&E()},C=T=>(E,q)=>{const j=T?R:x,z=()=>P(E,T,q);qn(j,[E,z]),Pd(()=>{ln(E,T?l:i),Sr(E,T?u:a),$d(j)||Od(E,n,w,z)})};return Ye(t,{onBeforeEnter(T){qn(g,[T]),Sr(T,i),Sr(T,o)},onBeforeAppear(T){qn($,[T]),Sr(T,l),Sr(T,c)},onEnter:C(!1),onAppear:C(!0),onLeave(T,E){T._isLeaving=!0;const q=()=>O(T,E);Sr(T,d),T._enterCancelled?(Sr(T,p),il(T)):(il(T),Sr(T,p)),Pd(()=>{T._isLeaving&&(ln(T,d),Sr(T,h),$d(b)||Od(T,n,S,q))}),qn(b,[T,q])},onEnterCancelled(T){P(T,!1,void 0,!0),qn(y,[T])},onAppearCancelled(T){P(T,!0,void 0,!0),qn(v,[T])},onLeaveCancelled(T){O(T),qn(_,[T])}})}function Jm(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 Pi(e)}function Sr(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.add(r)),(e[ys]||(e[ys]=new Set)).add(t)}function ln(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 Pd(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var Ym=0;function Od(e,t,r,n){const s=e._endId=++Ym,i=()=>{s===e._endId&&n()};if(r!=null)return setTimeout(i,r);const{type:o,timeout:a,propCount:l}=Hd(e,t);if(!o)return n();const c=o+"end";let u=0;const d=()=>{e.removeEventListener(c,p),i()},p=h=>{h.target===e&&++u>=l&&d()};setTimeout(()=>{u<l&&d()},a+1),e.addEventListener(c,p)}function Hd(e,t){const r=window.getComputedStyle(e),n=m=>(r[m]||"").split(", "),s=n(`${an}Delay`),i=n(`${an}Duration`),o=Md(s,i),a=n(`${oi}Delay`),l=n(`${oi}Duration`),c=Md(a,l);let u=null,d=0,p=0;t===an?o>0&&(u=an,d=o,p=i.length):t===oi?c>0&&(u=oi,d=c,p=l.length):(d=Math.max(o,c),u=d>0?o>c?an:oi:null,p=u?u===an?i.length:l.length:0);const h=u===an&&/\b(?:transform|all)(?:,|$)/.test(n(`${an}Property`).toString());return{type:u,timeout:d,propCount:p,hasTransform:h}}function Md(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((r,n)=>qd(r)+qd(e[n])))}function qd(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function il(e){return(e?e.ownerDocument:document).body.offsetHeight}function Zm(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 wo=Symbol("_vod"),Nd=Symbol("_vsh"),yo={name:"show",beforeMount(e,{value:t},{transition:r}){e[wo]=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[wo]:"none",e[Nd]=!t}function Xm(){yo.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}var Bd=Symbol("");function Qm(e){const t=nt();if(!t)return;const r=t.ut=(s=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(i=>bo(i,s))},n=()=>{const s=e(t.proxy);t.ce?bo(t.ce,s):ol(t.subTree,s),r(s)};Pa(()=>{Ks(n)}),Ue(()=>{Ie(n,Jt,{flush:"post"});const s=new MutationObserver(n);s.observe(t.subTree.el.parentNode,{childList:!0}),Rt(()=>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)bo(e.el,t);else if(e.type===Oe)e.children.forEach(r=>ol(r,t));else if(e.type===On){let{el:r,anchor:n}=e;for(;r&&(bo(r,t),r!==n);)r=r.nextSibling}}function bo(e,t){if(e.nodeType===1){const r=e.style;let n="";for(const s in t){const i=Rg(t[s]);r.setProperty(`--${s}`,i),n+=`--${s}: ${i};`}r[Bd]=n}}var ew=/(?:^|;)\s*display\s*:/;function tw(e,t,r){const n=e.style,s=tt(r);let i=!1;if(r&&!s){if(t)if(tt(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();r[a]==null&&So(n,a,"")}else for(const o in t)r[o]==null&&So(n,o,"");for(const o in r)o==="display"&&(i=!0),So(n,o,r[o])}else if(s){if(t!==r){const o=n[Bd];o&&(r+=";"+o),n.cssText=r,i=ew.test(r)}}else t&&e.removeAttribute("style");wo in e&&(e[wo]=i?n.display:"",e[Nd]&&(n.display="none"))}var Fd=/\s*!important$/;function So(e,t,r){if(pe(r))r.forEach(n=>So(e,t,n));else if(r==null&&(r=""),t.startsWith("--"))e.setProperty(t,r);else{const n=rw(e,t);Fd.test(r)?e.setProperty(Ot(n),r.replace(Fd,""),"important"):e[n]=r}}var Ld=["Webkit","Moz","ms"],al={};function rw(e,t){const r=al[t];if(r)return r;let n=ct(t);if(n!=="filter"&&n in e)return al[t]=n;n=qs(n);for(let s=0;s<Ld.length;s++){const i=Ld[s]+n;if(i in e)return al[t]=i}return t}var Vd="http://www.w3.org/1999/xlink";function jd(e,t,r,n,s,i=kg(t)){n&&t.startsWith("xlink:")?r==null?e.removeAttributeNS(Vd,t.slice(6,t.length)):e.setAttributeNS(Vd,t,r):r==null||i&&!Oc(r)?e.removeAttribute(t):e.setAttribute(t,i?"":ar(r)?String(r):r)}function Ud(e,t,r,n,s){if(t==="innerHTML"||t==="textContent"){r!=null&&(e[t]=t==="innerHTML"?Ed(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=Oc(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 Kr(e,t,r,n){e.addEventListener(t,r,n)}function nw(e,t,r,n){e.removeEventListener(t,r,n)}var zd=Symbol("_vei");function sw(e,t,r,n,s=null){const i=e[zd]||(e[zd]={}),o=i[t];if(n&&o)o.value=n;else{const[a,l]=iw(t);n?Kr(e,a,i[t]=lw(n,s),l):o&&(nw(e,a,o,l),i[t]=void 0)}}var Kd=/(?:Once|Passive|Capture)$/;function iw(e){let t;if(Kd.test(e)){t={};let r;for(;r=e.match(Kd);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Ot(e.slice(2)),t]}var ll=0,ow=Promise.resolve(),aw=()=>ll||(ow.then(()=>ll=0),ll=Date.now());function lw(e,t){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;Yt(cw(n,r.value),t,5,[n])};return r.value=e,r.attached=aw(),r}function cw(e,t){if(pe(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 Wd=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Gd=(e,t,r,n,s,i)=>{const o=s==="svg";t==="class"?Zm(e,n,o):t==="style"?tw(e,r,n):Ms(t)?aa(t)||sw(e,t,r,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):uw(e,t,n,o))?(Ud(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&jd(e,t,n,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!tt(n))?Ud(e,ct(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),jd(e,t,n,o))};function uw(e,t,r,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Wd(t)&&Ce(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 Wd(t)&&tt(r)?!1:t in e}var Jd={};function cl(e,t,r){let n=G(e,t);Ii(n)&&(n=Ye({},n,t));class s extends Yd{constructor(o){super(n,o,r)}}return s.def=n,s}var dw=((e,t)=>cl(e,t,gf)),fw=typeof HTMLElement<"u"?HTMLElement:class{},Yd=class dg extends fw{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(Ye({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof dg){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,at(()=>{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&&!pe(i))for(const l in i){const c=i[l];(c===Number||c&&c.type===Number)&&(l in this._props&&(this._props[l]=Pi(this._props[l])),(a||(a=Object.create(null)))[ct(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)Le(this,n)||Object.defineProperty(this,n,{get:()=>f(r[n])})}_resolveProps(t){const{props:r}=t,n=pe(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(ct))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):Jd;const s=ct(t);r&&this._numberProps&&this._numberProps[s]&&(n=Pi(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===Jd?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(Ot(t),""):typeof r=="string"||typeof r=="number"?this.setAttribute(Ot(t),r+""):r||this.removeAttribute(Ot(t)),i&&i.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),hf(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const r=D(this._def,Ye(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,Ii(o[0])?Ye({detail:o},o[0]):{detail:o}))};n.emit=(i,...o)=>{s(i,o),Ot(i)!==i&&s(Ot(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 c=r+"-s",u=document.createTreeWalker(l,1);l.setAttribute(c,"");let d;for(;d=u.nextNode();)d.setAttribute(c,"")}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()}_removeChildStyle(t){}};function Zd(e){const t=nt(),r=t&&t.ce;return r||null}function pw(){const e=Zd();return e&&e.shadowRoot}function hw(e="$style"){{const t=nt();if(!t)return He;const r=t.type.__cssModules;if(!r)return He;const n=r[e];return n||He}}var Xd=new WeakMap,Qd=new WeakMap,Co=Symbol("_moveCb"),ef=Symbol("_enterCb"),gw=e=>(delete e.props.mode,e),vw=gw({name:"TransitionGroup",props:Ye({},Rd,{tag:String,moveClass:String}),setup(e,{slots:t}){const r=nt(),n=ka();let s,i;return ao(()=>{if(!s.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!bw(s[0].el,r.vnode.el,o)){s=[];return}s.forEach(mw),s.forEach(ww);const a=s.filter(yw);il(r.vnode.el),a.forEach(l=>{const c=l.el,u=c.style;Sr(c,o),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[Co]=p=>{p&&p.target!==c||(!p||p.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",d),c[Co]=null,ln(c,o))};c.addEventListener("transitionend",d)}),s=[]}),()=>{const o=Me(e),a=Dd(o);let l=o.tag||Oe;if(s=[],i)for(let c=0;c<i.length;c++){const u=i[c];u.el&&u.el instanceof Element&&(s.push(u),Vr(u,fs(u,a,n,r)),Xd.set(u,{left:u.el.offsetLeft,top:u.el.offsetTop}))}i=t.default?eo(t.default()):[];for(let c=0;c<i.length;c++){const u=i[c];u.key!=null&&Vr(u,fs(u,a,n,r))}return D(l,null,i)}}});function mw(e){const t=e.el;t[Co]&&t[Co](),t[ef]&&t[ef]()}function ww(e){Qd.set(e,{left:e.el.offsetLeft,top:e.el.offsetTop})}function yw(e){const t=Xd.get(e),r=Qd.get(e),n=t.left-r.left,s=t.top-r.top;if(n||s){const i=e.el.style;return i.transform=i.webkitTransform=`translate(${n}px,${s}px)`,i.transitionDuration="0s",e}}function bw(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}=Hd(n);return i.removeChild(n),o}var cn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return pe(t)?r=>ss(t,r):t};function Sw(e){e.target.composing=!0}function tf(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}var er=Symbol("_assign");function rf(e,t,r){return t&&(e=e.trim()),r&&(e=Di(e)),e}var li={created(e,{modifiers:{lazy:t,trim:r,number:n}},s){e[er]=cn(s);const i=n||s.props&&s.props.type==="number";Kr(e,t?"change":"input",o=>{o.target.composing||e[er](rf(e.value,r,i))}),(r||i)&&Kr(e,"change",()=>{e.value=rf(e.value,r,i)}),t||(Kr(e,"compositionstart",Sw),Kr(e,"compositionend",tf),Kr(e,"change",tf))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:r,modifiers:{lazy:n,trim:s,number:i}},o){if(e[er]=cn(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?Di(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[er]=cn(r),Kr(e,"change",()=>{const n=e._modelValue,s=bs(e),i=e.checked,o=e[er];if(pe(n)){const a=Hi(n,s),l=a!==-1;if(i&&!l)o(n.concat(s));else if(!i&&l){const c=[...n];c.splice(a,1),o(c)}}else if(An(n)){const a=new Set(n);i?a.add(s):a.delete(s),o(a)}else o(af(e,i))})},mounted:nf,beforeUpdate(e,t,r){e[er]=cn(r),nf(e,t,r)}};function nf(e,{value:t,oldValue:r},n){e._modelValue=t;let s;if(pe(t))s=Hi(t,n.props.value)>-1;else if(An(t))s=t.has(n.props.value);else{if(t===r)return;s=Xr(t,af(e,!0))}e.checked!==s&&(e.checked=s)}var dl={created(e,{value:t},r){e.checked=Xr(t,r.props.value),e[er]=cn(r),Kr(e,"change",()=>{e[er](bs(e))})},beforeUpdate(e,{value:t,oldValue:r},n){e[er]=cn(n),t!==r&&(e.checked=Xr(t,n.props.value))}},sf={deep:!0,created(e,{value:t,modifiers:{number:r}},n){const s=An(t);Kr(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>r?Di(bs(o)):bs(o));e[er](e.multiple?s?new Set(i):i:i[0]),e._assigning=!0,at(()=>{e._assigning=!1})}),e[er]=cn(n)},mounted(e,{value:t}){of(e,t)},beforeUpdate(e,t,r){e[er]=cn(r)},updated(e,{value:t}){e._assigning||of(e,t)}};function of(e,t){const r=e.multiple,n=pe(t);if(!(r&&!n&&!An(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(c=>String(c)===String(a)):o.selected=Hi(t,a)>-1}else o.selected=t.has(a);else if(Xr(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 af(e,t){const r=t?"_trueValue":"_falseValue";return r in e?e[r]:t}var lf={created(e,t,r){_o(e,t,r,null,"created")},mounted(e,t,r){_o(e,t,r,null,"mounted")},beforeUpdate(e,t,r,n){_o(e,t,r,n,"beforeUpdate")},updated(e,t,r,n){_o(e,t,r,n,"updated")}};function cf(e,t){switch(e){case"SELECT":return sf;case"TEXTAREA":return li;default:switch(t){case"checkbox":return ul;case"radio":return dl;default:return li}}}function _o(e,t,r,n,s){const i=cf(e.tagName,r.props&&r.props.type)[s];i&&i(e,t,r,n)}function Cw(){li.getSSRProps=({value:e})=>({value:e}),dl.getSSRProps=({value:e},t)=>{if(t.props&&Xr(t.props.value,e))return{checked:!0}},ul.getSSRProps=({value:e},t)=>{if(pe(e)){if(t.props&&Hi(e,t.props.value)>-1)return{checked:!0}}else if(An(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},lf.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const r=cf(t.type.toUpperCase(),t.props&&t.props.type);if(r.getSSRProps)return r.getSSRProps(e,t)}}var _w=["ctrl","shift","alt","meta"],xw={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)=>_w.some(r=>e[`${r}Key`]&&!t.includes(r))},Cr=(e,t)=>{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=xw[t[o]];if(a&&a(s,t))return}return e(s,...i)}))},Tw={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=Ot(s.key);if(t.some(o=>o===i||Tw[o]===i))return e(s)}))},uf=Ye({patchProp:Gd},kd),ci,df=!1;function ff(){return ci||(ci=ad(uf))}function pf(){return ci=df?ci:ld(uf),df=!0,ci}var hf=((...e)=>{ff().render(...e)}),Ew=((...e)=>{pf().hydrate(...e)}),pl=((...e)=>{const t=ff().createApp(...e),{mount:r}=t;return t.mount=n=>{const s=mf(n);if(!s)return;const i=t._component;!Ce(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=r(s,!1,vf(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},t}),gf=((...e)=>{const t=pf().createApp(...e),{mount:r}=t;return t.mount=n=>{const s=mf(n);if(s)return r(s,!0,vf(s))},t});function vf(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function mf(e){return tt(e)?document.querySelector(e):e}var wf=!1,Aw=()=>{wf||(wf=!0,Cw(),Xm())},kw=mg({BaseTransition:()=>yu,BaseTransitionPropsValidators:()=>Ia,Comment:()=>it,DeprecationTypes:()=>null,EffectScope:()=>da,ErrorCodes:()=>pv,ErrorTypeStrings:()=>Lm,Fragment:()=>Oe,KeepAlive:()=>Mv,ReactiveEffect:()=>Ns,Static:()=>On,Suspense:()=>Cm,Teleport:()=>Aa,Text:()=>sn,TrackOpTypes:()=>ov,Transition:()=>Gm,TransitionGroup:()=>vw,TriggerOpTypes:()=>av,VueElement:()=>Yd,assertNumber:()=>fv,callWithAsyncErrorHandling:()=>Yt,callWithErrorHandling:()=>ls,camelize:()=>ct,capitalize:()=>qs,cloneVNode:()=>dr,compatUtils:()=>null,compile:()=>Iw,computed:()=>B,createApp:()=>pl,createBlock:()=>N,createCommentVNode:()=>xe,createElementBlock:()=>ve,createElementVNode:()=>re,createHydrationRenderer:()=>ld,createPropsRestProxy:()=>Xv,createRenderer:()=>ad,createSSRApp:()=>gf,createSlots:()=>Lv,createStaticVNode:()=>Rm,createTextVNode:()=>$e,createVNode:()=>D,customRef:()=>zs,defineAsyncComponent:()=>Hv,defineComponent:()=>G,defineCustomElement:()=>cl,defineEmits:()=>Uv,defineExpose:()=>zv,defineModel:()=>Gv,defineOptions:()=>Kv,defineProps:()=>jv,defineSSRCustomElement:()=>dw,defineSlots:()=>Wv,devtools:()=>Vm,effect:()=>Dg,effectScope:()=>fa,getCurrentInstance:()=>nt,getCurrentScope:()=>is,getCurrentWatcher:()=>lv,getTransitionRawChildren:()=>eo,guardReactiveProps:()=>Dt,h:()=>Qt,handleError:()=>In,hasInjectionContext:()=>ja,hydrate:()=>Ew,hydrateOnIdle:()=>Iv,hydrateOnInteraction:()=>Pv,hydrateOnMediaQuery:()=>Dv,hydrateOnVisible:()=>$v,initCustomFormatter:()=>Nm,initDirectivesForSSR:()=>Aw,inject:()=>bt,isMemoSame:()=>_d,isProxy:()=>Us,isReactive:()=>Br,isReadonly:()=>wr,isRef:()=>We,isRuntimeOnly:()=>Hm,isShallow:()=>Mt,isVNode:()=>Ur,markRaw:()=>Ca,mergeDefaults:()=>Bu,mergeModels:()=>Zv,mergeProps:()=>ce,nextTick:()=>at,nodeOps:()=>kd,normalizeClass:()=>Ke,normalizeProps:()=>Ht,normalizeStyle:()=>mt,onActivated:()=>Eu,onBeforeMount:()=>Iu,onBeforeUnmount:()=>vs,onBeforeUpdate:()=>Pa,onDeactivated:()=>Au,onErrorCaptured:()=>Pu,onMounted:()=>Ue,onRenderTracked:()=>Du,onRenderTriggered:()=>$u,onScopeDispose:()=>Mi,onServerPrefetch:()=>Ru,onUnmounted:()=>Rt,onUpdated:()=>ao,onWatcherCleanup:()=>nu,openBlock:()=>I,patchProp:()=>Gd,popScopeId:()=>wv,provide:()=>Dn,proxyRefs:()=>_a,pushScopeId:()=>mv,queuePostFlushCb:()=>Ks,reactive:()=>Nr,readonly:()=>wt,ref:()=>F,registerRuntimeCompiler:()=>Om,render:()=>hf,renderList:()=>Xt,renderSlot:()=>Z,resolveComponent:()=>Bv,resolveDirective:()=>Fv,resolveDynamicComponent:()=>Rn,resolveFilter:()=>null,resolveTransitionHooks:()=>fs,setBlockTracking:()=>si,setDevtoolsHook:()=>jm,setTransitionHooks:()=>Vr,shallowReactive:()=>eu,shallowReadonly:()=>en,shallowRef:()=>Ze,ssrContextKey:()=>zu,ssrUtils:()=>Um,stop:()=>Pg,toDisplayString:()=>Re,toHandlerKey:()=>ns,toHandlers:()=>Mu,toRaw:()=>Me,toRef:()=>xa,toRefs:()=>ft,toValue:()=>_e,transformVNodeArgs:()=>km,triggerRef:()=>Qg,unref:()=>f,useAttrs:()=>Yv,useCssModule:()=>hw,useCssVars:()=>Qm,useHost:()=>Zd,useId:()=>Cu,useModel:()=>lm,useSSRContext:()=>Ku,useShadowRoot:()=>pw,useSlots:()=>qu,useTemplateRef:()=>Cv,useTransitionState:()=>ka,vModelCheckbox:()=>ul,vModelDynamic:()=>lf,vModelRadio:()=>dl,vModelSelect:()=>sf,vModelText:()=>li,vShow:()=>yo,version:()=>xd,warn:()=>Fm,watch:()=>Ie,watchEffect:()=>st,watchPostEffect:()=>Ua,watchSyncEffect:()=>Wu,withAsyncContext:()=>Qv,withCtx:()=>A,withDefaults:()=>Jv,withDirectives:()=>Yi,withKeys:()=>fl,withMemo:()=>Bm,withModifiers:()=>Cr,withScopeId:()=>yv},1),Iw=()=>{},Rw=2;const fr={CALL_HISTORY:"call_history",CONTACTS:"contacts",CONNECTIONS:"connections"},$w=(e="webphone_db")=>{const t=F(null),r=F(!1);return{initDB:()=>new Promise((l,c)=>{if(t.value){l();return}const u=indexedDB.open(e,Rw);u.onerror=d=>{console.error("IndexedDB error:",d),c(d)},u.onsuccess=d=>{t.value=d.target.result,r.value=!0,l()},u.onupgradeneeded=d=>{const p=d.target.result;p.objectStoreNames.contains(fr.CALL_HISTORY)||p.createObjectStore(fr.CALL_HISTORY,{keyPath:"id"}),p.objectStoreNames.contains(fr.CONTACTS)||p.createObjectStore(fr.CONTACTS,{keyPath:"number"}),p.objectStoreNames.contains(fr.CONNECTIONS)||p.createObjectStore(fr.CONNECTIONS,{keyPath:"id"})}}),getAll:l=>new Promise((c,u)=>{if(!t.value)return u("DB not initialized");const d=t.value.transaction([l],"readonly").objectStore(l).getAll();d.onsuccess=()=>c(d.result),d.onerror=()=>u(d.error)}),add:(l,c)=>new Promise((u,d)=>{if(!t.value)return d("DB not initialized");const p=t.value.transaction([l],"readwrite").objectStore(l).add(c);p.onsuccess=()=>u(),p.onerror=()=>d(p.error)}),put:(l,c)=>new Promise((u,d)=>{if(!t.value)return d("DB not initialized");const p=t.value.transaction([l],"readwrite").objectStore(l).put(c);p.onsuccess=()=>u(),p.onerror=()=>d(p.error)}),remove:(l,c)=>new Promise((u,d)=>{if(!t.value)return d("DB not initialized");const p=t.value.transaction([l],"readwrite").objectStore(l).delete(c);p.onsuccess=()=>u(),p.onerror=()=>d(p.error)}),isReady:r}},Dw=e=>{const t=F(!1),r=F(0),n=F(null),s=F([]),i=F([]),{initDB:o,getAll:a,add:l}=$w(e?.server&&e?.extension?`webphone_${e.server}_${e.extension}`.replace(/[^a-z0-9_]/gi,"_"):"webphone_db");o().then(async()=>{try{s.value=(await a(fr.CALL_HISTORY)).sort((be,Qe)=>Qe.startTime-be.startTime),i.value=await a(fr.CONTACTS)}catch(be){console.error("Error loading data from IndexedDB:",be)}});const c=F([{id:0,status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1},{id:1,status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1},{id:2,status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1}]),u=F(!0),d=F(""),p=F(!1),h=B(()=>c.value.find(be=>be.id===r.value)||c.value[0]),m=B(()=>h.value?.status||"idle"),w=B(()=>h.value?.remoteNumber||""),S=B(()=>h.value?.isMuted||!1),g=B(()=>h.value?.isHeld||!1),x=B({get:()=>h.value?.keypadValue||"",set:be=>{h.value&&(h.value.keypadValue=be)}}),y=be=>{t.value=be},b=be=>{c.value.some(Qe=>Qe.id===be)&&(r.value=be)},_=(be,Qe)=>{const Be=c.value.find(W=>W.id===be);Be&&Object.assign(Be,Qe)};return{isConnected:t,activeChannelId:r,channels:c,activeChannel:h,callStatus:m,remoteNumber:w,isMuted:S,isHeld:g,keypadValue:x,isKeypadVisible:u,lastDialedNumber:d,videoModeEnabled:p,transferInProgress:n,setConnected:y,setActiveChannelId:b,updateChannelState:_,setCallStatus:be=>{_(r.value,{status:be})},setIncomingCall:be=>{_(r.value,{remoteNumber:be})},resetCall:()=>{_(r.value,{status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1})},addCallLog:async be=>{const Qe={id:crypto.randomUUID(),...be};s.value.unshift(Qe);try{await l(fr.CALL_HISTORY,Qe)}catch(Be){console.error("Error saving call log:",Be)}},callHistory:s,contacts:i,addContact:async be=>{try{await l(fr.CONTACTS,be),i.value=await a(fr.CONTACTS)}catch(Qe){console.error("Error saving contact:",Qe)}},setMuted:be=>{_(r.value,{isMuted:be})},setHeld:be=>{_(r.value,{isHeld:be})},appendKeypad:be=>{x.value+=be},clearKeypad:()=>{x.value=""},backspaceKeypad:()=>{x.value=x.value.slice(0,-1)},toggleKeypad:()=>{u.value=!u.value},setLastDialedNumber:be=>{d.value=be},setTransferInProgress:be=>{n.value=be},toggleVideoMode:()=>{p.value=!p.value}}},Pw="0.21.1";var Nn=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}},hl=class extends Nn{constructor(e){super(e||"Unsupported content type.")}},gl=class extends Nn{constructor(e){super(e||"Request pending.")}},Ow=class extends Nn{constructor(e){super(e||"Unspecified session description handler error.")}},vl=class extends Nn{constructor(){super("The session has terminated.")}},ui=class extends Nn{constructor(e){super(e||"An error occurred during state transition.")}},Hw=class{constructor(e){this.incomingAckRequest=e}get request(){return this.incomingAckRequest.message}},Mw=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()}},qw=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})}},Nw=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()}},yf=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={}}},tr=class fg extends yf{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 fg(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}},un=class pg extends yf{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 pg(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 bf(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(c=>l.includes(c)).every(c=>i.parameters[c]===o.parameters[c])||!["user","ttl","method","transport"].every(c=>i.hasParam(c)&&o.hasParam(c)||!i.hasParam(c)&&!o.hasParam(c))||!["maddr"].every(c=>i.hasParam(c)&&o.hasParam(c)||!i.hasParam(c)&&!o.hasParam(c)))}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 Sf=class sa 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,sa.prototype):this.__proto__=sa.prototype,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,sa)}static buildMessage(t,r){function n(c){return c.charCodeAt(0).toString(16).toUpperCase()}function s(c){return c.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,u=>"\\x0"+n(u)).replace(/[\x10-\x1F\x7F-\x9F]/g,u=>"\\x"+n(u))}function i(c){return c.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,u=>"\\x0"+n(u)).replace(/[\x10-\x1F\x7F-\x9F]/g,u=>"\\x"+n(u))}function o(c){switch(c.type){case"literal":return'"'+s(c.text)+'"';case"class":const u=c.parts.map(d=>Array.isArray(d)?i(d[0])+"-"+i(d[1]):i(d));return"["+(c.inverted?"^":"")+u+"]";case"any":return"any character";case"end":return"end of input";case"other":return c.description}}function a(c){const u=c.map(o);let d,p;if(u.sort(),u.length>0){for(d=1,p=1;d<u.length;d++)u[d-1]!==u[d]&&(u[p]=u[d],p++);u.length=p}switch(u.length){case 1:return u[0];case 2:return u[0]+" or "+u[1];default:return u.slice(0,-1).join(", ")+", or "+u[u.length-1]}}function l(c){return c?'"'+s(c)+'"':"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," "),c=n[i.line-1],u=i.line===a.line?a.column:c.length+1;r+=`
7
7
  --> `+o+`
8
8
  `+l+` |
9
9
  `+i.line+" | "+c+`
10
10
  `+l+" | "+ml("",i.column-1," ")+ml("",u-i.column,"^")}else r+=`
11
11
  at `+o}return r}};function Bw(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
12
- `,v(`\r
13
- `,!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 un(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 un(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_\-]/,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",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]/,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,T){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),T===null?T=void 0:T=T[1],t.data.uri_params[S.toLowerCase()]=T},function(S,T){S=S.join("").toLowerCase(),T=T.join(""),t=t||{data:{}},t.data.uri_headers||(t.data.uri_headers={}),t.data.uri_headers[S]?t.data.uri_headers[S].push(T):t.data.uri_headers[S]=[T]},function(){t=t||{data:{}},t.startRule==="Refer_To"&&(t.data.uri=new un(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,T;for(t=t||{data:{}},T=t.data.multi_header.length,S=0;S<T;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 tr(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:C().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=t||{data:{}},t.data.params||(t.data.params={}),T===null?T=void 0:T=T[1],t.data.params[S.toLowerCase()]=T},"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 tr(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 tr(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,T;for(t=t||{data:{}},T=t.data.multi_header.length,S=0;S<T;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 tr(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:C().start.offset,parsed:S})},function(){t=t||{data:{}},t.data=new tr(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,T){return T},function(S,T){return O(S,T)},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 tr(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=[m('2 ""6 7!'),m('4"""5!7#'),m('4$""5!7%'),m(`4&""5!7'`),m(";'.# &;("),m('4(""5!7)'),m('4*""5!7+'),m('2,""6,7-'),m('2.""6.7/'),m('40""5!71'),m('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'),m(";).# &;,"),m('2F""6F7G.} &2H""6H7I.q &2J""6J7K.e &2L""6L7M.Y &2N""6N7O.M &2P""6P7Q.A &2R""6R7S.5 &2T""6T7U.) &2V""6V7W'),m(`%%2X""6X7Y/5#;#/,$;#/#$+#)(#'#("'#&'#/"!&,)`),m(`%%$;$0#*;$&/,#; /#$+")("'#&'#." &"/=#$;$/&#0#*;$&&&#/'$8":Z" )("'#&'#`),m(';.." &"'),m(`%$;'.# &;(0)*;'.# &;(&/?#28""6879/0$;//'$8#:[# )(#'#("'#&'#`),m(`%%$;2/&#0#*;2&&&#/g#$%$;.0#*;.&/,#;2/#$+")("'#&'#0=*%$;.0#*;.&/,#;2/#$+")("'#&'#&/#$+")("'#&'#/"!&,)`),m('4\\""5!7].# &;3'),m('4^""5!7_'),m('4`""5!7a'),m(';!.) &4b""5!7c'),m('%$;).• &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&&&#/"!&,)'),m('%$;).‰ &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&&&#/"!&,)'),m(`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.) &;'.# &;(`),m('%$;).ī &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&&&#/"!&,)'),m(`%;//?#2P""6P7Q/0$;//'$8#:t# )(#'#("'#&'#`),m(`%;//?#24""6475/0$;//'$8#:u# )(#'#("'#&'#`),m(`%;//?#2>""6>7?/0$;//'$8#:v# )(#'#("'#&'#`),m(`%;//?#2T""6T7U/0$;//'$8#:w# )(#'#("'#&'#`),m(`%;//?#2V""6V7W/0$;//'$8#:x# )(#'#("'#&'#`),m(`%2h""6h7i/0#;//'$8":y" )("'#&'#`),m(`%;//6#2f""6f7g/'$8":z" )("'#&'#`),m(`%;//?#2D""6D7E/0$;//'$8#:{# )(#'#("'#&'#`),m(`%;//?#22""6273/0$;//'$8#:|# )(#'#("'#&'#`),m(`%;//?#28""6879/0$;//'$8#:}# )(#'#("'#&'#`),m(`%;//0#;&/'$8":~" )("'#&'#`),m(`%;&/0#;//'$8":~" )("'#&'#`),m(`%;=/T#$;G.) &;K.# &;F0/*;G.) &;K.# &;F&/,$;>/#$+#)(#'#("'#&'#`),m('4""5!7€.A &4""5!7‚.5 &4ƒ""5!7„.) &;3.# &;.'),m(`%%;//Q#;&/H$$;J.# &;K0)*;J.# &;K&/,$;&/#$+$)($'#(#'#("'#&'#/"!&,)`),m(`%;//]#;&/T$%$;J.# &;K0)*;J.# &;K&/"!&,)/1$;&/($8$:…$!!)($'#(#'#("'#&'#`),m(';..G &2L""6L7M.; &4†""5!7‡./ &4ƒ""5!7„.# &;3'),m(`%2j""6j7k/J#4ˆ""5!7‰.5 &4Š""5!7‹.) &4Œ""5!7/#$+")("'#&'#`),m(`%;N/M#28""6879/>$;O." &"/0$;S/'$8$:Ž$ )($'#(#'#("'#&'#`),m(`%;N/d#28""6879/U$;O." &"/G$;S/>$;_/5$;l." &"/'$8&:& )(&'#(%'#($'#(#'#("'#&'#`),m(`%3""5$7‘.) &3’""5#7“/' 8!:”!! )`),m(`%;P/]#%28""6879/,#;R/#$+")("'#&'#." &"/6$2:""6:7;/'$8#:•# )(#'#("'#&'#`),m("$;+.) &;-.# &;Q/2#0/*;+.) &;-.# &;Q&&&#"),m('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'),m('%$;+._ &;-.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!:–! )'),m(`%;T/J#%28""6879/,#;^/#$+")("'#&'#." &"/#$+")("'#&'#`),m("%;U.) &;\\.# &;X/& 8!:—! )"),m(`%$%;V/2#2J""6J7K/#$+")("'#&'#0<*%;V/2#2J""6J7K/#$+")("'#&'#&/D#;W/;$2J""6J7K." &"/'$8#:˜# )(#'#("'#&'#`),m('$4™""5!7š/,#0)*4™""5!7š&&&#'),m(`%4$""5!7%/?#$4›""5!7œ0)*4›""5!7œ&/#$+")("'#&'#`),m(`%2l""6l7m/?#;Y/6$2n""6n7o/'$8#:# )(#'#("'#&'#`),m(`%%;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!: ! )`),m(`%;#/M#;#." &"/?$;#." &"/1$;#." &"/#$+$)($'#(#'#("'#&'#`),m(`%;Z/;#28""6879/,$;Z/#$+#)(#'#("'#&'#.# &;\\`),m(`%;]/o#2J""6J7K/\`$;]/W$2J""6J7K/H$;]/?$2J""6J7K/0$;]/'$8':¡' )(''#(&'#(%'#($'#(#'#("'#&'#`),m(`%2¢""6¢7£/2#4¤""5!7¥/#$+")("'#&'#.˜ &%2¦""6¦7§/;#4¨""5!7©/,$;!/#$+#)(#'#("'#&'#.j &%2ª""6ª7«/5#;!/,$;!/#$+#)(#'#("'#&'#.B &%4¬""5!7­/,#;!/#$+")("'#&'#.# &;!`),m(`%%;!." &"/[#;!." &"/M$;!." &"/?$;!." &"/1$;!." &"/#$+%)(%'#($'#(#'#("'#&'#/' 8!:®!! )`),m(`$%22""6273/,#;\`/#$+")("'#&'#0<*%22""6273/,#;\`/#$+")("'#&'#&`),m(";a.A &;b.; &;c.5 &;d./ &;e.) &;f.# &;g"),m(`%3¯""5*7°/a#3±""5#7².G &3³""5#7´.; &3µ""5$7¶./ &3·""5#7¸.# &;6/($8":¹"! )("'#&'#`),m(`%3º""5%7»/I#3¼""5%7½./ &3¾""5"7¿.# &;6/($8":À"! )("'#&'#`),m(`%3Á""5'7Â/1#;/($8":Ã"! )("'#&'#`),m(`%3Ä""5$7Å/1#;ð/($8":Æ"! )("'#&'#`),m(`%3Ç""5&7È/1#;T/($8":É"! )("'#&'#`),m(`%3Ê""5"7Ë/N#%2>""6>7?/,#;6/#$+")("'#&'#." &"/'$8":Ì" )("'#&'#`),m(`%;h/P#%2>""6>7?/,#;i/#$+")("'#&'#." &"/)$8":Í""! )("'#&'#`),m('%$;j/&#0#*;j&&&#/"!&,)'),m('%$;j/&#0#*;j&&&#/"!&,)'),m(";k.) &;+.# &;-"),m('2l""6l7m.e &2n""6n7o.Y &24""6475.M &28""6879.A &2<""6<7=.5 &2@""6@7A.) &2B""6B7C'),m(`%26""6677/n#;m/e$$%2<""6<7=/,#;m/#$+")("'#&'#0<*%2<""6<7=/,#;m/#$+")("'#&'#&/#$+#)(#'#("'#&'#`),m(`%;n/A#2>""6>7?/2$;o/)$8#:Î#"" )(#'#("'#&'#`),m("$;p.) &;+.# &;-/2#0/*;p.) &;+.# &;-&&&#"),m("$;p.) &;+.# &;-0/*;p.) &;+.# &;-&"),m('2l""6l7m.e &2n""6n7o.Y &24""6475.M &26""6677.A &28""6879.5 &2@""6@7A.) &2B""6B7C'),m(";‘.# &;r"),m(`%;/G#;'/>$;s/5$;'/,$;„/#$+%)(%'#($'#(#'#("'#&'#`),m(";M.# &;t"),m(`%;/E#28""6879/6$;u.# &;x/'$8#:Ï# )(#'#("'#&'#`),m(`%;v.# &;w/J#%26""6677/,#;ƒ/#$+")("'#&'#." &"/#$+")("'#&'#`),m(`%2Ð""6Ð7Ñ/:#;€/1$;w." &"/#$+#)(#'#("'#&'#`),m(`%24""6475/,#;{/#$+")("'#&'#`),m(`%;z/3#$;y0#*;y&/#$+")("'#&'#`),m(";*.) &;+.# &;-"),m(';+. &;-.‰ &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'),m(`%;|/e#$%24""6475/,#;|/#$+")("'#&'#0<*%24""6475/,#;|/#$+")("'#&'#&/#$+")("'#&'#`),m(`%$;~0#*;~&/e#$%22""6273/,#;}/#$+")("'#&'#0<*%22""6273/,#;}/#$+")("'#&'#&/#$+")("'#&'#`),m("$;~0#*;~&"),m(';+.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'),m(`%%;"/‡#$;".G &;!.A &2@""6@7A.5 &2F""6F7G.) &2J""6J7K0M*;".G &;!.A &2@""6@7A.5 &2F""6F7G.) &2J""6J7K&/#$+")("'#&'#/& 8!:Ò! )`),m(";.# &;‚"),m(`%%;O/2#2:""6:7;/#$+")("'#&'#." &"/,#;S/#$+")("'#&'#." &"`),m('$;+.ƒ &;-.} &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&&&#'),m("$;y0#*;y&"),m(`%3’""5#7Ó/q#24""6475/b$$;!/&#0#*;!&&&#/L$2J""6J7K/=$$;!/&#0#*;!&&&#/'$8%:Ô% )(%'#($'#(#'#("'#&'#`),m('2Õ""6Õ7Ö'),m('2×""6×7Ø'),m('2Ù""6Ù7Ú'),m('2Û""6Û7Ü'),m('2Ý""6Ý7Þ'),m('2ß""6ß7à'),m('2á""6á7â'),m('2ã""6ã7ä'),m('2å""6å7æ'),m('2ç""6ç7è'),m('2é""6é7ê'),m("%;….Y &;†.S &;ˆ.M &;‰.G &;Š.A &;‹.; &;Œ.5 &;./ &;.) &;Ž.# &;6/& 8!:ë! )"),m(`%;„/G#;'/>$;’/5$;'/,$;”/#$+%)(%'#($'#(#'#("'#&'#`),m("%;“/' 8!:ì!! )"),m(`%;!/5#;!/,$;!/#$+#)(#'#("'#&'#`),m("%$;*.A &;+.; &;-.5 &;3./ &;4.) &;'.# &;(0G*;*.A &;+.; &;-.5 &;3./ &;4.) &;'.# &;(&/& 8!:í! )"),m(`%;¶/Y#$%;A/,#;¶/#$+")("'#&'#06*%;A/,#;¶/#$+")("'#&'#&/#$+")("'#&'#`),m(`%;9/N#%2:""6:7;/,#;9/#$+")("'#&'#." &"/'$8":î" )("'#&'#`),m(`%;:.c &%;˜/Y#$%;A/,#;˜/#$+")("'#&'#06*%;A/,#;˜/#$+")("'#&'#&/#$+")("'#&'#/& 8!:ï! )`),m(`%;L.# &;™/]#$%;B/,#;›/#$+")("'#&'#06*%;B/,#;›/#$+")("'#&'#&/'$8":ð" )("'#&'#`),m(`%;š." &"/>#;@/5$;M/,$;?/#$+$)($'#(#'#("'#&'#`),m(`%%;6/Y#$%;./,#;6/#$+")("'#&'#06*%;./,#;6/#$+")("'#&'#&/#$+")("'#&'#.# &;H/' 8!:ñ!! )`),m(";œ.) &;.# &; "),m(`%3ò""5!7ó/:#;</1$;Ÿ/($8#:ô#! )(#'#("'#&'#`),m(`%3õ""5'7ö/:#;</1$;ž/($8#:÷#! )(#'#("'#&'#`),m("%$;!/&#0#*;!&&&#/' 8!:ø!! )"),m(`%2ù""6ù7ú/o#%2J""6J7K/M#;!." &"/?$;!." &"/1$;!." &"/#$+$)($'#(#'#("'#&'#." &"/'$8":û" )("'#&'#`),m(`%;6/J#%;</,#;¡/#$+")("'#&'#." &"/)$8":ü""! )("'#&'#`),m(";6.) &;T.# &;H"),m(`%;£/Y#$%;B/,#;¤/#$+")("'#&'#06*%;B/,#;¤/#$+")("'#&'#&/#$+")("'#&'#`),m(`%3ý""5&7þ.G &3ÿ""5'7Ā.; &3ā""5$7Ă./ &3ă""5%7Ą.# &;6/& 8!:ą! )`),m(";¥.# &; "),m(`%3Ć""5(7ć/M#;</D$3Ĉ""5(7ĉ./ &3Ċ""5(7ċ.# &;6/#$+#)(#'#("'#&'#`),m(`%;6/Y#$%;A/,#;6/#$+")("'#&'#06*%;A/,#;6/#$+")("'#&'#&/#$+")("'#&'#`),m("%$;!/&#0#*;!&&&#/' 8!:Č!! )"),m("%;©/& 8!:č! )"),m(`%;ª/k#;;/b$;¯/Y$$%;B/,#;°/#$+")("'#&'#06*%;B/,#;°/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),m(";«.# &;¬"),m('3Ď""5$7ď.S &3Đ""5%7đ.G &3Ē""5%7ē.; &3Ĕ""5%7ĕ./ &3Ė""5+7ė.# &;­'),m(`3Ę""5'7ę./ &3Ě""5)7ě.# &;­`),m(";6.# &;®"),m(`%3Ĝ""5"7ĝ/,#;6/#$+")("'#&'#`),m(";­.# &;6"),m(`%;6/5#;</,$;±/#$+#)(#'#("'#&'#`),m(";6.# &;H"),m(`%;³/5#;./,$;/#$+#)(#'#("'#&'#`),m("%$;!/&#0#*;!&&&#/' 8!:Ğ!! )"),m("%;ž/' 8!:ğ!! )"),m(`%;¶/^#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/($8":Ġ"!!)("'#&'#`),m(`%%;7/e#$%2J""6J7K/,#;7/#$+")("'#&'#0<*%2J""6J7K/,#;7/#$+")("'#&'#&/#$+")("'#&'#/"!&,)`),m(`%;L.# &;™/]#$%;B/,#;¸/#$+")("'#&'#06*%;B/,#;¸/#$+")("'#&'#&/'$8":ġ" )("'#&'#`),m(";¹.# &; "),m(`%3Ģ""5#7ģ/:#;</1$;6/($8#:Ĥ#! )(#'#("'#&'#`),m("%$;!/&#0#*;!&&&#/' 8!:ĥ!! )"),m("%;ž/' 8!:Ħ!! )"),m(`%$;š0#*;š&/x#;@/o$;M/f$;?/]$$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/'$8%:ħ% )(%'#($'#(#'#("'#&'#`),m(";¾"),m(`%3Ĩ""5&7ĩ/k#;./b$;Á/Y$$%;A/,#;Á/#$+")("'#&'#06*%;A/,#;Á/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#.# &;¿`),m(`%;6/k#;./b$;À/Y$$%;A/,#;À/#$+")("'#&'#06*%;A/,#;À/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),m(`%;6/;#;</2$;6.# &;H/#$+#)(#'#("'#&'#`),m(";Â.G &;Ä.A &;Æ.; &;È.5 &;É./ &;Ê.) &;Ë.# &;À"),m(`%3Ī""5%7ī/5#;</,$;Ã/#$+#)(#'#("'#&'#`),m("%;I/' 8!:Ĭ!! )"),m(`%3ĭ""5&7Į/—#;</Ž$;D/…$;Å/|$$%$;'/&#0#*;'&&&#/,#;Å/#$+")("'#&'#0C*%$;'/&#0#*;'&&&#/,#;Å/#$+")("'#&'#&/,$;E/#$+&)(&'#(%'#($'#(#'#("'#&'#`),m(";t.# &;w"),m(`%3į""5%7İ/5#;</,$;Ç/#$+#)(#'#("'#&'#`),m("%;I/' 8!:ı!! )"),m(`%3IJ""5&7ij/:#;</1$;I/($8#:Ĵ#! )(#'#("'#&'#`),m(`%3ĵ""5%7Ķ/]#;</T$%3ķ""5$7ĸ/& 8!:Ĺ! ).4 &%3ĺ""5%7Ļ/& 8!:ļ! )/#$+#)(#'#("'#&'#`),m(`%3Ľ""5)7ľ/R#;</I$3Ŀ""5#7ŀ./ &3Ł""5(7ł.# &;6/($8#:Ń#! )(#'#("'#&'#`),m(`%3ń""5#7Ņ/“#;</Š$;D/$%;Ì/e#$%2D""6D7E/,#;Ì/#$+")("'#&'#0<*%2D""6D7E/,#;Ì/#$+")("'#&'#&/#$+")("'#&'#/,$;E/#$+%)(%'#($'#(#'#("'#&'#`),m(`%3ņ""5(7Ň./ &3ň""5$7ʼn.# &;6/' 8!:Ŋ!! )`),m(`%;6/Y#$%;A/,#;6/#$+")("'#&'#06*%;A/,#;6/#$+")("'#&'#&/#$+")("'#&'#`),m(`%;Ï/G#;./>$;Ï/5$;./,$;/#$+%)(%'#($'#(#'#("'#&'#`),m("%$;!/&#0#*;!&&&#/' 8!:ŋ!! )"),m(`%;Ñ/]#$%;A/,#;Ñ/#$+")("'#&'#06*%;A/,#;Ñ/#$+")("'#&'#&/'$8":Ō" )("'#&'#`),m(`%;™/]#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/'$8":ō" )("'#&'#`),m(`%;L.O &;™.I &%;@." &"/:#;t/1$;?." &"/#$+#)(#'#("'#&'#/]#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/'$8":Ŏ" )("'#&'#`),m(`%;Ô/]#$%;B/,#;Õ/#$+")("'#&'#06*%;B/,#;Õ/#$+")("'#&'#&/'$8":ŏ" )("'#&'#`),m("%;–/& 8!:Ő! )"),m(`%3ő""5(7Œ/:#;</1$;6/($8#:œ#! )(#'#("'#&'#.g &%3Ŕ""5&7ŕ/:#;</1$;6/($8#:Ŗ#! )(#'#("'#&'#.: &%3ŗ""5*7Ř/& 8!:ř! ).# &; `),m(`%%;6/k#$%;A/2#;6/)$8":Ś""$ )("'#&'#0<*%;A/2#;6/)$8":Ś""$ )("'#&'#&/)$8":ś""! )("'#&'#." &"/' 8!:Ŝ!! )`),m(`%;Ø/Y#$%;A/,#;Ø/#$+")("'#&'#06*%;A/,#;Ø/#$+")("'#&'#&/#$+")("'#&'#`),m(`%;™/Y#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/#$+")("'#&'#`),m("%$;!/&#0#*;!&&&#/' 8!:ŝ!! )"),m(`%;Û/Y#$%;B/,#;Ü/#$+")("'#&'#06*%;B/,#;Ü/#$+")("'#&'#&/#$+")("'#&'#`),m(`%3Ş""5&7ş.; &3Š""5'7š./ &3Ţ""5*7ţ.# &;6/& 8!:Ť! )`),m(`%3ť""5&7Ŧ/:#;</1$;Ý/($8#:ŧ#! )(#'#("'#&'#.} &%3õ""5'7ö/:#;</1$;ž/($8#:Ũ#! )(#'#("'#&'#.P &%3ũ""5+7Ū/:#;</1$;ž/($8#:ū#! )(#'#("'#&'#.# &; `),m(`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`),m(';1." &"'),m(`%%;6/k#$%;A/2#;6/)$8":Ś""$ )("'#&'#0<*%;A/2#;6/)$8":Ś""$ )("'#&'#&/)$8":ś""! )("'#&'#." &"/' 8!:ź!! )`),m(`%;L.# &;™/]#$%;B/,#;á/#$+")("'#&'#06*%;B/,#;á/#$+")("'#&'#&/'$8":Ż" )("'#&'#`),m(";¹.# &; "),m(`%;ã/Y#$%;A/,#;ã/#$+")("'#&'#06*%;A/,#;ã/#$+")("'#&'#&/#$+")("'#&'#`),m(`%;ê/k#;./b$;í/Y$$%;B/,#;ä/#$+")("'#&'#06*%;B/,#;ä/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),m(";å.; &;æ.5 &;ç./ &;è.) &;é.# &; "),m(`%3ż""5#7Ž/:#;</1$;ð/($8#:ž#! )(#'#("'#&'#`),m(`%3ſ""5%7ƀ/:#;</1$;T/($8#:Ɓ#! )(#'#("'#&'#`),m(`%3Ƃ""5(7ƃ/F#;</=$;\\.) &;Y.# &;X/($8#:Ƅ#! )(#'#("'#&'#`),m(`%3ƅ""5&7Ɔ/:#;</1$;6/($8#:Ƈ#! )(#'#("'#&'#`),m(`%3ƈ""5%7Ɖ/A#;</8$$;!0#*;!&/($8#:Ɗ#! )(#'#("'#&'#`),m(`%;ë/G#;;/>$;6/5$;;/,$;ì/#$+%)(%'#($'#(#'#("'#&'#`),m(`%3’""5#7Ó.# &;6/' 8!:Ƌ!! )`),m(`%3±""5#7ƌ.G &3³""5#7ƍ.; &3·""5#7Ǝ./ &3µ""5$7Ə.# &;6/' 8!:Ɛ!! )`),m(`%;î/D#%;C/,#;ï/#$+")("'#&'#." &"/#$+")("'#&'#`),m("%;U.) &;\\.# &;X/& 8!:Ƒ! )"),m(`%%;!." &"/[#;!." &"/M$;!." &"/?$;!." &"/1$;!." &"/#$+%)(%'#($'#(#'#("'#&'#/' 8!:ƒ!! )`),m(`%%;!/?#;!." &"/1$;!." &"/#$+#)(#'#("'#&'#/' 8!:Ɠ!! )`),m(";¾"),m(`%;ž/^#$%;B/,#;ó/#$+")("'#&'#06*%;B/,#;ó/#$+")("'#&'#&/($8":Ɣ"!!)("'#&'#`),m(";ô.# &; "),m(`%2ƕ""6ƕ7Ɩ/L#;</C$2Ɨ""6Ɨ7Ƙ.) &2ƙ""6ƙ7ƚ/($8#:ƛ#! )(#'#("'#&'#`),m(`%;ž/^#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/($8":Ɯ"!!)("'#&'#`),m(`%;6/5#;0/,$;÷/#$+#)(#'#("'#&'#`),m("$;2.) &;4.# &;.0/*;2.) &;4.# &;.&"),m("$;%0#*;%&"),m(`%;ú/;#28""6879/,$;û/#$+#)(#'#("'#&'#`),m(`%3Ɲ""5%7ƞ.) &3Ɵ""5$7Ơ/' 8!:ơ!! )`),m(`%;ü/J#%28""6879/,#;^/#$+")("'#&'#." &"/#$+")("'#&'#`),m("%;\\.) &;X.# &;‚/' 8!:Ƣ!! )"),m(';".S &;!.M &2F""6F7G.A &2J""6J7K.5 &2H""6H7I.) &2N""6N7O'),m('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?'),m(`%;Ā/b#28""6879/S$;û/J$%2ƣ""6ƣ7Ƥ/,#;ì/#$+")("'#&'#." &"/#$+$)($'#(#'#("'#&'#`),m(`%3ƥ""5%7Ʀ.) &3Ƨ""5$7ƨ/' 8!:ơ!! )`),m(`%3±""5#7².6 &3³""5#7´.* &$;+0#*;+&/' 8!:Ʃ!! )`),m(`%;Ą/‡#2F""6F7G/x$;ă/o$2F""6F7G/\`$;ă/W$2F""6F7G/H$;ă/?$2F""6F7G/0$;ą/'$8):ƪ) )()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#`),m(`%;#/>#;#/5$;#/,$;#/#$+$)($'#(#'#("'#&'#`),m(`%;ă/,#;ă/#$+")("'#&'#`),m(`%;ă/5#;ă/,$;ă/#$+#)(#'#("'#&'#`),m(`%;q/T#$;m0#*;m&/D$%; /,#;ø/#$+")("'#&'#." &"/#$+#)(#'#("'#&'#`),m(`%2ƫ""6ƫ7Ƭ.) &2ƭ""6ƭ7Ʈ/w#;0/n$;Ĉ/e$$%;B/2#;ĉ.# &; /#$+")("'#&'#0<*%;B/2#;ĉ.# &; /#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),m(";™.# &;L"),m(`%2Ư""6Ư7ư/5#;</,$;Ċ/#$+#)(#'#("'#&'#`),m(`%;D/S#;,/J$2:""6:7;/;$;,.# &;T/,$;E/#$+%)(%'#($'#(#'#("'#&'#`)];let l=0,c=0;const u=[{line:1,column:1}];let d=0,p=[],h=0,g;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(c,l)}function C(){return _(c,l)}function v(S,T){return{type:"literal",text:S,ignoreCase:T}}function x(S,T,E){return{type:"class",parts:S,inverted:T,ignoreCase:E}}function y(){return{type:"end"}}function b(S){let T=u[S],E;if(T)return T;for(E=S-1;!u[E];)E--;for(T=u[E],T={line:T.line,column:T.column};E<S;)e.charCodeAt(E)===10?(T.line++,T.column=1):T.column++,E++;return u[S]=T,T}function _(S,T){const E=b(S),M=b(T);return{source:n,start:{offset:S,line:E.line,column:E.column},end:{offset:T,line:M.line,column:M.column}}}function $(S){l<d||(l>d&&(d=l,p=[]),p.push(S))}function R(S,T,E){return new Sf(Sf.buildMessage(S,T),S,T,E)}function m(S){return S.split("").map(T=>T.charCodeAt(0)-32)}function P(S){const T=a[S];let E=0;const M=[];let j=T.length;const z=[],J=[];let U;for(;;){for(;E<j;)switch(T[E]){case 0:J.push(o[T[E+1]]),E+=2;break;case 1:J.push(void 0),E++;break;case 2:J.push(null),E++;break;case 3:J.push(r),E++;break;case 4:J.push([]),E++;break;case 5:J.push(l),E++;break;case 6:J.pop(),E++;break;case 7:l=J.pop(),E++;break;case 8:J.length-=T[E+1],E+=2;break;case 9:J.splice(-2,1),E++;break;case 10:J[J.length-2].push(J.pop()),E++;break;case 11:J.push(J.splice(J.length-T[E+1],T[E+1])),E+=2;break;case 12:J.push(e.substring(J.pop(),l)),E++;break;case 13:z.push(j),M.push(E+3+T[E+1]+T[E+2]),J[J.length-1]?(j=E+3+T[E+1],E+=3):(j=E+3+T[E+1]+T[E+2],E+=3+T[E+1]);break;case 14:z.push(j),M.push(E+3+T[E+1]+T[E+2]),J[J.length-1]===r?(j=E+3+T[E+1],E+=3):(j=E+3+T[E+1]+T[E+2],E+=3+T[E+1]);break;case 15:z.push(j),M.push(E+3+T[E+1]+T[E+2]),J[J.length-1]!==r?(j=E+3+T[E+1],E+=3):(j=E+3+T[E+1]+T[E+2],E+=3+T[E+1]);break;case 16:J[J.length-1]!==r?(z.push(j),M.push(E),j=E+2+T[E+1],E+=2):E+=2+T[E+1];break;case 17:z.push(j),M.push(E+3+T[E+1]+T[E+2]),e.length>l?(j=E+3+T[E+1],E+=3):(j=E+3+T[E+1]+T[E+2],E+=3+T[E+1]);break;case 18:z.push(j),M.push(E+4+T[E+2]+T[E+3]),e.substr(l,o[T[E+1]].length)===o[T[E+1]]?(j=E+4+T[E+2],E+=4):(j=E+4+T[E+2]+T[E+3],E+=4+T[E+2]);break;case 19:z.push(j),M.push(E+4+T[E+2]+T[E+3]),e.substr(l,o[T[E+1]].length).toLowerCase()===o[T[E+1]]?(j=E+4+T[E+2],E+=4):(j=E+4+T[E+2]+T[E+3],E+=4+T[E+2]);break;case 20:z.push(j),M.push(E+4+T[E+2]+T[E+3]),o[T[E+1]].test(e.charAt(l))?(j=E+4+T[E+2],E+=4):(j=E+4+T[E+2]+T[E+3],E+=4+T[E+2]);break;case 21:J.push(e.substr(l,T[E+1])),l+=T[E+1],E+=2;break;case 22:J.push(o[T[E+1]]),l+=o[T[E+1]].length,E+=2;break;case 23:J.push(r),h===0&&$(o[T[E+1]]),E+=2;break;case 24:c=J[J.length-1-T[E+1]],E+=2;break;case 25:c=l,E++;break;case 26:U=T.slice(E+4,E+4+T[E+3]).map(function(Te){return J[J.length-1-Te]}),J.splice(J.length-T[E+2],T[E+2],o[T[E+1]].apply(null,U)),E+=4+T[E+3];break;case 27:J.push(P(T[E+1])),E+=2;break;case 28:h++,E++;break;case 29:h--,E++;break;default:throw new Error("Invalid opcode: "+T[E]+".")}if(z.length>0)j=z.pop(),E=M.pop();else break}return J[0]}t.data={};function O(S,T){return[S].concat(T)}if(g=P(i),g!==r&&l===e.length)return g;throw g!==r&&l<e.length&&$(y()),R(p,d<e.length?e.charAt(d):null,d<e.length?_(d,d+1):_(d,d))}const Fw=Bw;var ut;(function(e){function t(s,i){const o={startRule:i};try{Fw(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})(ut=ut||(ut={}));var Lw={100:"Trying",180:"Ringing",181:"Call Is Being Forwarded",182:"Queued",183:"Session Progress",199:"Early Dialog Terminated",200:"OK",202:"Accepted",204:"No Notification",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",305:"Use Proxy",380:"Alternative Service",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",410:"Gone",412:"Conditional Request Failed",413:"Request Entity Too Large",414:"Request-URI Too Long",415:"Unsupported Media Type",416:"Unsupported URI Scheme",417:"Unknown Resource-Priority",420:"Bad Extension",421:"Extension Required",422:"Session Interval Too Small",423:"Interval Too Brief",428:"Use Identity Header",429:"Provide Referrer Identity",430:"Flow Failed",433:"Anonymity Disallowed",436:"Bad Identity-Info",437:"Unsupported Certificate",438:"Invalid Identity Header",439:"First Hop Lacks Outbound Support",440:"Max-Breadth Exceeded",469:"Bad Info Package",470:"Consent Needed",478:"Unresolvable Destination",480:"Temporarily Unavailable",481:"Call/Transaction Does Not Exist",482:"Loop Detected",483:"Too Many Hops",484:"Address Incomplete",485:"Ambiguous",486:"Busy Here",487:"Request Terminated",488:"Not Acceptable Here",489:"Bad Event",491:"Request Pending",493:"Undecipherable",494:"Security Agreement Required",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Server Time-out",505:"Version Not Supported",513:"Message Too Large",580:"Precondition Failure",600:"Busy Everywhere",603:"Decline",604:"Does Not Exist Anywhere",606:"Not Acceptable"};function Bn(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 xo(e){return Lw[e]||""}function To(){return Bn(10)}function _r(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 Cf=class{constructor(){this.headers={}}addHeader(e,t){const r={raw:t};e=_r(e),this.headers[e]?this.headers[e].push(r):this.headers[e]=[r]}getHeader(e){const t=this.headers[_r(e)];if(t){if(t[0])return t[0].raw}else return}getHeaders(e){const t=this.headers[_r(e)],r=[];if(!t)return[];for(const n of t)r.push(n.raw);return r}hasHeader(e){return!!this.headers[_r(e)]}parseHeader(e,t=0){if(e=_r(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=ut.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[_r(e)]=[{raw:t}]}toString(){return this.data}},Ss=class extends Cf{constructor(){super()}},dn=class extends Cf{constructor(){super()}},wl=class ia{constructor(t,r,n,s,i,o,a){this.headers={},this.extraHeaders=[],this.options=ia.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:To(),this.from=ia.makeNameAddrHeader(this.fromURI,this.options.fromDisplayName,this.fromTag),this.toURI=s.clone(),this.toTag=this.options.toTag,this.to=ia.makeNameAddrHeader(this.toURI,this.options.toDisplayName,this.toTag),this.callId=this.options.callId?this.options.callId:this.options.callIdPrefix+Bn(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 tr(t,r,s)}getHeader(t){const r=this.headers[_r(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[_r(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[_r(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[_r(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
+ `,g(`\r
13
+ `,!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)," ",g(" ",!1)," ",g(" ",!1),/^[a-zA-Z0-9]/,x([["a","z"],["A","Z"],["0","9"]],!1,!1),";",g(";",!1),"/",g("/",!1),"?",g("?",!1),":",g(":",!1),"@",g("@",!1),"&",g("&",!1),"=",g("=",!1),"+",g("+",!1),"$",g("$",!1),",",g(",",!1),"-",g("-",!1),"_",g("_",!1),".",g(".",!1),"!",g("!",!1),"~",g("~",!1),"*",g("*",!1),"'",g("'",!1),"(",g("(",!1),")",g(")",!1),"%",g("%",!1),function(){return" "},function(){return":"},/^[!-~]/,x([["!","~"]],!1,!1),/^[\x80-\uFFFF]/,x([["€","￿"]],!1,!1),/^[\x80-\xBF]/,x([["€","¿"]],!1,!1),/^[a-f]/,x([["a","f"]],!1,!1),"`",g("`",!1),"<",g("<",!1),">",g(">",!1),"\\",g("\\",!1),"[",g("[",!1),"]",g("]",!1),"{",g("{",!1),"}",g("}",!1),function(){return"*"},function(){return"/"},function(){return"="},function(){return"("},function(){return")"},function(){return">"},function(){return"<"},function(){return","},function(){return";"},function(){return":"},function(){return'"'},/^[!-']/,x([["!","'"]],!1,!1),/^[*-[]/,x([["*","["]],!1,!1),/^[\]-~]/,x([["]","~"]],!1,!1),function(C){return C},/^[#-[]/,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 un(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 un(t.data.scheme,t.data.user,t.data.host,t.data.port,t.data.uri_params,t.data.uri_headers),delete t.data.scheme,delete t.data.user,delete t.data.host,delete t.data.host_type,delete t.data.port,delete t.data.uri_params,t.startRule==="SIP_URI"&&(t.data=t.data.uri)},"sips",g("sips",!0),"sip",g("sip",!0),function(C){t=t||{data:{}},t.data.scheme=C},function(){t=t||{data:{}},t.data.user=decodeURIComponent(w().slice(0,-1))},function(){t=t||{data:{}},t.data.password=w()},function(){return t=t||{data:{}},t.data.host=w(),t.data.host},function(){return t=t||{data:{}},t.data.host_type="domain",w()},/^[a-zA-Z0-9_\-]/,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",w()},"::",g("::",!1),function(){return t=t||{data:{}},t.data.host_type="IPv6",w()},function(){return t=t||{data:{}},t.data.host_type="IPv4",w()},"25",g("25",!1),/^[0-5]/,x([["0","5"]],!1,!1),"2",g("2",!1),/^[0-4]/,x([["0","4"]],!1,!1),"1",g("1",!1),/^[1-9]/,x([["1","9"]],!1,!1),function(C){return t=t||{data:{}},C=parseInt(C.join("")),t.data.port=C,C},"transport=",g("transport=",!0),"udp",g("udp",!0),"tcp",g("tcp",!0),"sctp",g("sctp",!0),"tls",g("tls",!0),function(C){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.transport=C.toLowerCase()},"user=",g("user=",!0),"phone",g("phone",!0),"ip",g("ip",!0),function(C){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.user=C.toLowerCase()},"method=",g("method=",!0),function(C){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.method=C},"ttl=",g("ttl=",!0),function(C){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.ttl=C},"maddr=",g("maddr=",!0),function(C){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.maddr=C},"lr",g("lr",!0),function(){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.lr=void 0},function(C,T){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),T===null?T=void 0:T=T[1],t.data.uri_params[C.toLowerCase()]=T},function(C,T){C=C.join("").toLowerCase(),T=T.join(""),t=t||{data:{}},t.data.uri_headers||(t.data.uri_headers={}),t.data.uri_headers[C]?t.data.uri_headers[C].push(T):t.data.uri_headers[C]=[T]},function(){t=t||{data:{}},t.startRule==="Refer_To"&&(t.data.uri=new un(t.data.scheme,t.data.user,t.data.host,t.data.port,t.data.uri_params,t.data.uri_headers),delete t.data.scheme,delete t.data.user,delete t.data.host,delete t.data.host_type,delete t.data.port,delete t.data.uri_params)},"//",g("//",!1),function(){t=t||{data:{}},t.data.scheme=w()},g("SIP",!0),function(){t=t||{data:{}},t.data.sip_version=w()},"INVITE",g("INVITE",!1),"ACK",g("ACK",!1),"VXACH",g("VXACH",!1),"OPTIONS",g("OPTIONS",!1),"BYE",g("BYE",!1),"CANCEL",g("CANCEL",!1),"REGISTER",g("REGISTER",!1),"SUBSCRIBE",g("SUBSCRIBE",!1),"NOTIFY",g("NOTIFY",!1),"REFER",g("REFER",!1),"PUBLISH",g("PUBLISH",!1),function(){return t=t||{data:{}},t.data.method=w(),t.data.method},function(C){t=t||{data:{}},t.data.status_code=parseInt(C.join(""))},function(){t=t||{data:{}},t.data.reason_phrase=w()},function(){t=t||{data:{}},t.data=w()},function(){var C,T;for(t=t||{data:{}},T=t.data.multi_header.length,C=0;C<T;C++)if(t.data.multi_header[C].parsed===null){t.data=null;break}t.data!==null?t.data=t.data.multi_header:t.data=-1},function(){var C;t=t||{data:{}},t.data.multi_header||(t.data.multi_header=[]);try{C=new tr(t.data.uri,t.data.displayName,t.data.params),delete t.data.uri,delete t.data.displayName,delete t.data.params}catch{C=null}t.data.multi_header.push({position:l,offset:S().start.offset,parsed:C})},function(C){C=w().trim(),C[0]==='"'&&(C=C.substring(1,C.length-1)),t=t||{data:{}},t.data.displayName=C},"q",g("q",!0),function(C){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.q=C},"expires",g("expires",!0),function(C){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.expires=C},function(C){return parseInt(C.join(""))},"0",g("0",!1),function(){return parseFloat(w())},function(C,T){t=t||{data:{}},t.data.params||(t.data.params={}),T===null?T=void 0:T=T[1],t.data.params[C.toLowerCase()]=T},"render",g("render",!0),"session",g("session",!0),"icon",g("icon",!0),"alert",g("alert",!0),function(){t=t||{data:{}},t.startRule==="Content_Disposition"&&(t.data.type=w().toLowerCase())},"handling",g("handling",!0),"optional",g("optional",!0),"required",g("required",!0),function(C){t=t||{data:{}},t.data=parseInt(C.join(""))},function(){t=t||{data:{}},t.data=w()},"text",g("text",!0),"image",g("image",!0),"audio",g("audio",!0),"video",g("video",!0),"application",g("application",!0),"message",g("message",!0),"multipart",g("multipart",!0),"x-",g("x-",!0),function(C){t=t||{data:{}},t.data.value=parseInt(C.join(""))},function(C){t=t||{data:{}},t.data=C},function(C){t=t||{data:{}},t.data.event=C.toLowerCase()},function(){t=t||{data:{}};var C=t.data.tag;t.data=new tr(t.data.uri,t.data.displayName,t.data.params),C&&t.data.setParam("tag",C)},"tag",g("tag",!0),function(C){t=t||{data:{}},t.data.tag=C},function(C){t=t||{data:{}},t.data=parseInt(C.join(""))},function(C){t=t||{data:{}},t.data=C},function(){t=t||{data:{}},t.data=new tr(t.data.uri,t.data.displayName,t.data.params)},"digest",g("Digest",!0),"realm",g("realm",!0),function(C){t=t||{data:{}},t.data.realm=C},"domain",g("domain",!0),"nonce",g("nonce",!0),function(C){t=t||{data:{}},t.data.nonce=C},"opaque",g("opaque",!0),function(C){t=t||{data:{}},t.data.opaque=C},"stale",g("stale",!0),"true",g("true",!0),function(){t=t||{data:{}},t.data.stale=!0},"false",g("false",!0),function(){t=t||{data:{}},t.data.stale=!1},"algorithm",g("algorithm",!0),"md5",g("MD5",!0),"md5-sess",g("MD5-sess",!0),function(C){t=t||{data:{}},t.data.algorithm=C.toUpperCase()},"qop",g("qop",!0),"auth-int",g("auth-int",!0),"auth",g("auth",!0),function(C){t=t||{data:{}},t.data.qop||(t.data.qop=[]),t.data.qop.push(C.toLowerCase())},function(C){t=t||{data:{}},t.data.value=parseInt(C.join(""))},function(){var C,T;for(t=t||{data:{}},T=t.data.multi_header.length,C=0;C<T;C++)if(t.data.multi_header[C].parsed===null){t.data=null;break}t.data!==null?t.data=t.data.multi_header:t.data=-1},function(){var C;t=t||{data:{}},t.data.multi_header||(t.data.multi_header=[]);try{C=new tr(t.data.uri,t.data.displayName,t.data.params),delete t.data.uri,delete t.data.displayName,delete t.data.params}catch{C=null}t.data.multi_header.push({position:l,offset:S().start.offset,parsed:C})},function(){t=t||{data:{}},t.data=new tr(t.data.uri,t.data.displayName,t.data.params)},function(){t=t||{data:{}},t.data.replaces_from_tag&&t.data.replaces_to_tag||(t.data=-1)},function(){t=t||{data:{}},t.data={call_id:t.data}},"from-tag",g("from-tag",!0),function(C){t=t||{data:{}},t.data.replaces_from_tag=C},"to-tag",g("to-tag",!0),function(C){t=t||{data:{}},t.data.replaces_to_tag=C},"early-only",g("early-only",!0),function(){t=t||{data:{}},t.data.early_only=!0},function(C,T){return T},function(C,T){return O(C,T)},function(C){t=t||{data:{}},t.startRule==="Require"&&(t.data=C||[])},function(C){t=t||{data:{}},t.data.value=parseInt(C.join(""))},"active",g("active",!0),"pending",g("pending",!0),"terminated",g("terminated",!0),function(){t=t||{data:{}},t.data.state=w()},"reason",g("reason",!0),function(C){t=t||{data:{}},typeof C<"u"&&(t.data.reason=C)},function(C){t=t||{data:{}},typeof C<"u"&&(t.data.expires=C)},"retry_after",g("retry_after",!0),function(C){t=t||{data:{}},typeof C<"u"&&(t.data.retry_after=C)},"deactivated",g("deactivated",!0),"probation",g("probation",!0),"rejected",g("rejected",!0),"timeout",g("timeout",!0),"giveup",g("giveup",!0),"noresource",g("noresource",!0),"invariant",g("invariant",!0),function(C){t=t||{data:{}},t.startRule==="Supported"&&(t.data=C||[])},function(){t=t||{data:{}};var C=t.data.tag;t.data=new tr(t.data.uri,t.data.displayName,t.data.params),C&&t.data.setParam("tag",C)},"ttl",g("ttl",!0),function(C){t=t||{data:{}},t.data.ttl=C},"maddr",g("maddr",!0),function(C){t=t||{data:{}},t.data.maddr=C},"received",g("received",!0),function(C){t=t||{data:{}},t.data.received=C},"branch",g("branch",!0),function(C){t=t||{data:{}},t.data.branch=C},"rport",g("rport",!0),function(C){t=t||{data:{}},typeof C<"u"&&(t.data.rport=C.join(""))},function(C){t=t||{data:{}},t.data.protocol=C},g("UDP",!0),g("TCP",!0),g("TLS",!0),g("SCTP",!0),function(C){t=t||{data:{}},t.data.transport=C},function(){t=t||{data:{}},t.data.host=w()},function(C){t=t||{data:{}},t.data.port=parseInt(C.join(""))},function(C){return parseInt(C.join(""))},function(C){t=t||{data:{}},t.startRule==="Session_Expires"&&(t.data.deltaSeconds=C)},"refresher",g("refresher",!1),"uas",g("uas",!1),"uac",g("uac",!1),function(C){t=t||{data:{}},t.startRule==="Session_Expires"&&(t.data.refresher=C)},function(C){t=t||{data:{}},t.startRule==="Min_SE"&&(t.data=C)},"stuns",g("stuns",!0),"stun",g("stun",!0),function(C){t=t||{data:{}},t.data.scheme=C},function(C){t=t||{data:{}},t.data.host=C},"?transport=",g("?transport=",!1),"turns",g("turns",!0),"turn",g("turn",!0),function(C){t=t||{data:{}},t.data.transport=C},function(){t=t||{data:{}},t.data=w()},"Referred-By",g("Referred-By",!1),"b",g("b",!1),"cid",g("cid",!1)],a=[v('2 ""6 7!'),v('4"""5!7#'),v('4$""5!7%'),v(`4&""5!7'`),v(";'.# &;("),v('4(""5!7)'),v('4*""5!7+'),v('2,""6,7-'),v('2.""6.7/'),v('40""5!71'),v('22""6273.‰ &24""6475.} &26""6677.q &28""6879.e &2:""6:7;.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E'),v(";).# &;,"),v('2F""6F7G.} &2H""6H7I.q &2J""6J7K.e &2L""6L7M.Y &2N""6N7O.M &2P""6P7Q.A &2R""6R7S.5 &2T""6T7U.) &2V""6V7W'),v(`%%2X""6X7Y/5#;#/,$;#/#$+#)(#'#("'#&'#/"!&,)`),v(`%%$;$0#*;$&/,#; /#$+")("'#&'#." &"/=#$;$/&#0#*;$&&&#/'$8":Z" )("'#&'#`),v(';.." &"'),v(`%$;'.# &;(0)*;'.# &;(&/?#28""6879/0$;//'$8#:[# )(#'#("'#&'#`),v(`%%$;2/&#0#*;2&&&#/g#$%$;.0#*;.&/,#;2/#$+")("'#&'#0=*%$;.0#*;.&/,#;2/#$+")("'#&'#&/#$+")("'#&'#/"!&,)`),v('4\\""5!7].# &;3'),v('4^""5!7_'),v('4`""5!7a'),v(';!.) &4b""5!7c'),v('%$;).• &2F""6F7G.‰ &2J""6J7K.} &2L""6L7M.q &2X""6X7Y.e &2P""6P7Q.Y &2H""6H7I.M &2@""6@7A.A &2d""6d7e.5 &2R""6R7S.) &2N""6N7O/ž#0›*;).• &2F""6F7G.‰ &2J""6J7K.} &2L""6L7M.q &2X""6X7Y.e &2P""6P7Q.Y &2H""6H7I.M &2@""6@7A.A &2d""6d7e.5 &2R""6R7S.) &2N""6N7O&&&#/"!&,)'),v('%$;).‰ &2F""6F7G.} &2L""6L7M.q &2X""6X7Y.e &2P""6P7Q.Y &2H""6H7I.M &2@""6@7A.A &2d""6d7e.5 &2R""6R7S.) &2N""6N7O/’#0*;).‰ &2F""6F7G.} &2L""6L7M.q &2X""6X7Y.e &2P""6P7Q.Y &2H""6H7I.M &2@""6@7A.A &2d""6d7e.5 &2R""6R7S.) &2N""6N7O&&&#/"!&,)'),v(`2T""6T7U.ã &2V""6V7W.× &2f""6f7g.Ë &2h""6h7i.¿ &2:""6:7;.³ &2D""6D7E.§ &22""6273.› &28""6879. &2j""6j7k.ƒ &;&.} &24""6475.q &2l""6l7m.e &2n""6n7o.Y &26""6677.M &2>""6>7?.A &2p""6p7q.5 &2r""6r7s.) &;'.# &;(`),v('%$;).ī &2F""6F7G.ğ &2J""6J7K.ē &2L""6L7M.ć &2X""6X7Y.û &2P""6P7Q.ï &2H""6H7I.ã &2@""6@7A.× &2d""6d7e.Ë &2R""6R7S.¿ &2N""6N7O.³ &2T""6T7U.§ &2V""6V7W.› &2f""6f7g. &2h""6h7i.ƒ &28""6879.w &2j""6j7k.k &;&.e &24""6475.Y &2l""6l7m.M &2n""6n7o.A &26""6677.5 &2p""6p7q.) &2r""6r7s/Ĵ#0ı*;).ī &2F""6F7G.ğ &2J""6J7K.ē &2L""6L7M.ć &2X""6X7Y.û &2P""6P7Q.ï &2H""6H7I.ã &2@""6@7A.× &2d""6d7e.Ë &2R""6R7S.¿ &2N""6N7O.³ &2T""6T7U.§ &2V""6V7W.› &2f""6f7g. &2h""6h7i.ƒ &28""6879.w &2j""6j7k.k &;&.e &24""6475.Y &2l""6l7m.M &2n""6n7o.A &26""6677.5 &2p""6p7q.) &2r""6r7s&&&#/"!&,)'),v(`%;//?#2P""6P7Q/0$;//'$8#:t# )(#'#("'#&'#`),v(`%;//?#24""6475/0$;//'$8#:u# )(#'#("'#&'#`),v(`%;//?#2>""6>7?/0$;//'$8#:v# )(#'#("'#&'#`),v(`%;//?#2T""6T7U/0$;//'$8#:w# )(#'#("'#&'#`),v(`%;//?#2V""6V7W/0$;//'$8#:x# )(#'#("'#&'#`),v(`%2h""6h7i/0#;//'$8":y" )("'#&'#`),v(`%;//6#2f""6f7g/'$8":z" )("'#&'#`),v(`%;//?#2D""6D7E/0$;//'$8#:{# )(#'#("'#&'#`),v(`%;//?#22""6273/0$;//'$8#:|# )(#'#("'#&'#`),v(`%;//?#28""6879/0$;//'$8#:}# )(#'#("'#&'#`),v(`%;//0#;&/'$8":~" )("'#&'#`),v(`%;&/0#;//'$8":~" )("'#&'#`),v(`%;=/T#$;G.) &;K.# &;F0/*;G.) &;K.# &;F&/,$;>/#$+#)(#'#("'#&'#`),v('4""5!7€.A &4""5!7‚.5 &4ƒ""5!7„.) &;3.# &;.'),v(`%%;//Q#;&/H$$;J.# &;K0)*;J.# &;K&/,$;&/#$+$)($'#(#'#("'#&'#/"!&,)`),v(`%;//]#;&/T$%$;J.# &;K0)*;J.# &;K&/"!&,)/1$;&/($8$:…$!!)($'#(#'#("'#&'#`),v(';..G &2L""6L7M.; &4†""5!7‡./ &4ƒ""5!7„.# &;3'),v(`%2j""6j7k/J#4ˆ""5!7‰.5 &4Š""5!7‹.) &4Œ""5!7/#$+")("'#&'#`),v(`%;N/M#28""6879/>$;O." &"/0$;S/'$8$:Ž$ )($'#(#'#("'#&'#`),v(`%;N/d#28""6879/U$;O." &"/G$;S/>$;_/5$;l." &"/'$8&:& )(&'#(%'#($'#(#'#("'#&'#`),v(`%3""5$7‘.) &3’""5#7“/' 8!:”!! )`),v(`%;P/]#%28""6879/,#;R/#$+")("'#&'#." &"/6$2:""6:7;/'$8#:•# )(#'#("'#&'#`),v("$;+.) &;-.# &;Q/2#0/*;+.) &;-.# &;Q&&&#"),v('2<""6<7=.q &2>""6>7?.e &2@""6@7A.Y &2B""6B7C.M &2D""6D7E.A &22""6273.5 &26""6677.) &24""6475'),v('%$;+._ &;-.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E0e*;+._ &;-.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E&/& 8!:–! )'),v(`%;T/J#%28""6879/,#;^/#$+")("'#&'#." &"/#$+")("'#&'#`),v("%;U.) &;\\.# &;X/& 8!:—! )"),v(`%$%;V/2#2J""6J7K/#$+")("'#&'#0<*%;V/2#2J""6J7K/#$+")("'#&'#&/D#;W/;$2J""6J7K." &"/'$8#:˜# )(#'#("'#&'#`),v('$4™""5!7š/,#0)*4™""5!7š&&&#'),v(`%4$""5!7%/?#$4›""5!7œ0)*4›""5!7œ&/#$+")("'#&'#`),v(`%2l""6l7m/?#;Y/6$2n""6n7o/'$8#:# )(#'#("'#&'#`),v(`%%;Z/³#28""6879/¤$;Z/›$28""6879/Œ$;Z/ƒ$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+-)(-'#(,'#(+'#(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.ސ &%2ž""6ž7Ÿ/¤#;Z/›$28""6879/Œ$;Z/ƒ$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+,)(,'#(+'#(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.۹ &%2ž""6ž7Ÿ/Œ#;Z/ƒ$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+*)(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.ٺ &%2ž""6ž7Ÿ/t#;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#.ؓ &%2ž""6ž7Ÿ/\\#;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+&)(&'#(%'#($'#(#'#("'#&'#.ׄ &%2ž""6ž7Ÿ/D#;Z/;$28""6879/,$;[/#$+$)($'#(#'#("'#&'#.֍ &%2ž""6ž7Ÿ/,#;[/#$+")("'#&'#.ծ &%2ž""6ž7Ÿ/,#;Z/#$+")("'#&'#.Տ &%;Z/›#2ž""6ž7Ÿ/Œ$;Z/ƒ$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$++)(+'#(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.Ӈ &%;Z/ª#%28""6879/,#;Z/#$+")("'#&'#." &"/ƒ$2ž""6ž7Ÿ/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+*)(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.а &%;Z/¹#%28""6879/,#;Z/#$+")("'#&'#." &"/’$%28""6879/,#;Z/#$+")("'#&'#." &"/k$2ž""6ž7Ÿ/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+))()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.Ί &%;Z/È#%28""6879/,#;Z/#$+")("'#&'#." &"/¡$%28""6879/,#;Z/#$+")("'#&'#." &"/z$%28""6879/,#;Z/#$+")("'#&'#." &"/S$2ž""6ž7Ÿ/D$;Z/;$28""6879/,$;[/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#.˕ &%;Z/×#%28""6879/,#;Z/#$+")("'#&'#." &"/°$%28""6879/,#;Z/#$+")("'#&'#." &"/‰$%28""6879/,#;Z/#$+")("'#&'#." &"/b$%28""6879/,#;Z/#$+")("'#&'#." &"/;$2ž""6ž7Ÿ/,$;[/#$+')(''#(&'#(%'#($'#(#'#("'#&'#.ȑ &%;Z/þ#%28""6879/,#;Z/#$+")("'#&'#." &"/×$%28""6879/,#;Z/#$+")("'#&'#." &"/°$%28""6879/,#;Z/#$+")("'#&'#." &"/‰$%28""6879/,#;Z/#$+")("'#&'#." &"/b$%28""6879/,#;Z/#$+")("'#&'#." &"/;$2ž""6ž7Ÿ/,$;Z/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#.Ħ &%;Z/Ĝ#%28""6879/,#;Z/#$+")("'#&'#." &"/õ$%28""6879/,#;Z/#$+")("'#&'#." &"/Î$%28""6879/,#;Z/#$+")("'#&'#." &"/§$%28""6879/,#;Z/#$+")("'#&'#." &"/€$%28""6879/,#;Z/#$+")("'#&'#." &"/Y$%28""6879/,#;Z/#$+")("'#&'#." &"/2$2ž""6ž7Ÿ/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#/& 8!: ! )`),v(`%;#/M#;#." &"/?$;#." &"/1$;#." &"/#$+$)($'#(#'#("'#&'#`),v(`%;Z/;#28""6879/,$;Z/#$+#)(#'#("'#&'#.# &;\\`),v(`%;]/o#2J""6J7K/\`$;]/W$2J""6J7K/H$;]/?$2J""6J7K/0$;]/'$8':¡' )(''#(&'#(%'#($'#(#'#("'#&'#`),v(`%2¢""6¢7£/2#4¤""5!7¥/#$+")("'#&'#.˜ &%2¦""6¦7§/;#4¨""5!7©/,$;!/#$+#)(#'#("'#&'#.j &%2ª""6ª7«/5#;!/,$;!/#$+#)(#'#("'#&'#.B &%4¬""5!7­/,#;!/#$+")("'#&'#.# &;!`),v(`%%;!." &"/[#;!." &"/M$;!." &"/?$;!." &"/1$;!." &"/#$+%)(%'#($'#(#'#("'#&'#/' 8!:®!! )`),v(`$%22""6273/,#;\`/#$+")("'#&'#0<*%22""6273/,#;\`/#$+")("'#&'#&`),v(";a.A &;b.; &;c.5 &;d./ &;e.) &;f.# &;g"),v(`%3¯""5*7°/a#3±""5#7².G &3³""5#7´.; &3µ""5$7¶./ &3·""5#7¸.# &;6/($8":¹"! )("'#&'#`),v(`%3º""5%7»/I#3¼""5%7½./ &3¾""5"7¿.# &;6/($8":À"! )("'#&'#`),v(`%3Á""5'7Â/1#;/($8":Ã"! )("'#&'#`),v(`%3Ä""5$7Å/1#;ð/($8":Æ"! )("'#&'#`),v(`%3Ç""5&7È/1#;T/($8":É"! )("'#&'#`),v(`%3Ê""5"7Ë/N#%2>""6>7?/,#;6/#$+")("'#&'#." &"/'$8":Ì" )("'#&'#`),v(`%;h/P#%2>""6>7?/,#;i/#$+")("'#&'#." &"/)$8":Í""! )("'#&'#`),v('%$;j/&#0#*;j&&&#/"!&,)'),v('%$;j/&#0#*;j&&&#/"!&,)'),v(";k.) &;+.# &;-"),v('2l""6l7m.e &2n""6n7o.Y &24""6475.M &28""6879.A &2<""6<7=.5 &2@""6@7A.) &2B""6B7C'),v(`%26""6677/n#;m/e$$%2<""6<7=/,#;m/#$+")("'#&'#0<*%2<""6<7=/,#;m/#$+")("'#&'#&/#$+#)(#'#("'#&'#`),v(`%;n/A#2>""6>7?/2$;o/)$8#:Î#"" )(#'#("'#&'#`),v("$;p.) &;+.# &;-/2#0/*;p.) &;+.# &;-&&&#"),v("$;p.) &;+.# &;-0/*;p.) &;+.# &;-&"),v('2l""6l7m.e &2n""6n7o.Y &24""6475.M &26""6677.A &28""6879.5 &2@""6@7A.) &2B""6B7C'),v(";‘.# &;r"),v(`%;/G#;'/>$;s/5$;'/,$;„/#$+%)(%'#($'#(#'#("'#&'#`),v(";M.# &;t"),v(`%;/E#28""6879/6$;u.# &;x/'$8#:Ï# )(#'#("'#&'#`),v(`%;v.# &;w/J#%26""6677/,#;ƒ/#$+")("'#&'#." &"/#$+")("'#&'#`),v(`%2Ð""6Ð7Ñ/:#;€/1$;w." &"/#$+#)(#'#("'#&'#`),v(`%24""6475/,#;{/#$+")("'#&'#`),v(`%;z/3#$;y0#*;y&/#$+")("'#&'#`),v(";*.) &;+.# &;-"),v(';+. &;-.‰ &22""6273.} &26""6677.q &28""6879.e &2:""6:7;.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E'),v(`%;|/e#$%24""6475/,#;|/#$+")("'#&'#0<*%24""6475/,#;|/#$+")("'#&'#&/#$+")("'#&'#`),v(`%$;~0#*;~&/e#$%22""6273/,#;}/#$+")("'#&'#0<*%22""6273/,#;}/#$+")("'#&'#&/#$+")("'#&'#`),v("$;~0#*;~&"),v(';+.w &;-.q &28""6879.e &2:""6:7;.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E'),v(`%%;"/‡#$;".G &;!.A &2@""6@7A.5 &2F""6F7G.) &2J""6J7K0M*;".G &;!.A &2@""6@7A.5 &2F""6F7G.) &2J""6J7K&/#$+")("'#&'#/& 8!:Ò! )`),v(";.# &;‚"),v(`%%;O/2#2:""6:7;/#$+")("'#&'#." &"/,#;S/#$+")("'#&'#." &"`),v('$;+.ƒ &;-.} &2B""6B7C.q &2D""6D7E.e &22""6273.Y &28""6879.M &2:""6:7;.A &2<""6<7=.5 &2>""6>7?.) &2@""6@7A/Œ#0‰*;+.ƒ &;-.} &2B""6B7C.q &2D""6D7E.e &22""6273.Y &28""6879.M &2:""6:7;.A &2<""6<7=.5 &2>""6>7?.) &2@""6@7A&&&#'),v("$;y0#*;y&"),v(`%3’""5#7Ó/q#24""6475/b$$;!/&#0#*;!&&&#/L$2J""6J7K/=$$;!/&#0#*;!&&&#/'$8%:Ô% )(%'#($'#(#'#("'#&'#`),v('2Õ""6Õ7Ö'),v('2×""6×7Ø'),v('2Ù""6Ù7Ú'),v('2Û""6Û7Ü'),v('2Ý""6Ý7Þ'),v('2ß""6ß7à'),v('2á""6á7â'),v('2ã""6ã7ä'),v('2å""6å7æ'),v('2ç""6ç7è'),v('2é""6é7ê'),v("%;….Y &;†.S &;ˆ.M &;‰.G &;Š.A &;‹.; &;Œ.5 &;./ &;.) &;Ž.# &;6/& 8!:ë! )"),v(`%;„/G#;'/>$;’/5$;'/,$;”/#$+%)(%'#($'#(#'#("'#&'#`),v("%;“/' 8!:ì!! )"),v(`%;!/5#;!/,$;!/#$+#)(#'#("'#&'#`),v("%$;*.A &;+.; &;-.5 &;3./ &;4.) &;'.# &;(0G*;*.A &;+.; &;-.5 &;3./ &;4.) &;'.# &;(&/& 8!:í! )"),v(`%;¶/Y#$%;A/,#;¶/#$+")("'#&'#06*%;A/,#;¶/#$+")("'#&'#&/#$+")("'#&'#`),v(`%;9/N#%2:""6:7;/,#;9/#$+")("'#&'#." &"/'$8":î" )("'#&'#`),v(`%;:.c &%;˜/Y#$%;A/,#;˜/#$+")("'#&'#06*%;A/,#;˜/#$+")("'#&'#&/#$+")("'#&'#/& 8!:ï! )`),v(`%;L.# &;™/]#$%;B/,#;›/#$+")("'#&'#06*%;B/,#;›/#$+")("'#&'#&/'$8":ð" )("'#&'#`),v(`%;š." &"/>#;@/5$;M/,$;?/#$+$)($'#(#'#("'#&'#`),v(`%%;6/Y#$%;./,#;6/#$+")("'#&'#06*%;./,#;6/#$+")("'#&'#&/#$+")("'#&'#.# &;H/' 8!:ñ!! )`),v(";œ.) &;.# &; "),v(`%3ò""5!7ó/:#;</1$;Ÿ/($8#:ô#! )(#'#("'#&'#`),v(`%3õ""5'7ö/:#;</1$;ž/($8#:÷#! )(#'#("'#&'#`),v("%$;!/&#0#*;!&&&#/' 8!:ø!! )"),v(`%2ù""6ù7ú/o#%2J""6J7K/M#;!." &"/?$;!." &"/1$;!." &"/#$+$)($'#(#'#("'#&'#." &"/'$8":û" )("'#&'#`),v(`%;6/J#%;</,#;¡/#$+")("'#&'#." &"/)$8":ü""! )("'#&'#`),v(";6.) &;T.# &;H"),v(`%;£/Y#$%;B/,#;¤/#$+")("'#&'#06*%;B/,#;¤/#$+")("'#&'#&/#$+")("'#&'#`),v(`%3ý""5&7þ.G &3ÿ""5'7Ā.; &3ā""5$7Ă./ &3ă""5%7Ą.# &;6/& 8!:ą! )`),v(";¥.# &; "),v(`%3Ć""5(7ć/M#;</D$3Ĉ""5(7ĉ./ &3Ċ""5(7ċ.# &;6/#$+#)(#'#("'#&'#`),v(`%;6/Y#$%;A/,#;6/#$+")("'#&'#06*%;A/,#;6/#$+")("'#&'#&/#$+")("'#&'#`),v("%$;!/&#0#*;!&&&#/' 8!:Č!! )"),v("%;©/& 8!:č! )"),v(`%;ª/k#;;/b$;¯/Y$$%;B/,#;°/#$+")("'#&'#06*%;B/,#;°/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),v(";«.# &;¬"),v('3Ď""5$7ď.S &3Đ""5%7đ.G &3Ē""5%7ē.; &3Ĕ""5%7ĕ./ &3Ė""5+7ė.# &;­'),v(`3Ę""5'7ę./ &3Ě""5)7ě.# &;­`),v(";6.# &;®"),v(`%3Ĝ""5"7ĝ/,#;6/#$+")("'#&'#`),v(";­.# &;6"),v(`%;6/5#;</,$;±/#$+#)(#'#("'#&'#`),v(";6.# &;H"),v(`%;³/5#;./,$;/#$+#)(#'#("'#&'#`),v("%$;!/&#0#*;!&&&#/' 8!:Ğ!! )"),v("%;ž/' 8!:ğ!! )"),v(`%;¶/^#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/($8":Ġ"!!)("'#&'#`),v(`%%;7/e#$%2J""6J7K/,#;7/#$+")("'#&'#0<*%2J""6J7K/,#;7/#$+")("'#&'#&/#$+")("'#&'#/"!&,)`),v(`%;L.# &;™/]#$%;B/,#;¸/#$+")("'#&'#06*%;B/,#;¸/#$+")("'#&'#&/'$8":ġ" )("'#&'#`),v(";¹.# &; "),v(`%3Ģ""5#7ģ/:#;</1$;6/($8#:Ĥ#! )(#'#("'#&'#`),v("%$;!/&#0#*;!&&&#/' 8!:ĥ!! )"),v("%;ž/' 8!:Ħ!! )"),v(`%$;š0#*;š&/x#;@/o$;M/f$;?/]$$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/'$8%:ħ% )(%'#($'#(#'#("'#&'#`),v(";¾"),v(`%3Ĩ""5&7ĩ/k#;./b$;Á/Y$$%;A/,#;Á/#$+")("'#&'#06*%;A/,#;Á/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#.# &;¿`),v(`%;6/k#;./b$;À/Y$$%;A/,#;À/#$+")("'#&'#06*%;A/,#;À/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),v(`%;6/;#;</2$;6.# &;H/#$+#)(#'#("'#&'#`),v(";Â.G &;Ä.A &;Æ.; &;È.5 &;É./ &;Ê.) &;Ë.# &;À"),v(`%3Ī""5%7ī/5#;</,$;Ã/#$+#)(#'#("'#&'#`),v("%;I/' 8!:Ĭ!! )"),v(`%3ĭ""5&7Į/—#;</Ž$;D/…$;Å/|$$%$;'/&#0#*;'&&&#/,#;Å/#$+")("'#&'#0C*%$;'/&#0#*;'&&&#/,#;Å/#$+")("'#&'#&/,$;E/#$+&)(&'#(%'#($'#(#'#("'#&'#`),v(";t.# &;w"),v(`%3į""5%7İ/5#;</,$;Ç/#$+#)(#'#("'#&'#`),v("%;I/' 8!:ı!! )"),v(`%3IJ""5&7ij/:#;</1$;I/($8#:Ĵ#! )(#'#("'#&'#`),v(`%3ĵ""5%7Ķ/]#;</T$%3ķ""5$7ĸ/& 8!:Ĺ! ).4 &%3ĺ""5%7Ļ/& 8!:ļ! )/#$+#)(#'#("'#&'#`),v(`%3Ľ""5)7ľ/R#;</I$3Ŀ""5#7ŀ./ &3Ł""5(7ł.# &;6/($8#:Ń#! )(#'#("'#&'#`),v(`%3ń""5#7Ņ/“#;</Š$;D/$%;Ì/e#$%2D""6D7E/,#;Ì/#$+")("'#&'#0<*%2D""6D7E/,#;Ì/#$+")("'#&'#&/#$+")("'#&'#/,$;E/#$+%)(%'#($'#(#'#("'#&'#`),v(`%3ņ""5(7Ň./ &3ň""5$7ʼn.# &;6/' 8!:Ŋ!! )`),v(`%;6/Y#$%;A/,#;6/#$+")("'#&'#06*%;A/,#;6/#$+")("'#&'#&/#$+")("'#&'#`),v(`%;Ï/G#;./>$;Ï/5$;./,$;/#$+%)(%'#($'#(#'#("'#&'#`),v("%$;!/&#0#*;!&&&#/' 8!:ŋ!! )"),v(`%;Ñ/]#$%;A/,#;Ñ/#$+")("'#&'#06*%;A/,#;Ñ/#$+")("'#&'#&/'$8":Ō" )("'#&'#`),v(`%;™/]#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/'$8":ō" )("'#&'#`),v(`%;L.O &;™.I &%;@." &"/:#;t/1$;?." &"/#$+#)(#'#("'#&'#/]#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/'$8":Ŏ" )("'#&'#`),v(`%;Ô/]#$%;B/,#;Õ/#$+")("'#&'#06*%;B/,#;Õ/#$+")("'#&'#&/'$8":ŏ" )("'#&'#`),v("%;–/& 8!:Ő! )"),v(`%3ő""5(7Œ/:#;</1$;6/($8#:œ#! )(#'#("'#&'#.g &%3Ŕ""5&7ŕ/:#;</1$;6/($8#:Ŗ#! )(#'#("'#&'#.: &%3ŗ""5*7Ř/& 8!:ř! ).# &; `),v(`%%;6/k#$%;A/2#;6/)$8":Ś""$ )("'#&'#0<*%;A/2#;6/)$8":Ś""$ )("'#&'#&/)$8":ś""! )("'#&'#." &"/' 8!:Ŝ!! )`),v(`%;Ø/Y#$%;A/,#;Ø/#$+")("'#&'#06*%;A/,#;Ø/#$+")("'#&'#&/#$+")("'#&'#`),v(`%;™/Y#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/#$+")("'#&'#`),v("%$;!/&#0#*;!&&&#/' 8!:ŝ!! )"),v(`%;Û/Y#$%;B/,#;Ü/#$+")("'#&'#06*%;B/,#;Ü/#$+")("'#&'#&/#$+")("'#&'#`),v(`%3Ş""5&7ş.; &3Š""5'7š./ &3Ţ""5*7ţ.# &;6/& 8!:Ť! )`),v(`%3ť""5&7Ŧ/:#;</1$;Ý/($8#:ŧ#! )(#'#("'#&'#.} &%3õ""5'7ö/:#;</1$;ž/($8#:Ũ#! )(#'#("'#&'#.P &%3ũ""5+7Ū/:#;</1$;ž/($8#:ū#! )(#'#("'#&'#.# &; `),v(`3Ŭ""5+7ŭ.k &3Ů""5)7ů._ &3Ű""5(7ű.S &3Ų""5'7ų.G &3Ŵ""5&7ŵ.; &3Ŷ""5*7ŷ./ &3Ÿ""5)7Ź.# &;6`),v(';1." &"'),v(`%%;6/k#$%;A/2#;6/)$8":Ś""$ )("'#&'#0<*%;A/2#;6/)$8":Ś""$ )("'#&'#&/)$8":ś""! )("'#&'#." &"/' 8!:ź!! )`),v(`%;L.# &;™/]#$%;B/,#;á/#$+")("'#&'#06*%;B/,#;á/#$+")("'#&'#&/'$8":Ż" )("'#&'#`),v(";¹.# &; "),v(`%;ã/Y#$%;A/,#;ã/#$+")("'#&'#06*%;A/,#;ã/#$+")("'#&'#&/#$+")("'#&'#`),v(`%;ê/k#;./b$;í/Y$$%;B/,#;ä/#$+")("'#&'#06*%;B/,#;ä/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),v(";å.; &;æ.5 &;ç./ &;è.) &;é.# &; "),v(`%3ż""5#7Ž/:#;</1$;ð/($8#:ž#! )(#'#("'#&'#`),v(`%3ſ""5%7ƀ/:#;</1$;T/($8#:Ɓ#! )(#'#("'#&'#`),v(`%3Ƃ""5(7ƃ/F#;</=$;\\.) &;Y.# &;X/($8#:Ƅ#! )(#'#("'#&'#`),v(`%3ƅ""5&7Ɔ/:#;</1$;6/($8#:Ƈ#! )(#'#("'#&'#`),v(`%3ƈ""5%7Ɖ/A#;</8$$;!0#*;!&/($8#:Ɗ#! )(#'#("'#&'#`),v(`%;ë/G#;;/>$;6/5$;;/,$;ì/#$+%)(%'#($'#(#'#("'#&'#`),v(`%3’""5#7Ó.# &;6/' 8!:Ƌ!! )`),v(`%3±""5#7ƌ.G &3³""5#7ƍ.; &3·""5#7Ǝ./ &3µ""5$7Ə.# &;6/' 8!:Ɛ!! )`),v(`%;î/D#%;C/,#;ï/#$+")("'#&'#." &"/#$+")("'#&'#`),v("%;U.) &;\\.# &;X/& 8!:Ƒ! )"),v(`%%;!." &"/[#;!." &"/M$;!." &"/?$;!." &"/1$;!." &"/#$+%)(%'#($'#(#'#("'#&'#/' 8!:ƒ!! )`),v(`%%;!/?#;!." &"/1$;!." &"/#$+#)(#'#("'#&'#/' 8!:Ɠ!! )`),v(";¾"),v(`%;ž/^#$%;B/,#;ó/#$+")("'#&'#06*%;B/,#;ó/#$+")("'#&'#&/($8":Ɣ"!!)("'#&'#`),v(";ô.# &; "),v(`%2ƕ""6ƕ7Ɩ/L#;</C$2Ɨ""6Ɨ7Ƙ.) &2ƙ""6ƙ7ƚ/($8#:ƛ#! )(#'#("'#&'#`),v(`%;ž/^#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/($8":Ɯ"!!)("'#&'#`),v(`%;6/5#;0/,$;÷/#$+#)(#'#("'#&'#`),v("$;2.) &;4.# &;.0/*;2.) &;4.# &;.&"),v("$;%0#*;%&"),v(`%;ú/;#28""6879/,$;û/#$+#)(#'#("'#&'#`),v(`%3Ɲ""5%7ƞ.) &3Ɵ""5$7Ơ/' 8!:ơ!! )`),v(`%;ü/J#%28""6879/,#;^/#$+")("'#&'#." &"/#$+")("'#&'#`),v("%;\\.) &;X.# &;‚/' 8!:Ƣ!! )"),v(';".S &;!.M &2F""6F7G.A &2J""6J7K.5 &2H""6H7I.) &2N""6N7O'),v('2L""6L7M.• &2B""6B7C.‰ &2<""6<7=.} &2R""6R7S.q &2T""6T7U.e &2V""6V7W.Y &2P""6P7Q.M &2@""6@7A.A &2D""6D7E.5 &22""6273.) &2>""6>7?'),v(`%;Ā/b#28""6879/S$;û/J$%2ƣ""6ƣ7Ƥ/,#;ì/#$+")("'#&'#." &"/#$+$)($'#(#'#("'#&'#`),v(`%3ƥ""5%7Ʀ.) &3Ƨ""5$7ƨ/' 8!:ơ!! )`),v(`%3±""5#7².6 &3³""5#7´.* &$;+0#*;+&/' 8!:Ʃ!! )`),v(`%;Ą/‡#2F""6F7G/x$;ă/o$2F""6F7G/\`$;ă/W$2F""6F7G/H$;ă/?$2F""6F7G/0$;ą/'$8):ƪ) )()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#`),v(`%;#/>#;#/5$;#/,$;#/#$+$)($'#(#'#("'#&'#`),v(`%;ă/,#;ă/#$+")("'#&'#`),v(`%;ă/5#;ă/,$;ă/#$+#)(#'#("'#&'#`),v(`%;q/T#$;m0#*;m&/D$%; /,#;ø/#$+")("'#&'#." &"/#$+#)(#'#("'#&'#`),v(`%2ƫ""6ƫ7Ƭ.) &2ƭ""6ƭ7Ʈ/w#;0/n$;Ĉ/e$$%;B/2#;ĉ.# &; /#$+")("'#&'#0<*%;B/2#;ĉ.# &; /#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),v(";™.# &;L"),v(`%2Ư""6Ư7ư/5#;</,$;Ċ/#$+#)(#'#("'#&'#`),v(`%;D/S#;,/J$2:""6:7;/;$;,.# &;T/,$;E/#$+%)(%'#($'#(#'#("'#&'#`)];let l=0,c=0;const u=[{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(c,l)}function S(){return _(c,l)}function g(C,T){return{type:"literal",text:C,ignoreCase:T}}function x(C,T,E){return{type:"class",parts:C,inverted:T,ignoreCase:E}}function y(){return{type:"end"}}function b(C){let T=u[C],E;if(T)return T;for(E=C-1;!u[E];)E--;for(T=u[E],T={line:T.line,column:T.column};E<C;)e.charCodeAt(E)===10?(T.line++,T.column=1):T.column++,E++;return u[C]=T,T}function _(C,T){const E=b(C),q=b(T);return{source:n,start:{offset:C,line:E.line,column:E.column},end:{offset:T,line:q.line,column:q.column}}}function $(C){l<d||(l>d&&(d=l,p=[]),p.push(C))}function R(C,T,E){return new Sf(Sf.buildMessage(C,T),C,T,E)}function v(C){return C.split("").map(T=>T.charCodeAt(0)-32)}function P(C){const T=a[C];let E=0;const q=[];let j=T.length;const z=[],J=[];let U;for(;;){for(;E<j;)switch(T[E]){case 0:J.push(o[T[E+1]]),E+=2;break;case 1:J.push(void 0),E++;break;case 2:J.push(null),E++;break;case 3:J.push(r),E++;break;case 4:J.push([]),E++;break;case 5:J.push(l),E++;break;case 6:J.pop(),E++;break;case 7:l=J.pop(),E++;break;case 8:J.length-=T[E+1],E+=2;break;case 9:J.splice(-2,1),E++;break;case 10:J[J.length-2].push(J.pop()),E++;break;case 11:J.push(J.splice(J.length-T[E+1],T[E+1])),E+=2;break;case 12:J.push(e.substring(J.pop(),l)),E++;break;case 13:z.push(j),q.push(E+3+T[E+1]+T[E+2]),J[J.length-1]?(j=E+3+T[E+1],E+=3):(j=E+3+T[E+1]+T[E+2],E+=3+T[E+1]);break;case 14:z.push(j),q.push(E+3+T[E+1]+T[E+2]),J[J.length-1]===r?(j=E+3+T[E+1],E+=3):(j=E+3+T[E+1]+T[E+2],E+=3+T[E+1]);break;case 15:z.push(j),q.push(E+3+T[E+1]+T[E+2]),J[J.length-1]!==r?(j=E+3+T[E+1],E+=3):(j=E+3+T[E+1]+T[E+2],E+=3+T[E+1]);break;case 16:J[J.length-1]!==r?(z.push(j),q.push(E),j=E+2+T[E+1],E+=2):E+=2+T[E+1];break;case 17:z.push(j),q.push(E+3+T[E+1]+T[E+2]),e.length>l?(j=E+3+T[E+1],E+=3):(j=E+3+T[E+1]+T[E+2],E+=3+T[E+1]);break;case 18:z.push(j),q.push(E+4+T[E+2]+T[E+3]),e.substr(l,o[T[E+1]].length)===o[T[E+1]]?(j=E+4+T[E+2],E+=4):(j=E+4+T[E+2]+T[E+3],E+=4+T[E+2]);break;case 19:z.push(j),q.push(E+4+T[E+2]+T[E+3]),e.substr(l,o[T[E+1]].length).toLowerCase()===o[T[E+1]]?(j=E+4+T[E+2],E+=4):(j=E+4+T[E+2]+T[E+3],E+=4+T[E+2]);break;case 20:z.push(j),q.push(E+4+T[E+2]+T[E+3]),o[T[E+1]].test(e.charAt(l))?(j=E+4+T[E+2],E+=4):(j=E+4+T[E+2]+T[E+3],E+=4+T[E+2]);break;case 21:J.push(e.substr(l,T[E+1])),l+=T[E+1],E+=2;break;case 22:J.push(o[T[E+1]]),l+=o[T[E+1]].length,E+=2;break;case 23:J.push(r),h===0&&$(o[T[E+1]]),E+=2;break;case 24:c=J[J.length-1-T[E+1]],E+=2;break;case 25:c=l,E++;break;case 26:U=T.slice(E+4,E+4+T[E+3]).map(function(Ae){return J[J.length-1-Ae]}),J.splice(J.length-T[E+2],T[E+2],o[T[E+1]].apply(null,U)),E+=4+T[E+3];break;case 27:J.push(P(T[E+1])),E+=2;break;case 28:h++,E++;break;case 29:h--,E++;break;default:throw new Error("Invalid opcode: "+T[E]+".")}if(z.length>0)j=z.pop(),E=q.pop();else break}return J[0]}t.data={};function O(C,T){return[C].concat(T)}if(m=P(i),m!==r&&l===e.length)return m;throw m!==r&&l<e.length&&$(y()),R(p,d<e.length?e.charAt(d):null,d<e.length?_(d,d+1):_(d,d))}const Fw=Bw;var ut;(function(e){function t(s,i){const o={startRule:i};try{Fw(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})(ut=ut||(ut={}));var Lw={100:"Trying",180:"Ringing",181:"Call Is Being Forwarded",182:"Queued",183:"Session Progress",199:"Early Dialog Terminated",200:"OK",202:"Accepted",204:"No Notification",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",305:"Use Proxy",380:"Alternative Service",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",410:"Gone",412:"Conditional Request Failed",413:"Request Entity Too Large",414:"Request-URI Too Long",415:"Unsupported Media Type",416:"Unsupported URI Scheme",417:"Unknown Resource-Priority",420:"Bad Extension",421:"Extension Required",422:"Session Interval Too Small",423:"Interval Too Brief",428:"Use Identity Header",429:"Provide Referrer Identity",430:"Flow Failed",433:"Anonymity Disallowed",436:"Bad Identity-Info",437:"Unsupported Certificate",438:"Invalid Identity Header",439:"First Hop Lacks Outbound Support",440:"Max-Breadth Exceeded",469:"Bad Info Package",470:"Consent Needed",478:"Unresolvable Destination",480:"Temporarily Unavailable",481:"Call/Transaction Does Not Exist",482:"Loop Detected",483:"Too Many Hops",484:"Address Incomplete",485:"Ambiguous",486:"Busy Here",487:"Request Terminated",488:"Not Acceptable Here",489:"Bad Event",491:"Request Pending",493:"Undecipherable",494:"Security Agreement Required",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Server Time-out",505:"Version Not Supported",513:"Message Too Large",580:"Precondition Failure",600:"Busy Everywhere",603:"Decline",604:"Does Not Exist Anywhere",606:"Not Acceptable"};function Bn(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 xo(e){return Lw[e]||""}function To(){return Bn(10)}function _r(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 Cf=class{constructor(){this.headers={}}addHeader(e,t){const r={raw:t};e=_r(e),this.headers[e]?this.headers[e].push(r):this.headers[e]=[r]}getHeader(e){const t=this.headers[_r(e)];if(t){if(t[0])return t[0].raw}else return}getHeaders(e){const t=this.headers[_r(e)],r=[];if(!t)return[];for(const n of t)r.push(n.raw);return r}hasHeader(e){return!!this.headers[_r(e)]}parseHeader(e,t=0){if(e=_r(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=ut.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[_r(e)]=[{raw:t}]}toString(){return this.data}},Ss=class extends Cf{constructor(){super()}},dn=class extends Cf{constructor(){super()}},wl=class ia{constructor(t,r,n,s,i,o,a){this.headers={},this.extraHeaders=[],this.options=ia.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:To(),this.from=ia.makeNameAddrHeader(this.fromURI,this.options.fromDisplayName,this.fromTag),this.toURI=s.clone(),this.toTag=this.options.toTag,this.to=ia.makeNameAddrHeader(this.toURI,this.options.toDisplayName,this.toTag),this.callId=this.options.callId?this.options.callId:this.options.callIdPrefix+Bn(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 tr(t,r,s)}getHeader(t){const r=this.headers[_r(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[_r(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[_r(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[_r(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
14
14
  `;for(const r in this.headers)if(this.headers[r])for(const n of this.headers[r])t+=r+": "+n+`\r
15
15
  `;for(const r of this.extraHeaders)t+=r.trim()+`\r
16
16
  `;return t+="Supported: "+this.options.optionTags.join(", ")+`\r
@@ -24,23 +24,23 @@
24
24
  \r
25
25
  `:t+=`Content-Length: 0\r
26
26
  \r
27
- `,t}};function _f(e){return e==="application/sdp"?"session":"render"}function Eo(e){const t=typeof e=="string"?e:e.body,r=typeof e=="string"?"application/sdp":e.contentType;return{contentDisposition:_f(r),contentType:r,content:t}}function xf(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 Ss&&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 dn&&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(xf(e)&&(t=e.contentDisposition,r=e.contentType,n=e.content),!!n){if(r&&!t&&(t=_f(r)),!t)throw new Error("Content disposition undefined.");if(!r)throw new Error("Content type undefined.");return{contentDisposition:t,contentType:r,content:n}}}var rr;(function(e){e.Initial="Initial",e.Early="Early",e.AckWait="AckWait",e.Confirmed="Confirmed",e.Terminated="Terminated"})(rr=rr||(rr={}));var ce;(function(e){e.Initial="Initial",e.HaveLocalOffer="HaveLocalOffer",e.HaveRemoteOffer="HaveRemoteOffer",e.Stable="Stable",e.Closed="Closed"})(ce=ce||(ce={}));var Wr=500,Vw=4e3,yl=5e3;const pt={T1:Wr,T2:Vw,T4:yl,TIMER_B:64*Wr,TIMER_D:0*Wr,TIMER_F:64*Wr,TIMER_H:64*Wr,TIMER_I:0*yl,TIMER_J:0*Wr,TIMER_K:0*yl,TIMER_L:64*Wr,TIMER_M:64*Wr,TIMER_N:64*Wr,PROVISIONAL_RESPONSE_INTERVAL:6e4};var fn=class extends Nn{constructor(e){super(e||"Transaction state error.")}},fe;(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"})(fe=fe||(fe={}));const pn=[fe.ACK,fe.BYE,fe.CANCEL,fe.INFO,fe.INVITE,fe.MESSAGE,fe.NOTIFY,fe.OPTIONS,fe.PRACK,fe.REFER,fe.REGISTER,fe.SUBSCRIBE];var Tf=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()}},jw=class{constructor(e,t){this.incomingReferRequest=e,this.session=t}get referTo(){const e=this.incomingReferRequest.message.parseHeader("refer-to");if(!(e instanceof tr))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}},V;(function(e){e.Initial="Initial",e.Establishing="Establishing",e.Established="Established",e.Terminating="Terminating",e.Terminated="Terminated"})(V=V||(V={}));var Sl=class hg{constructor(t,r={}){this.pendingReinvite=!1,this.pendingReinviteAck=!1,this._state=V.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 V.Initial:break;case V.Establishing:break;case V.Established:return new Promise(t=>{this._bye({onAccept:()=>t(),onRedirect:()=>t(),onReject:()=>t()})});case V.Terminating:break;case V.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 V.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 V.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 V.Established:{const n=t.requestDelegate,s=this.copyRequestOptions(t.requestOptions);return this._bye(n,s)}case V.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 V.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!==V.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!==V.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(V.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===V.Terminated?i.ack():(this.ackAndBye(i,488,"Bad Media Description"),this.stateTransition(V.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!==V.Terminated?(this.ackAndBye(i,488,"Bad Media Description"),this.stateTransition(V.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!==V.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(V.Terminated)}}).then(()=>{t.requestDelegate&&t.requestDelegate.onReject&&t.requestDelegate.onReject(i)})},onTrying:i=>{}},n=t.requestOptions||{};if(n.extraHeaders=(n.extraHeaders||[]).slice(),n.extraHeaders.push("Allow: "+pn.toString()),n.extraHeaders.push("Contact: "+this._contact),t.withoutSdp){if(!this.dialog)throw this.pendingReinvite=!1,new Error("Dialog undefined.");return Promise.resolve(this.dialog.invite(r,n))}const s={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptionsReInvite,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiersReInvite};return this.getOffer(s).then(i=>{if(!this.dialog)throw this.pendingReinvite=!1,new Error("Dialog undefined.");return n.body=i,this.dialog.invite(r,n)}).catch(i=>{throw this.logger.error(i.message),this.logger.error("Failed to send re-INVITE"),this.pendingReinvite=!1,i})}message(t={}){if(this.state!==V.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!==V.Established)return this.logger.error("Session.refer() may only be called if established session."),Promise.reject(new Error(`Invalid session state ${this.state}`));if(t instanceof hg&&!t.dialog)return this.logger.error("Session.refer() may only be called with session which is established. You are perhaps attempting to attended transfer to a target for which there is not dialog yet established. Perhaps you are attempting a 'semi-attended' tansfer? Regardless, this is not supported. The recommended approached is to check to see if the target Session is in the Established state before calling refer(); if the state is not Established you may proceed by falling back using a URI as the target (blind transfer)."),Promise.reject(new Error(`Invalid session state ${this.state}`));const n=r.requestDelegate,s=this.copyRequestOptions(r.requestOptions);return s.extraHeaders=s.extraHeaders?s.extraHeaders.concat(this.referExtraHeaders(this.referToString(t))):this.referExtraHeaders(this.referToString(t)),this._refer(r.onNotify,n,s)}_bye(t,r){if(!this.dialog)return Promise.reject(new Error("Session dialog undefined."));const n=this.dialog;switch(n.sessionState){case rr.Initial:throw new Error(`Invalid dialog state ${n.sessionState}`);case rr.Early:throw new Error(`Invalid dialog state ${n.sessionState}`);case rr.AckWait:return this.stateTransition(V.Terminating),new Promise(s=>{n.delegate={onAck:()=>{const i=n.bye(t,r);return this.stateTransition(V.Terminated),s(i),Promise.resolve()},onAckTimeout:()=>{const i=n.bye(t,r);this.stateTransition(V.Terminated),s(i)}}});case rr.Confirmed:{const s=n.bye(t,r);return this.stateTransition(V.Terminated),Promise.resolve(s)}case rr.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!==V.Established&&this.state!==V.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 Hw(t);this.delegate.onAck(s)}switch(this.pendingReinviteAck=!1,r.signalingState){case ce.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(V.Terminated),Promise.resolve()}case ce.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(V.Terminated)}):Promise.resolve()}case ce.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(V.Terminated),Promise.resolve()}case ce.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(V.Terminated),Promise.resolve()}case ce.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!==V.Established){this.logger.error(`BYE received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onBye){const r=new Mw(t);this.delegate.onBye(r)}else t.accept();this.stateTransition(V.Terminated)}onInfoRequest(t){if(this.logger.log("Session.onInfoRequest"),this.state!==V.Established){this.logger.error(`INFO received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onInfo){const r=new Nw(t);this.delegate.onInfo(r)}else t.accept()}onInviteRequest(t){if(this.logger.log("Session.onInviteRequest"),this.state!==V.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=ut.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===ce.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!==V.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(V.Terminated)}this.delegate&&this.delegate.onInvite&&this.delegate.onInvite(t.message,o.message,488)})})}onMessageRequest(t){if(this.logger.log("Session.onMessageRequest"),this.state!==V.Established){this.logger.error(`MESSAGE received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onMessage){const r=new Tf(t);this.delegate.onMessage(r)}else t.accept()}onNotifyRequest(t){if(this.logger.log("Session.onNotifyRequest"),this.state!==V.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!==V.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!==V.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 jw(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 ce.Initial:return this.getOffer(t);case ce.HaveLocalOffer:return Promise.resolve(void 0);case ce.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 ce.Stable:return this.state!==V.Established?Promise.resolve(void 0):this.getOffer(t);case ce.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=>Eo(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=>Eo(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 V.Initial:t!==V.Establishing&&t!==V.Established&&t!==V.Terminating&&t!==V.Terminated&&r();break;case V.Establishing:t!==V.Established&&t!==V.Terminating&&t!==V.Terminated&&r();break;case V.Established:t!==V.Terminating&&t!==V.Terminated&&r();break;case V.Terminating:t!==V.Terminated&&r();break;case V.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===V.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=xo(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 un)r=t.toString();else{if(!t.dialog)throw new Error("Dialog undefined.");const n=t.remoteIdentity.friendlyName,s=t.dialog.remoteTarget.toString(),i=t.dialog.callId,o=t.dialog.remoteTag,a=t.dialog.localTag;r=`"${n}" <${s}?Replaces=${encodeURIComponent(`${i};to-tag=${o};from-tag=${a}`)}>`}return r}},pr;(function(e){e.Required="Required",e.Supported="Supported",e.Unsupported="Unsupported"})(pr=pr||(pr={}));const Uw={"100rel":!0,199:!0,answermode:!0,"early-session":!0,eventlist:!0,explicitsub:!0,"from-change":!0,"geolocation-http":!0,"geolocation-sip":!0,gin:!0,gruu:!0,histinfo:!0,ice:!0,join:!0,"multiple-refer":!0,norefersub:!0,nosub:!0,outbound:!0,path:!0,policy:!0,precondition:!0,pref:!0,privacy:!0,"recipient-list-invite":!0,"recipient-list-message":!0,"recipient-list-subscribe":!0,replaces:!0,"resource-priority":!0,"sdp-anat":!0,"sec-agree":!0,tdialog:!0,timer:!0,uui:!0};var Cl=class extends Sl{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(V.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===V.Initial&&(t.reject({statusCode:487}),this.stateTransition(V.Terminated))},a)}const i=this.request.getHeader("P-Asserted-Identity");i&&(this._assertedIdentity=ut.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 V.Initial:return this.reject().then(()=>super.dispose());case V.Establishing:return this.reject().then(()=>super.dispose());case V.Established:return super.dispose();case V.Terminating:return super.dispose();case V.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!==V.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(V.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(V.Established),this._replacee&&this._replacee._bye()}).catch(t=>this.handleResponseError(t))}progress(e={}){if(this.logger.log("Invitation.progress"),this.state!==V.Initial){const r=new Error(`Invalid session state ${this.state}`);return this.logger.error(r.message),Promise.reject(r)}const t=e.statusCode||180;if(t<100||t>199)throw new TypeError("Invalid statusCode: "+t);return e.sessionDescriptionHandlerModifiers&&(this.sessionDescriptionHandlerModifiers=e.sessionDescriptionHandlerModifiers),e.sessionDescriptionHandlerOptions&&(this.sessionDescriptionHandlerOptions=e.sessionDescriptionHandlerOptions),this.waitingForPrack?(this.logger.warn("Unexpected call for progress while waiting for prack, ignoring"),Promise.resolve()):e.statusCode===100?this.sendProgressTrying().then(()=>{}).catch(r=>this.handleResponseError(r)):this.rel100!=="required"&&!(this.rel100==="supported"&&e.rel100)&&!(this.rel100==="supported"&&this.userAgent.configuration.sipExtension100rel===pr.Required)?this.sendProgress(e).then(()=>{}).catch(r=>this.handleResponseError(r)):this.sendProgressReliableWaitForPrack(e).then(()=>{}).catch(r=>this.handleResponseError(r))}reject(e={}){if(this.logger.log("Invitation.reject"),this.state!==V.Initial&&this.state!==V.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:xo(t),n=e.extraHeaders||[];if(t<300||t>699)throw new TypeError("Invalid statusCode: "+t);const s=e.body?Eo(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(V.Terminated),Promise.resolve()}_onCancel(e){if(this.logger.log("Invitation._onCancel"),this.state!==V.Initial&&this.state!==V.Establishing){this.logger.error(`CANCEL received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onCancel){const t=new qw(e);this.delegate.onCancel(t)}this.isCanceled=!0,this.incomingInviteRequest.reject({statusCode:487}),this.stateTransition(V.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 ce.Initial:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);case ce.Stable:return this.setAnswer(t,r).then(()=>{});case ce.HaveLocalOffer:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);case ce.HaveRemoteOffer:return this.setOfferAndGetAnswer(t,r);case ce.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 Ow?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 fn&&this.logger.error("Session changed state before response could be formulated and sent"),this.state===V.Initial||this.state===V.Establishing)try{this.incomingInviteRequest.reject({statusCode:t}),this.stateTransition(V.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(V.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?Eo(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 c,u;l.session.delegate={onPrack:C=>{c=C,clearTimeout(p),clearTimeout(w),this.waitingForPrack&&(this.waitingForPrack=!1,this.handlePrackOfferAnswer(c).then(v=>{try{u=c.accept({statusCode:200,body:v}),this.prackArrived(),o({prackRequest:c,prackResponse:u,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(w),this.reject({statusCode:504}).then(()=>a(new vl)).catch(C=>a(C)))},pt.T1*64),h=()=>{try{this.incomingInviteRequest.progress({statusCode:r,reasonPhrase:n,extraHeaders:s,body:i})}catch(C){this.waitingForPrack=!1,a(C);return}w=setTimeout(h,g*=2)};let g=pt.T1,w=setTimeout(h,g)}).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}},_l=class extends Sl{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=To(),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"?ut.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"?ut.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 c=(n.extraHeaders||[]).slice();s&&e.configuration.uri&&(c.push("P-Preferred-Identity: "+e.configuration.uri.toString()),c.push("Privacy: id")),c.push("Contact: "+i),c.push("Allow: "+["ACK","CANCEL","INVITE","MESSAGE","BYE","OPTIONS","INFO","NOTIFY","REFER"].toString()),e.configuration.sipExtension100rel===pr.Required&&c.push("Require: 100rel"),e.configuration.sipExtensionReplaces===pr.Required&&c.push("Require: replaces"),n.extraHeaders=c,this.outgoingRequestMessage=e.userAgentCore.makeOutgoingRequestMessage(fe.INVITE,t,o,a,l,c,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 V.Initial:return this.cancel().then(()=>super.dispose());case V.Establishing:return this.cancel().then(()=>super.dispose());case V.Established:return super.dispose();case V.Terminating:return super.dispose();case V.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!==V.Initial&&this.state!==V.Establishing){const r=new Error(`Invalid session state ${this.state}`);return this.logger.error(r.message),Promise.reject(r)}this.isCanceled=!0,this.stateTransition(V.Terminating);function t(r,n){if(r&&r<200||r>699)throw new TypeError("Invalid statusCode: "+r);if(r){const s=r,i=xo(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(V.Terminated);return Promise.resolve()}invite(e={}){if(this.logger.log("Inviter.invite"),this.state!==V.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(V.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(V.Establishing),this.sendInvite(e))).catch(r=>{throw this.logger.log(r.message),this.state!==V.Terminated&&this.stateTransition(V.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(V.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 Sl))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!==V.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=ut.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 ce.Initial:return this.logger.error("Received 2xx response to INVITE without a session description"),this.ackAndBye(e,400,"Missing session description"),this.stateTransition(V.Terminated),Promise.reject(new Error("Bad Media Description"));case ce.HaveLocalOffer:return this.logger.error("Received 2xx response to INVITE without a session description"),this.ackAndBye(e,400,"Missing session description"),this.stateTransition(V.Terminated),Promise.reject(new Error("Bad Media Description"));case ce.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(V.Established)}).catch(s=>{throw this.ackAndBye(e,488,"Invalid session description"),this.stateTransition(V.Terminated),s})}case ce.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(V.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(V.Terminated),Promise.reject(i)}return e.ack(),this.stateTransition(V.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(V.Established)}).catch(i=>{throw this.logger.error(i.message),this.ackAndBye(e,488,"Not Acceptable Here"),this.stateTransition(V.Terminated),i})}case ce.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!==V.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=ut.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 ce.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 ce.HaveLocalOffer:return o&&e.prack({extraHeaders:a}),Promise.resolve();case ce.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(c=>{const u={contentDisposition:"session",contentType:c.contentType,content:c.body};e.prack({extraHeaders:a,body:u})}).catch(c=>{throw this.stateTransition(V.Terminated),c})}case ce.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 c={sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers,sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions};return this.setAnswer(l,c).catch(u=>{throw this.stateTransition(V.Terminated),u})}return Promise.resolve();case ce.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!==V.Establishing&&this.state!==V.Terminating){this.logger.error(`Redirect received while in state ${this.state}, dropping response`);return}this.stateTransition(V.Terminated)}onReject(e){if(this.logger.log("Inviter.onReject"),this.state!==V.Establishing&&this.state!==V.Terminating){this.logger.error(`Reject received while in state ${this.state}, dropping response`);return}this.stateTransition(V.Terminated)}onTrying(e){if(this.logger.log("Inviter.onTrying"),this.state!==V.Establishing){this.logger.error(`Trying received while in state ${this.state}, dropping response`);return}}},Xe;(function(e){e.Initial="Initial",e.Registered="Registered",e.Unregistered="Unregistered",e.Terminated="Terminated"})(Xe=Xe||(Xe={}));var xl=class Xn{constructor(t,r={}){this.disposed=!1,this._contacts=[],this._retryAfter=void 0,this._state=Xe.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({},Xn.defaultOptions()),{registrar:n}),Xn.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&&ut.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(fe.REGISTER,s,i,o,a,l,void 0),this.expires=this.options.expires||Xn.defaultExpires,this.expires<0)throw new Error("Invalid expires.");if(this.refreshFrequency=this.options.refreshFrequency||Xn.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(c=>{const u=this.options[c];c==="registrar"?this.logger.log("· "+c+": "+u):this.logger.log("· "+c+": "+JSON.stringify(u))})),this.id=this.request.callId+this.request.from.parameters.tag,this.userAgent._registerers[this.id]=this}static defaultOptions(){return{expires:Xn.defaultExpires,extraContactHeaderParams:[],extraHeaders:[],logConfiguration:!0,instanceId:"",params:{},regId:0,registrar:new un("sip","anonymous","anonymous.invalid"),refreshFrequency:Xn.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===Xe.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===Xe.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&&bf(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(bf(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=ut.URIParse(l.replace(/"/g,"")))}if(a.hasParam("pub-gruu")){const l=a.getParam("pub-gruu");l&&(this.userAgent.contact.pubGruu=ut.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===Xe.Terminated)throw this.stateError(),new Error("Registerer terminated. Unable to register.");if(this.disposed&&this.state!==Xe.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!==Xe.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!==Xe.Registered&&this.stateTransition(Xe.Registered)}unregistered(){this.clearTimers(),this._state!==Xe.Unregistered&&this.stateTransition(Xe.Unregistered)}terminated(){this.clearTimers(),this._state!==Xe.Terminated&&this.stateTransition(Xe.Terminated)}stateTransition(t){const r=()=>{throw new Error(`Invalid state transition from ${this._state} to ${t}`)};switch(this._state){case Xe.Initial:t!==Xe.Registered&&t!==Xe.Unregistered&&t!==Xe.Terminated&&r();break;case Xe.Registered:t!==Xe.Unregistered&&t!==Xe.Terminated&&r();break;case Xe.Unregistered:t!==Xe.Registered&&t!==Xe.Terminated&&r();break;case Xe.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===Xe.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===Xe.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)}};xl.defaultExpires=600,xl.defaultRefreshFrequency=99;var Be;(function(e){e.Initial="Initial",e.NotifyWait="NotifyWait",e.Pending="Pending",e.Active="Active",e.Terminated="Terminated"})(Be=Be||(Be={}));var Ae;(function(e){e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Disconnected="Disconnected"})(Ae=Ae||(Ae={}));var Ct;(function(e){e.Started="Started",e.Stopped="Stopped"})(Ct=Ct||(Ct={}));var hn=class or{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=or.hexChars,n=or.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(or.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,or._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,or._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,or._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(or.buffer32Identity.subarray(i),i),r>55&&(or._md5cycle(this._state,s),s.set(or.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),c=parseInt(a[1],16)||0;s[14]=l,s[15]=c}return or._md5cycle(this._state,s),t?this._state:or._hex(this._state)}};hn.stateIdentity=new Int32Array([1732584193,-271733879,-1732584194,271733878]),hn.buffer32Identity=new Int32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),hn.hexChars="0123456789abcdef",hn.hexOut=[],hn.onePassHasher=new hn,hn.hashStr("hello")!=="5d41402abc4b2a76b9719d911017c592"&&console.error("Md5 self test failed.");function gn(e){return hn.hashStr(e)}var zw=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=Bn(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=gn(this.username+":"+this.realm+":"+this.password)),this.qop==="auth"?(r=gn(this.method+":"+this.uri),this.response=gn(t+":"+this.nonce+":"+this.ncHex+":"+this.cnonce+":auth:"+r)):this.qop==="auth-int"?(r=gn(this.method+":"+this.uri+":"+gn(e||"")),this.response=gn(t+":"+this.nonce+":"+this.ncHex+":"+this.cnonce+":auth-int:"+r)):this.qop===void 0&&(r=gn(this.method+":"+this.uri),this.response=gn(t+":"+this.nonce+":"+r))}},ht;(function(e){e[e.error=0]="error",e[e.warn=1]="warn",e[e.log=2]="log",e[e.debug=3]="debug"})(ht=ht||(ht={}));var Ef=class{constructor(e,t,r){this.logger=e,this.category=t,this.label=r}error(e){this.genericLog(ht.error,e)}warn(e){this.genericLog(ht.warn,e)}log(e){this.genericLog(ht.log,e)}debug(e){this.genericLog(ht.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}},Kw=class{constructor(){this.builtinEnabled=!0,this._level=ht.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:ht.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 Ef(this,e,t);if(this.loggers[e])return this.loggers[e];{const r=new Ef(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(ht[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 ht.error:console.error(n);break;case ht.warn:console.warn(n);break;case ht.log:console.log(n);break;case ht.debug:console.debug(n);break;default:break}}},Ao;(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
+ `,t}};function _f(e){return e==="application/sdp"?"session":"render"}function Eo(e){const t=typeof e=="string"?e:e.body,r=typeof e=="string"?"application/sdp":e.contentType;return{contentDisposition:_f(r),contentType:r,content:t}}function xf(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 Ss&&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 dn&&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(xf(e)&&(t=e.contentDisposition,r=e.contentType,n=e.content),!!n){if(r&&!t&&(t=_f(r)),!t)throw new Error("Content disposition undefined.");if(!r)throw new Error("Content type undefined.");return{contentDisposition:t,contentType:r,content:n}}}var rr;(function(e){e.Initial="Initial",e.Early="Early",e.AckWait="AckWait",e.Confirmed="Confirmed",e.Terminated="Terminated"})(rr=rr||(rr={}));var le;(function(e){e.Initial="Initial",e.HaveLocalOffer="HaveLocalOffer",e.HaveRemoteOffer="HaveRemoteOffer",e.Stable="Stable",e.Closed="Closed"})(le=le||(le={}));var Wr=500,Vw=4e3,yl=5e3;const pt={T1:Wr,T2:Vw,T4:yl,TIMER_B:64*Wr,TIMER_D:0*Wr,TIMER_F:64*Wr,TIMER_H:64*Wr,TIMER_I:0*yl,TIMER_J:0*Wr,TIMER_K:0*yl,TIMER_L:64*Wr,TIMER_M:64*Wr,TIMER_N:64*Wr,PROVISIONAL_RESPONSE_INTERVAL:6e4};var fn=class extends Nn{constructor(e){super(e||"Transaction state error.")}},de;(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"})(de=de||(de={}));const pn=[de.ACK,de.BYE,de.CANCEL,de.INFO,de.INVITE,de.MESSAGE,de.NOTIFY,de.OPTIONS,de.PRACK,de.REFER,de.REGISTER,de.SUBSCRIBE];var Tf=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()}},jw=class{constructor(e,t){this.incomingReferRequest=e,this.session=t}get referTo(){const e=this.incomingReferRequest.message.parseHeader("refer-to");if(!(e instanceof tr))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}},V;(function(e){e.Initial="Initial",e.Establishing="Establishing",e.Established="Established",e.Terminating="Terminating",e.Terminated="Terminated"})(V=V||(V={}));var Sl=class hg{constructor(t,r={}){this.pendingReinvite=!1,this.pendingReinviteAck=!1,this._state=V.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 V.Initial:break;case V.Establishing:break;case V.Established:return new Promise(t=>{this._bye({onAccept:()=>t(),onRedirect:()=>t(),onReject:()=>t()})});case V.Terminating:break;case V.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 V.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 V.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 V.Established:{const n=t.requestDelegate,s=this.copyRequestOptions(t.requestOptions);return this._bye(n,s)}case V.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 V.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!==V.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!==V.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(V.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===V.Terminated?i.ack():(this.ackAndBye(i,488,"Bad Media Description"),this.stateTransition(V.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!==V.Terminated?(this.ackAndBye(i,488,"Bad Media Description"),this.stateTransition(V.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!==V.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(V.Terminated)}}).then(()=>{t.requestDelegate&&t.requestDelegate.onReject&&t.requestDelegate.onReject(i)})},onTrying:i=>{}},n=t.requestOptions||{};if(n.extraHeaders=(n.extraHeaders||[]).slice(),n.extraHeaders.push("Allow: "+pn.toString()),n.extraHeaders.push("Contact: "+this._contact),t.withoutSdp){if(!this.dialog)throw this.pendingReinvite=!1,new Error("Dialog undefined.");return Promise.resolve(this.dialog.invite(r,n))}const s={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptionsReInvite,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiersReInvite};return this.getOffer(s).then(i=>{if(!this.dialog)throw this.pendingReinvite=!1,new Error("Dialog undefined.");return n.body=i,this.dialog.invite(r,n)}).catch(i=>{throw this.logger.error(i.message),this.logger.error("Failed to send re-INVITE"),this.pendingReinvite=!1,i})}message(t={}){if(this.state!==V.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!==V.Established)return this.logger.error("Session.refer() may only be called if established session."),Promise.reject(new Error(`Invalid session state ${this.state}`));if(t instanceof hg&&!t.dialog)return this.logger.error("Session.refer() may only be called with session which is established. You are perhaps attempting to attended transfer to a target for which there is not dialog yet established. Perhaps you are attempting a 'semi-attended' tansfer? Regardless, this is not supported. The recommended approached is to check to see if the target Session is in the Established state before calling refer(); if the state is not Established you may proceed by falling back using a URI as the target (blind transfer)."),Promise.reject(new Error(`Invalid session state ${this.state}`));const n=r.requestDelegate,s=this.copyRequestOptions(r.requestOptions);return s.extraHeaders=s.extraHeaders?s.extraHeaders.concat(this.referExtraHeaders(this.referToString(t))):this.referExtraHeaders(this.referToString(t)),this._refer(r.onNotify,n,s)}_bye(t,r){if(!this.dialog)return Promise.reject(new Error("Session dialog undefined."));const n=this.dialog;switch(n.sessionState){case rr.Initial:throw new Error(`Invalid dialog state ${n.sessionState}`);case rr.Early:throw new Error(`Invalid dialog state ${n.sessionState}`);case rr.AckWait:return this.stateTransition(V.Terminating),new Promise(s=>{n.delegate={onAck:()=>{const i=n.bye(t,r);return this.stateTransition(V.Terminated),s(i),Promise.resolve()},onAckTimeout:()=>{const i=n.bye(t,r);this.stateTransition(V.Terminated),s(i)}}});case rr.Confirmed:{const s=n.bye(t,r);return this.stateTransition(V.Terminated),Promise.resolve(s)}case rr.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!==V.Established&&this.state!==V.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 Hw(t);this.delegate.onAck(s)}switch(this.pendingReinviteAck=!1,r.signalingState){case le.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(V.Terminated),Promise.resolve()}case le.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(V.Terminated)}):Promise.resolve()}case le.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(V.Terminated),Promise.resolve()}case le.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(V.Terminated),Promise.resolve()}case le.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!==V.Established){this.logger.error(`BYE received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onBye){const r=new Mw(t);this.delegate.onBye(r)}else t.accept();this.stateTransition(V.Terminated)}onInfoRequest(t){if(this.logger.log("Session.onInfoRequest"),this.state!==V.Established){this.logger.error(`INFO received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onInfo){const r=new Nw(t);this.delegate.onInfo(r)}else t.accept()}onInviteRequest(t){if(this.logger.log("Session.onInviteRequest"),this.state!==V.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=ut.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===le.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!==V.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(V.Terminated)}this.delegate&&this.delegate.onInvite&&this.delegate.onInvite(t.message,o.message,488)})})}onMessageRequest(t){if(this.logger.log("Session.onMessageRequest"),this.state!==V.Established){this.logger.error(`MESSAGE received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onMessage){const r=new Tf(t);this.delegate.onMessage(r)}else t.accept()}onNotifyRequest(t){if(this.logger.log("Session.onNotifyRequest"),this.state!==V.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!==V.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!==V.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 jw(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 le.Initial:return this.getOffer(t);case le.HaveLocalOffer:return Promise.resolve(void 0);case le.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 le.Stable:return this.state!==V.Established?Promise.resolve(void 0):this.getOffer(t);case le.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=>Eo(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=>Eo(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 V.Initial:t!==V.Establishing&&t!==V.Established&&t!==V.Terminating&&t!==V.Terminated&&r();break;case V.Establishing:t!==V.Established&&t!==V.Terminating&&t!==V.Terminated&&r();break;case V.Established:t!==V.Terminating&&t!==V.Terminated&&r();break;case V.Terminating:t!==V.Terminated&&r();break;case V.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===V.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=xo(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 un)r=t.toString();else{if(!t.dialog)throw new Error("Dialog undefined.");const n=t.remoteIdentity.friendlyName,s=t.dialog.remoteTarget.toString(),i=t.dialog.callId,o=t.dialog.remoteTag,a=t.dialog.localTag;r=`"${n}" <${s}?Replaces=${encodeURIComponent(`${i};to-tag=${o};from-tag=${a}`)}>`}return r}},pr;(function(e){e.Required="Required",e.Supported="Supported",e.Unsupported="Unsupported"})(pr=pr||(pr={}));const Uw={"100rel":!0,199:!0,answermode:!0,"early-session":!0,eventlist:!0,explicitsub:!0,"from-change":!0,"geolocation-http":!0,"geolocation-sip":!0,gin:!0,gruu:!0,histinfo:!0,ice:!0,join:!0,"multiple-refer":!0,norefersub:!0,nosub:!0,outbound:!0,path:!0,policy:!0,precondition:!0,pref:!0,privacy:!0,"recipient-list-invite":!0,"recipient-list-message":!0,"recipient-list-subscribe":!0,replaces:!0,"resource-priority":!0,"sdp-anat":!0,"sec-agree":!0,tdialog:!0,timer:!0,uui:!0};var Cl=class extends Sl{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(V.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===V.Initial&&(t.reject({statusCode:487}),this.stateTransition(V.Terminated))},a)}const i=this.request.getHeader("P-Asserted-Identity");i&&(this._assertedIdentity=ut.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 V.Initial:return this.reject().then(()=>super.dispose());case V.Establishing:return this.reject().then(()=>super.dispose());case V.Established:return super.dispose();case V.Terminating:return super.dispose();case V.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!==V.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(V.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(V.Established),this._replacee&&this._replacee._bye()}).catch(t=>this.handleResponseError(t))}progress(e={}){if(this.logger.log("Invitation.progress"),this.state!==V.Initial){const r=new Error(`Invalid session state ${this.state}`);return this.logger.error(r.message),Promise.reject(r)}const t=e.statusCode||180;if(t<100||t>199)throw new TypeError("Invalid statusCode: "+t);return e.sessionDescriptionHandlerModifiers&&(this.sessionDescriptionHandlerModifiers=e.sessionDescriptionHandlerModifiers),e.sessionDescriptionHandlerOptions&&(this.sessionDescriptionHandlerOptions=e.sessionDescriptionHandlerOptions),this.waitingForPrack?(this.logger.warn("Unexpected call for progress while waiting for prack, ignoring"),Promise.resolve()):e.statusCode===100?this.sendProgressTrying().then(()=>{}).catch(r=>this.handleResponseError(r)):this.rel100!=="required"&&!(this.rel100==="supported"&&e.rel100)&&!(this.rel100==="supported"&&this.userAgent.configuration.sipExtension100rel===pr.Required)?this.sendProgress(e).then(()=>{}).catch(r=>this.handleResponseError(r)):this.sendProgressReliableWaitForPrack(e).then(()=>{}).catch(r=>this.handleResponseError(r))}reject(e={}){if(this.logger.log("Invitation.reject"),this.state!==V.Initial&&this.state!==V.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:xo(t),n=e.extraHeaders||[];if(t<300||t>699)throw new TypeError("Invalid statusCode: "+t);const s=e.body?Eo(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(V.Terminated),Promise.resolve()}_onCancel(e){if(this.logger.log("Invitation._onCancel"),this.state!==V.Initial&&this.state!==V.Establishing){this.logger.error(`CANCEL received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onCancel){const t=new qw(e);this.delegate.onCancel(t)}this.isCanceled=!0,this.incomingInviteRequest.reject({statusCode:487}),this.stateTransition(V.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 le.Initial:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);case le.Stable:return this.setAnswer(t,r).then(()=>{});case le.HaveLocalOffer:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);case le.HaveRemoteOffer:return this.setOfferAndGetAnswer(t,r);case le.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 Ow?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 fn&&this.logger.error("Session changed state before response could be formulated and sent"),this.state===V.Initial||this.state===V.Establishing)try{this.incomingInviteRequest.reject({statusCode:t}),this.stateTransition(V.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(V.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?Eo(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 c,u;l.session.delegate={onPrack:S=>{c=S,clearTimeout(p),clearTimeout(w),this.waitingForPrack&&(this.waitingForPrack=!1,this.handlePrackOfferAnswer(c).then(g=>{try{u=c.accept({statusCode:200,body:g}),this.prackArrived(),o({prackRequest:c,prackResponse:u,progressResponse:l})}catch(x){a(x)}}).catch(g=>a(g)))}};const p=setTimeout(()=>{this.waitingForPrack&&(this.waitingForPrack=!1,this.logger.warn("No PRACK received, rejecting INVITE."),clearTimeout(w),this.reject({statusCode:504}).then(()=>a(new vl)).catch(S=>a(S)))},pt.T1*64),h=()=>{try{this.incomingInviteRequest.progress({statusCode:r,reasonPhrase:n,extraHeaders:s,body:i})}catch(S){this.waitingForPrack=!1,a(S);return}w=setTimeout(h,m*=2)};let m=pt.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}},_l=class extends Sl{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=To(),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"?ut.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"?ut.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 c=(n.extraHeaders||[]).slice();s&&e.configuration.uri&&(c.push("P-Preferred-Identity: "+e.configuration.uri.toString()),c.push("Privacy: id")),c.push("Contact: "+i),c.push("Allow: "+["ACK","CANCEL","INVITE","MESSAGE","BYE","OPTIONS","INFO","NOTIFY","REFER"].toString()),e.configuration.sipExtension100rel===pr.Required&&c.push("Require: 100rel"),e.configuration.sipExtensionReplaces===pr.Required&&c.push("Require: replaces"),n.extraHeaders=c,this.outgoingRequestMessage=e.userAgentCore.makeOutgoingRequestMessage(de.INVITE,t,o,a,l,c,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 V.Initial:return this.cancel().then(()=>super.dispose());case V.Establishing:return this.cancel().then(()=>super.dispose());case V.Established:return super.dispose();case V.Terminating:return super.dispose();case V.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!==V.Initial&&this.state!==V.Establishing){const r=new Error(`Invalid session state ${this.state}`);return this.logger.error(r.message),Promise.reject(r)}this.isCanceled=!0,this.stateTransition(V.Terminating);function t(r,n){if(r&&r<200||r>699)throw new TypeError("Invalid statusCode: "+r);if(r){const s=r,i=xo(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(V.Terminated);return Promise.resolve()}invite(e={}){if(this.logger.log("Inviter.invite"),this.state!==V.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(V.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(V.Establishing),this.sendInvite(e))).catch(r=>{throw this.logger.log(r.message),this.state!==V.Terminated&&this.stateTransition(V.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(V.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 Sl))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!==V.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=ut.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 le.Initial:return this.logger.error("Received 2xx response to INVITE without a session description"),this.ackAndBye(e,400,"Missing session description"),this.stateTransition(V.Terminated),Promise.reject(new Error("Bad Media Description"));case le.HaveLocalOffer:return this.logger.error("Received 2xx response to INVITE without a session description"),this.ackAndBye(e,400,"Missing session description"),this.stateTransition(V.Terminated),Promise.reject(new Error("Bad Media Description"));case le.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(V.Established)}).catch(s=>{throw this.ackAndBye(e,488,"Invalid session description"),this.stateTransition(V.Terminated),s})}case le.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(V.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(V.Terminated),Promise.reject(i)}return e.ack(),this.stateTransition(V.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(V.Established)}).catch(i=>{throw this.logger.error(i.message),this.ackAndBye(e,488,"Not Acceptable Here"),this.stateTransition(V.Terminated),i})}case le.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!==V.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=ut.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 le.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 le.HaveLocalOffer:return o&&e.prack({extraHeaders:a}),Promise.resolve();case le.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(c=>{const u={contentDisposition:"session",contentType:c.contentType,content:c.body};e.prack({extraHeaders:a,body:u})}).catch(c=>{throw this.stateTransition(V.Terminated),c})}case le.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 c={sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers,sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions};return this.setAnswer(l,c).catch(u=>{throw this.stateTransition(V.Terminated),u})}return Promise.resolve();case le.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!==V.Establishing&&this.state!==V.Terminating){this.logger.error(`Redirect received while in state ${this.state}, dropping response`);return}this.stateTransition(V.Terminated)}onReject(e){if(this.logger.log("Inviter.onReject"),this.state!==V.Establishing&&this.state!==V.Terminating){this.logger.error(`Reject received while in state ${this.state}, dropping response`);return}this.stateTransition(V.Terminated)}onTrying(e){if(this.logger.log("Inviter.onTrying"),this.state!==V.Establishing){this.logger.error(`Trying received while in state ${this.state}, dropping response`);return}}},Xe;(function(e){e.Initial="Initial",e.Registered="Registered",e.Unregistered="Unregistered",e.Terminated="Terminated"})(Xe=Xe||(Xe={}));var xl=class Xn{constructor(t,r={}){this.disposed=!1,this._contacts=[],this._retryAfter=void 0,this._state=Xe.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({},Xn.defaultOptions()),{registrar:n}),Xn.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&&ut.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(de.REGISTER,s,i,o,a,l,void 0),this.expires=this.options.expires||Xn.defaultExpires,this.expires<0)throw new Error("Invalid expires.");if(this.refreshFrequency=this.options.refreshFrequency||Xn.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(c=>{const u=this.options[c];c==="registrar"?this.logger.log("· "+c+": "+u):this.logger.log("· "+c+": "+JSON.stringify(u))})),this.id=this.request.callId+this.request.from.parameters.tag,this.userAgent._registerers[this.id]=this}static defaultOptions(){return{expires:Xn.defaultExpires,extraContactHeaderParams:[],extraHeaders:[],logConfiguration:!0,instanceId:"",params:{},regId:0,registrar:new un("sip","anonymous","anonymous.invalid"),refreshFrequency:Xn.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===Xe.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===Xe.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&&bf(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(bf(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=ut.URIParse(l.replace(/"/g,"")))}if(a.hasParam("pub-gruu")){const l=a.getParam("pub-gruu");l&&(this.userAgent.contact.pubGruu=ut.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===Xe.Terminated)throw this.stateError(),new Error("Registerer terminated. Unable to register.");if(this.disposed&&this.state!==Xe.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!==Xe.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!==Xe.Registered&&this.stateTransition(Xe.Registered)}unregistered(){this.clearTimers(),this._state!==Xe.Unregistered&&this.stateTransition(Xe.Unregistered)}terminated(){this.clearTimers(),this._state!==Xe.Terminated&&this.stateTransition(Xe.Terminated)}stateTransition(t){const r=()=>{throw new Error(`Invalid state transition from ${this._state} to ${t}`)};switch(this._state){case Xe.Initial:t!==Xe.Registered&&t!==Xe.Unregistered&&t!==Xe.Terminated&&r();break;case Xe.Registered:t!==Xe.Unregistered&&t!==Xe.Terminated&&r();break;case Xe.Unregistered:t!==Xe.Registered&&t!==Xe.Terminated&&r();break;case Xe.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===Xe.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===Xe.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)}};xl.defaultExpires=600,xl.defaultRefreshFrequency=99;var Ne;(function(e){e.Initial="Initial",e.NotifyWait="NotifyWait",e.Pending="Pending",e.Active="Active",e.Terminated="Terminated"})(Ne=Ne||(Ne={}));var Te;(function(e){e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Disconnected="Disconnected"})(Te=Te||(Te={}));var Ct;(function(e){e.Started="Started",e.Stopped="Stopped"})(Ct=Ct||(Ct={}));var hn=class or{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=or.hexChars,n=or.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(or.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,or._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,or._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,or._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(or.buffer32Identity.subarray(i),i),r>55&&(or._md5cycle(this._state,s),s.set(or.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),c=parseInt(a[1],16)||0;s[14]=l,s[15]=c}return or._md5cycle(this._state,s),t?this._state:or._hex(this._state)}};hn.stateIdentity=new Int32Array([1732584193,-271733879,-1732584194,271733878]),hn.buffer32Identity=new Int32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),hn.hexChars="0123456789abcdef",hn.hexOut=[],hn.onePassHasher=new hn,hn.hashStr("hello")!=="5d41402abc4b2a76b9719d911017c592"&&console.error("Md5 self test failed.");function gn(e){return hn.hashStr(e)}var zw=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=Bn(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=gn(this.username+":"+this.realm+":"+this.password)),this.qop==="auth"?(r=gn(this.method+":"+this.uri),this.response=gn(t+":"+this.nonce+":"+this.ncHex+":"+this.cnonce+":auth:"+r)):this.qop==="auth-int"?(r=gn(this.method+":"+this.uri+":"+gn(e||"")),this.response=gn(t+":"+this.nonce+":"+this.ncHex+":"+this.cnonce+":auth-int:"+r)):this.qop===void 0&&(r=gn(this.method+":"+this.uri),this.response=gn(t+":"+this.nonce+":"+r))}},ht;(function(e){e[e.error=0]="error",e[e.warn=1]="warn",e[e.log=2]="log",e[e.debug=3]="debug"})(ht=ht||(ht={}));var Ef=class{constructor(e,t,r){this.logger=e,this.category=t,this.label=r}error(e){this.genericLog(ht.error,e)}warn(e){this.genericLog(ht.warn,e)}log(e){this.genericLog(ht.log,e)}debug(e){this.genericLog(ht.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}},Kw=class{constructor(){this.builtinEnabled=!0,this._level=ht.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:ht.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 Ef(this,e,t);if(this.loggers[e])return this.loggers[e];{const r=new Ef(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(ht[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 ht.error:console.error(n);break;case ht.warn:console.warn(n);break;case ht.log:console.log(n);break;case ht.debug:console.debug(n);break;default:break}}},Ao;(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
28
28
  `,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),c=i.substring(o,l).trim(),u=i.substring(l+1,a).trim();let d;switch(c.toLowerCase()){case"via":case"v":s.addHeader("via",u),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",u),d=s.parseHeader("from"),d&&(s.from=d,s.fromTag=d.getParam("tag"));break;case"to":case"t":s.setHeader("to",u),d=s.parseHeader("to"),d&&(s.to=d,s.toTag=d.getParam("tag"));break;case"record-route":if(d=ut.parse(u,"Record_Route"),d===-1){d=void 0;break}if(!(d instanceof Array)){d=void 0;break}d.forEach(p=>{s.addHeader("record-route",u.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",u),d=s.parseHeader("call-id"),d&&(s.callId=u);break;case"contact":case"m":if(d=ut.parse(u,"Contact"),d===-1){d=void 0;break}if(!(d instanceof Array)){d=void 0;break}d.forEach(p=>{s.addHeader("contact",u.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",u),d=s.parseHeader("content-length");break;case"content-type":case"c":s.setHeader("content-type",u),d=s.parseHeader("content-type");break;case"cseq":s.setHeader("cseq",u),d=s.parseHeader("cseq"),d&&(s.cseq=d.value),s instanceof dn&&(s.method=d.method);break;case"max-forwards":s.setHeader("max-forwards",u),d=s.parseHeader("max-forwards");break;case"www-authenticate":s.setHeader("www-authenticate",u),d=s.parseHeader("www-authenticate");break;case"proxy-authenticate":s.setHeader("proxy-authenticate",u),d=s.parseHeader("proxy-authenticate");break;case"refer-to":case"r":s.setHeader("refer-to",u),d=s.parseHeader("refer-to"),d&&(s.referTo=d);break;default:s.addHeader(c.toLowerCase(),u),d=0}return d===void 0?{error:"error parsing header '"+c+"'"}:!0}e.parseHeader=r;function n(s,i){let o=0,a=s.indexOf(`\r
29
29
  `);if(a===-1){i.warn("no CRLF found, not a SIP message, discarded");return}const l=s.substring(0,a),c=ut.parse(l,"Request_Response");let u;if(c===-1){i.warn('error parsing first line of SIP message: "'+l+'"');return}else c.status_code?(u=new dn,u.statusCode=c.status_code,u.reasonPhrase=c.reason_phrase):(u=new Ss,u.method=c.method,u.ruri=c.uri);u.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(u,s,o,a);if(p&&p!==!0){i.error(p.error);return}o=a+2}return u.hasHeader("content-length")?u.body=s.substr(d,Number(u.getHeader("content-length"))):u.body=s.substring(d),u}e.parseMessage=n})(Ao=Ao||(Ao={}));function Af(e,t){if(t.statusCode<100||t.statusCode>699)throw new TypeError("Invalid statusCode: "+t.statusCode);const n=t.reasonPhrase?t.reasonPhrase:xo(t.statusCode);let s="SIP/2.0 "+t.statusCode+" "+n+`\r
30
30
  `;t.statusCode>=100&&t.statusCode<200,t.statusCode;const i="From: "+e.getHeader("From")+`\r
31
31
  `,o="Call-ID: "+e.callId+`\r
32
32
  `,a="CSeq: "+e.cseq+" "+e.method+`\r
33
- `,l=e.getHeaders("via").reduce((h,g)=>h+"Via: "+g+`\r
33
+ `,l=e.getHeaders("via").reduce((h,m)=>h+"Via: "+m+`\r
34
34
  `,"");let c="To: "+e.getHeader("to");if(t.statusCode>100&&!e.parseHeader("to").hasParam("tag")){let h=t.toTag;h||(h=To()),c+=";tag="+h}c+=`\r
35
35
  `;let u="";t.supported&&(u="Supported: "+t.supported.join(", ")+`\r
36
36
  `);let d="";t.userAgent&&(d="User-Agent: "+t.userAgent+`\r
37
- `);let p="";return t.extraHeaders&&(p=t.extraHeaders.reduce((h,g)=>h+g.trim()+`\r
37
+ `);let p="";return t.extraHeaders&&(p=t.extraHeaders.reduce((h,m)=>h+m.trim()+`\r
38
38
  `,"")),s+=l,s+=i,s+=c,s+=a,s+=o,s+=u,s+=d,s+=p,t.body?(s+="Content-Type: "+t.body.contentType+`\r
39
39
  `,s+="Content-Length: "+fi(t.body.content)+`\r
40
40
  \r
41
41
  `,s+=t.body.content):s+=`Content-Length: 0\r
42
42
  \r
43
- `,{message:s}}var Tl=class extends Nn{constructor(e){super(e||"Unspecified transport error.")}},kf=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 Tl)throw this.onTransportError(t),t;let r;throw t&&typeof t.message=="string"?r=new Tl(t.message):r=new Tl,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"}},If=class extends kf{constructor(e,t,r,n,s){super(t,r,e.viaBranch,n,s),this._request=e,this.user=r}get request(){return this._request}},F;(function(e){e.Accepted="Accepted",e.Calling="Calling",e.Completed="Completed",e.Confirmed="Confirmed",e.Proceeding="Proceeding",e.Terminated="Terminated",e.Trying="Trying"})(F=F||(F={}));var Bt=class extends If{constructor(e,t,r){super(e,t,r,F.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 F.Proceeding:if(e.method===fe.INVITE){this.lastProvisionalResponse&&this.send(this.lastProvisionalResponse).catch(r=>{this.logTransportError(r,"Failed to send retransmission of provisional response.")});return}break;case F.Accepted:if(e.method===fe.INVITE)return;break;case F.Completed:if(e.method===fe.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===fe.ACK){this.stateTransition(F.Confirmed);return}break;case F.Confirmed:if(e.method===fe.INVITE||e.method===fe.ACK)return;break;case F.Terminated:if(e.method===fe.INVITE||e.method===fe.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 F.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(F.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(F.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send non-2xx final response.")});return}break;case F.Accepted:if(e>=200&&e<=299){this.send(t).catch(n=>{this.logTransportError(n,"Failed to send 2xx response.")});return}break;case F.Completed:break;case F.Confirmed:break;case F.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===F.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 F.Proceeding:t();break;case F.Accepted:case F.Completed:this.state!==F.Proceeding&&t();break;case F.Confirmed:this.state!==F.Completed&&t();break;case F.Terminated:this.state!==F.Accepted&&this.state!==F.Completed&&this.state!==F.Confirmed&&t();break;default:t()}this.stopProgressExtensionTimer(),e===F.Accepted&&(this.L=setTimeout(()=>this.timerL(),pt.TIMER_L)),e===F.Completed&&(this.H=setTimeout(()=>this.timerH(),pt.TIMER_H)),e===F.Confirmed&&(this.I=setTimeout(()=>this.timerI(),pt.TIMER_I)),e===F.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.")})},pt.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===F.Completed&&(this.logger.warn("ACK to negative final response was never received, terminating transaction."),this.stateTransition(F.Terminated))}timerI(){this.logger.debug(`Timer I expired for INVITE server transaction ${this.id}.`),this.stateTransition(F.Terminated)}timerL(){this.logger.debug(`Timer L expired for INVITE server transaction ${this.id}.`),this.state===F.Accepted&&this.stateTransition(F.Terminated)}},Rf=class gg extends kf{constructor(t,r,n,s,i){super(r,n,gg.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()}},Lt=class extends Rf{constructor(e,t,r){super(e,t,r,F.Trying,"sip.transaction.nict"),this.F=setTimeout(()=>this.timerF(),pt.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 F.Trying:if(t>=100&&t<=199){this.stateTransition(F.Proceeding),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=200&&t<=699){if(this.stateTransition(F.Completed),t===408){this.onRequestTimeout();return}this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case F.Proceeding:if(t>=100&&t<=199&&this.user.receiveResponse)return this.user.receiveResponse(e);if(t>=200&&t<=699){if(this.stateTransition(F.Completed),t===408){this.onRequestTimeout();return}this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case F.Completed:return;case F.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(F.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 F.Trying:r();break;case F.Proceeding:this.state!==F.Trying&&r();break;case F.Completed:this.state!==F.Trying&&this.state!==F.Proceeding&&r();break;case F.Terminated:this.state!==F.Trying&&this.state!==F.Proceeding&&this.state!==F.Completed&&(t||r());break;default:r()}e===F.Completed&&(this.F&&(clearTimeout(this.F),this.F=void 0),this.K=setTimeout(()=>this.timerK(),pt.TIMER_K)),e===F.Terminated&&this.dispose(),this.setState(e)}timerF(){this.logger.debug(`Timer F expired for non-INVITE client transaction ${this.id}.`),(this.state===F.Trying||this.state===F.Proceeding)&&(this.onRequestTimeout(),this.stateTransition(F.Terminated))}timerK(){this.state===F.Completed&&this.stateTransition(F.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 tr))throw new Error("Contact not instance of NameAddrHeader.");const i=s.uri,o=e.cseq,a=void 0,l=e.callId,c=e.fromTag,u=t.toTag;if(!l)throw new Error("Call id undefined.");if(!c)throw new Error("From tag undefined.");if(!u)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+c+u,early:h,callId:l,localTag:c,remoteTag:u,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 tr))throw new Error("Contact not instance of NameAddrHeader.");const o=i.uri,a=e.cseq,l=void 0,c=e.callId,u=t,d=e.fromTag,p=e.from.uri,h=e.to.uri;return{id:c+u+d,early:r,callId:c,localTag:u,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!==fe.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,c=this.routeSet,u=t&&t.extraHeaders,d=t&&t.body;return this.userAgentCore.makeOutgoingRequestMessage(e,l,s,r,{callId:o,cseq:a,fromTag:i,toTag:n,routeSet:c},u,d)}incrementLocalSequenceNumber(){if(!this.dialogState.localSequenceNumber)throw new Error("Local sequence number undefined.");this.dialogState.localSequenceNumber+=1}sequenceGuard(e){return e.method===fe.ACK?!0:this.remoteSequenceNumber&&e.cseq<=this.remoteSequenceNumber?(this.core.replyStateless(e,{statusCode:500}),!1):!0}},vn=class extends Rf{constructor(e,t,r){super(e,t,r,F.Calling,"sip.transaction.ict"),this.ackRetransmissionCache=new Map,this.B=setTimeout(()=>this.timerB(),pt.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 F.Calling:if(t>=100&&t<=199){this.stateTransition(F.Proceeding),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=200&&t<=299){this.ackRetransmissionCache.set(e.toTag,void 0),this.stateTransition(F.Accepted),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=300&&t<=699){this.stateTransition(F.Completed),this.ack(e),this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case F.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(F.Accepted),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=300&&t<=699){this.stateTransition(F.Completed),this.ack(e),this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case F.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 F.Completed:if(t>=300&&t<=699){this.ack(e);return}break;case F.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(F.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
+ `,{message:s}}var Tl=class extends Nn{constructor(e){super(e||"Unspecified transport error.")}},kf=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 Tl)throw this.onTransportError(t),t;let r;throw t&&typeof t.message=="string"?r=new Tl(t.message):r=new Tl,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"}},If=class extends kf{constructor(e,t,r,n,s){super(t,r,e.viaBranch,n,s),this._request=e,this.user=r}get request(){return this._request}},L;(function(e){e.Accepted="Accepted",e.Calling="Calling",e.Completed="Completed",e.Confirmed="Confirmed",e.Proceeding="Proceeding",e.Terminated="Terminated",e.Trying="Trying"})(L=L||(L={}));var Bt=class extends If{constructor(e,t,r){super(e,t,r,L.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 L.Proceeding:if(e.method===de.INVITE){this.lastProvisionalResponse&&this.send(this.lastProvisionalResponse).catch(r=>{this.logTransportError(r,"Failed to send retransmission of provisional response.")});return}break;case L.Accepted:if(e.method===de.INVITE)return;break;case L.Completed:if(e.method===de.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===de.ACK){this.stateTransition(L.Confirmed);return}break;case L.Confirmed:if(e.method===de.INVITE||e.method===de.ACK)return;break;case L.Terminated:if(e.method===de.INVITE||e.method===de.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 L.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(L.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(L.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send non-2xx final response.")});return}break;case L.Accepted:if(e>=200&&e<=299){this.send(t).catch(n=>{this.logTransportError(n,"Failed to send 2xx response.")});return}break;case L.Completed:break;case L.Confirmed:break;case L.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===L.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 L.Proceeding:t();break;case L.Accepted:case L.Completed:this.state!==L.Proceeding&&t();break;case L.Confirmed:this.state!==L.Completed&&t();break;case L.Terminated:this.state!==L.Accepted&&this.state!==L.Completed&&this.state!==L.Confirmed&&t();break;default:t()}this.stopProgressExtensionTimer(),e===L.Accepted&&(this.L=setTimeout(()=>this.timerL(),pt.TIMER_L)),e===L.Completed&&(this.H=setTimeout(()=>this.timerH(),pt.TIMER_H)),e===L.Confirmed&&(this.I=setTimeout(()=>this.timerI(),pt.TIMER_I)),e===L.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.")})},pt.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===L.Completed&&(this.logger.warn("ACK to negative final response was never received, terminating transaction."),this.stateTransition(L.Terminated))}timerI(){this.logger.debug(`Timer I expired for INVITE server transaction ${this.id}.`),this.stateTransition(L.Terminated)}timerL(){this.logger.debug(`Timer L expired for INVITE server transaction ${this.id}.`),this.state===L.Accepted&&this.stateTransition(L.Terminated)}},Rf=class gg extends kf{constructor(t,r,n,s,i){super(r,n,gg.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()}},Lt=class extends Rf{constructor(e,t,r){super(e,t,r,L.Trying,"sip.transaction.nict"),this.F=setTimeout(()=>this.timerF(),pt.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 L.Trying:if(t>=100&&t<=199){this.stateTransition(L.Proceeding),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=200&&t<=699){if(this.stateTransition(L.Completed),t===408){this.onRequestTimeout();return}this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case L.Proceeding:if(t>=100&&t<=199&&this.user.receiveResponse)return this.user.receiveResponse(e);if(t>=200&&t<=699){if(this.stateTransition(L.Completed),t===408){this.onRequestTimeout();return}this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case L.Completed:return;case L.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(L.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 L.Trying:r();break;case L.Proceeding:this.state!==L.Trying&&r();break;case L.Completed:this.state!==L.Trying&&this.state!==L.Proceeding&&r();break;case L.Terminated:this.state!==L.Trying&&this.state!==L.Proceeding&&this.state!==L.Completed&&(t||r());break;default:r()}e===L.Completed&&(this.F&&(clearTimeout(this.F),this.F=void 0),this.K=setTimeout(()=>this.timerK(),pt.TIMER_K)),e===L.Terminated&&this.dispose(),this.setState(e)}timerF(){this.logger.debug(`Timer F expired for non-INVITE client transaction ${this.id}.`),(this.state===L.Trying||this.state===L.Proceeding)&&(this.onRequestTimeout(),this.stateTransition(L.Terminated))}timerK(){this.state===L.Completed&&this.stateTransition(L.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 tr))throw new Error("Contact not instance of NameAddrHeader.");const i=s.uri,o=e.cseq,a=void 0,l=e.callId,c=e.fromTag,u=t.toTag;if(!l)throw new Error("Call id undefined.");if(!c)throw new Error("From tag undefined.");if(!u)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+c+u,early:h,callId:l,localTag:c,remoteTag:u,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 tr))throw new Error("Contact not instance of NameAddrHeader.");const o=i.uri,a=e.cseq,l=void 0,c=e.callId,u=t,d=e.fromTag,p=e.from.uri,h=e.to.uri;return{id:c+u+d,early:r,callId:c,localTag:u,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!==de.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,c=this.routeSet,u=t&&t.extraHeaders,d=t&&t.body;return this.userAgentCore.makeOutgoingRequestMessage(e,l,s,r,{callId:o,cseq:a,fromTag:i,toTag:n,routeSet:c},u,d)}incrementLocalSequenceNumber(){if(!this.dialogState.localSequenceNumber)throw new Error("Local sequence number undefined.");this.dialogState.localSequenceNumber+=1}sequenceGuard(e){return e.method===de.ACK?!0:this.remoteSequenceNumber&&e.cseq<=this.remoteSequenceNumber?(this.core.replyStateless(e,{statusCode:500}),!1):!0}},vn=class extends Rf{constructor(e,t,r){super(e,t,r,L.Calling,"sip.transaction.ict"),this.ackRetransmissionCache=new Map,this.B=setTimeout(()=>this.timerB(),pt.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 L.Calling:if(t>=100&&t<=199){this.stateTransition(L.Proceeding),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=200&&t<=299){this.ackRetransmissionCache.set(e.toTag,void 0),this.stateTransition(L.Accepted),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=300&&t<=699){this.stateTransition(L.Completed),this.ack(e),this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case L.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(L.Accepted),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=300&&t<=699){this.stateTransition(L.Completed),this.ack(e),this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case L.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 L.Completed:if(t>=300&&t<=699){this.ack(e);return}break;case L.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(L.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
44
44
  `;a&&(l+=`Route: ${a}\r
45
45
  `),l+=`Via: ${o}\r
46
46
  `,l+=`To: ${i}\r
@@ -50,27 +50,27 @@
50
50
  `,l+=`Max-Forwards: 70\r
51
51
  `,l+=`Content-Length: 0\r
52
52
  \r
53
- `,this.send(l).catch(c=>{this.logTransportError(c,"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 F.Calling:r();break;case F.Proceeding:this.state!==F.Calling&&r();break;case F.Accepted:case F.Completed:this.state!==F.Calling&&this.state!==F.Proceeding&&r();break;case F.Terminated:this.state!==F.Calling&&this.state!==F.Accepted&&this.state!==F.Completed&&(t||r());break;default:r()}this.B&&(clearTimeout(this.B),this.B=void 0),F.Proceeding,e===F.Completed&&(this.D=setTimeout(()=>this.timerD(),pt.TIMER_D)),e===F.Accepted&&(this.M=setTimeout(()=>this.timerM(),pt.TIMER_M)),e===F.Terminated&&this.dispose(),this.setState(e)}timerA(){}timerB(){this.logger.debug(`Timer B expired for INVITE client transaction ${this.id}.`),this.state===F.Calling&&(this.onRequestTimeout(),this.stateTransition(F.Terminated))}timerD(){this.logger.debug(`Timer D expired for INVITE client transaction ${this.id}.`),this.state===F.Completed&&this.stateTransition(F.Terminated)}timerM(){this.logger.debug(`Timer M expired for INVITE client transaction ${this.id}.`),this.state===F.Accepted&&this.stateTransition(F.Terminated)}},Vt=class Ec{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(fe.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===F.Proceeding?new Ec(Lt,this.core,n):this.transaction.addStateChangeListener(()=>{this.transaction&&this.transaction.state===F.Proceeding&&new Ec(Lt,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 dn;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 dn;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===F.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)}},Ww=class extends Vt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(fe.BYE,r);super(Lt,e.userAgentCore,n,t),e.dispose()}},jt=class extends If{constructor(e,t,r){super(e,t,r,F.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 F.Trying:break;case F.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 F.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 F.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 F.Trying:if(this.lastResponse=t,e>=100&&e<200){this.stateTransition(F.Proceeding),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send provisional response.")});return}if(e>=200&&e<=699){this.stateTransition(F.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send final response.")});return}break;case F.Proceeding:if(this.lastResponse=t,e>=200&&e<=699){this.stateTransition(F.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send final response.")});return}break;case F.Completed:return;case F.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(F.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 F.Trying:r();break;case F.Proceeding:this.state!==F.Trying&&r();break;case F.Completed:this.state!==F.Trying&&this.state!==F.Proceeding&&r();break;case F.Terminated:this.state!==F.Proceeding&&this.state!==F.Completed&&(t||r());break;default:r()}e===F.Completed&&(this.J=setTimeout(()=>this.timerJ(),pt.TIMER_J)),e===F.Terminated&&this.dispose(),this.setState(e)}timerJ(){this.logger.debug(`Timer J expired for NON-INVITE server transaction ${this.id}.`),this.state===F.Completed&&this.stateTransition(F.Terminated)}},xr=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:To(),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 fn(`${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 fn(`${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 fn(`${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 fn(`${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 fn(`${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 Bt)return this.transaction.state===F.Proceeding||this.transaction.state===F.Accepted;if(this.transaction instanceof jt)return this.transaction.state===F.Trying||this.transaction.state===F.Proceeding;throw new Error("Unknown transaction type.")}get progressable(){if(this.transaction instanceof Bt)return this.transaction.state===F.Proceeding;if(this.transaction instanceof jt)return!1;throw new Error("Unknown transaction type.")}get redirectable(){if(this.transaction instanceof Bt)return this.transaction.state===F.Proceeding;if(this.transaction instanceof jt)return this.transaction.state===F.Trying||this.transaction.state===F.Proceeding;throw new Error("Unknown transaction type.")}get rejectable(){if(this.transaction instanceof Bt)return this.transaction.state===F.Proceeding;if(this.transaction instanceof jt)return this.transaction.state===F.Trying||this.transaction.state===F.Proceeding;throw new Error("Unknown transaction type.")}get tryingable(){if(this.transaction instanceof Bt)return this.transaction.state===F.Proceeding;if(this.transaction instanceof jt)return this.transaction.state===F.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=Af(this.message,e);return this.transaction.receiveResponse(e.statusCode,t.message),t}init(){const e={loggerFactory:this.loggerFactory,onStateChange:n=>{n===F.Terminated&&(this.core.userAgentServers.delete(r),this.dispose())},onTransportError:n=>{this.logger.error(n.message),this.delegate&&this.delegate.onTransportError?this.delegate.onTransportError(n):this.logger.error("User agent server response transport error.")}},t=new this.transactionConstructor(this.message,this.core.transport,e);this._transaction=t;const r=t.id;this.core.userAgentServers.set(t.id,this)}},Gw=class extends xr{constructor(e,t,r){super(jt,e.userAgentCore,t,r)}},Jw=class extends Vt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(fe.INFO,r);super(Lt,e.userAgentCore,n,t)}},Yw=class extends xr{constructor(e,t,r){super(jt,e.userAgentCore,t,r)}},$f=class extends Vt{constructor(e,t,r){super(Lt,e,t,r)}},Df=class extends xr{constructor(e,t,r){super(jt,e,t,r)}},Zw=class extends Vt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(fe.NOTIFY,r);super(Lt,e.userAgentCore,n,t)}};function Xw(e){return e.userAgentCore!==void 0}var ko=class extends xr{constructor(e,t,r){const n=Xw(e)?e.userAgentCore:e;super(jt,n,t,r)}},Qw=class extends Vt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(fe.PRACK,r);super(Lt,e.userAgentCore,n,t),e.signalingStateTransition(n)}},ey=class extends xr{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)}},ty=class extends Vt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(fe.INVITE,r);super(vn,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}`)}}},ry=class extends xr{constructor(e,t,r){super(Bt,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)}},ny=class extends Vt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(fe.REFER,r);super(Lt,e.userAgentCore,n,t)}};function sy(e){return e.userAgentCore!==void 0}var Pf=class extends xr{constructor(e,t,r){const n=sy(e)?e.userAgentCore:e;super(jt,n,t,r)}},Io=class extends Cs{constructor(e,t,r,n){super(t,r),this.initialTransaction=e,this._signalingState=ce.Initial,this.ackWait=!1,this.ackProcessing=!1,this.delegate=n,e instanceof Bt&&(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=ce.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?rr.Early:this.ackWait?rr.AckWait:this._signalingState===ce.Closed?rr.Terminated:rr.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 vn))throw new Error("Transaction not instance of InviteClientTransaction.");t=this.reinviteUserAgentClient.transaction,this.reinviteUserAgentClient=void 0}else{if(!(this.initialTransaction instanceof vn))throw new Error("Initial transaction not instance of InviteClientTransaction.");t=this.initialTransaction}const r=this.createOutgoingRequestMessage(fe.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 Bt){if(this.early)throw new Error("UAS MUST NOT send a BYE on early dialogs.");if(this.ackWait&&this.initialTransaction.state!==F.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 Ww(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 Jw(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 ty(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(fe.MESSAGE,t);return new $f(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 Zw(this,e,t)}prack(e,t){return this.logger.log(`INVITE dialog ${this.id} sending PRACK request`),new Qw(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 ny(this,e,t)}receiveRequest(e){if(this.logger.log(`INVITE dialog ${this.id} received ${e.method} request`),e.method===fe.ACK){if(this.ackWait){if(this.initialTransaction instanceof vn){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===fe.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!==ce.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===fe.INVITE){const t=e.parseHeader("contact");if(!t)throw new Error("Contact undefined.");if(!(t instanceof tr))throw new Error("Contact not instance of NameAddrHeader.");this.dialogState.remoteTarget=t.uri}switch(e.method){case fe.BYE:{const t=new Gw(this,e);this.delegate&&this.delegate.onBye?this.delegate.onBye(t):t.accept(),this.dispose()}break;case fe.INFO:{const t=new Yw(this,e);this.delegate&&this.delegate.onInfo?this.delegate.onInfo(t):t.reject({statusCode:469,extraHeaders:["Recv-Info:"]})}break;case fe.INVITE:{const t=new ry(this,e);this.signalingStateTransition(e),this.delegate&&this.delegate.onInvite?this.delegate.onInvite(t):t.reject({statusCode:488})}break;case fe.MESSAGE:{const t=new Df(this.core,e);this.delegate&&this.delegate.onMessage?this.delegate.onMessage(t):t.accept()}break;case fe.NOTIFY:{const t=new ko(this,e);this.delegate&&this.delegate.onNotify?this.delegate.onNotify(t):t.accept()}break;case fe.PRACK:{const t=new ey(this,e);this.delegate&&this.delegate.onPrack?this.delegate.onPrack(t):t.accept()}break;case fe.REFER:{const t=new Pf(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===ce.HaveLocalOffer||this.signalingState===ce.HaveRemoteOffer)&&this._rollbackOffer&&this._rollbackAnswer&&(this._signalingState=ce.Stable,this._offer=this._rollbackOffer,this._answer=this._rollbackAnswer)}signalingStateTransition(e){const t=pi(e);if(!(!t||t.contentDisposition!=="session")){if(this._signalingState===ce.Stable&&(this._rollbackOffer=this._offer,this._rollbackAnswer=this._answer),e instanceof Ss)switch(this._signalingState){case ce.Initial:case ce.Stable:this._signalingState=ce.HaveRemoteOffer,this._offer=t,this._answer=void 0;break;case ce.HaveLocalOffer:this._signalingState=ce.Stable,this._answer=t;break;case ce.HaveRemoteOffer:break;case ce.Closed:break;default:throw new Error("Unexpected signaling state.")}if(e instanceof dn)switch(this._signalingState){case ce.Initial:case ce.Stable:this._signalingState=ce.HaveRemoteOffer,this._offer=t,this._answer=void 0;break;case ce.HaveLocalOffer:this._signalingState=ce.Stable,this._answer=t;break;case ce.HaveRemoteOffer:break;case ce.Closed:break;default:throw new Error("Unexpected signaling state.")}if(e instanceof wl)switch(this._signalingState){case ce.Initial:case ce.Stable:this._signalingState=ce.HaveLocalOffer,this._offer=t,this._answer=void 0;break;case ce.HaveLocalOffer:break;case ce.HaveRemoteOffer:this._signalingState=ce.Stable,this._answer=t;break;case ce.Closed:break;default:throw new Error("Unexpected signaling state.")}if(xf(e))switch(this._signalingState){case ce.Initial:case ce.Stable:this._signalingState=ce.HaveLocalOffer,this._offer=t,this._answer=void 0;break;case ce.HaveLocalOffer:break;case ce.HaveRemoteOffer:this._signalingState=ce.Stable,this._answer=t;break;case ce.Closed:break;default:throw new Error("Unexpected signaling state.")}}}start2xxRetransmissionTimer(){if(this.initialTransaction instanceof Bt){const e=this.initialTransaction;let t=pt.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,pt.T2),this.invite2xxTimer=setTimeout(r,t)};this.invite2xxTimer=setTimeout(r,t);const n=()=>{e.state===F.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 Bt){const e=this.reinviteUserAgentServer.transaction;let t=pt.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,pt.T2),this.invite2xxTimer=setTimeout(r,t)};this.invite2xxTimer=setTimeout(r,t);const n=()=>{e.state===F.Terminated&&(e.removeStateChangeListener(n),this.invite2xxTimer&&(clearTimeout(this.invite2xxTimer),this.invite2xxTimer=void 0),this.reinviteUserAgentServer)};e.addStateChangeListener(n)}}},iy=class extends Vt{constructor(e,t,r){super(vn,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===F.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 vn))throw new Error("Transaction not instance of InviteClientTransaction.");n=new Io(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===ce.Initial||n.signalingState===ce.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 vn))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 vn))throw new Error("Transaction not instance of InviteClientTransaction.");n=new Io(i,this.core,r),this.confirmedDialogs.set(n.id,n)}(n.signalingState===ce.Initial||n.signalingState===ce.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.`)}},El=class extends xr{constructor(e,t,r){super(Bt,e,t,r),this.core=e}dispose(){this.earlyDialog&&this.earlyDialog.dispose(),super.dispose()}accept(e={statusCode:200}){if(!this.acceptable)throw new fn(`${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 Bt))throw new Error("Transaction not instance of InviteClientTransaction.");const l=Cs.initialDialogStateForUserAgentServer(this.message,this.toTag);this.confirmedDialog=new Io(a,this.core,l)}const t=this.message.getHeaders("record-route").map(a=>`Record-Route: ${a}`),r=`Contact: ${this.core.configuration.contact.toString()}`,n="Allow: "+pn.toString();if(!e.body){if(this.confirmedDialog.signalingState===ce.Stable)e.body=this.confirmedDialog.answer;else if(this.confirmedDialog.signalingState===ce.Initial||this.confirmedDialog.signalingState===ce.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!==ce.Stable&&this.confirmedDialog.signalingStateTransition(e.body),o}progress(e={statusCode:180}){if(!this.progressable)throw new fn(`${this.message.method} not progressable in state ${this.transaction.state}.`);if(!this.earlyDialog){const o=this.transaction;if(!(o instanceof Bt))throw new Error("Transaction not instance of InviteClientTransaction.");const a=Cs.initialDialogStateForUserAgentServer(this.message,this.toTag,!0);this.earlyDialog=new Io(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!==ce.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)}},oy=class extends Vt{constructor(e,t,r){super(Lt,e,t,r)}},ay=class extends Vt{constructor(e,t,r){super(Lt,e,t,r)}},ly=class extends xr{constructor(e,t,r){super(jt,e,t,r),this.core=e}},cy=class extends Vt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(fe.SUBSCRIBE,r);super(Lt,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)}},Of=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 tr))throw new Error("Contact not instance of NameAddrHeader.");const i=s.uri,o=e.cseq,a=void 0,l=e.callId,c=e.fromTag,u=t.fromTag;if(!l)throw new Error("Call id undefined.");if(!c)throw new Error("From tag undefined.");if(!u)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+c+u,early:!1,callId:l,localTag:c,remoteTag:u,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===fe.NOTIFY?this.onNotify(e):(this.logger.log(`SUBSCRIBE dialog ${this.id} received unimplemented ${e.method} request`),this.core.replyStateless(e,{statusCode:501}))}refresh(){const e="Allow: "+pn.toString(),t={};return t.extraHeaders=(t.extraHeaders||[]).slice(),t.extraHeaders.push(e),t.extraHeaders.push("Event: "+this.subscriptionEvent),t.extraHeaders.push("Expires: "+this.subscriptionExpiresInitial),t.extraHeaders.push("Contact: "+this.core.configuration.contact.toString()),this.subscribe(void 0,t)}subscribe(e,t={}){var r;if(this.subscriptionState!==Be.Pending&&this.subscriptionState!==Be.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 cy(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(),pt.TIMER_N)),n}terminate(){this.stateTransition(Be.Terminated),this.onTerminated()}unsubscribe(){const e="Allow: "+pn.toString(),t={};return t.extraHeaders=(t.extraHeaders||[]).slice(),t.extraHeaders.push(e),t.extraHeaders.push("Event: "+this.subscriptionEvent),t.extraHeaders.push("Expires: 0"),t.extraHeaders.push("Contact: "+this.core.configuration.contact.toString()),this.subscribe(void 0,t)}onNotify(e){const t=e.parseHeader("Event").event;if(!t||t!==this.subscriptionEvent){this.core.replyStateless(e,{statusCode:489});return}this.N&&(clearTimeout(this.N),this.N=void 0);const r=e.parseHeader("Subscription-State");if(!r||!r.state){this.core.replyStateless(e,{statusCode:489});return}const n=r.state,s=r.expires?Math.max(r.expires,0):void 0;switch(n){case"pending":this.stateTransition(Be.Pending,s);break;case"active":this.stateTransition(Be.Active,s);break;case"terminated":this.stateTransition(Be.Terminated,s);break;default:this.logger.warn("Unrecognized subscription state.");break}const i=new ko(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 Be.Initial:r();return;case Be.NotifyWait:r();return;case Be.Pending:if(this.subscriptionState!==Be.NotifyWait&&this.subscriptionState!==Be.Pending){r();return}break;case Be.Active:if(this.subscriptionState!==Be.NotifyWait&&this.subscriptionState!==Be.Pending&&this.subscriptionState!==Be.Active){r();return}break;case Be.Terminated:if(this.subscriptionState!==Be.NotifyWait&&this.subscriptionState!==Be.Pending&&this.subscriptionState!==Be.Active){r();return}break;default:r();return}e===Be.Pending&&t&&(this.subscriptionExpires=t),e===Be.Active&&t&&(this.subscriptionExpires=t),e===Be.Terminated&&this.dispose(),this._subscriptionState=e}timerN(){this.logger.warn("Timer N expired for SUBSCRIBE dialog. Timed out waiting for NOTIFY."),this.subscriptionState!==Be.Terminated&&(this.stateTransition(Be.Terminated),this.onTerminated())}},uy=class extends Vt{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(Lt,e,t,r),this.delegate=r,this.subscriberId=t.callId+t.fromTag+n,this.subscriptionExpiresRequested=this.subscriptionExpires=Number(s),this.subscriptionEvent=n,this.subscriptionState=Be.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=Be.Pending;break;case"active":this.subscriptionState=Be.Active;break;case"terminated":this.subscriptionState=Be.Terminated;break;default:throw new Error(`Unrecognized state ${n}.`)}if(this.subscriptionState!==Be.Terminated){const s=Of.initialDialogStateForSubscription(this.message,e.message);this.dialog=new Of(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(),pt.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()}},dy=class extends xr{constructor(e,t,r){super(jt,e,t,r),this.core=e}},Hf=["application/sdp","application/dtmf-relay"],fy=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 iy(this,e,t)}message(e,t){return new $f(this,e,t)}publish(e,t){return new oy(this,e,t)}register(e,t){return new ay(this,e,t)}subscribe(e,t){return new uy(this,e,t)}request(e,t){return new Vt(Lt,this,e,t)}makeOutgoingRequestMessage(e,t,r,n,s,i,o){const a=this.configuration.sipjsId,l=this.configuration.displayName,c=this.configuration.viaForceRport,u=this.configuration.hackViaTcp,d=this.configuration.supportedOptionTags.slice();e===fe.REGISTER&&d.push("path","gruu"),e===fe.INVITE&&(this.configuration.contact.pubGruu||this.configuration.contact.tempGruu)&&d.push("gruu");const p={callIdPrefix:a,forceRport:c,fromDisplayName:l,hackViaTcp:u,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=Af(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===fe.ACK&&r&&r.transaction.state===F.Accepted&&r instanceof El){this.logger.warn(`Discarding out of dialog ACK after 2xx response sent on transaction ${t}.`);return}if(e.method===fe.CANCEL){r?(this.replyStateless(e,{statusCode:200}),r.transaction instanceof Bt&&r.transaction.state===F.Proceeding&&r instanceof El&&r.receiveCancel(e)):this.replyStateless(e,{statusCode:481});return}if(r){r.transaction.receiveRequest(e);return}this.receiveRequest(e)}receiveRequest(e){if(!pn.includes(e.method)){const n="Allow: "+pn.toString();this.replyStateless(e,{statusCode:405,extraHeaders:[n]});return}if(!e.ruri)throw new Error("Request-URI undefined.");if(e.ruri.scheme!=="sip"){this.replyStateless(e,{statusCode:416});return}const t=e.ruri,r=n=>!!n&&n.user===t.user;if(!r(this.configuration.aor)&&!(r(this.configuration.contact.uri)||r(this.configuration.contact.pubGruu)||r(this.configuration.contact.tempGruu))){this.logger.warn("Request-URI does not point to us."),e.method!==fe.ACK&&this.replyStateless(e,{statusCode:404});return}if(e.method===fe.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===fe.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 ko(this,e);i.onNotify(o);return}}const t=e.callId+e.toTag+e.fromTag,r=this.dialogs.get(t);if(r){if(e.method===fe.OPTIONS){const n="Allow: "+pn.toString(),s="Accept: "+Hf.toString();this.replyStateless(e,{statusCode:200,extraHeaders:[n,s]});return}r.receiveRequest(e);return}e.method!==fe.ACK&&this.replyStateless(e,{statusCode:481})}receiveOutsideDialogRequest(e){switch(e.method){case fe.ACK:break;case fe.BYE:this.replyStateless(e,{statusCode:481});break;case fe.CANCEL:throw new Error(`Unexpected out of dialog request method ${e.method}.`);case fe.INFO:this.replyStateless(e,{statusCode:405});break;case fe.INVITE:{const t=new El(this,e);this.delegate.onInvite?this.delegate.onInvite(t):t.reject()}break;case fe.MESSAGE:{const t=new Df(this,e);this.delegate.onMessage?this.delegate.onMessage(t):t.accept()}break;case fe.NOTIFY:{const t=new ko(this,e);this.delegate.onNotify?this.delegate.onNotify(t):t.reject({statusCode:405})}break;case fe.OPTIONS:{const t="Allow: "+pn.toString(),r="Accept: "+Hf.toString();this.replyStateless(e,{statusCode:200,extraHeaders:[t,r]})}break;case fe.REFER:{const t=new Pf(this,e);this.delegate.onRefer?this.delegate.onRefer(t):t.reject({statusCode:405})}break;case fe.REGISTER:{const t=new ly(this,e);this.delegate.onRegister?this.delegate.onRegister(t):t.reject({statusCode:405})}break;case fe.SUBSCRIBE:{const t=new dy(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 py(){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 hy(){return{bundlePolicy:"balanced",certificates:void 0,iceCandidatePoolSize:0,iceServers:[{urls:"stun:stun.l.google.com:19302"}],iceTransportPolicy:"all",rtcpMuxPolicy:"require"}}var gy=class En{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 c=l.kind;if(c!=="audio"&&c!=="video")throw new Error(`Unknown new track kind ${c}.`);const u=r.getSenders().find(d=>d.track&&d.track.kind===c);u?s.push(new Promise(d=>{this.logger.debug(`SessionDescriptionHandler.setLocalMediaStream - replacing sender ${c} track`),d()}).then(()=>u.replaceTrack(l).then(()=>{const d=n.getTracks().find(p=>p.kind===c);d&&(d.stop(),n.removeTrack(d),En.dispatchRemoveTrackEvent(n,d)),n.addTrack(l),En.dispatchAddTrackEvent(n,l)}).catch(d=>{throw this.logger.error(`SessionDescriptionHandler.setLocalMediaStream - failed to replace sender ${c} track`),d}))):s.push(new Promise(d=>{this.logger.debug(`SessionDescriptionHandler.setLocalMediaStream - adding sender ${c} track`),d()}).then(()=>{try{r.addTrack(l,n)}catch(d){throw this.logger.error(`SessionDescriptionHandler.setLocalMediaStream - failed to add sender ${c} track`),d}n.addTrack(l),En.dispatchAddTrackEvent(n,l)}))},o=t.getAudioTracks();o.length&&i(o[0]);const a=t.getVideoTracks();return a.length&&i(a[0]),s.reduce((l,c)=>l.then(()=>c),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),En.dispatchRemoveTrackEvent(r,n)}),r.addTrack(t),En.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),En.dispatchRemoveTrackEvent(r,n)}),r.addTrack(t),En.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
+ `,this.send(l).catch(c=>{this.logTransportError(c,"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 L.Calling:r();break;case L.Proceeding:this.state!==L.Calling&&r();break;case L.Accepted:case L.Completed:this.state!==L.Calling&&this.state!==L.Proceeding&&r();break;case L.Terminated:this.state!==L.Calling&&this.state!==L.Accepted&&this.state!==L.Completed&&(t||r());break;default:r()}this.B&&(clearTimeout(this.B),this.B=void 0),L.Proceeding,e===L.Completed&&(this.D=setTimeout(()=>this.timerD(),pt.TIMER_D)),e===L.Accepted&&(this.M=setTimeout(()=>this.timerM(),pt.TIMER_M)),e===L.Terminated&&this.dispose(),this.setState(e)}timerA(){}timerB(){this.logger.debug(`Timer B expired for INVITE client transaction ${this.id}.`),this.state===L.Calling&&(this.onRequestTimeout(),this.stateTransition(L.Terminated))}timerD(){this.logger.debug(`Timer D expired for INVITE client transaction ${this.id}.`),this.state===L.Completed&&this.stateTransition(L.Terminated)}timerM(){this.logger.debug(`Timer M expired for INVITE client transaction ${this.id}.`),this.state===L.Accepted&&this.stateTransition(L.Terminated)}},Vt=class Ec{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(de.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===L.Proceeding?new Ec(Lt,this.core,n):this.transaction.addStateChangeListener(()=>{this.transaction&&this.transaction.state===L.Proceeding&&new Ec(Lt,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 dn;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 dn;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===L.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)}},Ww=class extends Vt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(de.BYE,r);super(Lt,e.userAgentCore,n,t),e.dispose()}},jt=class extends If{constructor(e,t,r){super(e,t,r,L.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 L.Trying:break;case L.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 L.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 L.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 L.Trying:if(this.lastResponse=t,e>=100&&e<200){this.stateTransition(L.Proceeding),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send provisional response.")});return}if(e>=200&&e<=699){this.stateTransition(L.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send final response.")});return}break;case L.Proceeding:if(this.lastResponse=t,e>=200&&e<=699){this.stateTransition(L.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send final response.")});return}break;case L.Completed:return;case L.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(L.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 L.Trying:r();break;case L.Proceeding:this.state!==L.Trying&&r();break;case L.Completed:this.state!==L.Trying&&this.state!==L.Proceeding&&r();break;case L.Terminated:this.state!==L.Proceeding&&this.state!==L.Completed&&(t||r());break;default:r()}e===L.Completed&&(this.J=setTimeout(()=>this.timerJ(),pt.TIMER_J)),e===L.Terminated&&this.dispose(),this.setState(e)}timerJ(){this.logger.debug(`Timer J expired for NON-INVITE server transaction ${this.id}.`),this.state===L.Completed&&this.stateTransition(L.Terminated)}},xr=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:To(),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 fn(`${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 fn(`${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 fn(`${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 fn(`${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 fn(`${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 Bt)return this.transaction.state===L.Proceeding||this.transaction.state===L.Accepted;if(this.transaction instanceof jt)return this.transaction.state===L.Trying||this.transaction.state===L.Proceeding;throw new Error("Unknown transaction type.")}get progressable(){if(this.transaction instanceof Bt)return this.transaction.state===L.Proceeding;if(this.transaction instanceof jt)return!1;throw new Error("Unknown transaction type.")}get redirectable(){if(this.transaction instanceof Bt)return this.transaction.state===L.Proceeding;if(this.transaction instanceof jt)return this.transaction.state===L.Trying||this.transaction.state===L.Proceeding;throw new Error("Unknown transaction type.")}get rejectable(){if(this.transaction instanceof Bt)return this.transaction.state===L.Proceeding;if(this.transaction instanceof jt)return this.transaction.state===L.Trying||this.transaction.state===L.Proceeding;throw new Error("Unknown transaction type.")}get tryingable(){if(this.transaction instanceof Bt)return this.transaction.state===L.Proceeding;if(this.transaction instanceof jt)return this.transaction.state===L.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=Af(this.message,e);return this.transaction.receiveResponse(e.statusCode,t.message),t}init(){const e={loggerFactory:this.loggerFactory,onStateChange:n=>{n===L.Terminated&&(this.core.userAgentServers.delete(r),this.dispose())},onTransportError:n=>{this.logger.error(n.message),this.delegate&&this.delegate.onTransportError?this.delegate.onTransportError(n):this.logger.error("User agent server response transport error.")}},t=new this.transactionConstructor(this.message,this.core.transport,e);this._transaction=t;const r=t.id;this.core.userAgentServers.set(t.id,this)}},Gw=class extends xr{constructor(e,t,r){super(jt,e.userAgentCore,t,r)}},Jw=class extends Vt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(de.INFO,r);super(Lt,e.userAgentCore,n,t)}},Yw=class extends xr{constructor(e,t,r){super(jt,e.userAgentCore,t,r)}},$f=class extends Vt{constructor(e,t,r){super(Lt,e,t,r)}},Df=class extends xr{constructor(e,t,r){super(jt,e,t,r)}},Zw=class extends Vt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(de.NOTIFY,r);super(Lt,e.userAgentCore,n,t)}};function Xw(e){return e.userAgentCore!==void 0}var ko=class extends xr{constructor(e,t,r){const n=Xw(e)?e.userAgentCore:e;super(jt,n,t,r)}},Qw=class extends Vt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(de.PRACK,r);super(Lt,e.userAgentCore,n,t),e.signalingStateTransition(n)}},ey=class extends xr{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)}},ty=class extends Vt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(de.INVITE,r);super(vn,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}`)}}},ry=class extends xr{constructor(e,t,r){super(Bt,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)}},ny=class extends Vt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(de.REFER,r);super(Lt,e.userAgentCore,n,t)}};function sy(e){return e.userAgentCore!==void 0}var Pf=class extends xr{constructor(e,t,r){const n=sy(e)?e.userAgentCore:e;super(jt,n,t,r)}},Io=class extends Cs{constructor(e,t,r,n){super(t,r),this.initialTransaction=e,this._signalingState=le.Initial,this.ackWait=!1,this.ackProcessing=!1,this.delegate=n,e instanceof Bt&&(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=le.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?rr.Early:this.ackWait?rr.AckWait:this._signalingState===le.Closed?rr.Terminated:rr.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 vn))throw new Error("Transaction not instance of InviteClientTransaction.");t=this.reinviteUserAgentClient.transaction,this.reinviteUserAgentClient=void 0}else{if(!(this.initialTransaction instanceof vn))throw new Error("Initial transaction not instance of InviteClientTransaction.");t=this.initialTransaction}const r=this.createOutgoingRequestMessage(de.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 Bt){if(this.early)throw new Error("UAS MUST NOT send a BYE on early dialogs.");if(this.ackWait&&this.initialTransaction.state!==L.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 Ww(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 Jw(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 ty(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(de.MESSAGE,t);return new $f(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 Zw(this,e,t)}prack(e,t){return this.logger.log(`INVITE dialog ${this.id} sending PRACK request`),new Qw(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 ny(this,e,t)}receiveRequest(e){if(this.logger.log(`INVITE dialog ${this.id} received ${e.method} request`),e.method===de.ACK){if(this.ackWait){if(this.initialTransaction instanceof vn){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===de.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!==le.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===de.INVITE){const t=e.parseHeader("contact");if(!t)throw new Error("Contact undefined.");if(!(t instanceof tr))throw new Error("Contact not instance of NameAddrHeader.");this.dialogState.remoteTarget=t.uri}switch(e.method){case de.BYE:{const t=new Gw(this,e);this.delegate&&this.delegate.onBye?this.delegate.onBye(t):t.accept(),this.dispose()}break;case de.INFO:{const t=new Yw(this,e);this.delegate&&this.delegate.onInfo?this.delegate.onInfo(t):t.reject({statusCode:469,extraHeaders:["Recv-Info:"]})}break;case de.INVITE:{const t=new ry(this,e);this.signalingStateTransition(e),this.delegate&&this.delegate.onInvite?this.delegate.onInvite(t):t.reject({statusCode:488})}break;case de.MESSAGE:{const t=new Df(this.core,e);this.delegate&&this.delegate.onMessage?this.delegate.onMessage(t):t.accept()}break;case de.NOTIFY:{const t=new ko(this,e);this.delegate&&this.delegate.onNotify?this.delegate.onNotify(t):t.accept()}break;case de.PRACK:{const t=new ey(this,e);this.delegate&&this.delegate.onPrack?this.delegate.onPrack(t):t.accept()}break;case de.REFER:{const t=new Pf(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===le.HaveLocalOffer||this.signalingState===le.HaveRemoteOffer)&&this._rollbackOffer&&this._rollbackAnswer&&(this._signalingState=le.Stable,this._offer=this._rollbackOffer,this._answer=this._rollbackAnswer)}signalingStateTransition(e){const t=pi(e);if(!(!t||t.contentDisposition!=="session")){if(this._signalingState===le.Stable&&(this._rollbackOffer=this._offer,this._rollbackAnswer=this._answer),e instanceof Ss)switch(this._signalingState){case le.Initial:case le.Stable:this._signalingState=le.HaveRemoteOffer,this._offer=t,this._answer=void 0;break;case le.HaveLocalOffer:this._signalingState=le.Stable,this._answer=t;break;case le.HaveRemoteOffer:break;case le.Closed:break;default:throw new Error("Unexpected signaling state.")}if(e instanceof dn)switch(this._signalingState){case le.Initial:case le.Stable:this._signalingState=le.HaveRemoteOffer,this._offer=t,this._answer=void 0;break;case le.HaveLocalOffer:this._signalingState=le.Stable,this._answer=t;break;case le.HaveRemoteOffer:break;case le.Closed:break;default:throw new Error("Unexpected signaling state.")}if(e instanceof wl)switch(this._signalingState){case le.Initial:case le.Stable:this._signalingState=le.HaveLocalOffer,this._offer=t,this._answer=void 0;break;case le.HaveLocalOffer:break;case le.HaveRemoteOffer:this._signalingState=le.Stable,this._answer=t;break;case le.Closed:break;default:throw new Error("Unexpected signaling state.")}if(xf(e))switch(this._signalingState){case le.Initial:case le.Stable:this._signalingState=le.HaveLocalOffer,this._offer=t,this._answer=void 0;break;case le.HaveLocalOffer:break;case le.HaveRemoteOffer:this._signalingState=le.Stable,this._answer=t;break;case le.Closed:break;default:throw new Error("Unexpected signaling state.")}}}start2xxRetransmissionTimer(){if(this.initialTransaction instanceof Bt){const e=this.initialTransaction;let t=pt.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,pt.T2),this.invite2xxTimer=setTimeout(r,t)};this.invite2xxTimer=setTimeout(r,t);const n=()=>{e.state===L.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 Bt){const e=this.reinviteUserAgentServer.transaction;let t=pt.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,pt.T2),this.invite2xxTimer=setTimeout(r,t)};this.invite2xxTimer=setTimeout(r,t);const n=()=>{e.state===L.Terminated&&(e.removeStateChangeListener(n),this.invite2xxTimer&&(clearTimeout(this.invite2xxTimer),this.invite2xxTimer=void 0),this.reinviteUserAgentServer)};e.addStateChangeListener(n)}}},iy=class extends Vt{constructor(e,t,r){super(vn,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===L.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 vn))throw new Error("Transaction not instance of InviteClientTransaction.");n=new Io(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===le.Initial||n.signalingState===le.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 vn))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 vn))throw new Error("Transaction not instance of InviteClientTransaction.");n=new Io(i,this.core,r),this.confirmedDialogs.set(n.id,n)}(n.signalingState===le.Initial||n.signalingState===le.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.`)}},El=class extends xr{constructor(e,t,r){super(Bt,e,t,r),this.core=e}dispose(){this.earlyDialog&&this.earlyDialog.dispose(),super.dispose()}accept(e={statusCode:200}){if(!this.acceptable)throw new fn(`${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 Bt))throw new Error("Transaction not instance of InviteClientTransaction.");const l=Cs.initialDialogStateForUserAgentServer(this.message,this.toTag);this.confirmedDialog=new Io(a,this.core,l)}const t=this.message.getHeaders("record-route").map(a=>`Record-Route: ${a}`),r=`Contact: ${this.core.configuration.contact.toString()}`,n="Allow: "+pn.toString();if(!e.body){if(this.confirmedDialog.signalingState===le.Stable)e.body=this.confirmedDialog.answer;else if(this.confirmedDialog.signalingState===le.Initial||this.confirmedDialog.signalingState===le.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!==le.Stable&&this.confirmedDialog.signalingStateTransition(e.body),o}progress(e={statusCode:180}){if(!this.progressable)throw new fn(`${this.message.method} not progressable in state ${this.transaction.state}.`);if(!this.earlyDialog){const o=this.transaction;if(!(o instanceof Bt))throw new Error("Transaction not instance of InviteClientTransaction.");const a=Cs.initialDialogStateForUserAgentServer(this.message,this.toTag,!0);this.earlyDialog=new Io(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!==le.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)}},oy=class extends Vt{constructor(e,t,r){super(Lt,e,t,r)}},ay=class extends Vt{constructor(e,t,r){super(Lt,e,t,r)}},ly=class extends xr{constructor(e,t,r){super(jt,e,t,r),this.core=e}},cy=class extends Vt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(de.SUBSCRIBE,r);super(Lt,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)}},Of=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 tr))throw new Error("Contact not instance of NameAddrHeader.");const i=s.uri,o=e.cseq,a=void 0,l=e.callId,c=e.fromTag,u=t.fromTag;if(!l)throw new Error("Call id undefined.");if(!c)throw new Error("From tag undefined.");if(!u)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+c+u,early:!1,callId:l,localTag:c,remoteTag:u,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===de.NOTIFY?this.onNotify(e):(this.logger.log(`SUBSCRIBE dialog ${this.id} received unimplemented ${e.method} request`),this.core.replyStateless(e,{statusCode:501}))}refresh(){const e="Allow: "+pn.toString(),t={};return t.extraHeaders=(t.extraHeaders||[]).slice(),t.extraHeaders.push(e),t.extraHeaders.push("Event: "+this.subscriptionEvent),t.extraHeaders.push("Expires: "+this.subscriptionExpiresInitial),t.extraHeaders.push("Contact: "+this.core.configuration.contact.toString()),this.subscribe(void 0,t)}subscribe(e,t={}){var r;if(this.subscriptionState!==Ne.Pending&&this.subscriptionState!==Ne.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 cy(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(),pt.TIMER_N)),n}terminate(){this.stateTransition(Ne.Terminated),this.onTerminated()}unsubscribe(){const e="Allow: "+pn.toString(),t={};return t.extraHeaders=(t.extraHeaders||[]).slice(),t.extraHeaders.push(e),t.extraHeaders.push("Event: "+this.subscriptionEvent),t.extraHeaders.push("Expires: 0"),t.extraHeaders.push("Contact: "+this.core.configuration.contact.toString()),this.subscribe(void 0,t)}onNotify(e){const t=e.parseHeader("Event").event;if(!t||t!==this.subscriptionEvent){this.core.replyStateless(e,{statusCode:489});return}this.N&&(clearTimeout(this.N),this.N=void 0);const r=e.parseHeader("Subscription-State");if(!r||!r.state){this.core.replyStateless(e,{statusCode:489});return}const n=r.state,s=r.expires?Math.max(r.expires,0):void 0;switch(n){case"pending":this.stateTransition(Ne.Pending,s);break;case"active":this.stateTransition(Ne.Active,s);break;case"terminated":this.stateTransition(Ne.Terminated,s);break;default:this.logger.warn("Unrecognized subscription state.");break}const i=new ko(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 Ne.Initial:r();return;case Ne.NotifyWait:r();return;case Ne.Pending:if(this.subscriptionState!==Ne.NotifyWait&&this.subscriptionState!==Ne.Pending){r();return}break;case Ne.Active:if(this.subscriptionState!==Ne.NotifyWait&&this.subscriptionState!==Ne.Pending&&this.subscriptionState!==Ne.Active){r();return}break;case Ne.Terminated:if(this.subscriptionState!==Ne.NotifyWait&&this.subscriptionState!==Ne.Pending&&this.subscriptionState!==Ne.Active){r();return}break;default:r();return}e===Ne.Pending&&t&&(this.subscriptionExpires=t),e===Ne.Active&&t&&(this.subscriptionExpires=t),e===Ne.Terminated&&this.dispose(),this._subscriptionState=e}timerN(){this.logger.warn("Timer N expired for SUBSCRIBE dialog. Timed out waiting for NOTIFY."),this.subscriptionState!==Ne.Terminated&&(this.stateTransition(Ne.Terminated),this.onTerminated())}},uy=class extends Vt{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(Lt,e,t,r),this.delegate=r,this.subscriberId=t.callId+t.fromTag+n,this.subscriptionExpiresRequested=this.subscriptionExpires=Number(s),this.subscriptionEvent=n,this.subscriptionState=Ne.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=Ne.Pending;break;case"active":this.subscriptionState=Ne.Active;break;case"terminated":this.subscriptionState=Ne.Terminated;break;default:throw new Error(`Unrecognized state ${n}.`)}if(this.subscriptionState!==Ne.Terminated){const s=Of.initialDialogStateForSubscription(this.message,e.message);this.dialog=new Of(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(),pt.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()}},dy=class extends xr{constructor(e,t,r){super(jt,e,t,r),this.core=e}},Hf=["application/sdp","application/dtmf-relay"],fy=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 iy(this,e,t)}message(e,t){return new $f(this,e,t)}publish(e,t){return new oy(this,e,t)}register(e,t){return new ay(this,e,t)}subscribe(e,t){return new uy(this,e,t)}request(e,t){return new Vt(Lt,this,e,t)}makeOutgoingRequestMessage(e,t,r,n,s,i,o){const a=this.configuration.sipjsId,l=this.configuration.displayName,c=this.configuration.viaForceRport,u=this.configuration.hackViaTcp,d=this.configuration.supportedOptionTags.slice();e===de.REGISTER&&d.push("path","gruu"),e===de.INVITE&&(this.configuration.contact.pubGruu||this.configuration.contact.tempGruu)&&d.push("gruu");const p={callIdPrefix:a,forceRport:c,fromDisplayName:l,hackViaTcp:u,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=Af(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===de.ACK&&r&&r.transaction.state===L.Accepted&&r instanceof El){this.logger.warn(`Discarding out of dialog ACK after 2xx response sent on transaction ${t}.`);return}if(e.method===de.CANCEL){r?(this.replyStateless(e,{statusCode:200}),r.transaction instanceof Bt&&r.transaction.state===L.Proceeding&&r instanceof El&&r.receiveCancel(e)):this.replyStateless(e,{statusCode:481});return}if(r){r.transaction.receiveRequest(e);return}this.receiveRequest(e)}receiveRequest(e){if(!pn.includes(e.method)){const n="Allow: "+pn.toString();this.replyStateless(e,{statusCode:405,extraHeaders:[n]});return}if(!e.ruri)throw new Error("Request-URI undefined.");if(e.ruri.scheme!=="sip"){this.replyStateless(e,{statusCode:416});return}const t=e.ruri,r=n=>!!n&&n.user===t.user;if(!r(this.configuration.aor)&&!(r(this.configuration.contact.uri)||r(this.configuration.contact.pubGruu)||r(this.configuration.contact.tempGruu))){this.logger.warn("Request-URI does not point to us."),e.method!==de.ACK&&this.replyStateless(e,{statusCode:404});return}if(e.method===de.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===de.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 ko(this,e);i.onNotify(o);return}}const t=e.callId+e.toTag+e.fromTag,r=this.dialogs.get(t);if(r){if(e.method===de.OPTIONS){const n="Allow: "+pn.toString(),s="Accept: "+Hf.toString();this.replyStateless(e,{statusCode:200,extraHeaders:[n,s]});return}r.receiveRequest(e);return}e.method!==de.ACK&&this.replyStateless(e,{statusCode:481})}receiveOutsideDialogRequest(e){switch(e.method){case de.ACK:break;case de.BYE:this.replyStateless(e,{statusCode:481});break;case de.CANCEL:throw new Error(`Unexpected out of dialog request method ${e.method}.`);case de.INFO:this.replyStateless(e,{statusCode:405});break;case de.INVITE:{const t=new El(this,e);this.delegate.onInvite?this.delegate.onInvite(t):t.reject()}break;case de.MESSAGE:{const t=new Df(this,e);this.delegate.onMessage?this.delegate.onMessage(t):t.accept()}break;case de.NOTIFY:{const t=new ko(this,e);this.delegate.onNotify?this.delegate.onNotify(t):t.reject({statusCode:405})}break;case de.OPTIONS:{const t="Allow: "+pn.toString(),r="Accept: "+Hf.toString();this.replyStateless(e,{statusCode:200,extraHeaders:[t,r]})}break;case de.REFER:{const t=new Pf(this,e);this.delegate.onRefer?this.delegate.onRefer(t):t.reject({statusCode:405})}break;case de.REGISTER:{const t=new ly(this,e);this.delegate.onRegister?this.delegate.onRegister(t):t.reject({statusCode:405})}break;case de.SUBSCRIBE:{const t=new dy(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 py(){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 hy(){return{bundlePolicy:"balanced",certificates:void 0,iceCandidatePoolSize:0,iceServers:[{urls:"stun:stun.l.google.com:19302"}],iceTransportPolicy:"all",rtcpMuxPolicy:"require"}}var gy=class En{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 c=l.kind;if(c!=="audio"&&c!=="video")throw new Error(`Unknown new track kind ${c}.`);const u=r.getSenders().find(d=>d.track&&d.track.kind===c);u?s.push(new Promise(d=>{this.logger.debug(`SessionDescriptionHandler.setLocalMediaStream - replacing sender ${c} track`),d()}).then(()=>u.replaceTrack(l).then(()=>{const d=n.getTracks().find(p=>p.kind===c);d&&(d.stop(),n.removeTrack(d),En.dispatchRemoveTrackEvent(n,d)),n.addTrack(l),En.dispatchAddTrackEvent(n,l)}).catch(d=>{throw this.logger.error(`SessionDescriptionHandler.setLocalMediaStream - failed to replace sender ${c} track`),d}))):s.push(new Promise(d=>{this.logger.debug(`SessionDescriptionHandler.setLocalMediaStream - adding sender ${c} track`),d()}).then(()=>{try{r.addTrack(l,n)}catch(d){throw this.logger.error(`SessionDescriptionHandler.setLocalMediaStream - failed to add sender ${c} track`),d}n.addTrack(l),En.dispatchAddTrackEvent(n,l)}))},o=t.getAudioTracks();o.length&&i(o[0]);const a=t.getVideoTracks();return a.length&&i(a[0]),s.reduce((l,c)=>l.then(()=>c),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),En.dispatchRemoveTrackEvent(r,n)}),r.addTrack(t),En.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),En.dispatchRemoveTrackEvent(r,n)}),r.addTrack(t),En.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
54
54
  `:return"inactive";case`a=recvonly\r
55
55
  `:return"recvonly";case`a=sendonly\r
56
56
  `:return"sendonly";case`a=sendrecv\r
57
- `: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 vy(e){return(t,r)=>{e===void 0&&(e=py());const n={iceGatheringTimeout:r?.iceGatheringTimeout!==void 0?r?.iceGatheringTimeout:5e3,peerConnectionConfiguration:Object.assign(Object.assign({},hy()),r?.peerConnectionConfiguration)};return new gy(t.userAgent.getLogger("sip.SessionDescriptionHandler"),e,n)}}var Mf=class vg{constructor(t,r){if(this._state=Ae.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({},vg.defaultOptions),r);const n=this.configuration.server,s=ut.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===Ae.Connected}send(t){return this._send(t)}_connect(){switch(this.logger.log(`Connecting ${this.server}`),this.state){case Ae.Connecting:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(Ae.Connecting));if(!this.connectPromise)throw new Error("Connect promise must be defined.");return this.connectPromise;case Ae.Connected:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(Ae.Connecting));if(this.connectPromise)throw new Error("Connect promise must not be defined.");return Promise.resolve();case Ae.Disconnecting:if(this.connectPromise)throw new Error("Connect promise must not be defined.");try{this.transitionState(Ae.Connecting)}catch(r){if(r instanceof ui)return Promise.reject(r);throw r}break;case Ae.Disconnected:if(this.connectPromise)throw new Error("Connect promise must not be defined.");try{this.transitionState(Ae.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(Ae.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 Ae.Connecting:if(this.disconnectPromise)throw new Error("Disconnect promise must not be defined.");try{this.transitionState(Ae.Disconnecting)}catch(r){if(r instanceof ui)return Promise.reject(r);throw r}break;case Ae.Connected:if(this.disconnectPromise)throw new Error("Disconnect promise must not be defined.");try{this.transitionState(Ae.Disconnecting)}catch(r){if(r instanceof ui)return Promise.reject(r);throw r}break;case Ae.Disconnecting:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(Ae.Disconnecting));if(!this.disconnectPromise)throw new Error("Disconnect promise must be defined.");return this.disconnectPromise;case Ae.Disconnected:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(Ae.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
+ `: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 vy(e){return(t,r)=>{e===void 0&&(e=py());const n={iceGatheringTimeout:r?.iceGatheringTimeout!==void 0?r?.iceGatheringTimeout:5e3,peerConnectionConfiguration:Object.assign(Object.assign({},hy()),r?.peerConnectionConfiguration)};return new gy(t.userAgent.getLogger("sip.SessionDescriptionHandler"),e,n)}}var Mf=class vg{constructor(t,r){if(this._state=Te.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({},vg.defaultOptions),r);const n=this.configuration.server,s=ut.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===Te.Connected}send(t){return this._send(t)}_connect(){switch(this.logger.log(`Connecting ${this.server}`),this.state){case Te.Connecting:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(Te.Connecting));if(!this.connectPromise)throw new Error("Connect promise must be defined.");return this.connectPromise;case Te.Connected:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(Te.Connecting));if(this.connectPromise)throw new Error("Connect promise must not be defined.");return Promise.resolve();case Te.Disconnecting:if(this.connectPromise)throw new Error("Connect promise must not be defined.");try{this.transitionState(Te.Connecting)}catch(r){if(r instanceof ui)return Promise.reject(r);throw r}break;case Te.Disconnected:if(this.connectPromise)throw new Error("Connect promise must not be defined.");try{this.transitionState(Te.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(Te.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 Te.Connecting:if(this.disconnectPromise)throw new Error("Disconnect promise must not be defined.");try{this.transitionState(Te.Disconnecting)}catch(r){if(r instanceof ui)return Promise.reject(r);throw r}break;case Te.Connected:if(this.disconnectPromise)throw new Error("Disconnect promise must not be defined.");try{this.transitionState(Te.Disconnecting)}catch(r){if(r instanceof ui)return Promise.reject(r);throw r}break;case Te.Disconnecting:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(Te.Disconnecting));if(!this.disconnectPromise)throw new Error("Disconnect promise must be defined.");return this.disconnectPromise;case Te.Disconnected:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(Te.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:
58
58
 
59
59
  `+t+`
60
- `),this._state!==Ae.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(Ae.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:
60
+ `),this._state!==Te.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(Te.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:
61
61
 
62
62
  `+s+`
63
63
  `)}else s=n,this.configuration.traceSip===!0&&this.logger.log(`Received WebSocket text message:
64
64
 
65
65
  `+s+`
66
- `);if(this.state!==Ae.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===Ae.Connecting&&(this.logger.log(`WebSocket opened ${this.server}`),this.transitionState(Ae.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 Ae.Connecting:t!==Ae.Connected&&t!==Ae.Disconnecting&&t!==Ae.Disconnected&&n();break;case Ae.Connected:t!==Ae.Disconnecting&&t!==Ae.Disconnected&&n();break;case Ae.Disconnecting:t!==Ae.Connecting&&t!==Ae.Disconnected&&n();break;case Ae.Disconnected:t!==Ae.Connecting&&n();break;default:throw new Error("Unknown state.")}const s=this._state;this._state=t;const i=this.connectResolve,o=this.connectReject;s===Ae.Connecting&&(this.connectPromise=void 0,this.connectResolve=void 0,this.connectReject=void 0);const a=this.disconnectResolve,l=this.disconnectReject;if(s===Ae.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===Ae.Connected&&(this.startSendingKeepAlives(),this.onConnect))try{this.onConnect()}catch(c){throw this.logger.error(c.toString()),this.logger.error("Exception thrown by onConnect callback"),c}if(s===Ae.Connected&&(this.stopSendingKeepAlives(),this.onDisconnect))try{r?this.onDisconnect(r):this.onDisconnect()}catch(c){throw this.logger.error(c.toString()),this.logger.error("Exception thrown by onDisconnect callback"),c}if(s===Ae.Connecting){if(!i)throw new Error("Connect resolve undefined.");if(!o)throw new Error("Connect reject undefined.");t===Ae.Connected?i():o(r||new Error("Connect aborted."))}if(s===Ae.Disconnecting){if(!a)throw new Error("Disconnect resolve undefined.");if(!l)throw new Error("Disconnect reject undefined.");t===Ae.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
+ `);if(this.state!==Te.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===Te.Connecting&&(this.logger.log(`WebSocket opened ${this.server}`),this.transitionState(Te.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 Te.Connecting:t!==Te.Connected&&t!==Te.Disconnecting&&t!==Te.Disconnected&&n();break;case Te.Connected:t!==Te.Disconnecting&&t!==Te.Disconnected&&n();break;case Te.Disconnecting:t!==Te.Connecting&&t!==Te.Disconnected&&n();break;case Te.Disconnected:t!==Te.Connecting&&n();break;default:throw new Error("Unknown state.")}const s=this._state;this._state=t;const i=this.connectResolve,o=this.connectReject;s===Te.Connecting&&(this.connectPromise=void 0,this.connectResolve=void 0,this.connectReject=void 0);const a=this.disconnectResolve,l=this.disconnectReject;if(s===Te.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===Te.Connected&&(this.startSendingKeepAlives(),this.onConnect))try{this.onConnect()}catch(c){throw this.logger.error(c.toString()),this.logger.error("Exception thrown by onConnect callback"),c}if(s===Te.Connected&&(this.stopSendingKeepAlives(),this.onDisconnect))try{r?this.onDisconnect(r):this.onDisconnect()}catch(c){throw this.logger.error(c.toString()),this.logger.error("Exception thrown by onDisconnect callback"),c}if(s===Te.Connecting){if(!i)throw new Error("Connect resolve undefined.");if(!o)throw new Error("Connect reject undefined.");t===Te.Connected?i():o(r||new Error("Connect aborted."))}if(s===Te.Disconnecting){if(!a)throw new Error("Disconnect resolve undefined.");if(!l)throw new Error("Disconnect reject undefined.");t===Te.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
67
67
  \r
68
- `))}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}};Mf.defaultOptions={server:"",connectionTimeout:5,keepAliveInterval:0,keepAliveDebounce:10,traceSip:!0};var mn=class oa{constructor(t={}){if(this._publishers={},this._registerers={},this._sessions={},this._subscriptions={},this._state=Ct.Stopped,this._stateEventEmitter=new di,this.delegate=t.delegate,this.options=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},oa.defaultOptions()),{sipjsId:Bn(5)}),{uri:new un("sip","anonymous."+Bn(6),"anonymous.invalid")}),{viaHost:Bn(12)+".invalid"}),oa.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 Kw,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=ht.error;break;case"warn":this.loggerFactory.level=ht.warn;break;case"log":this.loggerFactory.level=ht.log;break;case"debug":this.loggerFactory.level=ht.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:oa.newUUID(),ut.parse(this._instanceId,"uuid")===-1)throw new Error("Invalid instanceId.");this._userAgentCore=this.initCore()}static makeURI(t){return ut.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:vy(),sessionDescriptionHandlerFactoryOptions:{},sipExtension100rel:pr.Unsupported,sipExtensionReplaces:pr.Unsupported,sipExtensionExtraSupported:[],sipjsId:"",transportConstructor:Mf,transportOptions:{},uri:new un("sip","anonymous","anonymous.invalid"),userAgentString:"SIP.js/"+Pw,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===Ct.Stopped?Promise.reject(new Error("User agent stopped.")):Promise.resolve().then(()=>this.transport.connect())}start(){return this.state===Ct.Started?(this.logger.warn("User agent already started"),Promise.resolve()):(this.logger.log(`Starting ${this.configuration.uri}`),this.transitionState(Ct.Started),this.transport.connect())}async stop(){if(this.state===Ct.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(Ct.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(Ct.Stopped)}_makeInviter(t,r){return new _l(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:Bn(8),r=this.options.contactParams;return{pubGruu:void 0,tempGruu:void 0,uri:new un("sip",t,this.options.viaHost,void 0,r),toString:(n={})=>{const s=n.anonymous||!1,i=n.outbound||!1,o=n.register||!1;let a="<";return s?a+=this.contact.tempGruu||`sip:anonymous@anonymous.invalid;transport=${r.transport?r.transport:"ws"}`:o?a+=this.contact.uri:a+=this.contact.pubGruu||this.contact.uri,i&&(a+=";ob"),a+=">",this.options.instanceIdAlwaysAdded&&(a+=';+sip.instance="<urn:uuid:'+this._instanceId+'>"'),a}}}initCore(){let t=[];t.push("outbound"),this.options.sipExtension100rel===pr.Supported&&t.push("100rel"),this.options.sipExtensionReplaces===pr.Supported&&t.push("replaces"),this.options.sipExtensionExtraSupported&&t.push(...this.options.sipExtensionExtraSupported),this.options.hackAllowUnregisteredOptionTags||(t=t.filter(n=>Uw[n])),t=Array.from(new Set(t));const r=t.slice();return(this.contact.pubGruu||this.contact.tempGruu)&&r.push("gruu"),new fy({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 zw(this.getLoggerFactory(),i,n,s)},transportAccessor:()=>this.transport},{onInvite:n=>{var s;const i=new Cl(this,n);if(n.delegate={onCancel:o=>{i._onCancel(o)},onTransportError:o=>{this.logger.error("A transport error has occurred while handling an incoming INVITE request.")}},n.trying(),this.options.sipExtensionReplaces!==pr.Unsupported){const o=n.message.parseHeader("replaces");if(o){const a=o.call_id;if(typeof a!="string")throw new Error("Type of call id is not string");const l=o.replaces_to_tag;if(typeof l!="string")throw new Error("Type of to tag is not string");const c=o.replaces_from_tag;if(typeof c!="string")throw new Error("type of from tag is not string");const u=a+l+c,d=this.userAgentCore.dialogs.get(u);if(!d){i.reject({statusCode:481});return}if(!d.early&&o.early_only===!0){i.reject({statusCode:486});return}const p=this._sessions[a+c]||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 Tf(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!==Ct.Stopped&&this.delegate&&this.delegate.onConnect&&this.delegate.onConnect()}onTransportDisconnect(t){this.state!==Ct.Stopped&&(this.delegate&&this.delegate.onDisconnect&&this.delegate.onDisconnect(t),t&&this.options.reconnectionAttempts>0&&this.attemptReconnection())}onTransportMessage(t){const r=Ao.parseMessage(t,this.getLogger("sip.Parser"));if(!r){this.logger.warn("Failed to parse incoming message. Dropping.");return}if(this.state===Ct.Stopped&&r instanceof Ss){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 Ss){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 dn){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 Ss){this.userAgentCore.receiveIncomingRequestFromTransport(r);return}if(r instanceof dn){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 Ct.Started:t!==Ct.Stopped&&n();break;case Ct.Stopped:t!==Ct.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)}},gt=new window.AudioContext,my={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=B(null),gi=B(null),vi=B(.5);const qf=()=>({playDtmf:(o,a=150)=>{gt.state==="suspended"&&gt.resume();const l=my[o.toUpperCase()];if(!l)return;const c=gt.createOscillator(),u=gt.createOscillator(),d=gt.createGain();c.frequency.value=l[0],u.frequency.value=l[1],c.type="sine",u.type="sine",d.gain.value=.1*vi.value,c.connect(d),u.connect(d),d.connect(gt.destination),c.start(),u.start(),setTimeout(()=>{c.stop(),u.stop(),c.disconnect(),u.disconnect(),d.disconnect()},a)},startRingtone:()=>{if(hi.value)return;gt.state==="suspended"&&gt.resume();const o=()=>{const a=gt.currentTime,l=gt.createOscillator(),c=gt.createGain();l.type="sine",l.frequency.setValueAtTime(523.25,a),l.frequency.setValueAtTime(659.25,a+.1),l.frequency.setValueAtTime(783.99,a+.2),c.gain.setValueAtTime(.1*vi.value,a),c.gain.exponentialRampToValueAtTime(.001,a+.5),l.connect(c),c.connect(gt.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;gt.state==="suspended"&&gt.resume();const o=()=>{const a=gt.currentTime,l=gt.createOscillator(),c=gt.createGain();l.type="sine",l.frequency.value=425,c.gain.setValueAtTime(.1*vi.value,a),c.gain.linearRampToValueAtTime(.1*vi.value,a+1),c.gain.linearRampToValueAtTime(0,a+1.1),l.connect(c),c.connect(gt.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 Nf(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=Nf(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Bf(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=Nf(e))&&(n&&(n+=" "),n+=t);return n}var wy=(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},yy=(e,t)=>({classGroupId:e,validator:t}),Ff=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Ro="-",Lf=[],by="arbitrary..",Sy=e=>{const t=_y(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return Cy(o);const a=o.split(Ro);return Vf(a,a[0]===""&&a.length>1?1:0,t)},getConflictingClassGroupIds:(o,a)=>{if(a){const l=n[o],c=r[o];return l?c?wy(c,l):l:c||Lf}return r[o]||Lf}}},Vf=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const n=e[t],s=r.nextPart.get(n);if(s){const l=Vf(e,t+1,s);if(l)return l}const i=r.validators;if(i===null)return;const o=t===0?e.join(Ro):e.slice(t).join(Ro),a=i.length;for(let l=0;l<a;l++){const c=i[l];if(c.validator(o))return c.classGroupId}},Cy=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?by+n:void 0})(),_y=e=>{const{theme:t,classGroups:r}=e;return xy(r,t)},xy=(e,t)=>{const r=Ff();for(const n in e){const s=e[n];Al(s,r,n,t)}return r},Al=(e,t,r,n)=>{const s=e.length;for(let i=0;i<s;i++){const o=e[i];Ty(o,t,r,n)}},Ty=(e,t,r,n)=>{if(typeof e=="string"){Ey(e,t,r);return}if(typeof e=="function"){Ay(e,t,r,n);return}ky(e,t,r,n)},Ey=(e,t,r)=>{const n=e===""?t:jf(t,e);n.classGroupId=r},Ay=(e,t,r,n)=>{if(Iy(e)){Al(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(yy(r,e))},ky=(e,t,r,n)=>{const s=Object.entries(e),i=s.length;for(let o=0;o<i;o++){const[a,l]=s[o];Al(l,jf(t,a),r,n)}},jf=(e,t)=>{let r=e;const n=t.split(Ro),s=n.length;for(let i=0;i<s;i++){const o=n[i];let a=r.nextPart.get(o);a||(a=Ff(),r.nextPart.set(o,a)),r=a}return r},Iy=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Ry=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)}}},kl="!",Uf=":",$y=[],zf=(e,t,r,n,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:s}),Dy=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=s=>{const i=[];let o=0,a=0,l=0,c;const u=s.length;for(let w=0;w<u;w++){const C=s[w];if(o===0&&a===0){if(C===Uf){i.push(s.slice(l,w)),l=w+1;continue}if(C==="/"){c=w;continue}}C==="["?o++:C==="]"?o--:C==="("?a++:C===")"&&a--}const d=i.length===0?s:s.slice(l);let p=d,h=!1;d.endsWith(kl)?(p=d.slice(0,-1),h=!0):d.startsWith(kl)&&(p=d.slice(1),h=!0);const g=c&&c>l?c-l:void 0;return zf(i,h,p,g)};if(t){const s=t+Uf,i=n;n=o=>o.startsWith(s)?i(o.slice(s.length)):zf($y,!1,o,void 0,!0)}if(r){const s=n;n=i=>r({className:i,parseClassName:s})}return n},Py=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}},Oy=e=>({cache:Ry(e.cacheSize),parseClassName:Dy(e),sortModifiers:Py(e),...Sy(e)}),Hy=/\s+/,My=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:i}=t,o=[],a=e.trim().split(Hy);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:d,modifiers:p,hasImportantModifier:h,baseClassName:g,maybePostfixModifierPosition:w}=r(u);if(d){l=u+(l.length>0?" "+l:l);continue}let C=!!w,v=n(C?g.substring(0,w):g);if(!v){if(!C){l=u+(l.length>0?" "+l:l);continue}if(v=n(g),!v){l=u+(l.length>0?" "+l:l);continue}C=!1}const x=p.length===0?"":p.length===1?p[0]:i(p).join(":"),y=h?x+kl:x,b=y+v;if(o.indexOf(b)>-1)continue;o.push(b);const _=s(v,C);for(let $=0;$<_.length;++$){const R=_[$];o.push(y+R)}l=u+(l.length>0?" "+l:l)}return l},qy=(...e)=>{let t=0,r,n,s="";for(;t<e.length;)(r=e[t++])&&(n=Kf(r))&&(s&&(s+=" "),s+=n);return s},Kf=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Kf(e[n]))&&(r&&(r+=" "),r+=t);return r},Ny=(e,...t)=>{let r,n,s,i;const o=l=>(r=Oy(t.reduce((c,u)=>u(c),e())),n=r.cache.get,s=r.cache.set,i=a,a(l)),a=l=>{const c=n(l);if(c)return c;const u=My(l,r);return s(l,u),u};return i=o,(...l)=>i(qy(...l))},By=[],dt=e=>{const t=r=>r[e]||By;return t.isThemeGetter=!0,t},Wf=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Gf=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Fy=/^\d+\/\d+$/,Ly=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Vy=/\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$/,jy=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Uy=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zy=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_s=e=>Fy.test(e),Pe=e=>!!e&&!Number.isNaN(Number(e)),wn=e=>!!e&&Number.isInteger(Number(e)),Il=e=>e.endsWith("%")&&Pe(e.slice(0,-1)),Gr=e=>Ly.test(e),Ky=()=>!0,Wy=e=>Vy.test(e)&&!jy.test(e),Jf=()=>!1,Gy=e=>Uy.test(e),Jy=e=>zy.test(e),Yy=e=>!ve(e)&&!me(e),Zy=e=>xs(e,ep,Jf),ve=e=>Wf.test(e),Fn=e=>xs(e,tp,Wy),Rl=e=>xs(e,rb,Pe),Yf=e=>xs(e,Xf,Jf),Xy=e=>xs(e,Qf,Jy),$o=e=>xs(e,rp,Gy),me=e=>Gf.test(e),mi=e=>Ts(e,tp),Qy=e=>Ts(e,nb),Zf=e=>Ts(e,Xf),eb=e=>Ts(e,ep),tb=e=>Ts(e,Qf),Do=e=>Ts(e,rp,!0),xs=(e,t,r)=>{const n=Wf.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Ts=(e,t,r=!1)=>{const n=Gf.exec(e);return n?n[1]?t(n[1]):r:!1},Xf=e=>e==="position"||e==="percentage",Qf=e=>e==="image"||e==="url",ep=e=>e==="length"||e==="size"||e==="bg-size",tp=e=>e==="length",rb=e=>e==="number",nb=e=>e==="family-name",rp=e=>e==="shadow",sb=()=>{const e=dt("color"),t=dt("font"),r=dt("text"),n=dt("font-weight"),s=dt("tracking"),i=dt("leading"),o=dt("breakpoint"),a=dt("container"),l=dt("spacing"),c=dt("radius"),u=dt("shadow"),d=dt("inset-shadow"),p=dt("text-shadow"),h=dt("drop-shadow"),g=dt("blur"),w=dt("perspective"),C=dt("aspect"),v=dt("ease"),x=dt("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"],_=()=>[...b(),me,ve],$=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],m=()=>[me,ve,l],P=()=>[_s,"full","auto",...m()],O=()=>[wn,"none","subgrid",me,ve],S=()=>["auto",{span:["full",wn,me,ve]},wn,me,ve],T=()=>[wn,"auto",me,ve],E=()=>["auto","min","max","fr",me,ve],M=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],j=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...m()],J=()=>[_s,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...m()],U=()=>[e,me,ve],Te=()=>[...b(),Zf,Yf,{position:[me,ve]}],be=()=>["no-repeat",{repeat:["","x","y","space","round"]}],K=()=>["auto","cover","contain",eb,Zy,{size:[me,ve]}],te=()=>[Il,mi,Fn],re=()=>["","none","full",c,me,ve],le=()=>["",Pe,mi,Fn],pe=()=>["solid","dashed","dotted","double"],ie=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],L=()=>[Pe,Il,Zf,Yf],Y=()=>["","none",g,me,ve],Fe=()=>["none",Pe,me,ve],Ne=()=>["none",Pe,me,ve],lt=()=>[Pe,me,ve],st=()=>[_s,"full",...m()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Gr],breakpoint:[Gr],color:[Ky],container:[Gr],"drop-shadow":[Gr],ease:["in","out","in-out"],font:[Yy],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Gr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Gr],shadow:[Gr],spacing:["px",Pe],text:[Gr],"text-shadow":[Gr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",_s,ve,me,C]}],container:["container"],columns:[{columns:[Pe,ve,me,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:_()}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[wn,"auto",me,ve]}],basis:[{basis:[_s,"full","auto",a,...m()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Pe,_s,"auto","initial","none",ve]}],grow:[{grow:["",Pe,me,ve]}],shrink:[{shrink:["",Pe,me,ve]}],order:[{order:[wn,"first","last","none",me,ve]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:S()}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:S()}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":E()}],"auto-rows":[{"auto-rows":E()}],gap:[{gap:m()}],"gap-x":[{"gap-x":m()}],"gap-y":[{"gap-y":m()}],"justify-content":[{justify:[...M(),"normal"]}],"justify-items":[{"justify-items":[...j(),"normal"]}],"justify-self":[{"justify-self":["auto",...j()]}],"align-content":[{content:["normal",...M()]}],"align-items":[{items:[...j(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...j(),{baseline:["","last"]}]}],"place-content":[{"place-content":M()}],"place-items":[{"place-items":[...j(),"baseline"]}],"place-self":[{"place-self":["auto",...j()]}],p:[{p:m()}],px:[{px:m()}],py:[{py:m()}],ps:[{ps:m()}],pe:[{pe:m()}],pt:[{pt:m()}],pr:[{pr:m()}],pb:[{pb:m()}],pl:[{pl:m()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":m()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":m()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],w:[{w:[a,"screen",...J()]}],"min-w":[{"min-w":[a,"screen","none",...J()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",r,mi,Fn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,me,Rl]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Il,ve]}],"font-family":[{font:[Qy,ve,t]}],"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,me,ve]}],"line-clamp":[{"line-clamp":[Pe,"none",me,Rl]}],leading:[{leading:[i,...m()]}],"list-image":[{"list-image":["none",me,ve]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",me,ve]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:U()}],"text-color":[{text:U()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...pe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Pe,"from-font","auto",me,Fn]}],"text-decoration-color":[{decoration:U()}],"underline-offset":[{"underline-offset":[Pe,"auto",me,ve]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:m()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",me,ve]}],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",me,ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Te()}],"bg-repeat":[{bg:be()}],"bg-size":[{bg:K()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},wn,me,ve],radial:["",me,ve],conic:[wn,me,ve]},tb,Xy]}],"bg-color":[{bg:U()}],"gradient-from-pos":[{from:te()}],"gradient-via-pos":[{via:te()}],"gradient-to-pos":[{to:te()}],"gradient-from":[{from:U()}],"gradient-via":[{via:U()}],"gradient-to":[{to:U()}],rounded:[{rounded:re()}],"rounded-s":[{"rounded-s":re()}],"rounded-e":[{"rounded-e":re()}],"rounded-t":[{"rounded-t":re()}],"rounded-r":[{"rounded-r":re()}],"rounded-b":[{"rounded-b":re()}],"rounded-l":[{"rounded-l":re()}],"rounded-ss":[{"rounded-ss":re()}],"rounded-se":[{"rounded-se":re()}],"rounded-ee":[{"rounded-ee":re()}],"rounded-es":[{"rounded-es":re()}],"rounded-tl":[{"rounded-tl":re()}],"rounded-tr":[{"rounded-tr":re()}],"rounded-br":[{"rounded-br":re()}],"rounded-bl":[{"rounded-bl":re()}],"border-w":[{border:le()}],"border-w-x":[{"border-x":le()}],"border-w-y":[{"border-y":le()}],"border-w-s":[{"border-s":le()}],"border-w-e":[{"border-e":le()}],"border-w-t":[{"border-t":le()}],"border-w-r":[{"border-r":le()}],"border-w-b":[{"border-b":le()}],"border-w-l":[{"border-l":le()}],"divide-x":[{"divide-x":le()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":le()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...pe(),"hidden","none"]}],"divide-style":[{divide:[...pe(),"hidden","none"]}],"border-color":[{border:U()}],"border-color-x":[{"border-x":U()}],"border-color-y":[{"border-y":U()}],"border-color-s":[{"border-s":U()}],"border-color-e":[{"border-e":U()}],"border-color-t":[{"border-t":U()}],"border-color-r":[{"border-r":U()}],"border-color-b":[{"border-b":U()}],"border-color-l":[{"border-l":U()}],"divide-color":[{divide:U()}],"outline-style":[{outline:[...pe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Pe,me,ve]}],"outline-w":[{outline:["",Pe,mi,Fn]}],"outline-color":[{outline:U()}],shadow:[{shadow:["","none",u,Do,$o]}],"shadow-color":[{shadow:U()}],"inset-shadow":[{"inset-shadow":["none",d,Do,$o]}],"inset-shadow-color":[{"inset-shadow":U()}],"ring-w":[{ring:le()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:U()}],"ring-offset-w":[{"ring-offset":[Pe,Fn]}],"ring-offset-color":[{"ring-offset":U()}],"inset-ring-w":[{"inset-ring":le()}],"inset-ring-color":[{"inset-ring":U()}],"text-shadow":[{"text-shadow":["none",p,Do,$o]}],"text-shadow-color":[{"text-shadow":U()}],opacity:[{opacity:[Pe,me,ve]}],"mix-blend":[{"mix-blend":[...ie(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ie()}],"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":[Pe]}],"mask-image-linear-from-pos":[{"mask-linear-from":L()}],"mask-image-linear-to-pos":[{"mask-linear-to":L()}],"mask-image-linear-from-color":[{"mask-linear-from":U()}],"mask-image-linear-to-color":[{"mask-linear-to":U()}],"mask-image-t-from-pos":[{"mask-t-from":L()}],"mask-image-t-to-pos":[{"mask-t-to":L()}],"mask-image-t-from-color":[{"mask-t-from":U()}],"mask-image-t-to-color":[{"mask-t-to":U()}],"mask-image-r-from-pos":[{"mask-r-from":L()}],"mask-image-r-to-pos":[{"mask-r-to":L()}],"mask-image-r-from-color":[{"mask-r-from":U()}],"mask-image-r-to-color":[{"mask-r-to":U()}],"mask-image-b-from-pos":[{"mask-b-from":L()}],"mask-image-b-to-pos":[{"mask-b-to":L()}],"mask-image-b-from-color":[{"mask-b-from":U()}],"mask-image-b-to-color":[{"mask-b-to":U()}],"mask-image-l-from-pos":[{"mask-l-from":L()}],"mask-image-l-to-pos":[{"mask-l-to":L()}],"mask-image-l-from-color":[{"mask-l-from":U()}],"mask-image-l-to-color":[{"mask-l-to":U()}],"mask-image-x-from-pos":[{"mask-x-from":L()}],"mask-image-x-to-pos":[{"mask-x-to":L()}],"mask-image-x-from-color":[{"mask-x-from":U()}],"mask-image-x-to-color":[{"mask-x-to":U()}],"mask-image-y-from-pos":[{"mask-y-from":L()}],"mask-image-y-to-pos":[{"mask-y-to":L()}],"mask-image-y-from-color":[{"mask-y-from":U()}],"mask-image-y-to-color":[{"mask-y-to":U()}],"mask-image-radial":[{"mask-radial":[me,ve]}],"mask-image-radial-from-pos":[{"mask-radial-from":L()}],"mask-image-radial-to-pos":[{"mask-radial-to":L()}],"mask-image-radial-from-color":[{"mask-radial-from":U()}],"mask-image-radial-to-color":[{"mask-radial-to":U()}],"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":[Pe]}],"mask-image-conic-from-pos":[{"mask-conic-from":L()}],"mask-image-conic-to-pos":[{"mask-conic-to":L()}],"mask-image-conic-from-color":[{"mask-conic-from":U()}],"mask-image-conic-to-color":[{"mask-conic-to":U()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Te()}],"mask-repeat":[{mask:be()}],"mask-size":[{mask:K()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",me,ve]}],filter:[{filter:["","none",me,ve]}],blur:[{blur:Y()}],brightness:[{brightness:[Pe,me,ve]}],contrast:[{contrast:[Pe,me,ve]}],"drop-shadow":[{"drop-shadow":["","none",h,Do,$o]}],"drop-shadow-color":[{"drop-shadow":U()}],grayscale:[{grayscale:["",Pe,me,ve]}],"hue-rotate":[{"hue-rotate":[Pe,me,ve]}],invert:[{invert:["",Pe,me,ve]}],saturate:[{saturate:[Pe,me,ve]}],sepia:[{sepia:["",Pe,me,ve]}],"backdrop-filter":[{"backdrop-filter":["","none",me,ve]}],"backdrop-blur":[{"backdrop-blur":Y()}],"backdrop-brightness":[{"backdrop-brightness":[Pe,me,ve]}],"backdrop-contrast":[{"backdrop-contrast":[Pe,me,ve]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Pe,me,ve]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Pe,me,ve]}],"backdrop-invert":[{"backdrop-invert":["",Pe,me,ve]}],"backdrop-opacity":[{"backdrop-opacity":[Pe,me,ve]}],"backdrop-saturate":[{"backdrop-saturate":[Pe,me,ve]}],"backdrop-sepia":[{"backdrop-sepia":["",Pe,me,ve]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":m()}],"border-spacing-x":[{"border-spacing-x":m()}],"border-spacing-y":[{"border-spacing-y":m()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",me,ve]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Pe,"initial",me,ve]}],ease:[{ease:["linear","initial",v,me,ve]}],delay:[{delay:[Pe,me,ve]}],animate:[{animate:["none",x,me,ve]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,me,ve]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:Fe()}],"rotate-x":[{"rotate-x":Fe()}],"rotate-y":[{"rotate-y":Fe()}],"rotate-z":[{"rotate-z":Fe()}],scale:[{scale:Ne()}],"scale-x":[{"scale-x":Ne()}],"scale-y":[{"scale-y":Ne()}],"scale-z":[{"scale-z":Ne()}],"scale-3d":["scale-3d"],skew:[{skew:lt()}],"skew-x":[{"skew-x":lt()}],"skew-y":[{"skew-y":lt()}],transform:[{transform:[me,ve,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:st()}],"translate-x":[{"translate-x":st()}],"translate-y":[{"translate-y":st()}],"translate-z":[{"translate-z":st()}],"translate-none":["translate-none"],accent:[{accent:U()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:U()}],"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",me,ve]}],"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":m()}],"scroll-mx":[{"scroll-mx":m()}],"scroll-my":[{"scroll-my":m()}],"scroll-ms":[{"scroll-ms":m()}],"scroll-me":[{"scroll-me":m()}],"scroll-mt":[{"scroll-mt":m()}],"scroll-mr":[{"scroll-mr":m()}],"scroll-mb":[{"scroll-mb":m()}],"scroll-ml":[{"scroll-ml":m()}],"scroll-p":[{"scroll-p":m()}],"scroll-px":[{"scroll-px":m()}],"scroll-py":[{"scroll-py":m()}],"scroll-ps":[{"scroll-ps":m()}],"scroll-pe":[{"scroll-pe":m()}],"scroll-pt":[{"scroll-pt":m()}],"scroll-pr":[{"scroll-pr":m()}],"scroll-pb":[{"scroll-pb":m()}],"scroll-pl":[{"scroll-pl":m()}],"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",me,ve]}],fill:[{fill:["none",...U()]}],"stroke-w":[{stroke:[Pe,mi,Fn,Rl]}],stroke:[{stroke:["none",...U()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-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-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-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-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"]}},ib=Ny(sb);const Ge=(...e)=>ib(Bf(e)),np=(e,t)=>{if(e){const r=$l(e);if(r&&sp(r))return r;if(e.trim())return e.trim()}if(t){const r=$l(t);if(r&&sp(r))return r;const n=ob(t);if(n)return n;if(t.trim()&&!t.includes("@"))return t.trim()}return"Unknown"};var $l=e=>e.replace(/[^\d+*#]/g,""),sp=e=>/^\+?[\d*#]{2,}$/.test(e),ob=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]?$l(t[1]):null)};const ab=e=>{const t=Ze(null),r=Ze(null),n=Ze(new Map),s=new Audio;s.autoplay=!0;const i=Ze(void 0),o=Ze(null),a=Ze(null),l=N(()=>t.value?.configuration.uri?.user||""),{startRingtone:c,stopRingtone:u,startRingback:d,stopRingback:p,setNotificationVolume:h}=qf(),g=()=>{e.channels.value.some(te=>te.status==="incoming")?c():u();const K=e.activeChannel.value;K?.status==="calling"&&!K.hasEarlyMedia?d():p()},w=K=>{s.volume=K/100},C=async K=>{typeof s.setSinkId=="function"&&await s.setSinkId(K)},v=K=>{i.value=K},x=(K=!1)=>{const te={echoCancellation:{ideal:!0},noiseSuppression:{ideal:!0},autoGainControl:{ideal:!0},channelCount:1,voiceIsolation:{ideal:!0}};return i.value&&(te.deviceId={exact:i.value}),{audio:te,video:K}},y=async K=>{if(!t.value){try{(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(te=>te.stop())}catch(te){console.error("Microphone permission denied",te);return}try{const te=mn.makeURI(K.uri);if(!te)throw new Error("Invalid URI");t.value=new mn({uri:te,logLevel:"error",transportOptions:{server:K.transportOptions.server},authorizationUsername:K.authorizationUsername,authorizationPassword:K.authorizationPassword,reconnectionDelay:5,reconnectionAttempts:3,delegate:{onConnect:()=>e.setConnected(!0),onDisconnect:()=>e.setConnected(!1),onInvite:re=>$(re)}}),await t.value.start(),r.value=new xl(t.value),await r.value.register(),b()}catch{}}},b=()=>{let K=null,te=Date.now();const re=5e3,le=(st=1e3)=>{K&&clearTimeout(K),K=setTimeout(async()=>{K=null,await _()},st)},pe=()=>{if(document.visibilityState==="visible"){const st=Date.now()-te;st>re?(console.log(`[SipJs] Device was suspended for ${Math.round(st/1e3)}s, reconnecting...`),le(1500)):le(500)}te=Date.now()},ie=()=>{console.log("[SipJs] Network online, reconnecting..."),le(1e3)},L=()=>{console.log("[SipJs] Network offline"),e.setConnected(!1),K&&(clearTimeout(K),K=null)};let Y=null;const Fe=()=>{Y=setInterval(()=>{const st=Date.now(),k=st-te;k>1e4&&(console.log(`[SipJs] Heartbeat drift detected (${Math.round(k/1e3)}s), device may have woken from sleep`),le(1500)),te=st},1e3)},Ne=()=>{console.log("[SipJs] Page frozen"),Y&&(clearInterval(Y),Y=null)},lt=()=>{console.log("[SipJs] Page resumed"),te=Date.now(),Fe(),le(1e3)};document.addEventListener("visibilitychange",pe),window.addEventListener("online",ie),window.addEventListener("offline",L),document.addEventListener("freeze",Ne),document.addEventListener("resume",lt),Fe()},_=async()=>{if(t.value){if(!navigator.onLine){console.log("[SipJs] Skipping reconnect, device is offline");return}try{if(t.value.isConnected()||(console.log("[SipJs] Reconnecting..."),await t.value.reconnect()),r.value&&t.value.isConnected())try{await r.value.register()}catch{}}catch(K){console.error("[SipJs] Reconnection failed:",K)}}},$=K=>{console.log("[SipJs] 📞 Llamada entrante recibida"),console.log("[SipJs] Remote Identity URI:",K.remoteIdentity.uri.toString()),console.log("[SipJs] Remote Identity URI user:",K.remoteIdentity.uri.user),console.log("[SipJs] Remote Identity displayName:",K.remoteIdentity.displayName);const te=e.channels.value.find(ie=>ie.status==="idle");if(!te){console.warn("[SipJs] ⚠️ No hay canales disponibles, rechazando llamada"),K.reject();return}const re=te.id;n.value.set(re,K);const le=K.body?K.body.includes("m=video"):!1,pe=np(K.remoteIdentity.uri.user,K.remoteIdentity.displayName);console.log("[SipJs] 📋 Caller number extraído:",pe),console.log("[SipJs] 🎥 Video:",le?"Sí":"No"),e.updateChannelState(re,{status:"incoming",remoteNumber:pe,remoteDisplayName:K.remoteIdentity.displayName||void 0,hasVideo:le}),g(),e.setActiveChannelId(re),K.stateChange.addListener(ie=>{switch(ie){case V.Terminated:{const L=e.channels.value.find(Fe=>Fe.id===re),Y=np(K.remoteIdentity.uri.user,K.remoteIdentity.displayName);if(L?.status==="connected"){const Fe=Math.floor((Date.now()-(L.startTime||Date.now()))/1e3);e.addCallLog({number:Y,direction:"incoming",status:"answered",startTime:L.startTime||Date.now(),duration:Fe})}else L?.status==="incoming"&&e.addCallLog({number:Y,direction:"incoming",status:"missed",startTime:Date.now(),duration:0});e.updateChannelState(re,{status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,hasVideo:!1,hasEarlyMedia:!1}),n.value.delete(re),e.activeChannelId.value===re&&be(),g();break}case V.Established:e.updateChannelState(re,{status:"connected",startTime:Date.now()}),e.activeChannelId.value===re&&Te(K),g();break}})},R=async(K,te=!1)=>{if(!t.value)return;const re=e.activeChannelId.value;if(n.value.has(re))return;let le=mn.makeURI(K);if(!le&&t.value.configuration.uri){const L=t.value.configuration.uri.host;le=mn.makeURI(`sip:${K}@${L}`)}if(!le)return;const pe=new _l(t.value,le);n.value.set(re,pe),e.updateChannelState(re,{status:"calling",remoteNumber:K,hasVideo:te}),e.setLastDialedNumber(K),g(),pe.stateChange.addListener(L=>{switch(L){case V.Established:e.channels.value.find(Y=>Y.id===re)?.status!=="connected"&&(e.updateChannelState(re,{status:"connected",startTime:Date.now()}),Te(pe),g());break;case V.Terminated:{const Y=e.channels.value.find(Fe=>Fe.id===re);if(Y?.status==="connected"){const Fe=Math.floor((Date.now()-(Y.startTime||Date.now()))/1e3);e.addCallLog({number:K,direction:"outgoing",status:"answered",startTime:Y.startTime||Date.now(),duration:Fe})}else e.addCallLog({number:K,direction:"outgoing",status:"cancelled",startTime:Date.now(),duration:0});e.updateChannelState(re,{status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1}),n.value.delete(re),e.activeChannelId.value===re&&be(),g();break}}});const ie={sessionDescriptionHandlerOptions:{constraints:x(te)},requestDelegate:{onProgress:L=>{(L.message.statusCode===180||L.message.statusCode===183)&&(L.message.body&&(e.updateChannelState(re,{hasEarlyMedia:!0}),Te(pe)),g())},onAccept:L=>{e.channels.value.find(Y=>Y.id===re)?.status!=="connected"&&(e.updateChannelState(re,{status:"connected",startTime:Date.now()}),Te(pe),g())}}};await pe.invite(ie)},m=async(K=!1)=>{const te=n.value.get(e.activeChannelId.value);if(te instanceof Cl&&te.state===V.Initial){for(const[le,pe]of n.value.entries())if(le!==e.activeChannelId.value&&pe.state===V.Established&&!e.channels.value.find(ie=>ie.id===le)?.isHeld)try{await S(pe,!0),e.updateChannelState(le,{isHeld:!0})}catch(ie){console.error(`[SipJs] Failed to hold channel ${le}:`,ie)}const re={sessionDescriptionHandlerOptions:{constraints:x(K)}};await te.accept(re),g()}},P=async()=>{const K=n.value.get(e.activeChannelId.value);if(K)switch(K.state){case V.Initial:case V.Establishing:K instanceof _l?await K.cancel():K instanceof Cl&&await K.reject();break;case V.Established:await K.bye();break}},O=()=>{const K=n.value.get(e.activeChannelId.value);if(!K)return;const te=!e.isMuted.value;let re=!1;const le=K.sessionDescriptionHandler;le?.peerConnection&&le.peerConnection.getSenders().forEach(pe=>{pe.track&&pe.track.kind==="audio"&&(pe.track.enabled=!te,re=!0)}),a.value&&a.value.getAudioTracks().forEach(pe=>{pe.enabled=!te,re=!0}),re||console.warn("[SipJs] No audio tracks found to mute/unmute"),e.setMuted(te)},S=async(K,te)=>{const re={sessionDescriptionHandlerOptions:{hold:te}};await K.invite(re)},T=async()=>{const K=n.value.get(e.activeChannelId.value);if(K?.state!==V.Established)return;const te=!e.isHeld.value;try{await S(K,te),e.setHeld(te)}catch{}},E=async K=>{const te=e.activeChannelId.value;if(te===K)return;const re=n.value.get(te),le=n.value.get(K),pe=e.channels.value.find(L=>L.id===te),ie=e.channels.value.find(L=>L.id===K);if(re&&re.state===V.Established&&!pe?.isHeld)try{await S(re,!0),e.updateChannelState(te,{isHeld:!0})}catch{}if(e.setActiveChannelId(K),g(),le&&le.state===V.Established){if(ie?.isHeld)try{await S(le,!1),e.updateChannelState(K,{isHeld:!1})}catch{}if(ie?.isMuted){const L=le.sessionDescriptionHandler;L?.peerConnection&&L.peerConnection.getSenders().forEach(Y=>{Y.track&&Y.track.kind==="audio"&&(Y.track.enabled=!1)}),a.value&&a.value.getAudioTracks().forEach(Y=>{Y.enabled=!1})}Te(le)}else be()},M=K=>{const te=n.value.get(e.activeChannelId.value);if(te?.state!==V.Established)return;const re={requestOptions:{body:{content:`Signal=${K}\r
69
- Duration=160`,contentType:"application/dtmf-relay",contentDisposition:"signal"}}};te.info(re)},j=async K=>{console.log("[SipJs] 🔄 transferCall iniciado"),console.log("[SipJs] Target:",K);const te=e.activeChannelId.value,re=n.value.get(te);if(!re)throw console.error("[SipJs] ❌ No hay sesión activa en el canal",te),new Error("No active session to transfer");if(console.log("[SipJs] Sesión encontrada - Estado:",re.state),console.log("[SipJs] Dialog ID:",re.dialog?.id),console.log("[SipJs] Call ID:",re.dialog?.callId),re.state!==V.Established)throw console.error("[SipJs] ❌ Sesión no establecida. Estado actual:",re.state),new Error(`Cannot transfer call. Call is not established (state: ${re.state})`);let le=mn.makeURI(K);if(!le&&t.value?.configuration.uri){const pe=t.value.configuration.uri.host;console.log("[SipJs] Construyendo URI con dominio:",pe),le=mn.makeURI(`sip:${K}@${pe}`)}if(!le)throw console.error("[SipJs] ❌ URI de destino inválida:",K),new Error(`Invalid transfer target: ${K}`);console.log("[SipJs] 📤 URI de transferencia:",le.toString()),console.log("[SipJs] URI scheme:",le.scheme),console.log("[SipJs] URI user:",le.user),console.log("[SipJs] URI host:",le.host);try{console.log("[SipJs] 🚀 Enviando REFER..."),await re.refer(le,{requestDelegate:{onAccept:pe=>{console.log("[SipJs] ✅ Transfer REFER aceptado por el servidor (202 Accepted)"),console.log("[SipJs] Response:",pe.message)},onReject:pe=>{const ie=pe.message.statusCode;console.error("[SipJs] ❌ Transfer REFER rechazado:",ie),console.error("[SipJs] Response completo:",pe.message)}},onNotify:pe=>{console.log("[SipJs] 📬 NOTIFY recibido para transferencia"),console.log("[SipJs] NOTIFY request:",pe.request),pe.accept();const ie=pe.request.body;if(console.log("[SipJs] NOTIFY body:",ie),ie){const L=ie.match(/SIP\/2\.0\s+(\d{3})(.*)/);if(L&&L[1]){const Y=parseInt(L[1],10),Fe=L[2]?.trim()||"";if(console.log("[SipJs] 📊 Status code:",Y),console.log("[SipJs] 📊 Status text:",Fe),Y>=200&&Y<300)console.log("[SipJs] ✅ Transferencia exitosa! Terminando sesión..."),setTimeout(()=>{re.bye().catch(Ne=>{console.warn("[SipJs] Error hanging up after successful transfer:",Ne)})},500);else if(Y>=400){console.error("[SipJs] ❌ Transfer falló con status:",Y,Fe),console.log("[SipJs] 🔄 Manteniendo la sesión activa para el usuario");const Ne={404:"Número no encontrado",486:"Número ocupado",487:"Transferencia cancelada",503:"Servicio no disponible - el destino puede estar fuera de línea"}[Y]||`Error en transferencia (código ${Y})`;console.warn("[SipJs] 💬",Ne)}else Y>=100&&Y<200&&console.log("[SipJs] 📞 Transferencia en progreso:",Y,Fe)}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(pe){throw console.error("[SipJs] ❌ Error en transferCall:",pe),console.error("[SipJs] Error type:",pe?.constructor?.name),console.error("[SipJs] Error message:",pe instanceof Error?pe.message:String(pe)),console.error("[SipJs] Error stack:",pe instanceof Error?pe.stack:"N/A"),pe}},z=async K=>{console.log("[SipJs] 🔄 startAttendedTransfer iniciado"),console.log("[SipJs] Target:",K);const te=e.activeChannelId.value,re=n.value.get(te);if(console.log("[SipJs] Canal original:",te),console.log("[SipJs] Sesión original:",re?.state),!re||re.state!==V.Established)throw console.error("[SipJs] ❌ No hay llamada establecida para transferir"),new Error("No established call to transfer");const le=e.channels.value.find(pe=>pe.status==="idle");if(console.log("[SipJs] Canal de consulta encontrado:",le?.id),!le)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 S(re,!0),e.updateChannelState(te,{isHeld:!0}),console.log("[SipJs] ✅ Llamada original en hold")}catch(pe){throw console.error("[SipJs] ❌ Failed to hold original call:",pe),new Error("Failed to put call on hold")}console.log("[SipJs] 🔄 Cambiando al canal de consulta:",le.id),e.setActiveChannelId(le.id);try{console.log("[SipJs] 📞 Iniciando llamada de consulta a:",K),await R(K,!1),console.log("[SipJs] ✅ Llamada de consulta iniciada"),e.setTransferInProgress({originalChannelId:te,consultationChannelId:le.id,targetNumber:K}),console.log("[SipJs] 📋 Transferencia en progreso registrada")}catch(pe){throw console.error("[SipJs] ❌ Failed to start consultation call:",pe),console.log("[SipJs] 🔄 Volviendo al canal original y quitando hold..."),e.setActiveChannelId(te),await S(re,!1).catch(()=>{}),e.updateChannelState(te,{isHeld:!1}),new Error("Failed to initiate consultation call")}},J=async()=>{console.log("[SipJs] 🔄 completeAttendedTransfer iniciado");const K=e.transferInProgress.value;if(!K)throw console.error("[SipJs] ❌ No hay transferencia en progreso"),new Error("No transfer in progress");console.log("[SipJs] Estado de transferencia:",K);const te=n.value.get(K.originalChannelId),re=n.value.get(K.consultationChannelId);if(console.log("[SipJs] Sesión original:",te?.state),console.log("[SipJs] Sesión de consulta:",re?.state),!te||!re)throw console.error("[SipJs] ❌ Falta una o ambas sesiones"),new Error("Missing session for transfer");if(re.state!==V.Established)throw console.error("[SipJs] ❌ Llamada de consulta no está establecida. Estado:",re.state),new Error("Consultation call not established");const le=re.dialog;if(!le)throw new Error("No dialog available for consultation session");const pe=le.callId,ie=le.remoteTag,L=le.localTag;let Y=mn.makeURI(K.targetNumber);if(!Y&&t.value?.configuration.uri){const Ne=t.value.configuration.uri.host;Y=mn.makeURI(`sip:${K.targetNumber}@${Ne}`)}if(!Y)throw new Error("Invalid transfer target URI");const Fe=`${encodeURIComponent(pe)}%3Bto-tag%3D${encodeURIComponent(ie)}%3Bfrom-tag%3D${encodeURIComponent(L)}`;Y.setHeader("Replaces",Fe);try{await te.refer(Y,{onNotify:Ne=>{Ne.accept();const lt=Ne.request.body,st=typeof lt=="string"?lt:lt&&typeof lt=="object"&&"content"in lt?lt.content:void 0;if(st){const k=st.match(/SIP\/2\.0\s+(\d+)/);if(k&&k[1]){const H=parseInt(k[1]);H>=200&&H<300?setTimeout(()=>{te.bye().catch(()=>{}),re.bye().catch(()=>{}),e.setTransferInProgress(null)},500):H>=400&&(console.error("[SipJs] Attended transfer failed with status:",H),e.setTransferInProgress(null))}}},requestDelegate:{onAccept:()=>{},onReject:Ne=>{console.error("[SipJs] Attended transfer REFER rejected:",Ne.message.statusCode),e.setTransferInProgress(null)}}})}catch(Ne){throw console.error("[SipJs] Attended transfer failed:",Ne),Ne}},U=async()=>{const K=e.transferInProgress.value;if(!K)throw new Error("No transfer in progress");console.log("[SipJs] Canceling attended transfer...");const te=n.value.get(K.originalChannelId),re=n.value.get(K.consultationChannelId);if(re)try{await re.bye(),console.log("[SipJs] Consultation call ended")}catch(le){console.warn("[SipJs] Error ending consultation:",le)}if(te)try{e.setActiveChannelId(K.originalChannelId),await S(te,!1),e.updateChannelState(K.originalChannelId,{isHeld:!1}),console.log("[SipJs] Returned to original call")}catch(le){console.warn("[SipJs] Error resuming original call:",le)}e.setTransferInProgress(null)},Te=K=>{const te=K.sessionDescriptionHandler?.peerConnection;if(!te)return;const re=te.getReceivers(),le=te.getSenders(),pe=re.map(Y=>Y.track).filter(Y=>!!Y);if(o.value){const Y=o.value.getTracks();if(Y.length===pe.length&&pe.every(Fe=>Y.some(Ne=>Ne.id===Fe.id)))return}s.pause(),s.srcObject=null;const ie=new MediaStream(pe),L=new MediaStream;le.forEach(Y=>{Y.track&&L.addTrack(Y.track)}),a.value=L,o.value=ie,s.srcObject=ie,s.play().catch(Y=>{Y.name!=="AbortError"&&console.warn(Y)})},be=()=>{s.pause(),s.srcObject=null,o.value?.getTracks().forEach(K=>K.stop()),a.value?.getTracks().forEach(K=>K.stop()),o.value=null,a.value=null};return{initUserAgent:y,makeCall:R,answerCall:m,hangupCall:P,toggleMute:O,toggleHold:T,sendDTMF:M,transferCall:j,startAttendedTransfer:z,completeAttendedTransfer:J,cancelAttendedTransfer:U,switchChannel:E,extension:l,setVolume:w,setNotificationVolume:h,setOutputDevice:C,setInputDevice:v,remoteStream:o,localStream:a}};var ip=e=>typeof e=="boolean"?`${e}`:e===0?"0":e;const op=Bf,ap=(e,t)=>r=>{var n;if(t?.variants==null)return op(e,r?.class,r?.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(l=>{const c=r?.[l],u=i?.[l];if(c===null)return null;const d=ip(c)||ip(u);return s[l][d]}),a=r&&Object.entries(r).reduce((l,c)=>{let[u,d]=c;return d===void 0||(l[u]=d),l},{});return op(e,o,t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((l,c)=>{let{class:u,className:d,...p}=c;return Object.entries(p).every(h=>{let[g,w]=h;return Array.isArray(w)?w.includes({...i,...a}[g]):{...i,...a}[g]===w})?[...l,u,d]:l},[]),r?.class,r?.className)};function lb(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function cb(e,t,r){lb(e,t),t.set(e,r)}function ub(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 Po(e,t){return e.get(ub(e,t))}function lp(e){return typeof e=="string"?`'${e}'`:new db().serialize(e)}var db=(function(){var e=new WeakMap;class t{constructor(){cb(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,c]=i[a];o+=`${this.serialize(l,!0)}:${this.serialize(c)}`,a<i.length-1&&(o+=",")}return o+"}"}$object(n){let s=Po(e,this).get(n);return s===void 0&&(Po(e,this).set(n,`#${Po(e,this).size}`),s=this.serializeObject(n),Po(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 wi(e,t){return e===t||lp(e)===lp(t)}function yi(e,t=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY){return Math.min(r,Math.max(t,e))}function vt(e,t){const r=typeof e=="string"&&!t?`${e}Context`:t,n=Symbol(r);return[o=>{const a=bt(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=>(Dn(n,o),o)]}function Pt(){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 Dl(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 Pl(e){return e==null}function cp(e,t){return Pl(e)?!1:Array.isArray(e)?e.some(r=>wi(r,t)):wi(e,t)}function Ol(e){return e?e.flatMap(t=>t.type===Oe?Ol(t.children):[t]):[]}var[Oo,jT]=vt("ConfigProvider");function fb(e,t){var r;const n=Ze();return rt(()=>{n.value=e()},{...t,flush:(r=t?.flush)!=null?r:"sync"}),wt(n)}function Es(e){return is()?(Mi(e),!0):!1}function pb(){const e=new Set,t=i=>{e.delete(i)};return{on:i=>{e.add(i);const o=()=>t(i);return Es(o),{off:o}},off:t,trigger:(...i)=>Promise.all(Array.from(e).map(o=>o(...i))),clear:()=>{e.clear()}}}function hb(e){let t=!1,r;const n=fa(!0);return(...s)=>(t||(r=n.run(()=>e(...s)),t=!0),r)}function gb(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=fa(!0),r=n.run(()=>e(...i))),Es(s),r)}var nr=typeof window<"u"&&typeof document<"u",UT=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,vb=e=>typeof e<"u",mb=Object.prototype.toString,wb=e=>mb.call(e)==="[object Object]",up=()=>{},dp=yb();function yb(){var e,t;return nr&&((e=window?.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window?.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function bb(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}function Sb(e,t={}){let r,n,s=up;const i=l=>{clearTimeout(l),s(),s=up};let o;return l=>{const c=xe(e),u=xe(t.maxWait);return r&&i(r),c<=0||u!==void 0&&u<=0?(n&&(i(n),n=null),Promise.resolve(l())):new Promise((d,p)=>{s=t.rejectOnCancel?p:d,o=l,u&&!n&&(n=setTimeout(()=>{r&&i(r),n=null,d(o())},u)),r=setTimeout(()=>{n&&i(n),n=null,d(l())},c)})}}function fp(e){const t=Object.create(null);return r=>t[r]||(t[r]=e(r))}var Cb=/\B([A-Z])/g,zT=fp(e=>e.replace(Cb,"-$1").toLowerCase()),_b=/-(\w)/g,KT=fp(e=>e.replace(_b,(t,r)=>r?r.toUpperCase():""));function xb(e){return e||tt()}function Hl(e){return Array.isArray(e)?e:[e]}function pp(e,t=1e4){return zs((r,n)=>{let s=xe(e),i;const o=()=>setTimeout(()=>{s=xe(e),n()},xe(t));return Es(()=>{clearTimeout(i)}),{get(){return r(),s},set(a){s=a,n(),clearTimeout(i),i=o()}}})}function hp(e,t=200,r={}){return bb(Sb(t,r),e)}function Tb(e,t){xb(t)&&vs(e,t)}function gp(e,t,r={}){const{immediate:n=!0,immediateCallback:s=!1}=r,i=Ze(!1);let o=null;function a(){o&&(clearTimeout(o),o=null)}function l(){i.value=!1,a()}function c(...u){s&&e(),a(),i.value=!0,o=setTimeout(()=>{i.value=!1,o=null,e(...u)},xe(t))}return n&&(i.value=!0,nr&&c()),Es(l),{isPending:wt(i),start:c,stop:l}}function Eb(e,t,r){return Ie(e,t,{...r,immediate:!0})}function Ab(e,t,r){const n=Ie(e,(...s)=>(ot(()=>n()),t(...s)),r);return n}var Ho=nr?window:void 0,WT=nr?window.document:void 0,GT=nr?window.navigator:void 0,JT=nr?window.location:void 0;function Tr(e){var t;const r=xe(e);return(t=r?.$el)!=null?t:r}function Mo(...e){const t=[],r=()=>{t.forEach(a=>a()),t.length=0},n=(a,l,c,u)=>(a.addEventListener(l,c,u),()=>a.removeEventListener(l,c,u)),s=N(()=>{const a=Hl(xe(e[0])).filter(l=>l!=null);return a.every(l=>typeof l!="string")?a:void 0}),i=Eb(()=>{var a,l;return[(l=(a=s.value)==null?void 0:a.map(c=>Tr(c)))!=null?l:[Ho].filter(c=>c!=null),Hl(xe(s.value?e[1]:e[0])),Hl(f(s.value?e[2]:e[1])),xe(s.value?e[3]:e[2])]},([a,l,c,u])=>{if(r(),!a?.length||!l?.length||!c?.length)return;const d=wb(u)?{...u}:u;t.push(...a.flatMap(p=>l.flatMap(h=>c.map(g=>n(p,h,g,d)))))},{flush:"post"}),o=()=>{i(),r()};return Es(r),o}function Ml(){const e=Ze(!1),t=tt();return t&&Ue(()=>{e.value=!0},t),e}function kb(e){const t=Ml();return N(()=>(t.value,!!e()))}function Ib(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Rb(...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=Ho,eventName:i="keydown",passive:o=!1,dedupe:a=!1}=n,l=Ib(t);return Mo(s,i,u=>{u.repeat&&xe(a)||l(u)&&r(u)},o)}function $b(e){return JSON.parse(JSON.stringify(e))}function Ln(e,t,r={}){const{window:n=Ho,...s}=r;let i;const o=kb(()=>n&&"ResizeObserver"in n),a=()=>{i&&(i.disconnect(),i=void 0)},l=Ie(N(()=>{const u=xe(e);return Array.isArray(u)?u.map(d=>Tr(d)):[Tr(u)]}),u=>{if(a(),o.value&&n){i=new ResizeObserver(t);for(const d of u)d&&i.observe(d,s)}},{immediate:!0,flush:"post"}),c=()=>{a(),l()};return Es(c),{isSupported:o,stop:c}}var YT=[{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 yn(e,t,r,n={}){var s,i,o;const{clone:a=!1,passive:l=!1,eventName:c,deep:u=!1,defaultValue:d,shouldEmit:p}=n,h=tt(),g=r||h?.emit||((s=h?.$emit)==null?void 0:s.bind(h))||((o=(i=h?.proxy)==null?void 0:i.$emit)==null?void 0:o.bind(h?.proxy));let w=c;t||(t="modelValue"),w=w||`update:${t.toString()}`;const C=y=>a?typeof a=="function"?a(y):$b(y):y,v=()=>vb(e[t])?C(e[t]):d,x=y=>{p?p(y)&&g(w,y):g(w,y)};if(l){const y=B(v());let b=!1;return Ie(()=>e[t],_=>{b||(b=!0,y.value=C(_),ot(()=>b=!1))}),Ie(y,_=>{!b&&(_!==e[t]||u)&&x(_)},{deep:u}),y}else return N({get(){return v()},set(y){x(y)}})}function ql(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 Nl(e,t,r=".",n){if(!ql(t))return Nl(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]]:ql(o)&&ql(s[i])?s[i]=Nl(o,s[i],(r?`${r}.`:"")+i.toString(),n):s[i]=o))}return s}function Bl(e){return(...t)=>t.reduce((r,n)=>Nl(r,n,"",e),{})}var Db=Bl(),ZT=Bl((e,t,r)=>{if(e[t]!==void 0&&typeof r=="function")return e[t]=r(e[t]),!0}),XT=Bl((e,t,r)=>{if(Array.isArray(e[t])&&typeof r=="function")return e[t]=r(e[t]),!0}),Pb=gb(()=>{const e=B(new Map),t=B(),r=N(()=>{for(const o of e.value.values())if(o)return!0;return!1}),n=Oo({scrollBody:B(!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??"",dp&&s?.(),t.value=void 0};return Ie(r,(o,a)=>{if(!nr)return;if(!o){a&&i();return}t.value===void 0&&(t.value=document.body.style.overflow);const l=window.innerWidth-document.documentElement.clientWidth,c={padding:l,margin:0},u=n.scrollBody?.value?typeof n.scrollBody.value=="object"?Db({padding:n.scrollBody.value.padding===!0?l:n.scrollBody.value.padding,margin:n.scrollBody.value.margin===!0?l:n.scrollBody.value.margin},c):c:{padding:0,margin:0};l>0&&(document.body.style.paddingRight=typeof u.padding=="number"?`${u.padding}px`:String(u.padding),document.body.style.marginRight=typeof u.margin=="number"?`${u.margin}px`:String(u.margin),document.documentElement.style.setProperty("--scrollbar-width",`${l}px`),document.body.style.overflow="hidden"),dp&&(s=Mo(document,"touchmove",d=>Ob(d),{passive:!1})),ot(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),e});function vp(e){const t=Math.random().toString(36).substring(2,7),r=Pb();r.value.set(t,e??!1);const n=N({get:()=>r.value.get(t)??!1,set:s=>r.value.set(t,s)});return Tb(()=>{r.value.delete(t)}),n}function mp(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:mp(r)}}function Ob(e){const t=e||window.event,r=t.target;return r instanceof Element&&mp(r)?!1:t.touches.length>1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}function bi(e){const t=Oo({dir:B("ltr")});return N(()=>e?.value||t.dir?.value||"ltr")}function qo(e){const t=tt(),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(ct(s))]=(...i)=>e(s,...i)}),n}var Fl=0;function Hb(){rt(e=>{if(!nr)return;const t=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",t[0]??wp()),document.body.insertAdjacentElement("beforeend",t[1]??wp()),Fl++,e(()=>{Fl===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(r=>r.remove()),Fl--})})}function wp(){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 No(e){return N(()=>xe(e)?!!Tr(e)?.closest("form"):!0)}function Se(){const e=tt(),t=B(),r=N(()=>["#text","#comment"].includes(t.value?.$el.nodeName)?t.value?.$el.nextElementSibling:Tr(t)),n=Object.assign({},e.exposed),s={};for(const o in e.props)Object.defineProperty(s,o,{enumerable:!0,configurable:!0,get:()=>e.props[o]});if(Object.keys(n).length>0)for(const o in n)Object.defineProperty(s,o,{enumerable:!0,configurable:!0,get:()=>n[o]});Object.defineProperty(s,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=s;function i(o){t.value=o,o&&(Object.defineProperty(s,"$el",{enumerable:!0,configurable:!0,get:()=>o instanceof Element?o:o.$el}),e.exposed=s)}return{forwardRef:i,currentRef:t,currentElement:r}}function Er(e){const t=tt(),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 N(()=>{const s={},i=t?.vnode.props??{};return Object.keys(i).forEach(o=>{s[ct(o)]=i[o]}),Object.keys({...r,...s}).reduce((o,a)=>(n.value[a]!==void 0&&(o[a]=n.value[a]),o),{})})}function Ar(e,t){const r=Er(e),n=t?qo(t):{};return N(()=>({...r.value,...n}))}function Mb(e,t){const r=pp(!1,300),n=B(null),s=pb();function i(){n.value=null,r.value=!1}function o(a,l){const c=a.currentTarget,u={x:a.clientX,y:a.clientY},d=Nb(u,qb(u,c.getBoundingClientRect())),p=Bb(l.getBoundingClientRect());n.value=Lb([...d,...p]),r.value=!0}return rt(a=>{if(e.value&&t.value){const l=u=>o(u,t.value),c=u=>o(u,e.value);e.value.addEventListener("pointerleave",l),t.value.addEventListener("pointerleave",c),a(()=>{e.value?.removeEventListener("pointerleave",l),t.value?.removeEventListener("pointerleave",c)})}}),rt(a=>{if(n.value){const l=c=>{if(!n.value||!(c.target instanceof Element))return;const u=c.target,d={x:c.clientX,y:c.clientY},p=e.value?.contains(u)||t.value?.contains(u),h=!Fb(d,n.value),g=!!u.closest("[data-grace-area-trigger]");p?i():(h||g)&&(i(),s.trigger())};e.value?.ownerDocument.addEventListener("pointermove",l),a(()=>e.value?.ownerDocument.removeEventListener("pointermove",l))}}),{isPointerInTransit:r,onPointerExit:s.on}}function qb(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,s,i)){case i:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Nb(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 Bb(e){const{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}function Fb(e,t){const{x:r,y:n}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const a=t[i].x,l=t[i].y,c=t[o].x,u=t[o].y;l>n!=u>n&&r<(c-a)*(n-l)/(u-l)+a&&(s=!s)}return s}function Lb(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),Vb(t)}function Vb(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 jb=function(e){return typeof document>"u"?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},As=new WeakMap,Bo=new WeakMap,Fo={},Ll=0,yp=function(e){return e&&(e.host||yp(e.parentNode))},Ub=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=yp(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})},zb=function(e,t,r,n){var s=Ub(t,Array.isArray(e)?e:[e]);Fo[r]||(Fo[r]=new WeakMap);var i=Fo[r],o=[],a=new Set,l=new Set(s),c=function(d){!d||a.has(d)||(a.add(d),c(d.parentNode))};s.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(p){if(a.has(p))u(p);else try{var h=p.getAttribute(n),g=h!==null&&h!=="false",w=(As.get(p)||0)+1,C=(i.get(p)||0)+1;As.set(p,w),i.set(p,C),o.push(p),w===1&&g&&Bo.set(p,!0),C===1&&p.setAttribute(r,"true"),g||p.setAttribute(n,"true")}catch(v){console.error("aria-hidden: cannot operate on ",p,v)}})};return u(t),a.clear(),Ll++,function(){o.forEach(function(d){var p=As.get(d)-1,h=i.get(d)-1;As.set(d,p),i.set(d,h),p||(Bo.has(d)||d.removeAttribute(n),Bo.delete(d)),h||d.removeAttribute(r)}),Ll--,Ll||(As=new WeakMap,As=new WeakMap,Bo=new WeakMap,Fo={})}},Kb=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=t||jb(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live], script"))),zb(n,s,r,"aria-hidden")):function(){return null}};function bp(e){let t;Ie(()=>Tr(e),r=>{r?t=Kb(r):t&&t()}),Rt(()=>{t&&t()})}var Wb=0;function Vn(e,t="reka"){if(e)return e;if("useId"in kw)return`${t}-${Cu?.()}`;const r=Oo({useId:void 0});return r.useId?`${t}-${r.useId()}`:`${t}-${++Wb}`}function Sp(e){const t=B(),r=N(()=>t.value?.width??0),n=N(()=>t.value?.height??0);return Ue(()=>{const s=Tr(e);if(s){t.value={width:s.offsetWidth,height:s.offsetHeight};const i=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let l,c;if("borderBoxSize"in a){const u=a.borderBoxSize,d=Array.isArray(u)?u[0]:u;l=d.inlineSize,c=d.blockSize}else l=s.offsetWidth,c=s.offsetHeight;t.value={width:l,height:c}});return i.observe(s,{box:"border-box"}),()=>i.unobserve(s)}else t.value=void 0}),{width:r,height:n}}function Cp(e,t){const r=B(e);function n(i){return t[r.value][i]??r.value}return{state:r,dispatch:i=>{r.value=n(i)}}}function _p(e){const t=pp("",1e3);return{search:t,handleTypeaheadSearch:(s,i)=>{if(t.value=t.value+s,e)e(s);else{const o=Pt(),a=i.map(d=>({...d,textValue:d.value?.textValue??d.ref.textContent?.trim()??""})),l=a.find(d=>d.ref===o),c=Jb(a.map(d=>d.textValue),t.value,l?.textValue),u=a.find(d=>d.textValue===c);return u&&u.ref.focus(),u?.ref}},resetTypeahead:()=>{t.value=""}}}function Gb(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function Jb(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=Gb(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 Yb(e,t){const r=B({}),n=B("none"),s=B(e),i=e.value?"mounted":"unmounted";let o;const a=t.value?.ownerDocument.defaultView??Ho,{state:l,dispatch:c}=Cp(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),u=w=>{if(nr){const C=new CustomEvent(w,{bubbles:!1,cancelable:!1});t.value?.dispatchEvent(C)}};Ie(e,async(w,C)=>{const v=C!==w;if(await ot(),v){const x=n.value,y=Lo(t.value);w?(c("MOUNT"),u("enter"),y==="none"&&u("after-enter")):y==="none"||y==="undefined"||r.value?.display==="none"?(c("UNMOUNT"),u("leave"),u("after-leave")):C&&x!==y?(c("ANIMATION_OUT"),u("leave")):(c("UNMOUNT"),u("after-leave"))}},{immediate:!0});const d=w=>{const C=Lo(t.value),v=C.includes(CSS.escape(w.animationName)),x=l.value==="mounted"?"enter":"leave";if(w.target===t.value&&v&&(u(`after-${x}`),c("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&&C==="none"&&c("ANIMATION_END")},p=w=>{w.target===t.value&&(n.value=Lo(t.value))},h=Ie(t,(w,C)=>{w?(r.value=getComputedStyle(w),w.addEventListener("animationstart",p),w.addEventListener("animationcancel",d),w.addEventListener("animationend",d)):(c("ANIMATION_END"),o!==void 0&&a?.clearTimeout(o),C?.removeEventListener("animationstart",p),C?.removeEventListener("animationcancel",d),C?.removeEventListener("animationend",d))},{immediate:!0}),g=Ie(l,()=>{const w=Lo(t.value);n.value=l.value==="mounted"?w:"none"});return Rt(()=>{h(),g()}),{isPresent:N(()=>["mounted","unmountSuspended"].includes(l.value))}}function Lo(e){return e&&getComputedStyle(e).animationName||"none"}var jn=G({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:r}){const{present:n,forceMount:s}=ft(e),i=B(),{isPresent:o}=Yb(n,i);r({present:o});let a=t.default({present:o.value});a=Ol(a||[]);const l=tt();if(a&&a?.length>1){const c=l?.parent?.type.name?`<${l.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${c}\` 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(u=>` - ${u}`).join(`
68
+ `))}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}};Mf.defaultOptions={server:"",connectionTimeout:5,keepAliveInterval:0,keepAliveDebounce:10,traceSip:!0};var mn=class oa{constructor(t={}){if(this._publishers={},this._registerers={},this._sessions={},this._subscriptions={},this._state=Ct.Stopped,this._stateEventEmitter=new di,this.delegate=t.delegate,this.options=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},oa.defaultOptions()),{sipjsId:Bn(5)}),{uri:new un("sip","anonymous."+Bn(6),"anonymous.invalid")}),{viaHost:Bn(12)+".invalid"}),oa.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 Kw,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=ht.error;break;case"warn":this.loggerFactory.level=ht.warn;break;case"log":this.loggerFactory.level=ht.log;break;case"debug":this.loggerFactory.level=ht.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:oa.newUUID(),ut.parse(this._instanceId,"uuid")===-1)throw new Error("Invalid instanceId.");this._userAgentCore=this.initCore()}static makeURI(t){return ut.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:vy(),sessionDescriptionHandlerFactoryOptions:{},sipExtension100rel:pr.Unsupported,sipExtensionReplaces:pr.Unsupported,sipExtensionExtraSupported:[],sipjsId:"",transportConstructor:Mf,transportOptions:{},uri:new un("sip","anonymous","anonymous.invalid"),userAgentString:"SIP.js/"+Pw,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===Ct.Stopped?Promise.reject(new Error("User agent stopped.")):Promise.resolve().then(()=>this.transport.connect())}start(){return this.state===Ct.Started?(this.logger.warn("User agent already started"),Promise.resolve()):(this.logger.log(`Starting ${this.configuration.uri}`),this.transitionState(Ct.Started),this.transport.connect())}async stop(){if(this.state===Ct.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(Ct.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(Ct.Stopped)}_makeInviter(t,r){return new _l(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:Bn(8),r=this.options.contactParams;return{pubGruu:void 0,tempGruu:void 0,uri:new un("sip",t,this.options.viaHost,void 0,r),toString:(n={})=>{const s=n.anonymous||!1,i=n.outbound||!1,o=n.register||!1;let a="<";return s?a+=this.contact.tempGruu||`sip:anonymous@anonymous.invalid;transport=${r.transport?r.transport:"ws"}`:o?a+=this.contact.uri:a+=this.contact.pubGruu||this.contact.uri,i&&(a+=";ob"),a+=">",this.options.instanceIdAlwaysAdded&&(a+=';+sip.instance="<urn:uuid:'+this._instanceId+'>"'),a}}}initCore(){let t=[];t.push("outbound"),this.options.sipExtension100rel===pr.Supported&&t.push("100rel"),this.options.sipExtensionReplaces===pr.Supported&&t.push("replaces"),this.options.sipExtensionExtraSupported&&t.push(...this.options.sipExtensionExtraSupported),this.options.hackAllowUnregisteredOptionTags||(t=t.filter(n=>Uw[n])),t=Array.from(new Set(t));const r=t.slice();return(this.contact.pubGruu||this.contact.tempGruu)&&r.push("gruu"),new fy({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 zw(this.getLoggerFactory(),i,n,s)},transportAccessor:()=>this.transport},{onInvite:n=>{var s;const i=new Cl(this,n);if(n.delegate={onCancel:o=>{i._onCancel(o)},onTransportError:o=>{this.logger.error("A transport error has occurred while handling an incoming INVITE request.")}},n.trying(),this.options.sipExtensionReplaces!==pr.Unsupported){const o=n.message.parseHeader("replaces");if(o){const a=o.call_id;if(typeof a!="string")throw new Error("Type of call id is not string");const l=o.replaces_to_tag;if(typeof l!="string")throw new Error("Type of to tag is not string");const c=o.replaces_from_tag;if(typeof c!="string")throw new Error("type of from tag is not string");const u=a+l+c,d=this.userAgentCore.dialogs.get(u);if(!d){i.reject({statusCode:481});return}if(!d.early&&o.early_only===!0){i.reject({statusCode:486});return}const p=this._sessions[a+c]||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 Tf(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!==Ct.Stopped&&this.delegate&&this.delegate.onConnect&&this.delegate.onConnect()}onTransportDisconnect(t){this.state!==Ct.Stopped&&(this.delegate&&this.delegate.onDisconnect&&this.delegate.onDisconnect(t),t&&this.options.reconnectionAttempts>0&&this.attemptReconnection())}onTransportMessage(t){const r=Ao.parseMessage(t,this.getLogger("sip.Parser"));if(!r){this.logger.warn("Failed to parse incoming message. Dropping.");return}if(this.state===Ct.Stopped&&r instanceof Ss){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 Ss){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 dn){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 Ss){this.userAgentCore.receiveIncomingRequestFromTransport(r);return}if(r instanceof dn){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 Ct.Started:t!==Ct.Stopped&&n();break;case Ct.Stopped:t!==Ct.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)}},gt=new window.AudioContext,my={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=F(null),gi=F(null),vi=F(.5);const qf=()=>({playDtmf:(o,a=150)=>{gt.state==="suspended"&&gt.resume();const l=my[o.toUpperCase()];if(!l)return;const c=gt.createOscillator(),u=gt.createOscillator(),d=gt.createGain();c.frequency.value=l[0],u.frequency.value=l[1],c.type="sine",u.type="sine",d.gain.value=.1*vi.value,c.connect(d),u.connect(d),d.connect(gt.destination),c.start(),u.start(),setTimeout(()=>{c.stop(),u.stop(),c.disconnect(),u.disconnect(),d.disconnect()},a)},startRingtone:()=>{if(hi.value)return;gt.state==="suspended"&&gt.resume();const o=()=>{const a=gt.currentTime,l=gt.createOscillator(),c=gt.createGain();l.type="sine",l.frequency.setValueAtTime(523.25,a),l.frequency.setValueAtTime(659.25,a+.1),l.frequency.setValueAtTime(783.99,a+.2),c.gain.setValueAtTime(.1*vi.value,a),c.gain.exponentialRampToValueAtTime(.001,a+.5),l.connect(c),c.connect(gt.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;gt.state==="suspended"&&gt.resume();const o=()=>{const a=gt.currentTime,l=gt.createOscillator(),c=gt.createGain();l.type="sine",l.frequency.value=425,c.gain.setValueAtTime(.1*vi.value,a),c.gain.linearRampToValueAtTime(.1*vi.value,a+1),c.gain.linearRampToValueAtTime(0,a+1.1),l.connect(c),c.connect(gt.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 Nf(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=Nf(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Bf(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=Nf(e))&&(n&&(n+=" "),n+=t);return n}var wy=(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},yy=(e,t)=>({classGroupId:e,validator:t}),Ff=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Ro="-",Lf=[],by="arbitrary..",Sy=e=>{const t=_y(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return Cy(o);const a=o.split(Ro);return Vf(a,a[0]===""&&a.length>1?1:0,t)},getConflictingClassGroupIds:(o,a)=>{if(a){const l=n[o],c=r[o];return l?c?wy(c,l):l:c||Lf}return r[o]||Lf}}},Vf=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const n=e[t],s=r.nextPart.get(n);if(s){const l=Vf(e,t+1,s);if(l)return l}const i=r.validators;if(i===null)return;const o=t===0?e.join(Ro):e.slice(t).join(Ro),a=i.length;for(let l=0;l<a;l++){const c=i[l];if(c.validator(o))return c.classGroupId}},Cy=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?by+n:void 0})(),_y=e=>{const{theme:t,classGroups:r}=e;return xy(r,t)},xy=(e,t)=>{const r=Ff();for(const n in e){const s=e[n];Al(s,r,n,t)}return r},Al=(e,t,r,n)=>{const s=e.length;for(let i=0;i<s;i++){const o=e[i];Ty(o,t,r,n)}},Ty=(e,t,r,n)=>{if(typeof e=="string"){Ey(e,t,r);return}if(typeof e=="function"){Ay(e,t,r,n);return}ky(e,t,r,n)},Ey=(e,t,r)=>{const n=e===""?t:jf(t,e);n.classGroupId=r},Ay=(e,t,r,n)=>{if(Iy(e)){Al(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(yy(r,e))},ky=(e,t,r,n)=>{const s=Object.entries(e),i=s.length;for(let o=0;o<i;o++){const[a,l]=s[o];Al(l,jf(t,a),r,n)}},jf=(e,t)=>{let r=e;const n=t.split(Ro),s=n.length;for(let i=0;i<s;i++){const o=n[i];let a=r.nextPart.get(o);a||(a=Ff(),r.nextPart.set(o,a)),r=a}return r},Iy=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Ry=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)}}},kl="!",Uf=":",$y=[],zf=(e,t,r,n,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:s}),Dy=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=s=>{const i=[];let o=0,a=0,l=0,c;const u=s.length;for(let w=0;w<u;w++){const S=s[w];if(o===0&&a===0){if(S===Uf){i.push(s.slice(l,w)),l=w+1;continue}if(S==="/"){c=w;continue}}S==="["?o++:S==="]"?o--:S==="("?a++:S===")"&&a--}const d=i.length===0?s:s.slice(l);let p=d,h=!1;d.endsWith(kl)?(p=d.slice(0,-1),h=!0):d.startsWith(kl)&&(p=d.slice(1),h=!0);const m=c&&c>l?c-l:void 0;return zf(i,h,p,m)};if(t){const s=t+Uf,i=n;n=o=>o.startsWith(s)?i(o.slice(s.length)):zf($y,!1,o,void 0,!0)}if(r){const s=n;n=i=>r({className:i,parseClassName:s})}return n},Py=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}},Oy=e=>({cache:Ry(e.cacheSize),parseClassName:Dy(e),sortModifiers:Py(e),...Sy(e)}),Hy=/\s+/,My=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:i}=t,o=[],a=e.trim().split(Hy);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:d,modifiers:p,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:w}=r(u);if(d){l=u+(l.length>0?" "+l:l);continue}let S=!!w,g=n(S?m.substring(0,w):m);if(!g){if(!S){l=u+(l.length>0?" "+l:l);continue}if(g=n(m),!g){l=u+(l.length>0?" "+l:l);continue}S=!1}const x=p.length===0?"":p.length===1?p[0]:i(p).join(":"),y=h?x+kl:x,b=y+g;if(o.indexOf(b)>-1)continue;o.push(b);const _=s(g,S);for(let $=0;$<_.length;++$){const R=_[$];o.push(y+R)}l=u+(l.length>0?" "+l:l)}return l},qy=(...e)=>{let t=0,r,n,s="";for(;t<e.length;)(r=e[t++])&&(n=Kf(r))&&(s&&(s+=" "),s+=n);return s},Kf=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Kf(e[n]))&&(r&&(r+=" "),r+=t);return r},Ny=(e,...t)=>{let r,n,s,i;const o=l=>(r=Oy(t.reduce((c,u)=>u(c),e())),n=r.cache.get,s=r.cache.set,i=a,a(l)),a=l=>{const c=n(l);if(c)return c;const u=My(l,r);return s(l,u),u};return i=o,(...l)=>i(qy(...l))},By=[],dt=e=>{const t=r=>r[e]||By;return t.isThemeGetter=!0,t},Wf=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Gf=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Fy=/^\d+\/\d+$/,Ly=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Vy=/\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$/,jy=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Uy=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zy=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_s=e=>Fy.test(e),Pe=e=>!!e&&!Number.isNaN(Number(e)),wn=e=>!!e&&Number.isInteger(Number(e)),Il=e=>e.endsWith("%")&&Pe(e.slice(0,-1)),Gr=e=>Ly.test(e),Ky=()=>!0,Wy=e=>Vy.test(e)&&!jy.test(e),Jf=()=>!1,Gy=e=>Uy.test(e),Jy=e=>zy.test(e),Yy=e=>!he(e)&&!ge(e),Zy=e=>xs(e,ep,Jf),he=e=>Wf.test(e),Fn=e=>xs(e,tp,Wy),Rl=e=>xs(e,rb,Pe),Yf=e=>xs(e,Xf,Jf),Xy=e=>xs(e,Qf,Jy),$o=e=>xs(e,rp,Gy),ge=e=>Gf.test(e),mi=e=>Ts(e,tp),Qy=e=>Ts(e,nb),Zf=e=>Ts(e,Xf),eb=e=>Ts(e,ep),tb=e=>Ts(e,Qf),Do=e=>Ts(e,rp,!0),xs=(e,t,r)=>{const n=Wf.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Ts=(e,t,r=!1)=>{const n=Gf.exec(e);return n?n[1]?t(n[1]):r:!1},Xf=e=>e==="position"||e==="percentage",Qf=e=>e==="image"||e==="url",ep=e=>e==="length"||e==="size"||e==="bg-size",tp=e=>e==="length",rb=e=>e==="number",nb=e=>e==="family-name",rp=e=>e==="shadow",sb=()=>{const e=dt("color"),t=dt("font"),r=dt("text"),n=dt("font-weight"),s=dt("tracking"),i=dt("leading"),o=dt("breakpoint"),a=dt("container"),l=dt("spacing"),c=dt("radius"),u=dt("shadow"),d=dt("inset-shadow"),p=dt("text-shadow"),h=dt("drop-shadow"),m=dt("blur"),w=dt("perspective"),S=dt("aspect"),g=dt("ease"),x=dt("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"],_=()=>[...b(),ge,he],$=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],v=()=>[ge,he,l],P=()=>[_s,"full","auto",...v()],O=()=>[wn,"none","subgrid",ge,he],C=()=>["auto",{span:["full",wn,ge,he]},wn,ge,he],T=()=>[wn,"auto",ge,he],E=()=>["auto","min","max","fr",ge,he],q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],j=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...v()],J=()=>[_s,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...v()],U=()=>[e,ge,he],Ae=()=>[...b(),Zf,Yf,{position:[ge,he]}],be=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Qe=()=>["auto","cover","contain",eb,Zy,{size:[ge,he]}],Be=()=>[Il,mi,Fn],W=()=>["","none","full",c,ge,he],se=()=>["",Pe,mi,Fn],ie=()=>["solid","dashed","dotted","double"],Y=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],M=()=>[Pe,Il,Zf,Yf],ne=()=>["","none",m,ge,he],Ee=()=>["none",Pe,ge,he],me=()=>["none",Pe,ge,he],Fe=()=>[Pe,ge,he],et=()=>[_s,"full",...v()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Gr],breakpoint:[Gr],color:[Ky],container:[Gr],"drop-shadow":[Gr],ease:["in","out","in-out"],font:[Yy],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Gr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Gr],shadow:[Gr],spacing:["px",Pe],text:[Gr],"text-shadow":[Gr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",_s,he,ge,S]}],container:["container"],columns:[{columns:[Pe,he,ge,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:_()}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[wn,"auto",ge,he]}],basis:[{basis:[_s,"full","auto",a,...v()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Pe,_s,"auto","initial","none",he]}],grow:[{grow:["",Pe,ge,he]}],shrink:[{shrink:["",Pe,ge,he]}],order:[{order:[wn,"first","last","none",ge,he]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:C()}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:C()}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":E()}],"auto-rows":[{"auto-rows":E()}],gap:[{gap:v()}],"gap-x":[{"gap-x":v()}],"gap-y":[{"gap-y":v()}],"justify-content":[{justify:[...q(),"normal"]}],"justify-items":[{"justify-items":[...j(),"normal"]}],"justify-self":[{"justify-self":["auto",...j()]}],"align-content":[{content:["normal",...q()]}],"align-items":[{items:[...j(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...j(),{baseline:["","last"]}]}],"place-content":[{"place-content":q()}],"place-items":[{"place-items":[...j(),"baseline"]}],"place-self":[{"place-self":["auto",...j()]}],p:[{p:v()}],px:[{px:v()}],py:[{py:v()}],ps:[{ps:v()}],pe:[{pe:v()}],pt:[{pt:v()}],pr:[{pr:v()}],pb:[{pb:v()}],pl:[{pl:v()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":v()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":v()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],w:[{w:[a,"screen",...J()]}],"min-w":[{"min-w":[a,"screen","none",...J()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",r,mi,Fn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,ge,Rl]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Il,he]}],"font-family":[{font:[Qy,he,t]}],"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,ge,he]}],"line-clamp":[{"line-clamp":[Pe,"none",ge,Rl]}],leading:[{leading:[i,...v()]}],"list-image":[{"list-image":["none",ge,he]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ge,he]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:U()}],"text-color":[{text:U()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:[Pe,"from-font","auto",ge,Fn]}],"text-decoration-color":[{decoration:U()}],"underline-offset":[{"underline-offset":[Pe,"auto",ge,he]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:v()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge,he]}],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",ge,he]}],"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:be()}],"bg-size":[{bg:Qe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},wn,ge,he],radial:["",ge,he],conic:[wn,ge,he]},tb,Xy]}],"bg-color":[{bg:U()}],"gradient-from-pos":[{from:Be()}],"gradient-via-pos":[{via:Be()}],"gradient-to-pos":[{to:Be()}],"gradient-from":[{from:U()}],"gradient-via":[{via:U()}],"gradient-to":[{to:U()}],rounded:[{rounded:W()}],"rounded-s":[{"rounded-s":W()}],"rounded-e":[{"rounded-e":W()}],"rounded-t":[{"rounded-t":W()}],"rounded-r":[{"rounded-r":W()}],"rounded-b":[{"rounded-b":W()}],"rounded-l":[{"rounded-l":W()}],"rounded-ss":[{"rounded-ss":W()}],"rounded-se":[{"rounded-se":W()}],"rounded-ee":[{"rounded-ee":W()}],"rounded-es":[{"rounded-es":W()}],"rounded-tl":[{"rounded-tl":W()}],"rounded-tr":[{"rounded-tr":W()}],"rounded-br":[{"rounded-br":W()}],"rounded-bl":[{"rounded-bl":W()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ie(),"hidden","none"]}],"divide-style":[{divide:[...ie(),"hidden","none"]}],"border-color":[{border:U()}],"border-color-x":[{"border-x":U()}],"border-color-y":[{"border-y":U()}],"border-color-s":[{"border-s":U()}],"border-color-e":[{"border-e":U()}],"border-color-t":[{"border-t":U()}],"border-color-r":[{"border-r":U()}],"border-color-b":[{"border-b":U()}],"border-color-l":[{"border-l":U()}],"divide-color":[{divide:U()}],"outline-style":[{outline:[...ie(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Pe,ge,he]}],"outline-w":[{outline:["",Pe,mi,Fn]}],"outline-color":[{outline:U()}],shadow:[{shadow:["","none",u,Do,$o]}],"shadow-color":[{shadow:U()}],"inset-shadow":[{"inset-shadow":["none",d,Do,$o]}],"inset-shadow-color":[{"inset-shadow":U()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:U()}],"ring-offset-w":[{"ring-offset":[Pe,Fn]}],"ring-offset-color":[{"ring-offset":U()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":U()}],"text-shadow":[{"text-shadow":["none",p,Do,$o]}],"text-shadow-color":[{"text-shadow":U()}],opacity:[{opacity:[Pe,ge,he]}],"mix-blend":[{"mix-blend":[...Y(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Y()}],"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":[Pe]}],"mask-image-linear-from-pos":[{"mask-linear-from":M()}],"mask-image-linear-to-pos":[{"mask-linear-to":M()}],"mask-image-linear-from-color":[{"mask-linear-from":U()}],"mask-image-linear-to-color":[{"mask-linear-to":U()}],"mask-image-t-from-pos":[{"mask-t-from":M()}],"mask-image-t-to-pos":[{"mask-t-to":M()}],"mask-image-t-from-color":[{"mask-t-from":U()}],"mask-image-t-to-color":[{"mask-t-to":U()}],"mask-image-r-from-pos":[{"mask-r-from":M()}],"mask-image-r-to-pos":[{"mask-r-to":M()}],"mask-image-r-from-color":[{"mask-r-from":U()}],"mask-image-r-to-color":[{"mask-r-to":U()}],"mask-image-b-from-pos":[{"mask-b-from":M()}],"mask-image-b-to-pos":[{"mask-b-to":M()}],"mask-image-b-from-color":[{"mask-b-from":U()}],"mask-image-b-to-color":[{"mask-b-to":U()}],"mask-image-l-from-pos":[{"mask-l-from":M()}],"mask-image-l-to-pos":[{"mask-l-to":M()}],"mask-image-l-from-color":[{"mask-l-from":U()}],"mask-image-l-to-color":[{"mask-l-to":U()}],"mask-image-x-from-pos":[{"mask-x-from":M()}],"mask-image-x-to-pos":[{"mask-x-to":M()}],"mask-image-x-from-color":[{"mask-x-from":U()}],"mask-image-x-to-color":[{"mask-x-to":U()}],"mask-image-y-from-pos":[{"mask-y-from":M()}],"mask-image-y-to-pos":[{"mask-y-to":M()}],"mask-image-y-from-color":[{"mask-y-from":U()}],"mask-image-y-to-color":[{"mask-y-to":U()}],"mask-image-radial":[{"mask-radial":[ge,he]}],"mask-image-radial-from-pos":[{"mask-radial-from":M()}],"mask-image-radial-to-pos":[{"mask-radial-to":M()}],"mask-image-radial-from-color":[{"mask-radial-from":U()}],"mask-image-radial-to-color":[{"mask-radial-to":U()}],"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":[Pe]}],"mask-image-conic-from-pos":[{"mask-conic-from":M()}],"mask-image-conic-to-pos":[{"mask-conic-to":M()}],"mask-image-conic-from-color":[{"mask-conic-from":U()}],"mask-image-conic-to-color":[{"mask-conic-to":U()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Ae()}],"mask-repeat":[{mask:be()}],"mask-size":[{mask:Qe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ge,he]}],filter:[{filter:["","none",ge,he]}],blur:[{blur:ne()}],brightness:[{brightness:[Pe,ge,he]}],contrast:[{contrast:[Pe,ge,he]}],"drop-shadow":[{"drop-shadow":["","none",h,Do,$o]}],"drop-shadow-color":[{"drop-shadow":U()}],grayscale:[{grayscale:["",Pe,ge,he]}],"hue-rotate":[{"hue-rotate":[Pe,ge,he]}],invert:[{invert:["",Pe,ge,he]}],saturate:[{saturate:[Pe,ge,he]}],sepia:[{sepia:["",Pe,ge,he]}],"backdrop-filter":[{"backdrop-filter":["","none",ge,he]}],"backdrop-blur":[{"backdrop-blur":ne()}],"backdrop-brightness":[{"backdrop-brightness":[Pe,ge,he]}],"backdrop-contrast":[{"backdrop-contrast":[Pe,ge,he]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Pe,ge,he]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Pe,ge,he]}],"backdrop-invert":[{"backdrop-invert":["",Pe,ge,he]}],"backdrop-opacity":[{"backdrop-opacity":[Pe,ge,he]}],"backdrop-saturate":[{"backdrop-saturate":[Pe,ge,he]}],"backdrop-sepia":[{"backdrop-sepia":["",Pe,ge,he]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":v()}],"border-spacing-x":[{"border-spacing-x":v()}],"border-spacing-y":[{"border-spacing-y":v()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ge,he]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Pe,"initial",ge,he]}],ease:[{ease:["linear","initial",g,ge,he]}],delay:[{delay:[Pe,ge,he]}],animate:[{animate:["none",x,ge,he]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,ge,he]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:Ee()}],"rotate-x":[{"rotate-x":Ee()}],"rotate-y":[{"rotate-y":Ee()}],"rotate-z":[{"rotate-z":Ee()}],scale:[{scale:me()}],"scale-x":[{"scale-x":me()}],"scale-y":[{"scale-y":me()}],"scale-z":[{"scale-z":me()}],"scale-3d":["scale-3d"],skew:[{skew:Fe()}],"skew-x":[{"skew-x":Fe()}],"skew-y":[{"skew-y":Fe()}],transform:[{transform:[ge,he,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:et()}],"translate-x":[{"translate-x":et()}],"translate-y":[{"translate-y":et()}],"translate-z":[{"translate-z":et()}],"translate-none":["translate-none"],accent:[{accent:U()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:U()}],"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",ge,he]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":v()}],"scroll-mx":[{"scroll-mx":v()}],"scroll-my":[{"scroll-my":v()}],"scroll-ms":[{"scroll-ms":v()}],"scroll-me":[{"scroll-me":v()}],"scroll-mt":[{"scroll-mt":v()}],"scroll-mr":[{"scroll-mr":v()}],"scroll-mb":[{"scroll-mb":v()}],"scroll-ml":[{"scroll-ml":v()}],"scroll-p":[{"scroll-p":v()}],"scroll-px":[{"scroll-px":v()}],"scroll-py":[{"scroll-py":v()}],"scroll-ps":[{"scroll-ps":v()}],"scroll-pe":[{"scroll-pe":v()}],"scroll-pt":[{"scroll-pt":v()}],"scroll-pr":[{"scroll-pr":v()}],"scroll-pb":[{"scroll-pb":v()}],"scroll-pl":[{"scroll-pl":v()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ge,he]}],fill:[{fill:["none",...U()]}],"stroke-w":[{stroke:[Pe,mi,Fn,Rl]}],stroke:[{stroke:["none",...U()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-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-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-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-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"]}},ib=Ny(sb);const Ge=(...e)=>ib(Bf(e)),np=(e,t)=>{if(e){const r=$l(e);if(r&&sp(r))return r;if(e.trim())return e.trim()}if(t){const r=$l(t);if(r&&sp(r))return r;const n=ob(t);if(n)return n;if(t.trim()&&!t.includes("@"))return t.trim()}return"Unknown"};var $l=e=>e.replace(/[^\d+*#]/g,""),sp=e=>/^\+?[\d*#]{2,}$/.test(e),ob=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]?$l(t[1]):null)};const ab=e=>{const t=Ze(null),r=Ze(null),n=Ze(new Map),s=new Audio;s.autoplay=!0;const i=Ze(void 0),o=Ze(null),a=Ze(null);let l=null,c=null;const u=B(()=>t.value?.configuration.uri?.user||""),{startRingtone:d,stopRingtone:p,startRingback:h,stopRingback:m,setNotificationVolume:w}=qf(),S=()=>{e.channels.value.some(W=>W.status==="incoming")?d():p(),e.activeChannel.value?.status==="calling"?h():m()},g=W=>{s.volume=W/100},x=async W=>{typeof s.setSinkId=="function"&&await s.setSinkId(W)},y=W=>{i.value=W},b=(W=!1)=>{const se={echoCancellation:{ideal:!0},noiseSuppression:{ideal:!1},autoGainControl:{ideal:!1},channelCount:1};return i.value&&(se.deviceId={exact:i.value}),{audio:se,video:W}},_=async W=>{if(!t.value){try{(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(se=>se.stop())}catch(se){console.error("Microphone permission denied",se);return}try{const se=mn.makeURI(W.uri);if(!se)throw new Error("Invalid URI");t.value=new mn({uri:se,logLevel:"error",transportOptions:{server:W.transportOptions.server},authorizationUsername:W.authorizationUsername,authorizationPassword:W.authorizationPassword,reconnectionDelay:5,reconnectionAttempts:3,delegate:{onConnect:()=>e.setConnected(!0),onDisconnect:()=>e.setConnected(!1),onInvite:ie=>v(ie)}}),await t.value.start(),r.value=new xl(t.value),await r.value.register(),$()}catch{}}},$=()=>{let W=null,se=Date.now();const ie=5e3,Y=(H=1e3)=>{W&&clearTimeout(W),W=setTimeout(async()=>{W=null,await R()},H)},M=()=>{if(document.visibilityState==="visible"){const H=Date.now()-se;H>ie?(console.log(`[SipJs] Device was suspended for ${Math.round(H/1e3)}s, reconnecting...`),Y(1500)):Y(500)}se=Date.now()},ne=()=>{console.log("[SipJs] Network online, reconnecting..."),Y(1e3)},Ee=()=>{console.log("[SipJs] Network offline"),e.setConnected(!1),W&&(clearTimeout(W),W=null)};let me=null;const Fe=()=>{me=setInterval(()=>{const H=Date.now(),K=H-se;K>3e4&&(console.log(`[SipJs] Heartbeat drift detected (${Math.round(K/1e3)}s), device may have woken from sleep`),Y(1500)),se=H},1e3)},et=()=>{console.log("[SipJs] Page frozen"),me&&(clearInterval(me),me=null)},k=()=>{console.log("[SipJs] Page resumed"),se=Date.now(),Fe(),Y(1e3)};document.addEventListener("visibilitychange",M),window.addEventListener("online",ne),window.addEventListener("offline",Ee),document.addEventListener("freeze",et),document.addEventListener("resume",k),Fe()},R=async()=>{if(t.value){if(!navigator.onLine){console.log("[SipJs] Skipping reconnect, device is offline");return}if(n.value.size>0){console.log("[SipJs] Skipping reconnect, active calls in progress");return}try{if(t.value.isConnected()||(console.log("[SipJs] Reconnecting..."),await t.value.reconnect()),r.value&&t.value.isConnected())try{await r.value.register()}catch{}}catch(W){console.error("[SipJs] Reconnection failed:",W)}}},v=W=>{console.log("[SipJs] 📞 Llamada entrante recibida"),console.log("[SipJs] Remote Identity URI:",W.remoteIdentity.uri.toString()),console.log("[SipJs] Remote Identity URI user:",W.remoteIdentity.uri.user),console.log("[SipJs] Remote Identity displayName:",W.remoteIdentity.displayName);const se=e.channels.value.find(ne=>ne.status==="idle");if(!se){console.warn("[SipJs] ⚠️ No hay canales disponibles, rechazando llamada"),W.reject();return}const ie=se.id;n.value.set(ie,W);const Y=W.body?W.body.includes("m=video"):!1,M=np(W.remoteIdentity.uri.user,W.remoteIdentity.displayName);console.log("[SipJs] 📋 Caller number extraído:",M),console.log("[SipJs] 🎥 Video:",Y?"Sí":"No"),e.updateChannelState(ie,{status:"incoming",remoteNumber:M,remoteDisplayName:W.remoteIdentity.displayName||void 0,hasVideo:Y}),S(),e.setActiveChannelId(ie),W.stateChange.addListener(ne=>{switch(ne){case V.Terminated:{const Ee=e.channels.value.find(Fe=>Fe.id===ie),me=np(W.remoteIdentity.uri.user,W.remoteIdentity.displayName);if(Ee?.status==="connected"){const Fe=Math.floor((Date.now()-(Ee.startTime||Date.now()))/1e3);e.addCallLog({number:me,direction:"incoming",status:"answered",startTime:Ee.startTime||Date.now(),duration:Fe})}else Ee?.status==="incoming"&&e.addCallLog({number:me,direction:"incoming",status:"missed",startTime:Date.now(),duration:0});e.updateChannelState(ie,{status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,hasVideo:!1,hasEarlyMedia:!1}),n.value.delete(ie),e.activeChannelId.value===ie&&Be(),S();break}case V.Established:e.updateChannelState(ie,{status:"connected",startTime:Date.now()}),e.activeChannelId.value===ie&&Qe(W),S();break}})},P=async(W,se=!1)=>{if(!t.value)return;const ie=e.activeChannelId.value;if(n.value.has(ie))return;let Y=mn.makeURI(W);if(!Y&&t.value.configuration.uri){const Ee=t.value.configuration.uri.host;Y=mn.makeURI(`sip:${W}@${Ee}`)}if(!Y)return;const M=new _l(t.value,Y);n.value.set(ie,M),e.updateChannelState(ie,{status:"calling",remoteNumber:W,hasVideo:se}),e.setLastDialedNumber(W),S(),M.stateChange.addListener(Ee=>{switch(Ee){case V.Established:e.channels.value.find(me=>me.id===ie)?.status!=="connected"&&(e.updateChannelState(ie,{status:"connected",startTime:Date.now()}),Qe(M),S());break;case V.Terminated:{const me=e.channels.value.find(Fe=>Fe.id===ie);if(me?.status==="connected"){const Fe=Math.floor((Date.now()-(me.startTime||Date.now()))/1e3);e.addCallLog({number:W,direction:"outgoing",status:"answered",startTime:me.startTime||Date.now(),duration:Fe})}else e.addCallLog({number:W,direction:"outgoing",status:"cancelled",startTime:Date.now(),duration:0});e.updateChannelState(ie,{status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1}),n.value.delete(ie),e.activeChannelId.value===ie&&Be(),S();break}}});const ne={sessionDescriptionHandlerOptions:{constraints:b(se)},requestDelegate:{onProgress:Ee=>{(Ee.message.statusCode===180||Ee.message.statusCode===183)&&(Ee.message.body&&(e.updateChannelState(ie,{hasEarlyMedia:!0}),Qe(M)),S())},onAccept:Ee=>{e.channels.value.find(me=>me.id===ie)?.status!=="connected"&&(e.updateChannelState(ie,{status:"connected",startTime:Date.now()}),Qe(M),S())}}};await M.invite(ne)},O=async(W=!1)=>{const se=n.value.get(e.activeChannelId.value);if(se instanceof Cl&&se.state===V.Initial){for(const[Y,M]of n.value.entries())if(Y!==e.activeChannelId.value&&M.state===V.Established&&!e.channels.value.find(ne=>ne.id===Y)?.isHeld)try{await E(M,!0),e.updateChannelState(Y,{isHeld:!0})}catch(ne){console.error(`[SipJs] Failed to hold channel ${Y}:`,ne)}const ie={sessionDescriptionHandlerOptions:{constraints:b(W)}};await se.accept(ie),S()}},C=async()=>{const W=n.value.get(e.activeChannelId.value);if(W)switch(W.state){case V.Initial:case V.Establishing:W instanceof _l?await W.cancel():W instanceof Cl&&await W.reject();break;case V.Established:await W.bye();break}},T=()=>{const W=n.value.get(e.activeChannelId.value);if(!W)return;const se=!e.isMuted.value;let ie=!1;const Y=W.sessionDescriptionHandler;Y?.peerConnection&&Y.peerConnection.getSenders().forEach(M=>{M.track&&M.track.kind==="audio"&&(M.track.enabled=!se,ie=!0)}),a.value&&a.value.getAudioTracks().forEach(M=>{M.enabled=!se,ie=!0}),ie||console.warn("[SipJs] No audio tracks found to mute/unmute"),e.setMuted(se)},E=async(W,se)=>{const ie={sessionDescriptionHandlerOptions:{hold:se}};await W.invite(ie)},q=async()=>{const W=n.value.get(e.activeChannelId.value);if(W?.state!==V.Established)return;const se=!e.isHeld.value;try{await E(W,se),e.setHeld(se)}catch{}},j=async W=>{const se=e.activeChannelId.value;if(se===W)return;const ie=n.value.get(se),Y=n.value.get(W),M=e.channels.value.find(Ee=>Ee.id===se),ne=e.channels.value.find(Ee=>Ee.id===W);if(ie&&ie.state===V.Established&&!M?.isHeld)try{await E(ie,!0),e.updateChannelState(se,{isHeld:!0})}catch{}if(e.setActiveChannelId(W),S(),Y&&Y.state===V.Established){if(ne?.isHeld)try{await E(Y,!1),e.updateChannelState(W,{isHeld:!1})}catch{}if(ne?.isMuted){const Ee=Y.sessionDescriptionHandler;Ee?.peerConnection&&Ee.peerConnection.getSenders().forEach(me=>{me.track&&me.track.kind==="audio"&&(me.track.enabled=!1)}),a.value&&a.value.getAudioTracks().forEach(me=>{me.enabled=!1})}Qe(Y)}else Be()},z=W=>{const se=n.value.get(e.activeChannelId.value);if(se?.state!==V.Established)return;const ie={requestOptions:{body:{content:`Signal=${W}\r
69
+ Duration=160`,contentType:"application/dtmf-relay",contentDisposition:"signal"}}};se.info(ie)},J=async W=>{console.log("[SipJs] 🔄 transferCall iniciado"),console.log("[SipJs] Target:",W);const se=e.activeChannelId.value,ie=n.value.get(se);if(!ie)throw console.error("[SipJs] ❌ No hay sesión activa en el canal",se),new Error("No active session to transfer");if(console.log("[SipJs] Sesión encontrada - Estado:",ie.state),console.log("[SipJs] Dialog ID:",ie.dialog?.id),console.log("[SipJs] Call ID:",ie.dialog?.callId),ie.state!==V.Established)throw console.error("[SipJs] ❌ Sesión no establecida. Estado actual:",ie.state),new Error(`Cannot transfer call. Call is not established (state: ${ie.state})`);let Y=mn.makeURI(W);if(!Y&&t.value?.configuration.uri){const M=t.value.configuration.uri.host;console.log("[SipJs] Construyendo URI con dominio:",M),Y=mn.makeURI(`sip:${W}@${M}`)}if(!Y)throw console.error("[SipJs] ❌ URI de destino inválida:",W),new Error(`Invalid transfer target: ${W}`);console.log("[SipJs] 📤 URI de transferencia:",Y.toString()),console.log("[SipJs] URI scheme:",Y.scheme),console.log("[SipJs] URI user:",Y.user),console.log("[SipJs] URI host:",Y.host);try{console.log("[SipJs] 🚀 Enviando REFER..."),await ie.refer(Y,{requestDelegate:{onAccept:M=>{console.log("[SipJs] ✅ Transfer REFER aceptado por el servidor (202 Accepted)"),console.log("[SipJs] Response:",M.message)},onReject:M=>{const ne=M.message.statusCode;console.error("[SipJs] ❌ Transfer REFER rechazado:",ne),console.error("[SipJs] Response completo:",M.message)}},onNotify:M=>{console.log("[SipJs] 📬 NOTIFY recibido para transferencia"),console.log("[SipJs] NOTIFY request:",M.request),M.accept();const ne=M.request.body;if(console.log("[SipJs] NOTIFY body:",ne),ne){const Ee=ne.match(/SIP\/2\.0\s+(\d{3})(.*)/);if(Ee&&Ee[1]){const me=parseInt(Ee[1],10),Fe=Ee[2]?.trim()||"";if(console.log("[SipJs] 📊 Status code:",me),console.log("[SipJs] 📊 Status text:",Fe),me>=200&&me<300)console.log("[SipJs] ✅ Transferencia exitosa! Terminando sesión..."),setTimeout(()=>{ie.bye().catch(et=>{console.warn("[SipJs] Error hanging up after successful transfer:",et)})},500);else if(me>=400){console.error("[SipJs] ❌ Transfer falló con status:",me,Fe),console.log("[SipJs] 🔄 Manteniendo la sesión activa para el usuario");const et={404:"Número no encontrado",486:"Número ocupado",487:"Transferencia cancelada",503:"Servicio no disponible - el destino puede estar fuera de línea"}[me]||`Error en transferencia (código ${me})`;console.warn("[SipJs] 💬",et)}else me>=100&&me<200&&console.log("[SipJs] 📞 Transferencia en progreso:",me,Fe)}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(M){throw console.error("[SipJs] ❌ Error en transferCall:",M),console.error("[SipJs] Error type:",M?.constructor?.name),console.error("[SipJs] Error message:",M instanceof Error?M.message:String(M)),console.error("[SipJs] Error stack:",M instanceof Error?M.stack:"N/A"),M}},U=async W=>{console.log("[SipJs] 🔄 startAttendedTransfer iniciado"),console.log("[SipJs] Target:",W);const se=e.activeChannelId.value,ie=n.value.get(se);if(console.log("[SipJs] Canal original:",se),console.log("[SipJs] Sesión original:",ie?.state),!ie||ie.state!==V.Established)throw console.error("[SipJs] ❌ No hay llamada establecida para transferir"),new Error("No established call to transfer");const Y=e.channels.value.find(M=>M.status==="idle");if(console.log("[SipJs] Canal de consulta encontrado:",Y?.id),!Y)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 E(ie,!0),e.updateChannelState(se,{isHeld:!0}),console.log("[SipJs] ✅ Llamada original en hold")}catch(M){throw console.error("[SipJs] ❌ Failed to hold original call:",M),new Error("Failed to put call on hold")}console.log("[SipJs] 🔄 Cambiando al canal de consulta:",Y.id),e.setActiveChannelId(Y.id);try{console.log("[SipJs] 📞 Iniciando llamada de consulta a:",W),await P(W,!1),console.log("[SipJs] ✅ Llamada de consulta iniciada"),e.setTransferInProgress({originalChannelId:se,consultationChannelId:Y.id,targetNumber:W}),console.log("[SipJs] 📋 Transferencia en progreso registrada")}catch(M){throw console.error("[SipJs] ❌ Failed to start consultation call:",M),console.log("[SipJs] 🔄 Volviendo al canal original y quitando hold..."),e.setActiveChannelId(se),await E(ie,!1).catch(()=>{}),e.updateChannelState(se,{isHeld:!1}),new Error("Failed to initiate consultation call")}},Ae=async()=>{console.log("[SipJs] 🔄 completeAttendedTransfer iniciado");const W=e.transferInProgress.value;if(!W)throw console.error("[SipJs] ❌ No hay transferencia en progreso"),new Error("No transfer in progress");console.log("[SipJs] Estado de transferencia:",W);const se=n.value.get(W.originalChannelId),ie=n.value.get(W.consultationChannelId);if(console.log("[SipJs] Sesión original:",se?.state),console.log("[SipJs] Sesión de consulta:",ie?.state),!se||!ie)throw console.error("[SipJs] ❌ Falta una o ambas sesiones"),new Error("Missing session for transfer");if(ie.state!==V.Established)throw console.error("[SipJs] ❌ Llamada de consulta no está establecida. Estado:",ie.state),new Error("Consultation call not established");const Y=ie.dialog;if(!Y)throw new Error("No dialog available for consultation session");const M=Y.callId,ne=Y.remoteTag,Ee=Y.localTag;let me=mn.makeURI(W.targetNumber);if(!me&&t.value?.configuration.uri){const et=t.value.configuration.uri.host;me=mn.makeURI(`sip:${W.targetNumber}@${et}`)}if(!me)throw new Error("Invalid transfer target URI");const Fe=`${encodeURIComponent(M)}%3Bto-tag%3D${encodeURIComponent(ne)}%3Bfrom-tag%3D${encodeURIComponent(Ee)}`;me.setHeader("Replaces",Fe);try{await se.refer(me,{onNotify:et=>{et.accept();const k=et.request.body,H=typeof k=="string"?k:k&&typeof k=="object"&&"content"in k?k.content:void 0;if(H){const K=H.match(/SIP\/2\.0\s+(\d+)/);if(K&&K[1]){const ee=parseInt(K[1]);ee>=200&&ee<300?setTimeout(()=>{se.bye().catch(()=>{}),ie.bye().catch(()=>{}),e.setTransferInProgress(null)},500):ee>=400&&(console.error("[SipJs] Attended transfer failed with status:",ee),e.setTransferInProgress(null))}}},requestDelegate:{onAccept:()=>{},onReject:et=>{console.error("[SipJs] Attended transfer REFER rejected:",et.message.statusCode),e.setTransferInProgress(null)}}})}catch(et){throw console.error("[SipJs] Attended transfer failed:",et),et}},be=async()=>{const W=e.transferInProgress.value;if(!W)throw new Error("No transfer in progress");console.log("[SipJs] Canceling attended transfer...");const se=n.value.get(W.originalChannelId),ie=n.value.get(W.consultationChannelId);if(ie)try{await ie.bye(),console.log("[SipJs] Consultation call ended")}catch(Y){console.warn("[SipJs] Error ending consultation:",Y)}if(se)try{e.setActiveChannelId(W.originalChannelId),await E(se,!1),e.updateChannelState(W.originalChannelId,{isHeld:!1}),console.log("[SipJs] Returned to original call")}catch(Y){console.warn("[SipJs] Error resuming original call:",Y)}e.setTransferInProgress(null)},Qe=W=>{const se=W.sessionDescriptionHandler;if(!se){console.error("[SipJs] setupRemoteMedia: no sessionDescriptionHandler");return}const ie=se.remoteMediaStream;if(!ie){console.error("[SipJs] setupRemoteMedia: no remoteMediaStream on SDH");return}if(o.value===ie)return;s.pause(),s.srcObject=null,l?.abort(),l=new AbortController,o.value=ie,a.value=se.localMediaStream??null;const Y=ne=>{c?.abort(),c=new AbortController;const{signal:Ee}=c,me=()=>{s.play().catch(Fe=>{Fe.name!=="AbortError"&&console.error("[SipJs] play() failed:",Fe.name,Fe.message)})};ne.addEventListener("mute",()=>{s.pause()},{signal:Ee}),ne.addEventListener("unmute",()=>{me()},{signal:Ee}),ne.muted||me()};ie.addEventListener("addtrack",ne=>{ne.track.kind==="audio"&&(s.srcObject=null,s.srcObject=ie,Y(ne.track))},{signal:l.signal});const[M]=ie.getTracks();M&&(s.srcObject=ie,Y(M))},Be=()=>{c?.abort(),c=null,l?.abort(),l=null,s.pause(),s.srcObject=null,o.value=null,a.value=null};return{initUserAgent:_,makeCall:P,answerCall:O,hangupCall:C,toggleMute:T,toggleHold:q,sendDTMF:z,transferCall:J,startAttendedTransfer:U,completeAttendedTransfer:Ae,cancelAttendedTransfer:be,switchChannel:j,extension:u,setVolume:g,setNotificationVolume:w,setOutputDevice:x,setInputDevice:y,remoteStream:o,localStream:a}};var ip=e=>typeof e=="boolean"?`${e}`:e===0?"0":e;const op=Bf,ap=(e,t)=>r=>{var n;if(t?.variants==null)return op(e,r?.class,r?.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(l=>{const c=r?.[l],u=i?.[l];if(c===null)return null;const d=ip(c)||ip(u);return s[l][d]}),a=r&&Object.entries(r).reduce((l,c)=>{let[u,d]=c;return d===void 0||(l[u]=d),l},{});return op(e,o,t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((l,c)=>{let{class:u,className:d,...p}=c;return Object.entries(p).every(h=>{let[m,w]=h;return Array.isArray(w)?w.includes({...i,...a}[m]):{...i,...a}[m]===w})?[...l,u,d]:l},[]),r?.class,r?.className)};function lb(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function cb(e,t,r){lb(e,t),t.set(e,r)}function ub(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 Po(e,t){return e.get(ub(e,t))}function lp(e){return typeof e=="string"?`'${e}'`:new db().serialize(e)}var db=(function(){var e=new WeakMap;class t{constructor(){cb(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,c]=i[a];o+=`${this.serialize(l,!0)}:${this.serialize(c)}`,a<i.length-1&&(o+=",")}return o+"}"}$object(n){let s=Po(e,this).get(n);return s===void 0&&(Po(e,this).set(n,`#${Po(e,this).size}`),s=this.serializeObject(n),Po(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 wi(e,t){return e===t||lp(e)===lp(t)}function yi(e,t=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY){return Math.min(r,Math.max(t,e))}function vt(e,t){const r=typeof e=="string"&&!t?`${e}Context`:t,n=Symbol(r);return[o=>{const a=bt(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=>(Dn(n,o),o)]}function Pt(){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 Dl(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 Pl(e){return e==null}function cp(e,t){return Pl(e)?!1:Array.isArray(e)?e.some(r=>wi(r,t)):wi(e,t)}function Ol(e){return e?e.flatMap(t=>t.type===Oe?Ol(t.children):[t]):[]}var[Oo,jT]=vt("ConfigProvider");function fb(e,t){var r;const n=Ze();return st(()=>{n.value=e()},{...t,flush:(r=t?.flush)!=null?r:"sync"}),wt(n)}function Es(e){return is()?(Mi(e),!0):!1}function pb(){const e=new Set,t=i=>{e.delete(i)};return{on:i=>{e.add(i);const o=()=>t(i);return Es(o),{off:o}},off:t,trigger:(...i)=>Promise.all(Array.from(e).map(o=>o(...i))),clear:()=>{e.clear()}}}function hb(e){let t=!1,r;const n=fa(!0);return(...s)=>(t||(r=n.run(()=>e(...s)),t=!0),r)}function gb(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=fa(!0),r=n.run(()=>e(...i))),Es(s),r)}var nr=typeof window<"u"&&typeof document<"u",UT=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,vb=e=>typeof e<"u",mb=Object.prototype.toString,wb=e=>mb.call(e)==="[object Object]",up=()=>{},dp=yb();function yb(){var e,t;return nr&&((e=window?.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window?.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function bb(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}function Sb(e,t={}){let r,n,s=up;const i=l=>{clearTimeout(l),s(),s=up};let o;return l=>{const c=_e(e),u=_e(t.maxWait);return r&&i(r),c<=0||u!==void 0&&u<=0?(n&&(i(n),n=null),Promise.resolve(l())):new Promise((d,p)=>{s=t.rejectOnCancel?p:d,o=l,u&&!n&&(n=setTimeout(()=>{r&&i(r),n=null,d(o())},u)),r=setTimeout(()=>{n&&i(n),n=null,d(l())},c)})}}function fp(e){const t=Object.create(null);return r=>t[r]||(t[r]=e(r))}var Cb=/\B([A-Z])/g,zT=fp(e=>e.replace(Cb,"-$1").toLowerCase()),_b=/-(\w)/g,KT=fp(e=>e.replace(_b,(t,r)=>r?r.toUpperCase():""));function xb(e){return e||nt()}function Hl(e){return Array.isArray(e)?e:[e]}function pp(e,t=1e4){return zs((r,n)=>{let s=_e(e),i;const o=()=>setTimeout(()=>{s=_e(e),n()},_e(t));return Es(()=>{clearTimeout(i)}),{get(){return r(),s},set(a){s=a,n(),clearTimeout(i),i=o()}}})}function hp(e,t=200,r={}){return bb(Sb(t,r),e)}function Tb(e,t){xb(t)&&vs(e,t)}function gp(e,t,r={}){const{immediate:n=!0,immediateCallback:s=!1}=r,i=Ze(!1);let o=null;function a(){o&&(clearTimeout(o),o=null)}function l(){i.value=!1,a()}function c(...u){s&&e(),a(),i.value=!0,o=setTimeout(()=>{i.value=!1,o=null,e(...u)},_e(t))}return n&&(i.value=!0,nr&&c()),Es(l),{isPending:wt(i),start:c,stop:l}}function Eb(e,t,r){return Ie(e,t,{...r,immediate:!0})}function Ab(e,t,r){const n=Ie(e,(...s)=>(at(()=>n()),t(...s)),r);return n}var Ho=nr?window:void 0,WT=nr?window.document:void 0,GT=nr?window.navigator:void 0,JT=nr?window.location:void 0;function Tr(e){var t;const r=_e(e);return(t=r?.$el)!=null?t:r}function Mo(...e){const t=[],r=()=>{t.forEach(a=>a()),t.length=0},n=(a,l,c,u)=>(a.addEventListener(l,c,u),()=>a.removeEventListener(l,c,u)),s=B(()=>{const a=Hl(_e(e[0])).filter(l=>l!=null);return a.every(l=>typeof l!="string")?a:void 0}),i=Eb(()=>{var a,l;return[(l=(a=s.value)==null?void 0:a.map(c=>Tr(c)))!=null?l:[Ho].filter(c=>c!=null),Hl(_e(s.value?e[1]:e[0])),Hl(f(s.value?e[2]:e[1])),_e(s.value?e[3]:e[2])]},([a,l,c,u])=>{if(r(),!a?.length||!l?.length||!c?.length)return;const d=wb(u)?{...u}:u;t.push(...a.flatMap(p=>l.flatMap(h=>c.map(m=>n(p,h,m,d)))))},{flush:"post"}),o=()=>{i(),r()};return Es(r),o}function Ml(){const e=Ze(!1),t=nt();return t&&Ue(()=>{e.value=!0},t),e}function kb(e){const t=Ml();return B(()=>(t.value,!!e()))}function Ib(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Rb(...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=Ho,eventName:i="keydown",passive:o=!1,dedupe:a=!1}=n,l=Ib(t);return Mo(s,i,u=>{u.repeat&&_e(a)||l(u)&&r(u)},o)}function $b(e){return JSON.parse(JSON.stringify(e))}function Ln(e,t,r={}){const{window:n=Ho,...s}=r;let i;const o=kb(()=>n&&"ResizeObserver"in n),a=()=>{i&&(i.disconnect(),i=void 0)},l=Ie(B(()=>{const u=_e(e);return Array.isArray(u)?u.map(d=>Tr(d)):[Tr(u)]}),u=>{if(a(),o.value&&n){i=new ResizeObserver(t);for(const d of u)d&&i.observe(d,s)}},{immediate:!0,flush:"post"}),c=()=>{a(),l()};return Es(c),{isSupported:o,stop:c}}var YT=[{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 yn(e,t,r,n={}){var s,i,o;const{clone:a=!1,passive:l=!1,eventName:c,deep:u=!1,defaultValue:d,shouldEmit:p}=n,h=nt(),m=r||h?.emit||((s=h?.$emit)==null?void 0:s.bind(h))||((o=(i=h?.proxy)==null?void 0:i.$emit)==null?void 0:o.bind(h?.proxy));let w=c;t||(t="modelValue"),w=w||`update:${t.toString()}`;const S=y=>a?typeof a=="function"?a(y):$b(y):y,g=()=>vb(e[t])?S(e[t]):d,x=y=>{p?p(y)&&m(w,y):m(w,y)};if(l){const y=F(g());let b=!1;return Ie(()=>e[t],_=>{b||(b=!0,y.value=S(_),at(()=>b=!1))}),Ie(y,_=>{!b&&(_!==e[t]||u)&&x(_)},{deep:u}),y}else return B({get(){return g()},set(y){x(y)}})}function ql(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 Nl(e,t,r=".",n){if(!ql(t))return Nl(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]]:ql(o)&&ql(s[i])?s[i]=Nl(o,s[i],(r?`${r}.`:"")+i.toString(),n):s[i]=o))}return s}function Bl(e){return(...t)=>t.reduce((r,n)=>Nl(r,n,"",e),{})}var Db=Bl(),ZT=Bl((e,t,r)=>{if(e[t]!==void 0&&typeof r=="function")return e[t]=r(e[t]),!0}),XT=Bl((e,t,r)=>{if(Array.isArray(e[t])&&typeof r=="function")return e[t]=r(e[t]),!0}),Pb=gb(()=>{const e=F(new Map),t=F(),r=B(()=>{for(const o of e.value.values())if(o)return!0;return!1}),n=Oo({scrollBody:F(!0)});let s=null;const i=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.documentElement.style.removeProperty("--scrollbar-width"),document.body.style.overflow=t.value??"",dp&&s?.(),t.value=void 0};return Ie(r,(o,a)=>{if(!nr)return;if(!o){a&&i();return}t.value===void 0&&(t.value=document.body.style.overflow);const l=window.innerWidth-document.documentElement.clientWidth,c={padding:l,margin:0},u=n.scrollBody?.value?typeof n.scrollBody.value=="object"?Db({padding:n.scrollBody.value.padding===!0?l:n.scrollBody.value.padding,margin:n.scrollBody.value.margin===!0?l:n.scrollBody.value.margin},c):c:{padding:0,margin:0};l>0&&(document.body.style.paddingRight=typeof u.padding=="number"?`${u.padding}px`:String(u.padding),document.body.style.marginRight=typeof u.margin=="number"?`${u.margin}px`:String(u.margin),document.documentElement.style.setProperty("--scrollbar-width",`${l}px`),document.body.style.overflow="hidden"),dp&&(s=Mo(document,"touchmove",d=>Ob(d),{passive:!1})),at(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),e});function vp(e){const t=Math.random().toString(36).substring(2,7),r=Pb();r.value.set(t,e??!1);const n=B({get:()=>r.value.get(t)??!1,set:s=>r.value.set(t,s)});return Tb(()=>{r.value.delete(t)}),n}function mp(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:mp(r)}}function Ob(e){const t=e||window.event,r=t.target;return r instanceof Element&&mp(r)?!1:t.touches.length>1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}function bi(e){const t=Oo({dir:F("ltr")});return B(()=>e?.value||t.dir?.value||"ltr")}function qo(e){const t=nt(),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(ct(s))]=(...i)=>e(s,...i)}),n}var Fl=0;function Hb(){st(e=>{if(!nr)return;const t=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",t[0]??wp()),document.body.insertAdjacentElement("beforeend",t[1]??wp()),Fl++,e(()=>{Fl===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(r=>r.remove()),Fl--})})}function wp(){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 No(e){return B(()=>_e(e)?!!Tr(e)?.closest("form"):!0)}function ye(){const e=nt(),t=F(),r=B(()=>["#text","#comment"].includes(t.value?.$el.nodeName)?t.value?.$el.nextElementSibling:Tr(t)),n=Object.assign({},e.exposed),s={};for(const o in e.props)Object.defineProperty(s,o,{enumerable:!0,configurable:!0,get:()=>e.props[o]});if(Object.keys(n).length>0)for(const o in n)Object.defineProperty(s,o,{enumerable:!0,configurable:!0,get:()=>n[o]});Object.defineProperty(s,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=s;function i(o){t.value=o,o&&(Object.defineProperty(s,"$el",{enumerable:!0,configurable:!0,get:()=>o instanceof Element?o:o.$el}),e.exposed=s)}return{forwardRef:i,currentRef:t,currentElement:r}}function Er(e){const t=nt(),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 B(()=>{const s={},i=t?.vnode.props??{};return Object.keys(i).forEach(o=>{s[ct(o)]=i[o]}),Object.keys({...r,...s}).reduce((o,a)=>(n.value[a]!==void 0&&(o[a]=n.value[a]),o),{})})}function Ar(e,t){const r=Er(e),n=t?qo(t):{};return B(()=>({...r.value,...n}))}function Mb(e,t){const r=pp(!1,300),n=F(null),s=pb();function i(){n.value=null,r.value=!1}function o(a,l){const c=a.currentTarget,u={x:a.clientX,y:a.clientY},d=Nb(u,qb(u,c.getBoundingClientRect())),p=Bb(l.getBoundingClientRect());n.value=Lb([...d,...p]),r.value=!0}return st(a=>{if(e.value&&t.value){const l=u=>o(u,t.value),c=u=>o(u,e.value);e.value.addEventListener("pointerleave",l),t.value.addEventListener("pointerleave",c),a(()=>{e.value?.removeEventListener("pointerleave",l),t.value?.removeEventListener("pointerleave",c)})}}),st(a=>{if(n.value){const l=c=>{if(!n.value||!(c.target instanceof Element))return;const u=c.target,d={x:c.clientX,y:c.clientY},p=e.value?.contains(u)||t.value?.contains(u),h=!Fb(d,n.value),m=!!u.closest("[data-grace-area-trigger]");p?i():(h||m)&&(i(),s.trigger())};e.value?.ownerDocument.addEventListener("pointermove",l),a(()=>e.value?.ownerDocument.removeEventListener("pointermove",l))}}),{isPointerInTransit:r,onPointerExit:s.on}}function qb(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,s,i)){case i:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Nb(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 Bb(e){const{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}function Fb(e,t){const{x:r,y:n}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const a=t[i].x,l=t[i].y,c=t[o].x,u=t[o].y;l>n!=u>n&&r<(c-a)*(n-l)/(u-l)+a&&(s=!s)}return s}function Lb(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),Vb(t)}function Vb(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 jb=function(e){return typeof document>"u"?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},As=new WeakMap,Bo=new WeakMap,Fo={},Ll=0,yp=function(e){return e&&(e.host||yp(e.parentNode))},Ub=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=yp(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})},zb=function(e,t,r,n){var s=Ub(t,Array.isArray(e)?e:[e]);Fo[r]||(Fo[r]=new WeakMap);var i=Fo[r],o=[],a=new Set,l=new Set(s),c=function(d){!d||a.has(d)||(a.add(d),c(d.parentNode))};s.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(p){if(a.has(p))u(p);else try{var h=p.getAttribute(n),m=h!==null&&h!=="false",w=(As.get(p)||0)+1,S=(i.get(p)||0)+1;As.set(p,w),i.set(p,S),o.push(p),w===1&&m&&Bo.set(p,!0),S===1&&p.setAttribute(r,"true"),m||p.setAttribute(n,"true")}catch(g){console.error("aria-hidden: cannot operate on ",p,g)}})};return u(t),a.clear(),Ll++,function(){o.forEach(function(d){var p=As.get(d)-1,h=i.get(d)-1;As.set(d,p),i.set(d,h),p||(Bo.has(d)||d.removeAttribute(n),Bo.delete(d)),h||d.removeAttribute(r)}),Ll--,Ll||(As=new WeakMap,As=new WeakMap,Bo=new WeakMap,Fo={})}},Kb=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=t||jb(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live], script"))),zb(n,s,r,"aria-hidden")):function(){return null}};function bp(e){let t;Ie(()=>Tr(e),r=>{r?t=Kb(r):t&&t()}),Rt(()=>{t&&t()})}var Wb=0;function Vn(e,t="reka"){if(e)return e;if("useId"in kw)return`${t}-${Cu?.()}`;const r=Oo({useId:void 0});return r.useId?`${t}-${r.useId()}`:`${t}-${++Wb}`}function Sp(e){const t=F(),r=B(()=>t.value?.width??0),n=B(()=>t.value?.height??0);return Ue(()=>{const s=Tr(e);if(s){t.value={width:s.offsetWidth,height:s.offsetHeight};const i=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let l,c;if("borderBoxSize"in a){const u=a.borderBoxSize,d=Array.isArray(u)?u[0]:u;l=d.inlineSize,c=d.blockSize}else l=s.offsetWidth,c=s.offsetHeight;t.value={width:l,height:c}});return i.observe(s,{box:"border-box"}),()=>i.unobserve(s)}else t.value=void 0}),{width:r,height:n}}function Cp(e,t){const r=F(e);function n(i){return t[r.value][i]??r.value}return{state:r,dispatch:i=>{r.value=n(i)}}}function _p(e){const t=pp("",1e3);return{search:t,handleTypeaheadSearch:(s,i)=>{if(t.value=t.value+s,e)e(s);else{const o=Pt(),a=i.map(d=>({...d,textValue:d.value?.textValue??d.ref.textContent?.trim()??""})),l=a.find(d=>d.ref===o),c=Jb(a.map(d=>d.textValue),t.value,l?.textValue),u=a.find(d=>d.textValue===c);return u&&u.ref.focus(),u?.ref}},resetTypeahead:()=>{t.value=""}}}function Gb(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function Jb(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=Gb(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 Yb(e,t){const r=F({}),n=F("none"),s=F(e),i=e.value?"mounted":"unmounted";let o;const a=t.value?.ownerDocument.defaultView??Ho,{state:l,dispatch:c}=Cp(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),u=w=>{if(nr){const S=new CustomEvent(w,{bubbles:!1,cancelable:!1});t.value?.dispatchEvent(S)}};Ie(e,async(w,S)=>{const g=S!==w;if(await at(),g){const x=n.value,y=Lo(t.value);w?(c("MOUNT"),u("enter"),y==="none"&&u("after-enter")):y==="none"||y==="undefined"||r.value?.display==="none"?(c("UNMOUNT"),u("leave"),u("after-leave")):S&&x!==y?(c("ANIMATION_OUT"),u("leave")):(c("UNMOUNT"),u("after-leave"))}},{immediate:!0});const d=w=>{const S=Lo(t.value),g=S.includes(CSS.escape(w.animationName)),x=l.value==="mounted"?"enter":"leave";if(w.target===t.value&&g&&(u(`after-${x}`),c("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&&S==="none"&&c("ANIMATION_END")},p=w=>{w.target===t.value&&(n.value=Lo(t.value))},h=Ie(t,(w,S)=>{w?(r.value=getComputedStyle(w),w.addEventListener("animationstart",p),w.addEventListener("animationcancel",d),w.addEventListener("animationend",d)):(c("ANIMATION_END"),o!==void 0&&a?.clearTimeout(o),S?.removeEventListener("animationstart",p),S?.removeEventListener("animationcancel",d),S?.removeEventListener("animationend",d))},{immediate:!0}),m=Ie(l,()=>{const w=Lo(t.value);n.value=l.value==="mounted"?w:"none"});return Rt(()=>{h(),m()}),{isPresent:B(()=>["mounted","unmountSuspended"].includes(l.value))}}function Lo(e){return e&&getComputedStyle(e).animationName||"none"}var jn=G({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:r}){const{present:n,forceMount:s}=ft(e),i=F(),{isPresent:o}=Yb(n,i);r({present:o});let a=t.default({present:o.value});a=Ol(a||[]);const l=nt();if(a&&a?.length>1){const c=l?.parent?.type.name?`<${l.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${c}\` 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(u=>` - ${u}`).join(`
70
70
  `)].join(`
71
- `))}return()=>s.value||n.value||o.value?Qt(t.default({present:o.value})[0],{ref:c=>{const u=Tr(c);return typeof u?.hasAttribute>"u"||(u?.hasAttribute("data-reka-popper-content-wrapper")?i.value=u.firstElementChild:i.value=u),u}}):null}}),Vl=G({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:r}){return()=>{if(!r.default)return null;const n=Ol(r.default()),s=n.findIndex(l=>l.type!==nt);if(s===-1)return n;const i=n[s];delete i.props?.ref;const o=i.props?ue(t,i.props):t,a=dr({...i,props:{}},o);return n.length===1?a:(n[s]=a,n)}}}),Zb=["area","img","input"],De=G({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"&&Zb.includes(n)?()=>Qt(n,t):n!=="template"?()=>Qt(e.as,t,{default:r.default}):()=>Qt(Vl,t,{default:r.default})}});function jl(){const e=B();return{primitiveElement:e,currentElement:N(()=>["#text","#comment"].includes(e.value?.$el.nodeName)?e.value?.$el.nextElementSibling:Tr(e))}}function Xb({type:e,defaultValue:t,modelValue:r}){const n=r||t;return r!==void 0||t!==void 0?Array.isArray(n)?"multiple":"single":e??"single"}function Qb({type:e,defaultValue:t,modelValue:r}){return e||Xb({type:e,defaultValue:t,modelValue:r})}function e0({type:e,defaultValue:t}){return t!==void 0?t:e==="single"?void 0:[]}function t0(e,t){const r=N(()=>Qb(e)),n=yn(e,"modelValue",t,{defaultValue:e0(e),passive:e.modelValue===void 0,deep:!0});function s(i){if(r.value==="single")n.value=wi(i,n.value)?void 0:i;else{const o=Array.isArray(n.value)?[...n.value||[]]:[n.value].filter(Boolean);if(cp(o,i)){const a=o.findIndex(l=>wi(l,i));o.splice(a,1)}else o.push(i);n.value=o}}return{modelValue:n,changeModelValue:s,isSingle:N(()=>r.value==="single")}}var[bn,r0]=vt("DialogRoot"),n0=G({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=yn(r,"open",t,{defaultValue:r.defaultOpen,passive:r.open===void 0}),s=B(),i=B(),{modal:o}=ft(r);return r0({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)=>Z(a.$slots,"default",{open:f(n),close:()=>n.value=!1})}}),s0=G({__name:"DialogClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e;Se();const r=bn();return(n,s)=>(I(),q(f(De),ue(t,{type:n.as==="button"?"button":void 0,onClick:s[0]||(s[0]=i=>f(r).onOpenChange(!1))}),{default:A(()=>[Z(n.$slots,"default")]),_:3},16,["type"]))}}),i0="dismissableLayer.pointerDownOutside",o0="dismissableLayer.focusOutside";function xp(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 a0(e,t,r=!0){const n=t?.value?.ownerDocument??globalThis?.document,s=B(!1),i=B(()=>{});return rt(o=>{if(!nr||!xe(r))return;const a=async c=>{const u=c.target;if(!(!t?.value||!u)){if(xp(t.value,u)){s.value=!1;return}if(c.target&&!s.value){let h=function(){Dl(i0,e,p)};var d=h;const p={originalEvent:c};c.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 l0(e,t,r=!0){const n=t?.value?.ownerDocument??globalThis?.document,s=B(!1);return rt(i=>{if(!nr||!xe(r))return;const o=async a=>{if(!t?.value)return;await ot(),await ot();const l=a.target;!t.value||!l||xp(t.value,l)||a.target&&!s.value&&Dl(o0,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 Jr=Nr({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ul=G({__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}=Se(),o=N(()=>i.value?.ownerDocument??globalThis.document),a=N(()=>Jr.layersRoot),l=N(()=>i.value?Array.from(a.value).indexOf(i.value):-1),c=N(()=>Jr.layersWithOutsidePointerEventsDisabled.size>0),u=N(()=>{const g=Array.from(a.value),[w]=[...Jr.layersWithOutsidePointerEventsDisabled].slice(-1),C=g.indexOf(w);return l.value>=C}),d=a0(async g=>{const w=[...Jr.branches].some(C=>C?.contains(g.target));!u.value||w||(n("pointerDownOutside",g),n("interactOutside",g),await ot(),g.defaultPrevented||n("dismiss"))},i),p=l0(g=>{[...Jr.branches].some(w=>w?.contains(g.target))||(n("focusOutside",g),n("interactOutside",g),g.defaultPrevented||n("dismiss"))},i);Rb("Escape",g=>{l.value===a.value.size-1&&(n("escapeKeyDown",g),g.defaultPrevented||n("dismiss"))});let h;return rt(g=>{i.value&&(r.disableOutsidePointerEvents&&(Jr.layersWithOutsidePointerEventsDisabled.size===0&&(h=o.value.body.style.pointerEvents,o.value.body.style.pointerEvents="none"),Jr.layersWithOutsidePointerEventsDisabled.add(i.value)),a.value.add(i.value),g(()=>{r.disableOutsidePointerEvents&&Jr.layersWithOutsidePointerEventsDisabled.size===1&&(o.value.body.style.pointerEvents=h)}))}),rt(g=>{g(()=>{i.value&&(a.value.delete(i.value),Jr.layersWithOutsidePointerEventsDisabled.delete(i.value))})}),(g,w)=>(I(),q(f(De),{ref:f(s),"as-child":g.asChild,as:g.as,"data-dismissable-layer":"",style:mt({pointerEvents:c.value?u.value?"auto":"none":void 0}),onFocusCapture:f(p).onFocusCapture,onBlurCapture:f(p).onBlurCapture,onPointerdownCapture:f(d).onPointerDownCapture},{default:A(()=>[Z(g.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),c0=hb(()=>B([]));function u0(){const e=c0();return{add(t){const r=e.value[0];t!==r&&r?.pause(),e.value=Tp(e.value,t),e.value.unshift(t)},remove(t){e.value=Tp(e.value,t),e.value[0]?.resume()}}}function Tp(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function d0(e){return e.filter(t=>t.tagName!=="A")}var zl="focusScope.autoFocusOnMount",Kl="focusScope.autoFocusOnUnmount",Ep={bubbles:!1,cancelable:!0};function f0(e,{select:t=!1}={}){const r=Pt();for(const n of e)if(Sn(n,{select:t}),Pt()!==r)return!0}function p0(e){const t=Ap(e);return[kp(t,e),kp(t.reverse(),e)]}function Ap(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 kp(e,t){for(const r of e)if(!h0(r,{upTo:t}))return r}function h0(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 g0(e){return e instanceof HTMLInputElement&&"select"in e}function Sn(e,{select:t=!1}={}){if(e&&e.focus){const r=Pt();e.focus({preventScroll:!0}),e!==r&&g0(e)&&t&&e.select()}}var Ip=G({__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}=Se(),o=B(null),a=u0(),l=Nr({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});rt(u=>{if(!nr)return;const d=i.value;if(!r.trapped)return;function p(C){if(l.paused||!d)return;const v=C.target;d.contains(v)?o.value=v:Sn(o.value,{select:!0})}function h(C){if(l.paused||!d)return;const v=C.relatedTarget;v!==null&&(d.contains(v)||Sn(o.value,{select:!0}))}function g(C){d.contains(o.value)||Sn(d)}document.addEventListener("focusin",p),document.addEventListener("focusout",h);const w=new MutationObserver(g);d&&w.observe(d,{childList:!0,subtree:!0}),u(()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",h),w.disconnect()})}),rt(async u=>{const d=i.value;if(await ot(),!d)return;a.add(l);const p=Pt();if(!d.contains(p)){const h=new CustomEvent(zl,Ep);d.addEventListener(zl,g=>n("mountAutoFocus",g)),d.dispatchEvent(h),h.defaultPrevented||(f0(d0(Ap(d)),{select:!0}),Pt()===p&&Sn(d))}u(()=>{d.removeEventListener(zl,w=>n("mountAutoFocus",w));const h=new CustomEvent(Kl,Ep),g=w=>{n("unmountAutoFocus",w)};d.addEventListener(Kl,g),d.dispatchEvent(h),setTimeout(()=>{h.defaultPrevented||Sn(p??document.body,{select:!0}),d.removeEventListener(Kl,g),a.remove(l)},0)})});function c(u){if(!r.loop&&!r.trapped||l.paused)return;const d=u.key==="Tab"&&!u.altKey&&!u.ctrlKey&&!u.metaKey,p=Pt();if(d&&p){const h=u.currentTarget,[g,w]=p0(h);g&&w?!u.shiftKey&&p===w?(u.preventDefault(),r.loop&&Sn(g,{select:!0})):u.shiftKey&&p===g&&(u.preventDefault(),r.loop&&Sn(w,{select:!0})):p===h&&u.preventDefault()}}return(u,d)=>(I(),q(f(De),{ref_key:"currentRef",ref:s,tabindex:"-1","as-child":u.asChild,as:u.as,onKeydown:c},{default:A(()=>[Z(u.$slots,"default")]),_:3},8,["as-child","as"]))}}),Rp=["Enter"," "],v0=["ArrowDown","PageUp","Home"],m0=["ArrowUp","PageDown","End"],QT=[...v0,...m0],eE={ltr:[...Rp,"ArrowRight"],rtl:[...Rp,"ArrowLeft"]};function w0(e){return e?"open":"closed"}function $p(e){const t=Pt();for(const r of e)if(r===t||(r.focus(),Pt()!==t))return}var Dp=G({__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=bn(),{forwardRef:i,currentElement:o}=Se();return s.titleId||(s.titleId=Vn(void 0,"reka-dialog-title")),s.descriptionId||(s.descriptionId=Vn(void 0,"reka-dialog-description")),Ue(()=>{s.contentElement=o,Pt()!==document.body&&(s.triggerElement.value=Pt())}),(a,l)=>(I(),q(f(Ip),{"as-child":"",loop:"",trapped:r.trapFocus,onMountAutoFocus:l[5]||(l[5]=c=>n("openAutoFocus",c)),onUnmountAutoFocus:l[6]||(l[6]=c=>n("closeAutoFocus",c))},{default:A(()=>[D(f(Ul),ue({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(w0)(f(s).open.value)},a.$attrs,{onDismiss:l[0]||(l[0]=c=>f(s).onOpenChange(!1)),onEscapeKeyDown:l[1]||(l[1]=c=>n("escapeKeyDown",c)),onFocusOutside:l[2]||(l[2]=c=>n("focusOutside",c)),onInteractOutside:l[3]||(l[3]=c=>n("interactOutside",c)),onPointerDownOutside:l[4]||(l[4]=c=>n("pointerDownOutside",c))}),{default:A(()=>[Z(a.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),y0=G({__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=bn(),i=qo(n),{forwardRef:o,currentElement:a}=Se();return bp(a),(l,c)=>(I(),q(Dp,ue({...r,...f(i)},{ref:f(o),"trap-focus":f(s).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:c[0]||(c[0]=u=>{u.defaultPrevented||(u.preventDefault(),f(s).triggerElement.value?.focus())}),onPointerDownOutside:c[1]||(c[1]=u=>{const d=u.detail.originalEvent,p=d.button===0&&d.ctrlKey===!0;(d.button===2||p)&&u.preventDefault()}),onFocusOutside:c[2]||(c[2]=u=>{u.preventDefault()})}),{default:A(()=>[Z(l.$slots,"default")]),_:3},16,["trap-focus"]))}}),b0=G({__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=qo(t);Se();const s=bn(),i=B(!1),o=B(!1);return(a,l)=>(I(),q(Dp,ue({...r,...f(n)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:l[0]||(l[0]=c=>{c.defaultPrevented||(i.value||f(s).triggerElement.value?.focus(),c.preventDefault()),i.value=!1,o.value=!1}),onInteractOutside:l[1]||(l[1]=c=>{c.defaultPrevented||(i.value=!0,c.detail.originalEvent.type==="pointerdown"&&(o.value=!0));const u=c.target;f(s).triggerElement.value?.contains(u)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&o.value&&c.preventDefault()})}),{default:A(()=>[Z(a.$slots,"default")]),_:3},16))}}),S0=G({__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=bn(),i=qo(n),{forwardRef:o}=Se();return(a,l)=>(I(),q(f(jn),{present:a.forceMount||f(s).open.value},{default:A(()=>[f(s).modal.value?(I(),q(y0,ue({key:0,ref:f(o)},{...r,...f(i),...a.$attrs}),{default:A(()=>[Z(a.$slots,"default")]),_:3},16)):(I(),q(b0,ue({key:1,ref:f(o)},{...r,...f(i),...a.$attrs}),{default:A(()=>[Z(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),C0=G({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=bn();return vp(!0),Se(),(r,n)=>(I(),q(f(De),{as:r.as,"as-child":r.asChild,"data-state":f(t).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:A(()=>[Z(r.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),_0=G({__name:"DialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=bn(),{forwardRef:r}=Se();return(n,s)=>f(t)?.modal.value?(I(),q(f(jn),{key:0,present:n.forceMount||f(t).open.value},{default:A(()=>[D(C0,ue(n.$attrs,{ref:f(r),as:n.as,"as-child":n.asChild}),{default:A(()=>[Z(n.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):Ee("v-if",!0)}}),Wl=G({__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?(I(),q(Aa,{key:0,to:r.to,disabled:r.disabled,defer:r.defer},[Z(r.$slots,"default")],8,["to","disabled","defer"])):Ee("v-if",!0)}}),x0=G({__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)=>(I(),q(f(Wl),Ht(Dt(t)),{default:A(()=>[Z(r.$slots,"default")]),_:3},16))}}),T0=G({__name:"DialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(e){const t=e,r=bn();return Se(),(n,s)=>(I(),q(f(De),ue(t,{id:f(r).titleId}),{default:A(()=>[Z(n.$slots,"default")]),_:3},16,["id"]))}}),Pp="data-reka-collection-item";function hr(e={}){const{key:t="",isProvider:r=!1}=e,n=`${t}CollectionProvider`;let s;if(r){const l=B(new Map);s={collectionRef:B(),itemMap:l},Dn(n,s)}else s=bt(n);const i=(l=!1)=>{const c=s.collectionRef.value;if(!c)return[];const u=Array.from(c.querySelectorAll(`[${Pp}]`)),d=Array.from(s.itemMap.value.values()).sort((p,h)=>u.indexOf(p.ref)-u.indexOf(h.ref));return l?d:d.filter(p=>p.ref.dataset.disabled!=="")},o=G({name:"CollectionSlot",setup(l,{slots:c}){const{primitiveElement:u,currentElement:d}=jl();return Ie(d,()=>{s.collectionRef.value=d.value}),()=>Qt(Vl,{ref:u},c)}}),a=G({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(l,{slots:c,attrs:u}){const{primitiveElement:d,currentElement:p}=jl();return rt(h=>{if(p.value){const g=Ca(p.value);s.itemMap.value.set(g,{ref:p.value,value:l.value}),h(()=>s.itemMap.value.delete(g))}}),()=>Qt(Vl,{...u,[Pp]:"",ref:d},c)}});return{getItems:i,reactiveItems:N(()=>Array.from(s.itemMap.value.values())),itemMapSize:N(()=>s.itemMap.value.size),CollectionSlot:o,CollectionItem:a}}var E0="rovingFocusGroup.onEntryFocus",A0={bubbles:!1,cancelable:!0},k0={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function I0(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function R0(e,t,r){const n=I0(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return k0[n]}function Op(e,t=!1){const r=Pt();for(const n of e)if(n===r||(n.focus({preventScroll:t}),Pt()!==r))return}function $0(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var[D0,P0]=vt("RovingFocusGroup"),O0=G({__name:"RovingFocusGroup",props:{orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!1},currentTabStopId:{type:[String,null],required:!1},defaultCurrentTabStopId:{type:String,required:!1},preventScrollOnEntryFocus:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["entryFocus","update:currentTabStopId"],setup(e,{expose:t,emit:r}){const n=e,s=r,{loop:i,orientation:o,dir:a}=ft(n),l=bi(a),c=yn(n,"currentTabStopId",s,{defaultValue:n.defaultCurrentTabStopId,passive:n.currentTabStopId===void 0}),u=B(!1),d=B(!1),p=B(0),{getItems:h,CollectionSlot:g}=hr({isProvider:!0});function w(v){const x=!d.value;if(v.currentTarget&&v.target===v.currentTarget&&x&&!u.value){const y=new CustomEvent(E0,A0);if(v.currentTarget.dispatchEvent(y),s("entryFocus",y),!y.defaultPrevented){const b=h().map(_=>_.ref).filter(_=>_.dataset.disabled!=="");Op([b.find(_=>_.getAttribute("data-active")===""),b.find(_=>_.getAttribute("data-highlighted")===""),b.find(_=>_.id===c.value),...b].filter(Boolean),n.preventScrollOnEntryFocus)}}d.value=!1}function C(){setTimeout(()=>{d.value=!1},1)}return t({getItems:h}),P0({loop:i,dir:l,orientation:o,currentTabStopId:c,onItemFocus:v=>{c.value=v},onItemShiftTab:()=>{u.value=!0},onFocusableItemAdd:()=>{p.value++},onFocusableItemRemove:()=>{p.value--}}),(v,x)=>(I(),q(f(g),null,{default:A(()=>[D(f(De),{tabindex:u.value||p.value===0?-1:0,"data-orientation":f(o),as:v.as,"as-child":v.asChild,dir:f(l),style:{outline:"none"},onMousedown:x[0]||(x[0]=y=>d.value=!0),onMouseup:C,onFocus:w,onBlur:x[1]||(x[1]=y=>u.value=!1)},{default:A(()=>[Z(v.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),H0=G({__name:"RovingFocusItem",props:{tabStopId:{type:String,required:!1},focusable:{type:Boolean,required:!1,default:!0},active:{type:Boolean,required:!1},allowShiftKey:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,r=D0(),n=Vn(),s=N(()=>t.tabStopId||n),i=N(()=>r.currentTabStopId.value===s.value),{getItems:o,CollectionItem:a}=hr();Ue(()=>{t.focusable&&r.onFocusableItemAdd()}),Rt(()=>{t.focusable&&r.onFocusableItemRemove()});function l(c){if(c.key==="Tab"&&c.shiftKey){r.onItemShiftTab();return}if(c.target!==c.currentTarget)return;const u=R0(c,r.orientation.value,r.dir.value);if(u!==void 0){if(c.metaKey||c.ctrlKey||c.altKey||!t.allowShiftKey&&c.shiftKey)return;c.preventDefault();let d=[...o().map(p=>p.ref).filter(p=>p.dataset.disabled!=="")];if(u==="last")d.reverse();else if(u==="prev"||u==="next"){u==="prev"&&d.reverse();const p=d.indexOf(c.currentTarget);d=r.loop.value?$0(d,p+1):d.slice(p+1)}ot(()=>Op(d))}}return(c,u)=>(I(),q(f(a),null,{default:A(()=>[D(f(De),{tabindex:i.value?0:-1,"data-orientation":f(r).orientation.value,"data-active":c.active?"":void 0,"data-disabled":c.focusable?void 0:"",as:c.as,"as-child":c.asChild,onMousedown:u[0]||(u[0]=d=>{c.focusable?f(r).onItemFocus(s.value):d.preventDefault()}),onFocus:u[1]||(u[1]=d=>f(r).onItemFocus(s.value)),onKeydown:l},{default:A(()=>[Z(c.$slots,"default")]),_:3},8,["tabindex","data-orientation","data-active","data-disabled","as","as-child"])]),_:3}))}}),Gl=G({__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)=>(I(),q(f(De),{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:A(()=>[Z(t.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}}),Hp=G({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}=jl();return Ie(N(()=>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 c=new Event("input",{bubbles:!0}),u=new Event("change",{bubbles:!0});l.call(o,s),o.dispatchEvent(c),o.dispatchEvent(u)}}),(s,i)=>(I(),q(Gl,ue({ref_key:"primitiveElement",ref:r},{...t,...s.$attrs},{as:"input"}),null,16))}}),Jl=G({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=N(()=>typeof t.value=="object"&&Array.isArray(t.value)&&t.value.length===0&&t.required),n=N(()=>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)=>(I(),we(Oe,null,[Ee(" We render single input if it's required "),r.value?(I(),q(Hp,ue({key:s.name},{...t,...s.$attrs},{name:s.name,value:s.value}),null,16,["name","value"])):(I(!0),we(Oe,{key:1},Xt(n.value,o=>(I(),q(Hp,ue({key:o.name},{ref_for:!0},{...t,...s.$attrs},{name:o.name,value:o.value}),null,16,["name","value"]))),128))],2112))}}),[Mp,M0]=vt("PopperRoot"),qp=G({inheritAttrs:!1,__name:"PopperRoot",setup(e){const t=B();return M0({anchor:t,onAnchorChange:r=>t.value=r}),(r,n)=>Z(r.$slots,"default")}}),Np=G({__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}=Se(),s=Mp();return Ua(()=>{s.onAnchorChange(t.reference??n.value)}),(i,o)=>(I(),q(f(De),{ref:f(r),as:i.as,"as-child":i.asChild},{default:A(()=>[Z(i.$slots,"default")]),_:3},8,["as","as-child"]))}}),q0={key:0,d:"M0 0L6 6L12 0"},N0={key:1,d:"M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0"},B0=G({__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 Se(),(r,n)=>(I(),q(f(De),ue(t,{width:r.width,height:r.height,viewBox:r.asChild?void 0:"0 0 12 6",preserveAspectRatio:r.asChild?void 0:"none"}),{default:A(()=>[Z(r.$slots,"default",{},()=>[r.rounded?(I(),we("path",N0)):(I(),we("path",q0))])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}});function F0(e){return e!==null}function L0(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,c]=Yl(r),u={start:"0%",center:"50%",end:"100%"}[c],d=(s.arrow?.x??0)+o/2,p=(s.arrow?.y??0)+a/2;let h="",g="";return l==="bottom"?(h=i?u:`${d}px`,g=`${-a}px`):l==="top"?(h=i?u:`${d}px`,g=`${n.floating.height+a}px`):l==="right"?(h=`${-a}px`,g=i?u:`${p}px`):l==="left"&&(h=`${n.floating.width+a}px`,g=i?u:`${p}px`),{data:{x:h,y:g}}}}}function Yl(e){const[t,r="center"]=e.split("-");return[t,r]}var V0=["top","right","bottom","left"],Cn=Math.min,Ut=Math.max,Vo=Math.round,jo=Math.floor,kr=e=>({x:e,y:e}),j0={left:"right",right:"left",bottom:"top",top:"bottom"},U0={start:"end",end:"start"};function Zl(e,t,r){return Ut(e,Cn(t,r))}function Yr(e,t){return typeof e=="function"?e(t):e}function Zr(e){return e.split("-")[0]}function ks(e){return e.split("-")[1]}function Xl(e){return e==="x"?"y":"x"}function Ql(e){return e==="y"?"height":"width"}var z0=new Set(["top","bottom"]);function Ir(e){return z0.has(Zr(e))?"y":"x"}function ec(e){return Xl(Ir(e))}function K0(e,t,r){r===void 0&&(r=!1);const n=ks(e),s=ec(e),i=Ql(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Uo(o)),[o,Uo(o)]}function W0(e){const t=Uo(e);return[tc(e),t,tc(t)]}function tc(e){return e.replace(/start|end/g,t=>U0[t])}var Bp=["left","right"],Fp=["right","left"],G0=["top","bottom"],J0=["bottom","top"];function Y0(e,t,r){switch(e){case"top":case"bottom":return r?t?Fp:Bp:t?Bp:Fp;case"left":case"right":return t?G0:J0;default:return[]}}function Z0(e,t,r,n){const s=ks(e);let i=Y0(Zr(e),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(tc)))),i}function Uo(e){return e.replace(/left|right|bottom|top/g,t=>j0[t])}function X0(e){return{top:0,right:0,bottom:0,left:0,...e}}function Lp(e){return typeof e!="number"?X0(e):{top:e,right:e,bottom:e,left:e}}function zo(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 Vp(e,t,r){let{reference:n,floating:s}=e;const i=Ir(t),o=ec(t),a=Ql(o),l=Zr(t),c=i==="y",u=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:u,y:n.y-s.height};break;case"bottom":h={x:u,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(ks(t)){case"start":h[o]-=p*(r&&c?-1:1);break;case"end":h[o]+=p*(r&&c?-1:1);break}return h}var Q0=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:d}=Vp(c,n,l),p=n,h={},g=0;for(let w=0;w<a.length;w++){const{name:C,fn:v}=a[w],{x,y,data:b,reset:_}=await v({x:u,y:d,initialPlacement:n,placement:p,strategy:s,middlewareData:h,rects:c,platform:o,elements:{reference:e,floating:t}});u=x??u,d=y??d,h={...h,[C]:{...h[C],...b}},_&&g<=50&&(g++,typeof _=="object"&&(_.placement&&(p=_.placement),_.rects&&(c=_.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):_.rects),{x:u,y:d}=Vp(c,p,l)),w=-1)}return{x:u,y:d,placement:p,strategy:s,middlewareData:h}};async function Si(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=Yr(t,e),g=Lp(h),w=a[p?d==="floating"?"reference":"floating":d],C=zo(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:c,rootBoundary:u,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)),y=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},b=zo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:x,strategy:l}):v);return{top:(C.top-b.top+g.top)/y.y,bottom:(b.bottom-C.bottom+g.bottom)/y.y,left:(C.left-b.left+g.left)/y.x,right:(b.right-C.right+g.right)/y.x}}var e1=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:c,padding:u=0}=Yr(e,t)||{};if(c==null)return{};const d=Lp(u),p={x:r,y:n},h=ec(s),g=Ql(h),w=await o.getDimensions(c),C=h==="y",v=C?"top":"left",x=C?"bottom":"right",y=C?"clientHeight":"clientWidth",b=i.reference[g]+i.reference[h]-p[h]-i.floating[g],_=p[h]-i.reference[h],$=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let R=$?$[y]:0;(!R||!await(o.isElement==null?void 0:o.isElement($)))&&(R=a.floating[y]||i.floating[g]);const m=b/2-_/2,P=R/2-w[g]/2-1,O=Cn(d[v],P),S=Cn(d[x],P),T=O,E=R-w[g]-S,M=R/2-w[g]/2+m,j=Zl(T,M,E),z=!l.arrow&&ks(s)!=null&&M!==j&&i.reference[g]/2-(M<T?O:S)-w[g]/2<0,J=z?M<T?M-T:M-E:0;return{[h]:p[h]+J,data:{[h]:j,centerOffset:M-j-J,...z&&{alignmentOffset:J}},reset:z}}}),t1=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:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:w=!0,...C}=Yr(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const v=Zr(s),x=Ir(a),y=Zr(a)===a,b=await(l.isRTL==null?void 0:l.isRTL(c.floating)),_=p||(y||!w?[Uo(a)]:W0(a)),$=g!=="none";!p&&$&&_.push(...Z0(a,w,g,b));const R=[a,..._],m=await Si(t,C),P=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&P.push(m[v]),d){const M=K0(s,o,b);P.push(m[M[0]],m[M[1]])}if(O=[...O,{placement:s,overflows:P}],!P.every(M=>M<=0)){var S,T;const M=(((S=i.flip)==null?void 0:S.index)||0)+1,j=R[M];if(j&&(!(d==="alignment"&&x!==Ir(j))||O.every(J=>Ir(J.placement)===x?J.overflows[0]>0:!0)))return{data:{index:M,overflows:O},reset:{placement:j}};let z=(T=O.filter(J=>J.overflows[0]<=0).sort((J,U)=>J.overflows[1]-U.overflows[1])[0])==null?void 0:T.placement;if(!z)switch(h){case"bestFit":{var E;const J=(E=O.filter(U=>{if($){const Te=Ir(U.placement);return Te===x||Te==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(Te=>Te>0).reduce((Te,be)=>Te+be,0)]).sort((U,Te)=>U[1]-Te[1])[0])==null?void 0:E[0];J&&(z=J);break}case"initialPlacement":z=a;break}if(s!==z)return{reset:{placement:z}}}return{}}}};function jp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Up(e){return V0.some(t=>e[t]>=0)}var r1=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=Yr(e,t);switch(n){case"referenceHidden":{const i=jp(await Si(t,{...s,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Up(i)}}}case"escaped":{const i=jp(await Si(t,{...s,altBoundary:!0}),r.floating);return{data:{escapedOffsets:i,escaped:Up(i)}}}default:return{}}}}},zp=new Set(["left","top"]);async function n1(e,t){const{placement:r,platform:n,elements:s}=e,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=Zr(r),a=ks(r),l=Ir(r)==="y",c=zp.has(o)?-1:1,u=i&&l?-1:1,d=Yr(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof g=="number"&&(h=a==="end"?g*-1:g),l?{x:h*u,y:p*c}:{x:p*c,y:h*u}}var s1=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 n1(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}}}}},i1=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:C=>{let{x:v,y:x}=C;return{x:v,y:x}}},...l}=Yr(e,t),c={x:r,y:n},u=await Si(t,l),d=Ir(Zr(s)),p=Xl(d);let h=c[p],g=c[d];if(i){const C=p==="y"?"top":"left",v=p==="y"?"bottom":"right",x=h+u[C],y=h-u[v];h=Zl(x,h,y)}if(o){const C=d==="y"?"top":"left",v=d==="y"?"bottom":"right",x=g+u[C],y=g-u[v];g=Zl(x,g,y)}const w=a.fn({...t,[p]:h,[d]:g});return{...w,data:{x:w.x-r,y:w.y-n,enabled:{[p]:i,[d]:o}}}}}},o1=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:c=!0}=Yr(e,t),u={x:r,y:n},d=Ir(s),p=Xl(d);let h=u[p],g=u[d];const w=Yr(a,t),C=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]+C.mainAxis,_=i.reference[p]+i.reference[y]-C.mainAxis;h<b?h=b:h>_&&(h=_)}if(c){var v,x;const y=p==="y"?"width":"height",b=zp.has(Zr(s)),_=i.reference[d]-i.floating[y]+(b&&((v=o.offset)==null?void 0:v[d])||0)+(b?0:C.crossAxis),$=i.reference[d]+i.reference[y]+(b?0:((x=o.offset)==null?void 0:x[d])||0)-(b?C.crossAxis:0);g<_?g=_:g>$&&(g=$)}return{[p]:h,[d]:g}}}},a1=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=()=>{},...c}=Yr(e,t),u=await Si(t,c),d=Zr(s),p=ks(s),h=Ir(s)==="y",{width:g,height:w}=i.floating;let C,v;d==="top"||d==="bottom"?(C=d,v=p===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,C=p==="end"?"top":"bottom");const x=w-u.top-u.bottom,y=g-u.left-u.right,b=Cn(w-u[C],x),_=Cn(g-u[v],y),$=!t.middlewareData.shift;let R=b,m=_;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(m=y),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(R=x),$&&!p){const O=Ut(u.left,0),S=Ut(u.right,0),T=Ut(u.top,0),E=Ut(u.bottom,0);h?m=g-2*(O!==0||S!==0?O+S:Ut(u.left,u.right)):R=w-2*(T!==0||E!==0?T+E:Ut(u.top,u.bottom))}await l({...t,availableWidth:m,availableHeight:R});const P=await o.getDimensions(a.floating);return g!==P.width||w!==P.height?{reset:{rects:!0}}:{}}}};function Ko(){return typeof window<"u"}function Un(e){return rc(e)?(e.nodeName||"").toLowerCase():"#document"}function zt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Rr(e){var t;return(t=(rc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function rc(e){return Ko()?e instanceof Node||e instanceof zt(e).Node:!1}function gr(e){return Ko()?e instanceof Element||e instanceof zt(e).Element:!1}function $r(e){return Ko()?e instanceof HTMLElement||e instanceof zt(e).HTMLElement:!1}function Kp(e){return!Ko()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof zt(e).ShadowRoot}var l1=new Set(["inline","contents"]);function Ci(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=vr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!l1.has(s)}var c1=new Set(["table","td","th"]);function u1(e){return c1.has(Un(e))}var d1=[":popover-open",":modal"];function Wo(e){return d1.some(t=>{try{return e.matches(t)}catch{return!1}})}var f1=["transform","translate","scale","rotate","perspective"],p1=["transform","translate","scale","rotate","perspective","filter"],h1=["paint","layout","strict","content"];function nc(e){const t=sc(),r=gr(e)?vr(e):e;return f1.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||p1.some(n=>(r.willChange||"").includes(n))||h1.some(n=>(r.contain||"").includes(n))}function g1(e){let t=_n(e);for(;$r(t)&&!Is(t);){if(nc(t))return t;if(Wo(t))return null;t=_n(t)}return null}function sc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var v1=new Set(["html","body","#document"]);function Is(e){return v1.has(Un(e))}function vr(e){return zt(e).getComputedStyle(e)}function Go(e){return gr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _n(e){if(Un(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Kp(e)&&e.host||Rr(e);return Kp(t)?t.host:t}function Wp(e){const t=_n(e);return Is(t)?e.ownerDocument?e.ownerDocument.body:e.body:$r(t)&&Ci(t)?t:Wp(t)}function _i(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=Wp(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=zt(s);if(i){const a=ic(o);return t.concat(o,o.visualViewport||[],Ci(s)?s:[],a&&r?_i(a):[])}return t.concat(s,_i(s,[],r))}function ic(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Gp(e){const t=vr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=$r(e),i=s?e.offsetWidth:r,o=s?e.offsetHeight:n,a=Vo(r)!==i||Vo(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function oc(e){return gr(e)?e:e.contextElement}function Rs(e){const t=oc(e);if(!$r(t))return kr(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:i}=Gp(t);let o=(i?Vo(r.width):r.width)/n,a=(i?Vo(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var m1=kr(0);function Jp(e){const t=zt(e);return!sc()||!t.visualViewport?m1:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function w1(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==zt(e)?!1:t}function zn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),i=oc(e);let o=kr(1);t&&(n?gr(n)&&(o=Rs(n)):o=Rs(e));const a=w1(i,r,n)?Jp(i):kr(0);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,u=s.width/o.x,d=s.height/o.y;if(i){const p=zt(i),h=n&&gr(n)?zt(n):n;let g=p,w=ic(g);for(;w&&n&&h!==g;){const C=Rs(w),v=w.getBoundingClientRect(),x=vr(w),y=v.left+(w.clientLeft+parseFloat(x.paddingLeft))*C.x,b=v.top+(w.clientTop+parseFloat(x.paddingTop))*C.y;l*=C.x,c*=C.y,u*=C.x,d*=C.y,l+=y,c+=b,g=zt(w),w=ic(g)}}return zo({width:u,height:d,x:l,y:c})}function Jo(e,t){const r=Go(e).scrollLeft;return t?t.left+r:zn(Rr(e)).left+r}function Yp(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-Jo(e,r),y:r.top+t.scrollTop}}function y1(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const i=s==="fixed",o=Rr(n),a=t?Wo(t.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},c=kr(1);const u=kr(0),d=$r(n);if((d||!d&&!i)&&((Un(n)!=="body"||Ci(o))&&(l=Go(n)),$r(n))){const h=zn(n);c=Rs(n),u.x=h.x+n.clientLeft,u.y=h.y+n.clientTop}const p=o&&!d&&!i?Yp(o,l):kr(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:r.y*c.y-l.scrollTop*c.y+u.y+p.y}}function b1(e){return Array.from(e.getClientRects())}function S1(e){const t=Rr(e),r=Go(e),n=e.ownerDocument.body,s=Ut(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Ut(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+Jo(e);const a=-r.scrollTop;return vr(n).direction==="rtl"&&(o+=Ut(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}var Zp=25;function C1(e,t){const r=zt(e),n=Rr(e),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const u=sc();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}const c=Jo(n);if(c<=0){const u=n.ownerDocument,d=u.body,p=getComputedStyle(d),h=u.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(n.clientWidth-d.clientWidth-h);g<=Zp&&(i-=g)}else c<=Zp&&(i+=c);return{width:i,height:o,x:a,y:l}}var _1=new Set(["absolute","fixed"]);function x1(e,t){const r=zn(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,i=$r(e)?Rs(e):kr(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:s*i.x,y:n*i.y}}function Xp(e,t,r){let n;if(t==="viewport")n=C1(e,r);else if(t==="document")n=S1(Rr(e));else if(gr(t))n=x1(t,r);else{const s=Jp(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return zo(n)}function Qp(e,t){const r=_n(e);return r===t||!gr(r)||Is(r)?!1:vr(r).position==="fixed"||Qp(r,t)}function T1(e,t){const r=t.get(e);if(r)return r;let n=_i(e,[],!1).filter(a=>gr(a)&&Un(a)!=="body"),s=null;const i=vr(e).position==="fixed";let o=i?_n(e):e;for(;gr(o)&&!Is(o);){const a=vr(o),l=nc(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&s&&_1.has(s.position)||Ci(o)&&!l&&Qp(e,o))?n=n.filter(c=>c!==o):s=a,o=_n(o)}return t.set(e,n),n}function E1(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const i=[...r==="clippingAncestors"?Wo(t)?[]:T1(t,this._c):[].concat(r),n],o=i[0],a=i.reduce((l,c)=>{const u=Xp(t,c,s);return l.top=Ut(u.top,l.top),l.right=Cn(u.right,l.right),l.bottom=Cn(u.bottom,l.bottom),l.left=Ut(u.left,l.left),l},Xp(t,o,s));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function A1(e){const{width:t,height:r}=Gp(e);return{width:t,height:r}}function k1(e,t,r){const n=$r(t),s=Rr(t),i=r==="fixed",o=zn(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=kr(0);function c(){l.x=Jo(s)}if(n||!n&&!i)if((Un(t)!=="body"||Ci(s))&&(a=Go(t)),n){const d=zn(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else s&&c();i&&!n&&s&&c();const u=s&&!n&&!i?Yp(s,a):kr(0);return{x:o.left+a.scrollLeft-l.x-u.x,y:o.top+a.scrollTop-l.y-u.y,width:o.width,height:o.height}}function ac(e){return vr(e).position==="static"}function eh(e,t){if(!$r(e)||vr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Rr(e)===r&&(r=r.ownerDocument.body),r}function th(e,t){const r=zt(e);if(Wo(e))return r;if(!$r(e)){let s=_n(e);for(;s&&!Is(s);){if(gr(s)&&!ac(s))return s;s=_n(s)}return r}let n=eh(e,t);for(;n&&u1(n)&&ac(n);)n=eh(n,t);return n&&Is(n)&&ac(n)&&!nc(n)?r:n||g1(e)||r}var I1=async function(e){const t=this.getOffsetParent||th,r=this.getDimensions,n=await r(e.floating);return{reference:k1(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function R1(e){return vr(e).direction==="rtl"}var $1={convertOffsetParentRelativeRectToViewportRelativeRect:y1,getDocumentElement:Rr,getClippingRect:E1,getOffsetParent:th,getElementRects:I1,getClientRects:b1,getDimensions:A1,getScale:Rs,isElement:gr,isRTL:R1};function rh(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function D1(e,t){let r=null,n;const s=Rr(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 c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:h}=c;if(a||t(),!p||!h)return;const g=jo(d),w=jo(s.clientWidth-(u+p)),C=jo(s.clientHeight-(d+h)),v=jo(u),x={rootMargin:-g+"px "+-w+"px "+-C+"px "+-v+"px",threshold:Ut(0,Cn(1,l))||1};let y=!0;function b(_){const $=_[0].intersectionRatio;if($!==l){if(!y)return o();$?o(!1,$):n=setTimeout(()=>{o(!1,1e-7)},1e3)}$===1&&!rh(c,e.getBoundingClientRect())&&o(),y=!1}try{r=new IntersectionObserver(b,{...x,root:s.ownerDocument})}catch{r=new IntersectionObserver(b,x)}r.observe(e)}return o(!0),i}function P1(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,c=oc(e),u=s||i?[...c?_i(c):[],..._i(t)]:[];u.forEach(v=>{s&&v.addEventListener("scroll",r,{passive:!0}),i&&v.addEventListener("resize",r)});const d=c&&a?D1(c,r):null;let p=-1,h=null;o&&(h=new ResizeObserver(v=>{let[x]=v;x&&x.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var y;(y=h)==null||y.observe(t)})),r()}),c&&!l&&h.observe(c),h.observe(t));let g,w=l?zn(e):null;l&&C();function C(){const v=zn(e);w&&!rh(w,v)&&r(),w=v,g=requestAnimationFrame(C)}return r(),()=>{var v;u.forEach(x=>{s&&x.removeEventListener("scroll",r),i&&x.removeEventListener("resize",r)}),d?.(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(g)}}var O1=s1,H1=i1,nh=t1,M1=a1,q1=r1,N1=e1,B1=o1,F1=(e,t,r)=>{const n=new Map,s={platform:$1,...r},i={...s.platform,_c:n};return Q0(e,t,{...s,platform:i})};function L1(e){return e!=null&&typeof e=="object"&&"$el"in e}function lc(e){if(L1(e)){const t=e.$el;return rc(t)&&Un(t)==="#comment"?null:t}return e}function $s(e){return typeof e=="function"?e():f(e)}function V1(e){return{name:"arrow",options:e,fn(t){const r=lc($s(e.element));return r==null?{}:N1({element:r,padding:e.padding}).fn(t)}}}function sh(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ih(e,t){const r=sh(e);return Math.round(t*r)/r}function j1(e,t,r){r===void 0&&(r={});const n=r.whileElementsMounted,s=N(()=>{var R;return(R=$s(r.open))!=null?R:!0}),i=N(()=>$s(r.middleware)),o=N(()=>{var R;return(R=$s(r.placement))!=null?R:"bottom"}),a=N(()=>{var R;return(R=$s(r.strategy))!=null?R:"absolute"}),l=N(()=>{var R;return(R=$s(r.transform))!=null?R:!0}),c=N(()=>lc(e.value)),u=N(()=>lc(t.value)),d=B(0),p=B(0),h=B(a.value),g=B(o.value),w=Ze({}),C=B(!1),v=N(()=>{const R={position:h.value,left:"0",top:"0"};if(!u.value)return R;const m=ih(u.value,d.value),P=ih(u.value,p.value);return l.value?{...R,transform:"translate("+m+"px, "+P+"px)",...sh(u.value)>=1.5&&{willChange:"transform"}}:{position:h.value,left:m+"px",top:P+"px"}});let x;function y(){if(c.value==null||u.value==null)return;const R=s.value;F1(c.value,u.value,{middleware:i.value,placement:o.value,strategy:a.value}).then(m=>{d.value=m.x,p.value=m.y,h.value=m.strategy,g.value=m.placement,w.value=m.middlewareData,C.value=R!==!1})}function b(){typeof x=="function"&&(x(),x=void 0)}function _(){if(b(),n===void 0){y();return}if(c.value!=null&&u.value!=null){x=n(c.value,u.value,y);return}}function $(){s.value||(C.value=!1)}return Ie([i,o,a,s],y,{flush:"sync"}),Ie([c,u],_,{flush:"sync"}),Ie(s,$,{flush:"sync"}),is()&&Mi(b),{x:en(d),y:en(p),strategy:en(h),placement:en(g),middlewareData:en(w),isPositioned:en(C),floatingStyles:v,update:y}}var U1={side:"bottom",sideOffset:0,sideFlip:!0,align:"center",alignOffset:0,alignFlip:!0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[z1,K1]=vt("PopperContent"),oh=G({inheritAttrs:!1,__name:"PopperContent",props:Bu({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},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}},{...U1}),emits:["placed"],setup(e,{emit:t}){const r=e,n=t,s=Mp(),{forwardRef:i,currentElement:o}=Se(),a=B(),l=B(),{width:c,height:u}=Sp(l),d=N(()=>r.side+(r.align!=="center"?`-${r.align}`:"")),p=N(()=>typeof r.collisionPadding=="number"?r.collisionPadding:{top:0,right:0,bottom:0,left:0,...r.collisionPadding}),h=N(()=>Array.isArray(r.collisionBoundary)?r.collisionBoundary:[r.collisionBoundary]),g=N(()=>({padding:p.value,boundary:h.value.filter(F0),altBoundary:h.value.length>0})),w=N(()=>({mainAxis:r.sideFlip,crossAxis:r.alignFlip})),C=fb(()=>[O1({mainAxis:r.sideOffset+u.value,alignmentAxis:r.alignOffset}),r.prioritizePosition&&r.avoidCollisions&&nh({...g.value,...w.value}),r.avoidCollisions&&H1({mainAxis:!0,crossAxis:!!r.prioritizePosition,limiter:r.sticky==="partial"?B1():void 0,...g.value}),!r.prioritizePosition&&r.avoidCollisions&&nh({...g.value,...w.value}),M1({...g.value,apply:({elements:O,rects:S,availableWidth:T,availableHeight:E})=>{const{width:M,height:j}=S.reference,z=O.floating.style;z.setProperty("--reka-popper-available-width",`${T}px`),z.setProperty("--reka-popper-available-height",`${E}px`),z.setProperty("--reka-popper-anchor-width",`${M}px`),z.setProperty("--reka-popper-anchor-height",`${j}px`)}}),l.value&&V1({element:l.value,padding:r.arrowPadding}),L0({arrowWidth:c.value,arrowHeight:u.value}),r.hideWhenDetached&&q1({strategy:"referenceHidden",...g.value})]),{floatingStyles:v,placement:x,isPositioned:y,middlewareData:b,update:_}=j1(N(()=>r.reference??s.anchor.value),a,{strategy:r.positionStrategy,placement:d,whileElementsMounted:(...O)=>P1(...O,{layoutShift:!r.disableUpdateOnLayoutShift,animationFrame:r.updatePositionStrategy==="always"}),middleware:C}),$=N(()=>Yl(x.value)[0]),R=N(()=>Yl(x.value)[1]);Ua(()=>{y.value&&n("placed")});const m=N(()=>b.value.arrow?.centerOffset!==0),P=B("");return rt(()=>{o.value&&(P.value=window.getComputedStyle(o.value).zIndex)}),K1({placedSide:$,onArrowChange:O=>l.value=O,arrowX:N(()=>b.value.arrow?.x??0),arrowY:N(()=>b.value.arrow?.y??0),shouldHideArrow:m}),(O,S)=>(I(),we("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:P.value,"--reka-popper-transform-origin":[f(b).transformOrigin?.x,f(b).transformOrigin?.y].join(" "),...f(b).hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}})},[D(f(De),ue({ref:f(i)},O.$attrs,{"as-child":r.asChild,as:O.as,"data-side":$.value,"data-align":R.value,style:{animation:f(y)?void 0:"none"}}),{default:A(()=>[Z(O.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4))}}),W1={top:"bottom",right:"left",bottom:"top",left:"right"},G1=G({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}=Se(),r=z1(),n=N(()=>W1[r.placedSide.value]);return(s,i)=>(I(),we("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})},[D(B0,ue(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:A(()=>[Z(s.$slots,"default")]),_:3},16,["as","as-child","rounded","width","height"])],4))}});function ah(e){const t=Oo({nonce:B()});return N(()=>e?.value||t.nonce?.value)}var J1=G({__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 Se(),(r,n)=>(I(),q(f(De),ue(t,{onMousedown:n[0]||(n[0]=s=>{!s.defaultPrevented&&s.detail>1&&s.preventDefault()})}),{default:A(()=>[Z(r.$slots,"default")]),_:3},16))}}),[sr,Y1]=vt("ScrollAreaRoot"),Z1=G({__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=B(0),s=B(0),i=B(),o=B(),a=B(),l=B(),c=B(!1),u=B(!1),{type:d,dir:p,scrollHideDelay:h}=ft(r),g=bi(p);function w(){i.value?.scrollTo({top:0})}function C(){i.value?.scrollTo({top:0,left:0})}t({viewport:i,scrollTop:w,scrollTopLeft:C});const{forwardRef:v,currentElement:x}=Se();return Y1({type:d,dir:g,scrollHideDelay:h,scrollArea:x,viewport:i,onViewportChange:y=>{i.value=y||void 0},content:o,onContentChange:y=>{o.value=y},scrollbarX:a,scrollbarXEnabled:c,scrollbarY:l,scrollbarYEnabled:u,onScrollbarXChange:y=>{a.value=y||void 0},onScrollbarYChange:y=>{l.value=y||void 0},onScrollbarXEnabledChange:y=>{c.value=y},onScrollbarYEnabledChange:y=>{u.value=y},onCornerWidthChange:y=>{n.value=y},onCornerHeightChange:y=>{s.value=y}}),(y,b)=>(I(),q(f(De),{ref:f(v),"as-child":r.asChild,as:y.as,dir:f(g),style:mt({position:"relative","--reka-scroll-area-corner-width":`${n.value}px`,"--reka-scroll-area-corner-height":`${s.value}px`})},{default:A(()=>[Z(y.$slots,"default")]),_:3},8,["as-child","as","dir","style"]))}}),X1=G({__name:"ScrollAreaCornerImpl",setup(e){const t=sr(),r=B(0),n=B(0),s=N(()=>!!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 Ln(t.scrollbarX.value,i),Ln(t.scrollbarY.value,o),Ie(()=>t.scrollbarX.value,i),Ie(()=>t.scrollbarY.value,o),(a,l)=>s.value?(I(),q(f(De),ue({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:A(()=>[Z(a.$slots,"default")]),_:3},16,["style"])):Ee("v-if",!0)}}),Q1=G({__name:"ScrollAreaCorner",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:r}=Se(),n=sr(),s=N(()=>!!n.scrollbarX.value&&!!n.scrollbarY.value),i=N(()=>n.type.value!=="scroll"&&s.value);return(o,a)=>i.value?(I(),q(X1,ue({key:0},t,{ref:f(r)}),{default:A(()=>[Z(o.$slots,"default")]),_:3},16)):Ee("v-if",!0)}});function lh(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 Yo(e){const t=ch(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function ch(e,t){const r=e/t;return Number.isNaN(r)?0:r}function eS(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 uh(e,t,r="ltr"){const n=Yo(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],c=yi(e,l[0],l[1]);return lh([0,o],[0,a])(c)}function Zo(e){return e?Number.parseInt(e,10):0}function tS(e,t,r,n="ltr"){const s=Yo(r),i=s/2,o=t||i,a=s-o,l=r.scrollbar.paddingStart+o,c=r.scrollbar.size-r.scrollbar.paddingEnd-a,u=r.content-r.viewport,d=n==="ltr"?[0,u]:[u*-1,0];return lh([l,c],d)(e)}function dh(e,t){return e>0&&e<t}var rS=G({__name:"ScrollAreaScrollbarX",setup(e){const t=sr(),r=Qo(),{forwardRef:n,currentElement:s}=Se();Ue(()=>{s.value&&t.onScrollbarXChange(s.value)});const i=N(()=>r.sizes.value);return(o,a)=>(I(),q(ph,{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(Yo)(i.value)}px`:void 0}),onOnDragScroll:a[0]||(a[0]=l=>f(r).onDragScroll(l.x))},{default:A(()=>[Z(o.$slots,"default")]),_:3},8,["style"]))}}),nS=G({__name:"ScrollAreaScrollbarY",setup(e){const t=sr(),r=Qo(),{forwardRef:n,currentElement:s}=Se();Ue(()=>{s.value&&t.onScrollbarYChange(s.value)});const i=N(()=>r.sizes.value);return(o,a)=>(I(),q(ph,{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(Yo)(i.value)}px`:void 0}),onOnDragScroll:a[0]||(a[0]=l=>f(r).onDragScroll(l.y))},{default:A(()=>[Z(o.$slots,"default")]),_:3},8,["style"]))}}),fh=G({__name:"ScrollAreaScrollbarAuto",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=sr(),r=Xo(),{forwardRef:n}=Se(),s=B(!1),i=hp(()=>{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 Ue(()=>i()),Ln(t.viewport,i),Ln(t.content,i),(o,a)=>(I(),q(f(jn),{present:o.forceMount||s.value},{default:A(()=>[D(cc,ue(o.$attrs,{ref:f(n),"data-state":s.value?"visible":"hidden"}),{default:A(()=>[Z(o.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),sS=G({inheritAttrs:!1,__name:"ScrollAreaScrollbarHover",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=sr(),{forwardRef:r}=Se();let n;const s=B(!1);function i(){window.clearTimeout(n),s.value=!0}function o(){n=window.setTimeout(()=>{s.value=!1},t.scrollHideDelay.value)}return Ue(()=>{const a=t.scrollArea.value;a&&(a.addEventListener("pointerenter",i),a.addEventListener("pointerleave",o))}),Rt(()=>{const a=t.scrollArea.value;a&&(window.clearTimeout(n),a.removeEventListener("pointerenter",i),a.removeEventListener("pointerleave",o))}),(a,l)=>(I(),q(f(jn),{present:a.forceMount||s.value},{default:A(()=>[D(fh,ue(a.$attrs,{ref:f(r),"data-state":s.value?"visible":"hidden"}),{default:A(()=>[Z(a.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),iS=G({__name:"ScrollAreaScrollbarScroll",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=sr(),r=Xo(),{forwardRef:n}=Se(),{state:s,dispatch:i}=Cp("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=N(()=>s.value!=="hidden");rt(l=>{if(s.value==="idle"){const c=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);l(()=>{window.clearTimeout(c)})}});const a=hp(()=>i("SCROLL_END"),100);return rt(l=>{const c=t.viewport.value,u=r.isHorizontal.value?"scrollLeft":"scrollTop";if(c){let d=c[u];const p=()=>{const h=c[u];d!==h&&(i("SCROLL"),a()),d=h};c.addEventListener("scroll",p),l(()=>{c.removeEventListener("scroll",p)})}}),(l,c)=>(I(),q(f(jn),{present:l.forceMount||o.value},{default:A(()=>[D(cc,ue(l.$attrs,{ref:f(n),"data-state":o.value?"visible":"hidden"}),{default:A(()=>[Z(l.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),[Xo,oS]=vt("ScrollAreaScrollbar"),aS=G({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}=Se(),n=sr(),s=N(()=>t.orientation==="horizontal");Ie(s,()=>{s.value?n.onScrollbarXEnabledChange(!0):n.onScrollbarYEnabledChange(!0)},{immediate:!0}),Rt(()=>{n.onScrollbarXEnabledChange(!1),n.onScrollbarYEnabledChange(!1)});const{orientation:i,forceMount:o,asChild:a,as:l}=ft(t);return oS({orientation:i,forceMount:o,isHorizontal:s,as:l,asChild:a}),(c,u)=>f(n).type.value==="hover"?(I(),q(sS,ue({key:0},c.$attrs,{ref:f(r),"force-mount":f(o)}),{default:A(()=>[Z(c.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="scroll"?(I(),q(iS,ue({key:1},c.$attrs,{ref:f(r),"force-mount":f(o)}),{default:A(()=>[Z(c.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="auto"?(I(),q(fh,ue({key:2},c.$attrs,{ref:f(r),"force-mount":f(o)}),{default:A(()=>[Z(c.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="always"?(I(),q(cc,ue({key:3},c.$attrs,{ref:f(r),"data-state":"visible"}),{default:A(()=>[Z(c.$slots,"default")]),_:3},16)):Ee("v-if",!0)}}),[Qo,lS]=vt("ScrollAreaScrollbarVisible"),cc=G({__name:"ScrollAreaScrollbarVisible",setup(e){const t=sr(),r=Xo(),{forwardRef:n}=Se(),s=B({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),i=N(()=>{const v=ch(s.value.viewport,s.value.content);return v>0&&v<1}),o=B(),a=B(0);function l(v,x){if(h.value){const y=t.viewport.value.scrollLeft+v.deltaY;t.viewport.value.scrollLeft=y,dh(y,x)&&v.preventDefault()}else{const y=t.viewport.value.scrollTop+v.deltaY;t.viewport.value.scrollTop=y,dh(y,x)&&v.preventDefault()}}function c(v,x){h.value?a.value=x.x:a.value=x.y}function u(v){a.value=0}function d(v){s.value=v}function p(v,x){return tS(v,a.value,s.value,x)}const h=N(()=>r.isHorizontal.value);function g(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,x=uh(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=uh(v,s.value);o.value.style.transform=`translate3d(0, ${x}px, 0)`}}function C(v){o.value=v}return lS({sizes:s,hasThumb:i,handleWheelScroll:l,handleThumbDown:c,handleThumbUp:u,handleSizeChange:d,onThumbPositionChange:w,onThumbChange:C,onDragScroll:g}),(v,x)=>h.value?(I(),q(rS,ue({key:0},v.$attrs,{ref:f(n)}),{default:A(()=>[Z(v.$slots,"default")]),_:3},16)):(I(),q(nS,ue({key:1},v.$attrs,{ref:f(n)}),{default:A(()=>[Z(v.$slots,"default")]),_:3},16))}}),ph=G({__name:"ScrollAreaScrollbarImpl",props:{isHorizontal:{type:Boolean,required:!0}},emits:["onDragScroll","onWheelScroll","onThumbPointerDown"],setup(e,{emit:t}){const r=e,n=t,s=sr(),i=Qo(),o=Xo(),{forwardRef:a,currentElement:l}=Se(),c=B(""),u=B();function d(v){u.value&&n("onDragScroll",{x:v.clientX-u.value?.left,y:v.clientY-u.value?.top})}function p(v){v.button===0&&(v.target.setPointerCapture(v.pointerId),u.value=l.value.getBoundingClientRect(),c.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 g(v){const x=v.target;x.hasPointerCapture(v.pointerId)&&x.releasePointerCapture(v.pointerId),document.body.style.webkitUserSelect=c.value,s.viewport&&(s.viewport.value.style.scrollBehavior=""),u.value=void 0}function w(v){const x=v.target,y=l.value?.contains(x),b=i.sizes.value.content-i.sizes.value.viewport;y&&i.handleWheelScroll(v,b)}Ue(()=>{document.addEventListener("wheel",w,{passive:!1})}),Rt(()=>{document.removeEventListener("wheel",w)});function C(){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:Zo(getComputedStyle(l.value).paddingLeft),paddingEnd:Zo(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:Zo(getComputedStyle(l.value).paddingTop),paddingEnd:Zo(getComputedStyle(l.value).paddingBottom)}}),i.onThumbPositionChange())}return Ln(l,C),Ln(s.content,C),(v,x)=>(I(),q(f(De),{ref:f(a),style:{position:"absolute"},"data-scrollbarimpl":"",as:f(o).as.value,"as-child":f(o).asChild.value,onPointerdown:p,onPointermove:h,onPointerup:g},{default:A(()=>[Z(v.$slots,"default")]),_:3},8,["as","as-child"]))}}),cS=G({__name:"ScrollAreaThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=sr(),n=Qo();function s(d){const p=d.target.getBoundingClientRect(),h=d.clientX-p.left,g=d.clientY-p.top;n.handleThumbDown(d,{x:h,y:g})}function i(d){n.handleThumbUp(d)}const{forwardRef:o,currentElement:a}=Se(),l=B(),c=N(()=>r.viewport.value);function u(){l.value||(l.value=eS(c.value,n.onThumbPositionChange),n.onThumbPositionChange())}return Ab(N(()=>n.sizes.value),()=>{n.onThumbChange(a.value),c.value&&(n.onThumbPositionChange(),c.value.addEventListener("scroll",u))}),Rt(()=>{c.value.removeEventListener("scroll",u),r.viewport.value?.removeEventListener("scroll",u)}),(d,p)=>(I(),q(f(De),{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:A(()=>[Z(d.$slots,"default")]),_:3},8,["data-state","as-child","as"]))}}),uS=G({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}=ft(r),s=ah(n),i=sr(),o=B();Ue(()=>{i.onViewportChange(o.value),i.onContentChange(l.value)}),t({viewportElement:o});const{forwardRef:a,currentElement:l}=Se();return(c,u)=>(I(),we(Oe,null,[ne("div",ue({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"}},c.$attrs,{tabindex:0}),[D(f(De),{ref:f(a),style:mt({minWidth:f(i).scrollbarXEnabled.value?"fit-content":void 0}),"as-child":r.asChild,as:c.as},{default:A(()=>[Z(c.$slots,"default")]),_:3},8,["style","as-child","as"])],16),D(f(De),{as:"style",nonce:f(s)},{default:A(()=>u[0]||(u[0]=[$e(" /* 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))}}),dS=[" ","Enter","ArrowUp","ArrowDown"],fS=[" ","Enter"],tE=10;function xi(e,t,r){return e===void 0?!1:Array.isArray(e)?e.some(n=>uc(n,t,r)):uc(e,t,r)}function uc(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]:wi(e,t)}function pS(e){return e==null||e===""||Array.isArray(e)&&e.length===0}var hS={key:0,value:""},[xn,hh]=vt("SelectRoot"),gS=G({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}=ft(r),l=yn(r,"modelValue",n,{defaultValue:r.defaultValue??(o.value?[]:void 0),passive:r.modelValue===void 0,deep:!0}),c=yn(r,"open",n,{defaultValue:r.defaultOpen,passive:r.open===void 0}),u=B(),d=B(),p=B({x:0,y:0}),h=N(()=>o.value&&Array.isArray(l.value)?l.value?.length===0:Pl(l.value));hr({isProvider:!0});const g=bi(a),w=No(u),C=B(new Set),v=N(()=>Array.from(C.value).map(b=>b.value).join(";"));function x(b){if(o.value){const _=Array.isArray(l.value)?[...l.value]:[],$=_.findIndex(R=>uc(R,b,r.by));$===-1?_.push(b):_.splice($,1),l.value=[..._]}else l.value=b}function y(b){return Array.from(C.value).find(_=>xi(b,_.value,r.by))}return hh({triggerElement:u,onTriggerChange:b=>{u.value=b},valueElement:d,onValueElementChange:b=>{d.value=b},contentId:"",modelValue:l,onValueChange:x,by:r.by,open:c,multiple:o,required:s,onOpenChange:b=>{c.value=b},dir:g,triggerPointerDownPosRef:p,disabled:i,isEmptyModelValue:h,optionsSet:C,onOptionAdd:b=>{const _=y(b.value);_&&C.value.delete(_),C.value.add(b)},onOptionRemove:b=>{const _=y(b.value);_&&C.value.delete(_)}}),(b,_)=>(I(),q(f(qp),null,{default:A(()=>[Z(b.$slots,"default",{modelValue:f(l),open:f(c)}),f(w)?(I(),q(vS,{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:A(()=>[f(Pl)(f(l))?(I(),we("option",hS)):Ee("v-if",!0),(I(!0),we(Oe,null,Xt(Array.from(C.value),$=>(I(),we("option",ue({key:$.value??""},{ref_for:!0},$),null,16))),128))]),_:1},8,["multiple","required","name","autocomplete","disabled","value"])):Ee("v-if",!0)]),_:3}))}}),vS=G({__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=B(),n=xn();Ie(()=>t.value,(i,o)=>{const a=window.HTMLSelectElement.prototype,l=Object.getOwnPropertyDescriptor(a,"value").set;if(i!==o&&l&&r.value){const c=new Event("change",{bubbles:!0});l.call(r.value,i),r.value.dispatchEvent(c)}});function s(i){n.onValueChange(i.target.value)}return(i,o)=>(I(),q(f(Gl),{"as-child":""},{default:A(()=>[ne("select",ue({ref_key:"selectElement",ref:r},t,{onInput:s}),[Z(i.$slots,"default")],16)]),_:3}))}}),mS=G({__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},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=Er(e);return(r,n)=>(I(),q(f(oh),ue(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:A(()=>[Z(r.$slots,"default")]),_:3},16))}}),wS={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[Kn,gh]=vt("SelectContent"),yS=G({__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},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}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=t,s=xn();Hb(),vp(r.bodyLock);const{CollectionSlot:i,getItems:o}=hr(),a=B();bp(a);const{search:l,handleTypeaheadSearch:c}=_p(),u=B(),d=B(),p=B(),h=B(!1),g=B(!1),w=B(!1);function C(){d.value&&a.value&&$p([d.value,a.value])}Ie(h,()=>{C()});const{onOpenChange:v,triggerPointerDownPosRef:x}=s;rt(_=>{if(!a.value)return;let $={x:0,y:0};const R=P=>{$={x:Math.abs(Math.round(P.pageX)-(x.value?.x??0)),y:Math.abs(Math.round(P.pageY)-(x.value?.y??0))}},m=P=>{P.pointerType!=="touch"&&($.x<=10&&$.y<=10?P.preventDefault():a.value?.contains(P.target)||v(!1),document.removeEventListener("pointermove",R),x.value=null)};x.value!==null&&(document.addEventListener("pointermove",R),document.addEventListener("pointerup",m,{capture:!0,once:!0})),_(()=>{document.removeEventListener("pointermove",R),document.removeEventListener("pointerup",m,{capture:!0})})});function y(_){const $=_.ctrlKey||_.altKey||_.metaKey;if(_.key==="Tab"&&_.preventDefault(),!$&&_.key.length===1&&c(_.key,o()),["ArrowUp","ArrowDown","Home","End"].includes(_.key)){let R=[...o().map(m=>m.ref)];if(["ArrowUp","End"].includes(_.key)&&(R=R.slice().reverse()),["ArrowUp","ArrowDown"].includes(_.key)){const m=_.target,P=R.indexOf(m);R=R.slice(P+1)}setTimeout(()=>$p(R)),_.preventDefault()}}const b=Er(N(()=>r.position==="popper"?r:{}).value);return gh({content:a,viewport:u,onViewportChange:_=>{u.value=_},itemRefCallback:(_,$,R)=>{const m=!g.value&&!R,P=xi(s.modelValue.value,$,s.by);if(s.multiple.value){if(w.value)return;(P||m)&&(d.value=_,P&&(w.value=!0))}else(P||m)&&(d.value=_);m&&(g.value=!0)},selectedItem:d,selectedItemText:p,onItemLeave:()=>{a.value?.focus()},itemTextRefCallback:(_,$,R)=>{const m=!g.value&&!R;(xi(s.modelValue.value,$,s.by)||m)&&(p.value=_)},focusSelectedItem:C,position:r.position,isPositioned:h,searchRef:l}),(_,$)=>(I(),q(f(i),null,{default:A(()=>[D(f(Ip),{"as-child":"",onMountAutoFocus:$[6]||($[6]=Cr(()=>{},["prevent"])),onUnmountAutoFocus:$[7]||($[7]=R=>{n("closeAutoFocus",R),!R.defaultPrevented&&(f(s).triggerElement.value?.focus({preventScroll:!0}),R.preventDefault())})},{default:A(()=>[D(f(Ul),{"as-child":"","disable-outside-pointer-events":"",onFocusOutside:$[2]||($[2]=Cr(()=>{},["prevent"])),onDismiss:$[3]||($[3]=R=>f(s).onOpenChange(!1)),onEscapeKeyDown:$[4]||($[4]=R=>n("escapeKeyDown",R)),onPointerDownOutside:$[5]||($[5]=R=>n("pointerDownOutside",R))},{default:A(()=>[(I(),q(Rn(_.position==="popper"?mS:SS),ue({..._.$attrs,...f(b)},{id:f(s).contentId,ref:R=>{const m=f(Tr)(R);m?.hasAttribute("data-reka-popper-content-wrapper")?a.value=m.firstElementChild:a.value=m},role:"listbox","data-state":f(s).open.value?"open":"closed",dir:f(s).dir.value,style:{display:"flex",flexDirection:"column",outline:"none"},onContextmenu:$[0]||($[0]=Cr(()=>{},["prevent"])),onPlaced:$[1]||($[1]=R=>h.value=!0),onKeydown:y}),{default:A(()=>[Z(_.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3})]),_:3})]),_:3}))}}),[dc,bS]=vt("SelectItemAlignedPosition"),SS=G({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}=hr(),i=xn(),o=Kn(),a=B(!1),l=B(!0),c=B(),{forwardRef:u,currentElement:d}=Se(),{viewport:p,selectedItem:h,selectedItemText:g,focusSelectedItem:w}=o;function C(){if(i.triggerElement.value&&i.valueElement.value&&c.value&&d.value&&p?.value&&h?.value&&g?.value){const y=i.triggerElement.value.getBoundingClientRect(),b=d.value.getBoundingClientRect(),_=i.valueElement.value.getBoundingClientRect(),$=g.value.getBoundingClientRect();if(i.dir.value!=="rtl"){const ie=$.left-b.left,L=_.left-ie,Y=y.left-L,Fe=y.width+Y,Ne=Math.max(Fe,b.width),lt=window.innerWidth-10,st=yi(L,10,Math.max(10,lt-Ne));c.value.style.minWidth=`${Fe}px`,c.value.style.left=`${st}px`}else{const ie=b.right-$.right,L=window.innerWidth-_.right-ie,Y=window.innerWidth-y.right-L,Fe=y.width+Y,Ne=Math.max(Fe,b.width),lt=window.innerWidth-10,st=yi(L,10,Math.max(10,lt-Ne));c.value.style.minWidth=`${Fe}px`,c.value.style.right=`${st}px`}const R=s().map(ie=>ie.ref),m=window.innerHeight-20,P=p.value.scrollHeight,O=window.getComputedStyle(d.value),S=Number.parseInt(O.borderTopWidth,10),T=Number.parseInt(O.paddingTop,10),E=Number.parseInt(O.borderBottomWidth,10),M=Number.parseInt(O.paddingBottom,10),j=S+T+P+M+E,z=Math.min(h.value.offsetHeight*5,j),J=window.getComputedStyle(p.value),U=Number.parseInt(J.paddingTop,10),Te=Number.parseInt(J.paddingBottom,10),be=y.top+y.height/2-10,K=m-be,te=h.value.offsetHeight/2,re=h.value.offsetTop+te,le=S+T+re,pe=j-le;if(le<=be){const ie=h.value===R[R.length-1];c.value.style.bottom="0px";const L=d.value.clientHeight-p.value.offsetTop-p.value.offsetHeight,Y=le+Math.max(K,te+(ie?Te:0)+L+E);c.value.style.height=`${Y}px`}else{const ie=h.value===R[0];c.value.style.top="0px";const L=Math.max(be,S+p.value.offsetTop+(ie?U:0)+te)+pe;c.value.style.height=`${L}px`,p.value.scrollTop=le-be+p.value.offsetTop}c.value.style.margin="10px 0",c.value.style.minHeight=`${z}px`,c.value.style.maxHeight=`${m}px`,n("placed"),requestAnimationFrame(()=>a.value=!0)}}const v=B("");Ue(async()=>{await ot(),C(),d.value&&(v.value=window.getComputedStyle(d.value).zIndex)});function x(y){y&&l.value===!0&&(C(),w?.(),l.value=!1)}return Ln(i.triggerElement,()=>{C()}),bS({contentWrapper:c,shouldExpandOnScrollRef:a,onScrollButtonChange:x}),(y,b)=>(I(),we("div",{ref_key:"contentWrapperElement",ref:c,style:mt({display:"flex",flexDirection:"column",position:"fixed",zIndex:v.value})},[D(f(De),ue({ref:f(u),style:{boxSizing:"border-box",maxHeight:"100%"}},{...y.$attrs,...r}),{default:A(()=>[Z(y.$slots,"default")]),_:3},16)],4))}}),CS=G({inheritAttrs:!1,__name:"SelectProvider",props:{context:{type:Object,required:!0}},setup(e){return hh(e.context),gh(wS),(t,r)=>Z(t.$slots,"default")}}),_S={key:1},xS=G({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},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}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=Ar(r,t),s=xn(),i=B();Ue(()=>{i.value=new DocumentFragment});const o=B(),a=N(()=>r.forceMount||s.open.value),l=B(a.value);return Ie(a,()=>{setTimeout(()=>l.value=a.value)}),(c,u)=>a.value||l.value||o.value?.present?(I(),q(f(jn),{key:0,ref_key:"presenceRef",ref:o,present:a.value},{default:A(()=>[D(yS,Ht(Dt({...f(n),...c.$attrs})),{default:A(()=>[Z(c.$slots,"default")]),_:3},16)]),_:3},8,["present"])):i.value?(I(),we("div",_S,[(I(),q(Aa,{to:i.value},[D(CS,{context:f(s)},{default:A(()=>[Z(c.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):Ee("v-if",!0)}}),[rE,TS]=vt("SelectGroup"),ES=G({__name:"SelectGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=Vn(void 0,"reka-select-group");return TS({id:r}),(n,s)=>(I(),q(f(De),ue({role:"group"},t,{"aria-labelledby":f(r)}),{default:A(()=>[Z(n.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),AS=G({__name:"SelectIcon",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){return(t,r)=>(I(),q(f(De),{"aria-hidden":"true",as:t.as,"as-child":t.asChild},{default:A(()=>[Z(t.$slots,"default",{},()=>[r[0]||(r[0]=$e("▼"))])]),_:3},8,["as","as-child"]))}}),[vh,kS]=vt("SelectItem"),IS=G({__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}=ft(r),i=xn(),o=Kn(),{forwardRef:a,currentElement:l}=Se(),{CollectionItem:c}=hr(),u=N(()=>xi(i.modelValue?.value,r.value,i.by)),d=B(!1),p=B(r.textValue??""),h=Vn(void 0,"reka-select-item-text"),g="select.select";async function w(b){b.defaultPrevented||Dl(g,C,{originalEvent:b,value:r.value})}async function C(b){await ot(),n("select",b),!b.defaultPrevented&&(s.value||(i.onValueChange(r.value),i.multiple.value||i.onOpenChange(!1)))}async function v(b){await ot(),!b.defaultPrevented&&(s.value?o.onItemLeave?.():b.currentTarget?.focus({preventScroll:!0}))}async function x(b){await ot(),!b.defaultPrevented&&b.currentTarget===Pt()&&o.onItemLeave?.()}async function y(b){await ot(),!b.defaultPrevented&&(o.searchRef?.value!==""&&b.key===" "||(fS.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 Ue(()=>{l.value&&o.itemRefCallback(l.value,r.value,r.disabled)}),kS({value:r.value,disabled:s,textId:h,isSelected:u,onItemTextChange:b=>{p.value=((p.value||b?.textContent)??"").trim()}}),(b,_)=>(I(),q(f(c),{value:{textValue:p.value}},{default:A(()=>[D(f(De),{ref:f(a),role:"option","aria-labelledby":f(h),"data-highlighted":d.value?"":void 0,"aria-selected":u.value,"data-state":u.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:_[0]||(_[0]=$=>d.value=!0),onBlur:_[1]||(_[1]=$=>d.value=!1),onPointerup:w,onPointerdown:_[2]||(_[2]=$=>{$.currentTarget.focus({preventScroll:!0})}),onTouchend:_[3]||(_[3]=Cr(()=>{},["prevent","stop"])),onPointermove:v,onPointerleave:x,onKeydown:y},{default:A(()=>[Z(b.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"])]),_:3},8,["value"]))}}),RS=G({__name:"SelectItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,r=vh();return(n,s)=>f(r).isSelected.value?(I(),q(f(De),ue({key:0,"aria-hidden":"true"},t),{default:A(()=>[Z(n.$slots,"default")]),_:3},16)):Ee("v-if",!0)}}),$S=G({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,r=xn(),n=Kn(),s=vh(),{forwardRef:i,currentElement:o}=Se(),a=N(()=>({value:s.value,disabled:s.disabled.value,textContent:o.value?.textContent??s.value?.toString()??""}));return Ue(()=>{o.value&&(s.onItemTextChange(o.value),n.itemTextRefCallback(o.value,s.value,s.disabled.value),r.onOptionAdd(a.value))}),Rt(()=>{r.onOptionRemove(a.value)}),(l,c)=>(I(),q(f(De),ue({id:f(s).textId,ref:f(i)},{...t,...l.$attrs}),{default:A(()=>[Z(l.$slots,"default")]),_:3},16,["id"]))}}),DS=G({__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)=>(I(),q(f(Wl),Ht(Dt(t)),{default:A(()=>[Z(r.$slots,"default")]),_:3},16))}}),mh=G({__name:"SelectScrollButtonImpl",emits:["autoScroll"],setup(e,{emit:t}){const r=t,{getItems:n}=hr(),s=Kn(),i=B(null);function o(){i.value!==null&&(window.clearInterval(i.value),i.value=null)}rt(()=>{n().map(c=>c.ref).find(c=>c===Pt())?.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()),(c,u)=>(I(),q(f(De),ue({"aria-hidden":"true",style:{flexShrink:0}},c.$parent?.$props,{onPointerdown:a,onPointermove:l,onPointerleave:u[0]||(u[0]=()=>{o()})}),{default:A(()=>[Z(c.$slots,"default")]),_:3},16))}}),PS=G({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=Kn(),r=t.position==="item-aligned"?dc():void 0,{forwardRef:n,currentElement:s}=Se(),i=B(!1);return rt(o=>{if(t.viewport?.value&&t.isPositioned?.value){let c=function(){const u=l.scrollHeight-l.clientHeight;i.value=Math.ceil(l.scrollTop)<u};var a=c;const l=t.viewport.value;c(),l.addEventListener("scroll",c),o(()=>l.removeEventListener("scroll",c))}}),Ie(s,()=>{s.value&&r?.onScrollButtonChange(s.value)}),(o,a)=>i.value?(I(),q(mh,{key:0,ref:f(n),onAutoScroll:a[0]||(a[0]=()=>{const{viewport:l,selectedItem:c}=f(t);l?.value&&c?.value&&(l.value.scrollTop=l.value.scrollTop+c.value.offsetHeight)})},{default:A(()=>[Z(o.$slots,"default")]),_:3},512)):Ee("v-if",!0)}}),OS=G({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=Kn(),r=t.position==="item-aligned"?dc():void 0,{forwardRef:n,currentElement:s}=Se(),i=B(!1);return rt(o=>{if(t.viewport?.value&&t.isPositioned?.value){let c=function(){i.value=l.scrollTop>0};var a=c;const l=t.viewport.value;c(),l.addEventListener("scroll",c),o(()=>l.removeEventListener("scroll",c))}}),Ie(s,()=>{s.value&&r?.onScrollButtonChange(s.value)}),(o,a)=>i.value?(I(),q(mh,{key:0,ref:f(n),onAutoScroll:a[0]||(a[0]=()=>{const{viewport:l,selectedItem:c}=f(t);l?.value&&c?.value&&(l.value.scrollTop=l.value.scrollTop-c.value.offsetHeight)})},{default:A(()=>[Z(o.$slots,"default")]),_:3},512)):Ee("v-if",!0)}}),HS=G({__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=xn(),{forwardRef:n,currentElement:s}=Se(),i=N(()=>r.disabled?.value||t.disabled);r.contentId||(r.contentId=Vn(void 0,"reka-select-content")),Ue(()=>{r.onTriggerChange(s.value)});const{getItems:o}=hr(),{search:a,handleTypeaheadSearch:l,resetTypeahead:c}=_p();function u(){i.value||(r.onOpenChange(!0),c())}function d(p){u(),r.triggerPointerDownPosRef.value={x:Math.round(p.pageX),y:Math.round(p.pageY)}}return(p,h)=>(I(),q(f(Np),{"as-child":"",reference:p.reference},{default:A(()=>[D(f(De),{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(pS)(f(r).modelValue?.value)?"":void 0,"as-child":p.asChild,as:p.as,onClick:h[0]||(h[0]=g=>{g?.currentTarget?.focus()}),onPointerdown:h[1]||(h[1]=g=>{if(g.pointerType==="touch")return g.preventDefault();const w=g.target;w.hasPointerCapture(g.pointerId)&&w.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&(d(g),g.preventDefault())}),onPointerup:h[2]||(h[2]=Cr(g=>{g.pointerType==="touch"&&d(g)},["prevent"])),onKeydown:h[3]||(h[3]=g=>{const w=f(a)!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&w&&g.key===" "||(f(l)(g.key,f(o)()),f(dS).includes(g.key)&&(u(),g.preventDefault()))})},{default:A(()=>[Z(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"]))}}),MS=G({__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}=Se(),s=xn();Ue(()=>{s.valueElement=n});const i=N(()=>{let a=[];const l=Array.from(s.optionsSet.value),c=u=>l.find(d=>xi(u,d.value,s.by));return Array.isArray(s.modelValue.value)?a=s.modelValue.value.map(u=>c(u)?.textContent??""):a=[c(s.modelValue.value)?.textContent??""],a.filter(Boolean)}),o=N(()=>i.value.length?i.value.join(", "):t.placeholder);return(a,l)=>(I(),q(f(De),{ref:f(r),as:a.as,"as-child":a.asChild,style:{pointerEvents:"none"},"data-placeholder":i.value.length?void 0:t.placeholder},{default:A(()=>[Z(a.$slots,"default",{selectedLabel:i.value,modelValue:f(s).modelValue.value},()=>[$e(Re(o.value),1)])]),_:3},8,["as","as-child","data-placeholder"]))}}),qS=G({__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}=ft(t),n=ah(r),s=Kn(),i=s.position==="item-aligned"?dc():void 0,{forwardRef:o,currentElement:a}=Se();Ue(()=>{s?.onViewportChange(a.value)});const l=B(0);function c(u){const d=u.currentTarget,{shouldExpandOnScrollRef:p,contentWrapper:h}=i??{};if(p?.value&&h?.value){const g=Math.abs(l.value-d.scrollTop);if(g>0){const w=window.innerHeight-20,C=Number.parseFloat(h.value.style.minHeight),v=Number.parseFloat(h.value.style.height),x=Math.max(C,v);if(x<w){const y=x+g,b=Math.min(w,y),_=y-b;h.value.style.height=`${b}px`,h.value.style.bottom==="0px"&&(d.scrollTop=_>0?_:0,h.value.style.justifyContent="flex-end")}}}l.value=d.scrollTop}return(u,d)=>(I(),we(Oe,null,[D(f(De),ue({ref:f(o),"data-reka-select-viewport":"",role:"presentation"},{...u.$attrs,...t},{style:{position:"relative",flex:1,overflow:"hidden auto"},onScroll:c}),{default:A(()=>[Z(u.$slots,"default")]),_:3},16),D(f(De),{as:"style",nonce:f(n)},{default:A(()=>d[0]||(d[0]=[$e(" /* 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))}}),NS=G({__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=N(()=>n(t.orientation)?t.orientation:"horizontal"),i=N(()=>s.value==="vertical"?t.orientation:void 0),o=N(()=>t.decorative?{role:"none"}:{"aria-orientation":i.value,role:"separator"});return(a,l)=>(I(),q(f(De),ue({as:a.as,"as-child":a.asChild,"data-orientation":s.value},o.value),{default:A(()=>[Z(a.$slots,"default")]),_:3},16,["as","as-child","data-orientation"]))}}),BS=G({__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)=>(I(),q(NS,Ht(Dt(t)),{default:A(()=>[Z(r.$slots,"default")]),_:3},16))}});function FS(e=[],t,r){const n=[...e];return n[r]=t,n.sort((s,i)=>s-i)}function wh(e,t,r){return yi(100/(r-t)*(e-t),0,100)}function LS(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function VS(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 jS(e,t,r){const n=e/2;return(n-fc([0,50],[0,n])(t)*r)*r}function US(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function zS(e,t){if(t>0){const r=US(e);return Math.min(...r)>=t}return!0}function fc(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 KS(e){return(String(e).split(".")[1]||"").length}function WS(e,t){const r=10**t;return Math.round(e*r)/r}var yh=["PageUp","PageDown"],bh=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Sh={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageUp","ArrowUp","ArrowLeft"]},[Ch,_h]=vt(["SliderVertical","SliderHorizontal"]),GS=G({__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}=ft(r),{forwardRef:l,currentElement:c}=Se(),u=Ds(),d=B(),p=B(),h=N(()=>o?.value!=="rtl"&&!a.value||o?.value!=="ltr"&&a.value);function g(w,C){const v=p.value||c.value.getBoundingClientRect(),x=[...u.thumbElements.value][u.valueIndexToChangeRef.value],y=u.thumbAlignment.value==="contain"?x.clientWidth:0;!d.value&&!C&&u.thumbAlignment.value==="contain"&&(d.value=w.clientX-x.getBoundingClientRect().left);const b=fc([0,v.width-y],h.value?[i.value,s.value]:[s.value,i.value]);return p.value=v,b(C?w.clientX-v.left-y/2:w.clientX-v.left-(d.value??0))}return _h({startEdge:N(()=>h.value?"left":"right"),endEdge:N(()=>h.value?"right":"left"),direction:N(()=>h.value?1:-1),size:"width"}),(w,C)=>(I(),q(xh,{ref:f(l),dir:f(o),"data-orientation":"horizontal",style:mt({"--reka-slider-thumb-transform":!h.value&&f(u).thumbAlignment.value==="overflow"?"translateX(50%)":"translateX(-50%)"}),onSlideStart:C[0]||(C[0]=v=>{n("slideStart",g(v,!0))}),onSlideMove:C[1]||(C[1]=v=>{n("slideMove",g(v))}),onSlideEnd:C[2]||(C[2]=()=>{p.value=void 0,d.value=void 0,n("slideEnd")}),onStepKeyDown:C[3]||(C[3]=v=>{const x=h.value?"from-left":"from-right";n("stepKeyDown",v,f(Sh)[x].includes(v.key)?-1:1)}),onEndKeyDown:C[4]||(C[4]=v=>n("endKeyDown",v)),onHomeKeyDown:C[5]||(C[5]=v=>n("homeKeyDown",v))},{default:A(()=>[Z(w.$slots,"default")]),_:3},8,["dir","style"]))}}),JS=G({__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}=ft(r),a=Ds(),{forwardRef:l,currentElement:c}=Se(),u=B(),d=B(),p=N(()=>!o.value);function h(g,w){const C=d.value||c.value.getBoundingClientRect(),v=[...a.thumbElements.value][a.valueIndexToChangeRef.value],x=a.thumbAlignment.value==="contain"?v.clientHeight:0;!u.value&&!w&&a.thumbAlignment.value==="contain"&&(u.value=g.clientY-v.getBoundingClientRect().top);const y=fc([0,C.height-x],p.value?[s.value,i.value]:[i.value,s.value]),b=w?g.clientY-C.top-x/2:g.clientY-C.top-(u.value??0);return d.value=C,y(b)}return _h({startEdge:N(()=>p.value?"bottom":"top"),endEdge:N(()=>p.value?"top":"bottom"),direction:N(()=>p.value?1:-1),size:"height"}),(g,w)=>(I(),q(xh,{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]=C=>{n("slideStart",h(C,!0))}),onSlideMove:w[1]||(w[1]=C=>{n("slideMove",h(C))}),onSlideEnd:w[2]||(w[2]=()=>{d.value=void 0,u.value=void 0,n("slideEnd")}),onStepKeyDown:w[3]||(w[3]=C=>{const v=p.value?"from-bottom":"from-top";n("stepKeyDown",C,f(Sh)[v].includes(C.key)?-1:1)}),onEndKeyDown:w[4]||(w[4]=C=>n("endKeyDown",C)),onHomeKeyDown:w[5]||(w[5]=C=>n("homeKeyDown",C))},{default:A(()=>[Z(g.$slots,"default")]),_:3},8,["style"]))}}),[Ds,YS]=vt("SliderRoot"),ZS=G({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:c,thumbAlignment:u,dir:d}=ft(r),p=bi(d),{forwardRef:h,currentElement:g}=Se(),w=No(g),{CollectionSlot:C}=hr({isProvider:!0}),v=yn(r,"modelValue",n,{defaultValue:r.defaultValue,passive:r.modelValue===void 0}),x=N(()=>Array.isArray(v.value)?[...v.value]:[]),y=B(0),b=B(x.value);function _(O){m(O,VS(x.value,O))}function $(O){m(O,y.value)}function R(){const O=b.value[y.value];x.value[y.value]!==O&&n("valueCommit",Me(x.value))}function m(O,S,{commit:T}={commit:!1}){const E=KS(o.value),M=yi(WS(Math.round((O-s.value)/o.value)*o.value+s.value,E),s.value,i.value),j=FS(x.value,M,S);if(zS(j,a.value*o.value)){y.value=j.indexOf(M);const z=String(j)!==String(v.value);z&&T&&n("valueCommit",j),z&&(P.value[y.value]?.focus(),v.value=j)}}const P=B([]);return YS({modelValue:v,currentModelValue:x,valueIndexToChangeRef:y,thumbElements:P,orientation:l,min:s,max:i,disabled:c,thumbAlignment:u}),(O,S)=>(I(),q(f(C),null,{default:A(()=>[(I(),q(Rn(f(l)==="horizontal"?GS:JS),ue(O.$attrs,{ref:f(h),"as-child":O.asChild,as:O.as,min:f(s),max:f(i),dir:f(p),inverted:O.inverted,"aria-disabled":f(c),"data-disabled":f(c)?"":void 0,onPointerdown:S[0]||(S[0]=()=>{f(c)||(b.value=x.value)}),onSlideStart:S[1]||(S[1]=T=>!f(c)&&_(T)),onSlideMove:S[2]||(S[2]=T=>!f(c)&&$(T)),onSlideEnd:S[3]||(S[3]=T=>!f(c)&&R()),onHomeKeyDown:S[4]||(S[4]=T=>!f(c)&&m(f(s),0,{commit:!0})),onEndKeyDown:S[5]||(S[5]=T=>!f(c)&&m(f(i),x.value.length-1,{commit:!0})),onStepKeyDown:S[6]||(S[6]=(T,E)=>{if(!f(c)){const M=f(yh).includes(T.key)||T.shiftKey&&f(bh).includes(T.key)?10:1,j=y.value,z=x.value[j];m(z+f(o)*M*E,j,{commit:!0})}})}),{default:A(()=>[Z(O.$slots,"default",{modelValue:f(v)}),f(w)&&O.name?(I(),q(f(Jl),{key:0,type:"number",value:f(v),name:O.name,required:O.required,disabled:f(c),step:f(o)},null,8,["value","name","required","disabled","step"])):Ee("v-if",!0)]),_:3},16,["as-child","as","min","max","dir","inverted","aria-disabled","data-disabled"]))]),_:3}))}}),xh=G({__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=Ds();return(i,o)=>(I(),q(f(De),ue({"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(yh).concat(f(bh)).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:A(()=>[Z(i.$slots,"default")]),_:3},16))}}),XS=G({__name:"SliderRange",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=Ds(),r=Ch();Se();const n=N(()=>t.currentModelValue.value.map(o=>wh(o,t.min.value,t.max.value))),s=N(()=>t.currentModelValue.value.length>1?Math.min(...n.value):0),i=N(()=>100-Math.max(...n.value,0));return(o,a)=>(I(),q(f(De),{"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:A(()=>[Z(o.$slots,"default")]),_:3},8,["data-disabled","data-orientation","as-child","as","style"]))}}),QS=G({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=Ds(),n=Ch(),{forwardRef:s,currentElement:i}=Se(),{CollectionItem:o}=hr(),a=N(()=>r.modelValue?.value?.[t.index]),l=N(()=>a.value===void 0?0:wh(a.value,r.min.value??0,r.max.value??100)),c=N(()=>LS(t.index,r.modelValue?.value?.length??0)),u=Sp(i),d=N(()=>u[n.size].value),p=N(()=>r.thumbAlignment.value==="overflow"||!d.value?0:jS(d.value,l.value,n.direction.value)),h=Ml();return Ue(()=>{r.thumbElements.value.push(i.value)}),Rt(()=>{const g=r.thumbElements.value.findIndex(w=>w===i.value)??-1;r.thumbElements.value.splice(g,1)}),(g,w)=>(I(),q(f(o),null,{default:A(()=>[D(f(De),ue(g.$attrs,{ref:f(s),role:"slider",tabindex:f(r).disabled.value?void 0:0,"aria-label":g.$attrs["aria-label"]||c.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":g.asChild,as:g.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=g.index})}),{default:A(()=>[Z(g.$slots,"default")]),_:3},16,["tabindex","aria-label","data-disabled","data-orientation","aria-valuenow","aria-valuemin","aria-valuemax","aria-orientation","as-child","as","style"])]),_:3}))}}),eC=G({__name:"SliderThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,{getItems:r}=hr(),{forwardRef:n,currentElement:s}=Se(),i=N(()=>s.value?r(!0).findIndex(o=>o.ref===s.value):-1);return(o,a)=>(I(),q(QS,ue({ref:f(n)},t,{index:i.value}),{default:A(()=>[Z(o.$slots,"default")]),_:3},16,["index"]))}}),tC=G({__name:"SliderTrack",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=Ds();return Se(),(r,n)=>(I(),q(f(De),{"as-child":r.asChild,as:r.as,"data-disabled":f(t).disabled.value?"":void 0,"data-orientation":f(t).orientation.value},{default:A(()=>[Z(r.$slots,"default")]),_:3},8,["as-child","as","data-disabled","data-orientation"]))}}),[Th,rC]=vt("ToggleGroupRoot"),nC=G({__name:"ToggleGroupRoot",props:{rovingFocus:{type:Boolean,required:!1,default:!0},disabled:{type:Boolean,required:!1,default:!1},orientation:{type:String,required:!1},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},type:{type:String,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=t,{loop:s,rovingFocus:i,disabled:o,dir:a}=ft(r),l=bi(a),{forwardRef:c,currentElement:u}=Se(),{modelValue:d,changeModelValue:p,isSingle:h}=t0(r,n),g=No(u);return rC({isSingle:h,modelValue:d,changeModelValue:p,dir:l,orientation:r.orientation,loop:s,rovingFocus:i,disabled:o}),(w,C)=>(I(),q(Rn(f(i)?f(O0):f(De)),{"as-child":"",orientation:f(i)?w.orientation:void 0,dir:f(l),loop:f(i)?f(s):void 0},{default:A(()=>[D(f(De),{ref:f(c),role:"group","as-child":w.asChild,as:w.as},{default:A(()=>[Z(w.$slots,"default",{modelValue:f(d)}),f(g)&&w.name?(I(),q(Jl,{key:0,name:w.name,required:w.required,value:f(d)},null,8,["name","required","value"])):Ee("v-if",!0)]),_:3},8,["as-child","as"])]),_:3},8,["orientation","dir","loop"]))}}),sC=G({__name:"Toggle",props:{defaultValue:{type:Boolean,required:!1},modelValue:{type:[Boolean,null],required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=t,{forwardRef:s,currentElement:i}=Se(),o=Th(null),a=yn(r,"modelValue",n,{defaultValue:r.defaultValue,passive:r.modelValue===void 0});function l(){a.value=!a.value}const c=N(()=>a.value?"on":"off"),u=No(i);return(d,p)=>(I(),q(f(De),{ref:f(s),type:d.as==="button"?"button":void 0,"as-child":r.asChild,as:d.as,"aria-pressed":f(a),"data-state":c.value,"data-disabled":d.disabled?"":void 0,disabled:d.disabled,onClick:l},{default:A(()=>[Z(d.$slots,"default",{modelValue:f(a),disabled:d.disabled,pressed:f(a),state:c.value}),f(u)&&d.name&&!f(o)?(I(),q(Jl,{key:0,type:"checkbox",name:d.name,value:f(a),required:d.required},null,8,["name","value","required"])):Ee("v-if",!0)]),_:3},8,["type","as-child","as","aria-pressed","data-state","data-disabled","disabled"]))}}),iC=G({__name:"ToggleGroupItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,r=Th(),n=N(()=>r.disabled?.value||t.disabled),s=N(()=>cp(r.modelValue.value,t.value)),{forwardRef:i}=Se();return(o,a)=>(I(),q(Rn(f(r).rovingFocus.value?f(H0):f(De)),ue({"as-child":""},f(r).rovingFocus.value?{focusable:!n.value,active:s.value}:{}),{default:A(()=>[D(f(sC),ue(t,{ref:f(i),disabled:n.value,"model-value":s.value,"onUpdate:modelValue":a[0]||(a[0]=l=>f(r).changeModelValue(o.value))}),{default:A(l=>[Z(o.$slots,"default",Ht(Dt(l)))]),_:3},16,["disabled","model-value"])]),_:3},16))}}),oC=G({__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 Se(),(r,n)=>(I(),q(f(G1),Ht(Dt(t)),{default:A(()=>[Z(r.$slots,"default")]),_:3},16))}}),[pc,aC]=vt("TooltipProvider"),lC=G({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}},setup(e){const{delayDuration:t,skipDelayDuration:r,disableHoverableContent:n,disableClosingTrigger:s,ignoreNonKeyboardFocus:i,disabled:o}=ft(e);Se();const a=B(!0),l=B(!1),{start:c,stop:u}=gp(()=>{a.value=!0},r,{immediate:!1});return aC({isOpenDelayed:a,delayDuration:t,onOpen(){u(),a.value=!1},onClose(){c()},isPointerInTransitRef:l,disableHoverableContent:n,disableClosingTrigger:s,disabled:o,ignoreNonKeyboardFocus:i}),(d,p)=>Z(d.$slots,"default")}}),Eh="tooltip.open",[ea,cC]=vt("TooltipRoot"),uC=G({__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;Se();const s=pc(),i=N(()=>r.disableHoverableContent??s.disableHoverableContent.value),o=N(()=>r.disableClosingTrigger??s.disableClosingTrigger.value),a=N(()=>r.disabled??s.disabled.value),l=N(()=>r.delayDuration??s.delayDuration.value),c=N(()=>r.ignoreNonKeyboardFocus??s.ignoreNonKeyboardFocus.value),u=yn(r,"open",n,{defaultValue:r.defaultOpen,passive:r.open===void 0});Ie(u,y=>{s.onClose&&(y?(s.onOpen(),document.dispatchEvent(new CustomEvent(Eh))):s.onClose())});const d=B(!1),p=B(),h=N(()=>u.value?d.value?"delayed-open":"instant-open":"closed"),{start:g,stop:w}=gp(()=>{d.value=!0,u.value=!0},l,{immediate:!1});function C(){w(),d.value=!1,u.value=!0}function v(){w(),u.value=!1}function x(){g()}return cC({contentId:"",open:u,stateAttribute:h,trigger:p,onTriggerChange(y){p.value=y},onTriggerEnter(){s.isOpenDelayed.value?x():C()},onTriggerLeave(){i.value?v():w()},onOpen:C,onClose:v,disableHoverableContent:i,disableClosingTrigger:o,disabled:a,ignoreNonKeyboardFocus:c}),(y,b)=>(I(),q(f(qp),null,{default:A(()=>[Z(y.$slots,"default",{open:f(u)})]),_:3}))}}),Ah=G({__name:"TooltipContentImpl",props:{ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},side:{type:null,required:!1,default:"top"},sideOffset:{type:Number,required:!1,default:0},align:{type:null,required:!1,default:"center"},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1,default:!0},collisionBoundary:{type:null,required:!1,default:()=>[]},collisionPadding:{type:[Number,Object],required:!1,default:0},arrowPadding:{type:Number,required:!1,default:0},sticky:{type:String,required:!1,default:"partial"},hideWhenDetached:{type:Boolean,required:!1,default:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=t,s=ea(),{forwardRef:i}=Se(),o=qu(),a=N(()=>o.default?.({})),l=N(()=>{if(r.ariaLabel)return r.ariaLabel;let u="";function d(p){typeof p.children=="string"&&p.type!==nt?u+=p.children:Array.isArray(p.children)&&p.children.forEach(h=>d(h))}return a.value?.forEach(p=>d(p)),u}),c=N(()=>{const{ariaLabel:u,...d}=r;return d});return Ue(()=>{Mo(window,"scroll",u=>{u.target?.contains(s.trigger.value)&&s.onClose()}),Mo(window,Eh,s.onClose)}),(u,d)=>(I(),q(f(Ul),{"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]=Cr(()=>{},["prevent"])),onDismiss:d[3]||(d[3]=p=>f(s).onClose())},{default:A(()=>[D(f(oh),ue({ref:f(i),"data-state":f(s).stateAttribute.value},{...u.$attrs,...c.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:A(()=>[Z(u.$slots,"default"),D(f(Gl),{id:f(s).contentId,role:"tooltip"},{default:A(()=>[$e(Re(l.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),dC=G({__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=Er(e),{forwardRef:r,currentElement:n}=Se(),{trigger:s,onClose:i}=ea(),o=pc(),{isPointerInTransit:a,onPointerExit:l}=Mb(s,n);return o.isPointerInTransitRef=a,l(()=>{i()}),(c,u)=>(I(),q(Ah,ue({ref:f(r)},f(t)),{default:A(()=>[Z(c.$slots,"default")]),_:3},16))}}),fC=G({__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,default:"top"},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=t,s=ea(),i=Ar(r,n),{forwardRef:o}=Se();return(a,l)=>(I(),q(f(jn),{present:a.forceMount||f(s).open.value},{default:A(()=>[(I(),q(Rn(f(s).disableHoverableContent.value?Ah:dC),ue({ref:f(o)},f(i)),{default:A(()=>[Z(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),pC=G({__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)=>(I(),q(f(Wl),Ht(Dt(t)),{default:A(()=>[Z(r.$slots,"default")]),_:3},16))}}),hC=G({__name:"TooltipTrigger",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,r=ea(),n=pc();r.contentId||(r.contentId=Vn(void 0,"reka-tooltip-content"));const{forwardRef:s,currentElement:i}=Se(),o=B(!1),a=B(!1),l=N(()=>r.disabled.value?{}:{click:w,focus:h,pointermove:d,pointerleave:p,pointerdown:u,blur:g});Ue(()=>{r.onTriggerChange(i.value)});function c(){setTimeout(()=>{o.value=!1},1)}function u(){r.open&&!r.disableClosingTrigger.value&&r.onClose(),o.value=!0,document.addEventListener("pointerup",c,{once:!0})}function d(C){C.pointerType!=="touch"&&!a.value&&!n.isPointerInTransitRef.value&&(r.onTriggerEnter(),a.value=!0)}function p(){r.onTriggerLeave(),a.value=!1}function h(C){o.value||r.ignoreNonKeyboardFocus.value&&!C.target.matches?.(":focus-visible")||r.onOpen()}function g(){r.onClose()}function w(){r.disableClosingTrigger.value||r.onClose()}return(C,v)=>(I(),q(f(Np),{"as-child":"",reference:C.reference},{default:A(()=>[D(f(De),ue({ref:f(s),"aria-describedby":f(r).open.value?f(r).contentId:void 0,"data-state":f(r).stateAttribute.value,as:C.as,"as-child":t.asChild,"data-grace-area-trigger":""},Mu(l.value)),{default:A(()=>[Z(C.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3},8,["reference"]))}}),gC=G({__name:"Button",props:{variant:{},size:{},class:{},asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e;return(r,n)=>(I(),q(f(De),{"data-slot":"button",as:e.as,"as-child":e.asChild,class:Ke(f(Ge)(f(hc)({variant:e.variant,size:e.size}),t.class))},{default:A(()=>[Z(r.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),ze=gC;const hc=ap("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 vC={class:"wp:grid wp:grid-cols-3 wp:gap-x-6 wp:gap-y-3 wp:p-3 wp:max-w-xs wp:mx-auto"},mC=G({__name:"KeyPad",setup(e){const t=bt("webphone"),{sendDTMF:r}=bt("sip"),{playDtmf:n}=qf(),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)=>(I(),we("div",vC,[(I(),we(Oe,null,Xt(s,l=>D(f(ze),{key:l,onClick:c=>i(l),variant:"ghost",size:"icon",class:"wp:h-14! wp:w-14! wp:rounded-full! wp:text-xl wp:font-medium wp:bg-neutral-100 wp:dark:bg-neutral-800 wp:hover:bg-neutral-200 wp:dark:hover:bg-neutral-700 wp:text-neutral-900 wp:dark:text-white wp:transition-colors wp:active:scale-95"},{default:A(()=>[$e(Re(l),1)]),_:2},1032,["onClick"])),64))]))}}),wC=mC;var kh=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),yC=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),bC=e=>{const t=yC(e);return t.charAt(0).toUpperCase()+t.slice(1)},SC=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),Ih=e=>e==="";var Ti={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 CC=({name:e,iconNode:t,absoluteStrokeWidth:r,"absolute-stroke-width":n,strokeWidth:s,"stroke-width":i,size:o=Ti.width,color:a=Ti.stroke,...l},{slots:c})=>Qt("svg",{...Ti,...l,width:o,height:o,stroke:a,"stroke-width":Ih(r)||Ih(n)||r===!0||n===!0?Number(s||i||Ti["stroke-width"])*24/Number(o):s||i||Ti["stroke-width"],class:SC("lucide",l.class,...e?[`lucide-${kh(bC(e))}-icon`,`lucide-${kh(e)}`]:["lucide-icon"])},[...t.map(u=>Qt(...u)),...c.default?[c.default()]:[]]);var Ve=(e,t)=>(r,{slots:n,attrs:s})=>Qt(CC,{...s,...r,iconNode:t,name:e},n);var _C=Ve("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);var xC=Ve("arrow-right-left",[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]]);var Rh=Ve("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 $h=Ve("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);var Dh=Ve("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);var TC=Ve("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);var gc=Ve("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 EC=Ve("delete",[["path",{d:"M10 5a2 2 0 0 0-1.344.519l-6.328 5.74a1 1 0 0 0 0 1.481l6.328 5.741A2 2 0 0 0 10 19h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2z",key:"1yo7s0"}],["path",{d:"m12 9 6 6",key:"anjzzh"}],["path",{d:"m18 9-6 6",key:"1fp51s"}]]);var AC=Ve("disc",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);var Ei=Ve("grip",[["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"19",cy:"5",r:"1",key:"w8mnmm"}],["circle",{cx:"5",cy:"5",r:"1",key:"lttvr7"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}],["circle",{cx:"19",cy:"19",r:"1",key:"shf9b7"}],["circle",{cx:"5",cy:"19",r:"1",key:"bfqh0e"}]]);var Ph=Ve("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);var kC=Ve("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 IC=Ve("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 Oh=Ve("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);var RC=Ve("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 $C=Ve("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 DC=Ve("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 vc=Ve("phone-off",[["path",{d:"M10.1 13.9a14 14 0 0 0 3.732 2.668 1 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 2 18 18 0 0 1-12.728-5.272",key:"1wngk7"}],["path",{d:"M22 2 2 22",key:"y4kqgn"}],["path",{d:"M4.76 13.582A18 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 .244.473",key:"10hv5p"}]]);var PC=Ve("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 mc=Ve("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 Hh=Ve("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 OC=Ve("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 HC=Ve("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);var Mh=Ve("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 qh=Ve("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);var Nh=Ve("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 Bh=Ve("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 Fh=Ve("wifi-off",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);var ta=Ve("wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);var Lh=Ve("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=Ve("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),MC={class:"wp:flex wp:justify-center wp:items-center wp:gap-6 wp:p-2 wp:relative"},qC={key:0,class:"wp:flex wp:items-center wp:gap-4"},NC={key:4,class:"wp:absolute wp:inset-x-0 wp:bottom-full wp:mb-2 wp:flex wp:justify-center wp:gap-2"},BC=G({__name:"CallActions",props:{destination:{},isVideo:{type:Boolean}},emits:["transfer","completeTransfer","cancelTransfer"],setup(e,{emit:t}){const r=bt("webphone"),{makeCall:n,hangupCall:s,answerCall:i,toggleMute:o,toggleHold:a}=bt("sip"),l=e,c=t,u=N(()=>!!r.transferInProgress),d=async h=>{try{l.destination?await n(l.destination,h):r.keypadValue?await n(r.keypadValue,h):r.lastDialedNumber&&(r.keypadValue=r.lastDialedNumber)}catch(g){if(console.error("Error initiating call:",g),h){let w="No se pudo acceder a la cámara.";const C=g instanceof Error?g.name:String(g);C==="NotReadableError"?w="La cámara parece estar en uso por otra aplicación (ej: Zoom, Meet) o no se puede acceder al hardware.":C==="NotAllowedError"||C==="PermissionDeniedError"?w="Permiso de cámara denegado. Por favor, permita el acceso a la cámara.":C==="NotFoundError"?w="No se detectó ninguna cámara en el sistema.":w+=" "+(g instanceof Error?g.message:String(g)),confirm(`${w}
71
+ `))}return()=>s.value||n.value||o.value?Qt(t.default({present:o.value})[0],{ref:c=>{const u=Tr(c);return typeof u?.hasAttribute>"u"||(u?.hasAttribute("data-reka-popper-content-wrapper")?i.value=u.firstElementChild:i.value=u),u}}):null}}),Vl=G({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:r}){return()=>{if(!r.default)return null;const n=Ol(r.default()),s=n.findIndex(l=>l.type!==it);if(s===-1)return n;const i=n[s];delete i.props?.ref;const o=i.props?ce(t,i.props):t,a=dr({...i,props:{}},o);return n.length===1?a:(n[s]=a,n)}}}),Zb=["area","img","input"],De=G({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"&&Zb.includes(n)?()=>Qt(n,t):n!=="template"?()=>Qt(e.as,t,{default:r.default}):()=>Qt(Vl,t,{default:r.default})}});function jl(){const e=F();return{primitiveElement:e,currentElement:B(()=>["#text","#comment"].includes(e.value?.$el.nodeName)?e.value?.$el.nextElementSibling:Tr(e))}}function Xb({type:e,defaultValue:t,modelValue:r}){const n=r||t;return r!==void 0||t!==void 0?Array.isArray(n)?"multiple":"single":e??"single"}function Qb({type:e,defaultValue:t,modelValue:r}){return e||Xb({type:e,defaultValue:t,modelValue:r})}function e0({type:e,defaultValue:t}){return t!==void 0?t:e==="single"?void 0:[]}function t0(e,t){const r=B(()=>Qb(e)),n=yn(e,"modelValue",t,{defaultValue:e0(e),passive:e.modelValue===void 0,deep:!0});function s(i){if(r.value==="single")n.value=wi(i,n.value)?void 0:i;else{const o=Array.isArray(n.value)?[...n.value||[]]:[n.value].filter(Boolean);if(cp(o,i)){const a=o.findIndex(l=>wi(l,i));o.splice(a,1)}else o.push(i);n.value=o}}return{modelValue:n,changeModelValue:s,isSingle:B(()=>r.value==="single")}}var[bn,r0]=vt("DialogRoot"),n0=G({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=yn(r,"open",t,{defaultValue:r.defaultOpen,passive:r.open===void 0}),s=F(),i=F(),{modal:o}=ft(r);return r0({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)=>Z(a.$slots,"default",{open:f(n),close:()=>n.value=!1})}}),s0=G({__name:"DialogClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e;ye();const r=bn();return(n,s)=>(I(),N(f(De),ce(t,{type:n.as==="button"?"button":void 0,onClick:s[0]||(s[0]=i=>f(r).onOpenChange(!1))}),{default:A(()=>[Z(n.$slots,"default")]),_:3},16,["type"]))}}),i0="dismissableLayer.pointerDownOutside",o0="dismissableLayer.focusOutside";function xp(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 a0(e,t,r=!0){const n=t?.value?.ownerDocument??globalThis?.document,s=F(!1),i=F(()=>{});return st(o=>{if(!nr||!_e(r))return;const a=async c=>{const u=c.target;if(!(!t?.value||!u)){if(xp(t.value,u)){s.value=!1;return}if(c.target&&!s.value){let h=function(){Dl(i0,e,p)};var d=h;const p={originalEvent:c};c.pointerType==="touch"?(n.removeEventListener("click",i.value),i.value=h,n.addEventListener("click",i.value,{once:!0})):h()}else n.removeEventListener("click",i.value);s.value=!1}},l=window.setTimeout(()=>{n.addEventListener("pointerdown",a)},0);o(()=>{window.clearTimeout(l),n.removeEventListener("pointerdown",a),n.removeEventListener("click",i.value)})}),{onPointerDownCapture:()=>{_e(r)&&(s.value=!0)}}}function l0(e,t,r=!0){const n=t?.value?.ownerDocument??globalThis?.document,s=F(!1);return st(i=>{if(!nr||!_e(r))return;const o=async a=>{if(!t?.value)return;await at(),await at();const l=a.target;!t.value||!l||xp(t.value,l)||a.target&&!s.value&&Dl(o0,e,{originalEvent:a})};n.addEventListener("focusin",o),i(()=>n.removeEventListener("focusin",o))}),{onFocusCapture:()=>{_e(r)&&(s.value=!0)},onBlurCapture:()=>{_e(r)&&(s.value=!1)}}}var Jr=Nr({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ul=G({__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}=ye(),o=B(()=>i.value?.ownerDocument??globalThis.document),a=B(()=>Jr.layersRoot),l=B(()=>i.value?Array.from(a.value).indexOf(i.value):-1),c=B(()=>Jr.layersWithOutsidePointerEventsDisabled.size>0),u=B(()=>{const m=Array.from(a.value),[w]=[...Jr.layersWithOutsidePointerEventsDisabled].slice(-1),S=m.indexOf(w);return l.value>=S}),d=a0(async m=>{const w=[...Jr.branches].some(S=>S?.contains(m.target));!u.value||w||(n("pointerDownOutside",m),n("interactOutside",m),await at(),m.defaultPrevented||n("dismiss"))},i),p=l0(m=>{[...Jr.branches].some(w=>w?.contains(m.target))||(n("focusOutside",m),n("interactOutside",m),m.defaultPrevented||n("dismiss"))},i);Rb("Escape",m=>{l.value===a.value.size-1&&(n("escapeKeyDown",m),m.defaultPrevented||n("dismiss"))});let h;return st(m=>{i.value&&(r.disableOutsidePointerEvents&&(Jr.layersWithOutsidePointerEventsDisabled.size===0&&(h=o.value.body.style.pointerEvents,o.value.body.style.pointerEvents="none"),Jr.layersWithOutsidePointerEventsDisabled.add(i.value)),a.value.add(i.value),m(()=>{r.disableOutsidePointerEvents&&Jr.layersWithOutsidePointerEventsDisabled.size===1&&(o.value.body.style.pointerEvents=h)}))}),st(m=>{m(()=>{i.value&&(a.value.delete(i.value),Jr.layersWithOutsidePointerEventsDisabled.delete(i.value))})}),(m,w)=>(I(),N(f(De),{ref:f(s),"as-child":m.asChild,as:m.as,"data-dismissable-layer":"",style:mt({pointerEvents:c.value?u.value?"auto":"none":void 0}),onFocusCapture:f(p).onFocusCapture,onBlurCapture:f(p).onBlurCapture,onPointerdownCapture:f(d).onPointerDownCapture},{default:A(()=>[Z(m.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),c0=hb(()=>F([]));function u0(){const e=c0();return{add(t){const r=e.value[0];t!==r&&r?.pause(),e.value=Tp(e.value,t),e.value.unshift(t)},remove(t){e.value=Tp(e.value,t),e.value[0]?.resume()}}}function Tp(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function d0(e){return e.filter(t=>t.tagName!=="A")}var zl="focusScope.autoFocusOnMount",Kl="focusScope.autoFocusOnUnmount",Ep={bubbles:!1,cancelable:!0};function f0(e,{select:t=!1}={}){const r=Pt();for(const n of e)if(Sn(n,{select:t}),Pt()!==r)return!0}function p0(e){const t=Ap(e);return[kp(t,e),kp(t.reverse(),e)]}function Ap(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 kp(e,t){for(const r of e)if(!h0(r,{upTo:t}))return r}function h0(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 g0(e){return e instanceof HTMLInputElement&&"select"in e}function Sn(e,{select:t=!1}={}){if(e&&e.focus){const r=Pt();e.focus({preventScroll:!0}),e!==r&&g0(e)&&t&&e.select()}}var Ip=G({__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}=ye(),o=F(null),a=u0(),l=Nr({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});st(u=>{if(!nr)return;const d=i.value;if(!r.trapped)return;function p(S){if(l.paused||!d)return;const g=S.target;d.contains(g)?o.value=g:Sn(o.value,{select:!0})}function h(S){if(l.paused||!d)return;const g=S.relatedTarget;g!==null&&(d.contains(g)||Sn(o.value,{select:!0}))}function m(S){d.contains(o.value)||Sn(d)}document.addEventListener("focusin",p),document.addEventListener("focusout",h);const w=new MutationObserver(m);d&&w.observe(d,{childList:!0,subtree:!0}),u(()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",h),w.disconnect()})}),st(async u=>{const d=i.value;if(await at(),!d)return;a.add(l);const p=Pt();if(!d.contains(p)){const h=new CustomEvent(zl,Ep);d.addEventListener(zl,m=>n("mountAutoFocus",m)),d.dispatchEvent(h),h.defaultPrevented||(f0(d0(Ap(d)),{select:!0}),Pt()===p&&Sn(d))}u(()=>{d.removeEventListener(zl,w=>n("mountAutoFocus",w));const h=new CustomEvent(Kl,Ep),m=w=>{n("unmountAutoFocus",w)};d.addEventListener(Kl,m),d.dispatchEvent(h),setTimeout(()=>{h.defaultPrevented||Sn(p??document.body,{select:!0}),d.removeEventListener(Kl,m),a.remove(l)},0)})});function c(u){if(!r.loop&&!r.trapped||l.paused)return;const d=u.key==="Tab"&&!u.altKey&&!u.ctrlKey&&!u.metaKey,p=Pt();if(d&&p){const h=u.currentTarget,[m,w]=p0(h);m&&w?!u.shiftKey&&p===w?(u.preventDefault(),r.loop&&Sn(m,{select:!0})):u.shiftKey&&p===m&&(u.preventDefault(),r.loop&&Sn(w,{select:!0})):p===h&&u.preventDefault()}}return(u,d)=>(I(),N(f(De),{ref_key:"currentRef",ref:s,tabindex:"-1","as-child":u.asChild,as:u.as,onKeydown:c},{default:A(()=>[Z(u.$slots,"default")]),_:3},8,["as-child","as"]))}}),Rp=["Enter"," "],v0=["ArrowDown","PageUp","Home"],m0=["ArrowUp","PageDown","End"],QT=[...v0,...m0],eE={ltr:[...Rp,"ArrowRight"],rtl:[...Rp,"ArrowLeft"]};function w0(e){return e?"open":"closed"}function $p(e){const t=Pt();for(const r of e)if(r===t||(r.focus(),Pt()!==t))return}var Dp=G({__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=bn(),{forwardRef:i,currentElement:o}=ye();return s.titleId||(s.titleId=Vn(void 0,"reka-dialog-title")),s.descriptionId||(s.descriptionId=Vn(void 0,"reka-dialog-description")),Ue(()=>{s.contentElement=o,Pt()!==document.body&&(s.triggerElement.value=Pt())}),(a,l)=>(I(),N(f(Ip),{"as-child":"",loop:"",trapped:r.trapFocus,onMountAutoFocus:l[5]||(l[5]=c=>n("openAutoFocus",c)),onUnmountAutoFocus:l[6]||(l[6]=c=>n("closeAutoFocus",c))},{default:A(()=>[D(f(Ul),ce({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(w0)(f(s).open.value)},a.$attrs,{onDismiss:l[0]||(l[0]=c=>f(s).onOpenChange(!1)),onEscapeKeyDown:l[1]||(l[1]=c=>n("escapeKeyDown",c)),onFocusOutside:l[2]||(l[2]=c=>n("focusOutside",c)),onInteractOutside:l[3]||(l[3]=c=>n("interactOutside",c)),onPointerDownOutside:l[4]||(l[4]=c=>n("pointerDownOutside",c))}),{default:A(()=>[Z(a.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),y0=G({__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=bn(),i=qo(n),{forwardRef:o,currentElement:a}=ye();return bp(a),(l,c)=>(I(),N(Dp,ce({...r,...f(i)},{ref:f(o),"trap-focus":f(s).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:c[0]||(c[0]=u=>{u.defaultPrevented||(u.preventDefault(),f(s).triggerElement.value?.focus())}),onPointerDownOutside:c[1]||(c[1]=u=>{const d=u.detail.originalEvent,p=d.button===0&&d.ctrlKey===!0;(d.button===2||p)&&u.preventDefault()}),onFocusOutside:c[2]||(c[2]=u=>{u.preventDefault()})}),{default:A(()=>[Z(l.$slots,"default")]),_:3},16,["trap-focus"]))}}),b0=G({__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=qo(t);ye();const s=bn(),i=F(!1),o=F(!1);return(a,l)=>(I(),N(Dp,ce({...r,...f(n)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:l[0]||(l[0]=c=>{c.defaultPrevented||(i.value||f(s).triggerElement.value?.focus(),c.preventDefault()),i.value=!1,o.value=!1}),onInteractOutside:l[1]||(l[1]=c=>{c.defaultPrevented||(i.value=!0,c.detail.originalEvent.type==="pointerdown"&&(o.value=!0));const u=c.target;f(s).triggerElement.value?.contains(u)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&o.value&&c.preventDefault()})}),{default:A(()=>[Z(a.$slots,"default")]),_:3},16))}}),S0=G({__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=bn(),i=qo(n),{forwardRef:o}=ye();return(a,l)=>(I(),N(f(jn),{present:a.forceMount||f(s).open.value},{default:A(()=>[f(s).modal.value?(I(),N(y0,ce({key:0,ref:f(o)},{...r,...f(i),...a.$attrs}),{default:A(()=>[Z(a.$slots,"default")]),_:3},16)):(I(),N(b0,ce({key:1,ref:f(o)},{...r,...f(i),...a.$attrs}),{default:A(()=>[Z(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),C0=G({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=bn();return vp(!0),ye(),(r,n)=>(I(),N(f(De),{as:r.as,"as-child":r.asChild,"data-state":f(t).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:A(()=>[Z(r.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),_0=G({__name:"DialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=bn(),{forwardRef:r}=ye();return(n,s)=>f(t)?.modal.value?(I(),N(f(jn),{key:0,present:n.forceMount||f(t).open.value},{default:A(()=>[D(C0,ce(n.$attrs,{ref:f(r),as:n.as,"as-child":n.asChild}),{default:A(()=>[Z(n.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):xe("v-if",!0)}}),Wl=G({__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?(I(),N(Aa,{key:0,to:r.to,disabled:r.disabled,defer:r.defer},[Z(r.$slots,"default")],8,["to","disabled","defer"])):xe("v-if",!0)}}),x0=G({__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)=>(I(),N(f(Wl),Ht(Dt(t)),{default:A(()=>[Z(r.$slots,"default")]),_:3},16))}}),T0=G({__name:"DialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(e){const t=e,r=bn();return ye(),(n,s)=>(I(),N(f(De),ce(t,{id:f(r).titleId}),{default:A(()=>[Z(n.$slots,"default")]),_:3},16,["id"]))}}),Pp="data-reka-collection-item";function hr(e={}){const{key:t="",isProvider:r=!1}=e,n=`${t}CollectionProvider`;let s;if(r){const l=F(new Map);s={collectionRef:F(),itemMap:l},Dn(n,s)}else s=bt(n);const i=(l=!1)=>{const c=s.collectionRef.value;if(!c)return[];const u=Array.from(c.querySelectorAll(`[${Pp}]`)),d=Array.from(s.itemMap.value.values()).sort((p,h)=>u.indexOf(p.ref)-u.indexOf(h.ref));return l?d:d.filter(p=>p.ref.dataset.disabled!=="")},o=G({name:"CollectionSlot",setup(l,{slots:c}){const{primitiveElement:u,currentElement:d}=jl();return Ie(d,()=>{s.collectionRef.value=d.value}),()=>Qt(Vl,{ref:u},c)}}),a=G({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(l,{slots:c,attrs:u}){const{primitiveElement:d,currentElement:p}=jl();return st(h=>{if(p.value){const m=Ca(p.value);s.itemMap.value.set(m,{ref:p.value,value:l.value}),h(()=>s.itemMap.value.delete(m))}}),()=>Qt(Vl,{...u,[Pp]:"",ref:d},c)}});return{getItems:i,reactiveItems:B(()=>Array.from(s.itemMap.value.values())),itemMapSize:B(()=>s.itemMap.value.size),CollectionSlot:o,CollectionItem:a}}var E0="rovingFocusGroup.onEntryFocus",A0={bubbles:!1,cancelable:!0},k0={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function I0(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function R0(e,t,r){const n=I0(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return k0[n]}function Op(e,t=!1){const r=Pt();for(const n of e)if(n===r||(n.focus({preventScroll:t}),Pt()!==r))return}function $0(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var[D0,P0]=vt("RovingFocusGroup"),O0=G({__name:"RovingFocusGroup",props:{orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!1},currentTabStopId:{type:[String,null],required:!1},defaultCurrentTabStopId:{type:String,required:!1},preventScrollOnEntryFocus:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["entryFocus","update:currentTabStopId"],setup(e,{expose:t,emit:r}){const n=e,s=r,{loop:i,orientation:o,dir:a}=ft(n),l=bi(a),c=yn(n,"currentTabStopId",s,{defaultValue:n.defaultCurrentTabStopId,passive:n.currentTabStopId===void 0}),u=F(!1),d=F(!1),p=F(0),{getItems:h,CollectionSlot:m}=hr({isProvider:!0});function w(g){const x=!d.value;if(g.currentTarget&&g.target===g.currentTarget&&x&&!u.value){const y=new CustomEvent(E0,A0);if(g.currentTarget.dispatchEvent(y),s("entryFocus",y),!y.defaultPrevented){const b=h().map(_=>_.ref).filter(_=>_.dataset.disabled!=="");Op([b.find(_=>_.getAttribute("data-active")===""),b.find(_=>_.getAttribute("data-highlighted")===""),b.find(_=>_.id===c.value),...b].filter(Boolean),n.preventScrollOnEntryFocus)}}d.value=!1}function S(){setTimeout(()=>{d.value=!1},1)}return t({getItems:h}),P0({loop:i,dir:l,orientation:o,currentTabStopId:c,onItemFocus:g=>{c.value=g},onItemShiftTab:()=>{u.value=!0},onFocusableItemAdd:()=>{p.value++},onFocusableItemRemove:()=>{p.value--}}),(g,x)=>(I(),N(f(m),null,{default:A(()=>[D(f(De),{tabindex:u.value||p.value===0?-1:0,"data-orientation":f(o),as:g.as,"as-child":g.asChild,dir:f(l),style:{outline:"none"},onMousedown:x[0]||(x[0]=y=>d.value=!0),onMouseup:S,onFocus:w,onBlur:x[1]||(x[1]=y=>u.value=!1)},{default:A(()=>[Z(g.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),H0=G({__name:"RovingFocusItem",props:{tabStopId:{type:String,required:!1},focusable:{type:Boolean,required:!1,default:!0},active:{type:Boolean,required:!1},allowShiftKey:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,r=D0(),n=Vn(),s=B(()=>t.tabStopId||n),i=B(()=>r.currentTabStopId.value===s.value),{getItems:o,CollectionItem:a}=hr();Ue(()=>{t.focusable&&r.onFocusableItemAdd()}),Rt(()=>{t.focusable&&r.onFocusableItemRemove()});function l(c){if(c.key==="Tab"&&c.shiftKey){r.onItemShiftTab();return}if(c.target!==c.currentTarget)return;const u=R0(c,r.orientation.value,r.dir.value);if(u!==void 0){if(c.metaKey||c.ctrlKey||c.altKey||!t.allowShiftKey&&c.shiftKey)return;c.preventDefault();let d=[...o().map(p=>p.ref).filter(p=>p.dataset.disabled!=="")];if(u==="last")d.reverse();else if(u==="prev"||u==="next"){u==="prev"&&d.reverse();const p=d.indexOf(c.currentTarget);d=r.loop.value?$0(d,p+1):d.slice(p+1)}at(()=>Op(d))}}return(c,u)=>(I(),N(f(a),null,{default:A(()=>[D(f(De),{tabindex:i.value?0:-1,"data-orientation":f(r).orientation.value,"data-active":c.active?"":void 0,"data-disabled":c.focusable?void 0:"",as:c.as,"as-child":c.asChild,onMousedown:u[0]||(u[0]=d=>{c.focusable?f(r).onItemFocus(s.value):d.preventDefault()}),onFocus:u[1]||(u[1]=d=>f(r).onItemFocus(s.value)),onKeydown:l},{default:A(()=>[Z(c.$slots,"default")]),_:3},8,["tabindex","data-orientation","data-active","data-disabled","as","as-child"])]),_:3}))}}),Gl=G({__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)=>(I(),N(f(De),{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:A(()=>[Z(t.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}}),Hp=G({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}=jl();return Ie(B(()=>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 c=new Event("input",{bubbles:!0}),u=new Event("change",{bubbles:!0});l.call(o,s),o.dispatchEvent(c),o.dispatchEvent(u)}}),(s,i)=>(I(),N(Gl,ce({ref_key:"primitiveElement",ref:r},{...t,...s.$attrs},{as:"input"}),null,16))}}),Jl=G({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=B(()=>typeof t.value=="object"&&Array.isArray(t.value)&&t.value.length===0&&t.required),n=B(()=>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)=>(I(),ve(Oe,null,[xe(" We render single input if it's required "),r.value?(I(),N(Hp,ce({key:s.name},{...t,...s.$attrs},{name:s.name,value:s.value}),null,16,["name","value"])):(I(!0),ve(Oe,{key:1},Xt(n.value,o=>(I(),N(Hp,ce({key:o.name},{ref_for:!0},{...t,...s.$attrs},{name:o.name,value:o.value}),null,16,["name","value"]))),128))],2112))}}),[Mp,M0]=vt("PopperRoot"),qp=G({inheritAttrs:!1,__name:"PopperRoot",setup(e){const t=F();return M0({anchor:t,onAnchorChange:r=>t.value=r}),(r,n)=>Z(r.$slots,"default")}}),Np=G({__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}=ye(),s=Mp();return Ua(()=>{s.onAnchorChange(t.reference??n.value)}),(i,o)=>(I(),N(f(De),{ref:f(r),as:i.as,"as-child":i.asChild},{default:A(()=>[Z(i.$slots,"default")]),_:3},8,["as","as-child"]))}}),q0={key:0,d:"M0 0L6 6L12 0"},N0={key:1,d:"M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0"},B0=G({__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 ye(),(r,n)=>(I(),N(f(De),ce(t,{width:r.width,height:r.height,viewBox:r.asChild?void 0:"0 0 12 6",preserveAspectRatio:r.asChild?void 0:"none"}),{default:A(()=>[Z(r.$slots,"default",{},()=>[r.rounded?(I(),ve("path",N0)):(I(),ve("path",q0))])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}});function F0(e){return e!==null}function L0(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,c]=Yl(r),u={start:"0%",center:"50%",end:"100%"}[c],d=(s.arrow?.x??0)+o/2,p=(s.arrow?.y??0)+a/2;let h="",m="";return l==="bottom"?(h=i?u:`${d}px`,m=`${-a}px`):l==="top"?(h=i?u:`${d}px`,m=`${n.floating.height+a}px`):l==="right"?(h=`${-a}px`,m=i?u:`${p}px`):l==="left"&&(h=`${n.floating.width+a}px`,m=i?u:`${p}px`),{data:{x:h,y:m}}}}}function Yl(e){const[t,r="center"]=e.split("-");return[t,r]}var V0=["top","right","bottom","left"],Cn=Math.min,Ut=Math.max,Vo=Math.round,jo=Math.floor,kr=e=>({x:e,y:e}),j0={left:"right",right:"left",bottom:"top",top:"bottom"},U0={start:"end",end:"start"};function Zl(e,t,r){return Ut(e,Cn(t,r))}function Yr(e,t){return typeof e=="function"?e(t):e}function Zr(e){return e.split("-")[0]}function ks(e){return e.split("-")[1]}function Xl(e){return e==="x"?"y":"x"}function Ql(e){return e==="y"?"height":"width"}var z0=new Set(["top","bottom"]);function Ir(e){return z0.has(Zr(e))?"y":"x"}function ec(e){return Xl(Ir(e))}function K0(e,t,r){r===void 0&&(r=!1);const n=ks(e),s=ec(e),i=Ql(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Uo(o)),[o,Uo(o)]}function W0(e){const t=Uo(e);return[tc(e),t,tc(t)]}function tc(e){return e.replace(/start|end/g,t=>U0[t])}var Bp=["left","right"],Fp=["right","left"],G0=["top","bottom"],J0=["bottom","top"];function Y0(e,t,r){switch(e){case"top":case"bottom":return r?t?Fp:Bp:t?Bp:Fp;case"left":case"right":return t?G0:J0;default:return[]}}function Z0(e,t,r,n){const s=ks(e);let i=Y0(Zr(e),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(tc)))),i}function Uo(e){return e.replace(/left|right|bottom|top/g,t=>j0[t])}function X0(e){return{top:0,right:0,bottom:0,left:0,...e}}function Lp(e){return typeof e!="number"?X0(e):{top:e,right:e,bottom:e,left:e}}function zo(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 Vp(e,t,r){let{reference:n,floating:s}=e;const i=Ir(t),o=ec(t),a=Ql(o),l=Zr(t),c=i==="y",u=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:u,y:n.y-s.height};break;case"bottom":h={x:u,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(ks(t)){case"start":h[o]-=p*(r&&c?-1:1);break;case"end":h[o]+=p*(r&&c?-1:1);break}return h}var Q0=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:d}=Vp(c,n,l),p=n,h={},m=0;for(let w=0;w<a.length;w++){const{name:S,fn:g}=a[w],{x,y,data:b,reset:_}=await g({x:u,y:d,initialPlacement:n,placement:p,strategy:s,middlewareData:h,rects:c,platform:o,elements:{reference:e,floating:t}});u=x??u,d=y??d,h={...h,[S]:{...h[S],...b}},_&&m<=50&&(m++,typeof _=="object"&&(_.placement&&(p=_.placement),_.rects&&(c=_.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):_.rects),{x:u,y:d}=Vp(c,p,l)),w=-1)}return{x:u,y:d,placement:p,strategy:s,middlewareData:h}};async function Si(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=Yr(t,e),m=Lp(h),w=a[p?d==="floating"?"reference":"floating":d],S=zo(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:c,rootBoundary:u,strategy:l})),g=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)),y=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},b=zo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:x,strategy:l}):g);return{top:(S.top-b.top+m.top)/y.y,bottom:(b.bottom-S.bottom+m.bottom)/y.y,left:(S.left-b.left+m.left)/y.x,right:(b.right-S.right+m.right)/y.x}}var e1=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:c,padding:u=0}=Yr(e,t)||{};if(c==null)return{};const d=Lp(u),p={x:r,y:n},h=ec(s),m=Ql(h),w=await o.getDimensions(c),S=h==="y",g=S?"top":"left",x=S?"bottom":"right",y=S?"clientHeight":"clientWidth",b=i.reference[m]+i.reference[h]-p[h]-i.floating[m],_=p[h]-i.reference[h],$=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let R=$?$[y]:0;(!R||!await(o.isElement==null?void 0:o.isElement($)))&&(R=a.floating[y]||i.floating[m]);const v=b/2-_/2,P=R/2-w[m]/2-1,O=Cn(d[g],P),C=Cn(d[x],P),T=O,E=R-w[m]-C,q=R/2-w[m]/2+v,j=Zl(T,q,E),z=!l.arrow&&ks(s)!=null&&q!==j&&i.reference[m]/2-(q<T?O:C)-w[m]/2<0,J=z?q<T?q-T:q-E:0;return{[h]:p[h]+J,data:{[h]:j,centerOffset:q-j-J,...z&&{alignmentOffset:J}},reset:z}}}),t1=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:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:w=!0,...S}=Yr(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const g=Zr(s),x=Ir(a),y=Zr(a)===a,b=await(l.isRTL==null?void 0:l.isRTL(c.floating)),_=p||(y||!w?[Uo(a)]:W0(a)),$=m!=="none";!p&&$&&_.push(...Z0(a,w,m,b));const R=[a,..._],v=await Si(t,S),P=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&P.push(v[g]),d){const q=K0(s,o,b);P.push(v[q[0]],v[q[1]])}if(O=[...O,{placement:s,overflows:P}],!P.every(q=>q<=0)){var C,T;const q=(((C=i.flip)==null?void 0:C.index)||0)+1,j=R[q];if(j&&(!(d==="alignment"&&x!==Ir(j))||O.every(J=>Ir(J.placement)===x?J.overflows[0]>0:!0)))return{data:{index:q,overflows:O},reset:{placement:j}};let z=(T=O.filter(J=>J.overflows[0]<=0).sort((J,U)=>J.overflows[1]-U.overflows[1])[0])==null?void 0:T.placement;if(!z)switch(h){case"bestFit":{var E;const J=(E=O.filter(U=>{if($){const Ae=Ir(U.placement);return Ae===x||Ae==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(Ae=>Ae>0).reduce((Ae,be)=>Ae+be,0)]).sort((U,Ae)=>U[1]-Ae[1])[0])==null?void 0:E[0];J&&(z=J);break}case"initialPlacement":z=a;break}if(s!==z)return{reset:{placement:z}}}return{}}}};function jp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Up(e){return V0.some(t=>e[t]>=0)}var r1=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=Yr(e,t);switch(n){case"referenceHidden":{const i=jp(await Si(t,{...s,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Up(i)}}}case"escaped":{const i=jp(await Si(t,{...s,altBoundary:!0}),r.floating);return{data:{escapedOffsets:i,escaped:Up(i)}}}default:return{}}}}},zp=new Set(["left","top"]);async function n1(e,t){const{placement:r,platform:n,elements:s}=e,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=Zr(r),a=ks(r),l=Ir(r)==="y",c=zp.has(o)?-1:1,u=i&&l?-1:1,d=Yr(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*u,y:p*c}:{x:p*c,y:h*u}}var s1=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 n1(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}}}}},i1=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:S=>{let{x:g,y:x}=S;return{x:g,y:x}}},...l}=Yr(e,t),c={x:r,y:n},u=await Si(t,l),d=Ir(Zr(s)),p=Xl(d);let h=c[p],m=c[d];if(i){const S=p==="y"?"top":"left",g=p==="y"?"bottom":"right",x=h+u[S],y=h-u[g];h=Zl(x,h,y)}if(o){const S=d==="y"?"top":"left",g=d==="y"?"bottom":"right",x=m+u[S],y=m-u[g];m=Zl(x,m,y)}const w=a.fn({...t,[p]:h,[d]:m});return{...w,data:{x:w.x-r,y:w.y-n,enabled:{[p]:i,[d]:o}}}}}},o1=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:c=!0}=Yr(e,t),u={x:r,y:n},d=Ir(s),p=Xl(d);let h=u[p],m=u[d];const w=Yr(a,t),S=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]+S.mainAxis,_=i.reference[p]+i.reference[y]-S.mainAxis;h<b?h=b:h>_&&(h=_)}if(c){var g,x;const y=p==="y"?"width":"height",b=zp.has(Zr(s)),_=i.reference[d]-i.floating[y]+(b&&((g=o.offset)==null?void 0:g[d])||0)+(b?0:S.crossAxis),$=i.reference[d]+i.reference[y]+(b?0:((x=o.offset)==null?void 0:x[d])||0)-(b?S.crossAxis:0);m<_?m=_:m>$&&(m=$)}return{[p]:h,[d]:m}}}},a1=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=()=>{},...c}=Yr(e,t),u=await Si(t,c),d=Zr(s),p=ks(s),h=Ir(s)==="y",{width:m,height:w}=i.floating;let S,g;d==="top"||d==="bottom"?(S=d,g=p===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(g=d,S=p==="end"?"top":"bottom");const x=w-u.top-u.bottom,y=m-u.left-u.right,b=Cn(w-u[S],x),_=Cn(m-u[g],y),$=!t.middlewareData.shift;let R=b,v=_;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(v=y),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(R=x),$&&!p){const O=Ut(u.left,0),C=Ut(u.right,0),T=Ut(u.top,0),E=Ut(u.bottom,0);h?v=m-2*(O!==0||C!==0?O+C:Ut(u.left,u.right)):R=w-2*(T!==0||E!==0?T+E:Ut(u.top,u.bottom))}await l({...t,availableWidth:v,availableHeight:R});const P=await o.getDimensions(a.floating);return m!==P.width||w!==P.height?{reset:{rects:!0}}:{}}}};function Ko(){return typeof window<"u"}function Un(e){return rc(e)?(e.nodeName||"").toLowerCase():"#document"}function zt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Rr(e){var t;return(t=(rc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function rc(e){return Ko()?e instanceof Node||e instanceof zt(e).Node:!1}function gr(e){return Ko()?e instanceof Element||e instanceof zt(e).Element:!1}function $r(e){return Ko()?e instanceof HTMLElement||e instanceof zt(e).HTMLElement:!1}function Kp(e){return!Ko()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof zt(e).ShadowRoot}var l1=new Set(["inline","contents"]);function Ci(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=vr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!l1.has(s)}var c1=new Set(["table","td","th"]);function u1(e){return c1.has(Un(e))}var d1=[":popover-open",":modal"];function Wo(e){return d1.some(t=>{try{return e.matches(t)}catch{return!1}})}var f1=["transform","translate","scale","rotate","perspective"],p1=["transform","translate","scale","rotate","perspective","filter"],h1=["paint","layout","strict","content"];function nc(e){const t=sc(),r=gr(e)?vr(e):e;return f1.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||p1.some(n=>(r.willChange||"").includes(n))||h1.some(n=>(r.contain||"").includes(n))}function g1(e){let t=_n(e);for(;$r(t)&&!Is(t);){if(nc(t))return t;if(Wo(t))return null;t=_n(t)}return null}function sc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var v1=new Set(["html","body","#document"]);function Is(e){return v1.has(Un(e))}function vr(e){return zt(e).getComputedStyle(e)}function Go(e){return gr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _n(e){if(Un(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Kp(e)&&e.host||Rr(e);return Kp(t)?t.host:t}function Wp(e){const t=_n(e);return Is(t)?e.ownerDocument?e.ownerDocument.body:e.body:$r(t)&&Ci(t)?t:Wp(t)}function _i(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=Wp(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=zt(s);if(i){const a=ic(o);return t.concat(o,o.visualViewport||[],Ci(s)?s:[],a&&r?_i(a):[])}return t.concat(s,_i(s,[],r))}function ic(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Gp(e){const t=vr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=$r(e),i=s?e.offsetWidth:r,o=s?e.offsetHeight:n,a=Vo(r)!==i||Vo(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function oc(e){return gr(e)?e:e.contextElement}function Rs(e){const t=oc(e);if(!$r(t))return kr(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:i}=Gp(t);let o=(i?Vo(r.width):r.width)/n,a=(i?Vo(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var m1=kr(0);function Jp(e){const t=zt(e);return!sc()||!t.visualViewport?m1:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function w1(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==zt(e)?!1:t}function zn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),i=oc(e);let o=kr(1);t&&(n?gr(n)&&(o=Rs(n)):o=Rs(e));const a=w1(i,r,n)?Jp(i):kr(0);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,u=s.width/o.x,d=s.height/o.y;if(i){const p=zt(i),h=n&&gr(n)?zt(n):n;let m=p,w=ic(m);for(;w&&n&&h!==m;){const S=Rs(w),g=w.getBoundingClientRect(),x=vr(w),y=g.left+(w.clientLeft+parseFloat(x.paddingLeft))*S.x,b=g.top+(w.clientTop+parseFloat(x.paddingTop))*S.y;l*=S.x,c*=S.y,u*=S.x,d*=S.y,l+=y,c+=b,m=zt(w),w=ic(m)}}return zo({width:u,height:d,x:l,y:c})}function Jo(e,t){const r=Go(e).scrollLeft;return t?t.left+r:zn(Rr(e)).left+r}function Yp(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-Jo(e,r),y:r.top+t.scrollTop}}function y1(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const i=s==="fixed",o=Rr(n),a=t?Wo(t.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},c=kr(1);const u=kr(0),d=$r(n);if((d||!d&&!i)&&((Un(n)!=="body"||Ci(o))&&(l=Go(n)),$r(n))){const h=zn(n);c=Rs(n),u.x=h.x+n.clientLeft,u.y=h.y+n.clientTop}const p=o&&!d&&!i?Yp(o,l):kr(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:r.y*c.y-l.scrollTop*c.y+u.y+p.y}}function b1(e){return Array.from(e.getClientRects())}function S1(e){const t=Rr(e),r=Go(e),n=e.ownerDocument.body,s=Ut(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Ut(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+Jo(e);const a=-r.scrollTop;return vr(n).direction==="rtl"&&(o+=Ut(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}var Zp=25;function C1(e,t){const r=zt(e),n=Rr(e),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const u=sc();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}const c=Jo(n);if(c<=0){const u=n.ownerDocument,d=u.body,p=getComputedStyle(d),h=u.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,m=Math.abs(n.clientWidth-d.clientWidth-h);m<=Zp&&(i-=m)}else c<=Zp&&(i+=c);return{width:i,height:o,x:a,y:l}}var _1=new Set(["absolute","fixed"]);function x1(e,t){const r=zn(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,i=$r(e)?Rs(e):kr(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:s*i.x,y:n*i.y}}function Xp(e,t,r){let n;if(t==="viewport")n=C1(e,r);else if(t==="document")n=S1(Rr(e));else if(gr(t))n=x1(t,r);else{const s=Jp(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return zo(n)}function Qp(e,t){const r=_n(e);return r===t||!gr(r)||Is(r)?!1:vr(r).position==="fixed"||Qp(r,t)}function T1(e,t){const r=t.get(e);if(r)return r;let n=_i(e,[],!1).filter(a=>gr(a)&&Un(a)!=="body"),s=null;const i=vr(e).position==="fixed";let o=i?_n(e):e;for(;gr(o)&&!Is(o);){const a=vr(o),l=nc(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&s&&_1.has(s.position)||Ci(o)&&!l&&Qp(e,o))?n=n.filter(c=>c!==o):s=a,o=_n(o)}return t.set(e,n),n}function E1(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const i=[...r==="clippingAncestors"?Wo(t)?[]:T1(t,this._c):[].concat(r),n],o=i[0],a=i.reduce((l,c)=>{const u=Xp(t,c,s);return l.top=Ut(u.top,l.top),l.right=Cn(u.right,l.right),l.bottom=Cn(u.bottom,l.bottom),l.left=Ut(u.left,l.left),l},Xp(t,o,s));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function A1(e){const{width:t,height:r}=Gp(e);return{width:t,height:r}}function k1(e,t,r){const n=$r(t),s=Rr(t),i=r==="fixed",o=zn(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=kr(0);function c(){l.x=Jo(s)}if(n||!n&&!i)if((Un(t)!=="body"||Ci(s))&&(a=Go(t)),n){const d=zn(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else s&&c();i&&!n&&s&&c();const u=s&&!n&&!i?Yp(s,a):kr(0);return{x:o.left+a.scrollLeft-l.x-u.x,y:o.top+a.scrollTop-l.y-u.y,width:o.width,height:o.height}}function ac(e){return vr(e).position==="static"}function eh(e,t){if(!$r(e)||vr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Rr(e)===r&&(r=r.ownerDocument.body),r}function th(e,t){const r=zt(e);if(Wo(e))return r;if(!$r(e)){let s=_n(e);for(;s&&!Is(s);){if(gr(s)&&!ac(s))return s;s=_n(s)}return r}let n=eh(e,t);for(;n&&u1(n)&&ac(n);)n=eh(n,t);return n&&Is(n)&&ac(n)&&!nc(n)?r:n||g1(e)||r}var I1=async function(e){const t=this.getOffsetParent||th,r=this.getDimensions,n=await r(e.floating);return{reference:k1(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function R1(e){return vr(e).direction==="rtl"}var $1={convertOffsetParentRelativeRectToViewportRelativeRect:y1,getDocumentElement:Rr,getClippingRect:E1,getOffsetParent:th,getElementRects:I1,getClientRects:b1,getDimensions:A1,getScale:Rs,isElement:gr,isRTL:R1};function rh(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function D1(e,t){let r=null,n;const s=Rr(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 c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:h}=c;if(a||t(),!p||!h)return;const m=jo(d),w=jo(s.clientWidth-(u+p)),S=jo(s.clientHeight-(d+h)),g=jo(u),x={rootMargin:-m+"px "+-w+"px "+-S+"px "+-g+"px",threshold:Ut(0,Cn(1,l))||1};let y=!0;function b(_){const $=_[0].intersectionRatio;if($!==l){if(!y)return o();$?o(!1,$):n=setTimeout(()=>{o(!1,1e-7)},1e3)}$===1&&!rh(c,e.getBoundingClientRect())&&o(),y=!1}try{r=new IntersectionObserver(b,{...x,root:s.ownerDocument})}catch{r=new IntersectionObserver(b,x)}r.observe(e)}return o(!0),i}function P1(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,c=oc(e),u=s||i?[...c?_i(c):[],..._i(t)]:[];u.forEach(g=>{s&&g.addEventListener("scroll",r,{passive:!0}),i&&g.addEventListener("resize",r)});const d=c&&a?D1(c,r):null;let p=-1,h=null;o&&(h=new ResizeObserver(g=>{let[x]=g;x&&x.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var y;(y=h)==null||y.observe(t)})),r()}),c&&!l&&h.observe(c),h.observe(t));let m,w=l?zn(e):null;l&&S();function S(){const g=zn(e);w&&!rh(w,g)&&r(),w=g,m=requestAnimationFrame(S)}return r(),()=>{var g;u.forEach(x=>{s&&x.removeEventListener("scroll",r),i&&x.removeEventListener("resize",r)}),d?.(),(g=h)==null||g.disconnect(),h=null,l&&cancelAnimationFrame(m)}}var O1=s1,H1=i1,nh=t1,M1=a1,q1=r1,N1=e1,B1=o1,F1=(e,t,r)=>{const n=new Map,s={platform:$1,...r},i={...s.platform,_c:n};return Q0(e,t,{...s,platform:i})};function L1(e){return e!=null&&typeof e=="object"&&"$el"in e}function lc(e){if(L1(e)){const t=e.$el;return rc(t)&&Un(t)==="#comment"?null:t}return e}function $s(e){return typeof e=="function"?e():f(e)}function V1(e){return{name:"arrow",options:e,fn(t){const r=lc($s(e.element));return r==null?{}:N1({element:r,padding:e.padding}).fn(t)}}}function sh(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ih(e,t){const r=sh(e);return Math.round(t*r)/r}function j1(e,t,r){r===void 0&&(r={});const n=r.whileElementsMounted,s=B(()=>{var R;return(R=$s(r.open))!=null?R:!0}),i=B(()=>$s(r.middleware)),o=B(()=>{var R;return(R=$s(r.placement))!=null?R:"bottom"}),a=B(()=>{var R;return(R=$s(r.strategy))!=null?R:"absolute"}),l=B(()=>{var R;return(R=$s(r.transform))!=null?R:!0}),c=B(()=>lc(e.value)),u=B(()=>lc(t.value)),d=F(0),p=F(0),h=F(a.value),m=F(o.value),w=Ze({}),S=F(!1),g=B(()=>{const R={position:h.value,left:"0",top:"0"};if(!u.value)return R;const v=ih(u.value,d.value),P=ih(u.value,p.value);return l.value?{...R,transform:"translate("+v+"px, "+P+"px)",...sh(u.value)>=1.5&&{willChange:"transform"}}:{position:h.value,left:v+"px",top:P+"px"}});let x;function y(){if(c.value==null||u.value==null)return;const R=s.value;F1(c.value,u.value,{middleware:i.value,placement:o.value,strategy:a.value}).then(v=>{d.value=v.x,p.value=v.y,h.value=v.strategy,m.value=v.placement,w.value=v.middlewareData,S.value=R!==!1})}function b(){typeof x=="function"&&(x(),x=void 0)}function _(){if(b(),n===void 0){y();return}if(c.value!=null&&u.value!=null){x=n(c.value,u.value,y);return}}function $(){s.value||(S.value=!1)}return Ie([i,o,a,s],y,{flush:"sync"}),Ie([c,u],_,{flush:"sync"}),Ie(s,$,{flush:"sync"}),is()&&Mi(b),{x:en(d),y:en(p),strategy:en(h),placement:en(m),middlewareData:en(w),isPositioned:en(S),floatingStyles:g,update:y}}var U1={side:"bottom",sideOffset:0,sideFlip:!0,align:"center",alignOffset:0,alignFlip:!0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[z1,K1]=vt("PopperContent"),oh=G({inheritAttrs:!1,__name:"PopperContent",props:Bu({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},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}},{...U1}),emits:["placed"],setup(e,{emit:t}){const r=e,n=t,s=Mp(),{forwardRef:i,currentElement:o}=ye(),a=F(),l=F(),{width:c,height:u}=Sp(l),d=B(()=>r.side+(r.align!=="center"?`-${r.align}`:"")),p=B(()=>typeof r.collisionPadding=="number"?r.collisionPadding:{top:0,right:0,bottom:0,left:0,...r.collisionPadding}),h=B(()=>Array.isArray(r.collisionBoundary)?r.collisionBoundary:[r.collisionBoundary]),m=B(()=>({padding:p.value,boundary:h.value.filter(F0),altBoundary:h.value.length>0})),w=B(()=>({mainAxis:r.sideFlip,crossAxis:r.alignFlip})),S=fb(()=>[O1({mainAxis:r.sideOffset+u.value,alignmentAxis:r.alignOffset}),r.prioritizePosition&&r.avoidCollisions&&nh({...m.value,...w.value}),r.avoidCollisions&&H1({mainAxis:!0,crossAxis:!!r.prioritizePosition,limiter:r.sticky==="partial"?B1():void 0,...m.value}),!r.prioritizePosition&&r.avoidCollisions&&nh({...m.value,...w.value}),M1({...m.value,apply:({elements:O,rects:C,availableWidth:T,availableHeight:E})=>{const{width:q,height:j}=C.reference,z=O.floating.style;z.setProperty("--reka-popper-available-width",`${T}px`),z.setProperty("--reka-popper-available-height",`${E}px`),z.setProperty("--reka-popper-anchor-width",`${q}px`),z.setProperty("--reka-popper-anchor-height",`${j}px`)}}),l.value&&V1({element:l.value,padding:r.arrowPadding}),L0({arrowWidth:c.value,arrowHeight:u.value}),r.hideWhenDetached&&q1({strategy:"referenceHidden",...m.value})]),{floatingStyles:g,placement:x,isPositioned:y,middlewareData:b,update:_}=j1(B(()=>r.reference??s.anchor.value),a,{strategy:r.positionStrategy,placement:d,whileElementsMounted:(...O)=>P1(...O,{layoutShift:!r.disableUpdateOnLayoutShift,animationFrame:r.updatePositionStrategy==="always"}),middleware:S}),$=B(()=>Yl(x.value)[0]),R=B(()=>Yl(x.value)[1]);Ua(()=>{y.value&&n("placed")});const v=B(()=>b.value.arrow?.centerOffset!==0),P=F("");return st(()=>{o.value&&(P.value=window.getComputedStyle(o.value).zIndex)}),K1({placedSide:$,onArrowChange:O=>l.value=O,arrowX:B(()=>b.value.arrow?.x??0),arrowY:B(()=>b.value.arrow?.y??0),shouldHideArrow:v}),(O,C)=>(I(),ve("div",{ref_key:"floatingRef",ref:a,"data-reka-popper-content-wrapper":"",style:mt({...f(g),transform:f(y)?f(g).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:P.value,"--reka-popper-transform-origin":[f(b).transformOrigin?.x,f(b).transformOrigin?.y].join(" "),...f(b).hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}})},[D(f(De),ce({ref:f(i)},O.$attrs,{"as-child":r.asChild,as:O.as,"data-side":$.value,"data-align":R.value,style:{animation:f(y)?void 0:"none"}}),{default:A(()=>[Z(O.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4))}}),W1={top:"bottom",right:"left",bottom:"top",left:"right"},G1=G({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}=ye(),r=z1(),n=B(()=>W1[r.placedSide.value]);return(s,i)=>(I(),ve("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})},[D(B0,ce(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:A(()=>[Z(s.$slots,"default")]),_:3},16,["as","as-child","rounded","width","height"])],4))}});function ah(e){const t=Oo({nonce:F()});return B(()=>e?.value||t.nonce?.value)}var J1=G({__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 ye(),(r,n)=>(I(),N(f(De),ce(t,{onMousedown:n[0]||(n[0]=s=>{!s.defaultPrevented&&s.detail>1&&s.preventDefault()})}),{default:A(()=>[Z(r.$slots,"default")]),_:3},16))}}),[sr,Y1]=vt("ScrollAreaRoot"),Z1=G({__name:"ScrollAreaRoot",props:{type:{type:String,required:!1,default:"hover"},dir:{type:String,required:!1},scrollHideDelay:{type:Number,required:!1,default:600},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e,{expose:t}){const r=e,n=F(0),s=F(0),i=F(),o=F(),a=F(),l=F(),c=F(!1),u=F(!1),{type:d,dir:p,scrollHideDelay:h}=ft(r),m=bi(p);function w(){i.value?.scrollTo({top:0})}function S(){i.value?.scrollTo({top:0,left:0})}t({viewport:i,scrollTop:w,scrollTopLeft:S});const{forwardRef:g,currentElement:x}=ye();return Y1({type:d,dir:m,scrollHideDelay:h,scrollArea:x,viewport:i,onViewportChange:y=>{i.value=y||void 0},content:o,onContentChange:y=>{o.value=y},scrollbarX:a,scrollbarXEnabled:c,scrollbarY:l,scrollbarYEnabled:u,onScrollbarXChange:y=>{a.value=y||void 0},onScrollbarYChange:y=>{l.value=y||void 0},onScrollbarXEnabledChange:y=>{c.value=y},onScrollbarYEnabledChange:y=>{u.value=y},onCornerWidthChange:y=>{n.value=y},onCornerHeightChange:y=>{s.value=y}}),(y,b)=>(I(),N(f(De),{ref:f(g),"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:A(()=>[Z(y.$slots,"default")]),_:3},8,["as-child","as","dir","style"]))}}),X1=G({__name:"ScrollAreaCornerImpl",setup(e){const t=sr(),r=F(0),n=F(0),s=B(()=>!!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 Ln(t.scrollbarX.value,i),Ln(t.scrollbarY.value,o),Ie(()=>t.scrollbarX.value,i),Ie(()=>t.scrollbarY.value,o),(a,l)=>s.value?(I(),N(f(De),ce({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:A(()=>[Z(a.$slots,"default")]),_:3},16,["style"])):xe("v-if",!0)}}),Q1=G({__name:"ScrollAreaCorner",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:r}=ye(),n=sr(),s=B(()=>!!n.scrollbarX.value&&!!n.scrollbarY.value),i=B(()=>n.type.value!=="scroll"&&s.value);return(o,a)=>i.value?(I(),N(X1,ce({key:0},t,{ref:f(r)}),{default:A(()=>[Z(o.$slots,"default")]),_:3},16)):xe("v-if",!0)}});function lh(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 Yo(e){const t=ch(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function ch(e,t){const r=e/t;return Number.isNaN(r)?0:r}function eS(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 uh(e,t,r="ltr"){const n=Yo(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],c=yi(e,l[0],l[1]);return lh([0,o],[0,a])(c)}function Zo(e){return e?Number.parseInt(e,10):0}function tS(e,t,r,n="ltr"){const s=Yo(r),i=s/2,o=t||i,a=s-o,l=r.scrollbar.paddingStart+o,c=r.scrollbar.size-r.scrollbar.paddingEnd-a,u=r.content-r.viewport,d=n==="ltr"?[0,u]:[u*-1,0];return lh([l,c],d)(e)}function dh(e,t){return e>0&&e<t}var rS=G({__name:"ScrollAreaScrollbarX",setup(e){const t=sr(),r=Qo(),{forwardRef:n,currentElement:s}=ye();Ue(()=>{s.value&&t.onScrollbarXChange(s.value)});const i=B(()=>r.sizes.value);return(o,a)=>(I(),N(ph,{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(Yo)(i.value)}px`:void 0}),onOnDragScroll:a[0]||(a[0]=l=>f(r).onDragScroll(l.x))},{default:A(()=>[Z(o.$slots,"default")]),_:3},8,["style"]))}}),nS=G({__name:"ScrollAreaScrollbarY",setup(e){const t=sr(),r=Qo(),{forwardRef:n,currentElement:s}=ye();Ue(()=>{s.value&&t.onScrollbarYChange(s.value)});const i=B(()=>r.sizes.value);return(o,a)=>(I(),N(ph,{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(Yo)(i.value)}px`:void 0}),onOnDragScroll:a[0]||(a[0]=l=>f(r).onDragScroll(l.y))},{default:A(()=>[Z(o.$slots,"default")]),_:3},8,["style"]))}}),fh=G({__name:"ScrollAreaScrollbarAuto",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=sr(),r=Xo(),{forwardRef:n}=ye(),s=F(!1),i=hp(()=>{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 Ue(()=>i()),Ln(t.viewport,i),Ln(t.content,i),(o,a)=>(I(),N(f(jn),{present:o.forceMount||s.value},{default:A(()=>[D(cc,ce(o.$attrs,{ref:f(n),"data-state":s.value?"visible":"hidden"}),{default:A(()=>[Z(o.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),sS=G({inheritAttrs:!1,__name:"ScrollAreaScrollbarHover",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=sr(),{forwardRef:r}=ye();let n;const s=F(!1);function i(){window.clearTimeout(n),s.value=!0}function o(){n=window.setTimeout(()=>{s.value=!1},t.scrollHideDelay.value)}return Ue(()=>{const a=t.scrollArea.value;a&&(a.addEventListener("pointerenter",i),a.addEventListener("pointerleave",o))}),Rt(()=>{const a=t.scrollArea.value;a&&(window.clearTimeout(n),a.removeEventListener("pointerenter",i),a.removeEventListener("pointerleave",o))}),(a,l)=>(I(),N(f(jn),{present:a.forceMount||s.value},{default:A(()=>[D(fh,ce(a.$attrs,{ref:f(r),"data-state":s.value?"visible":"hidden"}),{default:A(()=>[Z(a.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),iS=G({__name:"ScrollAreaScrollbarScroll",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=sr(),r=Xo(),{forwardRef:n}=ye(),{state:s,dispatch:i}=Cp("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=B(()=>s.value!=="hidden");st(l=>{if(s.value==="idle"){const c=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);l(()=>{window.clearTimeout(c)})}});const a=hp(()=>i("SCROLL_END"),100);return st(l=>{const c=t.viewport.value,u=r.isHorizontal.value?"scrollLeft":"scrollTop";if(c){let d=c[u];const p=()=>{const h=c[u];d!==h&&(i("SCROLL"),a()),d=h};c.addEventListener("scroll",p),l(()=>{c.removeEventListener("scroll",p)})}}),(l,c)=>(I(),N(f(jn),{present:l.forceMount||o.value},{default:A(()=>[D(cc,ce(l.$attrs,{ref:f(n),"data-state":o.value?"visible":"hidden"}),{default:A(()=>[Z(l.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),[Xo,oS]=vt("ScrollAreaScrollbar"),aS=G({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}=ye(),n=sr(),s=B(()=>t.orientation==="horizontal");Ie(s,()=>{s.value?n.onScrollbarXEnabledChange(!0):n.onScrollbarYEnabledChange(!0)},{immediate:!0}),Rt(()=>{n.onScrollbarXEnabledChange(!1),n.onScrollbarYEnabledChange(!1)});const{orientation:i,forceMount:o,asChild:a,as:l}=ft(t);return oS({orientation:i,forceMount:o,isHorizontal:s,as:l,asChild:a}),(c,u)=>f(n).type.value==="hover"?(I(),N(sS,ce({key:0},c.$attrs,{ref:f(r),"force-mount":f(o)}),{default:A(()=>[Z(c.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="scroll"?(I(),N(iS,ce({key:1},c.$attrs,{ref:f(r),"force-mount":f(o)}),{default:A(()=>[Z(c.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="auto"?(I(),N(fh,ce({key:2},c.$attrs,{ref:f(r),"force-mount":f(o)}),{default:A(()=>[Z(c.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="always"?(I(),N(cc,ce({key:3},c.$attrs,{ref:f(r),"data-state":"visible"}),{default:A(()=>[Z(c.$slots,"default")]),_:3},16)):xe("v-if",!0)}}),[Qo,lS]=vt("ScrollAreaScrollbarVisible"),cc=G({__name:"ScrollAreaScrollbarVisible",setup(e){const t=sr(),r=Xo(),{forwardRef:n}=ye(),s=F({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),i=B(()=>{const g=ch(s.value.viewport,s.value.content);return g>0&&g<1}),o=F(),a=F(0);function l(g,x){if(h.value){const y=t.viewport.value.scrollLeft+g.deltaY;t.viewport.value.scrollLeft=y,dh(y,x)&&g.preventDefault()}else{const y=t.viewport.value.scrollTop+g.deltaY;t.viewport.value.scrollTop=y,dh(y,x)&&g.preventDefault()}}function c(g,x){h.value?a.value=x.x:a.value=x.y}function u(g){a.value=0}function d(g){s.value=g}function p(g,x){return tS(g,a.value,s.value,x)}const h=B(()=>r.isHorizontal.value);function m(g){h.value?t.viewport.value.scrollLeft=p(g,t.dir.value):t.viewport.value.scrollTop=p(g)}function w(){if(h.value){if(t.viewport.value&&o.value){const g=t.viewport.value.scrollLeft,x=uh(g,s.value,t.dir.value);o.value.style.transform=`translate3d(${x}px, 0, 0)`}}else if(t.viewport.value&&o.value){const g=t.viewport.value.scrollTop,x=uh(g,s.value);o.value.style.transform=`translate3d(0, ${x}px, 0)`}}function S(g){o.value=g}return lS({sizes:s,hasThumb:i,handleWheelScroll:l,handleThumbDown:c,handleThumbUp:u,handleSizeChange:d,onThumbPositionChange:w,onThumbChange:S,onDragScroll:m}),(g,x)=>h.value?(I(),N(rS,ce({key:0},g.$attrs,{ref:f(n)}),{default:A(()=>[Z(g.$slots,"default")]),_:3},16)):(I(),N(nS,ce({key:1},g.$attrs,{ref:f(n)}),{default:A(()=>[Z(g.$slots,"default")]),_:3},16))}}),ph=G({__name:"ScrollAreaScrollbarImpl",props:{isHorizontal:{type:Boolean,required:!0}},emits:["onDragScroll","onWheelScroll","onThumbPointerDown"],setup(e,{emit:t}){const r=e,n=t,s=sr(),i=Qo(),o=Xo(),{forwardRef:a,currentElement:l}=ye(),c=F(""),u=F();function d(g){u.value&&n("onDragScroll",{x:g.clientX-u.value?.left,y:g.clientY-u.value?.top})}function p(g){g.button===0&&(g.target.setPointerCapture(g.pointerId),u.value=l.value.getBoundingClientRect(),c.value=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",s.viewport&&(s.viewport.value.style.scrollBehavior="auto"),d(g))}function h(g){d(g)}function m(g){const x=g.target;x.hasPointerCapture(g.pointerId)&&x.releasePointerCapture(g.pointerId),document.body.style.webkitUserSelect=c.value,s.viewport&&(s.viewport.value.style.scrollBehavior=""),u.value=void 0}function w(g){const x=g.target,y=l.value?.contains(x),b=i.sizes.value.content-i.sizes.value.viewport;y&&i.handleWheelScroll(g,b)}Ue(()=>{document.addEventListener("wheel",w,{passive:!1})}),Rt(()=>{document.removeEventListener("wheel",w)});function S(){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:Zo(getComputedStyle(l.value).paddingLeft),paddingEnd:Zo(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:Zo(getComputedStyle(l.value).paddingTop),paddingEnd:Zo(getComputedStyle(l.value).paddingBottom)}}),i.onThumbPositionChange())}return Ln(l,S),Ln(s.content,S),(g,x)=>(I(),N(f(De),{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:A(()=>[Z(g.$slots,"default")]),_:3},8,["as","as-child"]))}}),cS=G({__name:"ScrollAreaThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=sr(),n=Qo();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}=ye(),l=F(),c=B(()=>r.viewport.value);function u(){l.value||(l.value=eS(c.value,n.onThumbPositionChange),n.onThumbPositionChange())}return Ab(B(()=>n.sizes.value),()=>{n.onThumbChange(a.value),c.value&&(n.onThumbPositionChange(),c.value.addEventListener("scroll",u))}),Rt(()=>{c.value.removeEventListener("scroll",u),r.viewport.value?.removeEventListener("scroll",u)}),(d,p)=>(I(),N(f(De),{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:A(()=>[Z(d.$slots,"default")]),_:3},8,["data-state","as-child","as"]))}}),uS=G({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}=ft(r),s=ah(n),i=sr(),o=F();Ue(()=>{i.onViewportChange(o.value),i.onContentChange(l.value)}),t({viewportElement:o});const{forwardRef:a,currentElement:l}=ye();return(c,u)=>(I(),ve(Oe,null,[re("div",ce({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"}},c.$attrs,{tabindex:0}),[D(f(De),{ref:f(a),style:mt({minWidth:f(i).scrollbarXEnabled.value?"fit-content":void 0}),"as-child":r.asChild,as:c.as},{default:A(()=>[Z(c.$slots,"default")]),_:3},8,["style","as-child","as"])],16),D(f(De),{as:"style",nonce:f(s)},{default:A(()=>u[0]||(u[0]=[$e(" /* 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))}}),dS=[" ","Enter","ArrowUp","ArrowDown"],fS=[" ","Enter"],tE=10;function xi(e,t,r){return e===void 0?!1:Array.isArray(e)?e.some(n=>uc(n,t,r)):uc(e,t,r)}function uc(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]:wi(e,t)}function pS(e){return e==null||e===""||Array.isArray(e)&&e.length===0}var hS={key:0,value:""},[xn,hh]=vt("SelectRoot"),gS=G({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}=ft(r),l=yn(r,"modelValue",n,{defaultValue:r.defaultValue??(o.value?[]:void 0),passive:r.modelValue===void 0,deep:!0}),c=yn(r,"open",n,{defaultValue:r.defaultOpen,passive:r.open===void 0}),u=F(),d=F(),p=F({x:0,y:0}),h=B(()=>o.value&&Array.isArray(l.value)?l.value?.length===0:Pl(l.value));hr({isProvider:!0});const m=bi(a),w=No(u),S=F(new Set),g=B(()=>Array.from(S.value).map(b=>b.value).join(";"));function x(b){if(o.value){const _=Array.isArray(l.value)?[...l.value]:[],$=_.findIndex(R=>uc(R,b,r.by));$===-1?_.push(b):_.splice($,1),l.value=[..._]}else l.value=b}function y(b){return Array.from(S.value).find(_=>xi(b,_.value,r.by))}return hh({triggerElement:u,onTriggerChange:b=>{u.value=b},valueElement:d,onValueElementChange:b=>{d.value=b},contentId:"",modelValue:l,onValueChange:x,by:r.by,open:c,multiple:o,required:s,onOpenChange:b=>{c.value=b},dir:m,triggerPointerDownPosRef:p,disabled:i,isEmptyModelValue:h,optionsSet:S,onOptionAdd:b=>{const _=y(b.value);_&&S.value.delete(_),S.value.add(b)},onOptionRemove:b=>{const _=y(b.value);_&&S.value.delete(_)}}),(b,_)=>(I(),N(f(qp),null,{default:A(()=>[Z(b.$slots,"default",{modelValue:f(l),open:f(c)}),f(w)?(I(),N(vS,{key:g.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:A(()=>[f(Pl)(f(l))?(I(),ve("option",hS)):xe("v-if",!0),(I(!0),ve(Oe,null,Xt(Array.from(S.value),$=>(I(),ve("option",ce({key:$.value??""},{ref_for:!0},$),null,16))),128))]),_:1},8,["multiple","required","name","autocomplete","disabled","value"])):xe("v-if",!0)]),_:3}))}}),vS=G({__name:"BubbleSelect",props:{autocomplete:{type:String,required:!1},autofocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},form:{type:String,required:!1},multiple:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},size:{type:Number,required:!1},value:{type:null,required:!1}},setup(e){const t=e,r=F(),n=xn();Ie(()=>t.value,(i,o)=>{const a=window.HTMLSelectElement.prototype,l=Object.getOwnPropertyDescriptor(a,"value").set;if(i!==o&&l&&r.value){const c=new Event("change",{bubbles:!0});l.call(r.value,i),r.value.dispatchEvent(c)}});function s(i){n.onValueChange(i.target.value)}return(i,o)=>(I(),N(f(Gl),{"as-child":""},{default:A(()=>[re("select",ce({ref_key:"selectElement",ref:r},t,{onInput:s}),[Z(i.$slots,"default")],16)]),_:3}))}}),mS=G({__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},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=Er(e);return(r,n)=>(I(),N(f(oh),ce(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:A(()=>[Z(r.$slots,"default")]),_:3},16))}}),wS={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[Kn,gh]=vt("SelectContent"),yS=G({__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},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}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=t,s=xn();Hb(),vp(r.bodyLock);const{CollectionSlot:i,getItems:o}=hr(),a=F();bp(a);const{search:l,handleTypeaheadSearch:c}=_p(),u=F(),d=F(),p=F(),h=F(!1),m=F(!1),w=F(!1);function S(){d.value&&a.value&&$p([d.value,a.value])}Ie(h,()=>{S()});const{onOpenChange:g,triggerPointerDownPosRef:x}=s;st(_=>{if(!a.value)return;let $={x:0,y:0};const R=P=>{$={x:Math.abs(Math.round(P.pageX)-(x.value?.x??0)),y:Math.abs(Math.round(P.pageY)-(x.value?.y??0))}},v=P=>{P.pointerType!=="touch"&&($.x<=10&&$.y<=10?P.preventDefault():a.value?.contains(P.target)||g(!1),document.removeEventListener("pointermove",R),x.value=null)};x.value!==null&&(document.addEventListener("pointermove",R),document.addEventListener("pointerup",v,{capture:!0,once:!0})),_(()=>{document.removeEventListener("pointermove",R),document.removeEventListener("pointerup",v,{capture:!0})})});function y(_){const $=_.ctrlKey||_.altKey||_.metaKey;if(_.key==="Tab"&&_.preventDefault(),!$&&_.key.length===1&&c(_.key,o()),["ArrowUp","ArrowDown","Home","End"].includes(_.key)){let R=[...o().map(v=>v.ref)];if(["ArrowUp","End"].includes(_.key)&&(R=R.slice().reverse()),["ArrowUp","ArrowDown"].includes(_.key)){const v=_.target,P=R.indexOf(v);R=R.slice(P+1)}setTimeout(()=>$p(R)),_.preventDefault()}}const b=Er(B(()=>r.position==="popper"?r:{}).value);return gh({content:a,viewport:u,onViewportChange:_=>{u.value=_},itemRefCallback:(_,$,R)=>{const v=!m.value&&!R,P=xi(s.modelValue.value,$,s.by);if(s.multiple.value){if(w.value)return;(P||v)&&(d.value=_,P&&(w.value=!0))}else(P||v)&&(d.value=_);v&&(m.value=!0)},selectedItem:d,selectedItemText:p,onItemLeave:()=>{a.value?.focus()},itemTextRefCallback:(_,$,R)=>{const v=!m.value&&!R;(xi(s.modelValue.value,$,s.by)||v)&&(p.value=_)},focusSelectedItem:S,position:r.position,isPositioned:h,searchRef:l}),(_,$)=>(I(),N(f(i),null,{default:A(()=>[D(f(Ip),{"as-child":"",onMountAutoFocus:$[6]||($[6]=Cr(()=>{},["prevent"])),onUnmountAutoFocus:$[7]||($[7]=R=>{n("closeAutoFocus",R),!R.defaultPrevented&&(f(s).triggerElement.value?.focus({preventScroll:!0}),R.preventDefault())})},{default:A(()=>[D(f(Ul),{"as-child":"","disable-outside-pointer-events":"",onFocusOutside:$[2]||($[2]=Cr(()=>{},["prevent"])),onDismiss:$[3]||($[3]=R=>f(s).onOpenChange(!1)),onEscapeKeyDown:$[4]||($[4]=R=>n("escapeKeyDown",R)),onPointerDownOutside:$[5]||($[5]=R=>n("pointerDownOutside",R))},{default:A(()=>[(I(),N(Rn(_.position==="popper"?mS:SS),ce({..._.$attrs,...f(b)},{id:f(s).contentId,ref:R=>{const v=f(Tr)(R);v?.hasAttribute("data-reka-popper-content-wrapper")?a.value=v.firstElementChild:a.value=v},role:"listbox","data-state":f(s).open.value?"open":"closed",dir:f(s).dir.value,style:{display:"flex",flexDirection:"column",outline:"none"},onContextmenu:$[0]||($[0]=Cr(()=>{},["prevent"])),onPlaced:$[1]||($[1]=R=>h.value=!0),onKeydown:y}),{default:A(()=>[Z(_.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3})]),_:3})]),_:3}))}}),[dc,bS]=vt("SelectItemAlignedPosition"),SS=G({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}=hr(),i=xn(),o=Kn(),a=F(!1),l=F(!0),c=F(),{forwardRef:u,currentElement:d}=ye(),{viewport:p,selectedItem:h,selectedItemText:m,focusSelectedItem:w}=o;function S(){if(i.triggerElement.value&&i.valueElement.value&&c.value&&d.value&&p?.value&&h?.value&&m?.value){const y=i.triggerElement.value.getBoundingClientRect(),b=d.value.getBoundingClientRect(),_=i.valueElement.value.getBoundingClientRect(),$=m.value.getBoundingClientRect();if(i.dir.value!=="rtl"){const Y=$.left-b.left,M=_.left-Y,ne=y.left-M,Ee=y.width+ne,me=Math.max(Ee,b.width),Fe=window.innerWidth-10,et=yi(M,10,Math.max(10,Fe-me));c.value.style.minWidth=`${Ee}px`,c.value.style.left=`${et}px`}else{const Y=b.right-$.right,M=window.innerWidth-_.right-Y,ne=window.innerWidth-y.right-M,Ee=y.width+ne,me=Math.max(Ee,b.width),Fe=window.innerWidth-10,et=yi(M,10,Math.max(10,Fe-me));c.value.style.minWidth=`${Ee}px`,c.value.style.right=`${et}px`}const R=s().map(Y=>Y.ref),v=window.innerHeight-20,P=p.value.scrollHeight,O=window.getComputedStyle(d.value),C=Number.parseInt(O.borderTopWidth,10),T=Number.parseInt(O.paddingTop,10),E=Number.parseInt(O.borderBottomWidth,10),q=Number.parseInt(O.paddingBottom,10),j=C+T+P+q+E,z=Math.min(h.value.offsetHeight*5,j),J=window.getComputedStyle(p.value),U=Number.parseInt(J.paddingTop,10),Ae=Number.parseInt(J.paddingBottom,10),be=y.top+y.height/2-10,Qe=v-be,Be=h.value.offsetHeight/2,W=h.value.offsetTop+Be,se=C+T+W,ie=j-se;if(se<=be){const Y=h.value===R[R.length-1];c.value.style.bottom="0px";const M=d.value.clientHeight-p.value.offsetTop-p.value.offsetHeight,ne=se+Math.max(Qe,Be+(Y?Ae:0)+M+E);c.value.style.height=`${ne}px`}else{const Y=h.value===R[0];c.value.style.top="0px";const M=Math.max(be,C+p.value.offsetTop+(Y?U:0)+Be)+ie;c.value.style.height=`${M}px`,p.value.scrollTop=se-be+p.value.offsetTop}c.value.style.margin="10px 0",c.value.style.minHeight=`${z}px`,c.value.style.maxHeight=`${v}px`,n("placed"),requestAnimationFrame(()=>a.value=!0)}}const g=F("");Ue(async()=>{await at(),S(),d.value&&(g.value=window.getComputedStyle(d.value).zIndex)});function x(y){y&&l.value===!0&&(S(),w?.(),l.value=!1)}return Ln(i.triggerElement,()=>{S()}),bS({contentWrapper:c,shouldExpandOnScrollRef:a,onScrollButtonChange:x}),(y,b)=>(I(),ve("div",{ref_key:"contentWrapperElement",ref:c,style:mt({display:"flex",flexDirection:"column",position:"fixed",zIndex:g.value})},[D(f(De),ce({ref:f(u),style:{boxSizing:"border-box",maxHeight:"100%"}},{...y.$attrs,...r}),{default:A(()=>[Z(y.$slots,"default")]),_:3},16)],4))}}),CS=G({inheritAttrs:!1,__name:"SelectProvider",props:{context:{type:Object,required:!0}},setup(e){return hh(e.context),gh(wS),(t,r)=>Z(t.$slots,"default")}}),_S={key:1},xS=G({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},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}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=Ar(r,t),s=xn(),i=F();Ue(()=>{i.value=new DocumentFragment});const o=F(),a=B(()=>r.forceMount||s.open.value),l=F(a.value);return Ie(a,()=>{setTimeout(()=>l.value=a.value)}),(c,u)=>a.value||l.value||o.value?.present?(I(),N(f(jn),{key:0,ref_key:"presenceRef",ref:o,present:a.value},{default:A(()=>[D(yS,Ht(Dt({...f(n),...c.$attrs})),{default:A(()=>[Z(c.$slots,"default")]),_:3},16)]),_:3},8,["present"])):i.value?(I(),ve("div",_S,[(I(),N(Aa,{to:i.value},[D(CS,{context:f(s)},{default:A(()=>[Z(c.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):xe("v-if",!0)}}),[rE,TS]=vt("SelectGroup"),ES=G({__name:"SelectGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=Vn(void 0,"reka-select-group");return TS({id:r}),(n,s)=>(I(),N(f(De),ce({role:"group"},t,{"aria-labelledby":f(r)}),{default:A(()=>[Z(n.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),AS=G({__name:"SelectIcon",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){return(t,r)=>(I(),N(f(De),{"aria-hidden":"true",as:t.as,"as-child":t.asChild},{default:A(()=>[Z(t.$slots,"default",{},()=>[r[0]||(r[0]=$e("▼"))])]),_:3},8,["as","as-child"]))}}),[vh,kS]=vt("SelectItem"),IS=G({__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}=ft(r),i=xn(),o=Kn(),{forwardRef:a,currentElement:l}=ye(),{CollectionItem:c}=hr(),u=B(()=>xi(i.modelValue?.value,r.value,i.by)),d=F(!1),p=F(r.textValue??""),h=Vn(void 0,"reka-select-item-text"),m="select.select";async function w(b){b.defaultPrevented||Dl(m,S,{originalEvent:b,value:r.value})}async function S(b){await at(),n("select",b),!b.defaultPrevented&&(s.value||(i.onValueChange(r.value),i.multiple.value||i.onOpenChange(!1)))}async function g(b){await at(),!b.defaultPrevented&&(s.value?o.onItemLeave?.():b.currentTarget?.focus({preventScroll:!0}))}async function x(b){await at(),!b.defaultPrevented&&b.currentTarget===Pt()&&o.onItemLeave?.()}async function y(b){await at(),!b.defaultPrevented&&(o.searchRef?.value!==""&&b.key===" "||(fS.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 Ue(()=>{l.value&&o.itemRefCallback(l.value,r.value,r.disabled)}),kS({value:r.value,disabled:s,textId:h,isSelected:u,onItemTextChange:b=>{p.value=((p.value||b?.textContent)??"").trim()}}),(b,_)=>(I(),N(f(c),{value:{textValue:p.value}},{default:A(()=>[D(f(De),{ref:f(a),role:"option","aria-labelledby":f(h),"data-highlighted":d.value?"":void 0,"aria-selected":u.value,"data-state":u.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:_[0]||(_[0]=$=>d.value=!0),onBlur:_[1]||(_[1]=$=>d.value=!1),onPointerup:w,onPointerdown:_[2]||(_[2]=$=>{$.currentTarget.focus({preventScroll:!0})}),onTouchend:_[3]||(_[3]=Cr(()=>{},["prevent","stop"])),onPointermove:g,onPointerleave:x,onKeydown:y},{default:A(()=>[Z(b.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"])]),_:3},8,["value"]))}}),RS=G({__name:"SelectItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,r=vh();return(n,s)=>f(r).isSelected.value?(I(),N(f(De),ce({key:0,"aria-hidden":"true"},t),{default:A(()=>[Z(n.$slots,"default")]),_:3},16)):xe("v-if",!0)}}),$S=G({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,r=xn(),n=Kn(),s=vh(),{forwardRef:i,currentElement:o}=ye(),a=B(()=>({value:s.value,disabled:s.disabled.value,textContent:o.value?.textContent??s.value?.toString()??""}));return Ue(()=>{o.value&&(s.onItemTextChange(o.value),n.itemTextRefCallback(o.value,s.value,s.disabled.value),r.onOptionAdd(a.value))}),Rt(()=>{r.onOptionRemove(a.value)}),(l,c)=>(I(),N(f(De),ce({id:f(s).textId,ref:f(i)},{...t,...l.$attrs}),{default:A(()=>[Z(l.$slots,"default")]),_:3},16,["id"]))}}),DS=G({__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)=>(I(),N(f(Wl),Ht(Dt(t)),{default:A(()=>[Z(r.$slots,"default")]),_:3},16))}}),mh=G({__name:"SelectScrollButtonImpl",emits:["autoScroll"],setup(e,{emit:t}){const r=t,{getItems:n}=hr(),s=Kn(),i=F(null);function o(){i.value!==null&&(window.clearInterval(i.value),i.value=null)}st(()=>{n().map(c=>c.ref).find(c=>c===Pt())?.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()),(c,u)=>(I(),N(f(De),ce({"aria-hidden":"true",style:{flexShrink:0}},c.$parent?.$props,{onPointerdown:a,onPointermove:l,onPointerleave:u[0]||(u[0]=()=>{o()})}),{default:A(()=>[Z(c.$slots,"default")]),_:3},16))}}),PS=G({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=Kn(),r=t.position==="item-aligned"?dc():void 0,{forwardRef:n,currentElement:s}=ye(),i=F(!1);return st(o=>{if(t.viewport?.value&&t.isPositioned?.value){let c=function(){const u=l.scrollHeight-l.clientHeight;i.value=Math.ceil(l.scrollTop)<u};var a=c;const l=t.viewport.value;c(),l.addEventListener("scroll",c),o(()=>l.removeEventListener("scroll",c))}}),Ie(s,()=>{s.value&&r?.onScrollButtonChange(s.value)}),(o,a)=>i.value?(I(),N(mh,{key:0,ref:f(n),onAutoScroll:a[0]||(a[0]=()=>{const{viewport:l,selectedItem:c}=f(t);l?.value&&c?.value&&(l.value.scrollTop=l.value.scrollTop+c.value.offsetHeight)})},{default:A(()=>[Z(o.$slots,"default")]),_:3},512)):xe("v-if",!0)}}),OS=G({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=Kn(),r=t.position==="item-aligned"?dc():void 0,{forwardRef:n,currentElement:s}=ye(),i=F(!1);return st(o=>{if(t.viewport?.value&&t.isPositioned?.value){let c=function(){i.value=l.scrollTop>0};var a=c;const l=t.viewport.value;c(),l.addEventListener("scroll",c),o(()=>l.removeEventListener("scroll",c))}}),Ie(s,()=>{s.value&&r?.onScrollButtonChange(s.value)}),(o,a)=>i.value?(I(),N(mh,{key:0,ref:f(n),onAutoScroll:a[0]||(a[0]=()=>{const{viewport:l,selectedItem:c}=f(t);l?.value&&c?.value&&(l.value.scrollTop=l.value.scrollTop-c.value.offsetHeight)})},{default:A(()=>[Z(o.$slots,"default")]),_:3},512)):xe("v-if",!0)}}),HS=G({__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=xn(),{forwardRef:n,currentElement:s}=ye(),i=B(()=>r.disabled?.value||t.disabled);r.contentId||(r.contentId=Vn(void 0,"reka-select-content")),Ue(()=>{r.onTriggerChange(s.value)});const{getItems:o}=hr(),{search:a,handleTypeaheadSearch:l,resetTypeahead:c}=_p();function u(){i.value||(r.onOpenChange(!0),c())}function d(p){u(),r.triggerPointerDownPosRef.value={x:Math.round(p.pageX),y:Math.round(p.pageY)}}return(p,h)=>(I(),N(f(Np),{"as-child":"",reference:p.reference},{default:A(()=>[D(f(De),{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(pS)(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]=Cr(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(dS).includes(m.key)&&(u(),m.preventDefault()))})},{default:A(()=>[Z(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"]))}}),MS=G({__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}=ye(),s=xn();Ue(()=>{s.valueElement=n});const i=B(()=>{let a=[];const l=Array.from(s.optionsSet.value),c=u=>l.find(d=>xi(u,d.value,s.by));return Array.isArray(s.modelValue.value)?a=s.modelValue.value.map(u=>c(u)?.textContent??""):a=[c(s.modelValue.value)?.textContent??""],a.filter(Boolean)}),o=B(()=>i.value.length?i.value.join(", "):t.placeholder);return(a,l)=>(I(),N(f(De),{ref:f(r),as:a.as,"as-child":a.asChild,style:{pointerEvents:"none"},"data-placeholder":i.value.length?void 0:t.placeholder},{default:A(()=>[Z(a.$slots,"default",{selectedLabel:i.value,modelValue:f(s).modelValue.value},()=>[$e(Re(o.value),1)])]),_:3},8,["as","as-child","data-placeholder"]))}}),qS=G({__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}=ft(t),n=ah(r),s=Kn(),i=s.position==="item-aligned"?dc():void 0,{forwardRef:o,currentElement:a}=ye();Ue(()=>{s?.onViewportChange(a.value)});const l=F(0);function c(u){const d=u.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,S=Number.parseFloat(h.value.style.minHeight),g=Number.parseFloat(h.value.style.height),x=Math.max(S,g);if(x<w){const y=x+m,b=Math.min(w,y),_=y-b;h.value.style.height=`${b}px`,h.value.style.bottom==="0px"&&(d.scrollTop=_>0?_:0,h.value.style.justifyContent="flex-end")}}}l.value=d.scrollTop}return(u,d)=>(I(),ve(Oe,null,[D(f(De),ce({ref:f(o),"data-reka-select-viewport":"",role:"presentation"},{...u.$attrs,...t},{style:{position:"relative",flex:1,overflow:"hidden auto"},onScroll:c}),{default:A(()=>[Z(u.$slots,"default")]),_:3},16),D(f(De),{as:"style",nonce:f(n)},{default:A(()=>d[0]||(d[0]=[$e(" /* 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))}}),NS=G({__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=B(()=>n(t.orientation)?t.orientation:"horizontal"),i=B(()=>s.value==="vertical"?t.orientation:void 0),o=B(()=>t.decorative?{role:"none"}:{"aria-orientation":i.value,role:"separator"});return(a,l)=>(I(),N(f(De),ce({as:a.as,"as-child":a.asChild,"data-orientation":s.value},o.value),{default:A(()=>[Z(a.$slots,"default")]),_:3},16,["as","as-child","data-orientation"]))}}),BS=G({__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)=>(I(),N(NS,Ht(Dt(t)),{default:A(()=>[Z(r.$slots,"default")]),_:3},16))}});function FS(e=[],t,r){const n=[...e];return n[r]=t,n.sort((s,i)=>s-i)}function wh(e,t,r){return yi(100/(r-t)*(e-t),0,100)}function LS(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function VS(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 jS(e,t,r){const n=e/2;return(n-fc([0,50],[0,n])(t)*r)*r}function US(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function zS(e,t){if(t>0){const r=US(e);return Math.min(...r)>=t}return!0}function fc(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 KS(e){return(String(e).split(".")[1]||"").length}function WS(e,t){const r=10**t;return Math.round(e*r)/r}var yh=["PageUp","PageDown"],bh=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Sh={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageUp","ArrowUp","ArrowLeft"]},[Ch,_h]=vt(["SliderVertical","SliderHorizontal"]),GS=G({__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}=ft(r),{forwardRef:l,currentElement:c}=ye(),u=Ds(),d=F(),p=F(),h=B(()=>o?.value!=="rtl"&&!a.value||o?.value!=="ltr"&&a.value);function m(w,S){const g=p.value||c.value.getBoundingClientRect(),x=[...u.thumbElements.value][u.valueIndexToChangeRef.value],y=u.thumbAlignment.value==="contain"?x.clientWidth:0;!d.value&&!S&&u.thumbAlignment.value==="contain"&&(d.value=w.clientX-x.getBoundingClientRect().left);const b=fc([0,g.width-y],h.value?[i.value,s.value]:[s.value,i.value]);return p.value=g,b(S?w.clientX-g.left-y/2:w.clientX-g.left-(d.value??0))}return _h({startEdge:B(()=>h.value?"left":"right"),endEdge:B(()=>h.value?"right":"left"),direction:B(()=>h.value?1:-1),size:"width"}),(w,S)=>(I(),N(xh,{ref:f(l),dir:f(o),"data-orientation":"horizontal",style:mt({"--reka-slider-thumb-transform":!h.value&&f(u).thumbAlignment.value==="overflow"?"translateX(50%)":"translateX(-50%)"}),onSlideStart:S[0]||(S[0]=g=>{n("slideStart",m(g,!0))}),onSlideMove:S[1]||(S[1]=g=>{n("slideMove",m(g))}),onSlideEnd:S[2]||(S[2]=()=>{p.value=void 0,d.value=void 0,n("slideEnd")}),onStepKeyDown:S[3]||(S[3]=g=>{const x=h.value?"from-left":"from-right";n("stepKeyDown",g,f(Sh)[x].includes(g.key)?-1:1)}),onEndKeyDown:S[4]||(S[4]=g=>n("endKeyDown",g)),onHomeKeyDown:S[5]||(S[5]=g=>n("homeKeyDown",g))},{default:A(()=>[Z(w.$slots,"default")]),_:3},8,["dir","style"]))}}),JS=G({__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}=ft(r),a=Ds(),{forwardRef:l,currentElement:c}=ye(),u=F(),d=F(),p=B(()=>!o.value);function h(m,w){const S=d.value||c.value.getBoundingClientRect(),g=[...a.thumbElements.value][a.valueIndexToChangeRef.value],x=a.thumbAlignment.value==="contain"?g.clientHeight:0;!u.value&&!w&&a.thumbAlignment.value==="contain"&&(u.value=m.clientY-g.getBoundingClientRect().top);const y=fc([0,S.height-x],p.value?[s.value,i.value]:[i.value,s.value]),b=w?m.clientY-S.top-x/2:m.clientY-S.top-(u.value??0);return d.value=S,y(b)}return _h({startEdge:B(()=>p.value?"bottom":"top"),endEdge:B(()=>p.value?"top":"bottom"),direction:B(()=>p.value?1:-1),size:"height"}),(m,w)=>(I(),N(xh,{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]=S=>{n("slideStart",h(S,!0))}),onSlideMove:w[1]||(w[1]=S=>{n("slideMove",h(S))}),onSlideEnd:w[2]||(w[2]=()=>{d.value=void 0,u.value=void 0,n("slideEnd")}),onStepKeyDown:w[3]||(w[3]=S=>{const g=p.value?"from-bottom":"from-top";n("stepKeyDown",S,f(Sh)[g].includes(S.key)?-1:1)}),onEndKeyDown:w[4]||(w[4]=S=>n("endKeyDown",S)),onHomeKeyDown:w[5]||(w[5]=S=>n("homeKeyDown",S))},{default:A(()=>[Z(m.$slots,"default")]),_:3},8,["style"]))}}),[Ds,YS]=vt("SliderRoot"),ZS=G({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:c,thumbAlignment:u,dir:d}=ft(r),p=bi(d),{forwardRef:h,currentElement:m}=ye(),w=No(m),{CollectionSlot:S}=hr({isProvider:!0}),g=yn(r,"modelValue",n,{defaultValue:r.defaultValue,passive:r.modelValue===void 0}),x=B(()=>Array.isArray(g.value)?[...g.value]:[]),y=F(0),b=F(x.value);function _(O){v(O,VS(x.value,O))}function $(O){v(O,y.value)}function R(){const O=b.value[y.value];x.value[y.value]!==O&&n("valueCommit",Me(x.value))}function v(O,C,{commit:T}={commit:!1}){const E=KS(o.value),q=yi(WS(Math.round((O-s.value)/o.value)*o.value+s.value,E),s.value,i.value),j=FS(x.value,q,C);if(zS(j,a.value*o.value)){y.value=j.indexOf(q);const z=String(j)!==String(g.value);z&&T&&n("valueCommit",j),z&&(P.value[y.value]?.focus(),g.value=j)}}const P=F([]);return YS({modelValue:g,currentModelValue:x,valueIndexToChangeRef:y,thumbElements:P,orientation:l,min:s,max:i,disabled:c,thumbAlignment:u}),(O,C)=>(I(),N(f(S),null,{default:A(()=>[(I(),N(Rn(f(l)==="horizontal"?GS:JS),ce(O.$attrs,{ref:f(h),"as-child":O.asChild,as:O.as,min:f(s),max:f(i),dir:f(p),inverted:O.inverted,"aria-disabled":f(c),"data-disabled":f(c)?"":void 0,onPointerdown:C[0]||(C[0]=()=>{f(c)||(b.value=x.value)}),onSlideStart:C[1]||(C[1]=T=>!f(c)&&_(T)),onSlideMove:C[2]||(C[2]=T=>!f(c)&&$(T)),onSlideEnd:C[3]||(C[3]=T=>!f(c)&&R()),onHomeKeyDown:C[4]||(C[4]=T=>!f(c)&&v(f(s),0,{commit:!0})),onEndKeyDown:C[5]||(C[5]=T=>!f(c)&&v(f(i),x.value.length-1,{commit:!0})),onStepKeyDown:C[6]||(C[6]=(T,E)=>{if(!f(c)){const q=f(yh).includes(T.key)||T.shiftKey&&f(bh).includes(T.key)?10:1,j=y.value,z=x.value[j];v(z+f(o)*q*E,j,{commit:!0})}})}),{default:A(()=>[Z(O.$slots,"default",{modelValue:f(g)}),f(w)&&O.name?(I(),N(f(Jl),{key:0,type:"number",value:f(g),name:O.name,required:O.required,disabled:f(c),step:f(o)},null,8,["value","name","required","disabled","step"])):xe("v-if",!0)]),_:3},16,["as-child","as","min","max","dir","inverted","aria-disabled","data-disabled"]))]),_:3}))}}),xh=G({__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=Ds();return(i,o)=>(I(),N(f(De),ce({"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(yh).concat(f(bh)).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:A(()=>[Z(i.$slots,"default")]),_:3},16))}}),XS=G({__name:"SliderRange",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=Ds(),r=Ch();ye();const n=B(()=>t.currentModelValue.value.map(o=>wh(o,t.min.value,t.max.value))),s=B(()=>t.currentModelValue.value.length>1?Math.min(...n.value):0),i=B(()=>100-Math.max(...n.value,0));return(o,a)=>(I(),N(f(De),{"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:A(()=>[Z(o.$slots,"default")]),_:3},8,["data-disabled","data-orientation","as-child","as","style"]))}}),QS=G({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=Ds(),n=Ch(),{forwardRef:s,currentElement:i}=ye(),{CollectionItem:o}=hr(),a=B(()=>r.modelValue?.value?.[t.index]),l=B(()=>a.value===void 0?0:wh(a.value,r.min.value??0,r.max.value??100)),c=B(()=>LS(t.index,r.modelValue?.value?.length??0)),u=Sp(i),d=B(()=>u[n.size].value),p=B(()=>r.thumbAlignment.value==="overflow"||!d.value?0:jS(d.value,l.value,n.direction.value)),h=Ml();return Ue(()=>{r.thumbElements.value.push(i.value)}),Rt(()=>{const m=r.thumbElements.value.findIndex(w=>w===i.value)??-1;r.thumbElements.value.splice(m,1)}),(m,w)=>(I(),N(f(o),null,{default:A(()=>[D(f(De),ce(m.$attrs,{ref:f(s),role:"slider",tabindex:f(r).disabled.value?void 0:0,"aria-label":m.$attrs["aria-label"]||c.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:A(()=>[Z(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}))}}),eC=G({__name:"SliderThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,{getItems:r}=hr(),{forwardRef:n,currentElement:s}=ye(),i=B(()=>s.value?r(!0).findIndex(o=>o.ref===s.value):-1);return(o,a)=>(I(),N(QS,ce({ref:f(n)},t,{index:i.value}),{default:A(()=>[Z(o.$slots,"default")]),_:3},16,["index"]))}}),tC=G({__name:"SliderTrack",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=Ds();return ye(),(r,n)=>(I(),N(f(De),{"as-child":r.asChild,as:r.as,"data-disabled":f(t).disabled.value?"":void 0,"data-orientation":f(t).orientation.value},{default:A(()=>[Z(r.$slots,"default")]),_:3},8,["as-child","as","data-disabled","data-orientation"]))}}),[Th,rC]=vt("ToggleGroupRoot"),nC=G({__name:"ToggleGroupRoot",props:{rovingFocus:{type:Boolean,required:!1,default:!0},disabled:{type:Boolean,required:!1,default:!1},orientation:{type:String,required:!1},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},type:{type:String,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=t,{loop:s,rovingFocus:i,disabled:o,dir:a}=ft(r),l=bi(a),{forwardRef:c,currentElement:u}=ye(),{modelValue:d,changeModelValue:p,isSingle:h}=t0(r,n),m=No(u);return rC({isSingle:h,modelValue:d,changeModelValue:p,dir:l,orientation:r.orientation,loop:s,rovingFocus:i,disabled:o}),(w,S)=>(I(),N(Rn(f(i)?f(O0):f(De)),{"as-child":"",orientation:f(i)?w.orientation:void 0,dir:f(l),loop:f(i)?f(s):void 0},{default:A(()=>[D(f(De),{ref:f(c),role:"group","as-child":w.asChild,as:w.as},{default:A(()=>[Z(w.$slots,"default",{modelValue:f(d)}),f(m)&&w.name?(I(),N(Jl,{key:0,name:w.name,required:w.required,value:f(d)},null,8,["name","required","value"])):xe("v-if",!0)]),_:3},8,["as-child","as"])]),_:3},8,["orientation","dir","loop"]))}}),sC=G({__name:"Toggle",props:{defaultValue:{type:Boolean,required:!1},modelValue:{type:[Boolean,null],required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=t,{forwardRef:s,currentElement:i}=ye(),o=Th(null),a=yn(r,"modelValue",n,{defaultValue:r.defaultValue,passive:r.modelValue===void 0});function l(){a.value=!a.value}const c=B(()=>a.value?"on":"off"),u=No(i);return(d,p)=>(I(),N(f(De),{ref:f(s),type:d.as==="button"?"button":void 0,"as-child":r.asChild,as:d.as,"aria-pressed":f(a),"data-state":c.value,"data-disabled":d.disabled?"":void 0,disabled:d.disabled,onClick:l},{default:A(()=>[Z(d.$slots,"default",{modelValue:f(a),disabled:d.disabled,pressed:f(a),state:c.value}),f(u)&&d.name&&!f(o)?(I(),N(Jl,{key:0,type:"checkbox",name:d.name,value:f(a),required:d.required},null,8,["name","value","required"])):xe("v-if",!0)]),_:3},8,["type","as-child","as","aria-pressed","data-state","data-disabled","disabled"]))}}),iC=G({__name:"ToggleGroupItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,r=Th(),n=B(()=>r.disabled?.value||t.disabled),s=B(()=>cp(r.modelValue.value,t.value)),{forwardRef:i}=ye();return(o,a)=>(I(),N(Rn(f(r).rovingFocus.value?f(H0):f(De)),ce({"as-child":""},f(r).rovingFocus.value?{focusable:!n.value,active:s.value}:{}),{default:A(()=>[D(f(sC),ce(t,{ref:f(i),disabled:n.value,"model-value":s.value,"onUpdate:modelValue":a[0]||(a[0]=l=>f(r).changeModelValue(o.value))}),{default:A(l=>[Z(o.$slots,"default",Ht(Dt(l)))]),_:3},16,["disabled","model-value"])]),_:3},16))}}),oC=G({__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 ye(),(r,n)=>(I(),N(f(G1),Ht(Dt(t)),{default:A(()=>[Z(r.$slots,"default")]),_:3},16))}}),[pc,aC]=vt("TooltipProvider"),lC=G({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}},setup(e){const{delayDuration:t,skipDelayDuration:r,disableHoverableContent:n,disableClosingTrigger:s,ignoreNonKeyboardFocus:i,disabled:o}=ft(e);ye();const a=F(!0),l=F(!1),{start:c,stop:u}=gp(()=>{a.value=!0},r,{immediate:!1});return aC({isOpenDelayed:a,delayDuration:t,onOpen(){u(),a.value=!1},onClose(){c()},isPointerInTransitRef:l,disableHoverableContent:n,disableClosingTrigger:s,disabled:o,ignoreNonKeyboardFocus:i}),(d,p)=>Z(d.$slots,"default")}}),Eh="tooltip.open",[ea,cC]=vt("TooltipRoot"),uC=G({__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;ye();const s=pc(),i=B(()=>r.disableHoverableContent??s.disableHoverableContent.value),o=B(()=>r.disableClosingTrigger??s.disableClosingTrigger.value),a=B(()=>r.disabled??s.disabled.value),l=B(()=>r.delayDuration??s.delayDuration.value),c=B(()=>r.ignoreNonKeyboardFocus??s.ignoreNonKeyboardFocus.value),u=yn(r,"open",n,{defaultValue:r.defaultOpen,passive:r.open===void 0});Ie(u,y=>{s.onClose&&(y?(s.onOpen(),document.dispatchEvent(new CustomEvent(Eh))):s.onClose())});const d=F(!1),p=F(),h=B(()=>u.value?d.value?"delayed-open":"instant-open":"closed"),{start:m,stop:w}=gp(()=>{d.value=!0,u.value=!0},l,{immediate:!1});function S(){w(),d.value=!1,u.value=!0}function g(){w(),u.value=!1}function x(){m()}return cC({contentId:"",open:u,stateAttribute:h,trigger:p,onTriggerChange(y){p.value=y},onTriggerEnter(){s.isOpenDelayed.value?x():S()},onTriggerLeave(){i.value?g():w()},onOpen:S,onClose:g,disableHoverableContent:i,disableClosingTrigger:o,disabled:a,ignoreNonKeyboardFocus:c}),(y,b)=>(I(),N(f(qp),null,{default:A(()=>[Z(y.$slots,"default",{open:f(u)})]),_:3}))}}),Ah=G({__name:"TooltipContentImpl",props:{ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},side:{type:null,required:!1,default:"top"},sideOffset:{type:Number,required:!1,default:0},align:{type:null,required:!1,default:"center"},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1,default:!0},collisionBoundary:{type:null,required:!1,default:()=>[]},collisionPadding:{type:[Number,Object],required:!1,default:0},arrowPadding:{type:Number,required:!1,default:0},sticky:{type:String,required:!1,default:"partial"},hideWhenDetached:{type:Boolean,required:!1,default:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=t,s=ea(),{forwardRef:i}=ye(),o=qu(),a=B(()=>o.default?.({})),l=B(()=>{if(r.ariaLabel)return r.ariaLabel;let u="";function d(p){typeof p.children=="string"&&p.type!==it?u+=p.children:Array.isArray(p.children)&&p.children.forEach(h=>d(h))}return a.value?.forEach(p=>d(p)),u}),c=B(()=>{const{ariaLabel:u,...d}=r;return d});return Ue(()=>{Mo(window,"scroll",u=>{u.target?.contains(s.trigger.value)&&s.onClose()}),Mo(window,Eh,s.onClose)}),(u,d)=>(I(),N(f(Ul),{"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]=Cr(()=>{},["prevent"])),onDismiss:d[3]||(d[3]=p=>f(s).onClose())},{default:A(()=>[D(f(oh),ce({ref:f(i),"data-state":f(s).stateAttribute.value},{...u.$attrs,...c.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:A(()=>[Z(u.$slots,"default"),D(f(Gl),{id:f(s).contentId,role:"tooltip"},{default:A(()=>[$e(Re(l.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),dC=G({__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=Er(e),{forwardRef:r,currentElement:n}=ye(),{trigger:s,onClose:i}=ea(),o=pc(),{isPointerInTransit:a,onPointerExit:l}=Mb(s,n);return o.isPointerInTransitRef=a,l(()=>{i()}),(c,u)=>(I(),N(Ah,ce({ref:f(r)},f(t)),{default:A(()=>[Z(c.$slots,"default")]),_:3},16))}}),fC=G({__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,default:"top"},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=t,s=ea(),i=Ar(r,n),{forwardRef:o}=ye();return(a,l)=>(I(),N(f(jn),{present:a.forceMount||f(s).open.value},{default:A(()=>[(I(),N(Rn(f(s).disableHoverableContent.value?Ah:dC),ce({ref:f(o)},f(i)),{default:A(()=>[Z(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),pC=G({__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)=>(I(),N(f(Wl),Ht(Dt(t)),{default:A(()=>[Z(r.$slots,"default")]),_:3},16))}}),hC=G({__name:"TooltipTrigger",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,r=ea(),n=pc();r.contentId||(r.contentId=Vn(void 0,"reka-tooltip-content"));const{forwardRef:s,currentElement:i}=ye(),o=F(!1),a=F(!1),l=B(()=>r.disabled.value?{}:{click:w,focus:h,pointermove:d,pointerleave:p,pointerdown:u,blur:m});Ue(()=>{r.onTriggerChange(i.value)});function c(){setTimeout(()=>{o.value=!1},1)}function u(){r.open&&!r.disableClosingTrigger.value&&r.onClose(),o.value=!0,document.addEventListener("pointerup",c,{once:!0})}function d(S){S.pointerType!=="touch"&&!a.value&&!n.isPointerInTransitRef.value&&(r.onTriggerEnter(),a.value=!0)}function p(){r.onTriggerLeave(),a.value=!1}function h(S){o.value||r.ignoreNonKeyboardFocus.value&&!S.target.matches?.(":focus-visible")||r.onOpen()}function m(){r.onClose()}function w(){r.disableClosingTrigger.value||r.onClose()}return(S,g)=>(I(),N(f(Np),{"as-child":"",reference:S.reference},{default:A(()=>[D(f(De),ce({ref:f(s),"aria-describedby":f(r).open.value?f(r).contentId:void 0,"data-state":f(r).stateAttribute.value,as:S.as,"as-child":t.asChild,"data-grace-area-trigger":""},Mu(l.value)),{default:A(()=>[Z(S.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3},8,["reference"]))}}),gC=G({__name:"Button",props:{variant:{},size:{},class:{},asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e;return(r,n)=>(I(),N(f(De),{"data-slot":"button",as:e.as,"as-child":e.asChild,class:Ke(f(Ge)(f(hc)({variant:e.variant,size:e.size}),t.class))},{default:A(()=>[Z(r.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),ze=gC;const hc=ap("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 vC={class:"wp:grid wp:grid-cols-3 wp:gap-x-6 wp:gap-y-3 wp:p-3 wp:max-w-xs wp:mx-auto"},mC=G({__name:"KeyPad",setup(e){const t=bt("webphone"),{sendDTMF:r}=bt("sip"),{playDtmf:n}=qf(),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)=>(I(),ve("div",vC,[(I(),ve(Oe,null,Xt(s,l=>D(f(ze),{key:l,onClick:c=>i(l),variant:"ghost",size:"icon",class:"wp:h-14! wp:w-14! wp:rounded-full! wp:text-xl wp:font-medium wp:bg-neutral-100 wp:dark:bg-neutral-800 wp:hover:bg-neutral-200 wp:dark:hover:bg-neutral-700 wp:text-neutral-900 wp:dark:text-white wp:transition-colors wp:active:scale-95"},{default:A(()=>[$e(Re(l),1)]),_:2},1032,["onClick"])),64))]))}}),wC=mC;var kh=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),yC=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),bC=e=>{const t=yC(e);return t.charAt(0).toUpperCase()+t.slice(1)},SC=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),Ih=e=>e==="";var Ti={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 CC=({name:e,iconNode:t,absoluteStrokeWidth:r,"absolute-stroke-width":n,strokeWidth:s,"stroke-width":i,size:o=Ti.width,color:a=Ti.stroke,...l},{slots:c})=>Qt("svg",{...Ti,...l,width:o,height:o,stroke:a,"stroke-width":Ih(r)||Ih(n)||r===!0||n===!0?Number(s||i||Ti["stroke-width"])*24/Number(o):s||i||Ti["stroke-width"],class:SC("lucide",l.class,...e?[`lucide-${kh(bC(e))}-icon`,`lucide-${kh(e)}`]:["lucide-icon"])},[...t.map(u=>Qt(...u)),...c.default?[c.default()]:[]]);var Ve=(e,t)=>(r,{slots:n,attrs:s})=>Qt(CC,{...s,...r,iconNode:t,name:e},n);var _C=Ve("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);var xC=Ve("arrow-right-left",[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]]);var Rh=Ve("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 $h=Ve("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);var Dh=Ve("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);var TC=Ve("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);var gc=Ve("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 EC=Ve("delete",[["path",{d:"M10 5a2 2 0 0 0-1.344.519l-6.328 5.74a1 1 0 0 0 0 1.481l6.328 5.741A2 2 0 0 0 10 19h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2z",key:"1yo7s0"}],["path",{d:"m12 9 6 6",key:"anjzzh"}],["path",{d:"m18 9-6 6",key:"1fp51s"}]]);var AC=Ve("disc",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);var Ei=Ve("grip",[["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"19",cy:"5",r:"1",key:"w8mnmm"}],["circle",{cx:"5",cy:"5",r:"1",key:"lttvr7"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}],["circle",{cx:"19",cy:"19",r:"1",key:"shf9b7"}],["circle",{cx:"5",cy:"19",r:"1",key:"bfqh0e"}]]);var Ph=Ve("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);var kC=Ve("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 IC=Ve("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 Oh=Ve("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);var RC=Ve("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 $C=Ve("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 DC=Ve("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 vc=Ve("phone-off",[["path",{d:"M10.1 13.9a14 14 0 0 0 3.732 2.668 1 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 2 18 18 0 0 1-12.728-5.272",key:"1wngk7"}],["path",{d:"M22 2 2 22",key:"y4kqgn"}],["path",{d:"M4.76 13.582A18 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 .244.473",key:"10hv5p"}]]);var PC=Ve("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 mc=Ve("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 Hh=Ve("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 OC=Ve("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 HC=Ve("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);var Mh=Ve("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 qh=Ve("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);var Nh=Ve("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 Bh=Ve("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 Fh=Ve("wifi-off",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);var ta=Ve("wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);var Lh=Ve("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=Ve("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),MC={class:"wp:flex wp:justify-center wp:items-center wp:gap-6 wp:p-2 wp:relative"},qC={key:0,class:"wp:flex wp:items-center wp:gap-4"},NC={key:4,class:"wp:absolute wp:inset-x-0 wp:bottom-full wp:mb-2 wp:flex wp:justify-center wp:gap-2"},BC=G({__name:"CallActions",props:{destination:{},isVideo:{type:Boolean}},emits:["transfer","completeTransfer","cancelTransfer"],setup(e,{emit:t}){const r=bt("webphone"),{makeCall:n,hangupCall:s,answerCall:i,toggleMute:o,toggleHold:a}=bt("sip"),l=e,c=t,u=B(()=>!!r.transferInProgress),d=async h=>{try{l.destination?await n(l.destination,h):r.keypadValue?await n(r.keypadValue,h):r.lastDialedNumber&&(r.keypadValue=r.lastDialedNumber)}catch(m){if(console.error("Error initiating call:",m),h){let w="No se pudo acceder a la cámara.";const S=m instanceof Error?m.name:String(m);S==="NotReadableError"?w="La cámara parece estar en uso por otra aplicación (ej: Zoom, Meet) o no se puede acceder al hardware.":S==="NotAllowedError"||S==="PermissionDeniedError"?w="Permiso de cámara denegado. Por favor, permita el acceso a la cámara.":S==="NotFoundError"?w="No se detectó ninguna cámara en el sistema.":w+=" "+(m instanceof Error?m.message:String(m)),confirm(`${w}
72
72
 
73
- ¿Desea realizar la llamada solo con AUDIO?`)&&d(!1)}else alert("Error al iniciar la llamada: "+(g instanceof Error?g.message:String(g)))}},p=(h=!1)=>{i(h)};return(h,g)=>(I(),we("div",MC,[f(r).callStatus==="idle"?(I(),we("div",qC,[l.isVideo?(I(),q(f(ze),{key:0,variant:"default",size:"icon",onClick:g[0]||(g[0]=w=>d(!0)),disabled:!l.destination&&(!f(r).keypadValue||!/^[+]?[0-9*#]+$/.test(f(r).keypadValue))&&!f(r).lastDialedNumber,"aria-label":"Video Call",class:"wp:w-12 wp:h-12 wp:rounded-full wp:bg-status-incall wp:hover:bg-status-incall/90 wp:text-white wp:dark:text-neutral-800"},{default:A(()=>[D(f(Nh),{class:"wp:w-5 wp:h-5"})]),_:1},8,["disabled"])):Ee("",!0),D(f(ze),{variant:"default",size:"icon",onClick:g[1]||(g[1]=w=>d(!1)),disabled:!l.destination&&(!f(r).keypadValue||!/^[+]?[0-9*#]+$/.test(f(r).keypadValue))&&!f(r).lastDialedNumber,"aria-label":"Audio Call",class:"wp:w-12 wp:h-12 wp:rounded-full wp:bg-status-available wp:hover:bg-status-available/90 wp:text-white wp:dark:text-neutral-800"},{default:A(()=>[D(f(mc),{class:"wp:w-5 wp:h-5"})]),_:1},8,["disabled"])])):Ee("",!0),f(r).callStatus==="incoming"?(I(),we(Oe,{key:1},[f(r).activeChannel?.hasVideo?(I(),q(f(ze),{key:0,variant:"default",size:"icon",onClick:g[2]||(g[2]=w=>p(!0)),class:"wp:animate-pulse wp:w-12 wp:h-12 wp:rounded-full wp:bg-status-available wp:hover:bg-status-available/90 wp:text-white wp:dark:text-neutral-800","aria-label":"Answer Video"},{default:A(()=>[D(f(Nh),{class:"wp:w-5 wp:h-5"})]),_:1})):Ee("",!0),D(f(ze),{variant:"default",size:"icon",onClick:g[3]||(g[3]=w=>p(!1)),class:"wp:animate-pulse wp:w-12 wp:h-12 wp:rounded-full wp:bg-status-available wp:hover:bg-status-available/90 wp:text-white wp:dark:text-neutral-800","aria-label":"Answer"},{default:A(()=>[D(f(mc),{class:"wp:w-5 wp:h-5"})]),_:1}),D(f(ze),{variant:"destructive",size:"icon",onClick:f(s),"aria-label":"Reject",class:"wp:w-12 wp:h-12 wp:rounded-full wp:bg-status-disconnected wp:hover:bg-status-disconnected/90 wp:text-white wp:dark:text-neutral-800"},{default:A(()=>[D(f(vc),{class:"wp:w-5 wp:h-5"})]),_:1},8,["onClick"])],64)):Ee("",!0),f(r).callStatus==="connected"?(I(),we(Oe,{key:2},[D(f(ze),{variant:f(r).isMuted?"destructive":"secondary",size:"icon",onClick:f(o),"aria-label":"Mute",class:Ke(["wp:w-12 wp:h-12 wp:rounded-full",{"wp:bg-status-disconnected wp:hover:bg-status-disconnected/90 wp:text-white wp:dark:text-neutral-800":f(r).isMuted}])},{default:A(()=>[f(r).isMuted?(I(),q(f(kC),{key:0,class:"wp:w-5 wp:h-5"})):(I(),q(f(IC),{key:1,class:"wp:w-5 wp:h-5"}))]),_:1},8,["variant","onClick","class"]),D(f(ze),{variant:(f(r).isHeld,"secondary"),size:"icon",onClick:f(a),"aria-label":"Hold",class:Ke(["wp:w-12 wp:h-12 wp:rounded-full",{"wp:bg-status-hold wp:hover:bg-status-hold/90 wp:text-white wp:dark:text-neutral-800":f(r).isHeld}])},{default:A(()=>[f(r).isHeld?(I(),q(f(OC),{key:0,class:"wp:w-5 wp:h-5"})):(I(),q(f(RC),{key:1,class:"wp:w-5 wp:h-5"}))]),_:1},8,["variant","onClick","class"]),u.value?Ee("",!0):(I(),q(f(ze),{key:0,variant:"secondary",size:"icon",onClick:g[4]||(g[4]=w=>c("transfer")),"aria-label":"Transfer",class:"wp:w-12 wp:h-12 wp:rounded-full"},{default:A(()=>[D(f(xC),{class:"wp:w-5 wp:h-5"})]),_:1})),D(f(ze),{variant:"destructive",size:"icon",onClick:f(s),"aria-label":"Hangup",class:"wp:w-12 wp:h-12 wp:rounded-full wp:bg-status-disconnected wp:hover:bg-status-disconnected/90 wp:text-white wp:dark:text-neutral-800"},{default:A(()=>[D(f(vc),{class:"wp:w-5 wp:h-5"})]),_:1},8,["onClick"])],64)):Ee("",!0),f(r).callStatus==="calling"?(I(),q(f(ze),{key:3,variant:"destructive",size:"icon",onClick:f(s),"aria-label":"Cancel",class:"wp:w-12 wp:h-12 wp:rounded-full wp:bg-status-disconnected wp:hover:bg-status-disconnected/90 wp:text-white wp:dark:text-neutral-800"},{default:A(()=>[D(f(vc),{class:"wp:w-5 wp:h-5"})]),_:1},8,["onClick"])):Ee("",!0),u.value&&f(r).callStatus==="connected"?(I(),we("div",NC,[D(f(ze),{variant:"default",size:"sm",onClick:g[5]||(g[5]=w=>c("completeTransfer")),class:"wp:gap-2 wp:bg-status-available wp:hover:bg-status-available/90 wp:text-white"},{default:A(()=>[D(f($h),{class:"wp:w-4 wp:h-4"}),g[7]||(g[7]=$e(" Completar Transferencia ",-1))]),_:1}),D(f(ze),{variant:"destructive",size:"sm",onClick:g[6]||(g[6]=w=>c("cancelTransfer")),class:"wp:gap-2"},{default:A(()=>[D(f(wc),{class:"wp:w-4 wp:h-4"}),g[8]||(g[8]=$e(" Cancelar ",-1))]),_:1})])):Ee("",!0)]))}}),FC=BC;function Vh(e,t){return is()?(Mi(e,t),!0):!1}var yc=new WeakMap,LC=(...e)=>{var t;const r=e[0],n=(t=tt())===null||t===void 0?void 0:t.proxy,s=n??is();if(s==null&&!ja())throw new Error("injectLocal must be called in setup");return s&&yc.has(s)&&r in yc.get(s)?yc.get(s)[r]:bt(...e)},Tn=typeof window<"u"&&typeof document<"u",nE=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,VC=e=>typeof e<"u",jC=Object.prototype.toString,UC=e=>jC.call(e)==="[object Object]",Wn=()=>{},zC=KC();function KC(){var e,t,r;return Tn&&!!(!((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 jh(...e){if(e.length!==1)return xa(...e);const t=e[0];return typeof t=="function"?wt(zs(()=>({get:t,set:Wn}))):B(t)}function WC(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 Uh=e=>e();function GC(e=Uh,t={}){const{initialState:r="active"}=t,n=jh(r==="active");function s(){n.value=!1}function i(){n.value=!0}const o=(...a)=>{n.value&&e(...a)};return{isActive:wt(n),pause:s,resume:i,eventFilter:o}}function zh(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function bc(e){return Array.isArray(e)?e:[e]}function Kh(e){const t=Object.create(null);return(r=>t[r]||(t[r]=e(r)))}var JC=/\B([A-Z])/g,sE=Kh(e=>e.replace(JC,"-$1").toLowerCase()),YC=/-(\w)/g,iE=Kh(e=>e.replace(YC,(t,r)=>r?r.toUpperCase():""));function ZC(e){return e||tt()}function XC(e){return We(e)?Nr(new Proxy({},{get(t,r,n){return f(Reflect.get(e.value,r,n))},set(t,r,n){return We(e.value[r])&&!We(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}}})):Nr(e)}function QC(e){return XC(N(e))}function Et(e,...t){const r=t.flat(),n=r[0];return QC(()=>Object.fromEntries(typeof n=="function"?Object.entries(ft(e)).filter(([s,i])=>!n(xe(i),s)):Object.entries(ft(e)).filter(s=>!r.includes(s[0]))))}function e_(e,t,r={}){const{eventFilter:n=Uh,...s}=r;return Ie(e,WC(n,t),s)}function t_(e,t,r={}){const{eventFilter:n,initialState:s="active",...i}=r,{eventFilter:o,pause:a,resume:l,isActive:c}=GC(n,{initialState:s});return{stop:e_(e,t,{...i,eventFilter:o}),pause:a,resume:l,isActive:c}}var r_=t_;function n_(e,t={}){if(!We(e))return ft(e);const r=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const n in e.value)r[n]=zs(()=>({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 Wh(e,t=!0,r){ZC(r)?Ue(e,r):t?e():ot(e)}function s_(e,t=1e3,r={}){const{immediate:n=!0,immediateCallback:s=!1}=r;let i=null;const o=Ze(!1);function a(){i&&(clearInterval(i),i=null)}function l(){o.value=!1,a()}function c(){const u=xe(t);u<=0||(o.value=!0,s&&e(),a(),o.value&&(i=setInterval(e,u)))}return n&&Tn&&c(),(We(t)||typeof t=="function")&&Vh(Ie(t,()=>{o.value&&Tn&&c()})),Vh(l),{isActive:en(o),pause:l,resume:c}}function i_(e=!1,t={}){const{truthyValue:r=!0,falsyValue:n=!1}=t,s=We(e),i=Ze(e);function o(a){if(arguments.length)return i.value=a,i.value;{const l=xe(r);return i.value=i.value===l?xe(n):l,i.value}}return s?o:[i,o]}function o_(e,t,r){return Ie(e,t,{...r,immediate:!0})}var Dr=Tn?window:void 0,oE=Tn?window.document:void 0,aE=Tn?window.navigator:void 0,lE=Tn?window.location:void 0;function Ps(e){var t;const r=xe(e);return(t=r?.$el)!==null&&t!==void 0?t:r}function ir(...e){const t=(n,s,i,o)=>(n.addEventListener(s,i,o),()=>n.removeEventListener(s,i,o)),r=N(()=>{const n=bc(xe(e[0])).filter(s=>s!=null);return n.every(s=>typeof s!="string")?n:void 0});return o_(()=>{var n,s;return[(n=(s=r.value)===null||s===void 0?void 0:s.map(i=>Ps(i)))!==null&&n!==void 0?n:[Dr].filter(i=>i!=null),bc(xe(r.value?e[1]:e[0])),bc(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 c=UC(o)?{...o}:o,u=n.flatMap(d=>s.flatMap(p=>i.map(h=>t(d,p,h,c))));l(()=>{u.forEach(d=>d())})},{flush:"post"})}var Gh=!1;function a_(e,t,r={}){const{window:n=Dr,ignore:s=[],capture:i=!0,detectIframe:o=!1,controls:a=!1}=r;if(!n)return a?{stop:Wn,cancel:Wn,trigger:Wn}:Wn;if(zC&&!Gh){Gh=!0;const C={passive:!0};Array.from(n.document.body.children).forEach(v=>v.addEventListener("click",Wn,C)),n.document.documentElement.addEventListener("click",Wn,C)}let l=!0;const c=C=>xe(s).some(v=>{if(typeof v=="string")return Array.from(n.document.querySelectorAll(v)).some(x=>x===C.target||C.composedPath().includes(x));{const x=Ps(v);return x&&(C.target===x||C.composedPath().includes(x))}});function u(C){const v=xe(C);return v&&v.$.subTree.shapeFlag===16}function d(C,v){const x=xe(C),y=x.$.subTree&&x.$.subTree.children;return y==null||!Array.isArray(y)?!1:y.some(b=>b.el===v.target||v.composedPath().includes(b.el))}const p=C=>{const v=Ps(e);if(C.target!=null&&!(!(v instanceof Element)&&u(e)&&d(e,C))&&!(!v||v===C.target||C.composedPath().includes(v))){if("detail"in C&&C.detail===0&&(l=!c(C)),!l){l=!0;return}t(C)}};let h=!1;const g=[ir(n,"click",C=>{h||(h=!0,setTimeout(()=>{h=!1},0),p(C))},{passive:!0,capture:i}),ir(n,"pointerdown",C=>{const v=Ps(e);l=!c(C)&&!!(v&&!C.composedPath().includes(v))},{passive:!0}),o&&ir(n,"blur",C=>{setTimeout(()=>{var v;const x=Ps(e);((v=n.document.activeElement)===null||v===void 0?void 0:v.tagName)==="IFRAME"&&!x?.contains(n.document.activeElement)&&t(C)},0)},{passive:!0})].filter(Boolean),w=()=>g.forEach(C=>C());return a?{stop:w,cancel:()=>{l=!1},trigger:C=>{l=!0,p(C),l=!1}}:w}function l_(){const e=Ze(!1),t=tt();return t&&Ue(()=>{e.value=!0},t),e}function Jh(e){const t=l_();return N(()=>(t.value,!!e()))}var c_=Symbol("vueuse-ssr-width");function u_(){const e=ja()?LC(c_,null):null;return typeof e=="number"?e:void 0}function d_(e,t={}){const{window:r=Dr,ssrWidth:n=u_()}=t,s=Jh(()=>r&&"matchMedia"in r&&typeof r.matchMedia=="function"),i=Ze(typeof n=="number"),o=Ze(),a=Ze(!1),l=c=>{a.value=c.matches};return rt(()=>{if(i.value){i.value=!s.value,a.value=xe(e).split(",").some(c=>{const u=c.includes("not all"),d=c.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),p=c.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let h=!!(d||p);return d&&h&&(h=n>=zh(d[1])),p&&h&&(h=n<=zh(p[1])),u?!h:h});return}s.value&&(o.value=r.matchMedia(xe(e)),a.value=o.value.matches)}),ir(o,"change",l,{passive:!0}),N(()=>a.value)}function f_(e){return JSON.parse(JSON.stringify(e))}var ra=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},na="__vueuse_ssr_handlers__",p_=h_();function h_(){return na in ra||(ra[na]=ra[na]||{}),ra[na]}function Yh(e,t){return p_[e]||t}function g_(e){return d_("(prefers-color-scheme: dark)",e)}function v_(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 m_={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()}},Zh="vueuse-storage";function Ai(e,t,r,n={}){var s;const{flush:i="pre",deep:o=!0,listenToStorageChanges:a=!0,writeDefaults:l=!0,mergeDefaults:c=!1,shallow:u,window:d=Dr,eventFilter:p,onError:h=M=>{console.error(M)},initOnMounted:g}=n,w=(u?Ze:B)(typeof t=="function"?t():t),C=N(()=>xe(e));if(!r)try{r=Yh("getDefaultStorage",()=>Dr?.localStorage)()}catch(M){h(M)}if(!r)return w;const v=xe(t),x=v_(v),y=(s=n.serializer)!==null&&s!==void 0?s:m_[x],{pause:b,resume:_}=r_(w,M=>O(M),{flush:i,deep:o,eventFilter:p});Ie(C,()=>T(),{flush:i});let $=!1;const R=M=>{g&&!$||T(M)},m=M=>{g&&!$||E(M)};d&&a&&(r instanceof Storage?ir(d,"storage",R,{passive:!0}):ir(d,Zh,m)),g?Wh(()=>{$=!0,T()}):T();function P(M,j){if(d){const z={key:C.value,oldValue:M,newValue:j,storageArea:r};d.dispatchEvent(r instanceof Storage?new StorageEvent("storage",z):new CustomEvent(Zh,{detail:z}))}}function O(M){try{const j=r.getItem(C.value);if(M==null)P(j,null),r.removeItem(C.value);else{const z=y.write(M);j!==z&&(r.setItem(C.value,z),P(j,z))}}catch(j){h(j)}}function S(M){const j=M?M.newValue:r.getItem(C.value);if(j==null)return l&&v!=null&&r.setItem(C.value,y.write(v)),v;if(!M&&c){const z=y.read(j);return typeof c=="function"?c(z,v):x==="object"&&!Array.isArray(z)?{...v,...z}:z}else return typeof j!="string"?j:y.read(j)}function T(M){if(!(M&&M.storageArea!==r)){if(M&&M.key==null){w.value=v;return}if(!(M&&M.key!==C.value)){b();try{const j=y.write(w.value);(M===void 0||M?.newValue!==j)&&(w.value=S(M))}catch(j){h(j)}finally{M?ot(_):_()}}}}function E(M){T(M.detail)}return w}var w_="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function y_(e={}){const{selector:t="html",attribute:r="class",initialValue:n="auto",window:s=Dr,storage:i,storageKey:o="vueuse-color-scheme",listenToStorageChanges:a=!0,storageRef:l,emitAuto:c,disableTransition:u=!0}=e,d={auto:"",light:"light",dark:"dark",...e.modes||{}},p=g_({window:s}),h=N(()=>p.value?"dark":"light"),g=l||(o==null?jh(n):Ai(o,n,i,{window:s,listenToStorageChanges:a})),w=N(()=>g.value==="auto"?h.value:g.value),C=Yh("updateHTMLAttrs",(b,_,$)=>{const R=typeof b=="string"?s?.document.querySelector(b):Ps(b);if(!R)return;const m=new Set,P=new Set;let O=null;if(_==="class"){const T=$.split(/\s/g);Object.values(d).flatMap(E=>(E||"").split(/\s/g)).filter(Boolean).forEach(E=>{T.includes(E)?m.add(E):P.add(E)})}else O={key:_,value:$};if(m.size===0&&P.size===0&&O===null)return;let S;u&&(S=s.document.createElement("style"),S.appendChild(document.createTextNode(w_)),s.document.head.appendChild(S));for(const T of m)R.classList.add(T);for(const T of P)R.classList.remove(T);O&&R.setAttribute(O.key,O.value),u&&(s.getComputedStyle(S).opacity,document.head.removeChild(S))});function v(b){var _;C(t,r,(_=d[b])!==null&&_!==void 0?_:b)}function x(b){e.onChanged?e.onChanged(b,v):v(b)}Ie(w,x,{flush:"post",immediate:!0}),Wh(()=>x(w.value));const y=N({get(){return c?g.value:w.value},set(b){g.value=b}});return Object.assign(y,{store:g,system:h,state:w})}function Xh(e={}){const{valueDark:t="dark",valueLight:r=""}=e,n=y_({...e,onChanged:(i,o)=>{var a;e.onChanged?(a=e.onChanged)===null||a===void 0||a.call(e,i==="dark",o,i):o(i)},modes:{dark:t,light:r}}),s=N(()=>n.system.value);return N({get(){return n.value==="dark"},set(i){const o=i?"dark":"light";s.value===o?n.value="auto":n.value=o}})}function b_(e,t={}){var r;const{pointerTypes:n,preventDefault:s,stopPropagation:i,exact:o,onMove:a,onEnd:l,onStart:c,initialValue:u,axis:d="both",draggingElement:p=Dr,containerElement:h,handle:g=e,buttons:w=[0]}=t,C=B((r=xe(u))!==null&&r!==void 0?r:{x:0,y:0}),v=B(),x=R=>n?n.includes(R.pointerType):!0,y=R=>{xe(s)&&R.preventDefault(),xe(i)&&R.stopPropagation()},b=R=>{var m;if(!xe(w).includes(R.button)||xe(t.disabled)||!x(R)||xe(o)&&R.target!==xe(e))return;const P=xe(h),O=P==null||(m=P.getBoundingClientRect)===null||m===void 0?void 0:m.call(P),S=xe(e).getBoundingClientRect(),T={x:R.clientX-(P?S.left-O.left+P.scrollLeft:S.left),y:R.clientY-(P?S.top-O.top+P.scrollTop:S.top)};c?.(T,R)!==!1&&(v.value=T,y(R))},_=R=>{if(xe(t.disabled)||!x(R)||!v.value)return;const m=xe(h),P=xe(e).getBoundingClientRect();let{x:O,y:S}=C.value;(d==="x"||d==="both")&&(O=R.clientX-v.value.x,m&&(O=Math.min(Math.max(0,O),m.scrollWidth-P.width))),(d==="y"||d==="both")&&(S=R.clientY-v.value.y,m&&(S=Math.min(Math.max(0,S),m.scrollHeight-P.height))),C.value={x:O,y:S},a?.(C.value,R),y(R)},$=R=>{xe(t.disabled)||!x(R)||v.value&&(v.value=void 0,l?.(C.value,R),y(R))};if(Tn){const R=()=>{var m;return{capture:(m=t.capture)!==null&&m!==void 0?m:!0,passive:!xe(s)}};ir(g,"pointerdown",b,R),ir(p,"pointermove",_,R),ir(p,"pointerup",$,R)}return{...n_(C),position:C,isDragging:N(()=>!!v.value),style:N(()=>`left:${C.value.x}px;top:${C.value.y}px;`)}}function S_(e={}){const{window:t=Dr}=e,r=t?.navigator,n=Jh(()=>r&&"connection"in r),s=Ze(!0),i=Ze(!1),o=Ze(void 0),a=Ze(void 0),l=Ze(void 0),c=Ze(void 0),u=Ze(void 0),d=Ze(void 0),p=Ze("unknown"),h=n.value&&r.connection;function g(){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,c.value=h.downlinkMax,d.value=h.effectiveType,u.value=h.rtt,i.value=h.saveData,p.value=h.type))}const w={passive:!0};return t&&(ir(t,"offline",()=>{s.value=!1,o.value=Date.now()},w),ir(t,"online",()=>{s.value=!0,a.value=Date.now()},w)),h&&ir(h,"change",g,w),g(),{isSupported:n,isOnline:wt(s),saveData:wt(i),offlineAt:wt(o),onlineAt:wt(a),downlink:wt(l),downlinkMax:wt(c),effectiveType:wt(d),rtt:wt(u),type:wt(p)}}var cE=[{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 C_(e,t,r,n={}){var s,i;const{clone:o=!1,passive:a=!1,eventName:l,deep:c=!1,defaultValue:u,shouldEmit:d}=n,p=tt(),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 g=l;t||(t="modelValue"),g=g||`update:${t.toString()}`;const w=x=>o?typeof o=="function"?o(x):f_(x):x,C=()=>VC(e[t])?w(e[t]):u,v=x=>{d?d(x)&&h(g,x):h(g,x)};if(a){const x=B(C());let y=!1;return Ie(()=>e[t],b=>{y||(y=!0,x.value=w(b),ot(()=>y=!1))}),Ie(x,b=>{!y&&(b!==e[t]||c)&&v(b)},{deep:c}),x}else return N({get(){return C()},set(x){v(x)}})}var __=G({__name:"Input",props:{defaultValue:{},modelValue:{},class:{}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=C_(r,"modelValue",t,{passive:!0,defaultValue:r.defaultValue});return(s,i)=>Yi((I(),we("input",{"onUpdate:modelValue":i[0]||(i[0]=o=>We(n)?n.value=o:null),"data-slot":"input",class:Ke(f(Ge)("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-input 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)]])}}),Sc=__,x_=G({__name:"Kbd",props:{class:{}},setup(e){const t=e;return(r,n)=>(I(),we("kbd",{class:Ke(f(Ge)("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))},[Z(r.$slots,"default")],2))}}),Kt=x_,T_=G({__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=Ar(e,t);return(n,s)=>(I(),q(f(uC),ue({"data-slot":"tooltip"},f(r)),{default:A(i=>[Z(n.$slots,"default",Ht(Dt(i)))]),_:3},16))}}),Gn=T_,E_=G({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:{}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=t,s=Ar(Et(r,"class"),n);return(i,o)=>(I(),q(f(pC),null,{default:A(()=>[D(f(fC),ue({"data-slot":"tooltip-content"},{...f(s),...i.$attrs},{class:f(Ge)("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:A(()=>[Z(i.$slots,"default"),D(f(oC),{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}))}}),Jn=E_,A_=G({__name:"TooltipProvider",props:{delayDuration:{default:0},skipDelayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},setup(e){const t=e;return(r,n)=>(I(),q(f(lC),Ht(Dt(t)),{default:A(()=>[Z(r.$slots,"default")]),_:3},16))}}),Yn=A_,k_=G({__name:"TooltipTrigger",props:{reference:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>(I(),q(f(hC),ue({"data-slot":"tooltip-trigger"},t),{default:A(()=>[Z(r.$slots,"default")]),_:3},16))}}),Zn=k_,I_={class:"wp:flex wp:flex-col wp:items-center wp:px-4 wp:space-y-2"},R_={key:2,class:"wp:w-full wp:flex wp:items-center wp:justify-center wp:gap-2 wp:min-h-10"},$_={class:"wp:relative"},D_={class:"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"},P_=["onMousedown"],O_={class:"wp:flex wp:flex-col wp:min-w-0"},H_={class:"wp:truncate"},M_={class:"wp:text-xs wp:text-muted-foreground wp:truncate"},q_={key:3,class:"wp:flex wp:flex-col wp:items-center wp:justify-center wp:gap-2 wp:w-full"},N_={class:"wp:flex wp:flex-col wp:items-center wp:gap-1"},B_={class:"wp:flex wp:items-center wp:gap-2"},F_={key:0,class:"wp:text-[10px] wp:text-muted-foreground"},L_={key:4,class:"wp:flex wp:flex-col wp:items-center wp:justify-center wp:gap-2 wp:min-h-10"},V_={class:"wp:flex wp:items-center wp:gap-4"},j_={class:"wp:flex wp:flex-col wp:items-center"},U_={class:"wp:text-xl wp:font-bold wp:text-neutral-800 wp:dark:text-white"},z_={key:0,class:"wp:text-sm wp:text-muted-foreground"},K_=G({__name:"CallDisplay",props:{allowInput:{type:Boolean,default:!0},isWebCall:{type:Boolean,default:!1},user:{},contacts:{default:()=>[]},channelId:{default:void 0}},setup(e){const t=bt("webphone"),r=bt("sip"),n=navigator.platform.toUpperCase().indexOf("MAC")>=0?"⌘":"Ctrl+",s=e,i=N(()=>s.channelId!==void 0?t.channels.find(P=>P.id===s.channelId):t.activeChannel),o=N(()=>{if(!t.isConnected)return"wp:text-status-disconnected";const P=i.value;return P&&P.status!=="idle"?P.isHeld||P.status==="held"?"wp:text-status-hold":P.status==="incoming"?"wp:text-status-incoming":"wp:text-status-incall":"wp:text-status-available"}),a=N(()=>{if(!t.isConnected)return"wp:text-status-disconnected wp:hover:text-status-disconnected/80";const P=i.value;return P&&P.status!=="idle"?P.isHeld||P.status==="held"?"wp:text-status-hold wp:hover:text-status-hold/80":P.status==="incoming"?"wp:text-status-incoming wp:hover:text-status-incoming/80":"wp:text-status-incall wp:hover:text-status-incall/80":"wp:text-status-available wp:hover:text-status-available/80"}),l=B(!1),c=B(null),u=B(null);a_(c,()=>{l.value=!1});const d=N({get:()=>i.value?.keypadValue||"",set:P=>{i.value&&t.updateChannelState(i.value.id,{keypadValue:P})}}),p=N(()=>/^[+]?[0-9*#]+$/.test(d.value)),h=N(()=>{if(!d.value)return s.contacts.slice(0,10);const P=d.value.toLowerCase(),O=[];for(const S of s.contacts)if((S.name.toLowerCase().includes(P)||S.number.includes(P))&&(O.push(S),O.length>=10))break;return O}),g=P=>{i.value&&t.updateChannelState(i.value.id,{keypadValue:P.number}),l.value=!1,r.makeCall(P.number)},w=()=>{!d.value||!p.value||(l.value=!1,r.makeCall(d.value))};Ie(d,()=>{l.value=!0});const C=()=>{d.value&&p.value&&w()},v=()=>{l.value=!1},x=()=>{l.value=!0},y=()=>{setTimeout(()=>{l.value=!1},150)},b=B(Date.now());s_(()=>{b.value=Date.now()},1e3);const _=N(()=>{const P=i.value?.startTime,O=i.value?.status||"idle";if(!P||O!=="connected")return"00:00";const S=Math.floor((b.value-P)/1e3);return S<0?"00:00":`${Math.floor(S/60).toString().padStart(2,"0")}:${(S%60).toString().padStart(2,"0")}`}),$=N(()=>{const P=i.value,O=P?.status||"idle";return O==="idle"?"Disponible":O==="calling"?"Llamando...":P?.isHeld?`En espera - ${P.remoteNumber||P.keypadValue||"Unknown"}`:O==="connected"?"Conectado":O.charAt(0).toUpperCase()+O.slice(1)}),R=N(()=>{const P=i.value,O=P?.remoteNumber||P?.keypadValue,S=P?.remoteDisplayName;if(console.log("[CallDisplay] 🔍 Buscando contacto para número:",O),console.log("[CallDisplay] 🏷️ Display name del PBX:",S||"N/A"),console.log("[CallDisplay] 📒 Contactos disponibles:",s.contacts?.length||0),!O)return console.log("[CallDisplay] ⚠️ No hay número"),"Unknown";const T=s.contacts?.find(M=>(console.log("[CallDisplay] Comparando con:",M.name,"-",M.number),M.number===O?(console.log("[CallDisplay] ✅ Coincidencia exacta encontrada:",M.name),!0):O.endsWith(M.number)||M.number.endsWith(O)?(console.log("[CallDisplay] ✅ Coincidencia parcial encontrada:",M.name),!0):!1)),E=T?T.name:S||O;return console.log("[CallDisplay] 📱 Resultado final:",E),E}),m=N(()=>{const P=i.value;return P?.remoteNumber||P?.keypadValue||""});return(P,O)=>(I(),we("div",I_,[s.user?(I(),we("span",{key:0,class:Ke([o.value,"wp:font-bold wp:text-lg wp:flex wp:items-center wp:gap-2 wp:transition-colors wp:duration-300"])},[O[2]||(O[2]=ne("div",{class:"wp:w-2.5 wp:h-2.5 wp:rounded-full wp:bg-current wp:shadow-[0_0_8px_currentColor]"},null,-1)),$e(" "+Re(s.user),1)],2)):Ee("",!0),(i.value?.status||"idle")!=="connected"?(I(),we("div",{key:1,class:Ke([o.value,"wp:font-medium wp:tracking-wider wp:min-h-5 wp:text-sm wp:normal-case"])},Re($.value),3)):Ee("",!0),(i.value?.status||"idle")==="idle"&&s.allowInput?(I(),we("div",R_,[ne("div",{class:"wp:relative wp:w-full wp:max-w-75",ref_key:"containerRef",ref:c},[ne("div",$_,[D(f(Sc),{ref_key:"inputRef",ref:u,modelValue:d.value,"onUpdate:modelValue":O[0]||(O[0]=S=>d.value=S),onFocus:x,onBlur:y,onKeydown:[fl(C,["enter"]),fl(v,["escape"])],placeholder:"Ingresar número...",class:"wp:h-10 wp:text-center wp:select-text wp:pr-8 wp:text-base"},null,8,["modelValue"]),d.value?(I(),we("div",{key:0,class:"wp:absolute wp:right-2 wp:top-1/2 wp:-translate-y-1/2 wp:z-10 wp:cursor-pointer wp:p-1 wp:hover:bg-accent wp:rounded-full",onClick:O[1]||(O[1]=Cr(S=>f(t).backspaceKeypad(),["stop"]))},[D(f(EC),{class:"wp:w-4 wp:h-4 wp:text-neutral-400 wp:hover:text-status-disconnected wp:dark:text-neutral-500 wp:dark:hover:text-status-disconnected wp:transition-colors"})])):Ee("",!0)]),Yi(ne("div",D_,[p.value?(I(),we("div",{key:0,class:"wp:cursor-pointer wp:hover:bg-accent wp:flex wp:items-center wp:gap-2 wp:p-2 wp:px-3 wp:text-sm",onMousedown:Cr(w,["prevent"])},[D(f(mc),{class:"wp:w-4 wp:h-4 wp:shrink-0"}),ne("span",null,"Marcar "+Re(d.value),1)],32)):Ee("",!0),(I(!0),we(Oe,null,Xt(h.value,S=>(I(),we("div",{key:S.number,class:"wp:cursor-pointer wp:hover:bg-accent wp:flex wp:items-center wp:gap-2 wp:p-2 wp:px-3 wp:text-sm",onMousedown:Cr(T=>g(S),["prevent"])},[ne("div",{class:Ke(f(Ge)("wp:flex wp:items-center wp:justify-center wp:w-6 wp:h-6 wp:rounded-full wp:shrink-0",S.type==="extension"?"wp:bg-blue-100 wp:text-blue-600 wp:dark:bg-blue-900/30 wp:dark:text-blue-400":S.type==="contact"?"wp:bg-emerald-100 wp:text-emerald-600 wp:dark:bg-emerald-900/30 wp:dark:text-emerald-400":S.type==="voicemail"?"wp:bg-purple-100 wp:text-purple-600 wp:dark:bg-purple-900/30 wp:dark:text-purple-400":S.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"))},[S.type==="extension"?(I(),q(f(Rh),{key:0,class:"wp:w-3 wp:h-3"})):S.type==="contact"?(I(),q(f(gc),{key:1,class:"wp:w-3 wp:h-3"})):S.type==="voicemail"?(I(),q(f(Bh),{key:2,class:"wp:w-3 wp:h-3"})):S.type==="tool"?(I(),q(f(Lh),{key:3,class:"wp:w-3 wp:h-3"})):(I(),q(f(gc),{key:4,class:"wp:w-3 wp:h-3"}))],2),ne("div",O_,[ne("span",H_,Re(S.name),1),ne("span",M_,Re(S.number),1)])],40,P_))),128))],512),[[yo,l.value&&d.value&&(h.value.length>0||p.value)]])],512),D(f(Yn),null,{default:A(()=>[D(f(Gn),null,{default:A(()=>[D(f(Zn),{"as-child":""},{default:A(()=>[D(f(ze),{onClick:f(t).toggleKeypad,variant:"ghost",size:"icon",class:Ke(f(Ge)("wp:rounded-full",a.value))},{default:A(()=>[D(f(Ei),{class:"wp:w-5 wp:h-5"})]),_:1},8,["onClick","class"])]),_:1}),D(f(Jn),{class:"wp:flex wp:items-center wp:gap-2"},{default:A(()=>[ne("span",null,Re(f(t).isKeypadVisible?"Ocultar":"Mostrar")+" teclado",1),D(f(Kt),null,{default:A(()=>[$e(Re(f(n))+"K",1)]),_:1})]),_:1})]),_:1})]),_:1})])):(i.value?.status||"idle")==="connected"?(I(),we("div",q_,[ne("div",{class:Ke([o.value,"wp:flex wp:items-center wp:gap-2 wp:text-3xl wp:font-light"])},[D(f(AC),{class:"wp:w-6 wp:h-6 wp:animate-spin",style:{"animation-duration":"3s"}}),ne("span",null,Re(_.value),1)],2),ne("div",N_,[ne("div",B_,[ne("div",{class:Ke([o.value,"wp:text-xs"])}," En llamada con "+Re(R.value),3),e.isWebCall?Ee("",!0):(I(),q(f(Yn),{key:0},{default:A(()=>[D(f(Gn),null,{default:A(()=>[D(f(Zn),{"as-child":""},{default:A(()=>[D(f(ze),{onClick:f(t).toggleKeypad,variant:"ghost",size:"icon",class:Ke(f(Ge)("wp:h-6 wp:w-6 wp:rounded-full",a.value))},{default:A(()=>[D(f(Ei),{class:"wp:w-4 wp:h-4"})]),_:1},8,["onClick","class"])]),_:1}),D(f(Jn),{class:"wp:flex wp:items-center wp:gap-2"},{default:A(()=>[ne("span",null,Re(f(t).isKeypadVisible?"Ocultar":"Mostrar")+" teclado",1),D(f(Kt),null,{default:A(()=>[$e(Re(f(n))+"K",1)]),_:1})]),_:1})]),_:1})]),_:1}))]),R.value!==m.value?(I(),we("div",F_,Re(m.value),1)):Ee("",!0)])])):(i.value?.status||"idle")!=="idle"?(I(),we("div",L_,[ne("div",V_,[ne("div",j_,[ne("div",U_,Re(R.value),1),R.value!==m.value?(I(),we("div",z_,Re(m.value),1)):Ee("",!0)]),D(f(Yn),null,{default:A(()=>[D(f(Gn),null,{default:A(()=>[D(f(Zn),{"as-child":""},{default:A(()=>[D(f(ze),{onClick:f(t).toggleKeypad,variant:"ghost",size:"icon",class:Ke(f(Ge)("wp:rounded-full",a.value))},{default:A(()=>[D(f(Ei),{class:"wp:w-5 wp:h-5"})]),_:1},8,["onClick","class"])]),_:1}),D(f(Jn),{class:"wp:flex wp:items-center wp:gap-2"},{default:A(()=>[ne("span",null,Re(f(t).isKeypadVisible?"Ocultar":"Mostrar")+" teclado",1),D(f(Kt),null,{default:A(()=>[$e(Re(f(n))+"K",1)]),_:1})]),_:1})]),_:1})]),_:1})])])):Ee("",!0)]))}}),W_=K_,G_=G({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=Ar(e,t);return(n,s)=>(I(),q(f(n0),ue({"data-slot":"dialog"},f(r)),{default:A(i=>[Z(n.$slots,"default",Ht(Dt(i)))]),_:3},16))}}),Cc=G_,J_=G({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,r=Et(t,"class");return(n,s)=>(I(),q(f(_0),ue({"data-slot":"dialog-overlay"},f(r),{class:f(Ge)("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:A(()=>[Z(n.$slots,"default")]),_:3},16,["class"]))}}),Y_=J_,Z_=G({inheritAttrs:!1,__name:"DialogContent",props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{},showCloseButton:{type:Boolean,default:!0}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=e,n=t,s=Ar(Et(r,"class"),n);return(i,o)=>(I(),q(f(x0),null,{default:A(()=>[D(Y_),D(f(S0),ue({"data-slot":"dialog-content"},{...i.$attrs,...f(s)},{class:f(Ge)("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:A(()=>[Z(i.$slots,"default"),e.showCloseButton?(I(),q(f(s0),{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:A(()=>[D(f(wc)),o[0]||(o[0]=ne("span",{class:"wp:sr-only"},"Close",-1))]),_:1})):Ee("",!0)]),_:3},16,["class"])]),_:3}))}}),_c=Z_,X_=G({__name:"DialogFooter",props:{class:{}},setup(e){const t=e;return(r,n)=>(I(),we("div",{"data-slot":"dialog-footer",class:Ke(f(Ge)("wp:flex wp:flex-col-reverse wp:gap-2 wp:sm:flex-row wp:sm:justify-end",t.class))},[Z(r.$slots,"default")],2))}}),Qh=X_,Q_=G({__name:"DialogHeader",props:{class:{}},setup(e){const t=e;return(r,n)=>(I(),we("div",{"data-slot":"dialog-header",class:Ke(f(Ge)("wp:flex wp:flex-col wp:gap-2 wp:text-center wp:sm:text-left",t.class))},[Z(r.$slots,"default")],2))}}),xc=Q_,ex=G({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,r=Er(Et(t,"class"));return(n,s)=>(I(),q(f(T0),ue({"data-slot":"dialog-title"},f(r),{class:f(Ge)("wp:text-lg wp:leading-none wp:font-semibold",t.class)}),{default:A(()=>[Z(n.$slots,"default")]),_:3},16,["class"]))}}),Tc=ex,tx=G({__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=Ar(e,t);return(n,s)=>(I(),q(f(gS),ue({"data-slot":"select"},f(r)),{default:A(i=>[Z(n.$slots,"default",Ht(Dt(i)))]),_:3},16))}}),eg=tx,rx=G({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:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=t,s=Ar(Et(r,"class"),n);return(i,o)=>(I(),q(f(DS),null,{default:A(()=>[D(f(xS),ue({"data-slot":"select-content"},{...i.$attrs,...f(s)},{class:f(Ge)("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:A(()=>[D(f(cx)),D(f(qS),{class:Ke(f(Ge)("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:A(()=>[Z(i.$slots,"default")]),_:3},8,["class"]),D(f(ax))]),_:3},16,["class"])]),_:3}))}}),tg=rx,nx=G({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>(I(),q(f(ES),ue({"data-slot":"select-group"},t),{default:A(()=>[Z(r.$slots,"default")]),_:3},16))}}),rg=nx,sx={class:"wp:absolute wp:right-2 wp:flex wp:size-3.5 wp:items-center wp:justify-center"},ix=G({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,r=Er(Et(t,"class"));return(n,s)=>(I(),q(f(IS),ue({"data-slot":"select-item"},f(r),{class:f(Ge)("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:A(()=>[ne("span",sx,[D(f(RS),null,{default:A(()=>[Z(n.$slots,"indicator-icon",{},()=>[D(f($h),{class:"wp:size-4"})])]),_:3})]),D(f($S),null,{default:A(()=>[Z(n.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),ng=ix,ox=G({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,r=Er(Et(t,"class"));return(n,s)=>(I(),q(f(PS),ue({"data-slot":"select-scroll-down-button"},f(r),{class:f(Ge)("wp:flex wp:cursor-default wp:items-center wp:justify-center wp:py-1",t.class)}),{default:A(()=>[Z(n.$slots,"default",{},()=>[D(f(Dh),{class:"wp:size-4"})])]),_:3},16,["class"]))}}),ax=ox,lx=G({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,r=Er(Et(t,"class"));return(n,s)=>(I(),q(f(OS),ue({"data-slot":"select-scroll-up-button"},f(r),{class:f(Ge)("wp:flex wp:cursor-default wp:items-center wp:justify-center wp:py-1",t.class)}),{default:A(()=>[Z(n.$slots,"default",{},()=>[D(f(TC),{class:"wp:size-4"})])]),_:3},16,["class"]))}}),cx=lx,ux=G({__name:"SelectTrigger",props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{},size:{default:"default"}},setup(e){const t=e,r=Er(Et(t,"class","size"));return(n,s)=>(I(),q(f(HS),ue({"data-slot":"select-trigger","data-size":e.size},f(r),{class:f(Ge)("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:A(()=>[Z(n.$slots,"default"),D(f(AS),{"as-child":""},{default:A(()=>[D(f(Dh),{class:"wp:size-4 wp:opacity-50"})]),_:1})]),_:3},16,["data-size","class"]))}}),sg=ux,dx=G({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>(I(),q(f(MS),ue({"data-slot":"select-value"},t),{default:A(()=>[Z(r.$slots,"default")]),_:3},16))}}),ig=dx,fx=G({__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:{}},emits:["update:modelValue","valueCommit"],setup(e,{emit:t}){const r=e,n=t,s=Ar(Et(r,"class"),n);return(i,o)=>(I(),q(f(ZS),ue({"data-slot":"slider",class:f(Ge)("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:A(({modelValue:a})=>[D(f(tC),{"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:A(()=>[D(f(XS),{"data-slot":"slider-range",class:"wp:bg-primary wp:absolute wp:data-[orientation=horizontal]:h-full wp:data-[orientation=vertical]:w-full"})]),_:1}),(I(!0),we(Oe,null,Xt(a,(l,c)=>(I(),q(f(eC),{key:c,"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"]))}}),og=fx,px=G({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,r=Et(t,"class");return(n,s)=>(I(),q(f(J1),ue({"data-slot":"label"},f(r),{class:f(Ge)("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:A(()=>[Z(n.$slots,"default")]),_:3},16,["class"]))}}),Os=px,hx=G({__name:"Separator",props:{orientation:{default:"horizontal"},decorative:{type:Boolean,default:!0},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,r=Et(t,"class");return(n,s)=>(I(),q(f(BS),ue({"data-slot":"separator"},f(r),{class:f(Ge)("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"]))}}),gx=hx,vx={class:"wp:flex wp:flex-col wp:gap-6 wp:py-4"},mx={class:"wp:flex wp:flex-col wp:gap-2"},wx={class:"wp:flex wp:flex-col wp:gap-2"},yx={class:"wp:flex wp:flex-col wp:gap-4"},bx={class:"wp:flex wp:justify-between"},Sx={class:"wp:text-sm wp:text-muted-foreground"},Cx={class:"wp:flex wp:flex-col wp:gap-4"},_x={class:"wp:flex wp:justify-between"},xx={class:"wp:text-sm wp:text-muted-foreground"},Tx={class:"wp:flex wp:flex-col wp:gap-3"},Ex={class:"wp:grid wp:grid-cols-2 wp:gap-2 wp:text-sm"},Ax={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},kx={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},Ix={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},Rx={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},$x={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},Dx={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},Px=G({__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}=bt("sip"),l=B([]),c=B([]),u=Ai("webphone-input-device",""),d=Ai("webphone-output-device",""),p=Ai("webphone-volume",100),h=Ai("webphone-notification-volume",100),g=async()=>{try{await navigator.mediaDevices.getUserMedia({audio:!0});const b=await navigator.mediaDevices.enumerateDevices();l.value=b.filter(R=>R.kind==="audioinput").map((R,m)=>({deviceId:R.deviceId,label:R.label||`Microphone ${m+1}`})),c.value=b.filter(R=>R.kind==="audiooutput").map((R,m)=>({deviceId:R.deviceId,label:R.label||`Speaker ${m+1}`}));const _=l.value.some(R=>R.deviceId===u.value);(!u.value||!_)&&l.value.length>0&&(u.value=l.value[0]?.deviceId??"");const $=c.value.some(R=>R.deviceId===d.value);(!d.value||!$)&&c.value.length>0&&(d.value=c.value[0]?.deviceId??""),u.value&&o(u.value),d.value&&i(d.value)}catch(b){console.error("Error loading devices",b)}},w=b=>{const _=String(b);u.value=_,o(_)},C=b=>{const _=String(b);d.value=_,i(_)},v=(b,_=35)=>b.length<=_?b:b.substring(0,_)+"...",x=N({get:()=>[p.value],set:b=>{p.value=b[0],s(p.value)}}),y=N({get:()=>[h.value],set:b=>{h.value=b[0],a(h.value)}});return Ue(()=>{g(),s(p.value),a(h.value)}),(b,_)=>e.visible?(I(),q(f(Cc),{key:0,open:e.visible,"onUpdate:open":_[5]||(_[5]=$=>r("update:visible",$))},{default:A(()=>[D(f(_c),{class:"wp:sm:max-w-sm"},{default:A(()=>[D(f(xc),null,{default:A(()=>[D(f(Tc),null,{default:A(()=>[..._[6]||(_[6]=[$e("Audio Settings",-1)])]),_:1})]),_:1}),ne("div",vx,[ne("div",mx,[D(f(Os),null,{default:A(()=>[..._[7]||(_[7]=[$e("Microphone",-1)])]),_:1}),D(f(eg),{modelValue:f(u),"onUpdate:modelValue":[_[0]||(_[0]=$=>We(u)?u.value=$:null),w]},{default:A(()=>[D(f(sg),{class:"wp:w-full"},{default:A(()=>[D(f(ig),{placeholder:"Select Microphone"})]),_:1}),D(f(tg),null,{default:A(()=>[D(f(rg),null,{default:A(()=>[(I(!0),we(Oe,null,Xt(l.value,$=>(I(),q(f(ng),{key:$.deviceId,value:$.deviceId,title:$.label},{default:A(()=>[$e(Re(v($.label)),1)]),_:2},1032,["value","title"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),ne("div",wx,[D(f(Os),null,{default:A(()=>[..._[8]||(_[8]=[$e("Speaker",-1)])]),_:1}),D(f(eg),{modelValue:f(d),"onUpdate:modelValue":[_[1]||(_[1]=$=>We(d)?d.value=$:null),C]},{default:A(()=>[D(f(sg),{class:"wp:w-full"},{default:A(()=>[D(f(ig),{placeholder:"Select Speaker"})]),_:1}),D(f(tg),null,{default:A(()=>[D(f(rg),null,{default:A(()=>[(I(!0),we(Oe,null,Xt(c.value,$=>(I(),q(f(ng),{key:$.deviceId,value:$.deviceId,title:$.label},{default:A(()=>[$e(Re(v($.label)),1)]),_:2},1032,["value","title"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),ne("div",yx,[ne("div",bx,[D(f(Os),null,{default:A(()=>[..._[9]||(_[9]=[$e("Media Volume",-1)])]),_:1}),ne("span",Sx,Re(f(p))+"%",1)]),D(f(og),{modelValue:x.value,"onUpdate:modelValue":_[2]||(_[2]=$=>x.value=$),max:100,step:1},null,8,["modelValue"])]),ne("div",Cx,[ne("div",_x,[D(f(Os),null,{default:A(()=>[..._[10]||(_[10]=[$e("Notification Volume",-1)])]),_:1}),ne("span",xx,Re(f(h))+"%",1)]),D(f(og),{modelValue:y.value,"onUpdate:modelValue":_[3]||(_[3]=$=>y.value=$),max:100,step:1},null,8,["modelValue"])]),D(f(gx)),ne("div",Tx,[D(f(Os),{class:"wp:text-base"},{default:A(()=>[..._[11]||(_[11]=[$e("Atajos de teclado",-1)])]),_:1}),ne("div",Ex,[ne("div",Ax,[_[12]||(_[12]=ne("span",{class:"wp:text-muted-foreground"},"Historial",-1)),D(f(Kt),null,{default:A(()=>[$e(Re(f(n))+"H",1)]),_:1})]),ne("div",kx,[_[13]||(_[13]=ne("span",{class:"wp:text-muted-foreground"},"Configuración",-1)),D(f(Kt),null,{default:A(()=>[$e(Re(f(n))+",",1)]),_:1})]),ne("div",Ix,[_[14]||(_[14]=ne("span",{class:"wp:text-muted-foreground"},"Teclado",-1)),D(f(Kt),null,{default:A(()=>[$e(Re(f(n))+"K",1)]),_:1})]),ne("div",Rx,[_[15]||(_[15]=ne("span",{class:"wp:text-muted-foreground"},"Línea 1",-1)),D(f(Kt),null,{default:A(()=>[$e(Re(f(n))+"1",1)]),_:1})]),ne("div",$x,[_[16]||(_[16]=ne("span",{class:"wp:text-muted-foreground"},"Línea 2",-1)),D(f(Kt),null,{default:A(()=>[$e(Re(f(n))+"2",1)]),_:1})]),ne("div",Dx,[_[17]||(_[17]=ne("span",{class:"wp:text-muted-foreground"},"Línea 3",-1)),D(f(Kt),null,{default:A(()=>[$e(Re(f(n))+"3",1)]),_:1})])])])]),D(f(Qh),null,{default:A(()=>[D(f(ze),{variant:"secondary",onClick:_[4]||(_[4]=$=>r("update:visible",!1))},{default:A(()=>[..._[18]||(_[18]=[$e("Close",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])):Ee("",!0)}}),Ox=Px,Hx=G({__name:"ScrollBar",props:{orientation:{default:"vertical"},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,r=Et(t,"class");return(n,s)=>(I(),q(f(aS),ue({"data-slot":"scroll-area-scrollbar"},f(r),{class:f(Ge)("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:A(()=>[D(f(cS),{"data-slot":"scroll-area-thumb",class:"wp:bg-border wp:relative wp:flex-1 wp:rounded-full"})]),_:1},16,["class"]))}}),Mx=Hx,qx=G({__name:"ScrollArea",props:{type:{},dir:{},scrollHideDelay:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,r=Et(t,"class");return(n,s)=>(I(),q(f(Z1),ue({"data-slot":"scroll-area"},f(r),{class:f(Ge)("wp:relative",t.class)}),{default:A(()=>[D(f(uS),{"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:A(()=>[Z(n.$slots,"default")]),_:3}),D(Mx),D(f(Q1))]),_:3},16,["class"]))}}),ag=qx,Nx={class:"wp:relative wp:my-2"},Bx={class:"wp:flex wp:flex-col wp:gap-2"},Fx=["onClick"],Lx={class:"wp:flex wp:items-center wp:gap-3"},Vx={class:"wp:flex wp:flex-col"},jx={class:"wp:text-sm wp:font-medium"},Ux={class:"wp:text-[10px] wp:text-muted-foreground"},zx={class:"wp:flex wp:flex-col wp:items-end"},Kx={key:0,class:"wp:text-xs wp:font-mono wp:text-muted-foreground"},Wx={class:"wp:text-[10px] wp:text-muted-foreground wp:capitalize"},Gx={key:0,class:"wp:text-center wp:text-muted-foreground wp:py-8"},Jx={key:1,class:"wp:text-center wp:text-muted-foreground wp:py-8"},Yx=G({__name:"CallHistoryDialog",props:{visible:{type:Boolean},contacts:{}},emits:["update:visible","call"],setup(e,{emit:t}){const r=e,n=t,s=bt("webphone"),i=B(""),o=p=>{if(!r.contacts)return p;const h=r.contacts.find(g=>g.number===p);return h?h.name:p},a=N(()=>{if(!i.value)return s.callHistory;const p=i.value.toLowerCase();return s.callHistory.filter(h=>{const g=o(h.number).toLowerCase(),w=h.number.toLowerCase();return g.includes(p)||w.includes(p)})}),l=p=>p===0?"":`${Math.floor(p/60)}:${(p%60).toString().padStart(2,"0")}`,c=p=>p.direction==="incoming"?p.status==="missed"?DC:$C:PC,u=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?(I(),q(f(Cc),{key:0,open:e.visible,"onUpdate:open":h[1]||(h[1]=g=>n("update:visible",g))},{default:A(()=>[D(f(_c),{class:"wp:sm:max-w-sm"},{default:A(()=>[D(f(xc),null,{default:A(()=>[D(f(Tc),null,{default:A(()=>[...h[2]||(h[2]=[$e("Call History",-1)])]),_:1})]),_:1}),ne("div",Nx,[D(f(HC),{class:"wp:absolute wp:left-2 wp:top-2.5 wp:h-4 wp:w-4 wp:text-muted-foreground"}),D(f(Sc),{modelValue:i.value,"onUpdate:modelValue":h[0]||(h[0]=g=>i.value=g),placeholder:"Search history...",class:"wp:pl-8"},null,8,["modelValue"])]),D(f(ag),{class:"wp:h-[60vh] wp:pr-4"},{default:A(()=>[ne("div",Bx,[(I(!0),we(Oe,null,Xt(a.value,g=>(I(),we("div",{key:g.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(g.number)},[ne("div",Lx,[(I(),q(Rn(c(g)),{class:Ke([u(g),"wp:w-4 wp:h-4"])},null,8,["class"])),ne("div",Vx,[ne("span",jx,Re(o(g.number)),1),ne("span",Ux,Re(new Date(g.startTime).toLocaleString()),1)])]),ne("div",zx,[g.duration>0?(I(),we("span",Kx,Re(l(g.duration)),1)):Ee("",!0),ne("span",Wx,Re(g.status),1)])],8,Fx))),128)),f(s).callHistory.length===0?(I(),we("div",Gx," No call history ")):a.value.length===0?(I(),we("div",Jx," No results found ")):Ee("",!0)])]),_:1})]),_:1})]),_:1},8,["open"])):Ee("",!0)}}),Zx=Yx,Xx={class:"wp:grid wp:gap-4 wp:py-4"},Qx={class:"wp:grid wp:gap-2 wp:relative"},eT={class:"wp:relative"},tT={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"},rT={class:"wp:p-1"},nT=["onClick"],sT={class:"wp:flex wp:flex-col wp:min-w-0 wp:flex-1"},iT={class:"wp:font-medium wp:text-sm wp:truncate"},oT={class:"wp:text-xs wp:text-muted-foreground"},aT=G({__name:"TransferDialog",props:{visible:{type:Boolean},contacts:{default:()=>[]}},emits:["update:visible","transfer"],setup(e,{emit:t}){const r=e,n=t,s=B(""),i=B(!1),o=B(null);Ie(()=>r.visible,p=>{p&&(s.value="",i.value=!1)}),Ie(s,p=>{i.value=p.length>0&&a.value.length>0});const a=N(()=>{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},c=()=>{s.value="",i.value=!1,o.value?.focus()},u=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(),u("blind")):p.key==="Escape"&&(i.value=!1)};return(p,h)=>e.visible?(I(),q(f(Cc),{key:0,open:e.visible,"onUpdate:open":h[5]||(h[5]=g=>n("update:visible",g))},{default:A(()=>[D(f(_c),{class:"wp:sm:max-w-md"},{default:A(()=>[D(f(xc),null,{default:A(()=>[D(f(Tc),null,{default:A(()=>[...h[6]||(h[6]=[$e("Transferir Llamada",-1)])]),_:1})]),_:1}),ne("div",Xx,[ne("div",Qx,[D(f(Os),{for:"transfer-input"},{default:A(()=>[...h[7]||(h[7]=[$e("Número o Contacto",-1)])]),_:1}),ne("div",eT,[D(f(Sc),{id:"transfer-input",ref_key:"inputRef",ref:o,modelValue:s.value,"onUpdate:modelValue":h[0]||(h[0]=g=>s.value=g),type:"text",placeholder:"Escribe un número o busca un contacto...",class:"wp:pr-8",onKeydown:d,onFocus:h[1]||(h[1]=g=>i.value=s.value.length>0&&a.value.length>0),autocomplete:"off"},null,8,["modelValue"]),s.value?(I(),q(f(ze),{key:0,variant:"ghost",size:"icon",class:"wp:absolute wp:right-0 wp:top-0 wp:h-full wp:w-8 wp:hover:bg-transparent",onClick:c},{default:A(()=>[D(f(wc),{class:"wp:h-4 wp:w-4"})]),_:1})):Ee("",!0)]),i.value&&a.value.length>0?(I(),we("div",tT,[D(f(ag),{class:"wp:max-h-60"},{default:A(()=>[ne("div",rT,[(I(!0),we(Oe,null,Xt(a.value,g=>(I(),we("div",{key:g.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(g)},[g.type?(I(),we("div",{key:0,class:Ke(f(Ge)("wp:flex wp:items-center wp:justify-center wp:w-8 wp:h-8 wp:rounded-full wp:shrink-0",g.type==="extension"?"wp:bg-blue-100 wp:text-blue-600 wp:dark:bg-blue-900/30 wp:dark:text-blue-400":g.type==="contact"?"wp:bg-emerald-100 wp:text-emerald-600 wp:dark:bg-emerald-900/30 wp:dark:text-emerald-400":g.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"))},[g.type==="extension"?(I(),q(f(Rh),{key:0,class:"wp:w-4 wp:h-4"})):g.type==="contact"?(I(),q(f(gc),{key:1,class:"wp:w-4 wp:h-4"})):g.type==="voicemail"?(I(),q(f(Bh),{key:2,class:"wp:w-4 wp:h-4"})):(I(),q(f(Lh),{key:3,class:"wp:w-4 wp:h-4"}))],2)):Ee("",!0),ne("div",sT,[ne("span",iT,Re(g.name),1),ne("span",oT,Re(g.number),1)])],8,nT))),128))])]),_:1})])):Ee("",!0),h[8]||(h[8]=ne("p",{class:"wp:text-xs wp:text-muted-foreground"}," Presiona Enter para transferir directamente ",-1))])]),D(f(Qh),{class:"wp:flex-col wp:gap-2 sm:wp:flex-row"},{default:A(()=>[D(f(ze),{variant:"secondary",onClick:h[2]||(h[2]=g=>n("update:visible",!1)),class:"wp:w-full sm:wp:w-auto"},{default:A(()=>[...h[9]||(h[9]=[$e(" Cancelar ",-1)])]),_:1}),D(f(ze),{onClick:h[3]||(h[3]=g=>u("blind")),disabled:!s.value.trim(),variant:"outline",class:"wp:w-full sm:wp:flex-1"},{default:A(()=>[...h[10]||(h[10]=[$e(" Transferencia Ciega ",-1)])]),_:1},8,["disabled"]),D(f(ze),{onClick:h[4]||(h[4]=g=>u("attended")),disabled:!s.value.trim(),class:"wp:w-full sm:wp:flex-1"},{default:A(()=>[...h[11]||(h[11]=[$e(" Con Consulta ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["open"])):Ee("",!0)}}),lT=aT,cT=G({__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=B(!1),o=B(!1),a=B(null),l=B(0),c=B(null);let u=null;Ue(()=>{i.value="documentPictureInPicture"in window,document.addEventListener("visibilitychange",d)}),Rt(()=>{document.removeEventListener("visibilitychange",d),h(),S()});const d=()=>{n.callStatus==="idle"||!i.value||document.hidden&&!o.value&&n.autoOpenOnBlur!==!1&&setTimeout(()=>{document.hidden&&!o.value&&O()},100)},p=()=>{c.value||(l.value=0,c.value=setInterval(()=>{l.value++},1e3))},h=()=>{c.value&&(clearInterval(c.value),c.value=null)},g=E=>{const M=Math.floor(E/60),j=E%60;return`${M.toString().padStart(2,"0")}:${j.toString().padStart(2,"0")}`};Ie(()=>n.callStatus,(E,M)=>{E==="connected"&&M!=="connected"?p():E==="idle"&&M!=="idle"&&(h(),o.value&&S())},{immediate:!0}),Ie(()=>n.isConnected,E=>{!E&&o.value&&(h(),S())}),Ie(()=>[n.callStatus,n.isMuted,n.isHeld],()=>{a.value&&($(a.value.document),b(a.value.document))});const w=N(()=>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>'},v=E=>{const M=E.createElement("style");M.textContent=`
73
+ ¿Desea realizar la llamada solo con AUDIO?`)&&d(!1)}else alert("Error al iniciar la llamada: "+(m instanceof Error?m.message:String(m)))}},p=(h=!1)=>{i(h)};return(h,m)=>(I(),ve("div",MC,[f(r).callStatus==="idle"?(I(),ve("div",qC,[l.isVideo?(I(),N(f(ze),{key:0,variant:"default",size:"icon",onClick:m[0]||(m[0]=w=>d(!0)),disabled:!l.destination&&(!f(r).keypadValue||!/^[+]?[0-9*#]+$/.test(f(r).keypadValue))&&!f(r).lastDialedNumber,"aria-label":"Video Call",class:"wp:w-12 wp:h-12 wp:rounded-full wp:bg-status-incall wp:hover:bg-status-incall/90 wp:text-white wp:dark:text-neutral-800"},{default:A(()=>[D(f(Nh),{class:"wp:w-5 wp:h-5"})]),_:1},8,["disabled"])):xe("",!0),D(f(ze),{variant:"default",size:"icon",onClick:m[1]||(m[1]=w=>d(!1)),disabled:!l.destination&&(!f(r).keypadValue||!/^[+]?[0-9*#]+$/.test(f(r).keypadValue))&&!f(r).lastDialedNumber,"aria-label":"Audio Call",class:"wp:w-12 wp:h-12 wp:rounded-full wp:bg-status-available wp:hover:bg-status-available/90 wp:text-white wp:dark:text-neutral-800"},{default:A(()=>[D(f(mc),{class:"wp:w-5 wp:h-5"})]),_:1},8,["disabled"])])):xe("",!0),f(r).callStatus==="incoming"?(I(),ve(Oe,{key:1},[f(r).activeChannel?.hasVideo?(I(),N(f(ze),{key:0,variant:"default",size:"icon",onClick:m[2]||(m[2]=w=>p(!0)),class:"wp:animate-pulse wp:w-12 wp:h-12 wp:rounded-full wp:bg-status-available wp:hover:bg-status-available/90 wp:text-white wp:dark:text-neutral-800","aria-label":"Answer Video"},{default:A(()=>[D(f(Nh),{class:"wp:w-5 wp:h-5"})]),_:1})):xe("",!0),D(f(ze),{variant:"default",size:"icon",onClick:m[3]||(m[3]=w=>p(!1)),class:"wp:animate-pulse wp:w-12 wp:h-12 wp:rounded-full wp:bg-status-available wp:hover:bg-status-available/90 wp:text-white wp:dark:text-neutral-800","aria-label":"Answer"},{default:A(()=>[D(f(mc),{class:"wp:w-5 wp:h-5"})]),_:1}),D(f(ze),{variant:"destructive",size:"icon",onClick:f(s),"aria-label":"Reject",class:"wp:w-12 wp:h-12 wp:rounded-full wp:bg-status-disconnected wp:hover:bg-status-disconnected/90 wp:text-white wp:dark:text-neutral-800"},{default:A(()=>[D(f(vc),{class:"wp:w-5 wp:h-5"})]),_:1},8,["onClick"])],64)):xe("",!0),f(r).callStatus==="connected"?(I(),ve(Oe,{key:2},[D(f(ze),{variant:f(r).isMuted?"destructive":"secondary",size:"icon",onClick:f(o),"aria-label":"Mute",class:Ke(["wp:w-12 wp:h-12 wp:rounded-full",{"wp:bg-status-disconnected wp:hover:bg-status-disconnected/90 wp:text-white wp:dark:text-neutral-800":f(r).isMuted}])},{default:A(()=>[f(r).isMuted?(I(),N(f(kC),{key:0,class:"wp:w-5 wp:h-5"})):(I(),N(f(IC),{key:1,class:"wp:w-5 wp:h-5"}))]),_:1},8,["variant","onClick","class"]),D(f(ze),{variant:(f(r).isHeld,"secondary"),size:"icon",onClick:f(a),"aria-label":"Hold",class:Ke(["wp:w-12 wp:h-12 wp:rounded-full",{"wp:bg-status-hold wp:hover:bg-status-hold/90 wp:text-white wp:dark:text-neutral-800":f(r).isHeld}])},{default:A(()=>[f(r).isHeld?(I(),N(f(OC),{key:0,class:"wp:w-5 wp:h-5"})):(I(),N(f(RC),{key:1,class:"wp:w-5 wp:h-5"}))]),_:1},8,["variant","onClick","class"]),u.value?xe("",!0):(I(),N(f(ze),{key:0,variant:"secondary",size:"icon",onClick:m[4]||(m[4]=w=>c("transfer")),"aria-label":"Transfer",class:"wp:w-12 wp:h-12 wp:rounded-full"},{default:A(()=>[D(f(xC),{class:"wp:w-5 wp:h-5"})]),_:1})),D(f(ze),{variant:"destructive",size:"icon",onClick:f(s),"aria-label":"Hangup",class:"wp:w-12 wp:h-12 wp:rounded-full wp:bg-status-disconnected wp:hover:bg-status-disconnected/90 wp:text-white wp:dark:text-neutral-800"},{default:A(()=>[D(f(vc),{class:"wp:w-5 wp:h-5"})]),_:1},8,["onClick"])],64)):xe("",!0),f(r).callStatus==="calling"?(I(),N(f(ze),{key:3,variant:"destructive",size:"icon",onClick:f(s),"aria-label":"Cancel",class:"wp:w-12 wp:h-12 wp:rounded-full wp:bg-status-disconnected wp:hover:bg-status-disconnected/90 wp:text-white wp:dark:text-neutral-800"},{default:A(()=>[D(f(vc),{class:"wp:w-5 wp:h-5"})]),_:1},8,["onClick"])):xe("",!0),u.value&&f(r).callStatus==="connected"?(I(),ve("div",NC,[D(f(ze),{variant:"default",size:"sm",onClick:m[5]||(m[5]=w=>c("completeTransfer")),class:"wp:gap-2 wp:bg-status-available wp:hover:bg-status-available/90 wp:text-white"},{default:A(()=>[D(f($h),{class:"wp:w-4 wp:h-4"}),m[7]||(m[7]=$e(" Completar Transferencia ",-1))]),_:1}),D(f(ze),{variant:"destructive",size:"sm",onClick:m[6]||(m[6]=w=>c("cancelTransfer")),class:"wp:gap-2"},{default:A(()=>[D(f(wc),{class:"wp:w-4 wp:h-4"}),m[8]||(m[8]=$e(" Cancelar ",-1))]),_:1})])):xe("",!0)]))}}),FC=BC;function Vh(e,t){return is()?(Mi(e,t),!0):!1}var yc=new WeakMap,LC=(...e)=>{var t;const r=e[0],n=(t=nt())===null||t===void 0?void 0:t.proxy,s=n??is();if(s==null&&!ja())throw new Error("injectLocal must be called in setup");return s&&yc.has(s)&&r in yc.get(s)?yc.get(s)[r]:bt(...e)},Tn=typeof window<"u"&&typeof document<"u",nE=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,VC=e=>typeof e<"u",jC=Object.prototype.toString,UC=e=>jC.call(e)==="[object Object]",Wn=()=>{},zC=KC();function KC(){var e,t,r;return Tn&&!!(!((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 jh(...e){if(e.length!==1)return xa(...e);const t=e[0];return typeof t=="function"?wt(zs(()=>({get:t,set:Wn}))):F(t)}function WC(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 Uh=e=>e();function GC(e=Uh,t={}){const{initialState:r="active"}=t,n=jh(r==="active");function s(){n.value=!1}function i(){n.value=!0}const o=(...a)=>{n.value&&e(...a)};return{isActive:wt(n),pause:s,resume:i,eventFilter:o}}function zh(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function bc(e){return Array.isArray(e)?e:[e]}function Kh(e){const t=Object.create(null);return(r=>t[r]||(t[r]=e(r)))}var JC=/\B([A-Z])/g,sE=Kh(e=>e.replace(JC,"-$1").toLowerCase()),YC=/-(\w)/g,iE=Kh(e=>e.replace(YC,(t,r)=>r?r.toUpperCase():""));function ZC(e){return e||nt()}function XC(e){return We(e)?Nr(new Proxy({},{get(t,r,n){return f(Reflect.get(e.value,r,n))},set(t,r,n){return We(e.value[r])&&!We(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}}})):Nr(e)}function QC(e){return XC(B(e))}function Et(e,...t){const r=t.flat(),n=r[0];return QC(()=>Object.fromEntries(typeof n=="function"?Object.entries(ft(e)).filter(([s,i])=>!n(_e(i),s)):Object.entries(ft(e)).filter(s=>!r.includes(s[0]))))}function e_(e,t,r={}){const{eventFilter:n=Uh,...s}=r;return Ie(e,WC(n,t),s)}function t_(e,t,r={}){const{eventFilter:n,initialState:s="active",...i}=r,{eventFilter:o,pause:a,resume:l,isActive:c}=GC(n,{initialState:s});return{stop:e_(e,t,{...i,eventFilter:o}),pause:a,resume:l,isActive:c}}var r_=t_;function n_(e,t={}){if(!We(e))return ft(e);const r=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const n in e.value)r[n]=zs(()=>({get(){return e.value[n]},set(s){var i;if(!((i=_e(t.replaceRef))!==null&&i!==void 0)||i)if(Array.isArray(e.value)){const o=[...e.value];o[n]=s,e.value=o}else{const o={...e.value,[n]:s};Object.setPrototypeOf(o,Object.getPrototypeOf(e.value)),e.value=o}else e.value[n]=s}}));return r}function Wh(e,t=!0,r){ZC(r)?Ue(e,r):t?e():at(e)}function s_(e,t=1e3,r={}){const{immediate:n=!0,immediateCallback:s=!1}=r;let i=null;const o=Ze(!1);function a(){i&&(clearInterval(i),i=null)}function l(){o.value=!1,a()}function c(){const u=_e(t);u<=0||(o.value=!0,s&&e(),a(),o.value&&(i=setInterval(e,u)))}return n&&Tn&&c(),(We(t)||typeof t=="function")&&Vh(Ie(t,()=>{o.value&&Tn&&c()})),Vh(l),{isActive:en(o),pause:l,resume:c}}function i_(e=!1,t={}){const{truthyValue:r=!0,falsyValue:n=!1}=t,s=We(e),i=Ze(e);function o(a){if(arguments.length)return i.value=a,i.value;{const l=_e(r);return i.value=i.value===l?_e(n):l,i.value}}return s?o:[i,o]}function o_(e,t,r){return Ie(e,t,{...r,immediate:!0})}var Dr=Tn?window:void 0,oE=Tn?window.document:void 0,aE=Tn?window.navigator:void 0,lE=Tn?window.location:void 0;function Ps(e){var t;const r=_e(e);return(t=r?.$el)!==null&&t!==void 0?t:r}function ir(...e){const t=(n,s,i,o)=>(n.addEventListener(s,i,o),()=>n.removeEventListener(s,i,o)),r=B(()=>{const n=bc(_e(e[0])).filter(s=>s!=null);return n.every(s=>typeof s!="string")?n:void 0});return o_(()=>{var n,s;return[(n=(s=r.value)===null||s===void 0?void 0:s.map(i=>Ps(i)))!==null&&n!==void 0?n:[Dr].filter(i=>i!=null),bc(_e(r.value?e[1]:e[0])),bc(f(r.value?e[2]:e[1])),_e(r.value?e[3]:e[2])]},([n,s,i,o],a,l)=>{if(!n?.length||!s?.length||!i?.length)return;const c=UC(o)?{...o}:o,u=n.flatMap(d=>s.flatMap(p=>i.map(h=>t(d,p,h,c))));l(()=>{u.forEach(d=>d())})},{flush:"post"})}var Gh=!1;function a_(e,t,r={}){const{window:n=Dr,ignore:s=[],capture:i=!0,detectIframe:o=!1,controls:a=!1}=r;if(!n)return a?{stop:Wn,cancel:Wn,trigger:Wn}:Wn;if(zC&&!Gh){Gh=!0;const S={passive:!0};Array.from(n.document.body.children).forEach(g=>g.addEventListener("click",Wn,S)),n.document.documentElement.addEventListener("click",Wn,S)}let l=!0;const c=S=>_e(s).some(g=>{if(typeof g=="string")return Array.from(n.document.querySelectorAll(g)).some(x=>x===S.target||S.composedPath().includes(x));{const x=Ps(g);return x&&(S.target===x||S.composedPath().includes(x))}});function u(S){const g=_e(S);return g&&g.$.subTree.shapeFlag===16}function d(S,g){const x=_e(S),y=x.$.subTree&&x.$.subTree.children;return y==null||!Array.isArray(y)?!1:y.some(b=>b.el===g.target||g.composedPath().includes(b.el))}const p=S=>{const g=Ps(e);if(S.target!=null&&!(!(g instanceof Element)&&u(e)&&d(e,S))&&!(!g||g===S.target||S.composedPath().includes(g))){if("detail"in S&&S.detail===0&&(l=!c(S)),!l){l=!0;return}t(S)}};let h=!1;const m=[ir(n,"click",S=>{h||(h=!0,setTimeout(()=>{h=!1},0),p(S))},{passive:!0,capture:i}),ir(n,"pointerdown",S=>{const g=Ps(e);l=!c(S)&&!!(g&&!S.composedPath().includes(g))},{passive:!0}),o&&ir(n,"blur",S=>{setTimeout(()=>{var g;const x=Ps(e);((g=n.document.activeElement)===null||g===void 0?void 0:g.tagName)==="IFRAME"&&!x?.contains(n.document.activeElement)&&t(S)},0)},{passive:!0})].filter(Boolean),w=()=>m.forEach(S=>S());return a?{stop:w,cancel:()=>{l=!1},trigger:S=>{l=!0,p(S),l=!1}}:w}function l_(){const e=Ze(!1),t=nt();return t&&Ue(()=>{e.value=!0},t),e}function Jh(e){const t=l_();return B(()=>(t.value,!!e()))}var c_=Symbol("vueuse-ssr-width");function u_(){const e=ja()?LC(c_,null):null;return typeof e=="number"?e:void 0}function d_(e,t={}){const{window:r=Dr,ssrWidth:n=u_()}=t,s=Jh(()=>r&&"matchMedia"in r&&typeof r.matchMedia=="function"),i=Ze(typeof n=="number"),o=Ze(),a=Ze(!1),l=c=>{a.value=c.matches};return st(()=>{if(i.value){i.value=!s.value,a.value=_e(e).split(",").some(c=>{const u=c.includes("not all"),d=c.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),p=c.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let h=!!(d||p);return d&&h&&(h=n>=zh(d[1])),p&&h&&(h=n<=zh(p[1])),u?!h:h});return}s.value&&(o.value=r.matchMedia(_e(e)),a.value=o.value.matches)}),ir(o,"change",l,{passive:!0}),B(()=>a.value)}function f_(e){return JSON.parse(JSON.stringify(e))}var ra=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},na="__vueuse_ssr_handlers__",p_=h_();function h_(){return na in ra||(ra[na]=ra[na]||{}),ra[na]}function Yh(e,t){return p_[e]||t}function g_(e){return d_("(prefers-color-scheme: dark)",e)}function v_(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 m_={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()}},Zh="vueuse-storage";function Ai(e,t,r,n={}){var s;const{flush:i="pre",deep:o=!0,listenToStorageChanges:a=!0,writeDefaults:l=!0,mergeDefaults:c=!1,shallow:u,window:d=Dr,eventFilter:p,onError:h=q=>{console.error(q)},initOnMounted:m}=n,w=(u?Ze:F)(typeof t=="function"?t():t),S=B(()=>_e(e));if(!r)try{r=Yh("getDefaultStorage",()=>Dr?.localStorage)()}catch(q){h(q)}if(!r)return w;const g=_e(t),x=v_(g),y=(s=n.serializer)!==null&&s!==void 0?s:m_[x],{pause:b,resume:_}=r_(w,q=>O(q),{flush:i,deep:o,eventFilter:p});Ie(S,()=>T(),{flush:i});let $=!1;const R=q=>{m&&!$||T(q)},v=q=>{m&&!$||E(q)};d&&a&&(r instanceof Storage?ir(d,"storage",R,{passive:!0}):ir(d,Zh,v)),m?Wh(()=>{$=!0,T()}):T();function P(q,j){if(d){const z={key:S.value,oldValue:q,newValue:j,storageArea:r};d.dispatchEvent(r instanceof Storage?new StorageEvent("storage",z):new CustomEvent(Zh,{detail:z}))}}function O(q){try{const j=r.getItem(S.value);if(q==null)P(j,null),r.removeItem(S.value);else{const z=y.write(q);j!==z&&(r.setItem(S.value,z),P(j,z))}}catch(j){h(j)}}function C(q){const j=q?q.newValue:r.getItem(S.value);if(j==null)return l&&g!=null&&r.setItem(S.value,y.write(g)),g;if(!q&&c){const z=y.read(j);return typeof c=="function"?c(z,g):x==="object"&&!Array.isArray(z)?{...g,...z}:z}else return typeof j!="string"?j:y.read(j)}function T(q){if(!(q&&q.storageArea!==r)){if(q&&q.key==null){w.value=g;return}if(!(q&&q.key!==S.value)){b();try{const j=y.write(w.value);(q===void 0||q?.newValue!==j)&&(w.value=C(q))}catch(j){h(j)}finally{q?at(_):_()}}}}function E(q){T(q.detail)}return w}var w_="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function y_(e={}){const{selector:t="html",attribute:r="class",initialValue:n="auto",window:s=Dr,storage:i,storageKey:o="vueuse-color-scheme",listenToStorageChanges:a=!0,storageRef:l,emitAuto:c,disableTransition:u=!0}=e,d={auto:"",light:"light",dark:"dark",...e.modes||{}},p=g_({window:s}),h=B(()=>p.value?"dark":"light"),m=l||(o==null?jh(n):Ai(o,n,i,{window:s,listenToStorageChanges:a})),w=B(()=>m.value==="auto"?h.value:m.value),S=Yh("updateHTMLAttrs",(b,_,$)=>{const R=typeof b=="string"?s?.document.querySelector(b):Ps(b);if(!R)return;const v=new Set,P=new Set;let O=null;if(_==="class"){const T=$.split(/\s/g);Object.values(d).flatMap(E=>(E||"").split(/\s/g)).filter(Boolean).forEach(E=>{T.includes(E)?v.add(E):P.add(E)})}else O={key:_,value:$};if(v.size===0&&P.size===0&&O===null)return;let C;u&&(C=s.document.createElement("style"),C.appendChild(document.createTextNode(w_)),s.document.head.appendChild(C));for(const T of v)R.classList.add(T);for(const T of P)R.classList.remove(T);O&&R.setAttribute(O.key,O.value),u&&(s.getComputedStyle(C).opacity,document.head.removeChild(C))});function g(b){var _;S(t,r,(_=d[b])!==null&&_!==void 0?_:b)}function x(b){e.onChanged?e.onChanged(b,g):g(b)}Ie(w,x,{flush:"post",immediate:!0}),Wh(()=>x(w.value));const y=B({get(){return c?m.value:w.value},set(b){m.value=b}});return Object.assign(y,{store:m,system:h,state:w})}function Xh(e={}){const{valueDark:t="dark",valueLight:r=""}=e,n=y_({...e,onChanged:(i,o)=>{var a;e.onChanged?(a=e.onChanged)===null||a===void 0||a.call(e,i==="dark",o,i):o(i)},modes:{dark:t,light:r}}),s=B(()=>n.system.value);return B({get(){return n.value==="dark"},set(i){const o=i?"dark":"light";s.value===o?n.value="auto":n.value=o}})}function b_(e,t={}){var r;const{pointerTypes:n,preventDefault:s,stopPropagation:i,exact:o,onMove:a,onEnd:l,onStart:c,initialValue:u,axis:d="both",draggingElement:p=Dr,containerElement:h,handle:m=e,buttons:w=[0]}=t,S=F((r=_e(u))!==null&&r!==void 0?r:{x:0,y:0}),g=F(),x=R=>n?n.includes(R.pointerType):!0,y=R=>{_e(s)&&R.preventDefault(),_e(i)&&R.stopPropagation()},b=R=>{var v;if(!_e(w).includes(R.button)||_e(t.disabled)||!x(R)||_e(o)&&R.target!==_e(e))return;const P=_e(h),O=P==null||(v=P.getBoundingClientRect)===null||v===void 0?void 0:v.call(P),C=_e(e).getBoundingClientRect(),T={x:R.clientX-(P?C.left-O.left+P.scrollLeft:C.left),y:R.clientY-(P?C.top-O.top+P.scrollTop:C.top)};c?.(T,R)!==!1&&(g.value=T,y(R))},_=R=>{if(_e(t.disabled)||!x(R)||!g.value)return;const v=_e(h),P=_e(e).getBoundingClientRect();let{x:O,y:C}=S.value;(d==="x"||d==="both")&&(O=R.clientX-g.value.x,v&&(O=Math.min(Math.max(0,O),v.scrollWidth-P.width))),(d==="y"||d==="both")&&(C=R.clientY-g.value.y,v&&(C=Math.min(Math.max(0,C),v.scrollHeight-P.height))),S.value={x:O,y:C},a?.(S.value,R),y(R)},$=R=>{_e(t.disabled)||!x(R)||g.value&&(g.value=void 0,l?.(S.value,R),y(R))};if(Tn){const R=()=>{var v;return{capture:(v=t.capture)!==null&&v!==void 0?v:!0,passive:!_e(s)}};ir(m,"pointerdown",b,R),ir(p,"pointermove",_,R),ir(p,"pointerup",$,R)}return{...n_(S),position:S,isDragging:B(()=>!!g.value),style:B(()=>`left:${S.value.x}px;top:${S.value.y}px;`)}}function S_(e={}){const{window:t=Dr}=e,r=t?.navigator,n=Jh(()=>r&&"connection"in r),s=Ze(!0),i=Ze(!1),o=Ze(void 0),a=Ze(void 0),l=Ze(void 0),c=Ze(void 0),u=Ze(void 0),d=Ze(void 0),p=Ze("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,c.value=h.downlinkMax,d.value=h.effectiveType,u.value=h.rtt,i.value=h.saveData,p.value=h.type))}const w={passive:!0};return t&&(ir(t,"offline",()=>{s.value=!1,o.value=Date.now()},w),ir(t,"online",()=>{s.value=!0,a.value=Date.now()},w)),h&&ir(h,"change",m,w),m(),{isSupported:n,isOnline:wt(s),saveData:wt(i),offlineAt:wt(o),onlineAt:wt(a),downlink:wt(l),downlinkMax:wt(c),effectiveType:wt(d),rtt:wt(u),type:wt(p)}}var cE=[{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 C_(e,t,r,n={}){var s,i;const{clone:o=!1,passive:a=!1,eventName:l,deep:c=!1,defaultValue:u,shouldEmit:d}=n,p=nt(),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=x=>o?typeof o=="function"?o(x):f_(x):x,S=()=>VC(e[t])?w(e[t]):u,g=x=>{d?d(x)&&h(m,x):h(m,x)};if(a){const x=F(S());let y=!1;return Ie(()=>e[t],b=>{y||(y=!0,x.value=w(b),at(()=>y=!1))}),Ie(x,b=>{!y&&(b!==e[t]||c)&&g(b)},{deep:c}),x}else return B({get(){return S()},set(x){g(x)}})}var __=G({__name:"Input",props:{defaultValue:{},modelValue:{},class:{}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=C_(r,"modelValue",t,{passive:!0,defaultValue:r.defaultValue});return(s,i)=>Yi((I(),ve("input",{"onUpdate:modelValue":i[0]||(i[0]=o=>We(n)?n.value=o:null),"data-slot":"input",class:Ke(f(Ge)("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-input 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)]])}}),Sc=__,x_=G({__name:"Kbd",props:{class:{}},setup(e){const t=e;return(r,n)=>(I(),ve("kbd",{class:Ke(f(Ge)("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))},[Z(r.$slots,"default")],2))}}),Kt=x_,T_=G({__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=Ar(e,t);return(n,s)=>(I(),N(f(uC),ce({"data-slot":"tooltip"},f(r)),{default:A(i=>[Z(n.$slots,"default",Ht(Dt(i)))]),_:3},16))}}),Gn=T_,E_=G({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:{}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=t,s=Ar(Et(r,"class"),n);return(i,o)=>(I(),N(f(pC),null,{default:A(()=>[D(f(fC),ce({"data-slot":"tooltip-content"},{...f(s),...i.$attrs},{class:f(Ge)("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:A(()=>[Z(i.$slots,"default"),D(f(oC),{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}))}}),Jn=E_,A_=G({__name:"TooltipProvider",props:{delayDuration:{default:0},skipDelayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},setup(e){const t=e;return(r,n)=>(I(),N(f(lC),Ht(Dt(t)),{default:A(()=>[Z(r.$slots,"default")]),_:3},16))}}),Yn=A_,k_=G({__name:"TooltipTrigger",props:{reference:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>(I(),N(f(hC),ce({"data-slot":"tooltip-trigger"},t),{default:A(()=>[Z(r.$slots,"default")]),_:3},16))}}),Zn=k_,I_={class:"wp:flex wp:flex-col wp:items-center wp:px-4 wp:space-y-2"},R_={key:2,class:"wp:w-full wp:flex wp:items-center wp:justify-center wp:gap-2 wp:min-h-10"},$_={class:"wp:relative"},D_={class:"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"},P_=["onMousedown"],O_={class:"wp:flex wp:flex-col wp:min-w-0"},H_={class:"wp:truncate"},M_={class:"wp:text-xs wp:text-muted-foreground wp:truncate"},q_={key:3,class:"wp:flex wp:flex-col wp:items-center wp:justify-center wp:gap-2 wp:w-full"},N_={class:"wp:flex wp:flex-col wp:items-center wp:gap-1"},B_={class:"wp:flex wp:items-center wp:gap-2"},F_={key:0,class:"wp:text-[10px] wp:text-muted-foreground"},L_={key:4,class:"wp:flex wp:flex-col wp:items-center wp:justify-center wp:gap-2 wp:min-h-10"},V_={class:"wp:flex wp:items-center wp:gap-4"},j_={class:"wp:flex wp:flex-col wp:items-center"},U_={class:"wp:text-xl wp:font-bold wp:text-neutral-800 wp:dark:text-white"},z_={key:0,class:"wp:text-sm wp:text-muted-foreground"},K_=G({__name:"CallDisplay",props:{allowInput:{type:Boolean,default:!0},isWebCall:{type:Boolean,default:!1},user:{},contacts:{default:()=>[]},channelId:{default:void 0}},setup(e){const t=bt("webphone"),r=bt("sip"),n=navigator.platform.toUpperCase().indexOf("MAC")>=0?"⌘":"Ctrl+",s=e,i=B(()=>s.channelId!==void 0?t.channels.find(P=>P.id===s.channelId):t.activeChannel),o=B(()=>{if(!t.isConnected)return"wp:text-status-disconnected";const P=i.value;return P&&P.status!=="idle"?P.isHeld||P.status==="held"?"wp:text-status-hold":P.status==="incoming"?"wp:text-status-incoming":"wp:text-status-incall":"wp:text-status-available"}),a=B(()=>{if(!t.isConnected)return"wp:text-status-disconnected wp:hover:text-status-disconnected/80";const P=i.value;return P&&P.status!=="idle"?P.isHeld||P.status==="held"?"wp:text-status-hold wp:hover:text-status-hold/80":P.status==="incoming"?"wp:text-status-incoming wp:hover:text-status-incoming/80":"wp:text-status-incall wp:hover:text-status-incall/80":"wp:text-status-available wp:hover:text-status-available/80"}),l=F(!1),c=F(null),u=F(null);a_(c,()=>{l.value=!1});const d=B({get:()=>i.value?.keypadValue||"",set:P=>{i.value&&t.updateChannelState(i.value.id,{keypadValue:P})}}),p=B(()=>/^[+]?[0-9*#]+$/.test(d.value)),h=B(()=>{if(!d.value)return s.contacts.slice(0,10);const P=d.value.toLowerCase(),O=[];for(const C of s.contacts)if((C.name.toLowerCase().includes(P)||C.number.includes(P))&&(O.push(C),O.length>=10))break;return O}),m=P=>{i.value&&t.updateChannelState(i.value.id,{keypadValue:P.number}),l.value=!1,r.makeCall(P.number)},w=()=>{!d.value||!p.value||(l.value=!1,r.makeCall(d.value))};Ie(d,()=>{l.value=!0});const S=()=>{d.value&&p.value&&w()},g=()=>{l.value=!1},x=()=>{l.value=!0},y=()=>{setTimeout(()=>{l.value=!1},150)},b=F(Date.now());s_(()=>{b.value=Date.now()},1e3);const _=B(()=>{const P=i.value?.startTime,O=i.value?.status||"idle";if(!P||O!=="connected")return"00:00";const C=Math.floor((b.value-P)/1e3);return C<0?"00:00":`${Math.floor(C/60).toString().padStart(2,"0")}:${(C%60).toString().padStart(2,"0")}`}),$=B(()=>{const P=i.value,O=P?.status||"idle";return O==="idle"?"Disponible":O==="calling"?"Llamando...":P?.isHeld?`En espera - ${P.remoteNumber||P.keypadValue||"Unknown"}`:O==="connected"?"Conectado":O.charAt(0).toUpperCase()+O.slice(1)}),R=B(()=>{const P=i.value,O=P?.remoteNumber||P?.keypadValue,C=P?.remoteDisplayName;if(!O)return"Unknown";const T=s.contacts?.find(E=>E.number===O||O.endsWith(E.number)||E.number.endsWith(O));return T?T.name:C||O}),v=B(()=>{const P=i.value;return P?.remoteNumber||P?.keypadValue||""});return(P,O)=>(I(),ve("div",I_,[s.user?(I(),ve("span",{key:0,class:Ke([o.value,"wp:font-bold wp:text-lg wp:flex wp:items-center wp:gap-2 wp:transition-colors wp:duration-300"])},[O[2]||(O[2]=re("div",{class:"wp:w-2.5 wp:h-2.5 wp:rounded-full wp:bg-current wp:shadow-[0_0_8px_currentColor]"},null,-1)),$e(" "+Re(s.user),1)],2)):xe("",!0),(i.value?.status||"idle")!=="connected"?(I(),ve("div",{key:1,class:Ke([o.value,"wp:font-medium wp:tracking-wider wp:min-h-5 wp:text-sm wp:normal-case"])},Re($.value),3)):xe("",!0),(i.value?.status||"idle")==="idle"&&s.allowInput?(I(),ve("div",R_,[re("div",{class:"wp:relative wp:w-full wp:max-w-75",ref_key:"containerRef",ref:c},[re("div",$_,[D(f(Sc),{ref_key:"inputRef",ref:u,modelValue:d.value,"onUpdate:modelValue":O[0]||(O[0]=C=>d.value=C),onFocus:x,onBlur:y,onKeydown:[fl(S,["enter"]),fl(g,["escape"])],placeholder:"Ingresar número...",class:"wp:h-10 wp:text-center wp:select-text wp:pr-8 wp:text-base"},null,8,["modelValue"]),d.value?(I(),ve("div",{key:0,class:"wp:absolute wp:right-2 wp:top-1/2 wp:-translate-y-1/2 wp:z-10 wp:cursor-pointer wp:p-1 wp:hover:bg-accent wp:rounded-full",onClick:O[1]||(O[1]=Cr(C=>f(t).backspaceKeypad(),["stop"]))},[D(f(EC),{class:"wp:w-4 wp:h-4 wp:text-neutral-400 wp:hover:text-status-disconnected wp:dark:text-neutral-500 wp:dark:hover:text-status-disconnected wp:transition-colors"})])):xe("",!0)]),Yi(re("div",D_,[p.value?(I(),ve("div",{key:0,class:"wp:cursor-pointer wp:hover:bg-accent wp:flex wp:items-center wp:gap-2 wp:p-2 wp:px-3 wp:text-sm",onMousedown:Cr(w,["prevent"])},[D(f(mc),{class:"wp:w-4 wp:h-4 wp:shrink-0"}),re("span",null,"Marcar "+Re(d.value),1)],32)):xe("",!0),(I(!0),ve(Oe,null,Xt(h.value,C=>(I(),ve("div",{key:C.number,class:"wp:cursor-pointer wp:hover:bg-accent wp:flex wp:items-center wp:gap-2 wp:p-2 wp:px-3 wp:text-sm",onMousedown:Cr(T=>m(C),["prevent"])},[re("div",{class:Ke(f(Ge)("wp:flex wp:items-center wp:justify-center wp:w-6 wp:h-6 wp:rounded-full wp:shrink-0",C.type==="extension"?"wp:bg-blue-100 wp:text-blue-600 wp:dark:bg-blue-900/30 wp:dark:text-blue-400":C.type==="contact"?"wp:bg-emerald-100 wp:text-emerald-600 wp:dark:bg-emerald-900/30 wp:dark:text-emerald-400":C.type==="voicemail"?"wp:bg-purple-100 wp:text-purple-600 wp:dark:bg-purple-900/30 wp:dark:text-purple-400":C.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"))},[C.type==="extension"?(I(),N(f(Rh),{key:0,class:"wp:w-3 wp:h-3"})):C.type==="contact"?(I(),N(f(gc),{key:1,class:"wp:w-3 wp:h-3"})):C.type==="voicemail"?(I(),N(f(Bh),{key:2,class:"wp:w-3 wp:h-3"})):C.type==="tool"?(I(),N(f(Lh),{key:3,class:"wp:w-3 wp:h-3"})):(I(),N(f(gc),{key:4,class:"wp:w-3 wp:h-3"}))],2),re("div",O_,[re("span",H_,Re(C.name),1),re("span",M_,Re(C.number),1)])],40,P_))),128))],512),[[yo,l.value&&d.value&&(h.value.length>0||p.value)]])],512),D(f(Yn),null,{default:A(()=>[D(f(Gn),null,{default:A(()=>[D(f(Zn),{"as-child":""},{default:A(()=>[D(f(ze),{onClick:f(t).toggleKeypad,variant:"ghost",size:"icon",class:Ke(f(Ge)("wp:rounded-full",a.value))},{default:A(()=>[D(f(Ei),{class:"wp:w-5 wp:h-5"})]),_:1},8,["onClick","class"])]),_:1}),D(f(Jn),{class:"wp:flex wp:items-center wp:gap-2"},{default:A(()=>[re("span",null,Re(f(t).isKeypadVisible?"Ocultar":"Mostrar")+" teclado",1),D(f(Kt),null,{default:A(()=>[$e(Re(f(n))+"K",1)]),_:1})]),_:1})]),_:1})]),_:1})])):(i.value?.status||"idle")==="connected"?(I(),ve("div",q_,[re("div",{class:Ke([o.value,"wp:flex wp:items-center wp:gap-2 wp:text-3xl wp:font-light"])},[D(f(AC),{class:"wp:w-6 wp:h-6 wp:animate-spin",style:{"animation-duration":"3s"}}),re("span",null,Re(_.value),1)],2),re("div",N_,[re("div",B_,[re("div",{class:Ke([o.value,"wp:text-xs"])}," En llamada con "+Re(R.value),3),e.isWebCall?xe("",!0):(I(),N(f(Yn),{key:0},{default:A(()=>[D(f(Gn),null,{default:A(()=>[D(f(Zn),{"as-child":""},{default:A(()=>[D(f(ze),{onClick:f(t).toggleKeypad,variant:"ghost",size:"icon",class:Ke(f(Ge)("wp:h-6 wp:w-6 wp:rounded-full",a.value))},{default:A(()=>[D(f(Ei),{class:"wp:w-4 wp:h-4"})]),_:1},8,["onClick","class"])]),_:1}),D(f(Jn),{class:"wp:flex wp:items-center wp:gap-2"},{default:A(()=>[re("span",null,Re(f(t).isKeypadVisible?"Ocultar":"Mostrar")+" teclado",1),D(f(Kt),null,{default:A(()=>[$e(Re(f(n))+"K",1)]),_:1})]),_:1})]),_:1})]),_:1}))]),R.value!==v.value?(I(),ve("div",F_,Re(v.value),1)):xe("",!0)])])):(i.value?.status||"idle")!=="idle"?(I(),ve("div",L_,[re("div",V_,[re("div",j_,[re("div",U_,Re(R.value),1),R.value!==v.value?(I(),ve("div",z_,Re(v.value),1)):xe("",!0)]),D(f(Yn),null,{default:A(()=>[D(f(Gn),null,{default:A(()=>[D(f(Zn),{"as-child":""},{default:A(()=>[D(f(ze),{onClick:f(t).toggleKeypad,variant:"ghost",size:"icon",class:Ke(f(Ge)("wp:rounded-full",a.value))},{default:A(()=>[D(f(Ei),{class:"wp:w-5 wp:h-5"})]),_:1},8,["onClick","class"])]),_:1}),D(f(Jn),{class:"wp:flex wp:items-center wp:gap-2"},{default:A(()=>[re("span",null,Re(f(t).isKeypadVisible?"Ocultar":"Mostrar")+" teclado",1),D(f(Kt),null,{default:A(()=>[$e(Re(f(n))+"K",1)]),_:1})]),_:1})]),_:1})]),_:1})])])):xe("",!0)]))}}),W_=K_,G_=G({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=Ar(e,t);return(n,s)=>(I(),N(f(n0),ce({"data-slot":"dialog"},f(r)),{default:A(i=>[Z(n.$slots,"default",Ht(Dt(i)))]),_:3},16))}}),Cc=G_,J_=G({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,r=Et(t,"class");return(n,s)=>(I(),N(f(_0),ce({"data-slot":"dialog-overlay"},f(r),{class:f(Ge)("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:A(()=>[Z(n.$slots,"default")]),_:3},16,["class"]))}}),Y_=J_,Z_=G({inheritAttrs:!1,__name:"DialogContent",props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{},showCloseButton:{type:Boolean,default:!0}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=e,n=t,s=Ar(Et(r,"class"),n);return(i,o)=>(I(),N(f(x0),null,{default:A(()=>[D(Y_),D(f(S0),ce({"data-slot":"dialog-content"},{...i.$attrs,...f(s)},{class:f(Ge)("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:A(()=>[Z(i.$slots,"default"),e.showCloseButton?(I(),N(f(s0),{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:A(()=>[D(f(wc)),o[0]||(o[0]=re("span",{class:"wp:sr-only"},"Close",-1))]),_:1})):xe("",!0)]),_:3},16,["class"])]),_:3}))}}),_c=Z_,X_=G({__name:"DialogFooter",props:{class:{}},setup(e){const t=e;return(r,n)=>(I(),ve("div",{"data-slot":"dialog-footer",class:Ke(f(Ge)("wp:flex wp:flex-col-reverse wp:gap-2 wp:sm:flex-row wp:sm:justify-end",t.class))},[Z(r.$slots,"default")],2))}}),Qh=X_,Q_=G({__name:"DialogHeader",props:{class:{}},setup(e){const t=e;return(r,n)=>(I(),ve("div",{"data-slot":"dialog-header",class:Ke(f(Ge)("wp:flex wp:flex-col wp:gap-2 wp:text-center wp:sm:text-left",t.class))},[Z(r.$slots,"default")],2))}}),xc=Q_,ex=G({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,r=Er(Et(t,"class"));return(n,s)=>(I(),N(f(T0),ce({"data-slot":"dialog-title"},f(r),{class:f(Ge)("wp:text-lg wp:leading-none wp:font-semibold",t.class)}),{default:A(()=>[Z(n.$slots,"default")]),_:3},16,["class"]))}}),Tc=ex,tx=G({__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=Ar(e,t);return(n,s)=>(I(),N(f(gS),ce({"data-slot":"select"},f(r)),{default:A(i=>[Z(n.$slots,"default",Ht(Dt(i)))]),_:3},16))}}),eg=tx,rx=G({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:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=t,s=Ar(Et(r,"class"),n);return(i,o)=>(I(),N(f(DS),null,{default:A(()=>[D(f(xS),ce({"data-slot":"select-content"},{...i.$attrs,...f(s)},{class:f(Ge)("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:A(()=>[D(f(cx)),D(f(qS),{class:Ke(f(Ge)("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:A(()=>[Z(i.$slots,"default")]),_:3},8,["class"]),D(f(ax))]),_:3},16,["class"])]),_:3}))}}),tg=rx,nx=G({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>(I(),N(f(ES),ce({"data-slot":"select-group"},t),{default:A(()=>[Z(r.$slots,"default")]),_:3},16))}}),rg=nx,sx={class:"wp:absolute wp:right-2 wp:flex wp:size-3.5 wp:items-center wp:justify-center"},ix=G({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,r=Er(Et(t,"class"));return(n,s)=>(I(),N(f(IS),ce({"data-slot":"select-item"},f(r),{class:f(Ge)("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:A(()=>[re("span",sx,[D(f(RS),null,{default:A(()=>[Z(n.$slots,"indicator-icon",{},()=>[D(f($h),{class:"wp:size-4"})])]),_:3})]),D(f($S),null,{default:A(()=>[Z(n.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),ng=ix,ox=G({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,r=Er(Et(t,"class"));return(n,s)=>(I(),N(f(PS),ce({"data-slot":"select-scroll-down-button"},f(r),{class:f(Ge)("wp:flex wp:cursor-default wp:items-center wp:justify-center wp:py-1",t.class)}),{default:A(()=>[Z(n.$slots,"default",{},()=>[D(f(Dh),{class:"wp:size-4"})])]),_:3},16,["class"]))}}),ax=ox,lx=G({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,r=Er(Et(t,"class"));return(n,s)=>(I(),N(f(OS),ce({"data-slot":"select-scroll-up-button"},f(r),{class:f(Ge)("wp:flex wp:cursor-default wp:items-center wp:justify-center wp:py-1",t.class)}),{default:A(()=>[Z(n.$slots,"default",{},()=>[D(f(TC),{class:"wp:size-4"})])]),_:3},16,["class"]))}}),cx=lx,ux=G({__name:"SelectTrigger",props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{},size:{default:"default"}},setup(e){const t=e,r=Er(Et(t,"class","size"));return(n,s)=>(I(),N(f(HS),ce({"data-slot":"select-trigger","data-size":e.size},f(r),{class:f(Ge)("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:A(()=>[Z(n.$slots,"default"),D(f(AS),{"as-child":""},{default:A(()=>[D(f(Dh),{class:"wp:size-4 wp:opacity-50"})]),_:1})]),_:3},16,["data-size","class"]))}}),sg=ux,dx=G({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>(I(),N(f(MS),ce({"data-slot":"select-value"},t),{default:A(()=>[Z(r.$slots,"default")]),_:3},16))}}),ig=dx,fx=G({__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:{}},emits:["update:modelValue","valueCommit"],setup(e,{emit:t}){const r=e,n=t,s=Ar(Et(r,"class"),n);return(i,o)=>(I(),N(f(ZS),ce({"data-slot":"slider",class:f(Ge)("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:A(({modelValue:a})=>[D(f(tC),{"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:A(()=>[D(f(XS),{"data-slot":"slider-range",class:"wp:bg-primary wp:absolute wp:data-[orientation=horizontal]:h-full wp:data-[orientation=vertical]:w-full"})]),_:1}),(I(!0),ve(Oe,null,Xt(a,(l,c)=>(I(),N(f(eC),{key:c,"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"]))}}),og=fx,px=G({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,r=Et(t,"class");return(n,s)=>(I(),N(f(J1),ce({"data-slot":"label"},f(r),{class:f(Ge)("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:A(()=>[Z(n.$slots,"default")]),_:3},16,["class"]))}}),Os=px,hx=G({__name:"Separator",props:{orientation:{default:"horizontal"},decorative:{type:Boolean,default:!0},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,r=Et(t,"class");return(n,s)=>(I(),N(f(BS),ce({"data-slot":"separator"},f(r),{class:f(Ge)("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"]))}}),gx=hx,vx={class:"wp:flex wp:flex-col wp:gap-6 wp:py-4"},mx={class:"wp:flex wp:flex-col wp:gap-2"},wx={class:"wp:flex wp:flex-col wp:gap-2"},yx={class:"wp:flex wp:flex-col wp:gap-4"},bx={class:"wp:flex wp:justify-between"},Sx={class:"wp:text-sm wp:text-muted-foreground"},Cx={class:"wp:flex wp:flex-col wp:gap-4"},_x={class:"wp:flex wp:justify-between"},xx={class:"wp:text-sm wp:text-muted-foreground"},Tx={class:"wp:flex wp:flex-col wp:gap-3"},Ex={class:"wp:grid wp:grid-cols-2 wp:gap-2 wp:text-sm"},Ax={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},kx={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},Ix={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},Rx={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},$x={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},Dx={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},Px=G({__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}=bt("sip"),l=F([]),c=F([]),u=Ai("webphone-input-device",""),d=Ai("webphone-output-device",""),p=Ai("webphone-volume",100),h=Ai("webphone-notification-volume",100),m=async()=>{try{await navigator.mediaDevices.getUserMedia({audio:!0});const b=await navigator.mediaDevices.enumerateDevices();l.value=b.filter(R=>R.kind==="audioinput").map((R,v)=>({deviceId:R.deviceId,label:R.label||`Microphone ${v+1}`})),c.value=b.filter(R=>R.kind==="audiooutput").map((R,v)=>({deviceId:R.deviceId,label:R.label||`Speaker ${v+1}`}));const _=l.value.some(R=>R.deviceId===u.value);(!u.value||!_)&&l.value.length>0&&(u.value=l.value[0]?.deviceId??"");const $=c.value.some(R=>R.deviceId===d.value);(!d.value||!$)&&c.value.length>0&&(d.value=c.value[0]?.deviceId??""),u.value&&o(u.value),d.value&&i(d.value)}catch(b){console.error("Error loading devices",b)}},w=b=>{const _=String(b);u.value=_,o(_)},S=b=>{const _=String(b);d.value=_,i(_)},g=(b,_=35)=>b.length<=_?b:b.substring(0,_)+"...",x=B({get:()=>[p.value],set:b=>{p.value=b[0],s(p.value)}}),y=B({get:()=>[h.value],set:b=>{h.value=b[0],a(h.value)}});return Ue(()=>{m(),s(p.value),a(h.value)}),(b,_)=>e.visible?(I(),N(f(Cc),{key:0,open:e.visible,"onUpdate:open":_[5]||(_[5]=$=>r("update:visible",$))},{default:A(()=>[D(f(_c),{class:"wp:sm:max-w-sm"},{default:A(()=>[D(f(xc),null,{default:A(()=>[D(f(Tc),null,{default:A(()=>[..._[6]||(_[6]=[$e("Audio Settings",-1)])]),_:1})]),_:1}),re("div",vx,[re("div",mx,[D(f(Os),null,{default:A(()=>[..._[7]||(_[7]=[$e("Microphone",-1)])]),_:1}),D(f(eg),{modelValue:f(u),"onUpdate:modelValue":[_[0]||(_[0]=$=>We(u)?u.value=$:null),w]},{default:A(()=>[D(f(sg),{class:"wp:w-full"},{default:A(()=>[D(f(ig),{placeholder:"Select Microphone"})]),_:1}),D(f(tg),null,{default:A(()=>[D(f(rg),null,{default:A(()=>[(I(!0),ve(Oe,null,Xt(l.value,$=>(I(),N(f(ng),{key:$.deviceId,value:$.deviceId,title:$.label},{default:A(()=>[$e(Re(g($.label)),1)]),_:2},1032,["value","title"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),re("div",wx,[D(f(Os),null,{default:A(()=>[..._[8]||(_[8]=[$e("Speaker",-1)])]),_:1}),D(f(eg),{modelValue:f(d),"onUpdate:modelValue":[_[1]||(_[1]=$=>We(d)?d.value=$:null),S]},{default:A(()=>[D(f(sg),{class:"wp:w-full"},{default:A(()=>[D(f(ig),{placeholder:"Select Speaker"})]),_:1}),D(f(tg),null,{default:A(()=>[D(f(rg),null,{default:A(()=>[(I(!0),ve(Oe,null,Xt(c.value,$=>(I(),N(f(ng),{key:$.deviceId,value:$.deviceId,title:$.label},{default:A(()=>[$e(Re(g($.label)),1)]),_:2},1032,["value","title"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),re("div",yx,[re("div",bx,[D(f(Os),null,{default:A(()=>[..._[9]||(_[9]=[$e("Media Volume",-1)])]),_:1}),re("span",Sx,Re(f(p))+"%",1)]),D(f(og),{modelValue:x.value,"onUpdate:modelValue":_[2]||(_[2]=$=>x.value=$),max:100,step:1},null,8,["modelValue"])]),re("div",Cx,[re("div",_x,[D(f(Os),null,{default:A(()=>[..._[10]||(_[10]=[$e("Notification Volume",-1)])]),_:1}),re("span",xx,Re(f(h))+"%",1)]),D(f(og),{modelValue:y.value,"onUpdate:modelValue":_[3]||(_[3]=$=>y.value=$),max:100,step:1},null,8,["modelValue"])]),D(f(gx)),re("div",Tx,[D(f(Os),{class:"wp:text-base"},{default:A(()=>[..._[11]||(_[11]=[$e("Atajos de teclado",-1)])]),_:1}),re("div",Ex,[re("div",Ax,[_[12]||(_[12]=re("span",{class:"wp:text-muted-foreground"},"Historial",-1)),D(f(Kt),null,{default:A(()=>[$e(Re(f(n))+"H",1)]),_:1})]),re("div",kx,[_[13]||(_[13]=re("span",{class:"wp:text-muted-foreground"},"Configuración",-1)),D(f(Kt),null,{default:A(()=>[$e(Re(f(n))+",",1)]),_:1})]),re("div",Ix,[_[14]||(_[14]=re("span",{class:"wp:text-muted-foreground"},"Teclado",-1)),D(f(Kt),null,{default:A(()=>[$e(Re(f(n))+"K",1)]),_:1})]),re("div",Rx,[_[15]||(_[15]=re("span",{class:"wp:text-muted-foreground"},"Línea 1",-1)),D(f(Kt),null,{default:A(()=>[$e(Re(f(n))+"1",1)]),_:1})]),re("div",$x,[_[16]||(_[16]=re("span",{class:"wp:text-muted-foreground"},"Línea 2",-1)),D(f(Kt),null,{default:A(()=>[$e(Re(f(n))+"2",1)]),_:1})]),re("div",Dx,[_[17]||(_[17]=re("span",{class:"wp:text-muted-foreground"},"Línea 3",-1)),D(f(Kt),null,{default:A(()=>[$e(Re(f(n))+"3",1)]),_:1})])])])]),D(f(Qh),null,{default:A(()=>[D(f(ze),{variant:"secondary",onClick:_[4]||(_[4]=$=>r("update:visible",!1))},{default:A(()=>[..._[18]||(_[18]=[$e("Close",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])):xe("",!0)}}),Ox=Px,Hx=G({__name:"ScrollBar",props:{orientation:{default:"vertical"},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,r=Et(t,"class");return(n,s)=>(I(),N(f(aS),ce({"data-slot":"scroll-area-scrollbar"},f(r),{class:f(Ge)("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:A(()=>[D(f(cS),{"data-slot":"scroll-area-thumb",class:"wp:bg-border wp:relative wp:flex-1 wp:rounded-full"})]),_:1},16,["class"]))}}),Mx=Hx,qx=G({__name:"ScrollArea",props:{type:{},dir:{},scrollHideDelay:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,r=Et(t,"class");return(n,s)=>(I(),N(f(Z1),ce({"data-slot":"scroll-area"},f(r),{class:f(Ge)("wp:relative",t.class)}),{default:A(()=>[D(f(uS),{"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:A(()=>[Z(n.$slots,"default")]),_:3}),D(Mx),D(f(Q1))]),_:3},16,["class"]))}}),ag=qx,Nx={class:"wp:relative wp:my-2"},Bx={class:"wp:flex wp:flex-col wp:gap-2"},Fx=["onClick"],Lx={class:"wp:flex wp:items-center wp:gap-3"},Vx={class:"wp:flex wp:flex-col"},jx={class:"wp:text-sm wp:font-medium"},Ux={class:"wp:text-[10px] wp:text-muted-foreground"},zx={class:"wp:flex wp:flex-col wp:items-end"},Kx={key:0,class:"wp:text-xs wp:font-mono wp:text-muted-foreground"},Wx={class:"wp:text-[10px] wp:text-muted-foreground wp:capitalize"},Gx={key:0,class:"wp:text-center wp:text-muted-foreground wp:py-8"},Jx={key:1,class:"wp:text-center wp:text-muted-foreground wp:py-8"},Yx=G({__name:"CallHistoryDialog",props:{visible:{type:Boolean},contacts:{}},emits:["update:visible","call"],setup(e,{emit:t}){const r=e,n=t,s=bt("webphone"),i=F(""),o=p=>{if(!r.contacts)return p;const h=r.contacts.find(m=>m.number===p);return h?h.name:p},a=B(()=>{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")}`,c=p=>p.direction==="incoming"?p.status==="missed"?DC:$C:PC,u=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?(I(),N(f(Cc),{key:0,open:e.visible,"onUpdate:open":h[1]||(h[1]=m=>n("update:visible",m))},{default:A(()=>[D(f(_c),{class:"wp:sm:max-w-sm"},{default:A(()=>[D(f(xc),null,{default:A(()=>[D(f(Tc),null,{default:A(()=>[...h[2]||(h[2]=[$e("Call History",-1)])]),_:1})]),_:1}),re("div",Nx,[D(f(HC),{class:"wp:absolute wp:left-2 wp:top-2.5 wp:h-4 wp:w-4 wp:text-muted-foreground"}),D(f(Sc),{modelValue:i.value,"onUpdate:modelValue":h[0]||(h[0]=m=>i.value=m),placeholder:"Search history...",class:"wp:pl-8"},null,8,["modelValue"])]),D(f(ag),{class:"wp:h-[60vh] wp:pr-4"},{default:A(()=>[re("div",Bx,[(I(!0),ve(Oe,null,Xt(a.value,m=>(I(),ve("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",Lx,[(I(),N(Rn(c(m)),{class:Ke([u(m),"wp:w-4 wp:h-4"])},null,8,["class"])),re("div",Vx,[re("span",jx,Re(o(m.number)),1),re("span",Ux,Re(new Date(m.startTime).toLocaleString()),1)])]),re("div",zx,[m.duration>0?(I(),ve("span",Kx,Re(l(m.duration)),1)):xe("",!0),re("span",Wx,Re(m.status),1)])],8,Fx))),128)),f(s).callHistory.length===0?(I(),ve("div",Gx," No call history ")):a.value.length===0?(I(),ve("div",Jx," No results found ")):xe("",!0)])]),_:1})]),_:1})]),_:1},8,["open"])):xe("",!0)}}),Zx=Yx,Xx={class:"wp:grid wp:gap-4 wp:py-4"},Qx={class:"wp:grid wp:gap-2 wp:relative"},eT={class:"wp:relative"},tT={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"},rT={class:"wp:p-1"},nT=["onClick"],sT={class:"wp:flex wp:flex-col wp:min-w-0 wp:flex-1"},iT={class:"wp:font-medium wp:text-sm wp:truncate"},oT={class:"wp:text-xs wp:text-muted-foreground"},aT=G({__name:"TransferDialog",props:{visible:{type:Boolean},contacts:{default:()=>[]}},emits:["update:visible","transfer"],setup(e,{emit:t}){const r=e,n=t,s=F(""),i=F(!1),o=F(null);Ie(()=>r.visible,p=>{p&&(s.value="",i.value=!1)}),Ie(s,p=>{i.value=p.length>0&&a.value.length>0});const a=B(()=>{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},c=()=>{s.value="",i.value=!1,o.value?.focus()},u=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(),u("blind")):p.key==="Escape"&&(i.value=!1)};return(p,h)=>e.visible?(I(),N(f(Cc),{key:0,open:e.visible,"onUpdate:open":h[5]||(h[5]=m=>n("update:visible",m))},{default:A(()=>[D(f(_c),{class:"wp:sm:max-w-md"},{default:A(()=>[D(f(xc),null,{default:A(()=>[D(f(Tc),null,{default:A(()=>[...h[6]||(h[6]=[$e("Transferir Llamada",-1)])]),_:1})]),_:1}),re("div",Xx,[re("div",Qx,[D(f(Os),{for:"transfer-input"},{default:A(()=>[...h[7]||(h[7]=[$e("Número o Contacto",-1)])]),_:1}),re("div",eT,[D(f(Sc),{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?(I(),N(f(ze),{key:0,variant:"ghost",size:"icon",class:"wp:absolute wp:right-0 wp:top-0 wp:h-full wp:w-8 wp:hover:bg-transparent",onClick:c},{default:A(()=>[D(f(wc),{class:"wp:h-4 wp:w-4"})]),_:1})):xe("",!0)]),i.value&&a.value.length>0?(I(),ve("div",tT,[D(f(ag),{class:"wp:max-h-60"},{default:A(()=>[re("div",rT,[(I(!0),ve(Oe,null,Xt(a.value,m=>(I(),ve("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?(I(),ve("div",{key:0,class:Ke(f(Ge)("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"?(I(),N(f(Rh),{key:0,class:"wp:w-4 wp:h-4"})):m.type==="contact"?(I(),N(f(gc),{key:1,class:"wp:w-4 wp:h-4"})):m.type==="voicemail"?(I(),N(f(Bh),{key:2,class:"wp:w-4 wp:h-4"})):(I(),N(f(Lh),{key:3,class:"wp:w-4 wp:h-4"}))],2)):xe("",!0),re("div",sT,[re("span",iT,Re(m.name),1),re("span",oT,Re(m.number),1)])],8,nT))),128))])]),_:1})])):xe("",!0),h[8]||(h[8]=re("p",{class:"wp:text-xs wp:text-muted-foreground"}," Presiona Enter para transferir directamente ",-1))])]),D(f(Qh),{class:"wp:flex-col wp:gap-2 sm:wp:flex-row"},{default:A(()=>[D(f(ze),{variant:"secondary",onClick:h[2]||(h[2]=m=>n("update:visible",!1)),class:"wp:w-full sm:wp:w-auto"},{default:A(()=>[...h[9]||(h[9]=[$e(" Cancelar ",-1)])]),_:1}),D(f(ze),{onClick:h[3]||(h[3]=m=>u("blind")),disabled:!s.value.trim(),variant:"outline",class:"wp:w-full sm:wp:flex-1"},{default:A(()=>[...h[10]||(h[10]=[$e(" Transferencia Ciega ",-1)])]),_:1},8,["disabled"]),D(f(ze),{onClick:h[4]||(h[4]=m=>u("attended")),disabled:!s.value.trim(),class:"wp:w-full sm:wp:flex-1"},{default:A(()=>[...h[11]||(h[11]=[$e(" Con Consulta ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["open"])):xe("",!0)}}),lT=aT,cT=G({__name:"DocumentPip",props:{remoteStream:{},localStream:{},hasVideo:{type:Boolean},remoteNumber:{},isConnected:{type:Boolean},callStatus:{},isMuted:{type:Boolean},isHeld:{type:Boolean},destination:{},isVideo:{type:Boolean},active:{type:Boolean},autoOpenOnBlur:{type:Boolean}},emits:["transfer","update:active","hangup","answer","toggleMute","toggleHold"],setup(e,{expose:t,emit:r}){const n=e,s=r,i=F(!1),o=F(!1),a=F(null),l=F(0),c=F(null);let u=null;Ue(()=>{i.value="documentPictureInPicture"in window,document.addEventListener("visibilitychange",d)}),Rt(()=>{document.removeEventListener("visibilitychange",d),h(),C()});const d=()=>{n.callStatus==="idle"||!i.value||document.hidden&&!o.value&&n.autoOpenOnBlur!==!1&&setTimeout(()=>{document.hidden&&!o.value&&O()},100)},p=()=>{c.value||(l.value=0,c.value=setInterval(()=>{l.value++},1e3))},h=()=>{c.value&&(clearInterval(c.value),c.value=null)},m=E=>{const q=Math.floor(E/60),j=E%60;return`${q.toString().padStart(2,"0")}:${j.toString().padStart(2,"0")}`};Ie(()=>n.callStatus,(E,q)=>{E==="connected"&&q!=="connected"?p():E==="idle"&&q!=="idle"&&(h(),o.value&&C())},{immediate:!0}),Ie(()=>n.isConnected,E=>{!E&&o.value&&(h(),C())}),Ie(()=>[n.callStatus,n.isMuted,n.isHeld],()=>{a.value&&($(a.value.document),b(a.value.document))});const w=B(()=>i.value&&n.isConnected),S={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>'},g=E=>{const q=E.createElement("style");q.textContent=`
74
74
  * { box-sizing: border-box; margin: 0; padding: 0; }
75
75
 
76
76
  body {
@@ -276,7 +276,7 @@ Duration=160`,contentType:"application/dtmf-relay",contentDisposition:"signal"}}
276
276
  0%, 100% { opacity: 1; }
277
277
  50% { opacity: 0.7; }
278
278
  }
279
- `,E.head.appendChild(M)},x=()=>{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""}},y=()=>{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=E=>{const M=E.querySelector(".pip-status-text");M&&(M.textContent=x(),M.className=`pip-status-text ${y()}`)},_=E=>{const M=E.createElement("div");return M.className="pip-wrapper",n.hasVideo?M.innerHTML=`
279
+ `,E.head.appendChild(q)},x=()=>{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""}},y=()=>{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=E=>{const q=E.querySelector(".pip-status-text");q&&(q.textContent=x(),q.className=`pip-status-text ${y()}`)},_=E=>{const q=E.createElement("div");return q.className="pip-wrapper",n.hasVideo?q.innerHTML=`
280
280
  <div class="pip-video-area">
281
281
  <video id="pip-remote-video" autoplay playsinline></video>
282
282
  <div class="pip-local-container">
@@ -284,15 +284,15 @@ Duration=160`,contentType:"application/dtmf-relay",contentDisposition:"signal"}}
284
284
  </div>
285
285
  <div class="pip-overlay">
286
286
  <span class="pip-name">${n.remoteNumber||"Llamada"}</span>
287
- <span id="pip-timer" class="pip-timer">${g(l.value)}</span>
287
+ <span id="pip-timer" class="pip-timer">${m(l.value)}</span>
288
288
  </div>
289
289
  </div>
290
290
  <div class="pip-actions" id="pip-actions"></div>
291
- `:M.innerHTML=`
291
+ `:q.innerHTML=`
292
292
  <div class="pip-audio-area">
293
293
  <div class="pip-caller-name">${n.remoteNumber||"Llamada"}</div>
294
294
  <div class="pip-status-text ${y()}">${x()}</div>
295
- <div class="pip-duration" id="pip-timer">${g(l.value)}</div>
295
+ <div class="pip-duration" id="pip-timer">${m(l.value)}</div>
296
296
  </div>
297
297
  <div class="pip-actions" id="pip-actions"></div>
298
- `,M},$=E=>{const M=E.getElementById("pip-actions");if(M){if(M.innerHTML="",n.callStatus==="incoming"){if(n.hasVideo){const J=E.createElement("button");J.className="pip-btn pip-btn-video",J.title="Contestar con Video",J.innerHTML=C.video,J.onclick=()=>s("answer",!0),M.appendChild(J)}const j=E.createElement("button");j.className="pip-btn pip-btn-answer",j.title="Contestar",j.innerHTML=C.phone,j.onclick=()=>s("answer",!1),M.appendChild(j);const z=E.createElement("button");z.className="pip-btn pip-btn-hangup",z.title="Rechazar",z.innerHTML=C.phoneOff,z.onclick=()=>{s("hangup"),S()},M.appendChild(z)}else if(n.callStatus==="connected"){const j=E.createElement("button");j.className=`pip-btn pip-btn-mute ${n.isMuted?"active":""}`,j.title=n.isMuted?"Activar micrófono":"Silenciar",j.innerHTML=n.isMuted?C.micOff:C.mic,j.onclick=()=>s("toggleMute"),M.appendChild(j);const z=E.createElement("button");z.className=`pip-btn pip-btn-hold ${n.isHeld?"active":""}`,z.title=n.isHeld?"Reanudar":"Pausar",z.innerHTML=n.isHeld?C.play:C.pause,z.onclick=()=>s("toggleHold"),M.appendChild(z);const J=E.createElement("button");J.className="pip-btn pip-btn-transfer",J.title="Transferir",J.innerHTML=C.transfer,J.onclick=()=>s("transfer"),M.appendChild(J);const U=E.createElement("button");U.className="pip-btn pip-btn-hangup",U.title="Colgar",U.innerHTML=C.phoneOff,U.onclick=()=>{s("hangup"),S()},M.appendChild(U)}else if(n.callStatus==="calling"){const j=E.createElement("button");j.className="pip-btn pip-btn-hangup",j.title="Cancelar",j.innerHTML=C.phoneOff,j.onclick=()=>{s("hangup"),S()},M.appendChild(j)}}},R=E=>{setTimeout(()=>{const M=E.getElementById("pip-remote-video"),j=E.getElementById("pip-local-video");M&&n.remoteStream&&(M.srcObject=n.remoteStream,M.play().catch(()=>{})),j&&n.localStream&&(j.srcObject=n.localStream,j.play().catch(()=>{}))},50)},m=E=>{const M=E.getElementById("pip-timer");M&&(u=setInterval(()=>{M.textContent=g(l.value)},1e3))},P=()=>{u&&(clearInterval(u),u=null)},O=async()=>{if(!(!i.value||o.value))try{const E=n.hasVideo?340:280,M=n.hasVideo?280:200,j=await window.documentPictureInPicture.requestWindow({width:E,height:M,preferInitialWindowPlacement:!0});a.value=j,o.value=!0,s("update:active",!0),v(j.document);const z=_(j.document);j.document.body.appendChild(z),n.hasVideo&&R(j.document),$(j.document),m(j.document),j.addEventListener("pagehide",()=>{P(),o.value=!1,a.value=null,s("update:active",!1)})}catch(E){console.error("[DocumentPip] Error:",E)}},S=()=>{P(),a.value&&(a.value.close(),a.value=null,o.value=!1,s("update:active",!1))};return t({open:O,close:S,toggle:()=>{o.value?S():O()},isActive:o,isSupported:i,canUsePip:w}),(E,M)=>Z(E.$slots,"default")}}),uT=cT;const dT=()=>{const e=Xh({selector:"html",attribute:"class",valueDark:"dark",valueLight:""}),t=Xh({selector:".webphone-container",attribute:"class",valueDark:"dark",valueLight:"",initialValue:"auto"});return rt(()=>{t.value=e.value}),{isDark:e,toggleDark:i_(e)}};var fT=G({__name:"ToggleGroup",props:{rovingFocus:{type:Boolean},disabled:{type:Boolean},orientation:{},dir:{},loop:{type:Boolean},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},type:{},modelValue:{},defaultValue:{},class:{},variant:{},size:{},spacing:{default:0}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=t;Dn("toggleGroup",{variant:r.variant,size:r.size,spacing:r.spacing});const s=Ar(Et(r,"class","size","variant"),n);return(i,o)=>(I(),q(f(nC),ue({"data-slot":"toggle-group","data-size":e.size,"data-variant":e.variant,"data-spacing":e.spacing,style:{"--gap":e.spacing}},f(s),{class:f(Ge)("wp:group/toggle-group wp:flex wp:w-fit wp:items-center wp:gap-[--spacing(var(--gap))] wp:rounded-md wp:data-[spacing=default]:data-[variant=outline]:shadow-xs",r.class)}),{default:A(a=>[Z(i.$slots,"default",Ht(Dt(a)))]),_:3},16,["data-size","data-variant","data-spacing","style","class"]))}}),pT=fT;const hT=ap("wp:inline-flex wp:items-center wp:justify-center wp:gap-2 wp:rounded-md wp:text-sm wp:font-medium wp:hover:bg-muted wp:hover:text-muted-foreground wp:disabled:pointer-events-none wp:disabled:opacity-50 wp:data-[state=on]:bg-accent wp:data-[state=on]:text-accent-foreground wp:[&_svg]:pointer-events-none wp:[&_svg:not([class*='size-'])]:size-4 wp:[&_svg]:shrink-0 wp:focus-visible:border-ring wp:focus-visible:ring-ring/50 wp:focus-visible:ring-[3px] wp:outline-none wp:transition-[color,box-shadow] wp:aria-invalid:ring-destructive/20 wp:dark:aria-invalid:ring-destructive/40 wp:aria-invalid:border-destructive wp:whitespace-nowrap",{variants:{variant:{default:"wp:bg-transparent",outline:"wp:border wp:border-input wp:bg-transparent wp:shadow-xs wp:hover:bg-accent wp:hover:text-accent-foreground"},size:{default:"wp:h-9 wp:px-2 wp:min-w-9",sm:"wp:h-8 wp:px-1.5 wp:min-w-8",lg:"wp:h-10 wp:px-2.5 wp:min-w-10"}},defaultVariants:{variant:"default",size:"default"}});var gT=G({__name:"ToggleGroupItem",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{},variant:{},size:{}},setup(e){const t=e,r=bt("toggleGroup"),n=Er(Et(t,"class","size","variant"));return(s,i)=>(I(),q(f(iC),ue({"data-slot":"toggle-group-item","data-variant":f(r)?.variant||e.variant,"data-size":f(r)?.size||e.size,"data-spacing":f(r)?.spacing},f(n),{class:f(Ge)(f(hT)({variant:f(r)?.variant||e.variant,size:f(r)?.size||e.size}),"wp:w-auto wp:min-w-0 wp:shrink-0 wp:px-3 wp:focus:z-10 wp:focus-visible:z-10","wp:data-[spacing=0]:rounded-none wp:data-[spacing=0]:shadow-none wp:data-[spacing=0]:first:rounded-l-md wp:data-[spacing=0]:last:rounded-r-md wp:data-[spacing=0]:data-[variant=outline]:border-l-0 wp:data-[spacing=0]:data-[variant=outline]:first:border-l",t.class)}),{default:A(o=>[Z(s.$slots,"default",Ht(Dt(o)))]),_:3},16,["data-variant","data-size","data-spacing","class"]))}}),vT=gT,mT={key:0,class:"wp:flex wp:flex-col wp:items-center wp:p-3 wp:gap-3 wp:text-neutral-900 wp:dark:text-white"},wT={class:"wp:flex wp:items-center wp:gap-1.5"},yT=["title"],bT={class:"wp:flex wp:items-center wp:gap-1"},ST={key:1,class:"wp:flex wp:flex-col wp:items-center wp:p-2 wp:gap-2 wp:text-neutral-900 wp:dark:text-white"},CT={class:"wp:flex wp:items-center wp:gap-1"},_T=["title"],xT={class:"wp:flex wp:items-center wp:gap-1"},TT=["src"],ET={key:2,class:"wp:relative wp:w-full wp:aspect-video wp:bg-black"},AT={class:"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"},kT={class:"wp:flex wp:flex-col wp:gap-1"},IT={key:0,class:"wp:flex wp:flex-col wp:items-center wp:justify-center wp:p-2 wp:gap-2"},RT={class:"wp:flex wp:items-center wp:gap-2"},$T={class:"wp:py-1"},DT={key:3,class:"wp:flex wp:flex-col wp:items-center wp:p-2 wp:gap-0"},PT=G({__name:"WebPhone",props:{host:{},wsUrl:{},extension:{},password:{},to:{},mode:{default:"call"},logo:{},contacts:{default:()=>[]}},emits:["back"],setup(e,{emit:t}){const r=e,n=t,s=N(()=>{if(r.wsUrl)return r.wsUrl;if(r.host)return`wss://${r.host}/ws`}),i=Dw({server:s.value,extension:r.extension}),o=Nr(i),a=ab(i),{initUserAgent:l,switchChannel:c,remoteStream:u,localStream:d}=a;Dn("webphone",o),Dn("sip",a),rt(()=>{r.mode==="webcall"&&(r.to||console.error('WebPhone: "to" prop is required when mode is "webcall"'),r.logo||console.error('WebPhone: "logo" prop is required when mode is "webcall"'))});const{isDark:p,toggleDark:h}=dT(),g=B(!1),w=B(!1),C=B(!1),v=B(null),x=B(null),y=B(null),b=B(null),_=B(null),$=navigator.platform.toUpperCase().indexOf("MAC")>=0?"⌘":"Ctrl+",R=N(()=>r.mode==="webcall"),m=N(()=>u.value&&u.value.getVideoTracks().length>0),{isOnline:P}=S_(),O=N(()=>P.value?o.isConnected?"connected":"disconnected":"offline"),S=B(null),T=B(!1),E=N(()=>{const ie=o.callStatus!=="idle";return(S.value?.canUsePip??!1)&&ie}),M=()=>{S.value?.toggle()},j=async(ie,L)=>{try{L==="blind"?await a.transferCall(ie):await a.startAttendedTransfer(ie)}catch(Y){console.error("[WebPhone] Transfer error:",Y),alert(Y instanceof Error?Y.message:"Transfer failed. Please try again.")}},z=async()=>{try{await a.completeAttendedTransfer()}catch(ie){console.error("[WebPhone] Complete transfer error:",ie),alert(ie instanceof Error?ie.message:"Failed to complete transfer.")}},J=async()=>{try{await a.cancelAttendedTransfer()}catch(ie){console.error("[WebPhone] Cancel transfer error:",ie),alert(ie instanceof Error?ie.message:"Failed to cancel transfer.")}};rt(()=>{b.value&&u.value&&(T.value?b.value.srcObject=null:b.value.srcObject=u.value),_.value&&d.value&&(T.value?_.value.srcObject=null:_.value.srcObject=d.value)});const U=N(()=>R.value?y.value:x.value),Te=()=>{const ie=window.innerWidth<640,L=window.innerWidth<1024;let Y=400;return ie?Y=window.innerWidth*.95:L&&(Y=360),{x:Math.max(0,(window.innerWidth-Y)/2),y:ie?30:80}},{style:be}=b_(v,{initialValue:Te(),handle:U,preventDefault:!0}),K=[{label:"Line 1",value:0},{label:"Line 2",value:1},{label:"Line 3",value:2}],te=B(!1),re=N({get:()=>o.activeChannelId.toString(),set:async ie=>{if(ie&&!te.value){te.value=!0;try{await c(parseInt(ie))}finally{te.value=!1}}}}),le=N(()=>{const ie={};return o.channels.forEach(L=>{L.status==="incoming"?ie[L.id]="wp:bg-status-incoming wp:animate-pulse":L.isHeld||L.status==="held"?ie[L.id]="wp:bg-status-hold":L.status==="connected"?ie[L.id]="wp:bg-status-incall":L.status==="calling"?ie[L.id]="wp:bg-status-incall wp:animate-pulse":ie[L.id]="wp:bg-transparent"}),ie}),pe=ie=>{if((ie.metaKey||ie.ctrlKey)&&ie.key.toLowerCase()==="h"&&(ie.preventDefault(),w.value=!0),(ie.metaKey||ie.ctrlKey)&&ie.key===","&&(ie.preventDefault(),g.value=!0),(ie.metaKey||ie.ctrlKey)&&ie.key.toLowerCase()==="k"&&(ie.preventDefault(),o.toggleKeypad()),(ie.metaKey||ie.ctrlKey)&&["1","2","3"].includes(ie.key)){ie.preventDefault();const L=parseInt(ie.key)-1;te.value||(te.value=!0,c(L).finally(()=>{te.value=!1}))}};return Ue(async()=>{window.addEventListener("keydown",pe),!(r.mode==="webcall"&&(!r.to||!r.logo))&&(!r.host||!r.extension||!r.password||(await l({uri:`sip:${r.extension}@${r.host}`,transportOptions:{server:s.value},authorizationUsername:r.extension,authorizationPassword:r.password}),r.mode==="webcall"&&r.to&&a.makeCall(r.to)))}),Rt(()=>{window.removeEventListener("keydown",pe)}),(ie,L)=>(I(),we(Oe,null,[ne("div",{ref_key:"phoneRef",ref:v,style:mt(f(be)),class:"webphone-container wp:bg-white wp:dark:bg-neutral-900 wp:rounded-2xl wp:shadow-xl wp:w-[min(95vw,400px)] wp:fixed wp:z-50 wp:select-none wp:[&_button]:cursor-pointer wp:**:[[role=button]]:cursor-pointer"},[R.value?(I(),we("div",ST,[ne("div",CT,[D(f(ze),{variant:"ghost",size:"icon",class:"wp:h-8 wp:w-8 wp:rounded-full",onClick:L[3]||(L[3]=Y=>n("back"))},{default:A(()=>[D(f(_C),{class:"wp:w-4 wp:h-4"})]),_:1}),ne("div",{ref_key:"webcallHandleRef",ref:y,class:Ke(f(Ge)(f(hc)({variant:"outline",size:"sm"}),"wp:cursor-move wp:gap-2 wp:h-7 wp:px-2 wp:text-xs"))},[D(f(Ei),{class:"wp:w-4 wp:h-4 wp:text-muted-foreground"}),L[22]||(L[22]=ne("span",{class:"wp:font-medium"}," WebCall",-1)),ne("div",{class:"wp:relative wp:flex wp:items-center",title:O.value==="connected"?"Conectado":O.value==="disconnected"?"Desconectado del servidor":"Sin conexión a Internet"},[O.value==="offline"?(I(),q(f(Fh),{key:0,class:"wp:w-3 wp:h-3 wp:text-red-500"})):O.value==="disconnected"?(I(),q(f(ta),{key:1,class:"wp:w-3 wp:h-3 wp:text-amber-500 wp:animate-pulse"})):(I(),q(f(ta),{key:2,class:"wp:w-3 wp:h-3 wp:text-green-500"}))],8,_T)],2),ne("div",xT,[E.value?(I(),q(f(ze),{key:0,variant:"ghost",size:"icon",class:Ke(["wp:h-8 wp:w-8 wp:rounded-full",T.value?"wp:text-primary":""]),title:"Picture-in-Picture",onClick:M},{default:A(()=>[D(f(Hh),{class:"wp:w-4 wp:h-4"})]),_:1},8,["class"])):Ee("",!0),D(f(ze),{variant:"ghost",size:"icon",class:"wp:h-8 wp:w-8 wp:rounded-full",onClick:L[4]||(L[4]=Y=>f(h)())},{default:A(()=>[f(p)?(I(),q(f(qh),{key:0,class:"wp:w-4 wp:h-4"})):(I(),q(f(Oh),{key:1,class:"wp:w-4 wp:h-4"}))]),_:1}),D(f(Yn),null,{default:A(()=>[D(f(Gn),null,{default:A(()=>[D(f(Zn),{"as-child":""},{default:A(()=>[D(f(ze),{variant:"ghost",size:"icon",class:"wp:h-8 wp:w-8 wp:rounded-full",onClick:L[5]||(L[5]=Y=>w.value=!0)},{default:A(()=>[D(f(Ph),{class:"wp:w-4 wp:h-4"})]),_:1})]),_:1}),D(f(Jn),{class:"wp:flex wp:items-center wp:gap-2"},{default:A(()=>[L[23]||(L[23]=ne("span",null,"Historial",-1)),D(f(Kt),null,{default:A(()=>[$e(Re(f($))+"H",1)]),_:1})]),_:1})]),_:1})]),_:1}),D(f(Yn),null,{default:A(()=>[D(f(Gn),null,{default:A(()=>[D(f(Zn),{"as-child":""},{default:A(()=>[D(f(ze),{variant:"ghost",size:"icon",class:"wp:h-8 wp:w-8 wp:rounded-full",onClick:L[6]||(L[6]=Y=>g.value=!0)},{default:A(()=>[D(f(Mh),{class:"wp:w-4 wp:h-4"})]),_:1})]),_:1}),D(f(Jn),{class:"wp:flex wp:items-center wp:gap-2"},{default:A(()=>[L[24]||(L[24]=ne("span",null,"Configuración",-1)),D(f(Kt),null,{default:A(()=>[$e(Re(f($))+",",1)]),_:1})]),_:1})]),_:1})]),_:1})])]),e.logo?(I(),we("img",{key:0,src:e.logo,class:"wp:w-16 wp:h-16 wp:object-contain wp:mt-1 wp:rounded-2xl"},null,8,TT)):Ee("",!0)])):(I(),we("div",mT,[ne("div",wT,[ne("div",{ref_key:"standardHandleRef",ref:x,class:Ke(f(Ge)(f(hc)({variant:"outline",size:"sm"}),"wp:cursor-move wp:gap-2 wp:h-8 wp:px-2.5 wp:text-sm"))},[D(f(Ei),{class:"wp:w-4 wp:h-4 wp:text-muted-foreground"}),L[19]||(L[19]=ne("span",{class:"wp:font-medium"},"WebPhone",-1)),ne("div",{class:"wp:relative wp:flex wp:items-center",title:O.value==="connected"?"Conectado":O.value==="disconnected"?"Desconectado del servidor":"Sin conexión a Internet"},[O.value==="offline"?(I(),q(f(Fh),{key:0,class:"wp:w-3 wp:h-3 wp:text-red-500"})):O.value==="disconnected"?(I(),q(f(ta),{key:1,class:"wp:w-3 wp:h-3 wp:text-amber-500 wp:animate-pulse"})):(I(),q(f(ta),{key:2,class:"wp:w-3 wp:h-3 wp:text-green-500"}))],8,yT)],2),ne("div",bT,[E.value?(I(),q(f(ze),{key:0,variant:"ghost",size:"icon",class:Ke(["wp:h-8 wp:w-8 wp:rounded-full",T.value?"wp:text-primary":""]),title:"Picture-in-Picture",onClick:M},{default:A(()=>[D(f(Hh),{class:"wp:w-4 wp:h-4"})]),_:1},8,["class"])):Ee("",!0),D(f(ze),{variant:"ghost",size:"icon",class:"wp:h-8 wp:w-8 wp:rounded-full",onClick:L[0]||(L[0]=Y=>f(h)())},{default:A(()=>[f(p)?(I(),q(f(qh),{key:0,class:"wp:w-4 wp:h-4"})):(I(),q(f(Oh),{key:1,class:"wp:w-4 wp:h-4"}))]),_:1}),D(f(Yn),null,{default:A(()=>[D(f(Gn),null,{default:A(()=>[D(f(Zn),{"as-child":""},{default:A(()=>[D(f(ze),{variant:"ghost",size:"icon",class:"wp:h-8 wp:w-8 wp:rounded-full",onClick:L[1]||(L[1]=Y=>w.value=!0)},{default:A(()=>[D(f(Ph),{class:"wp:w-4 wp:h-4"})]),_:1})]),_:1}),D(f(Jn),{class:"wp:flex wp:items-center wp:gap-2"},{default:A(()=>[L[20]||(L[20]=ne("span",null,"Historial",-1)),D(f(Kt),null,{default:A(()=>[$e(Re(f($))+"H",1)]),_:1})]),_:1})]),_:1})]),_:1}),D(f(Yn),null,{default:A(()=>[D(f(Gn),null,{default:A(()=>[D(f(Zn),{"as-child":""},{default:A(()=>[D(f(ze),{variant:"ghost",size:"icon",class:"wp:h-8 wp:w-8 wp:rounded-full",onClick:L[2]||(L[2]=Y=>g.value=!0)},{default:A(()=>[D(f(Mh),{class:"wp:w-4 wp:h-4"})]),_:1})]),_:1}),D(f(Jn),{class:"wp:flex wp:items-center wp:gap-2"},{default:A(()=>[L[21]||(L[21]=ne("span",null,"Configuración",-1)),D(f(Kt),null,{default:A(()=>[$e(Re(f($))+",",1)]),_:1})]),_:1})]),_:1})]),_:1})])])])),m.value&&!T.value?(I(),we("div",ET,[ne("video",{ref_key:"remoteVideoRef",ref:b,autoplay:"",playsinline:"",class:"wp:w-full wp:h-full wp:object-cover"},null,512),ne("div",AT,[ne("video",{ref_key:"localVideoRef",ref:_,autoplay:"",playsinline:"",muted:"",class:"wp:w-full wp:h-full wp:object-cover"},null,512)])])):Ee("",!0),ne("div",kT,[R.value?Ee("",!0):(I(),we("div",IT,[D(f(pT),{modelValue:re.value,"onUpdate:modelValue":L[7]||(L[7]=Y=>re.value=Y),type:"single",variant:"outline",size:"sm"},{default:A(()=>[(I(),we(Oe,null,Xt(K,Y=>D(f(vT),{key:Y.value,value:Y.value.toString(),class:"wp:h-8 wp:px-3 wp:text-xs",title:`${Y.label} (⌘${Y.value+1})`},{default:A(()=>[ne("div",RT,[ne("span",null,Re(Y.label),1),le.value[Y.value]!=="wp:bg-transparent"?(I(),we("div",{key:0,class:Ke([le.value[Y.value],"wp:w-1.5 wp:h-1.5 wp:rounded-full"])},null,2)):Ee("",!0)])]),_:2},1032,["value","title"])),64))]),_:1},8,["modelValue"])])),ne("div",$T,[(I(!0),we(Oe,null,Xt(o.channels,Y=>Yi((I(),q(W_,{key:Y.id,"channel-id":Y.id,"allow-input":!R.value,"is-web-call":R.value,contacts:r.contacts,user:r.extension},null,8,["channel-id","allow-input","is-web-call","contacts","user"])),[[yo,Y.id===o.activeChannelId]])),128))]),ne("div",{class:Ke(["wp:transition-all wp:duration-300 wp:ease-in-out wp:overflow-hidden",o.isKeypadVisible?"wp:max-h-[300px] wp:opacity-100":"wp:max-h-0 wp:opacity-0"])},[D(wC)],2),D(FC,{destination:R.value?r.to:void 0,"is-video":r.mode==="video",onTransfer:L[8]||(L[8]=Y=>C.value=!0),onCompleteTransfer:z,onCancelTransfer:J},null,8,["destination","is-video"])]),R.value?(I(),we("div",DT,[...L[25]||(L[25]=[ne("div",{class:"wp:text-[10px] wp:text-primary"},"Powered By",-1),ne("div",{class:"wp:flex wp:items-center wp:gap-2"},[ne("a",{href:"https://www.nebula123.com",target:"_blank",class:"wp:text-[10px] wp:text-primary wp:hover:underline"}," www.nebula123.com ")],-1)])])):Ee("",!0)],4),D(Ox,{visible:g.value,"onUpdate:visible":L[9]||(L[9]=Y=>g.value=Y)},null,8,["visible"]),D(Zx,{visible:w.value,"onUpdate:visible":L[10]||(L[10]=Y=>w.value=Y),contacts:r.contacts,onCall:L[11]||(L[11]=Y=>{o.keypadValue=Y,f(a).makeCall(Y)})},null,8,["visible","contacts"]),D(lT,{visible:C.value,"onUpdate:visible":L[12]||(L[12]=Y=>C.value=Y),contacts:r.contacts,onTransfer:j},null,8,["visible","contacts"]),D(uT,{ref_key:"documentPipRef",ref:S,active:T.value,"onUpdate:active":L[13]||(L[13]=Y=>T.value=Y),"is-connected":o.isConnected,"remote-number":o.remoteNumber,"has-video":m.value??!1,"remote-stream":f(u),"local-stream":f(d),destination:R.value?r.to:void 0,"is-video":r.mode==="video","call-status":o.callStatus,"is-muted":o.isMuted,"is-held":o.isHeld,onTransfer:L[14]||(L[14]=Y=>C.value=!0),onHangup:L[15]||(L[15]=Y=>f(a).hangupCall()),onAnswer:L[16]||(L[16]=Y=>f(a).answerCall(Y)),onToggleMute:L[17]||(L[17]=Y=>f(a).toggleMute()),onToggleHold:L[18]||(L[18]=Y=>f(a).toggleHold())},null,8,["active","is-connected","remote-number","has-video","remote-stream","local-stream","destination","is-video","call-status","is-muted","is-held"])],64))}}),OT=(e,t)=>{const r=e.__vccOpts||e;for(const[n,s]of t)r[n]=s;return r},HT=OT(PT,[["__scopeId","data-v-f7279ee0"]]),MT=cl({props:{host:String,wsUrl:String,extension:String,password:String,to:String,mode:{type:String,default:"call"},logo:String,contacts:{type:[String,Array],default:()=>[]}},setup(e){return()=>{let t=e.contacts;if(typeof e.contacts=="string")try{t=JSON.parse(e.contacts)}catch{t=[]}return Qt(HT,{...e,contacts:t})}}},{shadowRoot:!1});customElements.define("web-phone",MT)})();
298
+ `,q},$=E=>{const q=E.getElementById("pip-actions");if(q){if(q.innerHTML="",n.callStatus==="incoming"){if(n.hasVideo){const J=E.createElement("button");J.className="pip-btn pip-btn-video",J.title="Contestar con Video",J.innerHTML=S.video,J.onclick=()=>s("answer",!0),q.appendChild(J)}const j=E.createElement("button");j.className="pip-btn pip-btn-answer",j.title="Contestar",j.innerHTML=S.phone,j.onclick=()=>s("answer",!1),q.appendChild(j);const z=E.createElement("button");z.className="pip-btn pip-btn-hangup",z.title="Rechazar",z.innerHTML=S.phoneOff,z.onclick=()=>{s("hangup"),C()},q.appendChild(z)}else if(n.callStatus==="connected"){const j=E.createElement("button");j.className=`pip-btn pip-btn-mute ${n.isMuted?"active":""}`,j.title=n.isMuted?"Activar micrófono":"Silenciar",j.innerHTML=n.isMuted?S.micOff:S.mic,j.onclick=()=>s("toggleMute"),q.appendChild(j);const z=E.createElement("button");z.className=`pip-btn pip-btn-hold ${n.isHeld?"active":""}`,z.title=n.isHeld?"Reanudar":"Pausar",z.innerHTML=n.isHeld?S.play:S.pause,z.onclick=()=>s("toggleHold"),q.appendChild(z);const J=E.createElement("button");J.className="pip-btn pip-btn-transfer",J.title="Transferir",J.innerHTML=S.transfer,J.onclick=()=>s("transfer"),q.appendChild(J);const U=E.createElement("button");U.className="pip-btn pip-btn-hangup",U.title="Colgar",U.innerHTML=S.phoneOff,U.onclick=()=>{s("hangup"),C()},q.appendChild(U)}else if(n.callStatus==="calling"){const j=E.createElement("button");j.className="pip-btn pip-btn-hangup",j.title="Cancelar",j.innerHTML=S.phoneOff,j.onclick=()=>{s("hangup"),C()},q.appendChild(j)}}},R=E=>{setTimeout(()=>{const q=E.getElementById("pip-remote-video"),j=E.getElementById("pip-local-video");q&&n.remoteStream&&(q.srcObject=n.remoteStream,q.play().catch(()=>{})),j&&n.localStream&&(j.srcObject=n.localStream,j.play().catch(()=>{}))},50)},v=E=>{const q=E.getElementById("pip-timer");q&&(u=setInterval(()=>{q.textContent=m(l.value)},1e3))},P=()=>{u&&(clearInterval(u),u=null)},O=async()=>{if(!(!i.value||o.value))try{const E=n.hasVideo?340:280,q=n.hasVideo?280:200,j=await window.documentPictureInPicture.requestWindow({width:E,height:q,preferInitialWindowPlacement:!0});a.value=j,o.value=!0,s("update:active",!0),g(j.document);const z=_(j.document);j.document.body.appendChild(z),n.hasVideo&&R(j.document),$(j.document),v(j.document),j.addEventListener("pagehide",()=>{P(),o.value=!1,a.value=null,s("update:active",!1)})}catch(E){console.error("[DocumentPip] Error:",E)}},C=()=>{P(),a.value&&(a.value.close(),a.value=null,o.value=!1,s("update:active",!1))};return t({open:O,close:C,toggle:()=>{o.value?C():O()},isActive:o,isSupported:i,canUsePip:w}),(E,q)=>Z(E.$slots,"default")}}),uT=cT;const dT=()=>{const e=Xh({selector:"html",attribute:"class",valueDark:"dark",valueLight:""}),t=Xh({selector:".webphone-container",attribute:"class",valueDark:"dark",valueLight:"",initialValue:"auto"});return st(()=>{t.value=e.value}),{isDark:e,toggleDark:i_(e)}};var fT=G({__name:"ToggleGroup",props:{rovingFocus:{type:Boolean},disabled:{type:Boolean},orientation:{},dir:{},loop:{type:Boolean},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},type:{},modelValue:{},defaultValue:{},class:{},variant:{},size:{},spacing:{default:0}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=t;Dn("toggleGroup",{variant:r.variant,size:r.size,spacing:r.spacing});const s=Ar(Et(r,"class","size","variant"),n);return(i,o)=>(I(),N(f(nC),ce({"data-slot":"toggle-group","data-size":e.size,"data-variant":e.variant,"data-spacing":e.spacing,style:{"--gap":e.spacing}},f(s),{class:f(Ge)("wp:group/toggle-group wp:flex wp:w-fit wp:items-center wp:gap-[--spacing(var(--gap))] wp:rounded-md wp:data-[spacing=default]:data-[variant=outline]:shadow-xs",r.class)}),{default:A(a=>[Z(i.$slots,"default",Ht(Dt(a)))]),_:3},16,["data-size","data-variant","data-spacing","style","class"]))}}),pT=fT;const hT=ap("wp:inline-flex wp:items-center wp:justify-center wp:gap-2 wp:rounded-md wp:text-sm wp:font-medium wp:hover:bg-muted wp:hover:text-muted-foreground wp:disabled:pointer-events-none wp:disabled:opacity-50 wp:data-[state=on]:bg-accent wp:data-[state=on]:text-accent-foreground wp:[&_svg]:pointer-events-none wp:[&_svg:not([class*='size-'])]:size-4 wp:[&_svg]:shrink-0 wp:focus-visible:border-ring wp:focus-visible:ring-ring/50 wp:focus-visible:ring-[3px] wp:outline-none wp:transition-[color,box-shadow] wp:aria-invalid:ring-destructive/20 wp:dark:aria-invalid:ring-destructive/40 wp:aria-invalid:border-destructive wp:whitespace-nowrap",{variants:{variant:{default:"wp:bg-transparent",outline:"wp:border wp:border-input wp:bg-transparent wp:shadow-xs wp:hover:bg-accent wp:hover:text-accent-foreground"},size:{default:"wp:h-9 wp:px-2 wp:min-w-9",sm:"wp:h-8 wp:px-1.5 wp:min-w-8",lg:"wp:h-10 wp:px-2.5 wp:min-w-10"}},defaultVariants:{variant:"default",size:"default"}});var gT=G({__name:"ToggleGroupItem",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{},variant:{},size:{}},setup(e){const t=e,r=bt("toggleGroup"),n=Er(Et(t,"class","size","variant"));return(s,i)=>(I(),N(f(iC),ce({"data-slot":"toggle-group-item","data-variant":f(r)?.variant||e.variant,"data-size":f(r)?.size||e.size,"data-spacing":f(r)?.spacing},f(n),{class:f(Ge)(f(hT)({variant:f(r)?.variant||e.variant,size:f(r)?.size||e.size}),"wp:w-auto wp:min-w-0 wp:shrink-0 wp:px-3 wp:focus:z-10 wp:focus-visible:z-10","wp:data-[spacing=0]:rounded-none wp:data-[spacing=0]:shadow-none wp:data-[spacing=0]:first:rounded-l-md wp:data-[spacing=0]:last:rounded-r-md wp:data-[spacing=0]:data-[variant=outline]:border-l-0 wp:data-[spacing=0]:data-[variant=outline]:first:border-l",t.class)}),{default:A(o=>[Z(s.$slots,"default",Ht(Dt(o)))]),_:3},16,["data-variant","data-size","data-spacing","class"]))}}),vT=gT,mT={key:0,class:"wp:flex wp:flex-col wp:items-center wp:p-3 wp:gap-3 wp:text-neutral-900 wp:dark:text-white"},wT={class:"wp:flex wp:items-center wp:gap-1.5"},yT=["title"],bT={class:"wp:flex wp:items-center wp:gap-1"},ST={key:1,class:"wp:flex wp:flex-col wp:items-center wp:p-2 wp:gap-2 wp:text-neutral-900 wp:dark:text-white"},CT={class:"wp:flex wp:items-center wp:gap-1"},_T=["title"],xT={class:"wp:flex wp:items-center wp:gap-1"},TT=["src"],ET={key:2,class:"wp:relative wp:w-full wp:aspect-video wp:bg-black"},AT={class:"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"},kT={class:"wp:flex wp:flex-col wp:gap-1"},IT={key:0,class:"wp:flex wp:flex-col wp:items-center wp:justify-center wp:p-2 wp:gap-2"},RT={class:"wp:flex wp:items-center wp:gap-2"},$T={class:"wp:py-1"},DT={key:3,class:"wp:flex wp:flex-col wp:items-center wp:p-2 wp:gap-0"},PT=G({__name:"WebPhone",props:{host:{},wsUrl:{},extension:{},password:{},to:{},mode:{default:"call"},logo:{},contacts:{default:()=>[]}},emits:["back"],setup(e,{emit:t}){const r=e,n=t,s=B(()=>{if(r.wsUrl)return r.wsUrl;if(r.host)return`wss://${r.host}/ws`}),i=Dw({server:s.value,extension:r.extension}),o=Nr(i),a=ab(i),{initUserAgent:l,switchChannel:c,remoteStream:u,localStream:d}=a;Dn("webphone",o),Dn("sip",a),st(()=>{r.mode==="webcall"&&(r.to||console.error('WebPhone: "to" prop is required when mode is "webcall"'),r.logo||console.error('WebPhone: "logo" prop is required when mode is "webcall"'))});const{isDark:p,toggleDark:h}=dT(),m=F(!1),w=F(!1),S=F(!1),g=F(null),x=F(null),y=F(null),b=F(null),_=F(null),$=navigator.platform.toUpperCase().indexOf("MAC")>=0?"⌘":"Ctrl+",R=B(()=>r.mode==="webcall"),v=B(()=>u.value&&u.value.getVideoTracks().length>0),{isOnline:P}=S_(),O=B(()=>P.value?o.isConnected?"connected":"disconnected":"offline"),C=F(null),T=F(!1),E=B(()=>{const Y=o.callStatus!=="idle";return(C.value?.canUsePip??!1)&&Y}),q=()=>{C.value?.toggle()},j=async(Y,M)=>{try{M==="blind"?await a.transferCall(Y):await a.startAttendedTransfer(Y)}catch(ne){console.error("[WebPhone] Transfer error:",ne),alert(ne instanceof Error?ne.message:"Transfer failed. Please try again.")}},z=async()=>{try{await a.completeAttendedTransfer()}catch(Y){console.error("[WebPhone] Complete transfer error:",Y),alert(Y instanceof Error?Y.message:"Failed to complete transfer.")}},J=async()=>{try{await a.cancelAttendedTransfer()}catch(Y){console.error("[WebPhone] Cancel transfer error:",Y),alert(Y instanceof Error?Y.message:"Failed to cancel transfer.")}};st(()=>{b.value&&u.value&&(T.value?b.value.srcObject=null:b.value.srcObject=u.value),_.value&&d.value&&(T.value?_.value.srcObject=null:_.value.srcObject=d.value)});const U=B(()=>R.value?y.value:x.value),Ae=()=>{const Y=window.innerWidth<640,M=window.innerWidth<1024;let ne=400;return Y?ne=window.innerWidth*.95:M&&(ne=360),{x:Math.max(0,(window.innerWidth-ne)/2),y:Y?30:80}},{style:be}=b_(g,{initialValue:Ae(),handle:U,preventDefault:!0}),Qe=[{label:"Line 1",value:0},{label:"Line 2",value:1},{label:"Line 3",value:2}],Be=F(!1),W=B({get:()=>o.activeChannelId.toString(),set:async Y=>{if(Y&&!Be.value){Be.value=!0;try{await c(parseInt(Y))}finally{Be.value=!1}}}}),se=B(()=>{const Y={};return o.channels.forEach(M=>{M.status==="incoming"?Y[M.id]="wp:bg-status-incoming wp:animate-pulse":M.isHeld||M.status==="held"?Y[M.id]="wp:bg-status-hold":M.status==="connected"?Y[M.id]="wp:bg-status-incall":M.status==="calling"?Y[M.id]="wp:bg-status-incall wp:animate-pulse":Y[M.id]="wp:bg-transparent"}),Y}),ie=Y=>{if((Y.metaKey||Y.ctrlKey)&&Y.key.toLowerCase()==="h"&&(Y.preventDefault(),w.value=!0),(Y.metaKey||Y.ctrlKey)&&Y.key===","&&(Y.preventDefault(),m.value=!0),(Y.metaKey||Y.ctrlKey)&&Y.key.toLowerCase()==="k"&&(Y.preventDefault(),o.toggleKeypad()),(Y.metaKey||Y.ctrlKey)&&["1","2","3"].includes(Y.key)){Y.preventDefault();const M=parseInt(Y.key)-1;Be.value||(Be.value=!0,c(M).finally(()=>{Be.value=!1}))}};return Ue(async()=>{window.addEventListener("keydown",ie),!(r.mode==="webcall"&&(!r.to||!r.logo))&&(!r.host||!r.extension||!r.password||(await l({uri:`sip:${r.extension}@${r.host}`,transportOptions:{server:s.value},authorizationUsername:r.extension,authorizationPassword:r.password}),r.mode==="webcall"&&r.to&&a.makeCall(r.to)))}),Rt(()=>{window.removeEventListener("keydown",ie)}),(Y,M)=>(I(),ve(Oe,null,[re("div",{ref_key:"phoneRef",ref:g,style:mt(f(be)),class:"webphone-container wp:bg-white wp:dark:bg-neutral-900 wp:rounded-2xl wp:shadow-xl wp:w-[min(95vw,400px)] wp:fixed wp:z-50 wp:select-none wp:[&_button]:cursor-pointer wp:**:[[role=button]]:cursor-pointer"},[R.value?(I(),ve("div",ST,[re("div",CT,[D(f(ze),{variant:"ghost",size:"icon",class:"wp:h-8 wp:w-8 wp:rounded-full",onClick:M[3]||(M[3]=ne=>n("back"))},{default:A(()=>[D(f(_C),{class:"wp:w-4 wp:h-4"})]),_:1}),re("div",{ref_key:"webcallHandleRef",ref:y,class:Ke(f(Ge)(f(hc)({variant:"outline",size:"sm"}),"wp:cursor-move wp:gap-2 wp:h-7 wp:px-2 wp:text-xs"))},[D(f(Ei),{class:"wp:w-4 wp:h-4 wp:text-muted-foreground"}),M[22]||(M[22]=re("span",{class:"wp:font-medium"}," WebCall",-1)),re("div",{class:"wp:relative wp:flex wp:items-center",title:O.value==="connected"?"Conectado":O.value==="disconnected"?"Desconectado del servidor":"Sin conexión a Internet"},[O.value==="offline"?(I(),N(f(Fh),{key:0,class:"wp:w-3 wp:h-3 wp:text-red-500"})):O.value==="disconnected"?(I(),N(f(ta),{key:1,class:"wp:w-3 wp:h-3 wp:text-amber-500 wp:animate-pulse"})):(I(),N(f(ta),{key:2,class:"wp:w-3 wp:h-3 wp:text-green-500"}))],8,_T)],2),re("div",xT,[E.value?(I(),N(f(ze),{key:0,variant:"ghost",size:"icon",class:Ke(["wp:h-8 wp:w-8 wp:rounded-full",T.value?"wp:text-primary":""]),title:"Picture-in-Picture",onClick:q},{default:A(()=>[D(f(Hh),{class:"wp:w-4 wp:h-4"})]),_:1},8,["class"])):xe("",!0),D(f(ze),{variant:"ghost",size:"icon",class:"wp:h-8 wp:w-8 wp:rounded-full",onClick:M[4]||(M[4]=ne=>f(h)())},{default:A(()=>[f(p)?(I(),N(f(qh),{key:0,class:"wp:w-4 wp:h-4"})):(I(),N(f(Oh),{key:1,class:"wp:w-4 wp:h-4"}))]),_:1}),D(f(Yn),null,{default:A(()=>[D(f(Gn),null,{default:A(()=>[D(f(Zn),{"as-child":""},{default:A(()=>[D(f(ze),{variant:"ghost",size:"icon",class:"wp:h-8 wp:w-8 wp:rounded-full",onClick:M[5]||(M[5]=ne=>w.value=!0)},{default:A(()=>[D(f(Ph),{class:"wp:w-4 wp:h-4"})]),_:1})]),_:1}),D(f(Jn),{class:"wp:flex wp:items-center wp:gap-2"},{default:A(()=>[M[23]||(M[23]=re("span",null,"Historial",-1)),D(f(Kt),null,{default:A(()=>[$e(Re(f($))+"H",1)]),_:1})]),_:1})]),_:1})]),_:1}),D(f(Yn),null,{default:A(()=>[D(f(Gn),null,{default:A(()=>[D(f(Zn),{"as-child":""},{default:A(()=>[D(f(ze),{variant:"ghost",size:"icon",class:"wp:h-8 wp:w-8 wp:rounded-full",onClick:M[6]||(M[6]=ne=>m.value=!0)},{default:A(()=>[D(f(Mh),{class:"wp:w-4 wp:h-4"})]),_:1})]),_:1}),D(f(Jn),{class:"wp:flex wp:items-center wp:gap-2"},{default:A(()=>[M[24]||(M[24]=re("span",null,"Configuración",-1)),D(f(Kt),null,{default:A(()=>[$e(Re(f($))+",",1)]),_:1})]),_:1})]),_:1})]),_:1})])]),e.logo?(I(),ve("img",{key:0,src:e.logo,class:"wp:w-16 wp:h-16 wp:object-contain wp:mt-1 wp:rounded-2xl"},null,8,TT)):xe("",!0)])):(I(),ve("div",mT,[re("div",wT,[re("div",{ref_key:"standardHandleRef",ref:x,class:Ke(f(Ge)(f(hc)({variant:"outline",size:"sm"}),"wp:cursor-move wp:gap-2 wp:h-8 wp:px-2.5 wp:text-sm"))},[D(f(Ei),{class:"wp:w-4 wp:h-4 wp:text-muted-foreground"}),M[19]||(M[19]=re("span",{class:"wp:font-medium"},"WebPhone",-1)),re("div",{class:"wp:relative wp:flex wp:items-center",title:O.value==="connected"?"Conectado":O.value==="disconnected"?"Desconectado del servidor":"Sin conexión a Internet"},[O.value==="offline"?(I(),N(f(Fh),{key:0,class:"wp:w-3 wp:h-3 wp:text-red-500"})):O.value==="disconnected"?(I(),N(f(ta),{key:1,class:"wp:w-3 wp:h-3 wp:text-amber-500 wp:animate-pulse"})):(I(),N(f(ta),{key:2,class:"wp:w-3 wp:h-3 wp:text-green-500"}))],8,yT)],2),re("div",bT,[E.value?(I(),N(f(ze),{key:0,variant:"ghost",size:"icon",class:Ke(["wp:h-8 wp:w-8 wp:rounded-full",T.value?"wp:text-primary":""]),title:"Picture-in-Picture",onClick:q},{default:A(()=>[D(f(Hh),{class:"wp:w-4 wp:h-4"})]),_:1},8,["class"])):xe("",!0),D(f(ze),{variant:"ghost",size:"icon",class:"wp:h-8 wp:w-8 wp:rounded-full",onClick:M[0]||(M[0]=ne=>f(h)())},{default:A(()=>[f(p)?(I(),N(f(qh),{key:0,class:"wp:w-4 wp:h-4"})):(I(),N(f(Oh),{key:1,class:"wp:w-4 wp:h-4"}))]),_:1}),D(f(Yn),null,{default:A(()=>[D(f(Gn),null,{default:A(()=>[D(f(Zn),{"as-child":""},{default:A(()=>[D(f(ze),{variant:"ghost",size:"icon",class:"wp:h-8 wp:w-8 wp:rounded-full",onClick:M[1]||(M[1]=ne=>w.value=!0)},{default:A(()=>[D(f(Ph),{class:"wp:w-4 wp:h-4"})]),_:1})]),_:1}),D(f(Jn),{class:"wp:flex wp:items-center wp:gap-2"},{default:A(()=>[M[20]||(M[20]=re("span",null,"Historial",-1)),D(f(Kt),null,{default:A(()=>[$e(Re(f($))+"H",1)]),_:1})]),_:1})]),_:1})]),_:1}),D(f(Yn),null,{default:A(()=>[D(f(Gn),null,{default:A(()=>[D(f(Zn),{"as-child":""},{default:A(()=>[D(f(ze),{variant:"ghost",size:"icon",class:"wp:h-8 wp:w-8 wp:rounded-full",onClick:M[2]||(M[2]=ne=>m.value=!0)},{default:A(()=>[D(f(Mh),{class:"wp:w-4 wp:h-4"})]),_:1})]),_:1}),D(f(Jn),{class:"wp:flex wp:items-center wp:gap-2"},{default:A(()=>[M[21]||(M[21]=re("span",null,"Configuración",-1)),D(f(Kt),null,{default:A(()=>[$e(Re(f($))+",",1)]),_:1})]),_:1})]),_:1})]),_:1})])])])),v.value&&!T.value?(I(),ve("div",ET,[re("video",{ref_key:"remoteVideoRef",ref:b,autoplay:"",playsinline:"",class:"wp:w-full wp:h-full wp:object-cover"},null,512),re("div",AT,[re("video",{ref_key:"localVideoRef",ref:_,autoplay:"",playsinline:"",muted:"",class:"wp:w-full wp:h-full wp:object-cover"},null,512)])])):xe("",!0),re("div",kT,[R.value?xe("",!0):(I(),ve("div",IT,[D(f(pT),{modelValue:W.value,"onUpdate:modelValue":M[7]||(M[7]=ne=>W.value=ne),type:"single",variant:"outline",size:"sm"},{default:A(()=>[(I(),ve(Oe,null,Xt(Qe,ne=>D(f(vT),{key:ne.value,value:ne.value.toString(),class:"wp:h-8 wp:px-3 wp:text-xs",title:`${ne.label} (⌘${ne.value+1})`},{default:A(()=>[re("div",RT,[re("span",null,Re(ne.label),1),se.value[ne.value]!=="wp:bg-transparent"?(I(),ve("div",{key:0,class:Ke([se.value[ne.value],"wp:w-1.5 wp:h-1.5 wp:rounded-full"])},null,2)):xe("",!0)])]),_:2},1032,["value","title"])),64))]),_:1},8,["modelValue"])])),re("div",$T,[(I(!0),ve(Oe,null,Xt(o.channels,ne=>Yi((I(),N(W_,{key:ne.id,"channel-id":ne.id,"allow-input":!R.value,"is-web-call":R.value,contacts:r.contacts,user:r.extension},null,8,["channel-id","allow-input","is-web-call","contacts","user"])),[[yo,ne.id===o.activeChannelId]])),128))]),re("div",{class:Ke(["wp:transition-all wp:duration-300 wp:ease-in-out wp:overflow-hidden",o.isKeypadVisible?"wp:max-h-[300px] wp:opacity-100":"wp:max-h-0 wp:opacity-0"])},[D(wC)],2),D(FC,{destination:R.value?r.to:void 0,"is-video":r.mode==="video",onTransfer:M[8]||(M[8]=ne=>S.value=!0),onCompleteTransfer:z,onCancelTransfer:J},null,8,["destination","is-video"])]),R.value?(I(),ve("div",DT,[...M[25]||(M[25]=[re("div",{class:"wp:text-[10px] wp:text-primary"},"Powered By",-1),re("div",{class:"wp:flex wp:items-center wp:gap-2"},[re("a",{href:"https://www.nebula123.com",target:"_blank",class:"wp:text-[10px] wp:text-primary wp:hover:underline"}," www.nebula123.com ")],-1)])])):xe("",!0)],4),D(Ox,{visible:m.value,"onUpdate:visible":M[9]||(M[9]=ne=>m.value=ne)},null,8,["visible"]),D(Zx,{visible:w.value,"onUpdate:visible":M[10]||(M[10]=ne=>w.value=ne),contacts:r.contacts,onCall:M[11]||(M[11]=ne=>{o.keypadValue=ne,f(a).makeCall(ne)})},null,8,["visible","contacts"]),D(lT,{visible:S.value,"onUpdate:visible":M[12]||(M[12]=ne=>S.value=ne),contacts:r.contacts,onTransfer:j},null,8,["visible","contacts"]),D(uT,{ref_key:"documentPipRef",ref:C,active:T.value,"onUpdate:active":M[13]||(M[13]=ne=>T.value=ne),"is-connected":o.isConnected,"remote-number":o.remoteNumber,"has-video":v.value??!1,"remote-stream":f(u),"local-stream":f(d),destination:R.value?r.to:void 0,"is-video":r.mode==="video","call-status":o.callStatus,"is-muted":o.isMuted,"is-held":o.isHeld,onTransfer:M[14]||(M[14]=ne=>S.value=!0),onHangup:M[15]||(M[15]=ne=>f(a).hangupCall()),onAnswer:M[16]||(M[16]=ne=>f(a).answerCall(ne)),onToggleMute:M[17]||(M[17]=ne=>f(a).toggleMute()),onToggleHold:M[18]||(M[18]=ne=>f(a).toggleHold())},null,8,["active","is-connected","remote-number","has-video","remote-stream","local-stream","destination","is-video","call-status","is-muted","is-held"])],64))}}),OT=(e,t)=>{const r=e.__vccOpts||e;for(const[n,s]of t)r[n]=s;return r},HT=OT(PT,[["__scopeId","data-v-f7279ee0"]]),MT=cl({props:{host:String,wsUrl:String,extension:String,password:String,to:String,mode:{type:String,default:"call"},logo:String,contacts:{type:[String,Array],default:()=>[]}},setup(e){return()=>{let t=e.contacts;if(typeof e.contacts=="string")try{t=JSON.parse(e.contacts)}catch{t=[]}return Qt(HT,{...e,contacts:t})}}},{shadowRoot:!1});customElements.define("web-phone",MT)})();