voxnix 1.0.24 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,429 +1,70 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}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;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}body{background-color:transparent;--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1));-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-2{top:.5rem;right:.5rem;bottom:.5rem;left:.5rem}.-right-0\\.5{right:-.125rem}.-right-1{right:-.25rem}.-top-0\\.5{top:-.125rem}.-top-1{top:-.25rem}.bottom-6{bottom:1.5rem}.bottom-full{bottom:100%}.left-1\\/2{left:50%}.left-3{left:.75rem}.right-0{right:0}.right-3{right:.75rem}.top-3{top:.75rem}.top-6{top:1.5rem}.z-10{z-index:10}.z-50{z-index:50}.z-\\[9999\\]{z-index:9999}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-1\\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-6{margin-bottom:1.5rem}.ml-auto{margin-left:auto}.mt-1{margin-top:.25rem}.mt-1\\.5{margin-top:.375rem}.mt-4{margin-top:1rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-1\\.5{height:.375rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-20{height:5rem}.h-28{height:7rem}.h-3{height:.75rem}.h-3\\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-9{height:2.25rem}.h-\\[18px\\]{height:18px}.h-px{height:1px}.min-h-\\[280px\\]{min-height:280px}.min-h-\\[300px\\]{min-height:300px}.min-h-\\[44px\\]{min-height:44px}.min-h-\\[56px\\]{min-height:56px}.w-1\\.5{width:.375rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-20{width:5rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\\.5{width:.875rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-9{width:2.25rem}.w-\\[18px\\]{width:18px}.w-\\[360px\\]{width:360px}.w-full{width:100%}.max-w-\\[220px\\]{max-width:220px}.max-w-\\[260px\\]{max-width:260px}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.origin-bottom-left{transform-origin:bottom left}.origin-bottom-right{transform-origin:bottom right}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-10{gap:2.5rem}.gap-2{gap:.5rem}.gap-2\\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-7{gap:1.75rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-gray-50{--tw-border-opacity: 1;border-color:rgb(249 250 251 / var(--tw-border-opacity, 1))}.border-green-100{--tw-border-opacity: 1;border-color:rgb(220 252 231 / var(--tw-border-opacity, 1))}.border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity, 1))}.border-primary{--tw-border-opacity: 1;border-color:rgb(63 49 146 / var(--tw-border-opacity, 1))}.border-primary\\/15{border-color:#3f319226}.border-primary\\/20{border-color:#3f319233}.border-red-100{--tw-border-opacity: 1;border-color:rgb(254 226 226 / var(--tw-border-opacity, 1))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.border-t-gray-600{--tw-border-opacity: 1;border-top-color:rgb(75 85 99 / var(--tw-border-opacity, 1))}.border-t-primary{--tw-border-opacity: 1;border-top-color:rgb(63 49 146 / var(--tw-border-opacity, 1))}.bg-amber-400{--tw-bg-opacity: 1;background-color:rgb(251 191 36 / var(--tw-bg-opacity, 1))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-blue-400{--tw-bg-opacity: 1;background-color:rgb(96 165 250 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-gray-50\\/60{background-color:#f9fafb99}.bg-gray-50\\/70{background-color:#f9fafbb3}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-500\\/15{background-color:#22c55e26}.bg-primary{--tw-bg-opacity: 1;background-color:rgb(63 49 146 / var(--tw-bg-opacity, 1))}.bg-primary\\/10{background-color:#3f31921a}.bg-primary\\/15{background-color:#3f319226}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-500\\/15{background-color:#ef444426}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\\/90{background-color:#ffffffe6}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-\\[\\#3f3192\\]{--tw-gradient-from: #3f3192 var(--tw-gradient-from-position);--tw-gradient-to: rgb(63 49 146 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-500{--tw-gradient-from: #22c55e var(--tw-gradient-from-position);--tw-gradient-to: rgb(34 197 94 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-\\[\\#5240c2\\]{--tw-gradient-to: #5240c2 var(--tw-gradient-to-position)}.to-green-600{--tw-gradient-to: #16a34a var(--tw-gradient-to-position)}.fill-white{fill:#fff}.p-1{padding:.25rem}.p-1\\.5{padding:.375rem}.p-6{padding:1.5rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-2\\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pt-1{padding-top:.25rem}.pt-5{padding-top:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[22px\\]{font-size:22px}.text-\\[28px\\]{font-size:28px}.text-\\[9px\\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-\\[0\\.12em\\]{letter-spacing:.12em}.tracking-\\[0\\.18em\\]{letter-spacing:.18em}.tracking-\\[0\\.25em\\]{letter-spacing:.25em}.tracking-\\[0\\.2em\\]{letter-spacing:.2em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-amber-600{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}.text-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-primary{--tw-text-opacity: 1;color:rgb(63 49 146 / var(--tw-text-opacity, 1))}.text-primary\\/70{color:#3f3192b3}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-white\\/50{color:#ffffff80}.opacity-75{opacity:.75}.shadow-\\[0_20px_60px_rgba\\(0\\,0\\,0\\,0\\.18\\)\\,0_4px_16px_rgba\\(0\\,0\\,0\\,0\\.08\\)\\]{--tw-shadow: 0 20px 60px rgba(0,0,0,.18),0 4px 16px rgba(0,0,0,.08);--tw-shadow-colored: 0 20px 60px var(--tw-shadow-color), 0 4px 16px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_2px_6px_rgba\\(0\\,0\\,0\\,0\\.07\\)\\]{--tw-shadow: 0 2px 6px rgba(0,0,0,.07);--tw-shadow-colored: 0 2px 6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_2px_8px_rgba\\(239\\,68\\,68\\,0\\.35\\)\\]{--tw-shadow: 0 2px 8px rgba(239,68,68,.35);--tw-shadow-colored: 0 2px 8px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_2px_8px_rgba\\(63\\,49\\,146\\,0\\.35\\)\\]{--tw-shadow: 0 2px 8px rgba(63,49,146,.35);--tw-shadow-colored: 0 2px 8px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_4px_14px_rgba\\(239\\,68\\,68\\,0\\.4\\)\\]{--tw-shadow: 0 4px 14px rgba(239,68,68,.4);--tw-shadow-colored: 0 4px 14px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_4px_14px_rgba\\(34\\,197\\,94\\,0\\.4\\)\\]{--tw-shadow: 0 4px 14px rgba(34,197,94,.4);--tw-shadow-colored: 0 4px 14px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-primary\\/30{--tw-shadow-color: rgb(63 49 146 / .3);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-md{--tw-backdrop-blur: blur(12px);-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)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}@keyframes fadeIn{0%{opacity:0;transform:scale(.98)}to{opacity:1;transform:scale(1)}}@keyframes slideUp{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.animate-fadeIn{animation:fadeIn .25s cubic-bezier(.16,1,.3,1) forwards}.animate-slideUp{animation:slideUp .3s cubic-bezier(.16,1,.3,1) forwards}.placeholder\\:text-2xl::-moz-placeholder{font-size:1.5rem;line-height:2rem}.placeholder\\:text-2xl::placeholder{font-size:1.5rem;line-height:2rem}.placeholder\\:font-normal::-moz-placeholder{font-weight:400}.placeholder\\:font-normal::placeholder{font-weight:400}.placeholder\\:text-gray-300::-moz-placeholder{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.placeholder\\:text-gray-300::placeholder{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.last\\:border-0:last-child{border-width:0px}.hover\\:border-primary\\/20:hover{border-color:#3f319233}.hover\\:bg-amber-50:hover{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.hover\\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\\:bg-green-50:hover{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.hover\\:bg-green-600:hover{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity, 1))}.hover\\:bg-primary-hover:hover{--tw-bg-opacity: 1;background-color:rgb(43 32 102 / var(--tw-bg-opacity, 1))}.hover\\:bg-primary\\/5:hover{background-color:#3f31920d}.hover\\:bg-red-600:hover{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.hover\\:from-green-600:hover{--tw-gradient-from: #16a34a var(--tw-gradient-from-position);--tw-gradient-to: rgb(22 163 74 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\\:to-green-700:hover{--tw-gradient-to: #15803d var(--tw-gradient-to-position)}.hover\\:text-amber-800:hover{--tw-text-opacity: 1;color:rgb(146 64 14 / var(--tw-text-opacity, 1))}.hover\\:text-gray-500:hover{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.hover\\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.hover\\:text-green-800:hover{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\\:shadow-\\[0_4px_12px_rgba\\(63\\,49\\,146\\,0\\.13\\)\\]:hover{--tw-shadow: 0 4px 12px rgba(63,49,146,.13);--tw-shadow-colored: 0 4px 12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:shadow-\\[0_6px_18px_rgba\\(239\\,68\\,68\\,0\\.5\\)\\]:hover{--tw-shadow: 0 6px 18px rgba(239,68,68,.5);--tw-shadow-colored: 0 6px 18px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:shadow-\\[0_6px_20px_rgba\\(239\\,68\\,68\\,0\\.5\\)\\]:hover{--tw-shadow: 0 6px 20px rgba(239,68,68,.5);--tw-shadow-colored: 0 6px 20px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:shadow-\\[0_6px_20px_rgba\\(34\\,197\\,94\\,0\\.5\\)\\]:hover{--tw-shadow: 0 6px 20px rgba(34,197,94,.5);--tw-shadow-colored: 0 6px 20px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\\:border-primary:focus{--tw-border-opacity: 1;border-color:rgb(63 49 146 / var(--tw-border-opacity, 1))}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-primary:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(63 49 146 / var(--tw-ring-opacity, 1))}.active\\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\\:bg-primary\\/10:active{background-color:#3f31921a}.active\\:shadow-none:active{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:from-gray-200:disabled{--tw-gradient-from: #e5e7eb var(--tw-gradient-from-position);--tw-gradient-to: rgb(229 231 235 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.disabled\\:to-gray-200:disabled{--tw-gradient-to: #e5e7eb var(--tw-gradient-to-position)}.disabled\\:text-gray-400:disabled{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.disabled\\:opacity-40:disabled{opacity:.4}.disabled\\:opacity-50:disabled{opacity:.5}.disabled\\:opacity-60:disabled{opacity:.6}.disabled\\:shadow-none:disabled{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}')),document.head.appendChild(t)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
2
- var OmnixWidget=function(zy){"use strict";var Ut=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $C(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}function UT(o){if(o.__esModule)return o;var r=o.default;if(typeof r=="function"){var i=function l(){return this instanceof l?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};i.prototype=r.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(o).forEach(function(l){var f=Object.getOwnPropertyDescriptor(o,l);Object.defineProperty(i,l,f.get?f:{enumerable:!0,get:function(){return o[l]}})}),i}var qy={exports:{}},zt={};/**
3
- * @license React
4
- * react.production.min.js
5
- *
6
- * Copyright (c) Facebook, Inc. and its affiliates.
7
- *
8
- * This source code is licensed under the MIT license found in the
9
- * LICENSE file in the root directory of this source tree.
10
- */var PC;function jT(){if(PC)return zt;PC=1;var o=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),v=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),S=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),T=Symbol.iterator;function A($){return $===null||typeof $!="object"?null:($=T&&$[T]||$["@@iterator"],typeof $=="function"?$:null)}var H={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},P=Object.assign,j={};function z($,G,he){this.props=$,this.context=G,this.refs=j,this.updater=he||H}z.prototype.isReactComponent={},z.prototype.setState=function($,G){if(typeof $!="object"&&typeof $!="function"&&$!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,$,G,"setState")},z.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")};function N(){}N.prototype=z.prototype;function B($,G,he){this.props=$,this.context=G,this.refs=j,this.updater=he||H}var U=B.prototype=new N;U.constructor=B,P(U,z.prototype),U.isPureReactComponent=!0;var q=Array.isArray,K=Object.prototype.hasOwnProperty,Z={current:null},ee={key:!0,ref:!0,__self:!0,__source:!0};function R($,G,he){var le,tt={},Ke=null,ct=null;if(G!=null)for(le in G.ref!==void 0&&(ct=G.ref),G.key!==void 0&&(Ke=""+G.key),G)K.call(G,le)&&!ee.hasOwnProperty(le)&&(tt[le]=G[le]);var Ce=arguments.length-2;if(Ce===1)tt.children=he;else if(1<Ce){for(var Te=Array(Ce),xt=0;xt<Ce;xt++)Te[xt]=arguments[xt+2];tt.children=Te}if($&&$.defaultProps)for(le in Ce=$.defaultProps,Ce)tt[le]===void 0&&(tt[le]=Ce[le]);return{$$typeof:o,type:$,key:Ke,ref:ct,props:tt,_owner:Z.current}}function Se($,G){return{$$typeof:o,type:$.type,key:G,ref:$.ref,props:$.props,_owner:$._owner}}function X($){return typeof $=="object"&&$!==null&&$.$$typeof===o}function F($){var G={"=":"=0",":":"=2"};return"$"+$.replace(/[=:]/g,function(he){return G[he]})}var L=/\/+/g;function M($,G){return typeof $=="object"&&$!==null&&$.key!=null?F(""+$.key):G.toString(36)}function _e($,G,he,le,tt){var Ke=typeof $;(Ke==="undefined"||Ke==="boolean")&&($=null);var ct=!1;if($===null)ct=!0;else switch(Ke){case"string":case"number":ct=!0;break;case"object":switch($.$$typeof){case o:case r:ct=!0}}if(ct)return ct=$,tt=tt(ct),$=le===""?"."+M(ct,0):le,q(tt)?(he="",$!=null&&(he=$.replace(L,"$&/")+"/"),_e(tt,G,he,"",function(xt){return xt})):tt!=null&&(X(tt)&&(tt=Se(tt,he+(!tt.key||ct&&ct.key===tt.key?"":(""+tt.key).replace(L,"$&/")+"/")+$)),G.push(tt)),1;if(ct=0,le=le===""?".":le+":",q($))for(var Ce=0;Ce<$.length;Ce++){Ke=$[Ce];var Te=le+M(Ke,Ce);ct+=_e(Ke,G,he,Te,tt)}else if(Te=A($),typeof Te=="function")for($=Te.call($),Ce=0;!(Ke=$.next()).done;)Ke=Ke.value,Te=le+M(Ke,Ce++),ct+=_e(Ke,G,he,Te,tt);else if(Ke==="object")throw G=String($),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys($).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.");return ct}function be($,G,he){if($==null)return $;var le=[],tt=0;return _e($,le,"","",function(Ke){return G.call(he,Ke,tt++)}),le}function $e($){if($._status===-1){var G=$._result;G=G(),G.then(function(he){($._status===0||$._status===-1)&&($._status=1,$._result=he)},function(he){($._status===0||$._status===-1)&&($._status=2,$._result=he)}),$._status===-1&&($._status=0,$._result=G)}if($._status===1)return $._result.default;throw $._result}var ge={current:null},Ee={transition:null},He={ReactCurrentDispatcher:ge,ReactCurrentBatchConfig:Ee,ReactCurrentOwner:Z};function De(){throw Error("act(...) is not supported in production builds of React.")}return zt.Children={map:be,forEach:function($,G,he){be($,function(){G.apply(this,arguments)},he)},count:function($){var G=0;return be($,function(){G++}),G},toArray:function($){return be($,function(G){return G})||[]},only:function($){if(!X($))throw Error("React.Children.only expected to receive a single React element child.");return $}},zt.Component=z,zt.Fragment=i,zt.Profiler=f,zt.PureComponent=B,zt.StrictMode=l,zt.Suspense=w,zt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=He,zt.act=De,zt.cloneElement=function($,G,he){if($==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+$+".");var le=P({},$.props),tt=$.key,Ke=$.ref,ct=$._owner;if(G!=null){if(G.ref!==void 0&&(Ke=G.ref,ct=Z.current),G.key!==void 0&&(tt=""+G.key),$.type&&$.type.defaultProps)var Ce=$.type.defaultProps;for(Te in G)K.call(G,Te)&&!ee.hasOwnProperty(Te)&&(le[Te]=G[Te]===void 0&&Ce!==void 0?Ce[Te]:G[Te])}var Te=arguments.length-2;if(Te===1)le.children=he;else if(1<Te){Ce=Array(Te);for(var xt=0;xt<Te;xt++)Ce[xt]=arguments[xt+2];le.children=Ce}return{$$typeof:o,type:$.type,key:tt,ref:Ke,props:le,_owner:ct}},zt.createContext=function($){return $={$$typeof:v,_currentValue:$,_currentValue2:$,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},$.Provider={$$typeof:p,_context:$},$.Consumer=$},zt.createElement=R,zt.createFactory=function($){var G=R.bind(null,$);return G.type=$,G},zt.createRef=function(){return{current:null}},zt.forwardRef=function($){return{$$typeof:C,render:$}},zt.isValidElement=X,zt.lazy=function($){return{$$typeof:b,_payload:{_status:-1,_result:$},_init:$e}},zt.memo=function($,G){return{$$typeof:S,type:$,compare:G===void 0?null:G}},zt.startTransition=function($){var G=Ee.transition;Ee.transition={};try{$()}finally{Ee.transition=G}},zt.unstable_act=De,zt.useCallback=function($,G){return ge.current.useCallback($,G)},zt.useContext=function($){return ge.current.useContext($)},zt.useDebugValue=function(){},zt.useDeferredValue=function($){return ge.current.useDeferredValue($)},zt.useEffect=function($,G){return ge.current.useEffect($,G)},zt.useId=function(){return ge.current.useId()},zt.useImperativeHandle=function($,G,he){return ge.current.useImperativeHandle($,G,he)},zt.useInsertionEffect=function($,G){return ge.current.useInsertionEffect($,G)},zt.useLayoutEffect=function($,G){return ge.current.useLayoutEffect($,G)},zt.useMemo=function($,G){return ge.current.useMemo($,G)},zt.useReducer=function($,G,he){return ge.current.useReducer($,G,he)},zt.useRef=function($){return ge.current.useRef($)},zt.useState=function($){return ge.current.useState($)},zt.useSyncExternalStore=function($,G,he){return ge.current.useSyncExternalStore($,G,he)},zt.useTransition=function(){return ge.current.useTransition()},zt.version="18.3.1",zt}var Wh={exports:{}};/**
11
- * @license React
12
- * react.development.js
13
- *
14
- * Copyright (c) Facebook, Inc. and its affiliates.
15
- *
16
- * This source code is licensed under the MIT license found in the
17
- * LICENSE file in the root directory of this source tree.
18
- */Wh.exports;var LC;function zT(){return LC||(LC=1,function(o,r){process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var i="18.3.1",l=Symbol.for("react.element"),f=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),w=Symbol.for("react.provider"),S=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),j=Symbol.for("react.offscreen"),z=Symbol.iterator,N="@@iterator";function B(D){if(D===null||typeof D!="object")return null;var V=z&&D[z]||D[N];return typeof V=="function"?V:null}var U={current:null},q={transition:null},K={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},Z={current:null},ee={},R=null;function Se(D){R=D}ee.setExtraStackFrame=function(D){R=D},ee.getCurrentStack=null,ee.getStackAddendum=function(){var D="";R&&(D+=R);var V=ee.getCurrentStack;return V&&(D+=V()||""),D};var X=!1,F=!1,L=!1,M=!1,_e=!1,be={ReactCurrentDispatcher:U,ReactCurrentBatchConfig:q,ReactCurrentOwner:Z};be.ReactDebugCurrentFrame=ee,be.ReactCurrentActQueue=K;function $e(D){{for(var V=arguments.length,ce=new Array(V>1?V-1:0),ve=1;ve<V;ve++)ce[ve-1]=arguments[ve];Ee("warn",D,ce)}}function ge(D){{for(var V=arguments.length,ce=new Array(V>1?V-1:0),ve=1;ve<V;ve++)ce[ve-1]=arguments[ve];Ee("error",D,ce)}}function Ee(D,V,ce){{var ve=be.ReactDebugCurrentFrame,Ie=ve.getStackAddendum();Ie!==""&&(V+="%s",ce=ce.concat([Ie]));var vt=ce.map(function(je){return String(je)});vt.unshift("Warning: "+V),Function.prototype.apply.call(console[D],console,vt)}}var He={};function De(D,V){{var ce=D.constructor,ve=ce&&(ce.displayName||ce.name)||"ReactClass",Ie=ve+"."+V;if(He[Ie])return;ge("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",V,ve),He[Ie]=!0}}var $={isMounted:function(D){return!1},enqueueForceUpdate:function(D,V,ce){De(D,"forceUpdate")},enqueueReplaceState:function(D,V,ce,ve){De(D,"replaceState")},enqueueSetState:function(D,V,ce,ve){De(D,"setState")}},G=Object.assign,he={};Object.freeze(he);function le(D,V,ce){this.props=D,this.context=V,this.refs=he,this.updater=ce||$}le.prototype.isReactComponent={},le.prototype.setState=function(D,V){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,V,"setState")},le.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};{var tt={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},Ke=function(D,V){Object.defineProperty(le.prototype,D,{get:function(){$e("%s(...) is deprecated in plain JavaScript React classes. %s",V[0],V[1])}})};for(var ct in tt)tt.hasOwnProperty(ct)&&Ke(ct,tt[ct])}function Ce(){}Ce.prototype=le.prototype;function Te(D,V,ce){this.props=D,this.context=V,this.refs=he,this.updater=ce||$}var xt=Te.prototype=new Ce;xt.constructor=Te,G(xt,le.prototype),xt.isPureReactComponent=!0;function Sr(){var D={current:null};return Object.seal(D),D}var zr=Array.isArray;function Yt(D){return zr(D)}function Xt(D){{var V=typeof Symbol=="function"&&Symbol.toStringTag,ce=V&&D[Symbol.toStringTag]||D.constructor.name||"Object";return ce}}function Fr(D){try{return br(D),!1}catch{return!0}}function br(D){return""+D}function nn(D){if(Fr(D))return ge("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Xt(D)),br(D)}function Rn(D,V,ce){var ve=D.displayName;if(ve)return ve;var Ie=V.displayName||V.name||"";return Ie!==""?ce+"("+Ie+")":ce}function vn(D){return D.displayName||"Context"}function qr(D){if(D==null)return null;if(typeof D.tag=="number"&&ge("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof D=="function")return D.displayName||D.name||null;if(typeof D=="string")return D;switch(D){case p:return"Fragment";case f:return"Portal";case C:return"Profiler";case v:return"StrictMode";case T:return"Suspense";case A:return"SuspenseList"}if(typeof D=="object")switch(D.$$typeof){case S:var V=D;return vn(V)+".Consumer";case w:var ce=D;return vn(ce._context)+".Provider";case b:return Rn(D,D.render,"ForwardRef");case H:var ve=D.displayName||null;return ve!==null?ve:qr(D.type)||"Memo";case P:{var Ie=D,vt=Ie._payload,je=Ie._init;try{return qr(je(vt))}catch{return null}}}return null}var tr=Object.prototype.hasOwnProperty,ar={key:!0,ref:!0,__self:!0,__source:!0},Pr,ci,Kr;Kr={};function Qr(D){if(tr.call(D,"ref")){var V=Object.getOwnPropertyDescriptor(D,"ref").get;if(V&&V.isReactWarning)return!1}return D.ref!==void 0}function An(D){if(tr.call(D,"key")){var V=Object.getOwnPropertyDescriptor(D,"key").get;if(V&&V.isReactWarning)return!1}return D.key!==void 0}function ta(D,V){var ce=function(){Pr||(Pr=!0,ge("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",V))};ce.isReactWarning=!0,Object.defineProperty(D,"key",{get:ce,configurable:!0})}function ra(D,V){var ce=function(){ci||(ci=!0,ge("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",V))};ce.isReactWarning=!0,Object.defineProperty(D,"ref",{get:ce,configurable:!0})}function Pe(D){if(typeof D.ref=="string"&&Z.current&&D.__self&&Z.current.stateNode!==D.__self){var V=qr(Z.current.type);Kr[V]||(ge('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',V,D.ref),Kr[V]=!0)}}var it=function(D,V,ce,ve,Ie,vt,je){var Et={$$typeof:l,type:D,key:V,ref:ce,props:je,_owner:vt};return Et._store={},Object.defineProperty(Et._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Et,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ve}),Object.defineProperty(Et,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ie}),Object.freeze&&(Object.freeze(Et.props),Object.freeze(Et)),Et};function _t(D,V,ce){var ve,Ie={},vt=null,je=null,Et=null,Lt=null;if(V!=null){Qr(V)&&(je=V.ref,Pe(V)),An(V)&&(nn(V.key),vt=""+V.key),Et=V.__self===void 0?null:V.__self,Lt=V.__source===void 0?null:V.__source;for(ve in V)tr.call(V,ve)&&!ar.hasOwnProperty(ve)&&(Ie[ve]=V[ve])}var Jt=arguments.length-2;if(Jt===1)Ie.children=ce;else if(Jt>1){for(var Ir=Array(Jt),Dr=0;Dr<Jt;Dr++)Ir[Dr]=arguments[Dr+2];Object.freeze&&Object.freeze(Ir),Ie.children=Ir}if(D&&D.defaultProps){var Mt=D.defaultProps;for(ve in Mt)Ie[ve]===void 0&&(Ie[ve]=Mt[ve])}if(vt||je){var Tr=typeof D=="function"?D.displayName||D.name||"Unknown":D;vt&&ta(Ie,Tr),je&&ra(Ie,Tr)}return it(D,vt,je,Et,Lt,Z.current,Ie)}function rr(D,V){var ce=it(D.type,V,D.ref,D._self,D._source,D._owner,D.props);return ce}function Cr(D,V,ce){if(D==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var ve,Ie=G({},D.props),vt=D.key,je=D.ref,Et=D._self,Lt=D._source,Jt=D._owner;if(V!=null){Qr(V)&&(je=V.ref,Jt=Z.current),An(V)&&(nn(V.key),vt=""+V.key);var Ir;D.type&&D.type.defaultProps&&(Ir=D.type.defaultProps);for(ve in V)tr.call(V,ve)&&!ar.hasOwnProperty(ve)&&(V[ve]===void 0&&Ir!==void 0?Ie[ve]=Ir[ve]:Ie[ve]=V[ve])}var Dr=arguments.length-2;if(Dr===1)Ie.children=ce;else if(Dr>1){for(var Mt=Array(Dr),Tr=0;Tr<Dr;Tr++)Mt[Tr]=arguments[Tr+2];Ie.children=Mt}return it(D.type,vt,je,Et,Lt,Jt,Ie)}function Mr(D){return typeof D=="object"&&D!==null&&D.$$typeof===l}var Or=".",gn=":";function wr(D){var V=/[=:]/g,ce={"=":"=0",":":"=2"},ve=D.replace(V,function(Ie){return ce[Ie]});return"$"+ve}var mr=!1,dr=/\/+/g;function gi(D){return D.replace(dr,"$&/")}function kn(D,V){return typeof D=="object"&&D!==null&&D.key!=null?(nn(D.key),wr(""+D.key)):V.toString(36)}function Hi(D,V,ce,ve,Ie){var vt=typeof D;(vt==="undefined"||vt==="boolean")&&(D=null);var je=!1;if(D===null)je=!0;else switch(vt){case"string":case"number":je=!0;break;case"object":switch(D.$$typeof){case l:case f:je=!0}}if(je){var Et=D,Lt=Ie(Et),Jt=ve===""?Or+kn(Et,0):ve;if(Yt(Lt)){var Ir="";Jt!=null&&(Ir=gi(Jt)+"/"),Hi(Lt,V,Ir,"",function(m0){return m0})}else Lt!=null&&(Mr(Lt)&&(Lt.key&&(!Et||Et.key!==Lt.key)&&nn(Lt.key),Lt=rr(Lt,ce+(Lt.key&&(!Et||Et.key!==Lt.key)?gi(""+Lt.key)+"/":"")+Jt)),V.push(Lt));return 1}var Dr,Mt,Tr=0,Xr=ve===""?Or:ve+gn;if(Yt(D))for(var Mo=0;Mo<D.length;Mo++)Dr=D[Mo],Mt=Xr+kn(Dr,Mo),Tr+=Hi(Dr,V,ce,Mt,Ie);else{var Hc=B(D);if(typeof Hc=="function"){var Ws=D;Hc===Ws.entries&&(mr||$e("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),mr=!0);for(var Ic=Hc.call(Ws),Al,g0=0;!(Al=Ic.next()).done;)Dr=Al.value,Mt=Xr+kn(Dr,g0++),Tr+=Hi(Dr,V,ce,Mt,Ie)}else if(vt==="object"){var cd=String(D);throw new Error("Objects are not valid as a React child (found: "+(cd==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":cd)+"). If you meant to render a collection of children, use an array instead.")}}return Tr}function ja(D,V,ce){if(D==null)return D;var ve=[],Ie=0;return Hi(D,ve,"","",function(vt){return V.call(ce,vt,Ie++)}),ve}function qs(D){var V=0;return ja(D,function(){V++}),V}function cs(D,V,ce){ja(D,function(){V.apply(this,arguments)},ce)}function fs(D){return ja(D,function(V){return V})||[]}function ds(D){if(!Mr(D))throw new Error("React.Children.only expected to receive a single React element child.");return D}function hs(D){var V={$$typeof:S,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};V.Provider={$$typeof:w,_context:V};var ce=!1,ve=!1,Ie=!1;{var vt={$$typeof:S,_context:V};Object.defineProperties(vt,{Provider:{get:function(){return ve||(ve=!0,ge("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),V.Provider},set:function(je){V.Provider=je}},_currentValue:{get:function(){return V._currentValue},set:function(je){V._currentValue=je}},_currentValue2:{get:function(){return V._currentValue2},set:function(je){V._currentValue2=je}},_threadCount:{get:function(){return V._threadCount},set:function(je){V._threadCount=je}},Consumer:{get:function(){return ce||(ce=!0,ge("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),V.Consumer}},displayName:{get:function(){return V.displayName},set:function(je){Ie||($e("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",je),Ie=!0)}}}),V.Consumer=vt}return V._currentRenderer=null,V._currentRenderer2=null,V}var Vn=-1,$n=0,hr=1,Fn=2;function Ii(D){if(D._status===Vn){var V=D._result,ce=V();if(ce.then(function(vt){if(D._status===$n||D._status===Vn){var je=D;je._status=hr,je._result=vt}},function(vt){if(D._status===$n||D._status===Vn){var je=D;je._status=Fn,je._result=vt}}),D._status===Vn){var ve=D;ve._status=$n,ve._result=ce}}if(D._status===hr){var Ie=D._result;return Ie===void 0&&ge(`lazy: Expected the result of a dynamic import() call. Instead received: %s
19
-
20
- Your code should look like:
21
- const MyComponent = lazy(() => import('./MyComponent'))
22
-
23
- Did you accidentally put curly braces around the import?`,Ie),"default"in Ie||ge(`lazy: Expected the result of a dynamic import() call. Instead received: %s
24
-
25
- Your code should look like:
26
- const MyComponent = lazy(() => import('./MyComponent'))`,Ie),Ie.default}else throw D._result}function Ea(D){var V={_status:Vn,_result:D},ce={$$typeof:P,_payload:V,_init:Ii};{var ve,Ie;Object.defineProperties(ce,{defaultProps:{configurable:!0,get:function(){return ve},set:function(vt){ge("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),ve=vt,Object.defineProperty(ce,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return Ie},set:function(vt){ge("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),Ie=vt,Object.defineProperty(ce,"propTypes",{enumerable:!0})}}})}return ce}function ps(D){D!=null&&D.$$typeof===H?ge("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof D!="function"?ge("forwardRef requires a render function but was given %s.",D===null?"null":typeof D):D.length!==0&&D.length!==2&&ge("forwardRef render functions accept exactly two parameters: props and ref. %s",D.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),D!=null&&(D.defaultProps!=null||D.propTypes!=null)&&ge("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var V={$$typeof:b,render:D};{var ce;Object.defineProperty(V,"displayName",{enumerable:!1,configurable:!0,get:function(){return ce},set:function(ve){ce=ve,!D.name&&!D.displayName&&(D.displayName=ve)}})}return V}var W;W=Symbol.for("react.module.reference");function Re(D){return!!(typeof D=="string"||typeof D=="function"||D===p||D===C||_e||D===v||D===T||D===A||M||D===j||X||F||L||typeof D=="object"&&D!==null&&(D.$$typeof===P||D.$$typeof===H||D.$$typeof===w||D.$$typeof===S||D.$$typeof===b||D.$$typeof===W||D.getModuleId!==void 0))}function ze(D,V){Re(D)||ge("memo: The first argument must be a component. Instead received: %s",D===null?"null":typeof D);var ce={$$typeof:H,type:D,compare:V===void 0?null:V};{var ve;Object.defineProperty(ce,"displayName",{enumerable:!1,configurable:!0,get:function(){return ve},set:function(Ie){ve=Ie,!D.name&&!D.displayName&&(D.displayName=Ie)}})}return ce}function rt(){var D=U.current;return D===null&&ge(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
27
- 1. You might have mismatching versions of React and the renderer (such as React DOM)
28
- 2. You might be breaking the Rules of Hooks
29
- 3. You might have more than one copy of React in the same app
30
- See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`),D}function Ft(D){var V=rt();if(D._context!==void 0){var ce=D._context;ce.Consumer===D?ge("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):ce.Provider===D&&ge("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return V.useContext(D)}function Tt(D){var V=rt();return V.useState(D)}function Pt(D,V,ce){var ve=rt();return ve.useReducer(D,V,ce)}function Ht(D){var V=rt();return V.useRef(D)}function ln(D,V){var ce=rt();return ce.useEffect(D,V)}function Hr(D,V){var ce=rt();return ce.useInsertionEffect(D,V)}function Lr(D,V){var ce=rt();return ce.useLayoutEffect(D,V)}function Wn(D,V){var ce=rt();return ce.useCallback(D,V)}function za(D,V){var ce=rt();return ce.useMemo(D,V)}function qa(D,V,ce){var ve=rt();return ve.useImperativeHandle(D,V,ce)}function Ot(D,V){{var ce=rt();return ce.useDebugValue(D,V)}}function Bt(){var D=rt();return D.useTransition()}function Ya(D){var V=rt();return V.useDeferredValue(D)}function wl(){var D=rt();return D.useId()}function bl(D,V,ce){var ve=rt();return ve.useSyncExternalStore(D,V,ce)}var Ro=0,bu,Ao,$i,Oc,mi,ld,ud;function _u(){}_u.__reactDisabledLog=!0;function ko(){{if(Ro===0){bu=console.log,Ao=console.info,$i=console.warn,Oc=console.error,mi=console.group,ld=console.groupCollapsed,ud=console.groupEnd;var D={configurable:!0,enumerable:!0,value:_u,writable:!0};Object.defineProperties(console,{info:D,log:D,warn:D,error:D,group:D,groupCollapsed:D,groupEnd:D})}Ro++}}function na(){{if(Ro--,Ro===0){var D={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:G({},D,{value:bu}),info:G({},D,{value:Ao}),warn:G({},D,{value:$i}),error:G({},D,{value:Oc}),group:G({},D,{value:mi}),groupCollapsed:G({},D,{value:ld}),groupEnd:G({},D,{value:ud})})}Ro<0&&ge("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Va=be.ReactCurrentDispatcher,Wa;function Du(D,V,ce){{if(Wa===void 0)try{throw Error()}catch(Ie){var ve=Ie.stack.trim().match(/\n( *(at )?)/);Wa=ve&&ve[1]||""}return`
31
- `+Wa+D}}var _l=!1,Fo;{var Tu=typeof WeakMap=="function"?WeakMap:Map;Fo=new Tu}function Ru(D,V){if(!D||_l)return"";{var ce=Fo.get(D);if(ce!==void 0)return ce}var ve;_l=!0;var Ie=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var vt;vt=Va.current,Va.current=null,ko();try{if(V){var je=function(){throw Error()};if(Object.defineProperty(je.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(je,[])}catch(Xr){ve=Xr}Reflect.construct(D,[],je)}else{try{je.call()}catch(Xr){ve=Xr}D.call(je.prototype)}}else{try{throw Error()}catch(Xr){ve=Xr}D()}}catch(Xr){if(Xr&&ve&&typeof Xr.stack=="string"){for(var Et=Xr.stack.split(`
32
- `),Lt=ve.stack.split(`
33
- `),Jt=Et.length-1,Ir=Lt.length-1;Jt>=1&&Ir>=0&&Et[Jt]!==Lt[Ir];)Ir--;for(;Jt>=1&&Ir>=0;Jt--,Ir--)if(Et[Jt]!==Lt[Ir]){if(Jt!==1||Ir!==1)do if(Jt--,Ir--,Ir<0||Et[Jt]!==Lt[Ir]){var Dr=`
34
- `+Et[Jt].replace(" at new "," at ");return D.displayName&&Dr.includes("<anonymous>")&&(Dr=Dr.replace("<anonymous>",D.displayName)),typeof D=="function"&&Fo.set(D,Dr),Dr}while(Jt>=1&&Ir>=0);break}}}finally{_l=!1,Va.current=vt,na(),Error.prepareStackTrace=Ie}var Mt=D?D.displayName||D.name:"",Tr=Mt?Du(Mt):"";return typeof D=="function"&&Fo.set(D,Tr),Tr}function Ys(D,V,ce){return Ru(D,!1)}function p0(D){var V=D.prototype;return!!(V&&V.isReactComponent)}function Vs(D,V,ce){if(D==null)return"";if(typeof D=="function")return Ru(D,p0(D));if(typeof D=="string")return Du(D);switch(D){case T:return Du("Suspense");case A:return Du("SuspenseList")}if(typeof D=="object")switch(D.$$typeof){case b:return Ys(D.render);case H:return Vs(D.type,V,ce);case P:{var ve=D,Ie=ve._payload,vt=ve._init;try{return Vs(vt(Ie),V,ce)}catch{}}}return""}var sr={},Au=be.ReactDebugCurrentFrame;function Zt(D){if(D){var V=D._owner,ce=Vs(D.type,D._source,V?V.type:null);Au.setExtraStackFrame(ce)}else Au.setExtraStackFrame(null)}function Nc(D,V,ce,ve,Ie){{var vt=Function.call.bind(tr);for(var je in D)if(vt(D,je)){var Et=void 0;try{if(typeof D[je]!="function"){var Lt=Error((ve||"React class")+": "+ce+" type `"+je+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof D[je]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Lt.name="Invariant Violation",Lt}Et=D[je](V,je,ve,ce,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Jt){Et=Jt}Et&&!(Et instanceof Error)&&(Zt(Ie),ge("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",ve||"React class",ce,je,typeof Et),Zt(null)),Et instanceof Error&&!(Et.message in sr)&&(sr[Et.message]=!0,Zt(Ie),ge("Failed %s type: %s",ce,Et.message),Zt(null))}}}function vs(D){if(D){var V=D._owner,ce=Vs(D.type,D._source,V?V.type:null);Se(ce)}else Se(null)}var Dt;Dt=!1;function ku(){if(Z.current){var D=qr(Z.current.type);if(D)return`
35
-
36
- Check the render method of \``+D+"`."}return""}function Gn(D){if(D!==void 0){var V=D.fileName.replace(/^.*[\\\/]/,""),ce=D.lineNumber;return`
37
-
38
- Check your code at `+V+":"+ce+"."}return""}function gs(D){return D!=null?Gn(D.__source):""}var yi={};function ms(D){var V=ku();if(!V){var ce=typeof D=="string"?D:D.displayName||D.name;ce&&(V=`
39
-
40
- Check the top-level render call using <`+ce+">.")}return V}function Ur(D,V){if(!(!D._store||D._store.validated||D.key!=null)){D._store.validated=!0;var ce=ms(V);if(!yi[ce]){yi[ce]=!0;var ve="";D&&D._owner&&D._owner!==Z.current&&(ve=" It was passed a child from "+qr(D._owner.type)+"."),vs(D),ge('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ce,ve),vs(null)}}}function _r(D,V){if(typeof D=="object"){if(Yt(D))for(var ce=0;ce<D.length;ce++){var ve=D[ce];Mr(ve)&&Ur(ve,V)}else if(Mr(D))D._store&&(D._store.validated=!0);else if(D){var Ie=B(D);if(typeof Ie=="function"&&Ie!==D.entries)for(var vt=Ie.call(D),je;!(je=vt.next()).done;)Mr(je.value)&&Ur(je.value,V)}}}function Oo(D){{var V=D.type;if(V==null||typeof V=="string")return;var ce;if(typeof V=="function")ce=V.propTypes;else if(typeof V=="object"&&(V.$$typeof===b||V.$$typeof===H))ce=V.propTypes;else return;if(ce){var ve=qr(V);Nc(ce,D.props,"prop",ve,D)}else if(V.PropTypes!==void 0&&!Dt){Dt=!0;var Ie=qr(V);ge("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ie||"Unknown")}typeof V.getDefaultProps=="function"&&!V.getDefaultProps.isReactClassApproved&&ge("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function On(D){{for(var V=Object.keys(D.props),ce=0;ce<V.length;ce++){var ve=V[ce];if(ve!=="children"&&ve!=="key"){vs(D),ge("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ve),vs(null);break}}D.ref!==null&&(vs(D),ge("Invalid attribute `ref` supplied to `React.Fragment`."),vs(null))}}function xi(D,V,ce){var ve=Re(D);if(!ve){var Ie="";(D===void 0||typeof D=="object"&&D!==null&&Object.keys(D).length===0)&&(Ie+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var vt=gs(V);vt?Ie+=vt:Ie+=ku();var je;D===null?je="null":Yt(D)?je="array":D!==void 0&&D.$$typeof===l?(je="<"+(qr(D.type)||"Unknown")+" />",Ie=" Did you accidentally export a JSX literal instead of a component?"):je=typeof D,ge("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",je,Ie)}var Et=_t.apply(this,arguments);if(Et==null)return Et;if(ve)for(var Lt=2;Lt<arguments.length;Lt++)_r(arguments[Lt],D);return D===p?On(Et):Oo(Et),Et}var Sa=!1;function Dl(D){var V=xi.bind(null,D);return V.type=D,Sa||(Sa=!0,$e("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(V,"type",{enumerable:!1,get:function(){return $e("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:D}),D}}),V}function Bc(D,V,ce){for(var ve=Cr.apply(this,arguments),Ie=2;Ie<arguments.length;Ie++)_r(arguments[Ie],ve.type);return Oo(ve),ve}function Mc(D,V){var ce=q.transition;q.transition={};var ve=q.transition;q.transition._updatedFibers=new Set;try{D()}finally{if(q.transition=ce,ce===null&&ve._updatedFibers){var Ie=ve._updatedFibers.size;Ie>10&&$e("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),ve._updatedFibers.clear()}}}var No=!1,Tl=null;function v0(D){if(Tl===null)try{var V=("require"+Math.random()).slice(0,7),ce=o&&o[V];Tl=ce.call(o,"timers").setImmediate}catch{Tl=function(Ie){No===!1&&(No=!0,typeof MessageChannel>"u"&&ge("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var vt=new MessageChannel;vt.port1.onmessage=Ie,vt.port2.postMessage(void 0)}}return Tl(D)}var Ca=0,Ga=!1;function ys(D){{var V=Ca;Ca++,K.current===null&&(K.current=[]);var ce=K.isBatchingLegacy,ve;try{if(K.isBatchingLegacy=!0,ve=D(),!ce&&K.didScheduleLegacyUpdate){var Ie=K.current;Ie!==null&&(K.didScheduleLegacyUpdate=!1,Bo(Ie))}}catch(Mt){throw wa(V),Mt}finally{K.isBatchingLegacy=ce}if(ve!==null&&typeof ve=="object"&&typeof ve.then=="function"){var vt=ve,je=!1,Et={then:function(Mt,Tr){je=!0,vt.then(function(Xr){wa(V),Ca===0?Fu(Xr,Mt,Tr):Mt(Xr)},function(Xr){wa(V),Tr(Xr)})}};return!Ga&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){je||(Ga=!0,ge("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),Et}else{var Lt=ve;if(wa(V),Ca===0){var Jt=K.current;Jt!==null&&(Bo(Jt),K.current=null);var Ir={then:function(Mt,Tr){K.current===null?(K.current=[],Fu(Lt,Mt,Tr)):Mt(Lt)}};return Ir}else{var Dr={then:function(Mt,Tr){Mt(Lt)}};return Dr}}}}function wa(D){D!==Ca-1&&ge("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),Ca=D}function Fu(D,V,ce){{var ve=K.current;if(ve!==null)try{Bo(ve),v0(function(){ve.length===0?(K.current=null,V(D)):Fu(D,V,ce)})}catch(Ie){ce(Ie)}else V(D)}}var Ou=!1;function Bo(D){if(!Ou){Ou=!0;var V=0;try{for(;V<D.length;V++){var ce=D[V];do ce=ce(!0);while(ce!==null)}D.length=0}catch(ve){throw D=D.slice(V+1),ve}finally{Ou=!1}}}var Rl=xi,Nu=Bc,Bu=Dl,Ka={map:ja,forEach:cs,count:qs,toArray:fs,only:ds};r.Children=Ka,r.Component=le,r.Fragment=p,r.Profiler=C,r.PureComponent=Te,r.StrictMode=v,r.Suspense=T,r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=be,r.act=ys,r.cloneElement=Nu,r.createContext=hs,r.createElement=Rl,r.createFactory=Bu,r.createRef=Sr,r.forwardRef=ps,r.isValidElement=Mr,r.lazy=Ea,r.memo=ze,r.startTransition=Mc,r.unstable_act=ys,r.useCallback=Wn,r.useContext=Ft,r.useDebugValue=Ot,r.useDeferredValue=Ya,r.useEffect=ln,r.useId=wl,r.useImperativeHandle=qa,r.useInsertionEffect=Hr,r.useLayoutEffect=Lr,r.useMemo=za,r.useReducer=Pt,r.useRef=Ht,r.useState=Tt,r.useSyncExternalStore=bl,r.useTransition=Bt,r.version=i,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()}(Wh,Wh.exports)),Wh.exports}process.env.NODE_ENV==="production"?qy.exports=jT():qy.exports=zT();var qt=qy.exports;const qT=$C(qt);var Yy={exports:{}},va={},xv={exports:{}},Vy={};/**
41
- * @license React
42
- * scheduler.production.min.js
43
- *
44
- * Copyright (c) Facebook, Inc. and its affiliates.
45
- *
46
- * This source code is licensed under the MIT license found in the
47
- * LICENSE file in the root directory of this source tree.
48
- */var UC;function YT(){return UC||(UC=1,function(o){function r(Ee,He){var De=Ee.length;Ee.push(He);e:for(;0<De;){var $=De-1>>>1,G=Ee[$];if(0<f(G,He))Ee[$]=He,Ee[De]=G,De=$;else break e}}function i(Ee){return Ee.length===0?null:Ee[0]}function l(Ee){if(Ee.length===0)return null;var He=Ee[0],De=Ee.pop();if(De!==He){Ee[0]=De;e:for(var $=0,G=Ee.length,he=G>>>1;$<he;){var le=2*($+1)-1,tt=Ee[le],Ke=le+1,ct=Ee[Ke];if(0>f(tt,De))Ke<G&&0>f(ct,tt)?(Ee[$]=ct,Ee[Ke]=De,$=Ke):(Ee[$]=tt,Ee[le]=De,$=le);else if(Ke<G&&0>f(ct,De))Ee[$]=ct,Ee[Ke]=De,$=Ke;else break e}}return He}function f(Ee,He){var De=Ee.sortIndex-He.sortIndex;return De!==0?De:Ee.id-He.id}if(typeof performance=="object"&&typeof performance.now=="function"){var p=performance;o.unstable_now=function(){return p.now()}}else{var v=Date,C=v.now();o.unstable_now=function(){return v.now()-C}}var w=[],S=[],b=1,T=null,A=3,H=!1,P=!1,j=!1,z=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function U(Ee){for(var He=i(S);He!==null;){if(He.callback===null)l(S);else if(He.startTime<=Ee)l(S),He.sortIndex=He.expirationTime,r(w,He);else break;He=i(S)}}function q(Ee){if(j=!1,U(Ee),!P)if(i(w)!==null)P=!0,$e(K);else{var He=i(S);He!==null&&ge(q,He.startTime-Ee)}}function K(Ee,He){P=!1,j&&(j=!1,N(R),R=-1),H=!0;var De=A;try{for(U(He),T=i(w);T!==null&&(!(T.expirationTime>He)||Ee&&!F());){var $=T.callback;if(typeof $=="function"){T.callback=null,A=T.priorityLevel;var G=$(T.expirationTime<=He);He=o.unstable_now(),typeof G=="function"?T.callback=G:T===i(w)&&l(w),U(He)}else l(w);T=i(w)}if(T!==null)var he=!0;else{var le=i(S);le!==null&&ge(q,le.startTime-He),he=!1}return he}finally{T=null,A=De,H=!1}}var Z=!1,ee=null,R=-1,Se=5,X=-1;function F(){return!(o.unstable_now()-X<Se)}function L(){if(ee!==null){var Ee=o.unstable_now();X=Ee;var He=!0;try{He=ee(!0,Ee)}finally{He?M():(Z=!1,ee=null)}}else Z=!1}var M;if(typeof B=="function")M=function(){B(L)};else if(typeof MessageChannel<"u"){var _e=new MessageChannel,be=_e.port2;_e.port1.onmessage=L,M=function(){be.postMessage(null)}}else M=function(){z(L,0)};function $e(Ee){ee=Ee,Z||(Z=!0,M())}function ge(Ee,He){R=z(function(){Ee(o.unstable_now())},He)}o.unstable_IdlePriority=5,o.unstable_ImmediatePriority=1,o.unstable_LowPriority=4,o.unstable_NormalPriority=3,o.unstable_Profiling=null,o.unstable_UserBlockingPriority=2,o.unstable_cancelCallback=function(Ee){Ee.callback=null},o.unstable_continueExecution=function(){P||H||(P=!0,$e(K))},o.unstable_forceFrameRate=function(Ee){0>Ee||125<Ee?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Se=0<Ee?Math.floor(1e3/Ee):5},o.unstable_getCurrentPriorityLevel=function(){return A},o.unstable_getFirstCallbackNode=function(){return i(w)},o.unstable_next=function(Ee){switch(A){case 1:case 2:case 3:var He=3;break;default:He=A}var De=A;A=He;try{return Ee()}finally{A=De}},o.unstable_pauseExecution=function(){},o.unstable_requestPaint=function(){},o.unstable_runWithPriority=function(Ee,He){switch(Ee){case 1:case 2:case 3:case 4:case 5:break;default:Ee=3}var De=A;A=Ee;try{return He()}finally{A=De}},o.unstable_scheduleCallback=function(Ee,He,De){var $=o.unstable_now();switch(typeof De=="object"&&De!==null?(De=De.delay,De=typeof De=="number"&&0<De?$+De:$):De=$,Ee){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=De+G,Ee={id:b++,callback:He,priorityLevel:Ee,startTime:De,expirationTime:G,sortIndex:-1},De>$?(Ee.sortIndex=De,r(S,Ee),i(w)===null&&Ee===i(S)&&(j?(N(R),R=-1):j=!0,ge(q,De-$))):(Ee.sortIndex=G,r(w,Ee),P||H||(P=!0,$e(K))),Ee},o.unstable_shouldYield=F,o.unstable_wrapCallback=function(Ee){var He=A;return function(){var De=A;A=He;try{return Ee.apply(this,arguments)}finally{A=De}}}}(Vy)),Vy}var Wy={};/**
49
- * @license React
50
- * scheduler.development.js
51
- *
52
- * Copyright (c) Facebook, Inc. and its affiliates.
53
- *
54
- * This source code is licensed under the MIT license found in the
55
- * LICENSE file in the root directory of this source tree.
56
- */var jC;function VT(){return jC||(jC=1,function(o){process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var r=!1,i=5;function l(Pe,it){var _t=Pe.length;Pe.push(it),v(Pe,it,_t)}function f(Pe){return Pe.length===0?null:Pe[0]}function p(Pe){if(Pe.length===0)return null;var it=Pe[0],_t=Pe.pop();return _t!==it&&(Pe[0]=_t,C(Pe,_t,0)),it}function v(Pe,it,_t){for(var rr=_t;rr>0;){var Cr=rr-1>>>1,Mr=Pe[Cr];if(w(Mr,it)>0)Pe[Cr]=it,Pe[rr]=Mr,rr=Cr;else return}}function C(Pe,it,_t){for(var rr=_t,Cr=Pe.length,Mr=Cr>>>1;rr<Mr;){var Or=(rr+1)*2-1,gn=Pe[Or],wr=Or+1,mr=Pe[wr];if(w(gn,it)<0)wr<Cr&&w(mr,gn)<0?(Pe[rr]=mr,Pe[wr]=it,rr=wr):(Pe[rr]=gn,Pe[Or]=it,rr=Or);else if(wr<Cr&&w(mr,it)<0)Pe[rr]=mr,Pe[wr]=it,rr=wr;else return}}function w(Pe,it){var _t=Pe.sortIndex-it.sortIndex;return _t!==0?_t:Pe.id-it.id}var S=1,b=2,T=3,A=4,H=5;function P(Pe,it){}var j=typeof performance=="object"&&typeof performance.now=="function";if(j){var z=performance;o.unstable_now=function(){return z.now()}}else{var N=Date,B=N.now();o.unstable_now=function(){return N.now()-B}}var U=1073741823,q=-1,K=250,Z=5e3,ee=1e4,R=U,Se=[],X=[],F=1,L=null,M=T,_e=!1,be=!1,$e=!1,ge=typeof setTimeout=="function"?setTimeout:null,Ee=typeof clearTimeout=="function"?clearTimeout:null,He=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function De(Pe){for(var it=f(X);it!==null;){if(it.callback===null)p(X);else if(it.startTime<=Pe)p(X),it.sortIndex=it.expirationTime,l(Se,it);else return;it=f(X)}}function $(Pe){if($e=!1,De(Pe),!be)if(f(Se)!==null)be=!0,Kr(G);else{var it=f(X);it!==null&&Qr($,it.startTime-Pe)}}function G(Pe,it){be=!1,$e&&($e=!1,An()),_e=!0;var _t=M;try{var rr;if(!r)return he(Pe,it)}finally{L=null,M=_t,_e=!1}}function he(Pe,it){var _t=it;for(De(_t),L=f(Se);L!==null&&!(L.expirationTime>_t&&(!Pe||Rn()));){var rr=L.callback;if(typeof rr=="function"){L.callback=null,M=L.priorityLevel;var Cr=L.expirationTime<=_t,Mr=rr(Cr);_t=o.unstable_now(),typeof Mr=="function"?L.callback=Mr:L===f(Se)&&p(Se),De(_t)}else p(Se);L=f(Se)}if(L!==null)return!0;var Or=f(X);return Or!==null&&Qr($,Or.startTime-_t),!1}function le(Pe,it){switch(Pe){case S:case b:case T:case A:case H:break;default:Pe=T}var _t=M;M=Pe;try{return it()}finally{M=_t}}function tt(Pe){var it;switch(M){case S:case b:case T:it=T;break;default:it=M;break}var _t=M;M=it;try{return Pe()}finally{M=_t}}function Ke(Pe){var it=M;return function(){var _t=M;M=it;try{return Pe.apply(this,arguments)}finally{M=_t}}}function ct(Pe,it,_t){var rr=o.unstable_now(),Cr;if(typeof _t=="object"&&_t!==null){var Mr=_t.delay;typeof Mr=="number"&&Mr>0?Cr=rr+Mr:Cr=rr}else Cr=rr;var Or;switch(Pe){case S:Or=q;break;case b:Or=K;break;case H:Or=R;break;case A:Or=ee;break;case T:default:Or=Z;break}var gn=Cr+Or,wr={id:F++,callback:it,priorityLevel:Pe,startTime:Cr,expirationTime:gn,sortIndex:-1};return Cr>rr?(wr.sortIndex=Cr,l(X,wr),f(Se)===null&&wr===f(X)&&($e?An():$e=!0,Qr($,Cr-rr))):(wr.sortIndex=gn,l(Se,wr),!be&&!_e&&(be=!0,Kr(G))),wr}function Ce(){}function Te(){!be&&!_e&&(be=!0,Kr(G))}function xt(){return f(Se)}function Sr(Pe){Pe.callback=null}function zr(){return M}var Yt=!1,Xt=null,Fr=-1,br=i,nn=-1;function Rn(){var Pe=o.unstable_now()-nn;return!(Pe<br)}function vn(){}function qr(Pe){if(Pe<0||Pe>125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");return}Pe>0?br=Math.floor(1e3/Pe):br=i}var tr=function(){if(Xt!==null){var Pe=o.unstable_now();nn=Pe;var it=!0,_t=!0;try{_t=Xt(it,Pe)}finally{_t?ar():(Yt=!1,Xt=null)}}else Yt=!1},ar;if(typeof He=="function")ar=function(){He(tr)};else if(typeof MessageChannel<"u"){var Pr=new MessageChannel,ci=Pr.port2;Pr.port1.onmessage=tr,ar=function(){ci.postMessage(null)}}else ar=function(){ge(tr,0)};function Kr(Pe){Xt=Pe,Yt||(Yt=!0,ar())}function Qr(Pe,it){Fr=ge(function(){Pe(o.unstable_now())},it)}function An(){Ee(Fr),Fr=-1}var ta=vn,ra=null;o.unstable_IdlePriority=H,o.unstable_ImmediatePriority=S,o.unstable_LowPriority=A,o.unstable_NormalPriority=T,o.unstable_Profiling=ra,o.unstable_UserBlockingPriority=b,o.unstable_cancelCallback=Sr,o.unstable_continueExecution=Te,o.unstable_forceFrameRate=qr,o.unstable_getCurrentPriorityLevel=zr,o.unstable_getFirstCallbackNode=xt,o.unstable_next=tt,o.unstable_pauseExecution=Ce,o.unstable_requestPaint=ta,o.unstable_runWithPriority=le,o.unstable_scheduleCallback=ct,o.unstable_shouldYield=Rn,o.unstable_wrapCallback=Ke,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()}(Wy)),Wy}var zC;function qC(){return zC||(zC=1,process.env.NODE_ENV==="production"?xv.exports=YT():xv.exports=VT()),xv.exports}/**
57
- * @license React
58
- * react-dom.production.min.js
59
- *
60
- * Copyright (c) Facebook, Inc. and its affiliates.
61
- *
62
- * This source code is licensed under the MIT license found in the
63
- * LICENSE file in the root directory of this source tree.
64
- */var YC;function WT(){if(YC)return va;YC=1;var o=qt,r=qC();function i(n){for(var a="https://reactjs.org/docs/error-decoder.html?invariant="+n,c=1;c<arguments.length;c++)a+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+n+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var l=new Set,f={};function p(n,a){v(n,a),v(n+"Capture",a)}function v(n,a){for(f[n]=a,n=0;n<a.length;n++)l.add(a[n])}var C=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),w=Object.prototype.hasOwnProperty,S=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,b={},T={};function A(n){return w.call(T,n)?!0:w.call(b,n)?!1:S.test(n)?T[n]=!0:(b[n]=!0,!1)}function H(n,a,c,h){if(c!==null&&c.type===0)return!1;switch(typeof a){case"function":case"symbol":return!0;case"boolean":return h?!1:c!==null?!c.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function P(n,a,c,h){if(a===null||typeof a>"u"||H(n,a,c,h))return!0;if(h)return!1;if(c!==null)switch(c.type){case 3:return!a;case 4:return a===!1;case 5:return isNaN(a);case 6:return isNaN(a)||1>a}return!1}function j(n,a,c,h,m,x,k){this.acceptsBooleans=a===2||a===3||a===4,this.attributeName=h,this.attributeNamespace=m,this.mustUseProperty=c,this.propertyName=n,this.type=a,this.sanitizeURL=x,this.removeEmptyString=k}var z={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){z[n]=new j(n,0,!1,n,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var a=n[0];z[a]=new j(a,1,!1,n[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(n){z[n]=new j(n,2,!1,n.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){z[n]=new j(n,2,!1,n,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(n){z[n]=new j(n,3,!1,n.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(n){z[n]=new j(n,3,!0,n,null,!1,!1)}),["capture","download"].forEach(function(n){z[n]=new j(n,4,!1,n,null,!1,!1)}),["cols","rows","size","span"].forEach(function(n){z[n]=new j(n,6,!1,n,null,!1,!1)}),["rowSpan","start"].forEach(function(n){z[n]=new j(n,5,!1,n.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function B(n){return n[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(n){var a=n.replace(N,B);z[a]=new j(a,1,!1,n,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var a=n.replace(N,B);z[a]=new j(a,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(n){var a=n.replace(N,B);z[a]=new j(a,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(n){z[n]=new j(n,1,!1,n.toLowerCase(),null,!1,!1)}),z.xlinkHref=new j("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(n){z[n]=new j(n,1,!1,n.toLowerCase(),null,!0,!0)});function U(n,a,c,h){var m=z.hasOwnProperty(a)?z[a]:null;(m!==null?m.type!==0:h||!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(P(a,c,m,h)&&(c=null),h||m===null?A(a)&&(c===null?n.removeAttribute(a):n.setAttribute(a,""+c)):m.mustUseProperty?n[m.propertyName]=c===null?m.type===3?!1:"":c:(a=m.attributeName,h=m.attributeNamespace,c===null?n.removeAttribute(a):(m=m.type,c=m===3||m===4&&c===!0?"":""+c,h?n.setAttributeNS(h,a,c):n.setAttribute(a,c))))}var q=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,K=Symbol.for("react.element"),Z=Symbol.for("react.portal"),ee=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),Se=Symbol.for("react.profiler"),X=Symbol.for("react.provider"),F=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),_e=Symbol.for("react.suspense_list"),be=Symbol.for("react.memo"),$e=Symbol.for("react.lazy"),ge=Symbol.for("react.offscreen"),Ee=Symbol.iterator;function He(n){return n===null||typeof n!="object"?null:(n=Ee&&n[Ee]||n["@@iterator"],typeof n=="function"?n:null)}var De=Object.assign,$;function G(n){if($===void 0)try{throw Error()}catch(c){var a=c.stack.trim().match(/\n( *(at )?)/);$=a&&a[1]||""}return`
65
- `+$+n}var he=!1;function le(n,a){if(!n||he)return"";he=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(a)if(a=function(){throw Error()},Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(a,[])}catch(fe){var h=fe}Reflect.construct(n,[],a)}else{try{a.call()}catch(fe){h=fe}n.call(a.prototype)}else{try{throw Error()}catch(fe){h=fe}n()}}catch(fe){if(fe&&h&&typeof fe.stack=="string"){for(var m=fe.stack.split(`
66
- `),x=h.stack.split(`
67
- `),k=m.length-1,Y=x.length-1;1<=k&&0<=Y&&m[k]!==x[Y];)Y--;for(;1<=k&&0<=Y;k--,Y--)if(m[k]!==x[Y]){if(k!==1||Y!==1)do if(k--,Y--,0>Y||m[k]!==x[Y]){var Q=`
68
- `+m[k].replace(" at new "," at ");return n.displayName&&Q.includes("<anonymous>")&&(Q=Q.replace("<anonymous>",n.displayName)),Q}while(1<=k&&0<=Y);break}}}finally{he=!1,Error.prepareStackTrace=c}return(n=n?n.displayName||n.name:"")?G(n):""}function tt(n){switch(n.tag){case 5:return G(n.type);case 16:return G("Lazy");case 13:return G("Suspense");case 19:return G("SuspenseList");case 0:case 2:case 15:return n=le(n.type,!1),n;case 11:return n=le(n.type.render,!1),n;case 1:return n=le(n.type,!0),n;default:return""}}function Ke(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case ee:return"Fragment";case Z:return"Portal";case Se:return"Profiler";case R:return"StrictMode";case M:return"Suspense";case _e:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case F:return(n.displayName||"Context")+".Consumer";case X:return(n._context.displayName||"Context")+".Provider";case L:var a=n.render;return n=n.displayName,n||(n=a.displayName||a.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case be:return a=n.displayName||null,a!==null?a:Ke(n.type)||"Memo";case $e:a=n._payload,n=n._init;try{return Ke(n(a))}catch{}}return null}function ct(n){var a=n.type;switch(n.tag){case 24:return"Cache";case 9:return(a.displayName||"Context")+".Consumer";case 10:return(a._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=a.render,n=n.displayName||n.name||"",a.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return a;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ke(a);case 8:return a===R?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a}return null}function Ce(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Te(n){var a=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function xt(n){var a=Te(n)?"checked":"value",c=Object.getOwnPropertyDescriptor(n.constructor.prototype,a),h=""+n[a];if(!n.hasOwnProperty(a)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var m=c.get,x=c.set;return Object.defineProperty(n,a,{configurable:!0,get:function(){return m.call(this)},set:function(k){h=""+k,x.call(this,k)}}),Object.defineProperty(n,a,{enumerable:c.enumerable}),{getValue:function(){return h},setValue:function(k){h=""+k},stopTracking:function(){n._valueTracker=null,delete n[a]}}}}function Sr(n){n._valueTracker||(n._valueTracker=xt(n))}function zr(n){if(!n)return!1;var a=n._valueTracker;if(!a)return!0;var c=a.getValue(),h="";return n&&(h=Te(n)?n.checked?"true":"false":n.value),n=h,n!==c?(a.setValue(n),!0):!1}function Yt(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function Xt(n,a){var c=a.checked;return De({},a,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c??n._wrapperState.initialChecked})}function Fr(n,a){var c=a.defaultValue==null?"":a.defaultValue,h=a.checked!=null?a.checked:a.defaultChecked;c=Ce(a.value!=null?a.value:c),n._wrapperState={initialChecked:h,initialValue:c,controlled:a.type==="checkbox"||a.type==="radio"?a.checked!=null:a.value!=null}}function br(n,a){a=a.checked,a!=null&&U(n,"checked",a,!1)}function nn(n,a){br(n,a);var c=Ce(a.value),h=a.type;if(c!=null)h==="number"?(c===0&&n.value===""||n.value!=c)&&(n.value=""+c):n.value!==""+c&&(n.value=""+c);else if(h==="submit"||h==="reset"){n.removeAttribute("value");return}a.hasOwnProperty("value")?vn(n,a.type,c):a.hasOwnProperty("defaultValue")&&vn(n,a.type,Ce(a.defaultValue)),a.checked==null&&a.defaultChecked!=null&&(n.defaultChecked=!!a.defaultChecked)}function Rn(n,a,c){if(a.hasOwnProperty("value")||a.hasOwnProperty("defaultValue")){var h=a.type;if(!(h!=="submit"&&h!=="reset"||a.value!==void 0&&a.value!==null))return;a=""+n._wrapperState.initialValue,c||a===n.value||(n.value=a),n.defaultValue=a}c=n.name,c!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,c!==""&&(n.name=c)}function vn(n,a,c){(a!=="number"||Yt(n.ownerDocument)!==n)&&(c==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+c&&(n.defaultValue=""+c))}var qr=Array.isArray;function tr(n,a,c,h){if(n=n.options,a){a={};for(var m=0;m<c.length;m++)a["$"+c[m]]=!0;for(c=0;c<n.length;c++)m=a.hasOwnProperty("$"+n[c].value),n[c].selected!==m&&(n[c].selected=m),m&&h&&(n[c].defaultSelected=!0)}else{for(c=""+Ce(c),a=null,m=0;m<n.length;m++){if(n[m].value===c){n[m].selected=!0,h&&(n[m].defaultSelected=!0);return}a!==null||n[m].disabled||(a=n[m])}a!==null&&(a.selected=!0)}}function ar(n,a){if(a.dangerouslySetInnerHTML!=null)throw Error(i(91));return De({},a,{value:void 0,defaultValue:void 0,children:""+n._wrapperState.initialValue})}function Pr(n,a){var c=a.value;if(c==null){if(c=a.children,a=a.defaultValue,c!=null){if(a!=null)throw Error(i(92));if(qr(c)){if(1<c.length)throw Error(i(93));c=c[0]}a=c}a==null&&(a=""),c=a}n._wrapperState={initialValue:Ce(c)}}function ci(n,a){var c=Ce(a.value),h=Ce(a.defaultValue);c!=null&&(c=""+c,c!==n.value&&(n.value=c),a.defaultValue==null&&n.defaultValue!==c&&(n.defaultValue=c)),h!=null&&(n.defaultValue=""+h)}function Kr(n){var a=n.textContent;a===n._wrapperState.initialValue&&a!==""&&a!==null&&(n.value=a)}function Qr(n){switch(n){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function An(n,a){return n==null||n==="http://www.w3.org/1999/xhtml"?Qr(a):n==="http://www.w3.org/2000/svg"&&a==="foreignObject"?"http://www.w3.org/1999/xhtml":n}var ta,ra=function(n){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(a,c,h,m){MSApp.execUnsafeLocalFunction(function(){return n(a,c,h,m)})}:n}(function(n,a){if(n.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in n)n.innerHTML=a;else{for(ta=ta||document.createElement("div"),ta.innerHTML="<svg>"+a.valueOf().toString()+"</svg>",a=ta.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;a.firstChild;)n.appendChild(a.firstChild)}});function Pe(n,a){if(a){var c=n.firstChild;if(c&&c===n.lastChild&&c.nodeType===3){c.nodeValue=a;return}}n.textContent=a}var it={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},_t=["Webkit","ms","Moz","O"];Object.keys(it).forEach(function(n){_t.forEach(function(a){a=a+n.charAt(0).toUpperCase()+n.substring(1),it[a]=it[n]})});function rr(n,a,c){return a==null||typeof a=="boolean"||a===""?"":c||typeof a!="number"||a===0||it.hasOwnProperty(n)&&it[n]?(""+a).trim():a+"px"}function Cr(n,a){n=n.style;for(var c in a)if(a.hasOwnProperty(c)){var h=c.indexOf("--")===0,m=rr(c,a[c],h);c==="float"&&(c="cssFloat"),h?n.setProperty(c,m):n[c]=m}}var Mr=De({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Or(n,a){if(a){if(Mr[n]&&(a.children!=null||a.dangerouslySetInnerHTML!=null))throw Error(i(137,n));if(a.dangerouslySetInnerHTML!=null){if(a.children!=null)throw Error(i(60));if(typeof a.dangerouslySetInnerHTML!="object"||!("__html"in a.dangerouslySetInnerHTML))throw Error(i(61))}if(a.style!=null&&typeof a.style!="object")throw Error(i(62))}}function gn(n,a){if(n.indexOf("-")===-1)return typeof a.is=="string";switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var wr=null;function mr(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var dr=null,gi=null,kn=null;function Hi(n){if(n=ht(n)){if(typeof dr!="function")throw Error(i(280));var a=n.stateNode;a&&(a=Zr(a),dr(n.stateNode,n.type,a))}}function ja(n){gi?kn?kn.push(n):kn=[n]:gi=n}function qs(){if(gi){var n=gi,a=kn;if(kn=gi=null,Hi(n),a)for(n=0;n<a.length;n++)Hi(a[n])}}function cs(n,a){return n(a)}function fs(){}var ds=!1;function hs(n,a,c){if(ds)return n(a,c);ds=!0;try{return cs(n,a,c)}finally{ds=!1,(gi!==null||kn!==null)&&(fs(),qs())}}function Vn(n,a){var c=n.stateNode;if(c===null)return null;var h=Zr(c);if(h===null)return null;c=h[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(n=n.type,h=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!h;break e;default:n=!1}if(n)return null;if(c&&typeof c!="function")throw Error(i(231,a,typeof c));return c}var $n=!1;if(C)try{var hr={};Object.defineProperty(hr,"passive",{get:function(){$n=!0}}),window.addEventListener("test",hr,hr),window.removeEventListener("test",hr,hr)}catch{$n=!1}function Fn(n,a,c,h,m,x,k,Y,Q){var fe=Array.prototype.slice.call(arguments,3);try{a.apply(c,fe)}catch(Fe){this.onError(Fe)}}var Ii=!1,Ea=null,ps=!1,W=null,Re={onError:function(n){Ii=!0,Ea=n}};function ze(n,a,c,h,m,x,k,Y,Q){Ii=!1,Ea=null,Fn.apply(Re,arguments)}function rt(n,a,c,h,m,x,k,Y,Q){if(ze.apply(this,arguments),Ii){if(Ii){var fe=Ea;Ii=!1,Ea=null}else throw Error(i(198));ps||(ps=!0,W=fe)}}function Ft(n){var a=n,c=n;if(n.alternate)for(;a.return;)a=a.return;else{n=a;do a=n,a.flags&4098&&(c=a.return),n=a.return;while(n)}return a.tag===3?c:null}function Tt(n){if(n.tag===13){var a=n.memoizedState;if(a===null&&(n=n.alternate,n!==null&&(a=n.memoizedState)),a!==null)return a.dehydrated}return null}function Pt(n){if(Ft(n)!==n)throw Error(i(188))}function Ht(n){var a=n.alternate;if(!a){if(a=Ft(n),a===null)throw Error(i(188));return a!==n?null:n}for(var c=n,h=a;;){var m=c.return;if(m===null)break;var x=m.alternate;if(x===null){if(h=m.return,h!==null){c=h;continue}break}if(m.child===x.child){for(x=m.child;x;){if(x===c)return Pt(m),n;if(x===h)return Pt(m),a;x=x.sibling}throw Error(i(188))}if(c.return!==h.return)c=m,h=x;else{for(var k=!1,Y=m.child;Y;){if(Y===c){k=!0,c=m,h=x;break}if(Y===h){k=!0,h=m,c=x;break}Y=Y.sibling}if(!k){for(Y=x.child;Y;){if(Y===c){k=!0,c=x,h=m;break}if(Y===h){k=!0,h=x,c=m;break}Y=Y.sibling}if(!k)throw Error(i(189))}}if(c.alternate!==h)throw Error(i(190))}if(c.tag!==3)throw Error(i(188));return c.stateNode.current===c?n:a}function ln(n){return n=Ht(n),n!==null?Hr(n):null}function Hr(n){if(n.tag===5||n.tag===6)return n;for(n=n.child;n!==null;){var a=Hr(n);if(a!==null)return a;n=n.sibling}return null}var Lr=r.unstable_scheduleCallback,Wn=r.unstable_cancelCallback,za=r.unstable_shouldYield,qa=r.unstable_requestPaint,Ot=r.unstable_now,Bt=r.unstable_getCurrentPriorityLevel,Ya=r.unstable_ImmediatePriority,wl=r.unstable_UserBlockingPriority,bl=r.unstable_NormalPriority,Ro=r.unstable_LowPriority,bu=r.unstable_IdlePriority,Ao=null,$i=null;function Oc(n){if($i&&typeof $i.onCommitFiberRoot=="function")try{$i.onCommitFiberRoot(Ao,n,void 0,(n.current.flags&128)===128)}catch{}}var mi=Math.clz32?Math.clz32:_u,ld=Math.log,ud=Math.LN2;function _u(n){return n>>>=0,n===0?32:31-(ld(n)/ud|0)|0}var ko=64,na=4194304;function Va(n){switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function Wa(n,a){var c=n.pendingLanes;if(c===0)return 0;var h=0,m=n.suspendedLanes,x=n.pingedLanes,k=c&268435455;if(k!==0){var Y=k&~m;Y!==0?h=Va(Y):(x&=k,x!==0&&(h=Va(x)))}else k=c&~m,k!==0?h=Va(k):x!==0&&(h=Va(x));if(h===0)return 0;if(a!==0&&a!==h&&!(a&m)&&(m=h&-h,x=a&-a,m>=x||m===16&&(x&4194240)!==0))return a;if(h&4&&(h|=c&16),a=n.entangledLanes,a!==0)for(n=n.entanglements,a&=h;0<a;)c=31-mi(a),m=1<<c,h|=n[c],a&=~m;return h}function Du(n,a){switch(n){case 1:case 2:case 4:return a+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function _l(n,a){for(var c=n.suspendedLanes,h=n.pingedLanes,m=n.expirationTimes,x=n.pendingLanes;0<x;){var k=31-mi(x),Y=1<<k,Q=m[k];Q===-1?(!(Y&c)||Y&h)&&(m[k]=Du(Y,a)):Q<=a&&(n.expiredLanes|=Y),x&=~Y}}function Fo(n){return n=n.pendingLanes&-1073741825,n!==0?n:n&1073741824?1073741824:0}function Tu(){var n=ko;return ko<<=1,!(ko&4194240)&&(ko=64),n}function Ru(n){for(var a=[],c=0;31>c;c++)a.push(n);return a}function Ys(n,a,c){n.pendingLanes|=a,a!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,a=31-mi(a),n[a]=c}function p0(n,a){var c=n.pendingLanes&~a;n.pendingLanes=a,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=a,n.mutableReadLanes&=a,n.entangledLanes&=a,a=n.entanglements;var h=n.eventTimes;for(n=n.expirationTimes;0<c;){var m=31-mi(c),x=1<<m;a[m]=0,h[m]=-1,n[m]=-1,c&=~x}}function Vs(n,a){var c=n.entangledLanes|=a;for(n=n.entanglements;c;){var h=31-mi(c),m=1<<h;m&a|n[h]&a&&(n[h]|=a),c&=~m}}var sr=0;function Au(n){return n&=-n,1<n?4<n?n&268435455?16:536870912:4:1}var Zt,Nc,vs,Dt,ku,Gn=!1,gs=[],yi=null,ms=null,Ur=null,_r=new Map,Oo=new Map,On=[],xi="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Sa(n,a){switch(n){case"focusin":case"focusout":yi=null;break;case"dragenter":case"dragleave":ms=null;break;case"mouseover":case"mouseout":Ur=null;break;case"pointerover":case"pointerout":_r.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Oo.delete(a.pointerId)}}function Dl(n,a,c,h,m,x){return n===null||n.nativeEvent!==x?(n={blockedOn:a,domEventName:c,eventSystemFlags:h,nativeEvent:x,targetContainers:[m]},a!==null&&(a=ht(a),a!==null&&Nc(a)),n):(n.eventSystemFlags|=h,a=n.targetContainers,m!==null&&a.indexOf(m)===-1&&a.push(m),n)}function Bc(n,a,c,h,m){switch(a){case"focusin":return yi=Dl(yi,n,a,c,h,m),!0;case"dragenter":return ms=Dl(ms,n,a,c,h,m),!0;case"mouseover":return Ur=Dl(Ur,n,a,c,h,m),!0;case"pointerover":var x=m.pointerId;return _r.set(x,Dl(_r.get(x)||null,n,a,c,h,m)),!0;case"gotpointercapture":return x=m.pointerId,Oo.set(x,Dl(Oo.get(x)||null,n,a,c,h,m)),!0}return!1}function Mc(n){var a=Ml(n.target);if(a!==null){var c=Ft(a);if(c!==null){if(a=c.tag,a===13){if(a=Tt(c),a!==null){n.blockedOn=a,ku(n.priority,function(){vs(c)});return}}else if(a===3&&c.stateNode.current.memoizedState.isDehydrated){n.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}n.blockedOn=null}function No(n){if(n.blockedOn!==null)return!1;for(var a=n.targetContainers;0<a.length;){var c=Nu(n.domEventName,n.eventSystemFlags,a[0],n.nativeEvent);if(c===null){c=n.nativeEvent;var h=new c.constructor(c.type,c);wr=h,c.target.dispatchEvent(h),wr=null}else return a=ht(c),a!==null&&Nc(a),n.blockedOn=c,!1;a.shift()}return!0}function Tl(n,a,c){No(n)&&c.delete(a)}function v0(){Gn=!1,yi!==null&&No(yi)&&(yi=null),ms!==null&&No(ms)&&(ms=null),Ur!==null&&No(Ur)&&(Ur=null),_r.forEach(Tl),Oo.forEach(Tl)}function Ca(n,a){n.blockedOn===a&&(n.blockedOn=null,Gn||(Gn=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,v0)))}function Ga(n){function a(m){return Ca(m,n)}if(0<gs.length){Ca(gs[0],n);for(var c=1;c<gs.length;c++){var h=gs[c];h.blockedOn===n&&(h.blockedOn=null)}}for(yi!==null&&Ca(yi,n),ms!==null&&Ca(ms,n),Ur!==null&&Ca(Ur,n),_r.forEach(a),Oo.forEach(a),c=0;c<On.length;c++)h=On[c],h.blockedOn===n&&(h.blockedOn=null);for(;0<On.length&&(c=On[0],c.blockedOn===null);)Mc(c),c.blockedOn===null&&On.shift()}var ys=q.ReactCurrentBatchConfig,wa=!0;function Fu(n,a,c,h){var m=sr,x=ys.transition;ys.transition=null;try{sr=1,Bo(n,a,c,h)}finally{sr=m,ys.transition=x}}function Ou(n,a,c,h){var m=sr,x=ys.transition;ys.transition=null;try{sr=4,Bo(n,a,c,h)}finally{sr=m,ys.transition=x}}function Bo(n,a,c,h){if(wa){var m=Nu(n,a,c,h);if(m===null)Sd(n,a,h,Rl,c),Sa(n,h);else if(Bc(m,n,a,c,h))h.stopPropagation();else if(Sa(n,h),a&4&&-1<xi.indexOf(n)){for(;m!==null;){var x=ht(m);if(x!==null&&Zt(x),x=Nu(n,a,c,h),x===null&&Sd(n,a,h,Rl,c),x===m)break;m=x}m!==null&&h.stopPropagation()}else Sd(n,a,h,null,c)}}var Rl=null;function Nu(n,a,c,h){if(Rl=null,n=mr(h),n=Ml(n),n!==null)if(a=Ft(n),a===null)n=null;else if(c=a.tag,c===13){if(n=Tt(a),n!==null)return n;n=null}else if(c===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;n=null}else a!==n&&(n=null);return Rl=n,null}function Bu(n){switch(n){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Bt()){case Ya:return 1;case wl:return 4;case bl:case Ro:return 16;case bu:return 536870912;default:return 16}default:return 16}}var Ka=null,D=null,V=null;function ce(){if(V)return V;var n,a=D,c=a.length,h,m="value"in Ka?Ka.value:Ka.textContent,x=m.length;for(n=0;n<c&&a[n]===m[n];n++);var k=c-n;for(h=1;h<=k&&a[c-h]===m[x-h];h++);return V=m.slice(n,1<h?1-h:void 0)}function ve(n){var a=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&a===13&&(n=13)):n=a,n===10&&(n=13),32<=n||n===13?n:0}function Ie(){return!0}function vt(){return!1}function je(n){function a(c,h,m,x,k){this._reactName=c,this._targetInst=m,this.type=h,this.nativeEvent=x,this.target=k,this.currentTarget=null;for(var Y in n)n.hasOwnProperty(Y)&&(c=n[Y],this[Y]=c?c(x):x[Y]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?Ie:vt,this.isPropagationStopped=vt,this}return De(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Ie)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Ie)},persist:function(){},isPersistent:Ie}),a}var Et={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Lt=je(Et),Jt=De({},Et,{view:0,detail:0}),Ir=je(Jt),Dr,Mt,Tr,Xr=De({},Jt,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:E0,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==Tr&&(Tr&&n.type==="mousemove"?(Dr=n.screenX-Tr.screenX,Mt=n.screenY-Tr.screenY):Mt=Dr=0,Tr=n),Dr)},movementY:function(n){return"movementY"in n?n.movementY:Mt}}),Mo=je(Xr),Hc=De({},Xr,{dataTransfer:0}),Ws=je(Hc),Ic=De({},Jt,{relatedTarget:0}),Al=je(Ic),g0=De({},Et,{animationName:0,elapsedTime:0,pseudoElement:0}),cd=je(g0),m0=De({},Et,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),Zv=je(m0),y0=De({},Et,{data:0}),x0=je(y0),Jv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},eg={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},C1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Gs(n){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(n):(n=C1[n])?!!a[n]:!1}function E0(){return Gs}var S0=De({},Jt,{key:function(n){if(n.key){var a=Jv[n.key]||n.key;if(a!=="Unidentified")return a}return n.type==="keypress"?(n=ve(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?eg[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:E0,charCode:function(n){return n.type==="keypress"?ve(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?ve(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),C0=je(S0),w0=De({},Xr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tg=je(w0),fd=De({},Jt,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:E0}),rg=je(fd),Pi=De({},Et,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ks=je(Pi),mn=De({},Xr,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),Qs=je(mn),b0=[9,13,27,32],Mu=C&&"CompositionEvent"in window,$c=null;C&&"documentMode"in document&&($c=document.documentMode);var Pc=C&&"TextEvent"in window&&!$c,ng=C&&(!Mu||$c&&8<$c&&11>=$c),ig=" ",dd=!1;function ag(n,a){switch(n){case"keyup":return b0.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function sg(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Hu=!1;function og(n,a){switch(n){case"compositionend":return sg(a);case"keypress":return a.which!==32?null:(dd=!0,ig);case"textInput":return n=a.data,n===ig&&dd?null:n;default:return null}}function w1(n,a){if(Hu)return n==="compositionend"||!Mu&&ag(n,a)?(n=ce(),V=D=Ka=null,Hu=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return ng&&a.locale!=="ko"?null:a.data;default:return null}}var b1={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function lg(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a==="input"?!!b1[n.type]:a==="textarea"}function _0(n,a,c,h){ja(h),a=Yc(a,"onChange"),0<a.length&&(c=new Lt("onChange","change",null,c,h),n.push({event:c,listeners:a}))}var xs=null,kl=null;function ug(n){Nl(n,0)}function Lc(n){var a=Xa(n);if(zr(a))return n}function _1(n,a){if(n==="change")return a}var cg=!1;if(C){var D0;if(C){var T0="oninput"in document;if(!T0){var fg=document.createElement("div");fg.setAttribute("oninput","return;"),T0=typeof fg.oninput=="function"}D0=T0}else D0=!1;cg=D0&&(!document.documentMode||9<document.documentMode)}function dg(){xs&&(xs.detachEvent("onpropertychange",hg),kl=xs=null)}function hg(n){if(n.propertyName==="value"&&Lc(kl)){var a=[];_0(a,kl,n,mr(n)),hs(ug,a)}}function D1(n,a,c){n==="focusin"?(dg(),xs=a,kl=c,xs.attachEvent("onpropertychange",hg)):n==="focusout"&&dg()}function pg(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Lc(kl)}function T1(n,a){if(n==="click")return Lc(a)}function vg(n,a){if(n==="input"||n==="change")return Lc(a)}function R1(n,a){return n===a&&(n!==0||1/n===1/a)||n!==n&&a!==a}var Qa=typeof Object.is=="function"?Object.is:R1;function Uc(n,a){if(Qa(n,a))return!0;if(typeof n!="object"||n===null||typeof a!="object"||a===null)return!1;var c=Object.keys(n),h=Object.keys(a);if(c.length!==h.length)return!1;for(h=0;h<c.length;h++){var m=c[h];if(!w.call(a,m)||!Qa(n[m],a[m]))return!1}return!0}function gg(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function hd(n,a){var c=gg(n);n=0;for(var h;c;){if(c.nodeType===3){if(h=n+c.textContent.length,n<=a&&h>=a)return{node:c,offset:a-n};n=h}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=gg(c)}}function Ho(n,a){return n&&a?n===a?!0:n&&n.nodeType===3?!1:a&&a.nodeType===3?Ho(n,a.parentNode):"contains"in n?n.contains(a):n.compareDocumentPosition?!!(n.compareDocumentPosition(a)&16):!1:!1}function jc(){for(var n=window,a=Yt();a instanceof n.HTMLIFrameElement;){try{var c=typeof a.contentWindow.location.href=="string"}catch{c=!1}if(c)n=a.contentWindow;else break;a=Yt(n.document)}return a}function pd(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a&&(a==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||a==="textarea"||n.contentEditable==="true")}function Iu(n){var a=jc(),c=n.focusedElem,h=n.selectionRange;if(a!==c&&c&&c.ownerDocument&&Ho(c.ownerDocument.documentElement,c)){if(h!==null&&pd(c)){if(a=h.start,n=h.end,n===void 0&&(n=a),"selectionStart"in c)c.selectionStart=a,c.selectionEnd=Math.min(n,c.value.length);else if(n=(a=c.ownerDocument||document)&&a.defaultView||window,n.getSelection){n=n.getSelection();var m=c.textContent.length,x=Math.min(h.start,m);h=h.end===void 0?x:Math.min(h.end,m),!n.extend&&x>h&&(m=h,h=x,x=m),m=hd(c,x);var k=hd(c,h);m&&k&&(n.rangeCount!==1||n.anchorNode!==m.node||n.anchorOffset!==m.offset||n.focusNode!==k.node||n.focusOffset!==k.offset)&&(a=a.createRange(),a.setStart(m.node,m.offset),n.removeAllRanges(),x>h?(n.addRange(a),n.extend(k.node,k.offset)):(a.setEnd(k.node,k.offset),n.addRange(a)))}}for(a=[],n=c;n=n.parentNode;)n.nodeType===1&&a.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<a.length;c++)n=a[c],n.element.scrollLeft=n.left,n.element.scrollTop=n.top}}var A1=C&&"documentMode"in document&&11>=document.documentMode,$u=null,R0=null,zc=null,A0=!1;function k0(n,a,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;A0||$u==null||$u!==Yt(h)||(h=$u,"selectionStart"in h&&pd(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),zc&&Uc(zc,h)||(zc=h,h=Yc(R0,"onSelect"),0<h.length&&(a=new Lt("onSelect","select",null,a,c),n.push({event:a,listeners:h}),a.target=$u)))}function vd(n,a){var c={};return c[n.toLowerCase()]=a.toLowerCase(),c["Webkit"+n]="webkit"+a,c["Moz"+n]="moz"+a,c}var Fl={animationend:vd("Animation","AnimationEnd"),animationiteration:vd("Animation","AnimationIteration"),animationstart:vd("Animation","AnimationStart"),transitionend:vd("Transition","TransitionEnd")},Kn={},F0={};C&&(F0=document.createElement("div").style,"AnimationEvent"in window||(delete Fl.animationend.animation,delete Fl.animationiteration.animation,delete Fl.animationstart.animation),"TransitionEvent"in window||delete Fl.transitionend.transition);function gd(n){if(Kn[n])return Kn[n];if(!Fl[n])return n;var a=Fl[n],c;for(c in a)if(a.hasOwnProperty(c)&&c in F0)return Kn[n]=a[c];return n}var mg=gd("animationend"),yg=gd("animationiteration"),xg=gd("animationstart"),Eg=gd("transitionend"),O0=new Map,md="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function ba(n,a){O0.set(n,a),p(a,[n])}for(var N0=0;N0<md.length;N0++){var Ol=md[N0],k1=Ol.toLowerCase(),F1=Ol[0].toUpperCase()+Ol.slice(1);ba(k1,"on"+F1)}ba(mg,"onAnimationEnd"),ba(yg,"onAnimationIteration"),ba(xg,"onAnimationStart"),ba("dblclick","onDoubleClick"),ba("focusin","onFocus"),ba("focusout","onBlur"),ba(Eg,"onTransitionEnd"),v("onMouseEnter",["mouseout","mouseover"]),v("onMouseLeave",["mouseout","mouseover"]),v("onPointerEnter",["pointerout","pointerover"]),v("onPointerLeave",["pointerout","pointerover"]),p("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),p("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),p("onBeforeInput",["compositionend","keypress","textInput","paste"]),p("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),p("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),p("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),B0=new Set("cancel close invalid load scroll toggle".split(" ").concat(qc));function yd(n,a,c){var h=n.type||"unknown-event";n.currentTarget=c,rt(h,a,void 0,n),n.currentTarget=null}function Nl(n,a){a=(a&4)!==0;for(var c=0;c<n.length;c++){var h=n[c],m=h.event;h=h.listeners;e:{var x=void 0;if(a)for(var k=h.length-1;0<=k;k--){var Y=h[k],Q=Y.instance,fe=Y.currentTarget;if(Y=Y.listener,Q!==x&&m.isPropagationStopped())break e;yd(m,Y,fe),x=Q}else for(k=0;k<h.length;k++){if(Y=h[k],Q=Y.instance,fe=Y.currentTarget,Y=Y.listener,Q!==x&&m.isPropagationStopped())break e;yd(m,Y,fe),x=Q}}}if(ps)throw n=W,ps=!1,W=null,n}function yr(n,a){var c=a[Gc];c===void 0&&(c=a[Gc]=new Set);var h=n+"__bubble";c.has(h)||(Sg(a,n,2,!1),c.add(h))}function xd(n,a,c){var h=0;a&&(h|=4),Sg(c,n,h,a)}var Ed="_reactListening"+Math.random().toString(36).slice(2);function Pu(n){if(!n[Ed]){n[Ed]=!0,l.forEach(function(c){c!=="selectionchange"&&(B0.has(c)||xd(c,!1,n),xd(c,!0,n))});var a=n.nodeType===9?n:n.ownerDocument;a===null||a[Ed]||(a[Ed]=!0,xd("selectionchange",!1,a))}}function Sg(n,a,c,h){switch(Bu(a)){case 1:var m=Fu;break;case 4:m=Ou;break;default:m=Bo}c=m.bind(null,a,c,n),m=void 0,!$n||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(m=!0),h?m!==void 0?n.addEventListener(a,c,{capture:!0,passive:m}):n.addEventListener(a,c,!0):m!==void 0?n.addEventListener(a,c,{passive:m}):n.addEventListener(a,c,!1)}function Sd(n,a,c,h,m){var x=h;if(!(a&1)&&!(a&2)&&h!==null)e:for(;;){if(h===null)return;var k=h.tag;if(k===3||k===4){var Y=h.stateNode.containerInfo;if(Y===m||Y.nodeType===8&&Y.parentNode===m)break;if(k===4)for(k=h.return;k!==null;){var Q=k.tag;if((Q===3||Q===4)&&(Q=k.stateNode.containerInfo,Q===m||Q.nodeType===8&&Q.parentNode===m))return;k=k.return}for(;Y!==null;){if(k=Ml(Y),k===null)return;if(Q=k.tag,Q===5||Q===6){h=x=k;continue e}Y=Y.parentNode}}h=h.return}hs(function(){var fe=x,Fe=mr(c),Ne=[];e:{var ke=O0.get(n);if(ke!==void 0){var Qe=Lt,st=n;switch(n){case"keypress":if(ve(c)===0)break e;case"keydown":case"keyup":Qe=C0;break;case"focusin":st="focus",Qe=Al;break;case"focusout":st="blur",Qe=Al;break;case"beforeblur":case"afterblur":Qe=Al;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Qe=Mo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Qe=Ws;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Qe=rg;break;case mg:case yg:case xg:Qe=cd;break;case Eg:Qe=Ks;break;case"scroll":Qe=Ir;break;case"wheel":Qe=Qs;break;case"copy":case"cut":case"paste":Qe=Zv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Qe=tg}var ut=(a&4)!==0,hn=!ut&&n==="scroll",ne=ut?ke!==null?ke+"Capture":null:ke;ut=[];for(var te=fe,oe;te!==null;){oe=te;var Oe=oe.stateNode;if(oe.tag===5&&Oe!==null&&(oe=Oe,ne!==null&&(Oe=Vn(te,ne),Oe!=null&&ut.push(Lu(te,Oe,oe)))),hn)break;te=te.return}0<ut.length&&(ke=new Qe(ke,st,null,c,Fe),Ne.push({event:ke,listeners:ut}))}}if(!(a&7)){e:{if(ke=n==="mouseover"||n==="pointerover",Qe=n==="mouseout"||n==="pointerout",ke&&c!==wr&&(st=c.relatedTarget||c.fromElement)&&(Ml(st)||st[Xs]))break e;if((Qe||ke)&&(ke=Fe.window===Fe?Fe:(ke=Fe.ownerDocument)?ke.defaultView||ke.parentWindow:window,Qe?(st=c.relatedTarget||c.toElement,Qe=fe,st=st?Ml(st):null,st!==null&&(hn=Ft(st),st!==hn||st.tag!==5&&st.tag!==6)&&(st=null)):(Qe=null,st=fe),Qe!==st)){if(ut=Mo,Oe="onMouseLeave",ne="onMouseEnter",te="mouse",(n==="pointerout"||n==="pointerover")&&(ut=tg,Oe="onPointerLeave",ne="onPointerEnter",te="pointer"),hn=Qe==null?ke:Xa(Qe),oe=st==null?ke:Xa(st),ke=new ut(Oe,te+"leave",Qe,c,Fe),ke.target=hn,ke.relatedTarget=oe,Oe=null,Ml(Fe)===fe&&(ut=new ut(ne,te+"enter",st,c,Fe),ut.target=oe,ut.relatedTarget=hn,Oe=ut),hn=Oe,Qe&&st)t:{for(ut=Qe,ne=st,te=0,oe=ut;oe;oe=Io(oe))te++;for(oe=0,Oe=ne;Oe;Oe=Io(Oe))oe++;for(;0<te-oe;)ut=Io(ut),te--;for(;0<oe-te;)ne=Io(ne),oe--;for(;te--;){if(ut===ne||ne!==null&&ut===ne.alternate)break t;ut=Io(ut),ne=Io(ne)}ut=null}else ut=null;Qe!==null&&Cg(Ne,ke,Qe,ut,!1),st!==null&&hn!==null&&Cg(Ne,hn,st,ut,!0)}}e:{if(ke=fe?Xa(fe):window,Qe=ke.nodeName&&ke.nodeName.toLowerCase(),Qe==="select"||Qe==="input"&&ke.type==="file")var ot=_1;else if(lg(ke))if(cg)ot=vg;else{ot=pg;var yt=D1}else(Qe=ke.nodeName)&&Qe.toLowerCase()==="input"&&(ke.type==="checkbox"||ke.type==="radio")&&(ot=T1);if(ot&&(ot=ot(n,fe))){_0(Ne,ot,c,Fe);break e}yt&&yt(n,ke,fe),n==="focusout"&&(yt=ke._wrapperState)&&yt.controlled&&ke.type==="number"&&vn(ke,"number",ke.value)}switch(yt=fe?Xa(fe):window,n){case"focusin":(lg(yt)||yt.contentEditable==="true")&&($u=yt,R0=fe,zc=null);break;case"focusout":zc=R0=$u=null;break;case"mousedown":A0=!0;break;case"contextmenu":case"mouseup":case"dragend":A0=!1,k0(Ne,c,Fe);break;case"selectionchange":if(A1)break;case"keydown":case"keyup":k0(Ne,c,Fe)}var St;if(Mu)e:{switch(n){case"compositionstart":var bt="onCompositionStart";break e;case"compositionend":bt="onCompositionEnd";break e;case"compositionupdate":bt="onCompositionUpdate";break e}bt=void 0}else Hu?ag(n,c)&&(bt="onCompositionEnd"):n==="keydown"&&c.keyCode===229&&(bt="onCompositionStart");bt&&(ng&&c.locale!=="ko"&&(Hu||bt!=="onCompositionStart"?bt==="onCompositionEnd"&&Hu&&(St=ce()):(Ka=Fe,D="value"in Ka?Ka.value:Ka.textContent,Hu=!0)),yt=Yc(fe,bt),0<yt.length&&(bt=new x0(bt,n,null,c,Fe),Ne.push({event:bt,listeners:yt}),St?bt.data=St:(St=sg(c),St!==null&&(bt.data=St)))),(St=Pc?og(n,c):w1(n,c))&&(fe=Yc(fe,"onBeforeInput"),0<fe.length&&(Fe=new x0("onBeforeInput","beforeinput",null,c,Fe),Ne.push({event:Fe,listeners:fe}),Fe.data=St))}Nl(Ne,a)})}function Lu(n,a,c){return{instance:n,listener:a,currentTarget:c}}function Yc(n,a){for(var c=a+"Capture",h=[];n!==null;){var m=n,x=m.stateNode;m.tag===5&&x!==null&&(m=x,x=Vn(n,c),x!=null&&h.unshift(Lu(n,x,m)),x=Vn(n,a),x!=null&&h.push(Lu(n,x,m))),n=n.return}return h}function Io(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5);return n||null}function Cg(n,a,c,h,m){for(var x=a._reactName,k=[];c!==null&&c!==h;){var Y=c,Q=Y.alternate,fe=Y.stateNode;if(Q!==null&&Q===h)break;Y.tag===5&&fe!==null&&(Y=fe,m?(Q=Vn(c,x),Q!=null&&k.unshift(Lu(c,Q,Y))):m||(Q=Vn(c,x),Q!=null&&k.push(Lu(c,Q,Y)))),c=c.return}k.length!==0&&n.push({event:a,listeners:k})}var wg=/\r\n?/g,O1=/\u0000|\uFFFD/g;function bg(n){return(typeof n=="string"?n:""+n).replace(wg,`
69
- `).replace(O1,"")}function Cd(n,a,c){if(a=bg(a),bg(n)!==a&&c)throw Error(i(425))}function $o(){}var Vc=null,Bl=null;function wd(n,a){return n==="textarea"||n==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var bd=typeof setTimeout=="function"?setTimeout:void 0,M0=typeof clearTimeout=="function"?clearTimeout:void 0,_g=typeof Promise=="function"?Promise:void 0,Uu=typeof queueMicrotask=="function"?queueMicrotask:typeof _g<"u"?function(n){return _g.resolve(null).then(n).catch(_d)}:bd;function _d(n){setTimeout(function(){throw n})}function ju(n,a){var c=a,h=0;do{var m=c.nextSibling;if(n.removeChild(c),m&&m.nodeType===8)if(c=m.data,c==="/$"){if(h===0){n.removeChild(m),Ga(a);return}h--}else c!=="$"&&c!=="$?"&&c!=="$!"||h++;c=m}while(c);Ga(a)}function Es(n){for(;n!=null;n=n.nextSibling){var a=n.nodeType;if(a===1||a===3)break;if(a===8){if(a=n.data,a==="$"||a==="$!"||a==="$?")break;if(a==="/$")return null}}return n}function Dg(n){n=n.previousSibling;for(var a=0;n;){if(n.nodeType===8){var c=n.data;if(c==="$"||c==="$!"||c==="$?"){if(a===0)return n;a--}else c==="/$"&&a++}n=n.previousSibling}return null}var Po=Math.random().toString(36).slice(2),Ss="__reactFiber$"+Po,Wc="__reactProps$"+Po,Xs="__reactContainer$"+Po,Gc="__reactEvents$"+Po,zu="__reactListeners$"+Po,N1="__reactHandles$"+Po;function Ml(n){var a=n[Ss];if(a)return a;for(var c=n.parentNode;c;){if(a=c[Xs]||c[Ss]){if(c=a.alternate,a.child!==null||c!==null&&c.child!==null)for(n=Dg(n);n!==null;){if(c=n[Ss])return c;n=Dg(n)}return a}n=c,c=n.parentNode}return null}function ht(n){return n=n[Ss]||n[Xs],!n||n.tag!==5&&n.tag!==6&&n.tag!==13&&n.tag!==3?null:n}function Xa(n){if(n.tag===5||n.tag===6)return n.stateNode;throw Error(i(33))}function Zr(n){return n[Wc]||null}var Vt=[],_a=-1;function Da(n){return{current:n}}function $r(n){0>_a||(n.current=Vt[_a],Vt[_a]=null,_a--)}function dt(n,a){_a++,Vt[_a]=n.current,n.current=a}var fi={},an=Da(fi),Nn=Da(!1),Li=fi;function Ui(n,a){var c=n.type.contextTypes;if(!c)return fi;var h=n.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===a)return h.__reactInternalMemoizedMaskedChildContext;var m={},x;for(x in c)m[x]=a[x];return h&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=a,n.__reactInternalMemoizedMaskedChildContext=m),m}function yn(n){return n=n.childContextTypes,n!=null}function qu(){$r(Nn),$r(an)}function Tg(n,a,c){if(an.current!==fi)throw Error(i(168));dt(an,a),dt(Nn,c)}function Kc(n,a,c){var h=n.stateNode;if(a=a.childContextTypes,typeof h.getChildContext!="function")return c;h=h.getChildContext();for(var m in h)if(!(m in a))throw Error(i(108,ct(n)||"Unknown",m));return De({},c,h)}function Pn(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||fi,Li=an.current,dt(an,n),dt(Nn,Nn.current),!0}function Dd(n,a,c){var h=n.stateNode;if(!h)throw Error(i(169));c?(n=Kc(n,a,Li),h.__reactInternalMemoizedMergedChildContext=n,$r(Nn),$r(an),dt(an,n)):$r(Nn),dt(Nn,c)}var Cs=null,Yu=!1,Zs=!1;function Td(n){Cs===null?Cs=[n]:Cs.push(n)}function Lo(n){Yu=!0,Td(n)}function ws(){if(!Zs&&Cs!==null){Zs=!0;var n=0,a=sr;try{var c=Cs;for(sr=1;n<c.length;n++){var h=c[n];do h=h(!0);while(h!==null)}Cs=null,Yu=!1}catch(m){throw Cs!==null&&(Cs=Cs.slice(n+1)),Lr(Ya,ws),m}finally{sr=a,Zs=!1}}return null}var Uo=[],jo=0,zo=null,Js=0,xn=[],Ta=0,ia=null,bs=1,_s="";function Hl(n,a){Uo[jo++]=Js,Uo[jo++]=zo,zo=n,Js=a}function Rg(n,a,c){xn[Ta++]=bs,xn[Ta++]=_s,xn[Ta++]=ia,ia=n;var h=bs;n=_s;var m=32-mi(h)-1;h&=~(1<<m),c+=1;var x=32-mi(a)+m;if(30<x){var k=m-m%5;x=(h&(1<<k)-1).toString(32),h>>=k,m-=k,bs=1<<32-mi(a)+m|c<<m|h,_s=x+n}else bs=1<<x|c<<m|h,_s=n}function Rd(n){n.return!==null&&(Hl(n,1),Rg(n,1,0))}function Ad(n){for(;n===zo;)zo=Uo[--jo],Uo[jo]=null,Js=Uo[--jo],Uo[jo]=null;for(;n===ia;)ia=xn[--Ta],xn[Ta]=null,_s=xn[--Ta],xn[Ta]=null,bs=xn[--Ta],xn[Ta]=null}var ji=null,zi=null,Yr=!1,Ra=null;function H0(n,a){var c=Na(5,null,null,0);c.elementType="DELETED",c.stateNode=a,c.return=n,a=n.deletions,a===null?(n.deletions=[c],n.flags|=16):a.push(c)}function Ag(n,a){switch(n.tag){case 5:var c=n.type;return a=a.nodeType!==1||c.toLowerCase()!==a.nodeName.toLowerCase()?null:a,a!==null?(n.stateNode=a,ji=n,zi=Es(a.firstChild),!0):!1;case 6:return a=n.pendingProps===""||a.nodeType!==3?null:a,a!==null?(n.stateNode=a,ji=n,zi=null,!0):!1;case 13:return a=a.nodeType!==8?null:a,a!==null?(c=ia!==null?{id:bs,overflow:_s}:null,n.memoizedState={dehydrated:a,treeContext:c,retryLane:1073741824},c=Na(18,null,null,0),c.stateNode=a,c.return=n,n.child=c,ji=n,zi=null,!0):!1;default:return!1}}function I0(n){return(n.mode&1)!==0&&(n.flags&128)===0}function $0(n){if(Yr){var a=zi;if(a){var c=a;if(!Ag(n,a)){if(I0(n))throw Error(i(418));a=Es(c.nextSibling);var h=ji;a&&Ag(n,a)?H0(h,c):(n.flags=n.flags&-4097|2,Yr=!1,ji=n)}}else{if(I0(n))throw Error(i(418));n.flags=n.flags&-4097|2,Yr=!1,ji=n}}}function Bn(n){for(n=n.return;n!==null&&n.tag!==5&&n.tag!==3&&n.tag!==13;)n=n.return;ji=n}function kd(n){if(n!==ji)return!1;if(!Yr)return Bn(n),Yr=!0,!1;var a;if((a=n.tag!==3)&&!(a=n.tag!==5)&&(a=n.type,a=a!=="head"&&a!=="body"&&!wd(n.type,n.memoizedProps)),a&&(a=zi)){if(I0(n))throw Qc(),Error(i(418));for(;a;)H0(n,a),a=Es(a.nextSibling)}if(Bn(n),n.tag===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));e:{for(n=n.nextSibling,a=0;n;){if(n.nodeType===8){var c=n.data;if(c==="/$"){if(a===0){zi=Es(n.nextSibling);break e}a--}else c!=="$"&&c!=="$!"&&c!=="$?"||a++}n=n.nextSibling}zi=null}}else zi=ji?Es(n.stateNode.nextSibling):null;return!0}function Qc(){for(var n=zi;n;)n=Es(n.nextSibling)}function qo(){zi=ji=null,Yr=!1}function eo(n){Ra===null?Ra=[n]:Ra.push(n)}var B1=q.ReactCurrentBatchConfig;function Il(n,a,c){if(n=c.ref,n!==null&&typeof n!="function"&&typeof n!="object"){if(c._owner){if(c=c._owner,c){if(c.tag!==1)throw Error(i(309));var h=c.stateNode}if(!h)throw Error(i(147,n));var m=h,x=""+n;return a!==null&&a.ref!==null&&typeof a.ref=="function"&&a.ref._stringRef===x?a.ref:(a=function(k){var Y=m.refs;k===null?delete Y[x]:Y[x]=k},a._stringRef=x,a)}if(typeof n!="string")throw Error(i(284));if(!c._owner)throw Error(i(290,n))}return n}function Fd(n,a){throw n=Object.prototype.toString.call(a),Error(i(31,n==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":n))}function kg(n){var a=n._init;return a(n._payload)}function $l(n){function a(ne,te){if(n){var oe=ne.deletions;oe===null?(ne.deletions=[te],ne.flags|=16):oe.push(te)}}function c(ne,te){if(!n)return null;for(;te!==null;)a(ne,te),te=te.sibling;return null}function h(ne,te){for(ne=new Map;te!==null;)te.key!==null?ne.set(te.key,te):ne.set(te.index,te),te=te.sibling;return ne}function m(ne,te){return ne=Zo(ne,te),ne.index=0,ne.sibling=null,ne}function x(ne,te,oe){return ne.index=oe,n?(oe=ne.alternate,oe!==null?(oe=oe.index,oe<te?(ne.flags|=2,te):oe):(ne.flags|=2,te)):(ne.flags|=1048576,te)}function k(ne){return n&&ne.alternate===null&&(ne.flags|=2),ne}function Y(ne,te,oe,Oe){return te===null||te.tag!==6?(te=vp(oe,ne.mode,Oe),te.return=ne,te):(te=m(te,oe),te.return=ne,te)}function Q(ne,te,oe,Oe){var ot=oe.type;return ot===ee?Fe(ne,te,oe.props.children,Oe,oe.key):te!==null&&(te.elementType===ot||typeof ot=="object"&&ot!==null&&ot.$$typeof===$e&&kg(ot)===te.type)?(Oe=m(te,oe.props),Oe.ref=Il(ne,te,oe),Oe.return=ne,Oe):(Oe=Tf(oe.type,oe.key,oe.props,null,ne.mode,Oe),Oe.ref=Il(ne,te,oe),Oe.return=ne,Oe)}function fe(ne,te,oe,Oe){return te===null||te.tag!==4||te.stateNode.containerInfo!==oe.containerInfo||te.stateNode.implementation!==oe.implementation?(te=ch(oe,ne.mode,Oe),te.return=ne,te):(te=m(te,oe.children||[]),te.return=ne,te)}function Fe(ne,te,oe,Oe,ot){return te===null||te.tag!==7?(te=so(oe,ne.mode,Oe,ot),te.return=ne,te):(te=m(te,oe),te.return=ne,te)}function Ne(ne,te,oe){if(typeof te=="string"&&te!==""||typeof te=="number")return te=vp(""+te,ne.mode,oe),te.return=ne,te;if(typeof te=="object"&&te!==null){switch(te.$$typeof){case K:return oe=Tf(te.type,te.key,te.props,null,ne.mode,oe),oe.ref=Il(ne,null,te),oe.return=ne,oe;case Z:return te=ch(te,ne.mode,oe),te.return=ne,te;case $e:var Oe=te._init;return Ne(ne,Oe(te._payload),oe)}if(qr(te)||He(te))return te=so(te,ne.mode,oe,null),te.return=ne,te;Fd(ne,te)}return null}function ke(ne,te,oe,Oe){var ot=te!==null?te.key:null;if(typeof oe=="string"&&oe!==""||typeof oe=="number")return ot!==null?null:Y(ne,te,""+oe,Oe);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case K:return oe.key===ot?Q(ne,te,oe,Oe):null;case Z:return oe.key===ot?fe(ne,te,oe,Oe):null;case $e:return ot=oe._init,ke(ne,te,ot(oe._payload),Oe)}if(qr(oe)||He(oe))return ot!==null?null:Fe(ne,te,oe,Oe,null);Fd(ne,oe)}return null}function Qe(ne,te,oe,Oe,ot){if(typeof Oe=="string"&&Oe!==""||typeof Oe=="number")return ne=ne.get(oe)||null,Y(te,ne,""+Oe,ot);if(typeof Oe=="object"&&Oe!==null){switch(Oe.$$typeof){case K:return ne=ne.get(Oe.key===null?oe:Oe.key)||null,Q(te,ne,Oe,ot);case Z:return ne=ne.get(Oe.key===null?oe:Oe.key)||null,fe(te,ne,Oe,ot);case $e:var yt=Oe._init;return Qe(ne,te,oe,yt(Oe._payload),ot)}if(qr(Oe)||He(Oe))return ne=ne.get(oe)||null,Fe(te,ne,Oe,ot,null);Fd(te,Oe)}return null}function st(ne,te,oe,Oe){for(var ot=null,yt=null,St=te,bt=te=0,jn=null;St!==null&&bt<oe.length;bt++){St.index>bt?(jn=St,St=null):jn=St.sibling;var ur=ke(ne,St,oe[bt],Oe);if(ur===null){St===null&&(St=jn);break}n&&St&&ur.alternate===null&&a(ne,St),te=x(ur,te,bt),yt===null?ot=ur:yt.sibling=ur,yt=ur,St=jn}if(bt===oe.length)return c(ne,St),Yr&&Hl(ne,bt),ot;if(St===null){for(;bt<oe.length;bt++)St=Ne(ne,oe[bt],Oe),St!==null&&(te=x(St,te,bt),yt===null?ot=St:yt.sibling=St,yt=St);return Yr&&Hl(ne,bt),ot}for(St=h(ne,St);bt<oe.length;bt++)jn=Qe(St,ne,bt,oe[bt],Oe),jn!==null&&(n&&jn.alternate!==null&&St.delete(jn.key===null?bt:jn.key),te=x(jn,te,bt),yt===null?ot=jn:yt.sibling=jn,yt=jn);return n&&St.forEach(function(tl){return a(ne,tl)}),Yr&&Hl(ne,bt),ot}function ut(ne,te,oe,Oe){var ot=He(oe);if(typeof ot!="function")throw Error(i(150));if(oe=ot.call(oe),oe==null)throw Error(i(151));for(var yt=ot=null,St=te,bt=te=0,jn=null,ur=oe.next();St!==null&&!ur.done;bt++,ur=oe.next()){St.index>bt?(jn=St,St=null):jn=St.sibling;var tl=ke(ne,St,ur.value,Oe);if(tl===null){St===null&&(St=jn);break}n&&St&&tl.alternate===null&&a(ne,St),te=x(tl,te,bt),yt===null?ot=tl:yt.sibling=tl,yt=tl,St=jn}if(ur.done)return c(ne,St),Yr&&Hl(ne,bt),ot;if(St===null){for(;!ur.done;bt++,ur=oe.next())ur=Ne(ne,ur.value,Oe),ur!==null&&(te=x(ur,te,bt),yt===null?ot=ur:yt.sibling=ur,yt=ur);return Yr&&Hl(ne,bt),ot}for(St=h(ne,St);!ur.done;bt++,ur=oe.next())ur=Qe(St,ne,bt,ur.value,Oe),ur!==null&&(n&&ur.alternate!==null&&St.delete(ur.key===null?bt:ur.key),te=x(ur,te,bt),yt===null?ot=ur:yt.sibling=ur,yt=ur);return n&&St.forEach(function(dm){return a(ne,dm)}),Yr&&Hl(ne,bt),ot}function hn(ne,te,oe,Oe){if(typeof oe=="object"&&oe!==null&&oe.type===ee&&oe.key===null&&(oe=oe.props.children),typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case K:e:{for(var ot=oe.key,yt=te;yt!==null;){if(yt.key===ot){if(ot=oe.type,ot===ee){if(yt.tag===7){c(ne,yt.sibling),te=m(yt,oe.props.children),te.return=ne,ne=te;break e}}else if(yt.elementType===ot||typeof ot=="object"&&ot!==null&&ot.$$typeof===$e&&kg(ot)===yt.type){c(ne,yt.sibling),te=m(yt,oe.props),te.ref=Il(ne,yt,oe),te.return=ne,ne=te;break e}c(ne,yt);break}else a(ne,yt);yt=yt.sibling}oe.type===ee?(te=so(oe.props.children,ne.mode,Oe,oe.key),te.return=ne,ne=te):(Oe=Tf(oe.type,oe.key,oe.props,null,ne.mode,Oe),Oe.ref=Il(ne,te,oe),Oe.return=ne,ne=Oe)}return k(ne);case Z:e:{for(yt=oe.key;te!==null;){if(te.key===yt)if(te.tag===4&&te.stateNode.containerInfo===oe.containerInfo&&te.stateNode.implementation===oe.implementation){c(ne,te.sibling),te=m(te,oe.children||[]),te.return=ne,ne=te;break e}else{c(ne,te);break}else a(ne,te);te=te.sibling}te=ch(oe,ne.mode,Oe),te.return=ne,ne=te}return k(ne);case $e:return yt=oe._init,hn(ne,te,yt(oe._payload),Oe)}if(qr(oe))return st(ne,te,oe,Oe);if(He(oe))return ut(ne,te,oe,Oe);Fd(ne,oe)}return typeof oe=="string"&&oe!==""||typeof oe=="number"?(oe=""+oe,te!==null&&te.tag===6?(c(ne,te.sibling),te=m(te,oe),te.return=ne,ne=te):(c(ne,te),te=vp(oe,ne.mode,Oe),te.return=ne,ne=te),k(ne)):c(ne,te)}return hn}var un=$l(!0),qe=$l(!1),aa=Da(null),qi=null,Vu=null,P0=null;function L0(){P0=Vu=qi=null}function U0(n){var a=aa.current;$r(aa),n._currentValue=a}function j0(n,a,c){for(;n!==null;){var h=n.alternate;if((n.childLanes&a)!==a?(n.childLanes|=a,h!==null&&(h.childLanes|=a)):h!==null&&(h.childLanes&a)!==a&&(h.childLanes|=a),n===c)break;n=n.return}}function Jr(n,a){qi=n,P0=Vu=null,n=n.dependencies,n!==null&&n.firstContext!==null&&(n.lanes&a&&(Sn=!0),n.firstContext=null)}function Aa(n){var a=n._currentValue;if(P0!==n)if(n={context:n,memoizedValue:a,next:null},Vu===null){if(qi===null)throw Error(i(308));Vu=n,qi.dependencies={lanes:0,firstContext:n}}else Vu=Vu.next=n;return a}var Pl=null;function z0(n){Pl===null?Pl=[n]:Pl.push(n)}function q0(n,a,c,h){var m=a.interleaved;return m===null?(c.next=c,z0(a)):(c.next=m.next,m.next=c),a.interleaved=c,sa(n,h)}function sa(n,a){n.lanes|=a;var c=n.alternate;for(c!==null&&(c.lanes|=a),c=n,n=n.return;n!==null;)n.childLanes|=a,c=n.alternate,c!==null&&(c.childLanes|=a),c=n,n=n.return;return c.tag===3?c.stateNode:null}var oa=!1;function Y0(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Fg(n,a){n=n.updateQueue,a.updateQueue===n&&(a.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,effects:n.effects})}function to(n,a){return{eventTime:n,lane:a,tag:0,payload:null,callback:null,next:null}}function Yo(n,a,c){var h=n.updateQueue;if(h===null)return null;if(h=h.shared,Wt&2){var m=h.pending;return m===null?a.next=a:(a.next=m.next,m.next=a),h.pending=a,sa(n,c)}return m=h.interleaved,m===null?(a.next=a,z0(h)):(a.next=m.next,m.next=a),h.interleaved=a,sa(n,c)}function Od(n,a,c){if(a=a.updateQueue,a!==null&&(a=a.shared,(c&4194240)!==0)){var h=a.lanes;h&=n.pendingLanes,c|=h,a.lanes=c,Vs(n,c)}}function Og(n,a){var c=n.updateQueue,h=n.alternate;if(h!==null&&(h=h.updateQueue,c===h)){var m=null,x=null;if(c=c.firstBaseUpdate,c!==null){do{var k={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};x===null?m=x=k:x=x.next=k,c=c.next}while(c!==null);x===null?m=x=a:x=x.next=a}else m=x=a;c={baseState:h.baseState,firstBaseUpdate:m,lastBaseUpdate:x,shared:h.shared,effects:h.effects},n.updateQueue=c;return}n=c.lastBaseUpdate,n===null?c.firstBaseUpdate=a:n.next=a,c.lastBaseUpdate=a}function Xc(n,a,c,h){var m=n.updateQueue;oa=!1;var x=m.firstBaseUpdate,k=m.lastBaseUpdate,Y=m.shared.pending;if(Y!==null){m.shared.pending=null;var Q=Y,fe=Q.next;Q.next=null,k===null?x=fe:k.next=fe,k=Q;var Fe=n.alternate;Fe!==null&&(Fe=Fe.updateQueue,Y=Fe.lastBaseUpdate,Y!==k&&(Y===null?Fe.firstBaseUpdate=fe:Y.next=fe,Fe.lastBaseUpdate=Q))}if(x!==null){var Ne=m.baseState;k=0,Fe=fe=Q=null,Y=x;do{var ke=Y.lane,Qe=Y.eventTime;if((h&ke)===ke){Fe!==null&&(Fe=Fe.next={eventTime:Qe,lane:0,tag:Y.tag,payload:Y.payload,callback:Y.callback,next:null});e:{var st=n,ut=Y;switch(ke=a,Qe=c,ut.tag){case 1:if(st=ut.payload,typeof st=="function"){Ne=st.call(Qe,Ne,ke);break e}Ne=st;break e;case 3:st.flags=st.flags&-65537|128;case 0:if(st=ut.payload,ke=typeof st=="function"?st.call(Qe,Ne,ke):st,ke==null)break e;Ne=De({},Ne,ke);break e;case 2:oa=!0}}Y.callback!==null&&Y.lane!==0&&(n.flags|=64,ke=m.effects,ke===null?m.effects=[Y]:ke.push(Y))}else Qe={eventTime:Qe,lane:ke,tag:Y.tag,payload:Y.payload,callback:Y.callback,next:null},Fe===null?(fe=Fe=Qe,Q=Ne):Fe=Fe.next=Qe,k|=ke;if(Y=Y.next,Y===null){if(Y=m.shared.pending,Y===null)break;ke=Y,Y=ke.next,ke.next=null,m.lastBaseUpdate=ke,m.shared.pending=null}}while(!0);if(Fe===null&&(Q=Ne),m.baseState=Q,m.firstBaseUpdate=fe,m.lastBaseUpdate=Fe,a=m.shared.interleaved,a!==null){m=a;do k|=m.lane,m=m.next;while(m!==a)}else x===null&&(m.shared.lanes=0);ks|=k,n.lanes=k,n.memoizedState=Ne}}function V0(n,a,c){if(n=a.effects,a.effects=null,n!==null)for(a=0;a<n.length;a++){var h=n[a],m=h.callback;if(m!==null){if(h.callback=null,h=c,typeof m!="function")throw Error(i(191,m));m.call(h)}}}var Zc={},Ds=Da(Zc),Jc=Da(Zc),ef=Da(Zc);function Ll(n){if(n===Zc)throw Error(i(174));return n}function W0(n,a){switch(dt(ef,a),dt(Jc,n),dt(Ds,Zc),n=a.nodeType,n){case 9:case 11:a=(a=a.documentElement)?a.namespaceURI:An(null,"");break;default:n=n===8?a.parentNode:a,a=n.namespaceURI||null,n=n.tagName,a=An(a,n)}$r(Ds),dt(Ds,a)}function Ul(){$r(Ds),$r(Jc),$r(ef)}function Ng(n){Ll(ef.current);var a=Ll(Ds.current),c=An(a,n.type);a!==c&&(dt(Jc,n),dt(Ds,c))}function Nd(n){Jc.current===n&&($r(Ds),$r(Jc))}var en=Da(0);function Bd(n){for(var a=n;a!==null;){if(a.tag===13){var c=a.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.data==="$!"))return a}else if(a.tag===19&&a.memoizedProps.revealOrder!==void 0){if(a.flags&128)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var tf=[];function pt(){for(var n=0;n<tf.length;n++)tf[n]._workInProgressVersionPrimary=null;tf.length=0}var It=q.ReactCurrentDispatcher,or=q.ReactCurrentBatchConfig,Rr=0,lr=null,En=null,Ln=null,Md=!1,rf=!1,jl=0,Ae=0;function nr(){throw Error(i(321))}function Ct(n,a){if(a===null)return!1;for(var c=0;c<a.length&&c<n.length;c++)if(!Qa(n[c],a[c]))return!1;return!0}function Vo(n,a,c,h,m,x){if(Rr=x,lr=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,It.current=n===null||n.memoizedState===null?Qd:uf,n=c(h,m),rf){x=0;do{if(rf=!1,jl=0,25<=x)throw Error(i(301));x+=1,Ln=En=null,a.updateQueue=null,It.current=Xd,n=c(h,m)}while(rf)}if(It.current=Wl,a=En!==null&&En.next!==null,Rr=0,Ln=En=lr=null,Md=!1,a)throw Error(i(300));return n}function Za(){var n=jl!==0;return jl=0,n}function di(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ln===null?lr.memoizedState=Ln=n:Ln=Ln.next=n,Ln}function cn(){if(En===null){var n=lr.alternate;n=n!==null?n.memoizedState:null}else n=En.next;var a=Ln===null?lr.memoizedState:Ln.next;if(a!==null)Ln=a,En=n;else{if(n===null)throw Error(i(310));En=n,n={memoizedState:En.memoizedState,baseState:En.baseState,baseQueue:En.baseQueue,queue:En.queue,next:null},Ln===null?lr.memoizedState=Ln=n:Ln=Ln.next=n}return Ln}function ro(n,a){return typeof a=="function"?a(n):a}function Wo(n){var a=cn(),c=a.queue;if(c===null)throw Error(i(311));c.lastRenderedReducer=n;var h=En,m=h.baseQueue,x=c.pending;if(x!==null){if(m!==null){var k=m.next;m.next=x.next,x.next=k}h.baseQueue=m=x,c.pending=null}if(m!==null){x=m.next,h=h.baseState;var Y=k=null,Q=null,fe=x;do{var Fe=fe.lane;if((Rr&Fe)===Fe)Q!==null&&(Q=Q.next={lane:0,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null}),h=fe.hasEagerState?fe.eagerState:n(h,fe.action);else{var Ne={lane:Fe,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null};Q===null?(Y=Q=Ne,k=h):Q=Q.next=Ne,lr.lanes|=Fe,ks|=Fe}fe=fe.next}while(fe!==null&&fe!==x);Q===null?k=h:Q.next=Y,Qa(h,a.memoizedState)||(Sn=!0),a.memoizedState=h,a.baseState=k,a.baseQueue=Q,c.lastRenderedState=h}if(n=c.interleaved,n!==null){m=n;do x=m.lane,lr.lanes|=x,ks|=x,m=m.next;while(m!==n)}else m===null&&(c.lanes=0);return[a.memoizedState,c.dispatch]}function zl(n){var a=cn(),c=a.queue;if(c===null)throw Error(i(311));c.lastRenderedReducer=n;var h=c.dispatch,m=c.pending,x=a.memoizedState;if(m!==null){c.pending=null;var k=m=m.next;do x=n(x,k.action),k=k.next;while(k!==m);Qa(x,a.memoizedState)||(Sn=!0),a.memoizedState=x,a.baseQueue===null&&(a.baseState=x),c.lastRenderedState=x}return[x,h]}function Hd(){}function Id(n,a){var c=lr,h=cn(),m=a(),x=!Qa(h.memoizedState,m);if(x&&(h.memoizedState=m,Sn=!0),h=h.queue,nf(Ld.bind(null,c,h,n),[n]),h.getSnapshot!==a||x||Ln!==null&&Ln.memoizedState.tag&1){if(c.flags|=2048,ql(9,Pd.bind(null,c,h,m,a),void 0,null),Mn===null)throw Error(i(349));Rr&30||$d(c,a,m)}return m}function $d(n,a,c){n.flags|=16384,n={getSnapshot:a,value:c},a=lr.updateQueue,a===null?(a={lastEffect:null,stores:null},lr.updateQueue=a,a.stores=[n]):(c=a.stores,c===null?a.stores=[n]:c.push(n))}function Pd(n,a,c,h){a.value=c,a.getSnapshot=h,Ud(a)&&jd(n)}function Ld(n,a,c){return c(function(){Ud(a)&&jd(n)})}function Ud(n){var a=n.getSnapshot;n=n.value;try{var c=a();return!Qa(n,c)}catch{return!0}}function jd(n){var a=sa(n,1);a!==null&&wi(a,n,1,-1)}function zd(n){var a=di();return typeof n=="function"&&(n=n()),a.memoizedState=a.baseState=n,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ro,lastRenderedState:n},a.queue=n,n=n.dispatch=Vl.bind(null,lr,n),[a.memoizedState,n]}function ql(n,a,c,h){return n={tag:n,create:a,destroy:c,deps:h,next:null},a=lr.updateQueue,a===null?(a={lastEffect:null,stores:null},lr.updateQueue=a,a.lastEffect=n.next=n):(c=a.lastEffect,c===null?a.lastEffect=n.next=n:(h=c.next,c.next=n,n.next=h,a.lastEffect=n)),n}function qd(){return cn().memoizedState}function Wu(n,a,c,h){var m=di();lr.flags|=n,m.memoizedState=ql(1|a,c,void 0,h===void 0?null:h)}function Gu(n,a,c,h){var m=cn();h=h===void 0?null:h;var x=void 0;if(En!==null){var k=En.memoizedState;if(x=k.destroy,h!==null&&Ct(h,k.deps)){m.memoizedState=ql(a,c,x,h);return}}lr.flags|=n,m.memoizedState=ql(1|a,c,x,h)}function Yd(n,a){return Wu(8390656,8,n,a)}function nf(n,a){return Gu(2048,8,n,a)}function Vd(n,a){return Gu(4,2,n,a)}function af(n,a){return Gu(4,4,n,a)}function Yl(n,a){if(typeof a=="function")return n=n(),a(n),function(){a(null)};if(a!=null)return n=n(),a.current=n,function(){a.current=null}}function Wd(n,a,c){return c=c!=null?c.concat([n]):null,Gu(4,4,Yl.bind(null,a,n),c)}function sf(){}function Gd(n,a){var c=cn();a=a===void 0?null:a;var h=c.memoizedState;return h!==null&&a!==null&&Ct(a,h[1])?h[0]:(c.memoizedState=[n,a],n)}function Kd(n,a){var c=cn();a=a===void 0?null:a;var h=c.memoizedState;return h!==null&&a!==null&&Ct(a,h[1])?h[0]:(n=n(),c.memoizedState=[n,a],n)}function G0(n,a,c){return Rr&21?(Qa(c,a)||(c=Tu(),lr.lanes|=c,ks|=c,n.baseState=!0),a):(n.baseState&&(n.baseState=!1,Sn=!0),n.memoizedState=c)}function of(n,a){var c=sr;sr=c!==0&&4>c?c:4,n(!0);var h=or.transition;or.transition={};try{n(!1),a()}finally{sr=c,or.transition=h}}function K0(){return cn().memoizedState}function lf(n,a,c){var h=Fs(n);if(c={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null},Yi(n))Bg(a,c);else if(c=q0(n,a,c,h),c!==null){var m=bn();wi(c,n,h,m),Nr(c,a,h)}}function Vl(n,a,c){var h=Fs(n),m={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null};if(Yi(n))Bg(a,m);else{var x=n.alternate;if(n.lanes===0&&(x===null||x.lanes===0)&&(x=a.lastRenderedReducer,x!==null))try{var k=a.lastRenderedState,Y=x(k,c);if(m.hasEagerState=!0,m.eagerState=Y,Qa(Y,k)){var Q=a.interleaved;Q===null?(m.next=m,z0(a)):(m.next=Q.next,Q.next=m),a.interleaved=m;return}}catch{}finally{}c=q0(n,a,m,h),c!==null&&(m=bn(),wi(c,n,h,m),Nr(c,a,h))}}function Yi(n){var a=n.alternate;return n===lr||a!==null&&a===lr}function Bg(n,a){rf=Md=!0;var c=n.pending;c===null?a.next=a:(a.next=c.next,c.next=a),n.pending=a}function Nr(n,a,c){if(c&4194240){var h=a.lanes;h&=n.pendingLanes,c|=h,a.lanes=c,Vs(n,c)}}var Wl={readContext:Aa,useCallback:nr,useContext:nr,useEffect:nr,useImperativeHandle:nr,useInsertionEffect:nr,useLayoutEffect:nr,useMemo:nr,useReducer:nr,useRef:nr,useState:nr,useDebugValue:nr,useDeferredValue:nr,useTransition:nr,useMutableSource:nr,useSyncExternalStore:nr,useId:nr,unstable_isNewReconciler:!1},Qd={readContext:Aa,useCallback:function(n,a){return di().memoizedState=[n,a===void 0?null:a],n},useContext:Aa,useEffect:Yd,useImperativeHandle:function(n,a,c){return c=c!=null?c.concat([n]):null,Wu(4194308,4,Yl.bind(null,a,n),c)},useLayoutEffect:function(n,a){return Wu(4194308,4,n,a)},useInsertionEffect:function(n,a){return Wu(4,2,n,a)},useMemo:function(n,a){var c=di();return a=a===void 0?null:a,n=n(),c.memoizedState=[n,a],n},useReducer:function(n,a,c){var h=di();return a=c!==void 0?c(a):a,h.memoizedState=h.baseState=a,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:a},h.queue=n,n=n.dispatch=lf.bind(null,lr,n),[h.memoizedState,n]},useRef:function(n){var a=di();return n={current:n},a.memoizedState=n},useState:zd,useDebugValue:sf,useDeferredValue:function(n){return di().memoizedState=n},useTransition:function(){var n=zd(!1),a=n[0];return n=of.bind(null,n[1]),di().memoizedState=n,[a,n]},useMutableSource:function(){},useSyncExternalStore:function(n,a,c){var h=lr,m=di();if(Yr){if(c===void 0)throw Error(i(407));c=c()}else{if(c=a(),Mn===null)throw Error(i(349));Rr&30||$d(h,a,c)}m.memoizedState=c;var x={value:c,getSnapshot:a};return m.queue=x,Yd(Ld.bind(null,h,x,n),[n]),h.flags|=2048,ql(9,Pd.bind(null,h,x,c,a),void 0,null),c},useId:function(){var n=di(),a=Mn.identifierPrefix;if(Yr){var c=_s,h=bs;c=(h&~(1<<32-mi(h)-1)).toString(32)+c,a=":"+a+"R"+c,c=jl++,0<c&&(a+="H"+c.toString(32)),a+=":"}else c=Ae++,a=":"+a+"r"+c.toString(32)+":";return n.memoizedState=a},unstable_isNewReconciler:!1},uf={readContext:Aa,useCallback:Gd,useContext:Aa,useEffect:nf,useImperativeHandle:Wd,useInsertionEffect:Vd,useLayoutEffect:af,useMemo:Kd,useReducer:Wo,useRef:qd,useState:function(){return Wo(ro)},useDebugValue:sf,useDeferredValue:function(n){var a=cn();return G0(a,En.memoizedState,n)},useTransition:function(){var n=Wo(ro)[0],a=cn().memoizedState;return[n,a]},useMutableSource:Hd,useSyncExternalStore:Id,useId:K0,unstable_isNewReconciler:!1},Xd={readContext:Aa,useCallback:Gd,useContext:Aa,useEffect:nf,useImperativeHandle:Wd,useInsertionEffect:Vd,useLayoutEffect:af,useMemo:Kd,useReducer:zl,useRef:qd,useState:function(){return zl(ro)},useDebugValue:sf,useDeferredValue:function(n){var a=cn();return En===null?a.memoizedState=n:G0(a,En.memoizedState,n)},useTransition:function(){var n=zl(ro)[0],a=cn().memoizedState;return[n,a]},useMutableSource:Hd,useSyncExternalStore:Id,useId:K0,unstable_isNewReconciler:!1};function Ja(n,a){if(n&&n.defaultProps){a=De({},a),n=n.defaultProps;for(var c in n)a[c]===void 0&&(a[c]=n[c]);return a}return a}function Q0(n,a,c,h){a=n.memoizedState,c=c(h,a),c=c==null?a:De({},a,c),n.memoizedState=c,n.lanes===0&&(n.updateQueue.baseState=c)}var Zd={isMounted:function(n){return(n=n._reactInternals)?Ft(n)===n:!1},enqueueSetState:function(n,a,c){n=n._reactInternals;var h=bn(),m=Fs(n),x=to(h,m);x.payload=a,c!=null&&(x.callback=c),a=Yo(n,x,m),a!==null&&(wi(a,n,m,h),Od(a,n,m))},enqueueReplaceState:function(n,a,c){n=n._reactInternals;var h=bn(),m=Fs(n),x=to(h,m);x.tag=1,x.payload=a,c!=null&&(x.callback=c),a=Yo(n,x,m),a!==null&&(wi(a,n,m,h),Od(a,n,m))},enqueueForceUpdate:function(n,a){n=n._reactInternals;var c=bn(),h=Fs(n),m=to(c,h);m.tag=2,a!=null&&(m.callback=a),a=Yo(n,m,h),a!==null&&(wi(a,n,h,c),Od(a,n,h))}};function Mg(n,a,c,h,m,x,k){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(h,x,k):a.prototype&&a.prototype.isPureReactComponent?!Uc(c,h)||!Uc(m,x):!0}function Jd(n,a,c){var h=!1,m=fi,x=a.contextType;return typeof x=="object"&&x!==null?x=Aa(x):(m=yn(a)?Li:an.current,h=a.contextTypes,x=(h=h!=null)?Ui(n,m):fi),a=new a(c,x),n.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Zd,n.stateNode=a,a._reactInternals=n,h&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=m,n.__reactInternalMemoizedMaskedChildContext=x),a}function Hg(n,a,c,h){n=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(c,h),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(c,h),a.state!==n&&Zd.enqueueReplaceState(a,a.state,null)}function cf(n,a,c,h){var m=n.stateNode;m.props=c,m.state=n.memoizedState,m.refs={},Y0(n);var x=a.contextType;typeof x=="object"&&x!==null?m.context=Aa(x):(x=yn(a)?Li:an.current,m.context=Ui(n,x)),m.state=n.memoizedState,x=a.getDerivedStateFromProps,typeof x=="function"&&(Q0(n,a,x,c),m.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(a=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),a!==m.state&&Zd.enqueueReplaceState(m,m.state,null),Xc(n,c,m,h),m.state=n.memoizedState),typeof m.componentDidMount=="function"&&(n.flags|=4194308)}function Gl(n,a){try{var c="",h=a;do c+=tt(h),h=h.return;while(h);var m=c}catch(x){m=`
70
- Error generating stack: `+x.message+`
71
- `+x.stack}return{value:n,source:a,stack:m,digest:null}}function X0(n,a,c){return{value:n,source:null,stack:c??null,digest:a??null}}function Z0(n,a){try{console.error(a.value)}catch(c){setTimeout(function(){throw c})}}var eh=typeof WeakMap=="function"?WeakMap:Map;function Ig(n,a,c){c=to(-1,c),c.tag=3,c.payload={element:null};var h=a.value;return c.callback=function(){ec||(ec=!0,Xl=h),Z0(n,a)},c}function J0(n,a,c){c=to(-1,c),c.tag=3;var h=n.type.getDerivedStateFromError;if(typeof h=="function"){var m=a.value;c.payload=function(){return h(m)},c.callback=function(){Z0(n,a)}}var x=n.stateNode;return x!==null&&typeof x.componentDidCatch=="function"&&(c.callback=function(){Z0(n,a),typeof h!="function"&&(Qo===null?Qo=new Set([this]):Qo.add(this));var k=a.stack;this.componentDidCatch(a.value,{componentStack:k!==null?k:""})}),c}function ep(n,a,c){var h=n.pingCache;if(h===null){h=n.pingCache=new eh;var m=new Set;h.set(a,m)}else m=h.get(a),m===void 0&&(m=new Set,h.set(a,m));m.has(c)||(m.add(c),n=U1.bind(null,n,a,c),a.then(n,n))}function $g(n){do{var a;if((a=n.tag===13)&&(a=n.memoizedState,a=a!==null?a.dehydrated!==null:!0),a)return n;n=n.return}while(n!==null);return null}function Go(n,a,c,h,m){return n.mode&1?(n.flags|=65536,n.lanes=m,n):(n===a?n.flags|=65536:(n.flags|=128,c.flags|=131072,c.flags&=-52805,c.tag===1&&(c.alternate===null?c.tag=17:(a=to(-1,1),a.tag=2,Yo(c,a,1))),c.lanes|=1),n)}var ff=q.ReactCurrentOwner,Sn=!1;function Qn(n,a,c,h){a.child=n===null?qe(a,null,c,h):un(a,n.child,c,h)}function Vi(n,a,c,h,m){c=c.render;var x=a.ref;return Jr(a,m),h=Vo(n,a,c,h,x,m),c=Za(),n!==null&&!Sn?(a.updateQueue=n.updateQueue,a.flags&=-2053,n.lanes&=~m,Fa(n,a,m)):(Yr&&c&&Rd(a),a.flags|=1,Qn(n,a,h,m),a.child)}function Kl(n,a,c,h,m){if(n===null){var x=c.type;return typeof x=="function"&&!pp(x)&&x.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(a.tag=15,a.type=x,Nt(n,a,x,h,m)):(n=Tf(c.type,null,h,a,a.mode,m),n.ref=a.ref,n.return=a,a.child=n)}if(x=n.child,!(n.lanes&m)){var k=x.memoizedProps;if(c=c.compare,c=c!==null?c:Uc,c(k,h)&&n.ref===a.ref)return Fa(n,a,m)}return a.flags|=1,n=Zo(x,h),n.ref=a.ref,n.return=a,a.child=n}function Nt(n,a,c,h,m){if(n!==null){var x=n.memoizedProps;if(Uc(x,h)&&n.ref===a.ref)if(Sn=!1,a.pendingProps=h=x,(n.lanes&m)!==0)n.flags&131072&&(Sn=!0);else return a.lanes=n.lanes,Fa(n,a,m)}return Pg(n,a,c,h,m)}function df(n,a,c){var h=a.pendingProps,m=h.children,x=n!==null?n.memoizedState:null;if(h.mode==="hidden")if(!(a.mode&1))a.memoizedState={baseLanes:0,cachePool:null,transitions:null},dt(Xu,la),la|=c;else{if(!(c&1073741824))return n=x!==null?x.baseLanes|c:c,a.lanes=a.childLanes=1073741824,a.memoizedState={baseLanes:n,cachePool:null,transitions:null},a.updateQueue=null,dt(Xu,la),la|=n,null;a.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=x!==null?x.baseLanes:c,dt(Xu,la),la|=h}else x!==null?(h=x.baseLanes|c,a.memoizedState=null):h=c,dt(Xu,la),la|=h;return Qn(n,a,m,c),a.child}function tp(n,a){var c=a.ref;(n===null&&c!==null||n!==null&&n.ref!==c)&&(a.flags|=512,a.flags|=2097152)}function Pg(n,a,c,h,m){var x=yn(c)?Li:an.current;return x=Ui(a,x),Jr(a,m),c=Vo(n,a,c,h,x,m),h=Za(),n!==null&&!Sn?(a.updateQueue=n.updateQueue,a.flags&=-2053,n.lanes&=~m,Fa(n,a,m)):(Yr&&h&&Rd(a),a.flags|=1,Qn(n,a,c,m),a.child)}function Lg(n,a,c,h,m){if(yn(c)){var x=!0;Pn(a)}else x=!1;if(Jr(a,m),a.stateNode===null)ka(n,a),Jd(a,c,h),cf(a,c,h,m),h=!0;else if(n===null){var k=a.stateNode,Y=a.memoizedProps;k.props=Y;var Q=k.context,fe=c.contextType;typeof fe=="object"&&fe!==null?fe=Aa(fe):(fe=yn(c)?Li:an.current,fe=Ui(a,fe));var Fe=c.getDerivedStateFromProps,Ne=typeof Fe=="function"||typeof k.getSnapshotBeforeUpdate=="function";Ne||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(Y!==h||Q!==fe)&&Hg(a,k,h,fe),oa=!1;var ke=a.memoizedState;k.state=ke,Xc(a,h,k,m),Q=a.memoizedState,Y!==h||ke!==Q||Nn.current||oa?(typeof Fe=="function"&&(Q0(a,c,Fe,h),Q=a.memoizedState),(Y=oa||Mg(a,c,Y,h,ke,Q,fe))?(Ne||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount()),typeof k.componentDidMount=="function"&&(a.flags|=4194308)):(typeof k.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=h,a.memoizedState=Q),k.props=h,k.state=Q,k.context=fe,h=Y):(typeof k.componentDidMount=="function"&&(a.flags|=4194308),h=!1)}else{k=a.stateNode,Fg(n,a),Y=a.memoizedProps,fe=a.type===a.elementType?Y:Ja(a.type,Y),k.props=fe,Ne=a.pendingProps,ke=k.context,Q=c.contextType,typeof Q=="object"&&Q!==null?Q=Aa(Q):(Q=yn(c)?Li:an.current,Q=Ui(a,Q));var Qe=c.getDerivedStateFromProps;(Fe=typeof Qe=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(Y!==Ne||ke!==Q)&&Hg(a,k,h,Q),oa=!1,ke=a.memoizedState,k.state=ke,Xc(a,h,k,m);var st=a.memoizedState;Y!==Ne||ke!==st||Nn.current||oa?(typeof Qe=="function"&&(Q0(a,c,Qe,h),st=a.memoizedState),(fe=oa||Mg(a,c,fe,h,ke,st,Q)||!1)?(Fe||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(h,st,Q),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(h,st,Q)),typeof k.componentDidUpdate=="function"&&(a.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof k.componentDidUpdate!="function"||Y===n.memoizedProps&&ke===n.memoizedState||(a.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||Y===n.memoizedProps&&ke===n.memoizedState||(a.flags|=1024),a.memoizedProps=h,a.memoizedState=st),k.props=h,k.state=st,k.context=Q,h=fe):(typeof k.componentDidUpdate!="function"||Y===n.memoizedProps&&ke===n.memoizedState||(a.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||Y===n.memoizedProps&&ke===n.memoizedState||(a.flags|=1024),h=!1)}return hf(n,a,c,h,x,m)}function hf(n,a,c,h,m,x){tp(n,a);var k=(a.flags&128)!==0;if(!h&&!k)return m&&Dd(a,c,!1),Fa(n,a,x);h=a.stateNode,ff.current=a;var Y=k&&typeof c.getDerivedStateFromError!="function"?null:h.render();return a.flags|=1,n!==null&&k?(a.child=un(a,n.child,null,x),a.child=un(a,null,Y,x)):Qn(n,a,Y,x),a.memoizedState=h.state,m&&Dd(a,c,!0),a.child}function Ku(n){var a=n.stateNode;a.pendingContext?Tg(n,a.pendingContext,a.pendingContext!==a.context):a.context&&Tg(n,a.context,!1),W0(n,a.containerInfo)}function Ug(n,a,c,h,m){return qo(),eo(m),a.flags|=256,Qn(n,a,c,h),a.child}var th={dehydrated:null,treeContext:null,retryLane:0};function rp(n){return{baseLanes:n,cachePool:null,transitions:null}}function rh(n,a,c){var h=a.pendingProps,m=en.current,x=!1,k=(a.flags&128)!==0,Y;if((Y=k)||(Y=n!==null&&n.memoizedState===null?!1:(m&2)!==0),Y?(x=!0,a.flags&=-129):(n===null||n.memoizedState!==null)&&(m|=1),dt(en,m&1),n===null)return $0(a),n=a.memoizedState,n!==null&&(n=n.dehydrated,n!==null)?(a.mode&1?n.data==="$!"?a.lanes=8:a.lanes=1073741824:a.lanes=1,null):(k=h.children,n=h.fallback,x?(h=a.mode,x=a.child,k={mode:"hidden",children:k},!(h&1)&&x!==null?(x.childLanes=0,x.pendingProps=k):x=Jo(k,h,0,null),n=so(n,h,c,null),x.return=a,n.return=a,x.sibling=n,a.child=x,a.child.memoizedState=rp(c),a.memoizedState=th,n):np(a,k));if(m=n.memoizedState,m!==null&&(Y=m.dehydrated,Y!==null))return jg(n,a,k,h,Y,m,c);if(x){x=h.fallback,k=a.mode,m=n.child,Y=m.sibling;var Q={mode:"hidden",children:h.children};return!(k&1)&&a.child!==m?(h=a.child,h.childLanes=0,h.pendingProps=Q,a.deletions=null):(h=Zo(m,Q),h.subtreeFlags=m.subtreeFlags&14680064),Y!==null?x=Zo(Y,x):(x=so(x,k,c,null),x.flags|=2),x.return=a,h.return=a,h.sibling=x,a.child=h,h=x,x=a.child,k=n.child.memoizedState,k=k===null?rp(c):{baseLanes:k.baseLanes|c,cachePool:null,transitions:k.transitions},x.memoizedState=k,x.childLanes=n.childLanes&~c,a.memoizedState=th,h}return x=n.child,n=x.sibling,h=Zo(x,{mode:"visible",children:h.children}),!(a.mode&1)&&(h.lanes=c),h.return=a,h.sibling=null,n!==null&&(c=a.deletions,c===null?(a.deletions=[n],a.flags|=16):c.push(n)),a.child=h,a.memoizedState=null,h}function np(n,a){return a=Jo({mode:"visible",children:a},n.mode,0,null),a.return=n,n.child=a}function pf(n,a,c,h){return h!==null&&eo(h),un(a,n.child,null,c),n=np(a,a.pendingProps.children),n.flags|=2,a.memoizedState=null,n}function jg(n,a,c,h,m,x,k){if(c)return a.flags&256?(a.flags&=-257,h=X0(Error(i(422))),pf(n,a,k,h)):a.memoizedState!==null?(a.child=n.child,a.flags|=128,null):(x=h.fallback,m=a.mode,h=Jo({mode:"visible",children:h.children},m,0,null),x=so(x,m,k,null),x.flags|=2,h.return=a,x.return=a,h.sibling=x,a.child=h,a.mode&1&&un(a,n.child,null,k),a.child.memoizedState=rp(k),a.memoizedState=th,x);if(!(a.mode&1))return pf(n,a,k,null);if(m.data==="$!"){if(h=m.nextSibling&&m.nextSibling.dataset,h)var Y=h.dgst;return h=Y,x=Error(i(419)),h=X0(x,h,void 0),pf(n,a,k,h)}if(Y=(k&n.childLanes)!==0,Sn||Y){if(h=Mn,h!==null){switch(k&-k){case 4:m=2;break;case 16:m=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:m=32;break;case 536870912:m=268435456;break;default:m=0}m=m&(h.suspendedLanes|k)?0:m,m!==0&&m!==x.retryLane&&(x.retryLane=m,sa(n,m),wi(h,n,m,-1))}return hp(),h=X0(Error(i(421))),pf(n,a,k,h)}return m.data==="$?"?(a.flags|=128,a.child=n.child,a=j1.bind(null,n),m._reactRetry=a,null):(n=x.treeContext,zi=Es(m.nextSibling),ji=a,Yr=!0,Ra=null,n!==null&&(xn[Ta++]=bs,xn[Ta++]=_s,xn[Ta++]=ia,bs=n.id,_s=n.overflow,ia=a),a=np(a,h.children),a.flags|=4096,a)}function ip(n,a,c){n.lanes|=a;var h=n.alternate;h!==null&&(h.lanes|=a),j0(n.return,a,c)}function Ei(n,a,c,h,m){var x=n.memoizedState;x===null?n.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:h,tail:c,tailMode:m}:(x.isBackwards=a,x.rendering=null,x.renderingStartTime=0,x.last=h,x.tail=c,x.tailMode=m)}function Ts(n,a,c){var h=a.pendingProps,m=h.revealOrder,x=h.tail;if(Qn(n,a,h.children,c),h=en.current,h&2)h=h&1|2,a.flags|=128;else{if(n!==null&&n.flags&128)e:for(n=a.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&ip(n,c,a);else if(n.tag===19)ip(n,c,a);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===a)break e;for(;n.sibling===null;){if(n.return===null||n.return===a)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}h&=1}if(dt(en,h),!(a.mode&1))a.memoizedState=null;else switch(m){case"forwards":for(c=a.child,m=null;c!==null;)n=c.alternate,n!==null&&Bd(n)===null&&(m=c),c=c.sibling;c=m,c===null?(m=a.child,a.child=null):(m=c.sibling,c.sibling=null),Ei(a,!1,m,c,x);break;case"backwards":for(c=null,m=a.child,a.child=null;m!==null;){if(n=m.alternate,n!==null&&Bd(n)===null){a.child=m;break}n=m.sibling,m.sibling=c,c=m,m=n}Ei(a,!0,c,null,x);break;case"together":Ei(a,!1,null,null,void 0);break;default:a.memoizedState=null}return a.child}function ka(n,a){!(a.mode&1)&&n!==null&&(n.alternate=null,a.alternate=null,a.flags|=2)}function Fa(n,a,c){if(n!==null&&(a.dependencies=n.dependencies),ks|=a.lanes,!(c&a.childLanes))return null;if(n!==null&&a.child!==n.child)throw Error(i(153));if(a.child!==null){for(n=a.child,c=Zo(n,n.pendingProps),a.child=c,c.return=a;n.sibling!==null;)n=n.sibling,c=c.sibling=Zo(n,n.pendingProps),c.return=a;c.sibling=null}return a.child}function vf(n,a,c){switch(a.tag){case 3:Ku(a),qo();break;case 5:Ng(a);break;case 1:yn(a.type)&&Pn(a);break;case 4:W0(a,a.stateNode.containerInfo);break;case 10:var h=a.type._context,m=a.memoizedProps.value;dt(aa,h._currentValue),h._currentValue=m;break;case 13:if(h=a.memoizedState,h!==null)return h.dehydrated!==null?(dt(en,en.current&1),a.flags|=128,null):c&a.child.childLanes?rh(n,a,c):(dt(en,en.current&1),n=Fa(n,a,c),n!==null?n.sibling:null);dt(en,en.current&1);break;case 19:if(h=(c&a.childLanes)!==0,n.flags&128){if(h)return Ts(n,a,c);a.flags|=128}if(m=a.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),dt(en,en.current),h)break;return null;case 22:case 23:return a.lanes=0,df(n,a,c)}return Fa(n,a,c)}var Oa,Cn,zg,qg;Oa=function(n,a){for(var c=a.child;c!==null;){if(c.tag===5||c.tag===6)n.appendChild(c.stateNode);else if(c.tag!==4&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===a)break;for(;c.sibling===null;){if(c.return===null||c.return===a)return;c=c.return}c.sibling.return=c.return,c=c.sibling}},Cn=function(){},zg=function(n,a,c,h){var m=n.memoizedProps;if(m!==h){n=a.stateNode,Ll(Ds.current);var x=null;switch(c){case"input":m=Xt(n,m),h=Xt(n,h),x=[];break;case"select":m=De({},m,{value:void 0}),h=De({},h,{value:void 0}),x=[];break;case"textarea":m=ar(n,m),h=ar(n,h),x=[];break;default:typeof m.onClick!="function"&&typeof h.onClick=="function"&&(n.onclick=$o)}Or(c,h);var k;c=null;for(fe in m)if(!h.hasOwnProperty(fe)&&m.hasOwnProperty(fe)&&m[fe]!=null)if(fe==="style"){var Y=m[fe];for(k in Y)Y.hasOwnProperty(k)&&(c||(c={}),c[k]="")}else fe!=="dangerouslySetInnerHTML"&&fe!=="children"&&fe!=="suppressContentEditableWarning"&&fe!=="suppressHydrationWarning"&&fe!=="autoFocus"&&(f.hasOwnProperty(fe)?x||(x=[]):(x=x||[]).push(fe,null));for(fe in h){var Q=h[fe];if(Y=m!=null?m[fe]:void 0,h.hasOwnProperty(fe)&&Q!==Y&&(Q!=null||Y!=null))if(fe==="style")if(Y){for(k in Y)!Y.hasOwnProperty(k)||Q&&Q.hasOwnProperty(k)||(c||(c={}),c[k]="");for(k in Q)Q.hasOwnProperty(k)&&Y[k]!==Q[k]&&(c||(c={}),c[k]=Q[k])}else c||(x||(x=[]),x.push(fe,c)),c=Q;else fe==="dangerouslySetInnerHTML"?(Q=Q?Q.__html:void 0,Y=Y?Y.__html:void 0,Q!=null&&Y!==Q&&(x=x||[]).push(fe,Q)):fe==="children"?typeof Q!="string"&&typeof Q!="number"||(x=x||[]).push(fe,""+Q):fe!=="suppressContentEditableWarning"&&fe!=="suppressHydrationWarning"&&(f.hasOwnProperty(fe)?(Q!=null&&fe==="onScroll"&&yr("scroll",n),x||Y===Q||(x=[])):(x=x||[]).push(fe,Q))}c&&(x=x||[]).push("style",c);var fe=x;(a.updateQueue=fe)&&(a.flags|=4)}},qg=function(n,a,c,h){c!==h&&(a.flags|=4)};function gf(n,a){if(!Yr)switch(n.tailMode){case"hidden":a=n.tail;for(var c=null;a!==null;)a.alternate!==null&&(c=a),a=a.sibling;c===null?n.tail=null:c.sibling=null;break;case"collapsed":c=n.tail;for(var h=null;c!==null;)c.alternate!==null&&(h=c),c=c.sibling;h===null?a||n.tail===null?n.tail=null:n.tail.sibling=null:h.sibling=null}}function Un(n){var a=n.alternate!==null&&n.alternate.child===n.child,c=0,h=0;if(a)for(var m=n.child;m!==null;)c|=m.lanes|m.childLanes,h|=m.subtreeFlags&14680064,h|=m.flags&14680064,m.return=n,m=m.sibling;else for(m=n.child;m!==null;)c|=m.lanes|m.childLanes,h|=m.subtreeFlags,h|=m.flags,m.return=n,m=m.sibling;return n.subtreeFlags|=h,n.childLanes=c,a}function Yg(n,a,c){var h=a.pendingProps;switch(Ad(a),a.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Un(a),null;case 1:return yn(a.type)&&qu(),Un(a),null;case 3:return h=a.stateNode,Ul(),$r(Nn),$r(an),pt(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(n===null||n.child===null)&&(kd(a)?a.flags|=4:n===null||n.memoizedState.isDehydrated&&!(a.flags&256)||(a.flags|=1024,Ra!==null&&(Zl(Ra),Ra=null))),Cn(n,a),Un(a),null;case 5:Nd(a);var m=Ll(ef.current);if(c=a.type,n!==null&&a.stateNode!=null)zg(n,a,c,h,m),n.ref!==a.ref&&(a.flags|=512,a.flags|=2097152);else{if(!h){if(a.stateNode===null)throw Error(i(166));return Un(a),null}if(n=Ll(Ds.current),kd(a)){h=a.stateNode,c=a.type;var x=a.memoizedProps;switch(h[Ss]=a,h[Wc]=x,n=(a.mode&1)!==0,c){case"dialog":yr("cancel",h),yr("close",h);break;case"iframe":case"object":case"embed":yr("load",h);break;case"video":case"audio":for(m=0;m<qc.length;m++)yr(qc[m],h);break;case"source":yr("error",h);break;case"img":case"image":case"link":yr("error",h),yr("load",h);break;case"details":yr("toggle",h);break;case"input":Fr(h,x),yr("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!x.multiple},yr("invalid",h);break;case"textarea":Pr(h,x),yr("invalid",h)}Or(c,x),m=null;for(var k in x)if(x.hasOwnProperty(k)){var Y=x[k];k==="children"?typeof Y=="string"?h.textContent!==Y&&(x.suppressHydrationWarning!==!0&&Cd(h.textContent,Y,n),m=["children",Y]):typeof Y=="number"&&h.textContent!==""+Y&&(x.suppressHydrationWarning!==!0&&Cd(h.textContent,Y,n),m=["children",""+Y]):f.hasOwnProperty(k)&&Y!=null&&k==="onScroll"&&yr("scroll",h)}switch(c){case"input":Sr(h),Rn(h,x,!0);break;case"textarea":Sr(h),Kr(h);break;case"select":case"option":break;default:typeof x.onClick=="function"&&(h.onclick=$o)}h=m,a.updateQueue=h,h!==null&&(a.flags|=4)}else{k=m.nodeType===9?m:m.ownerDocument,n==="http://www.w3.org/1999/xhtml"&&(n=Qr(c)),n==="http://www.w3.org/1999/xhtml"?c==="script"?(n=k.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild)):typeof h.is=="string"?n=k.createElement(c,{is:h.is}):(n=k.createElement(c),c==="select"&&(k=n,h.multiple?k.multiple=!0:h.size&&(k.size=h.size))):n=k.createElementNS(n,c),n[Ss]=a,n[Wc]=h,Oa(n,a,!1,!1),a.stateNode=n;e:{switch(k=gn(c,h),c){case"dialog":yr("cancel",n),yr("close",n),m=h;break;case"iframe":case"object":case"embed":yr("load",n),m=h;break;case"video":case"audio":for(m=0;m<qc.length;m++)yr(qc[m],n);m=h;break;case"source":yr("error",n),m=h;break;case"img":case"image":case"link":yr("error",n),yr("load",n),m=h;break;case"details":yr("toggle",n),m=h;break;case"input":Fr(n,h),m=Xt(n,h),yr("invalid",n);break;case"option":m=h;break;case"select":n._wrapperState={wasMultiple:!!h.multiple},m=De({},h,{value:void 0}),yr("invalid",n);break;case"textarea":Pr(n,h),m=ar(n,h),yr("invalid",n);break;default:m=h}Or(c,m),Y=m;for(x in Y)if(Y.hasOwnProperty(x)){var Q=Y[x];x==="style"?Cr(n,Q):x==="dangerouslySetInnerHTML"?(Q=Q?Q.__html:void 0,Q!=null&&ra(n,Q)):x==="children"?typeof Q=="string"?(c!=="textarea"||Q!=="")&&Pe(n,Q):typeof Q=="number"&&Pe(n,""+Q):x!=="suppressContentEditableWarning"&&x!=="suppressHydrationWarning"&&x!=="autoFocus"&&(f.hasOwnProperty(x)?Q!=null&&x==="onScroll"&&yr("scroll",n):Q!=null&&U(n,x,Q,k))}switch(c){case"input":Sr(n),Rn(n,h,!1);break;case"textarea":Sr(n),Kr(n);break;case"option":h.value!=null&&n.setAttribute("value",""+Ce(h.value));break;case"select":n.multiple=!!h.multiple,x=h.value,x!=null?tr(n,!!h.multiple,x,!1):h.defaultValue!=null&&tr(n,!!h.multiple,h.defaultValue,!0);break;default:typeof m.onClick=="function"&&(n.onclick=$o)}switch(c){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}}h&&(a.flags|=4)}a.ref!==null&&(a.flags|=512,a.flags|=2097152)}return Un(a),null;case 6:if(n&&a.stateNode!=null)qg(n,a,n.memoizedProps,h);else{if(typeof h!="string"&&a.stateNode===null)throw Error(i(166));if(c=Ll(ef.current),Ll(Ds.current),kd(a)){if(h=a.stateNode,c=a.memoizedProps,h[Ss]=a,(x=h.nodeValue!==c)&&(n=ji,n!==null))switch(n.tag){case 3:Cd(h.nodeValue,c,(n.mode&1)!==0);break;case 5:n.memoizedProps.suppressHydrationWarning!==!0&&Cd(h.nodeValue,c,(n.mode&1)!==0)}x&&(a.flags|=4)}else h=(c.nodeType===9?c:c.ownerDocument).createTextNode(h),h[Ss]=a,a.stateNode=h}return Un(a),null;case 13:if($r(en),h=a.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(Yr&&zi!==null&&a.mode&1&&!(a.flags&128))Qc(),qo(),a.flags|=98560,x=!1;else if(x=kd(a),h!==null&&h.dehydrated!==null){if(n===null){if(!x)throw Error(i(318));if(x=a.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(i(317));x[Ss]=a}else qo(),!(a.flags&128)&&(a.memoizedState=null),a.flags|=4;Un(a),x=!1}else Ra!==null&&(Zl(Ra),Ra=null),x=!0;if(!x)return a.flags&65536?a:null}return a.flags&128?(a.lanes=c,a):(h=h!==null,h!==(n!==null&&n.memoizedState!==null)&&h&&(a.child.flags|=8192,a.mode&1&&(n===null||en.current&1?dn===0&&(dn=3):hp())),a.updateQueue!==null&&(a.flags|=4),Un(a),null);case 4:return Ul(),Cn(n,a),n===null&&Pu(a.stateNode.containerInfo),Un(a),null;case 10:return U0(a.type._context),Un(a),null;case 17:return yn(a.type)&&qu(),Un(a),null;case 19:if($r(en),x=a.memoizedState,x===null)return Un(a),null;if(h=(a.flags&128)!==0,k=x.rendering,k===null)if(h)gf(x,!1);else{if(dn!==0||n!==null&&n.flags&128)for(n=a.child;n!==null;){if(k=Bd(n),k!==null){for(a.flags|=128,gf(x,!1),h=k.updateQueue,h!==null&&(a.updateQueue=h,a.flags|=4),a.subtreeFlags=0,h=c,c=a.child;c!==null;)x=c,n=h,x.flags&=14680066,k=x.alternate,k===null?(x.childLanes=0,x.lanes=n,x.child=null,x.subtreeFlags=0,x.memoizedProps=null,x.memoizedState=null,x.updateQueue=null,x.dependencies=null,x.stateNode=null):(x.childLanes=k.childLanes,x.lanes=k.lanes,x.child=k.child,x.subtreeFlags=0,x.deletions=null,x.memoizedProps=k.memoizedProps,x.memoizedState=k.memoizedState,x.updateQueue=k.updateQueue,x.type=k.type,n=k.dependencies,x.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),c=c.sibling;return dt(en,en.current&1|2),a.child}n=n.sibling}x.tail!==null&&Ot()>Ju&&(a.flags|=128,h=!0,gf(x,!1),a.lanes=4194304)}else{if(!h)if(n=Bd(k),n!==null){if(a.flags|=128,h=!0,c=n.updateQueue,c!==null&&(a.updateQueue=c,a.flags|=4),gf(x,!0),x.tail===null&&x.tailMode==="hidden"&&!k.alternate&&!Yr)return Un(a),null}else 2*Ot()-x.renderingStartTime>Ju&&c!==1073741824&&(a.flags|=128,h=!0,gf(x,!1),a.lanes=4194304);x.isBackwards?(k.sibling=a.child,a.child=k):(c=x.last,c!==null?c.sibling=k:a.child=k,x.last=k)}return x.tail!==null?(a=x.tail,x.rendering=a,x.tail=a.sibling,x.renderingStartTime=Ot(),a.sibling=null,c=en.current,dt(en,h?c&1|2:c&1),a):(Un(a),null);case 22:case 23:return dp(),h=a.memoizedState!==null,n!==null&&n.memoizedState!==null!==h&&(a.flags|=8192),h&&a.mode&1?la&1073741824&&(Un(a),a.subtreeFlags&6&&(a.flags|=8192)):Un(a),null;case 24:return null;case 25:return null}throw Error(i(156,a.tag))}function nh(n,a){switch(Ad(a),a.tag){case 1:return yn(a.type)&&qu(),n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 3:return Ul(),$r(Nn),$r(an),pt(),n=a.flags,n&65536&&!(n&128)?(a.flags=n&-65537|128,a):null;case 5:return Nd(a),null;case 13:if($r(en),n=a.memoizedState,n!==null&&n.dehydrated!==null){if(a.alternate===null)throw Error(i(340));qo()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 19:return $r(en),null;case 4:return Ul(),null;case 10:return U0(a.type._context),null;case 22:case 23:return dp(),null;case 24:return null;default:return null}}var mf=!1,hi=!1,M1=typeof WeakSet=="function"?WeakSet:Set,et=null;function Qu(n,a){var c=n.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(h){Vr(n,a,h)}else c.current=null}function ih(n,a,c){try{c()}catch(h){Vr(n,a,h)}}var Vg=!1;function Wg(n,a){if(Vc=wa,n=jc(),pd(n)){if("selectionStart"in n)var c={start:n.selectionStart,end:n.selectionEnd};else e:{c=(c=n.ownerDocument)&&c.defaultView||window;var h=c.getSelection&&c.getSelection();if(h&&h.rangeCount!==0){c=h.anchorNode;var m=h.anchorOffset,x=h.focusNode;h=h.focusOffset;try{c.nodeType,x.nodeType}catch{c=null;break e}var k=0,Y=-1,Q=-1,fe=0,Fe=0,Ne=n,ke=null;t:for(;;){for(var Qe;Ne!==c||m!==0&&Ne.nodeType!==3||(Y=k+m),Ne!==x||h!==0&&Ne.nodeType!==3||(Q=k+h),Ne.nodeType===3&&(k+=Ne.nodeValue.length),(Qe=Ne.firstChild)!==null;)ke=Ne,Ne=Qe;for(;;){if(Ne===n)break t;if(ke===c&&++fe===m&&(Y=k),ke===x&&++Fe===h&&(Q=k),(Qe=Ne.nextSibling)!==null)break;Ne=ke,ke=Ne.parentNode}Ne=Qe}c=Y===-1||Q===-1?null:{start:Y,end:Q}}else c=null}c=c||{start:0,end:0}}else c=null;for(Bl={focusedElem:n,selectionRange:c},wa=!1,et=a;et!==null;)if(a=et,n=a.child,(a.subtreeFlags&1028)!==0&&n!==null)n.return=a,et=n;else for(;et!==null;){a=et;try{var st=a.alternate;if(a.flags&1024)switch(a.tag){case 0:case 11:case 15:break;case 1:if(st!==null){var ut=st.memoizedProps,hn=st.memoizedState,ne=a.stateNode,te=ne.getSnapshotBeforeUpdate(a.elementType===a.type?ut:Ja(a.type,ut),hn);ne.__reactInternalSnapshotBeforeUpdate=te}break;case 3:var oe=a.stateNode.containerInfo;oe.nodeType===1?oe.textContent="":oe.nodeType===9&&oe.documentElement&&oe.removeChild(oe.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(i(163))}}catch(Oe){Vr(a,a.return,Oe)}if(n=a.sibling,n!==null){n.return=a.return,et=n;break}et=a.return}return st=Vg,Vg=!1,st}function yf(n,a,c){var h=a.updateQueue;if(h=h!==null?h.lastEffect:null,h!==null){var m=h=h.next;do{if((m.tag&n)===n){var x=m.destroy;m.destroy=void 0,x!==void 0&&ih(a,c,x)}m=m.next}while(m!==h)}}function xf(n,a){if(a=a.updateQueue,a=a!==null?a.lastEffect:null,a!==null){var c=a=a.next;do{if((c.tag&n)===n){var h=c.create;c.destroy=h()}c=c.next}while(c!==a)}}function ap(n){var a=n.ref;if(a!==null){var c=n.stateNode;switch(n.tag){case 5:n=c;break;default:n=c}typeof a=="function"?a(n):a.current=n}}function ah(n){var a=n.alternate;a!==null&&(n.alternate=null,ah(a)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(a=n.stateNode,a!==null&&(delete a[Ss],delete a[Wc],delete a[Gc],delete a[zu],delete a[N1])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function Ef(n){return n.tag===5||n.tag===3||n.tag===4}function no(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Ef(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Rs(n,a,c){var h=n.tag;if(h===5||h===6)n=n.stateNode,a?c.nodeType===8?c.parentNode.insertBefore(n,a):c.insertBefore(n,a):(c.nodeType===8?(a=c.parentNode,a.insertBefore(n,c)):(a=c,a.appendChild(n)),c=c._reactRootContainer,c!=null||a.onclick!==null||(a.onclick=$o));else if(h!==4&&(n=n.child,n!==null))for(Rs(n,a,c),n=n.sibling;n!==null;)Rs(n,a,c),n=n.sibling}function As(n,a,c){var h=n.tag;if(h===5||h===6)n=n.stateNode,a?c.insertBefore(n,a):c.appendChild(n);else if(h!==4&&(n=n.child,n!==null))for(As(n,a,c),n=n.sibling;n!==null;)As(n,a,c),n=n.sibling}var fn=null,Si=!1;function Ci(n,a,c){for(c=c.child;c!==null;)Gg(n,a,c),c=c.sibling}function Gg(n,a,c){if($i&&typeof $i.onCommitFiberUnmount=="function")try{$i.onCommitFiberUnmount(Ao,c)}catch{}switch(c.tag){case 5:hi||Qu(c,a);case 6:var h=fn,m=Si;fn=null,Ci(n,a,c),fn=h,Si=m,fn!==null&&(Si?(n=fn,c=c.stateNode,n.nodeType===8?n.parentNode.removeChild(c):n.removeChild(c)):fn.removeChild(c.stateNode));break;case 18:fn!==null&&(Si?(n=fn,c=c.stateNode,n.nodeType===8?ju(n.parentNode,c):n.nodeType===1&&ju(n,c),Ga(n)):ju(fn,c.stateNode));break;case 4:h=fn,m=Si,fn=c.stateNode.containerInfo,Si=!0,Ci(n,a,c),fn=h,Si=m;break;case 0:case 11:case 14:case 15:if(!hi&&(h=c.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){m=h=h.next;do{var x=m,k=x.destroy;x=x.tag,k!==void 0&&(x&2||x&4)&&ih(c,a,k),m=m.next}while(m!==h)}Ci(n,a,c);break;case 1:if(!hi&&(Qu(c,a),h=c.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=c.memoizedProps,h.state=c.memoizedState,h.componentWillUnmount()}catch(Y){Vr(c,a,Y)}Ci(n,a,c);break;case 21:Ci(n,a,c);break;case 22:c.mode&1?(hi=(h=hi)||c.memoizedState!==null,Ci(n,a,c),hi=h):Ci(n,a,c);break;default:Ci(n,a,c)}}function Kg(n){var a=n.updateQueue;if(a!==null){n.updateQueue=null;var c=n.stateNode;c===null&&(c=n.stateNode=new M1),a.forEach(function(h){var m=im.bind(null,n,h);c.has(h)||(c.add(h),h.then(m,m))})}}function es(n,a){var c=a.deletions;if(c!==null)for(var h=0;h<c.length;h++){var m=c[h];try{var x=n,k=a,Y=k;e:for(;Y!==null;){switch(Y.tag){case 5:fn=Y.stateNode,Si=!1;break e;case 3:fn=Y.stateNode.containerInfo,Si=!0;break e;case 4:fn=Y.stateNode.containerInfo,Si=!0;break e}Y=Y.return}if(fn===null)throw Error(i(160));Gg(x,k,m),fn=null,Si=!1;var Q=m.alternate;Q!==null&&(Q.return=null),m.return=null}catch(fe){Vr(m,a,fe)}}if(a.subtreeFlags&12854)for(a=a.child;a!==null;)sp(a,n),a=a.sibling}function sp(n,a){var c=n.alternate,h=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:if(es(a,n),Wi(n),h&4){try{yf(3,n,n.return),xf(3,n)}catch(ut){Vr(n,n.return,ut)}try{yf(5,n,n.return)}catch(ut){Vr(n,n.return,ut)}}break;case 1:es(a,n),Wi(n),h&512&&c!==null&&Qu(c,c.return);break;case 5:if(es(a,n),Wi(n),h&512&&c!==null&&Qu(c,c.return),n.flags&32){var m=n.stateNode;try{Pe(m,"")}catch(ut){Vr(n,n.return,ut)}}if(h&4&&(m=n.stateNode,m!=null)){var x=n.memoizedProps,k=c!==null?c.memoizedProps:x,Y=n.type,Q=n.updateQueue;if(n.updateQueue=null,Q!==null)try{Y==="input"&&x.type==="radio"&&x.name!=null&&br(m,x),gn(Y,k);var fe=gn(Y,x);for(k=0;k<Q.length;k+=2){var Fe=Q[k],Ne=Q[k+1];Fe==="style"?Cr(m,Ne):Fe==="dangerouslySetInnerHTML"?ra(m,Ne):Fe==="children"?Pe(m,Ne):U(m,Fe,Ne,fe)}switch(Y){case"input":nn(m,x);break;case"textarea":ci(m,x);break;case"select":var ke=m._wrapperState.wasMultiple;m._wrapperState.wasMultiple=!!x.multiple;var Qe=x.value;Qe!=null?tr(m,!!x.multiple,Qe,!1):ke!==!!x.multiple&&(x.defaultValue!=null?tr(m,!!x.multiple,x.defaultValue,!0):tr(m,!!x.multiple,x.multiple?[]:"",!1))}m[Wc]=x}catch(ut){Vr(n,n.return,ut)}}break;case 6:if(es(a,n),Wi(n),h&4){if(n.stateNode===null)throw Error(i(162));m=n.stateNode,x=n.memoizedProps;try{m.nodeValue=x}catch(ut){Vr(n,n.return,ut)}}break;case 3:if(es(a,n),Wi(n),h&4&&c!==null&&c.memoizedState.isDehydrated)try{Ga(a.containerInfo)}catch(ut){Vr(n,n.return,ut)}break;case 4:es(a,n),Wi(n);break;case 13:es(a,n),Wi(n),m=n.child,m.flags&8192&&(x=m.memoizedState!==null,m.stateNode.isHidden=x,!x||m.alternate!==null&&m.alternate.memoizedState!==null||(up=Ot())),h&4&&Kg(n);break;case 22:if(Fe=c!==null&&c.memoizedState!==null,n.mode&1?(hi=(fe=hi)||Fe,es(a,n),hi=fe):es(a,n),Wi(n),h&8192){if(fe=n.memoizedState!==null,(n.stateNode.isHidden=fe)&&!Fe&&n.mode&1)for(et=n,Fe=n.child;Fe!==null;){for(Ne=et=Fe;et!==null;){switch(ke=et,Qe=ke.child,ke.tag){case 0:case 11:case 14:case 15:yf(4,ke,ke.return);break;case 1:Qu(ke,ke.return);var st=ke.stateNode;if(typeof st.componentWillUnmount=="function"){h=ke,c=ke.return;try{a=h,st.props=a.memoizedProps,st.state=a.memoizedState,st.componentWillUnmount()}catch(ut){Vr(h,c,ut)}}break;case 5:Qu(ke,ke.return);break;case 22:if(ke.memoizedState!==null){Sf(Ne);continue}}Qe!==null?(Qe.return=ke,et=Qe):Sf(Ne)}Fe=Fe.sibling}e:for(Fe=null,Ne=n;;){if(Ne.tag===5){if(Fe===null){Fe=Ne;try{m=Ne.stateNode,fe?(x=m.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none"):(Y=Ne.stateNode,Q=Ne.memoizedProps.style,k=Q!=null&&Q.hasOwnProperty("display")?Q.display:null,Y.style.display=rr("display",k))}catch(ut){Vr(n,n.return,ut)}}}else if(Ne.tag===6){if(Fe===null)try{Ne.stateNode.nodeValue=fe?"":Ne.memoizedProps}catch(ut){Vr(n,n.return,ut)}}else if((Ne.tag!==22&&Ne.tag!==23||Ne.memoizedState===null||Ne===n)&&Ne.child!==null){Ne.child.return=Ne,Ne=Ne.child;continue}if(Ne===n)break e;for(;Ne.sibling===null;){if(Ne.return===null||Ne.return===n)break e;Fe===Ne&&(Fe=null),Ne=Ne.return}Fe===Ne&&(Fe=null),Ne.sibling.return=Ne.return,Ne=Ne.sibling}}break;case 19:es(a,n),Wi(n),h&4&&Kg(n);break;case 21:break;default:es(a,n),Wi(n)}}function Wi(n){var a=n.flags;if(a&2){try{e:{for(var c=n.return;c!==null;){if(Ef(c)){var h=c;break e}c=c.return}throw Error(i(160))}switch(h.tag){case 5:var m=h.stateNode;h.flags&32&&(Pe(m,""),h.flags&=-33);var x=no(n);As(n,x,m);break;case 3:case 4:var k=h.stateNode.containerInfo,Y=no(n);Rs(n,Y,k);break;default:throw Error(i(161))}}catch(Q){Vr(n,n.return,Q)}n.flags&=-3}a&4096&&(n.flags&=-4097)}function H1(n,a,c){et=n,op(n)}function op(n,a,c){for(var h=(n.mode&1)!==0;et!==null;){var m=et,x=m.child;if(m.tag===22&&h){var k=m.memoizedState!==null||mf;if(!k){var Y=m.alternate,Q=Y!==null&&Y.memoizedState!==null||hi;Y=mf;var fe=hi;if(mf=k,(hi=Q)&&!fe)for(et=m;et!==null;)k=et,Q=k.child,k.tag===22&&k.memoizedState!==null?lp(m):Q!==null?(Q.return=k,et=Q):lp(m);for(;x!==null;)et=x,op(x),x=x.sibling;et=m,mf=Y,hi=fe}Qg(n)}else m.subtreeFlags&8772&&x!==null?(x.return=m,et=x):Qg(n)}}function Qg(n){for(;et!==null;){var a=et;if(a.flags&8772){var c=a.alternate;try{if(a.flags&8772)switch(a.tag){case 0:case 11:case 15:hi||xf(5,a);break;case 1:var h=a.stateNode;if(a.flags&4&&!hi)if(c===null)h.componentDidMount();else{var m=a.elementType===a.type?c.memoizedProps:Ja(a.type,c.memoizedProps);h.componentDidUpdate(m,c.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var x=a.updateQueue;x!==null&&V0(a,x,h);break;case 3:var k=a.updateQueue;if(k!==null){if(c=null,a.child!==null)switch(a.child.tag){case 5:c=a.child.stateNode;break;case 1:c=a.child.stateNode}V0(a,k,c)}break;case 5:var Y=a.stateNode;if(c===null&&a.flags&4){c=Y;var Q=a.memoizedProps;switch(a.type){case"button":case"input":case"select":case"textarea":Q.autoFocus&&c.focus();break;case"img":Q.src&&(c.src=Q.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(a.memoizedState===null){var fe=a.alternate;if(fe!==null){var Fe=fe.memoizedState;if(Fe!==null){var Ne=Fe.dehydrated;Ne!==null&&Ga(Ne)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(i(163))}hi||a.flags&512&&ap(a)}catch(ke){Vr(a,a.return,ke)}}if(a===n){et=null;break}if(c=a.sibling,c!==null){c.return=a.return,et=c;break}et=a.return}}function Sf(n){for(;et!==null;){var a=et;if(a===n){et=null;break}var c=a.sibling;if(c!==null){c.return=a.return,et=c;break}et=a.return}}function lp(n){for(;et!==null;){var a=et;try{switch(a.tag){case 0:case 11:case 15:var c=a.return;try{xf(4,a)}catch(Q){Vr(a,c,Q)}break;case 1:var h=a.stateNode;if(typeof h.componentDidMount=="function"){var m=a.return;try{h.componentDidMount()}catch(Q){Vr(a,m,Q)}}var x=a.return;try{ap(a)}catch(Q){Vr(a,x,Q)}break;case 5:var k=a.return;try{ap(a)}catch(Q){Vr(a,k,Q)}}}catch(Q){Vr(a,a.return,Q)}if(a===n){et=null;break}var Y=a.sibling;if(Y!==null){Y.return=a.return,et=Y;break}et=a.return}}var I1=Math.ceil,Ko=q.ReactCurrentDispatcher,Ql=q.ReactCurrentOwner,Xn=q.ReactCurrentBatchConfig,Wt=0,Mn=null,wn=null,Zn=0,la=0,Xu=Da(0),dn=0,Cf=null,ks=0,Zu=0,sh=0,wf=null,Gi=null,up=0,Ju=1/0,ua=null,ec=!1,Xl=null,Qo=null,oh=!1,io=null,bf=0,Xo=0,tc=null,_f=-1,pi=0;function bn(){return Wt&6?Ot():_f!==-1?_f:_f=Ot()}function Fs(n){return n.mode&1?Wt&2&&Zn!==0?Zn&-Zn:B1.transition!==null?(pi===0&&(pi=Tu()),pi):(n=sr,n!==0||(n=window.event,n=n===void 0?16:Bu(n.type)),n):1}function wi(n,a,c,h){if(50<Xo)throw Xo=0,tc=null,Error(i(185));Ys(n,c,h),(!(Wt&2)||n!==Mn)&&(n===Mn&&(!(Wt&2)&&(Zu|=c),dn===4&&ts(n,Zn)),Ki(n,h),c===1&&Wt===0&&!(a.mode&1)&&(Ju=Ot()+500,Yu&&ws()))}function Ki(n,a){var c=n.callbackNode;_l(n,a);var h=Wa(n,n===Mn?Zn:0);if(h===0)c!==null&&Wn(c),n.callbackNode=null,n.callbackPriority=0;else if(a=h&-h,n.callbackPriority!==a){if(c!=null&&Wn(c),a===1)n.tag===0?Lo(cp.bind(null,n)):Td(cp.bind(null,n)),Uu(function(){!(Wt&6)&&ws()}),c=null;else{switch(Au(h)){case 1:c=Ya;break;case 4:c=wl;break;case 16:c=bl;break;case 536870912:c=bu;break;default:c=bl}c=sm(c,lh.bind(null,n))}n.callbackPriority=a,n.callbackNode=c}}function lh(n,a){if(_f=-1,pi=0,Wt&6)throw Error(i(327));var c=n.callbackNode;if(rc()&&n.callbackNode!==c)return null;var h=Wa(n,n===Mn?Zn:0);if(h===0)return null;if(h&30||h&n.expiredLanes||a)a=uh(n,h);else{a=h;var m=Wt;Wt|=2;var x=Zg();(Mn!==n||Zn!==a)&&(ua=null,Ju=Ot()+500,ao(n,a));do try{Jg();break}catch(Y){Xg(n,Y)}while(!0);L0(),Ko.current=x,Wt=m,wn!==null?a=0:(Mn=null,Zn=0,a=dn)}if(a!==0){if(a===2&&(m=Fo(n),m!==0&&(h=m,a=Df(n,m))),a===1)throw c=Cf,ao(n,0),ts(n,h),Ki(n,Ot()),c;if(a===6)ts(n,h);else{if(m=n.current.alternate,!(h&30)&&!$1(m)&&(a=uh(n,h),a===2&&(x=Fo(n),x!==0&&(h=x,a=Df(n,x))),a===1))throw c=Cf,ao(n,0),ts(n,h),Ki(n,Ot()),c;switch(n.finishedWork=m,n.finishedLanes=h,a){case 0:case 1:throw Error(i(345));case 2:eu(n,Gi,ua);break;case 3:if(ts(n,h),(h&130023424)===h&&(a=up+500-Ot(),10<a)){if(Wa(n,0)!==0)break;if(m=n.suspendedLanes,(m&h)!==h){bn(),n.pingedLanes|=n.suspendedLanes&m;break}n.timeoutHandle=bd(eu.bind(null,n,Gi,ua),a);break}eu(n,Gi,ua);break;case 4:if(ts(n,h),(h&4194240)===h)break;for(a=n.eventTimes,m=-1;0<h;){var k=31-mi(h);x=1<<k,k=a[k],k>m&&(m=k),h&=~x}if(h=m,h=Ot()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*I1(h/1960))-h,10<h){n.timeoutHandle=bd(eu.bind(null,n,Gi,ua),h);break}eu(n,Gi,ua);break;case 5:eu(n,Gi,ua);break;default:throw Error(i(329))}}}return Ki(n,Ot()),n.callbackNode===c?lh.bind(null,n):null}function Df(n,a){var c=wf;return n.current.memoizedState.isDehydrated&&(ao(n,a).flags|=256),n=uh(n,a),n!==2&&(a=Gi,Gi=c,a!==null&&Zl(a)),n}function Zl(n){Gi===null?Gi=n:Gi.push.apply(Gi,n)}function $1(n){for(var a=n;;){if(a.flags&16384){var c=a.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var h=0;h<c.length;h++){var m=c[h],x=m.getSnapshot;m=m.value;try{if(!Qa(x(),m))return!1}catch{return!1}}}if(c=a.child,a.subtreeFlags&16384&&c!==null)c.return=a,a=c;else{if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function ts(n,a){for(a&=~sh,a&=~Zu,n.suspendedLanes|=a,n.pingedLanes&=~a,n=n.expirationTimes;0<a;){var c=31-mi(a),h=1<<c;n[c]=-1,a&=~h}}function cp(n){if(Wt&6)throw Error(i(327));rc();var a=Wa(n,0);if(!(a&1))return Ki(n,Ot()),null;var c=uh(n,a);if(n.tag!==0&&c===2){var h=Fo(n);h!==0&&(a=h,c=Df(n,h))}if(c===1)throw c=Cf,ao(n,0),ts(n,a),Ki(n,Ot()),c;if(c===6)throw Error(i(345));return n.finishedWork=n.current.alternate,n.finishedLanes=a,eu(n,Gi,ua),Ki(n,Ot()),null}function fp(n,a){var c=Wt;Wt|=1;try{return n(a)}finally{Wt=c,Wt===0&&(Ju=Ot()+500,Yu&&ws())}}function Jl(n){io!==null&&io.tag===0&&!(Wt&6)&&rc();var a=Wt;Wt|=1;var c=Xn.transition,h=sr;try{if(Xn.transition=null,sr=1,n)return n()}finally{sr=h,Xn.transition=c,Wt=a,!(Wt&6)&&ws()}}function dp(){la=Xu.current,$r(Xu)}function ao(n,a){n.finishedWork=null,n.finishedLanes=0;var c=n.timeoutHandle;if(c!==-1&&(n.timeoutHandle=-1,M0(c)),wn!==null)for(c=wn.return;c!==null;){var h=c;switch(Ad(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&qu();break;case 3:Ul(),$r(Nn),$r(an),pt();break;case 5:Nd(h);break;case 4:Ul();break;case 13:$r(en);break;case 19:$r(en);break;case 10:U0(h.type._context);break;case 22:case 23:dp()}c=c.return}if(Mn=n,wn=n=Zo(n.current,null),Zn=la=a,dn=0,Cf=null,sh=Zu=ks=0,Gi=wf=null,Pl!==null){for(a=0;a<Pl.length;a++)if(c=Pl[a],h=c.interleaved,h!==null){c.interleaved=null;var m=h.next,x=c.pending;if(x!==null){var k=x.next;x.next=m,h.next=k}c.pending=h}Pl=null}return n}function Xg(n,a){do{var c=wn;try{if(L0(),It.current=Wl,Md){for(var h=lr.memoizedState;h!==null;){var m=h.queue;m!==null&&(m.pending=null),h=h.next}Md=!1}if(Rr=0,Ln=En=lr=null,rf=!1,jl=0,Ql.current=null,c===null||c.return===null){dn=1,Cf=a,wn=null;break}e:{var x=n,k=c.return,Y=c,Q=a;if(a=Zn,Y.flags|=32768,Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var fe=Q,Fe=Y,Ne=Fe.tag;if(!(Fe.mode&1)&&(Ne===0||Ne===11||Ne===15)){var ke=Fe.alternate;ke?(Fe.updateQueue=ke.updateQueue,Fe.memoizedState=ke.memoizedState,Fe.lanes=ke.lanes):(Fe.updateQueue=null,Fe.memoizedState=null)}var Qe=$g(k);if(Qe!==null){Qe.flags&=-257,Go(Qe,k,Y,x,a),Qe.mode&1&&ep(x,fe,a),a=Qe,Q=fe;var st=a.updateQueue;if(st===null){var ut=new Set;ut.add(Q),a.updateQueue=ut}else st.add(Q);break e}else{if(!(a&1)){ep(x,fe,a),hp();break e}Q=Error(i(426))}}else if(Yr&&Y.mode&1){var hn=$g(k);if(hn!==null){!(hn.flags&65536)&&(hn.flags|=256),Go(hn,k,Y,x,a),eo(Gl(Q,Y));break e}}x=Q=Gl(Q,Y),dn!==4&&(dn=2),wf===null?wf=[x]:wf.push(x),x=k;do{switch(x.tag){case 3:x.flags|=65536,a&=-a,x.lanes|=a;var ne=Ig(x,Q,a);Og(x,ne);break e;case 1:Y=Q;var te=x.type,oe=x.stateNode;if(!(x.flags&128)&&(typeof te.getDerivedStateFromError=="function"||oe!==null&&typeof oe.componentDidCatch=="function"&&(Qo===null||!Qo.has(oe)))){x.flags|=65536,a&=-a,x.lanes|=a;var Oe=J0(x,Y,a);Og(x,Oe);break e}}x=x.return}while(x!==null)}tm(c)}catch(ot){a=ot,wn===c&&c!==null&&(wn=c=c.return);continue}break}while(!0)}function Zg(){var n=Ko.current;return Ko.current=Wl,n===null?Wl:n}function hp(){(dn===0||dn===3||dn===2)&&(dn=4),Mn===null||!(ks&268435455)&&!(Zu&268435455)||ts(Mn,Zn)}function uh(n,a){var c=Wt;Wt|=2;var h=Zg();(Mn!==n||Zn!==a)&&(ua=null,ao(n,a));do try{P1();break}catch(m){Xg(n,m)}while(!0);if(L0(),Wt=c,Ko.current=h,wn!==null)throw Error(i(261));return Mn=null,Zn=0,dn}function P1(){for(;wn!==null;)em(wn)}function Jg(){for(;wn!==null&&!za();)em(wn)}function em(n){var a=am(n.alternate,n,la);n.memoizedProps=n.pendingProps,a===null?tm(n):wn=a,Ql.current=null}function tm(n){var a=n;do{var c=a.alternate;if(n=a.return,a.flags&32768){if(c=nh(c,a),c!==null){c.flags&=32767,wn=c;return}if(n!==null)n.flags|=32768,n.subtreeFlags=0,n.deletions=null;else{dn=6,wn=null;return}}else if(c=Yg(c,a,la),c!==null){wn=c;return}if(a=a.sibling,a!==null){wn=a;return}wn=a=n}while(a!==null);dn===0&&(dn=5)}function eu(n,a,c){var h=sr,m=Xn.transition;try{Xn.transition=null,sr=1,L1(n,a,c,h)}finally{Xn.transition=m,sr=h}return null}function L1(n,a,c,h){do rc();while(io!==null);if(Wt&6)throw Error(i(327));c=n.finishedWork;var m=n.finishedLanes;if(c===null)return null;if(n.finishedWork=null,n.finishedLanes=0,c===n.current)throw Error(i(177));n.callbackNode=null,n.callbackPriority=0;var x=c.lanes|c.childLanes;if(p0(n,x),n===Mn&&(wn=Mn=null,Zn=0),!(c.subtreeFlags&2064)&&!(c.flags&2064)||oh||(oh=!0,sm(bl,function(){return rc(),null})),x=(c.flags&15990)!==0,c.subtreeFlags&15990||x){x=Xn.transition,Xn.transition=null;var k=sr;sr=1;var Y=Wt;Wt|=4,Ql.current=null,Wg(n,c),sp(c,n),Iu(Bl),wa=!!Vc,Bl=Vc=null,n.current=c,H1(c),qa(),Wt=Y,sr=k,Xn.transition=x}else n.current=c;if(oh&&(oh=!1,io=n,bf=m),x=n.pendingLanes,x===0&&(Qo=null),Oc(c.stateNode),Ki(n,Ot()),a!==null)for(h=n.onRecoverableError,c=0;c<a.length;c++)m=a[c],h(m.value,{componentStack:m.stack,digest:m.digest});if(ec)throw ec=!1,n=Xl,Xl=null,n;return bf&1&&n.tag!==0&&rc(),x=n.pendingLanes,x&1?n===tc?Xo++:(Xo=0,tc=n):Xo=0,ws(),null}function rc(){if(io!==null){var n=Au(bf),a=Xn.transition,c=sr;try{if(Xn.transition=null,sr=16>n?16:n,io===null)var h=!1;else{if(n=io,io=null,bf=0,Wt&6)throw Error(i(331));var m=Wt;for(Wt|=4,et=n.current;et!==null;){var x=et,k=x.child;if(et.flags&16){var Y=x.deletions;if(Y!==null){for(var Q=0;Q<Y.length;Q++){var fe=Y[Q];for(et=fe;et!==null;){var Fe=et;switch(Fe.tag){case 0:case 11:case 15:yf(8,Fe,x)}var Ne=Fe.child;if(Ne!==null)Ne.return=Fe,et=Ne;else for(;et!==null;){Fe=et;var ke=Fe.sibling,Qe=Fe.return;if(ah(Fe),Fe===fe){et=null;break}if(ke!==null){ke.return=Qe,et=ke;break}et=Qe}}}var st=x.alternate;if(st!==null){var ut=st.child;if(ut!==null){st.child=null;do{var hn=ut.sibling;ut.sibling=null,ut=hn}while(ut!==null)}}et=x}}if(x.subtreeFlags&2064&&k!==null)k.return=x,et=k;else e:for(;et!==null;){if(x=et,x.flags&2048)switch(x.tag){case 0:case 11:case 15:yf(9,x,x.return)}var ne=x.sibling;if(ne!==null){ne.return=x.return,et=ne;break e}et=x.return}}var te=n.current;for(et=te;et!==null;){k=et;var oe=k.child;if(k.subtreeFlags&2064&&oe!==null)oe.return=k,et=oe;else e:for(k=te;et!==null;){if(Y=et,Y.flags&2048)try{switch(Y.tag){case 0:case 11:case 15:xf(9,Y)}}catch(ot){Vr(Y,Y.return,ot)}if(Y===k){et=null;break e}var Oe=Y.sibling;if(Oe!==null){Oe.return=Y.return,et=Oe;break e}et=Y.return}}if(Wt=m,ws(),$i&&typeof $i.onPostCommitFiberRoot=="function")try{$i.onPostCommitFiberRoot(Ao,n)}catch{}h=!0}return h}finally{sr=c,Xn.transition=a}}return!1}function rm(n,a,c){a=Gl(c,a),a=Ig(n,a,1),n=Yo(n,a,1),a=bn(),n!==null&&(Ys(n,1,a),Ki(n,a))}function Vr(n,a,c){if(n.tag===3)rm(n,n,c);else for(;a!==null;){if(a.tag===3){rm(a,n,c);break}else if(a.tag===1){var h=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Qo===null||!Qo.has(h))){n=Gl(c,n),n=J0(a,n,1),a=Yo(a,n,1),n=bn(),a!==null&&(Ys(a,1,n),Ki(a,n));break}}a=a.return}}function U1(n,a,c){var h=n.pingCache;h!==null&&h.delete(a),a=bn(),n.pingedLanes|=n.suspendedLanes&c,Mn===n&&(Zn&c)===c&&(dn===4||dn===3&&(Zn&130023424)===Zn&&500>Ot()-up?ao(n,0):sh|=c),Ki(n,a)}function nm(n,a){a===0&&(n.mode&1?(a=na,na<<=1,!(na&130023424)&&(na=4194304)):a=1);var c=bn();n=sa(n,a),n!==null&&(Ys(n,a,c),Ki(n,c))}function j1(n){var a=n.memoizedState,c=0;a!==null&&(c=a.retryLane),nm(n,c)}function im(n,a){var c=0;switch(n.tag){case 13:var h=n.stateNode,m=n.memoizedState;m!==null&&(c=m.retryLane);break;case 19:h=n.stateNode;break;default:throw Error(i(314))}h!==null&&h.delete(a),nm(n,c)}var am;am=function(n,a,c){if(n!==null)if(n.memoizedProps!==a.pendingProps||Nn.current)Sn=!0;else{if(!(n.lanes&c)&&!(a.flags&128))return Sn=!1,vf(n,a,c);Sn=!!(n.flags&131072)}else Sn=!1,Yr&&a.flags&1048576&&Rg(a,Js,a.index);switch(a.lanes=0,a.tag){case 2:var h=a.type;ka(n,a),n=a.pendingProps;var m=Ui(a,an.current);Jr(a,c),m=Vo(null,a,h,n,m,c);var x=Za();return a.flags|=1,typeof m=="object"&&m!==null&&typeof m.render=="function"&&m.$$typeof===void 0?(a.tag=1,a.memoizedState=null,a.updateQueue=null,yn(h)?(x=!0,Pn(a)):x=!1,a.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,Y0(a),m.updater=Zd,a.stateNode=m,m._reactInternals=a,cf(a,h,n,c),a=hf(null,a,h,!0,x,c)):(a.tag=0,Yr&&x&&Rd(a),Qn(null,a,m,c),a=a.child),a;case 16:h=a.elementType;e:{switch(ka(n,a),n=a.pendingProps,m=h._init,h=m(h._payload),a.type=h,m=a.tag=q1(h),n=Ja(h,n),m){case 0:a=Pg(null,a,h,n,c);break e;case 1:a=Lg(null,a,h,n,c);break e;case 11:a=Vi(null,a,h,n,c);break e;case 14:a=Kl(null,a,h,Ja(h.type,n),c);break e}throw Error(i(306,h,""))}return a;case 0:return h=a.type,m=a.pendingProps,m=a.elementType===h?m:Ja(h,m),Pg(n,a,h,m,c);case 1:return h=a.type,m=a.pendingProps,m=a.elementType===h?m:Ja(h,m),Lg(n,a,h,m,c);case 3:e:{if(Ku(a),n===null)throw Error(i(387));h=a.pendingProps,x=a.memoizedState,m=x.element,Fg(n,a),Xc(a,h,null,c);var k=a.memoizedState;if(h=k.element,x.isDehydrated)if(x={element:h,isDehydrated:!1,cache:k.cache,pendingSuspenseBoundaries:k.pendingSuspenseBoundaries,transitions:k.transitions},a.updateQueue.baseState=x,a.memoizedState=x,a.flags&256){m=Gl(Error(i(423)),a),a=Ug(n,a,h,c,m);break e}else if(h!==m){m=Gl(Error(i(424)),a),a=Ug(n,a,h,c,m);break e}else for(zi=Es(a.stateNode.containerInfo.firstChild),ji=a,Yr=!0,Ra=null,c=qe(a,null,h,c),a.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(qo(),h===m){a=Fa(n,a,c);break e}Qn(n,a,h,c)}a=a.child}return a;case 5:return Ng(a),n===null&&$0(a),h=a.type,m=a.pendingProps,x=n!==null?n.memoizedProps:null,k=m.children,wd(h,m)?k=null:x!==null&&wd(h,x)&&(a.flags|=32),tp(n,a),Qn(n,a,k,c),a.child;case 6:return n===null&&$0(a),null;case 13:return rh(n,a,c);case 4:return W0(a,a.stateNode.containerInfo),h=a.pendingProps,n===null?a.child=un(a,null,h,c):Qn(n,a,h,c),a.child;case 11:return h=a.type,m=a.pendingProps,m=a.elementType===h?m:Ja(h,m),Vi(n,a,h,m,c);case 7:return Qn(n,a,a.pendingProps,c),a.child;case 8:return Qn(n,a,a.pendingProps.children,c),a.child;case 12:return Qn(n,a,a.pendingProps.children,c),a.child;case 10:e:{if(h=a.type._context,m=a.pendingProps,x=a.memoizedProps,k=m.value,dt(aa,h._currentValue),h._currentValue=k,x!==null)if(Qa(x.value,k)){if(x.children===m.children&&!Nn.current){a=Fa(n,a,c);break e}}else for(x=a.child,x!==null&&(x.return=a);x!==null;){var Y=x.dependencies;if(Y!==null){k=x.child;for(var Q=Y.firstContext;Q!==null;){if(Q.context===h){if(x.tag===1){Q=to(-1,c&-c),Q.tag=2;var fe=x.updateQueue;if(fe!==null){fe=fe.shared;var Fe=fe.pending;Fe===null?Q.next=Q:(Q.next=Fe.next,Fe.next=Q),fe.pending=Q}}x.lanes|=c,Q=x.alternate,Q!==null&&(Q.lanes|=c),j0(x.return,c,a),Y.lanes|=c;break}Q=Q.next}}else if(x.tag===10)k=x.type===a.type?null:x.child;else if(x.tag===18){if(k=x.return,k===null)throw Error(i(341));k.lanes|=c,Y=k.alternate,Y!==null&&(Y.lanes|=c),j0(k,c,a),k=x.sibling}else k=x.child;if(k!==null)k.return=x;else for(k=x;k!==null;){if(k===a){k=null;break}if(x=k.sibling,x!==null){x.return=k.return,k=x;break}k=k.return}x=k}Qn(n,a,m.children,c),a=a.child}return a;case 9:return m=a.type,h=a.pendingProps.children,Jr(a,c),m=Aa(m),h=h(m),a.flags|=1,Qn(n,a,h,c),a.child;case 14:return h=a.type,m=Ja(h,a.pendingProps),m=Ja(h.type,m),Kl(n,a,h,m,c);case 15:return Nt(n,a,a.type,a.pendingProps,c);case 17:return h=a.type,m=a.pendingProps,m=a.elementType===h?m:Ja(h,m),ka(n,a),a.tag=1,yn(h)?(n=!0,Pn(a)):n=!1,Jr(a,c),Jd(a,h,m),cf(a,h,m,c),hf(null,a,h,!0,n,c);case 19:return Ts(n,a,c);case 22:return df(n,a,c)}throw Error(i(156,a.tag))};function sm(n,a){return Lr(n,a)}function z1(n,a,c,h){this.tag=n,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Na(n,a,c,h){return new z1(n,a,c,h)}function pp(n){return n=n.prototype,!(!n||!n.isReactComponent)}function q1(n){if(typeof n=="function")return pp(n)?1:0;if(n!=null){if(n=n.$$typeof,n===L)return 11;if(n===be)return 14}return 2}function Zo(n,a){var c=n.alternate;return c===null?(c=Na(n.tag,a,n.key,n.mode),c.elementType=n.elementType,c.type=n.type,c.stateNode=n.stateNode,c.alternate=n,n.alternate=c):(c.pendingProps=a,c.type=n.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=n.flags&14680064,c.childLanes=n.childLanes,c.lanes=n.lanes,c.child=n.child,c.memoizedProps=n.memoizedProps,c.memoizedState=n.memoizedState,c.updateQueue=n.updateQueue,a=n.dependencies,c.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},c.sibling=n.sibling,c.index=n.index,c.ref=n.ref,c}function Tf(n,a,c,h,m,x){var k=2;if(h=n,typeof n=="function")pp(n)&&(k=1);else if(typeof n=="string")k=5;else e:switch(n){case ee:return so(c.children,m,x,a);case R:k=8,m|=8;break;case Se:return n=Na(12,c,a,m|2),n.elementType=Se,n.lanes=x,n;case M:return n=Na(13,c,a,m),n.elementType=M,n.lanes=x,n;case _e:return n=Na(19,c,a,m),n.elementType=_e,n.lanes=x,n;case ge:return Jo(c,m,x,a);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case X:k=10;break e;case F:k=9;break e;case L:k=11;break e;case be:k=14;break e;case $e:k=16,h=null;break e}throw Error(i(130,n==null?n:typeof n,""))}return a=Na(k,c,a,m),a.elementType=n,a.type=h,a.lanes=x,a}function so(n,a,c,h){return n=Na(7,n,h,a),n.lanes=c,n}function Jo(n,a,c,h){return n=Na(22,n,h,a),n.elementType=ge,n.lanes=c,n.stateNode={isHidden:!1},n}function vp(n,a,c){return n=Na(6,n,null,a),n.lanes=c,n}function ch(n,a,c){return a=Na(4,n.children!==null?n.children:[],n.key,a),a.lanes=c,a.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},a}function om(n,a,c,h,m){this.tag=a,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ru(0),this.expirationTimes=Ru(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ru(0),this.identifierPrefix=h,this.onRecoverableError=m,this.mutableSourceEagerHydrationData=null}function fh(n,a,c,h,m,x,k,Y,Q){return n=new om(n,a,c,Y,Q),a===1?(a=1,x===!0&&(a|=8)):a=0,x=Na(3,null,null,a),n.current=x,x.stateNode=n,x.memoizedState={element:h,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},Y0(x),n}function Y1(n,a,c){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Z,key:h==null?null:""+h,children:n,containerInfo:a,implementation:c}}function gp(n){if(!n)return fi;n=n._reactInternals;e:{if(Ft(n)!==n||n.tag!==1)throw Error(i(170));var a=n;do{switch(a.tag){case 3:a=a.stateNode.context;break e;case 1:if(yn(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break e}}a=a.return}while(a!==null);throw Error(i(171))}if(n.tag===1){var c=n.type;if(yn(c))return Kc(n,c,a)}return a}function lm(n,a,c,h,m,x,k,Y,Q){return n=fh(c,h,!0,n,m,x,k,Y,Q),n.context=gp(null),c=n.current,h=bn(),m=Fs(c),x=to(h,m),x.callback=a??null,Yo(c,x,m),n.current.lanes=m,Ys(n,m,h),Ki(n,h),n}function dh(n,a,c,h){var m=a.current,x=bn(),k=Fs(m);return c=gp(c),a.context===null?a.context=c:a.pendingContext=c,a=to(x,k),a.payload={element:n},h=h===void 0?null:h,h!==null&&(a.callback=h),n=Yo(m,a,k),n!==null&&(wi(n,m,k,x),Od(n,m,k)),k}function hh(n){if(n=n.current,!n.child)return null;switch(n.child.tag){case 5:return n.child.stateNode;default:return n.child.stateNode}}function mp(n,a){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var c=n.retryLane;n.retryLane=c!==0&&c<a?c:a}}function ph(n,a){mp(n,a),(n=n.alternate)&&mp(n,a)}function um(){return null}var tu=typeof reportError=="function"?reportError:function(n){console.error(n)};function yp(n){this._internalRoot=n}vh.prototype.render=yp.prototype.render=function(n){var a=this._internalRoot;if(a===null)throw Error(i(409));dh(n,a,null,null)},vh.prototype.unmount=yp.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var a=n.containerInfo;Jl(function(){dh(null,n,null,null)}),a[Xs]=null}};function vh(n){this._internalRoot=n}vh.prototype.unstable_scheduleHydration=function(n){if(n){var a=Dt();n={blockedOn:null,target:n,priority:a};for(var c=0;c<On.length&&a!==0&&a<On[c].priority;c++);On.splice(c,0,n),c===0&&Mc(n)}};function xp(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function gh(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11&&(n.nodeType!==8||n.nodeValue!==" react-mount-point-unstable "))}function cm(){}function V1(n,a,c,h,m){if(m){if(typeof h=="function"){var x=h;h=function(){var fe=hh(k);x.call(fe)}}var k=lm(a,h,n,0,null,!1,!1,"",cm);return n._reactRootContainer=k,n[Xs]=k.current,Pu(n.nodeType===8?n.parentNode:n),Jl(),k}for(;m=n.lastChild;)n.removeChild(m);if(typeof h=="function"){var Y=h;h=function(){var fe=hh(Q);Y.call(fe)}}var Q=fh(n,0,!1,null,null,!1,!1,"",cm);return n._reactRootContainer=Q,n[Xs]=Q.current,Pu(n.nodeType===8?n.parentNode:n),Jl(function(){dh(a,Q,c,h)}),Q}function Rf(n,a,c,h,m){var x=c._reactRootContainer;if(x){var k=x;if(typeof m=="function"){var Y=m;m=function(){var Q=hh(k);Y.call(Q)}}dh(a,k,n,m)}else k=V1(c,a,n,m,h);return hh(k)}Zt=function(n){switch(n.tag){case 3:var a=n.stateNode;if(a.current.memoizedState.isDehydrated){var c=Va(a.pendingLanes);c!==0&&(Vs(a,c|1),Ki(a,Ot()),!(Wt&6)&&(Ju=Ot()+500,ws()))}break;case 13:Jl(function(){var h=sa(n,1);if(h!==null){var m=bn();wi(h,n,1,m)}}),ph(n,1)}},Nc=function(n){if(n.tag===13){var a=sa(n,134217728);if(a!==null){var c=bn();wi(a,n,134217728,c)}ph(n,134217728)}},vs=function(n){if(n.tag===13){var a=Fs(n),c=sa(n,a);if(c!==null){var h=bn();wi(c,n,a,h)}ph(n,a)}},Dt=function(){return sr},ku=function(n,a){var c=sr;try{return sr=n,a()}finally{sr=c}},dr=function(n,a,c){switch(a){case"input":if(nn(n,c),a=c.name,c.type==="radio"&&a!=null){for(c=n;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+a)+'][type="radio"]'),a=0;a<c.length;a++){var h=c[a];if(h!==n&&h.form===n.form){var m=Zr(h);if(!m)throw Error(i(90));zr(h),nn(h,m)}}}break;case"textarea":ci(n,c);break;case"select":a=c.value,a!=null&&tr(n,!!c.multiple,a,!1)}},cs=fp,fs=Jl;var W1={usingClientEntryPoint:!1,Events:[ht,Xa,Zr,ja,qs,fp]},Af={findFiberByHostInstance:Ml,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},fm={bundleType:Af.bundleType,version:Af.version,rendererPackageName:Af.rendererPackageName,rendererConfig:Af.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:q.ReactCurrentDispatcher,findHostInstanceByFiber:function(n){return n=ln(n),n===null?null:n.stateNode},findFiberByHostInstance:Af.findFiberByHostInstance||um,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var el=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!el.isDisabled&&el.supportsFiber)try{Ao=el.inject(fm),$i=el}catch{}}return va.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W1,va.createPortal=function(n,a){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!xp(a))throw Error(i(200));return Y1(n,a,null,c)},va.createRoot=function(n,a){if(!xp(n))throw Error(i(299));var c=!1,h="",m=tu;return a!=null&&(a.unstable_strictMode===!0&&(c=!0),a.identifierPrefix!==void 0&&(h=a.identifierPrefix),a.onRecoverableError!==void 0&&(m=a.onRecoverableError)),a=fh(n,1,!1,null,null,c,!1,h,m),n[Xs]=a.current,Pu(n.nodeType===8?n.parentNode:n),new yp(a)},va.findDOMNode=function(n){if(n==null)return null;if(n.nodeType===1)return n;var a=n._reactInternals;if(a===void 0)throw typeof n.render=="function"?Error(i(188)):(n=Object.keys(n).join(","),Error(i(268,n)));return n=ln(a),n=n===null?null:n.stateNode,n},va.flushSync=function(n){return Jl(n)},va.hydrate=function(n,a,c){if(!gh(a))throw Error(i(200));return Rf(null,n,a,!0,c)},va.hydrateRoot=function(n,a,c){if(!xp(n))throw Error(i(405));var h=c!=null&&c.hydratedSources||null,m=!1,x="",k=tu;if(c!=null&&(c.unstable_strictMode===!0&&(m=!0),c.identifierPrefix!==void 0&&(x=c.identifierPrefix),c.onRecoverableError!==void 0&&(k=c.onRecoverableError)),a=lm(a,null,n,1,c??null,m,!1,x,k),n[Xs]=a.current,Pu(n),h)for(n=0;n<h.length;n++)c=h[n],m=c._getVersion,m=m(c._source),a.mutableSourceEagerHydrationData==null?a.mutableSourceEagerHydrationData=[c,m]:a.mutableSourceEagerHydrationData.push(c,m);return new vh(a)},va.render=function(n,a,c){if(!gh(a))throw Error(i(200));return Rf(null,n,a,!1,c)},va.unmountComponentAtNode=function(n){if(!gh(n))throw Error(i(40));return n._reactRootContainer?(Jl(function(){Rf(null,null,n,!1,function(){n._reactRootContainer=null,n[Xs]=null})}),!0):!1},va.unstable_batchedUpdates=fp,va.unstable_renderSubtreeIntoContainer=function(n,a,c,h){if(!gh(c))throw Error(i(200));if(n==null||n._reactInternals===void 0)throw Error(i(38));return Rf(n,a,c,!1,h)},va.version="18.3.1-next-f1338f8080-20240426",va}var ga={};/**
72
- * @license React
73
- * react-dom.development.js
74
- *
75
- * Copyright (c) Facebook, Inc. and its affiliates.
76
- *
77
- * This source code is licensed under the MIT license found in the
78
- * LICENSE file in the root directory of this source tree.
79
- */var VC;function GT(){return VC||(VC=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var o=qt,r=qC(),i=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,l=!1;function f(e){l=e}function p(e){if(!l){for(var t=arguments.length,s=new Array(t>1?t-1:0),u=1;u<t;u++)s[u-1]=arguments[u];C("warn",e,s)}}function v(e){if(!l){for(var t=arguments.length,s=new Array(t>1?t-1:0),u=1;u<t;u++)s[u-1]=arguments[u];C("error",e,s)}}function C(e,t,s){{var u=i.ReactDebugCurrentFrame,d=u.getStackAddendum();d!==""&&(t+="%s",s=s.concat([d]));var g=s.map(function(y){return String(y)});g.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,g)}}var w=0,S=1,b=2,T=3,A=4,H=5,P=6,j=7,z=8,N=9,B=10,U=11,q=12,K=13,Z=14,ee=15,R=16,Se=17,X=18,F=19,L=21,M=22,_e=23,be=24,$e=25,ge=!0,Ee=!1,He=!1,De=!1,$=!1,G=!0,he=!0,le=!0,tt=!0,Ke=new Set,ct={},Ce={};function Te(e,t){xt(e,t),xt(e+"Capture",t)}function xt(e,t){ct[e]&&v("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",e),ct[e]=t;{var s=e.toLowerCase();Ce[s]=e,e==="onDoubleClick"&&(Ce.ondblclick=e)}for(var u=0;u<t.length;u++)Ke.add(t[u])}var Sr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",zr=Object.prototype.hasOwnProperty;function Yt(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,s=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return s}}function Xt(e){try{return Fr(e),!1}catch{return!0}}function Fr(e){return""+e}function br(e,t){if(Xt(e))return v("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.",t,Yt(e)),Fr(e)}function nn(e){if(Xt(e))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Yt(e)),Fr(e)}function Rn(e,t){if(Xt(e))return v("The provided `%s` prop is an unsupported type %s. This value must be coerced to a string before before using it here.",t,Yt(e)),Fr(e)}function vn(e,t){if(Xt(e))return v("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.",t,Yt(e)),Fr(e)}function qr(e){if(Xt(e))return v("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.",Yt(e)),Fr(e)}function tr(e){if(Xt(e))return v("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before before using it here.",Yt(e)),Fr(e)}var ar=0,Pr=1,ci=2,Kr=3,Qr=4,An=5,ta=6,ra=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",Pe=ra+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",it=new RegExp("^["+ra+"]["+Pe+"]*$"),_t={},rr={};function Cr(e){return zr.call(rr,e)?!0:zr.call(_t,e)?!1:it.test(e)?(rr[e]=!0,!0):(_t[e]=!0,v("Invalid attribute name: `%s`",e),!1)}function Mr(e,t,s){return t!==null?t.type===ar:s?!1:e.length>2&&(e[0]==="o"||e[0]==="O")&&(e[1]==="n"||e[1]==="N")}function Or(e,t,s,u){if(s!==null&&s.type===ar)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":{if(u)return!1;if(s!==null)return!s.acceptsBooleans;var d=e.toLowerCase().slice(0,5);return d!=="data-"&&d!=="aria-"}default:return!1}}function gn(e,t,s,u){if(t===null||typeof t>"u"||Or(e,t,s,u))return!0;if(u)return!1;if(s!==null)switch(s.type){case Kr:return!t;case Qr:return t===!1;case An:return isNaN(t);case ta:return isNaN(t)||t<1}return!1}function wr(e){return dr.hasOwnProperty(e)?dr[e]:null}function mr(e,t,s,u,d,g,y){this.acceptsBooleans=t===ci||t===Kr||t===Qr,this.attributeName=u,this.attributeNamespace=d,this.mustUseProperty=s,this.propertyName=e,this.type=t,this.sanitizeURL=g,this.removeEmptyString=y}var dr={},gi=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];gi.forEach(function(e){dr[e]=new mr(e,ar,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0],s=e[1];dr[t]=new mr(t,Pr,!1,s,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){dr[e]=new mr(e,ci,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){dr[e]=new mr(e,ci,!1,e,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(function(e){dr[e]=new mr(e,Kr,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){dr[e]=new mr(e,Kr,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){dr[e]=new mr(e,Qr,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){dr[e]=new mr(e,ta,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){dr[e]=new mr(e,An,!1,e.toLowerCase(),null,!1,!1)});var kn=/[\-\:]([a-z])/g,Hi=function(e){return e[1].toUpperCase()};["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(function(e){var t=e.replace(kn,Hi);dr[t]=new mr(t,Pr,!1,e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(e){var t=e.replace(kn,Hi);dr[t]=new mr(t,Pr,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(kn,Hi);dr[t]=new mr(t,Pr,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){dr[e]=new mr(e,Pr,!1,e.toLowerCase(),null,!1,!1)});var ja="xlinkHref";dr[ja]=new mr("xlinkHref",Pr,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){dr[e]=new mr(e,Pr,!1,e.toLowerCase(),null,!0,!0)});var qs=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,cs=!1;function fs(e){!cs&&qs.test(e)&&(cs=!0,v("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.",JSON.stringify(e)))}function ds(e,t,s,u){if(u.mustUseProperty){var d=u.propertyName;return e[d]}else{br(s,t),u.sanitizeURL&&fs(""+s);var g=u.attributeName,y=null;if(u.type===Qr){if(e.hasAttribute(g)){var E=e.getAttribute(g);return E===""?!0:gn(t,s,u,!1)?E:E===""+s?s:E}}else if(e.hasAttribute(g)){if(gn(t,s,u,!1))return e.getAttribute(g);if(u.type===Kr)return s;y=e.getAttribute(g)}return gn(t,s,u,!1)?y===null?s:y:y===""+s?s:y}}function hs(e,t,s,u){{if(!Cr(t))return;if(!e.hasAttribute(t))return s===void 0?void 0:null;var d=e.getAttribute(t);return br(s,t),d===""+s?s:d}}function Vn(e,t,s,u){var d=wr(t);if(!Mr(t,d,u)){if(gn(t,s,d,u)&&(s=null),u||d===null){if(Cr(t)){var g=t;s===null?e.removeAttribute(g):(br(s,t),e.setAttribute(g,""+s))}return}var y=d.mustUseProperty;if(y){var E=d.propertyName;if(s===null){var _=d.type;e[E]=_===Kr?!1:""}else e[E]=s;return}var O=d.attributeName,I=d.attributeNamespace;if(s===null)e.removeAttribute(O);else{var re=d.type,J;re===Kr||re===Qr&&s===!0?J="":(br(s,O),J=""+s,d.sanitizeURL&&fs(J.toString())),I?e.setAttributeNS(I,O,J):e.setAttribute(O,J)}}}var $n=Symbol.for("react.element"),hr=Symbol.for("react.portal"),Fn=Symbol.for("react.fragment"),Ii=Symbol.for("react.strict_mode"),Ea=Symbol.for("react.profiler"),ps=Symbol.for("react.provider"),W=Symbol.for("react.context"),Re=Symbol.for("react.forward_ref"),ze=Symbol.for("react.suspense"),rt=Symbol.for("react.suspense_list"),Ft=Symbol.for("react.memo"),Tt=Symbol.for("react.lazy"),Pt=Symbol.for("react.scope"),Ht=Symbol.for("react.debug_trace_mode"),ln=Symbol.for("react.offscreen"),Hr=Symbol.for("react.legacy_hidden"),Lr=Symbol.for("react.cache"),Wn=Symbol.for("react.tracing_marker"),za=Symbol.iterator,qa="@@iterator";function Ot(e){if(e===null||typeof e!="object")return null;var t=za&&e[za]||e[qa];return typeof t=="function"?t:null}var Bt=Object.assign,Ya=0,wl,bl,Ro,bu,Ao,$i,Oc;function mi(){}mi.__reactDisabledLog=!0;function ld(){{if(Ya===0){wl=console.log,bl=console.info,Ro=console.warn,bu=console.error,Ao=console.group,$i=console.groupCollapsed,Oc=console.groupEnd;var e={configurable:!0,enumerable:!0,value:mi,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Ya++}}function ud(){{if(Ya--,Ya===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Bt({},e,{value:wl}),info:Bt({},e,{value:bl}),warn:Bt({},e,{value:Ro}),error:Bt({},e,{value:bu}),group:Bt({},e,{value:Ao}),groupCollapsed:Bt({},e,{value:$i}),groupEnd:Bt({},e,{value:Oc})})}Ya<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var _u=i.ReactCurrentDispatcher,ko;function na(e,t,s){{if(ko===void 0)try{throw Error()}catch(d){var u=d.stack.trim().match(/\n( *(at )?)/);ko=u&&u[1]||""}return`
80
- `+ko+e}}var Va=!1,Wa;{var Du=typeof WeakMap=="function"?WeakMap:Map;Wa=new Du}function _l(e,t){if(!e||Va)return"";{var s=Wa.get(e);if(s!==void 0)return s}var u;Va=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var g;g=_u.current,_u.current=null,ld();try{if(t){var y=function(){throw Error()};if(Object.defineProperty(y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(y,[])}catch(de){u=de}Reflect.construct(e,[],y)}else{try{y.call()}catch(de){u=de}e.call(y.prototype)}}else{try{throw Error()}catch(de){u=de}e()}}catch(de){if(de&&u&&typeof de.stack=="string"){for(var E=de.stack.split(`
81
- `),_=u.stack.split(`
82
- `),O=E.length-1,I=_.length-1;O>=1&&I>=0&&E[O]!==_[I];)I--;for(;O>=1&&I>=0;O--,I--)if(E[O]!==_[I]){if(O!==1||I!==1)do if(O--,I--,I<0||E[O]!==_[I]){var re=`
83
- `+E[O].replace(" at new "," at ");return e.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",e.displayName)),typeof e=="function"&&Wa.set(e,re),re}while(O>=1&&I>=0);break}}}finally{Va=!1,_u.current=g,ud(),Error.prepareStackTrace=d}var J=e?e.displayName||e.name:"",ue=J?na(J):"";return typeof e=="function"&&Wa.set(e,ue),ue}function Fo(e,t,s){return _l(e,!0)}function Tu(e,t,s){return _l(e,!1)}function Ru(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function Ys(e,t,s){if(e==null)return"";if(typeof e=="function")return _l(e,Ru(e));if(typeof e=="string")return na(e);switch(e){case ze:return na("Suspense");case rt:return na("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case Re:return Tu(e.render);case Ft:return Ys(e.type,t,s);case Tt:{var u=e,d=u._payload,g=u._init;try{return Ys(g(d),t,s)}catch{}}}return""}function p0(e){switch(e._debugOwner&&e._debugOwner.type,e._debugSource,e.tag){case H:return na(e.type);case R:return na("Lazy");case K:return na("Suspense");case F:return na("SuspenseList");case w:case b:case ee:return Tu(e.type);case U:return Tu(e.type.render);case S:return Fo(e.type);default:return""}}function Vs(e){try{var t="",s=e;do t+=p0(s),s=s.return;while(s);return t}catch(u){return`
84
- Error generating stack: `+u.message+`
85
- `+u.stack}}function sr(e,t,s){var u=e.displayName;if(u)return u;var d=t.displayName||t.name||"";return d!==""?s+"("+d+")":s}function Au(e){return e.displayName||"Context"}function Zt(e){if(e==null)return null;if(typeof e.tag=="number"&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Fn:return"Fragment";case hr:return"Portal";case Ea:return"Profiler";case Ii:return"StrictMode";case ze:return"Suspense";case rt:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case W:var t=e;return Au(t)+".Consumer";case ps:var s=e;return Au(s._context)+".Provider";case Re:return sr(e,e.render,"ForwardRef");case Ft:var u=e.displayName||null;return u!==null?u:Zt(e.type)||"Memo";case Tt:{var d=e,g=d._payload,y=d._init;try{return Zt(y(g))}catch{return null}}}return null}function Nc(e,t,s){var u=t.displayName||t.name||"";return e.displayName||(u!==""?s+"("+u+")":s)}function vs(e){return e.displayName||"Context"}function Dt(e){var t=e.tag,s=e.type;switch(t){case be:return"Cache";case N:var u=s;return vs(u)+".Consumer";case B:var d=s;return vs(d._context)+".Provider";case X:return"DehydratedFragment";case U:return Nc(s,s.render,"ForwardRef");case j:return"Fragment";case H:return s;case A:return"Portal";case T:return"Root";case P:return"Text";case R:return Zt(s);case z:return s===Ii?"StrictMode":"Mode";case M:return"Offscreen";case q:return"Profiler";case L:return"Scope";case K:return"Suspense";case F:return"SuspenseList";case $e:return"TracingMarker";case S:case w:case Se:case b:case Z:case ee:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;break}return null}var ku=i.ReactDebugCurrentFrame,Gn=null,gs=!1;function yi(){{if(Gn===null)return null;var e=Gn._debugOwner;if(e!==null&&typeof e<"u")return Dt(e)}return null}function ms(){return Gn===null?"":Vs(Gn)}function Ur(){ku.getCurrentStack=null,Gn=null,gs=!1}function _r(e){ku.getCurrentStack=e===null?null:ms,Gn=e,gs=!1}function Oo(){return Gn}function On(e){gs=e}function xi(e){return""+e}function Sa(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return tr(e),e;default:return""}}var Dl={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function Bc(e,t){Dl[t.type]||t.onChange||t.onInput||t.readOnly||t.disabled||t.value==null||v("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."),t.onChange||t.readOnly||t.disabled||t.checked==null||v("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function Mc(e){var t=e.type,s=e.nodeName;return s&&s.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function No(e){return e._valueTracker}function Tl(e){e._valueTracker=null}function v0(e){var t="";return e&&(Mc(e)?t=e.checked?"true":"false":t=e.value),t}function Ca(e){var t=Mc(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);tr(e[t]);var u=""+e[t];if(!(e.hasOwnProperty(t)||typeof s>"u"||typeof s.get!="function"||typeof s.set!="function")){var d=s.get,g=s.set;Object.defineProperty(e,t,{configurable:!0,get:function(){return d.call(this)},set:function(E){tr(E),u=""+E,g.call(this,E)}}),Object.defineProperty(e,t,{enumerable:s.enumerable});var y={getValue:function(){return u},setValue:function(E){tr(E),u=""+E},stopTracking:function(){Tl(e),delete e[t]}};return y}}function Ga(e){No(e)||(e._valueTracker=Ca(e))}function ys(e){if(!e)return!1;var t=No(e);if(!t)return!0;var s=t.getValue(),u=v0(e);return u!==s?(t.setValue(u),!0):!1}function wa(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Fu=!1,Ou=!1,Bo=!1,Rl=!1;function Nu(e){var t=e.type==="checkbox"||e.type==="radio";return t?e.checked!=null:e.value!=null}function Bu(e,t){var s=e,u=t.checked,d=Bt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:u??s._wrapperState.initialChecked});return d}function Ka(e,t){Bc("input",t),t.checked!==void 0&&t.defaultChecked!==void 0&&!Ou&&(v("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",yi()||"A component",t.type),Ou=!0),t.value!==void 0&&t.defaultValue!==void 0&&!Fu&&(v("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",yi()||"A component",t.type),Fu=!0);var s=e,u=t.defaultValue==null?"":t.defaultValue;s._wrapperState={initialChecked:t.checked!=null?t.checked:t.defaultChecked,initialValue:Sa(t.value!=null?t.value:u),controlled:Nu(t)}}function D(e,t){var s=e,u=t.checked;u!=null&&Vn(s,"checked",u,!1)}function V(e,t){var s=e;{var u=Nu(t);!s._wrapperState.controlled&&u&&!Rl&&(v("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),Rl=!0),s._wrapperState.controlled&&!u&&!Bo&&(v("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),Bo=!0)}D(e,t);var d=Sa(t.value),g=t.type;if(d!=null)g==="number"?(d===0&&s.value===""||s.value!=d)&&(s.value=xi(d)):s.value!==xi(d)&&(s.value=xi(d));else if(g==="submit"||g==="reset"){s.removeAttribute("value");return}t.hasOwnProperty("value")?vt(s,t.type,d):t.hasOwnProperty("defaultValue")&&vt(s,t.type,Sa(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(s.defaultChecked=!!t.defaultChecked)}function ce(e,t,s){var u=e;if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var d=t.type,g=d==="submit"||d==="reset";if(g&&(t.value===void 0||t.value===null))return;var y=xi(u._wrapperState.initialValue);s||y!==u.value&&(u.value=y),u.defaultValue=y}var E=u.name;E!==""&&(u.name=""),u.defaultChecked=!u.defaultChecked,u.defaultChecked=!!u._wrapperState.initialChecked,E!==""&&(u.name=E)}function ve(e,t){var s=e;V(s,t),Ie(s,t)}function Ie(e,t){var s=t.name;if(t.type==="radio"&&s!=null){for(var u=e;u.parentNode;)u=u.parentNode;br(s,"name");for(var d=u.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),g=0;g<d.length;g++){var y=d[g];if(!(y===e||y.form!==e.form)){var E=Am(y);if(!E)throw new Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");ys(y),V(y,E)}}}}function vt(e,t,s){(t!=="number"||wa(e.ownerDocument)!==e)&&(s==null?e.defaultValue=xi(e._wrapperState.initialValue):e.defaultValue!==xi(s)&&(e.defaultValue=xi(s)))}var je=!1,Et=!1,Lt=!1;function Jt(e,t){t.value==null&&(typeof t.children=="object"&&t.children!==null?o.Children.forEach(t.children,function(s){s!=null&&(typeof s=="string"||typeof s=="number"||Et||(Et=!0,v("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.")))}):t.dangerouslySetInnerHTML!=null&&(Lt||(Lt=!0,v("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.")))),t.selected!=null&&!je&&(v("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),je=!0)}function Ir(e,t){t.value!=null&&e.setAttribute("value",xi(Sa(t.value)))}var Dr=Array.isArray;function Mt(e){return Dr(e)}var Tr;Tr=!1;function Xr(){var e=yi();return e?`
86
-
87
- Check the render method of \``+e+"`.":""}var Mo=["value","defaultValue"];function Hc(e){{Bc("select",e);for(var t=0;t<Mo.length;t++){var s=Mo[t];if(e[s]!=null){var u=Mt(e[s]);e.multiple&&!u?v("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",s,Xr()):!e.multiple&&u&&v("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",s,Xr())}}}}function Ws(e,t,s,u){var d=e.options;if(t){for(var g=s,y={},E=0;E<g.length;E++)y["$"+g[E]]=!0;for(var _=0;_<d.length;_++){var O=y.hasOwnProperty("$"+d[_].value);d[_].selected!==O&&(d[_].selected=O),O&&u&&(d[_].defaultSelected=!0)}}else{for(var I=xi(Sa(s)),re=null,J=0;J<d.length;J++){if(d[J].value===I){d[J].selected=!0,u&&(d[J].defaultSelected=!0);return}re===null&&!d[J].disabled&&(re=d[J])}re!==null&&(re.selected=!0)}}function Ic(e,t){return Bt({},t,{value:void 0})}function Al(e,t){var s=e;Hc(t),s._wrapperState={wasMultiple:!!t.multiple},t.value!==void 0&&t.defaultValue!==void 0&&!Tr&&(v("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://reactjs.org/link/controlled-components"),Tr=!0)}function g0(e,t){var s=e;s.multiple=!!t.multiple;var u=t.value;u!=null?Ws(s,!!t.multiple,u,!1):t.defaultValue!=null&&Ws(s,!!t.multiple,t.defaultValue,!0)}function cd(e,t){var s=e,u=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!t.multiple;var d=t.value;d!=null?Ws(s,!!t.multiple,d,!1):u!==!!t.multiple&&(t.defaultValue!=null?Ws(s,!!t.multiple,t.defaultValue,!0):Ws(s,!!t.multiple,t.multiple?[]:"",!1))}function m0(e,t){var s=e,u=t.value;u!=null&&Ws(s,!!t.multiple,u,!1)}var Zv=!1;function y0(e,t){var s=e;if(t.dangerouslySetInnerHTML!=null)throw new Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");var u=Bt({},t,{value:void 0,defaultValue:void 0,children:xi(s._wrapperState.initialValue)});return u}function x0(e,t){var s=e;Bc("textarea",t),t.value!==void 0&&t.defaultValue!==void 0&&!Zv&&(v("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://reactjs.org/link/controlled-components",yi()||"A component"),Zv=!0);var u=t.value;if(u==null){var d=t.children,g=t.defaultValue;if(d!=null){v("Use the `defaultValue` or `value` props instead of setting children on <textarea>.");{if(g!=null)throw new Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(Mt(d)){if(d.length>1)throw new Error("<textarea> can only have at most one child.");d=d[0]}g=d}}g==null&&(g=""),u=g}s._wrapperState={initialValue:Sa(u)}}function Jv(e,t){var s=e,u=Sa(t.value),d=Sa(t.defaultValue);if(u!=null){var g=xi(u);g!==s.value&&(s.value=g),t.defaultValue==null&&s.defaultValue!==g&&(s.defaultValue=g)}d!=null&&(s.defaultValue=xi(d))}function eg(e,t){var s=e,u=s.textContent;u===s._wrapperState.initialValue&&u!==""&&u!==null&&(s.value=u)}function C1(e,t){Jv(e,t)}var Gs="http://www.w3.org/1999/xhtml",E0="http://www.w3.org/1998/Math/MathML",S0="http://www.w3.org/2000/svg";function C0(e){switch(e){case"svg":return S0;case"math":return E0;default:return Gs}}function w0(e,t){return e==null||e===Gs?C0(t):e===S0&&t==="foreignObject"?Gs:e}var tg=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,s,u,d){MSApp.execUnsafeLocalFunction(function(){return e(t,s,u,d)})}:e},fd,rg=tg(function(e,t){if(e.namespaceURI===S0&&!("innerHTML"in e)){fd=fd||document.createElement("div"),fd.innerHTML="<svg>"+t.valueOf().toString()+"</svg>";for(var s=fd.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;s.firstChild;)e.appendChild(s.firstChild);return}e.innerHTML=t}),Pi=1,Ks=3,mn=8,Qs=9,b0=11,Mu=function(e,t){if(t){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===Ks){s.nodeValue=t;return}}e.textContent=t},$c={animation:["animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction"],background:["backgroundAttachment","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundSize"],backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:["borderBottomColor","borderBottomStyle","borderBottomWidth","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRightColor","borderRightStyle","borderRightWidth","borderTopColor","borderTopStyle","borderTopWidth"],borderBlockEnd:["borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth"],borderBlockStart:["borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth"],borderBottom:["borderBottomColor","borderBottomStyle","borderBottomWidth"],borderColor:["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"],borderImage:["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"],borderInlineEnd:["borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth"],borderInlineStart:["borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth"],borderLeft:["borderLeftColor","borderLeftStyle","borderLeftWidth"],borderRadius:["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"],borderRight:["borderRightColor","borderRightStyle","borderRightWidth"],borderStyle:["borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle"],borderTop:["borderTopColor","borderTopStyle","borderTopWidth"],borderWidth:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],columnRule:["columnRuleColor","columnRuleStyle","columnRuleWidth"],columns:["columnCount","columnWidth"],flex:["flexBasis","flexGrow","flexShrink"],flexFlow:["flexDirection","flexWrap"],font:["fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantLigatures","fontVariantNumeric","fontVariantPosition","fontWeight","lineHeight"],fontVariant:["fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantLigatures","fontVariantNumeric","fontVariantPosition"],gap:["columnGap","rowGap"],grid:["gridAutoColumns","gridAutoFlow","gridAutoRows","gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],gridArea:["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"],gridColumn:["gridColumnEnd","gridColumnStart"],gridColumnGap:["columnGap"],gridGap:["columnGap","rowGap"],gridRow:["gridRowEnd","gridRowStart"],gridRowGap:["rowGap"],gridTemplate:["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],listStyle:["listStyleImage","listStylePosition","listStyleType"],margin:["marginBottom","marginLeft","marginRight","marginTop"],marker:["markerEnd","markerMid","markerStart"],mask:["maskClip","maskComposite","maskImage","maskMode","maskOrigin","maskPositionX","maskPositionY","maskRepeat","maskSize"],maskPosition:["maskPositionX","maskPositionY"],outline:["outlineColor","outlineStyle","outlineWidth"],overflow:["overflowX","overflowY"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"],placeContent:["alignContent","justifyContent"],placeItems:["alignItems","justifyItems"],placeSelf:["alignSelf","justifySelf"],textDecoration:["textDecorationColor","textDecorationLine","textDecorationStyle"],textEmphasis:["textEmphasisColor","textEmphasisStyle"],transition:["transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"],wordWrap:["overflowWrap"]},Pc={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function ng(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var ig=["Webkit","ms","Moz","O"];Object.keys(Pc).forEach(function(e){ig.forEach(function(t){Pc[ng(t,e)]=Pc[e]})});function dd(e,t,s){var u=t==null||typeof t=="boolean"||t==="";return u?"":!s&&typeof t=="number"&&t!==0&&!(Pc.hasOwnProperty(e)&&Pc[e])?t+"px":(vn(t,e),(""+t).trim())}var ag=/([A-Z])/g,sg=/^ms-/;function Hu(e){return e.replace(ag,"-$1").toLowerCase().replace(sg,"-ms-")}var og=function(){};{var w1=/^(?:webkit|moz|o)[A-Z]/,b1=/^-ms-/,lg=/-(.)/g,_0=/;\s*$/,xs={},kl={},ug=!1,Lc=!1,_1=function(e){return e.replace(lg,function(t,s){return s.toUpperCase()})},cg=function(e){xs.hasOwnProperty(e)&&xs[e]||(xs[e]=!0,v("Unsupported style property %s. Did you mean %s?",e,_1(e.replace(b1,"ms-"))))},D0=function(e){xs.hasOwnProperty(e)&&xs[e]||(xs[e]=!0,v("Unsupported vendor-prefixed style property %s. Did you mean %s?",e,e.charAt(0).toUpperCase()+e.slice(1)))},T0=function(e,t){kl.hasOwnProperty(t)&&kl[t]||(kl[t]=!0,v(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,e,t.replace(_0,"")))},fg=function(e,t){ug||(ug=!0,v("`NaN` is an invalid value for the `%s` css style property.",e))},dg=function(e,t){Lc||(Lc=!0,v("`Infinity` is an invalid value for the `%s` css style property.",e))};og=function(e,t){e.indexOf("-")>-1?cg(e):w1.test(e)?D0(e):_0.test(t)&&T0(e,t),typeof t=="number"&&(isNaN(t)?fg(e,t):isFinite(t)||dg(e,t))}}var hg=og;function D1(e){{var t="",s="";for(var u in e)if(e.hasOwnProperty(u)){var d=e[u];if(d!=null){var g=u.indexOf("--")===0;t+=s+(g?u:Hu(u))+":",t+=dd(u,d,g),s=";"}}return t||null}}function pg(e,t){var s=e.style;for(var u in t)if(t.hasOwnProperty(u)){var d=u.indexOf("--")===0;d||hg(u,t[u]);var g=dd(u,t[u],d);u==="float"&&(u="cssFloat"),d?s.setProperty(u,g):s[u]=g}}function T1(e){return e==null||typeof e=="boolean"||e===""}function vg(e){var t={};for(var s in e)for(var u=$c[s]||[s],d=0;d<u.length;d++)t[u[d]]=s;return t}function R1(e,t){{if(!t)return;var s=vg(e),u=vg(t),d={};for(var g in s){var y=s[g],E=u[g];if(E&&y!==E){var _=y+","+E;if(d[_])continue;d[_]=!0,v("%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",T1(e[y])?"Removing":"Updating",y,E)}}}}var Qa={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Uc=Bt({menuitem:!0},Qa),gg="__html";function hd(e,t){if(t){if(Uc[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw new Error(e+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if(typeof t.dangerouslySetInnerHTML!="object"||!(gg in t.dangerouslySetInnerHTML))throw new Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.")}if(!t.suppressContentEditableWarning&&t.contentEditable&&t.children!=null&&v("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."),t.style!=null&&typeof t.style!="object")throw new Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.")}}function Ho(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var jc={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},pd={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},Iu={},A1=new RegExp("^(aria)-["+Pe+"]*$"),$u=new RegExp("^(aria)[A-Z]["+Pe+"]*$");function R0(e,t){{if(zr.call(Iu,t)&&Iu[t])return!0;if($u.test(t)){var s="aria-"+t.slice(4).toLowerCase(),u=pd.hasOwnProperty(s)?s:null;if(u==null)return v("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",t),Iu[t]=!0,!0;if(t!==u)return v("Invalid ARIA attribute `%s`. Did you mean `%s`?",t,u),Iu[t]=!0,!0}if(A1.test(t)){var d=t.toLowerCase(),g=pd.hasOwnProperty(d)?d:null;if(g==null)return Iu[t]=!0,!1;if(t!==g)return v("Unknown ARIA attribute `%s`. Did you mean `%s`?",t,g),Iu[t]=!0,!0}}return!0}function zc(e,t){{var s=[];for(var u in t){var d=R0(e,u);d||s.push(u)}var g=s.map(function(y){return"`"+y+"`"}).join(", ");s.length===1?v("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",g,e):s.length>1&&v("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",g,e)}}function A0(e,t){Ho(e,t)||zc(e,t)}var k0=!1;function vd(e,t){{if(e!=="input"&&e!=="textarea"&&e!=="select")return;t!=null&&t.value===null&&!k0&&(k0=!0,e==="select"&&t.multiple?v("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",e):v("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",e))}}var Fl=function(){};{var Kn={},F0=/^on./,gd=/^on[^A-Z]/,mg=new RegExp("^(aria)-["+Pe+"]*$"),yg=new RegExp("^(aria)[A-Z]["+Pe+"]*$");Fl=function(e,t,s,u){if(zr.call(Kn,t)&&Kn[t])return!0;var d=t.toLowerCase();if(d==="onfocusin"||d==="onfocusout")return v("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),Kn[t]=!0,!0;if(u!=null){var g=u.registrationNameDependencies,y=u.possibleRegistrationNames;if(g.hasOwnProperty(t))return!0;var E=y.hasOwnProperty(d)?y[d]:null;if(E!=null)return v("Invalid event handler property `%s`. Did you mean `%s`?",t,E),Kn[t]=!0,!0;if(F0.test(t))return v("Unknown event handler property `%s`. It will be ignored.",t),Kn[t]=!0,!0}else if(F0.test(t))return gd.test(t)&&v("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",t),Kn[t]=!0,!0;if(mg.test(t)||yg.test(t))return!0;if(d==="innerhtml")return v("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),Kn[t]=!0,!0;if(d==="aria")return v("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),Kn[t]=!0,!0;if(d==="is"&&s!==null&&s!==void 0&&typeof s!="string")return v("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof s),Kn[t]=!0,!0;if(typeof s=="number"&&isNaN(s))return v("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",t),Kn[t]=!0,!0;var _=wr(t),O=_!==null&&_.type===ar;if(jc.hasOwnProperty(d)){var I=jc[d];if(I!==t)return v("Invalid DOM property `%s`. Did you mean `%s`?",t,I),Kn[t]=!0,!0}else if(!O&&t!==d)return v("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",t,d),Kn[t]=!0,!0;return typeof s=="boolean"&&Or(t,s,_,!1)?(s?v('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',s,t,t,s,t):v('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',s,t,t,s,t,t,t),Kn[t]=!0,!0):O?!0:Or(t,s,_,!1)?(Kn[t]=!0,!1):((s==="false"||s==="true")&&_!==null&&_.type===Kr&&(v("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",s,t,s==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',t,s),Kn[t]=!0),!0)}}var xg=function(e,t,s){{var u=[];for(var d in t){var g=Fl(e,d,t[d],s);g||u.push(d)}var y=u.map(function(E){return"`"+E+"`"}).join(", ");u.length===1?v("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",y,e):u.length>1&&v("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",y,e)}};function Eg(e,t,s){Ho(e,t)||xg(e,t,s)}var O0=1,md=2,ba=4,N0=O0|md|ba,Ol=null;function k1(e){Ol!==null&&v("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),Ol=e}function F1(){Ol===null&&v("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."),Ol=null}function qc(e){return e===Ol}function B0(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===Ks?t.parentNode:t}var yd=null,Nl=null,yr=null;function xd(e){var t=ac(e);if(t){if(typeof yd!="function")throw new Error("setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.");var s=t.stateNode;if(s){var u=Am(s);yd(t.stateNode,t.type,u)}}}function Ed(e){yd=e}function Pu(e){Nl?yr?yr.push(e):yr=[e]:Nl=e}function Sg(){return Nl!==null||yr!==null}function Sd(){if(Nl){var e=Nl,t=yr;if(Nl=null,yr=null,xd(e),t)for(var s=0;s<t.length;s++)xd(t[s])}}var Lu=function(e,t){return e(t)},Yc=function(){},Io=!1;function Cg(){var e=Sg();e&&(Yc(),Sd())}function wg(e,t,s){if(Io)return e(t,s);Io=!0;try{return Lu(e,t,s)}finally{Io=!1,Cg()}}function O1(e,t,s){Lu=e,Yc=s}function bg(e){return e==="button"||e==="input"||e==="select"||e==="textarea"}function Cd(e,t,s){switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":return!!(s.disabled&&bg(t));default:return!1}}function $o(e,t){var s=e.stateNode;if(s===null)return null;var u=Am(s);if(u===null)return null;var d=u[t];if(Cd(t,e.type,u))return null;if(d&&typeof d!="function")throw new Error("Expected `"+t+"` listener to be a function, instead got a value of `"+typeof d+"` type.");return d}var Vc=!1;if(Sr)try{var Bl={};Object.defineProperty(Bl,"passive",{get:function(){Vc=!0}}),window.addEventListener("test",Bl,Bl),window.removeEventListener("test",Bl,Bl)}catch{Vc=!1}function wd(e,t,s,u,d,g,y,E,_){var O=Array.prototype.slice.call(arguments,3);try{t.apply(s,O)}catch(I){this.onError(I)}}var bd=wd;if(typeof window<"u"&&typeof window.dispatchEvent=="function"&&typeof document<"u"&&typeof document.createEvent=="function"){var M0=document.createElement("react");bd=function(t,s,u,d,g,y,E,_,O){if(typeof document>"u"||document===null)throw new Error("The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");var I=document.createEvent("Event"),re=!1,J=!0,ue=window.event,de=Object.getOwnPropertyDescriptor(window,"event");function me(){M0.removeEventListener(ye,gt,!1),typeof window.event<"u"&&window.hasOwnProperty("event")&&(window.event=ue)}var Ye=Array.prototype.slice.call(arguments,3);function gt(){re=!0,me(),s.apply(u,Ye),J=!1}var ft,Kt=!1,jt=!1;function ie(ae){if(ft=ae.error,Kt=!0,ft===null&&ae.colno===0&&ae.lineno===0&&(jt=!0),ae.defaultPrevented&&ft!=null&&typeof ft=="object")try{ft._suppressLogging=!0}catch{}}var ye="react-"+(t||"invokeguardedcallback");if(window.addEventListener("error",ie),M0.addEventListener(ye,gt,!1),I.initEvent(ye,!1,!1),M0.dispatchEvent(I),de&&Object.defineProperty(window,"event",de),re&&J&&(Kt?jt&&(ft=new Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://reactjs.org/link/crossorigin-error for more information.")):ft=new Error(`An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the "Pause on exceptions" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue.`),this.onError(ft)),window.removeEventListener("error",ie),!re)return me(),wd.apply(this,arguments)}}var _g=bd,Uu=!1,_d=null,ju=!1,Es=null,Dg={onError:function(e){Uu=!0,_d=e}};function Po(e,t,s,u,d,g,y,E,_){Uu=!1,_d=null,_g.apply(Dg,arguments)}function Ss(e,t,s,u,d,g,y,E,_){if(Po.apply(this,arguments),Uu){var O=Gc();ju||(ju=!0,Es=O)}}function Wc(){if(ju){var e=Es;throw ju=!1,Es=null,e}}function Xs(){return Uu}function Gc(){if(Uu){var e=_d;return Uu=!1,_d=null,e}else throw new Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.")}function zu(e){return e._reactInternals}function N1(e){return e._reactInternals!==void 0}function Ml(e,t){e._reactInternals=t}var ht=0,Xa=1,Zr=2,Vt=4,_a=16,Da=32,$r=64,dt=128,fi=256,an=512,Nn=1024,Li=2048,Ui=4096,yn=8192,qu=16384,Tg=32767,Kc=32768,Pn=65536,Dd=131072,Cs=1048576,Yu=2097152,Zs=4194304,Td=8388608,Lo=16777216,ws=33554432,Uo=Vt|Nn|0,jo=Zr|Vt|_a|Da|an|Ui|yn,zo=Vt|$r|an|yn,Js=Li|_a,xn=Zs|Td|Yu,Ta=i.ReactCurrentOwner;function ia(e){var t=e,s=e;if(e.alternate)for(;t.return;)t=t.return;else{var u=t;do t=u,(t.flags&(Zr|Ui))!==ht&&(s=t.return),u=t.return;while(u)}return t.tag===T?s:null}function bs(e){if(e.tag===K){var t=e.memoizedState;if(t===null){var s=e.alternate;s!==null&&(t=s.memoizedState)}if(t!==null)return t.dehydrated}return null}function _s(e){return e.tag===T?e.stateNode.containerInfo:null}function Hl(e){return ia(e)===e}function Rg(e){{var t=Ta.current;if(t!==null&&t.tag===S){var s=t,u=s.stateNode;u._warnedAboutRefsInRender||v("%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",Dt(s)||"A component"),u._warnedAboutRefsInRender=!0}}var d=zu(e);return d?ia(d)===d:!1}function Rd(e){if(ia(e)!==e)throw new Error("Unable to find node on an unmounted component.")}function Ad(e){var t=e.alternate;if(!t){var s=ia(e);if(s===null)throw new Error("Unable to find node on an unmounted component.");return s!==e?null:e}for(var u=e,d=t;;){var g=u.return;if(g===null)break;var y=g.alternate;if(y===null){var E=g.return;if(E!==null){u=d=E;continue}break}if(g.child===y.child){for(var _=g.child;_;){if(_===u)return Rd(g),e;if(_===d)return Rd(g),t;_=_.sibling}throw new Error("Unable to find node on an unmounted component.")}if(u.return!==d.return)u=g,d=y;else{for(var O=!1,I=g.child;I;){if(I===u){O=!0,u=g,d=y;break}if(I===d){O=!0,d=g,u=y;break}I=I.sibling}if(!O){for(I=y.child;I;){if(I===u){O=!0,u=y,d=g;break}if(I===d){O=!0,d=y,u=g;break}I=I.sibling}if(!O)throw new Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(u.alternate!==d)throw new Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(u.tag!==T)throw new Error("Unable to find node on an unmounted component.");return u.stateNode.current===u?e:t}function ji(e){var t=Ad(e);return t!==null?zi(t):null}function zi(e){if(e.tag===H||e.tag===P)return e;for(var t=e.child;t!==null;){var s=zi(t);if(s!==null)return s;t=t.sibling}return null}function Yr(e){var t=Ad(e);return t!==null?Ra(t):null}function Ra(e){if(e.tag===H||e.tag===P)return e;for(var t=e.child;t!==null;){if(t.tag!==A){var s=Ra(t);if(s!==null)return s}t=t.sibling}return null}var H0=r.unstable_scheduleCallback,Ag=r.unstable_cancelCallback,I0=r.unstable_shouldYield,$0=r.unstable_requestPaint,Bn=r.unstable_now,kd=r.unstable_getCurrentPriorityLevel,Qc=r.unstable_ImmediatePriority,qo=r.unstable_UserBlockingPriority,eo=r.unstable_NormalPriority,B1=r.unstable_LowPriority,Il=r.unstable_IdlePriority,Fd=r.unstable_yieldValue,kg=r.unstable_setDisableYieldValue,$l=null,un=null,qe=null,aa=!1,qi=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u";function Vu(e){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled)return!0;if(!t.supportsFiber)return v("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://reactjs.org/link/react-devtools"),!0;try{he&&(e=Bt({},e,{getLaneLabelMap:Pl,injectProfilingHooks:Aa})),$l=t.inject(e),un=t}catch(s){v("React instrumentation encountered an error: %s.",s)}return!!t.checkDCE}function P0(e,t){if(un&&typeof un.onScheduleFiberRoot=="function")try{un.onScheduleFiberRoot($l,e,t)}catch(s){aa||(aa=!0,v("React instrumentation encountered an error: %s",s))}}function L0(e,t){if(un&&typeof un.onCommitFiberRoot=="function")try{var s=(e.current.flags&dt)===dt;if(le){var u;switch(t){case Ei:u=Qc;break;case Ts:u=qo;break;case ka:u=eo;break;case Fa:u=Il;break;default:u=eo;break}un.onCommitFiberRoot($l,e,u,s)}}catch(d){aa||(aa=!0,v("React instrumentation encountered an error: %s",d))}}function U0(e){if(un&&typeof un.onPostCommitFiberRoot=="function")try{un.onPostCommitFiberRoot($l,e)}catch(t){aa||(aa=!0,v("React instrumentation encountered an error: %s",t))}}function j0(e){if(un&&typeof un.onCommitFiberUnmount=="function")try{un.onCommitFiberUnmount($l,e)}catch(t){aa||(aa=!0,v("React instrumentation encountered an error: %s",t))}}function Jr(e){if(typeof Fd=="function"&&(kg(e),f(e)),un&&typeof un.setStrictMode=="function")try{un.setStrictMode($l,e)}catch(t){aa||(aa=!0,v("React instrumentation encountered an error: %s",t))}}function Aa(e){qe=e}function Pl(){{for(var e=new Map,t=1,s=0;s<jl;s++){var u=Bg(t);e.set(t,u),t*=2}return e}}function z0(e){qe!==null&&typeof qe.markCommitStarted=="function"&&qe.markCommitStarted(e)}function q0(){qe!==null&&typeof qe.markCommitStopped=="function"&&qe.markCommitStopped()}function sa(e){qe!==null&&typeof qe.markComponentRenderStarted=="function"&&qe.markComponentRenderStarted(e)}function oa(){qe!==null&&typeof qe.markComponentRenderStopped=="function"&&qe.markComponentRenderStopped()}function Y0(e){qe!==null&&typeof qe.markComponentPassiveEffectMountStarted=="function"&&qe.markComponentPassiveEffectMountStarted(e)}function Fg(){qe!==null&&typeof qe.markComponentPassiveEffectMountStopped=="function"&&qe.markComponentPassiveEffectMountStopped()}function to(e){qe!==null&&typeof qe.markComponentPassiveEffectUnmountStarted=="function"&&qe.markComponentPassiveEffectUnmountStarted(e)}function Yo(){qe!==null&&typeof qe.markComponentPassiveEffectUnmountStopped=="function"&&qe.markComponentPassiveEffectUnmountStopped()}function Od(e){qe!==null&&typeof qe.markComponentLayoutEffectMountStarted=="function"&&qe.markComponentLayoutEffectMountStarted(e)}function Og(){qe!==null&&typeof qe.markComponentLayoutEffectMountStopped=="function"&&qe.markComponentLayoutEffectMountStopped()}function Xc(e){qe!==null&&typeof qe.markComponentLayoutEffectUnmountStarted=="function"&&qe.markComponentLayoutEffectUnmountStarted(e)}function V0(){qe!==null&&typeof qe.markComponentLayoutEffectUnmountStopped=="function"&&qe.markComponentLayoutEffectUnmountStopped()}function Zc(e,t,s){qe!==null&&typeof qe.markComponentErrored=="function"&&qe.markComponentErrored(e,t,s)}function Ds(e,t,s){qe!==null&&typeof qe.markComponentSuspended=="function"&&qe.markComponentSuspended(e,t,s)}function Jc(e){qe!==null&&typeof qe.markLayoutEffectsStarted=="function"&&qe.markLayoutEffectsStarted(e)}function ef(){qe!==null&&typeof qe.markLayoutEffectsStopped=="function"&&qe.markLayoutEffectsStopped()}function Ll(e){qe!==null&&typeof qe.markPassiveEffectsStarted=="function"&&qe.markPassiveEffectsStarted(e)}function W0(){qe!==null&&typeof qe.markPassiveEffectsStopped=="function"&&qe.markPassiveEffectsStopped()}function Ul(e){qe!==null&&typeof qe.markRenderStarted=="function"&&qe.markRenderStarted(e)}function Ng(){qe!==null&&typeof qe.markRenderYielded=="function"&&qe.markRenderYielded()}function Nd(){qe!==null&&typeof qe.markRenderStopped=="function"&&qe.markRenderStopped()}function en(e){qe!==null&&typeof qe.markRenderScheduled=="function"&&qe.markRenderScheduled(e)}function Bd(e,t){qe!==null&&typeof qe.markForceUpdateScheduled=="function"&&qe.markForceUpdateScheduled(e,t)}function tf(e,t){qe!==null&&typeof qe.markStateUpdateScheduled=="function"&&qe.markStateUpdateScheduled(e,t)}var pt=0,It=1,or=2,Rr=8,lr=16,En=Math.clz32?Math.clz32:rf,Ln=Math.log,Md=Math.LN2;function rf(e){var t=e>>>0;return t===0?32:31-(Ln(t)/Md|0)|0}var jl=31,Ae=0,nr=0,Ct=1,Vo=2,Za=4,di=8,cn=16,ro=32,Wo=4194240,zl=64,Hd=128,Id=256,$d=512,Pd=1024,Ld=2048,Ud=4096,jd=8192,zd=16384,ql=32768,qd=65536,Wu=131072,Gu=262144,Yd=524288,nf=1048576,Vd=2097152,af=130023424,Yl=4194304,Wd=8388608,sf=16777216,Gd=33554432,Kd=67108864,G0=Yl,of=134217728,K0=268435455,lf=268435456,Vl=536870912,Yi=1073741824;function Bg(e){{if(e&Ct)return"Sync";if(e&Vo)return"InputContinuousHydration";if(e&Za)return"InputContinuous";if(e&di)return"DefaultHydration";if(e&cn)return"Default";if(e&ro)return"TransitionHydration";if(e&Wo)return"Transition";if(e&af)return"Retry";if(e&of)return"SelectiveHydration";if(e&lf)return"IdleHydration";if(e&Vl)return"Idle";if(e&Yi)return"Offscreen"}}var Nr=-1,Wl=zl,Qd=Yl;function uf(e){switch(Go(e)){case Ct:return Ct;case Vo:return Vo;case Za:return Za;case di:return di;case cn:return cn;case ro:return ro;case zl:case Hd:case Id:case $d:case Pd:case Ld:case Ud:case jd:case zd:case ql:case qd:case Wu:case Gu:case Yd:case nf:case Vd:return e&Wo;case Yl:case Wd:case sf:case Gd:case Kd:return e&af;case of:return of;case lf:return lf;case Vl:return Vl;case Yi:return Yi;default:return v("Should have found matching lanes. This is a bug in React."),e}}function Xd(e,t){var s=e.pendingLanes;if(s===Ae)return Ae;var u=Ae,d=e.suspendedLanes,g=e.pingedLanes,y=s&K0;if(y!==Ae){var E=y&~d;if(E!==Ae)u=uf(E);else{var _=y&g;_!==Ae&&(u=uf(_))}}else{var O=s&~d;O!==Ae?u=uf(O):g!==Ae&&(u=uf(g))}if(u===Ae)return Ae;if(t!==Ae&&t!==u&&(t&d)===Ae){var I=Go(u),re=Go(t);if(I>=re||I===cn&&(re&Wo)!==Ae)return t}(u&Za)!==Ae&&(u|=s&cn);var J=e.entangledLanes;if(J!==Ae)for(var ue=e.entanglements,de=u&J;de>0;){var me=Sn(de),Ye=1<<me;u|=ue[me],de&=~Ye}return u}function Ja(e,t){for(var s=e.eventTimes,u=Nr;t>0;){var d=Sn(t),g=1<<d,y=s[d];y>u&&(u=y),t&=~g}return u}function Q0(e,t){switch(e){case Ct:case Vo:case Za:return t+250;case di:case cn:case ro:case zl:case Hd:case Id:case $d:case Pd:case Ld:case Ud:case jd:case zd:case ql:case qd:case Wu:case Gu:case Yd:case nf:case Vd:return t+5e3;case Yl:case Wd:case sf:case Gd:case Kd:return Nr;case of:case lf:case Vl:case Yi:return Nr;default:return v("Should have found matching lanes. This is a bug in React."),Nr}}function Zd(e,t){for(var s=e.pendingLanes,u=e.suspendedLanes,d=e.pingedLanes,g=e.expirationTimes,y=s;y>0;){var E=Sn(y),_=1<<E,O=g[E];O===Nr?((_&u)===Ae||(_&d)!==Ae)&&(g[E]=Q0(_,t)):O<=t&&(e.expiredLanes|=_),y&=~_}}function Mg(e){return uf(e.pendingLanes)}function Jd(e){var t=e.pendingLanes&~Yi;return t!==Ae?t:t&Yi?Yi:Ae}function Hg(e){return(e&Ct)!==Ae}function cf(e){return(e&K0)!==Ae}function Gl(e){return(e&af)===e}function X0(e){var t=Ct|Za|cn;return(e&t)===Ae}function Z0(e){return(e&Wo)===e}function eh(e,t){var s=Vo|Za|di|cn;return(t&s)!==Ae}function Ig(e,t){return(t&e.expiredLanes)!==Ae}function J0(e){return(e&Wo)!==Ae}function ep(){var e=Wl;return Wl<<=1,(Wl&Wo)===Ae&&(Wl=zl),e}function $g(){var e=Qd;return Qd<<=1,(Qd&af)===Ae&&(Qd=Yl),e}function Go(e){return e&-e}function ff(e){return Go(e)}function Sn(e){return 31-En(e)}function Qn(e){return Sn(e)}function Vi(e,t){return(e&t)!==Ae}function Kl(e,t){return(e&t)===t}function Nt(e,t){return e|t}function df(e,t){return e&~t}function tp(e,t){return e&t}function Pg(e){return e}function Lg(e,t){return e!==nr&&e<t?e:t}function hf(e){for(var t=[],s=0;s<jl;s++)t.push(e);return t}function Ku(e,t,s){e.pendingLanes|=t,t!==Vl&&(e.suspendedLanes=Ae,e.pingedLanes=Ae);var u=e.eventTimes,d=Qn(t);u[d]=s}function Ug(e,t){e.suspendedLanes|=t,e.pingedLanes&=~t;for(var s=e.expirationTimes,u=t;u>0;){var d=Sn(u),g=1<<d;s[d]=Nr,u&=~g}}function th(e,t,s){e.pingedLanes|=e.suspendedLanes&t}function rp(e,t){var s=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=Ae,e.pingedLanes=Ae,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t;for(var u=e.entanglements,d=e.eventTimes,g=e.expirationTimes,y=s;y>0;){var E=Sn(y),_=1<<E;u[E]=Ae,d[E]=Nr,g[E]=Nr,y&=~_}}function rh(e,t){for(var s=e.entangledLanes|=t,u=e.entanglements,d=s;d;){var g=Sn(d),y=1<<g;y&t|u[g]&t&&(u[g]|=t),d&=~y}}function np(e,t){var s=Go(t),u;switch(s){case Za:u=Vo;break;case cn:u=di;break;case zl:case Hd:case Id:case $d:case Pd:case Ld:case Ud:case jd:case zd:case ql:case qd:case Wu:case Gu:case Yd:case nf:case Vd:case Yl:case Wd:case sf:case Gd:case Kd:u=ro;break;case Vl:u=lf;break;default:u=nr;break}return(u&(e.suspendedLanes|t))!==nr?nr:u}function pf(e,t,s){if(qi)for(var u=e.pendingUpdatersLaneMap;s>0;){var d=Qn(s),g=1<<d,y=u[d];y.add(t),s&=~g}}function jg(e,t){if(qi)for(var s=e.pendingUpdatersLaneMap,u=e.memoizedUpdaters;t>0;){var d=Qn(t),g=1<<d,y=s[d];y.size>0&&(y.forEach(function(E){var _=E.alternate;(_===null||!u.has(_))&&u.add(E)}),y.clear()),t&=~g}}function ip(e,t){return null}var Ei=Ct,Ts=Za,ka=cn,Fa=Vl,vf=nr;function Oa(){return vf}function Cn(e){vf=e}function zg(e,t){var s=vf;try{return vf=e,t()}finally{vf=s}}function qg(e,t){return e!==0&&e<t?e:t}function gf(e,t){return e>t?e:t}function Un(e,t){return e!==0&&e<t}function Yg(e){var t=Go(e);return Un(Ei,t)?Un(Ts,t)?cf(t)?ka:Fa:Ts:Ei}function nh(e){var t=e.current.memoizedState;return t.isDehydrated}var mf;function hi(e){mf=e}function M1(e){mf(e)}var et;function Qu(e){et=e}var ih;function Vg(e){ih=e}var Wg;function yf(e){Wg=e}var xf;function ap(e){xf=e}var ah=!1,Ef=[],no=null,Rs=null,As=null,fn=new Map,Si=new Map,Ci=[],Gg=["mousedown","mouseup","touchcancel","touchend","touchstart","auxclick","dblclick","pointercancel","pointerdown","pointerup","dragend","dragstart","drop","compositionend","compositionstart","keydown","keypress","keyup","input","textInput","copy","cut","paste","click","change","contextmenu","reset","submit"];function Kg(e){return Gg.indexOf(e)>-1}function es(e,t,s,u,d){return{blockedOn:e,domEventName:t,eventSystemFlags:s,nativeEvent:d,targetContainers:[u]}}function sp(e,t){switch(e){case"focusin":case"focusout":no=null;break;case"dragenter":case"dragleave":Rs=null;break;case"mouseover":case"mouseout":As=null;break;case"pointerover":case"pointerout":{var s=t.pointerId;fn.delete(s);break}case"gotpointercapture":case"lostpointercapture":{var u=t.pointerId;Si.delete(u);break}}}function Wi(e,t,s,u,d,g){if(e===null||e.nativeEvent!==g){var y=es(t,s,u,d,g);if(t!==null){var E=ac(t);E!==null&&et(E)}return y}e.eventSystemFlags|=u;var _=e.targetContainers;return d!==null&&_.indexOf(d)===-1&&_.push(d),e}function H1(e,t,s,u,d){switch(t){case"focusin":{var g=d;return no=Wi(no,e,t,s,u,g),!0}case"dragenter":{var y=d;return Rs=Wi(Rs,e,t,s,u,y),!0}case"mouseover":{var E=d;return As=Wi(As,e,t,s,u,E),!0}case"pointerover":{var _=d,O=_.pointerId;return fn.set(O,Wi(fn.get(O)||null,e,t,s,u,_)),!0}case"gotpointercapture":{var I=d,re=I.pointerId;return Si.set(re,Wi(Si.get(re)||null,e,t,s,u,I)),!0}}return!1}function op(e){var t=Of(e.target);if(t!==null){var s=ia(t);if(s!==null){var u=s.tag;if(u===K){var d=bs(s);if(d!==null){e.blockedOn=d,xf(e.priority,function(){ih(s)});return}}else if(u===T){var g=s.stateNode;if(nh(g)){e.blockedOn=_s(s);return}}}}e.blockedOn=null}function Qg(e){for(var t=Wg(),s={blockedOn:null,target:e,priority:t},u=0;u<Ci.length&&Un(t,Ci[u].priority);u++);Ci.splice(u,0,s),u===0&&op(s)}function Sf(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;t.length>0;){var s=t[0],u=Zu(e.domEventName,e.eventSystemFlags,s,e.nativeEvent);if(u===null){var d=e.nativeEvent,g=new d.constructor(d.type,d);k1(g),d.target.dispatchEvent(g),F1()}else{var y=ac(u);return y!==null&&et(y),e.blockedOn=u,!1}t.shift()}return!0}function lp(e,t,s){Sf(e)&&s.delete(t)}function I1(){ah=!1,no!==null&&Sf(no)&&(no=null),Rs!==null&&Sf(Rs)&&(Rs=null),As!==null&&Sf(As)&&(As=null),fn.forEach(lp),Si.forEach(lp)}function Ko(e,t){e.blockedOn===t&&(e.blockedOn=null,ah||(ah=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,I1)))}function Ql(e){if(Ef.length>0){Ko(Ef[0],e);for(var t=1;t<Ef.length;t++){var s=Ef[t];s.blockedOn===e&&(s.blockedOn=null)}}no!==null&&Ko(no,e),Rs!==null&&Ko(Rs,e),As!==null&&Ko(As,e);var u=function(E){return Ko(E,e)};fn.forEach(u),Si.forEach(u);for(var d=0;d<Ci.length;d++){var g=Ci[d];g.blockedOn===e&&(g.blockedOn=null)}for(;Ci.length>0;){var y=Ci[0];if(y.blockedOn!==null)break;op(y),y.blockedOn===null&&Ci.shift()}}var Xn=i.ReactCurrentBatchConfig,Wt=!0;function Mn(e){Wt=!!e}function wn(){return Wt}function Zn(e,t,s){var u=sh(t),d;switch(u){case Ei:d=la;break;case Ts:d=Xu;break;case ka:default:d=dn;break}return d.bind(null,t,s,e)}function la(e,t,s,u){var d=Oa(),g=Xn.transition;Xn.transition=null;try{Cn(Ei),dn(e,t,s,u)}finally{Cn(d),Xn.transition=g}}function Xu(e,t,s,u){var d=Oa(),g=Xn.transition;Xn.transition=null;try{Cn(Ts),dn(e,t,s,u)}finally{Cn(d),Xn.transition=g}}function dn(e,t,s,u){Wt&&Cf(e,t,s,u)}function Cf(e,t,s,u){var d=Zu(e,t,s,u);if(d===null){eE(e,t,u,ks,s),sp(e,u);return}if(H1(d,e,t,s,u)){u.stopPropagation();return}if(sp(e,u),t&ba&&Kg(e)){for(;d!==null;){var g=ac(d);g!==null&&M1(g);var y=Zu(e,t,s,u);if(y===null&&eE(e,t,u,ks,s),y===d)break;d=y}d!==null&&u.stopPropagation();return}eE(e,t,u,null,s)}var ks=null;function Zu(e,t,s,u){ks=null;var d=B0(u),g=Of(d);if(g!==null){var y=ia(g);if(y===null)g=null;else{var E=y.tag;if(E===K){var _=bs(y);if(_!==null)return _;g=null}else if(E===T){var O=y.stateNode;if(nh(O))return _s(y);g=null}else y!==g&&(g=null)}}return ks=g,null}function sh(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return Ei;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return Ts;case"message":{var t=kd();switch(t){case Qc:return Ei;case qo:return Ts;case eo:case B1:return ka;case Il:return Fa;default:return ka}}default:return ka}}function wf(e,t,s){return e.addEventListener(t,s,!1),s}function Gi(e,t,s){return e.addEventListener(t,s,!0),s}function up(e,t,s,u){return e.addEventListener(t,s,{capture:!0,passive:u}),s}function Ju(e,t,s,u){return e.addEventListener(t,s,{passive:u}),s}var ua=null,ec=null,Xl=null;function Qo(e){return ua=e,ec=bf(),!0}function oh(){ua=null,ec=null,Xl=null}function io(){if(Xl)return Xl;var e,t=ec,s=t.length,u,d=bf(),g=d.length;for(e=0;e<s&&t[e]===d[e];e++);var y=s-e;for(u=1;u<=y&&t[s-u]===d[g-u];u++);var E=u>1?1-u:void 0;return Xl=d.slice(e,E),Xl}function bf(){return"value"in ua?ua.value:ua.textContent}function Xo(e){var t,s=e.keyCode;return"charCode"in e?(t=e.charCode,t===0&&s===13&&(t=13)):t=s,t===10&&(t=13),t>=32||t===13?t:0}function tc(){return!0}function _f(){return!1}function pi(e){function t(s,u,d,g,y){this._reactName=s,this._targetInst=d,this.type=u,this.nativeEvent=g,this.target=y,this.currentTarget=null;for(var E in e)if(e.hasOwnProperty(E)){var _=e[E];_?this[E]=_(g):this[E]=g[E]}var O=g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1;return O?this.isDefaultPrevented=tc:this.isDefaultPrevented=_f,this.isPropagationStopped=_f,this}return Bt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=tc)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=tc)},persist:function(){},isPersistent:tc}),t}var bn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Fs=pi(bn),wi=Bt({},bn,{view:0,detail:0}),Ki=pi(wi),lh,Df,Zl;function $1(e){e!==Zl&&(Zl&&e.type==="mousemove"?(lh=e.screenX-Zl.screenX,Df=e.screenY-Zl.screenY):(lh=0,Df=0),Zl=e)}var ts=Bt({},wi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Vr,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:($1(e),lh)},movementY:function(e){return"movementY"in e?e.movementY:Df}}),cp=pi(ts),fp=Bt({},ts,{dataTransfer:0}),Jl=pi(fp),dp=Bt({},wi,{relatedTarget:0}),ao=pi(dp),Xg=Bt({},bn,{animationName:0,elapsedTime:0,pseudoElement:0}),Zg=pi(Xg),hp=Bt({},bn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),uh=pi(hp),P1=Bt({},bn,{data:0}),Jg=pi(P1),em=Jg,tm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},eu={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};function L1(e){if(e.key){var t=tm[e.key]||e.key;if(t!=="Unidentified")return t}if(e.type==="keypress"){var s=Xo(e);return s===13?"Enter":String.fromCharCode(s)}return e.type==="keydown"||e.type==="keyup"?eu[e.keyCode]||"Unidentified":""}var rc={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function rm(e){var t=this,s=t.nativeEvent;if(s.getModifierState)return s.getModifierState(e);var u=rc[e];return u?!!s[u]:!1}function Vr(e){return rm}var U1=Bt({},wi,{key:L1,code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Vr,charCode:function(e){return e.type==="keypress"?Xo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Xo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),nm=pi(U1),j1=Bt({},ts,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),im=pi(j1),am=Bt({},wi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Vr}),sm=pi(am),z1=Bt({},bn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Na=pi(z1),pp=Bt({},ts,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),q1=pi(pp),Zo=[9,13,27,32],Tf=229,so=Sr&&"CompositionEvent"in window,Jo=null;Sr&&"documentMode"in document&&(Jo=document.documentMode);var vp=Sr&&"TextEvent"in window&&!Jo,ch=Sr&&(!so||Jo&&Jo>8&&Jo<=11),om=32,fh=String.fromCharCode(om);function Y1(){Te("onBeforeInput",["compositionend","keypress","textInput","paste"]),Te("onCompositionEnd",["compositionend","focusout","keydown","keypress","keyup","mousedown"]),Te("onCompositionStart",["compositionstart","focusout","keydown","keypress","keyup","mousedown"]),Te("onCompositionUpdate",["compositionupdate","focusout","keydown","keypress","keyup","mousedown"])}var gp=!1;function lm(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}function dh(e){switch(e){case"compositionstart":return"onCompositionStart";case"compositionend":return"onCompositionEnd";case"compositionupdate":return"onCompositionUpdate"}}function hh(e,t){return e==="keydown"&&t.keyCode===Tf}function mp(e,t){switch(e){case"keyup":return Zo.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==Tf;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ph(e){var t=e.detail;return typeof t=="object"&&"data"in t?t.data:null}function um(e){return e.locale==="ko"}var tu=!1;function yp(e,t,s,u,d){var g,y;if(so?g=dh(t):tu?mp(t,u)&&(g="onCompositionEnd"):hh(t,u)&&(g="onCompositionStart"),!g)return null;ch&&!um(u)&&(!tu&&g==="onCompositionStart"?tu=Qo(d):g==="onCompositionEnd"&&tu&&(y=io()));var E=gm(s,g);if(E.length>0){var _=new Jg(g,t,null,u,d);if(e.push({event:_,listeners:E}),y)_.data=y;else{var O=ph(u);O!==null&&(_.data=O)}}}function vh(e,t){switch(e){case"compositionend":return ph(t);case"keypress":var s=t.which;return s!==om?null:(gp=!0,fh);case"textInput":var u=t.data;return u===fh&&gp?null:u;default:return null}}function xp(e,t){if(tu){if(e==="compositionend"||!so&&mp(e,t)){var s=io();return oh(),tu=!1,s}return null}switch(e){case"paste":return null;case"keypress":if(!lm(t)){if(t.char&&t.char.length>1)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return ch&&!um(t)?null:t.data;default:return null}}function gh(e,t,s,u,d){var g;if(vp?g=vh(t,u):g=xp(t,u),!g)return null;var y=gm(s,"onBeforeInput");if(y.length>0){var E=new em("onBeforeInput","beforeinput",null,u,d);e.push({event:E,listeners:y}),E.data=g}}function cm(e,t,s,u,d,g,y){yp(e,t,s,u,d),gh(e,t,s,u,d)}var V1={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Rf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!V1[e.type]:t==="textarea"}/**
88
- * Checks if an event is supported in the current execution environment.
89
- *
90
- * NOTE: This will not work correctly for non-generic events such as `change`,
91
- * `reset`, `load`, `error`, and `select`.
92
- *
93
- * Borrows from Modernizr.
94
- *
95
- * @param {string} eventNameSuffix Event name, e.g. "click".
96
- * @return {boolean} True if the event is supported.
97
- * @internal
98
- * @license Modernizr 3.0.0pre (Custom Build) | MIT
99
- */function W1(e){if(!Sr)return!1;var t="on"+e,s=t in document;if(!s){var u=document.createElement("div");u.setAttribute(t,"return;"),s=typeof u[t]=="function"}return s}function Af(){Te("onChange",["change","click","focusin","focusout","input","keydown","keyup","selectionchange"])}function fm(e,t,s,u){Pu(u);var d=gm(t,"onChange");if(d.length>0){var g=new Fs("onChange","change",null,s,u);e.push({event:g,listeners:d})}}var el=null,n=null;function a(e){var t=e.nodeName&&e.nodeName.toLowerCase();return t==="select"||t==="input"&&e.type==="file"}function c(e){var t=[];fm(t,n,e,B0(e)),wg(h,t)}function h(e){yb(e,0)}function m(e){var t=Ch(e);if(ys(t))return e}function x(e,t){if(e==="change")return t}var k=!1;Sr&&(k=W1("input")&&(!document.documentMode||document.documentMode>9));function Y(e,t){el=e,n=t,el.attachEvent("onpropertychange",fe)}function Q(){el&&(el.detachEvent("onpropertychange",fe),el=null,n=null)}function fe(e){e.propertyName==="value"&&m(n)&&c(e)}function Fe(e,t,s){e==="focusin"?(Q(),Y(t,s)):e==="focusout"&&Q()}function Ne(e,t){if(e==="selectionchange"||e==="keyup"||e==="keydown")return m(n)}function ke(e){var t=e.nodeName;return t&&t.toLowerCase()==="input"&&(e.type==="checkbox"||e.type==="radio")}function Qe(e,t){if(e==="click")return m(t)}function st(e,t){if(e==="input"||e==="change")return m(t)}function ut(e){var t=e._wrapperState;!t||!t.controlled||e.type!=="number"||vt(e,"number",e.value)}function hn(e,t,s,u,d,g,y){var E=s?Ch(s):window,_,O;if(a(E)?_=x:Rf(E)?k?_=st:(_=Ne,O=Fe):ke(E)&&(_=Qe),_){var I=_(t,s);if(I){fm(e,I,u,d);return}}O&&O(t,E,s),t==="focusout"&&ut(E)}function ne(){xt("onMouseEnter",["mouseout","mouseover"]),xt("onMouseLeave",["mouseout","mouseover"]),xt("onPointerEnter",["pointerout","pointerover"]),xt("onPointerLeave",["pointerout","pointerover"])}function te(e,t,s,u,d,g,y){var E=t==="mouseover"||t==="pointerover",_=t==="mouseout"||t==="pointerout";if(E&&!qc(u)){var O=u.relatedTarget||u.fromElement;if(O&&(Of(O)||Np(O)))return}if(!(!_&&!E)){var I;if(d.window===d)I=d;else{var re=d.ownerDocument;re?I=re.defaultView||re.parentWindow:I=window}var J,ue;if(_){var de=u.relatedTarget||u.toElement;if(J=s,ue=de?Of(de):null,ue!==null){var me=ia(ue);(ue!==me||ue.tag!==H&&ue.tag!==P)&&(ue=null)}}else J=null,ue=s;if(J!==ue){var Ye=cp,gt="onMouseLeave",ft="onMouseEnter",Kt="mouse";(t==="pointerout"||t==="pointerover")&&(Ye=im,gt="onPointerLeave",ft="onPointerEnter",Kt="pointer");var jt=J==null?I:Ch(J),ie=ue==null?I:Ch(ue),ye=new Ye(gt,Kt+"leave",J,u,d);ye.target=jt,ye.relatedTarget=ie;var ae=null,Be=Of(d);if(Be===s){var Je=new Ye(ft,Kt+"enter",ue,u,d);Je.target=ie,Je.relatedTarget=jt,ae=Je}Jk(e,ye,ae,J,ue)}}}function oe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Oe=typeof Object.is=="function"?Object.is:oe;function ot(e,t){if(Oe(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var s=Object.keys(e),u=Object.keys(t);if(s.length!==u.length)return!1;for(var d=0;d<s.length;d++){var g=s[d];if(!zr.call(t,g)||!Oe(e[g],t[g]))return!1}return!0}function yt(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function St(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function bt(e,t){for(var s=yt(e),u=0,d=0;s;){if(s.nodeType===Ks){if(d=u+s.textContent.length,u<=t&&d>=t)return{node:s,offset:t-u};u=d}s=yt(St(s))}}function jn(e){var t=e.ownerDocument,s=t&&t.defaultView||window,u=s.getSelection&&s.getSelection();if(!u||u.rangeCount===0)return null;var d=u.anchorNode,g=u.anchorOffset,y=u.focusNode,E=u.focusOffset;try{d.nodeType,y.nodeType}catch{return null}return ur(e,d,g,y,E)}function ur(e,t,s,u,d){var g=0,y=-1,E=-1,_=0,O=0,I=e,re=null;e:for(;;){for(var J=null;I===t&&(s===0||I.nodeType===Ks)&&(y=g+s),I===u&&(d===0||I.nodeType===Ks)&&(E=g+d),I.nodeType===Ks&&(g+=I.nodeValue.length),(J=I.firstChild)!==null;)re=I,I=J;for(;;){if(I===e)break e;if(re===t&&++_===s&&(y=g),re===u&&++O===d&&(E=g),(J=I.nextSibling)!==null)break;I=re,re=I.parentNode}I=J}return y===-1||E===-1?null:{start:y,end:E}}function tl(e,t){var s=e.ownerDocument||document,u=s&&s.defaultView||window;if(u.getSelection){var d=u.getSelection(),g=e.textContent.length,y=Math.min(t.start,g),E=t.end===void 0?y:Math.min(t.end,g);if(!d.extend&&y>E){var _=E;E=y,y=_}var O=bt(e,y),I=bt(e,E);if(O&&I){if(d.rangeCount===1&&d.anchorNode===O.node&&d.anchorOffset===O.offset&&d.focusNode===I.node&&d.focusOffset===I.offset)return;var re=s.createRange();re.setStart(O.node,O.offset),d.removeAllRanges(),y>E?(d.addRange(re),d.extend(I.node,I.offset)):(re.setEnd(I.node,I.offset),d.addRange(re))}}}function dm(e){return e&&e.nodeType===Ks}function ob(e,t){return!e||!t?!1:e===t?!0:dm(e)?!1:dm(t)?ob(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1}function Mk(e){return e&&e.ownerDocument&&ob(e.ownerDocument.documentElement,e)}function Hk(e){try{return typeof e.contentWindow.location.href=="string"}catch{return!1}}function lb(){for(var e=window,t=wa();t instanceof e.HTMLIFrameElement;){if(Hk(t))e=t.contentWindow;else return t;t=wa(e.document)}return t}function G1(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Ik(){var e=lb();return{focusedElem:e,selectionRange:G1(e)?Pk(e):null}}function $k(e){var t=lb(),s=e.focusedElem,u=e.selectionRange;if(t!==s&&Mk(s)){u!==null&&G1(s)&&Lk(s,u);for(var d=[],g=s;g=g.parentNode;)g.nodeType===Pi&&d.push({element:g,left:g.scrollLeft,top:g.scrollTop});typeof s.focus=="function"&&s.focus();for(var y=0;y<d.length;y++){var E=d[y];E.element.scrollLeft=E.left,E.element.scrollTop=E.top}}}function Pk(e){var t;return"selectionStart"in e?t={start:e.selectionStart,end:e.selectionEnd}:t=jn(e),t||{start:0,end:0}}function Lk(e,t){var s=t.start,u=t.end;u===void 0&&(u=s),"selectionStart"in e?(e.selectionStart=s,e.selectionEnd=Math.min(u,e.value.length)):tl(e,t)}var Uk=Sr&&"documentMode"in document&&document.documentMode<=11;function jk(){Te("onSelect",["focusout","contextmenu","dragend","focusin","keydown","keyup","mousedown","mouseup","selectionchange"])}var mh=null,K1=null,Ep=null,Q1=!1;function zk(e){if("selectionStart"in e&&G1(e))return{start:e.selectionStart,end:e.selectionEnd};var t=e.ownerDocument&&e.ownerDocument.defaultView||window,s=t.getSelection();return{anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}}function qk(e){return e.window===e?e.document:e.nodeType===Qs?e:e.ownerDocument}function ub(e,t,s){var u=qk(s);if(!(Q1||mh==null||mh!==wa(u))){var d=zk(mh);if(!Ep||!ot(Ep,d)){Ep=d;var g=gm(K1,"onSelect");if(g.length>0){var y=new Fs("onSelect","select",null,t,s);e.push({event:y,listeners:g}),y.target=mh}}}}function Yk(e,t,s,u,d,g,y){var E=s?Ch(s):window;switch(t){case"focusin":(Rf(E)||E.contentEditable==="true")&&(mh=E,K1=s,Ep=null);break;case"focusout":mh=null,K1=null,Ep=null;break;case"mousedown":Q1=!0;break;case"contextmenu":case"mouseup":case"dragend":Q1=!1,ub(e,u,d);break;case"selectionchange":if(Uk)break;case"keydown":case"keyup":ub(e,u,d)}}function hm(e,t){var s={};return s[e.toLowerCase()]=t.toLowerCase(),s["Webkit"+e]="webkit"+t,s["Moz"+e]="moz"+t,s}var yh={animationend:hm("Animation","AnimationEnd"),animationiteration:hm("Animation","AnimationIteration"),animationstart:hm("Animation","AnimationStart"),transitionend:hm("Transition","TransitionEnd")},X1={},cb={};Sr&&(cb=document.createElement("div").style,"AnimationEvent"in window||(delete yh.animationend.animation,delete yh.animationiteration.animation,delete yh.animationstart.animation),"TransitionEvent"in window||delete yh.transitionend.transition);function pm(e){if(X1[e])return X1[e];if(!yh[e])return e;var t=yh[e];for(var s in t)if(t.hasOwnProperty(s)&&s in cb)return X1[e]=t[s];return e}var fb=pm("animationend"),db=pm("animationiteration"),hb=pm("animationstart"),pb=pm("transitionend"),vb=new Map,gb=["abort","auxClick","cancel","canPlay","canPlayThrough","click","close","contextMenu","copy","cut","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","gotPointerCapture","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","lostPointerCapture","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","pointerCancel","pointerDown","pointerMove","pointerOut","pointerOver","pointerUp","progress","rateChange","reset","resize","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchStart","volumeChange","scroll","toggle","touchMove","waiting","wheel"];function nc(e,t){vb.set(e,t),Te(t,[e])}function Vk(){for(var e=0;e<gb.length;e++){var t=gb[e],s=t.toLowerCase(),u=t[0].toUpperCase()+t.slice(1);nc(s,"on"+u)}nc(fb,"onAnimationEnd"),nc(db,"onAnimationIteration"),nc(hb,"onAnimationStart"),nc("dblclick","onDoubleClick"),nc("focusin","onFocus"),nc("focusout","onBlur"),nc(pb,"onTransitionEnd")}function Wk(e,t,s,u,d,g,y){var E=vb.get(t);if(E!==void 0){var _=Fs,O=t;switch(t){case"keypress":if(Xo(u)===0)return;case"keydown":case"keyup":_=nm;break;case"focusin":O="focus",_=ao;break;case"focusout":O="blur",_=ao;break;case"beforeblur":case"afterblur":_=ao;break;case"click":if(u.button===2)return;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":_=cp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":_=Jl;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":_=sm;break;case fb:case db:case hb:_=Zg;break;case pb:_=Na;break;case"scroll":_=Ki;break;case"wheel":_=q1;break;case"copy":case"cut":case"paste":_=uh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":_=im;break}var I=(g&ba)!==0;{var re=!I&&t==="scroll",J=Xk(s,E,u.type,I,re);if(J.length>0){var ue=new _(E,O,null,u,d);e.push({event:ue,listeners:J})}}}}Vk(),ne(),Af(),jk(),Y1();function Gk(e,t,s,u,d,g,y){Wk(e,t,s,u,d,g);var E=(g&N0)===0;E&&(te(e,t,s,u,d),hn(e,t,s,u,d),Yk(e,t,s,u,d),cm(e,t,s,u,d))}var Sp=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","resize","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],Z1=new Set(["cancel","close","invalid","load","scroll","toggle"].concat(Sp));function mb(e,t,s){var u=e.type||"unknown-event";e.currentTarget=s,Ss(u,t,void 0,e),e.currentTarget=null}function Kk(e,t,s){var u;if(s)for(var d=t.length-1;d>=0;d--){var g=t[d],y=g.instance,E=g.currentTarget,_=g.listener;if(y!==u&&e.isPropagationStopped())return;mb(e,_,E),u=y}else for(var O=0;O<t.length;O++){var I=t[O],re=I.instance,J=I.currentTarget,ue=I.listener;if(re!==u&&e.isPropagationStopped())return;mb(e,ue,J),u=re}}function yb(e,t){for(var s=(t&ba)!==0,u=0;u<e.length;u++){var d=e[u],g=d.event,y=d.listeners;Kk(g,y,s)}Wc()}function Qk(e,t,s,u,d){var g=B0(s),y=[];Gk(y,e,u,s,g,t),yb(y,t)}function tn(e,t){Z1.has(e)||v('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',e);var s=!1,u=D5(t),d=e3(e);u.has(d)||(xb(t,e,md,s),u.add(d))}function J1(e,t,s){Z1.has(e)&&!t&&v('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',e);var u=0;t&&(u|=ba),xb(s,e,u,t)}var vm="_reactListening"+Math.random().toString(36).slice(2);function Cp(e){if(!e[vm]){e[vm]=!0,Ke.forEach(function(s){s!=="selectionchange"&&(Z1.has(s)||J1(s,!1,e),J1(s,!0,e))});var t=e.nodeType===Qs?e:e.ownerDocument;t!==null&&(t[vm]||(t[vm]=!0,J1("selectionchange",!1,t)))}}function xb(e,t,s,u,d){var g=Zn(e,t,s),y=void 0;Vc&&(t==="touchstart"||t==="touchmove"||t==="wheel")&&(y=!0),e=e,u?y!==void 0?up(e,t,g,y):Gi(e,t,g):y!==void 0?Ju(e,t,g,y):wf(e,t,g)}function Eb(e,t){return e===t||e.nodeType===mn&&e.parentNode===t}function eE(e,t,s,u,d){var g=u;if(!(t&O0)&&!(t&md)){var y=d;if(u!==null){var E=u;e:for(;;){if(E===null)return;var _=E.tag;if(_===T||_===A){var O=E.stateNode.containerInfo;if(Eb(O,y))break;if(_===A)for(var I=E.return;I!==null;){var re=I.tag;if(re===T||re===A){var J=I.stateNode.containerInfo;if(Eb(J,y))return}I=I.return}for(;O!==null;){var ue=Of(O);if(ue===null)return;var de=ue.tag;if(de===H||de===P){E=g=ue;continue e}O=O.parentNode}}E=E.return}}}wg(function(){return Qk(e,t,s,g)})}function wp(e,t,s){return{instance:e,listener:t,currentTarget:s}}function Xk(e,t,s,u,d,g){for(var y=t!==null?t+"Capture":null,E=u?y:t,_=[],O=e,I=null;O!==null;){var re=O,J=re.stateNode,ue=re.tag;if(ue===H&&J!==null&&(I=J,E!==null)){var de=$o(O,E);de!=null&&_.push(wp(O,de,I))}if(d)break;O=O.return}return _}function gm(e,t){for(var s=t+"Capture",u=[],d=e;d!==null;){var g=d,y=g.stateNode,E=g.tag;if(E===H&&y!==null){var _=y,O=$o(d,s);O!=null&&u.unshift(wp(d,O,_));var I=$o(d,t);I!=null&&u.push(wp(d,I,_))}d=d.return}return u}function xh(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==H);return e||null}function Zk(e,t){for(var s=e,u=t,d=0,g=s;g;g=xh(g))d++;for(var y=0,E=u;E;E=xh(E))y++;for(;d-y>0;)s=xh(s),d--;for(;y-d>0;)u=xh(u),y--;for(var _=d;_--;){if(s===u||u!==null&&s===u.alternate)return s;s=xh(s),u=xh(u)}return null}function Sb(e,t,s,u,d){for(var g=t._reactName,y=[],E=s;E!==null&&E!==u;){var _=E,O=_.alternate,I=_.stateNode,re=_.tag;if(O!==null&&O===u)break;if(re===H&&I!==null){var J=I;if(d){var ue=$o(E,g);ue!=null&&y.unshift(wp(E,ue,J))}else if(!d){var de=$o(E,g);de!=null&&y.push(wp(E,de,J))}}E=E.return}y.length!==0&&e.push({event:t,listeners:y})}function Jk(e,t,s,u,d){var g=u&&d?Zk(u,d):null;u!==null&&Sb(e,t,u,g,!1),d!==null&&s!==null&&Sb(e,s,d,g,!0)}function e3(e,t){return e+"__bubble"}var Ba=!1,bp="dangerouslySetInnerHTML",mm="suppressContentEditableWarning",ic="suppressHydrationWarning",Cb="autoFocus",kf="children",Ff="style",ym="__html",tE,xm,_p,wb,Em,bb,_b;tE={dialog:!0,webview:!0},xm=function(e,t){A0(e,t),vd(e,t),Eg(e,t,{registrationNameDependencies:ct,possibleRegistrationNames:Ce})},bb=Sr&&!document.documentMode,_p=function(e,t,s){if(!Ba){var u=Sm(s),d=Sm(t);d!==u&&(Ba=!0,v("Prop `%s` did not match. Server: %s Client: %s",e,JSON.stringify(d),JSON.stringify(u)))}},wb=function(e){if(!Ba){Ba=!0;var t=[];e.forEach(function(s){t.push(s)}),v("Extra attributes from the server: %s",t)}},Em=function(e,t){t===!1?v("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",e,e,e):v("Expected `%s` listener to be a function, instead got a value of `%s` type.",e,typeof t)},_b=function(e,t){var s=e.namespaceURI===Gs?e.ownerDocument.createElement(e.tagName):e.ownerDocument.createElementNS(e.namespaceURI,e.tagName);return s.innerHTML=t,s.innerHTML};var t3=/\r\n?/g,r3=/\u0000|\uFFFD/g;function Sm(e){qr(e);var t=typeof e=="string"?e:""+e;return t.replace(t3,`
100
- `).replace(r3,"")}function Cm(e,t,s,u){var d=Sm(t),g=Sm(e);if(g!==d&&(u&&(Ba||(Ba=!0,v('Text content did not match. Server: "%s" Client: "%s"',g,d))),s&&ge))throw new Error("Text content does not match server-rendered HTML.")}function Db(e){return e.nodeType===Qs?e:e.ownerDocument}function n3(){}function wm(e){e.onclick=n3}function i3(e,t,s,u,d){for(var g in u)if(u.hasOwnProperty(g)){var y=u[g];if(g===Ff)y&&Object.freeze(y),pg(t,y);else if(g===bp){var E=y?y[ym]:void 0;E!=null&&rg(t,E)}else if(g===kf)if(typeof y=="string"){var _=e!=="textarea"||y!=="";_&&Mu(t,y)}else typeof y=="number"&&Mu(t,""+y);else g===mm||g===ic||g===Cb||(ct.hasOwnProperty(g)?y!=null&&(typeof y!="function"&&Em(g,y),g==="onScroll"&&tn("scroll",t)):y!=null&&Vn(t,g,y,d))}}function a3(e,t,s,u){for(var d=0;d<t.length;d+=2){var g=t[d],y=t[d+1];g===Ff?pg(e,y):g===bp?rg(e,y):g===kf?Mu(e,y):Vn(e,g,y,u)}}function s3(e,t,s,u){var d,g=Db(s),y,E=u;if(E===Gs&&(E=C0(e)),E===Gs){if(d=Ho(e,t),!d&&e!==e.toLowerCase()&&v("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",e),e==="script"){var _=g.createElement("div");_.innerHTML="<script><\/script>";var O=_.firstChild;y=_.removeChild(O)}else if(typeof t.is=="string")y=g.createElement(e,{is:t.is});else if(y=g.createElement(e),e==="select"){var I=y;t.multiple?I.multiple=!0:t.size&&(I.size=t.size)}}else y=g.createElementNS(E,e);return E===Gs&&!d&&Object.prototype.toString.call(y)==="[object HTMLUnknownElement]"&&!zr.call(tE,e)&&(tE[e]=!0,v("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",e)),y}function o3(e,t){return Db(t).createTextNode(e)}function l3(e,t,s,u){var d=Ho(t,s);xm(t,s);var g;switch(t){case"dialog":tn("cancel",e),tn("close",e),g=s;break;case"iframe":case"object":case"embed":tn("load",e),g=s;break;case"video":case"audio":for(var y=0;y<Sp.length;y++)tn(Sp[y],e);g=s;break;case"source":tn("error",e),g=s;break;case"img":case"image":case"link":tn("error",e),tn("load",e),g=s;break;case"details":tn("toggle",e),g=s;break;case"input":Ka(e,s),g=Bu(e,s),tn("invalid",e);break;case"option":Jt(e,s),g=s;break;case"select":Al(e,s),g=Ic(e,s),tn("invalid",e);break;case"textarea":x0(e,s),g=y0(e,s),tn("invalid",e);break;default:g=s}switch(hd(t,g),i3(t,e,u,g,d),t){case"input":Ga(e),ce(e,s,!1);break;case"textarea":Ga(e),eg(e);break;case"option":Ir(e,s);break;case"select":g0(e,s);break;default:typeof g.onClick=="function"&&wm(e);break}}function u3(e,t,s,u,d){xm(t,u);var g=null,y,E;switch(t){case"input":y=Bu(e,s),E=Bu(e,u),g=[];break;case"select":y=Ic(e,s),E=Ic(e,u),g=[];break;case"textarea":y=y0(e,s),E=y0(e,u),g=[];break;default:y=s,E=u,typeof y.onClick!="function"&&typeof E.onClick=="function"&&wm(e);break}hd(t,E);var _,O,I=null;for(_ in y)if(!(E.hasOwnProperty(_)||!y.hasOwnProperty(_)||y[_]==null))if(_===Ff){var re=y[_];for(O in re)re.hasOwnProperty(O)&&(I||(I={}),I[O]="")}else _===bp||_===kf||_===mm||_===ic||_===Cb||(ct.hasOwnProperty(_)?g||(g=[]):(g=g||[]).push(_,null));for(_ in E){var J=E[_],ue=y!=null?y[_]:void 0;if(!(!E.hasOwnProperty(_)||J===ue||J==null&&ue==null))if(_===Ff)if(J&&Object.freeze(J),ue){for(O in ue)ue.hasOwnProperty(O)&&(!J||!J.hasOwnProperty(O))&&(I||(I={}),I[O]="");for(O in J)J.hasOwnProperty(O)&&ue[O]!==J[O]&&(I||(I={}),I[O]=J[O])}else I||(g||(g=[]),g.push(_,I)),I=J;else if(_===bp){var de=J?J[ym]:void 0,me=ue?ue[ym]:void 0;de!=null&&me!==de&&(g=g||[]).push(_,de)}else _===kf?(typeof J=="string"||typeof J=="number")&&(g=g||[]).push(_,""+J):_===mm||_===ic||(ct.hasOwnProperty(_)?(J!=null&&(typeof J!="function"&&Em(_,J),_==="onScroll"&&tn("scroll",e)),!g&&ue!==J&&(g=[])):(g=g||[]).push(_,J))}return I&&(R1(I,E[Ff]),(g=g||[]).push(Ff,I)),g}function c3(e,t,s,u,d){s==="input"&&d.type==="radio"&&d.name!=null&&D(e,d);var g=Ho(s,u),y=Ho(s,d);switch(a3(e,t,g,y),s){case"input":V(e,d);break;case"textarea":Jv(e,d);break;case"select":cd(e,d);break}}function f3(e){{var t=e.toLowerCase();return jc.hasOwnProperty(t)&&jc[t]||null}}function d3(e,t,s,u,d,g,y){var E,_;switch(E=Ho(t,s),xm(t,s),t){case"dialog":tn("cancel",e),tn("close",e);break;case"iframe":case"object":case"embed":tn("load",e);break;case"video":case"audio":for(var O=0;O<Sp.length;O++)tn(Sp[O],e);break;case"source":tn("error",e);break;case"img":case"image":case"link":tn("error",e),tn("load",e);break;case"details":tn("toggle",e);break;case"input":Ka(e,s),tn("invalid",e);break;case"option":Jt(e,s);break;case"select":Al(e,s),tn("invalid",e);break;case"textarea":x0(e,s),tn("invalid",e);break}hd(t,s);{_=new Set;for(var I=e.attributes,re=0;re<I.length;re++){var J=I[re].name.toLowerCase();switch(J){case"value":break;case"checked":break;case"selected":break;default:_.add(I[re].name)}}}var ue=null;for(var de in s)if(s.hasOwnProperty(de)){var me=s[de];if(de===kf)typeof me=="string"?e.textContent!==me&&(s[ic]!==!0&&Cm(e.textContent,me,g,y),ue=[kf,me]):typeof me=="number"&&e.textContent!==""+me&&(s[ic]!==!0&&Cm(e.textContent,me,g,y),ue=[kf,""+me]);else if(ct.hasOwnProperty(de))me!=null&&(typeof me!="function"&&Em(de,me),de==="onScroll"&&tn("scroll",e));else if(y&&typeof E=="boolean"){var Ye=void 0,gt=wr(de);if(s[ic]!==!0){if(!(de===mm||de===ic||de==="value"||de==="checked"||de==="selected")){if(de===bp){var ft=e.innerHTML,Kt=me?me[ym]:void 0;if(Kt!=null){var jt=_b(e,Kt);jt!==ft&&_p(de,ft,jt)}}else if(de===Ff){if(_.delete(de),bb){var ie=D1(me);Ye=e.getAttribute("style"),ie!==Ye&&_p(de,Ye,ie)}}else if(E&&!$)_.delete(de.toLowerCase()),Ye=hs(e,de,me),me!==Ye&&_p(de,Ye,me);else if(!Mr(de,gt,E)&&!gn(de,me,gt,E)){var ye=!1;if(gt!==null)_.delete(gt.attributeName),Ye=ds(e,de,me,gt);else{var ae=u;if(ae===Gs&&(ae=C0(t)),ae===Gs)_.delete(de.toLowerCase());else{var Be=f3(de);Be!==null&&Be!==de&&(ye=!0,_.delete(Be)),_.delete(de)}Ye=hs(e,de,me)}var Je=$;!Je&&me!==Ye&&!ye&&_p(de,Ye,me)}}}}}switch(y&&_.size>0&&s[ic]!==!0&&wb(_),t){case"input":Ga(e),ce(e,s,!0);break;case"textarea":Ga(e),eg(e);break;case"select":case"option":break;default:typeof s.onClick=="function"&&wm(e);break}return ue}function h3(e,t,s){var u=e.nodeValue!==t;return u}function rE(e,t){{if(Ba)return;Ba=!0,v("Did not expect server HTML to contain a <%s> in <%s>.",t.nodeName.toLowerCase(),e.nodeName.toLowerCase())}}function nE(e,t){{if(Ba)return;Ba=!0,v('Did not expect server HTML to contain the text node "%s" in <%s>.',t.nodeValue,e.nodeName.toLowerCase())}}function iE(e,t,s){{if(Ba)return;Ba=!0,v("Expected server HTML to contain a matching <%s> in <%s>.",t,e.nodeName.toLowerCase())}}function aE(e,t){{if(t===""||Ba)return;Ba=!0,v('Expected server HTML to contain a matching text node for "%s" in <%s>.',t,e.nodeName.toLowerCase())}}function p3(e,t,s){switch(t){case"input":ve(e,s);return;case"textarea":C1(e,s);return;case"select":m0(e,s);return}}var Dp=function(){},Tp=function(){};{var v3=["address","applet","area","article","aside","base","basefont","bgsound","blockquote","body","br","button","caption","center","col","colgroup","dd","details","dir","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","isindex","li","link","listing","main","marquee","menu","menuitem","meta","nav","noembed","noframes","noscript","object","ol","p","param","plaintext","pre","script","section","select","source","style","summary","table","tbody","td","template","textarea","tfoot","th","thead","title","tr","track","ul","wbr","xmp"],Tb=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],g3=Tb.concat(["button"]),m3=["dd","dt","li","option","optgroup","p","rp","rt"],Rb={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};Tp=function(e,t){var s=Bt({},e||Rb),u={tag:t};return Tb.indexOf(t)!==-1&&(s.aTagInScope=null,s.buttonTagInScope=null,s.nobrTagInScope=null),g3.indexOf(t)!==-1&&(s.pTagInButtonScope=null),v3.indexOf(t)!==-1&&t!=="address"&&t!=="div"&&t!=="p"&&(s.listItemTagAutoclosing=null,s.dlItemTagAutoclosing=null),s.current=u,t==="form"&&(s.formTag=u),t==="a"&&(s.aTagInScope=u),t==="button"&&(s.buttonTagInScope=u),t==="nobr"&&(s.nobrTagInScope=u),t==="p"&&(s.pTagInButtonScope=u),t==="li"&&(s.listItemTagAutoclosing=u),(t==="dd"||t==="dt")&&(s.dlItemTagAutoclosing=u),s};var y3=function(e,t){switch(t){case"select":return e==="option"||e==="optgroup"||e==="#text";case"optgroup":return e==="option"||e==="#text";case"option":return e==="#text";case"tr":return e==="th"||e==="td"||e==="style"||e==="script"||e==="template";case"tbody":case"thead":case"tfoot":return e==="tr"||e==="style"||e==="script"||e==="template";case"colgroup":return e==="col"||e==="template";case"table":return e==="caption"||e==="colgroup"||e==="tbody"||e==="tfoot"||e==="thead"||e==="style"||e==="script"||e==="template";case"head":return e==="base"||e==="basefont"||e==="bgsound"||e==="link"||e==="meta"||e==="title"||e==="noscript"||e==="noframes"||e==="style"||e==="script"||e==="template";case"html":return e==="head"||e==="body"||e==="frameset";case"frameset":return e==="frame";case"#document":return e==="html"}switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return t!=="h1"&&t!=="h2"&&t!=="h3"&&t!=="h4"&&t!=="h5"&&t!=="h6";case"rp":case"rt":return m3.indexOf(t)===-1;case"body":case"caption":case"col":case"colgroup":case"frameset":case"frame":case"head":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return t==null}return!0},x3=function(e,t){switch(e){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return t.pTagInButtonScope;case"form":return t.formTag||t.pTagInButtonScope;case"li":return t.listItemTagAutoclosing;case"dd":case"dt":return t.dlItemTagAutoclosing;case"button":return t.buttonTagInScope;case"a":return t.aTagInScope;case"nobr":return t.nobrTagInScope}return null},Ab={};Dp=function(e,t,s){s=s||Rb;var u=s.current,d=u&&u.tag;t!=null&&(e!=null&&v("validateDOMNesting: when childText is passed, childTag should be null"),e="#text");var g=y3(e,d)?null:u,y=g?null:x3(e,s),E=g||y;if(E){var _=E.tag,O=!!g+"|"+e+"|"+_;if(!Ab[O]){Ab[O]=!0;var I=e,re="";if(e==="#text"?/\S/.test(t)?I="Text nodes":(I="Whitespace text nodes",re=" Make sure you don't have any extra whitespace between tags on each line of your source code."):I="<"+e+">",g){var J="";_==="table"&&e==="tr"&&(J+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),v("validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s",I,_,re,J)}else v("validateDOMNesting(...): %s cannot appear as a descendant of <%s>.",I,_)}}}}var bm="suppressHydrationWarning",_m="$",Dm="/$",Rp="$?",Ap="$!",E3="style",sE=null,oE=null;function S3(e){var t,s,u=e.nodeType;switch(u){case Qs:case b0:{t=u===Qs?"#document":"#fragment";var d=e.documentElement;s=d?d.namespaceURI:w0(null,"");break}default:{var g=u===mn?e.parentNode:e,y=g.namespaceURI||null;t=g.tagName,s=w0(y,t);break}}{var E=t.toLowerCase(),_=Tp(null,E);return{namespace:s,ancestorInfo:_}}}function C3(e,t,s){{var u=e,d=w0(u.namespace,t),g=Tp(u.ancestorInfo,t);return{namespace:d,ancestorInfo:g}}}function wO(e){return e}function w3(e){sE=wn(),oE=Ik();var t=null;return Mn(!1),t}function b3(e){$k(oE),Mn(sE),sE=null,oE=null}function _3(e,t,s,u,d){var g;{var y=u;if(Dp(e,null,y.ancestorInfo),typeof t.children=="string"||typeof t.children=="number"){var E=""+t.children,_=Tp(y.ancestorInfo,e);Dp(null,E,_)}g=y.namespace}var O=s3(e,t,s,g);return Op(d,O),vE(O,t),O}function D3(e,t){e.appendChild(t)}function T3(e,t,s,u,d){switch(l3(e,t,s,u),t){case"button":case"input":case"select":case"textarea":return!!s.autoFocus;case"img":return!0;default:return!1}}function R3(e,t,s,u,d,g){{var y=g;if(typeof u.children!=typeof s.children&&(typeof u.children=="string"||typeof u.children=="number")){var E=""+u.children,_=Tp(y.ancestorInfo,t);Dp(null,E,_)}}return u3(e,t,s,u)}function lE(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}function A3(e,t,s,u){{var d=s;Dp(null,e,d.ancestorInfo)}var g=o3(e,t);return Op(u,g),g}function k3(){var e=window.event;return e===void 0?ka:sh(e.type)}var uE=typeof setTimeout=="function"?setTimeout:void 0,F3=typeof clearTimeout=="function"?clearTimeout:void 0,cE=-1,kb=typeof Promise=="function"?Promise:void 0,O3=typeof queueMicrotask=="function"?queueMicrotask:typeof kb<"u"?function(e){return kb.resolve(null).then(e).catch(N3)}:uE;function N3(e){setTimeout(function(){throw e})}function B3(e,t,s,u){switch(t){case"button":case"input":case"select":case"textarea":s.autoFocus&&e.focus();return;case"img":{s.src&&(e.src=s.src);return}}}function M3(e,t,s,u,d,g){c3(e,t,s,u,d),vE(e,d)}function Fb(e){Mu(e,"")}function H3(e,t,s){e.nodeValue=s}function I3(e,t){e.appendChild(t)}function $3(e,t){var s;e.nodeType===mn?(s=e.parentNode,s.insertBefore(t,e)):(s=e,s.appendChild(t));var u=e._reactRootContainer;u==null&&s.onclick===null&&wm(s)}function P3(e,t,s){e.insertBefore(t,s)}function L3(e,t,s){e.nodeType===mn?e.parentNode.insertBefore(t,s):e.insertBefore(t,s)}function U3(e,t){e.removeChild(t)}function j3(e,t){e.nodeType===mn?e.parentNode.removeChild(t):e.removeChild(t)}function fE(e,t){var s=t,u=0;do{var d=s.nextSibling;if(e.removeChild(s),d&&d.nodeType===mn){var g=d.data;if(g===Dm)if(u===0){e.removeChild(d),Ql(t);return}else u--;else(g===_m||g===Rp||g===Ap)&&u++}s=d}while(s);Ql(t)}function z3(e,t){e.nodeType===mn?fE(e.parentNode,t):e.nodeType===Pi&&fE(e,t),Ql(e)}function q3(e){e=e;var t=e.style;typeof t.setProperty=="function"?t.setProperty("display","none","important"):t.display="none"}function Y3(e){e.nodeValue=""}function V3(e,t){e=e;var s=t[E3],u=s!=null&&s.hasOwnProperty("display")?s.display:null;e.style.display=dd("display",u)}function W3(e,t){e.nodeValue=t}function G3(e){e.nodeType===Pi?e.textContent="":e.nodeType===Qs&&e.documentElement&&e.removeChild(e.documentElement)}function K3(e,t,s){return e.nodeType!==Pi||t.toLowerCase()!==e.nodeName.toLowerCase()?null:e}function Q3(e,t){return t===""||e.nodeType!==Ks?null:e}function X3(e){return e.nodeType!==mn?null:e}function Ob(e){return e.data===Rp}function dE(e){return e.data===Ap}function Z3(e){var t=e.nextSibling&&e.nextSibling.dataset,s,u,d;return t&&(s=t.dgst,u=t.msg,d=t.stck),{message:u,digest:s,stack:d}}function J3(e,t){e._reactRetry=t}function Tm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===Pi||t===Ks)break;if(t===mn){var s=e.data;if(s===_m||s===Ap||s===Rp)break;if(s===Dm)return null}}return e}function kp(e){return Tm(e.nextSibling)}function e5(e){return Tm(e.firstChild)}function t5(e){return Tm(e.firstChild)}function r5(e){return Tm(e.nextSibling)}function n5(e,t,s,u,d,g,y){Op(g,e),vE(e,s);var E;{var _=d;E=_.namespace}var O=(g.mode&It)!==pt;return d3(e,t,s,E,u,O,y)}function i5(e,t,s,u){return Op(s,e),s.mode&It,h3(e,t)}function a5(e,t){Op(t,e)}function s5(e){for(var t=e.nextSibling,s=0;t;){if(t.nodeType===mn){var u=t.data;if(u===Dm){if(s===0)return kp(t);s--}else(u===_m||u===Ap||u===Rp)&&s++}t=t.nextSibling}return null}function Nb(e){for(var t=e.previousSibling,s=0;t;){if(t.nodeType===mn){var u=t.data;if(u===_m||u===Ap||u===Rp){if(s===0)return t;s--}else u===Dm&&s++}t=t.previousSibling}return null}function o5(e){Ql(e)}function l5(e){Ql(e)}function u5(e){return e!=="head"&&e!=="body"}function c5(e,t,s,u){var d=!0;Cm(t.nodeValue,s,u,d)}function f5(e,t,s,u,d,g){if(t[bm]!==!0){var y=!0;Cm(u.nodeValue,d,g,y)}}function d5(e,t){t.nodeType===Pi?rE(e,t):t.nodeType===mn||nE(e,t)}function h5(e,t){{var s=e.parentNode;s!==null&&(t.nodeType===Pi?rE(s,t):t.nodeType===mn||nE(s,t))}}function p5(e,t,s,u,d){(d||t[bm]!==!0)&&(u.nodeType===Pi?rE(s,u):u.nodeType===mn||nE(s,u))}function v5(e,t,s){iE(e,t)}function g5(e,t){aE(e,t)}function m5(e,t,s){{var u=e.parentNode;u!==null&&iE(u,t)}}function y5(e,t){{var s=e.parentNode;s!==null&&aE(s,t)}}function x5(e,t,s,u,d,g){(g||t[bm]!==!0)&&iE(s,u)}function E5(e,t,s,u,d){(d||t[bm]!==!0)&&aE(s,u)}function S5(e){v("An error occurred during hydration. The server HTML was replaced with client content in <%s>.",e.nodeName.toLowerCase())}function C5(e){Cp(e)}var Eh=Math.random().toString(36).slice(2),Sh="__reactFiber$"+Eh,hE="__reactProps$"+Eh,Fp="__reactContainer$"+Eh,pE="__reactEvents$"+Eh,w5="__reactListeners$"+Eh,b5="__reactHandles$"+Eh;function _5(e){delete e[Sh],delete e[hE],delete e[pE],delete e[w5],delete e[b5]}function Op(e,t){t[Sh]=e}function Rm(e,t){t[Fp]=e}function Bb(e){e[Fp]=null}function Np(e){return!!e[Fp]}function Of(e){var t=e[Sh];if(t)return t;for(var s=e.parentNode;s;){if(t=s[Fp]||s[Sh],t){var u=t.alternate;if(t.child!==null||u!==null&&u.child!==null)for(var d=Nb(e);d!==null;){var g=d[Sh];if(g)return g;d=Nb(d)}return t}e=s,s=e.parentNode}return null}function ac(e){var t=e[Sh]||e[Fp];return t&&(t.tag===H||t.tag===P||t.tag===K||t.tag===T)?t:null}function Ch(e){if(e.tag===H||e.tag===P)return e.stateNode;throw new Error("getNodeFromInstance: Invalid argument.")}function Am(e){return e[hE]||null}function vE(e,t){e[hE]=t}function D5(e){var t=e[pE];return t===void 0&&(t=e[pE]=new Set),t}var Mb={},Hb=i.ReactDebugCurrentFrame;function km(e){if(e){var t=e._owner,s=Ys(e.type,e._source,t?t.type:null);Hb.setExtraStackFrame(s)}else Hb.setExtraStackFrame(null)}function oo(e,t,s,u,d){{var g=Function.call.bind(zr);for(var y in e)if(g(e,y)){var E=void 0;try{if(typeof e[y]!="function"){var _=Error((u||"React class")+": "+s+" type `"+y+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[y]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw _.name="Invariant Violation",_}E=e[y](t,y,u,s,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(O){E=O}E&&!(E instanceof Error)&&(km(d),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",u||"React class",s,y,typeof E),km(null)),E instanceof Error&&!(E.message in Mb)&&(Mb[E.message]=!0,km(d),v("Failed %s type: %s",s,E.message),km(null))}}}var gE=[],Fm;Fm=[];var ru=-1;function sc(e){return{current:e}}function Qi(e,t){if(ru<0){v("Unexpected pop.");return}t!==Fm[ru]&&v("Unexpected Fiber popped."),e.current=gE[ru],gE[ru]=null,Fm[ru]=null,ru--}function Xi(e,t,s){ru++,gE[ru]=e.current,Fm[ru]=s,e.current=t}var mE;mE={};var rs={};Object.freeze(rs);var nu=sc(rs),rl=sc(!1),yE=rs;function wh(e,t,s){return s&&nl(t)?yE:nu.current}function Ib(e,t,s){{var u=e.stateNode;u.__reactInternalMemoizedUnmaskedChildContext=t,u.__reactInternalMemoizedMaskedChildContext=s}}function bh(e,t){{var s=e.type,u=s.contextTypes;if(!u)return rs;var d=e.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===t)return d.__reactInternalMemoizedMaskedChildContext;var g={};for(var y in u)g[y]=t[y];{var E=Dt(e)||"Unknown";oo(u,g,"context",E)}return d&&Ib(e,t,g),g}}function Om(){return rl.current}function nl(e){{var t=e.childContextTypes;return t!=null}}function Nm(e){Qi(rl,e),Qi(nu,e)}function xE(e){Qi(rl,e),Qi(nu,e)}function $b(e,t,s){{if(nu.current!==rs)throw new Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");Xi(nu,t,e),Xi(rl,s,e)}}function Pb(e,t,s){{var u=e.stateNode,d=t.childContextTypes;if(typeof u.getChildContext!="function"){{var g=Dt(e)||"Unknown";mE[g]||(mE[g]=!0,v("%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",g,g))}return s}var y=u.getChildContext();for(var E in y)if(!(E in d))throw new Error((Dt(e)||"Unknown")+'.getChildContext(): key "'+E+'" is not defined in childContextTypes.');{var _=Dt(e)||"Unknown";oo(d,y,"child context",_)}return Bt({},s,y)}}function Bm(e){{var t=e.stateNode,s=t&&t.__reactInternalMemoizedMergedChildContext||rs;return yE=nu.current,Xi(nu,s,e),Xi(rl,rl.current,e),!0}}function Lb(e,t,s){{var u=e.stateNode;if(!u)throw new Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");if(s){var d=Pb(e,t,yE);u.__reactInternalMemoizedMergedChildContext=d,Qi(rl,e),Qi(nu,e),Xi(nu,d,e),Xi(rl,s,e)}else Qi(rl,e),Xi(rl,s,e)}}function T5(e){{if(!Hl(e)||e.tag!==S)throw new Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");var t=e;do{switch(t.tag){case T:return t.stateNode.context;case S:{var s=t.type;if(nl(s))return t.stateNode.__reactInternalMemoizedMergedChildContext;break}}t=t.return}while(t!==null);throw new Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}}var oc=0,Mm=1,iu=null,EE=!1,SE=!1;function Ub(e){iu===null?iu=[e]:iu.push(e)}function R5(e){EE=!0,Ub(e)}function jb(){EE&&lc()}function lc(){if(!SE&&iu!==null){SE=!0;var e=0,t=Oa();try{var s=!0,u=iu;for(Cn(Ei);e<u.length;e++){var d=u[e];do d=d(s);while(d!==null)}iu=null,EE=!1}catch(g){throw iu!==null&&(iu=iu.slice(e+1)),H0(Qc,lc),g}finally{Cn(t),SE=!1}}return null}var _h=[],Dh=0,Hm=null,Im=0,Os=[],Ns=0,Nf=null,au=1,su="";function A5(e){return Mf(),(e.flags&Cs)!==ht}function k5(e){return Mf(),Im}function F5(){var e=su,t=au,s=t&~O5(t);return s.toString(32)+e}function Bf(e,t){Mf(),_h[Dh++]=Im,_h[Dh++]=Hm,Hm=e,Im=t}function zb(e,t,s){Mf(),Os[Ns++]=au,Os[Ns++]=su,Os[Ns++]=Nf,Nf=e;var u=au,d=su,g=$m(u)-1,y=u&~(1<<g),E=s+1,_=$m(t)+g;if(_>30){var O=g-g%5,I=(1<<O)-1,re=(y&I).toString(32),J=y>>O,ue=g-O,de=$m(t)+ue,me=E<<ue,Ye=me|J,gt=re+d;au=1<<de|Ye,su=gt}else{var ft=E<<g,Kt=ft|y,jt=d;au=1<<_|Kt,su=jt}}function CE(e){Mf();var t=e.return;if(t!==null){var s=1,u=0;Bf(e,s),zb(e,s,u)}}function $m(e){return 32-En(e)}function O5(e){return 1<<$m(e)-1}function wE(e){for(;e===Hm;)Hm=_h[--Dh],_h[Dh]=null,Im=_h[--Dh],_h[Dh]=null;for(;e===Nf;)Nf=Os[--Ns],Os[Ns]=null,su=Os[--Ns],Os[Ns]=null,au=Os[--Ns],Os[Ns]=null}function N5(){return Mf(),Nf!==null?{id:au,overflow:su}:null}function B5(e,t){Mf(),Os[Ns++]=au,Os[Ns++]=su,Os[Ns++]=Nf,au=t.id,su=t.overflow,Nf=e}function Mf(){_i()||v("Expected to be hydrating. This is a bug in React. Please file an issue.")}var bi=null,Bs=null,lo=!1,Hf=!1,uc=null;function M5(){lo&&v("We should not be hydrating here. This is a bug in React. Please file a bug.")}function qb(){Hf=!0}function H5(){return Hf}function I5(e){var t=e.stateNode.containerInfo;return Bs=t5(t),bi=e,lo=!0,uc=null,Hf=!1,!0}function $5(e,t,s){return Bs=r5(t),bi=e,lo=!0,uc=null,Hf=!1,s!==null&&B5(e,s),!0}function Yb(e,t){switch(e.tag){case T:{d5(e.stateNode.containerInfo,t);break}case H:{var s=(e.mode&It)!==pt;p5(e.type,e.memoizedProps,e.stateNode,t,s);break}case K:{var u=e.memoizedState;u.dehydrated!==null&&h5(u.dehydrated,t);break}}}function Vb(e,t){Yb(e,t);var s=j9();s.stateNode=t,s.return=e;var u=e.deletions;u===null?(e.deletions=[s],e.flags|=_a):u.push(s)}function bE(e,t){{if(Hf)return;switch(e.tag){case T:{var s=e.stateNode.containerInfo;switch(t.tag){case H:var u=t.type;t.pendingProps,v5(s,u);break;case P:var d=t.pendingProps;g5(s,d);break}break}case H:{var g=e.type,y=e.memoizedProps,E=e.stateNode;switch(t.tag){case H:{var _=t.type,O=t.pendingProps,I=(e.mode&It)!==pt;x5(g,y,E,_,O,I);break}case P:{var re=t.pendingProps,J=(e.mode&It)!==pt;E5(g,y,E,re,J);break}}break}case K:{var ue=e.memoizedState,de=ue.dehydrated;if(de!==null)switch(t.tag){case H:var me=t.type;t.pendingProps,m5(de,me);break;case P:var Ye=t.pendingProps;y5(de,Ye);break}break}default:return}}}function Wb(e,t){t.flags=t.flags&~Ui|Zr,bE(e,t)}function Gb(e,t){switch(e.tag){case H:{var s=e.type;e.pendingProps;var u=K3(t,s);return u!==null?(e.stateNode=u,bi=e,Bs=e5(u),!0):!1}case P:{var d=e.pendingProps,g=Q3(t,d);return g!==null?(e.stateNode=g,bi=e,Bs=null,!0):!1}case K:{var y=X3(t);if(y!==null){var E={dehydrated:y,treeContext:N5(),retryLane:Yi};e.memoizedState=E;var _=z9(y);return _.return=e,e.child=_,bi=e,Bs=null,!0}return!1}default:return!1}}function _E(e){return(e.mode&It)!==pt&&(e.flags&dt)===ht}function DE(e){throw new Error("Hydration failed because the initial UI does not match what was rendered on the server.")}function TE(e){if(lo){var t=Bs;if(!t){_E(e)&&(bE(bi,e),DE()),Wb(bi,e),lo=!1,bi=e;return}var s=t;if(!Gb(e,t)){_E(e)&&(bE(bi,e),DE()),t=kp(s);var u=bi;if(!t||!Gb(e,t)){Wb(bi,e),lo=!1,bi=e;return}Vb(u,s)}}}function P5(e,t,s){var u=e.stateNode,d=!Hf,g=n5(u,e.type,e.memoizedProps,t,s,e,d);return e.updateQueue=g,g!==null}function L5(e){var t=e.stateNode,s=e.memoizedProps,u=i5(t,s,e);if(u){var d=bi;if(d!==null)switch(d.tag){case T:{var g=d.stateNode.containerInfo,y=(d.mode&It)!==pt;c5(g,t,s,y);break}case H:{var E=d.type,_=d.memoizedProps,O=d.stateNode,I=(d.mode&It)!==pt;f5(E,_,O,t,s,I);break}}}return u}function U5(e){var t=e.memoizedState,s=t!==null?t.dehydrated:null;if(!s)throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");a5(s,e)}function j5(e){var t=e.memoizedState,s=t!==null?t.dehydrated:null;if(!s)throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");return s5(s)}function Kb(e){for(var t=e.return;t!==null&&t.tag!==H&&t.tag!==T&&t.tag!==K;)t=t.return;bi=t}function Pm(e){if(e!==bi)return!1;if(!lo)return Kb(e),lo=!0,!1;if(e.tag!==T&&(e.tag!==H||u5(e.type)&&!lE(e.type,e.memoizedProps))){var t=Bs;if(t)if(_E(e))Qb(e),DE();else for(;t;)Vb(e,t),t=kp(t)}return Kb(e),e.tag===K?Bs=j5(e):Bs=bi?kp(e.stateNode):null,!0}function z5(){return lo&&Bs!==null}function Qb(e){for(var t=Bs;t;)Yb(e,t),t=kp(t)}function Th(){bi=null,Bs=null,lo=!1,Hf=!1}function Xb(){uc!==null&&(qD(uc),uc=null)}function _i(){return lo}function RE(e){uc===null?uc=[e]:uc.push(e)}var q5=i.ReactCurrentBatchConfig,Y5=null;function V5(){return q5.transition}var uo={recordUnsafeLifecycleWarnings:function(e,t){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(e,t){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}};{var W5=function(e){for(var t=null,s=e;s!==null;)s.mode&Rr&&(t=s),s=s.return;return t},If=function(e){var t=[];return e.forEach(function(s){t.push(s)}),t.sort().join(", ")},Bp=[],Mp=[],Hp=[],Ip=[],$p=[],Pp=[],$f=new Set;uo.recordUnsafeLifecycleWarnings=function(e,t){$f.has(e.type)||(typeof t.componentWillMount=="function"&&t.componentWillMount.__suppressDeprecationWarning!==!0&&Bp.push(e),e.mode&Rr&&typeof t.UNSAFE_componentWillMount=="function"&&Mp.push(e),typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&Hp.push(e),e.mode&Rr&&typeof t.UNSAFE_componentWillReceiveProps=="function"&&Ip.push(e),typeof t.componentWillUpdate=="function"&&t.componentWillUpdate.__suppressDeprecationWarning!==!0&&$p.push(e),e.mode&Rr&&typeof t.UNSAFE_componentWillUpdate=="function"&&Pp.push(e))},uo.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;Bp.length>0&&(Bp.forEach(function(J){e.add(Dt(J)||"Component"),$f.add(J.type)}),Bp=[]);var t=new Set;Mp.length>0&&(Mp.forEach(function(J){t.add(Dt(J)||"Component"),$f.add(J.type)}),Mp=[]);var s=new Set;Hp.length>0&&(Hp.forEach(function(J){s.add(Dt(J)||"Component"),$f.add(J.type)}),Hp=[]);var u=new Set;Ip.length>0&&(Ip.forEach(function(J){u.add(Dt(J)||"Component"),$f.add(J.type)}),Ip=[]);var d=new Set;$p.length>0&&($p.forEach(function(J){d.add(Dt(J)||"Component"),$f.add(J.type)}),$p=[]);var g=new Set;if(Pp.length>0&&(Pp.forEach(function(J){g.add(Dt(J)||"Component"),$f.add(J.type)}),Pp=[]),t.size>0){var y=If(t);v(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
101
-
102
- * Move code with side effects to componentDidMount, and set initial state in the constructor.
103
-
104
- Please update the following components: %s`,y)}if(u.size>0){var E=If(u);v(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
105
-
106
- * Move data fetching code or side effects to componentDidUpdate.
107
- * If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state
108
-
109
- Please update the following components: %s`,E)}if(g.size>0){var _=If(g);v(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
110
-
111
- * Move data fetching code or side effects to componentDidUpdate.
112
-
113
- Please update the following components: %s`,_)}if(e.size>0){var O=If(e);p(`componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
114
-
115
- * Move code with side effects to componentDidMount, and set initial state in the constructor.
116
- * Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
117
-
118
- Please update the following components: %s`,O)}if(s.size>0){var I=If(s);p(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
119
-
120
- * Move data fetching code or side effects to componentDidUpdate.
121
- * If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state
122
- * Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
123
-
124
- Please update the following components: %s`,I)}if(d.size>0){var re=If(d);p(`componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
125
-
126
- * Move data fetching code or side effects to componentDidUpdate.
127
- * Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
128
-
129
- Please update the following components: %s`,re)}};var Lm=new Map,Zb=new Set;uo.recordLegacyContextWarning=function(e,t){var s=W5(e);if(s===null){v("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.");return}if(!Zb.has(e.type)){var u=Lm.get(s);(e.type.contextTypes!=null||e.type.childContextTypes!=null||t!==null&&typeof t.getChildContext=="function")&&(u===void 0&&(u=[],Lm.set(s,u)),u.push(e))}},uo.flushLegacyContextWarning=function(){Lm.forEach(function(e,t){if(e.length!==0){var s=e[0],u=new Set;e.forEach(function(g){u.add(Dt(g)||"Component"),Zb.add(g.type)});var d=If(u);try{_r(s),v(`Legacy context API has been detected within a strict-mode tree.
130
-
131
- The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
132
-
133
- Please update the following components: %s
134
-
135
- Learn more about this warning here: https://reactjs.org/link/legacy-context`,d)}finally{Ur()}}})},uo.discardPendingWarnings=function(){Bp=[],Mp=[],Hp=[],Ip=[],$p=[],Pp=[],Lm=new Map}}var AE,kE,FE,OE,NE,Jb=function(e,t){};AE=!1,kE=!1,FE={},OE={},NE={},Jb=function(e,t){if(!(e===null||typeof e!="object")&&!(!e._store||e._store.validated||e.key!=null)){if(typeof e._store!="object")throw new Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");e._store.validated=!0;var s=Dt(t)||"Component";OE[s]||(OE[s]=!0,v('Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.'))}};function G5(e){return e.prototype&&e.prototype.isReactComponent}function Lp(e,t,s){var u=s.ref;if(u!==null&&typeof u!="function"&&typeof u!="object"){if((e.mode&Rr||G)&&!(s._owner&&s._self&&s._owner.stateNode!==s._self)&&!(s._owner&&s._owner.tag!==S)&&!(typeof s.type=="function"&&!G5(s.type))&&s._owner){var d=Dt(e)||"Component";FE[d]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. We recommend using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',d,u),FE[d]=!0)}if(s._owner){var g=s._owner,y;if(g){var E=g;if(E.tag!==S)throw new Error("Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref");y=E.stateNode}if(!y)throw new Error("Missing owner for string ref "+u+". This error is likely caused by a bug in React. Please file an issue.");var _=y;Rn(u,"ref");var O=""+u;if(t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===O)return t.ref;var I=function(re){var J=_.refs;re===null?delete J[O]:J[O]=re};return I._stringRef=O,I}else{if(typeof u!="string")throw new Error("Expected ref to be a function, a string, an object returned by React.createRef(), or null.");if(!s._owner)throw new Error("Element ref was specified as a string ("+u+`) but no owner was set. This could happen for one of the following reasons:
136
- 1. You may be adding a ref to a function component
137
- 2. You may be adding a ref to a component that was not created inside a component's render method
138
- 3. You have multiple copies of React loaded
139
- See https://reactjs.org/link/refs-must-have-owner for more information.`)}}return u}function Um(e,t){var s=Object.prototype.toString.call(t);throw new Error("Objects are not valid as a React child (found: "+(s==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":s)+"). If you meant to render a collection of children, use an array instead.")}function jm(e){{var t=Dt(e)||"Component";if(NE[t])return;NE[t]=!0,v("Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.")}}function e_(e){var t=e._payload,s=e._init;return s(t)}function t_(e){function t(ie,ye){if(e){var ae=ie.deletions;ae===null?(ie.deletions=[ye],ie.flags|=_a):ae.push(ye)}}function s(ie,ye){if(!e)return null;for(var ae=ye;ae!==null;)t(ie,ae),ae=ae.sibling;return null}function u(ie,ye){for(var ae=new Map,Be=ye;Be!==null;)Be.key!==null?ae.set(Be.key,Be):ae.set(Be.index,Be),Be=Be.sibling;return ae}function d(ie,ye){var ae=Wf(ie,ye);return ae.index=0,ae.sibling=null,ae}function g(ie,ye,ae){if(ie.index=ae,!e)return ie.flags|=Cs,ye;var Be=ie.alternate;if(Be!==null){var Je=Be.index;return Je<ye?(ie.flags|=Zr,ye):Je}else return ie.flags|=Zr,ye}function y(ie){return e&&ie.alternate===null&&(ie.flags|=Zr),ie}function E(ie,ye,ae,Be){if(ye===null||ye.tag!==P){var Je=RC(ae,ie.mode,Be);return Je.return=ie,Je}else{var Ge=d(ye,ae);return Ge.return=ie,Ge}}function _(ie,ye,ae,Be){var Je=ae.type;if(Je===Fn)return I(ie,ye,ae.props.children,Be,ae.key);if(ye!==null&&(ye.elementType===Je||sT(ye,ae)||typeof Je=="object"&&Je!==null&&Je.$$typeof===Tt&&e_(Je)===ye.type)){var Ge=d(ye,ae.props);return Ge.ref=Lp(ie,ye,ae),Ge.return=ie,Ge._debugSource=ae._source,Ge._debugOwner=ae._owner,Ge}var wt=TC(ae,ie.mode,Be);return wt.ref=Lp(ie,ye,ae),wt.return=ie,wt}function O(ie,ye,ae,Be){if(ye===null||ye.tag!==A||ye.stateNode.containerInfo!==ae.containerInfo||ye.stateNode.implementation!==ae.implementation){var Je=AC(ae,ie.mode,Be);return Je.return=ie,Je}else{var Ge=d(ye,ae.children||[]);return Ge.return=ie,Ge}}function I(ie,ye,ae,Be,Je){if(ye===null||ye.tag!==j){var Ge=Ec(ae,ie.mode,Be,Je);return Ge.return=ie,Ge}else{var wt=d(ye,ae);return wt.return=ie,wt}}function re(ie,ye,ae){if(typeof ye=="string"&&ye!==""||typeof ye=="number"){var Be=RC(""+ye,ie.mode,ae);return Be.return=ie,Be}if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case $n:{var Je=TC(ye,ie.mode,ae);return Je.ref=Lp(ie,null,ye),Je.return=ie,Je}case hr:{var Ge=AC(ye,ie.mode,ae);return Ge.return=ie,Ge}case Tt:{var wt=ye._payload,kt=ye._init;return re(ie,kt(wt),ae)}}if(Mt(ye)||Ot(ye)){var kr=Ec(ye,ie.mode,ae,null);return kr.return=ie,kr}Um(ie,ye)}return typeof ye=="function"&&jm(ie),null}function J(ie,ye,ae,Be){var Je=ye!==null?ye.key:null;if(typeof ae=="string"&&ae!==""||typeof ae=="number")return Je!==null?null:E(ie,ye,""+ae,Be);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case $n:return ae.key===Je?_(ie,ye,ae,Be):null;case hr:return ae.key===Je?O(ie,ye,ae,Be):null;case Tt:{var Ge=ae._payload,wt=ae._init;return J(ie,ye,wt(Ge),Be)}}if(Mt(ae)||Ot(ae))return Je!==null?null:I(ie,ye,ae,Be,null);Um(ie,ae)}return typeof ae=="function"&&jm(ie),null}function ue(ie,ye,ae,Be,Je){if(typeof Be=="string"&&Be!==""||typeof Be=="number"){var Ge=ie.get(ae)||null;return E(ye,Ge,""+Be,Je)}if(typeof Be=="object"&&Be!==null){switch(Be.$$typeof){case $n:{var wt=ie.get(Be.key===null?ae:Be.key)||null;return _(ye,wt,Be,Je)}case hr:{var kt=ie.get(Be.key===null?ae:Be.key)||null;return O(ye,kt,Be,Je)}case Tt:var kr=Be._payload,cr=Be._init;return ue(ie,ye,ae,cr(kr),Je)}if(Mt(Be)||Ot(Be)){var Hn=ie.get(ae)||null;return I(ye,Hn,Be,Je,null)}Um(ye,Be)}return typeof Be=="function"&&jm(ye),null}function de(ie,ye,ae){{if(typeof ie!="object"||ie===null)return ye;switch(ie.$$typeof){case $n:case hr:Jb(ie,ae);var Be=ie.key;if(typeof Be!="string")break;if(ye===null){ye=new Set,ye.add(Be);break}if(!ye.has(Be)){ye.add(Be);break}v("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",Be);break;case Tt:var Je=ie._payload,Ge=ie._init;de(Ge(Je),ye,ae);break}}return ye}function me(ie,ye,ae,Be){for(var Je=null,Ge=0;Ge<ae.length;Ge++){var wt=ae[Ge];Je=de(wt,Je,ie)}for(var kt=null,kr=null,cr=ye,Hn=0,fr=0,_n=null;cr!==null&&fr<ae.length;fr++){cr.index>fr?(_n=cr,cr=null):_n=cr.sibling;var Ji=J(ie,cr,ae[fr],Be);if(Ji===null){cr===null&&(cr=_n);break}e&&cr&&Ji.alternate===null&&t(ie,cr),Hn=g(Ji,Hn,fr),kr===null?kt=Ji:kr.sibling=Ji,kr=Ji,cr=_n}if(fr===ae.length){if(s(ie,cr),_i()){var Oi=fr;Bf(ie,Oi)}return kt}if(cr===null){for(;fr<ae.length;fr++){var is=re(ie,ae[fr],Be);is!==null&&(Hn=g(is,Hn,fr),kr===null?kt=is:kr.sibling=is,kr=is)}if(_i()){var ha=fr;Bf(ie,ha)}return kt}for(var pa=u(ie,cr);fr<ae.length;fr++){var ea=ue(pa,ie,fr,ae[fr],Be);ea!==null&&(e&&ea.alternate!==null&&pa.delete(ea.key===null?fr:ea.key),Hn=g(ea,Hn,fr),kr===null?kt=ea:kr.sibling=ea,kr=ea)}if(e&&pa.forEach(function(Vh){return t(ie,Vh)}),_i()){var hu=fr;Bf(ie,hu)}return kt}function Ye(ie,ye,ae,Be){var Je=Ot(ae);if(typeof Je!="function")throw new Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");{typeof Symbol=="function"&&ae[Symbol.toStringTag]==="Generator"&&(kE||v("Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers."),kE=!0),ae.entries===Je&&(AE||v("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),AE=!0);var Ge=Je.call(ae);if(Ge)for(var wt=null,kt=Ge.next();!kt.done;kt=Ge.next()){var kr=kt.value;wt=de(kr,wt,ie)}}var cr=Je.call(ae);if(cr==null)throw new Error("An iterable object provided no iterator.");for(var Hn=null,fr=null,_n=ye,Ji=0,Oi=0,is=null,ha=cr.next();_n!==null&&!ha.done;Oi++,ha=cr.next()){_n.index>Oi?(is=_n,_n=null):is=_n.sibling;var pa=J(ie,_n,ha.value,Be);if(pa===null){_n===null&&(_n=is);break}e&&_n&&pa.alternate===null&&t(ie,_n),Ji=g(pa,Ji,Oi),fr===null?Hn=pa:fr.sibling=pa,fr=pa,_n=is}if(ha.done){if(s(ie,_n),_i()){var ea=Oi;Bf(ie,ea)}return Hn}if(_n===null){for(;!ha.done;Oi++,ha=cr.next()){var hu=re(ie,ha.value,Be);hu!==null&&(Ji=g(hu,Ji,Oi),fr===null?Hn=hu:fr.sibling=hu,fr=hu)}if(_i()){var Vh=Oi;Bf(ie,Vh)}return Hn}for(var yv=u(ie,_n);!ha.done;Oi++,ha=cr.next()){var fl=ue(yv,ie,Oi,ha.value,Be);fl!==null&&(e&&fl.alternate!==null&&yv.delete(fl.key===null?Oi:fl.key),Ji=g(fl,Ji,Oi),fr===null?Hn=fl:fr.sibling=fl,fr=fl)}if(e&&yv.forEach(function(EO){return t(ie,EO)}),_i()){var xO=Oi;Bf(ie,xO)}return Hn}function gt(ie,ye,ae,Be){if(ye!==null&&ye.tag===P){s(ie,ye.sibling);var Je=d(ye,ae);return Je.return=ie,Je}s(ie,ye);var Ge=RC(ae,ie.mode,Be);return Ge.return=ie,Ge}function ft(ie,ye,ae,Be){for(var Je=ae.key,Ge=ye;Ge!==null;){if(Ge.key===Je){var wt=ae.type;if(wt===Fn){if(Ge.tag===j){s(ie,Ge.sibling);var kt=d(Ge,ae.props.children);return kt.return=ie,kt._debugSource=ae._source,kt._debugOwner=ae._owner,kt}}else if(Ge.elementType===wt||sT(Ge,ae)||typeof wt=="object"&&wt!==null&&wt.$$typeof===Tt&&e_(wt)===Ge.type){s(ie,Ge.sibling);var kr=d(Ge,ae.props);return kr.ref=Lp(ie,Ge,ae),kr.return=ie,kr._debugSource=ae._source,kr._debugOwner=ae._owner,kr}s(ie,Ge);break}else t(ie,Ge);Ge=Ge.sibling}if(ae.type===Fn){var cr=Ec(ae.props.children,ie.mode,Be,ae.key);return cr.return=ie,cr}else{var Hn=TC(ae,ie.mode,Be);return Hn.ref=Lp(ie,ye,ae),Hn.return=ie,Hn}}function Kt(ie,ye,ae,Be){for(var Je=ae.key,Ge=ye;Ge!==null;){if(Ge.key===Je)if(Ge.tag===A&&Ge.stateNode.containerInfo===ae.containerInfo&&Ge.stateNode.implementation===ae.implementation){s(ie,Ge.sibling);var wt=d(Ge,ae.children||[]);return wt.return=ie,wt}else{s(ie,Ge);break}else t(ie,Ge);Ge=Ge.sibling}var kt=AC(ae,ie.mode,Be);return kt.return=ie,kt}function jt(ie,ye,ae,Be){var Je=typeof ae=="object"&&ae!==null&&ae.type===Fn&&ae.key===null;if(Je&&(ae=ae.props.children),typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case $n:return y(ft(ie,ye,ae,Be));case hr:return y(Kt(ie,ye,ae,Be));case Tt:var Ge=ae._payload,wt=ae._init;return jt(ie,ye,wt(Ge),Be)}if(Mt(ae))return me(ie,ye,ae,Be);if(Ot(ae))return Ye(ie,ye,ae,Be);Um(ie,ae)}return typeof ae=="string"&&ae!==""||typeof ae=="number"?y(gt(ie,ye,""+ae,Be)):(typeof ae=="function"&&jm(ie),s(ie,ye))}return jt}var Rh=t_(!0),r_=t_(!1);function K5(e,t){if(e!==null&&t.child!==e.child)throw new Error("Resuming work not yet implemented.");if(t.child!==null){var s=t.child,u=Wf(s,s.pendingProps);for(t.child=u,u.return=t;s.sibling!==null;)s=s.sibling,u=u.sibling=Wf(s,s.pendingProps),u.return=t;u.sibling=null}}function Q5(e,t){for(var s=e.child;s!==null;)I9(s,t),s=s.sibling}var BE=sc(null),ME;ME={};var zm=null,Ah=null,HE=null,qm=!1;function Ym(){zm=null,Ah=null,HE=null,qm=!1}function n_(){qm=!0}function i_(){qm=!1}function a_(e,t,s){Xi(BE,t._currentValue,e),t._currentValue=s,t._currentRenderer!==void 0&&t._currentRenderer!==null&&t._currentRenderer!==ME&&v("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),t._currentRenderer=ME}function IE(e,t){var s=BE.current;Qi(BE,t),e._currentValue=s}function $E(e,t,s){for(var u=e;u!==null;){var d=u.alternate;if(Kl(u.childLanes,t)?d!==null&&!Kl(d.childLanes,t)&&(d.childLanes=Nt(d.childLanes,t)):(u.childLanes=Nt(u.childLanes,t),d!==null&&(d.childLanes=Nt(d.childLanes,t))),u===s)break;u=u.return}u!==s&&v("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function X5(e,t,s){Z5(e,t,s)}function Z5(e,t,s){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var d=void 0,g=u.dependencies;if(g!==null){d=u.child;for(var y=g.firstContext;y!==null;){if(y.context===t){if(u.tag===S){var E=ff(s),_=ou(Nr,E);_.tag=Wm;var O=u.updateQueue;if(O!==null){var I=O.shared,re=I.pending;re===null?_.next=_:(_.next=re.next,re.next=_),I.pending=_}}u.lanes=Nt(u.lanes,s);var J=u.alternate;J!==null&&(J.lanes=Nt(J.lanes,s)),$E(u.return,s,e),g.lanes=Nt(g.lanes,s);break}y=y.next}}else if(u.tag===B)d=u.type===e.type?null:u.child;else if(u.tag===X){var ue=u.return;if(ue===null)throw new Error("We just came from a parent so we must have had a parent. This is a bug in React.");ue.lanes=Nt(ue.lanes,s);var de=ue.alternate;de!==null&&(de.lanes=Nt(de.lanes,s)),$E(ue,s,e),d=u.sibling}else d=u.child;if(d!==null)d.return=u;else for(d=u;d!==null;){if(d===e){d=null;break}var me=d.sibling;if(me!==null){me.return=d.return,d=me;break}d=d.return}u=d}}function kh(e,t){zm=e,Ah=null,HE=null;var s=e.dependencies;if(s!==null){var u=s.firstContext;u!==null&&(Vi(s.lanes,t)&&tv(),s.firstContext=null)}}function zn(e){qm&&v("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");var t=e._currentValue;if(HE!==e){var s={context:e,memoizedValue:t,next:null};if(Ah===null){if(zm===null)throw new Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");Ah=s,zm.dependencies={lanes:Ae,firstContext:s}}else Ah=Ah.next=s}return t}var Pf=null;function PE(e){Pf===null?Pf=[e]:Pf.push(e)}function J5(){if(Pf!==null){for(var e=0;e<Pf.length;e++){var t=Pf[e],s=t.interleaved;if(s!==null){t.interleaved=null;var u=s.next,d=t.pending;if(d!==null){var g=d.next;d.next=u,s.next=g}t.pending=s}}Pf=null}}function s_(e,t,s,u){var d=t.interleaved;return d===null?(s.next=s,PE(t)):(s.next=d.next,d.next=s),t.interleaved=s,Vm(e,u)}function e7(e,t,s,u){var d=t.interleaved;d===null?(s.next=s,PE(t)):(s.next=d.next,d.next=s),t.interleaved=s}function t7(e,t,s,u){var d=t.interleaved;return d===null?(s.next=s,PE(t)):(s.next=d.next,d.next=s),t.interleaved=s,Vm(e,u)}function Ma(e,t){return Vm(e,t)}var r7=Vm;function Vm(e,t){e.lanes=Nt(e.lanes,t);var s=e.alternate;s!==null&&(s.lanes=Nt(s.lanes,t)),s===null&&(e.flags&(Zr|Ui))!==ht&&rT(e);for(var u=e,d=e.return;d!==null;)d.childLanes=Nt(d.childLanes,t),s=d.alternate,s!==null?s.childLanes=Nt(s.childLanes,t):(d.flags&(Zr|Ui))!==ht&&rT(e),u=d,d=d.return;if(u.tag===T){var g=u.stateNode;return g}else return null}var o_=0,l_=1,Wm=2,LE=3,Gm=!1,UE,Km;UE=!1,Km=null;function jE(e){var t={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:Ae},effects:null};e.updateQueue=t}function u_(e,t){var s=t.updateQueue,u=e.updateQueue;if(s===u){var d={baseState:u.baseState,firstBaseUpdate:u.firstBaseUpdate,lastBaseUpdate:u.lastBaseUpdate,shared:u.shared,effects:u.effects};t.updateQueue=d}}function ou(e,t){var s={eventTime:e,lane:t,tag:o_,payload:null,callback:null,next:null};return s}function cc(e,t,s){var u=e.updateQueue;if(u===null)return null;var d=u.shared;if(Km===d&&!UE&&(v("An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback."),UE=!0),e9()){var g=d.pending;return g===null?t.next=t:(t.next=g.next,g.next=t),d.pending=t,r7(e,s)}else return t7(e,d,t,s)}function Qm(e,t,s){var u=t.updateQueue;if(u!==null){var d=u.shared;if(J0(s)){var g=d.lanes;g=tp(g,e.pendingLanes);var y=Nt(g,s);d.lanes=y,rh(e,y)}}}function zE(e,t){var s=e.updateQueue,u=e.alternate;if(u!==null){var d=u.updateQueue;if(s===d){var g=null,y=null,E=s.firstBaseUpdate;if(E!==null){var _=E;do{var O={eventTime:_.eventTime,lane:_.lane,tag:_.tag,payload:_.payload,callback:_.callback,next:null};y===null?g=y=O:(y.next=O,y=O),_=_.next}while(_!==null);y===null?g=y=t:(y.next=t,y=t)}else g=y=t;s={baseState:d.baseState,firstBaseUpdate:g,lastBaseUpdate:y,shared:d.shared,effects:d.effects},e.updateQueue=s;return}}var I=s.lastBaseUpdate;I===null?s.firstBaseUpdate=t:I.next=t,s.lastBaseUpdate=t}function n7(e,t,s,u,d,g){switch(s.tag){case l_:{var y=s.payload;if(typeof y=="function"){n_();var E=y.call(g,u,d);{if(e.mode&Rr){Jr(!0);try{y.call(g,u,d)}finally{Jr(!1)}}i_()}return E}return y}case LE:e.flags=e.flags&~Pn|dt;case o_:{var _=s.payload,O;if(typeof _=="function"){n_(),O=_.call(g,u,d);{if(e.mode&Rr){Jr(!0);try{_.call(g,u,d)}finally{Jr(!1)}}i_()}}else O=_;return O==null?u:Bt({},u,O)}case Wm:return Gm=!0,u}return u}function Xm(e,t,s,u){var d=e.updateQueue;Gm=!1,Km=d.shared;var g=d.firstBaseUpdate,y=d.lastBaseUpdate,E=d.shared.pending;if(E!==null){d.shared.pending=null;var _=E,O=_.next;_.next=null,y===null?g=O:y.next=O,y=_;var I=e.alternate;if(I!==null){var re=I.updateQueue,J=re.lastBaseUpdate;J!==y&&(J===null?re.firstBaseUpdate=O:J.next=O,re.lastBaseUpdate=_)}}if(g!==null){var ue=d.baseState,de=Ae,me=null,Ye=null,gt=null,ft=g;do{var Kt=ft.lane,jt=ft.eventTime;if(Kl(u,Kt)){if(gt!==null){var ye={eventTime:jt,lane:nr,tag:ft.tag,payload:ft.payload,callback:ft.callback,next:null};gt=gt.next=ye}ue=n7(e,d,ft,ue,t,s);var ae=ft.callback;if(ae!==null&&ft.lane!==nr){e.flags|=$r;var Be=d.effects;Be===null?d.effects=[ft]:Be.push(ft)}}else{var ie={eventTime:jt,lane:Kt,tag:ft.tag,payload:ft.payload,callback:ft.callback,next:null};gt===null?(Ye=gt=ie,me=ue):gt=gt.next=ie,de=Nt(de,Kt)}if(ft=ft.next,ft===null){if(E=d.shared.pending,E===null)break;var Je=E,Ge=Je.next;Je.next=null,ft=Ge,d.lastBaseUpdate=Je,d.shared.pending=null}}while(!0);gt===null&&(me=ue),d.baseState=me,d.firstBaseUpdate=Ye,d.lastBaseUpdate=gt;var wt=d.shared.interleaved;if(wt!==null){var kt=wt;do de=Nt(de,kt.lane),kt=kt.next;while(kt!==wt)}else g===null&&(d.shared.lanes=Ae);hv(de),e.lanes=de,e.memoizedState=ue}Km=null}function i7(e,t){if(typeof e!="function")throw new Error("Invalid argument passed as callback. Expected a function. Instead "+("received: "+e));e.call(t)}function c_(){Gm=!1}function Zm(){return Gm}function f_(e,t,s){var u=t.effects;if(t.effects=null,u!==null)for(var d=0;d<u.length;d++){var g=u[d],y=g.callback;y!==null&&(g.callback=null,i7(y,s))}}var Up={},fc=sc(Up),jp=sc(Up),Jm=sc(Up);function ey(e){if(e===Up)throw new Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");return e}function d_(){var e=ey(Jm.current);return e}function qE(e,t){Xi(Jm,t,e),Xi(jp,e,e),Xi(fc,Up,e);var s=S3(t);Qi(fc,e),Xi(fc,s,e)}function Fh(e){Qi(fc,e),Qi(jp,e),Qi(Jm,e)}function YE(){var e=ey(fc.current);return e}function h_(e){ey(Jm.current);var t=ey(fc.current),s=C3(t,e.type);t!==s&&(Xi(jp,e,e),Xi(fc,s,e))}function VE(e){jp.current===e&&(Qi(fc,e),Qi(jp,e))}var a7=0,p_=1,v_=1,zp=2,co=sc(a7);function WE(e,t){return(e&t)!==0}function Oh(e){return e&p_}function GE(e,t){return e&p_|t}function s7(e,t){return e|t}function dc(e,t){Xi(co,t,e)}function Nh(e){Qi(co,e)}function o7(e,t){var s=e.memoizedState;return s!==null?s.dehydrated!==null:(e.memoizedProps,!0)}function ty(e){for(var t=e;t!==null;){if(t.tag===K){var s=t.memoizedState;if(s!==null){var u=s.dehydrated;if(u===null||Ob(u)||dE(u))return t}}else if(t.tag===F&&t.memoizedProps.revealOrder!==void 0){var d=(t.flags&dt)!==ht;if(d)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)return null;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ha=0,Jn=1,il=2,ei=4,Di=8,KE=[];function QE(){for(var e=0;e<KE.length;e++){var t=KE[e];t._workInProgressVersionPrimary=null}KE.length=0}function l7(e,t){var s=t._getVersion,u=s(t._source);e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[t,u]:e.mutableSourceEagerHydrationData.push(t,u)}var Xe=i.ReactCurrentDispatcher,qp=i.ReactCurrentBatchConfig,XE,Bh;XE=new Set;var Lf=Ae,Ar=null,ti=null,ri=null,ry=!1,Yp=!1,Vp=0,u7=0,c7=25,we=null,Ms=null,hc=-1,ZE=!1;function xr(){{var e=we;Ms===null?Ms=[e]:Ms.push(e)}}function Ue(){{var e=we;Ms!==null&&(hc++,Ms[hc]!==e&&f7(e))}}function Mh(e){e!=null&&!Mt(e)&&v("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",we,typeof e)}function f7(e){{var t=Dt(Ar);if(!XE.has(t)&&(XE.add(t),Ms!==null)){for(var s="",u=30,d=0;d<=hc;d++){for(var g=Ms[d],y=d===hc?e:g,E=d+1+". "+g;E.length<u;)E+=" ";E+=y+`
140
- `,s+=E}v(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks
141
-
142
- Previous render Next render
143
- ------------------------------------------------------
144
- %s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
145
- `,t,s)}}}function Zi(){throw new Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
146
- 1. You might have mismatching versions of React and the renderer (such as React DOM)
147
- 2. You might be breaking the Rules of Hooks
148
- 3. You might have more than one copy of React in the same app
149
- See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function JE(e,t){if(ZE)return!1;if(t===null)return v("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",we),!1;e.length!==t.length&&v(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
150
-
151
- Previous: %s
152
- Incoming: %s`,we,"["+t.join(", ")+"]","["+e.join(", ")+"]");for(var s=0;s<t.length&&s<e.length;s++)if(!Oe(e[s],t[s]))return!1;return!0}function Hh(e,t,s,u,d,g){Lf=g,Ar=t,Ms=e!==null?e._debugHookTypes:null,hc=-1,ZE=e!==null&&e.type!==t.type,t.memoizedState=null,t.updateQueue=null,t.lanes=Ae,e!==null&&e.memoizedState!==null?Xe.current=I_:Ms!==null?Xe.current=H_:Xe.current=M_;var y=s(u,d);if(Yp){var E=0;do{if(Yp=!1,Vp=0,E>=c7)throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");E+=1,ZE=!1,ti=null,ri=null,t.updateQueue=null,hc=-1,Xe.current=$_,y=s(u,d)}while(Yp)}Xe.current=vy,t._debugHookTypes=Ms;var _=ti!==null&&ti.next!==null;if(Lf=Ae,Ar=null,ti=null,ri=null,we=null,Ms=null,hc=-1,e!==null&&(e.flags&xn)!==(t.flags&xn)&&(e.mode&It)!==pt&&v("Internal React error: Expected static flag was missing. Please notify the React team."),ry=!1,_)throw new Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return y}function Ih(){var e=Vp!==0;return Vp=0,e}function g_(e,t,s){t.updateQueue=e.updateQueue,(t.mode&lr)!==pt?t.flags&=-50333701:t.flags&=-2053,e.lanes=df(e.lanes,s)}function m_(){if(Xe.current=vy,ry){for(var e=Ar.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ry=!1}Lf=Ae,Ar=null,ti=null,ri=null,Ms=null,hc=-1,we=null,k_=!1,Yp=!1,Vp=0}function al(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ri===null?Ar.memoizedState=ri=e:ri=ri.next=e,ri}function Hs(){var e;if(ti===null){var t=Ar.alternate;t!==null?e=t.memoizedState:e=null}else e=ti.next;var s;if(ri===null?s=Ar.memoizedState:s=ri.next,s!==null)ri=s,s=ri.next,ti=e;else{if(e===null)throw new Error("Rendered more hooks than during the previous render.");ti=e;var u={memoizedState:ti.memoizedState,baseState:ti.baseState,baseQueue:ti.baseQueue,queue:ti.queue,next:null};ri===null?Ar.memoizedState=ri=u:ri=ri.next=u}return ri}function y_(){return{lastEffect:null,stores:null}}function eS(e,t){return typeof t=="function"?t(e):t}function tS(e,t,s){var u=al(),d;s!==void 0?d=s(t):d=t,u.memoizedState=u.baseState=d;var g={pending:null,interleaved:null,lanes:Ae,dispatch:null,lastRenderedReducer:e,lastRenderedState:d};u.queue=g;var y=g.dispatch=v7.bind(null,Ar,g);return[u.memoizedState,y]}function rS(e,t,s){var u=Hs(),d=u.queue;if(d===null)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");d.lastRenderedReducer=e;var g=ti,y=g.baseQueue,E=d.pending;if(E!==null){if(y!==null){var _=y.next,O=E.next;y.next=O,E.next=_}g.baseQueue!==y&&v("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),g.baseQueue=y=E,d.pending=null}if(y!==null){var I=y.next,re=g.baseState,J=null,ue=null,de=null,me=I;do{var Ye=me.lane;if(Kl(Lf,Ye)){if(de!==null){var ft={lane:nr,action:me.action,hasEagerState:me.hasEagerState,eagerState:me.eagerState,next:null};de=de.next=ft}if(me.hasEagerState)re=me.eagerState;else{var Kt=me.action;re=e(re,Kt)}}else{var gt={lane:Ye,action:me.action,hasEagerState:me.hasEagerState,eagerState:me.eagerState,next:null};de===null?(ue=de=gt,J=re):de=de.next=gt,Ar.lanes=Nt(Ar.lanes,Ye),hv(Ye)}me=me.next}while(me!==null&&me!==I);de===null?J=re:de.next=ue,Oe(re,u.memoizedState)||tv(),u.memoizedState=re,u.baseState=J,u.baseQueue=de,d.lastRenderedState=re}var jt=d.interleaved;if(jt!==null){var ie=jt;do{var ye=ie.lane;Ar.lanes=Nt(Ar.lanes,ye),hv(ye),ie=ie.next}while(ie!==jt)}else y===null&&(d.lanes=Ae);var ae=d.dispatch;return[u.memoizedState,ae]}function nS(e,t,s){var u=Hs(),d=u.queue;if(d===null)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");d.lastRenderedReducer=e;var g=d.dispatch,y=d.pending,E=u.memoizedState;if(y!==null){d.pending=null;var _=y.next,O=_;do{var I=O.action;E=e(E,I),O=O.next}while(O!==_);Oe(E,u.memoizedState)||tv(),u.memoizedState=E,u.baseQueue===null&&(u.baseState=E),d.lastRenderedState=E}return[E,g]}function bO(e,t,s){}function _O(e,t,s){}function iS(e,t,s){var u=Ar,d=al(),g,y=_i();if(y){if(s===void 0)throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");g=s(),Bh||g!==s()&&(v("The result of getServerSnapshot should be cached to avoid an infinite loop"),Bh=!0)}else{if(g=t(),!Bh){var E=t();Oe(g,E)||(v("The result of getSnapshot should be cached to avoid an infinite loop"),Bh=!0)}var _=By();if(_===null)throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");eh(_,Lf)||x_(u,t,g)}d.memoizedState=g;var O={value:g,getSnapshot:t};return d.queue=O,oy(S_.bind(null,u,O,e),[e]),u.flags|=Li,Wp(Jn|Di,E_.bind(null,u,O,g,t),void 0,null),g}function ny(e,t,s){var u=Ar,d=Hs(),g=t();if(!Bh){var y=t();Oe(g,y)||(v("The result of getSnapshot should be cached to avoid an infinite loop"),Bh=!0)}var E=d.memoizedState,_=!Oe(E,g);_&&(d.memoizedState=g,tv());var O=d.queue;if(Kp(S_.bind(null,u,O,e),[e]),O.getSnapshot!==t||_||ri!==null&&ri.memoizedState.tag&Jn){u.flags|=Li,Wp(Jn|Di,E_.bind(null,u,O,g,t),void 0,null);var I=By();if(I===null)throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");eh(I,Lf)||x_(u,t,g)}return g}function x_(e,t,s){e.flags|=qu;var u={getSnapshot:t,value:s},d=Ar.updateQueue;if(d===null)d=y_(),Ar.updateQueue=d,d.stores=[u];else{var g=d.stores;g===null?d.stores=[u]:g.push(u)}}function E_(e,t,s,u){t.value=s,t.getSnapshot=u,C_(t)&&w_(e)}function S_(e,t,s){var u=function(){C_(t)&&w_(e)};return s(u)}function C_(e){var t=e.getSnapshot,s=e.value;try{var u=t();return!Oe(s,u)}catch{return!0}}function w_(e){var t=Ma(e,Ct);t!==null&&si(t,e,Ct,Nr)}function iy(e){var t=al();typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e;var s={pending:null,interleaved:null,lanes:Ae,dispatch:null,lastRenderedReducer:eS,lastRenderedState:e};t.queue=s;var u=s.dispatch=g7.bind(null,Ar,s);return[t.memoizedState,u]}function aS(e){return rS(eS)}function sS(e){return nS(eS)}function Wp(e,t,s,u){var d={tag:e,create:t,destroy:s,deps:u,next:null},g=Ar.updateQueue;if(g===null)g=y_(),Ar.updateQueue=g,g.lastEffect=d.next=d;else{var y=g.lastEffect;if(y===null)g.lastEffect=d.next=d;else{var E=y.next;y.next=d,d.next=E,g.lastEffect=d}}return d}function oS(e){var t=al();{var s={current:e};return t.memoizedState=s,s}}function ay(e){var t=Hs();return t.memoizedState}function Gp(e,t,s,u){var d=al(),g=u===void 0?null:u;Ar.flags|=e,d.memoizedState=Wp(Jn|t,s,void 0,g)}function sy(e,t,s,u){var d=Hs(),g=u===void 0?null:u,y=void 0;if(ti!==null){var E=ti.memoizedState;if(y=E.destroy,g!==null){var _=E.deps;if(JE(g,_)){d.memoizedState=Wp(t,s,y,g);return}}}Ar.flags|=e,d.memoizedState=Wp(Jn|t,s,y,g)}function oy(e,t){return(Ar.mode&lr)!==pt?Gp(ws|Li|Td,Di,e,t):Gp(Li|Td,Di,e,t)}function Kp(e,t){return sy(Li,Di,e,t)}function lS(e,t){return Gp(Vt,il,e,t)}function ly(e,t){return sy(Vt,il,e,t)}function uS(e,t){var s=Vt;return s|=Zs,(Ar.mode&lr)!==pt&&(s|=Lo),Gp(s,ei,e,t)}function uy(e,t){return sy(Vt,ei,e,t)}function b_(e,t){if(typeof t=="function"){var s=t,u=e();return s(u),function(){s(null)}}else if(t!=null){var d=t;d.hasOwnProperty("current")||v("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(d).join(", ")+"}");var g=e();return d.current=g,function(){d.current=null}}}function cS(e,t,s){typeof t!="function"&&v("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",t!==null?typeof t:"null");var u=s!=null?s.concat([e]):null,d=Vt;return d|=Zs,(Ar.mode&lr)!==pt&&(d|=Lo),Gp(d,ei,b_.bind(null,t,e),u)}function cy(e,t,s){typeof t!="function"&&v("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",t!==null?typeof t:"null");var u=s!=null?s.concat([e]):null;return sy(Vt,ei,b_.bind(null,t,e),u)}function d7(e,t){}var fy=d7;function fS(e,t){var s=al(),u=t===void 0?null:t;return s.memoizedState=[e,u],e}function dy(e,t){var s=Hs(),u=t===void 0?null:t,d=s.memoizedState;if(d!==null&&u!==null){var g=d[1];if(JE(u,g))return d[0]}return s.memoizedState=[e,u],e}function dS(e,t){var s=al(),u=t===void 0?null:t,d=e();return s.memoizedState=[d,u],d}function hy(e,t){var s=Hs(),u=t===void 0?null:t,d=s.memoizedState;if(d!==null&&u!==null){var g=d[1];if(JE(u,g))return d[0]}var y=e();return s.memoizedState=[y,u],y}function hS(e){var t=al();return t.memoizedState=e,e}function __(e){var t=Hs(),s=ti,u=s.memoizedState;return T_(t,u,e)}function D_(e){var t=Hs();if(ti===null)return t.memoizedState=e,e;var s=ti.memoizedState;return T_(t,s,e)}function T_(e,t,s){var u=!X0(Lf);if(u){if(!Oe(s,t)){var d=ep();Ar.lanes=Nt(Ar.lanes,d),hv(d),e.baseState=!0}return t}else return e.baseState&&(e.baseState=!1,tv()),e.memoizedState=s,s}function h7(e,t,s){var u=Oa();Cn(qg(u,Ts)),e(!0);var d=qp.transition;qp.transition={};var g=qp.transition;qp.transition._updatedFibers=new Set;try{e(!1),t()}finally{if(Cn(u),qp.transition=d,d===null&&g._updatedFibers){var y=g._updatedFibers.size;y>10&&p("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),g._updatedFibers.clear()}}}function pS(){var e=iy(!1),t=e[0],s=e[1],u=h7.bind(null,s),d=al();return d.memoizedState=u,[t,u]}function R_(){var e=aS(),t=e[0],s=Hs(),u=s.memoizedState;return[t,u]}function A_(){var e=sS(),t=e[0],s=Hs(),u=s.memoizedState;return[t,u]}var k_=!1;function p7(){return k_}function vS(){var e=al(),t=By(),s=t.identifierPrefix,u;if(_i()){var d=F5();u=":"+s+"R"+d;var g=Vp++;g>0&&(u+="H"+g.toString(32)),u+=":"}else{var y=u7++;u=":"+s+"r"+y.toString(32)+":"}return e.memoizedState=u,u}function py(){var e=Hs(),t=e.memoizedState;return t}function v7(e,t,s){typeof arguments[3]=="function"&&v("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var u=yc(e),d={lane:u,action:s,hasEagerState:!1,eagerState:null,next:null};if(F_(e))O_(t,d);else{var g=s_(e,t,d,u);if(g!==null){var y=da();si(g,e,u,y),N_(g,t,u)}}B_(e,u)}function g7(e,t,s){typeof arguments[3]=="function"&&v("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var u=yc(e),d={lane:u,action:s,hasEagerState:!1,eagerState:null,next:null};if(F_(e))O_(t,d);else{var g=e.alternate;if(e.lanes===Ae&&(g===null||g.lanes===Ae)){var y=t.lastRenderedReducer;if(y!==null){var E;E=Xe.current,Xe.current=fo;try{var _=t.lastRenderedState,O=y(_,s);if(d.hasEagerState=!0,d.eagerState=O,Oe(O,_)){e7(e,t,d,u);return}}catch{}finally{Xe.current=E}}}var I=s_(e,t,d,u);if(I!==null){var re=da();si(I,e,u,re),N_(I,t,u)}}B_(e,u)}function F_(e){var t=e.alternate;return e===Ar||t!==null&&t===Ar}function O_(e,t){Yp=ry=!0;var s=e.pending;s===null?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function N_(e,t,s){if(J0(s)){var u=t.lanes;u=tp(u,e.pendingLanes);var d=Nt(u,s);t.lanes=d,rh(e,d)}}function B_(e,t,s){tf(e,t)}var vy={readContext:zn,useCallback:Zi,useContext:Zi,useEffect:Zi,useImperativeHandle:Zi,useInsertionEffect:Zi,useLayoutEffect:Zi,useMemo:Zi,useReducer:Zi,useRef:Zi,useState:Zi,useDebugValue:Zi,useDeferredValue:Zi,useTransition:Zi,useMutableSource:Zi,useSyncExternalStore:Zi,useId:Zi,unstable_isNewReconciler:Ee},M_=null,H_=null,I_=null,$_=null,sl=null,fo=null,gy=null;{var gS=function(){v("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")},Rt=function(){v("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks")};M_={readContext:function(e){return zn(e)},useCallback:function(e,t){return we="useCallback",xr(),Mh(t),fS(e,t)},useContext:function(e){return we="useContext",xr(),zn(e)},useEffect:function(e,t){return we="useEffect",xr(),Mh(t),oy(e,t)},useImperativeHandle:function(e,t,s){return we="useImperativeHandle",xr(),Mh(s),cS(e,t,s)},useInsertionEffect:function(e,t){return we="useInsertionEffect",xr(),Mh(t),lS(e,t)},useLayoutEffect:function(e,t){return we="useLayoutEffect",xr(),Mh(t),uS(e,t)},useMemo:function(e,t){we="useMemo",xr(),Mh(t);var s=Xe.current;Xe.current=sl;try{return dS(e,t)}finally{Xe.current=s}},useReducer:function(e,t,s){we="useReducer",xr();var u=Xe.current;Xe.current=sl;try{return tS(e,t,s)}finally{Xe.current=u}},useRef:function(e){return we="useRef",xr(),oS(e)},useState:function(e){we="useState",xr();var t=Xe.current;Xe.current=sl;try{return iy(e)}finally{Xe.current=t}},useDebugValue:function(e,t){return we="useDebugValue",xr(),void 0},useDeferredValue:function(e){return we="useDeferredValue",xr(),hS(e)},useTransition:function(){return we="useTransition",xr(),pS()},useMutableSource:function(e,t,s){return we="useMutableSource",xr(),void 0},useSyncExternalStore:function(e,t,s){return we="useSyncExternalStore",xr(),iS(e,t,s)},useId:function(){return we="useId",xr(),vS()},unstable_isNewReconciler:Ee},H_={readContext:function(e){return zn(e)},useCallback:function(e,t){return we="useCallback",Ue(),fS(e,t)},useContext:function(e){return we="useContext",Ue(),zn(e)},useEffect:function(e,t){return we="useEffect",Ue(),oy(e,t)},useImperativeHandle:function(e,t,s){return we="useImperativeHandle",Ue(),cS(e,t,s)},useInsertionEffect:function(e,t){return we="useInsertionEffect",Ue(),lS(e,t)},useLayoutEffect:function(e,t){return we="useLayoutEffect",Ue(),uS(e,t)},useMemo:function(e,t){we="useMemo",Ue();var s=Xe.current;Xe.current=sl;try{return dS(e,t)}finally{Xe.current=s}},useReducer:function(e,t,s){we="useReducer",Ue();var u=Xe.current;Xe.current=sl;try{return tS(e,t,s)}finally{Xe.current=u}},useRef:function(e){return we="useRef",Ue(),oS(e)},useState:function(e){we="useState",Ue();var t=Xe.current;Xe.current=sl;try{return iy(e)}finally{Xe.current=t}},useDebugValue:function(e,t){return we="useDebugValue",Ue(),void 0},useDeferredValue:function(e){return we="useDeferredValue",Ue(),hS(e)},useTransition:function(){return we="useTransition",Ue(),pS()},useMutableSource:function(e,t,s){return we="useMutableSource",Ue(),void 0},useSyncExternalStore:function(e,t,s){return we="useSyncExternalStore",Ue(),iS(e,t,s)},useId:function(){return we="useId",Ue(),vS()},unstable_isNewReconciler:Ee},I_={readContext:function(e){return zn(e)},useCallback:function(e,t){return we="useCallback",Ue(),dy(e,t)},useContext:function(e){return we="useContext",Ue(),zn(e)},useEffect:function(e,t){return we="useEffect",Ue(),Kp(e,t)},useImperativeHandle:function(e,t,s){return we="useImperativeHandle",Ue(),cy(e,t,s)},useInsertionEffect:function(e,t){return we="useInsertionEffect",Ue(),ly(e,t)},useLayoutEffect:function(e,t){return we="useLayoutEffect",Ue(),uy(e,t)},useMemo:function(e,t){we="useMemo",Ue();var s=Xe.current;Xe.current=fo;try{return hy(e,t)}finally{Xe.current=s}},useReducer:function(e,t,s){we="useReducer",Ue();var u=Xe.current;Xe.current=fo;try{return rS(e,t,s)}finally{Xe.current=u}},useRef:function(e){return we="useRef",Ue(),ay()},useState:function(e){we="useState",Ue();var t=Xe.current;Xe.current=fo;try{return aS(e)}finally{Xe.current=t}},useDebugValue:function(e,t){return we="useDebugValue",Ue(),fy()},useDeferredValue:function(e){return we="useDeferredValue",Ue(),__(e)},useTransition:function(){return we="useTransition",Ue(),R_()},useMutableSource:function(e,t,s){return we="useMutableSource",Ue(),void 0},useSyncExternalStore:function(e,t,s){return we="useSyncExternalStore",Ue(),ny(e,t)},useId:function(){return we="useId",Ue(),py()},unstable_isNewReconciler:Ee},$_={readContext:function(e){return zn(e)},useCallback:function(e,t){return we="useCallback",Ue(),dy(e,t)},useContext:function(e){return we="useContext",Ue(),zn(e)},useEffect:function(e,t){return we="useEffect",Ue(),Kp(e,t)},useImperativeHandle:function(e,t,s){return we="useImperativeHandle",Ue(),cy(e,t,s)},useInsertionEffect:function(e,t){return we="useInsertionEffect",Ue(),ly(e,t)},useLayoutEffect:function(e,t){return we="useLayoutEffect",Ue(),uy(e,t)},useMemo:function(e,t){we="useMemo",Ue();var s=Xe.current;Xe.current=gy;try{return hy(e,t)}finally{Xe.current=s}},useReducer:function(e,t,s){we="useReducer",Ue();var u=Xe.current;Xe.current=gy;try{return nS(e,t,s)}finally{Xe.current=u}},useRef:function(e){return we="useRef",Ue(),ay()},useState:function(e){we="useState",Ue();var t=Xe.current;Xe.current=gy;try{return sS(e)}finally{Xe.current=t}},useDebugValue:function(e,t){return we="useDebugValue",Ue(),fy()},useDeferredValue:function(e){return we="useDeferredValue",Ue(),D_(e)},useTransition:function(){return we="useTransition",Ue(),A_()},useMutableSource:function(e,t,s){return we="useMutableSource",Ue(),void 0},useSyncExternalStore:function(e,t,s){return we="useSyncExternalStore",Ue(),ny(e,t)},useId:function(){return we="useId",Ue(),py()},unstable_isNewReconciler:Ee},sl={readContext:function(e){return gS(),zn(e)},useCallback:function(e,t){return we="useCallback",Rt(),xr(),fS(e,t)},useContext:function(e){return we="useContext",Rt(),xr(),zn(e)},useEffect:function(e,t){return we="useEffect",Rt(),xr(),oy(e,t)},useImperativeHandle:function(e,t,s){return we="useImperativeHandle",Rt(),xr(),cS(e,t,s)},useInsertionEffect:function(e,t){return we="useInsertionEffect",Rt(),xr(),lS(e,t)},useLayoutEffect:function(e,t){return we="useLayoutEffect",Rt(),xr(),uS(e,t)},useMemo:function(e,t){we="useMemo",Rt(),xr();var s=Xe.current;Xe.current=sl;try{return dS(e,t)}finally{Xe.current=s}},useReducer:function(e,t,s){we="useReducer",Rt(),xr();var u=Xe.current;Xe.current=sl;try{return tS(e,t,s)}finally{Xe.current=u}},useRef:function(e){return we="useRef",Rt(),xr(),oS(e)},useState:function(e){we="useState",Rt(),xr();var t=Xe.current;Xe.current=sl;try{return iy(e)}finally{Xe.current=t}},useDebugValue:function(e,t){return we="useDebugValue",Rt(),xr(),void 0},useDeferredValue:function(e){return we="useDeferredValue",Rt(),xr(),hS(e)},useTransition:function(){return we="useTransition",Rt(),xr(),pS()},useMutableSource:function(e,t,s){return we="useMutableSource",Rt(),xr(),void 0},useSyncExternalStore:function(e,t,s){return we="useSyncExternalStore",Rt(),xr(),iS(e,t,s)},useId:function(){return we="useId",Rt(),xr(),vS()},unstable_isNewReconciler:Ee},fo={readContext:function(e){return gS(),zn(e)},useCallback:function(e,t){return we="useCallback",Rt(),Ue(),dy(e,t)},useContext:function(e){return we="useContext",Rt(),Ue(),zn(e)},useEffect:function(e,t){return we="useEffect",Rt(),Ue(),Kp(e,t)},useImperativeHandle:function(e,t,s){return we="useImperativeHandle",Rt(),Ue(),cy(e,t,s)},useInsertionEffect:function(e,t){return we="useInsertionEffect",Rt(),Ue(),ly(e,t)},useLayoutEffect:function(e,t){return we="useLayoutEffect",Rt(),Ue(),uy(e,t)},useMemo:function(e,t){we="useMemo",Rt(),Ue();var s=Xe.current;Xe.current=fo;try{return hy(e,t)}finally{Xe.current=s}},useReducer:function(e,t,s){we="useReducer",Rt(),Ue();var u=Xe.current;Xe.current=fo;try{return rS(e,t,s)}finally{Xe.current=u}},useRef:function(e){return we="useRef",Rt(),Ue(),ay()},useState:function(e){we="useState",Rt(),Ue();var t=Xe.current;Xe.current=fo;try{return aS(e)}finally{Xe.current=t}},useDebugValue:function(e,t){return we="useDebugValue",Rt(),Ue(),fy()},useDeferredValue:function(e){return we="useDeferredValue",Rt(),Ue(),__(e)},useTransition:function(){return we="useTransition",Rt(),Ue(),R_()},useMutableSource:function(e,t,s){return we="useMutableSource",Rt(),Ue(),void 0},useSyncExternalStore:function(e,t,s){return we="useSyncExternalStore",Rt(),Ue(),ny(e,t)},useId:function(){return we="useId",Rt(),Ue(),py()},unstable_isNewReconciler:Ee},gy={readContext:function(e){return gS(),zn(e)},useCallback:function(e,t){return we="useCallback",Rt(),Ue(),dy(e,t)},useContext:function(e){return we="useContext",Rt(),Ue(),zn(e)},useEffect:function(e,t){return we="useEffect",Rt(),Ue(),Kp(e,t)},useImperativeHandle:function(e,t,s){return we="useImperativeHandle",Rt(),Ue(),cy(e,t,s)},useInsertionEffect:function(e,t){return we="useInsertionEffect",Rt(),Ue(),ly(e,t)},useLayoutEffect:function(e,t){return we="useLayoutEffect",Rt(),Ue(),uy(e,t)},useMemo:function(e,t){we="useMemo",Rt(),Ue();var s=Xe.current;Xe.current=fo;try{return hy(e,t)}finally{Xe.current=s}},useReducer:function(e,t,s){we="useReducer",Rt(),Ue();var u=Xe.current;Xe.current=fo;try{return nS(e,t,s)}finally{Xe.current=u}},useRef:function(e){return we="useRef",Rt(),Ue(),ay()},useState:function(e){we="useState",Rt(),Ue();var t=Xe.current;Xe.current=fo;try{return sS(e)}finally{Xe.current=t}},useDebugValue:function(e,t){return we="useDebugValue",Rt(),Ue(),fy()},useDeferredValue:function(e){return we="useDeferredValue",Rt(),Ue(),D_(e)},useTransition:function(){return we="useTransition",Rt(),Ue(),A_()},useMutableSource:function(e,t,s){return we="useMutableSource",Rt(),Ue(),void 0},useSyncExternalStore:function(e,t,s){return we="useSyncExternalStore",Rt(),Ue(),ny(e,t)},useId:function(){return we="useId",Rt(),Ue(),py()},unstable_isNewReconciler:Ee}}var pc=r.unstable_now,P_=0,my=-1,Qp=-1,yy=-1,mS=!1,xy=!1;function L_(){return mS}function m7(){xy=!0}function y7(){mS=!1,xy=!1}function x7(){mS=xy,xy=!1}function U_(){return P_}function j_(){P_=pc()}function yS(e){Qp=pc(),e.actualStartTime<0&&(e.actualStartTime=pc())}function z_(e){Qp=-1}function Ey(e,t){if(Qp>=0){var s=pc()-Qp;e.actualDuration+=s,t&&(e.selfBaseDuration=s),Qp=-1}}function ol(e){if(my>=0){var t=pc()-my;my=-1;for(var s=e.return;s!==null;){switch(s.tag){case T:var u=s.stateNode;u.effectDuration+=t;return;case q:var d=s.stateNode;d.effectDuration+=t;return}s=s.return}}}function xS(e){if(yy>=0){var t=pc()-yy;yy=-1;for(var s=e.return;s!==null;){switch(s.tag){case T:var u=s.stateNode;u!==null&&(u.passiveEffectDuration+=t);return;case q:var d=s.stateNode;d!==null&&(d.passiveEffectDuration+=t);return}s=s.return}}}function ll(){my=pc()}function ES(){yy=pc()}function SS(e){for(var t=e.child;t;)e.actualDuration+=t.actualDuration,t=t.sibling}function ho(e,t){if(e&&e.defaultProps){var s=Bt({},t),u=e.defaultProps;for(var d in u)s[d]===void 0&&(s[d]=u[d]);return s}return t}var CS={},wS,bS,_S,DS,TS,q_,Sy,RS,AS,kS,Xp;{wS=new Set,bS=new Set,_S=new Set,DS=new Set,RS=new Set,TS=new Set,AS=new Set,kS=new Set,Xp=new Set;var Y_=new Set;Sy=function(e,t){if(!(e===null||typeof e=="function")){var s=t+"_"+e;Y_.has(s)||(Y_.add(s),v("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e))}},q_=function(e,t){if(t===void 0){var s=Zt(e)||"Component";TS.has(s)||(TS.add(s),v("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",s))}},Object.defineProperty(CS,"_processChildContext",{enumerable:!1,value:function(){throw new Error("_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).")}}),Object.freeze(CS)}function FS(e,t,s,u){var d=e.memoizedState,g=s(u,d);{if(e.mode&Rr){Jr(!0);try{g=s(u,d)}finally{Jr(!1)}}q_(t,g)}var y=g==null?d:Bt({},d,g);if(e.memoizedState=y,e.lanes===Ae){var E=e.updateQueue;E.baseState=y}}var OS={isMounted:Rg,enqueueSetState:function(e,t,s){var u=zu(e),d=da(),g=yc(u),y=ou(d,g);y.payload=t,s!=null&&(Sy(s,"setState"),y.callback=s);var E=cc(u,y,g);E!==null&&(si(E,u,g,d),Qm(E,u,g)),tf(u,g)},enqueueReplaceState:function(e,t,s){var u=zu(e),d=da(),g=yc(u),y=ou(d,g);y.tag=l_,y.payload=t,s!=null&&(Sy(s,"replaceState"),y.callback=s);var E=cc(u,y,g);E!==null&&(si(E,u,g,d),Qm(E,u,g)),tf(u,g)},enqueueForceUpdate:function(e,t){var s=zu(e),u=da(),d=yc(s),g=ou(u,d);g.tag=Wm,t!=null&&(Sy(t,"forceUpdate"),g.callback=t);var y=cc(s,g,d);y!==null&&(si(y,s,d,u),Qm(y,s,d)),Bd(s,d)}};function V_(e,t,s,u,d,g,y){var E=e.stateNode;if(typeof E.shouldComponentUpdate=="function"){var _=E.shouldComponentUpdate(u,g,y);{if(e.mode&Rr){Jr(!0);try{_=E.shouldComponentUpdate(u,g,y)}finally{Jr(!1)}}_===void 0&&v("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",Zt(t)||"Component")}return _}return t.prototype&&t.prototype.isPureReactComponent?!ot(s,u)||!ot(d,g):!0}function E7(e,t,s){var u=e.stateNode;{var d=Zt(t)||"Component",g=u.render;g||(t.prototype&&typeof t.prototype.render=="function"?v("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",d):v("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",d)),u.getInitialState&&!u.getInitialState.isReactClassApproved&&!u.state&&v("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",d),u.getDefaultProps&&!u.getDefaultProps.isReactClassApproved&&v("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",d),u.propTypes&&v("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",d),u.contextType&&v("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",d),t.childContextTypes&&!Xp.has(t)&&(e.mode&Rr)===pt&&(Xp.add(t),v(`%s uses the legacy childContextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext() instead
153
-
154
- .Learn more about this warning here: https://reactjs.org/link/legacy-context`,d)),t.contextTypes&&!Xp.has(t)&&(e.mode&Rr)===pt&&(Xp.add(t),v(`%s uses the legacy contextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext() with static contextType instead.
155
-
156
- Learn more about this warning here: https://reactjs.org/link/legacy-context`,d)),u.contextTypes&&v("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",d),t.contextType&&t.contextTypes&&!AS.has(t)&&(AS.add(t),v("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",d)),typeof u.componentShouldUpdate=="function"&&v("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",d),t.prototype&&t.prototype.isPureReactComponent&&typeof u.shouldComponentUpdate<"u"&&v("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",Zt(t)||"A pure component"),typeof u.componentDidUnmount=="function"&&v("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",d),typeof u.componentDidReceiveProps=="function"&&v("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",d),typeof u.componentWillRecieveProps=="function"&&v("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",d),typeof u.UNSAFE_componentWillRecieveProps=="function"&&v("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",d);var y=u.props!==s;u.props!==void 0&&y&&v("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",d,d),u.defaultProps&&v("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",d,d),typeof u.getSnapshotBeforeUpdate=="function"&&typeof u.componentDidUpdate!="function"&&!_S.has(t)&&(_S.add(t),v("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",Zt(t))),typeof u.getDerivedStateFromProps=="function"&&v("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",d),typeof u.getDerivedStateFromError=="function"&&v("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",d),typeof t.getSnapshotBeforeUpdate=="function"&&v("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",d);var E=u.state;E&&(typeof E!="object"||Mt(E))&&v("%s.state: must be set to an object or null",d),typeof u.getChildContext=="function"&&typeof t.childContextTypes!="object"&&v("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",d)}}function W_(e,t){t.updater=OS,e.stateNode=t,Ml(t,e),t._reactInternalInstance=CS}function G_(e,t,s){var u=!1,d=rs,g=rs,y=t.contextType;if("contextType"in t){var E=y===null||y!==void 0&&y.$$typeof===W&&y._context===void 0;if(!E&&!kS.has(t)){kS.add(t);var _="";y===void 0?_=" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof y!="object"?_=" However, it is set to a "+typeof y+".":y.$$typeof===ps?_=" Did you accidentally pass the Context.Provider instead?":y._context!==void 0?_=" Did you accidentally pass the Context.Consumer instead?":_=" However, it is set to an object with keys {"+Object.keys(y).join(", ")+"}.",v("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",Zt(t)||"Component",_)}}if(typeof y=="object"&&y!==null)g=zn(y);else{d=wh(e,t,!0);var O=t.contextTypes;u=O!=null,g=u?bh(e,d):rs}var I=new t(s,g);if(e.mode&Rr){Jr(!0);try{I=new t(s,g)}finally{Jr(!1)}}var re=e.memoizedState=I.state!==null&&I.state!==void 0?I.state:null;W_(e,I);{if(typeof t.getDerivedStateFromProps=="function"&&re===null){var J=Zt(t)||"Component";bS.has(J)||(bS.add(J),v("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",J,I.state===null?"null":"undefined",J))}if(typeof t.getDerivedStateFromProps=="function"||typeof I.getSnapshotBeforeUpdate=="function"){var ue=null,de=null,me=null;if(typeof I.componentWillMount=="function"&&I.componentWillMount.__suppressDeprecationWarning!==!0?ue="componentWillMount":typeof I.UNSAFE_componentWillMount=="function"&&(ue="UNSAFE_componentWillMount"),typeof I.componentWillReceiveProps=="function"&&I.componentWillReceiveProps.__suppressDeprecationWarning!==!0?de="componentWillReceiveProps":typeof I.UNSAFE_componentWillReceiveProps=="function"&&(de="UNSAFE_componentWillReceiveProps"),typeof I.componentWillUpdate=="function"&&I.componentWillUpdate.__suppressDeprecationWarning!==!0?me="componentWillUpdate":typeof I.UNSAFE_componentWillUpdate=="function"&&(me="UNSAFE_componentWillUpdate"),ue!==null||de!==null||me!==null){var Ye=Zt(t)||"Component",gt=typeof t.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";DS.has(Ye)||(DS.add(Ye),v(`Unsafe legacy lifecycles will not be called for components using new component APIs.
157
-
158
- %s uses %s but also contains the following legacy lifecycles:%s%s%s
159
-
160
- The above lifecycles should be removed. Learn more about this warning here:
161
- https://reactjs.org/link/unsafe-component-lifecycles`,Ye,gt,ue!==null?`
162
- `+ue:"",de!==null?`
163
- `+de:"",me!==null?`
164
- `+me:""))}}}return u&&Ib(e,d,g),I}function S7(e,t){var s=t.state;typeof t.componentWillMount=="function"&&t.componentWillMount(),typeof t.UNSAFE_componentWillMount=="function"&&t.UNSAFE_componentWillMount(),s!==t.state&&(v("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",Dt(e)||"Component"),OS.enqueueReplaceState(t,t.state,null))}function K_(e,t,s,u){var d=t.state;if(typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(s,u),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(s,u),t.state!==d){{var g=Dt(e)||"Component";wS.has(g)||(wS.add(g),v("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",g))}OS.enqueueReplaceState(t,t.state,null)}}function NS(e,t,s,u){E7(e,t,s);var d=e.stateNode;d.props=s,d.state=e.memoizedState,d.refs={},jE(e);var g=t.contextType;if(typeof g=="object"&&g!==null)d.context=zn(g);else{var y=wh(e,t,!0);d.context=bh(e,y)}{if(d.state===s){var E=Zt(t)||"Component";RS.has(E)||(RS.add(E),v("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",E))}e.mode&Rr&&uo.recordLegacyContextWarning(e,d),uo.recordUnsafeLifecycleWarnings(e,d)}d.state=e.memoizedState;var _=t.getDerivedStateFromProps;if(typeof _=="function"&&(FS(e,t,_,s),d.state=e.memoizedState),typeof t.getDerivedStateFromProps!="function"&&typeof d.getSnapshotBeforeUpdate!="function"&&(typeof d.UNSAFE_componentWillMount=="function"||typeof d.componentWillMount=="function")&&(S7(e,d),Xm(e,s,d,u),d.state=e.memoizedState),typeof d.componentDidMount=="function"){var O=Vt;O|=Zs,(e.mode&lr)!==pt&&(O|=Lo),e.flags|=O}}function C7(e,t,s,u){var d=e.stateNode,g=e.memoizedProps;d.props=g;var y=d.context,E=t.contextType,_=rs;if(typeof E=="object"&&E!==null)_=zn(E);else{var O=wh(e,t,!0);_=bh(e,O)}var I=t.getDerivedStateFromProps,re=typeof I=="function"||typeof d.getSnapshotBeforeUpdate=="function";!re&&(typeof d.UNSAFE_componentWillReceiveProps=="function"||typeof d.componentWillReceiveProps=="function")&&(g!==s||y!==_)&&K_(e,d,s,_),c_();var J=e.memoizedState,ue=d.state=J;if(Xm(e,s,d,u),ue=e.memoizedState,g===s&&J===ue&&!Om()&&!Zm()){if(typeof d.componentDidMount=="function"){var de=Vt;de|=Zs,(e.mode&lr)!==pt&&(de|=Lo),e.flags|=de}return!1}typeof I=="function"&&(FS(e,t,I,s),ue=e.memoizedState);var me=Zm()||V_(e,t,g,s,J,ue,_);if(me){if(!re&&(typeof d.UNSAFE_componentWillMount=="function"||typeof d.componentWillMount=="function")&&(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"){var Ye=Vt;Ye|=Zs,(e.mode&lr)!==pt&&(Ye|=Lo),e.flags|=Ye}}else{if(typeof d.componentDidMount=="function"){var gt=Vt;gt|=Zs,(e.mode&lr)!==pt&&(gt|=Lo),e.flags|=gt}e.memoizedProps=s,e.memoizedState=ue}return d.props=s,d.state=ue,d.context=_,me}function w7(e,t,s,u,d){var g=t.stateNode;u_(e,t);var y=t.memoizedProps,E=t.type===t.elementType?y:ho(t.type,y);g.props=E;var _=t.pendingProps,O=g.context,I=s.contextType,re=rs;if(typeof I=="object"&&I!==null)re=zn(I);else{var J=wh(t,s,!0);re=bh(t,J)}var ue=s.getDerivedStateFromProps,de=typeof ue=="function"||typeof g.getSnapshotBeforeUpdate=="function";!de&&(typeof g.UNSAFE_componentWillReceiveProps=="function"||typeof g.componentWillReceiveProps=="function")&&(y!==_||O!==re)&&K_(t,g,u,re),c_();var me=t.memoizedState,Ye=g.state=me;if(Xm(t,u,g,d),Ye=t.memoizedState,y===_&&me===Ye&&!Om()&&!Zm()&&!He)return typeof g.componentDidUpdate=="function"&&(y!==e.memoizedProps||me!==e.memoizedState)&&(t.flags|=Vt),typeof g.getSnapshotBeforeUpdate=="function"&&(y!==e.memoizedProps||me!==e.memoizedState)&&(t.flags|=Nn),!1;typeof ue=="function"&&(FS(t,s,ue,u),Ye=t.memoizedState);var gt=Zm()||V_(t,s,E,u,me,Ye,re)||He;return gt?(!de&&(typeof g.UNSAFE_componentWillUpdate=="function"||typeof g.componentWillUpdate=="function")&&(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(u,Ye,re),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(u,Ye,re)),typeof g.componentDidUpdate=="function"&&(t.flags|=Vt),typeof g.getSnapshotBeforeUpdate=="function"&&(t.flags|=Nn)):(typeof g.componentDidUpdate=="function"&&(y!==e.memoizedProps||me!==e.memoizedState)&&(t.flags|=Vt),typeof g.getSnapshotBeforeUpdate=="function"&&(y!==e.memoizedProps||me!==e.memoizedState)&&(t.flags|=Nn),t.memoizedProps=u,t.memoizedState=Ye),g.props=u,g.state=Ye,g.context=re,gt}function Uf(e,t){return{value:e,source:t,stack:Vs(t),digest:null}}function BS(e,t,s){return{value:e,source:null,stack:s??null,digest:t??null}}function b7(e,t){return!0}function MS(e,t){try{var s=b7(e,t);if(s===!1)return;var u=t.value,d=t.source,g=t.stack,y=g!==null?g:"";if(u!=null&&u._suppressLogging){if(e.tag===S)return;console.error(u)}var E=d?Dt(d):null,_=E?"The above error occurred in the <"+E+"> component:":"The above error occurred in one of your React components:",O;if(e.tag===T)O=`Consider adding an error boundary to your tree to customize error handling behavior.
165
- Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.`;else{var I=Dt(e)||"Anonymous";O="React will try to recreate this component tree from scratch "+("using the error boundary you provided, "+I+".")}var re=_+`
166
- `+y+`
167
-
168
- `+(""+O);console.error(re)}catch(J){setTimeout(function(){throw J})}}var _7=typeof WeakMap=="function"?WeakMap:Map;function Q_(e,t,s){var u=ou(Nr,s);u.tag=LE,u.payload={element:null};var d=t.value;return u.callback=function(){m9(d),MS(e,t)},u}function HS(e,t,s){var u=ou(Nr,s);u.tag=LE;var d=e.type.getDerivedStateFromError;if(typeof d=="function"){var g=t.value;u.payload=function(){return d(g)},u.callback=function(){oT(e),MS(e,t)}}var y=e.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(u.callback=function(){oT(e),MS(e,t),typeof d!="function"&&v9(this);var _=t.value,O=t.stack;this.componentDidCatch(_,{componentStack:O!==null?O:""}),typeof d!="function"&&(Vi(e.lanes,Ct)||v("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",Dt(e)||"Unknown"))}),u}function X_(e,t,s){var u=e.pingCache,d;if(u===null?(u=e.pingCache=new _7,d=new Set,u.set(t,d)):(d=u.get(t),d===void 0&&(d=new Set,u.set(t,d))),!d.has(s)){d.add(s);var g=y9.bind(null,e,t,s);qi&&pv(e,s),t.then(g,g)}}function D7(e,t,s,u){var d=e.updateQueue;if(d===null){var g=new Set;g.add(s),e.updateQueue=g}else d.add(s)}function T7(e,t){var s=e.tag;if((e.mode&It)===pt&&(s===w||s===U||s===ee)){var u=e.alternate;u?(e.updateQueue=u.updateQueue,e.memoizedState=u.memoizedState,e.lanes=u.lanes):(e.updateQueue=null,e.memoizedState=null)}}function Z_(e){var t=e;do{if(t.tag===K&&o7(t))return t;t=t.return}while(t!==null);return null}function J_(e,t,s,u,d){if((e.mode&It)===pt){if(e===t)e.flags|=Pn;else{if(e.flags|=dt,s.flags|=Dd,s.flags&=-52805,s.tag===S){var g=s.alternate;if(g===null)s.tag=Se;else{var y=ou(Nr,Ct);y.tag=Wm,cc(s,y,Ct)}}s.lanes=Nt(s.lanes,Ct)}return e}return e.flags|=Pn,e.lanes=d,e}function R7(e,t,s,u,d){if(s.flags|=Kc,qi&&pv(e,d),u!==null&&typeof u=="object"&&typeof u.then=="function"){var g=u;T7(s),_i()&&s.mode&It&&qb();var y=Z_(t);if(y!==null){y.flags&=~fi,J_(y,t,s,e,d),y.mode&It&&X_(e,g,d),D7(y,e,g);return}else{if(!Hg(d)){X_(e,g,d),vC();return}var E=new Error("A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.");u=E}}else if(_i()&&s.mode&It){qb();var _=Z_(t);if(_!==null){(_.flags&Pn)===ht&&(_.flags|=fi),J_(_,t,s,e,d),RE(Uf(u,s));return}}u=Uf(u,s),o9(u);var O=t;do{switch(O.tag){case T:{var I=u;O.flags|=Pn;var re=ff(d);O.lanes=Nt(O.lanes,re);var J=Q_(O,I,re);zE(O,J);return}case S:var ue=u,de=O.type,me=O.stateNode;if((O.flags&dt)===ht&&(typeof de.getDerivedStateFromError=="function"||me!==null&&typeof me.componentDidCatch=="function"&&!ZD(me))){O.flags|=Pn;var Ye=ff(d);O.lanes=Nt(O.lanes,Ye);var gt=HS(O,ue,Ye);zE(O,gt);return}break}O=O.return}while(O!==null)}function A7(){return null}var Zp=i.ReactCurrentOwner,po=!1,IS,Jp,$S,PS,LS,jf,US,Cy,ev;IS={},Jp={},$S={},PS={},LS={},jf=!1,US={},Cy={},ev={};function ca(e,t,s,u){e===null?t.child=r_(t,null,s,u):t.child=Rh(t,e.child,s,u)}function k7(e,t,s,u){t.child=Rh(t,e.child,null,u),t.child=Rh(t,null,s,u)}function eD(e,t,s,u,d){if(t.type!==t.elementType){var g=s.propTypes;g&&oo(g,u,"prop",Zt(s))}var y=s.render,E=t.ref,_,O;kh(t,d),sa(t);{if(Zp.current=t,On(!0),_=Hh(e,t,y,u,E,d),O=Ih(),t.mode&Rr){Jr(!0);try{_=Hh(e,t,y,u,E,d),O=Ih()}finally{Jr(!1)}}On(!1)}return oa(),e!==null&&!po?(g_(e,t,d),lu(e,t,d)):(_i()&&O&&CE(t),t.flags|=Xa,ca(e,t,_,d),t.child)}function tD(e,t,s,u,d){if(e===null){var g=s.type;if(M9(g)&&s.compare===null&&s.defaultProps===void 0){var y=g;return y=Yh(g),t.tag=ee,t.type=y,qS(t,g),rD(e,t,y,u,d)}{var E=g.propTypes;if(E&&oo(E,u,"prop",Zt(g)),s.defaultProps!==void 0){var _=Zt(g)||"Unknown";ev[_]||(v("%s: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.",_),ev[_]=!0)}}var O=DC(s.type,null,u,t,t.mode,d);return O.ref=t.ref,O.return=t,t.child=O,O}{var I=s.type,re=I.propTypes;re&&oo(re,u,"prop",Zt(I))}var J=e.child,ue=QS(e,d);if(!ue){var de=J.memoizedProps,me=s.compare;if(me=me!==null?me:ot,me(de,u)&&e.ref===t.ref)return lu(e,t,d)}t.flags|=Xa;var Ye=Wf(J,u);return Ye.ref=t.ref,Ye.return=t,t.child=Ye,Ye}function rD(e,t,s,u,d){if(t.type!==t.elementType){var g=t.elementType;if(g.$$typeof===Tt){var y=g,E=y._payload,_=y._init;try{g=_(E)}catch{g=null}var O=g&&g.propTypes;O&&oo(O,u,"prop",Zt(g))}}if(e!==null){var I=e.memoizedProps;if(ot(I,u)&&e.ref===t.ref&&t.type===e.type)if(po=!1,t.pendingProps=u=I,QS(e,d))(e.flags&Dd)!==ht&&(po=!0);else return t.lanes=e.lanes,lu(e,t,d)}return jS(e,t,s,u,d)}function nD(e,t,s){var u=t.pendingProps,d=u.children,g=e!==null?e.memoizedState:null;if(u.mode==="hidden"||De)if((t.mode&It)===pt){var y={baseLanes:Ae,cachePool:null,transitions:null};t.memoizedState=y,My(t,s)}else if(Vi(s,Yi)){var re={baseLanes:Ae,cachePool:null,transitions:null};t.memoizedState=re;var J=g!==null?g.baseLanes:s;My(t,J)}else{var E=null,_;if(g!==null){var O=g.baseLanes;_=Nt(O,s)}else _=s;t.lanes=t.childLanes=Yi;var I={baseLanes:_,cachePool:E,transitions:null};return t.memoizedState=I,t.updateQueue=null,My(t,_),null}else{var ue;g!==null?(ue=Nt(g.baseLanes,s),t.memoizedState=null):ue=s,My(t,ue)}return ca(e,t,d,s),t.child}function F7(e,t,s){var u=t.pendingProps;return ca(e,t,u,s),t.child}function O7(e,t,s){var u=t.pendingProps.children;return ca(e,t,u,s),t.child}function N7(e,t,s){{t.flags|=Vt;{var u=t.stateNode;u.effectDuration=0,u.passiveEffectDuration=0}}var d=t.pendingProps,g=d.children;return ca(e,t,g,s),t.child}function iD(e,t){var s=t.ref;(e===null&&s!==null||e!==null&&e.ref!==s)&&(t.flags|=an,t.flags|=Yu)}function jS(e,t,s,u,d){if(t.type!==t.elementType){var g=s.propTypes;g&&oo(g,u,"prop",Zt(s))}var y;{var E=wh(t,s,!0);y=bh(t,E)}var _,O;kh(t,d),sa(t);{if(Zp.current=t,On(!0),_=Hh(e,t,s,u,y,d),O=Ih(),t.mode&Rr){Jr(!0);try{_=Hh(e,t,s,u,y,d),O=Ih()}finally{Jr(!1)}}On(!1)}return oa(),e!==null&&!po?(g_(e,t,d),lu(e,t,d)):(_i()&&O&&CE(t),t.flags|=Xa,ca(e,t,_,d),t.child)}function aD(e,t,s,u,d){{switch(Q9(t)){case!1:{var g=t.stateNode,y=t.type,E=new y(t.memoizedProps,g.context),_=E.state;g.updater.enqueueSetState(g,_,null);break}case!0:{t.flags|=dt,t.flags|=Pn;var O=new Error("Simulated error coming from DevTools"),I=ff(d);t.lanes=Nt(t.lanes,I);var re=HS(t,Uf(O,t),I);zE(t,re);break}}if(t.type!==t.elementType){var J=s.propTypes;J&&oo(J,u,"prop",Zt(s))}}var ue;nl(s)?(ue=!0,Bm(t)):ue=!1,kh(t,d);var de=t.stateNode,me;de===null?(by(e,t),G_(t,s,u),NS(t,s,u,d),me=!0):e===null?me=C7(t,s,u,d):me=w7(e,t,s,u,d);var Ye=zS(e,t,s,me,ue,d);{var gt=t.stateNode;me&&gt.props!==u&&(jf||v("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",Dt(t)||"a component"),jf=!0)}return Ye}function zS(e,t,s,u,d,g){iD(e,t);var y=(t.flags&dt)!==ht;if(!u&&!y)return d&&Lb(t,s,!1),lu(e,t,g);var E=t.stateNode;Zp.current=t;var _;if(y&&typeof s.getDerivedStateFromError!="function")_=null,z_();else{sa(t);{if(On(!0),_=E.render(),t.mode&Rr){Jr(!0);try{E.render()}finally{Jr(!1)}}On(!1)}oa()}return t.flags|=Xa,e!==null&&y?k7(e,t,_,g):ca(e,t,_,g),t.memoizedState=E.state,d&&Lb(t,s,!0),t.child}function sD(e){var t=e.stateNode;t.pendingContext?$b(e,t.pendingContext,t.pendingContext!==t.context):t.context&&$b(e,t.context,!1),qE(e,t.containerInfo)}function B7(e,t,s){if(sD(t),e===null)throw new Error("Should have a current fiber. This is a bug in React.");var u=t.pendingProps,d=t.memoizedState,g=d.element;u_(e,t),Xm(t,u,null,s);var y=t.memoizedState;t.stateNode;var E=y.element;if(d.isDehydrated){var _={element:E,isDehydrated:!1,cache:y.cache,pendingSuspenseBoundaries:y.pendingSuspenseBoundaries,transitions:y.transitions},O=t.updateQueue;if(O.baseState=_,t.memoizedState=_,t.flags&fi){var I=Uf(new Error("There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering."),t);return oD(e,t,E,s,I)}else if(E!==g){var re=Uf(new Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),t);return oD(e,t,E,s,re)}else{I5(t);var J=r_(t,null,E,s);t.child=J;for(var ue=J;ue;)ue.flags=ue.flags&~Zr|Ui,ue=ue.sibling}}else{if(Th(),E===g)return lu(e,t,s);ca(e,t,E,s)}return t.child}function oD(e,t,s,u,d){return Th(),RE(d),t.flags|=fi,ca(e,t,s,u),t.child}function M7(e,t,s){h_(t),e===null&&TE(t);var u=t.type,d=t.pendingProps,g=e!==null?e.memoizedProps:null,y=d.children,E=lE(u,d);return E?y=null:g!==null&&lE(u,g)&&(t.flags|=Da),iD(e,t),ca(e,t,y,s),t.child}function H7(e,t){return e===null&&TE(t),null}function I7(e,t,s,u){by(e,t);var d=t.pendingProps,g=s,y=g._payload,E=g._init,_=E(y);t.type=_;var O=t.tag=H9(_),I=ho(_,d),re;switch(O){case w:return qS(t,_),t.type=_=Yh(_),re=jS(null,t,_,I,u),re;case S:return t.type=_=EC(_),re=aD(null,t,_,I,u),re;case U:return t.type=_=SC(_),re=eD(null,t,_,I,u),re;case Z:{if(t.type!==t.elementType){var J=_.propTypes;J&&oo(J,I,"prop",Zt(_))}return re=tD(null,t,_,ho(_.type,I),u),re}}var ue="";throw _!==null&&typeof _=="object"&&_.$$typeof===Tt&&(ue=" Did you wrap a component in React.lazy() more than once?"),new Error("Element type is invalid. Received a promise that resolves to: "+_+". "+("Lazy element type must resolve to a class or function."+ue))}function $7(e,t,s,u,d){by(e,t),t.tag=S;var g;return nl(s)?(g=!0,Bm(t)):g=!1,kh(t,d),G_(t,s,u),NS(t,s,u,d),zS(null,t,s,!0,g,d)}function P7(e,t,s,u){by(e,t);var d=t.pendingProps,g;{var y=wh(t,s,!1);g=bh(t,y)}kh(t,u);var E,_;sa(t);{if(s.prototype&&typeof s.prototype.render=="function"){var O=Zt(s)||"Unknown";IS[O]||(v("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",O,O),IS[O]=!0)}t.mode&Rr&&uo.recordLegacyContextWarning(t,null),On(!0),Zp.current=t,E=Hh(null,t,s,d,g,u),_=Ih(),On(!1)}if(oa(),t.flags|=Xa,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0){var I=Zt(s)||"Unknown";Jp[I]||(v("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",I,I,I),Jp[I]=!0)}if(typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0){{var re=Zt(s)||"Unknown";Jp[re]||(v("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",re,re,re),Jp[re]=!0)}t.tag=S,t.memoizedState=null,t.updateQueue=null;var J=!1;return nl(s)?(J=!0,Bm(t)):J=!1,t.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,jE(t),W_(t,E),NS(t,s,d,u),zS(null,t,s,!0,J,u)}else{if(t.tag=w,t.mode&Rr){Jr(!0);try{E=Hh(null,t,s,d,g,u),_=Ih()}finally{Jr(!1)}}return _i()&&_&&CE(t),ca(null,t,E,u),qS(t,s),t.child}}function qS(e,t){{if(t&&t.childContextTypes&&v("%s(...): childContextTypes cannot be defined on a function component.",t.displayName||t.name||"Component"),e.ref!==null){var s="",u=yi();u&&(s+=`
169
-
170
- Check the render method of \``+u+"`.");var d=u||"",g=e._debugSource;g&&(d=g.fileName+":"+g.lineNumber),LS[d]||(LS[d]=!0,v("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",s))}if(t.defaultProps!==void 0){var y=Zt(t)||"Unknown";ev[y]||(v("%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",y),ev[y]=!0)}if(typeof t.getDerivedStateFromProps=="function"){var E=Zt(t)||"Unknown";PS[E]||(v("%s: Function components do not support getDerivedStateFromProps.",E),PS[E]=!0)}if(typeof t.contextType=="object"&&t.contextType!==null){var _=Zt(t)||"Unknown";$S[_]||(v("%s: Function components do not support contextType.",_),$S[_]=!0)}}}var YS={dehydrated:null,treeContext:null,retryLane:nr};function VS(e){return{baseLanes:e,cachePool:A7(),transitions:null}}function L7(e,t){var s=null;return{baseLanes:Nt(e.baseLanes,t),cachePool:s,transitions:e.transitions}}function U7(e,t,s,u){if(t!==null){var d=t.memoizedState;if(d===null)return!1}return WE(e,zp)}function j7(e,t){return df(e.childLanes,t)}function lD(e,t,s){var u=t.pendingProps;X9(t)&&(t.flags|=dt);var d=co.current,g=!1,y=(t.flags&dt)!==ht;if(y||U7(d,e)?(g=!0,t.flags&=~dt):(e===null||e.memoizedState!==null)&&(d=s7(d,v_)),d=Oh(d),dc(t,d),e===null){TE(t);var E=t.memoizedState;if(E!==null){var _=E.dehydrated;if(_!==null)return W7(t,_)}var O=u.children,I=u.fallback;if(g){var re=z7(t,O,I,s),J=t.child;return J.memoizedState=VS(s),t.memoizedState=YS,re}else return WS(t,O)}else{var ue=e.memoizedState;if(ue!==null){var de=ue.dehydrated;if(de!==null)return G7(e,t,y,u,de,ue,s)}if(g){var me=u.fallback,Ye=u.children,gt=Y7(e,t,Ye,me,s),ft=t.child,Kt=e.child.memoizedState;return ft.memoizedState=Kt===null?VS(s):L7(Kt,s),ft.childLanes=j7(e,s),t.memoizedState=YS,gt}else{var jt=u.children,ie=q7(e,t,jt,s);return t.memoizedState=null,ie}}}function WS(e,t,s){var u=e.mode,d={mode:"visible",children:t},g=GS(d,u);return g.return=e,e.child=g,g}function z7(e,t,s,u){var d=e.mode,g=e.child,y={mode:"hidden",children:t},E,_;return(d&It)===pt&&g!==null?(E=g,E.childLanes=Ae,E.pendingProps=y,e.mode&or&&(E.actualDuration=0,E.actualStartTime=-1,E.selfBaseDuration=0,E.treeBaseDuration=0),_=Ec(s,d,u,null)):(E=GS(y,d),_=Ec(s,d,u,null)),E.return=e,_.return=e,E.sibling=_,e.child=E,_}function GS(e,t,s){return uT(e,t,Ae,null)}function uD(e,t){return Wf(e,t)}function q7(e,t,s,u){var d=e.child,g=d.sibling,y=uD(d,{mode:"visible",children:s});if((t.mode&It)===pt&&(y.lanes=u),y.return=t,y.sibling=null,g!==null){var E=t.deletions;E===null?(t.deletions=[g],t.flags|=_a):E.push(g)}return t.child=y,y}function Y7(e,t,s,u,d){var g=t.mode,y=e.child,E=y.sibling,_={mode:"hidden",children:s},O;if((g&It)===pt&&t.child!==y){var I=t.child;O=I,O.childLanes=Ae,O.pendingProps=_,t.mode&or&&(O.actualDuration=0,O.actualStartTime=-1,O.selfBaseDuration=y.selfBaseDuration,O.treeBaseDuration=y.treeBaseDuration),t.deletions=null}else O=uD(y,_),O.subtreeFlags=y.subtreeFlags&xn;var re;return E!==null?re=Wf(E,u):(re=Ec(u,g,d,null),re.flags|=Zr),re.return=t,O.return=t,O.sibling=re,t.child=O,re}function wy(e,t,s,u){u!==null&&RE(u),Rh(t,e.child,null,s);var d=t.pendingProps,g=d.children,y=WS(t,g);return y.flags|=Zr,t.memoizedState=null,y}function V7(e,t,s,u,d){var g=t.mode,y={mode:"visible",children:s},E=GS(y,g),_=Ec(u,g,d,null);return _.flags|=Zr,E.return=t,_.return=t,E.sibling=_,t.child=E,(t.mode&It)!==pt&&Rh(t,e.child,null,d),_}function W7(e,t,s){return(e.mode&It)===pt?(v("Cannot hydrate Suspense in legacy mode. Switch from ReactDOM.hydrate(element, container) to ReactDOMClient.hydrateRoot(container, <App />).render(element) or remove the Suspense components from the server rendered components."),e.lanes=Ct):dE(t)?e.lanes=di:e.lanes=Yi,null}function G7(e,t,s,u,d,g,y){if(s)if(t.flags&fi){t.flags&=~fi;var ie=BS(new Error("There was an error while hydrating this Suspense boundary. Switched to client rendering."));return wy(e,t,y,ie)}else{if(t.memoizedState!==null)return t.child=e.child,t.flags|=dt,null;var ye=u.children,ae=u.fallback,Be=V7(e,t,ye,ae,y),Je=t.child;return Je.memoizedState=VS(y),t.memoizedState=YS,Be}else{if(M5(),(t.mode&It)===pt)return wy(e,t,y,null);if(dE(d)){var E,_,O;{var I=Z3(d);E=I.digest,_=I.message,O=I.stack}var re;_?re=new Error(_):re=new Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.");var J=BS(re,E,O);return wy(e,t,y,J)}var ue=Vi(y,e.childLanes);if(po||ue){var de=By();if(de!==null){var me=np(de,y);if(me!==nr&&me!==g.retryLane){g.retryLane=me;var Ye=Nr;Ma(e,me),si(de,e,me,Ye)}}vC();var gt=BS(new Error("This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition."));return wy(e,t,y,gt)}else if(Ob(d)){t.flags|=dt,t.child=e.child;var ft=x9.bind(null,e);return J3(d,ft),null}else{$5(t,d,g.treeContext);var Kt=u.children,jt=WS(t,Kt);return jt.flags|=Ui,jt}}}function cD(e,t,s){e.lanes=Nt(e.lanes,t);var u=e.alternate;u!==null&&(u.lanes=Nt(u.lanes,t)),$E(e.return,t,s)}function K7(e,t,s){for(var u=t;u!==null;){if(u.tag===K){var d=u.memoizedState;d!==null&&cD(u,s,e)}else if(u.tag===F)cD(u,s,e);else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)return;for(;u.sibling===null;){if(u.return===null||u.return===e)return;u=u.return}u.sibling.return=u.return,u=u.sibling}}function Q7(e){for(var t=e,s=null;t!==null;){var u=t.alternate;u!==null&&ty(u)===null&&(s=t),t=t.sibling}return s}function X7(e){if(e!==void 0&&e!=="forwards"&&e!=="backwards"&&e!=="together"&&!US[e])if(US[e]=!0,typeof e=="string")switch(e.toLowerCase()){case"together":case"forwards":case"backwards":{v('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',e,e.toLowerCase());break}case"forward":case"backward":{v('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',e,e.toLowerCase());break}default:v('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',e);break}else v('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',e)}function Z7(e,t){e!==void 0&&!Cy[e]&&(e!=="collapsed"&&e!=="hidden"?(Cy[e]=!0,v('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',e)):t!=="forwards"&&t!=="backwards"&&(Cy[e]=!0,v('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',e)))}function fD(e,t){{var s=Mt(e),u=!s&&typeof Ot(e)=="function";if(s||u){var d=s?"array":"iterable";return v("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",d,t,d),!1}}return!0}function J7(e,t){if((t==="forwards"||t==="backwards")&&e!==void 0&&e!==null&&e!==!1)if(Mt(e)){for(var s=0;s<e.length;s++)if(!fD(e[s],s))return}else{var u=Ot(e);if(typeof u=="function"){var d=u.call(e);if(d)for(var g=d.next(),y=0;!g.done;g=d.next()){if(!fD(g.value,y))return;y++}}else v('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',t)}}function KS(e,t,s,u,d){var g=e.memoizedState;g===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:u,tail:s,tailMode:d}:(g.isBackwards=t,g.rendering=null,g.renderingStartTime=0,g.last=u,g.tail=s,g.tailMode=d)}function dD(e,t,s){var u=t.pendingProps,d=u.revealOrder,g=u.tail,y=u.children;X7(d),Z7(g,d),J7(y,d),ca(e,t,y,s);var E=co.current,_=WE(E,zp);if(_)E=GE(E,zp),t.flags|=dt;else{var O=e!==null&&(e.flags&dt)!==ht;O&&K7(t,t.child,s),E=Oh(E)}if(dc(t,E),(t.mode&It)===pt)t.memoizedState=null;else switch(d){case"forwards":{var I=Q7(t.child),re;I===null?(re=t.child,t.child=null):(re=I.sibling,I.sibling=null),KS(t,!1,re,I,g);break}case"backwards":{var J=null,ue=t.child;for(t.child=null;ue!==null;){var de=ue.alternate;if(de!==null&&ty(de)===null){t.child=ue;break}var me=ue.sibling;ue.sibling=J,J=ue,ue=me}KS(t,!0,J,null,g);break}case"together":{KS(t,!1,null,null,void 0);break}default:t.memoizedState=null}return t.child}function eF(e,t,s){qE(t,t.stateNode.containerInfo);var u=t.pendingProps;return e===null?t.child=Rh(t,null,u,s):ca(e,t,u,s),t.child}var hD=!1;function tF(e,t,s){var u=t.type,d=u._context,g=t.pendingProps,y=t.memoizedProps,E=g.value;{"value"in g||hD||(hD=!0,v("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"));var _=t.type.propTypes;_&&oo(_,g,"prop","Context.Provider")}if(a_(t,d,E),y!==null){var O=y.value;if(Oe(O,E)){if(y.children===g.children&&!Om())return lu(e,t,s)}else X5(t,d,s)}var I=g.children;return ca(e,t,I,s),t.child}var pD=!1;function rF(e,t,s){var u=t.type;u._context===void 0?u!==u.Consumer&&(pD||(pD=!0,v("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?"))):u=u._context;var d=t.pendingProps,g=d.children;typeof g!="function"&&v("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),kh(t,s);var y=zn(u);sa(t);var E;return Zp.current=t,On(!0),E=g(y),On(!1),oa(),t.flags|=Xa,ca(e,t,E,s),t.child}function tv(){po=!0}function by(e,t){(t.mode&It)===pt&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=Zr)}function lu(e,t,s){return e!==null&&(t.dependencies=e.dependencies),z_(),hv(t.lanes),Vi(s,t.childLanes)?(K5(e,t),t.child):null}function nF(e,t,s){{var u=t.return;if(u===null)throw new Error("Cannot swap the root fiber.");if(e.alternate=null,t.alternate=null,s.index=t.index,s.sibling=t.sibling,s.return=t.return,s.ref=t.ref,t===u.child)u.child=s;else{var d=u.child;if(d===null)throw new Error("Expected parent to have a child.");for(;d.sibling!==t;)if(d=d.sibling,d===null)throw new Error("Expected to find the previous sibling.");d.sibling=s}var g=u.deletions;return g===null?(u.deletions=[e],u.flags|=_a):g.push(e),s.flags|=Zr,s}}function QS(e,t){var s=e.lanes;return!!Vi(s,t)}function iF(e,t,s){switch(t.tag){case T:sD(t),t.stateNode,Th();break;case H:h_(t);break;case S:{var u=t.type;nl(u)&&Bm(t);break}case A:qE(t,t.stateNode.containerInfo);break;case B:{var d=t.memoizedProps.value,g=t.type._context;a_(t,g,d);break}case q:{var y=Vi(s,t.childLanes);y&&(t.flags|=Vt);{var E=t.stateNode;E.effectDuration=0,E.passiveEffectDuration=0}}break;case K:{var _=t.memoizedState;if(_!==null){if(_.dehydrated!==null)return dc(t,Oh(co.current)),t.flags|=dt,null;var O=t.child,I=O.childLanes;if(Vi(s,I))return lD(e,t,s);dc(t,Oh(co.current));var re=lu(e,t,s);return re!==null?re.sibling:null}else dc(t,Oh(co.current));break}case F:{var J=(e.flags&dt)!==ht,ue=Vi(s,t.childLanes);if(J){if(ue)return dD(e,t,s);t.flags|=dt}var de=t.memoizedState;if(de!==null&&(de.rendering=null,de.tail=null,de.lastEffect=null),dc(t,co.current),ue)break;return null}case M:case _e:return t.lanes=Ae,nD(e,t,s)}return lu(e,t,s)}function vD(e,t,s){if(t._debugNeedsRemount&&e!==null)return nF(e,t,DC(t.type,t.key,t.pendingProps,t._debugOwner||null,t.mode,t.lanes));if(e!==null){var u=e.memoizedProps,d=t.pendingProps;if(u!==d||Om()||t.type!==e.type)po=!0;else{var g=QS(e,s);if(!g&&(t.flags&dt)===ht)return po=!1,iF(e,t,s);(e.flags&Dd)!==ht?po=!0:po=!1}}else if(po=!1,_i()&&A5(t)){var y=t.index,E=k5();zb(t,E,y)}switch(t.lanes=Ae,t.tag){case b:return P7(e,t,t.type,s);case R:{var _=t.elementType;return I7(e,t,_,s)}case w:{var O=t.type,I=t.pendingProps,re=t.elementType===O?I:ho(O,I);return jS(e,t,O,re,s)}case S:{var J=t.type,ue=t.pendingProps,de=t.elementType===J?ue:ho(J,ue);return aD(e,t,J,de,s)}case T:return B7(e,t,s);case H:return M7(e,t,s);case P:return H7(e,t);case K:return lD(e,t,s);case A:return eF(e,t,s);case U:{var me=t.type,Ye=t.pendingProps,gt=t.elementType===me?Ye:ho(me,Ye);return eD(e,t,me,gt,s)}case j:return F7(e,t,s);case z:return O7(e,t,s);case q:return N7(e,t,s);case B:return tF(e,t,s);case N:return rF(e,t,s);case Z:{var ft=t.type,Kt=t.pendingProps,jt=ho(ft,Kt);if(t.type!==t.elementType){var ie=ft.propTypes;ie&&oo(ie,jt,"prop",Zt(ft))}return jt=ho(ft.type,jt),tD(e,t,ft,jt,s)}case ee:return rD(e,t,t.type,t.pendingProps,s);case Se:{var ye=t.type,ae=t.pendingProps,Be=t.elementType===ye?ae:ho(ye,ae);return $7(e,t,ye,Be,s)}case F:return dD(e,t,s);case L:break;case M:return nD(e,t,s)}throw new Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function $h(e){e.flags|=Vt}function gD(e){e.flags|=an,e.flags|=Yu}var mD,XS,yD,xD;mD=function(e,t,s,u){for(var d=t.child;d!==null;){if(d.tag===H||d.tag===P)D3(e,d.stateNode);else if(d.tag!==A){if(d.child!==null){d.child.return=d,d=d.child;continue}}if(d===t)return;for(;d.sibling===null;){if(d.return===null||d.return===t)return;d=d.return}d.sibling.return=d.return,d=d.sibling}},XS=function(e,t){},yD=function(e,t,s,u,d){var g=e.memoizedProps;if(g!==u){var y=t.stateNode,E=YE(),_=R3(y,s,g,u,d,E);t.updateQueue=_,_&&$h(t)}},xD=function(e,t,s,u){s!==u&&$h(t)};function rv(e,t){if(!_i())switch(e.tailMode){case"hidden":{for(var s=e.tail,u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?e.tail=null:u.sibling=null;break}case"collapsed":{for(var d=e.tail,g=null;d!==null;)d.alternate!==null&&(g=d),d=d.sibling;g===null?!t&&e.tail!==null?e.tail.sibling=null:e.tail=null:g.sibling=null;break}}}function Ti(e){var t=e.alternate!==null&&e.alternate.child===e.child,s=Ae,u=ht;if(t){if((e.mode&or)!==pt){for(var _=e.selfBaseDuration,O=e.child;O!==null;)s=Nt(s,Nt(O.lanes,O.childLanes)),u|=O.subtreeFlags&xn,u|=O.flags&xn,_+=O.treeBaseDuration,O=O.sibling;e.treeBaseDuration=_}else for(var I=e.child;I!==null;)s=Nt(s,Nt(I.lanes,I.childLanes)),u|=I.subtreeFlags&xn,u|=I.flags&xn,I.return=e,I=I.sibling;e.subtreeFlags|=u}else{if((e.mode&or)!==pt){for(var d=e.actualDuration,g=e.selfBaseDuration,y=e.child;y!==null;)s=Nt(s,Nt(y.lanes,y.childLanes)),u|=y.subtreeFlags,u|=y.flags,d+=y.actualDuration,g+=y.treeBaseDuration,y=y.sibling;e.actualDuration=d,e.treeBaseDuration=g}else for(var E=e.child;E!==null;)s=Nt(s,Nt(E.lanes,E.childLanes)),u|=E.subtreeFlags,u|=E.flags,E.return=e,E=E.sibling;e.subtreeFlags|=u}return e.childLanes=s,t}function aF(e,t,s){if(z5()&&(t.mode&It)!==pt&&(t.flags&dt)===ht)return Qb(t),Th(),t.flags|=fi|Kc|Pn,!1;var u=Pm(t);if(s!==null&&s.dehydrated!==null)if(e===null){if(!u)throw new Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(U5(t),Ti(t),(t.mode&or)!==pt){var d=s!==null;if(d){var g=t.child;g!==null&&(t.treeBaseDuration-=g.treeBaseDuration)}}return!1}else{if(Th(),(t.flags&dt)===ht&&(t.memoizedState=null),t.flags|=Vt,Ti(t),(t.mode&or)!==pt){var y=s!==null;if(y){var E=t.child;E!==null&&(t.treeBaseDuration-=E.treeBaseDuration)}}return!1}else return Xb(),!0}function ED(e,t,s){var u=t.pendingProps;switch(wE(t),t.tag){case b:case R:case ee:case w:case U:case j:case z:case q:case N:case Z:return Ti(t),null;case S:{var d=t.type;return nl(d)&&Nm(t),Ti(t),null}case T:{var g=t.stateNode;if(Fh(t),xE(t),QE(),g.pendingContext&&(g.context=g.pendingContext,g.pendingContext=null),e===null||e.child===null){var y=Pm(t);if(y)$h(t);else if(e!==null){var E=e.memoizedState;(!E.isDehydrated||(t.flags&fi)!==ht)&&(t.flags|=Nn,Xb())}}return XS(e,t),Ti(t),null}case H:{VE(t);var _=d_(),O=t.type;if(e!==null&&t.stateNode!=null)yD(e,t,O,u,_),e.ref!==t.ref&&gD(t);else{if(!u){if(t.stateNode===null)throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return Ti(t),null}var I=YE(),re=Pm(t);if(re)P5(t,_,I)&&$h(t);else{var J=_3(O,u,_,I,t);mD(J,t,!1,!1),t.stateNode=J,T3(J,O,u,_)&&$h(t)}t.ref!==null&&gD(t)}return Ti(t),null}case P:{var ue=u;if(e&&t.stateNode!=null){var de=e.memoizedProps;xD(e,t,de,ue)}else{if(typeof ue!="string"&&t.stateNode===null)throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");var me=d_(),Ye=YE(),gt=Pm(t);gt?L5(t)&&$h(t):t.stateNode=A3(ue,me,Ye,t)}return Ti(t),null}case K:{Nh(t);var ft=t.memoizedState;if(e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){var Kt=aF(e,t,ft);if(!Kt)return t.flags&Pn?t:null}if((t.flags&dt)!==ht)return t.lanes=s,(t.mode&or)!==pt&&SS(t),t;var jt=ft!==null,ie=e!==null&&e.memoizedState!==null;if(jt!==ie&&jt){var ye=t.child;if(ye.flags|=yn,(t.mode&It)!==pt){var ae=e===null&&(t.memoizedProps.unstable_avoidThisFallback!==!0||!0);ae||WE(co.current,v_)?s9():vC()}}var Be=t.updateQueue;if(Be!==null&&(t.flags|=Vt),Ti(t),(t.mode&or)!==pt&&jt){var Je=t.child;Je!==null&&(t.treeBaseDuration-=Je.treeBaseDuration)}return null}case A:return Fh(t),XS(e,t),e===null&&C5(t.stateNode.containerInfo),Ti(t),null;case B:var Ge=t.type._context;return IE(Ge,t),Ti(t),null;case Se:{var wt=t.type;return nl(wt)&&Nm(t),Ti(t),null}case F:{Nh(t);var kt=t.memoizedState;if(kt===null)return Ti(t),null;var kr=(t.flags&dt)!==ht,cr=kt.rendering;if(cr===null)if(kr)rv(kt,!1);else{var Hn=l9()&&(e===null||(e.flags&dt)===ht);if(!Hn)for(var fr=t.child;fr!==null;){var _n=ty(fr);if(_n!==null){kr=!0,t.flags|=dt,rv(kt,!1);var Ji=_n.updateQueue;return Ji!==null&&(t.updateQueue=Ji,t.flags|=Vt),t.subtreeFlags=ht,Q5(t,s),dc(t,GE(co.current,zp)),t.child}fr=fr.sibling}kt.tail!==null&&Bn()>UD()&&(t.flags|=dt,kr=!0,rv(kt,!1),t.lanes=G0)}else{if(!kr){var Oi=ty(cr);if(Oi!==null){t.flags|=dt,kr=!0;var is=Oi.updateQueue;if(is!==null&&(t.updateQueue=is,t.flags|=Vt),rv(kt,!0),kt.tail===null&&kt.tailMode==="hidden"&&!cr.alternate&&!_i())return Ti(t),null}else Bn()*2-kt.renderingStartTime>UD()&&s!==Yi&&(t.flags|=dt,kr=!0,rv(kt,!1),t.lanes=G0)}if(kt.isBackwards)cr.sibling=t.child,t.child=cr;else{var ha=kt.last;ha!==null?ha.sibling=cr:t.child=cr,kt.last=cr}}if(kt.tail!==null){var pa=kt.tail;kt.rendering=pa,kt.tail=pa.sibling,kt.renderingStartTime=Bn(),pa.sibling=null;var ea=co.current;return kr?ea=GE(ea,zp):ea=Oh(ea),dc(t,ea),pa}return Ti(t),null}case L:break;case M:case _e:{pC(t);var hu=t.memoizedState,Vh=hu!==null;if(e!==null){var yv=e.memoizedState,fl=yv!==null;fl!==Vh&&!De&&(t.flags|=yn)}return!Vh||(t.mode&It)===pt?Ti(t):Vi(cl,Yi)&&(Ti(t),t.subtreeFlags&(Zr|Vt)&&(t.flags|=yn)),null}case be:return null;case $e:return null}throw new Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function sF(e,t,s){switch(wE(t),t.tag){case S:{var u=t.type;nl(u)&&Nm(t);var d=t.flags;return d&Pn?(t.flags=d&~Pn|dt,(t.mode&or)!==pt&&SS(t),t):null}case T:{t.stateNode,Fh(t),xE(t),QE();var g=t.flags;return(g&Pn)!==ht&&(g&dt)===ht?(t.flags=g&~Pn|dt,t):null}case H:return VE(t),null;case K:{Nh(t);var y=t.memoizedState;if(y!==null&&y.dehydrated!==null){if(t.alternate===null)throw new Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");Th()}var E=t.flags;return E&Pn?(t.flags=E&~Pn|dt,(t.mode&or)!==pt&&SS(t),t):null}case F:return Nh(t),null;case A:return Fh(t),null;case B:var _=t.type._context;return IE(_,t),null;case M:case _e:return pC(t),null;case be:return null;default:return null}}function SD(e,t,s){switch(wE(t),t.tag){case S:{var u=t.type.childContextTypes;u!=null&&Nm(t);break}case T:{t.stateNode,Fh(t),xE(t),QE();break}case H:{VE(t);break}case A:Fh(t);break;case K:Nh(t);break;case F:Nh(t);break;case B:var d=t.type._context;IE(d,t);break;case M:case _e:pC(t);break}}var CD=null;CD=new Set;var _y=!1,Ri=!1,oF=typeof WeakSet=="function"?WeakSet:Set,lt=null,Ph=null,Lh=null;function lF(e){Po(null,function(){throw e}),Gc()}var uF=function(e,t){if(t.props=e.memoizedProps,t.state=e.memoizedState,e.mode&or)try{ll(),t.componentWillUnmount()}finally{ol(e)}else t.componentWillUnmount()};function wD(e,t){try{vc(ei,e)}catch(s){jr(e,t,s)}}function ZS(e,t,s){try{uF(e,s)}catch(u){jr(e,t,u)}}function cF(e,t,s){try{s.componentDidMount()}catch(u){jr(e,t,u)}}function bD(e,t){try{DD(e)}catch(s){jr(e,t,s)}}function Uh(e,t){var s=e.ref;if(s!==null)if(typeof s=="function"){var u;try{if(le&&tt&&e.mode&or)try{ll(),u=s(null)}finally{ol(e)}else u=s(null)}catch(d){jr(e,t,d)}typeof u=="function"&&v("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",Dt(e))}else s.current=null}function Dy(e,t,s){try{s()}catch(u){jr(e,t,u)}}var _D=!1;function fF(e,t){w3(e.containerInfo),lt=t,dF();var s=_D;return _D=!1,s}function dF(){for(;lt!==null;){var e=lt,t=e.child;(e.subtreeFlags&Uo)!==ht&&t!==null?(t.return=e,lt=t):hF()}}function hF(){for(;lt!==null;){var e=lt;_r(e);try{pF(e)}catch(s){jr(e,e.return,s)}Ur();var t=e.sibling;if(t!==null){t.return=e.return,lt=t;return}lt=e.return}}function pF(e){var t=e.alternate,s=e.flags;if((s&Nn)!==ht){switch(_r(e),e.tag){case w:case U:case ee:break;case S:{if(t!==null){var u=t.memoizedProps,d=t.memoizedState,g=e.stateNode;e.type===e.elementType&&!jf&&(g.props!==e.memoizedProps&&v("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",Dt(e)||"instance"),g.state!==e.memoizedState&&v("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",Dt(e)||"instance"));var y=g.getSnapshotBeforeUpdate(e.elementType===e.type?u:ho(e.type,u),d);{var E=CD;y===void 0&&!E.has(e.type)&&(E.add(e.type),v("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",Dt(e)))}g.__reactInternalSnapshotBeforeUpdate=y}break}case T:{{var _=e.stateNode;G3(_.containerInfo)}break}case H:case P:case A:case Se:break;default:throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}Ur()}}function vo(e,t,s){var u=t.updateQueue,d=u!==null?u.lastEffect:null;if(d!==null){var g=d.next,y=g;do{if((y.tag&e)===e){var E=y.destroy;y.destroy=void 0,E!==void 0&&((e&Di)!==Ha?to(t):(e&ei)!==Ha&&Xc(t),(e&il)!==Ha&&vv(!0),Dy(t,s,E),(e&il)!==Ha&&vv(!1),(e&Di)!==Ha?Yo():(e&ei)!==Ha&&V0())}y=y.next}while(y!==g)}}function vc(e,t){var s=t.updateQueue,u=s!==null?s.lastEffect:null;if(u!==null){var d=u.next,g=d;do{if((g.tag&e)===e){(e&Di)!==Ha?Y0(t):(e&ei)!==Ha&&Od(t);var y=g.create;(e&il)!==Ha&&vv(!0),g.destroy=y(),(e&il)!==Ha&&vv(!1),(e&Di)!==Ha?Fg():(e&ei)!==Ha&&Og();{var E=g.destroy;if(E!==void 0&&typeof E!="function"){var _=void 0;(g.tag&ei)!==ht?_="useLayoutEffect":(g.tag&il)!==ht?_="useInsertionEffect":_="useEffect";var O=void 0;E===null?O=" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof E.then=="function"?O=`
171
-
172
- It looks like you wrote `+_+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
173
-
174
- `+_+`(() => {
175
- async function fetchData() {
176
- // You can await here
177
- const response = await MyAPI.getData(someId);
178
- // ...
179
- }
180
- fetchData();
181
- }, [someId]); // Or [] if effect doesn't need props or state
182
-
183
- Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching`:O=" You returned: "+E,v("%s must not return anything besides a function, which is used for clean-up.%s",_,O)}}}g=g.next}while(g!==d)}}function vF(e,t){if((t.flags&Vt)!==ht)switch(t.tag){case q:{var s=t.stateNode.passiveEffectDuration,u=t.memoizedProps,d=u.id,g=u.onPostCommit,y=U_(),E=t.alternate===null?"mount":"update";L_()&&(E="nested-update"),typeof g=="function"&&g(d,E,s,y);var _=t.return;e:for(;_!==null;){switch(_.tag){case T:var O=_.stateNode;O.passiveEffectDuration+=s;break e;case q:var I=_.stateNode;I.passiveEffectDuration+=s;break e}_=_.return}break}}}function gF(e,t,s,u){if((s.flags&zo)!==ht)switch(s.tag){case w:case U:case ee:{if(!Ri)if(s.mode&or)try{ll(),vc(ei|Jn,s)}finally{ol(s)}else vc(ei|Jn,s);break}case S:{var d=s.stateNode;if(s.flags&Vt&&!Ri)if(t===null)if(s.type===s.elementType&&!jf&&(d.props!==s.memoizedProps&&v("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",Dt(s)||"instance"),d.state!==s.memoizedState&&v("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",Dt(s)||"instance")),s.mode&or)try{ll(),d.componentDidMount()}finally{ol(s)}else d.componentDidMount();else{var g=s.elementType===s.type?t.memoizedProps:ho(s.type,t.memoizedProps),y=t.memoizedState;if(s.type===s.elementType&&!jf&&(d.props!==s.memoizedProps&&v("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",Dt(s)||"instance"),d.state!==s.memoizedState&&v("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",Dt(s)||"instance")),s.mode&or)try{ll(),d.componentDidUpdate(g,y,d.__reactInternalSnapshotBeforeUpdate)}finally{ol(s)}else d.componentDidUpdate(g,y,d.__reactInternalSnapshotBeforeUpdate)}var E=s.updateQueue;E!==null&&(s.type===s.elementType&&!jf&&(d.props!==s.memoizedProps&&v("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",Dt(s)||"instance"),d.state!==s.memoizedState&&v("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",Dt(s)||"instance")),f_(s,E,d));break}case T:{var _=s.updateQueue;if(_!==null){var O=null;if(s.child!==null)switch(s.child.tag){case H:O=s.child.stateNode;break;case S:O=s.child.stateNode;break}f_(s,_,O)}break}case H:{var I=s.stateNode;if(t===null&&s.flags&Vt){var re=s.type,J=s.memoizedProps;B3(I,re,J)}break}case P:break;case A:break;case q:{{var ue=s.memoizedProps,de=ue.onCommit,me=ue.onRender,Ye=s.stateNode.effectDuration,gt=U_(),ft=t===null?"mount":"update";L_()&&(ft="nested-update"),typeof me=="function"&&me(s.memoizedProps.id,ft,s.actualDuration,s.treeBaseDuration,s.actualStartTime,gt);{typeof de=="function"&&de(s.memoizedProps.id,ft,Ye,gt),h9(s);var Kt=s.return;e:for(;Kt!==null;){switch(Kt.tag){case T:var jt=Kt.stateNode;jt.effectDuration+=Ye;break e;case q:var ie=Kt.stateNode;ie.effectDuration+=Ye;break e}Kt=Kt.return}}}break}case K:{bF(e,s);break}case F:case Se:case L:case M:case _e:case $e:break;default:throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}Ri||s.flags&an&&DD(s)}function mF(e){switch(e.tag){case w:case U:case ee:{if(e.mode&or)try{ll(),wD(e,e.return)}finally{ol(e)}else wD(e,e.return);break}case S:{var t=e.stateNode;typeof t.componentDidMount=="function"&&cF(e,e.return,t),bD(e,e.return);break}case H:{bD(e,e.return);break}}}function yF(e,t){for(var s=null,u=e;;){if(u.tag===H){if(s===null){s=u;try{var d=u.stateNode;t?q3(d):V3(u.stateNode,u.memoizedProps)}catch(y){jr(e,e.return,y)}}}else if(u.tag===P){if(s===null)try{var g=u.stateNode;t?Y3(g):W3(g,u.memoizedProps)}catch(y){jr(e,e.return,y)}}else if(!((u.tag===M||u.tag===_e)&&u.memoizedState!==null&&u!==e)){if(u.child!==null){u.child.return=u,u=u.child;continue}}if(u===e)return;for(;u.sibling===null;){if(u.return===null||u.return===e)return;s===u&&(s=null),u=u.return}s===u&&(s=null),u.sibling.return=u.return,u=u.sibling}}function DD(e){var t=e.ref;if(t!==null){var s=e.stateNode,u;switch(e.tag){case H:u=s;break;default:u=s}if(typeof t=="function"){var d;if(e.mode&or)try{ll(),d=t(u)}finally{ol(e)}else d=t(u);typeof d=="function"&&v("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",Dt(e))}else t.hasOwnProperty("current")||v("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",Dt(e)),t.current=u}}function xF(e){var t=e.alternate;t!==null&&(t.return=null),e.return=null}function TD(e){var t=e.alternate;t!==null&&(e.alternate=null,TD(t));{if(e.child=null,e.deletions=null,e.sibling=null,e.tag===H){var s=e.stateNode;s!==null&&_5(s)}e.stateNode=null,e._debugOwner=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}}function EF(e){for(var t=e.return;t!==null;){if(RD(t))return t;t=t.return}throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.")}function RD(e){return e.tag===H||e.tag===T||e.tag===A}function AD(e){var t=e;e:for(;;){for(;t.sibling===null;){if(t.return===null||RD(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==H&&t.tag!==P&&t.tag!==X;){if(t.flags&Zr||t.child===null||t.tag===A)continue e;t.child.return=t,t=t.child}if(!(t.flags&Zr))return t.stateNode}}function SF(e){var t=EF(e);switch(t.tag){case H:{var s=t.stateNode;t.flags&Da&&(Fb(s),t.flags&=~Da);var u=AD(e);eC(e,u,s);break}case T:case A:{var d=t.stateNode.containerInfo,g=AD(e);JS(e,g,d);break}default:throw new Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function JS(e,t,s){var u=e.tag,d=u===H||u===P;if(d){var g=e.stateNode;t?L3(s,g,t):$3(s,g)}else if(u!==A){var y=e.child;if(y!==null){JS(y,t,s);for(var E=y.sibling;E!==null;)JS(E,t,s),E=E.sibling}}}function eC(e,t,s){var u=e.tag,d=u===H||u===P;if(d){var g=e.stateNode;t?P3(s,g,t):I3(s,g)}else if(u!==A){var y=e.child;if(y!==null){eC(y,t,s);for(var E=y.sibling;E!==null;)eC(E,t,s),E=E.sibling}}}var Ai=null,go=!1;function CF(e,t,s){{var u=t;e:for(;u!==null;){switch(u.tag){case H:{Ai=u.stateNode,go=!1;break e}case T:{Ai=u.stateNode.containerInfo,go=!0;break e}case A:{Ai=u.stateNode.containerInfo,go=!0;break e}}u=u.return}if(Ai===null)throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");kD(e,t,s),Ai=null,go=!1}xF(s)}function gc(e,t,s){for(var u=s.child;u!==null;)kD(e,t,u),u=u.sibling}function kD(e,t,s){switch(j0(s),s.tag){case H:Ri||Uh(s,t);case P:{{var u=Ai,d=go;Ai=null,gc(e,t,s),Ai=u,go=d,Ai!==null&&(go?j3(Ai,s.stateNode):U3(Ai,s.stateNode))}return}case X:{Ai!==null&&(go?z3(Ai,s.stateNode):fE(Ai,s.stateNode));return}case A:{{var g=Ai,y=go;Ai=s.stateNode.containerInfo,go=!0,gc(e,t,s),Ai=g,go=y}return}case w:case U:case Z:case ee:{if(!Ri){var E=s.updateQueue;if(E!==null){var _=E.lastEffect;if(_!==null){var O=_.next,I=O;do{var re=I,J=re.destroy,ue=re.tag;J!==void 0&&((ue&il)!==Ha?Dy(s,t,J):(ue&ei)!==Ha&&(Xc(s),s.mode&or?(ll(),Dy(s,t,J),ol(s)):Dy(s,t,J),V0())),I=I.next}while(I!==O)}}}gc(e,t,s);return}case S:{if(!Ri){Uh(s,t);var de=s.stateNode;typeof de.componentWillUnmount=="function"&&ZS(s,t,de)}gc(e,t,s);return}case L:{gc(e,t,s);return}case M:{if(s.mode&It){var me=Ri;Ri=me||s.memoizedState!==null,gc(e,t,s),Ri=me}else gc(e,t,s);break}default:{gc(e,t,s);return}}}function wF(e){e.memoizedState}function bF(e,t){var s=t.memoizedState;if(s===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var g=d.dehydrated;g!==null&&l5(g)}}}}function FD(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var s=e.stateNode;s===null&&(s=e.stateNode=new oF),t.forEach(function(u){var d=E9.bind(null,e,u);if(!s.has(u)){if(s.add(u),qi)if(Ph!==null&&Lh!==null)pv(Lh,Ph);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");u.then(d,d)}})}}function _F(e,t,s){Ph=s,Lh=e,_r(t),OD(t,e),_r(t),Ph=null,Lh=null}function mo(e,t,s){var u=t.deletions;if(u!==null)for(var d=0;d<u.length;d++){var g=u[d];try{CF(e,t,g)}catch(_){jr(g,t,_)}}var y=Oo();if(t.subtreeFlags&jo)for(var E=t.child;E!==null;)_r(E),OD(E,e),E=E.sibling;_r(y)}function OD(e,t,s){var u=e.alternate,d=e.flags;switch(e.tag){case w:case U:case Z:case ee:{if(mo(t,e),ul(e),d&Vt){try{vo(il|Jn,e,e.return),vc(il|Jn,e)}catch(wt){jr(e,e.return,wt)}if(e.mode&or){try{ll(),vo(ei|Jn,e,e.return)}catch(wt){jr(e,e.return,wt)}ol(e)}else try{vo(ei|Jn,e,e.return)}catch(wt){jr(e,e.return,wt)}}return}case S:{mo(t,e),ul(e),d&an&&u!==null&&Uh(u,u.return);return}case H:{mo(t,e),ul(e),d&an&&u!==null&&Uh(u,u.return);{if(e.flags&Da){var g=e.stateNode;try{Fb(g)}catch(wt){jr(e,e.return,wt)}}if(d&Vt){var y=e.stateNode;if(y!=null){var E=e.memoizedProps,_=u!==null?u.memoizedProps:E,O=e.type,I=e.updateQueue;if(e.updateQueue=null,I!==null)try{M3(y,I,O,_,E,e)}catch(wt){jr(e,e.return,wt)}}}}return}case P:{if(mo(t,e),ul(e),d&Vt){if(e.stateNode===null)throw new Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");var re=e.stateNode,J=e.memoizedProps,ue=u!==null?u.memoizedProps:J;try{H3(re,ue,J)}catch(wt){jr(e,e.return,wt)}}return}case T:{if(mo(t,e),ul(e),d&Vt&&u!==null){var de=u.memoizedState;if(de.isDehydrated)try{o5(t.containerInfo)}catch(wt){jr(e,e.return,wt)}}return}case A:{mo(t,e),ul(e);return}case K:{mo(t,e),ul(e);var me=e.child;if(me.flags&yn){var Ye=me.stateNode,gt=me.memoizedState,ft=gt!==null;if(Ye.isHidden=ft,ft){var Kt=me.alternate!==null&&me.alternate.memoizedState!==null;Kt||a9()}}if(d&Vt){try{wF(e)}catch(wt){jr(e,e.return,wt)}FD(e)}return}case M:{var jt=u!==null&&u.memoizedState!==null;if(e.mode&It){var ie=Ri;Ri=ie||jt,mo(t,e),Ri=ie}else mo(t,e);if(ul(e),d&yn){var ye=e.stateNode,ae=e.memoizedState,Be=ae!==null,Je=e;if(ye.isHidden=Be,Be&&!jt&&(Je.mode&It)!==pt){lt=Je;for(var Ge=Je.child;Ge!==null;)lt=Ge,TF(Ge),Ge=Ge.sibling}yF(Je,Be)}return}case F:{mo(t,e),ul(e),d&Vt&&FD(e);return}case L:return;default:{mo(t,e),ul(e);return}}}function ul(e){var t=e.flags;if(t&Zr){try{SF(e)}catch(s){jr(e,e.return,s)}e.flags&=~Zr}t&Ui&&(e.flags&=~Ui)}function DF(e,t,s){Ph=s,Lh=t,lt=e,ND(e,t,s),Ph=null,Lh=null}function ND(e,t,s){for(var u=(e.mode&It)!==pt;lt!==null;){var d=lt,g=d.child;if(d.tag===M&&u){var y=d.memoizedState!==null,E=y||_y;if(E){tC(e,t,s);continue}else{var _=d.alternate,O=_!==null&&_.memoizedState!==null,I=O||Ri,re=_y,J=Ri;_y=E,Ri=I,Ri&&!J&&(lt=d,RF(d));for(var ue=g;ue!==null;)lt=ue,ND(ue,t,s),ue=ue.sibling;lt=d,_y=re,Ri=J,tC(e,t,s);continue}}(d.subtreeFlags&zo)!==ht&&g!==null?(g.return=d,lt=g):tC(e,t,s)}}function tC(e,t,s){for(;lt!==null;){var u=lt;if((u.flags&zo)!==ht){var d=u.alternate;_r(u);try{gF(t,d,u,s)}catch(y){jr(u,u.return,y)}Ur()}if(u===e){lt=null;return}var g=u.sibling;if(g!==null){g.return=u.return,lt=g;return}lt=u.return}}function TF(e){for(;lt!==null;){var t=lt,s=t.child;switch(t.tag){case w:case U:case Z:case ee:{if(t.mode&or)try{ll(),vo(ei,t,t.return)}finally{ol(t)}else vo(ei,t,t.return);break}case S:{Uh(t,t.return);var u=t.stateNode;typeof u.componentWillUnmount=="function"&&ZS(t,t.return,u);break}case H:{Uh(t,t.return);break}case M:{var d=t.memoizedState!==null;if(d){BD(e);continue}break}}s!==null?(s.return=t,lt=s):BD(e)}}function BD(e){for(;lt!==null;){var t=lt;if(t===e){lt=null;return}var s=t.sibling;if(s!==null){s.return=t.return,lt=s;return}lt=t.return}}function RF(e){for(;lt!==null;){var t=lt,s=t.child;if(t.tag===M){var u=t.memoizedState!==null;if(u){MD(e);continue}}s!==null?(s.return=t,lt=s):MD(e)}}function MD(e){for(;lt!==null;){var t=lt;_r(t);try{mF(t)}catch(u){jr(t,t.return,u)}if(Ur(),t===e){lt=null;return}var s=t.sibling;if(s!==null){s.return=t.return,lt=s;return}lt=t.return}}function AF(e,t,s,u){lt=t,kF(t,e,s,u)}function kF(e,t,s,u){for(;lt!==null;){var d=lt,g=d.child;(d.subtreeFlags&Js)!==ht&&g!==null?(g.return=d,lt=g):FF(e,t,s,u)}}function FF(e,t,s,u){for(;lt!==null;){var d=lt;if((d.flags&Li)!==ht){_r(d);try{OF(t,d,s,u)}catch(y){jr(d,d.return,y)}Ur()}if(d===e){lt=null;return}var g=d.sibling;if(g!==null){g.return=d.return,lt=g;return}lt=d.return}}function OF(e,t,s,u){switch(t.tag){case w:case U:case ee:{if(t.mode&or){ES();try{vc(Di|Jn,t)}finally{xS(t)}}else vc(Di|Jn,t);break}}}function NF(e){lt=e,BF()}function BF(){for(;lt!==null;){var e=lt,t=e.child;if((lt.flags&_a)!==ht){var s=e.deletions;if(s!==null){for(var u=0;u<s.length;u++){var d=s[u];lt=d,IF(d,e)}{var g=e.alternate;if(g!==null){var y=g.child;if(y!==null){g.child=null;do{var E=y.sibling;y.sibling=null,y=E}while(y!==null)}}}lt=e}}(e.subtreeFlags&Js)!==ht&&t!==null?(t.return=e,lt=t):MF()}}function MF(){for(;lt!==null;){var e=lt;(e.flags&Li)!==ht&&(_r(e),HF(e),Ur());var t=e.sibling;if(t!==null){t.return=e.return,lt=t;return}lt=e.return}}function HF(e){switch(e.tag){case w:case U:case ee:{e.mode&or?(ES(),vo(Di|Jn,e,e.return),xS(e)):vo(Di|Jn,e,e.return);break}}}function IF(e,t){for(;lt!==null;){var s=lt;_r(s),PF(s,t),Ur();var u=s.child;u!==null?(u.return=s,lt=u):$F(e)}}function $F(e){for(;lt!==null;){var t=lt,s=t.sibling,u=t.return;if(TD(t),t===e){lt=null;return}if(s!==null){s.return=u,lt=s;return}lt=u}}function PF(e,t){switch(e.tag){case w:case U:case ee:{e.mode&or?(ES(),vo(Di,e,t),xS(e)):vo(Di,e,t);break}}}function LF(e){switch(e.tag){case w:case U:case ee:{try{vc(ei|Jn,e)}catch(s){jr(e,e.return,s)}break}case S:{var t=e.stateNode;try{t.componentDidMount()}catch(s){jr(e,e.return,s)}break}}}function UF(e){switch(e.tag){case w:case U:case ee:{try{vc(Di|Jn,e)}catch(t){jr(e,e.return,t)}break}}}function jF(e){switch(e.tag){case w:case U:case ee:{try{vo(ei|Jn,e,e.return)}catch(s){jr(e,e.return,s)}break}case S:{var t=e.stateNode;typeof t.componentWillUnmount=="function"&&ZS(e,e.return,t);break}}}function zF(e){switch(e.tag){case w:case U:case ee:try{vo(Di|Jn,e,e.return)}catch(t){jr(e,e.return,t)}}}if(typeof Symbol=="function"&&Symbol.for){var nv=Symbol.for;nv("selector.component"),nv("selector.has_pseudo_class"),nv("selector.role"),nv("selector.test_id"),nv("selector.text")}var qF=[];function YF(){qF.forEach(function(e){return e()})}var VF=i.ReactCurrentActQueue;function WF(e){{var t=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0,s=typeof jest<"u";return s&&t!==!1}}function HD(){{var e=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return!e&&VF.current!==null&&v("The current testing environment is not configured to support act(...)"),e}}var GF=Math.ceil,rC=i.ReactCurrentDispatcher,nC=i.ReactCurrentOwner,ki=i.ReactCurrentBatchConfig,yo=i.ReactCurrentActQueue,ni=0,ID=1,Fi=2,Is=4,uu=0,iv=1,zf=2,Ty=3,av=4,$D=5,iC=6,Gt=ni,fa=null,pn=null,ii=Ae,cl=Ae,aC=sc(Ae),ai=uu,sv=null,Ry=Ae,ov=Ae,Ay=Ae,lv=null,Ia=null,sC=0,PD=500,LD=1/0,KF=500,cu=null;function uv(){LD=Bn()+KF}function UD(){return LD}var ky=!1,oC=null,jh=null,qf=!1,mc=null,cv=Ae,lC=[],uC=null,QF=50,fv=0,cC=null,fC=!1,Fy=!1,XF=50,zh=0,Oy=null,dv=Nr,Ny=Ae,jD=!1;function By(){return fa}function da(){return(Gt&(Fi|Is))!==ni?Bn():(dv!==Nr||(dv=Bn()),dv)}function yc(e){var t=e.mode;if((t&It)===pt)return Ct;if((Gt&Fi)!==ni&&ii!==Ae)return ff(ii);var s=V5()!==Y5;if(s){if(ki.transition!==null){var u=ki.transition;u._updatedFibers||(u._updatedFibers=new Set),u._updatedFibers.add(e)}return Ny===nr&&(Ny=ep()),Ny}var d=Oa();if(d!==nr)return d;var g=k3();return g}function ZF(e){var t=e.mode;return(t&It)===pt?Ct:$g()}function si(e,t,s,u){C9(),jD&&v("useInsertionEffect must not schedule updates."),fC&&(Fy=!0),Ku(e,s,u),(Gt&Fi)!==Ae&&e===fa?_9(t):(qi&&pf(e,t,s),D9(t),e===fa&&((Gt&Fi)===ni&&(ov=Nt(ov,s)),ai===av&&xc(e,ii)),$a(e,u),s===Ct&&Gt===ni&&(t.mode&It)===pt&&!yo.isBatchingLegacy&&(uv(),jb()))}function JF(e,t,s){var u=e.current;u.lanes=t,Ku(e,t,s),$a(e,s)}function e9(e){return(Gt&Fi)!==ni}function $a(e,t){var s=e.callbackNode;Zd(e,t);var u=Xd(e,e===fa?ii:Ae);if(u===Ae){s!==null&&iT(s),e.callbackNode=null,e.callbackPriority=nr;return}var d=Go(u),g=e.callbackPriority;if(g===d&&!(yo.current!==null&&s!==yC)){s==null&&g!==Ct&&v("Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.");return}s!=null&&iT(s);var y;if(d===Ct)e.tag===oc?(yo.isBatchingLegacy!==null&&(yo.didScheduleLegacyUpdate=!0),R5(YD.bind(null,e))):Ub(YD.bind(null,e)),yo.current!==null?yo.current.push(lc):O3(function(){(Gt&(Fi|Is))===ni&&lc()}),y=null;else{var E;switch(Yg(u)){case Ei:E=Qc;break;case Ts:E=qo;break;case ka:E=eo;break;case Fa:E=Il;break;default:E=eo;break}y=xC(E,zD.bind(null,e))}e.callbackPriority=d,e.callbackNode=y}function zD(e,t){if(y7(),dv=Nr,Ny=Ae,(Gt&(Fi|Is))!==ni)throw new Error("Should not already be working.");var s=e.callbackNode,u=du();if(u&&e.callbackNode!==s)return null;var d=Xd(e,e===fa?ii:Ae);if(d===Ae)return null;var g=!eh(e,d)&&!Ig(e,d)&&!t,y=g?c9(e,d):Hy(e,d);if(y!==uu){if(y===zf){var E=Jd(e);E!==Ae&&(d=E,y=dC(e,E))}if(y===iv){var _=sv;throw Yf(e,Ae),xc(e,d),$a(e,Bn()),_}if(y===iC)xc(e,d);else{var O=!eh(e,d),I=e.current.alternate;if(O&&!r9(I)){if(y=Hy(e,d),y===zf){var re=Jd(e);re!==Ae&&(d=re,y=dC(e,re))}if(y===iv){var J=sv;throw Yf(e,Ae),xc(e,d),$a(e,Bn()),J}}e.finishedWork=I,e.finishedLanes=d,t9(e,y,d)}}return $a(e,Bn()),e.callbackNode===s?zD.bind(null,e):null}function dC(e,t){var s=lv;if(nh(e)){var u=Yf(e,t);u.flags|=fi,S5(e.containerInfo)}var d=Hy(e,t);if(d!==zf){var g=Ia;Ia=s,g!==null&&qD(g)}return d}function qD(e){Ia===null?Ia=e:Ia.push.apply(Ia,e)}function t9(e,t,s){switch(t){case uu:case iv:throw new Error("Root did not complete. This is a bug in React.");case zf:{Vf(e,Ia,cu);break}case Ty:{if(xc(e,s),Gl(s)&&!aT()){var u=sC+PD-Bn();if(u>10){var d=Xd(e,Ae);if(d!==Ae)break;var g=e.suspendedLanes;if(!Kl(g,s)){da(),th(e,g);break}e.timeoutHandle=uE(Vf.bind(null,e,Ia,cu),u);break}}Vf(e,Ia,cu);break}case av:{if(xc(e,s),Z0(s))break;if(!aT()){var y=Ja(e,s),E=y,_=Bn()-E,O=S9(_)-_;if(O>10){e.timeoutHandle=uE(Vf.bind(null,e,Ia,cu),O);break}}Vf(e,Ia,cu);break}case $D:{Vf(e,Ia,cu);break}default:throw new Error("Unknown root exit status.")}}function r9(e){for(var t=e;;){if(t.flags&qu){var s=t.updateQueue;if(s!==null){var u=s.stores;if(u!==null)for(var d=0;d<u.length;d++){var g=u[d],y=g.getSnapshot,E=g.value;try{if(!Oe(y(),E))return!1}catch{return!1}}}}var _=t.child;if(t.subtreeFlags&qu&&_!==null){_.return=t,t=_;continue}if(t===e)return!0;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}return!0}function xc(e,t){t=df(t,Ay),t=df(t,ov),Ug(e,t)}function YD(e){if(x7(),(Gt&(Fi|Is))!==ni)throw new Error("Should not already be working.");du();var t=Xd(e,Ae);if(!Vi(t,Ct))return $a(e,Bn()),null;var s=Hy(e,t);if(e.tag!==oc&&s===zf){var u=Jd(e);u!==Ae&&(t=u,s=dC(e,u))}if(s===iv){var d=sv;throw Yf(e,Ae),xc(e,t),$a(e,Bn()),d}if(s===iC)throw new Error("Root did not complete. This is a bug in React.");var g=e.current.alternate;return e.finishedWork=g,e.finishedLanes=t,Vf(e,Ia,cu),$a(e,Bn()),null}function n9(e,t){t!==Ae&&(rh(e,Nt(t,Ct)),$a(e,Bn()),(Gt&(Fi|Is))===ni&&(uv(),lc()))}function hC(e,t){var s=Gt;Gt|=ID;try{return e(t)}finally{Gt=s,Gt===ni&&!yo.isBatchingLegacy&&(uv(),jb())}}function i9(e,t,s,u,d){var g=Oa(),y=ki.transition;try{return ki.transition=null,Cn(Ei),e(t,s,u,d)}finally{Cn(g),ki.transition=y,Gt===ni&&uv()}}function fu(e){mc!==null&&mc.tag===oc&&(Gt&(Fi|Is))===ni&&du();var t=Gt;Gt|=ID;var s=ki.transition,u=Oa();try{return ki.transition=null,Cn(Ei),e?e():void 0}finally{Cn(u),ki.transition=s,Gt=t,(Gt&(Fi|Is))===ni&&lc()}}function VD(){return(Gt&(Fi|Is))!==ni}function My(e,t){Xi(aC,cl,e),cl=Nt(cl,t)}function pC(e){cl=aC.current,Qi(aC,e)}function Yf(e,t){e.finishedWork=null,e.finishedLanes=Ae;var s=e.timeoutHandle;if(s!==cE&&(e.timeoutHandle=cE,F3(s)),pn!==null)for(var u=pn.return;u!==null;){var d=u.alternate;SD(d,u),u=u.return}fa=e;var g=Wf(e.current,null);return pn=g,ii=cl=t,ai=uu,sv=null,Ry=Ae,ov=Ae,Ay=Ae,lv=null,Ia=null,J5(),uo.discardPendingWarnings(),g}function WD(e,t){do{var s=pn;try{if(Ym(),m_(),Ur(),nC.current=null,s===null||s.return===null){ai=iv,sv=t,pn=null;return}if(le&&s.mode&or&&Ey(s,!0),he)if(oa(),t!==null&&typeof t=="object"&&typeof t.then=="function"){var u=t;Ds(s,u,ii)}else Zc(s,t,ii);R7(e,s.return,s,t,ii),XD(s)}catch(d){t=d,pn===s&&s!==null?(s=s.return,pn=s):s=pn;continue}return}while(!0)}function GD(){var e=rC.current;return rC.current=vy,e===null?vy:e}function KD(e){rC.current=e}function a9(){sC=Bn()}function hv(e){Ry=Nt(e,Ry)}function s9(){ai===uu&&(ai=Ty)}function vC(){(ai===uu||ai===Ty||ai===zf)&&(ai=av),fa!==null&&(cf(Ry)||cf(ov))&&xc(fa,ii)}function o9(e){ai!==av&&(ai=zf),lv===null?lv=[e]:lv.push(e)}function l9(){return ai===uu}function Hy(e,t){var s=Gt;Gt|=Fi;var u=GD();if(fa!==e||ii!==t){if(qi){var d=e.memoizedUpdaters;d.size>0&&(pv(e,ii),d.clear()),jg(e,t)}cu=ip(),Yf(e,t)}Ul(t);do try{u9();break}catch(g){WD(e,g)}while(!0);if(Ym(),Gt=s,KD(u),pn!==null)throw new Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return Nd(),fa=null,ii=Ae,ai}function u9(){for(;pn!==null;)QD(pn)}function c9(e,t){var s=Gt;Gt|=Fi;var u=GD();if(fa!==e||ii!==t){if(qi){var d=e.memoizedUpdaters;d.size>0&&(pv(e,ii),d.clear()),jg(e,t)}cu=ip(),uv(),Yf(e,t)}Ul(t);do try{f9();break}catch(g){WD(e,g)}while(!0);return Ym(),KD(u),Gt=s,pn!==null?(Ng(),uu):(Nd(),fa=null,ii=Ae,ai)}function f9(){for(;pn!==null&&!I0();)QD(pn)}function QD(e){var t=e.alternate;_r(e);var s;(e.mode&or)!==pt?(yS(e),s=gC(t,e,cl),Ey(e,!0)):s=gC(t,e,cl),Ur(),e.memoizedProps=e.pendingProps,s===null?XD(e):pn=s,nC.current=null}function XD(e){var t=e;do{var s=t.alternate,u=t.return;if((t.flags&Kc)===ht){_r(t);var d=void 0;if((t.mode&or)===pt?d=ED(s,t,cl):(yS(t),d=ED(s,t,cl),Ey(t,!1)),Ur(),d!==null){pn=d;return}}else{var g=sF(s,t);if(g!==null){g.flags&=Tg,pn=g;return}if((t.mode&or)!==pt){Ey(t,!1);for(var y=t.actualDuration,E=t.child;E!==null;)y+=E.actualDuration,E=E.sibling;t.actualDuration=y}if(u!==null)u.flags|=Kc,u.subtreeFlags=ht,u.deletions=null;else{ai=iC,pn=null;return}}var _=t.sibling;if(_!==null){pn=_;return}t=u,pn=t}while(t!==null);ai===uu&&(ai=$D)}function Vf(e,t,s){var u=Oa(),d=ki.transition;try{ki.transition=null,Cn(Ei),d9(e,t,s,u)}finally{ki.transition=d,Cn(u)}return null}function d9(e,t,s,u){do du();while(mc!==null);if(w9(),(Gt&(Fi|Is))!==ni)throw new Error("Should not already be working.");var d=e.finishedWork,g=e.finishedLanes;if(z0(g),d===null)return q0(),null;if(g===Ae&&v("root.finishedLanes should not be empty during a commit. This is a bug in React."),e.finishedWork=null,e.finishedLanes=Ae,d===e.current)throw new Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");e.callbackNode=null,e.callbackPriority=nr;var y=Nt(d.lanes,d.childLanes);rp(e,y),e===fa&&(fa=null,pn=null,ii=Ae),((d.subtreeFlags&Js)!==ht||(d.flags&Js)!==ht)&&(qf||(qf=!0,uC=s,xC(eo,function(){return du(),null})));var E=(d.subtreeFlags&(Uo|jo|zo|Js))!==ht,_=(d.flags&(Uo|jo|zo|Js))!==ht;if(E||_){var O=ki.transition;ki.transition=null;var I=Oa();Cn(Ei);var re=Gt;Gt|=Is,nC.current=null,fF(e,d),j_(),_F(e,d,g),b3(e.containerInfo),e.current=d,Jc(g),DF(d,e,g),ef(),$0(),Gt=re,Cn(I),ki.transition=O}else e.current=d,j_();var J=qf;if(qf?(qf=!1,mc=e,cv=g):(zh=0,Oy=null),y=e.pendingLanes,y===Ae&&(jh=null),J||tT(e.current,!1),L0(d.stateNode,u),qi&&e.memoizedUpdaters.clear(),YF(),$a(e,Bn()),t!==null)for(var ue=e.onRecoverableError,de=0;de<t.length;de++){var me=t[de],Ye=me.stack,gt=me.digest;ue(me.value,{componentStack:Ye,digest:gt})}if(ky){ky=!1;var ft=oC;throw oC=null,ft}return Vi(cv,Ct)&&e.tag!==oc&&du(),y=e.pendingLanes,Vi(y,Ct)?(m7(),e===cC?fv++:(fv=0,cC=e)):fv=0,lc(),q0(),null}function du(){if(mc!==null){var e=Yg(cv),t=gf(ka,e),s=ki.transition,u=Oa();try{return ki.transition=null,Cn(t),p9()}finally{Cn(u),ki.transition=s}}return!1}function h9(e){lC.push(e),qf||(qf=!0,xC(eo,function(){return du(),null}))}function p9(){if(mc===null)return!1;var e=uC;uC=null;var t=mc,s=cv;if(mc=null,cv=Ae,(Gt&(Fi|Is))!==ni)throw new Error("Cannot flush passive effects while already rendering.");fC=!0,Fy=!1,Ll(s);var u=Gt;Gt|=Is,NF(t.current),AF(t,t.current,s,e);{var d=lC;lC=[];for(var g=0;g<d.length;g++){var y=d[g];vF(t,y)}}W0(),tT(t.current,!0),Gt=u,lc(),Fy?t===Oy?zh++:(zh=0,Oy=t):zh=0,fC=!1,Fy=!1,U0(t);{var E=t.current.stateNode;E.effectDuration=0,E.passiveEffectDuration=0}return!0}function ZD(e){return jh!==null&&jh.has(e)}function v9(e){jh===null?jh=new Set([e]):jh.add(e)}function g9(e){ky||(ky=!0,oC=e)}var m9=g9;function JD(e,t,s){var u=Uf(s,t),d=Q_(e,u,Ct),g=cc(e,d,Ct),y=da();g!==null&&(Ku(g,Ct,y),$a(g,y))}function jr(e,t,s){if(lF(s),vv(!1),e.tag===T){JD(e,e,s);return}var u=null;for(u=t;u!==null;){if(u.tag===T){JD(u,e,s);return}else if(u.tag===S){var d=u.type,g=u.stateNode;if(typeof d.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&!ZD(g)){var y=Uf(s,e),E=HS(u,y,Ct),_=cc(u,E,Ct),O=da();_!==null&&(Ku(_,Ct,O),$a(_,O));return}}u=u.return}v(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Likely causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
184
-
185
- Error message:
186
-
187
- %s`,s)}function y9(e,t,s){var u=e.pingCache;u!==null&&u.delete(t);var d=da();th(e,s),T9(e),fa===e&&Kl(ii,s)&&(ai===av||ai===Ty&&Gl(ii)&&Bn()-sC<PD?Yf(e,Ae):Ay=Nt(Ay,s)),$a(e,d)}function eT(e,t){t===nr&&(t=ZF(e));var s=da(),u=Ma(e,t);u!==null&&(Ku(u,t,s),$a(u,s))}function x9(e){var t=e.memoizedState,s=nr;t!==null&&(s=t.retryLane),eT(e,s)}function E9(e,t){var s=nr,u;switch(e.tag){case K:u=e.stateNode;var d=e.memoizedState;d!==null&&(s=d.retryLane);break;case F:u=e.stateNode;break;default:throw new Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}u!==null&&u.delete(t),eT(e,s)}function S9(e){return e<120?120:e<480?480:e<1080?1080:e<1920?1920:e<3e3?3e3:e<4320?4320:GF(e/1960)*1960}function C9(){if(fv>QF)throw fv=0,cC=null,new Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");zh>XF&&(zh=0,Oy=null,v("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render."))}function w9(){uo.flushLegacyContextWarning(),uo.flushPendingUnsafeLifecycleWarnings()}function tT(e,t){_r(e),Iy(e,Lo,jF),t&&Iy(e,ws,zF),Iy(e,Lo,LF),t&&Iy(e,ws,UF),Ur()}function Iy(e,t,s){for(var u=e,d=null;u!==null;){var g=u.subtreeFlags&t;u!==d&&u.child!==null&&g!==ht?u=u.child:((u.flags&t)!==ht&&s(u),u.sibling!==null?u=u.sibling:u=d=u.return)}}var $y=null;function rT(e){{if((Gt&Fi)!==ni||!(e.mode&It))return;var t=e.tag;if(t!==b&&t!==T&&t!==S&&t!==w&&t!==U&&t!==Z&&t!==ee)return;var s=Dt(e)||"ReactComponent";if($y!==null){if($y.has(s))return;$y.add(s)}else $y=new Set([s]);var u=Gn;try{_r(e),v("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.")}finally{u?_r(e):Ur()}}}var gC;{var b9=null;gC=function(e,t,s){var u=cT(b9,t);try{return vD(e,t,s)}catch(g){if(H5()||g!==null&&typeof g=="object"&&typeof g.then=="function")throw g;if(Ym(),m_(),SD(e,t),cT(t,u),t.mode&or&&yS(t),Po(null,vD,null,e,t,s),Xs()){var d=Gc();typeof d=="object"&&d!==null&&d._suppressLogging&&typeof g=="object"&&g!==null&&!g._suppressLogging&&(g._suppressLogging=!0)}throw g}}}var nT=!1,mC;mC=new Set;function _9(e){if(gs&&!p7())switch(e.tag){case w:case U:case ee:{var t=pn&&Dt(pn)||"Unknown",s=t;if(!mC.has(s)){mC.add(s);var u=Dt(e)||"Unknown";v("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render",u,t,t)}break}case S:{nT||(v("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),nT=!0);break}}}function pv(e,t){if(qi){var s=e.memoizedUpdaters;s.forEach(function(u){pf(e,u,t)})}}var yC={};function xC(e,t){{var s=yo.current;return s!==null?(s.push(t),yC):H0(e,t)}}function iT(e){if(e!==yC)return Ag(e)}function aT(){return yo.current!==null}function D9(e){{if(e.mode&It){if(!HD())return}else if(!WF()||Gt!==ni||e.tag!==w&&e.tag!==U&&e.tag!==ee)return;if(yo.current===null){var t=Gn;try{_r(e),v(`An update to %s inside a test was not wrapped in act(...).
188
-
189
- When testing, code that causes React state updates should be wrapped into act(...):
190
-
191
- act(() => {
192
- /* fire events that update state */
193
- });
194
- /* assert on the output */
195
-
196
- This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`,Dt(e))}finally{t?_r(e):Ur()}}}}function T9(e){e.tag!==oc&&HD()&&yo.current===null&&v(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
197
-
198
- When testing, code that resolves suspended data should be wrapped into act(...):
199
-
200
- act(() => {
201
- /* finish loading suspended data */
202
- });
203
- /* assert on the output */
204
-
205
- This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`)}function vv(e){jD=e}var $s=null,qh=null,R9=function(e){$s=e};function Yh(e){{if($s===null)return e;var t=$s(e);return t===void 0?e:t.current}}function EC(e){return Yh(e)}function SC(e){{if($s===null)return e;var t=$s(e);if(t===void 0){if(e!=null&&typeof e.render=="function"){var s=Yh(e.render);if(e.render!==s){var u={$$typeof:Re,render:s};return e.displayName!==void 0&&(u.displayName=e.displayName),u}}return e}return t.current}}function sT(e,t){{if($s===null)return!1;var s=e.elementType,u=t.type,d=!1,g=typeof u=="object"&&u!==null?u.$$typeof:null;switch(e.tag){case S:{typeof u=="function"&&(d=!0);break}case w:{(typeof u=="function"||g===Tt)&&(d=!0);break}case U:{(g===Re||g===Tt)&&(d=!0);break}case Z:case ee:{(g===Ft||g===Tt)&&(d=!0);break}default:return!1}if(d){var y=$s(s);if(y!==void 0&&y===$s(u))return!0}return!1}}function oT(e){{if($s===null||typeof WeakSet!="function")return;qh===null&&(qh=new WeakSet),qh.add(e)}}var A9=function(e,t){{if($s===null)return;var s=t.staleFamilies,u=t.updatedFamilies;du(),fu(function(){CC(e.current,u,s)})}},k9=function(e,t){{if(e.context!==rs)return;du(),fu(function(){gv(t,e,null,null)})}};function CC(e,t,s){{var u=e.alternate,d=e.child,g=e.sibling,y=e.tag,E=e.type,_=null;switch(y){case w:case ee:case S:_=E;break;case U:_=E.render;break}if($s===null)throw new Error("Expected resolveFamily to be set during hot reload.");var O=!1,I=!1;if(_!==null){var re=$s(_);re!==void 0&&(s.has(re)?I=!0:t.has(re)&&(y===S?I=!0:O=!0))}if(qh!==null&&(qh.has(e)||u!==null&&qh.has(u))&&(I=!0),I&&(e._debugNeedsRemount=!0),I||O){var J=Ma(e,Ct);J!==null&&si(J,e,Ct,Nr)}d!==null&&!I&&CC(d,t,s),g!==null&&CC(g,t,s)}}var F9=function(e,t){{var s=new Set,u=new Set(t.map(function(d){return d.current}));return wC(e.current,u,s),s}};function wC(e,t,s){{var u=e.child,d=e.sibling,g=e.tag,y=e.type,E=null;switch(g){case w:case ee:case S:E=y;break;case U:E=y.render;break}var _=!1;E!==null&&t.has(E)&&(_=!0),_?O9(e,s):u!==null&&wC(u,t,s),d!==null&&wC(d,t,s)}}function O9(e,t){{var s=N9(e,t);if(s)return;for(var u=e;;){switch(u.tag){case H:t.add(u.stateNode);return;case A:t.add(u.stateNode.containerInfo);return;case T:t.add(u.stateNode.containerInfo);return}if(u.return===null)throw new Error("Expected to reach root first.");u=u.return}}}function N9(e,t){for(var s=e,u=!1;;){if(s.tag===H)u=!0,t.add(s.stateNode);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===e)return u;for(;s.sibling===null;){if(s.return===null||s.return===e)return u;s=s.return}s.sibling.return=s.return,s=s.sibling}return!1}var bC;{bC=!1;try{var lT=Object.preventExtensions({})}catch{bC=!0}}function B9(e,t,s,u){this.tag=e,this.key=s,this.elementType=null,this.type=null,this.stateNode=null,this.return=null,this.child=null,this.sibling=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.dependencies=null,this.mode=u,this.flags=ht,this.subtreeFlags=ht,this.deletions=null,this.lanes=Ae,this.childLanes=Ae,this.alternate=null,this.actualDuration=Number.NaN,this.actualStartTime=Number.NaN,this.selfBaseDuration=Number.NaN,this.treeBaseDuration=Number.NaN,this.actualDuration=0,this.actualStartTime=-1,this.selfBaseDuration=0,this.treeBaseDuration=0,this._debugSource=null,this._debugOwner=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,!bC&&typeof Object.preventExtensions=="function"&&Object.preventExtensions(this)}var ns=function(e,t,s,u){return new B9(e,t,s,u)};function _C(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function M9(e){return typeof e=="function"&&!_C(e)&&e.defaultProps===void 0}function H9(e){if(typeof e=="function")return _C(e)?S:w;if(e!=null){var t=e.$$typeof;if(t===Re)return U;if(t===Ft)return Z}return b}function Wf(e,t){var s=e.alternate;s===null?(s=ns(e.tag,t,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s._debugSource=e._debugSource,s._debugOwner=e._debugOwner,s._debugHookTypes=e._debugHookTypes,s.alternate=e,e.alternate=s):(s.pendingProps=t,s.type=e.type,s.flags=ht,s.subtreeFlags=ht,s.deletions=null,s.actualDuration=0,s.actualStartTime=-1),s.flags=e.flags&xn,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue;var u=e.dependencies;switch(s.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s.selfBaseDuration=e.selfBaseDuration,s.treeBaseDuration=e.treeBaseDuration,s._debugNeedsRemount=e._debugNeedsRemount,s.tag){case b:case w:case ee:s.type=Yh(e.type);break;case S:s.type=EC(e.type);break;case U:s.type=SC(e.type);break}return s}function I9(e,t){e.flags&=xn|Zr;var s=e.alternate;if(s===null)e.childLanes=Ae,e.lanes=t,e.child=null,e.subtreeFlags=ht,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null,e.selfBaseDuration=0,e.treeBaseDuration=0;else{e.childLanes=s.childLanes,e.lanes=s.lanes,e.child=s.child,e.subtreeFlags=ht,e.deletions=null,e.memoizedProps=s.memoizedProps,e.memoizedState=s.memoizedState,e.updateQueue=s.updateQueue,e.type=s.type;var u=s.dependencies;e.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},e.selfBaseDuration=s.selfBaseDuration,e.treeBaseDuration=s.treeBaseDuration}return e}function $9(e,t,s){var u;return e===Mm?(u=It,t===!0&&(u|=Rr,u|=lr)):u=pt,qi&&(u|=or),ns(T,null,null,u)}function DC(e,t,s,u,d,g){var y=b,E=e;if(typeof e=="function")_C(e)?(y=S,E=EC(E)):E=Yh(E);else if(typeof e=="string")y=H;else e:switch(e){case Fn:return Ec(s.children,d,g,t);case Ii:y=z,d|=Rr,(d&It)!==pt&&(d|=lr);break;case Ea:return P9(s,d,g,t);case ze:return L9(s,d,g,t);case rt:return U9(s,d,g,t);case ln:return uT(s,d,g,t);case Hr:case Pt:case Lr:case Wn:case Ht:default:{if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ps:y=B;break e;case W:y=N;break e;case Re:y=U,E=SC(E);break e;case Ft:y=Z;break e;case Tt:y=R,E=null;break e}var _="";{(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(_+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var O=u?Dt(u):null;O&&(_+=`
206
-
207
- Check the render method of \``+O+"`.")}throw new Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) "+("but got: "+(e==null?e:typeof e)+"."+_))}}var I=ns(y,s,t,d);return I.elementType=e,I.type=E,I.lanes=g,I._debugOwner=u,I}function TC(e,t,s){var u=null;u=e._owner;var d=e.type,g=e.key,y=e.props,E=DC(d,g,y,u,t,s);return E._debugSource=e._source,E._debugOwner=e._owner,E}function Ec(e,t,s,u){var d=ns(j,e,u,t);return d.lanes=s,d}function P9(e,t,s,u){typeof e.id!="string"&&v('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof e.id);var d=ns(q,e,u,t|or);return d.elementType=Ea,d.lanes=s,d.stateNode={effectDuration:0,passiveEffectDuration:0},d}function L9(e,t,s,u){var d=ns(K,e,u,t);return d.elementType=ze,d.lanes=s,d}function U9(e,t,s,u){var d=ns(F,e,u,t);return d.elementType=rt,d.lanes=s,d}function uT(e,t,s,u){var d=ns(M,e,u,t);d.elementType=ln,d.lanes=s;var g={isHidden:!1};return d.stateNode=g,d}function RC(e,t,s){var u=ns(P,e,null,t);return u.lanes=s,u}function j9(){var e=ns(H,null,null,pt);return e.elementType="DELETED",e}function z9(e){var t=ns(X,null,null,pt);return t.stateNode=e,t}function AC(e,t,s){var u=e.children!==null?e.children:[],d=ns(A,u,e.key,t);return d.lanes=s,d.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},d}function cT(e,t){return e===null&&(e=ns(b,null,null,pt)),e.tag=t.tag,e.key=t.key,e.elementType=t.elementType,e.type=t.type,e.stateNode=t.stateNode,e.return=t.return,e.child=t.child,e.sibling=t.sibling,e.index=t.index,e.ref=t.ref,e.pendingProps=t.pendingProps,e.memoizedProps=t.memoizedProps,e.updateQueue=t.updateQueue,e.memoizedState=t.memoizedState,e.dependencies=t.dependencies,e.mode=t.mode,e.flags=t.flags,e.subtreeFlags=t.subtreeFlags,e.deletions=t.deletions,e.lanes=t.lanes,e.childLanes=t.childLanes,e.alternate=t.alternate,e.actualDuration=t.actualDuration,e.actualStartTime=t.actualStartTime,e.selfBaseDuration=t.selfBaseDuration,e.treeBaseDuration=t.treeBaseDuration,e._debugSource=t._debugSource,e._debugOwner=t._debugOwner,e._debugNeedsRemount=t._debugNeedsRemount,e._debugHookTypes=t._debugHookTypes,e}function q9(e,t,s,u,d){this.tag=t,this.containerInfo=e,this.pendingChildren=null,this.current=null,this.pingCache=null,this.finishedWork=null,this.timeoutHandle=cE,this.context=null,this.pendingContext=null,this.callbackNode=null,this.callbackPriority=nr,this.eventTimes=hf(Ae),this.expirationTimes=hf(Nr),this.pendingLanes=Ae,this.suspendedLanes=Ae,this.pingedLanes=Ae,this.expiredLanes=Ae,this.mutableReadLanes=Ae,this.finishedLanes=Ae,this.entangledLanes=Ae,this.entanglements=hf(Ae),this.identifierPrefix=u,this.onRecoverableError=d,this.mutableSourceEagerHydrationData=null,this.effectDuration=0,this.passiveEffectDuration=0;{this.memoizedUpdaters=new Set;for(var g=this.pendingUpdatersLaneMap=[],y=0;y<jl;y++)g.push(new Set)}switch(t){case Mm:this._debugRootType=s?"hydrateRoot()":"createRoot()";break;case oc:this._debugRootType=s?"hydrate()":"render()";break}}function fT(e,t,s,u,d,g,y,E,_,O){var I=new q9(e,t,s,E,_),re=$9(t,g);I.current=re,re.stateNode=I;{var J={element:u,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null};re.memoizedState=J}return jE(re),I}var kC="18.3.1";function Y9(e,t,s){var u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;return nn(u),{$$typeof:hr,key:u==null?null:""+u,children:e,containerInfo:t,implementation:s}}var FC,OC;FC=!1,OC={};function dT(e){if(!e)return rs;var t=zu(e),s=T5(t);if(t.tag===S){var u=t.type;if(nl(u))return Pb(t,u,s)}return s}function V9(e,t){{var s=zu(e);if(s===void 0){if(typeof e.render=="function")throw new Error("Unable to find node on an unmounted component.");var u=Object.keys(e).join(",");throw new Error("Argument appears to not be a ReactComponent. Keys: "+u)}var d=ji(s);if(d===null)return null;if(d.mode&Rr){var g=Dt(s)||"Component";if(!OC[g]){OC[g]=!0;var y=Gn;try{_r(d),s.mode&Rr?v("%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",t,t,g):v("%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",t,t,g)}finally{y?_r(y):Ur()}}}return d.stateNode}}function hT(e,t,s,u,d,g,y,E){var _=!1,O=null;return fT(e,t,_,O,s,u,d,g,y)}function pT(e,t,s,u,d,g,y,E,_,O){var I=!0,re=fT(s,u,I,e,d,g,y,E,_);re.context=dT(null);var J=re.current,ue=da(),de=yc(J),me=ou(ue,de);return me.callback=t??null,cc(J,me,de),JF(re,de,ue),re}function gv(e,t,s,u){P0(t,e);var d=t.current,g=da(),y=yc(d);en(y);var E=dT(s);t.context===null?t.context=E:t.pendingContext=E,gs&&Gn!==null&&!FC&&(FC=!0,v(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
208
-
209
- Check the render method of %s.`,Dt(Gn)||"Unknown"));var _=ou(g,y);_.payload={element:e},u=u===void 0?null:u,u!==null&&(typeof u!="function"&&v("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",u),_.callback=u);var O=cc(d,_,y);return O!==null&&(si(O,d,y,g),Qm(O,d,y)),y}function Py(e){var t=e.current;if(!t.child)return null;switch(t.child.tag){case H:return t.child.stateNode;default:return t.child.stateNode}}function W9(e){switch(e.tag){case T:{var t=e.stateNode;if(nh(t)){var s=Mg(t);n9(t,s)}break}case K:{fu(function(){var d=Ma(e,Ct);if(d!==null){var g=da();si(d,e,Ct,g)}});var u=Ct;NC(e,u);break}}}function vT(e,t){var s=e.memoizedState;s!==null&&s.dehydrated!==null&&(s.retryLane=Lg(s.retryLane,t))}function NC(e,t){vT(e,t);var s=e.alternate;s&&vT(s,t)}function G9(e){if(e.tag===K){var t=of,s=Ma(e,t);if(s!==null){var u=da();si(s,e,t,u)}NC(e,t)}}function K9(e){if(e.tag===K){var t=yc(e),s=Ma(e,t);if(s!==null){var u=da();si(s,e,t,u)}NC(e,t)}}function gT(e){var t=Yr(e);return t===null?null:t.stateNode}var mT=function(e){return null};function Q9(e){return mT(e)}var yT=function(e){return!1};function X9(e){return yT(e)}var xT=null,ET=null,ST=null,CT=null,wT=null,bT=null,_T=null,DT=null,TT=null;{var RT=function(e,t,s){var u=t[s],d=Mt(e)?e.slice():Bt({},e);return s+1===t.length?(Mt(d)?d.splice(u,1):delete d[u],d):(d[u]=RT(e[u],t,s+1),d)},AT=function(e,t){return RT(e,t,0)},kT=function(e,t,s,u){var d=t[u],g=Mt(e)?e.slice():Bt({},e);if(u+1===t.length){var y=s[u];g[y]=g[d],Mt(g)?g.splice(d,1):delete g[d]}else g[d]=kT(e[d],t,s,u+1);return g},FT=function(e,t,s){if(t.length!==s.length){p("copyWithRename() expects paths of the same length");return}else for(var u=0;u<s.length-1;u++)if(t[u]!==s[u]){p("copyWithRename() expects paths to be the same except for the deepest key");return}return kT(e,t,s,0)},OT=function(e,t,s,u){if(s>=t.length)return u;var d=t[s],g=Mt(e)?e.slice():Bt({},e);return g[d]=OT(e[d],t,s+1,u),g},NT=function(e,t,s){return OT(e,t,0,s)},BC=function(e,t){for(var s=e.memoizedState;s!==null&&t>0;)s=s.next,t--;return s};xT=function(e,t,s,u){var d=BC(e,t);if(d!==null){var g=NT(d.memoizedState,s,u);d.memoizedState=g,d.baseState=g,e.memoizedProps=Bt({},e.memoizedProps);var y=Ma(e,Ct);y!==null&&si(y,e,Ct,Nr)}},ET=function(e,t,s){var u=BC(e,t);if(u!==null){var d=AT(u.memoizedState,s);u.memoizedState=d,u.baseState=d,e.memoizedProps=Bt({},e.memoizedProps);var g=Ma(e,Ct);g!==null&&si(g,e,Ct,Nr)}},ST=function(e,t,s,u){var d=BC(e,t);if(d!==null){var g=FT(d.memoizedState,s,u);d.memoizedState=g,d.baseState=g,e.memoizedProps=Bt({},e.memoizedProps);var y=Ma(e,Ct);y!==null&&si(y,e,Ct,Nr)}},CT=function(e,t,s){e.pendingProps=NT(e.memoizedProps,t,s),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var u=Ma(e,Ct);u!==null&&si(u,e,Ct,Nr)},wT=function(e,t){e.pendingProps=AT(e.memoizedProps,t),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var s=Ma(e,Ct);s!==null&&si(s,e,Ct,Nr)},bT=function(e,t,s){e.pendingProps=FT(e.memoizedProps,t,s),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var u=Ma(e,Ct);u!==null&&si(u,e,Ct,Nr)},_T=function(e){var t=Ma(e,Ct);t!==null&&si(t,e,Ct,Nr)},DT=function(e){mT=e},TT=function(e){yT=e}}function Z9(e){var t=ji(e);return t===null?null:t.stateNode}function J9(e){return null}function eO(){return Gn}function tO(e){var t=e.findFiberByHostInstance,s=i.ReactCurrentDispatcher;return Vu({bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:xT,overrideHookStateDeletePath:ET,overrideHookStateRenamePath:ST,overrideProps:CT,overridePropsDeletePath:wT,overridePropsRenamePath:bT,setErrorHandler:DT,setSuspenseHandler:TT,scheduleUpdate:_T,currentDispatcherRef:s,findHostInstanceByFiber:Z9,findFiberByHostInstance:t||J9,findHostInstancesForRefresh:F9,scheduleRefresh:A9,scheduleRoot:k9,setRefreshHandler:R9,getCurrentFiber:eO,reconcilerVersion:kC})}var BT=typeof reportError=="function"?reportError:function(e){console.error(e)};function MC(e){this._internalRoot=e}Ly.prototype.render=MC.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw new Error("Cannot update an unmounted root.");{typeof arguments[1]=="function"?v("render(...): does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):Uy(arguments[1])?v("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."):typeof arguments[1]<"u"&&v("You passed a second argument to root.render(...) but it only accepts one argument.");var s=t.containerInfo;if(s.nodeType!==mn){var u=gT(t.current);u&&u.parentNode!==s&&v("render(...): It looks like the React-rendered content of the root container was removed without using React. This is not supported and will cause errors. Instead, call root.unmount() to empty a root's container.")}}gv(e,t,null,null)},Ly.prototype.unmount=MC.prototype.unmount=function(){typeof arguments[0]=="function"&&v("unmount(...): does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().");var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;VD()&&v("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."),fu(function(){gv(null,e,null,null)}),Bb(t)}};function rO(e,t){if(!Uy(e))throw new Error("createRoot(...): Target container is not a DOM element.");MT(e);var s=!1,u=!1,d="",g=BT;t!=null&&(t.hydrate?p("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof t=="object"&&t!==null&&t.$$typeof===$n&&v(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
210
-
211
- let root = createRoot(domContainer);
212
- root.render(<App />);`),t.unstable_strictMode===!0&&(s=!0),t.identifierPrefix!==void 0&&(d=t.identifierPrefix),t.onRecoverableError!==void 0&&(g=t.onRecoverableError),t.transitionCallbacks!==void 0&&t.transitionCallbacks);var y=hT(e,Mm,null,s,u,d,g);Rm(y.current,e);var E=e.nodeType===mn?e.parentNode:e;return Cp(E),new MC(y)}function Ly(e){this._internalRoot=e}function nO(e){e&&Qg(e)}Ly.prototype.unstable_scheduleHydration=nO;function iO(e,t,s){if(!Uy(e))throw new Error("hydrateRoot(...): Target container is not a DOM element.");MT(e),t===void 0&&v("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var u=s??null,d=s!=null&&s.hydratedSources||null,g=!1,y=!1,E="",_=BT;s!=null&&(s.unstable_strictMode===!0&&(g=!0),s.identifierPrefix!==void 0&&(E=s.identifierPrefix),s.onRecoverableError!==void 0&&(_=s.onRecoverableError));var O=pT(t,null,e,Mm,u,g,y,E,_);if(Rm(O.current,e),Cp(e),d)for(var I=0;I<d.length;I++){var re=d[I];l7(O,re)}return new Ly(O)}function Uy(e){return!!(e&&(e.nodeType===Pi||e.nodeType===Qs||e.nodeType===b0))}function mv(e){return!!(e&&(e.nodeType===Pi||e.nodeType===Qs||e.nodeType===b0||e.nodeType===mn&&e.nodeValue===" react-mount-point-unstable "))}function MT(e){e.nodeType===Pi&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&v("createRoot(): Creating roots directly with document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try using a container element created for your app."),Np(e)&&(e._reactRootContainer?v("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):v("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}var aO=i.ReactCurrentOwner,HT;HT=function(e){if(e._reactRootContainer&&e.nodeType!==mn){var t=gT(e._reactRootContainer.current);t&&t.parentNode!==e&&v("render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.")}var s=!!e._reactRootContainer,u=HC(e),d=!!(u&&ac(u));d&&!s&&v("render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render."),e.nodeType===Pi&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&v("render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.")};function HC(e){return e?e.nodeType===Qs?e.documentElement:e.firstChild:null}function IT(){}function sO(e,t,s,u,d){if(d){if(typeof u=="function"){var g=u;u=function(){var J=Py(y);g.call(J)}}var y=pT(t,u,e,oc,null,!1,!1,"",IT);e._reactRootContainer=y,Rm(y.current,e);var E=e.nodeType===mn?e.parentNode:e;return Cp(E),fu(),y}else{for(var _;_=e.lastChild;)e.removeChild(_);if(typeof u=="function"){var O=u;u=function(){var J=Py(I);O.call(J)}}var I=hT(e,oc,null,!1,!1,"",IT);e._reactRootContainer=I,Rm(I.current,e);var re=e.nodeType===mn?e.parentNode:e;return Cp(re),fu(function(){gv(t,I,s,u)}),I}}function oO(e,t){e!==null&&typeof e!="function"&&v("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e)}function jy(e,t,s,u,d){HT(s),oO(d===void 0?null:d,"render");var g=s._reactRootContainer,y;if(!g)y=sO(s,t,e,d,u);else{if(y=g,typeof d=="function"){var E=d;d=function(){var _=Py(y);E.call(_)}}gv(t,y,e,d)}return Py(y)}var $T=!1;function lO(e){{$T||($T=!0,v("findDOMNode is deprecated and will be removed in the next major release. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node"));var t=aO.current;if(t!==null&&t.stateNode!==null){var s=t.stateNode._warnedAboutRefsInRender;s||v("%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",Zt(t.type)||"A component"),t.stateNode._warnedAboutRefsInRender=!0}}return e==null?null:e.nodeType===Pi?e:V9(e,"findDOMNode")}function uO(e,t,s){if(v("ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!mv(t))throw new Error("Target container is not a DOM element.");{var u=Np(t)&&t._reactRootContainer===void 0;u&&v("You are calling ReactDOM.hydrate() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call hydrateRoot(container, element)?")}return jy(null,e,t,!0,s)}function cO(e,t,s){if(v("ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!mv(t))throw new Error("Target container is not a DOM element.");{var u=Np(t)&&t._reactRootContainer===void 0;u&&v("You are calling ReactDOM.render() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.render(element)?")}return jy(null,e,t,!1,s)}function fO(e,t,s,u){if(v("ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported in React 18. Consider using a portal instead. Until you switch to the createRoot API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!mv(s))throw new Error("Target container is not a DOM element.");if(e==null||!N1(e))throw new Error("parentComponent must be a valid React Component");return jy(e,t,s,!1,u)}var PT=!1;function dO(e){if(PT||(PT=!0,v("unmountComponentAtNode is deprecated and will be removed in the next major release. Switch to the createRoot API. Learn more: https://reactjs.org/link/switch-to-createroot")),!mv(e))throw new Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var t=Np(e)&&e._reactRootContainer===void 0;t&&v("You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?")}if(e._reactRootContainer){{var s=HC(e),u=s&&!ac(s);u&&v("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return fu(function(){jy(null,null,e,!1,function(){e._reactRootContainer=null,Bb(e)})}),!0}else{{var d=HC(e),g=!!(d&&ac(d)),y=e.nodeType===Pi&&mv(e.parentNode)&&!!e.parentNode._reactRootContainer;g&&v("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",y?"You may have accidentally passed in a React root node instead of its container.":"Instead, have the parent component update its state and rerender in order to remove this component.")}return!1}}hi(W9),Qu(G9),Vg(K9),yf(Oa),ap(zg),(typeof Map!="function"||Map.prototype==null||typeof Map.prototype.forEach!="function"||typeof Set!="function"||Set.prototype==null||typeof Set.prototype.clear!="function"||typeof Set.prototype.forEach!="function")&&v("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),Ed(p3),O1(hC,i9,fu);function hO(e,t){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!Uy(t))throw new Error("Target container is not a DOM element.");return Y9(e,t,null,s)}function pO(e,t,s,u){return fO(e,t,s,u)}var IC={usingClientEntryPoint:!1,Events:[ac,Ch,Am,Pu,Sd,hC]};function vO(e,t){return IC.usingClientEntryPoint||v('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),rO(e,t)}function gO(e,t,s){return IC.usingClientEntryPoint||v('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),iO(e,t,s)}function mO(e){return VD()&&v("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."),fu(e)}var yO=tO({findFiberByHostInstance:Of,bundleType:1,version:kC,rendererPackageName:"react-dom"});if(!yO&&Sr&&window.top===window.self&&(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1)){var LT=window.location.protocol;/^(https?|file):$/.test(LT)&&console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools"+(LT==="file:"?`
213
- You might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq`:""),"font-weight:bold")}ga.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=IC,ga.createPortal=hO,ga.createRoot=vO,ga.findDOMNode=lO,ga.flushSync=mO,ga.hydrate=uO,ga.hydrateRoot=gO,ga.render=cO,ga.unmountComponentAtNode=dO,ga.unstable_batchedUpdates=hC,ga.unstable_renderSubtreeIntoContainer=pO,ga.version=kC,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),ga}function WC(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function")){if(process.env.NODE_ENV!=="production")throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(WC)}catch(o){console.error(o)}}}process.env.NODE_ENV==="production"?(WC(),Yy.exports=WT()):Yy.exports=GT();var Gh=Yy.exports,Gy={exports:{}},Kh={};/**
214
- * @license React
215
- * react-jsx-runtime.production.min.js
216
- *
217
- * Copyright (c) Facebook, Inc. and its affiliates.
218
- *
219
- * This source code is licensed under the MIT license found in the
220
- * LICENSE file in the root directory of this source tree.
221
- */var GC;function KT(){if(GC)return Kh;GC=1;var o=qt,r=Symbol.for("react.element"),i=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,f=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function v(C,w,S){var b,T={},A=null,H=null;S!==void 0&&(A=""+S),w.key!==void 0&&(A=""+w.key),w.ref!==void 0&&(H=w.ref);for(b in w)l.call(w,b)&&!p.hasOwnProperty(b)&&(T[b]=w[b]);if(C&&C.defaultProps)for(b in w=C.defaultProps,w)T[b]===void 0&&(T[b]=w[b]);return{$$typeof:r,type:C,key:A,ref:H,props:T,_owner:f.current}}return Kh.Fragment=i,Kh.jsx=v,Kh.jsxs=v,Kh}var Qh={};/**
222
- * @license React
223
- * react-jsx-runtime.development.js
224
- *
225
- * Copyright (c) Facebook, Inc. and its affiliates.
226
- *
227
- * This source code is licensed under the MIT license found in the
228
- * LICENSE file in the root directory of this source tree.
229
- */var KC;function QT(){return KC||(KC=1,process.env.NODE_ENV!=="production"&&function(){var o=qt,r=Symbol.for("react.element"),i=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),v=Symbol.for("react.provider"),C=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),H=Symbol.for("react.offscreen"),P=Symbol.iterator,j="@@iterator";function z(W){if(W===null||typeof W!="object")return null;var Re=P&&W[P]||W[j];return typeof Re=="function"?Re:null}var N=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function B(W){{for(var Re=arguments.length,ze=new Array(Re>1?Re-1:0),rt=1;rt<Re;rt++)ze[rt-1]=arguments[rt];U("error",W,ze)}}function U(W,Re,ze){{var rt=N.ReactDebugCurrentFrame,Ft=rt.getStackAddendum();Ft!==""&&(Re+="%s",ze=ze.concat([Ft]));var Tt=ze.map(function(Pt){return String(Pt)});Tt.unshift("Warning: "+Re),Function.prototype.apply.call(console[W],console,Tt)}}var q=!1,K=!1,Z=!1,ee=!1,R=!1,Se;Se=Symbol.for("react.module.reference");function X(W){return!!(typeof W=="string"||typeof W=="function"||W===l||W===p||R||W===f||W===S||W===b||ee||W===H||q||K||Z||typeof W=="object"&&W!==null&&(W.$$typeof===A||W.$$typeof===T||W.$$typeof===v||W.$$typeof===C||W.$$typeof===w||W.$$typeof===Se||W.getModuleId!==void 0))}function F(W,Re,ze){var rt=W.displayName;if(rt)return rt;var Ft=Re.displayName||Re.name||"";return Ft!==""?ze+"("+Ft+")":ze}function L(W){return W.displayName||"Context"}function M(W){if(W==null)return null;if(typeof W.tag=="number"&&B("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof W=="function")return W.displayName||W.name||null;if(typeof W=="string")return W;switch(W){case l:return"Fragment";case i:return"Portal";case p:return"Profiler";case f:return"StrictMode";case S:return"Suspense";case b:return"SuspenseList"}if(typeof W=="object")switch(W.$$typeof){case C:var Re=W;return L(Re)+".Consumer";case v:var ze=W;return L(ze._context)+".Provider";case w:return F(W,W.render,"ForwardRef");case T:var rt=W.displayName||null;return rt!==null?rt:M(W.type)||"Memo";case A:{var Ft=W,Tt=Ft._payload,Pt=Ft._init;try{return M(Pt(Tt))}catch{return null}}}return null}var _e=Object.assign,be=0,$e,ge,Ee,He,De,$,G;function he(){}he.__reactDisabledLog=!0;function le(){{if(be===0){$e=console.log,ge=console.info,Ee=console.warn,He=console.error,De=console.group,$=console.groupCollapsed,G=console.groupEnd;var W={configurable:!0,enumerable:!0,value:he,writable:!0};Object.defineProperties(console,{info:W,log:W,warn:W,error:W,group:W,groupCollapsed:W,groupEnd:W})}be++}}function tt(){{if(be--,be===0){var W={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:_e({},W,{value:$e}),info:_e({},W,{value:ge}),warn:_e({},W,{value:Ee}),error:_e({},W,{value:He}),group:_e({},W,{value:De}),groupCollapsed:_e({},W,{value:$}),groupEnd:_e({},W,{value:G})})}be<0&&B("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Ke=N.ReactCurrentDispatcher,ct;function Ce(W,Re,ze){{if(ct===void 0)try{throw Error()}catch(Ft){var rt=Ft.stack.trim().match(/\n( *(at )?)/);ct=rt&&rt[1]||""}return`
230
- `+ct+W}}var Te=!1,xt;{var Sr=typeof WeakMap=="function"?WeakMap:Map;xt=new Sr}function zr(W,Re){if(!W||Te)return"";{var ze=xt.get(W);if(ze!==void 0)return ze}var rt;Te=!0;var Ft=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Tt;Tt=Ke.current,Ke.current=null,le();try{if(Re){var Pt=function(){throw Error()};if(Object.defineProperty(Pt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Pt,[])}catch(Ot){rt=Ot}Reflect.construct(W,[],Pt)}else{try{Pt.call()}catch(Ot){rt=Ot}W.call(Pt.prototype)}}else{try{throw Error()}catch(Ot){rt=Ot}W()}}catch(Ot){if(Ot&&rt&&typeof Ot.stack=="string"){for(var Ht=Ot.stack.split(`
231
- `),ln=rt.stack.split(`
232
- `),Hr=Ht.length-1,Lr=ln.length-1;Hr>=1&&Lr>=0&&Ht[Hr]!==ln[Lr];)Lr--;for(;Hr>=1&&Lr>=0;Hr--,Lr--)if(Ht[Hr]!==ln[Lr]){if(Hr!==1||Lr!==1)do if(Hr--,Lr--,Lr<0||Ht[Hr]!==ln[Lr]){var Wn=`
233
- `+Ht[Hr].replace(" at new "," at ");return W.displayName&&Wn.includes("<anonymous>")&&(Wn=Wn.replace("<anonymous>",W.displayName)),typeof W=="function"&&xt.set(W,Wn),Wn}while(Hr>=1&&Lr>=0);break}}}finally{Te=!1,Ke.current=Tt,tt(),Error.prepareStackTrace=Ft}var za=W?W.displayName||W.name:"",qa=za?Ce(za):"";return typeof W=="function"&&xt.set(W,qa),qa}function Yt(W,Re,ze){return zr(W,!1)}function Xt(W){var Re=W.prototype;return!!(Re&&Re.isReactComponent)}function Fr(W,Re,ze){if(W==null)return"";if(typeof W=="function")return zr(W,Xt(W));if(typeof W=="string")return Ce(W);switch(W){case S:return Ce("Suspense");case b:return Ce("SuspenseList")}if(typeof W=="object")switch(W.$$typeof){case w:return Yt(W.render);case T:return Fr(W.type,Re,ze);case A:{var rt=W,Ft=rt._payload,Tt=rt._init;try{return Fr(Tt(Ft),Re,ze)}catch{}}}return""}var br=Object.prototype.hasOwnProperty,nn={},Rn=N.ReactDebugCurrentFrame;function vn(W){if(W){var Re=W._owner,ze=Fr(W.type,W._source,Re?Re.type:null);Rn.setExtraStackFrame(ze)}else Rn.setExtraStackFrame(null)}function qr(W,Re,ze,rt,Ft){{var Tt=Function.call.bind(br);for(var Pt in W)if(Tt(W,Pt)){var Ht=void 0;try{if(typeof W[Pt]!="function"){var ln=Error((rt||"React class")+": "+ze+" type `"+Pt+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof W[Pt]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ln.name="Invariant Violation",ln}Ht=W[Pt](Re,Pt,rt,ze,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Hr){Ht=Hr}Ht&&!(Ht instanceof Error)&&(vn(Ft),B("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",rt||"React class",ze,Pt,typeof Ht),vn(null)),Ht instanceof Error&&!(Ht.message in nn)&&(nn[Ht.message]=!0,vn(Ft),B("Failed %s type: %s",ze,Ht.message),vn(null))}}}var tr=Array.isArray;function ar(W){return tr(W)}function Pr(W){{var Re=typeof Symbol=="function"&&Symbol.toStringTag,ze=Re&&W[Symbol.toStringTag]||W.constructor.name||"Object";return ze}}function ci(W){try{return Kr(W),!1}catch{return!0}}function Kr(W){return""+W}function Qr(W){if(ci(W))return B("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Pr(W)),Kr(W)}var An=N.ReactCurrentOwner,ta={key:!0,ref:!0,__self:!0,__source:!0},ra,Pe;function it(W){if(br.call(W,"ref")){var Re=Object.getOwnPropertyDescriptor(W,"ref").get;if(Re&&Re.isReactWarning)return!1}return W.ref!==void 0}function _t(W){if(br.call(W,"key")){var Re=Object.getOwnPropertyDescriptor(W,"key").get;if(Re&&Re.isReactWarning)return!1}return W.key!==void 0}function rr(W,Re){typeof W.ref=="string"&&An.current}function Cr(W,Re){{var ze=function(){ra||(ra=!0,B("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",Re))};ze.isReactWarning=!0,Object.defineProperty(W,"key",{get:ze,configurable:!0})}}function Mr(W,Re){{var ze=function(){Pe||(Pe=!0,B("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",Re))};ze.isReactWarning=!0,Object.defineProperty(W,"ref",{get:ze,configurable:!0})}}var Or=function(W,Re,ze,rt,Ft,Tt,Pt){var Ht={$$typeof:r,type:W,key:Re,ref:ze,props:Pt,_owner:Tt};return Ht._store={},Object.defineProperty(Ht._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Ht,"_self",{configurable:!1,enumerable:!1,writable:!1,value:rt}),Object.defineProperty(Ht,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ft}),Object.freeze&&(Object.freeze(Ht.props),Object.freeze(Ht)),Ht};function gn(W,Re,ze,rt,Ft){{var Tt,Pt={},Ht=null,ln=null;ze!==void 0&&(Qr(ze),Ht=""+ze),_t(Re)&&(Qr(Re.key),Ht=""+Re.key),it(Re)&&(ln=Re.ref,rr(Re,Ft));for(Tt in Re)br.call(Re,Tt)&&!ta.hasOwnProperty(Tt)&&(Pt[Tt]=Re[Tt]);if(W&&W.defaultProps){var Hr=W.defaultProps;for(Tt in Hr)Pt[Tt]===void 0&&(Pt[Tt]=Hr[Tt])}if(Ht||ln){var Lr=typeof W=="function"?W.displayName||W.name||"Unknown":W;Ht&&Cr(Pt,Lr),ln&&Mr(Pt,Lr)}return Or(W,Ht,ln,Ft,rt,An.current,Pt)}}var wr=N.ReactCurrentOwner,mr=N.ReactDebugCurrentFrame;function dr(W){if(W){var Re=W._owner,ze=Fr(W.type,W._source,Re?Re.type:null);mr.setExtraStackFrame(ze)}else mr.setExtraStackFrame(null)}var gi;gi=!1;function kn(W){return typeof W=="object"&&W!==null&&W.$$typeof===r}function Hi(){{if(wr.current){var W=M(wr.current.type);if(W)return`
234
-
235
- Check the render method of \``+W+"`."}return""}}function ja(W){return""}var qs={};function cs(W){{var Re=Hi();if(!Re){var ze=typeof W=="string"?W:W.displayName||W.name;ze&&(Re=`
236
-
237
- Check the top-level render call using <`+ze+">.")}return Re}}function fs(W,Re){{if(!W._store||W._store.validated||W.key!=null)return;W._store.validated=!0;var ze=cs(Re);if(qs[ze])return;qs[ze]=!0;var rt="";W&&W._owner&&W._owner!==wr.current&&(rt=" It was passed a child from "+M(W._owner.type)+"."),dr(W),B('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ze,rt),dr(null)}}function ds(W,Re){{if(typeof W!="object")return;if(ar(W))for(var ze=0;ze<W.length;ze++){var rt=W[ze];kn(rt)&&fs(rt,Re)}else if(kn(W))W._store&&(W._store.validated=!0);else if(W){var Ft=z(W);if(typeof Ft=="function"&&Ft!==W.entries)for(var Tt=Ft.call(W),Pt;!(Pt=Tt.next()).done;)kn(Pt.value)&&fs(Pt.value,Re)}}}function hs(W){{var Re=W.type;if(Re==null||typeof Re=="string")return;var ze;if(typeof Re=="function")ze=Re.propTypes;else if(typeof Re=="object"&&(Re.$$typeof===w||Re.$$typeof===T))ze=Re.propTypes;else return;if(ze){var rt=M(Re);qr(ze,W.props,"prop",rt,W)}else if(Re.PropTypes!==void 0&&!gi){gi=!0;var Ft=M(Re);B("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ft||"Unknown")}typeof Re.getDefaultProps=="function"&&!Re.getDefaultProps.isReactClassApproved&&B("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Vn(W){{for(var Re=Object.keys(W.props),ze=0;ze<Re.length;ze++){var rt=Re[ze];if(rt!=="children"&&rt!=="key"){dr(W),B("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",rt),dr(null);break}}W.ref!==null&&(dr(W),B("Invalid attribute `ref` supplied to `React.Fragment`."),dr(null))}}var $n={};function hr(W,Re,ze,rt,Ft,Tt){{var Pt=X(W);if(!Pt){var Ht="";(W===void 0||typeof W=="object"&&W!==null&&Object.keys(W).length===0)&&(Ht+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ln=ja();ln?Ht+=ln:Ht+=Hi();var Hr;W===null?Hr="null":ar(W)?Hr="array":W!==void 0&&W.$$typeof===r?(Hr="<"+(M(W.type)||"Unknown")+" />",Ht=" Did you accidentally export a JSX literal instead of a component?"):Hr=typeof W,B("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Hr,Ht)}var Lr=gn(W,Re,ze,Ft,Tt);if(Lr==null)return Lr;if(Pt){var Wn=Re.children;if(Wn!==void 0)if(rt)if(ar(Wn)){for(var za=0;za<Wn.length;za++)ds(Wn[za],W);Object.freeze&&Object.freeze(Wn)}else B("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ds(Wn,W)}if(br.call(Re,"key")){var qa=M(W),Ot=Object.keys(Re).filter(function(wl){return wl!=="key"}),Bt=Ot.length>0?"{key: someKey, "+Ot.join(": ..., ")+": ...}":"{key: someKey}";if(!$n[qa+Bt]){var Ya=Ot.length>0?"{"+Ot.join(": ..., ")+": ...}":"{}";B(`A props object containing a "key" prop is being spread into JSX:
238
- let props = %s;
239
- <%s {...props} />
240
- React keys must be passed directly to JSX without using spread:
241
- let props = %s;
242
- <%s key={someKey} {...props} />`,Bt,qa,Ya,qa),$n[qa+Bt]=!0}}return W===l?Vn(Lr):hs(Lr),Lr}}function Fn(W,Re,ze){return hr(W,Re,ze,!0)}function Ii(W,Re,ze){return hr(W,Re,ze,!1)}var Ea=Ii,ps=Fn;Qh.Fragment=l,Qh.jsx=Ea,Qh.jsxs=ps}()),Qh}process.env.NODE_ENV==="production"?Gy.exports=KT():Gy.exports=QT();var se=Gy.exports;/**
243
- * @license lucide-react v0.344.0 - ISC
244
- *
245
- * This source code is licensed under the ISC license.
246
- * See the LICENSE file in the root directory of this source tree.
247
- */var XT={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
248
- * @license lucide-react v0.344.0 - ISC
249
- *
250
- * This source code is licensed under the ISC license.
251
- * See the LICENSE file in the root directory of this source tree.
252
- */const ZT=o=>o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),Ni=(o,r)=>{const i=qt.forwardRef(({color:l="currentColor",size:f=24,strokeWidth:p=2,absoluteStrokeWidth:v,className:C="",children:w,...S},b)=>qt.createElement("svg",{ref:b,...XT,width:f,height:f,stroke:l,strokeWidth:v?Number(p)*24/Number(f):p,className:["lucide",`lucide-${ZT(o)}`,C].join(" "),...S},[...r.map(([T,A])=>qt.createElement(T,A)),...Array.isArray(w)?w:[w]]));return i.displayName=`${o}`,i};/**
253
- * @license lucide-react v0.344.0 - ISC
254
- *
255
- * This source code is licensed under the ISC license.
256
- * See the LICENSE file in the root directory of this source tree.
257
- */const JT=Ni("AlertCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
258
- * @license lucide-react v0.344.0 - ISC
259
- *
260
- * This source code is licensed under the ISC license.
261
- * See the LICENSE file in the root directory of this source tree.
262
- */const QC=Ni("CheckCircle2",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
263
- * @license lucide-react v0.344.0 - ISC
264
- *
265
- * This source code is licensed under the ISC license.
266
- * See the LICENSE file in the root directory of this source tree.
267
- */const eR=Ni("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
268
- * @license lucide-react v0.344.0 - ISC
269
- *
270
- * This source code is licensed under the ISC license.
271
- * See the LICENSE file in the root directory of this source tree.
272
- */const tR=Ni("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
273
- * @license lucide-react v0.344.0 - ISC
274
- *
275
- * This source code is licensed under the ISC license.
276
- * See the LICENSE file in the root directory of this source tree.
277
- */const XC=Ni("Coffee",[["path",{d:"M17 8h1a4 4 0 1 1 0 8h-1",key:"jx4kbh"}],["path",{d:"M3 8h14v9a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4Z",key:"1bxrl0"}],["line",{x1:"6",x2:"6",y1:"2",y2:"4",key:"1cr9l3"}],["line",{x1:"10",x2:"10",y1:"2",y2:"4",key:"170wym"}],["line",{x1:"14",x2:"14",y1:"2",y2:"4",key:"1c5f70"}]]);/**
278
- * @license lucide-react v0.344.0 - ISC
279
- *
280
- * This source code is licensed under the ISC license.
281
- * See the LICENSE file in the root directory of this source tree.
282
- */const rR=Ni("Delete",[["path",{d:"M20 5H9l-7 7 7 7h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2Z",key:"1oy587"}],["line",{x1:"18",x2:"12",y1:"9",y2:"15",key:"1olkx5"}],["line",{x1:"12",x2:"18",y1:"9",y2:"15",key:"1n50pc"}]]);/**
283
- * @license lucide-react v0.344.0 - ISC
284
- *
285
- * This source code is licensed under the ISC license.
286
- * See the LICENSE file in the root directory of this source tree.
287
- */const nR=Ni("Grid3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
288
- * @license lucide-react v0.344.0 - ISC
289
- *
290
- * This source code is licensed under the ISC license.
291
- * See the LICENSE file in the root directory of this source tree.
292
- */const iR=Ni("MicOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2",key:"80xlxr"}],["path",{d:"M5 10v2a7 7 0 0 0 12 5",key:"p2k8kg"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
293
- * @license lucide-react v0.344.0 - ISC
294
- *
295
- * This source code is licensed under the ISC license.
296
- * See the LICENSE file in the root directory of this source tree.
297
- */const aR=Ni("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
298
- * @license lucide-react v0.344.0 - ISC
299
- *
300
- * This source code is licensed under the ISC license.
301
- * See the LICENSE file in the root directory of this source tree.
302
- */const ZC=Ni("Pause",[["rect",{width:"4",height:"16",x:"6",y:"4",key:"iffhe4"}],["rect",{width:"4",height:"16",x:"14",y:"4",key:"sjin7j"}]]);/**
303
- * @license lucide-react v0.344.0 - ISC
304
- *
305
- * This source code is licensed under the ISC license.
306
- * See the LICENSE file in the root directory of this source tree.
307
- */const sR=Ni("PhoneCall",[["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",key:"foiqr5"}],["path",{d:"M14.05 2a9 9 0 0 1 8 7.94",key:"vmijpz"}],["path",{d:"M14.05 6A5 5 0 0 1 18 10",key:"13nbpp"}]]);/**
308
- * @license lucide-react v0.344.0 - ISC
309
- *
310
- * This source code is licensed under the ISC license.
311
- * See the LICENSE file in the root directory of this source tree.
312
- */const Ev=Ni("PhoneOff",[["path",{d:"M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 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.91",key:"z86iuo"}],["line",{x1:"22",x2:"2",y1:"2",y2:"22",key:"11kh81"}]]);/**
313
- * @license lucide-react v0.344.0 - ISC
314
- *
315
- * This source code is licensed under the ISC license.
316
- * See the LICENSE file in the root directory of this source tree.
317
- */const Xh=Ni("Phone",[["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",key:"foiqr5"}]]);/**
318
- * @license lucide-react v0.344.0 - ISC
319
- *
320
- * This source code is licensed under the ISC license.
321
- * See the LICENSE file in the root directory of this source tree.
322
- */const oR=Ni("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]);/**
323
- * @license lucide-react v0.344.0 - ISC
324
- *
325
- * This source code is licensed under the ISC license.
326
- * See the LICENSE file in the root directory of this source tree.
327
- */const JC=Ni("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
328
- * @license lucide-react v0.344.0 - ISC
329
- *
330
- * This source code is licensed under the ISC license.
331
- * See the LICENSE file in the root directory of this source tree.
332
- */const lR=Ni("XCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),uR=[{n:"1",l:""},{n:"2",l:"ABC"},{n:"3",l:"DEF"},{n:"4",l:"GHI"},{n:"5",l:"JKL"},{n:"6",l:"MNO"},{n:"7",l:"PQRS"},{n:"8",l:"TUV"},{n:"9",l:"WXYZ"},{n:"*",l:""},{n:"0",l:"+"},{n:"#",l:""}],e2=({onKeyPress:o})=>se.jsx("div",{className:"grid grid-cols-3 gap-2.5 w-full px-5 py-2",children:uR.map(({n:r,l:i})=>se.jsxs("button",{onClick:()=>o(r),className:`
333
- relative flex flex-col items-center justify-center
334
- h-16 rounded-2xl select-none
335
- bg-white border border-gray-100
336
- shadow-[0_2px_6px_rgba(0,0,0,0.07)]
337
- hover:shadow-[0_4px_12px_rgba(63,49,146,0.13)]
338
- hover:border-primary/20 hover:bg-primary/5
339
- active:shadow-none active:bg-primary/10 active:scale-95
340
- transition-all duration-150
341
- `,children:[se.jsx("span",{className:"text-[22px] font-medium text-gray-800 leading-none",children:r}),i?se.jsx("span",{className:"text-[9px] text-gray-400 font-semibold tracking-[0.18em] mt-1.5",children:i}):se.jsx("span",{className:"h-3.5"})]},r))});class cR{constructor(){this.listeners={}}on(r,i){return this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push(i),()=>this.off(r,i)}off(r,i){this.listeners[r]&&(this.listeners[r]=this.listeners[r].filter(l=>l!==i))}emitLocal(r,i){this.listeners[r]&&this.listeners[r].forEach(l=>{try{l(i)}catch(f){console.error(`Error in event listener for ${r}:`,f)}})}emitToParent(r,i){this.emitLocal(r,i)}}const Ze=new cR;var t2={exports:{}};function fR(o){throw new Error('Could not dynamically require "'+o+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ky={exports:{}};const dR=UT(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var r2;function er(){return r2||(r2=1,function(o,r){(function(i,l){o.exports=l()})(Ut,function(){var i=i||function(l,f){var p;if(typeof window<"u"&&window.crypto&&(p=window.crypto),typeof self<"u"&&self.crypto&&(p=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(p=globalThis.crypto),!p&&typeof window<"u"&&window.msCrypto&&(p=window.msCrypto),!p&&typeof Ut<"u"&&Ut.crypto&&(p=Ut.crypto),!p&&typeof fR=="function")try{p=dR}catch{}var v=function(){if(p){if(typeof p.getRandomValues=="function")try{return p.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof p.randomBytes=="function")try{return p.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},C=Object.create||function(){function B(){}return function(U){var q;return B.prototype=U,q=new B,B.prototype=null,q}}(),w={},S=w.lib={},b=S.Base=function(){return{extend:function(B){var U=C(this);return B&&U.mixIn(B),(!U.hasOwnProperty("init")||this.init===U.init)&&(U.init=function(){U.$super.init.apply(this,arguments)}),U.init.prototype=U,U.$super=this,U},create:function(){var B=this.extend();return B.init.apply(B,arguments),B},init:function(){},mixIn:function(B){for(var U in B)B.hasOwnProperty(U)&&(this[U]=B[U]);B.hasOwnProperty("toString")&&(this.toString=B.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),T=S.WordArray=b.extend({init:function(B,U){B=this.words=B||[],U!=f?this.sigBytes=U:this.sigBytes=B.length*4},toString:function(B){return(B||H).stringify(this)},concat:function(B){var U=this.words,q=B.words,K=this.sigBytes,Z=B.sigBytes;if(this.clamp(),K%4)for(var ee=0;ee<Z;ee++){var R=q[ee>>>2]>>>24-ee%4*8&255;U[K+ee>>>2]|=R<<24-(K+ee)%4*8}else for(var Se=0;Se<Z;Se+=4)U[K+Se>>>2]=q[Se>>>2];return this.sigBytes+=Z,this},clamp:function(){var B=this.words,U=this.sigBytes;B[U>>>2]&=4294967295<<32-U%4*8,B.length=l.ceil(U/4)},clone:function(){var B=b.clone.call(this);return B.words=this.words.slice(0),B},random:function(B){for(var U=[],q=0;q<B;q+=4)U.push(v());return new T.init(U,B)}}),A=w.enc={},H=A.Hex={stringify:function(B){for(var U=B.words,q=B.sigBytes,K=[],Z=0;Z<q;Z++){var ee=U[Z>>>2]>>>24-Z%4*8&255;K.push((ee>>>4).toString(16)),K.push((ee&15).toString(16))}return K.join("")},parse:function(B){for(var U=B.length,q=[],K=0;K<U;K+=2)q[K>>>3]|=parseInt(B.substr(K,2),16)<<24-K%8*4;return new T.init(q,U/2)}},P=A.Latin1={stringify:function(B){for(var U=B.words,q=B.sigBytes,K=[],Z=0;Z<q;Z++){var ee=U[Z>>>2]>>>24-Z%4*8&255;K.push(String.fromCharCode(ee))}return K.join("")},parse:function(B){for(var U=B.length,q=[],K=0;K<U;K++)q[K>>>2]|=(B.charCodeAt(K)&255)<<24-K%4*8;return new T.init(q,U)}},j=A.Utf8={stringify:function(B){try{return decodeURIComponent(escape(P.stringify(B)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(B){return P.parse(unescape(encodeURIComponent(B)))}},z=S.BufferedBlockAlgorithm=b.extend({reset:function(){this._data=new T.init,this._nDataBytes=0},_append:function(B){typeof B=="string"&&(B=j.parse(B)),this._data.concat(B),this._nDataBytes+=B.sigBytes},_process:function(B){var U,q=this._data,K=q.words,Z=q.sigBytes,ee=this.blockSize,R=ee*4,Se=Z/R;B?Se=l.ceil(Se):Se=l.max((Se|0)-this._minBufferSize,0);var X=Se*ee,F=l.min(X*4,Z);if(X){for(var L=0;L<X;L+=ee)this._doProcessBlock(K,L);U=K.splice(0,X),q.sigBytes-=F}return new T.init(U,F)},clone:function(){var B=b.clone.call(this);return B._data=this._data.clone(),B},_minBufferSize:0});S.Hasher=z.extend({cfg:b.extend(),init:function(B){this.cfg=this.cfg.extend(B),this.reset()},reset:function(){z.reset.call(this),this._doReset()},update:function(B){return this._append(B),this._process(),this},finalize:function(B){B&&this._append(B);var U=this._doFinalize();return U},blockSize:16,_createHelper:function(B){return function(U,q){return new B.init(q).finalize(U)}},_createHmacHelper:function(B){return function(U,q){return new N.HMAC.init(B,q).finalize(U)}}});var N=w.algo={};return w}(Math);return i})}(Ky)),Ky.exports}var Qy={exports:{}},n2;function Sv(){return n2||(n2=1,function(o,r){(function(i,l){o.exports=l(er())})(Ut,function(i){return function(l){var f=i,p=f.lib,v=p.Base,C=p.WordArray,w=f.x64={};w.Word=v.extend({init:function(S,b){this.high=S,this.low=b}}),w.WordArray=v.extend({init:function(S,b){S=this.words=S||[],b!=l?this.sigBytes=b:this.sigBytes=S.length*8},toX32:function(){for(var S=this.words,b=S.length,T=[],A=0;A<b;A++){var H=S[A];T.push(H.high),T.push(H.low)}return C.create(T,this.sigBytes)},clone:function(){for(var S=v.clone.call(this),b=S.words=this.words.slice(0),T=b.length,A=0;A<T;A++)b[A]=b[A].clone();return S}})}(),i})}(Qy)),Qy.exports}var Xy={exports:{}},i2;function hR(){return i2||(i2=1,function(o,r){(function(i,l){o.exports=l(er())})(Ut,function(i){return function(){if(typeof ArrayBuffer=="function"){var l=i,f=l.lib,p=f.WordArray,v=p.init,C=p.init=function(w){if(w instanceof ArrayBuffer&&(w=new Uint8Array(w)),(w instanceof Int8Array||typeof Uint8ClampedArray<"u"&&w instanceof Uint8ClampedArray||w instanceof Int16Array||w instanceof Uint16Array||w instanceof Int32Array||w instanceof Uint32Array||w instanceof Float32Array||w instanceof Float64Array)&&(w=new Uint8Array(w.buffer,w.byteOffset,w.byteLength)),w instanceof Uint8Array){for(var S=w.byteLength,b=[],T=0;T<S;T++)b[T>>>2]|=w[T]<<24-T%4*8;v.call(this,b,S)}else v.apply(this,arguments)};C.prototype=p}}(),i.lib.WordArray})}(Xy)),Xy.exports}var Zy={exports:{}},a2;function pR(){return a2||(a2=1,function(o,r){(function(i,l){o.exports=l(er())})(Ut,function(i){return function(){var l=i,f=l.lib,p=f.WordArray,v=l.enc;v.Utf16=v.Utf16BE={stringify:function(w){for(var S=w.words,b=w.sigBytes,T=[],A=0;A<b;A+=2){var H=S[A>>>2]>>>16-A%4*8&65535;T.push(String.fromCharCode(H))}return T.join("")},parse:function(w){for(var S=w.length,b=[],T=0;T<S;T++)b[T>>>1]|=w.charCodeAt(T)<<16-T%2*16;return p.create(b,S*2)}},v.Utf16LE={stringify:function(w){for(var S=w.words,b=w.sigBytes,T=[],A=0;A<b;A+=2){var H=C(S[A>>>2]>>>16-A%4*8&65535);T.push(String.fromCharCode(H))}return T.join("")},parse:function(w){for(var S=w.length,b=[],T=0;T<S;T++)b[T>>>1]|=C(w.charCodeAt(T)<<16-T%2*16);return p.create(b,S*2)}};function C(w){return w<<8&4278255360|w>>>8&16711935}}(),i.enc.Utf16})}(Zy)),Zy.exports}var Jy={exports:{}},s2;function Sc(){return s2||(s2=1,function(o,r){(function(i,l){o.exports=l(er())})(Ut,function(i){return function(){var l=i,f=l.lib,p=f.WordArray,v=l.enc;v.Base64={stringify:function(w){var S=w.words,b=w.sigBytes,T=this._map;w.clamp();for(var A=[],H=0;H<b;H+=3)for(var P=S[H>>>2]>>>24-H%4*8&255,j=S[H+1>>>2]>>>24-(H+1)%4*8&255,z=S[H+2>>>2]>>>24-(H+2)%4*8&255,N=P<<16|j<<8|z,B=0;B<4&&H+B*.75<b;B++)A.push(T.charAt(N>>>6*(3-B)&63));var U=T.charAt(64);if(U)for(;A.length%4;)A.push(U);return A.join("")},parse:function(w){var S=w.length,b=this._map,T=this._reverseMap;if(!T){T=this._reverseMap=[];for(var A=0;A<b.length;A++)T[b.charCodeAt(A)]=A}var H=b.charAt(64);if(H){var P=w.indexOf(H);P!==-1&&(S=P)}return C(w,S,T)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function C(w,S,b){for(var T=[],A=0,H=0;H<S;H++)if(H%4){var P=b[w.charCodeAt(H-1)]<<H%4*2,j=b[w.charCodeAt(H)]>>>6-H%4*2,z=P|j;T[A>>>2]|=z<<24-A%4*8,A++}return p.create(T,A)}}(),i.enc.Base64})}(Jy)),Jy.exports}var ex={exports:{}},o2;function vR(){return o2||(o2=1,function(o,r){(function(i,l){o.exports=l(er())})(Ut,function(i){return function(){var l=i,f=l.lib,p=f.WordArray,v=l.enc;v.Base64url={stringify:function(w,S){S===void 0&&(S=!0);var b=w.words,T=w.sigBytes,A=S?this._safe_map:this._map;w.clamp();for(var H=[],P=0;P<T;P+=3)for(var j=b[P>>>2]>>>24-P%4*8&255,z=b[P+1>>>2]>>>24-(P+1)%4*8&255,N=b[P+2>>>2]>>>24-(P+2)%4*8&255,B=j<<16|z<<8|N,U=0;U<4&&P+U*.75<T;U++)H.push(A.charAt(B>>>6*(3-U)&63));var q=A.charAt(64);if(q)for(;H.length%4;)H.push(q);return H.join("")},parse:function(w,S){S===void 0&&(S=!0);var b=w.length,T=S?this._safe_map:this._map,A=this._reverseMap;if(!A){A=this._reverseMap=[];for(var H=0;H<T.length;H++)A[T.charCodeAt(H)]=H}var P=T.charAt(64);if(P){var j=w.indexOf(P);j!==-1&&(b=j)}return C(w,b,A)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function C(w,S,b){for(var T=[],A=0,H=0;H<S;H++)if(H%4){var P=b[w.charCodeAt(H-1)]<<H%4*2,j=b[w.charCodeAt(H)]>>>6-H%4*2,z=P|j;T[A>>>2]|=z<<24-A%4*8,A++}return p.create(T,A)}}(),i.enc.Base64url})}(ex)),ex.exports}var tx={exports:{}},l2;function Cc(){return l2||(l2=1,function(o,r){(function(i,l){o.exports=l(er())})(Ut,function(i){return function(l){var f=i,p=f.lib,v=p.WordArray,C=p.Hasher,w=f.algo,S=[];(function(){for(var j=0;j<64;j++)S[j]=l.abs(l.sin(j+1))*4294967296|0})();var b=w.MD5=C.extend({_doReset:function(){this._hash=new v.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(j,z){for(var N=0;N<16;N++){var B=z+N,U=j[B];j[B]=(U<<8|U>>>24)&16711935|(U<<24|U>>>8)&4278255360}var q=this._hash.words,K=j[z+0],Z=j[z+1],ee=j[z+2],R=j[z+3],Se=j[z+4],X=j[z+5],F=j[z+6],L=j[z+7],M=j[z+8],_e=j[z+9],be=j[z+10],$e=j[z+11],ge=j[z+12],Ee=j[z+13],He=j[z+14],De=j[z+15],$=q[0],G=q[1],he=q[2],le=q[3];$=T($,G,he,le,K,7,S[0]),le=T(le,$,G,he,Z,12,S[1]),he=T(he,le,$,G,ee,17,S[2]),G=T(G,he,le,$,R,22,S[3]),$=T($,G,he,le,Se,7,S[4]),le=T(le,$,G,he,X,12,S[5]),he=T(he,le,$,G,F,17,S[6]),G=T(G,he,le,$,L,22,S[7]),$=T($,G,he,le,M,7,S[8]),le=T(le,$,G,he,_e,12,S[9]),he=T(he,le,$,G,be,17,S[10]),G=T(G,he,le,$,$e,22,S[11]),$=T($,G,he,le,ge,7,S[12]),le=T(le,$,G,he,Ee,12,S[13]),he=T(he,le,$,G,He,17,S[14]),G=T(G,he,le,$,De,22,S[15]),$=A($,G,he,le,Z,5,S[16]),le=A(le,$,G,he,F,9,S[17]),he=A(he,le,$,G,$e,14,S[18]),G=A(G,he,le,$,K,20,S[19]),$=A($,G,he,le,X,5,S[20]),le=A(le,$,G,he,be,9,S[21]),he=A(he,le,$,G,De,14,S[22]),G=A(G,he,le,$,Se,20,S[23]),$=A($,G,he,le,_e,5,S[24]),le=A(le,$,G,he,He,9,S[25]),he=A(he,le,$,G,R,14,S[26]),G=A(G,he,le,$,M,20,S[27]),$=A($,G,he,le,Ee,5,S[28]),le=A(le,$,G,he,ee,9,S[29]),he=A(he,le,$,G,L,14,S[30]),G=A(G,he,le,$,ge,20,S[31]),$=H($,G,he,le,X,4,S[32]),le=H(le,$,G,he,M,11,S[33]),he=H(he,le,$,G,$e,16,S[34]),G=H(G,he,le,$,He,23,S[35]),$=H($,G,he,le,Z,4,S[36]),le=H(le,$,G,he,Se,11,S[37]),he=H(he,le,$,G,L,16,S[38]),G=H(G,he,le,$,be,23,S[39]),$=H($,G,he,le,Ee,4,S[40]),le=H(le,$,G,he,K,11,S[41]),he=H(he,le,$,G,R,16,S[42]),G=H(G,he,le,$,F,23,S[43]),$=H($,G,he,le,_e,4,S[44]),le=H(le,$,G,he,ge,11,S[45]),he=H(he,le,$,G,De,16,S[46]),G=H(G,he,le,$,ee,23,S[47]),$=P($,G,he,le,K,6,S[48]),le=P(le,$,G,he,L,10,S[49]),he=P(he,le,$,G,He,15,S[50]),G=P(G,he,le,$,X,21,S[51]),$=P($,G,he,le,ge,6,S[52]),le=P(le,$,G,he,R,10,S[53]),he=P(he,le,$,G,be,15,S[54]),G=P(G,he,le,$,Z,21,S[55]),$=P($,G,he,le,M,6,S[56]),le=P(le,$,G,he,De,10,S[57]),he=P(he,le,$,G,F,15,S[58]),G=P(G,he,le,$,Ee,21,S[59]),$=P($,G,he,le,Se,6,S[60]),le=P(le,$,G,he,$e,10,S[61]),he=P(he,le,$,G,ee,15,S[62]),G=P(G,he,le,$,_e,21,S[63]),q[0]=q[0]+$|0,q[1]=q[1]+G|0,q[2]=q[2]+he|0,q[3]=q[3]+le|0},_doFinalize:function(){var j=this._data,z=j.words,N=this._nDataBytes*8,B=j.sigBytes*8;z[B>>>5]|=128<<24-B%32;var U=l.floor(N/4294967296),q=N;z[(B+64>>>9<<4)+15]=(U<<8|U>>>24)&16711935|(U<<24|U>>>8)&4278255360,z[(B+64>>>9<<4)+14]=(q<<8|q>>>24)&16711935|(q<<24|q>>>8)&4278255360,j.sigBytes=(z.length+1)*4,this._process();for(var K=this._hash,Z=K.words,ee=0;ee<4;ee++){var R=Z[ee];Z[ee]=(R<<8|R>>>24)&16711935|(R<<24|R>>>8)&4278255360}return K},clone:function(){var j=C.clone.call(this);return j._hash=this._hash.clone(),j}});function T(j,z,N,B,U,q,K){var Z=j+(z&N|~z&B)+U+K;return(Z<<q|Z>>>32-q)+z}function A(j,z,N,B,U,q,K){var Z=j+(z&B|N&~B)+U+K;return(Z<<q|Z>>>32-q)+z}function H(j,z,N,B,U,q,K){var Z=j+(z^N^B)+U+K;return(Z<<q|Z>>>32-q)+z}function P(j,z,N,B,U,q,K){var Z=j+(N^(z|~B))+U+K;return(Z<<q|Z>>>32-q)+z}f.MD5=C._createHelper(b),f.HmacMD5=C._createHmacHelper(b)}(Math),i.MD5})}(tx)),tx.exports}var rx={exports:{}},u2;function c2(){return u2||(u2=1,function(o,r){(function(i,l){o.exports=l(er())})(Ut,function(i){return function(){var l=i,f=l.lib,p=f.WordArray,v=f.Hasher,C=l.algo,w=[],S=C.SHA1=v.extend({_doReset:function(){this._hash=new p.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(b,T){for(var A=this._hash.words,H=A[0],P=A[1],j=A[2],z=A[3],N=A[4],B=0;B<80;B++){if(B<16)w[B]=b[T+B]|0;else{var U=w[B-3]^w[B-8]^w[B-14]^w[B-16];w[B]=U<<1|U>>>31}var q=(H<<5|H>>>27)+N+w[B];B<20?q+=(P&j|~P&z)+1518500249:B<40?q+=(P^j^z)+1859775393:B<60?q+=(P&j|P&z|j&z)-1894007588:q+=(P^j^z)-899497514,N=z,z=j,j=P<<30|P>>>2,P=H,H=q}A[0]=A[0]+H|0,A[1]=A[1]+P|0,A[2]=A[2]+j|0,A[3]=A[3]+z|0,A[4]=A[4]+N|0},_doFinalize:function(){var b=this._data,T=b.words,A=this._nDataBytes*8,H=b.sigBytes*8;return T[H>>>5]|=128<<24-H%32,T[(H+64>>>9<<4)+14]=Math.floor(A/4294967296),T[(H+64>>>9<<4)+15]=A,b.sigBytes=T.length*4,this._process(),this._hash},clone:function(){var b=v.clone.call(this);return b._hash=this._hash.clone(),b}});l.SHA1=v._createHelper(S),l.HmacSHA1=v._createHmacHelper(S)}(),i.SHA1})}(rx)),rx.exports}var nx={exports:{}},f2;function ix(){return f2||(f2=1,function(o,r){(function(i,l){o.exports=l(er())})(Ut,function(i){return function(l){var f=i,p=f.lib,v=p.WordArray,C=p.Hasher,w=f.algo,S=[],b=[];(function(){function H(N){for(var B=l.sqrt(N),U=2;U<=B;U++)if(!(N%U))return!1;return!0}function P(N){return(N-(N|0))*4294967296|0}for(var j=2,z=0;z<64;)H(j)&&(z<8&&(S[z]=P(l.pow(j,.5))),b[z]=P(l.pow(j,.3333333333333333)),z++),j++})();var T=[],A=w.SHA256=C.extend({_doReset:function(){this._hash=new v.init(S.slice(0))},_doProcessBlock:function(H,P){for(var j=this._hash.words,z=j[0],N=j[1],B=j[2],U=j[3],q=j[4],K=j[5],Z=j[6],ee=j[7],R=0;R<64;R++){if(R<16)T[R]=H[P+R]|0;else{var Se=T[R-15],X=(Se<<25|Se>>>7)^(Se<<14|Se>>>18)^Se>>>3,F=T[R-2],L=(F<<15|F>>>17)^(F<<13|F>>>19)^F>>>10;T[R]=X+T[R-7]+L+T[R-16]}var M=q&K^~q&Z,_e=z&N^z&B^N&B,be=(z<<30|z>>>2)^(z<<19|z>>>13)^(z<<10|z>>>22),$e=(q<<26|q>>>6)^(q<<21|q>>>11)^(q<<7|q>>>25),ge=ee+$e+M+b[R]+T[R],Ee=be+_e;ee=Z,Z=K,K=q,q=U+ge|0,U=B,B=N,N=z,z=ge+Ee|0}j[0]=j[0]+z|0,j[1]=j[1]+N|0,j[2]=j[2]+B|0,j[3]=j[3]+U|0,j[4]=j[4]+q|0,j[5]=j[5]+K|0,j[6]=j[6]+Z|0,j[7]=j[7]+ee|0},_doFinalize:function(){var H=this._data,P=H.words,j=this._nDataBytes*8,z=H.sigBytes*8;return P[z>>>5]|=128<<24-z%32,P[(z+64>>>9<<4)+14]=l.floor(j/4294967296),P[(z+64>>>9<<4)+15]=j,H.sigBytes=P.length*4,this._process(),this._hash},clone:function(){var H=C.clone.call(this);return H._hash=this._hash.clone(),H}});f.SHA256=C._createHelper(A),f.HmacSHA256=C._createHmacHelper(A)}(Math),i.SHA256})}(nx)),nx.exports}var ax={exports:{}},d2;function gR(){return d2||(d2=1,function(o,r){(function(i,l,f){o.exports=l(er(),ix())})(Ut,function(i){return function(){var l=i,f=l.lib,p=f.WordArray,v=l.algo,C=v.SHA256,w=v.SHA224=C.extend({_doReset:function(){this._hash=new p.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var S=C._doFinalize.call(this);return S.sigBytes-=4,S}});l.SHA224=C._createHelper(w),l.HmacSHA224=C._createHmacHelper(w)}(),i.SHA224})}(ax)),ax.exports}var sx={exports:{}},h2;function p2(){return h2||(h2=1,function(o,r){(function(i,l,f){o.exports=l(er(),Sv())})(Ut,function(i){return function(){var l=i,f=l.lib,p=f.Hasher,v=l.x64,C=v.Word,w=v.WordArray,S=l.algo;function b(){return C.create.apply(C,arguments)}var T=[b(1116352408,3609767458),b(1899447441,602891725),b(3049323471,3964484399),b(3921009573,2173295548),b(961987163,4081628472),b(1508970993,3053834265),b(2453635748,2937671579),b(2870763221,3664609560),b(3624381080,2734883394),b(310598401,1164996542),b(607225278,1323610764),b(1426881987,3590304994),b(1925078388,4068182383),b(2162078206,991336113),b(2614888103,633803317),b(3248222580,3479774868),b(3835390401,2666613458),b(4022224774,944711139),b(264347078,2341262773),b(604807628,2007800933),b(770255983,1495990901),b(1249150122,1856431235),b(1555081692,3175218132),b(1996064986,2198950837),b(2554220882,3999719339),b(2821834349,766784016),b(2952996808,2566594879),b(3210313671,3203337956),b(3336571891,1034457026),b(3584528711,2466948901),b(113926993,3758326383),b(338241895,168717936),b(666307205,1188179964),b(773529912,1546045734),b(1294757372,1522805485),b(1396182291,2643833823),b(1695183700,2343527390),b(1986661051,1014477480),b(2177026350,1206759142),b(2456956037,344077627),b(2730485921,1290863460),b(2820302411,3158454273),b(3259730800,3505952657),b(3345764771,106217008),b(3516065817,3606008344),b(3600352804,1432725776),b(4094571909,1467031594),b(275423344,851169720),b(430227734,3100823752),b(506948616,1363258195),b(659060556,3750685593),b(883997877,3785050280),b(958139571,3318307427),b(1322822218,3812723403),b(1537002063,2003034995),b(1747873779,3602036899),b(1955562222,1575990012),b(2024104815,1125592928),b(2227730452,2716904306),b(2361852424,442776044),b(2428436474,593698344),b(2756734187,3733110249),b(3204031479,2999351573),b(3329325298,3815920427),b(3391569614,3928383900),b(3515267271,566280711),b(3940187606,3454069534),b(4118630271,4000239992),b(116418474,1914138554),b(174292421,2731055270),b(289380356,3203993006),b(460393269,320620315),b(685471733,587496836),b(852142971,1086792851),b(1017036298,365543100),b(1126000580,2618297676),b(1288033470,3409855158),b(1501505948,4234509866),b(1607167915,987167468),b(1816402316,1246189591)],A=[];(function(){for(var P=0;P<80;P++)A[P]=b()})();var H=S.SHA512=p.extend({_doReset:function(){this._hash=new w.init([new C.init(1779033703,4089235720),new C.init(3144134277,2227873595),new C.init(1013904242,4271175723),new C.init(2773480762,1595750129),new C.init(1359893119,2917565137),new C.init(2600822924,725511199),new C.init(528734635,4215389547),new C.init(1541459225,327033209)])},_doProcessBlock:function(P,j){for(var z=this._hash.words,N=z[0],B=z[1],U=z[2],q=z[3],K=z[4],Z=z[5],ee=z[6],R=z[7],Se=N.high,X=N.low,F=B.high,L=B.low,M=U.high,_e=U.low,be=q.high,$e=q.low,ge=K.high,Ee=K.low,He=Z.high,De=Z.low,$=ee.high,G=ee.low,he=R.high,le=R.low,tt=Se,Ke=X,ct=F,Ce=L,Te=M,xt=_e,Sr=be,zr=$e,Yt=ge,Xt=Ee,Fr=He,br=De,nn=$,Rn=G,vn=he,qr=le,tr=0;tr<80;tr++){var ar,Pr,ci=A[tr];if(tr<16)Pr=ci.high=P[j+tr*2]|0,ar=ci.low=P[j+tr*2+1]|0;else{var Kr=A[tr-15],Qr=Kr.high,An=Kr.low,ta=(Qr>>>1|An<<31)^(Qr>>>8|An<<24)^Qr>>>7,ra=(An>>>1|Qr<<31)^(An>>>8|Qr<<24)^(An>>>7|Qr<<25),Pe=A[tr-2],it=Pe.high,_t=Pe.low,rr=(it>>>19|_t<<13)^(it<<3|_t>>>29)^it>>>6,Cr=(_t>>>19|it<<13)^(_t<<3|it>>>29)^(_t>>>6|it<<26),Mr=A[tr-7],Or=Mr.high,gn=Mr.low,wr=A[tr-16],mr=wr.high,dr=wr.low;ar=ra+gn,Pr=ta+Or+(ar>>>0<ra>>>0?1:0),ar=ar+Cr,Pr=Pr+rr+(ar>>>0<Cr>>>0?1:0),ar=ar+dr,Pr=Pr+mr+(ar>>>0<dr>>>0?1:0),ci.high=Pr,ci.low=ar}var gi=Yt&Fr^~Yt&nn,kn=Xt&br^~Xt&Rn,Hi=tt&ct^tt&Te^ct&Te,ja=Ke&Ce^Ke&xt^Ce&xt,qs=(tt>>>28|Ke<<4)^(tt<<30|Ke>>>2)^(tt<<25|Ke>>>7),cs=(Ke>>>28|tt<<4)^(Ke<<30|tt>>>2)^(Ke<<25|tt>>>7),fs=(Yt>>>14|Xt<<18)^(Yt>>>18|Xt<<14)^(Yt<<23|Xt>>>9),ds=(Xt>>>14|Yt<<18)^(Xt>>>18|Yt<<14)^(Xt<<23|Yt>>>9),hs=T[tr],Vn=hs.high,$n=hs.low,hr=qr+ds,Fn=vn+fs+(hr>>>0<qr>>>0?1:0),hr=hr+kn,Fn=Fn+gi+(hr>>>0<kn>>>0?1:0),hr=hr+$n,Fn=Fn+Vn+(hr>>>0<$n>>>0?1:0),hr=hr+ar,Fn=Fn+Pr+(hr>>>0<ar>>>0?1:0),Ii=cs+ja,Ea=qs+Hi+(Ii>>>0<cs>>>0?1:0);vn=nn,qr=Rn,nn=Fr,Rn=br,Fr=Yt,br=Xt,Xt=zr+hr|0,Yt=Sr+Fn+(Xt>>>0<zr>>>0?1:0)|0,Sr=Te,zr=xt,Te=ct,xt=Ce,ct=tt,Ce=Ke,Ke=hr+Ii|0,tt=Fn+Ea+(Ke>>>0<hr>>>0?1:0)|0}X=N.low=X+Ke,N.high=Se+tt+(X>>>0<Ke>>>0?1:0),L=B.low=L+Ce,B.high=F+ct+(L>>>0<Ce>>>0?1:0),_e=U.low=_e+xt,U.high=M+Te+(_e>>>0<xt>>>0?1:0),$e=q.low=$e+zr,q.high=be+Sr+($e>>>0<zr>>>0?1:0),Ee=K.low=Ee+Xt,K.high=ge+Yt+(Ee>>>0<Xt>>>0?1:0),De=Z.low=De+br,Z.high=He+Fr+(De>>>0<br>>>0?1:0),G=ee.low=G+Rn,ee.high=$+nn+(G>>>0<Rn>>>0?1:0),le=R.low=le+qr,R.high=he+vn+(le>>>0<qr>>>0?1:0)},_doFinalize:function(){var P=this._data,j=P.words,z=this._nDataBytes*8,N=P.sigBytes*8;j[N>>>5]|=128<<24-N%32,j[(N+128>>>10<<5)+30]=Math.floor(z/4294967296),j[(N+128>>>10<<5)+31]=z,P.sigBytes=j.length*4,this._process();var B=this._hash.toX32();return B},clone:function(){var P=p.clone.call(this);return P._hash=this._hash.clone(),P},blockSize:1024/32});l.SHA512=p._createHelper(H),l.HmacSHA512=p._createHmacHelper(H)}(),i.SHA512})}(sx)),sx.exports}var ox={exports:{}},v2;function mR(){return v2||(v2=1,function(o,r){(function(i,l,f){o.exports=l(er(),Sv(),p2())})(Ut,function(i){return function(){var l=i,f=l.x64,p=f.Word,v=f.WordArray,C=l.algo,w=C.SHA512,S=C.SHA384=w.extend({_doReset:function(){this._hash=new v.init([new p.init(3418070365,3238371032),new p.init(1654270250,914150663),new p.init(2438529370,812702999),new p.init(355462360,4144912697),new p.init(1731405415,4290775857),new p.init(2394180231,1750603025),new p.init(3675008525,1694076839),new p.init(1203062813,3204075428)])},_doFinalize:function(){var b=w._doFinalize.call(this);return b.sigBytes-=16,b}});l.SHA384=w._createHelper(S),l.HmacSHA384=w._createHmacHelper(S)}(),i.SHA384})}(ox)),ox.exports}var lx={exports:{}},g2;function yR(){return g2||(g2=1,function(o,r){(function(i,l,f){o.exports=l(er(),Sv())})(Ut,function(i){return function(l){var f=i,p=f.lib,v=p.WordArray,C=p.Hasher,w=f.x64,S=w.Word,b=f.algo,T=[],A=[],H=[];(function(){for(var z=1,N=0,B=0;B<24;B++){T[z+5*N]=(B+1)*(B+2)/2%64;var U=N%5,q=(2*z+3*N)%5;z=U,N=q}for(var z=0;z<5;z++)for(var N=0;N<5;N++)A[z+5*N]=N+(2*z+3*N)%5*5;for(var K=1,Z=0;Z<24;Z++){for(var ee=0,R=0,Se=0;Se<7;Se++){if(K&1){var X=(1<<Se)-1;X<32?R^=1<<X:ee^=1<<X-32}K&128?K=K<<1^113:K<<=1}H[Z]=S.create(ee,R)}})();var P=[];(function(){for(var z=0;z<25;z++)P[z]=S.create()})();var j=b.SHA3=C.extend({cfg:C.cfg.extend({outputLength:512}),_doReset:function(){for(var z=this._state=[],N=0;N<25;N++)z[N]=new S.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(z,N){for(var B=this._state,U=this.blockSize/2,q=0;q<U;q++){var K=z[N+2*q],Z=z[N+2*q+1];K=(K<<8|K>>>24)&16711935|(K<<24|K>>>8)&4278255360,Z=(Z<<8|Z>>>24)&16711935|(Z<<24|Z>>>8)&4278255360;var ee=B[q];ee.high^=Z,ee.low^=K}for(var R=0;R<24;R++){for(var Se=0;Se<5;Se++){for(var X=0,F=0,L=0;L<5;L++){var ee=B[Se+5*L];X^=ee.high,F^=ee.low}var M=P[Se];M.high=X,M.low=F}for(var Se=0;Se<5;Se++)for(var _e=P[(Se+4)%5],be=P[(Se+1)%5],$e=be.high,ge=be.low,X=_e.high^($e<<1|ge>>>31),F=_e.low^(ge<<1|$e>>>31),L=0;L<5;L++){var ee=B[Se+5*L];ee.high^=X,ee.low^=F}for(var Ee=1;Ee<25;Ee++){var X,F,ee=B[Ee],He=ee.high,De=ee.low,$=T[Ee];$<32?(X=He<<$|De>>>32-$,F=De<<$|He>>>32-$):(X=De<<$-32|He>>>64-$,F=He<<$-32|De>>>64-$);var G=P[A[Ee]];G.high=X,G.low=F}var he=P[0],le=B[0];he.high=le.high,he.low=le.low;for(var Se=0;Se<5;Se++)for(var L=0;L<5;L++){var Ee=Se+5*L,ee=B[Ee],tt=P[Ee],Ke=P[(Se+1)%5+5*L],ct=P[(Se+2)%5+5*L];ee.high=tt.high^~Ke.high&ct.high,ee.low=tt.low^~Ke.low&ct.low}var ee=B[0],Ce=H[R];ee.high^=Ce.high,ee.low^=Ce.low}},_doFinalize:function(){var z=this._data,N=z.words;this._nDataBytes*8;var B=z.sigBytes*8,U=this.blockSize*32;N[B>>>5]|=1<<24-B%32,N[(l.ceil((B+1)/U)*U>>>5)-1]|=128,z.sigBytes=N.length*4,this._process();for(var q=this._state,K=this.cfg.outputLength/8,Z=K/8,ee=[],R=0;R<Z;R++){var Se=q[R],X=Se.high,F=Se.low;X=(X<<8|X>>>24)&16711935|(X<<24|X>>>8)&4278255360,F=(F<<8|F>>>24)&16711935|(F<<24|F>>>8)&4278255360,ee.push(F),ee.push(X)}return new v.init(ee,K)},clone:function(){for(var z=C.clone.call(this),N=z._state=this._state.slice(0),B=0;B<25;B++)N[B]=N[B].clone();return z}});f.SHA3=C._createHelper(j),f.HmacSHA3=C._createHmacHelper(j)}(Math),i.SHA3})}(lx)),lx.exports}var ux={exports:{}},m2;function xR(){return m2||(m2=1,function(o,r){(function(i,l){o.exports=l(er())})(Ut,function(i){/** @preserve
342
- (c) 2012 by Cédric Mesnil. All rights reserved.
343
-
344
- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
345
-
346
- - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
347
- - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
348
-
349
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
350
- */return function(l){var f=i,p=f.lib,v=p.WordArray,C=p.Hasher,w=f.algo,S=v.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),b=v.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),T=v.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),A=v.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),H=v.create([0,1518500249,1859775393,2400959708,2840853838]),P=v.create([1352829926,1548603684,1836072691,2053994217,0]),j=w.RIPEMD160=C.extend({_doReset:function(){this._hash=v.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(Z,ee){for(var R=0;R<16;R++){var Se=ee+R,X=Z[Se];Z[Se]=(X<<8|X>>>24)&16711935|(X<<24|X>>>8)&4278255360}var F=this._hash.words,L=H.words,M=P.words,_e=S.words,be=b.words,$e=T.words,ge=A.words,Ee,He,De,$,G,he,le,tt,Ke,ct;he=Ee=F[0],le=He=F[1],tt=De=F[2],Ke=$=F[3],ct=G=F[4];for(var Ce,R=0;R<80;R+=1)Ce=Ee+Z[ee+_e[R]]|0,R<16?Ce+=z(He,De,$)+L[0]:R<32?Ce+=N(He,De,$)+L[1]:R<48?Ce+=B(He,De,$)+L[2]:R<64?Ce+=U(He,De,$)+L[3]:Ce+=q(He,De,$)+L[4],Ce=Ce|0,Ce=K(Ce,$e[R]),Ce=Ce+G|0,Ee=G,G=$,$=K(De,10),De=He,He=Ce,Ce=he+Z[ee+be[R]]|0,R<16?Ce+=q(le,tt,Ke)+M[0]:R<32?Ce+=U(le,tt,Ke)+M[1]:R<48?Ce+=B(le,tt,Ke)+M[2]:R<64?Ce+=N(le,tt,Ke)+M[3]:Ce+=z(le,tt,Ke)+M[4],Ce=Ce|0,Ce=K(Ce,ge[R]),Ce=Ce+ct|0,he=ct,ct=Ke,Ke=K(tt,10),tt=le,le=Ce;Ce=F[1]+De+Ke|0,F[1]=F[2]+$+ct|0,F[2]=F[3]+G+he|0,F[3]=F[4]+Ee+le|0,F[4]=F[0]+He+tt|0,F[0]=Ce},_doFinalize:function(){var Z=this._data,ee=Z.words,R=this._nDataBytes*8,Se=Z.sigBytes*8;ee[Se>>>5]|=128<<24-Se%32,ee[(Se+64>>>9<<4)+14]=(R<<8|R>>>24)&16711935|(R<<24|R>>>8)&4278255360,Z.sigBytes=(ee.length+1)*4,this._process();for(var X=this._hash,F=X.words,L=0;L<5;L++){var M=F[L];F[L]=(M<<8|M>>>24)&16711935|(M<<24|M>>>8)&4278255360}return X},clone:function(){var Z=C.clone.call(this);return Z._hash=this._hash.clone(),Z}});function z(Z,ee,R){return Z^ee^R}function N(Z,ee,R){return Z&ee|~Z&R}function B(Z,ee,R){return(Z|~ee)^R}function U(Z,ee,R){return Z&R|ee&~R}function q(Z,ee,R){return Z^(ee|~R)}function K(Z,ee){return Z<<ee|Z>>>32-ee}f.RIPEMD160=C._createHelper(j),f.HmacRIPEMD160=C._createHmacHelper(j)}(),i.RIPEMD160})}(ux)),ux.exports}var cx={exports:{}},y2;function fx(){return y2||(y2=1,function(o,r){(function(i,l){o.exports=l(er())})(Ut,function(i){(function(){var l=i,f=l.lib,p=f.Base,v=l.enc,C=v.Utf8,w=l.algo;w.HMAC=p.extend({init:function(S,b){S=this._hasher=new S.init,typeof b=="string"&&(b=C.parse(b));var T=S.blockSize,A=T*4;b.sigBytes>A&&(b=S.finalize(b)),b.clamp();for(var H=this._oKey=b.clone(),P=this._iKey=b.clone(),j=H.words,z=P.words,N=0;N<T;N++)j[N]^=1549556828,z[N]^=909522486;H.sigBytes=P.sigBytes=A,this.reset()},reset:function(){var S=this._hasher;S.reset(),S.update(this._iKey)},update:function(S){return this._hasher.update(S),this},finalize:function(S){var b=this._hasher,T=b.finalize(S);b.reset();var A=b.finalize(this._oKey.clone().concat(T));return A}})})()})}(cx)),cx.exports}var dx={exports:{}},x2;function ER(){return x2||(x2=1,function(o,r){(function(i,l,f){o.exports=l(er(),ix(),fx())})(Ut,function(i){return function(){var l=i,f=l.lib,p=f.Base,v=f.WordArray,C=l.algo,w=C.SHA256,S=C.HMAC,b=C.PBKDF2=p.extend({cfg:p.extend({keySize:128/32,hasher:w,iterations:25e4}),init:function(T){this.cfg=this.cfg.extend(T)},compute:function(T,A){for(var H=this.cfg,P=S.create(H.hasher,T),j=v.create(),z=v.create([1]),N=j.words,B=z.words,U=H.keySize,q=H.iterations;N.length<U;){var K=P.update(A).finalize(z);P.reset();for(var Z=K.words,ee=Z.length,R=K,Se=1;Se<q;Se++){R=P.finalize(R),P.reset();for(var X=R.words,F=0;F<ee;F++)Z[F]^=X[F]}j.concat(K),B[0]++}return j.sigBytes=U*4,j}});l.PBKDF2=function(T,A,H){return b.create(H).compute(T,A)}}(),i.PBKDF2})}(dx)),dx.exports}var hx={exports:{}},E2;function pu(){return E2||(E2=1,function(o,r){(function(i,l,f){o.exports=l(er(),c2(),fx())})(Ut,function(i){return function(){var l=i,f=l.lib,p=f.Base,v=f.WordArray,C=l.algo,w=C.MD5,S=C.EvpKDF=p.extend({cfg:p.extend({keySize:128/32,hasher:w,iterations:1}),init:function(b){this.cfg=this.cfg.extend(b)},compute:function(b,T){for(var A,H=this.cfg,P=H.hasher.create(),j=v.create(),z=j.words,N=H.keySize,B=H.iterations;z.length<N;){A&&P.update(A),A=P.update(b).finalize(T),P.reset();for(var U=1;U<B;U++)A=P.finalize(A),P.reset();j.concat(A)}return j.sigBytes=N*4,j}});l.EvpKDF=function(b,T,A){return S.create(A).compute(b,T)}}(),i.EvpKDF})}(hx)),hx.exports}var px={exports:{}},S2;function oi(){return S2||(S2=1,function(o,r){(function(i,l,f){o.exports=l(er(),pu())})(Ut,function(i){i.lib.Cipher||function(l){var f=i,p=f.lib,v=p.Base,C=p.WordArray,w=p.BufferedBlockAlgorithm,S=f.enc;S.Utf8;var b=S.Base64,T=f.algo,A=T.EvpKDF,H=p.Cipher=w.extend({cfg:v.extend(),createEncryptor:function(X,F){return this.create(this._ENC_XFORM_MODE,X,F)},createDecryptor:function(X,F){return this.create(this._DEC_XFORM_MODE,X,F)},init:function(X,F,L){this.cfg=this.cfg.extend(L),this._xformMode=X,this._key=F,this.reset()},reset:function(){w.reset.call(this),this._doReset()},process:function(X){return this._append(X),this._process()},finalize:function(X){X&&this._append(X);var F=this._doFinalize();return F},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function X(F){return typeof F=="string"?Se:Z}return function(F){return{encrypt:function(L,M,_e){return X(M).encrypt(F,L,M,_e)},decrypt:function(L,M,_e){return X(M).decrypt(F,L,M,_e)}}}}()});p.StreamCipher=H.extend({_doFinalize:function(){var X=this._process(!0);return X},blockSize:1});var P=f.mode={},j=p.BlockCipherMode=v.extend({createEncryptor:function(X,F){return this.Encryptor.create(X,F)},createDecryptor:function(X,F){return this.Decryptor.create(X,F)},init:function(X,F){this._cipher=X,this._iv=F}}),z=P.CBC=function(){var X=j.extend();X.Encryptor=X.extend({processBlock:function(L,M){var _e=this._cipher,be=_e.blockSize;F.call(this,L,M,be),_e.encryptBlock(L,M),this._prevBlock=L.slice(M,M+be)}}),X.Decryptor=X.extend({processBlock:function(L,M){var _e=this._cipher,be=_e.blockSize,$e=L.slice(M,M+be);_e.decryptBlock(L,M),F.call(this,L,M,be),this._prevBlock=$e}});function F(L,M,_e){var be,$e=this._iv;$e?(be=$e,this._iv=l):be=this._prevBlock;for(var ge=0;ge<_e;ge++)L[M+ge]^=be[ge]}return X}(),N=f.pad={},B=N.Pkcs7={pad:function(X,F){for(var L=F*4,M=L-X.sigBytes%L,_e=M<<24|M<<16|M<<8|M,be=[],$e=0;$e<M;$e+=4)be.push(_e);var ge=C.create(be,M);X.concat(ge)},unpad:function(X){var F=X.words[X.sigBytes-1>>>2]&255;X.sigBytes-=F}};p.BlockCipher=H.extend({cfg:H.cfg.extend({mode:z,padding:B}),reset:function(){var X;H.reset.call(this);var F=this.cfg,L=F.iv,M=F.mode;this._xformMode==this._ENC_XFORM_MODE?X=M.createEncryptor:(X=M.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==X?this._mode.init(this,L&&L.words):(this._mode=X.call(M,this,L&&L.words),this._mode.__creator=X)},_doProcessBlock:function(X,F){this._mode.processBlock(X,F)},_doFinalize:function(){var X,F=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(F.pad(this._data,this.blockSize),X=this._process(!0)):(X=this._process(!0),F.unpad(X)),X},blockSize:4});var U=p.CipherParams=v.extend({init:function(X){this.mixIn(X)},toString:function(X){return(X||this.formatter).stringify(this)}}),q=f.format={},K=q.OpenSSL={stringify:function(X){var F,L=X.ciphertext,M=X.salt;return M?F=C.create([1398893684,1701076831]).concat(M).concat(L):F=L,F.toString(b)},parse:function(X){var F,L=b.parse(X),M=L.words;return M[0]==1398893684&&M[1]==1701076831&&(F=C.create(M.slice(2,4)),M.splice(0,4),L.sigBytes-=16),U.create({ciphertext:L,salt:F})}},Z=p.SerializableCipher=v.extend({cfg:v.extend({format:K}),encrypt:function(X,F,L,M){M=this.cfg.extend(M);var _e=X.createEncryptor(L,M),be=_e.finalize(F),$e=_e.cfg;return U.create({ciphertext:be,key:L,iv:$e.iv,algorithm:X,mode:$e.mode,padding:$e.padding,blockSize:X.blockSize,formatter:M.format})},decrypt:function(X,F,L,M){M=this.cfg.extend(M),F=this._parse(F,M.format);var _e=X.createDecryptor(L,M).finalize(F.ciphertext);return _e},_parse:function(X,F){return typeof X=="string"?F.parse(X,this):X}}),ee=f.kdf={},R=ee.OpenSSL={execute:function(X,F,L,M,_e){if(M||(M=C.random(64/8)),_e)var be=A.create({keySize:F+L,hasher:_e}).compute(X,M);else var be=A.create({keySize:F+L}).compute(X,M);var $e=C.create(be.words.slice(F),L*4);return be.sigBytes=F*4,U.create({key:be,iv:$e,salt:M})}},Se=p.PasswordBasedCipher=Z.extend({cfg:Z.cfg.extend({kdf:R}),encrypt:function(X,F,L,M){M=this.cfg.extend(M);var _e=M.kdf.execute(L,X.keySize,X.ivSize,M.salt,M.hasher);M.iv=_e.iv;var be=Z.encrypt.call(this,X,F,_e.key,M);return be.mixIn(_e),be},decrypt:function(X,F,L,M){M=this.cfg.extend(M),F=this._parse(F,M.format);var _e=M.kdf.execute(L,X.keySize,X.ivSize,F.salt,M.hasher);M.iv=_e.iv;var be=Z.decrypt.call(this,X,F,_e.key,M);return be}})}()})}(px)),px.exports}var vx={exports:{}},C2;function SR(){return C2||(C2=1,function(o,r){(function(i,l,f){o.exports=l(er(),oi())})(Ut,function(i){return i.mode.CFB=function(){var l=i.lib.BlockCipherMode.extend();l.Encryptor=l.extend({processBlock:function(p,v){var C=this._cipher,w=C.blockSize;f.call(this,p,v,w,C),this._prevBlock=p.slice(v,v+w)}}),l.Decryptor=l.extend({processBlock:function(p,v){var C=this._cipher,w=C.blockSize,S=p.slice(v,v+w);f.call(this,p,v,w,C),this._prevBlock=S}});function f(p,v,C,w){var S,b=this._iv;b?(S=b.slice(0),this._iv=void 0):S=this._prevBlock,w.encryptBlock(S,0);for(var T=0;T<C;T++)p[v+T]^=S[T]}return l}(),i.mode.CFB})}(vx)),vx.exports}var gx={exports:{}},w2;function CR(){return w2||(w2=1,function(o,r){(function(i,l,f){o.exports=l(er(),oi())})(Ut,function(i){return i.mode.CTR=function(){var l=i.lib.BlockCipherMode.extend(),f=l.Encryptor=l.extend({processBlock:function(p,v){var C=this._cipher,w=C.blockSize,S=this._iv,b=this._counter;S&&(b=this._counter=S.slice(0),this._iv=void 0);var T=b.slice(0);C.encryptBlock(T,0),b[w-1]=b[w-1]+1|0;for(var A=0;A<w;A++)p[v+A]^=T[A]}});return l.Decryptor=f,l}(),i.mode.CTR})}(gx)),gx.exports}var mx={exports:{}},b2;function wR(){return b2||(b2=1,function(o,r){(function(i,l,f){o.exports=l(er(),oi())})(Ut,function(i){/** @preserve
351
- * Counter block mode compatible with Dr Brian Gladman fileenc.c
352
- * derived from CryptoJS.mode.CTR
353
- * Jan Hruby jhruby.web@gmail.com
354
- */return i.mode.CTRGladman=function(){var l=i.lib.BlockCipherMode.extend();function f(C){if((C>>24&255)===255){var w=C>>16&255,S=C>>8&255,b=C&255;w===255?(w=0,S===255?(S=0,b===255?b=0:++b):++S):++w,C=0,C+=w<<16,C+=S<<8,C+=b}else C+=16777216;return C}function p(C){return(C[0]=f(C[0]))===0&&(C[1]=f(C[1])),C}var v=l.Encryptor=l.extend({processBlock:function(C,w){var S=this._cipher,b=S.blockSize,T=this._iv,A=this._counter;T&&(A=this._counter=T.slice(0),this._iv=void 0),p(A);var H=A.slice(0);S.encryptBlock(H,0);for(var P=0;P<b;P++)C[w+P]^=H[P]}});return l.Decryptor=v,l}(),i.mode.CTRGladman})}(mx)),mx.exports}var yx={exports:{}},_2;function bR(){return _2||(_2=1,function(o,r){(function(i,l,f){o.exports=l(er(),oi())})(Ut,function(i){return i.mode.OFB=function(){var l=i.lib.BlockCipherMode.extend(),f=l.Encryptor=l.extend({processBlock:function(p,v){var C=this._cipher,w=C.blockSize,S=this._iv,b=this._keystream;S&&(b=this._keystream=S.slice(0),this._iv=void 0),C.encryptBlock(b,0);for(var T=0;T<w;T++)p[v+T]^=b[T]}});return l.Decryptor=f,l}(),i.mode.OFB})}(yx)),yx.exports}var xx={exports:{}},D2;function _R(){return D2||(D2=1,function(o,r){(function(i,l,f){o.exports=l(er(),oi())})(Ut,function(i){return i.mode.ECB=function(){var l=i.lib.BlockCipherMode.extend();return l.Encryptor=l.extend({processBlock:function(f,p){this._cipher.encryptBlock(f,p)}}),l.Decryptor=l.extend({processBlock:function(f,p){this._cipher.decryptBlock(f,p)}}),l}(),i.mode.ECB})}(xx)),xx.exports}var Ex={exports:{}},T2;function DR(){return T2||(T2=1,function(o,r){(function(i,l,f){o.exports=l(er(),oi())})(Ut,function(i){return i.pad.AnsiX923={pad:function(l,f){var p=l.sigBytes,v=f*4,C=v-p%v,w=p+C-1;l.clamp(),l.words[w>>>2]|=C<<24-w%4*8,l.sigBytes+=C},unpad:function(l){var f=l.words[l.sigBytes-1>>>2]&255;l.sigBytes-=f}},i.pad.Ansix923})}(Ex)),Ex.exports}var Sx={exports:{}},R2;function TR(){return R2||(R2=1,function(o,r){(function(i,l,f){o.exports=l(er(),oi())})(Ut,function(i){return i.pad.Iso10126={pad:function(l,f){var p=f*4,v=p-l.sigBytes%p;l.concat(i.lib.WordArray.random(v-1)).concat(i.lib.WordArray.create([v<<24],1))},unpad:function(l){var f=l.words[l.sigBytes-1>>>2]&255;l.sigBytes-=f}},i.pad.Iso10126})}(Sx)),Sx.exports}var Cx={exports:{}},A2;function RR(){return A2||(A2=1,function(o,r){(function(i,l,f){o.exports=l(er(),oi())})(Ut,function(i){return i.pad.Iso97971={pad:function(l,f){l.concat(i.lib.WordArray.create([2147483648],1)),i.pad.ZeroPadding.pad(l,f)},unpad:function(l){i.pad.ZeroPadding.unpad(l),l.sigBytes--}},i.pad.Iso97971})}(Cx)),Cx.exports}var wx={exports:{}},k2;function AR(){return k2||(k2=1,function(o,r){(function(i,l,f){o.exports=l(er(),oi())})(Ut,function(i){return i.pad.ZeroPadding={pad:function(l,f){var p=f*4;l.clamp(),l.sigBytes+=p-(l.sigBytes%p||p)},unpad:function(l){for(var f=l.words,p=l.sigBytes-1,p=l.sigBytes-1;p>=0;p--)if(f[p>>>2]>>>24-p%4*8&255){l.sigBytes=p+1;break}}},i.pad.ZeroPadding})}(wx)),wx.exports}var bx={exports:{}},F2;function kR(){return F2||(F2=1,function(o,r){(function(i,l,f){o.exports=l(er(),oi())})(Ut,function(i){return i.pad.NoPadding={pad:function(){},unpad:function(){}},i.pad.NoPadding})}(bx)),bx.exports}var _x={exports:{}},O2;function FR(){return O2||(O2=1,function(o,r){(function(i,l,f){o.exports=l(er(),oi())})(Ut,function(i){return function(l){var f=i,p=f.lib,v=p.CipherParams,C=f.enc,w=C.Hex,S=f.format;S.Hex={stringify:function(b){return b.ciphertext.toString(w)},parse:function(b){var T=w.parse(b);return v.create({ciphertext:T})}}}(),i.format.Hex})}(_x)),_x.exports}var Dx={exports:{}},N2;function OR(){return N2||(N2=1,function(o,r){(function(i,l,f){o.exports=l(er(),Sc(),Cc(),pu(),oi())})(Ut,function(i){return function(){var l=i,f=l.lib,p=f.BlockCipher,v=l.algo,C=[],w=[],S=[],b=[],T=[],A=[],H=[],P=[],j=[],z=[];(function(){for(var U=[],q=0;q<256;q++)q<128?U[q]=q<<1:U[q]=q<<1^283;for(var K=0,Z=0,q=0;q<256;q++){var ee=Z^Z<<1^Z<<2^Z<<3^Z<<4;ee=ee>>>8^ee&255^99,C[K]=ee,w[ee]=K;var R=U[K],Se=U[R],X=U[Se],F=U[ee]*257^ee*16843008;S[K]=F<<24|F>>>8,b[K]=F<<16|F>>>16,T[K]=F<<8|F>>>24,A[K]=F;var F=X*16843009^Se*65537^R*257^K*16843008;H[ee]=F<<24|F>>>8,P[ee]=F<<16|F>>>16,j[ee]=F<<8|F>>>24,z[ee]=F,K?(K=R^U[U[U[X^R]]],Z^=U[U[Z]]):K=Z=1}})();var N=[0,1,2,4,8,16,32,64,128,27,54],B=v.AES=p.extend({_doReset:function(){var U;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var q=this._keyPriorReset=this._key,K=q.words,Z=q.sigBytes/4,ee=this._nRounds=Z+6,R=(ee+1)*4,Se=this._keySchedule=[],X=0;X<R;X++)X<Z?Se[X]=K[X]:(U=Se[X-1],X%Z?Z>6&&X%Z==4&&(U=C[U>>>24]<<24|C[U>>>16&255]<<16|C[U>>>8&255]<<8|C[U&255]):(U=U<<8|U>>>24,U=C[U>>>24]<<24|C[U>>>16&255]<<16|C[U>>>8&255]<<8|C[U&255],U^=N[X/Z|0]<<24),Se[X]=Se[X-Z]^U);for(var F=this._invKeySchedule=[],L=0;L<R;L++){var X=R-L;if(L%4)var U=Se[X];else var U=Se[X-4];L<4||X<=4?F[L]=U:F[L]=H[C[U>>>24]]^P[C[U>>>16&255]]^j[C[U>>>8&255]]^z[C[U&255]]}}},encryptBlock:function(U,q){this._doCryptBlock(U,q,this._keySchedule,S,b,T,A,C)},decryptBlock:function(U,q){var K=U[q+1];U[q+1]=U[q+3],U[q+3]=K,this._doCryptBlock(U,q,this._invKeySchedule,H,P,j,z,w);var K=U[q+1];U[q+1]=U[q+3],U[q+3]=K},_doCryptBlock:function(U,q,K,Z,ee,R,Se,X){for(var F=this._nRounds,L=U[q]^K[0],M=U[q+1]^K[1],_e=U[q+2]^K[2],be=U[q+3]^K[3],$e=4,ge=1;ge<F;ge++){var Ee=Z[L>>>24]^ee[M>>>16&255]^R[_e>>>8&255]^Se[be&255]^K[$e++],He=Z[M>>>24]^ee[_e>>>16&255]^R[be>>>8&255]^Se[L&255]^K[$e++],De=Z[_e>>>24]^ee[be>>>16&255]^R[L>>>8&255]^Se[M&255]^K[$e++],$=Z[be>>>24]^ee[L>>>16&255]^R[M>>>8&255]^Se[_e&255]^K[$e++];L=Ee,M=He,_e=De,be=$}var Ee=(X[L>>>24]<<24|X[M>>>16&255]<<16|X[_e>>>8&255]<<8|X[be&255])^K[$e++],He=(X[M>>>24]<<24|X[_e>>>16&255]<<16|X[be>>>8&255]<<8|X[L&255])^K[$e++],De=(X[_e>>>24]<<24|X[be>>>16&255]<<16|X[L>>>8&255]<<8|X[M&255])^K[$e++],$=(X[be>>>24]<<24|X[L>>>16&255]<<16|X[M>>>8&255]<<8|X[_e&255])^K[$e++];U[q]=Ee,U[q+1]=He,U[q+2]=De,U[q+3]=$},keySize:256/32});l.AES=p._createHelper(B)}(),i.AES})}(Dx)),Dx.exports}var Tx={exports:{}},B2;function NR(){return B2||(B2=1,function(o,r){(function(i,l,f){o.exports=l(er(),Sc(),Cc(),pu(),oi())})(Ut,function(i){return function(){var l=i,f=l.lib,p=f.WordArray,v=f.BlockCipher,C=l.algo,w=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],S=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],b=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],T=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],A=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],H=C.DES=v.extend({_doReset:function(){for(var N=this._key,B=N.words,U=[],q=0;q<56;q++){var K=w[q]-1;U[q]=B[K>>>5]>>>31-K%32&1}for(var Z=this._subKeys=[],ee=0;ee<16;ee++){for(var R=Z[ee]=[],Se=b[ee],q=0;q<24;q++)R[q/6|0]|=U[(S[q]-1+Se)%28]<<31-q%6,R[4+(q/6|0)]|=U[28+(S[q+24]-1+Se)%28]<<31-q%6;R[0]=R[0]<<1|R[0]>>>31;for(var q=1;q<7;q++)R[q]=R[q]>>>(q-1)*4+3;R[7]=R[7]<<5|R[7]>>>27}for(var X=this._invSubKeys=[],q=0;q<16;q++)X[q]=Z[15-q]},encryptBlock:function(N,B){this._doCryptBlock(N,B,this._subKeys)},decryptBlock:function(N,B){this._doCryptBlock(N,B,this._invSubKeys)},_doCryptBlock:function(N,B,U){this._lBlock=N[B],this._rBlock=N[B+1],P.call(this,4,252645135),P.call(this,16,65535),j.call(this,2,858993459),j.call(this,8,16711935),P.call(this,1,1431655765);for(var q=0;q<16;q++){for(var K=U[q],Z=this._lBlock,ee=this._rBlock,R=0,Se=0;Se<8;Se++)R|=T[Se][((ee^K[Se])&A[Se])>>>0];this._lBlock=ee,this._rBlock=Z^R}var X=this._lBlock;this._lBlock=this._rBlock,this._rBlock=X,P.call(this,1,1431655765),j.call(this,8,16711935),j.call(this,2,858993459),P.call(this,16,65535),P.call(this,4,252645135),N[B]=this._lBlock,N[B+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function P(N,B){var U=(this._lBlock>>>N^this._rBlock)&B;this._rBlock^=U,this._lBlock^=U<<N}function j(N,B){var U=(this._rBlock>>>N^this._lBlock)&B;this._lBlock^=U,this._rBlock^=U<<N}l.DES=v._createHelper(H);var z=C.TripleDES=v.extend({_doReset:function(){var N=this._key,B=N.words;if(B.length!==2&&B.length!==4&&B.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var U=B.slice(0,2),q=B.length<4?B.slice(0,2):B.slice(2,4),K=B.length<6?B.slice(0,2):B.slice(4,6);this._des1=H.createEncryptor(p.create(U)),this._des2=H.createEncryptor(p.create(q)),this._des3=H.createEncryptor(p.create(K))},encryptBlock:function(N,B){this._des1.encryptBlock(N,B),this._des2.decryptBlock(N,B),this._des3.encryptBlock(N,B)},decryptBlock:function(N,B){this._des3.decryptBlock(N,B),this._des2.encryptBlock(N,B),this._des1.decryptBlock(N,B)},keySize:192/32,ivSize:64/32,blockSize:64/32});l.TripleDES=v._createHelper(z)}(),i.TripleDES})}(Tx)),Tx.exports}var Rx={exports:{}},M2;function BR(){return M2||(M2=1,function(o,r){(function(i,l,f){o.exports=l(er(),Sc(),Cc(),pu(),oi())})(Ut,function(i){return function(){var l=i,f=l.lib,p=f.StreamCipher,v=l.algo,C=v.RC4=p.extend({_doReset:function(){for(var b=this._key,T=b.words,A=b.sigBytes,H=this._S=[],P=0;P<256;P++)H[P]=P;for(var P=0,j=0;P<256;P++){var z=P%A,N=T[z>>>2]>>>24-z%4*8&255;j=(j+H[P]+N)%256;var B=H[P];H[P]=H[j],H[j]=B}this._i=this._j=0},_doProcessBlock:function(b,T){b[T]^=w.call(this)},keySize:256/32,ivSize:0});function w(){for(var b=this._S,T=this._i,A=this._j,H=0,P=0;P<4;P++){T=(T+1)%256,A=(A+b[T])%256;var j=b[T];b[T]=b[A],b[A]=j,H|=b[(b[T]+b[A])%256]<<24-P*8}return this._i=T,this._j=A,H}l.RC4=p._createHelper(C);var S=v.RC4Drop=C.extend({cfg:C.cfg.extend({drop:192}),_doReset:function(){C._doReset.call(this);for(var b=this.cfg.drop;b>0;b--)w.call(this)}});l.RC4Drop=p._createHelper(S)}(),i.RC4})}(Rx)),Rx.exports}var Ax={exports:{}},H2;function MR(){return H2||(H2=1,function(o,r){(function(i,l,f){o.exports=l(er(),Sc(),Cc(),pu(),oi())})(Ut,function(i){return function(){var l=i,f=l.lib,p=f.StreamCipher,v=l.algo,C=[],w=[],S=[],b=v.Rabbit=p.extend({_doReset:function(){for(var A=this._key.words,H=this.cfg.iv,P=0;P<4;P++)A[P]=(A[P]<<8|A[P]>>>24)&16711935|(A[P]<<24|A[P]>>>8)&4278255360;var j=this._X=[A[0],A[3]<<16|A[2]>>>16,A[1],A[0]<<16|A[3]>>>16,A[2],A[1]<<16|A[0]>>>16,A[3],A[2]<<16|A[1]>>>16],z=this._C=[A[2]<<16|A[2]>>>16,A[0]&4294901760|A[1]&65535,A[3]<<16|A[3]>>>16,A[1]&4294901760|A[2]&65535,A[0]<<16|A[0]>>>16,A[2]&4294901760|A[3]&65535,A[1]<<16|A[1]>>>16,A[3]&4294901760|A[0]&65535];this._b=0;for(var P=0;P<4;P++)T.call(this);for(var P=0;P<8;P++)z[P]^=j[P+4&7];if(H){var N=H.words,B=N[0],U=N[1],q=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360,K=(U<<8|U>>>24)&16711935|(U<<24|U>>>8)&4278255360,Z=q>>>16|K&4294901760,ee=K<<16|q&65535;z[0]^=q,z[1]^=Z,z[2]^=K,z[3]^=ee,z[4]^=q,z[5]^=Z,z[6]^=K,z[7]^=ee;for(var P=0;P<4;P++)T.call(this)}},_doProcessBlock:function(A,H){var P=this._X;T.call(this),C[0]=P[0]^P[5]>>>16^P[3]<<16,C[1]=P[2]^P[7]>>>16^P[5]<<16,C[2]=P[4]^P[1]>>>16^P[7]<<16,C[3]=P[6]^P[3]>>>16^P[1]<<16;for(var j=0;j<4;j++)C[j]=(C[j]<<8|C[j]>>>24)&16711935|(C[j]<<24|C[j]>>>8)&4278255360,A[H+j]^=C[j]},blockSize:128/32,ivSize:64/32});function T(){for(var A=this._X,H=this._C,P=0;P<8;P++)w[P]=H[P];H[0]=H[0]+1295307597+this._b|0,H[1]=H[1]+3545052371+(H[0]>>>0<w[0]>>>0?1:0)|0,H[2]=H[2]+886263092+(H[1]>>>0<w[1]>>>0?1:0)|0,H[3]=H[3]+1295307597+(H[2]>>>0<w[2]>>>0?1:0)|0,H[4]=H[4]+3545052371+(H[3]>>>0<w[3]>>>0?1:0)|0,H[5]=H[5]+886263092+(H[4]>>>0<w[4]>>>0?1:0)|0,H[6]=H[6]+1295307597+(H[5]>>>0<w[5]>>>0?1:0)|0,H[7]=H[7]+3545052371+(H[6]>>>0<w[6]>>>0?1:0)|0,this._b=H[7]>>>0<w[7]>>>0?1:0;for(var P=0;P<8;P++){var j=A[P]+H[P],z=j&65535,N=j>>>16,B=((z*z>>>17)+z*N>>>15)+N*N,U=((j&4294901760)*j|0)+((j&65535)*j|0);S[P]=B^U}A[0]=S[0]+(S[7]<<16|S[7]>>>16)+(S[6]<<16|S[6]>>>16)|0,A[1]=S[1]+(S[0]<<8|S[0]>>>24)+S[7]|0,A[2]=S[2]+(S[1]<<16|S[1]>>>16)+(S[0]<<16|S[0]>>>16)|0,A[3]=S[3]+(S[2]<<8|S[2]>>>24)+S[1]|0,A[4]=S[4]+(S[3]<<16|S[3]>>>16)+(S[2]<<16|S[2]>>>16)|0,A[5]=S[5]+(S[4]<<8|S[4]>>>24)+S[3]|0,A[6]=S[6]+(S[5]<<16|S[5]>>>16)+(S[4]<<16|S[4]>>>16)|0,A[7]=S[7]+(S[6]<<8|S[6]>>>24)+S[5]|0}l.Rabbit=p._createHelper(b)}(),i.Rabbit})}(Ax)),Ax.exports}var kx={exports:{}},I2;function HR(){return I2||(I2=1,function(o,r){(function(i,l,f){o.exports=l(er(),Sc(),Cc(),pu(),oi())})(Ut,function(i){return function(){var l=i,f=l.lib,p=f.StreamCipher,v=l.algo,C=[],w=[],S=[],b=v.RabbitLegacy=p.extend({_doReset:function(){var A=this._key.words,H=this.cfg.iv,P=this._X=[A[0],A[3]<<16|A[2]>>>16,A[1],A[0]<<16|A[3]>>>16,A[2],A[1]<<16|A[0]>>>16,A[3],A[2]<<16|A[1]>>>16],j=this._C=[A[2]<<16|A[2]>>>16,A[0]&4294901760|A[1]&65535,A[3]<<16|A[3]>>>16,A[1]&4294901760|A[2]&65535,A[0]<<16|A[0]>>>16,A[2]&4294901760|A[3]&65535,A[1]<<16|A[1]>>>16,A[3]&4294901760|A[0]&65535];this._b=0;for(var z=0;z<4;z++)T.call(this);for(var z=0;z<8;z++)j[z]^=P[z+4&7];if(H){var N=H.words,B=N[0],U=N[1],q=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360,K=(U<<8|U>>>24)&16711935|(U<<24|U>>>8)&4278255360,Z=q>>>16|K&4294901760,ee=K<<16|q&65535;j[0]^=q,j[1]^=Z,j[2]^=K,j[3]^=ee,j[4]^=q,j[5]^=Z,j[6]^=K,j[7]^=ee;for(var z=0;z<4;z++)T.call(this)}},_doProcessBlock:function(A,H){var P=this._X;T.call(this),C[0]=P[0]^P[5]>>>16^P[3]<<16,C[1]=P[2]^P[7]>>>16^P[5]<<16,C[2]=P[4]^P[1]>>>16^P[7]<<16,C[3]=P[6]^P[3]>>>16^P[1]<<16;for(var j=0;j<4;j++)C[j]=(C[j]<<8|C[j]>>>24)&16711935|(C[j]<<24|C[j]>>>8)&4278255360,A[H+j]^=C[j]},blockSize:128/32,ivSize:64/32});function T(){for(var A=this._X,H=this._C,P=0;P<8;P++)w[P]=H[P];H[0]=H[0]+1295307597+this._b|0,H[1]=H[1]+3545052371+(H[0]>>>0<w[0]>>>0?1:0)|0,H[2]=H[2]+886263092+(H[1]>>>0<w[1]>>>0?1:0)|0,H[3]=H[3]+1295307597+(H[2]>>>0<w[2]>>>0?1:0)|0,H[4]=H[4]+3545052371+(H[3]>>>0<w[3]>>>0?1:0)|0,H[5]=H[5]+886263092+(H[4]>>>0<w[4]>>>0?1:0)|0,H[6]=H[6]+1295307597+(H[5]>>>0<w[5]>>>0?1:0)|0,H[7]=H[7]+3545052371+(H[6]>>>0<w[6]>>>0?1:0)|0,this._b=H[7]>>>0<w[7]>>>0?1:0;for(var P=0;P<8;P++){var j=A[P]+H[P],z=j&65535,N=j>>>16,B=((z*z>>>17)+z*N>>>15)+N*N,U=((j&4294901760)*j|0)+((j&65535)*j|0);S[P]=B^U}A[0]=S[0]+(S[7]<<16|S[7]>>>16)+(S[6]<<16|S[6]>>>16)|0,A[1]=S[1]+(S[0]<<8|S[0]>>>24)+S[7]|0,A[2]=S[2]+(S[1]<<16|S[1]>>>16)+(S[0]<<16|S[0]>>>16)|0,A[3]=S[3]+(S[2]<<8|S[2]>>>24)+S[1]|0,A[4]=S[4]+(S[3]<<16|S[3]>>>16)+(S[2]<<16|S[2]>>>16)|0,A[5]=S[5]+(S[4]<<8|S[4]>>>24)+S[3]|0,A[6]=S[6]+(S[5]<<16|S[5]>>>16)+(S[4]<<16|S[4]>>>16)|0,A[7]=S[7]+(S[6]<<8|S[6]>>>24)+S[5]|0}l.RabbitLegacy=p._createHelper(b)}(),i.RabbitLegacy})}(kx)),kx.exports}var Fx={exports:{}},$2;function IR(){return $2||($2=1,function(o,r){(function(i,l,f){o.exports=l(er(),Sc(),Cc(),pu(),oi())})(Ut,function(i){return function(){var l=i,f=l.lib,p=f.BlockCipher,v=l.algo;const C=16,w=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],S=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var b={pbox:[],sbox:[]};function T(z,N){let B=N>>24&255,U=N>>16&255,q=N>>8&255,K=N&255,Z=z.sbox[0][B]+z.sbox[1][U];return Z=Z^z.sbox[2][q],Z=Z+z.sbox[3][K],Z}function A(z,N,B){let U=N,q=B,K;for(let Z=0;Z<C;++Z)U=U^z.pbox[Z],q=T(z,U)^q,K=U,U=q,q=K;return K=U,U=q,q=K,q=q^z.pbox[C],U=U^z.pbox[C+1],{left:U,right:q}}function H(z,N,B){let U=N,q=B,K;for(let Z=C+1;Z>1;--Z)U=U^z.pbox[Z],q=T(z,U)^q,K=U,U=q,q=K;return K=U,U=q,q=K,q=q^z.pbox[1],U=U^z.pbox[0],{left:U,right:q}}function P(z,N,B){for(let ee=0;ee<4;ee++){z.sbox[ee]=[];for(let R=0;R<256;R++)z.sbox[ee][R]=S[ee][R]}let U=0;for(let ee=0;ee<C+2;ee++)z.pbox[ee]=w[ee]^N[U],U++,U>=B&&(U=0);let q=0,K=0,Z=0;for(let ee=0;ee<C+2;ee+=2)Z=A(z,q,K),q=Z.left,K=Z.right,z.pbox[ee]=q,z.pbox[ee+1]=K;for(let ee=0;ee<4;ee++)for(let R=0;R<256;R+=2)Z=A(z,q,K),q=Z.left,K=Z.right,z.sbox[ee][R]=q,z.sbox[ee][R+1]=K;return!0}var j=v.Blowfish=p.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var z=this._keyPriorReset=this._key,N=z.words,B=z.sigBytes/4;P(b,N,B)}},encryptBlock:function(z,N){var B=A(b,z[N],z[N+1]);z[N]=B.left,z[N+1]=B.right},decryptBlock:function(z,N){var B=H(b,z[N],z[N+1]);z[N]=B.left,z[N+1]=B.right},blockSize:64/32,keySize:128/32,ivSize:64/32});l.Blowfish=p._createHelper(j)}(),i.Blowfish})}(Fx)),Fx.exports}(function(o,r){(function(i,l,f){o.exports=l(er(),Sv(),hR(),pR(),Sc(),vR(),Cc(),c2(),ix(),gR(),p2(),mR(),yR(),xR(),fx(),ER(),pu(),oi(),SR(),CR(),wR(),bR(),_R(),DR(),TR(),RR(),AR(),kR(),FR(),OR(),NR(),BR(),MR(),HR(),IR())})(Ut,function(i){return i})})(t2);var $R=t2.exports;const wc=$C($R);let Le=null,sn=null,Gf=null;const Dn={setConfig(o){Le=o},getConfig(){return Le},decrypt(o,r=null,i=null){var l,f;try{const p=r||((l=Le==null?void 0:Le.env)==null?void 0:l.DECODE_IV)||"default_iv_1234",v=i||((f=Le==null?void 0:Le.env)==null?void 0:f.DECODE_KEY)||"default_key_1234",C=wc.enc.Base64.parse(o),w=wc.enc.Utf8.parse(v),S=wc.enc.Utf8.parse(p);return wc.AES.decrypt({ciphertext:C},w,{iv:S,mode:wc.mode.CTR,padding:wc.pad.NoPadding}).toString(wc.enc.Utf8)}catch(p){return console.log("ERROR ===> failed decrypt:",p),!1}},pushSound(){try{Gf&&clearInterval(Gf);const o=()=>{try{(!sn||sn.state==="closed")&&(sn=new(window.AudioContext||window.webkitAudioContext)),sn.state==="suspended"&&sn.resume();const r=sn.createOscillator(),i=sn.createOscillator(),l=sn.createGain();r.type="sine",i.type="sine",r.frequency.setValueAtTime(400,sn.currentTime),i.frequency.setValueAtTime(450,sn.currentTime);const f=sn.createOscillator(),p=sn.createGain();f.frequency.value=25,p.gain.value=15,f.connect(p),p.connect(r.frequency),p.connect(i.frequency),r.connect(l),i.connect(l),l.connect(sn.destination),l.gain.setValueAtTime(0,sn.currentTime),l.gain.linearRampToValueAtTime(.08,sn.currentTime+.05),l.gain.setValueAtTime(.08,sn.currentTime+1.2),l.gain.linearRampToValueAtTime(0,sn.currentTime+1.3),f.start(),r.start(),i.start(),f.stop(sn.currentTime+1.4),r.stop(sn.currentTime+1.4),i.stop(sn.currentTime+1.4)}catch(r){console.warn("Failed to play synthesized tone:",r)}};o(),Gf=setInterval(o,3e3)}catch(o){console.warn("AudioContext initialization failed:",o)}},stopSound(){Gf&&(clearInterval(Gf),Gf=null),sn&&(sn.close().catch(()=>{}),sn=null)},pushNotification(o){Ze.emitToParent("show_notification",{message:o})},toHHMMSS(o){const r=parseInt(o,10),i=Math.floor(r/3600),l=Math.floor(r/60)%60,f=r%60;return[i,l,f].map(p=>p<10?"0"+p:p).filter((p,v)=>p!=="00"||v>0).join(":")},mute(o,r,i,l){o?r?o.unmute():o.mute():l&&(r?l.unmuteAudio():l.muteAudio()),i(!r)},hold(o,r,i,l){o?r?o.unhold():o.hold():l&&(r?l.unhold():l.hold()),i(!r)},async hangup(o,r,i,l,f,p,v,C){l&&await l(!1),f&&f(!1),p&&p(0),o&&o.current&&clearInterval(o.current),r?(await(r==null?void 0:r.terminate("hangup")),v&&v(!1),Ze.emitLocal("yeastarSession",!1)):i&&(await(i==null?void 0:i.hangup()),C&&C(!1),Ze.emitLocal("flashphonerCall",!1))},attachRemoteAudio(o){if(!o)return;let r=document.getElementById("ys-remote-audio");r||(r=document.createElement("audio"),r.id="ys-remote-audio",r.autoplay=!0,r.playsInline=!0,r.hidden=!0,document.body.appendChild(r)),r.srcObject=o,r.play().catch(()=>{console.warn("User gesture needed to play audio"),Ze.emitLocal("needUserGestureToPlay",!0)})},getContactName(o){return o&&((Le==null?void 0:Le.contacts)||{1001:"John Doe",1002:"Jane Smith","08123456789":"Alice Johnson",123:"Customer Support"})[o]||null},getCpaasBaseUrl(){var o,r;return(Le==null?void 0:Le.cpaas_base_url)||(Le==null?void 0:Le.cpaasBaseUrl)||((o=Le==null?void 0:Le.env)==null?void 0:o.CPAAS_BASE_URL)||((r=Le==null?void 0:Le.pabxConfig)==null?void 0:r.cpaas_base_url)||"https://api-cpaas.omnix.co.id"},getSipHost(){var r,i,l;const o=f=>{var p;return((p=f==null?void 0:f.replace("https://",""))==null?void 0:p.replace("http://",""))||null};return o(Le==null?void 0:Le.pbx_url)||o((r=Le==null?void 0:Le.pabxConfig)==null?void 0:r.pbx_url)||o((i=Le==null?void 0:Le.auth)==null?void 0:i.pabx_host)||((l=Le==null?void 0:Le.auth)==null?void 0:l.pbxurl)||null},getWssHost(){var r;const o=i=>{var l;return((l=i==null?void 0:i.replace(/^wss?:\/\//,""))==null?void 0:l.replace(/\/$/,""))||null};return o(Le==null?void 0:Le.sip_url)||o((r=Le==null?void 0:Le.pabxConfig)==null?void 0:r.sip_url)||this.getSipHost()},async updateExtensionStatus(o,r="Ready",i="ready"){var l,f,p;try{const v=(Le==null?void 0:Le["X-CPAAS-Key-Fingerprint"])||(Le==null?void 0:Le.fingerprint)||(Le==null?void 0:Le.cpaasKeyFingerprint)||((l=Le==null?void 0:Le.env)==null?void 0:l.fingerprint)||((f=Le==null?void 0:Le.env)==null?void 0:f.X_CPAAS_Key_Fingerprint)||((p=Le==null?void 0:Le.pabxConfig)==null?void 0:p["X-CPAAS-Key-Fingerprint"]);if(!v)return console.warn("X-CPAAS-Key-Fingerprint not found. Cannot update extension status."),!1;const C=this.getCpaasBaseUrl(),w=await fetch(`${C}/voice/extensions/status`,{method:"POST",headers:{"X-CPAAS-Key-Fingerprint":v,"Content-Type":"application/json"},body:JSON.stringify({extension:o,status:r,reason:i})}),S=await w.json();return console.log(`[ExtStatus] ${r}/${i}:`,S),w.ok}catch(v){return console.error("Failed to update extension status:",v),!1}},async fetchExtensionStatus(o){var r,i,l,f;try{const p=(Le==null?void 0:Le["X-CPAAS-Key-Fingerprint"])||(Le==null?void 0:Le.fingerprint)||(Le==null?void 0:Le.cpaasKeyFingerprint)||((r=Le==null?void 0:Le.env)==null?void 0:r.fingerprint)||((i=Le==null?void 0:Le.env)==null?void 0:i.X_CPAAS_Key_Fingerprint)||((l=Le==null?void 0:Le.pabxConfig)==null?void 0:l["X-CPAAS-Key-Fingerprint"]);if(!p)return console.warn("X-CPAAS-Key-Fingerprint not found. Cannot fetch extension status."),null;const v=this.getCpaasBaseUrl(),C=await fetch(`${v}/voice/portal/extension?extension=${encodeURIComponent(o)}`,{method:"GET",headers:{"X-CPAAS-Key-Fingerprint":p,"Content-Type":"application/json"}});if(!C.ok)return null;const w=await C.json(),S=(f=w==null?void 0:w.data)==null?void 0:f[0];return console.log(`[ExtStatus] fetch ${o}:`,S),S||null}catch(p){return console.error("Failed to fetch extension status:",p),null}},getExtensionUsername(){var o,r;return((o=Le==null?void 0:Le.auth)==null?void 0:o.user_pbx)||((r=Le==null?void 0:Le.auth)==null?void 0:r.username)||null}},PR="0.21.1";class bc extends Error{constructor(r){super(r),Object.setPrototypeOf(this,new.target.prototype)}}class Ox extends bc{constructor(r){super(r||"Unsupported content type.")}}class Nx extends bc{constructor(r){super(r||"Request pending.")}}class LR extends bc{constructor(r){super(r||"Unspecified session description handler error.")}}class Bx extends bc{constructor(){super("The session has terminated.")}}class Zh extends bc{constructor(r){super(r||"An error occurred during state transition.")}}class UR{constructor(r){this.incomingAckRequest=r}get request(){return this.incomingAckRequest.message}}class jR{constructor(r){this.incomingByeRequest=r}get request(){return this.incomingByeRequest.message}accept(r){return this.incomingByeRequest.accept(r),Promise.resolve()}reject(r){return this.incomingByeRequest.reject(r),Promise.resolve()}}class zR{constructor(r){this.incomingCancelRequest=r}get request(){return this.incomingCancelRequest}}class Jh{constructor(){this.listeners=new Array}addListener(r,i){const l=f=>{this.removeListener(l),r(f)};(i==null?void 0:i.once)===!0?this.listeners.push(l):this.listeners.push(r)}emit(r){this.listeners.slice().forEach(i=>i(r))}removeAllListeners(){this.listeners=[]}removeListener(r){this.listeners=this.listeners.filter(i=>i!==r)}on(r){return this.addListener(r)}off(r){return this.removeListener(r)}once(r){return this.addListener(r,{once:!0})}}class qR{constructor(r){this.incomingInfoRequest=r}get request(){return this.incomingInfoRequest.message}accept(r){return this.incomingInfoRequest.accept(r),Promise.resolve()}reject(r){return this.incomingInfoRequest.reject(r),Promise.resolve()}}class P2{constructor(r){this.parameters={};for(const i in r)r.hasOwnProperty(i)&&this.setParam(i,r[i])}setParam(r,i){r&&(this.parameters[r.toLowerCase()]=typeof i>"u"||i===null?null:i.toString())}getParam(r){if(r)return this.parameters[r.toLowerCase()]}hasParam(r){return!!(r&&this.parameters[r.toLowerCase()]!==void 0)}deleteParam(r){if(r=r.toLowerCase(),this.hasParam(r)){const i=this.parameters[r];return delete this.parameters[r],i}}clearParams(){this.parameters={}}}class ma extends P2{constructor(r,i,l){super(l),this.uri=r,this._displayName=i}get friendlyName(){return this.displayName||this.uri.aor}get displayName(){return this._displayName}set displayName(r){this._displayName=r}clone(){return new ma(this.uri.clone(),this._displayName,JSON.parse(JSON.stringify(this.parameters)))}toString(){let r=this.displayName||this.displayName==="0"?'"'+this.displayName+'" ':"";r+="<"+this.uri.toString()+">";for(const i in this.parameters)this.parameters.hasOwnProperty(i)&&(r+=";"+i,this.parameters[i]!==null&&(r+="="+this.parameters[i]));return r}}class xo extends P2{constructor(r="sip",i,l,f,p,v){if(super(p||{}),this.headers={},!l)throw new TypeError('missing or invalid "host" parameter');for(const C in v)v.hasOwnProperty(C)&&this.setHeader(C,v[C]);this.raw={scheme:r,user:i,host:l,port:f},this.normal={scheme:r.toLowerCase(),user:i,host:l.toLowerCase(),port:f}}get scheme(){return this.normal.scheme}set scheme(r){this.raw.scheme=r,this.normal.scheme=r.toLowerCase()}get user(){return this.normal.user}set user(r){this.normal.user=this.raw.user=r}get host(){return this.normal.host}set host(r){this.raw.host=r,this.normal.host=r.toLowerCase()}get aor(){return this.normal.user+"@"+this.normal.host}get port(){return this.normal.port}set port(r){this.normal.port=this.raw.port=r}setHeader(r,i){this.headers[this.headerize(r)]=i instanceof Array?i:[i]}getHeader(r){if(r)return this.headers[this.headerize(r)]}hasHeader(r){return!!r&&!!this.headers.hasOwnProperty(this.headerize(r))}deleteHeader(r){if(r=this.headerize(r),this.headers.hasOwnProperty(r)){const i=this.headers[r];return delete this.headers[r],i}}clearHeaders(){this.headers={}}clone(){return new xo(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(r){let i=r.scheme+":";r.scheme.toLowerCase().match("^sips?$")||(i+="//"),r.user&&(i+=this.escapeUser(r.user)+"@"),i+=r.host,(r.port||r.port===0)&&(i+=":"+r.port);for(const f in this.parameters)this.parameters.hasOwnProperty(f)&&(i+=";"+f,this.parameters[f]!==null&&(i+="="+this.parameters[f]));const l=[];for(const f in this.headers)if(this.headers.hasOwnProperty(f))for(const p in this.headers[f])this.headers[f].hasOwnProperty(p)&&l.push(f+"="+this.headers[f][p]);return l.length>0&&(i+="?"+l.join("&")),i}escapeUser(r){let i;try{i=decodeURIComponent(r)}catch(l){throw l}return encodeURIComponent(i).replace(/%3A/ig,":").replace(/%2B/ig,"+").replace(/%3F/ig,"?").replace(/%2F/ig,"/")}headerize(r){const i={"Call-Id":"Call-ID",Cseq:"CSeq","Min-Se":"Min-SE",Rack:"RAck",Rseq:"RSeq","Www-Authenticate":"WWW-Authenticate"},l=r.toLowerCase().replace(/_/g,"-").split("-"),f=l.length;let p="";for(let v=0;v<f;v++)v!==0&&(p+="-"),p+=l[v].charAt(0).toUpperCase()+l[v].substring(1);return i[p]&&(p=i[p]),p}}function L2(o,r){if(o.scheme!==r.scheme||o.user!==r.user||o.host!==r.host||o.port!==r.port)return!1;function i(p,v){const C=Object.keys(p.parameters),w=Object.keys(v.parameters);return!(!C.filter(b=>w.includes(b)).every(b=>p.parameters[b]===v.parameters[b])||!["user","ttl","method","transport"].every(b=>p.hasParam(b)&&v.hasParam(b)||!p.hasParam(b)&&!v.hasParam(b))||!["maddr"].every(b=>p.hasParam(b)&&v.hasParam(b)||!p.hasParam(b)&&!v.hasParam(b)))}if(!i(o,r))return!1;const l=Object.keys(o.headers),f=Object.keys(r.headers);if(l.length!==0||f.length!==0){if(l.length!==f.length)return!1;const p=l.filter(v=>f.includes(v));if(p.length!==f.length||!p.every(v=>o.headers[v].length&&r.headers[v].length&&o.headers[v][0]===r.headers[v][0]))return!1}return!0}function Mx(o,r,i){return i=i||" ",o.length>r?o:(r-=o.length,i+=i.repeat(r),o+i.slice(0,r))}class Kf extends Error{constructor(r,i,l,f){super(),this.message=r,this.expected=i,this.found=l,this.location=f,this.name="SyntaxError",typeof Object.setPrototypeOf=="function"?Object.setPrototypeOf(this,Kf.prototype):this.__proto__=Kf.prototype,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Kf)}static buildMessage(r,i){function l(S){return S.charCodeAt(0).toString(16).toUpperCase()}function f(S){return S.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,b=>"\\x0"+l(b)).replace(/[\x10-\x1F\x7F-\x9F]/g,b=>"\\x"+l(b))}function p(S){return S.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,b=>"\\x0"+l(b)).replace(/[\x10-\x1F\x7F-\x9F]/g,b=>"\\x"+l(b))}function v(S){switch(S.type){case"literal":return'"'+f(S.text)+'"';case"class":const b=S.parts.map(T=>Array.isArray(T)?p(T[0])+"-"+p(T[1]):p(T));return"["+(S.inverted?"^":"")+b+"]";case"any":return"any character";case"end":return"end of input";case"other":return S.description}}function C(S){const b=S.map(v);let T,A;if(b.sort(),b.length>0){for(T=1,A=1;T<b.length;T++)b[T-1]!==b[T]&&(b[A]=b[T],A++);b.length=A}switch(b.length){case 1:return b[0];case 2:return b[0]+" or "+b[1];default:return b.slice(0,-1).join(", ")+", or "+b[b.length-1]}}function w(S){return S?'"'+f(S)+'"':"end of input"}return"Expected "+C(r)+" but "+w(i)+" found."}format(r){let i="Error: "+this.message;if(this.location){let l=null,f;for(f=0;f<r.length;f++)if(r[f].source===this.location.source){l=r[f].text.split(/\r\n|\n|\r/g);break}let p=this.location.start,v=this.location.source+":"+p.line+":"+p.column;if(l){let C=this.location.end,w=Mx("",p.line.toString().length," "),S=l[p.line-1],b=p.line===C.line?C.column:S.length+1;i+=`
355
- --> `+v+`
356
- `+w+` |
357
- `+p.line+" | "+S+`
358
- `+w+" | "+Mx("",p.column-1," ")+Mx("",b-p.column,"^")}else i+=`
359
- at `+v}return i}}function YR(o,r){r=r!==void 0?r:{};const i={},l=r.grammarSource,f={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 p=119;const v=[`\r
360
- `,N(`\r
361
- `,!1),/^[0-9]/,B([["0","9"]],!1,!1),/^[a-zA-Z]/,B([["a","z"],["A","Z"]],!1,!1),/^[0-9a-fA-F]/,B([["0","9"],["a","f"],["A","F"]],!1,!1),/^[\0-\xFF]/,B([["\0","ÿ"]],!1,!1),/^["]/,B(['"'],!1,!1)," ",N(" ",!1)," ",N(" ",!1),/^[a-zA-Z0-9]/,B([["a","z"],["A","Z"],["0","9"]],!1,!1),";",N(";",!1),"/",N("/",!1),"?",N("?",!1),":",N(":",!1),"@",N("@",!1),"&",N("&",!1),"=",N("=",!1),"+",N("+",!1),"$",N("$",!1),",",N(",",!1),"-",N("-",!1),"_",N("_",!1),".",N(".",!1),"!",N("!",!1),"~",N("~",!1),"*",N("*",!1),"'",N("'",!1),"(",N("(",!1),")",N(")",!1),"%",N("%",!1),function(){return" "},function(){return":"},/^[!-~]/,B([["!","~"]],!1,!1),/^[\x80-\uFFFF]/,B([["€","￿"]],!1,!1),/^[\x80-\xBF]/,B([["€","¿"]],!1,!1),/^[a-f]/,B([["a","f"]],!1,!1),"`",N("`",!1),"<",N("<",!1),">",N(">",!1),"\\",N("\\",!1),"[",N("[",!1),"]",N("]",!1),"{",N("{",!1),"}",N("}",!1),function(){return"*"},function(){return"/"},function(){return"="},function(){return"("},function(){return")"},function(){return">"},function(){return"<"},function(){return","},function(){return";"},function(){return":"},function(){return'"'},/^[!-']/,B([["!","'"]],!1,!1),/^[*-[]/,B([["*","["]],!1,!1),/^[\]-~]/,B([["]","~"]],!1,!1),function(F){return F},/^[#-[]/,B([["#","["]],!1,!1),/^[\0-\t]/,B([["\0"," "]],!1,!1),/^[\v-\f]/,B([["\v","\f"]],!1,!1),/^[\x0E-\x7F]/,B([["",""]],!1,!1),function(){r=r||{data:{}},r.data.uri=new xo(r.data.scheme,r.data.user,r.data.host,r.data.port),delete r.data.scheme,delete r.data.user,delete r.data.host,delete r.data.host_type,delete r.data.port},function(){r=r||{data:{}},r.data.uri=new xo(r.data.scheme,r.data.user,r.data.host,r.data.port,r.data.uri_params,r.data.uri_headers),delete r.data.scheme,delete r.data.user,delete r.data.host,delete r.data.host_type,delete r.data.port,delete r.data.uri_params,r.startRule==="SIP_URI"&&(r.data=r.data.uri)},"sips",N("sips",!0),"sip",N("sip",!0),function(F){r=r||{data:{}},r.data.scheme=F},function(){r=r||{data:{}},r.data.user=decodeURIComponent(j().slice(0,-1))},function(){r=r||{data:{}},r.data.password=j()},function(){return r=r||{data:{}},r.data.host=j(),r.data.host},function(){return r=r||{data:{}},r.data.host_type="domain",j()},/^[a-zA-Z0-9_\-]/,B([["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),/^[a-zA-Z0-9\-]/,B([["a","z"],["A","Z"],["0","9"],"-"],!1,!1),function(){return r=r||{data:{}},r.data.host_type="IPv6",j()},"::",N("::",!1),function(){return r=r||{data:{}},r.data.host_type="IPv6",j()},function(){return r=r||{data:{}},r.data.host_type="IPv4",j()},"25",N("25",!1),/^[0-5]/,B([["0","5"]],!1,!1),"2",N("2",!1),/^[0-4]/,B([["0","4"]],!1,!1),"1",N("1",!1),/^[1-9]/,B([["1","9"]],!1,!1),function(F){return r=r||{data:{}},F=parseInt(F.join("")),r.data.port=F,F},"transport=",N("transport=",!0),"udp",N("udp",!0),"tcp",N("tcp",!0),"sctp",N("sctp",!0),"tls",N("tls",!0),function(F){r=r||{data:{}},r.data.uri_params||(r.data.uri_params={}),r.data.uri_params.transport=F.toLowerCase()},"user=",N("user=",!0),"phone",N("phone",!0),"ip",N("ip",!0),function(F){r=r||{data:{}},r.data.uri_params||(r.data.uri_params={}),r.data.uri_params.user=F.toLowerCase()},"method=",N("method=",!0),function(F){r=r||{data:{}},r.data.uri_params||(r.data.uri_params={}),r.data.uri_params.method=F},"ttl=",N("ttl=",!0),function(F){r=r||{data:{}},r.data.params||(r.data.params={}),r.data.params.ttl=F},"maddr=",N("maddr=",!0),function(F){r=r||{data:{}},r.data.uri_params||(r.data.uri_params={}),r.data.uri_params.maddr=F},"lr",N("lr",!0),function(){r=r||{data:{}},r.data.uri_params||(r.data.uri_params={}),r.data.uri_params.lr=void 0},function(F,L){r=r||{data:{}},r.data.uri_params||(r.data.uri_params={}),L===null?L=void 0:L=L[1],r.data.uri_params[F.toLowerCase()]=L},function(F,L){F=F.join("").toLowerCase(),L=L.join(""),r=r||{data:{}},r.data.uri_headers||(r.data.uri_headers={}),r.data.uri_headers[F]?r.data.uri_headers[F].push(L):r.data.uri_headers[F]=[L]},function(){r=r||{data:{}},r.startRule==="Refer_To"&&(r.data.uri=new xo(r.data.scheme,r.data.user,r.data.host,r.data.port,r.data.uri_params,r.data.uri_headers),delete r.data.scheme,delete r.data.user,delete r.data.host,delete r.data.host_type,delete r.data.port,delete r.data.uri_params)},"//",N("//",!1),function(){r=r||{data:{}},r.data.scheme=j()},N("SIP",!0),function(){r=r||{data:{}},r.data.sip_version=j()},"INVITE",N("INVITE",!1),"ACK",N("ACK",!1),"VXACH",N("VXACH",!1),"OPTIONS",N("OPTIONS",!1),"BYE",N("BYE",!1),"CANCEL",N("CANCEL",!1),"REGISTER",N("REGISTER",!1),"SUBSCRIBE",N("SUBSCRIBE",!1),"NOTIFY",N("NOTIFY",!1),"REFER",N("REFER",!1),"PUBLISH",N("PUBLISH",!1),function(){return r=r||{data:{}},r.data.method=j(),r.data.method},function(F){r=r||{data:{}},r.data.status_code=parseInt(F.join(""))},function(){r=r||{data:{}},r.data.reason_phrase=j()},function(){r=r||{data:{}},r.data=j()},function(){var F,L;for(r=r||{data:{}},L=r.data.multi_header.length,F=0;F<L;F++)if(r.data.multi_header[F].parsed===null){r.data=null;break}r.data!==null?r.data=r.data.multi_header:r.data=-1},function(){var F;r=r||{data:{}},r.data.multi_header||(r.data.multi_header=[]);try{F=new ma(r.data.uri,r.data.displayName,r.data.params),delete r.data.uri,delete r.data.displayName,delete r.data.params}catch{F=null}r.data.multi_header.push({position:w,offset:z().start.offset,parsed:F})},function(F){F=j().trim(),F[0]==='"'&&(F=F.substring(1,F.length-1)),r=r||{data:{}},r.data.displayName=F},"q",N("q",!0),function(F){r=r||{data:{}},r.data.params||(r.data.params={}),r.data.params.q=F},"expires",N("expires",!0),function(F){r=r||{data:{}},r.data.params||(r.data.params={}),r.data.params.expires=F},function(F){return parseInt(F.join(""))},"0",N("0",!1),function(){return parseFloat(j())},function(F,L){r=r||{data:{}},r.data.params||(r.data.params={}),L===null?L=void 0:L=L[1],r.data.params[F.toLowerCase()]=L},"render",N("render",!0),"session",N("session",!0),"icon",N("icon",!0),"alert",N("alert",!0),function(){r=r||{data:{}},r.startRule==="Content_Disposition"&&(r.data.type=j().toLowerCase())},"handling",N("handling",!0),"optional",N("optional",!0),"required",N("required",!0),function(F){r=r||{data:{}},r.data=parseInt(F.join(""))},function(){r=r||{data:{}},r.data=j()},"text",N("text",!0),"image",N("image",!0),"audio",N("audio",!0),"video",N("video",!0),"application",N("application",!0),"message",N("message",!0),"multipart",N("multipart",!0),"x-",N("x-",!0),function(F){r=r||{data:{}},r.data.value=parseInt(F.join(""))},function(F){r=r||{data:{}},r.data=F},function(F){r=r||{data:{}},r.data.event=F.toLowerCase()},function(){r=r||{data:{}};var F=r.data.tag;r.data=new ma(r.data.uri,r.data.displayName,r.data.params),F&&r.data.setParam("tag",F)},"tag",N("tag",!0),function(F){r=r||{data:{}},r.data.tag=F},function(F){r=r||{data:{}},r.data=parseInt(F.join(""))},function(F){r=r||{data:{}},r.data=F},function(){r=r||{data:{}},r.data=new ma(r.data.uri,r.data.displayName,r.data.params)},"digest",N("Digest",!0),"realm",N("realm",!0),function(F){r=r||{data:{}},r.data.realm=F},"domain",N("domain",!0),"nonce",N("nonce",!0),function(F){r=r||{data:{}},r.data.nonce=F},"opaque",N("opaque",!0),function(F){r=r||{data:{}},r.data.opaque=F},"stale",N("stale",!0),"true",N("true",!0),function(){r=r||{data:{}},r.data.stale=!0},"false",N("false",!0),function(){r=r||{data:{}},r.data.stale=!1},"algorithm",N("algorithm",!0),"md5",N("MD5",!0),"md5-sess",N("MD5-sess",!0),function(F){r=r||{data:{}},r.data.algorithm=F.toUpperCase()},"qop",N("qop",!0),"auth-int",N("auth-int",!0),"auth",N("auth",!0),function(F){r=r||{data:{}},r.data.qop||(r.data.qop=[]),r.data.qop.push(F.toLowerCase())},function(F){r=r||{data:{}},r.data.value=parseInt(F.join(""))},function(){var F,L;for(r=r||{data:{}},L=r.data.multi_header.length,F=0;F<L;F++)if(r.data.multi_header[F].parsed===null){r.data=null;break}r.data!==null?r.data=r.data.multi_header:r.data=-1},function(){var F;r=r||{data:{}},r.data.multi_header||(r.data.multi_header=[]);try{F=new ma(r.data.uri,r.data.displayName,r.data.params),delete r.data.uri,delete r.data.displayName,delete r.data.params}catch{F=null}r.data.multi_header.push({position:w,offset:z().start.offset,parsed:F})},function(){r=r||{data:{}},r.data=new ma(r.data.uri,r.data.displayName,r.data.params)},function(){r=r||{data:{}},r.data.replaces_from_tag&&r.data.replaces_to_tag||(r.data=-1)},function(){r=r||{data:{}},r.data={call_id:r.data}},"from-tag",N("from-tag",!0),function(F){r=r||{data:{}},r.data.replaces_from_tag=F},"to-tag",N("to-tag",!0),function(F){r=r||{data:{}},r.data.replaces_to_tag=F},"early-only",N("early-only",!0),function(){r=r||{data:{}},r.data.early_only=!0},function(F,L){return L},function(F,L){return X(F,L)},function(F){r=r||{data:{}},r.startRule==="Require"&&(r.data=F||[])},function(F){r=r||{data:{}},r.data.value=parseInt(F.join(""))},"active",N("active",!0),"pending",N("pending",!0),"terminated",N("terminated",!0),function(){r=r||{data:{}},r.data.state=j()},"reason",N("reason",!0),function(F){r=r||{data:{}},typeof F<"u"&&(r.data.reason=F)},function(F){r=r||{data:{}},typeof F<"u"&&(r.data.expires=F)},"retry_after",N("retry_after",!0),function(F){r=r||{data:{}},typeof F<"u"&&(r.data.retry_after=F)},"deactivated",N("deactivated",!0),"probation",N("probation",!0),"rejected",N("rejected",!0),"timeout",N("timeout",!0),"giveup",N("giveup",!0),"noresource",N("noresource",!0),"invariant",N("invariant",!0),function(F){r=r||{data:{}},r.startRule==="Supported"&&(r.data=F||[])},function(){r=r||{data:{}};var F=r.data.tag;r.data=new ma(r.data.uri,r.data.displayName,r.data.params),F&&r.data.setParam("tag",F)},"ttl",N("ttl",!0),function(F){r=r||{data:{}},r.data.ttl=F},"maddr",N("maddr",!0),function(F){r=r||{data:{}},r.data.maddr=F},"received",N("received",!0),function(F){r=r||{data:{}},r.data.received=F},"branch",N("branch",!0),function(F){r=r||{data:{}},r.data.branch=F},"rport",N("rport",!0),function(F){r=r||{data:{}},typeof F<"u"&&(r.data.rport=F.join(""))},function(F){r=r||{data:{}},r.data.protocol=F},N("UDP",!0),N("TCP",!0),N("TLS",!0),N("SCTP",!0),function(F){r=r||{data:{}},r.data.transport=F},function(){r=r||{data:{}},r.data.host=j()},function(F){r=r||{data:{}},r.data.port=parseInt(F.join(""))},function(F){return parseInt(F.join(""))},function(F){r=r||{data:{}},r.startRule==="Session_Expires"&&(r.data.deltaSeconds=F)},"refresher",N("refresher",!1),"uas",N("uas",!1),"uac",N("uac",!1),function(F){r=r||{data:{}},r.startRule==="Session_Expires"&&(r.data.refresher=F)},function(F){r=r||{data:{}},r.startRule==="Min_SE"&&(r.data=F)},"stuns",N("stuns",!0),"stun",N("stun",!0),function(F){r=r||{data:{}},r.data.scheme=F},function(F){r=r||{data:{}},r.data.host=F},"?transport=",N("?transport=",!1),"turns",N("turns",!0),"turn",N("turn",!0),function(F){r=r||{data:{}},r.data.transport=F},function(){r=r||{data:{}},r.data=j()},"Referred-By",N("Referred-By",!1),"b",N("b",!1),"cid",N("cid",!1)],C=[R('2 ""6 7!'),R('4"""5!7#'),R('4$""5!7%'),R(`4&""5!7'`),R(";'.# &;("),R('4(""5!7)'),R('4*""5!7+'),R('2,""6,7-'),R('2.""6.7/'),R('40""5!71'),R('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'),R(";).# &;,"),R('2F""6F7G.} &2H""6H7I.q &2J""6J7K.e &2L""6L7M.Y &2N""6N7O.M &2P""6P7Q.A &2R""6R7S.5 &2T""6T7U.) &2V""6V7W'),R(`%%2X""6X7Y/5#;#/,$;#/#$+#)(#'#("'#&'#/"!&,)`),R(`%%$;$0#*;$&/,#; /#$+")("'#&'#." &"/=#$;$/&#0#*;$&&&#/'$8":Z" )("'#&'#`),R(';.." &"'),R(`%$;'.# &;(0)*;'.# &;(&/?#28""6879/0$;//'$8#:[# )(#'#("'#&'#`),R(`%%$;2/&#0#*;2&&&#/g#$%$;.0#*;.&/,#;2/#$+")("'#&'#0=*%$;.0#*;.&/,#;2/#$+")("'#&'#&/#$+")("'#&'#/"!&,)`),R('4\\""5!7].# &;3'),R('4^""5!7_'),R('4`""5!7a'),R(';!.) &4b""5!7c'),R('%$;).• &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&&&#/"!&,)'),R('%$;).‰ &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&&&#/"!&,)'),R(`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.) &;'.# &;(`),R('%$;).ī &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&&&#/"!&,)'),R(`%;//?#2P""6P7Q/0$;//'$8#:t# )(#'#("'#&'#`),R(`%;//?#24""6475/0$;//'$8#:u# )(#'#("'#&'#`),R(`%;//?#2>""6>7?/0$;//'$8#:v# )(#'#("'#&'#`),R(`%;//?#2T""6T7U/0$;//'$8#:w# )(#'#("'#&'#`),R(`%;//?#2V""6V7W/0$;//'$8#:x# )(#'#("'#&'#`),R(`%2h""6h7i/0#;//'$8":y" )("'#&'#`),R(`%;//6#2f""6f7g/'$8":z" )("'#&'#`),R(`%;//?#2D""6D7E/0$;//'$8#:{# )(#'#("'#&'#`),R(`%;//?#22""6273/0$;//'$8#:|# )(#'#("'#&'#`),R(`%;//?#28""6879/0$;//'$8#:}# )(#'#("'#&'#`),R(`%;//0#;&/'$8":~" )("'#&'#`),R(`%;&/0#;//'$8":~" )("'#&'#`),R(`%;=/T#$;G.) &;K.# &;F0/*;G.) &;K.# &;F&/,$;>/#$+#)(#'#("'#&'#`),R('4""5!7€.A &4""5!7‚.5 &4ƒ""5!7„.) &;3.# &;.'),R(`%%;//Q#;&/H$$;J.# &;K0)*;J.# &;K&/,$;&/#$+$)($'#(#'#("'#&'#/"!&,)`),R(`%;//]#;&/T$%$;J.# &;K0)*;J.# &;K&/"!&,)/1$;&/($8$:…$!!)($'#(#'#("'#&'#`),R(';..G &2L""6L7M.; &4†""5!7‡./ &4ƒ""5!7„.# &;3'),R(`%2j""6j7k/J#4ˆ""5!7‰.5 &4Š""5!7‹.) &4Œ""5!7/#$+")("'#&'#`),R(`%;N/M#28""6879/>$;O." &"/0$;S/'$8$:Ž$ )($'#(#'#("'#&'#`),R(`%;N/d#28""6879/U$;O." &"/G$;S/>$;_/5$;l." &"/'$8&:& )(&'#(%'#($'#(#'#("'#&'#`),R(`%3""5$7‘.) &3’""5#7“/' 8!:”!! )`),R(`%;P/]#%28""6879/,#;R/#$+")("'#&'#." &"/6$2:""6:7;/'$8#:•# )(#'#("'#&'#`),R("$;+.) &;-.# &;Q/2#0/*;+.) &;-.# &;Q&&&#"),R('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'),R('%$;+._ &;-.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!:–! )'),R(`%;T/J#%28""6879/,#;^/#$+")("'#&'#." &"/#$+")("'#&'#`),R("%;U.) &;\\.# &;X/& 8!:—! )"),R(`%$%;V/2#2J""6J7K/#$+")("'#&'#0<*%;V/2#2J""6J7K/#$+")("'#&'#&/D#;W/;$2J""6J7K." &"/'$8#:˜# )(#'#("'#&'#`),R('$4™""5!7š/,#0)*4™""5!7š&&&#'),R(`%4$""5!7%/?#$4›""5!7œ0)*4›""5!7œ&/#$+")("'#&'#`),R(`%2l""6l7m/?#;Y/6$2n""6n7o/'$8#:# )(#'#("'#&'#`),R(`%%;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!: ! )`),R(`%;#/M#;#." &"/?$;#." &"/1$;#." &"/#$+$)($'#(#'#("'#&'#`),R(`%;Z/;#28""6879/,$;Z/#$+#)(#'#("'#&'#.# &;\\`),R(`%;]/o#2J""6J7K/\`$;]/W$2J""6J7K/H$;]/?$2J""6J7K/0$;]/'$8':¡' )(''#(&'#(%'#($'#(#'#("'#&'#`),R(`%2¢""6¢7£/2#4¤""5!7¥/#$+")("'#&'#.˜ &%2¦""6¦7§/;#4¨""5!7©/,$;!/#$+#)(#'#("'#&'#.j &%2ª""6ª7«/5#;!/,$;!/#$+#)(#'#("'#&'#.B &%4¬""5!7­/,#;!/#$+")("'#&'#.# &;!`),R(`%%;!." &"/[#;!." &"/M$;!." &"/?$;!." &"/1$;!." &"/#$+%)(%'#($'#(#'#("'#&'#/' 8!:®!! )`),R(`$%22""6273/,#;\`/#$+")("'#&'#0<*%22""6273/,#;\`/#$+")("'#&'#&`),R(";a.A &;b.; &;c.5 &;d./ &;e.) &;f.# &;g"),R(`%3¯""5*7°/a#3±""5#7².G &3³""5#7´.; &3µ""5$7¶./ &3·""5#7¸.# &;6/($8":¹"! )("'#&'#`),R(`%3º""5%7»/I#3¼""5%7½./ &3¾""5"7¿.# &;6/($8":À"! )("'#&'#`),R(`%3Á""5'7Â/1#;/($8":Ã"! )("'#&'#`),R(`%3Ä""5$7Å/1#;ð/($8":Æ"! )("'#&'#`),R(`%3Ç""5&7È/1#;T/($8":É"! )("'#&'#`),R(`%3Ê""5"7Ë/N#%2>""6>7?/,#;6/#$+")("'#&'#." &"/'$8":Ì" )("'#&'#`),R(`%;h/P#%2>""6>7?/,#;i/#$+")("'#&'#." &"/)$8":Í""! )("'#&'#`),R('%$;j/&#0#*;j&&&#/"!&,)'),R('%$;j/&#0#*;j&&&#/"!&,)'),R(";k.) &;+.# &;-"),R('2l""6l7m.e &2n""6n7o.Y &24""6475.M &28""6879.A &2<""6<7=.5 &2@""6@7A.) &2B""6B7C'),R(`%26""6677/n#;m/e$$%2<""6<7=/,#;m/#$+")("'#&'#0<*%2<""6<7=/,#;m/#$+")("'#&'#&/#$+#)(#'#("'#&'#`),R(`%;n/A#2>""6>7?/2$;o/)$8#:Î#"" )(#'#("'#&'#`),R("$;p.) &;+.# &;-/2#0/*;p.) &;+.# &;-&&&#"),R("$;p.) &;+.# &;-0/*;p.) &;+.# &;-&"),R('2l""6l7m.e &2n""6n7o.Y &24""6475.M &26""6677.A &28""6879.5 &2@""6@7A.) &2B""6B7C'),R(";‘.# &;r"),R(`%;/G#;'/>$;s/5$;'/,$;„/#$+%)(%'#($'#(#'#("'#&'#`),R(";M.# &;t"),R(`%;/E#28""6879/6$;u.# &;x/'$8#:Ï# )(#'#("'#&'#`),R(`%;v.# &;w/J#%26""6677/,#;ƒ/#$+")("'#&'#." &"/#$+")("'#&'#`),R(`%2Ð""6Ð7Ñ/:#;€/1$;w." &"/#$+#)(#'#("'#&'#`),R(`%24""6475/,#;{/#$+")("'#&'#`),R(`%;z/3#$;y0#*;y&/#$+")("'#&'#`),R(";*.) &;+.# &;-"),R(';+. &;-.‰ &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'),R(`%;|/e#$%24""6475/,#;|/#$+")("'#&'#0<*%24""6475/,#;|/#$+")("'#&'#&/#$+")("'#&'#`),R(`%$;~0#*;~&/e#$%22""6273/,#;}/#$+")("'#&'#0<*%22""6273/,#;}/#$+")("'#&'#&/#$+")("'#&'#`),R("$;~0#*;~&"),R(';+.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'),R(`%%;"/‡#$;".G &;!.A &2@""6@7A.5 &2F""6F7G.) &2J""6J7K0M*;".G &;!.A &2@""6@7A.5 &2F""6F7G.) &2J""6J7K&/#$+")("'#&'#/& 8!:Ò! )`),R(";.# &;‚"),R(`%%;O/2#2:""6:7;/#$+")("'#&'#." &"/,#;S/#$+")("'#&'#." &"`),R('$;+.ƒ &;-.} &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&&&#'),R("$;y0#*;y&"),R(`%3’""5#7Ó/q#24""6475/b$$;!/&#0#*;!&&&#/L$2J""6J7K/=$$;!/&#0#*;!&&&#/'$8%:Ô% )(%'#($'#(#'#("'#&'#`),R('2Õ""6Õ7Ö'),R('2×""6×7Ø'),R('2Ù""6Ù7Ú'),R('2Û""6Û7Ü'),R('2Ý""6Ý7Þ'),R('2ß""6ß7à'),R('2á""6á7â'),R('2ã""6ã7ä'),R('2å""6å7æ'),R('2ç""6ç7è'),R('2é""6é7ê'),R("%;….Y &;†.S &;ˆ.M &;‰.G &;Š.A &;‹.; &;Œ.5 &;./ &;.) &;Ž.# &;6/& 8!:ë! )"),R(`%;„/G#;'/>$;’/5$;'/,$;”/#$+%)(%'#($'#(#'#("'#&'#`),R("%;“/' 8!:ì!! )"),R(`%;!/5#;!/,$;!/#$+#)(#'#("'#&'#`),R("%$;*.A &;+.; &;-.5 &;3./ &;4.) &;'.# &;(0G*;*.A &;+.; &;-.5 &;3./ &;4.) &;'.# &;(&/& 8!:í! )"),R(`%;¶/Y#$%;A/,#;¶/#$+")("'#&'#06*%;A/,#;¶/#$+")("'#&'#&/#$+")("'#&'#`),R(`%;9/N#%2:""6:7;/,#;9/#$+")("'#&'#." &"/'$8":î" )("'#&'#`),R(`%;:.c &%;˜/Y#$%;A/,#;˜/#$+")("'#&'#06*%;A/,#;˜/#$+")("'#&'#&/#$+")("'#&'#/& 8!:ï! )`),R(`%;L.# &;™/]#$%;B/,#;›/#$+")("'#&'#06*%;B/,#;›/#$+")("'#&'#&/'$8":ð" )("'#&'#`),R(`%;š." &"/>#;@/5$;M/,$;?/#$+$)($'#(#'#("'#&'#`),R(`%%;6/Y#$%;./,#;6/#$+")("'#&'#06*%;./,#;6/#$+")("'#&'#&/#$+")("'#&'#.# &;H/' 8!:ñ!! )`),R(";œ.) &;.# &; "),R(`%3ò""5!7ó/:#;</1$;Ÿ/($8#:ô#! )(#'#("'#&'#`),R(`%3õ""5'7ö/:#;</1$;ž/($8#:÷#! )(#'#("'#&'#`),R("%$;!/&#0#*;!&&&#/' 8!:ø!! )"),R(`%2ù""6ù7ú/o#%2J""6J7K/M#;!." &"/?$;!." &"/1$;!." &"/#$+$)($'#(#'#("'#&'#." &"/'$8":û" )("'#&'#`),R(`%;6/J#%;</,#;¡/#$+")("'#&'#." &"/)$8":ü""! )("'#&'#`),R(";6.) &;T.# &;H"),R(`%;£/Y#$%;B/,#;¤/#$+")("'#&'#06*%;B/,#;¤/#$+")("'#&'#&/#$+")("'#&'#`),R(`%3ý""5&7þ.G &3ÿ""5'7Ā.; &3ā""5$7Ă./ &3ă""5%7Ą.# &;6/& 8!:ą! )`),R(";¥.# &; "),R(`%3Ć""5(7ć/M#;</D$3Ĉ""5(7ĉ./ &3Ċ""5(7ċ.# &;6/#$+#)(#'#("'#&'#`),R(`%;6/Y#$%;A/,#;6/#$+")("'#&'#06*%;A/,#;6/#$+")("'#&'#&/#$+")("'#&'#`),R("%$;!/&#0#*;!&&&#/' 8!:Č!! )"),R("%;©/& 8!:č! )"),R(`%;ª/k#;;/b$;¯/Y$$%;B/,#;°/#$+")("'#&'#06*%;B/,#;°/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),R(";«.# &;¬"),R('3Ď""5$7ď.S &3Đ""5%7đ.G &3Ē""5%7ē.; &3Ĕ""5%7ĕ./ &3Ė""5+7ė.# &;­'),R(`3Ę""5'7ę./ &3Ě""5)7ě.# &;­`),R(";6.# &;®"),R(`%3Ĝ""5"7ĝ/,#;6/#$+")("'#&'#`),R(";­.# &;6"),R(`%;6/5#;</,$;±/#$+#)(#'#("'#&'#`),R(";6.# &;H"),R(`%;³/5#;./,$;/#$+#)(#'#("'#&'#`),R("%$;!/&#0#*;!&&&#/' 8!:Ğ!! )"),R("%;ž/' 8!:ğ!! )"),R(`%;¶/^#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/($8":Ġ"!!)("'#&'#`),R(`%%;7/e#$%2J""6J7K/,#;7/#$+")("'#&'#0<*%2J""6J7K/,#;7/#$+")("'#&'#&/#$+")("'#&'#/"!&,)`),R(`%;L.# &;™/]#$%;B/,#;¸/#$+")("'#&'#06*%;B/,#;¸/#$+")("'#&'#&/'$8":ġ" )("'#&'#`),R(";¹.# &; "),R(`%3Ģ""5#7ģ/:#;</1$;6/($8#:Ĥ#! )(#'#("'#&'#`),R("%$;!/&#0#*;!&&&#/' 8!:ĥ!! )"),R("%;ž/' 8!:Ħ!! )"),R(`%$;š0#*;š&/x#;@/o$;M/f$;?/]$$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/'$8%:ħ% )(%'#($'#(#'#("'#&'#`),R(";¾"),R(`%3Ĩ""5&7ĩ/k#;./b$;Á/Y$$%;A/,#;Á/#$+")("'#&'#06*%;A/,#;Á/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#.# &;¿`),R(`%;6/k#;./b$;À/Y$$%;A/,#;À/#$+")("'#&'#06*%;A/,#;À/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),R(`%;6/;#;</2$;6.# &;H/#$+#)(#'#("'#&'#`),R(";Â.G &;Ä.A &;Æ.; &;È.5 &;É./ &;Ê.) &;Ë.# &;À"),R(`%3Ī""5%7ī/5#;</,$;Ã/#$+#)(#'#("'#&'#`),R("%;I/' 8!:Ĭ!! )"),R(`%3ĭ""5&7Į/—#;</Ž$;D/…$;Å/|$$%$;'/&#0#*;'&&&#/,#;Å/#$+")("'#&'#0C*%$;'/&#0#*;'&&&#/,#;Å/#$+")("'#&'#&/,$;E/#$+&)(&'#(%'#($'#(#'#("'#&'#`),R(";t.# &;w"),R(`%3į""5%7İ/5#;</,$;Ç/#$+#)(#'#("'#&'#`),R("%;I/' 8!:ı!! )"),R(`%3IJ""5&7ij/:#;</1$;I/($8#:Ĵ#! )(#'#("'#&'#`),R(`%3ĵ""5%7Ķ/]#;</T$%3ķ""5$7ĸ/& 8!:Ĺ! ).4 &%3ĺ""5%7Ļ/& 8!:ļ! )/#$+#)(#'#("'#&'#`),R(`%3Ľ""5)7ľ/R#;</I$3Ŀ""5#7ŀ./ &3Ł""5(7ł.# &;6/($8#:Ń#! )(#'#("'#&'#`),R(`%3ń""5#7Ņ/“#;</Š$;D/$%;Ì/e#$%2D""6D7E/,#;Ì/#$+")("'#&'#0<*%2D""6D7E/,#;Ì/#$+")("'#&'#&/#$+")("'#&'#/,$;E/#$+%)(%'#($'#(#'#("'#&'#`),R(`%3ņ""5(7Ň./ &3ň""5$7ʼn.# &;6/' 8!:Ŋ!! )`),R(`%;6/Y#$%;A/,#;6/#$+")("'#&'#06*%;A/,#;6/#$+")("'#&'#&/#$+")("'#&'#`),R(`%;Ï/G#;./>$;Ï/5$;./,$;/#$+%)(%'#($'#(#'#("'#&'#`),R("%$;!/&#0#*;!&&&#/' 8!:ŋ!! )"),R(`%;Ñ/]#$%;A/,#;Ñ/#$+")("'#&'#06*%;A/,#;Ñ/#$+")("'#&'#&/'$8":Ō" )("'#&'#`),R(`%;™/]#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/'$8":ō" )("'#&'#`),R(`%;L.O &;™.I &%;@." &"/:#;t/1$;?." &"/#$+#)(#'#("'#&'#/]#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/'$8":Ŏ" )("'#&'#`),R(`%;Ô/]#$%;B/,#;Õ/#$+")("'#&'#06*%;B/,#;Õ/#$+")("'#&'#&/'$8":ŏ" )("'#&'#`),R("%;–/& 8!:Ő! )"),R(`%3ő""5(7Œ/:#;</1$;6/($8#:œ#! )(#'#("'#&'#.g &%3Ŕ""5&7ŕ/:#;</1$;6/($8#:Ŗ#! )(#'#("'#&'#.: &%3ŗ""5*7Ř/& 8!:ř! ).# &; `),R(`%%;6/k#$%;A/2#;6/)$8":Ś""$ )("'#&'#0<*%;A/2#;6/)$8":Ś""$ )("'#&'#&/)$8":ś""! )("'#&'#." &"/' 8!:Ŝ!! )`),R(`%;Ø/Y#$%;A/,#;Ø/#$+")("'#&'#06*%;A/,#;Ø/#$+")("'#&'#&/#$+")("'#&'#`),R(`%;™/Y#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/#$+")("'#&'#`),R("%$;!/&#0#*;!&&&#/' 8!:ŝ!! )"),R(`%;Û/Y#$%;B/,#;Ü/#$+")("'#&'#06*%;B/,#;Ü/#$+")("'#&'#&/#$+")("'#&'#`),R(`%3Ş""5&7ş.; &3Š""5'7š./ &3Ţ""5*7ţ.# &;6/& 8!:Ť! )`),R(`%3ť""5&7Ŧ/:#;</1$;Ý/($8#:ŧ#! )(#'#("'#&'#.} &%3õ""5'7ö/:#;</1$;ž/($8#:Ũ#! )(#'#("'#&'#.P &%3ũ""5+7Ū/:#;</1$;ž/($8#:ū#! )(#'#("'#&'#.# &; `),R(`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`),R(';1." &"'),R(`%%;6/k#$%;A/2#;6/)$8":Ś""$ )("'#&'#0<*%;A/2#;6/)$8":Ś""$ )("'#&'#&/)$8":ś""! )("'#&'#." &"/' 8!:ź!! )`),R(`%;L.# &;™/]#$%;B/,#;á/#$+")("'#&'#06*%;B/,#;á/#$+")("'#&'#&/'$8":Ż" )("'#&'#`),R(";¹.# &; "),R(`%;ã/Y#$%;A/,#;ã/#$+")("'#&'#06*%;A/,#;ã/#$+")("'#&'#&/#$+")("'#&'#`),R(`%;ê/k#;./b$;í/Y$$%;B/,#;ä/#$+")("'#&'#06*%;B/,#;ä/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),R(";å.; &;æ.5 &;ç./ &;è.) &;é.# &; "),R(`%3ż""5#7Ž/:#;</1$;ð/($8#:ž#! )(#'#("'#&'#`),R(`%3ſ""5%7ƀ/:#;</1$;T/($8#:Ɓ#! )(#'#("'#&'#`),R(`%3Ƃ""5(7ƃ/F#;</=$;\\.) &;Y.# &;X/($8#:Ƅ#! )(#'#("'#&'#`),R(`%3ƅ""5&7Ɔ/:#;</1$;6/($8#:Ƈ#! )(#'#("'#&'#`),R(`%3ƈ""5%7Ɖ/A#;</8$$;!0#*;!&/($8#:Ɗ#! )(#'#("'#&'#`),R(`%;ë/G#;;/>$;6/5$;;/,$;ì/#$+%)(%'#($'#(#'#("'#&'#`),R(`%3’""5#7Ó.# &;6/' 8!:Ƌ!! )`),R(`%3±""5#7ƌ.G &3³""5#7ƍ.; &3·""5#7Ǝ./ &3µ""5$7Ə.# &;6/' 8!:Ɛ!! )`),R(`%;î/D#%;C/,#;ï/#$+")("'#&'#." &"/#$+")("'#&'#`),R("%;U.) &;\\.# &;X/& 8!:Ƒ! )"),R(`%%;!." &"/[#;!." &"/M$;!." &"/?$;!." &"/1$;!." &"/#$+%)(%'#($'#(#'#("'#&'#/' 8!:ƒ!! )`),R(`%%;!/?#;!." &"/1$;!." &"/#$+#)(#'#("'#&'#/' 8!:Ɠ!! )`),R(";¾"),R(`%;ž/^#$%;B/,#;ó/#$+")("'#&'#06*%;B/,#;ó/#$+")("'#&'#&/($8":Ɣ"!!)("'#&'#`),R(";ô.# &; "),R(`%2ƕ""6ƕ7Ɩ/L#;</C$2Ɨ""6Ɨ7Ƙ.) &2ƙ""6ƙ7ƚ/($8#:ƛ#! )(#'#("'#&'#`),R(`%;ž/^#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/($8":Ɯ"!!)("'#&'#`),R(`%;6/5#;0/,$;÷/#$+#)(#'#("'#&'#`),R("$;2.) &;4.# &;.0/*;2.) &;4.# &;.&"),R("$;%0#*;%&"),R(`%;ú/;#28""6879/,$;û/#$+#)(#'#("'#&'#`),R(`%3Ɲ""5%7ƞ.) &3Ɵ""5$7Ơ/' 8!:ơ!! )`),R(`%;ü/J#%28""6879/,#;^/#$+")("'#&'#." &"/#$+")("'#&'#`),R("%;\\.) &;X.# &;‚/' 8!:Ƣ!! )"),R(';".S &;!.M &2F""6F7G.A &2J""6J7K.5 &2H""6H7I.) &2N""6N7O'),R('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?'),R(`%;Ā/b#28""6879/S$;û/J$%2ƣ""6ƣ7Ƥ/,#;ì/#$+")("'#&'#." &"/#$+$)($'#(#'#("'#&'#`),R(`%3ƥ""5%7Ʀ.) &3Ƨ""5$7ƨ/' 8!:ơ!! )`),R(`%3±""5#7².6 &3³""5#7´.* &$;+0#*;+&/' 8!:Ʃ!! )`),R(`%;Ą/‡#2F""6F7G/x$;ă/o$2F""6F7G/\`$;ă/W$2F""6F7G/H$;ă/?$2F""6F7G/0$;ą/'$8):ƪ) )()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#`),R(`%;#/>#;#/5$;#/,$;#/#$+$)($'#(#'#("'#&'#`),R(`%;ă/,#;ă/#$+")("'#&'#`),R(`%;ă/5#;ă/,$;ă/#$+#)(#'#("'#&'#`),R(`%;q/T#$;m0#*;m&/D$%; /,#;ø/#$+")("'#&'#." &"/#$+#)(#'#("'#&'#`),R(`%2ƫ""6ƫ7Ƭ.) &2ƭ""6ƭ7Ʈ/w#;0/n$;Ĉ/e$$%;B/2#;ĉ.# &; /#$+")("'#&'#0<*%;B/2#;ĉ.# &; /#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),R(";™.# &;L"),R(`%2Ư""6Ư7ư/5#;</,$;Ċ/#$+#)(#'#("'#&'#`),R(`%;D/S#;,/J$2:""6:7;/;$;,.# &;T/,$;E/#$+%)(%'#($'#(#'#("'#&'#`)];let w=0,S=0;const b=[{line:1,column:1}];let T=0,A=[],H=0,P;if(r.startRule!==void 0){if(!(r.startRule in f))throw new Error(`Can't start parsing from rule "`+r.startRule+'".');p=f[r.startRule]}function j(){return o.substring(S,w)}function z(){return K(S,w)}function N(F,L){return{type:"literal",text:F,ignoreCase:L}}function B(F,L,M){return{type:"class",parts:F,inverted:L,ignoreCase:M}}function U(){return{type:"end"}}function q(F){let L=b[F],M;if(L)return L;for(M=F-1;!b[M];)M--;for(L=b[M],L={line:L.line,column:L.column};M<F;)o.charCodeAt(M)===10?(L.line++,L.column=1):L.column++,M++;return b[F]=L,L}function K(F,L){const M=q(F),_e=q(L);return{source:l,start:{offset:F,line:M.line,column:M.column},end:{offset:L,line:_e.line,column:_e.column}}}function Z(F){w<T||(w>T&&(T=w,A=[]),A.push(F))}function ee(F,L,M){return new Kf(Kf.buildMessage(F,L),F,L,M)}function R(F){return F.split("").map(L=>L.charCodeAt(0)-32)}function Se(F){const L=C[F];let M=0;const _e=[];let be=L.length;const $e=[],ge=[];let Ee;for(;;){for(;M<be;)switch(L[M]){case 0:ge.push(v[L[M+1]]),M+=2;break;case 1:ge.push(void 0),M++;break;case 2:ge.push(null),M++;break;case 3:ge.push(i),M++;break;case 4:ge.push([]),M++;break;case 5:ge.push(w),M++;break;case 6:ge.pop(),M++;break;case 7:w=ge.pop(),M++;break;case 8:ge.length-=L[M+1],M+=2;break;case 9:ge.splice(-2,1),M++;break;case 10:ge[ge.length-2].push(ge.pop()),M++;break;case 11:ge.push(ge.splice(ge.length-L[M+1],L[M+1])),M+=2;break;case 12:ge.push(o.substring(ge.pop(),w)),M++;break;case 13:$e.push(be),_e.push(M+3+L[M+1]+L[M+2]),ge[ge.length-1]?(be=M+3+L[M+1],M+=3):(be=M+3+L[M+1]+L[M+2],M+=3+L[M+1]);break;case 14:$e.push(be),_e.push(M+3+L[M+1]+L[M+2]),ge[ge.length-1]===i?(be=M+3+L[M+1],M+=3):(be=M+3+L[M+1]+L[M+2],M+=3+L[M+1]);break;case 15:$e.push(be),_e.push(M+3+L[M+1]+L[M+2]),ge[ge.length-1]!==i?(be=M+3+L[M+1],M+=3):(be=M+3+L[M+1]+L[M+2],M+=3+L[M+1]);break;case 16:ge[ge.length-1]!==i?($e.push(be),_e.push(M),be=M+2+L[M+1],M+=2):M+=2+L[M+1];break;case 17:$e.push(be),_e.push(M+3+L[M+1]+L[M+2]),o.length>w?(be=M+3+L[M+1],M+=3):(be=M+3+L[M+1]+L[M+2],M+=3+L[M+1]);break;case 18:$e.push(be),_e.push(M+4+L[M+2]+L[M+3]),o.substr(w,v[L[M+1]].length)===v[L[M+1]]?(be=M+4+L[M+2],M+=4):(be=M+4+L[M+2]+L[M+3],M+=4+L[M+2]);break;case 19:$e.push(be),_e.push(M+4+L[M+2]+L[M+3]),o.substr(w,v[L[M+1]].length).toLowerCase()===v[L[M+1]]?(be=M+4+L[M+2],M+=4):(be=M+4+L[M+2]+L[M+3],M+=4+L[M+2]);break;case 20:$e.push(be),_e.push(M+4+L[M+2]+L[M+3]),v[L[M+1]].test(o.charAt(w))?(be=M+4+L[M+2],M+=4):(be=M+4+L[M+2]+L[M+3],M+=4+L[M+2]);break;case 21:ge.push(o.substr(w,L[M+1])),w+=L[M+1],M+=2;break;case 22:ge.push(v[L[M+1]]),w+=v[L[M+1]].length,M+=2;break;case 23:ge.push(i),H===0&&Z(v[L[M+1]]),M+=2;break;case 24:S=ge[ge.length-1-L[M+1]],M+=2;break;case 25:S=w,M++;break;case 26:Ee=L.slice(M+4,M+4+L[M+3]).map(function(He){return ge[ge.length-1-He]}),ge.splice(ge.length-L[M+2],L[M+2],v[L[M+1]].apply(null,Ee)),M+=4+L[M+3];break;case 27:ge.push(Se(L[M+1])),M+=2;break;case 28:H++,M++;break;case 29:H--,M++;break;default:throw new Error("Invalid opcode: "+L[M]+".")}if($e.length>0)be=$e.pop(),M=_e.pop();else break}return ge[0]}r.data={};function X(F,L){return[F].concat(L)}if(P=Se(p),P!==i&&w===o.length)return P;throw P!==i&&w<o.length&&Z(U()),ee(A,T<o.length?o.charAt(T):null,T<o.length?K(T,T+1):K(T,T))}const VR=YR;var qn;(function(o){function r(f,p){const v={startRule:p};try{VR(f,v)}catch{v.data=-1}return v.data}o.parse=r;function i(f){const p=o.parse(f,"Name_Addr_Header");return p!==-1?p:void 0}o.nameAddrHeaderParse=i;function l(f){const p=o.parse(f,"SIP_URI");return p!==-1?p:void 0}o.URIParse=l})(qn=qn||(qn={}));const WR={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 _c(o,r=32){let i="";for(let l=0;l<o;l++){const f=Math.floor(Math.random()*r);i+=f.toString(r)}return i}function Cv(o){return WR[o]||""}function wv(){return _c(10)}function Eo(o){const r={"Call-Id":"Call-ID",Cseq:"CSeq","Min-Se":"Min-SE",Rack:"RAck",Rseq:"RSeq","Www-Authenticate":"WWW-Authenticate"},i=o.toLowerCase().replace(/_/g,"-").split("-"),l=i.length;let f="";for(let p=0;p<l;p++)p!==0&&(f+="-"),f+=i[p].charAt(0).toUpperCase()+i[p].substring(1);return r[f]&&(f=r[f]),f}function e0(o){return encodeURIComponent(o).replace(/%[A-F\d]{2}/g,"U").length}class U2{constructor(){this.headers={}}addHeader(r,i){const l={raw:i};r=Eo(r),this.headers[r]?this.headers[r].push(l):this.headers[r]=[l]}getHeader(r){const i=this.headers[Eo(r)];if(i){if(i[0])return i[0].raw}else return}getHeaders(r){const i=this.headers[Eo(r)],l=[];if(!i)return[];for(const f of i)l.push(f.raw);return l}hasHeader(r){return!!this.headers[Eo(r)]}parseHeader(r,i=0){if(r=Eo(r),this.headers[r]){if(i>=this.headers[r].length)return}else return;const l=this.headers[r][i],f=l.raw;if(l.parsed)return l.parsed;const p=qn.parse(f,r.replace(/-/g,"_"));if(p===-1){this.headers[r].splice(i,1);return}else return l.parsed=p,p}s(r,i=0){return this.parseHeader(r,i)}setHeader(r,i){this.headers[Eo(r)]=[{raw:i}]}toString(){return this.data}}class Qf extends U2{constructor(){super()}}class vu extends U2{constructor(){super()}}class Dc{constructor(r,i,l,f,p,v,C){this.headers={},this.extraHeaders=[],this.options=Dc.getDefaultOptions(),p&&(this.options=Object.assign(Object.assign({},this.options),p),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())),v&&v.length&&(this.extraHeaders=v.slice()),C&&(this.body={body:C.content,contentType:C.contentType}),this.method=r,this.ruri=i.clone(),this.fromURI=l.clone(),this.fromTag=this.options.fromTag?this.options.fromTag:wv(),this.from=Dc.makeNameAddrHeader(this.fromURI,this.options.fromDisplayName,this.fromTag),this.toURI=f.clone(),this.toTag=this.options.toTag,this.to=Dc.makeNameAddrHeader(this.toURI,this.options.toDisplayName,this.toTag),this.callId=this.options.callId?this.options.callId:this.options.callIdPrefix+_c(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(r,i,l){const f={};return l&&(f.tag=l),new ma(r,i,f)}getHeader(r){const i=this.headers[Eo(r)];if(i){if(i[0])return i[0]}else{const l=new RegExp("^\\s*"+r+"\\s*:","i");for(const f of this.extraHeaders)if(l.test(f))return f.substring(f.indexOf(":")+1).trim()}}getHeaders(r){const i=[],l=this.headers[Eo(r)];if(l)for(const f of l)i.push(f);else{const f=new RegExp("^\\s*"+r+"\\s*:","i");for(const p of this.extraHeaders)f.test(p)&&i.push(p.substring(p.indexOf(":")+1).trim())}return i}hasHeader(r){if(this.headers[Eo(r)])return!0;{const i=new RegExp("^\\s*"+r+"\\s*:","i");for(const l of this.extraHeaders)if(i.test(l))return!0}return!1}setHeader(r,i){this.headers[Eo(r)]=i instanceof Array?i:[i]}setViaHeader(r,i){this.options.hackViaTcp&&(i="TCP");let l="SIP/2.0/"+i;l+=" "+this.options.viaHost+";branch="+r,this.options.forceRport&&(l+=";rport"),this.setHeader("via",l),this.branch=r}toString(){let r="";r+=this.method+" "+this.ruri.toRaw()+` SIP/2.0\r
362
- `;for(const i in this.headers)if(this.headers[i])for(const l of this.headers[i])r+=i+": "+l+`\r
363
- `;for(const i of this.extraHeaders)r+=i.trim()+`\r
364
- `;return r+="Supported: "+this.options.optionTags.join(", ")+`\r
365
- `,r+="User-Agent: "+this.options.userAgentString+`\r
366
- `,this.body?typeof this.body=="string"?(r+="Content-Length: "+e0(this.body)+`\r
1
+ var OmnixWidget=function(Ds){"use strict";class Qi{constructor(){this.listeners={}}on(n,s){return this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push(s),()=>this.off(n,s)}off(n,s){this.listeners[n]&&(this.listeners[n]=this.listeners[n].filter(o=>o!==s))}emitLocal(n,s){this.listeners[n]&&this.listeners[n].forEach(o=>{try{o(s)}catch(c){console.error(`Error in event listener for ${n}:`,c)}})}emitToParent(n,s){this.emitLocal(n,s)}}const Zt=new Qi;function Zi(f){return f&&f.__esModule&&Object.prototype.hasOwnProperty.call(f,"default")?f.default:f}const Jr={title:"JsSIP",version:"3.13.8"},Qr=Jr;var oe={USER_AGENT:`${Qr.title} ${Qr.version}`,SIP:"sip",SIPS:"sips",causes:{CONNECTION_ERROR:"Connection Error",REQUEST_TIMEOUT:"Request Timeout",SIP_FAILURE_CODE:"SIP Failure Code",INTERNAL_ERROR:"Internal Error",BUSY:"Busy",REJECTED:"Rejected",REDIRECTED:"Redirected",UNAVAILABLE:"Unavailable",NOT_FOUND:"Not Found",ADDRESS_INCOMPLETE:"Address Incomplete",INCOMPATIBLE_SDP:"Incompatible SDP",MISSING_SDP:"Missing SDP",AUTHENTICATION_ERROR:"Authentication Error",BYE:"Terminated",WEBRTC_ERROR:"WebRTC Error",CANCELED:"Canceled",NO_ANSWER:"No Answer",EXPIRES:"Expires",NO_ACK:"No ACK",DIALOG_ERROR:"Dialog Error",USER_DENIED_MEDIA_ACCESS:"User Denied Media Access",BAD_MEDIA_DESCRIPTION:"Bad Media Description",RTP_TIMEOUT:"RTP Timeout"},SIP_ERROR_CAUSES:{REDIRECTED:[300,301,302,305,380],BUSY:[486,600],REJECTED:[403,603],NOT_FOUND:[404,604],UNAVAILABLE:[480,410,408,430],ADDRESS_INCOMPLETE:[484,424],INCOMPATIBLE_SDP:[488,606],AUTHENTICATION_ERROR:[401,407]},ACK:"ACK",BYE:"BYE",CANCEL:"CANCEL",INFO:"INFO",INVITE:"INVITE",MESSAGE:"MESSAGE",NOTIFY:"NOTIFY",OPTIONS:"OPTIONS",REGISTER:"REGISTER",REFER:"REFER",UPDATE:"UPDATE",SUBSCRIBE:"SUBSCRIBE",DTMF_TRANSPORT:{INFO:"INFO",RFC2833:"RFC2833"},REASON_PHRASE:{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",424:"Bad Location Information",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:"JsSIP Internal 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"},ALLOWED_METHODS:"INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO,NOTIFY,SUBSCRIBE",ACCEPTED_BODY_TYPES:"application/sdp, application/dtmf-relay",MAX_FORWARDS:69,SESSION_EXPIRES:90,MIN_SESSION_EXPIRES:60,CONNECTION_RECOVERY_MAX_INTERVAL:30,CONNECTION_RECOVERY_MIN_INTERVAL:2};class ea extends Error{constructor(n,s){super(),this.code=1,this.name="CONFIGURATION_ERROR",this.parameter=n,this.value=s,this.message=this.value?`Invalid value ${JSON.stringify(this.value)} for parameter "${this.parameter}"`:`Missing parameter: ${this.parameter}`}}class ta extends Error{constructor(n){super(),this.code=2,this.name="INVALID_STATE_ERROR",this.status=n,this.message=`Invalid status: ${n}`}}class sa extends Error{constructor(n){super(),this.code=3,this.name="NOT_SUPPORTED_ERROR",this.message=n}}class ra extends Error{constructor(n){super(),this.code=4,this.name="NOT_READY_ERROR",this.message=n}}var He={ConfigurationError:ea,InvalidStateError:ta,NotSupportedError:sa,NotReadyError:ra},fe={},Us,Zr;function $s(){if(Zr)return Us;Zr=1;const f=Ze(),n=$e();return Us=class Xi{static parse(o){if(o=n.parse(o,"Name_Addr_Header"),o!==-1)return o}constructor(o,c,t){if(!o||!(o instanceof f))throw new TypeError('missing or invalid "uri" parameter');this._uri=o,this._parameters={},this.display_name=c;for(const d in t)Object.prototype.hasOwnProperty.call(t,d)&&this.setParam(d,t[d])}get uri(){return this._uri}get display_name(){return this._display_name}set display_name(o){this._display_name=o===0?"0":o}setParam(o,c){o&&(this._parameters[o.toLowerCase()]=typeof c>"u"||c===null?null:c.toString())}getParam(o){if(o)return this._parameters[o.toLowerCase()]}hasParam(o){if(o)return this._parameters.hasOwnProperty(o.toLowerCase())&&!0||!1}deleteParam(o){if(o=o.toLowerCase(),this._parameters.hasOwnProperty(o)){const c=this._parameters[o];return delete this._parameters[o],c}}clearParams(){this._parameters={}}clone(){return new Xi(this._uri.clone(),this._display_name,JSON.parse(JSON.stringify(this._parameters)))}_quote(o){return o.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}toString(){let o=this._display_name?`"${this._quote(this._display_name)}" `:"";o+=`<${this._uri.toString()}>`;for(const c in this._parameters)Object.prototype.hasOwnProperty.call(this._parameters,c)&&(o+=`;${c}`,this._parameters[c]!==null&&(o+=`=${this._parameters[c]}`));return o}},Us}var Ps,en;function $e(){return en||(en=1,Ps=function(){function f(s){return'"'+s.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E-\x1F\x80-\uFFFF]/g,escape)+'"'}var n={parse:function(s,o){var c={CRLF:g,DIGIT:m,ALPHA:S,HEXDIG:O,WSP:H,OCTET:B,DQUOTE:k,SP:U,HTAB:de,alphanum:ne,reserved:tt,unreserved:y,mark:$,escaped:ae,LWS:_e,SWS:X,HCOLON:ft,TEXT_UTF8_TRIM:N,TEXT_UTF8char:I,UTF8_NONASCII:b,UTF8_CONT:w,LHEX:bt,token:q,token_nodot:ze,separators:wt,word:We,STAR:ht,SLASH:Xe,EQUAL:z,LPAREN:dt,RPAREN:_t,RAQUOT:st,LAQUOT:rt,COMMA:Z,SEMI:j,COLON:pt,LDQUOT:nt,RDQUOT:ps,comment:W,ctext:G,quoted_string:V,quoted_string_clean:K,qdtext:ue,quoted_pair:ce,SIP_URI_noparams:te,SIP_URI:Je,uri_scheme:Oe,uri_scheme_sips:ol,uri_scheme_sip:ul,userinfo:ms,user:cl,user_unreserved:Ir,password:fl,hostport:gs,host:Wt,hostname:br,domainlabel:wr,toplabel:hl,IPv6reference:yr,IPv6address:Nr,h16:P,ls32:xe,IPv4address:Vt,dec_octet:jt,port:dl,uri_parameters:_l,uri_parameter:Or,transport_param:pl,user_param:ml,method_param:gl,ttl_param:Tl,maddr_param:El,lr_param:Sl,other_param:Cl,pname:Al,pvalue:vl,paramchar:Yt,param_unreserved:Rl,headers:Il,header:Ts,hname:bl,hvalue:wl,hnv_unreserved:Kt,Request_Response:Ju,Request_Line:yl,Request_URI:Nl,absoluteURI:xr,hier_part:Ol,net_path:xl,abs_path:Es,opaque_part:Dl,uric:zt,uric_no_slash:Ul,path_segments:$l,segment:Ss,param:Dr,pchar:Xt,scheme:Pl,authority:Ml,srvr:Ll,reg_name:Hl,query:Fl,SIP_Version:Ur,INVITEm:kl,ACKm:ql,OPTIONSm:Gl,BYEm:Bl,CANCELm:Wl,REGISTERm:Vl,SUBSCRIBEm:jl,NOTIFYm:Yl,REFERm:Kl,Method:Cs,Status_Line:zl,Status_Code:Xl,extension_code:Jl,Reason_Phrase:Ql,Allow_Events:Qu,Call_ID:Zu,Contact:ec,contact_param:As,name_addr:mt,display_name:vs,contact_params:$r,c_p_q:Zl,c_p_expires:ei,delta_seconds:gt,qvalue:ti,generic_param:Te,gen_value:si,Content_Disposition:tc,disp_type:ri,disp_param:Pr,handling_param:ni,Content_Encoding:sc,Content_Length:rc,Content_Type:nc,media_type:li,m_type:ii,discrete_type:ai,composite_type:oi,extension_token:Rs,x_token:ui,m_subtype:ci,m_parameter:Mr,m_value:fi,CSeq:lc,CSeq_value:hi,Expires:ic,Event:ac,event_type:Jt,From:oc,from_param:Lr,tag_param:Hr,Max_Forwards:uc,Min_Expires:cc,Name_Addr_Header:fc,Proxy_Authenticate:hc,challenge:Fr,other_challenge:di,auth_param:Qt,digest_cln:Is,realm:_i,realm_value:pi,domain:mi,URI:bs,nonce:gi,nonce_value:Ti,opaque:Ei,stale:Si,algorithm:Ci,qop_options:Ai,qop_value:ws,Proxy_Require:dc,Record_Route:_c,rec_route:ys,Reason:pc,reason_param:kr,reason_cause:vi,Require:mc,Route:gc,route_param:Ns,Subscription_State:Tc,substate_value:Ri,subexp_params:qr,event_reason_value:Ii,Subject:Ec,Supported:Sc,To:Cc,to_param:Gr,Via:Ac,via_param:Os,via_params:Br,via_ttl:bi,via_maddr:wi,via_received:yi,via_branch:Ni,response_port:Oi,rport:xi,sent_protocol:Di,protocol_name:Ui,transport:$i,sent_by:Pi,via_host:Mi,via_port:Li,ttl:Wr,WWW_Authenticate:vc,Session_Expires:Rc,s_e_expires:Hi,s_e_params:Vr,s_e_refresher:Fi,extension_header:Ic,header_value:ki,message_body:bc,uuid_URI:wc,uuid:qi,hex4:Qe,hex8:Gi,hex12:Bi,Refer_To:yc,Replaces:Nc,call_id:Wi,replaces_param:jr,to_tag:Vi,from_tag:ji,early_flag:Yi};if(o!==void 0){if(c[o]===void 0)throw new Error("Invalid rule name: "+f(o)+".")}else o="CRLF";var t=0,d=0,p=[];function a(e){t<d||(t>d&&(d=t,p=[]),p.push(e))}function g(){var e;return s.substr(t,2)===`\r
2
+ `?(e=`\r
3
+ `,t+=2):(e=null,a('"\\r\\n"')),e}function m(){var e;return/^[0-9]/.test(s.charAt(t))?(e=s.charAt(t),t++):(e=null,a("[0-9]")),e}function S(){var e;return/^[a-zA-Z]/.test(s.charAt(t))?(e=s.charAt(t),t++):(e=null,a("[a-zA-Z]")),e}function O(){var e;return/^[0-9a-fA-F]/.test(s.charAt(t))?(e=s.charAt(t),t++):(e=null,a("[0-9a-fA-F]")),e}function H(){var e;return e=U(),e===null&&(e=de()),e}function B(){var e;return/^[\0-\xFF]/.test(s.charAt(t))?(e=s.charAt(t),t++):(e=null,a("[\\0-\\xFF]")),e}function k(){var e;return/^["]/.test(s.charAt(t))?(e=s.charAt(t),t++):(e=null,a('["]')),e}function U(){var e;return s.charCodeAt(t)===32?(e=" ",t++):(e=null,a('" "')),e}function de(){var e;return s.charCodeAt(t)===9?(e=" ",t++):(e=null,a('"\\t"')),e}function ne(){var e;return/^[a-zA-Z0-9]/.test(s.charAt(t))?(e=s.charAt(t),t++):(e=null,a("[a-zA-Z0-9]")),e}function tt(){var e;return s.charCodeAt(t)===59?(e=";",t++):(e=null,a('";"')),e===null&&(s.charCodeAt(t)===47?(e="/",t++):(e=null,a('"/"')),e===null&&(s.charCodeAt(t)===63?(e="?",t++):(e=null,a('"?"')),e===null&&(s.charCodeAt(t)===58?(e=":",t++):(e=null,a('":"')),e===null&&(s.charCodeAt(t)===64?(e="@",t++):(e=null,a('"@"')),e===null&&(s.charCodeAt(t)===38?(e="&",t++):(e=null,a('"&"')),e===null&&(s.charCodeAt(t)===61?(e="=",t++):(e=null,a('"="')),e===null&&(s.charCodeAt(t)===43?(e="+",t++):(e=null,a('"+"')),e===null&&(s.charCodeAt(t)===36?(e="$",t++):(e=null,a('"$"')),e===null&&(s.charCodeAt(t)===44?(e=",",t++):(e=null,a('","'))))))))))),e}function y(){var e;return e=ne(),e===null&&(e=$()),e}function $(){var e;return s.charCodeAt(t)===45?(e="-",t++):(e=null,a('"-"')),e===null&&(s.charCodeAt(t)===95?(e="_",t++):(e=null,a('"_"')),e===null&&(s.charCodeAt(t)===46?(e=".",t++):(e=null,a('"."')),e===null&&(s.charCodeAt(t)===33?(e="!",t++):(e=null,a('"!"')),e===null&&(s.charCodeAt(t)===126?(e="~",t++):(e=null,a('"~"')),e===null&&(s.charCodeAt(t)===42?(e="*",t++):(e=null,a('"*"')),e===null&&(s.charCodeAt(t)===39?(e="'",t++):(e=null,a(`"'"`)),e===null&&(s.charCodeAt(t)===40?(e="(",t++):(e=null,a('"("')),e===null&&(s.charCodeAt(t)===41?(e=")",t++):(e=null,a('")"')))))))))),e}function ae(){var e,r,l,i,u;return i=t,u=t,s.charCodeAt(t)===37?(e="%",t++):(e=null,a('"%"')),e!==null?(r=O(),r!==null?(l=O(),l!==null?e=[e,r,l]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(h,_){return _.join("")}(i,e)),e===null&&(t=i),e}function _e(){var e,r,l,i,u,h;for(i=t,u=t,h=t,e=[],r=H();r!==null;)e.push(r),r=H();if(e!==null?(r=g(),r!==null?e=[e,r]:(e=null,t=h)):(e=null,t=h),e=e!==null?e:"",e!==null){if(l=H(),l!==null)for(r=[];l!==null;)r.push(l),l=H();else r=null;r!==null?e=[e,r]:(e=null,t=u)}else e=null,t=u;return e!==null&&(e=function(_){return" "}()),e===null&&(t=i),e}function X(){var e;return e=_e(),e=e!==null?e:"",e}function ft(){var e,r,l,i,u;for(i=t,u=t,e=[],r=U(),r===null&&(r=de());r!==null;)e.push(r),r=U(),r===null&&(r=de());return e!==null?(s.charCodeAt(t)===58?(r=":",t++):(r=null,a('":"')),r!==null?(l=X(),l!==null?e=[e,r,l]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(h){return":"}()),e===null&&(t=i),e}function N(){var e,r,l,i,u,h,_;if(u=t,h=t,r=I(),r!==null)for(e=[];r!==null;)e.push(r),r=I();else e=null;if(e!==null){for(r=[],_=t,l=[],i=_e();i!==null;)l.push(i),i=_e();for(l!==null?(i=I(),i!==null?l=[l,i]:(l=null,t=_)):(l=null,t=_);l!==null;){for(r.push(l),_=t,l=[],i=_e();i!==null;)l.push(i),i=_e();l!==null?(i=I(),i!==null?l=[l,i]:(l=null,t=_)):(l=null,t=_)}r!==null?e=[e,r]:(e=null,t=h)}else e=null,t=h;return e!==null&&(e=function(E){return s.substring(t,E)}(u)),e===null&&(t=u),e}function I(){var e;return/^[!-~]/.test(s.charAt(t))?(e=s.charAt(t),t++):(e=null,a("[!-~]")),e===null&&(e=b()),e}function b(){var e;return/^[\x80-\uFFFF]/.test(s.charAt(t))?(e=s.charAt(t),t++):(e=null,a("[\\x80-\\uFFFF]")),e}function w(){var e;return/^[\x80-\xBF]/.test(s.charAt(t))?(e=s.charAt(t),t++):(e=null,a("[\\x80-\\xBF]")),e}function bt(){var e;return e=m(),e===null&&(/^[a-f]/.test(s.charAt(t))?(e=s.charAt(t),t++):(e=null,a("[a-f]"))),e}function q(){var e,r,l;if(l=t,r=ne(),r===null&&(s.charCodeAt(t)===45?(r="-",t++):(r=null,a('"-"')),r===null&&(s.charCodeAt(t)===46?(r=".",t++):(r=null,a('"."')),r===null&&(s.charCodeAt(t)===33?(r="!",t++):(r=null,a('"!"')),r===null&&(s.charCodeAt(t)===37?(r="%",t++):(r=null,a('"%"')),r===null&&(s.charCodeAt(t)===42?(r="*",t++):(r=null,a('"*"')),r===null&&(s.charCodeAt(t)===95?(r="_",t++):(r=null,a('"_"')),r===null&&(s.charCodeAt(t)===43?(r="+",t++):(r=null,a('"+"')),r===null&&(s.charCodeAt(t)===96?(r="`",t++):(r=null,a('"`"')),r===null&&(s.charCodeAt(t)===39?(r="'",t++):(r=null,a(`"'"`)),r===null&&(s.charCodeAt(t)===126?(r="~",t++):(r=null,a('"~"')))))))))))),r!==null)for(e=[];r!==null;)e.push(r),r=ne(),r===null&&(s.charCodeAt(t)===45?(r="-",t++):(r=null,a('"-"')),r===null&&(s.charCodeAt(t)===46?(r=".",t++):(r=null,a('"."')),r===null&&(s.charCodeAt(t)===33?(r="!",t++):(r=null,a('"!"')),r===null&&(s.charCodeAt(t)===37?(r="%",t++):(r=null,a('"%"')),r===null&&(s.charCodeAt(t)===42?(r="*",t++):(r=null,a('"*"')),r===null&&(s.charCodeAt(t)===95?(r="_",t++):(r=null,a('"_"')),r===null&&(s.charCodeAt(t)===43?(r="+",t++):(r=null,a('"+"')),r===null&&(s.charCodeAt(t)===96?(r="`",t++):(r=null,a('"`"')),r===null&&(s.charCodeAt(t)===39?(r="'",t++):(r=null,a(`"'"`)),r===null&&(s.charCodeAt(t)===126?(r="~",t++):(r=null,a('"~"'))))))))))));else e=null;return e!==null&&(e=function(i){return s.substring(t,i)}(l)),e===null&&(t=l),e}function ze(){var e,r,l;if(l=t,r=ne(),r===null&&(s.charCodeAt(t)===45?(r="-",t++):(r=null,a('"-"')),r===null&&(s.charCodeAt(t)===33?(r="!",t++):(r=null,a('"!"')),r===null&&(s.charCodeAt(t)===37?(r="%",t++):(r=null,a('"%"')),r===null&&(s.charCodeAt(t)===42?(r="*",t++):(r=null,a('"*"')),r===null&&(s.charCodeAt(t)===95?(r="_",t++):(r=null,a('"_"')),r===null&&(s.charCodeAt(t)===43?(r="+",t++):(r=null,a('"+"')),r===null&&(s.charCodeAt(t)===96?(r="`",t++):(r=null,a('"`"')),r===null&&(s.charCodeAt(t)===39?(r="'",t++):(r=null,a(`"'"`)),r===null&&(s.charCodeAt(t)===126?(r="~",t++):(r=null,a('"~"'))))))))))),r!==null)for(e=[];r!==null;)e.push(r),r=ne(),r===null&&(s.charCodeAt(t)===45?(r="-",t++):(r=null,a('"-"')),r===null&&(s.charCodeAt(t)===33?(r="!",t++):(r=null,a('"!"')),r===null&&(s.charCodeAt(t)===37?(r="%",t++):(r=null,a('"%"')),r===null&&(s.charCodeAt(t)===42?(r="*",t++):(r=null,a('"*"')),r===null&&(s.charCodeAt(t)===95?(r="_",t++):(r=null,a('"_"')),r===null&&(s.charCodeAt(t)===43?(r="+",t++):(r=null,a('"+"')),r===null&&(s.charCodeAt(t)===96?(r="`",t++):(r=null,a('"`"')),r===null&&(s.charCodeAt(t)===39?(r="'",t++):(r=null,a(`"'"`)),r===null&&(s.charCodeAt(t)===126?(r="~",t++):(r=null,a('"~"')))))))))));else e=null;return e!==null&&(e=function(i){return s.substring(t,i)}(l)),e===null&&(t=l),e}function wt(){var e;return s.charCodeAt(t)===40?(e="(",t++):(e=null,a('"("')),e===null&&(s.charCodeAt(t)===41?(e=")",t++):(e=null,a('")"')),e===null&&(s.charCodeAt(t)===60?(e="<",t++):(e=null,a('"<"')),e===null&&(s.charCodeAt(t)===62?(e=">",t++):(e=null,a('">"')),e===null&&(s.charCodeAt(t)===64?(e="@",t++):(e=null,a('"@"')),e===null&&(s.charCodeAt(t)===44?(e=",",t++):(e=null,a('","')),e===null&&(s.charCodeAt(t)===59?(e=";",t++):(e=null,a('";"')),e===null&&(s.charCodeAt(t)===58?(e=":",t++):(e=null,a('":"')),e===null&&(s.charCodeAt(t)===92?(e="\\",t++):(e=null,a('"\\\\"')),e===null&&(e=k(),e===null&&(s.charCodeAt(t)===47?(e="/",t++):(e=null,a('"/"')),e===null&&(s.charCodeAt(t)===91?(e="[",t++):(e=null,a('"["')),e===null&&(s.charCodeAt(t)===93?(e="]",t++):(e=null,a('"]"')),e===null&&(s.charCodeAt(t)===63?(e="?",t++):(e=null,a('"?"')),e===null&&(s.charCodeAt(t)===61?(e="=",t++):(e=null,a('"="')),e===null&&(s.charCodeAt(t)===123?(e="{",t++):(e=null,a('"{"')),e===null&&(s.charCodeAt(t)===125?(e="}",t++):(e=null,a('"}"')),e===null&&(e=U(),e===null&&(e=de())))))))))))))))))),e}function We(){var e,r,l;if(l=t,r=ne(),r===null&&(s.charCodeAt(t)===45?(r="-",t++):(r=null,a('"-"')),r===null&&(s.charCodeAt(t)===46?(r=".",t++):(r=null,a('"."')),r===null&&(s.charCodeAt(t)===33?(r="!",t++):(r=null,a('"!"')),r===null&&(s.charCodeAt(t)===37?(r="%",t++):(r=null,a('"%"')),r===null&&(s.charCodeAt(t)===42?(r="*",t++):(r=null,a('"*"')),r===null&&(s.charCodeAt(t)===95?(r="_",t++):(r=null,a('"_"')),r===null&&(s.charCodeAt(t)===43?(r="+",t++):(r=null,a('"+"')),r===null&&(s.charCodeAt(t)===96?(r="`",t++):(r=null,a('"`"')),r===null&&(s.charCodeAt(t)===39?(r="'",t++):(r=null,a(`"'"`)),r===null&&(s.charCodeAt(t)===126?(r="~",t++):(r=null,a('"~"')),r===null&&(s.charCodeAt(t)===40?(r="(",t++):(r=null,a('"("')),r===null&&(s.charCodeAt(t)===41?(r=")",t++):(r=null,a('")"')),r===null&&(s.charCodeAt(t)===60?(r="<",t++):(r=null,a('"<"')),r===null&&(s.charCodeAt(t)===62?(r=">",t++):(r=null,a('">"')),r===null&&(s.charCodeAt(t)===58?(r=":",t++):(r=null,a('":"')),r===null&&(s.charCodeAt(t)===92?(r="\\",t++):(r=null,a('"\\\\"')),r===null&&(r=k(),r===null&&(s.charCodeAt(t)===47?(r="/",t++):(r=null,a('"/"')),r===null&&(s.charCodeAt(t)===91?(r="[",t++):(r=null,a('"["')),r===null&&(s.charCodeAt(t)===93?(r="]",t++):(r=null,a('"]"')),r===null&&(s.charCodeAt(t)===63?(r="?",t++):(r=null,a('"?"')),r===null&&(s.charCodeAt(t)===123?(r="{",t++):(r=null,a('"{"')),r===null&&(s.charCodeAt(t)===125?(r="}",t++):(r=null,a('"}"'))))))))))))))))))))))))),r!==null)for(e=[];r!==null;)e.push(r),r=ne(),r===null&&(s.charCodeAt(t)===45?(r="-",t++):(r=null,a('"-"')),r===null&&(s.charCodeAt(t)===46?(r=".",t++):(r=null,a('"."')),r===null&&(s.charCodeAt(t)===33?(r="!",t++):(r=null,a('"!"')),r===null&&(s.charCodeAt(t)===37?(r="%",t++):(r=null,a('"%"')),r===null&&(s.charCodeAt(t)===42?(r="*",t++):(r=null,a('"*"')),r===null&&(s.charCodeAt(t)===95?(r="_",t++):(r=null,a('"_"')),r===null&&(s.charCodeAt(t)===43?(r="+",t++):(r=null,a('"+"')),r===null&&(s.charCodeAt(t)===96?(r="`",t++):(r=null,a('"`"')),r===null&&(s.charCodeAt(t)===39?(r="'",t++):(r=null,a(`"'"`)),r===null&&(s.charCodeAt(t)===126?(r="~",t++):(r=null,a('"~"')),r===null&&(s.charCodeAt(t)===40?(r="(",t++):(r=null,a('"("')),r===null&&(s.charCodeAt(t)===41?(r=")",t++):(r=null,a('")"')),r===null&&(s.charCodeAt(t)===60?(r="<",t++):(r=null,a('"<"')),r===null&&(s.charCodeAt(t)===62?(r=">",t++):(r=null,a('">"')),r===null&&(s.charCodeAt(t)===58?(r=":",t++):(r=null,a('":"')),r===null&&(s.charCodeAt(t)===92?(r="\\",t++):(r=null,a('"\\\\"')),r===null&&(r=k(),r===null&&(s.charCodeAt(t)===47?(r="/",t++):(r=null,a('"/"')),r===null&&(s.charCodeAt(t)===91?(r="[",t++):(r=null,a('"["')),r===null&&(s.charCodeAt(t)===93?(r="]",t++):(r=null,a('"]"')),r===null&&(s.charCodeAt(t)===63?(r="?",t++):(r=null,a('"?"')),r===null&&(s.charCodeAt(t)===123?(r="{",t++):(r=null,a('"{"')),r===null&&(s.charCodeAt(t)===125?(r="}",t++):(r=null,a('"}"')))))))))))))))))))))))));else e=null;return e!==null&&(e=function(i){return s.substring(t,i)}(l)),e===null&&(t=l),e}function ht(){var e,r,l,i,u;return i=t,u=t,e=X(),e!==null?(s.charCodeAt(t)===42?(r="*",t++):(r=null,a('"*"')),r!==null?(l=X(),l!==null?e=[e,r,l]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(h){return"*"}()),e===null&&(t=i),e}function Xe(){var e,r,l,i,u;return i=t,u=t,e=X(),e!==null?(s.charCodeAt(t)===47?(r="/",t++):(r=null,a('"/"')),r!==null?(l=X(),l!==null?e=[e,r,l]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(h){return"/"}()),e===null&&(t=i),e}function z(){var e,r,l,i,u;return i=t,u=t,e=X(),e!==null?(s.charCodeAt(t)===61?(r="=",t++):(r=null,a('"="')),r!==null?(l=X(),l!==null?e=[e,r,l]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(h){return"="}()),e===null&&(t=i),e}function dt(){var e,r,l,i,u;return i=t,u=t,e=X(),e!==null?(s.charCodeAt(t)===40?(r="(",t++):(r=null,a('"("')),r!==null?(l=X(),l!==null?e=[e,r,l]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(h){return"("}()),e===null&&(t=i),e}function _t(){var e,r,l,i,u;return i=t,u=t,e=X(),e!==null?(s.charCodeAt(t)===41?(r=")",t++):(r=null,a('")"')),r!==null?(l=X(),l!==null?e=[e,r,l]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(h){return")"}()),e===null&&(t=i),e}function st(){var e,r,l,i;return l=t,i=t,s.charCodeAt(t)===62?(e=">",t++):(e=null,a('">"')),e!==null?(r=X(),r!==null?e=[e,r]:(e=null,t=i)):(e=null,t=i),e!==null&&(e=function(u){return">"}()),e===null&&(t=l),e}function rt(){var e,r,l,i;return l=t,i=t,e=X(),e!==null?(s.charCodeAt(t)===60?(r="<",t++):(r=null,a('"<"')),r!==null?e=[e,r]:(e=null,t=i)):(e=null,t=i),e!==null&&(e=function(u){return"<"}()),e===null&&(t=l),e}function Z(){var e,r,l,i,u;return i=t,u=t,e=X(),e!==null?(s.charCodeAt(t)===44?(r=",",t++):(r=null,a('","')),r!==null?(l=X(),l!==null?e=[e,r,l]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(h){return","}()),e===null&&(t=i),e}function j(){var e,r,l,i,u;return i=t,u=t,e=X(),e!==null?(s.charCodeAt(t)===59?(r=";",t++):(r=null,a('";"')),r!==null?(l=X(),l!==null?e=[e,r,l]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(h){return";"}()),e===null&&(t=i),e}function pt(){var e,r,l,i,u;return i=t,u=t,e=X(),e!==null?(s.charCodeAt(t)===58?(r=":",t++):(r=null,a('":"')),r!==null?(l=X(),l!==null?e=[e,r,l]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(h){return":"}()),e===null&&(t=i),e}function nt(){var e,r,l,i;return l=t,i=t,e=X(),e!==null?(r=k(),r!==null?e=[e,r]:(e=null,t=i)):(e=null,t=i),e!==null&&(e=function(u){return'"'}()),e===null&&(t=l),e}function ps(){var e,r,l,i;return l=t,i=t,e=k(),e!==null?(r=X(),r!==null?e=[e,r]:(e=null,t=i)):(e=null,t=i),e!==null&&(e=function(u){return'"'}()),e===null&&(t=l),e}function W(){var e,r,l,i;if(i=t,e=dt(),e!==null){for(r=[],l=G(),l===null&&(l=ce(),l===null&&(l=W()));l!==null;)r.push(l),l=G(),l===null&&(l=ce(),l===null&&(l=W()));r!==null?(l=_t(),l!==null?e=[e,r,l]:(e=null,t=i)):(e=null,t=i)}else e=null,t=i;return e}function G(){var e;return/^[!-']/.test(s.charAt(t))?(e=s.charAt(t),t++):(e=null,a("[!-']")),e===null&&(/^[*-[]/.test(s.charAt(t))?(e=s.charAt(t),t++):(e=null,a("[*-[]")),e===null&&(/^[\]-~]/.test(s.charAt(t))?(e=s.charAt(t),t++):(e=null,a("[\\]-~]")),e===null&&(e=b(),e===null&&(e=_e())))),e}function V(){var e,r,l,i,u,h;if(u=t,h=t,e=X(),e!==null)if(r=k(),r!==null){for(l=[],i=ue(),i===null&&(i=ce());i!==null;)l.push(i),i=ue(),i===null&&(i=ce());l!==null?(i=k(),i!==null?e=[e,r,l,i]:(e=null,t=h)):(e=null,t=h)}else e=null,t=h;else e=null,t=h;return e!==null&&(e=function(_){return s.substring(t,_)}(u)),e===null&&(t=u),e}function K(){var e,r,l,i,u,h;if(u=t,h=t,e=X(),e!==null)if(r=k(),r!==null){for(l=[],i=ue(),i===null&&(i=ce());i!==null;)l.push(i),i=ue(),i===null&&(i=ce());l!==null?(i=k(),i!==null?e=[e,r,l,i]:(e=null,t=h)):(e=null,t=h)}else e=null,t=h;else e=null,t=h;return e!==null&&(e=function(_){var E=s.substring(t,_).trim();return E.substring(1,E.length-1).replace(/\\([\x00-\x09\x0b-\x0c\x0e-\x7f])/g,"$1")}(u)),e===null&&(t=u),e}function ue(){var e;return e=_e(),e===null&&(s.charCodeAt(t)===33?(e="!",t++):(e=null,a('"!"')),e===null&&(/^[#-[]/.test(s.charAt(t))?(e=s.charAt(t),t++):(e=null,a("[#-[]")),e===null&&(/^[\]-~]/.test(s.charAt(t))?(e=s.charAt(t),t++):(e=null,a("[\\]-~]")),e===null&&(e=b())))),e}function ce(){var e,r,l;return l=t,s.charCodeAt(t)===92?(e="\\",t++):(e=null,a('"\\\\"')),e!==null?(/^[\0-\t]/.test(s.charAt(t))?(r=s.charAt(t),t++):(r=null,a("[\\0-\\t]")),r===null&&(/^[\x0B-\f]/.test(s.charAt(t))?(r=s.charAt(t),t++):(r=null,a("[\\x0B-\\f]")),r===null&&(/^[\x0E-]/.test(s.charAt(t))?(r=s.charAt(t),t++):(r=null,a("[\\x0E-]")))),r!==null?e=[e,r]:(e=null,t=l)):(e=null,t=l),e}function te(){var e,r,l,i,u,h;return u=t,h=t,e=Oe(),e!==null?(s.charCodeAt(t)===58?(r=":",t++):(r=null,a('":"')),r!==null?(l=ms(),l=l!==null?l:"",l!==null?(i=gs(),i!==null?e=[e,r,l,i]:(e=null,t=h)):(e=null,t=h)):(e=null,t=h)):(e=null,t=h),e!==null&&(e=function(_){try{T.uri=new Ki(T.scheme,T.user,T.host,T.port),delete T.scheme,delete T.user,delete T.host,delete T.host_type,delete T.port}catch{T=-1}}()),e===null&&(t=u),e}function Je(){var e,r,l,i,u,h,_,E;return _=t,E=t,e=Oe(),e!==null?(s.charCodeAt(t)===58?(r=":",t++):(r=null,a('":"')),r!==null?(l=ms(),l=l!==null?l:"",l!==null?(i=gs(),i!==null?(u=_l(),u!==null?(h=Il(),h=h!==null?h:"",h!==null?e=[e,r,l,i,u,h]:(e=null,t=E)):(e=null,t=E)):(e=null,t=E)):(e=null,t=E)):(e=null,t=E)):(e=null,t=E),e!==null&&(e=function(v){try{T.uri=new Ki(T.scheme,T.user,T.host,T.port,T.uri_params,T.uri_headers),delete T.scheme,delete T.user,delete T.host,delete T.host_type,delete T.port,delete T.uri_params,o==="SIP_URI"&&(T=T.uri)}catch{T=-1}}()),e===null&&(t=_),e}function Oe(){var e;return e=ol(),e===null&&(e=ul()),e}function ol(){var e,r;return r=t,s.substr(t,4).toLowerCase()==="sips"?(e=s.substr(t,4),t+=4):(e=null,a('"sips"')),e!==null&&(e=function(l,i){T.scheme=i.toLowerCase()}(r,e)),e===null&&(t=r),e}function ul(){var e,r;return r=t,s.substr(t,3).toLowerCase()==="sip"?(e=s.substr(t,3),t+=3):(e=null,a('"sip"')),e!==null&&(e=function(l,i){T.scheme=i.toLowerCase()}(r,e)),e===null&&(t=r),e}function ms(){var e,r,l,i,u,h;return i=t,u=t,e=cl(),e!==null?(h=t,s.charCodeAt(t)===58?(r=":",t++):(r=null,a('":"')),r!==null?(l=fl(),l!==null?r=[r,l]:(r=null,t=h)):(r=null,t=h),r=r!==null?r:"",r!==null?(s.charCodeAt(t)===64?(l="@",t++):(l=null,a('"@"')),l!==null?e=[e,r,l]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(_){T.user=decodeURIComponent(s.substring(t-1,_))}(i)),e===null&&(t=i),e}function cl(){var e,r;if(r=y(),r===null&&(r=ae(),r===null&&(r=Ir())),r!==null)for(e=[];r!==null;)e.push(r),r=y(),r===null&&(r=ae(),r===null&&(r=Ir()));else e=null;return e}function Ir(){var e;return s.charCodeAt(t)===38?(e="&",t++):(e=null,a('"&"')),e===null&&(s.charCodeAt(t)===61?(e="=",t++):(e=null,a('"="')),e===null&&(s.charCodeAt(t)===43?(e="+",t++):(e=null,a('"+"')),e===null&&(s.charCodeAt(t)===36?(e="$",t++):(e=null,a('"$"')),e===null&&(s.charCodeAt(t)===44?(e=",",t++):(e=null,a('","')),e===null&&(s.charCodeAt(t)===59?(e=";",t++):(e=null,a('";"')),e===null&&(s.charCodeAt(t)===63?(e="?",t++):(e=null,a('"?"')),e===null&&(s.charCodeAt(t)===47?(e="/",t++):(e=null,a('"/"'))))))))),e}function fl(){var e,r,l;for(l=t,e=[],r=y(),r===null&&(r=ae(),r===null&&(s.charCodeAt(t)===38?(r="&",t++):(r=null,a('"&"')),r===null&&(s.charCodeAt(t)===61?(r="=",t++):(r=null,a('"="')),r===null&&(s.charCodeAt(t)===43?(r="+",t++):(r=null,a('"+"')),r===null&&(s.charCodeAt(t)===36?(r="$",t++):(r=null,a('"$"')),r===null&&(s.charCodeAt(t)===44?(r=",",t++):(r=null,a('","'))))))));r!==null;)e.push(r),r=y(),r===null&&(r=ae(),r===null&&(s.charCodeAt(t)===38?(r="&",t++):(r=null,a('"&"')),r===null&&(s.charCodeAt(t)===61?(r="=",t++):(r=null,a('"="')),r===null&&(s.charCodeAt(t)===43?(r="+",t++):(r=null,a('"+"')),r===null&&(s.charCodeAt(t)===36?(r="$",t++):(r=null,a('"$"')),r===null&&(s.charCodeAt(t)===44?(r=",",t++):(r=null,a('","'))))))));return e!==null&&(e=function(i){T.password=s.substring(t,i)}(l)),e===null&&(t=l),e}function gs(){var e,r,l,i,u;return i=t,e=Wt(),e!==null?(u=t,s.charCodeAt(t)===58?(r=":",t++):(r=null,a('":"')),r!==null?(l=dl(),l!==null?r=[r,l]:(r=null,t=u)):(r=null,t=u),r=r!==null?r:"",r!==null?e=[e,r]:(e=null,t=i)):(e=null,t=i),e}function Wt(){var e,r;return r=t,e=br(),e===null&&(e=Vt(),e===null&&(e=yr())),e!==null&&(e=function(l){return T.host=s.substring(t,l).toLowerCase(),T.host}(r)),e===null&&(t=r),e}function br(){var e,r,l,i,u,h;for(i=t,u=t,e=[],h=t,r=wr(),r!==null?(s.charCodeAt(t)===46?(l=".",t++):(l=null,a('"."')),l!==null?r=[r,l]:(r=null,t=h)):(r=null,t=h);r!==null;)e.push(r),h=t,r=wr(),r!==null?(s.charCodeAt(t)===46?(l=".",t++):(l=null,a('"."')),l!==null?r=[r,l]:(r=null,t=h)):(r=null,t=h);return e!==null?(r=hl(),r!==null?(s.charCodeAt(t)===46?(l=".",t++):(l=null,a('"."')),l=l!==null?l:"",l!==null?e=[e,r,l]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(_){return T.host_type="domain",s.substring(t,_)}(i)),e===null&&(t=i),e}function wr(){var e,r,l,i;if(i=t,e=ne(),e!==null){for(r=[],l=ne(),l===null&&(s.charCodeAt(t)===45?(l="-",t++):(l=null,a('"-"')),l===null&&(s.charCodeAt(t)===95?(l="_",t++):(l=null,a('"_"'))));l!==null;)r.push(l),l=ne(),l===null&&(s.charCodeAt(t)===45?(l="-",t++):(l=null,a('"-"')),l===null&&(s.charCodeAt(t)===95?(l="_",t++):(l=null,a('"_"'))));r!==null?e=[e,r]:(e=null,t=i)}else e=null,t=i;return e}function hl(){var e,r,l,i;if(i=t,e=S(),e!==null){for(r=[],l=ne(),l===null&&(s.charCodeAt(t)===45?(l="-",t++):(l=null,a('"-"')),l===null&&(s.charCodeAt(t)===95?(l="_",t++):(l=null,a('"_"'))));l!==null;)r.push(l),l=ne(),l===null&&(s.charCodeAt(t)===45?(l="-",t++):(l=null,a('"-"')),l===null&&(s.charCodeAt(t)===95?(l="_",t++):(l=null,a('"_"'))));r!==null?e=[e,r]:(e=null,t=i)}else e=null,t=i;return e}function yr(){var e,r,l,i,u;return i=t,u=t,s.charCodeAt(t)===91?(e="[",t++):(e=null,a('"["')),e!==null?(r=Nr(),r!==null?(s.charCodeAt(t)===93?(l="]",t++):(l=null,a('"]"')),l!==null?e=[e,r,l]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(h){return T.host_type="IPv6",s.substring(t,h)}(i)),e===null&&(t=i),e}function Nr(){var e,r,l,i,u,h,_,E,v,F,le,Ve,xs,Kr,C,M;return Kr=t,C=t,e=P(),e!==null?(s.charCodeAt(t)===58?(r=":",t++):(r=null,a('":"')),r!==null?(l=P(),l!==null?(s.charCodeAt(t)===58?(i=":",t++):(i=null,a('":"')),i!==null?(u=P(),u!==null?(s.charCodeAt(t)===58?(h=":",t++):(h=null,a('":"')),h!==null?(_=P(),_!==null?(s.charCodeAt(t)===58?(E=":",t++):(E=null,a('":"')),E!==null?(v=P(),v!==null?(s.charCodeAt(t)===58?(F=":",t++):(F=null,a('":"')),F!==null?(le=P(),le!==null?(s.charCodeAt(t)===58?(Ve=":",t++):(Ve=null,a('":"')),Ve!==null?(xs=xe(),xs!==null?e=[e,r,l,i,u,h,_,E,v,F,le,Ve,xs]:(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C),e===null&&(C=t,s.substr(t,2)==="::"?(e="::",t+=2):(e=null,a('"::"')),e!==null?(r=P(),r!==null?(s.charCodeAt(t)===58?(l=":",t++):(l=null,a('":"')),l!==null?(i=P(),i!==null?(s.charCodeAt(t)===58?(u=":",t++):(u=null,a('":"')),u!==null?(h=P(),h!==null?(s.charCodeAt(t)===58?(_=":",t++):(_=null,a('":"')),_!==null?(E=P(),E!==null?(s.charCodeAt(t)===58?(v=":",t++):(v=null,a('":"')),v!==null?(F=P(),F!==null?(s.charCodeAt(t)===58?(le=":",t++):(le=null,a('":"')),le!==null?(Ve=xe(),Ve!==null?e=[e,r,l,i,u,h,_,E,v,F,le,Ve]:(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C),e===null&&(C=t,s.substr(t,2)==="::"?(e="::",t+=2):(e=null,a('"::"')),e!==null?(r=P(),r!==null?(s.charCodeAt(t)===58?(l=":",t++):(l=null,a('":"')),l!==null?(i=P(),i!==null?(s.charCodeAt(t)===58?(u=":",t++):(u=null,a('":"')),u!==null?(h=P(),h!==null?(s.charCodeAt(t)===58?(_=":",t++):(_=null,a('":"')),_!==null?(E=P(),E!==null?(s.charCodeAt(t)===58?(v=":",t++):(v=null,a('":"')),v!==null?(F=xe(),F!==null?e=[e,r,l,i,u,h,_,E,v,F]:(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C),e===null&&(C=t,s.substr(t,2)==="::"?(e="::",t+=2):(e=null,a('"::"')),e!==null?(r=P(),r!==null?(s.charCodeAt(t)===58?(l=":",t++):(l=null,a('":"')),l!==null?(i=P(),i!==null?(s.charCodeAt(t)===58?(u=":",t++):(u=null,a('":"')),u!==null?(h=P(),h!==null?(s.charCodeAt(t)===58?(_=":",t++):(_=null,a('":"')),_!==null?(E=xe(),E!==null?e=[e,r,l,i,u,h,_,E]:(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C),e===null&&(C=t,s.substr(t,2)==="::"?(e="::",t+=2):(e=null,a('"::"')),e!==null?(r=P(),r!==null?(s.charCodeAt(t)===58?(l=":",t++):(l=null,a('":"')),l!==null?(i=P(),i!==null?(s.charCodeAt(t)===58?(u=":",t++):(u=null,a('":"')),u!==null?(h=xe(),h!==null?e=[e,r,l,i,u,h]:(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C),e===null&&(C=t,s.substr(t,2)==="::"?(e="::",t+=2):(e=null,a('"::"')),e!==null?(r=P(),r!==null?(s.charCodeAt(t)===58?(l=":",t++):(l=null,a('":"')),l!==null?(i=xe(),i!==null?e=[e,r,l,i]:(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C),e===null&&(C=t,s.substr(t,2)==="::"?(e="::",t+=2):(e=null,a('"::"')),e!==null?(r=xe(),r!==null?e=[e,r]:(e=null,t=C)):(e=null,t=C),e===null&&(C=t,s.substr(t,2)==="::"?(e="::",t+=2):(e=null,a('"::"')),e!==null?(r=P(),r!==null?e=[e,r]:(e=null,t=C)):(e=null,t=C),e===null&&(C=t,e=P(),e!==null?(s.substr(t,2)==="::"?(r="::",t+=2):(r=null,a('"::"')),r!==null?(l=P(),l!==null?(s.charCodeAt(t)===58?(i=":",t++):(i=null,a('":"')),i!==null?(u=P(),u!==null?(s.charCodeAt(t)===58?(h=":",t++):(h=null,a('":"')),h!==null?(_=P(),_!==null?(s.charCodeAt(t)===58?(E=":",t++):(E=null,a('":"')),E!==null?(v=P(),v!==null?(s.charCodeAt(t)===58?(F=":",t++):(F=null,a('":"')),F!==null?(le=xe(),le!==null?e=[e,r,l,i,u,h,_,E,v,F,le]:(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C),e===null&&(C=t,e=P(),e!==null?(M=t,s.charCodeAt(t)===58?(r=":",t++):(r=null,a('":"')),r!==null?(l=P(),l!==null?r=[r,l]:(r=null,t=M)):(r=null,t=M),r=r!==null?r:"",r!==null?(s.substr(t,2)==="::"?(l="::",t+=2):(l=null,a('"::"')),l!==null?(i=P(),i!==null?(s.charCodeAt(t)===58?(u=":",t++):(u=null,a('":"')),u!==null?(h=P(),h!==null?(s.charCodeAt(t)===58?(_=":",t++):(_=null,a('":"')),_!==null?(E=P(),E!==null?(s.charCodeAt(t)===58?(v=":",t++):(v=null,a('":"')),v!==null?(F=xe(),F!==null?e=[e,r,l,i,u,h,_,E,v,F]:(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C),e===null&&(C=t,e=P(),e!==null?(M=t,s.charCodeAt(t)===58?(r=":",t++):(r=null,a('":"')),r!==null?(l=P(),l!==null?r=[r,l]:(r=null,t=M)):(r=null,t=M),r=r!==null?r:"",r!==null?(M=t,s.charCodeAt(t)===58?(l=":",t++):(l=null,a('":"')),l!==null?(i=P(),i!==null?l=[l,i]:(l=null,t=M)):(l=null,t=M),l=l!==null?l:"",l!==null?(s.substr(t,2)==="::"?(i="::",t+=2):(i=null,a('"::"')),i!==null?(u=P(),u!==null?(s.charCodeAt(t)===58?(h=":",t++):(h=null,a('":"')),h!==null?(_=P(),_!==null?(s.charCodeAt(t)===58?(E=":",t++):(E=null,a('":"')),E!==null?(v=xe(),v!==null?e=[e,r,l,i,u,h,_,E,v]:(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C),e===null&&(C=t,e=P(),e!==null?(M=t,s.charCodeAt(t)===58?(r=":",t++):(r=null,a('":"')),r!==null?(l=P(),l!==null?r=[r,l]:(r=null,t=M)):(r=null,t=M),r=r!==null?r:"",r!==null?(M=t,s.charCodeAt(t)===58?(l=":",t++):(l=null,a('":"')),l!==null?(i=P(),i!==null?l=[l,i]:(l=null,t=M)):(l=null,t=M),l=l!==null?l:"",l!==null?(M=t,s.charCodeAt(t)===58?(i=":",t++):(i=null,a('":"')),i!==null?(u=P(),u!==null?i=[i,u]:(i=null,t=M)):(i=null,t=M),i=i!==null?i:"",i!==null?(s.substr(t,2)==="::"?(u="::",t+=2):(u=null,a('"::"')),u!==null?(h=P(),h!==null?(s.charCodeAt(t)===58?(_=":",t++):(_=null,a('":"')),_!==null?(E=xe(),E!==null?e=[e,r,l,i,u,h,_,E]:(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C),e===null&&(C=t,e=P(),e!==null?(M=t,s.charCodeAt(t)===58?(r=":",t++):(r=null,a('":"')),r!==null?(l=P(),l!==null?r=[r,l]:(r=null,t=M)):(r=null,t=M),r=r!==null?r:"",r!==null?(M=t,s.charCodeAt(t)===58?(l=":",t++):(l=null,a('":"')),l!==null?(i=P(),i!==null?l=[l,i]:(l=null,t=M)):(l=null,t=M),l=l!==null?l:"",l!==null?(M=t,s.charCodeAt(t)===58?(i=":",t++):(i=null,a('":"')),i!==null?(u=P(),u!==null?i=[i,u]:(i=null,t=M)):(i=null,t=M),i=i!==null?i:"",i!==null?(M=t,s.charCodeAt(t)===58?(u=":",t++):(u=null,a('":"')),u!==null?(h=P(),h!==null?u=[u,h]:(u=null,t=M)):(u=null,t=M),u=u!==null?u:"",u!==null?(s.substr(t,2)==="::"?(h="::",t+=2):(h=null,a('"::"')),h!==null?(_=xe(),_!==null?e=[e,r,l,i,u,h,_]:(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C),e===null&&(C=t,e=P(),e!==null?(M=t,s.charCodeAt(t)===58?(r=":",t++):(r=null,a('":"')),r!==null?(l=P(),l!==null?r=[r,l]:(r=null,t=M)):(r=null,t=M),r=r!==null?r:"",r!==null?(M=t,s.charCodeAt(t)===58?(l=":",t++):(l=null,a('":"')),l!==null?(i=P(),i!==null?l=[l,i]:(l=null,t=M)):(l=null,t=M),l=l!==null?l:"",l!==null?(M=t,s.charCodeAt(t)===58?(i=":",t++):(i=null,a('":"')),i!==null?(u=P(),u!==null?i=[i,u]:(i=null,t=M)):(i=null,t=M),i=i!==null?i:"",i!==null?(M=t,s.charCodeAt(t)===58?(u=":",t++):(u=null,a('":"')),u!==null?(h=P(),h!==null?u=[u,h]:(u=null,t=M)):(u=null,t=M),u=u!==null?u:"",u!==null?(M=t,s.charCodeAt(t)===58?(h=":",t++):(h=null,a('":"')),h!==null?(_=P(),_!==null?h=[h,_]:(h=null,t=M)):(h=null,t=M),h=h!==null?h:"",h!==null?(s.substr(t,2)==="::"?(_="::",t+=2):(_=null,a('"::"')),_!==null?(E=P(),E!==null?e=[e,r,l,i,u,h,_,E]:(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C),e===null&&(C=t,e=P(),e!==null?(M=t,s.charCodeAt(t)===58?(r=":",t++):(r=null,a('":"')),r!==null?(l=P(),l!==null?r=[r,l]:(r=null,t=M)):(r=null,t=M),r=r!==null?r:"",r!==null?(M=t,s.charCodeAt(t)===58?(l=":",t++):(l=null,a('":"')),l!==null?(i=P(),i!==null?l=[l,i]:(l=null,t=M)):(l=null,t=M),l=l!==null?l:"",l!==null?(M=t,s.charCodeAt(t)===58?(i=":",t++):(i=null,a('":"')),i!==null?(u=P(),u!==null?i=[i,u]:(i=null,t=M)):(i=null,t=M),i=i!==null?i:"",i!==null?(M=t,s.charCodeAt(t)===58?(u=":",t++):(u=null,a('":"')),u!==null?(h=P(),h!==null?u=[u,h]:(u=null,t=M)):(u=null,t=M),u=u!==null?u:"",u!==null?(M=t,s.charCodeAt(t)===58?(h=":",t++):(h=null,a('":"')),h!==null?(_=P(),_!==null?h=[h,_]:(h=null,t=M)):(h=null,t=M),h=h!==null?h:"",h!==null?(M=t,s.charCodeAt(t)===58?(_=":",t++):(_=null,a('":"')),_!==null?(E=P(),E!==null?_=[_,E]:(_=null,t=M)):(_=null,t=M),_=_!==null?_:"",_!==null?(s.substr(t,2)==="::"?(E="::",t+=2):(E=null,a('"::"')),E!==null?e=[e,r,l,i,u,h,_,E]:(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C)):(e=null,t=C))))))))))))))),e!==null&&(e=function($c){return T.host_type="IPv6",s.substring(t,$c)}(Kr)),e===null&&(t=Kr),e}function P(){var e,r,l,i,u;return u=t,e=O(),e!==null?(r=O(),r=r!==null?r:"",r!==null?(l=O(),l=l!==null?l:"",l!==null?(i=O(),i=i!==null?i:"",i!==null?e=[e,r,l,i]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e}function xe(){var e,r,l,i;return i=t,e=P(),e!==null?(s.charCodeAt(t)===58?(r=":",t++):(r=null,a('":"')),r!==null?(l=P(),l!==null?e=[e,r,l]:(e=null,t=i)):(e=null,t=i)):(e=null,t=i),e===null&&(e=Vt()),e}function Vt(){var e,r,l,i,u,h,_,E,v;return E=t,v=t,e=jt(),e!==null?(s.charCodeAt(t)===46?(r=".",t++):(r=null,a('"."')),r!==null?(l=jt(),l!==null?(s.charCodeAt(t)===46?(i=".",t++):(i=null,a('"."')),i!==null?(u=jt(),u!==null?(s.charCodeAt(t)===46?(h=".",t++):(h=null,a('"."')),h!==null?(_=jt(),_!==null?e=[e,r,l,i,u,h,_]:(e=null,t=v)):(e=null,t=v)):(e=null,t=v)):(e=null,t=v)):(e=null,t=v)):(e=null,t=v)):(e=null,t=v),e!==null&&(e=function(F){return T.host_type="IPv4",s.substring(t,F)}(E)),e===null&&(t=E),e}function jt(){var e,r,l,i;return i=t,s.substr(t,2)==="25"?(e="25",t+=2):(e=null,a('"25"')),e!==null?(/^[0-5]/.test(s.charAt(t))?(r=s.charAt(t),t++):(r=null,a("[0-5]")),r!==null?e=[e,r]:(e=null,t=i)):(e=null,t=i),e===null&&(i=t,s.charCodeAt(t)===50?(e="2",t++):(e=null,a('"2"')),e!==null?(/^[0-4]/.test(s.charAt(t))?(r=s.charAt(t),t++):(r=null,a("[0-4]")),r!==null?(l=m(),l!==null?e=[e,r,l]:(e=null,t=i)):(e=null,t=i)):(e=null,t=i),e===null&&(i=t,s.charCodeAt(t)===49?(e="1",t++):(e=null,a('"1"')),e!==null?(r=m(),r!==null?(l=m(),l!==null?e=[e,r,l]:(e=null,t=i)):(e=null,t=i)):(e=null,t=i),e===null&&(i=t,/^[1-9]/.test(s.charAt(t))?(e=s.charAt(t),t++):(e=null,a("[1-9]")),e!==null?(r=m(),r!==null?e=[e,r]:(e=null,t=i)):(e=null,t=i),e===null&&(e=m())))),e}function dl(){var e,r,l,i,u,h,_;return h=t,_=t,e=m(),e=e!==null?e:"",e!==null?(r=m(),r=r!==null?r:"",r!==null?(l=m(),l=l!==null?l:"",l!==null?(i=m(),i=i!==null?i:"",i!==null?(u=m(),u=u!==null?u:"",u!==null?e=[e,r,l,i,u]:(e=null,t=_)):(e=null,t=_)):(e=null,t=_)):(e=null,t=_)):(e=null,t=_),e!==null&&(e=function(E,v){return v=parseInt(v.join("")),T.port=v,v}(h,e)),e===null&&(t=h),e}function _l(){var e,r,l,i;for(e=[],i=t,s.charCodeAt(t)===59?(r=";",t++):(r=null,a('";"')),r!==null?(l=Or(),l!==null?r=[r,l]:(r=null,t=i)):(r=null,t=i);r!==null;)e.push(r),i=t,s.charCodeAt(t)===59?(r=";",t++):(r=null,a('";"')),r!==null?(l=Or(),l!==null?r=[r,l]:(r=null,t=i)):(r=null,t=i);return e}function Or(){var e;return e=pl(),e===null&&(e=ml(),e===null&&(e=gl(),e===null&&(e=Tl(),e===null&&(e=El(),e===null&&(e=Sl(),e===null&&(e=Cl())))))),e}function pl(){var e,r,l,i;return l=t,i=t,s.substr(t,10).toLowerCase()==="transport="?(e=s.substr(t,10),t+=10):(e=null,a('"transport="')),e!==null?(s.substr(t,3).toLowerCase()==="udp"?(r=s.substr(t,3),t+=3):(r=null,a('"udp"')),r===null&&(s.substr(t,3).toLowerCase()==="tcp"?(r=s.substr(t,3),t+=3):(r=null,a('"tcp"')),r===null&&(s.substr(t,4).toLowerCase()==="sctp"?(r=s.substr(t,4),t+=4):(r=null,a('"sctp"')),r===null&&(s.substr(t,3).toLowerCase()==="tls"?(r=s.substr(t,3),t+=3):(r=null,a('"tls"')),r===null&&(r=q())))),r!==null?e=[e,r]:(e=null,t=i)):(e=null,t=i),e!==null&&(e=function(u,h){T.uri_params||(T.uri_params={}),T.uri_params.transport=h.toLowerCase()}(l,e[1])),e===null&&(t=l),e}function ml(){var e,r,l,i;return l=t,i=t,s.substr(t,5).toLowerCase()==="user="?(e=s.substr(t,5),t+=5):(e=null,a('"user="')),e!==null?(s.substr(t,5).toLowerCase()==="phone"?(r=s.substr(t,5),t+=5):(r=null,a('"phone"')),r===null&&(s.substr(t,2).toLowerCase()==="ip"?(r=s.substr(t,2),t+=2):(r=null,a('"ip"')),r===null&&(r=q())),r!==null?e=[e,r]:(e=null,t=i)):(e=null,t=i),e!==null&&(e=function(u,h){T.uri_params||(T.uri_params={}),T.uri_params.user=h.toLowerCase()}(l,e[1])),e===null&&(t=l),e}function gl(){var e,r,l,i;return l=t,i=t,s.substr(t,7).toLowerCase()==="method="?(e=s.substr(t,7),t+=7):(e=null,a('"method="')),e!==null?(r=Cs(),r!==null?e=[e,r]:(e=null,t=i)):(e=null,t=i),e!==null&&(e=function(u,h){T.uri_params||(T.uri_params={}),T.uri_params.method=h}(l,e[1])),e===null&&(t=l),e}function Tl(){var e,r,l,i;return l=t,i=t,s.substr(t,4).toLowerCase()==="ttl="?(e=s.substr(t,4),t+=4):(e=null,a('"ttl="')),e!==null?(r=Wr(),r!==null?e=[e,r]:(e=null,t=i)):(e=null,t=i),e!==null&&(e=function(u,h){T.params||(T.params={}),T.params.ttl=h}(l,e[1])),e===null&&(t=l),e}function El(){var e,r,l,i;return l=t,i=t,s.substr(t,6).toLowerCase()==="maddr="?(e=s.substr(t,6),t+=6):(e=null,a('"maddr="')),e!==null?(r=Wt(),r!==null?e=[e,r]:(e=null,t=i)):(e=null,t=i),e!==null&&(e=function(u,h){T.uri_params||(T.uri_params={}),T.uri_params.maddr=h}(l,e[1])),e===null&&(t=l),e}function Sl(){var e,r,l,i,u,h;return i=t,u=t,s.substr(t,2).toLowerCase()==="lr"?(e=s.substr(t,2),t+=2):(e=null,a('"lr"')),e!==null?(h=t,s.charCodeAt(t)===61?(r="=",t++):(r=null,a('"="')),r!==null?(l=q(),l!==null?r=[r,l]:(r=null,t=h)):(r=null,t=h),r=r!==null?r:"",r!==null?e=[e,r]:(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(_){T.uri_params||(T.uri_params={}),T.uri_params.lr=void 0}()),e===null&&(t=i),e}function Cl(){var e,r,l,i,u,h;return i=t,u=t,e=Al(),e!==null?(h=t,s.charCodeAt(t)===61?(r="=",t++):(r=null,a('"="')),r!==null?(l=vl(),l!==null?r=[r,l]:(r=null,t=h)):(r=null,t=h),r=r!==null?r:"",r!==null?e=[e,r]:(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(_,E,v){T.uri_params||(T.uri_params={}),typeof v>"u"?v=void 0:v=v[1],T.uri_params[E.toLowerCase()]=v}(i,e[0],e[1])),e===null&&(t=i),e}function Al(){var e,r,l;if(l=t,r=Yt(),r!==null)for(e=[];r!==null;)e.push(r),r=Yt();else e=null;return e!==null&&(e=function(i,u){return u.join("")}(l,e)),e===null&&(t=l),e}function vl(){var e,r,l;if(l=t,r=Yt(),r!==null)for(e=[];r!==null;)e.push(r),r=Yt();else e=null;return e!==null&&(e=function(i,u){return u.join("")}(l,e)),e===null&&(t=l),e}function Yt(){var e;return e=Rl(),e===null&&(e=y(),e===null&&(e=ae())),e}function Rl(){var e;return s.charCodeAt(t)===91?(e="[",t++):(e=null,a('"["')),e===null&&(s.charCodeAt(t)===93?(e="]",t++):(e=null,a('"]"')),e===null&&(s.charCodeAt(t)===47?(e="/",t++):(e=null,a('"/"')),e===null&&(s.charCodeAt(t)===58?(e=":",t++):(e=null,a('":"')),e===null&&(s.charCodeAt(t)===38?(e="&",t++):(e=null,a('"&"')),e===null&&(s.charCodeAt(t)===43?(e="+",t++):(e=null,a('"+"')),e===null&&(s.charCodeAt(t)===36?(e="$",t++):(e=null,a('"$"')))))))),e}function Il(){var e,r,l,i,u,h,_;if(h=t,s.charCodeAt(t)===63?(e="?",t++):(e=null,a('"?"')),e!==null)if(r=Ts(),r!==null){for(l=[],_=t,s.charCodeAt(t)===38?(i="&",t++):(i=null,a('"&"')),i!==null?(u=Ts(),u!==null?i=[i,u]:(i=null,t=_)):(i=null,t=_);i!==null;)l.push(i),_=t,s.charCodeAt(t)===38?(i="&",t++):(i=null,a('"&"')),i!==null?(u=Ts(),u!==null?i=[i,u]:(i=null,t=_)):(i=null,t=_);l!==null?e=[e,r,l]:(e=null,t=h)}else e=null,t=h;else e=null,t=h;return e}function Ts(){var e,r,l,i,u;return i=t,u=t,e=bl(),e!==null?(s.charCodeAt(t)===61?(r="=",t++):(r=null,a('"="')),r!==null?(l=wl(),l!==null?e=[e,r,l]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(h,_,E){_=_.join("").toLowerCase(),E=E.join(""),T.uri_headers||(T.uri_headers={}),T.uri_headers[_]?T.uri_headers[_].push(E):T.uri_headers[_]=[E]}(i,e[0],e[2])),e===null&&(t=i),e}function bl(){var e,r;if(r=Kt(),r===null&&(r=y(),r===null&&(r=ae())),r!==null)for(e=[];r!==null;)e.push(r),r=Kt(),r===null&&(r=y(),r===null&&(r=ae()));else e=null;return e}function wl(){var e,r;for(e=[],r=Kt(),r===null&&(r=y(),r===null&&(r=ae()));r!==null;)e.push(r),r=Kt(),r===null&&(r=y(),r===null&&(r=ae()));return e}function Kt(){var e;return s.charCodeAt(t)===91?(e="[",t++):(e=null,a('"["')),e===null&&(s.charCodeAt(t)===93?(e="]",t++):(e=null,a('"]"')),e===null&&(s.charCodeAt(t)===47?(e="/",t++):(e=null,a('"/"')),e===null&&(s.charCodeAt(t)===63?(e="?",t++):(e=null,a('"?"')),e===null&&(s.charCodeAt(t)===58?(e=":",t++):(e=null,a('":"')),e===null&&(s.charCodeAt(t)===43?(e="+",t++):(e=null,a('"+"')),e===null&&(s.charCodeAt(t)===36?(e="$",t++):(e=null,a('"$"')))))))),e}function Ju(){var e;return e=zl(),e===null&&(e=yl()),e}function yl(){var e,r,l,i,u,h;return h=t,e=Cs(),e!==null?(r=U(),r!==null?(l=Nl(),l!==null?(i=U(),i!==null?(u=Ur(),u!==null?e=[e,r,l,i,u]:(e=null,t=h)):(e=null,t=h)):(e=null,t=h)):(e=null,t=h)):(e=null,t=h),e}function Nl(){var e;return e=Je(),e===null&&(e=xr()),e}function xr(){var e,r,l,i;return i=t,e=Pl(),e!==null?(s.charCodeAt(t)===58?(r=":",t++):(r=null,a('":"')),r!==null?(l=Ol(),l===null&&(l=Dl()),l!==null?e=[e,r,l]:(e=null,t=i)):(e=null,t=i)):(e=null,t=i),e}function Ol(){var e,r,l,i,u;return i=t,e=xl(),e===null&&(e=Es()),e!==null?(u=t,s.charCodeAt(t)===63?(r="?",t++):(r=null,a('"?"')),r!==null?(l=Fl(),l!==null?r=[r,l]:(r=null,t=u)):(r=null,t=u),r=r!==null?r:"",r!==null?e=[e,r]:(e=null,t=i)):(e=null,t=i),e}function xl(){var e,r,l,i;return i=t,s.substr(t,2)==="//"?(e="//",t+=2):(e=null,a('"//"')),e!==null?(r=Ml(),r!==null?(l=Es(),l=l!==null?l:"",l!==null?e=[e,r,l]:(e=null,t=i)):(e=null,t=i)):(e=null,t=i),e}function Es(){var e,r,l;return l=t,s.charCodeAt(t)===47?(e="/",t++):(e=null,a('"/"')),e!==null?(r=$l(),r!==null?e=[e,r]:(e=null,t=l)):(e=null,t=l),e}function Dl(){var e,r,l,i;if(i=t,e=Ul(),e!==null){for(r=[],l=zt();l!==null;)r.push(l),l=zt();r!==null?e=[e,r]:(e=null,t=i)}else e=null,t=i;return e}function zt(){var e;return e=tt(),e===null&&(e=y(),e===null&&(e=ae())),e}function Ul(){var e;return e=y(),e===null&&(e=ae(),e===null&&(s.charCodeAt(t)===59?(e=";",t++):(e=null,a('";"')),e===null&&(s.charCodeAt(t)===63?(e="?",t++):(e=null,a('"?"')),e===null&&(s.charCodeAt(t)===58?(e=":",t++):(e=null,a('":"')),e===null&&(s.charCodeAt(t)===64?(e="@",t++):(e=null,a('"@"')),e===null&&(s.charCodeAt(t)===38?(e="&",t++):(e=null,a('"&"')),e===null&&(s.charCodeAt(t)===61?(e="=",t++):(e=null,a('"="')),e===null&&(s.charCodeAt(t)===43?(e="+",t++):(e=null,a('"+"')),e===null&&(s.charCodeAt(t)===36?(e="$",t++):(e=null,a('"$"')),e===null&&(s.charCodeAt(t)===44?(e=",",t++):(e=null,a('","')))))))))))),e}function $l(){var e,r,l,i,u,h;if(u=t,e=Ss(),e!==null){for(r=[],h=t,s.charCodeAt(t)===47?(l="/",t++):(l=null,a('"/"')),l!==null?(i=Ss(),i!==null?l=[l,i]:(l=null,t=h)):(l=null,t=h);l!==null;)r.push(l),h=t,s.charCodeAt(t)===47?(l="/",t++):(l=null,a('"/"')),l!==null?(i=Ss(),i!==null?l=[l,i]:(l=null,t=h)):(l=null,t=h);r!==null?e=[e,r]:(e=null,t=u)}else e=null,t=u;return e}function Ss(){var e,r,l,i,u,h;for(u=t,e=[],r=Xt();r!==null;)e.push(r),r=Xt();if(e!==null){for(r=[],h=t,s.charCodeAt(t)===59?(l=";",t++):(l=null,a('";"')),l!==null?(i=Dr(),i!==null?l=[l,i]:(l=null,t=h)):(l=null,t=h);l!==null;)r.push(l),h=t,s.charCodeAt(t)===59?(l=";",t++):(l=null,a('";"')),l!==null?(i=Dr(),i!==null?l=[l,i]:(l=null,t=h)):(l=null,t=h);r!==null?e=[e,r]:(e=null,t=u)}else e=null,t=u;return e}function Dr(){var e,r;for(e=[],r=Xt();r!==null;)e.push(r),r=Xt();return e}function Xt(){var e;return e=y(),e===null&&(e=ae(),e===null&&(s.charCodeAt(t)===58?(e=":",t++):(e=null,a('":"')),e===null&&(s.charCodeAt(t)===64?(e="@",t++):(e=null,a('"@"')),e===null&&(s.charCodeAt(t)===38?(e="&",t++):(e=null,a('"&"')),e===null&&(s.charCodeAt(t)===61?(e="=",t++):(e=null,a('"="')),e===null&&(s.charCodeAt(t)===43?(e="+",t++):(e=null,a('"+"')),e===null&&(s.charCodeAt(t)===36?(e="$",t++):(e=null,a('"$"')),e===null&&(s.charCodeAt(t)===44?(e=",",t++):(e=null,a('","')))))))))),e}function Pl(){var e,r,l,i,u;if(i=t,u=t,e=S(),e!==null){for(r=[],l=S(),l===null&&(l=m(),l===null&&(s.charCodeAt(t)===43?(l="+",t++):(l=null,a('"+"')),l===null&&(s.charCodeAt(t)===45?(l="-",t++):(l=null,a('"-"')),l===null&&(s.charCodeAt(t)===46?(l=".",t++):(l=null,a('"."'))))));l!==null;)r.push(l),l=S(),l===null&&(l=m(),l===null&&(s.charCodeAt(t)===43?(l="+",t++):(l=null,a('"+"')),l===null&&(s.charCodeAt(t)===45?(l="-",t++):(l=null,a('"-"')),l===null&&(s.charCodeAt(t)===46?(l=".",t++):(l=null,a('"."'))))));r!==null?e=[e,r]:(e=null,t=u)}else e=null,t=u;return e!==null&&(e=function(h){T.scheme=s.substring(t,h)}(i)),e===null&&(t=i),e}function Ml(){var e;return e=Ll(),e===null&&(e=Hl()),e}function Ll(){var e,r,l,i;return l=t,i=t,e=ms(),e!==null?(s.charCodeAt(t)===64?(r="@",t++):(r=null,a('"@"')),r!==null?e=[e,r]:(e=null,t=i)):(e=null,t=i),e=e!==null?e:"",e!==null?(r=gs(),r!==null?e=[e,r]:(e=null,t=l)):(e=null,t=l),e=e!==null?e:"",e}function Hl(){var e,r;if(r=y(),r===null&&(r=ae(),r===null&&(s.charCodeAt(t)===36?(r="$",t++):(r=null,a('"$"')),r===null&&(s.charCodeAt(t)===44?(r=",",t++):(r=null,a('","')),r===null&&(s.charCodeAt(t)===59?(r=";",t++):(r=null,a('";"')),r===null&&(s.charCodeAt(t)===58?(r=":",t++):(r=null,a('":"')),r===null&&(s.charCodeAt(t)===64?(r="@",t++):(r=null,a('"@"')),r===null&&(s.charCodeAt(t)===38?(r="&",t++):(r=null,a('"&"')),r===null&&(s.charCodeAt(t)===61?(r="=",t++):(r=null,a('"="')),r===null&&(s.charCodeAt(t)===43?(r="+",t++):(r=null,a('"+"'))))))))))),r!==null)for(e=[];r!==null;)e.push(r),r=y(),r===null&&(r=ae(),r===null&&(s.charCodeAt(t)===36?(r="$",t++):(r=null,a('"$"')),r===null&&(s.charCodeAt(t)===44?(r=",",t++):(r=null,a('","')),r===null&&(s.charCodeAt(t)===59?(r=";",t++):(r=null,a('";"')),r===null&&(s.charCodeAt(t)===58?(r=":",t++):(r=null,a('":"')),r===null&&(s.charCodeAt(t)===64?(r="@",t++):(r=null,a('"@"')),r===null&&(s.charCodeAt(t)===38?(r="&",t++):(r=null,a('"&"')),r===null&&(s.charCodeAt(t)===61?(r="=",t++):(r=null,a('"="')),r===null&&(s.charCodeAt(t)===43?(r="+",t++):(r=null,a('"+"')))))))))));else e=null;return e}function Fl(){var e,r;for(e=[],r=zt();r!==null;)e.push(r),r=zt();return e}function Ur(){var e,r,l,i,u,h,_,E;if(_=t,E=t,s.substr(t,3).toLowerCase()==="sip"?(e=s.substr(t,3),t+=3):(e=null,a('"SIP"')),e!==null)if(s.charCodeAt(t)===47?(r="/",t++):(r=null,a('"/"')),r!==null){if(i=m(),i!==null)for(l=[];i!==null;)l.push(i),i=m();else l=null;if(l!==null)if(s.charCodeAt(t)===46?(i=".",t++):(i=null,a('"."')),i!==null){if(h=m(),h!==null)for(u=[];h!==null;)u.push(h),h=m();else u=null;u!==null?e=[e,r,l,i,u]:(e=null,t=E)}else e=null,t=E;else e=null,t=E}else e=null,t=E;else e=null,t=E;return e!==null&&(e=function(v){T.sip_version=s.substring(t,v)}(_)),e===null&&(t=_),e}function kl(){var e;return s.substr(t,6)==="INVITE"?(e="INVITE",t+=6):(e=null,a('"INVITE"')),e}function ql(){var e;return s.substr(t,3)==="ACK"?(e="ACK",t+=3):(e=null,a('"ACK"')),e}function Gl(){var e;return s.substr(t,7)==="OPTIONS"?(e="OPTIONS",t+=7):(e=null,a('"OPTIONS"')),e}function Bl(){var e;return s.substr(t,3)==="BYE"?(e="BYE",t+=3):(e=null,a('"BYE"')),e}function Wl(){var e;return s.substr(t,6)==="CANCEL"?(e="CANCEL",t+=6):(e=null,a('"CANCEL"')),e}function Vl(){var e;return s.substr(t,8)==="REGISTER"?(e="REGISTER",t+=8):(e=null,a('"REGISTER"')),e}function jl(){var e;return s.substr(t,9)==="SUBSCRIBE"?(e="SUBSCRIBE",t+=9):(e=null,a('"SUBSCRIBE"')),e}function Yl(){var e;return s.substr(t,6)==="NOTIFY"?(e="NOTIFY",t+=6):(e=null,a('"NOTIFY"')),e}function Kl(){var e;return s.substr(t,5)==="REFER"?(e="REFER",t+=5):(e=null,a('"REFER"')),e}function Cs(){var e,r;return r=t,e=kl(),e===null&&(e=ql(),e===null&&(e=Gl(),e===null&&(e=Bl(),e===null&&(e=Wl(),e===null&&(e=Vl(),e===null&&(e=jl(),e===null&&(e=Yl(),e===null&&(e=Kl(),e===null&&(e=q()))))))))),e!==null&&(e=function(l){return T.method=s.substring(t,l),T.method}(r)),e===null&&(t=r),e}function zl(){var e,r,l,i,u,h;return h=t,e=Ur(),e!==null?(r=U(),r!==null?(l=Xl(),l!==null?(i=U(),i!==null?(u=Ql(),u!==null?e=[e,r,l,i,u]:(e=null,t=h)):(e=null,t=h)):(e=null,t=h)):(e=null,t=h)):(e=null,t=h),e}function Xl(){var e,r;return r=t,e=Jl(),e!==null&&(e=function(l,i){T.status_code=parseInt(i.join(""))}(r,e)),e===null&&(t=r),e}function Jl(){var e,r,l,i;return i=t,e=m(),e!==null?(r=m(),r!==null?(l=m(),l!==null?e=[e,r,l]:(e=null,t=i)):(e=null,t=i)):(e=null,t=i),e}function Ql(){var e,r,l;for(l=t,e=[],r=tt(),r===null&&(r=y(),r===null&&(r=ae(),r===null&&(r=b(),r===null&&(r=w(),r===null&&(r=U(),r===null&&(r=de()))))));r!==null;)e.push(r),r=tt(),r===null&&(r=y(),r===null&&(r=ae(),r===null&&(r=b(),r===null&&(r=w(),r===null&&(r=U(),r===null&&(r=de()))))));return e!==null&&(e=function(i){T.reason_phrase=s.substring(t,i)}(l)),e===null&&(t=l),e}function Qu(){var e,r,l,i,u,h;if(u=t,e=Jt(),e!==null){for(r=[],h=t,l=Z(),l!==null?(i=Jt(),i!==null?l=[l,i]:(l=null,t=h)):(l=null,t=h);l!==null;)r.push(l),h=t,l=Z(),l!==null?(i=Jt(),i!==null?l=[l,i]:(l=null,t=h)):(l=null,t=h);r!==null?e=[e,r]:(e=null,t=u)}else e=null,t=u;return e}function Zu(){var e,r,l,i,u,h;return i=t,u=t,e=We(),e!==null?(h=t,s.charCodeAt(t)===64?(r="@",t++):(r=null,a('"@"')),r!==null?(l=We(),l!==null?r=[r,l]:(r=null,t=h)):(r=null,t=h),r=r!==null?r:"",r!==null?e=[e,r]:(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(_){T=s.substring(t,_)}(i)),e===null&&(t=i),e}function ec(){var e,r,l,i,u,h,_;if(u=t,e=ht(),e===null)if(h=t,e=As(),e!==null){for(r=[],_=t,l=Z(),l!==null?(i=As(),i!==null?l=[l,i]:(l=null,t=_)):(l=null,t=_);l!==null;)r.push(l),_=t,l=Z(),l!==null?(i=As(),i!==null?l=[l,i]:(l=null,t=_)):(l=null,t=_);r!==null?e=[e,r]:(e=null,t=h)}else e=null,t=h;return e!==null&&(e=function(E){var v,F;for(F=T.multi_header.length,v=0;v<F;v++)if(T.multi_header[v].parsed===null){T=null;break}T!==null?T=T.multi_header:T=-1}()),e===null&&(t=u),e}function As(){var e,r,l,i,u,h,_;if(u=t,h=t,e=te(),e===null&&(e=mt()),e!==null){for(r=[],_=t,l=j(),l!==null?(i=$r(),i!==null?l=[l,i]:(l=null,t=_)):(l=null,t=_);l!==null;)r.push(l),_=t,l=j(),l!==null?(i=$r(),i!==null?l=[l,i]:(l=null,t=_)):(l=null,t=_);r!==null?e=[e,r]:(e=null,t=h)}else e=null,t=h;return e!==null&&(e=function(E){var v;T.multi_header||(T.multi_header=[]);try{v=new yt(T.uri,T.display_name,T.params),delete T.uri,delete T.display_name,delete T.params}catch{v=null}T.multi_header.push({possition:t,offset:E,parsed:v})}(u)),e===null&&(t=u),e}function mt(){var e,r,l,i,u;return u=t,e=vs(),e=e!==null?e:"",e!==null?(r=rt(),r!==null?(l=Je(),l!==null?(i=st(),i!==null?e=[e,r,l,i]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e}function vs(){var e,r,l,i,u,h,_;if(u=t,h=t,e=q(),e!==null){for(r=[],_=t,l=_e(),l!==null?(i=q(),i!==null?l=[l,i]:(l=null,t=_)):(l=null,t=_);l!==null;)r.push(l),_=t,l=_e(),l!==null?(i=q(),i!==null?l=[l,i]:(l=null,t=_)):(l=null,t=_);r!==null?e=[e,r]:(e=null,t=h)}else e=null,t=h;return e===null&&(e=K()),e!==null&&(e=function(E,v){typeof v=="string"?T.display_name=v:T.display_name=v[1].reduce(function(F,le){return F+le[0]+le[1]},v[0])}(u,e)),e===null&&(t=u),e}function $r(){var e;return e=Zl(),e===null&&(e=ei(),e===null&&(e=Te())),e}function Zl(){var e,r,l,i,u;return i=t,u=t,s.substr(t,1).toLowerCase()==="q"?(e=s.substr(t,1),t++):(e=null,a('"q"')),e!==null?(r=z(),r!==null?(l=ti(),l!==null?e=[e,r,l]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(h,_){T.params||(T.params={}),T.params.q=_}(i,e[2])),e===null&&(t=i),e}function ei(){var e,r,l,i,u;return i=t,u=t,s.substr(t,7).toLowerCase()==="expires"?(e=s.substr(t,7),t+=7):(e=null,a('"expires"')),e!==null?(r=z(),r!==null?(l=gt(),l!==null?e=[e,r,l]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(h,_){T.params||(T.params={}),T.params.expires=_}(i,e[2])),e===null&&(t=i),e}function gt(){var e,r,l;if(l=t,r=m(),r!==null)for(e=[];r!==null;)e.push(r),r=m();else e=null;return e!==null&&(e=function(i,u){return parseInt(u.join(""))}(l,e)),e===null&&(t=l),e}function ti(){var e,r,l,i,u,h,_,E;return h=t,_=t,s.charCodeAt(t)===48?(e="0",t++):(e=null,a('"0"')),e!==null?(E=t,s.charCodeAt(t)===46?(r=".",t++):(r=null,a('"."')),r!==null?(l=m(),l=l!==null?l:"",l!==null?(i=m(),i=i!==null?i:"",i!==null?(u=m(),u=u!==null?u:"",u!==null?r=[r,l,i,u]:(r=null,t=E)):(r=null,t=E)):(r=null,t=E)):(r=null,t=E),r=r!==null?r:"",r!==null?e=[e,r]:(e=null,t=_)):(e=null,t=_),e!==null&&(e=function(v){return parseFloat(s.substring(t,v))}(h)),e===null&&(t=h),e}function Te(){var e,r,l,i,u,h;return i=t,u=t,e=q(),e!==null?(h=t,r=z(),r!==null?(l=si(),l!==null?r=[r,l]:(r=null,t=h)):(r=null,t=h),r=r!==null?r:"",r!==null?e=[e,r]:(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(_,E,v){T.params||(T.params={}),typeof v>"u"?v=void 0:v=v[1],T.params[E.toLowerCase()]=v}(i,e[0],e[1])),e===null&&(t=i),e}function si(){var e;return e=q(),e===null&&(e=Wt(),e===null&&(e=V())),e}function tc(){var e,r,l,i,u,h;if(u=t,e=ri(),e!==null){for(r=[],h=t,l=j(),l!==null?(i=Pr(),i!==null?l=[l,i]:(l=null,t=h)):(l=null,t=h);l!==null;)r.push(l),h=t,l=j(),l!==null?(i=Pr(),i!==null?l=[l,i]:(l=null,t=h)):(l=null,t=h);r!==null?e=[e,r]:(e=null,t=u)}else e=null,t=u;return e}function ri(){var e;return s.substr(t,6).toLowerCase()==="render"?(e=s.substr(t,6),t+=6):(e=null,a('"render"')),e===null&&(s.substr(t,7).toLowerCase()==="session"?(e=s.substr(t,7),t+=7):(e=null,a('"session"')),e===null&&(s.substr(t,4).toLowerCase()==="icon"?(e=s.substr(t,4),t+=4):(e=null,a('"icon"')),e===null&&(s.substr(t,5).toLowerCase()==="alert"?(e=s.substr(t,5),t+=5):(e=null,a('"alert"')),e===null&&(e=q())))),e}function Pr(){var e;return e=ni(),e===null&&(e=Te()),e}function ni(){var e,r,l,i;return i=t,s.substr(t,8).toLowerCase()==="handling"?(e=s.substr(t,8),t+=8):(e=null,a('"handling"')),e!==null?(r=z(),r!==null?(s.substr(t,8).toLowerCase()==="optional"?(l=s.substr(t,8),t+=8):(l=null,a('"optional"')),l===null&&(s.substr(t,8).toLowerCase()==="required"?(l=s.substr(t,8),t+=8):(l=null,a('"required"')),l===null&&(l=q())),l!==null?e=[e,r,l]:(e=null,t=i)):(e=null,t=i)):(e=null,t=i),e}function sc(){var e,r,l,i,u,h;if(u=t,e=q(),e!==null){for(r=[],h=t,l=Z(),l!==null?(i=q(),i!==null?l=[l,i]:(l=null,t=h)):(l=null,t=h);l!==null;)r.push(l),h=t,l=Z(),l!==null?(i=q(),i!==null?l=[l,i]:(l=null,t=h)):(l=null,t=h);r!==null?e=[e,r]:(e=null,t=u)}else e=null,t=u;return e}function rc(){var e,r,l;if(l=t,r=m(),r!==null)for(e=[];r!==null;)e.push(r),r=m();else e=null;return e!==null&&(e=function(i,u){T=parseInt(u.join(""))}(l,e)),e===null&&(t=l),e}function nc(){var e,r;return r=t,e=li(),e!==null&&(e=function(l){T=s.substring(t,l)}(r)),e===null&&(t=r),e}function li(){var e,r,l,i,u,h,_,E;if(_=t,e=ii(),e!==null)if(r=Xe(),r!==null)if(l=ci(),l!==null){for(i=[],E=t,u=j(),u!==null?(h=Mr(),h!==null?u=[u,h]:(u=null,t=E)):(u=null,t=E);u!==null;)i.push(u),E=t,u=j(),u!==null?(h=Mr(),h!==null?u=[u,h]:(u=null,t=E)):(u=null,t=E);i!==null?e=[e,r,l,i]:(e=null,t=_)}else e=null,t=_;else e=null,t=_;else e=null,t=_;return e}function ii(){var e;return e=ai(),e===null&&(e=oi()),e}function ai(){var e;return s.substr(t,4).toLowerCase()==="text"?(e=s.substr(t,4),t+=4):(e=null,a('"text"')),e===null&&(s.substr(t,5).toLowerCase()==="image"?(e=s.substr(t,5),t+=5):(e=null,a('"image"')),e===null&&(s.substr(t,5).toLowerCase()==="audio"?(e=s.substr(t,5),t+=5):(e=null,a('"audio"')),e===null&&(s.substr(t,5).toLowerCase()==="video"?(e=s.substr(t,5),t+=5):(e=null,a('"video"')),e===null&&(s.substr(t,11).toLowerCase()==="application"?(e=s.substr(t,11),t+=11):(e=null,a('"application"')),e===null&&(e=Rs()))))),e}function oi(){var e;return s.substr(t,7).toLowerCase()==="message"?(e=s.substr(t,7),t+=7):(e=null,a('"message"')),e===null&&(s.substr(t,9).toLowerCase()==="multipart"?(e=s.substr(t,9),t+=9):(e=null,a('"multipart"')),e===null&&(e=Rs())),e}function Rs(){var e;return e=q(),e===null&&(e=ui()),e}function ui(){var e,r,l;return l=t,s.substr(t,2).toLowerCase()==="x-"?(e=s.substr(t,2),t+=2):(e=null,a('"x-"')),e!==null?(r=q(),r!==null?e=[e,r]:(e=null,t=l)):(e=null,t=l),e}function ci(){var e;return e=Rs(),e===null&&(e=q()),e}function Mr(){var e,r,l,i;return i=t,e=q(),e!==null?(r=z(),r!==null?(l=fi(),l!==null?e=[e,r,l]:(e=null,t=i)):(e=null,t=i)):(e=null,t=i),e}function fi(){var e;return e=q(),e===null&&(e=V()),e}function lc(){var e,r,l,i;return i=t,e=hi(),e!==null?(r=_e(),r!==null?(l=Cs(),l!==null?e=[e,r,l]:(e=null,t=i)):(e=null,t=i)):(e=null,t=i),e}function hi(){var e,r,l;if(l=t,r=m(),r!==null)for(e=[];r!==null;)e.push(r),r=m();else e=null;return e!==null&&(e=function(i,u){T.value=parseInt(u.join(""))}(l,e)),e===null&&(t=l),e}function ic(){var e,r;return r=t,e=gt(),e!==null&&(e=function(l,i){T=i}(r,e)),e===null&&(t=r),e}function ac(){var e,r,l,i,u,h,_;if(u=t,h=t,e=Jt(),e!==null){for(r=[],_=t,l=j(),l!==null?(i=Te(),i!==null?l=[l,i]:(l=null,t=_)):(l=null,t=_);l!==null;)r.push(l),_=t,l=j(),l!==null?(i=Te(),i!==null?l=[l,i]:(l=null,t=_)):(l=null,t=_);r!==null?e=[e,r]:(e=null,t=h)}else e=null,t=h;return e!==null&&(e=function(E,v){T.event=v.join("").toLowerCase()}(u,e[0])),e===null&&(t=u),e}function Jt(){var e,r,l,i,u,h;if(u=t,e=ze(),e!==null){for(r=[],h=t,s.charCodeAt(t)===46?(l=".",t++):(l=null,a('"."')),l!==null?(i=ze(),i!==null?l=[l,i]:(l=null,t=h)):(l=null,t=h);l!==null;)r.push(l),h=t,s.charCodeAt(t)===46?(l=".",t++):(l=null,a('"."')),l!==null?(i=ze(),i!==null?l=[l,i]:(l=null,t=h)):(l=null,t=h);r!==null?e=[e,r]:(e=null,t=u)}else e=null,t=u;return e}function oc(){var e,r,l,i,u,h,_;if(u=t,h=t,e=te(),e===null&&(e=mt()),e!==null){for(r=[],_=t,l=j(),l!==null?(i=Lr(),i!==null?l=[l,i]:(l=null,t=_)):(l=null,t=_);l!==null;)r.push(l),_=t,l=j(),l!==null?(i=Lr(),i!==null?l=[l,i]:(l=null,t=_)):(l=null,t=_);r!==null?e=[e,r]:(e=null,t=h)}else e=null,t=h;return e!==null&&(e=function(E){var v=T.tag;try{T=new yt(T.uri,T.display_name,T.params),v&&T.setParam("tag",v)}catch{T=-1}}()),e===null&&(t=u),e}function Lr(){var e;return e=Hr(),e===null&&(e=Te()),e}function Hr(){var e,r,l,i,u;return i=t,u=t,s.substr(t,3).toLowerCase()==="tag"?(e=s.substr(t,3),t+=3):(e=null,a('"tag"')),e!==null?(r=z(),r!==null?(l=q(),l!==null?e=[e,r,l]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(h,_){T.tag=_}(i,e[2])),e===null&&(t=i),e}function uc(){var e,r,l;if(l=t,r=m(),r!==null)for(e=[];r!==null;)e.push(r),r=m();else e=null;return e!==null&&(e=function(i,u){T=parseInt(u.join(""))}(l,e)),e===null&&(t=l),e}function cc(){var e,r;return r=t,e=gt(),e!==null&&(e=function(l,i){T=i}(r,e)),e===null&&(t=r),e}function fc(){var e,r,l,i,u,h,_,E,v,F;for(E=t,v=t,e=[],r=vs();r!==null;)e.push(r),r=vs();if(e!==null)if(r=rt(),r!==null)if(l=Je(),l!==null)if(i=st(),i!==null){for(u=[],F=t,h=j(),h!==null?(_=Te(),_!==null?h=[h,_]:(h=null,t=F)):(h=null,t=F);h!==null;)u.push(h),F=t,h=j(),h!==null?(_=Te(),_!==null?h=[h,_]:(h=null,t=F)):(h=null,t=F);u!==null?e=[e,r,l,i,u]:(e=null,t=v)}else e=null,t=v;else e=null,t=v;else e=null,t=v;else e=null,t=v;return e!==null&&(e=function(le){try{T=new yt(T.uri,T.display_name,T.params)}catch{T=-1}}()),e===null&&(t=E),e}function hc(){var e;return e=Fr(),e}function Fr(){var e,r,l,i,u,h,_,E;if(_=t,s.substr(t,6).toLowerCase()==="digest"?(e=s.substr(t,6),t+=6):(e=null,a('"Digest"')),e!==null)if(r=_e(),r!==null)if(l=Is(),l!==null){for(i=[],E=t,u=Z(),u!==null?(h=Is(),h!==null?u=[u,h]:(u=null,t=E)):(u=null,t=E);u!==null;)i.push(u),E=t,u=Z(),u!==null?(h=Is(),h!==null?u=[u,h]:(u=null,t=E)):(u=null,t=E);i!==null?e=[e,r,l,i]:(e=null,t=_)}else e=null,t=_;else e=null,t=_;else e=null,t=_;return e===null&&(e=di()),e}function di(){var e,r,l,i,u,h,_,E;if(_=t,e=q(),e!==null)if(r=_e(),r!==null)if(l=Qt(),l!==null){for(i=[],E=t,u=Z(),u!==null?(h=Qt(),h!==null?u=[u,h]:(u=null,t=E)):(u=null,t=E);u!==null;)i.push(u),E=t,u=Z(),u!==null?(h=Qt(),h!==null?u=[u,h]:(u=null,t=E)):(u=null,t=E);i!==null?e=[e,r,l,i]:(e=null,t=_)}else e=null,t=_;else e=null,t=_;else e=null,t=_;return e}function Qt(){var e,r,l,i;return i=t,e=q(),e!==null?(r=z(),r!==null?(l=q(),l===null&&(l=V()),l!==null?e=[e,r,l]:(e=null,t=i)):(e=null,t=i)):(e=null,t=i),e}function Is(){var e;return e=_i(),e===null&&(e=mi(),e===null&&(e=gi(),e===null&&(e=Ei(),e===null&&(e=Si(),e===null&&(e=Ci(),e===null&&(e=Ai(),e===null&&(e=Qt()))))))),e}function _i(){var e,r,l,i;return i=t,s.substr(t,5).toLowerCase()==="realm"?(e=s.substr(t,5),t+=5):(e=null,a('"realm"')),e!==null?(r=z(),r!==null?(l=pi(),l!==null?e=[e,r,l]:(e=null,t=i)):(e=null,t=i)):(e=null,t=i),e}function pi(){var e,r;return r=t,e=K(),e!==null&&(e=function(l,i){T.realm=i}(r,e)),e===null&&(t=r),e}function mi(){var e,r,l,i,u,h,_,E,v;if(E=t,s.substr(t,6).toLowerCase()==="domain"?(e=s.substr(t,6),t+=6):(e=null,a('"domain"')),e!==null)if(r=z(),r!==null)if(l=nt(),l!==null)if(i=bs(),i!==null){if(u=[],v=t,_=U(),_!==null)for(h=[];_!==null;)h.push(_),_=U();else h=null;for(h!==null?(_=bs(),_!==null?h=[h,_]:(h=null,t=v)):(h=null,t=v);h!==null;){if(u.push(h),v=t,_=U(),_!==null)for(h=[];_!==null;)h.push(_),_=U();else h=null;h!==null?(_=bs(),_!==null?h=[h,_]:(h=null,t=v)):(h=null,t=v)}u!==null?(h=ps(),h!==null?e=[e,r,l,i,u,h]:(e=null,t=E)):(e=null,t=E)}else e=null,t=E;else e=null,t=E;else e=null,t=E;else e=null,t=E;return e}function bs(){var e;return e=xr(),e===null&&(e=Es()),e}function gi(){var e,r,l,i;return i=t,s.substr(t,5).toLowerCase()==="nonce"?(e=s.substr(t,5),t+=5):(e=null,a('"nonce"')),e!==null?(r=z(),r!==null?(l=Ti(),l!==null?e=[e,r,l]:(e=null,t=i)):(e=null,t=i)):(e=null,t=i),e}function Ti(){var e,r;return r=t,e=K(),e!==null&&(e=function(l,i){T.nonce=i}(r,e)),e===null&&(t=r),e}function Ei(){var e,r,l,i,u;return i=t,u=t,s.substr(t,6).toLowerCase()==="opaque"?(e=s.substr(t,6),t+=6):(e=null,a('"opaque"')),e!==null?(r=z(),r!==null?(l=K(),l!==null?e=[e,r,l]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(h,_){T.opaque=_}(i,e[2])),e===null&&(t=i),e}function Si(){var e,r,l,i,u;return i=t,s.substr(t,5).toLowerCase()==="stale"?(e=s.substr(t,5),t+=5):(e=null,a('"stale"')),e!==null?(r=z(),r!==null?(u=t,s.substr(t,4).toLowerCase()==="true"?(l=s.substr(t,4),t+=4):(l=null,a('"true"')),l!==null&&(l=function(h){T.stale=!0}()),l===null&&(t=u),l===null&&(u=t,s.substr(t,5).toLowerCase()==="false"?(l=s.substr(t,5),t+=5):(l=null,a('"false"')),l!==null&&(l=function(h){T.stale=!1}()),l===null&&(t=u)),l!==null?e=[e,r,l]:(e=null,t=i)):(e=null,t=i)):(e=null,t=i),e}function Ci(){var e,r,l,i,u;return i=t,u=t,s.substr(t,9).toLowerCase()==="algorithm"?(e=s.substr(t,9),t+=9):(e=null,a('"algorithm"')),e!==null?(r=z(),r!==null?(s.substr(t,3).toLowerCase()==="md5"?(l=s.substr(t,3),t+=3):(l=null,a('"MD5"')),l===null&&(s.substr(t,8).toLowerCase()==="md5-sess"?(l=s.substr(t,8),t+=8):(l=null,a('"MD5-sess"')),l===null&&(l=q())),l!==null?e=[e,r,l]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(h,_){T.algorithm=_.toUpperCase()}(i,e[2])),e===null&&(t=i),e}function Ai(){var e,r,l,i,u,h,_,E,v,F;if(E=t,s.substr(t,3).toLowerCase()==="qop"?(e=s.substr(t,3),t+=3):(e=null,a('"qop"')),e!==null)if(r=z(),r!==null)if(l=nt(),l!==null){if(v=t,i=ws(),i!==null){for(u=[],F=t,s.charCodeAt(t)===44?(h=",",t++):(h=null,a('","')),h!==null?(_=ws(),_!==null?h=[h,_]:(h=null,t=F)):(h=null,t=F);h!==null;)u.push(h),F=t,s.charCodeAt(t)===44?(h=",",t++):(h=null,a('","')),h!==null?(_=ws(),_!==null?h=[h,_]:(h=null,t=F)):(h=null,t=F);u!==null?i=[i,u]:(i=null,t=v)}else i=null,t=v;i!==null?(u=ps(),u!==null?e=[e,r,l,i,u]:(e=null,t=E)):(e=null,t=E)}else e=null,t=E;else e=null,t=E;else e=null,t=E;return e}function ws(){var e,r;return r=t,s.substr(t,8).toLowerCase()==="auth-int"?(e=s.substr(t,8),t+=8):(e=null,a('"auth-int"')),e===null&&(s.substr(t,4).toLowerCase()==="auth"?(e=s.substr(t,4),t+=4):(e=null,a('"auth"')),e===null&&(e=q())),e!==null&&(e=function(l,i){T.qop||(T.qop=[]),T.qop.push(i.toLowerCase())}(r,e)),e===null&&(t=r),e}function dc(){var e,r,l,i,u,h;if(u=t,e=q(),e!==null){for(r=[],h=t,l=Z(),l!==null?(i=q(),i!==null?l=[l,i]:(l=null,t=h)):(l=null,t=h);l!==null;)r.push(l),h=t,l=Z(),l!==null?(i=q(),i!==null?l=[l,i]:(l=null,t=h)):(l=null,t=h);r!==null?e=[e,r]:(e=null,t=u)}else e=null,t=u;return e}function _c(){var e,r,l,i,u,h,_;if(u=t,h=t,e=ys(),e!==null){for(r=[],_=t,l=Z(),l!==null?(i=ys(),i!==null?l=[l,i]:(l=null,t=_)):(l=null,t=_);l!==null;)r.push(l),_=t,l=Z(),l!==null?(i=ys(),i!==null?l=[l,i]:(l=null,t=_)):(l=null,t=_);r!==null?e=[e,r]:(e=null,t=h)}else e=null,t=h;return e!==null&&(e=function(E){var v,F;for(F=T.multi_header.length,v=0;v<F;v++)if(T.multi_header[v].parsed===null){T=null;break}T!==null?T=T.multi_header:T=-1}()),e===null&&(t=u),e}function ys(){var e,r,l,i,u,h,_;if(u=t,h=t,e=mt(),e!==null){for(r=[],_=t,l=j(),l!==null?(i=Te(),i!==null?l=[l,i]:(l=null,t=_)):(l=null,t=_);l!==null;)r.push(l),_=t,l=j(),l!==null?(i=Te(),i!==null?l=[l,i]:(l=null,t=_)):(l=null,t=_);r!==null?e=[e,r]:(e=null,t=h)}else e=null,t=h;return e!==null&&(e=function(E){var v;T.multi_header||(T.multi_header=[]);try{v=new yt(T.uri,T.display_name,T.params),delete T.uri,delete T.display_name,delete T.params}catch{v=null}T.multi_header.push({possition:t,offset:E,parsed:v})}(u)),e===null&&(t=u),e}function pc(){var e,r,l,i,u,h,_;if(u=t,h=t,s.substr(t,3).toLowerCase()==="sip"?(e=s.substr(t,3),t+=3):(e=null,a('"SIP"')),e===null&&(e=q()),e!==null){for(r=[],_=t,l=j(),l!==null?(i=kr(),i!==null?l=[l,i]:(l=null,t=_)):(l=null,t=_);l!==null;)r.push(l),_=t,l=j(),l!==null?(i=kr(),i!==null?l=[l,i]:(l=null,t=_)):(l=null,t=_);r!==null?e=[e,r]:(e=null,t=h)}else e=null,t=h;return e!==null&&(e=function(E,v){if(T.protocol=v.toLowerCase(),T.params||(T.params={}),T.params.text&&T.params.text[0]==='"'){var F=T.params.text;T.text=F.substring(1,F.length-1),delete T.params.text}}(u,e[0])),e===null&&(t=u),e}function kr(){var e;return e=vi(),e===null&&(e=Te()),e}function vi(){var e,r,l,i,u,h;if(u=t,h=t,s.substr(t,5).toLowerCase()==="cause"?(e=s.substr(t,5),t+=5):(e=null,a('"cause"')),e!==null)if(r=z(),r!==null){if(i=m(),i!==null)for(l=[];i!==null;)l.push(i),i=m();else l=null;l!==null?e=[e,r,l]:(e=null,t=h)}else e=null,t=h;else e=null,t=h;return e!==null&&(e=function(_,E){T.cause=parseInt(E.join(""))}(u,e[2])),e===null&&(t=u),e}function mc(){var e,r,l,i,u,h;if(u=t,e=q(),e!==null){for(r=[],h=t,l=Z(),l!==null?(i=q(),i!==null?l=[l,i]:(l=null,t=h)):(l=null,t=h);l!==null;)r.push(l),h=t,l=Z(),l!==null?(i=q(),i!==null?l=[l,i]:(l=null,t=h)):(l=null,t=h);r!==null?e=[e,r]:(e=null,t=u)}else e=null,t=u;return e}function gc(){var e,r,l,i,u,h;if(u=t,e=Ns(),e!==null){for(r=[],h=t,l=Z(),l!==null?(i=Ns(),i!==null?l=[l,i]:(l=null,t=h)):(l=null,t=h);l!==null;)r.push(l),h=t,l=Z(),l!==null?(i=Ns(),i!==null?l=[l,i]:(l=null,t=h)):(l=null,t=h);r!==null?e=[e,r]:(e=null,t=u)}else e=null,t=u;return e}function Ns(){var e,r,l,i,u,h;if(u=t,e=mt(),e!==null){for(r=[],h=t,l=j(),l!==null?(i=Te(),i!==null?l=[l,i]:(l=null,t=h)):(l=null,t=h);l!==null;)r.push(l),h=t,l=j(),l!==null?(i=Te(),i!==null?l=[l,i]:(l=null,t=h)):(l=null,t=h);r!==null?e=[e,r]:(e=null,t=u)}else e=null,t=u;return e}function Tc(){var e,r,l,i,u,h;if(u=t,e=Ri(),e!==null){for(r=[],h=t,l=j(),l!==null?(i=qr(),i!==null?l=[l,i]:(l=null,t=h)):(l=null,t=h);l!==null;)r.push(l),h=t,l=j(),l!==null?(i=qr(),i!==null?l=[l,i]:(l=null,t=h)):(l=null,t=h);r!==null?e=[e,r]:(e=null,t=u)}else e=null,t=u;return e}function Ri(){var e,r;return r=t,s.substr(t,6).toLowerCase()==="active"?(e=s.substr(t,6),t+=6):(e=null,a('"active"')),e===null&&(s.substr(t,7).toLowerCase()==="pending"?(e=s.substr(t,7),t+=7):(e=null,a('"pending"')),e===null&&(s.substr(t,10).toLowerCase()==="terminated"?(e=s.substr(t,10),t+=10):(e=null,a('"terminated"')),e===null&&(e=q()))),e!==null&&(e=function(l){T.state=s.substring(t,l)}(r)),e===null&&(t=r),e}function qr(){var e,r,l,i,u;return i=t,u=t,s.substr(t,6).toLowerCase()==="reason"?(e=s.substr(t,6),t+=6):(e=null,a('"reason"')),e!==null?(r=z(),r!==null?(l=Ii(),l!==null?e=[e,r,l]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(h,_){typeof _<"u"&&(T.reason=_)}(i,e[2])),e===null&&(t=i),e===null&&(i=t,u=t,s.substr(t,7).toLowerCase()==="expires"?(e=s.substr(t,7),t+=7):(e=null,a('"expires"')),e!==null?(r=z(),r!==null?(l=gt(),l!==null?e=[e,r,l]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(h,_){typeof _<"u"&&(T.expires=_)}(i,e[2])),e===null&&(t=i),e===null&&(i=t,u=t,s.substr(t,11).toLowerCase()==="retry_after"?(e=s.substr(t,11),t+=11):(e=null,a('"retry_after"')),e!==null?(r=z(),r!==null?(l=gt(),l!==null?e=[e,r,l]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(h,_){typeof _<"u"&&(T.retry_after=_)}(i,e[2])),e===null&&(t=i),e===null&&(e=Te()))),e}function Ii(){var e;return s.substr(t,11).toLowerCase()==="deactivated"?(e=s.substr(t,11),t+=11):(e=null,a('"deactivated"')),e===null&&(s.substr(t,9).toLowerCase()==="probation"?(e=s.substr(t,9),t+=9):(e=null,a('"probation"')),e===null&&(s.substr(t,8).toLowerCase()==="rejected"?(e=s.substr(t,8),t+=8):(e=null,a('"rejected"')),e===null&&(s.substr(t,7).toLowerCase()==="timeout"?(e=s.substr(t,7),t+=7):(e=null,a('"timeout"')),e===null&&(s.substr(t,6).toLowerCase()==="giveup"?(e=s.substr(t,6),t+=6):(e=null,a('"giveup"')),e===null&&(s.substr(t,10).toLowerCase()==="noresource"?(e=s.substr(t,10),t+=10):(e=null,a('"noresource"')),e===null&&(s.substr(t,9).toLowerCase()==="invariant"?(e=s.substr(t,9),t+=9):(e=null,a('"invariant"')),e===null&&(e=q()))))))),e}function Ec(){var e;return e=N(),e=e!==null?e:"",e}function Sc(){var e,r,l,i,u,h;if(u=t,e=q(),e!==null){for(r=[],h=t,l=Z(),l!==null?(i=q(),i!==null?l=[l,i]:(l=null,t=h)):(l=null,t=h);l!==null;)r.push(l),h=t,l=Z(),l!==null?(i=q(),i!==null?l=[l,i]:(l=null,t=h)):(l=null,t=h);r!==null?e=[e,r]:(e=null,t=u)}else e=null,t=u;return e=e!==null?e:"",e}function Cc(){var e,r,l,i,u,h,_;if(u=t,h=t,e=te(),e===null&&(e=mt()),e!==null){for(r=[],_=t,l=j(),l!==null?(i=Gr(),i!==null?l=[l,i]:(l=null,t=_)):(l=null,t=_);l!==null;)r.push(l),_=t,l=j(),l!==null?(i=Gr(),i!==null?l=[l,i]:(l=null,t=_)):(l=null,t=_);r!==null?e=[e,r]:(e=null,t=h)}else e=null,t=h;return e!==null&&(e=function(E){var v=T.tag;try{T=new yt(T.uri,T.display_name,T.params),v&&T.setParam("tag",v)}catch{T=-1}}()),e===null&&(t=u),e}function Gr(){var e;return e=Hr(),e===null&&(e=Te()),e}function Ac(){var e,r,l,i,u,h;if(u=t,e=Os(),e!==null){for(r=[],h=t,l=Z(),l!==null?(i=Os(),i!==null?l=[l,i]:(l=null,t=h)):(l=null,t=h);l!==null;)r.push(l),h=t,l=Z(),l!==null?(i=Os(),i!==null?l=[l,i]:(l=null,t=h)):(l=null,t=h);r!==null?e=[e,r]:(e=null,t=u)}else e=null,t=u;return e}function Os(){var e,r,l,i,u,h,_,E;if(_=t,e=Di(),e!==null)if(r=_e(),r!==null)if(l=Pi(),l!==null){for(i=[],E=t,u=j(),u!==null?(h=Br(),h!==null?u=[u,h]:(u=null,t=E)):(u=null,t=E);u!==null;)i.push(u),E=t,u=j(),u!==null?(h=Br(),h!==null?u=[u,h]:(u=null,t=E)):(u=null,t=E);i!==null?e=[e,r,l,i]:(e=null,t=_)}else e=null,t=_;else e=null,t=_;else e=null,t=_;return e}function Br(){var e;return e=bi(),e===null&&(e=wi(),e===null&&(e=yi(),e===null&&(e=Ni(),e===null&&(e=Oi(),e===null&&(e=Te()))))),e}function bi(){var e,r,l,i,u;return i=t,u=t,s.substr(t,3).toLowerCase()==="ttl"?(e=s.substr(t,3),t+=3):(e=null,a('"ttl"')),e!==null?(r=z(),r!==null?(l=Wr(),l!==null?e=[e,r,l]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(h,_){T.ttl=_}(i,e[2])),e===null&&(t=i),e}function wi(){var e,r,l,i,u;return i=t,u=t,s.substr(t,5).toLowerCase()==="maddr"?(e=s.substr(t,5),t+=5):(e=null,a('"maddr"')),e!==null?(r=z(),r!==null?(l=Wt(),l!==null?e=[e,r,l]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(h,_){T.maddr=_}(i,e[2])),e===null&&(t=i),e}function yi(){var e,r,l,i,u;return i=t,u=t,s.substr(t,8).toLowerCase()==="received"?(e=s.substr(t,8),t+=8):(e=null,a('"received"')),e!==null?(r=z(),r!==null?(l=Vt(),l===null&&(l=Nr()),l!==null?e=[e,r,l]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(h,_){T.received=_}(i,e[2])),e===null&&(t=i),e}function Ni(){var e,r,l,i,u;return i=t,u=t,s.substr(t,6).toLowerCase()==="branch"?(e=s.substr(t,6),t+=6):(e=null,a('"branch"')),e!==null?(r=z(),r!==null?(l=q(),l!==null?e=[e,r,l]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(h,_){T.branch=_}(i,e[2])),e===null&&(t=i),e}function Oi(){var e,r,l,i,u;return i=t,s.substr(t,5).toLowerCase()==="rport"?(e=s.substr(t,5),t+=5):(e=null,a('"rport"')),e!==null?(u=t,r=z(),r!==null?(l=xi(),l!==null?r=[r,l]:(r=null,t=u)):(r=null,t=u),r=r!==null?r:"",r!==null?e=[e,r]:(e=null,t=i)):(e=null,t=i),e}function xi(){var e,r,l,i,u,h,_;return h=t,_=t,e=m(),e=e!==null?e:"",e!==null?(r=m(),r=r!==null?r:"",r!==null?(l=m(),l=l!==null?l:"",l!==null?(i=m(),i=i!==null?i:"",i!==null?(u=m(),u=u!==null?u:"",u!==null?e=[e,r,l,i,u]:(e=null,t=_)):(e=null,t=_)):(e=null,t=_)):(e=null,t=_)):(e=null,t=_),e!==null&&(e=function(E,v){T.rport=parseInt(v.join(""))}(h,e)),e===null&&(t=h),e}function Di(){var e,r,l,i,u,h;return h=t,e=Ui(),e!==null?(r=Xe(),r!==null?(l=q(),l!==null?(i=Xe(),i!==null?(u=$i(),u!==null?e=[e,r,l,i,u]:(e=null,t=h)):(e=null,t=h)):(e=null,t=h)):(e=null,t=h)):(e=null,t=h),e}function Ui(){var e,r;return r=t,s.substr(t,3).toLowerCase()==="sip"?(e=s.substr(t,3),t+=3):(e=null,a('"SIP"')),e===null&&(e=q()),e!==null&&(e=function(l,i){T.protocol=i}(r,e)),e===null&&(t=r),e}function $i(){var e,r;return r=t,s.substr(t,3).toLowerCase()==="udp"?(e=s.substr(t,3),t+=3):(e=null,a('"UDP"')),e===null&&(s.substr(t,3).toLowerCase()==="tcp"?(e=s.substr(t,3),t+=3):(e=null,a('"TCP"')),e===null&&(s.substr(t,3).toLowerCase()==="tls"?(e=s.substr(t,3),t+=3):(e=null,a('"TLS"')),e===null&&(s.substr(t,4).toLowerCase()==="sctp"?(e=s.substr(t,4),t+=4):(e=null,a('"SCTP"')),e===null&&(e=q())))),e!==null&&(e=function(l,i){T.transport=i}(r,e)),e===null&&(t=r),e}function Pi(){var e,r,l,i,u;return i=t,e=Mi(),e!==null?(u=t,r=pt(),r!==null?(l=Li(),l!==null?r=[r,l]:(r=null,t=u)):(r=null,t=u),r=r!==null?r:"",r!==null?e=[e,r]:(e=null,t=i)):(e=null,t=i),e}function Mi(){var e,r;return r=t,e=Vt(),e===null&&(e=yr(),e===null&&(e=br())),e!==null&&(e=function(l){T.host=s.substring(t,l)}(r)),e===null&&(t=r),e}function Li(){var e,r,l,i,u,h,_;return h=t,_=t,e=m(),e=e!==null?e:"",e!==null?(r=m(),r=r!==null?r:"",r!==null?(l=m(),l=l!==null?l:"",l!==null?(i=m(),i=i!==null?i:"",i!==null?(u=m(),u=u!==null?u:"",u!==null?e=[e,r,l,i,u]:(e=null,t=_)):(e=null,t=_)):(e=null,t=_)):(e=null,t=_)):(e=null,t=_),e!==null&&(e=function(E,v){T.port=parseInt(v.join(""))}(h,e)),e===null&&(t=h),e}function Wr(){var e,r,l,i,u;return i=t,u=t,e=m(),e!==null?(r=m(),r=r!==null?r:"",r!==null?(l=m(),l=l!==null?l:"",l!==null?e=[e,r,l]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(h,_){return parseInt(_.join(""))}(i,e)),e===null&&(t=i),e}function vc(){var e;return e=Fr(),e}function Rc(){var e,r,l,i,u,h;if(u=t,e=Hi(),e!==null){for(r=[],h=t,l=j(),l!==null?(i=Vr(),i!==null?l=[l,i]:(l=null,t=h)):(l=null,t=h);l!==null;)r.push(l),h=t,l=j(),l!==null?(i=Vr(),i!==null?l=[l,i]:(l=null,t=h)):(l=null,t=h);r!==null?e=[e,r]:(e=null,t=u)}else e=null,t=u;return e}function Hi(){var e,r;return r=t,e=gt(),e!==null&&(e=function(l,i){T.expires=i}(r,e)),e===null&&(t=r),e}function Vr(){var e;return e=Fi(),e===null&&(e=Te()),e}function Fi(){var e,r,l,i,u;return i=t,u=t,s.substr(t,9).toLowerCase()==="refresher"?(e=s.substr(t,9),t+=9):(e=null,a('"refresher"')),e!==null?(r=z(),r!==null?(s.substr(t,3).toLowerCase()==="uac"?(l=s.substr(t,3),t+=3):(l=null,a('"uac"')),l===null&&(s.substr(t,3).toLowerCase()==="uas"?(l=s.substr(t,3),t+=3):(l=null,a('"uas"'))),l!==null?e=[e,r,l]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(h,_){T.refresher=_.toLowerCase()}(i,e[2])),e===null&&(t=i),e}function Ic(){var e,r,l,i;return i=t,e=q(),e!==null?(r=ft(),r!==null?(l=ki(),l!==null?e=[e,r,l]:(e=null,t=i)):(e=null,t=i)):(e=null,t=i),e}function ki(){var e,r;for(e=[],r=I(),r===null&&(r=w(),r===null&&(r=_e()));r!==null;)e.push(r),r=I(),r===null&&(r=w(),r===null&&(r=_e()));return e}function bc(){var e,r;for(e=[],r=B();r!==null;)e.push(r),r=B();return e}function wc(){var e,r,l;return l=t,s.substr(t,5)==="uuid:"?(e="uuid:",t+=5):(e=null,a('"uuid:"')),e!==null?(r=qi(),r!==null?e=[e,r]:(e=null,t=l)):(e=null,t=l),e}function qi(){var e,r,l,i,u,h,_,E,v,F,le;return F=t,le=t,e=Gi(),e!==null?(s.charCodeAt(t)===45?(r="-",t++):(r=null,a('"-"')),r!==null?(l=Qe(),l!==null?(s.charCodeAt(t)===45?(i="-",t++):(i=null,a('"-"')),i!==null?(u=Qe(),u!==null?(s.charCodeAt(t)===45?(h="-",t++):(h=null,a('"-"')),h!==null?(_=Qe(),_!==null?(s.charCodeAt(t)===45?(E="-",t++):(E=null,a('"-"')),E!==null?(v=Bi(),v!==null?e=[e,r,l,i,u,h,_,E,v]:(e=null,t=le)):(e=null,t=le)):(e=null,t=le)):(e=null,t=le)):(e=null,t=le)):(e=null,t=le)):(e=null,t=le)):(e=null,t=le)):(e=null,t=le),e!==null&&(e=function(Ve,xs){T=s.substring(t+5,Ve)}(F,e[0])),e===null&&(t=F),e}function Qe(){var e,r,l,i,u;return u=t,e=O(),e!==null?(r=O(),r!==null?(l=O(),l!==null?(i=O(),i!==null?e=[e,r,l,i]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e}function Gi(){var e,r,l;return l=t,e=Qe(),e!==null?(r=Qe(),r!==null?e=[e,r]:(e=null,t=l)):(e=null,t=l),e}function Bi(){var e,r,l,i;return i=t,e=Qe(),e!==null?(r=Qe(),r!==null?(l=Qe(),l!==null?e=[e,r,l]:(e=null,t=i)):(e=null,t=i)):(e=null,t=i),e}function yc(){var e,r,l,i,u,h,_;if(u=t,h=t,e=te(),e===null&&(e=mt()),e!==null){for(r=[],_=t,l=j(),l!==null?(i=Te(),i!==null?l=[l,i]:(l=null,t=_)):(l=null,t=_);l!==null;)r.push(l),_=t,l=j(),l!==null?(i=Te(),i!==null?l=[l,i]:(l=null,t=_)):(l=null,t=_);r!==null?e=[e,r]:(e=null,t=h)}else e=null,t=h;return e!==null&&(e=function(E){try{T=new yt(T.uri,T.display_name,T.params)}catch{T=-1}}()),e===null&&(t=u),e}function Nc(){var e,r,l,i,u,h;if(u=t,e=Wi(),e!==null){for(r=[],h=t,l=j(),l!==null?(i=jr(),i!==null?l=[l,i]:(l=null,t=h)):(l=null,t=h);l!==null;)r.push(l),h=t,l=j(),l!==null?(i=jr(),i!==null?l=[l,i]:(l=null,t=h)):(l=null,t=h);r!==null?e=[e,r]:(e=null,t=u)}else e=null,t=u;return e}function Wi(){var e,r,l,i,u,h;return i=t,u=t,e=We(),e!==null?(h=t,s.charCodeAt(t)===64?(r="@",t++):(r=null,a('"@"')),r!==null?(l=We(),l!==null?r=[r,l]:(r=null,t=h)):(r=null,t=h),r=r!==null?r:"",r!==null?e=[e,r]:(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(_){T.call_id=s.substring(t,_)}(i)),e===null&&(t=i),e}function jr(){var e;return e=Vi(),e===null&&(e=ji(),e===null&&(e=Yi(),e===null&&(e=Te()))),e}function Vi(){var e,r,l,i,u;return i=t,u=t,s.substr(t,6)==="to-tag"?(e="to-tag",t+=6):(e=null,a('"to-tag"')),e!==null?(r=z(),r!==null?(l=q(),l!==null?e=[e,r,l]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(h,_){T.to_tag=_}(i,e[2])),e===null&&(t=i),e}function ji(){var e,r,l,i,u;return i=t,u=t,s.substr(t,8)==="from-tag"?(e="from-tag",t+=8):(e=null,a('"from-tag"')),e!==null?(r=z(),r!==null?(l=q(),l!==null?e=[e,r,l]:(e=null,t=u)):(e=null,t=u)):(e=null,t=u),e!==null&&(e=function(h,_){T.from_tag=_}(i,e[2])),e===null&&(t=i),e}function Yi(){var e,r;return r=t,s.substr(t,10)==="early-only"?(e="early-only",t+=10):(e=null,a('"early-only"')),e!==null&&(e=function(l){T.early_only=!0}()),e===null&&(t=r),e}function Oc(e){e.sort();for(var r=null,l=[],i=0;i<e.length;i++)e[i]!==r&&(l.push(e[i]),r=e[i]);return l}function xc(){for(var e=1,r=1,l=!1,i=0;i<Math.max(t,d);i++){var u=s.charAt(i);u===`
4
+ `?(l||e++,r=1,l=!1):u==="\r"||u==="\u2028"||u==="\u2029"?(e++,r=1,l=!0):(r++,l=!1)}return{line:e,column:r}}var Ki=Ze(),yt=$s(),T={},Dc=c[o]();if(Dc===null||t!==s.length){var Yr=Math.max(t,d),Uc=Yr<s.length?s.charAt(Yr):null,zi=xc();return new this.SyntaxError(Oc(p),Uc,Yr,zi.line,zi.column),-1}return T},toSource:function(){return this._source}};return n.SyntaxError=function(s,o,c,t,d){function p(a,g){var m,S;switch(a.length){case 0:m="end of input";break;case 1:m=a[0];break;default:m=a.slice(0,a.length-1).join(", ")+" or "+a[a.length-1]}return S=g?f(g):"end of input","Expected "+m+" but "+S+" found."}this.name="SyntaxError",this.expected=s,this.found=o,this.message=p(s,o),this.offset=c,this.line=t,this.column=d},n.SyntaxError.prototype=Error.prototype,n}()),Ps}var Ms,tn;function Ze(){if(tn)return Ms;tn=1;const f=oe,n=Ce(),s=$e();return Ms=class Ji{static parse(c){if(c=s.parse(c,"SIP_URI"),c!==-1)return c}constructor(c,t,d,p,a={},g={}){if(!d)throw new TypeError('missing or invalid "host" parameter');this._parameters={},this._headers={},this._scheme=c||f.SIP,this._user=t,this._host=d,this._port=p;for(const m in a)Object.prototype.hasOwnProperty.call(a,m)&&this.setParam(m,a[m]);for(const m in g)Object.prototype.hasOwnProperty.call(g,m)&&this.setHeader(m,g[m])}get scheme(){return this._scheme}set scheme(c){this._scheme=c.toLowerCase()}get user(){return this._user}set user(c){this._user=c}get host(){return this._host}set host(c){this._host=c.toLowerCase()}get port(){return this._port}set port(c){this._port=c===0?c:parseInt(c,10)||null}setParam(c,t){c&&(this._parameters[c.toLowerCase()]=typeof t>"u"||t===null?null:t.toString())}getParam(c){if(c)return this._parameters[c.toLowerCase()]}hasParam(c){if(c)return this._parameters.hasOwnProperty(c.toLowerCase())&&!0||!1}deleteParam(c){if(c=c.toLowerCase(),this._parameters.hasOwnProperty(c)){const t=this._parameters[c];return delete this._parameters[c],t}}clearParams(){this._parameters={}}setHeader(c,t){this._headers[n.headerize(c)]=Array.isArray(t)?t:[t]}getHeader(c){if(c)return this._headers[n.headerize(c)]}hasHeader(c){if(c)return this._headers.hasOwnProperty(n.headerize(c))&&!0||!1}deleteHeader(c){if(c=n.headerize(c),this._headers.hasOwnProperty(c)){const t=this._headers[c];return delete this._headers[c],t}}clearHeaders(){this._headers={}}clone(){return new Ji(this._scheme,this._user,this._host,this._port,JSON.parse(JSON.stringify(this._parameters)),JSON.parse(JSON.stringify(this._headers)))}toString(){const c=[];let t=`${this._scheme}:`;this._user&&(t+=`${n.escapeUser(this._user)}@`),t+=this._host,(this._port||this._port===0)&&(t+=`:${this._port}`);for(const d in this._parameters)Object.prototype.hasOwnProperty.call(this._parameters,d)&&(t+=`;${d}`,this._parameters[d]!==null&&(t+=`=${this._parameters[d]}`));for(const d in this._headers)if(Object.prototype.hasOwnProperty.call(this._headers,d))for(const p of this._headers[d])c.push(`${d}=${p}`);return c.length>0&&(t+=`?${c.join("&")}`),t}toAor(c){let t=`${this._scheme}:`;return this._user&&(t+=`${n.escapeUser(this._user)}@`),t+=this._host,c&&(this._port||this._port===0)&&(t+=`:${this._port}`),t}},Ms}var sn;function Ce(){if(sn)return fe;sn=1;const f=oe,n=Ze(),s=$e();fe.str_utf8_length=d=>unescape(encodeURIComponent(d)).length;const o=fe.isFunction=d=>d!==void 0?Object.prototype.toString.call(d)==="[object Function]":!1;fe.isString=d=>d!==void 0?Object.prototype.toString.call(d)==="[object String]":!1,fe.isDecimal=d=>!isNaN(d)&&parseFloat(d)===parseInt(d,10),fe.isEmpty=d=>d===null||d===""||d===void 0||Array.isArray(d)&&d.length===0||typeof d=="number"&&isNaN(d),fe.hasMethods=function(d,...p){for(const a of p)if(o(d[a]))return!1;return!0};const c=fe.createRandomToken=(d,p=32)=>{let a,g,m="";for(a=0;a<d;a++)g=Math.random()*p|0,m+=g.toString(p);return m};fe.newTag=()=>c(10),fe.newUUID=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,p=>{const a=Math.random()*16|0;return(p==="x"?a:a&3|8).toString(16)}),fe.hostType=d=>{if(d){if(d=s.parse(d,"host"),d!==-1)return d.host_type}else return};const t=fe.escapeUser=d=>encodeURIComponent(decodeURIComponent(d)).replace(/%3A/gi,":").replace(/%2B/gi,"+").replace(/%3F/gi,"?").replace(/%2F/gi,"/");return fe.normalizeTarget=(d,p)=>{if(d){if(d instanceof n)return d;if(typeof d=="string"){const a=d.split("@");let g,m;switch(a.length){case 1:{if(!p)return;g=d,m=p;break}case 2:{g=a[0],m=a[1];break}default:g=a.slice(0,a.length-1).join("@"),m=a[a.length-1]}g=g.replace(/^(sips?|tel):/i,""),/^[-.()]*\+?[0-9\-.()]+$/.test(g)&&(g=g.replace(/[-.()]/g,"")),d=`${f.SIP}:${t(g)}@${m}`;let S;return(S=n.parse(d))?S:void 0}else return}else return},fe.headerize=d=>{const p={"Call-Id":"Call-ID",Cseq:"CSeq","Www-Authenticate":"WWW-Authenticate"},a=d.toLowerCase().replace(/_/g,"-").split("-");let g="";const m=a.length;let S;for(S=0;S<m;S++)S!==0&&(g+="-"),g+=a[S].charAt(0).toUpperCase()+a[S].substring(1);return p[g]&&(g=p[g]),g},fe.sipErrorCause=d=>{for(const p in f.SIP_ERROR_CAUSES)if(f.SIP_ERROR_CAUSES[p].indexOf(d)!==-1)return f.causes[p];return f.causes.SIP_FAILURE_CODE},fe.getRandomTestNetIP=()=>{function d(p,a){return Math.floor(Math.random()*(a-p+1)+p)}return`192.0.2.${d(1,254)}`},fe.calculateMD5=d=>{function p(W,G){return W<<G|W>>>32-G}function a(W,G){const V=W&2147483648,K=G&2147483648,ue=W&1073741824,ce=G&1073741824,te=(W&1073741823)+(G&1073741823);return ue&ce?te^2147483648^V^K:ue|ce?te&1073741824?te^3221225472^V^K:te^1073741824^V^K:te^V^K}function g(W,G,V){return W&G|~W&V}function m(W,G,V){return W&V|G&~V}function S(W,G,V){return W^G^V}function O(W,G,V){return G^(W|~V)}function H(W,G,V,K,ue,ce,te){return W=a(W,a(a(g(G,V,K),ue),te)),a(p(W,ce),G)}function B(W,G,V,K,ue,ce,te){return W=a(W,a(a(m(G,V,K),ue),te)),a(p(W,ce),G)}function k(W,G,V,K,ue,ce,te){return W=a(W,a(a(S(G,V,K),ue),te)),a(p(W,ce),G)}function U(W,G,V,K,ue,ce,te){return W=a(W,a(a(O(G,V,K),ue),te)),a(p(W,ce),G)}function de(W){let G;const V=W.length,K=V+8,ce=((K-K%64)/64+1)*16,te=new Array(ce-1);let Je=0,Oe=0;for(;Oe<V;)G=(Oe-Oe%4)/4,Je=Oe%4*8,te[G]=te[G]|W.charCodeAt(Oe)<<Je,Oe++;return G=(Oe-Oe%4)/4,Je=Oe%4*8,te[G]=te[G]|128<<Je,te[ce-2]=V<<3,te[ce-1]=V>>>29,te}function ne(W){let G="",V="",K,ue;for(ue=0;ue<=3;ue++)K=W>>>ue*8&255,V=`0${K.toString(16)}`,G=G+V.substr(V.length-2,2);return G}function tt(W){let G="";for(let V=0;V<W.length;V++){const K=W.charCodeAt(V);K<128?G+=String.fromCharCode(K):K>127&&K<2048?(G+=String.fromCharCode(K>>6|192),G+=String.fromCharCode(K&63|128)):(G+=String.fromCharCode(K>>12|224),G+=String.fromCharCode(K>>6&63|128),G+=String.fromCharCode(K&63|128))}return G}let y=[],$,ae,_e,X,ft,N,I,b,w;const bt=7,q=12,ze=17,wt=22,We=5,ht=9,Xe=14,z=20,dt=4,_t=11,st=16,rt=23,Z=6,j=10,pt=15,nt=21;for(d=tt(d),y=de(d),N=1732584193,I=4023233417,b=2562383102,w=271733878,$=0;$<y.length;$+=16)ae=N,_e=I,X=b,ft=w,N=H(N,I,b,w,y[$+0],bt,3614090360),w=H(w,N,I,b,y[$+1],q,3905402710),b=H(b,w,N,I,y[$+2],ze,606105819),I=H(I,b,w,N,y[$+3],wt,3250441966),N=H(N,I,b,w,y[$+4],bt,4118548399),w=H(w,N,I,b,y[$+5],q,1200080426),b=H(b,w,N,I,y[$+6],ze,2821735955),I=H(I,b,w,N,y[$+7],wt,4249261313),N=H(N,I,b,w,y[$+8],bt,1770035416),w=H(w,N,I,b,y[$+9],q,2336552879),b=H(b,w,N,I,y[$+10],ze,4294925233),I=H(I,b,w,N,y[$+11],wt,2304563134),N=H(N,I,b,w,y[$+12],bt,1804603682),w=H(w,N,I,b,y[$+13],q,4254626195),b=H(b,w,N,I,y[$+14],ze,2792965006),I=H(I,b,w,N,y[$+15],wt,1236535329),N=B(N,I,b,w,y[$+1],We,4129170786),w=B(w,N,I,b,y[$+6],ht,3225465664),b=B(b,w,N,I,y[$+11],Xe,643717713),I=B(I,b,w,N,y[$+0],z,3921069994),N=B(N,I,b,w,y[$+5],We,3593408605),w=B(w,N,I,b,y[$+10],ht,38016083),b=B(b,w,N,I,y[$+15],Xe,3634488961),I=B(I,b,w,N,y[$+4],z,3889429448),N=B(N,I,b,w,y[$+9],We,568446438),w=B(w,N,I,b,y[$+14],ht,3275163606),b=B(b,w,N,I,y[$+3],Xe,4107603335),I=B(I,b,w,N,y[$+8],z,1163531501),N=B(N,I,b,w,y[$+13],We,2850285829),w=B(w,N,I,b,y[$+2],ht,4243563512),b=B(b,w,N,I,y[$+7],Xe,1735328473),I=B(I,b,w,N,y[$+12],z,2368359562),N=k(N,I,b,w,y[$+5],dt,4294588738),w=k(w,N,I,b,y[$+8],_t,2272392833),b=k(b,w,N,I,y[$+11],st,1839030562),I=k(I,b,w,N,y[$+14],rt,4259657740),N=k(N,I,b,w,y[$+1],dt,2763975236),w=k(w,N,I,b,y[$+4],_t,1272893353),b=k(b,w,N,I,y[$+7],st,4139469664),I=k(I,b,w,N,y[$+10],rt,3200236656),N=k(N,I,b,w,y[$+13],dt,681279174),w=k(w,N,I,b,y[$+0],_t,3936430074),b=k(b,w,N,I,y[$+3],st,3572445317),I=k(I,b,w,N,y[$+6],rt,76029189),N=k(N,I,b,w,y[$+9],dt,3654602809),w=k(w,N,I,b,y[$+12],_t,3873151461),b=k(b,w,N,I,y[$+15],st,530742520),I=k(I,b,w,N,y[$+2],rt,3299628645),N=U(N,I,b,w,y[$+0],Z,4096336452),w=U(w,N,I,b,y[$+7],j,1126891415),b=U(b,w,N,I,y[$+14],pt,2878612391),I=U(I,b,w,N,y[$+5],nt,4237533241),N=U(N,I,b,w,y[$+12],Z,1700485571),w=U(w,N,I,b,y[$+3],j,2399980690),b=U(b,w,N,I,y[$+10],pt,4293915773),I=U(I,b,w,N,y[$+1],nt,2240044497),N=U(N,I,b,w,y[$+8],Z,1873313359),w=U(w,N,I,b,y[$+15],j,4264355552),b=U(b,w,N,I,y[$+6],pt,2734768916),I=U(I,b,w,N,y[$+13],nt,1309151649),N=U(N,I,b,w,y[$+4],Z,4149444226),w=U(w,N,I,b,y[$+11],j,3174756917),b=U(b,w,N,I,y[$+2],pt,718787259),I=U(I,b,w,N,y[$+9],nt,3951481745),N=a(N,ae),I=a(I,_e),b=a(b,X),w=a(w,ft);return(ne(N)+ne(I)+ne(b)+ne(w)).toLowerCase()},fe.closeMediaStream=d=>{if(d)try{let p;if(d.getTracks){p=d.getTracks();for(const a of p)a.stop()}else{p=d.getAudioTracks();for(const a of p)a.stop();p=d.getVideoTracks();for(const a of p)a.stop()}}catch{(typeof d.stop=="function"||typeof d.stop=="object")&&d.stop()}},fe.cloneArray=d=>d&&d.slice()||[],fe.cloneObject=(d,p={})=>d&&Object.assign({},d)||p,fe}var Ls={exports:{}},Tt=typeof Reflect=="object"?Reflect:null,rn=Tt&&typeof Tt.apply=="function"?Tt.apply:function(n,s,o){return Function.prototype.apply.call(n,s,o)},es;Tt&&typeof Tt.ownKeys=="function"?es=Tt.ownKeys:Object.getOwnPropertySymbols?es=function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:es=function(n){return Object.getOwnPropertyNames(n)};function na(f){console&&console.warn&&console.warn(f)}var nn=Number.isNaN||function(n){return n!==n};function J(){J.init.call(this)}Ls.exports=J,Ls.exports.once=oa,J.EventEmitter=J,J.prototype._events=void 0,J.prototype._eventsCount=0,J.prototype._maxListeners=void 0;var ln=10;function ts(f){if(typeof f!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof f)}Object.defineProperty(J,"defaultMaxListeners",{enumerable:!0,get:function(){return ln},set:function(f){if(typeof f!="number"||f<0||nn(f))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+f+".");ln=f}}),J.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},J.prototype.setMaxListeners=function(n){if(typeof n!="number"||n<0||nn(n))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+n+".");return this._maxListeners=n,this};function an(f){return f._maxListeners===void 0?J.defaultMaxListeners:f._maxListeners}J.prototype.getMaxListeners=function(){return an(this)},J.prototype.emit=function(n){for(var s=[],o=1;o<arguments.length;o++)s.push(arguments[o]);var c=n==="error",t=this._events;if(t!==void 0)c=c&&t.error===void 0;else if(!c)return!1;if(c){var d;if(s.length>0&&(d=s[0]),d instanceof Error)throw d;var p=new Error("Unhandled error."+(d?" ("+d.message+")":""));throw p.context=d,p}var a=t[n];if(a===void 0)return!1;if(typeof a=="function")rn(a,this,s);else for(var g=a.length,m=hn(a,g),o=0;o<g;++o)rn(m[o],this,s);return!0};function on(f,n,s,o){var c,t,d;if(ts(s),t=f._events,t===void 0?(t=f._events=Object.create(null),f._eventsCount=0):(t.newListener!==void 0&&(f.emit("newListener",n,s.listener?s.listener:s),t=f._events),d=t[n]),d===void 0)d=t[n]=s,++f._eventsCount;else if(typeof d=="function"?d=t[n]=o?[s,d]:[d,s]:o?d.unshift(s):d.push(s),c=an(f),c>0&&d.length>c&&!d.warned){d.warned=!0;var p=new Error("Possible EventEmitter memory leak detected. "+d.length+" "+String(n)+" listeners added. Use emitter.setMaxListeners() to increase limit");p.name="MaxListenersExceededWarning",p.emitter=f,p.type=n,p.count=d.length,na(p)}return f}J.prototype.addListener=function(n,s){return on(this,n,s,!1)},J.prototype.on=J.prototype.addListener,J.prototype.prependListener=function(n,s){return on(this,n,s,!0)};function la(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function un(f,n,s){var o={fired:!1,wrapFn:void 0,target:f,type:n,listener:s},c=la.bind(o);return c.listener=s,o.wrapFn=c,c}J.prototype.once=function(n,s){return ts(s),this.on(n,un(this,n,s)),this},J.prototype.prependOnceListener=function(n,s){return ts(s),this.prependListener(n,un(this,n,s)),this},J.prototype.removeListener=function(n,s){var o,c,t,d,p;if(ts(s),c=this._events,c===void 0)return this;if(o=c[n],o===void 0)return this;if(o===s||o.listener===s)--this._eventsCount===0?this._events=Object.create(null):(delete c[n],c.removeListener&&this.emit("removeListener",n,o.listener||s));else if(typeof o!="function"){for(t=-1,d=o.length-1;d>=0;d--)if(o[d]===s||o[d].listener===s){p=o[d].listener,t=d;break}if(t<0)return this;t===0?o.shift():ia(o,t),o.length===1&&(c[n]=o[0]),c.removeListener!==void 0&&this.emit("removeListener",n,p||s)}return this},J.prototype.off=J.prototype.removeListener,J.prototype.removeAllListeners=function(n){var s,o,c;if(o=this._events,o===void 0)return this;if(o.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):o[n]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete o[n]),this;if(arguments.length===0){var t=Object.keys(o),d;for(c=0;c<t.length;++c)d=t[c],d!=="removeListener"&&this.removeAllListeners(d);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(s=o[n],typeof s=="function")this.removeListener(n,s);else if(s!==void 0)for(c=s.length-1;c>=0;c--)this.removeListener(n,s[c]);return this};function cn(f,n,s){var o=f._events;if(o===void 0)return[];var c=o[n];return c===void 0?[]:typeof c=="function"?s?[c.listener||c]:[c]:s?aa(c):hn(c,c.length)}J.prototype.listeners=function(n){return cn(this,n,!0)},J.prototype.rawListeners=function(n){return cn(this,n,!1)},J.listenerCount=function(f,n){return typeof f.listenerCount=="function"?f.listenerCount(n):fn.call(f,n)},J.prototype.listenerCount=fn;function fn(f){var n=this._events;if(n!==void 0){var s=n[f];if(typeof s=="function")return 1;if(s!==void 0)return s.length}return 0}J.prototype.eventNames=function(){return this._eventsCount>0?es(this._events):[]};function hn(f,n){for(var s=new Array(n),o=0;o<n;++o)s[o]=f[o];return s}function ia(f,n){for(;n+1<f.length;n++)f[n]=f[n+1];f.pop()}function aa(f){for(var n=new Array(f.length),s=0;s<n.length;++s)n[s]=f[s].listener||f[s];return n}function oa(f,n){return new Promise(function(s,o){function c(d){f.removeListener(n,t),o(d)}function t(){typeof f.removeListener=="function"&&f.removeListener("error",c),s([].slice.call(arguments))}dn(f,n,t,{once:!0}),n!=="error"&&ua(f,c,{once:!0})})}function ua(f,n,s){typeof f.on=="function"&&dn(f,"error",n,s)}function dn(f,n,s,o){if(typeof f.on=="function")o.once?f.once(n,s):f.on(n,s);else if(typeof f.addEventListener=="function")f.addEventListener(n,function c(t){o.once&&f.removeEventListener(n,c),s(t)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof f)}var Fe=Ls.exports,Hs={exports:{}},Fs,_n;function ca(){if(_n)return Fs;_n=1;var f=1e3,n=f*60,s=n*60,o=s*24,c=o*7,t=o*365.25;Fs=function(m,S){S=S||{};var O=typeof m;if(O==="string"&&m.length>0)return d(m);if(O==="number"&&isFinite(m))return S.long?a(m):p(m);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(m))};function d(m){if(m=String(m),!(m.length>100)){var S=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(m);if(S){var O=parseFloat(S[1]),H=(S[2]||"ms").toLowerCase();switch(H){case"years":case"year":case"yrs":case"yr":case"y":return O*t;case"weeks":case"week":case"w":return O*c;case"days":case"day":case"d":return O*o;case"hours":case"hour":case"hrs":case"hr":case"h":return O*s;case"minutes":case"minute":case"mins":case"min":case"m":return O*n;case"seconds":case"second":case"secs":case"sec":case"s":return O*f;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return O;default:return}}}}function p(m){var S=Math.abs(m);return S>=o?Math.round(m/o)+"d":S>=s?Math.round(m/s)+"h":S>=n?Math.round(m/n)+"m":S>=f?Math.round(m/f)+"s":m+"ms"}function a(m){var S=Math.abs(m);return S>=o?g(m,S,o,"day"):S>=s?g(m,S,s,"hour"):S>=n?g(m,S,n,"minute"):S>=f?g(m,S,f,"second"):m+" ms"}function g(m,S,O,H){var B=S>=O*1.5;return Math.round(m/O)+" "+H+(B?"s":"")}return Fs}function fa(f){s.debug=s,s.default=s,s.coerce=a,s.disable=d,s.enable=c,s.enabled=p,s.humanize=ca(),s.destroy=g,Object.keys(f).forEach(m=>{s[m]=f[m]}),s.names=[],s.skips=[],s.formatters={};function n(m){let S=0;for(let O=0;O<m.length;O++)S=(S<<5)-S+m.charCodeAt(O),S|=0;return s.colors[Math.abs(S)%s.colors.length]}s.selectColor=n;function s(m){let S,O=null,H,B;function k(...U){if(!k.enabled)return;const de=k,ne=Number(new Date),tt=ne-(S||ne);de.diff=tt,de.prev=S,de.curr=ne,S=ne,U[0]=s.coerce(U[0]),typeof U[0]!="string"&&U.unshift("%O");let y=0;U[0]=U[0].replace(/%([a-zA-Z%])/g,(ae,_e)=>{if(ae==="%%")return"%";y++;const X=s.formatters[_e];if(typeof X=="function"){const ft=U[y];ae=X.call(de,ft),U.splice(y,1),y--}return ae}),s.formatArgs.call(de,U),(de.log||s.log).apply(de,U)}return k.namespace=m,k.useColors=s.useColors(),k.color=s.selectColor(m),k.extend=o,k.destroy=s.destroy,Object.defineProperty(k,"enabled",{enumerable:!0,configurable:!1,get:()=>O!==null?O:(H!==s.namespaces&&(H=s.namespaces,B=s.enabled(m)),B),set:U=>{O=U}}),typeof s.init=="function"&&s.init(k),k}function o(m,S){const O=s(this.namespace+(typeof S>"u"?":":S)+m);return O.log=this.log,O}function c(m){s.save(m),s.namespaces=m,s.names=[],s.skips=[];const S=(typeof m=="string"?m:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const O of S)O[0]==="-"?s.skips.push(O.slice(1)):s.names.push(O)}function t(m,S){let O=0,H=0,B=-1,k=0;for(;O<m.length;)if(H<S.length&&(S[H]===m[O]||S[H]==="*"))S[H]==="*"?(B=H,k=O,H++):(O++,H++);else if(B!==-1)H=B+1,k++,O=k;else return!1;for(;H<S.length&&S[H]==="*";)H++;return H===S.length}function d(){const m=[...s.names,...s.skips.map(S=>"-"+S)].join(",");return s.enable(""),m}function p(m){for(const S of s.skips)if(t(m,S))return!1;for(const S of s.names)if(t(m,S))return!0;return!1}function a(m){return m instanceof Error?m.stack||m.message:m}function g(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return s.enable(s.load()),s}var ha=fa;(function(f,n){n.formatArgs=o,n.save=c,n.load=t,n.useColors=s,n.storage=d(),n.destroy=(()=>{let a=!1;return()=>{a||(a=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),n.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function s(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let a;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(a=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(a[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function o(a){if(a[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+a[0]+(this.useColors?"%c ":" ")+"+"+f.exports.humanize(this.diff),!this.useColors)return;const g="color: "+this.color;a.splice(1,0,g,"color: inherit");let m=0,S=0;a[0].replace(/%[a-zA-Z%]/g,O=>{O!=="%%"&&(m++,O==="%c"&&(S=m))}),a.splice(S,0,g)}n.log=console.debug||console.log||(()=>{});function c(a){try{a?n.storage.setItem("debug",a):n.storage.removeItem("debug")}catch{}}function t(){let a;try{a=n.storage.getItem("debug")||n.storage.getItem("DEBUG")}catch{}return!a&&typeof process<"u"&&"env"in process&&(a=process.env.DEBUG),a}function d(){try{return localStorage}catch{}}f.exports=ha(n);const{formatters:p}=f.exports;p.j=function(a){try{return JSON.stringify(a)}catch(g){return"[UnexpectedJSONParseError]: "+g.message}}})(Hs,Hs.exports);var ks=Hs.exports;const Et=ks,St="JsSIP";var pe=class{constructor(n){n?(this._debug=Et.default(`${St}:${n}`),this._warn=Et.default(`${St}:WARN:${n}`),this._error=Et.default(`${St}:ERROR:${n}`)):(this._debug=Et.default(St),this._warn=Et.default(`${St}:WARN`),this._error=Et.default(`${St}:ERROR`)),this._debug.log=console.info.bind(console),this._warn.log=console.warn.bind(console),this._error.log=console.error.bind(console)}get debug(){return this._debug}get warn(){return this._warn}get error(){return this._error}},Pe={},pn={},mn={exports:{}},gn=mn.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(f){return f.encoding?"rtpmap:%d %s/%s/%s":f.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(f){return f.address!=null?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%s trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(f){return f.subtype!=null?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))?(?: (urn:ietf:params:rtp-hdrext:encrypt))? (\S*)(?: (\S*))?/,names:["value","direction","encrypt-uri","uri","config"],format:function(f){return"extmap:%d"+(f.direction?"/%s":"%v")+(f["encrypt-uri"]?" %s":"%v")+" %s"+(f.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(f){return f.sessionConfig!=null?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"connectionType",reg:/^connection:(new|existing)/,format:"connection:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*(?:\.\d*)*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*(?:\.\d*)*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(f){var n="candidate:%s %d %s %d %s %d typ %s";return n+=f.raddr!=null?" raddr %s rport %d":"%v%v",n+=f.tcptype!=null?" tcptype %s":"%v",f.generation!=null&&(n+=" generation %d"),n+=f["network-id"]!=null?" network-id %d":"%v",n+=f["network-cost"]!=null?" network-cost %d":"%v",n}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_-]*)(?::(.*))?/,names:["id","attribute","value"],format:function(f){var n="ssrc:%d";return f.attribute!=null&&(n+=" %s",f.value!=null&&(n+=":%s")),n}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(f){return f.maxMessageSize!=null?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(f){return f.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(f){return"imageattr:%s %s %s"+(f.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"),names:["dir1","list1","dir2","list2"],format:function(f){return"simulcast:%s %s"+(f.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{name:"sourceFilter",reg:/^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,names:["filterMode","netType","addressTypes","destAddress","srcList"],format:"source-filter: %s %s %s %s %s"},{name:"bundleOnly",reg:/^(bundle-only)/},{name:"label",reg:/^label:(.+)/,format:"label:%s"},{name:"sctpPort",reg:/^sctp-port:(\d+)$/,format:"sctp-port:%s"},{name:"maxMessageSize",reg:/^max-message-size:(\d+)$/,format:"max-message-size:%s"},{push:"tsRefClocks",reg:/^ts-refclk:([^\s=]*)(?:=(\S*))?/,names:["clksrc","clksrcExt"],format:function(f){return"ts-refclk:%s"+(f.clksrcExt!=null?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(f){var n="mediaclk:";return n+=f.id!=null?"id=%s %s":"%v%s",n+=f.mediaClockValue!=null?"=%s":"",n+=f.rateNumerator!=null?" rate=%s":"",n+=f.rateDenominator!=null?"/%s":"",n}},{name:"keywords",reg:/^keywds:(.+)$/,format:"keywds:%s"},{name:"content",reg:/^content:(.+)/,format:"content:%s"},{name:"bfcpFloorCtrl",reg:/^floorctrl:(c-only|s-only|c-s)/,format:"floorctrl:%s"},{name:"bfcpConfId",reg:/^confid:(\d+)/,format:"confid:%s"},{name:"bfcpUserId",reg:/^userid:(\d+)/,format:"userid:%s"},{name:"bfcpFloorId",reg:/^floorid:(.+) (?:m-stream|mstrm):(.+)/,names:["id","mStream"],format:"floorid:%s mstrm:%s"},{push:"invalid",names:["value"]}]};Object.keys(gn).forEach(function(f){var n=gn[f];n.forEach(function(s){s.reg||(s.reg=/(.*)/),s.format||(s.format="%s")})});var qs=mn.exports;(function(f){var n=function(p){return String(Number(p))===p?Number(p):p},s=function(p,a,g,m){if(m&&!g)a[m]=n(p[1]);else for(var S=0;S<g.length;S+=1)p[S+1]!=null&&(a[g[S]]=n(p[S+1]))},o=function(p,a,g){var m=p.name&&p.names;p.push&&!a[p.push]?a[p.push]=[]:m&&!a[p.name]&&(a[p.name]={});var S=p.push?{}:m?a[p.name]:a;s(g.match(p.reg),S,p.names,p.name),p.push&&a[p.push].push(S)},c=qs,t=RegExp.prototype.test.bind(/^([a-z])=(.*)/);f.parse=function(p){var a={},g=[],m=a;return p.split(/(\r\n|\r|\n)/).filter(t).forEach(function(S){var O=S[0],H=S.slice(2);O==="m"&&(g.push({rtp:[],fmtp:[]}),m=g[g.length-1]);for(var B=0;B<(c[O]||[]).length;B+=1){var k=c[O][B];if(k.reg.test(H))return o(k,m,H)}}),a.media=g,a};var d=function(p,a){var g=a.split(/=(.+)/,2);return g.length===2?p[g[0]]=n(g[1]):g.length===1&&a.length>1&&(p[g[0]]=void 0),p};f.parseParams=function(p){return p.split(/;\s?/).reduce(d,{})},f.parseFmtpConfig=f.parseParams,f.parsePayloads=function(p){return p.toString().split(" ").map(Number)},f.parseRemoteCandidates=function(p){for(var a=[],g=p.split(" ").map(n),m=0;m<g.length;m+=3)a.push({component:g[m],ip:g[m+1],port:g[m+2]});return a},f.parseImageAttributes=function(p){return p.split(" ").map(function(a){return a.substring(1,a.length-1).split(",").reduce(d,{})})},f.parseSimulcastStreamList=function(p){return p.split(";").map(function(a){return a.split(",").map(function(g){var m,S=!1;return g[0]!=="~"?m=n(g):(m=n(g.substring(1,g.length)),S=!0),{scid:m,paused:S}})})}})(pn);var Gs=qs,da=/%[sdv%]/g,_a=function(f){var n=1,s=arguments,o=s.length;return f.replace(da,function(c){if(n>=o)return c;var t=s[n];switch(n+=1,c){case"%%":return"%";case"%s":return String(t);case"%d":return Number(t);case"%v":return""}})},Nt=function(f,n,s){var o=n.format instanceof Function?n.format(n.push?s:s[n.name]):n.format,c=[f+"="+o];if(n.names)for(var t=0;t<n.names.length;t+=1){var d=n.names[t];n.name?c.push(s[n.name][d]):c.push(s[n.names[t]])}else c.push(s[n.name]);return _a.apply(null,c)},pa=["v","o","s","i","u","e","p","c","b","t","r","z","a"],ma=["i","c","b","a"],ga=function(f,n){n=n||{},f.version==null&&(f.version=0),f.name==null&&(f.name=" "),f.media.forEach(function(t){t.payloads==null&&(t.payloads="")});var s=n.outerOrder||pa,o=n.innerOrder||ma,c=[];return s.forEach(function(t){Gs[t].forEach(function(d){d.name in f&&f[d.name]!=null?c.push(Nt(t,d,f)):d.push in f&&f[d.push]!=null&&f[d.push].forEach(function(p){c.push(Nt(t,d,p))})})}),f.media.forEach(function(t){c.push(Nt("m",Gs.m[0],t)),o.forEach(function(d){Gs[d].forEach(function(p){p.name in t&&t[p.name]!=null?c.push(Nt(d,p,t)):p.push in t&&t[p.push]!=null&&t[p.push].forEach(function(a){c.push(Nt(d,p,a))})})})}),c.join(`\r
5
+ `)+`\r
6
+ `},lt=pn,Ta=ga,Ea=qs;Pe.grammar=Ea,Pe.write=Ta,Pe.parse=lt.parse,Pe.parseParams=lt.parseParams,Pe.parseFmtpConfig=lt.parseFmtpConfig,Pe.parsePayloads=lt.parsePayloads,Pe.parseRemoteCandidates=lt.parseRemoteCandidates,Pe.parseImageAttributes=lt.parseImageAttributes,Pe.parseSimulcastStreamList=lt.parseSimulcastStreamList;const Tn=Pe,Sa=pe,Ae=oe,me=Ce(),En=$s(),Ca=$e(),Bs=new Sa("SIPMessage");class ss{constructor(n,s,o,c,t,d){if(!n||!s||!o)return null;c=c||{},this.ua=o,this.headers={},this.method=n,this.ruri=s,this.body=d,this.extraHeaders=me.cloneArray(t),this.ua.configuration.extra_headers&&(this.extraHeaders=this.extraHeaders.concat(this.ua.configuration.extra_headers)),c.route_set?this.setHeader("route",c.route_set):o.configuration.use_preloaded_route&&this.setHeader("route",`<${o.transport.sip_uri};lr>`),this.setHeader("via",""),this.setHeader("max-forwards",Ae.MAX_FORWARDS);const p=c.to_uri||s,a=c.to_tag?{tag:c.to_tag}:null,g=typeof c.to_display_name<"u"?c.to_display_name:null;this.to=new En(p,g,a),this.setHeader("to",this.to.toString());const m=c.from_uri||o.configuration.uri,S={tag:c.from_tag||me.newTag()};let O;typeof c.from_display_name<"u"?O=c.from_display_name:o.configuration.display_name?O=o.configuration.display_name:O=null,this.from=new En(m,O,S),this.setHeader("from",this.from.toString());const H=c.call_id||o.configuration.jssip_id+me.createRandomToken(15);this.call_id=H,this.setHeader("call-id",H);const B=c.cseq||Math.floor(Math.random()*1e4);this.cseq=B,this.setHeader("cseq",`${B} ${n}`)}setHeader(n,s){const o=new RegExp(`^\\s*${n}\\s*:`,"i");for(let c=0;c<this.extraHeaders.length;c++)o.test(this.extraHeaders[c])&&this.extraHeaders.splice(c,1);this.headers[me.headerize(n)]=Array.isArray(s)?s:[s]}getHeader(n){const s=this.headers[me.headerize(n)];if(s){if(s[0])return s[0]}else{const o=new RegExp(`^\\s*${n}\\s*:`,"i");for(const c of this.extraHeaders)if(o.test(c))return c.substring(c.indexOf(":")+1).trim()}}getHeaders(n){const s=this.headers[me.headerize(n)],o=[];if(s){for(const c of s)o.push(c);return o}else{const c=new RegExp(`^\\s*${n}\\s*:`,"i");for(const t of this.extraHeaders)c.test(t)&&o.push(t.substring(t.indexOf(":")+1).trim());return o}}hasHeader(n){if(this.headers[me.headerize(n)])return!0;{const s=new RegExp(`^\\s*${n}\\s*:`,"i");for(const o of this.extraHeaders)if(s.test(o))return!0}return!1}parseSDP(n){return!n&&this.sdp?this.sdp:(this.sdp=Tn.parse(this.body||""),this.sdp)}toString(){let n=`${this.method} ${this.ruri} SIP/2.0\r
7
+ `;for(const c in this.headers)if(Object.prototype.hasOwnProperty.call(this.headers,c))for(const t of this.headers[c])n+=`${c}: ${t}\r
8
+ `;for(const c of this.extraHeaders)n+=`${c.trim()}\r
9
+ `;const s=[];switch(this.method){case Ae.REGISTER:{s.push("path","gruu");break}case Ae.INVITE:{this.ua.configuration.session_timers&&s.push("timer"),(this.ua.contact.pub_gruu||this.ua.contact.temp_gruu)&&s.push("gruu"),s.push("ice","replaces");break}case Ae.UPDATE:{this.ua.configuration.session_timers&&s.push("timer"),s.push("ice");break}}s.push("outbound");const o=this.ua.configuration.user_agent||Ae.USER_AGENT;if(n+=`Allow: ${Ae.ALLOWED_METHODS}\r
10
+ `,n+=`Supported: ${s}\r
11
+ `,n+=`User-Agent: ${o}\r
12
+ `,this.body){const c=me.str_utf8_length(this.body);n+=`Content-Length: ${c}\r
367
13
  \r
368
- `,r+=this.body):this.body.body&&this.body.contentType?(r+="Content-Type: "+this.body.contentType+`\r
369
- `,r+="Content-Length: "+e0(this.body.body)+`\r
14
+ `,n+=this.body}else n+=`Content-Length: 0\r
370
15
  \r
371
- `,r+=this.body.body):r+=`Content-Length: 0\r
16
+ `;return n}clone(){const n=new ss(this.method,this.ruri,this.ua);return Object.keys(this.headers).forEach(function(s){n.headers[s]=this.headers[s].slice()},this),n.body=this.body,n.extraHeaders=me.cloneArray(this.extraHeaders),n.to=this.to,n.from=this.from,n.call_id=this.call_id,n.cseq=this.cseq,n}}class Ws extends ss{constructor(n,s,o,c,t){super(Ae.INVITE,n,s,o,c,t),this.transaction=null}cancel(n){this.transaction.cancel(n)}clone(){const n=new Ws(this.ruri,this.ua);return Object.keys(this.headers).forEach(function(s){n.headers[s]=this.headers[s].slice()},this),n.body=this.body,n.extraHeaders=me.cloneArray(this.extraHeaders),n.to=this.to,n.from=this.from,n.call_id=this.call_id,n.cseq=this.cseq,n.transaction=this.transaction,n}}class Sn{constructor(){this.data=null,this.headers=null,this.method=null,this.via=null,this.via_branch=null,this.call_id=null,this.cseq=null,this.from=null,this.from_tag=null,this.to=null,this.to_tag=null,this.body=null,this.sdp=null}addHeader(n,s){const o={raw:s};n=me.headerize(n),this.headers[n]?this.headers[n].push(o):this.headers[n]=[o]}getHeader(n){const s=this.headers[me.headerize(n)];if(s){if(s[0])return s[0].raw}else return}getHeaders(n){const s=this.headers[me.headerize(n)],o=[];if(!s)return[];for(const c of s)o.push(c.raw);return o}hasHeader(n){return!!this.headers[me.headerize(n)]}parseHeader(n,s=0){if(n=me.headerize(n),this.headers[n]){if(s>=this.headers[n].length){Bs.debug(`not so many "${n}" headers present`);return}}else{Bs.debug(`header "${n}" not present`);return}const o=this.headers[n][s],c=o.raw;if(o.parsed)return o.parsed;const t=Ca.parse(c,n.replace(/-/g,"_"));if(t===-1){this.headers[n].splice(s,1),Bs.debug(`error parsing "${n}" header field with value "${c}"`);return}else return o.parsed=t,t}s(n,s){return this.parseHeader(n,s)}setHeader(n,s){const o={raw:s};this.headers[me.headerize(n)]=[o]}parseSDP(n){return!n&&this.sdp?this.sdp:(this.sdp=Tn.parse(this.body||""),this.sdp)}toString(){return this.data}}class Aa extends Sn{constructor(n){super(),this.ua=n,this.headers={},this.ruri=null,this.transport=null,this.server_transaction=null}reply(n,s,o,c,t,d){const p=[];let a=this.getHeader("To");if(n=n||null,s=s||null,!n||n<100||n>699)throw new TypeError(`Invalid status_code: ${n}`);if(s&&typeof s!="string"&&!(s instanceof String))throw new TypeError(`Invalid reason_phrase: ${s}`);s=s||Ae.REASON_PHRASE[n]||"",o=me.cloneArray(o),this.ua.configuration.extra_headers&&(o=o.concat(this.ua.configuration.extra_headers));let g=`SIP/2.0 ${n} ${s}\r
17
+ `;if(this.method===Ae.INVITE&&n>100&&n<=200){const S=this.getHeaders("record-route");for(const O of S)g+=`Record-Route: ${O}\r
18
+ `}const m=this.getHeaders("via");for(const S of m)g+=`Via: ${S}\r
19
+ `;!this.to_tag&&n>100?a+=`;tag=${me.newTag()}`:this.to_tag&&!this.s("to").hasParam("tag")&&(a+=`;tag=${this.to_tag}`),g+=`To: ${a}\r
20
+ `,g+=`From: ${this.getHeader("From")}\r
21
+ `,g+=`Call-ID: ${this.call_id}\r
22
+ `,g+=`CSeq: ${this.cseq} ${this.method}\r
23
+ `;for(const S of o)g+=`${S.trim()}\r
24
+ `;switch(this.method){case Ae.INVITE:{this.ua.configuration.session_timers&&p.push("timer"),(this.ua.contact.pub_gruu||this.ua.contact.temp_gruu)&&p.push("gruu"),p.push("ice","replaces");break}case Ae.UPDATE:this.ua.configuration.session_timers&&p.push("timer"),c&&p.push("ice"),p.push("replaces")}if(p.push("outbound"),this.method===Ae.OPTIONS?(g+=`Allow: ${Ae.ALLOWED_METHODS}\r
25
+ `,g+=`Accept: ${Ae.ACCEPTED_BODY_TYPES}\r
26
+ `):n===405?g+=`Allow: ${Ae.ALLOWED_METHODS}\r
27
+ `:n===415&&(g+=`Accept: ${Ae.ACCEPTED_BODY_TYPES}\r
28
+ `),g+=`Supported: ${p}\r
29
+ `,c){const S=me.str_utf8_length(c);g+=`Content-Type: application/sdp\r
30
+ `,g+=`Content-Length: ${S}\r
372
31
  \r
373
- `:r+=`Content-Length: 0\r
32
+ `,g+=c}else g+=`Content-Length: 0\r
374
33
  \r
375
- `,r}}function j2(o){return o==="application/sdp"?"session":"render"}function bv(o){const r=typeof o=="string"?o:o.body,i=typeof o=="string"?"application/sdp":o.contentType;return{contentDisposition:j2(i),contentType:i,content:r}}function z2(o){return o&&typeof o.content=="string"&&typeof o.contentType=="string"&&o.contentDisposition===void 0?!0:typeof o.contentDisposition=="string"}function t0(o){let r,i,l;if(o instanceof Qf&&o.body){const f=o.parseHeader("Content-Disposition");r=f?f.type:void 0,i=o.parseHeader("Content-Type"),l=o.body}if(o instanceof vu&&o.body){const f=o.parseHeader("Content-Disposition");r=f?f.type:void 0,i=o.parseHeader("Content-Type"),l=o.body}if(o instanceof Dc&&o.body)if(r=o.getHeader("Content-Disposition"),i=o.getHeader("Content-Type"),typeof o.body=="string"){if(!i)throw new Error("Header content type header does not equal body content type.");l=o.body}else{if(i&&i!==o.body.contentType)throw new Error("Header content type header does not equal body content type.");i=o.body.contentType,l=o.body.body}if(z2(o)&&(r=o.contentDisposition,i=o.contentType,l=o.content),!!l){if(i&&!r&&(r=j2(i)),!r)throw new Error("Content disposition undefined.");if(!i)throw new Error("Content type undefined.");return{contentDisposition:r,contentType:i,content:l}}}var as;(function(o){o.Initial="Initial",o.Early="Early",o.AckWait="AckWait",o.Confirmed="Confirmed",o.Terminated="Terminated"})(as=as||(as={}));var Ve;(function(o){o.Initial="Initial",o.HaveLocalOffer="HaveLocalOffer",o.HaveRemoteOffer="HaveRemoteOffer",o.Stable="Stable",o.Closed="Closed"})(Ve=Ve||(Ve={}));const dl=500,GR=4e3,q2=5e3,li={T1:dl,T2:GR,TIMER_B:64*dl,TIMER_D:0*dl,TIMER_F:64*dl,TIMER_H:64*dl,TIMER_I:0*q2,TIMER_J:0*dl,TIMER_K:0*q2,TIMER_L:64*dl,TIMER_M:64*dl,TIMER_N:64*dl,PROVISIONAL_RESPONSE_INTERVAL:6e4};class gu extends bc{constructor(r){super(r||"Transaction state error.")}}var nt;(function(o){o.ACK="ACK",o.BYE="BYE",o.CANCEL="CANCEL",o.INFO="INFO",o.INVITE="INVITE",o.MESSAGE="MESSAGE",o.NOTIFY="NOTIFY",o.OPTIONS="OPTIONS",o.REGISTER="REGISTER",o.UPDATE="UPDATE",o.SUBSCRIBE="SUBSCRIBE",o.PUBLISH="PUBLISH",o.REFER="REFER",o.PRACK="PRACK"})(nt=nt||(nt={}));const mu=[nt.ACK,nt.BYE,nt.CANCEL,nt.INFO,nt.INVITE,nt.MESSAGE,nt.NOTIFY,nt.OPTIONS,nt.PRACK,nt.REFER,nt.REGISTER,nt.SUBSCRIBE];class Y2{constructor(r){this.incomingMessageRequest=r}get request(){return this.incomingMessageRequest.message}accept(r){return this.incomingMessageRequest.accept(r),Promise.resolve()}reject(r){return this.incomingMessageRequest.reject(r),Promise.resolve()}}class Hx{constructor(r){this.incomingNotifyRequest=r}get request(){return this.incomingNotifyRequest.message}accept(r){return this.incomingNotifyRequest.accept(r),Promise.resolve()}reject(r){return this.incomingNotifyRequest.reject(r),Promise.resolve()}}class KR{constructor(r,i){this.incomingReferRequest=r,this.session=i}get referTo(){const r=this.incomingReferRequest.message.parseHeader("refer-to");if(!(r instanceof ma))throw new Error("Failed to parse Refer-To header.");return r}get referredBy(){return this.incomingReferRequest.message.getHeader("referred-by")}get replaces(){const r=this.referTo.uri.getHeader("replaces");return r instanceof Array?r[0]:r}get request(){return this.incomingReferRequest.message}accept(r={statusCode:202}){return this.incomingReferRequest.accept(r),Promise.resolve()}reject(r){return this.incomingReferRequest.reject(r),Promise.resolve()}makeInviter(r){if(this.inviter)return this.inviter;const i=this.referTo.uri.clone();i.clearHeaders(),r=r||{};const l=(r.extraHeaders||[]).slice(),f=this.replaces;f&&l.push("Replaces: "+decodeURIComponent(f));const p=this.referredBy;return p&&l.push("Referred-By: "+p),r.extraHeaders=l,this.inviter=this.session.userAgent._makeInviter(i,r),this.inviter._referred=this.session,this.session._referral=this.inviter,this.inviter}}var xe;(function(o){o.Initial="Initial",o.Establishing="Establishing",o.Established="Established",o.Terminating="Terminating",o.Terminated="Terminated"})(xe=xe||(xe={}));class r0{constructor(r,i={}){this.pendingReinvite=!1,this.pendingReinviteAck=!1,this._state=xe.Initial,this.delegate=i.delegate,this._stateEventEmitter=new Jh,this._userAgent=r}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 xe.Initial:break;case xe.Establishing:break;case xe.Established:return new Promise(r=>{this._bye({onAccept:()=>r(),onRedirect:()=>r(),onReject:()=>r()})});case xe.Terminating:break;case xe.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(r){this._sessionDescriptionHandlerModifiers=r.slice()}get sessionDescriptionHandlerOptions(){return this._sessionDescriptionHandlerOptions||{}}set sessionDescriptionHandlerOptions(r){this._sessionDescriptionHandlerOptions=Object.assign({},r)}get sessionDescriptionHandlerModifiersReInvite(){return this._sessionDescriptionHandlerModifiersReInvite||[]}set sessionDescriptionHandlerModifiersReInvite(r){this._sessionDescriptionHandlerModifiersReInvite=r.slice()}get sessionDescriptionHandlerOptionsReInvite(){return this._sessionDescriptionHandlerOptionsReInvite||{}}set sessionDescriptionHandlerOptionsReInvite(r){this._sessionDescriptionHandlerOptionsReInvite=Object.assign({},r)}get state(){return this._state}get stateChange(){return this._stateEventEmitter}get userAgent(){return this._userAgent}bye(r={}){let i="Session.bye() may only be called if established session.";switch(this.state){case xe.Initial:typeof this.cancel=="function"?(i+=" However Inviter.invite() has not yet been called.",i+=" Perhaps you should have called Inviter.cancel()?"):typeof this.reject=="function"&&(i+=" However Invitation.accept() has not yet been called.",i+=" Perhaps you should have called Invitation.reject()?");break;case xe.Establishing:typeof this.cancel=="function"?(i+=" However a dialog does not yet exist.",i+=" Perhaps you should have called Inviter.cancel()?"):typeof this.reject=="function"&&(i+=" However Invitation.accept() has not yet been called (or not yet resolved).",i+=" Perhaps you should have called Invitation.reject()?");break;case xe.Established:{const l=r.requestDelegate,f=this.copyRequestOptions(r.requestOptions);return this._bye(l,f)}case xe.Terminating:i+=" However this session is already terminating.",typeof this.cancel=="function"?i+=" Perhaps you have already called Inviter.cancel()?":typeof this.reject=="function"&&(i+=" Perhaps you have already called Session.bye()?");break;case xe.Terminated:i+=" However this session is already terminated.";break;default:throw new Error("Unknown state")}return this.logger.error(i),Promise.reject(new Error(`Invalid session state ${this.state}`))}info(r={}){if(this.state!==xe.Established)return this.logger.error("Session.info() may only be called if established session."),Promise.reject(new Error(`Invalid session state ${this.state}`));const i=r.requestDelegate,l=this.copyRequestOptions(r.requestOptions);return this._info(i,l)}invite(r={}){if(this.logger.log("Session.invite"),this.state!==xe.Established)return Promise.reject(new Error(`Invalid session state ${this.state}`));if(this.pendingReinvite)return Promise.reject(new Nx("Reinvite in progress. Please wait until complete, then try again."));this.pendingReinvite=!0,r.sessionDescriptionHandlerModifiers&&(this.sessionDescriptionHandlerModifiersReInvite=r.sessionDescriptionHandlerModifiers),r.sessionDescriptionHandlerOptions&&(this.sessionDescriptionHandlerOptionsReInvite=r.sessionDescriptionHandlerOptions);const i={onAccept:p=>{const v=t0(p.message);if(!v){this.logger.error("Received 2xx response to re-INVITE without a session description"),this.ackAndBye(p,400,"Missing session description"),this.stateTransition(xe.Terminated),this.pendingReinvite=!1;return}if(r.withoutSdp){const C={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptionsReInvite,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiersReInvite};this.setOfferAndGetAnswer(v,C).then(w=>{p.ack({body:w})}).catch(w=>{this.logger.error("Failed to handle offer in 2xx response to re-INVITE"),this.logger.error(w.message),this.state===xe.Terminated?p.ack():(this.ackAndBye(p,488,"Bad Media Description"),this.stateTransition(xe.Terminated))}).then(()=>{this.pendingReinvite=!1,r.requestDelegate&&r.requestDelegate.onAccept&&r.requestDelegate.onAccept(p)})}else{const C={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptionsReInvite,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiersReInvite};this.setAnswer(v,C).then(()=>{p.ack()}).catch(w=>{this.logger.error("Failed to handle answer in 2xx response to re-INVITE"),this.logger.error(w.message),this.state!==xe.Terminated?(this.ackAndBye(p,488,"Bad Media Description"),this.stateTransition(xe.Terminated)):p.ack()}).then(()=>{this.pendingReinvite=!1,r.requestDelegate&&r.requestDelegate.onAccept&&r.requestDelegate.onAccept(p)})}},onProgress:p=>{},onRedirect:p=>{},onReject:p=>{this.logger.warn("Received a non-2xx response to re-INVITE"),this.pendingReinvite=!1,r.withoutSdp?r.requestDelegate&&r.requestDelegate.onReject&&r.requestDelegate.onReject(p):this.rollbackOffer().catch(v=>{if(this.logger.error("Failed to rollback offer on non-2xx response to re-INVITE"),this.logger.error(v.message),this.state!==xe.Terminated){if(!this.dialog)throw new Error("Dialog undefined.");const C=[];C.push("Reason: "+this.getReasonHeaderValue(500,"Internal Server Error")),this.dialog.bye(void 0,{extraHeaders:C}),this.stateTransition(xe.Terminated)}}).then(()=>{r.requestDelegate&&r.requestDelegate.onReject&&r.requestDelegate.onReject(p)})},onTrying:p=>{}},l=r.requestOptions||{};if(l.extraHeaders=(l.extraHeaders||[]).slice(),l.extraHeaders.push("Allow: "+mu.toString()),l.extraHeaders.push("Contact: "+this._contact),r.withoutSdp){if(!this.dialog)throw this.pendingReinvite=!1,new Error("Dialog undefined.");return Promise.resolve(this.dialog.invite(i,l))}const f={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptionsReInvite,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiersReInvite};return this.getOffer(f).then(p=>{if(!this.dialog)throw this.pendingReinvite=!1,new Error("Dialog undefined.");return l.body=p,this.dialog.invite(i,l)}).catch(p=>{throw this.logger.error(p.message),this.logger.error("Failed to send re-INVITE"),this.pendingReinvite=!1,p})}message(r={}){if(this.state!==xe.Established)return this.logger.error("Session.message() may only be called if established session."),Promise.reject(new Error(`Invalid session state ${this.state}`));const i=r.requestDelegate,l=this.copyRequestOptions(r.requestOptions);return this._message(i,l)}refer(r,i={}){if(this.state!==xe.Established)return this.logger.error("Session.refer() may only be called if established session."),Promise.reject(new Error(`Invalid session state ${this.state}`));if(r instanceof r0&&!r.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 l=i.requestDelegate,f=this.copyRequestOptions(i.requestOptions);return f.extraHeaders=f.extraHeaders?f.extraHeaders.concat(this.referExtraHeaders(this.referToString(r))):this.referExtraHeaders(this.referToString(r)),this._refer(i.onNotify,l,f)}_bye(r,i){if(!this.dialog)return Promise.reject(new Error("Session dialog undefined."));const l=this.dialog;switch(l.sessionState){case as.Initial:throw new Error(`Invalid dialog state ${l.sessionState}`);case as.Early:throw new Error(`Invalid dialog state ${l.sessionState}`);case as.AckWait:return this.stateTransition(xe.Terminating),new Promise(f=>{l.delegate={onAck:()=>{const p=l.bye(r,i);return this.stateTransition(xe.Terminated),f(p),Promise.resolve()},onAckTimeout:()=>{const p=l.bye(r,i);this.stateTransition(xe.Terminated),f(p)}}});case as.Confirmed:{const f=l.bye(r,i);return this.stateTransition(xe.Terminated),Promise.resolve(f)}case as.Terminated:throw new Error(`Invalid dialog state ${l.sessionState}`);default:throw new Error("Unrecognized state.")}}_info(r,i){return this.dialog?Promise.resolve(this.dialog.info(r,i)):Promise.reject(new Error("Session dialog undefined."))}_message(r,i){return this.dialog?Promise.resolve(this.dialog.message(r,i)):Promise.reject(new Error("Session dialog undefined."))}_refer(r,i,l){return this.dialog?(this.onNotify=r,Promise.resolve(this.dialog.refer(i,l))):Promise.reject(new Error("Session dialog undefined."))}ackAndBye(r,i,l){r.ack();const f=[];i&&f.push("Reason: "+this.getReasonHeaderValue(i,l)),r.session.bye(void 0,{extraHeaders:f})}onAckRequest(r){if(this.logger.log("Session.onAckRequest"),this.state!==xe.Established&&this.state!==xe.Terminating)return this.logger.error(`ACK received while in state ${this.state}, dropping request`),Promise.resolve();const i=this.dialog;if(!i)throw new Error("Dialog undefined.");const l={sessionDescriptionHandlerOptions:this.pendingReinviteAck?this.sessionDescriptionHandlerOptionsReInvite:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.pendingReinviteAck?this._sessionDescriptionHandlerModifiersReInvite:this._sessionDescriptionHandlerModifiers};if(this.delegate&&this.delegate.onAck){const f=new UR(r);this.delegate.onAck(f)}switch(this.pendingReinviteAck=!1,i.signalingState){case Ve.Initial:{this.logger.error(`Invalid signaling state ${i.signalingState}.`);const f=["Reason: "+this.getReasonHeaderValue(488,"Bad Media Description")];return i.bye(void 0,{extraHeaders:f}),this.stateTransition(xe.Terminated),Promise.resolve()}case Ve.Stable:{const f=t0(r.message);return f?f.contentDisposition==="render"?(this._renderbody=f.content,this._rendertype=f.contentType,Promise.resolve()):f.contentDisposition!=="session"?Promise.resolve():this.setAnswer(f,l).catch(p=>{this.logger.error(p.message);const v=["Reason: "+this.getReasonHeaderValue(488,"Bad Media Description")];i.bye(void 0,{extraHeaders:v}),this.stateTransition(xe.Terminated)}):Promise.resolve()}case Ve.HaveLocalOffer:{this.logger.error(`Invalid signaling state ${i.signalingState}.`);const f=["Reason: "+this.getReasonHeaderValue(488,"Bad Media Description")];return i.bye(void 0,{extraHeaders:f}),this.stateTransition(xe.Terminated),Promise.resolve()}case Ve.HaveRemoteOffer:{this.logger.error(`Invalid signaling state ${i.signalingState}.`);const f=["Reason: "+this.getReasonHeaderValue(488,"Bad Media Description")];return i.bye(void 0,{extraHeaders:f}),this.stateTransition(xe.Terminated),Promise.resolve()}case Ve.Closed:throw new Error(`Invalid signaling state ${i.signalingState}.`);default:throw new Error(`Invalid signaling state ${i.signalingState}.`)}}onByeRequest(r){if(this.logger.log("Session.onByeRequest"),this.state!==xe.Established){this.logger.error(`BYE received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onBye){const i=new jR(r);this.delegate.onBye(i)}else r.accept();this.stateTransition(xe.Terminated)}onInfoRequest(r){if(this.logger.log("Session.onInfoRequest"),this.state!==xe.Established){this.logger.error(`INFO received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onInfo){const i=new qR(r);this.delegate.onInfo(i)}else r.accept()}onInviteRequest(r){if(this.logger.log("Session.onInviteRequest"),this.state!==xe.Established){this.logger.error(`INVITE received while in state ${this.state}, dropping request`);return}this.pendingReinviteAck=!0;const i=["Contact: "+this._contact];if(r.message.hasHeader("P-Asserted-Identity")){const f=r.message.getHeader("P-Asserted-Identity");if(!f)throw new Error("Header undefined.");this._assertedIdentity=qn.nameAddrHeaderParse(f)}const l={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptionsReInvite,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiersReInvite};this.generateResponseOfferAnswerInDialog(l).then(f=>{const p=r.accept({statusCode:200,extraHeaders:i,body:f});this.delegate&&this.delegate.onInvite&&this.delegate.onInvite(r.message,p.message,200)}).catch(f=>{if(this.logger.error(f.message),this.logger.error("Failed to handle to re-INVITE request"),!this.dialog)throw new Error("Dialog undefined.");if(this.logger.error(this.dialog.signalingState),this.dialog.signalingState===Ve.Stable){const p=r.reject({statusCode:488});this.delegate&&this.delegate.onInvite&&this.delegate.onInvite(r.message,p.message,488);return}this.rollbackOffer().then(()=>{const p=r.reject({statusCode:488});this.delegate&&this.delegate.onInvite&&this.delegate.onInvite(r.message,p.message,488)}).catch(p=>{this.logger.error(p.message),this.logger.error("Failed to rollback offer on re-INVITE request");const v=r.reject({statusCode:488});if(this.state!==xe.Terminated){if(!this.dialog)throw new Error("Dialog undefined.");const C=[];C.push("Reason: "+this.getReasonHeaderValue(500,"Internal Server Error")),this.dialog.bye(void 0,{extraHeaders:C}),this.stateTransition(xe.Terminated)}this.delegate&&this.delegate.onInvite&&this.delegate.onInvite(r.message,v.message,488)})})}onMessageRequest(r){if(this.logger.log("Session.onMessageRequest"),this.state!==xe.Established){this.logger.error(`MESSAGE received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onMessage){const i=new Y2(r);this.delegate.onMessage(i)}else r.accept()}onNotifyRequest(r){if(this.logger.log("Session.onNotifyRequest"),this.state!==xe.Established){this.logger.error(`NOTIFY received while in state ${this.state}, dropping request`);return}if(this.onNotify){const i=new Hx(r);this.onNotify(i);return}if(this.delegate&&this.delegate.onNotify){const i=new Hx(r);this.delegate.onNotify(i)}else r.accept()}onPrackRequest(r){if(this.logger.log("Session.onPrackRequest"),this.state!==xe.Established){this.logger.error(`PRACK received while in state ${this.state}, dropping request`);return}throw new Error("Unimplemented.")}onReferRequest(r){if(this.logger.log("Session.onReferRequest"),this.state!==xe.Established){this.logger.error(`REFER received while in state ${this.state}, dropping request`);return}if(!r.message.hasHeader("refer-to")){this.logger.warn("Invalid REFER packet. A refer-to header is required. Rejecting."),r.reject();return}const i=new KR(r,this);this.delegate&&this.delegate.onRefer?this.delegate.onRefer(i):(this.logger.log("No delegate available to handle REFER, automatically accepting and following."),i.accept().then(()=>i.makeInviter(this._referralInviterOptions).invite()).catch(l=>{this.logger.error(l.message)}))}generateResponseOfferAnswer(r,i){if(this.dialog)return this.generateResponseOfferAnswerInDialog(i);const l=t0(r.message);return!l||l.contentDisposition!=="session"?this.getOffer(i):this.setOfferAndGetAnswer(l,i)}generateResponseOfferAnswerInDialog(r){if(!this.dialog)throw new Error("Dialog undefined.");switch(this.dialog.signalingState){case Ve.Initial:return this.getOffer(r);case Ve.HaveLocalOffer:return Promise.resolve(void 0);case Ve.HaveRemoteOffer:if(!this.dialog.offer)throw new Error(`Session offer undefined in signaling state ${this.dialog.signalingState}.`);return this.setOfferAndGetAnswer(this.dialog.offer,r);case Ve.Stable:return this.state!==xe.Established?Promise.resolve(void 0):this.getOffer(r);case Ve.Closed:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);default:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`)}}getOffer(r){const i=this.setupSessionDescriptionHandler(),l=r.sessionDescriptionHandlerOptions,f=r.sessionDescriptionHandlerModifiers;try{return i.getDescription(l,f).then(p=>bv(p)).catch(p=>{this.logger.error("Session.getOffer: SDH getDescription rejected...");const v=p instanceof Error?p:new Error("Session.getOffer unknown error.");throw this.logger.error(v.message),v})}catch(p){this.logger.error("Session.getOffer: SDH getDescription threw...");const v=p instanceof Error?p:new Error(p);return this.logger.error(v.message),Promise.reject(v)}}rollbackOffer(){const r=this.setupSessionDescriptionHandler();if(r.rollbackDescription===void 0)return Promise.resolve();try{return r.rollbackDescription().catch(i=>{this.logger.error("Session.rollbackOffer: SDH rollbackDescription rejected...");const l=i instanceof Error?i:new Error("Session.rollbackOffer unknown error.");throw this.logger.error(l.message),l})}catch(i){this.logger.error("Session.rollbackOffer: SDH rollbackDescription threw...");const l=i instanceof Error?i:new Error(i);return this.logger.error(l.message),Promise.reject(l)}}setAnswer(r,i){const l=this.setupSessionDescriptionHandler(),f=i.sessionDescriptionHandlerOptions,p=i.sessionDescriptionHandlerModifiers;try{if(!l.hasDescription(r.contentType))return Promise.reject(new Ox)}catch(v){this.logger.error("Session.setAnswer: SDH hasDescription threw...");const C=v instanceof Error?v:new Error(v);return this.logger.error(C.message),Promise.reject(C)}try{return l.setDescription(r.content,f,p).catch(v=>{this.logger.error("Session.setAnswer: SDH setDescription rejected...");const C=v instanceof Error?v:new Error("Session.setAnswer unknown error.");throw this.logger.error(C.message),C})}catch(v){this.logger.error("Session.setAnswer: SDH setDescription threw...");const C=v instanceof Error?v:new Error(v);return this.logger.error(C.message),Promise.reject(C)}}setOfferAndGetAnswer(r,i){const l=this.setupSessionDescriptionHandler(),f=i.sessionDescriptionHandlerOptions,p=i.sessionDescriptionHandlerModifiers;try{if(!l.hasDescription(r.contentType))return Promise.reject(new Ox)}catch(v){this.logger.error("Session.setOfferAndGetAnswer: SDH hasDescription threw...");const C=v instanceof Error?v:new Error(v);return this.logger.error(C.message),Promise.reject(C)}try{return l.setDescription(r.content,f,p).then(()=>l.getDescription(f,p)).then(v=>bv(v)).catch(v=>{this.logger.error("Session.setOfferAndGetAnswer: SDH setDescription or getDescription rejected...");const C=v instanceof Error?v:new Error("Session.setOfferAndGetAnswer unknown error.");throw this.logger.error(C.message),C})}catch(v){this.logger.error("Session.setOfferAndGetAnswer: SDH setDescription or getDescription threw...");const C=v instanceof Error?v:new Error(v);return this.logger.error(C.message),Promise.reject(C)}}setSessionDescriptionHandler(r){if(this._sessionDescriptionHandler)throw new Error("Session description handler defined.");this._sessionDescriptionHandler=r}setupSessionDescriptionHandler(){var r;return this._sessionDescriptionHandler?this._sessionDescriptionHandler:(this._sessionDescriptionHandler=this.sessionDescriptionHandlerFactory(this,this.userAgent.configuration.sessionDescriptionHandlerFactoryOptions),!((r=this.delegate)===null||r===void 0)&&r.onSessionDescriptionHandler&&this.delegate.onSessionDescriptionHandler(this._sessionDescriptionHandler,!1),this._sessionDescriptionHandler)}stateTransition(r){const i=()=>{throw new Error(`Invalid state transition from ${this._state} to ${r}`)};switch(this._state){case xe.Initial:r!==xe.Establishing&&r!==xe.Established&&r!==xe.Terminating&&r!==xe.Terminated&&i();break;case xe.Establishing:r!==xe.Established&&r!==xe.Terminating&&r!==xe.Terminated&&i();break;case xe.Established:r!==xe.Terminating&&r!==xe.Terminated&&i();break;case xe.Terminating:r!==xe.Terminated&&i();break;case xe.Terminated:i();break;default:throw new Error("Unrecognized state.")}this._state=r,this.logger.log(`Session ${this.id} transitioned to state ${this._state}`),this._stateEventEmitter.emit(this._state),r===xe.Terminated&&this.dispose()}copyRequestOptions(r={}){const i=r.extraHeaders?r.extraHeaders.slice():void 0,l=r.body?{contentDisposition:r.body.contentDisposition||"render",contentType:r.body.contentType||"text/plain",content:r.body.content||""}:void 0;return{extraHeaders:i,body:l}}getReasonHeaderValue(r,i){const l=r;let f=Cv(r);return!f&&i&&(f=i),"SIP;cause="+l+';text="'+f+'"'}referExtraHeaders(r){const i=[];return i.push("Referred-By: <"+this.userAgent.configuration.uri+">"),i.push("Contact: "+this._contact),i.push("Allow: "+["ACK","CANCEL","INVITE","MESSAGE","BYE","OPTIONS","INFO","NOTIFY","REFER"].toString()),i.push("Refer-To: "+r),i}referToString(r){let i;if(r instanceof xo)i=r.toString();else{if(!r.dialog)throw new Error("Dialog undefined.");const l=r.remoteIdentity.friendlyName,f=r.dialog.remoteTarget.toString(),p=r.dialog.callId,v=r.dialog.remoteTag,C=r.dialog.localTag,w=encodeURIComponent(`${p};to-tag=${v};from-tag=${C}`);i=`"${l}" <${f}?Replaces=${w}>`}return i}}var Ps;(function(o){o.Required="Required",o.Supported="Supported",o.Unsupported="Unsupported"})(Ps=Ps||(Ps={}));const QR={"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};class XR extends r0{constructor(r,i){super(r),this.incomingInviteRequest=i,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=r.getLogger("sip.Invitation");const l=this.incomingInviteRequest.message,f=l.getHeader("require");f&&f.toLowerCase().includes("100rel")&&(this.rel100="required");const p=l.getHeader("supported");if(p&&p.toLowerCase().includes("100rel")&&(this.rel100="supported"),l.toTag=i.toTag,typeof l.toTag!="string")throw new TypeError("toTag should have been a string.");if(this.userNoAnswerTimer=setTimeout(()=>{i.reject({statusCode:480}),this.stateTransition(xe.Terminated)},this.userAgent.configuration.noAnswerTimeout?this.userAgent.configuration.noAnswerTimeout*1e3:6e4),l.hasHeader("expires")){const w=Number(l.getHeader("expires")||0)*1e3;this.expiresTimer=setTimeout(()=>{this.state===xe.Initial&&(i.reject({statusCode:487}),this.stateTransition(xe.Terminated))},w)}const v=this.request.getHeader("P-Asserted-Identity");v&&(this._assertedIdentity=qn.nameAddrHeaderParse(v)),this._contact=this.userAgent.contact.toString();const C=l.parseHeader("Content-Disposition");C&&C.type==="render"&&(this._renderbody=l.body,this._rendertype=l.getHeader("Content-Type")),this._id=l.callId+l.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 xe.Initial:return this.reject().then(()=>super.dispose());case xe.Establishing:return this.reject().then(()=>super.dispose());case xe.Established:return super.dispose();case xe.Terminating:return super.dispose();case xe.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(r={}){if(this.logger.log("Invitation.accept"),this.state!==xe.Initial){const i=new Error(`Invalid session state ${this.state}`);return this.logger.error(i.message),Promise.reject(i)}return r.sessionDescriptionHandlerModifiers&&(this.sessionDescriptionHandlerModifiers=r.sessionDescriptionHandlerModifiers),r.sessionDescriptionHandlerOptions&&(this.sessionDescriptionHandlerOptions=r.sessionDescriptionHandlerOptions),this.stateTransition(xe.Establishing),this.sendAccept(r).then(({message:i,session:l})=>{l.delegate={onAck:f=>this.onAckRequest(f),onAckTimeout:()=>this.onAckTimeout(),onBye:f=>this.onByeRequest(f),onInfo:f=>this.onInfoRequest(f),onInvite:f=>this.onInviteRequest(f),onMessage:f=>this.onMessageRequest(f),onNotify:f=>this.onNotifyRequest(f),onPrack:f=>this.onPrackRequest(f),onRefer:f=>this.onReferRequest(f)},this._dialog=l,this.stateTransition(xe.Established),this._replacee&&this._replacee._bye()}).catch(i=>this.handleResponseError(i))}progress(r={}){if(this.logger.log("Invitation.progress"),this.state!==xe.Initial){const l=new Error(`Invalid session state ${this.state}`);return this.logger.error(l.message),Promise.reject(l)}const i=r.statusCode||180;if(i<100||i>199)throw new TypeError("Invalid statusCode: "+i);return r.sessionDescriptionHandlerModifiers&&(this.sessionDescriptionHandlerModifiers=r.sessionDescriptionHandlerModifiers),r.sessionDescriptionHandlerOptions&&(this.sessionDescriptionHandlerOptions=r.sessionDescriptionHandlerOptions),this.waitingForPrack?(this.logger.warn("Unexpected call for progress while waiting for prack, ignoring"),Promise.resolve()):r.statusCode===100?this.sendProgressTrying().then(()=>{}).catch(l=>this.handleResponseError(l)):this.rel100!=="required"&&!(this.rel100==="supported"&&r.rel100)&&!(this.rel100==="supported"&&this.userAgent.configuration.sipExtension100rel===Ps.Required)?this.sendProgress(r).then(()=>{}).catch(l=>this.handleResponseError(l)):this.sendProgressReliableWaitForPrack(r).then(()=>{}).catch(l=>this.handleResponseError(l))}reject(r={}){if(this.logger.log("Invitation.reject"),this.state!==xe.Initial&&this.state!==xe.Establishing){const v=new Error(`Invalid session state ${this.state}`);return this.logger.error(v.message),Promise.reject(v)}const i=r.statusCode||480,l=r.reasonPhrase?r.reasonPhrase:Cv(i),f=r.extraHeaders||[];if(i<300||i>699)throw new TypeError("Invalid statusCode: "+i);const p=r.body?bv(r.body):void 0;return i<400?this.incomingInviteRequest.redirect([],{statusCode:i,reasonPhrase:l,extraHeaders:f,body:p}):this.incomingInviteRequest.reject({statusCode:i,reasonPhrase:l,extraHeaders:f,body:p}),this.stateTransition(xe.Terminated),Promise.resolve()}_onCancel(r){if(this.logger.log("Invitation._onCancel"),this.state!==xe.Initial&&this.state!==xe.Establishing){this.logger.error(`CANCEL received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onCancel){const i=new zR(r);this.delegate.onCancel(i)}this.isCanceled=!0,this.incomingInviteRequest.reject({statusCode:487}),this.stateTransition(xe.Terminated)}handlePrackOfferAnswer(r){if(!this.dialog)throw new Error("Dialog undefined.");const i=t0(r.message);if(!i||i.contentDisposition!=="session")return Promise.resolve(void 0);const l={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers};switch(this.dialog.signalingState){case Ve.Initial:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);case Ve.Stable:return this.setAnswer(i,l).then(()=>{});case Ve.HaveLocalOffer:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);case Ve.HaveRemoteOffer:return this.setOfferAndGetAnswer(i,l);case Ve.Closed:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);default:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`)}}handleResponseError(r){let i=480;if(r instanceof Error?this.logger.error(r.message):this.logger.error(r),r instanceof Ox?(this.logger.error("A session description handler occurred while sending response (content type unsupported"),i=415):r instanceof LR?this.logger.error("A session description handler occurred while sending response"):r instanceof Bx?this.logger.error("Session ended before response could be formulated and sent (while waiting for PRACK)"):r instanceof gu&&this.logger.error("Session changed state before response could be formulated and sent"),this.state===xe.Initial||this.state===xe.Establishing)try{this.incomingInviteRequest.reject({statusCode:i}),this.stateTransition(xe.Terminated)}catch(l){throw this.logger.error("An error occurred attempting to reject the request while handling another error"),l}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 r}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(xe.Terminated)}sendAccept(r={}){const i={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers},l=r.extraHeaders||[];return this.waitingForPrack?this.waitForArrivalOfPrack().then(()=>clearTimeout(this.userNoAnswerTimer)).then(()=>this.generateResponseOfferAnswer(this.incomingInviteRequest,i)).then(f=>this.incomingInviteRequest.accept({statusCode:200,body:f,extraHeaders:l})):(clearTimeout(this.userNoAnswerTimer),this.generateResponseOfferAnswer(this.incomingInviteRequest,i).then(f=>this.incomingInviteRequest.accept({statusCode:200,body:f,extraHeaders:l})))}sendProgress(r={}){const i=r.statusCode||180,l=r.reasonPhrase,f=(r.extraHeaders||[]).slice(),p=r.body?bv(r.body):void 0;if(i===183&&!p)return this.sendProgressWithSDP(r);try{const v=this.incomingInviteRequest.progress({statusCode:i,reasonPhrase:l,extraHeaders:f,body:p});return this._dialog=v.session,Promise.resolve(v)}catch(v){return Promise.reject(v)}}sendProgressWithSDP(r={}){const i={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers},l=r.statusCode||183,f=r.reasonPhrase,p=(r.extraHeaders||[]).slice();return this.generateResponseOfferAnswer(this.incomingInviteRequest,i).then(v=>this.incomingInviteRequest.progress({statusCode:l,reasonPhrase:f,extraHeaders:p,body:v})).then(v=>(this._dialog=v.session,v))}sendProgressReliable(r={}){return r.extraHeaders=(r.extraHeaders||[]).slice(),r.extraHeaders.push("Require: 100rel"),r.extraHeaders.push("RSeq: "+Math.floor(Math.random()*1e4)),this.sendProgressWithSDP(r)}sendProgressReliableWaitForPrack(r={}){const i={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers},l=r.statusCode||183,f=r.reasonPhrase,p=(r.extraHeaders||[]).slice();p.push("Require: 100rel"),p.push("RSeq: "+this.rseq++);let v;return new Promise((C,w)=>{this.waitingForPrack=!0,this.generateResponseOfferAnswer(this.incomingInviteRequest,i).then(S=>(v=S,this.incomingInviteRequest.progress({statusCode:l,reasonPhrase:f,extraHeaders:p,body:v}))).then(S=>{this._dialog=S.session;let b,T;S.session.delegate={onPrack:N=>{b=N,clearTimeout(H),clearTimeout(z),this.waitingForPrack&&(this.waitingForPrack=!1,this.handlePrackOfferAnswer(b).then(B=>{try{T=b.accept({statusCode:200,body:B}),this.prackArrived(),C({prackRequest:b,prackResponse:T,progressResponse:S})}catch(U){w(U)}}).catch(B=>w(B)))}};const H=setTimeout(()=>{this.waitingForPrack&&(this.waitingForPrack=!1,this.logger.warn("No PRACK received, rejecting INVITE."),clearTimeout(z),this.reject({statusCode:504}).then(()=>w(new Bx)).catch(N=>w(N)))},li.T1*64),P=()=>{try{this.incomingInviteRequest.progress({statusCode:l,reasonPhrase:f,extraHeaders:p,body:v})}catch(N){this.waitingForPrack=!1,w(N);return}z=setTimeout(P,j*=2)};let j=li.T1,z=setTimeout(P,j)}).catch(S=>{this.waitingForPrack=!1,w(S)})})}sendProgressTrying(){try{const r=this.incomingInviteRequest.trying();return Promise.resolve(r)}catch(r){return Promise.reject(r)}}waitForArrivalOfPrack(){if(this.waitingForPrackPromise)throw new Error("Already waiting for PRACK");return this.waitingForPrackPromise=new Promise((r,i)=>{this.waitingForPrackResolve=r,this.waitingForPrackReject=i}),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 Bx),this.waitingForPrackPromise=void 0,this.waitingForPrackResolve=void 0,this.waitingForPrackReject=void 0}}class V2 extends r0{constructor(r,i,l={}){super(r,l),this.disposed=!1,this.earlyMedia=!1,this.earlyMediaSessionDescriptionHandlers=new Map,this.isCanceled=!1,this.inviteWithoutSdp=!1,this.logger=r.getLogger("sip.Inviter"),this.earlyMedia=l.earlyMedia!==void 0?l.earlyMedia:this.earlyMedia,this.fromTag=wv(),this.inviteWithoutSdp=l.inviteWithoutSdp!==void 0?l.inviteWithoutSdp:this.inviteWithoutSdp;const f=Object.assign({},l);f.params=Object.assign({},l.params);const p=l.anonymous||!1,v=r.contact.toString({anonymous:p,outbound:p?!r.contact.tempGruu:!r.contact.pubGruu});p&&r.configuration.uri&&(f.params.fromDisplayName="Anonymous",f.params.fromUri="sip:anonymous@anonymous.invalid");let C=r.userAgentCore.configuration.aor;if(f.params.fromUri&&(C=typeof f.params.fromUri=="string"?qn.URIParse(f.params.fromUri):f.params.fromUri),!C)throw new TypeError("Invalid from URI: "+f.params.fromUri);let w=i;if(f.params.toUri&&(w=typeof f.params.toUri=="string"?qn.URIParse(f.params.toUri):f.params.toUri),!w)throw new TypeError("Invalid to URI: "+f.params.toUri);const S=Object.assign({},f.params);S.fromTag=this.fromTag;const b=(f.extraHeaders||[]).slice();p&&r.configuration.uri&&(b.push("P-Preferred-Identity: "+r.configuration.uri.toString()),b.push("Privacy: id")),b.push("Contact: "+v),b.push("Allow: "+["ACK","CANCEL","INVITE","MESSAGE","BYE","OPTIONS","INFO","NOTIFY","REFER"].toString()),r.configuration.sipExtension100rel===Ps.Required&&b.push("Require: 100rel"),r.configuration.sipExtensionReplaces===Ps.Required&&b.push("Require: replaces"),f.extraHeaders=b;const T=void 0;this.outgoingRequestMessage=r.userAgentCore.makeOutgoingRequestMessage(nt.INVITE,i,C,w,S,b,T),this._contact=v,this._referralInviterOptions=f,this._renderbody=l.renderbody,this._rendertype=l.rendertype,l.sessionDescriptionHandlerModifiers&&(this.sessionDescriptionHandlerModifiers=l.sessionDescriptionHandlerModifiers),l.sessionDescriptionHandlerOptions&&(this.sessionDescriptionHandlerOptions=l.sessionDescriptionHandlerOptions),l.sessionDescriptionHandlerModifiersReInvite&&(this.sessionDescriptionHandlerModifiersReInvite=l.sessionDescriptionHandlerModifiersReInvite),l.sessionDescriptionHandlerOptionsReInvite&&(this.sessionDescriptionHandlerOptionsReInvite=l.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 xe.Initial:return this.cancel().then(()=>super.dispose());case xe.Establishing:return this.cancel().then(()=>super.dispose());case xe.Established:return super.dispose();case xe.Terminating:return super.dispose();case xe.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(r={}){if(this.logger.log("Inviter.cancel"),this.state!==xe.Initial&&this.state!==xe.Establishing){const l=new Error(`Invalid session state ${this.state}`);return this.logger.error(l.message),Promise.reject(l)}this.isCanceled=!0,this.stateTransition(xe.Terminating);function i(l,f){if(l&&l<200||l>699)throw new TypeError("Invalid statusCode: "+l);if(l){const p=l,v=Cv(l)||f;return"SIP;cause="+p+';text="'+v+'"'}}if(this.outgoingInviteRequest){let l;r.statusCode&&r.reasonPhrase&&(l=i(r.statusCode,r.reasonPhrase)),this.outgoingInviteRequest.cancel(l,r)}else this.logger.warn("Canceled session before INVITE was sent"),this.stateTransition(xe.Terminated);return Promise.resolve()}invite(r={}){if(this.logger.log("Inviter.invite"),this.state!==xe.Initial)return super.invite(r);if(r.sessionDescriptionHandlerModifiers&&(this.sessionDescriptionHandlerModifiers=r.sessionDescriptionHandlerModifiers),r.sessionDescriptionHandlerOptions&&(this.sessionDescriptionHandlerOptions=r.sessionDescriptionHandlerOptions),r.withoutSdp||this.inviteWithoutSdp)return this._renderbody&&this._rendertype&&(this.outgoingRequestMessage.body={contentType:this._rendertype,body:this._renderbody}),this.stateTransition(xe.Establishing),Promise.resolve(this.sendInvite(r));const i={sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers,sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions};return this.getOffer(i).then(l=>(this.outgoingRequestMessage.body={body:l.content,contentType:l.contentType},this.stateTransition(xe.Establishing),this.sendInvite(r))).catch(l=>{throw this.logger.log(l.message),this.state!==xe.Terminated&&this.stateTransition(xe.Terminated),l})}sendInvite(r={}){return this.outgoingInviteRequest=this.userAgent.userAgentCore.invite(this.outgoingRequestMessage,{onAccept:i=>{if(this.dialog){this.logger.log("Additional confirmed dialog, sending ACK and BYE"),this.ackAndBye(i);return}if(this.isCanceled){this.logger.log("Canceled session accepted, sending ACK and BYE"),this.ackAndBye(i),this.stateTransition(xe.Terminated);return}this.notifyReferer(i),this.onAccept(i).then(()=>{this.disposeEarlyMedia()}).catch(()=>{this.disposeEarlyMedia()}).then(()=>{r.requestDelegate&&r.requestDelegate.onAccept&&r.requestDelegate.onAccept(i)})},onProgress:i=>{this.isCanceled||(this.notifyReferer(i),this.onProgress(i).catch(()=>{this.disposeEarlyMedia()}).then(()=>{r.requestDelegate&&r.requestDelegate.onProgress&&r.requestDelegate.onProgress(i)}))},onRedirect:i=>{this.notifyReferer(i),this.onRedirect(i),r.requestDelegate&&r.requestDelegate.onRedirect&&r.requestDelegate.onRedirect(i)},onReject:i=>{this.notifyReferer(i),this.onReject(i),r.requestDelegate&&r.requestDelegate.onReject&&r.requestDelegate.onReject(i)},onTrying:i=>{this.notifyReferer(i),this.onTrying(i),r.requestDelegate&&r.requestDelegate.onTrying&&r.requestDelegate.onTrying(i)}}),this.outgoingInviteRequest}disposeEarlyMedia(){this.earlyMediaSessionDescriptionHandlers.forEach(r=>{r.close()}),this.earlyMediaSessionDescriptionHandlers.clear()}notifyReferer(r){if(!this._referred)return;if(!(this._referred instanceof r0))throw new Error("Referred session not instance of session");if(!this._referred.dialog)return;if(!r.message.statusCode)throw new Error("Status code undefined.");if(!r.message.reasonPhrase)throw new Error("Reason phrase undefined.");const i=r.message.statusCode,l=r.message.reasonPhrase,f=`SIP/2.0 ${i} ${l}`.trim(),p=this._referred.dialog.notify(void 0,{extraHeaders:["Event: refer","Subscription-State: terminated"],body:{contentDisposition:"render",contentType:"message/sipfrag",content:f}});p.delegate={onReject:()=>{this._referred=void 0}}}onAccept(r){if(this.logger.log("Inviter.onAccept"),this.state!==xe.Establishing)return this.logger.error(`Accept received while in state ${this.state}, dropping response`),Promise.reject(new Error(`Invalid session state ${this.state}`));const i=r.message,l=r.session;switch(i.hasHeader("P-Asserted-Identity")&&(this._assertedIdentity=qn.nameAddrHeaderParse(i.getHeader("P-Asserted-Identity"))),l.delegate={onAck:f=>this.onAckRequest(f),onBye:f=>this.onByeRequest(f),onInfo:f=>this.onInfoRequest(f),onInvite:f=>this.onInviteRequest(f),onMessage:f=>this.onMessageRequest(f),onNotify:f=>this.onNotifyRequest(f),onPrack:f=>this.onPrackRequest(f),onRefer:f=>this.onReferRequest(f)},this._dialog=l,l.signalingState){case Ve.Initial:return this.logger.error("Received 2xx response to INVITE without a session description"),this.ackAndBye(r,400,"Missing session description"),this.stateTransition(xe.Terminated),Promise.reject(new Error("Bad Media Description"));case Ve.HaveLocalOffer:return this.logger.error("Received 2xx response to INVITE without a session description"),this.ackAndBye(r,400,"Missing session description"),this.stateTransition(xe.Terminated),Promise.reject(new Error("Bad Media Description"));case Ve.HaveRemoteOffer:{if(!this._dialog.offer)throw new Error(`Session offer undefined in signaling state ${this._dialog.signalingState}.`);const f={sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers,sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions};return this.setOfferAndGetAnswer(this._dialog.offer,f).then(p=>{r.ack({body:p}),this.stateTransition(xe.Established)}).catch(p=>{throw this.ackAndBye(r,488,"Invalid session description"),this.stateTransition(xe.Terminated),p})}case Ve.Stable:{if(this.earlyMediaSessionDescriptionHandlers.size>0){const v=this.earlyMediaSessionDescriptionHandlers.get(l.id);if(!v)throw new Error("Session description handler undefined.");return this.setSessionDescriptionHandler(v),this.earlyMediaSessionDescriptionHandlers.delete(l.id),r.ack(),this.stateTransition(xe.Established),Promise.resolve()}if(this.earlyMediaDialog){if(this.earlyMediaDialog!==l){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 v=new Error("Early media dialog does not equal confirmed dialog, terminating session");return this.logger.error(v.message),this.ackAndBye(r,488,"Not Acceptable Here"),this.stateTransition(xe.Terminated),Promise.reject(v)}return r.ack(),this.stateTransition(xe.Established),Promise.resolve()}const f=l.answer;if(!f)throw new Error("Answer is undefined.");const p={sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers,sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions};return this.setAnswer(f,p).then(()=>{let v;this._renderbody&&this._rendertype&&(v={body:{contentDisposition:"render",contentType:this._rendertype,content:this._renderbody}}),r.ack(v),this.stateTransition(xe.Established)}).catch(v=>{throw this.logger.error(v.message),this.ackAndBye(r,488,"Not Acceptable Here"),this.stateTransition(xe.Terminated),v})}case Ve.Closed:return Promise.reject(new Error("Terminated."));default:throw new Error("Unknown session signaling state.")}}onProgress(r){var i;if(this.logger.log("Inviter.onProgress"),this.state!==xe.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 l=r.message,f=r.session;l.hasHeader("P-Asserted-Identity")&&(this._assertedIdentity=qn.nameAddrHeaderParse(l.getHeader("P-Asserted-Identity")));const p=l.getHeader("require"),v=l.getHeader("rseq"),w=!!(p&&p.includes("100rel")&&v?Number(v):void 0),S=[];switch(w&&S.push("RAck: "+l.getHeader("rseq")+" "+l.getHeader("cseq")),f.signalingState){case Ve.Initial:return w&&(this.logger.warn("First reliable provisional response received MUST contain an offer when INVITE does not contain an offer."),r.prack({extraHeaders:S})),Promise.resolve();case Ve.HaveLocalOffer:return w&&r.prack({extraHeaders:S}),Promise.resolve();case Ve.HaveRemoteOffer:if(!w)return this.logger.warn("Non-reliable provisional response MUST NOT contain an initial offer, discarding response."),Promise.resolve();{const b=this.sessionDescriptionHandlerFactory(this,this.userAgent.configuration.sessionDescriptionHandlerFactoryOptions||{});return!((i=this.delegate)===null||i===void 0)&&i.onSessionDescriptionHandler&&this.delegate.onSessionDescriptionHandler(b,!0),this.earlyMediaSessionDescriptionHandlers.set(f.id,b),b.setDescription(l.body,this.sessionDescriptionHandlerOptions,this.sessionDescriptionHandlerModifiers).then(()=>b.getDescription(this.sessionDescriptionHandlerOptions,this.sessionDescriptionHandlerModifiers)).then(T=>{const A={contentDisposition:"session",contentType:T.contentType,content:T.body};r.prack({extraHeaders:S,body:A})}).catch(T=>{throw this.stateTransition(xe.Terminated),T})}case Ve.Stable:if(w&&r.prack({extraHeaders:S}),this.earlyMedia&&!this.earlyMediaDialog){this.earlyMediaDialog=f;const b=f.answer;if(!b)throw new Error("Answer is undefined.");const T={sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers,sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions};return this.setAnswer(b,T).catch(A=>{throw this.stateTransition(xe.Terminated),A})}return Promise.resolve();case Ve.Closed:return Promise.reject(new Error("Terminated."));default:throw new Error("Unknown session signaling state.")}}onRedirect(r){if(this.logger.log("Inviter.onRedirect"),this.state!==xe.Establishing&&this.state!==xe.Terminating){this.logger.error(`Redirect received while in state ${this.state}, dropping response`);return}this.stateTransition(xe.Terminated)}onReject(r){if(this.logger.log("Inviter.onReject"),this.state!==xe.Establishing&&this.state!==xe.Terminating){this.logger.error(`Reject received while in state ${this.state}, dropping response`);return}this.stateTransition(xe.Terminated)}onTrying(r){if(this.logger.log("Inviter.onTrying"),this.state!==xe.Establishing){this.logger.error(`Trying received while in state ${this.state}, dropping response`);return}}}var Er;(function(o){o.Initial="Initial",o.Registered="Registered",o.Unregistered="Unregistered",o.Terminated="Terminated"})(Er=Er||(Er={}));class So{constructor(r,i={}){this.disposed=!1,this._contacts=[],this._retryAfter=void 0,this._state=Er.Initial,this._waiting=!1,this._stateEventEmitter=new Jh,this._waitingEventEmitter=new Jh,this.userAgent=r;const l=r.configuration.uri.clone();if(l.user=void 0,this.options=Object.assign(Object.assign(Object.assign({},So.defaultOptions()),{registrar:l}),So.stripUndefinedProperties(i)),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&&qn.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 f=this.options.registrar,p=this.options.params&&this.options.params.fromUri||r.userAgentCore.configuration.aor,v=this.options.params&&this.options.params.toUri||r.configuration.uri,C=this.options.params||{},w=(i.extraHeaders||[]).slice();if(this.request=r.userAgentCore.makeOutgoingRequestMessage(nt.REGISTER,f,p,v,C,w,void 0),this.expires=this.options.expires||So.defaultExpires,this.expires<0)throw new Error("Invalid expires.");if(this.refreshFrequency=this.options.refreshFrequency||So.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=r.getLogger("sip.Registerer"),this.options.logConfiguration&&(this.logger.log("Configuration:"),Object.keys(this.options).forEach(S=>{const b=this.options[S];switch(S){case"registrar":this.logger.log("· "+S+": "+b);break;default:this.logger.log("· "+S+": "+JSON.stringify(b))}})),this.id=this.request.callId+this.request.from.parameters.tag,this.userAgent._registerers[this.id]=this}static defaultOptions(){return{expires:So.defaultExpires,extraContactHeaderParams:[],extraHeaders:[],logConfiguration:!0,instanceId:"",params:{},regId:0,registrar:new xo("sip","anonymous","anonymous.invalid"),refreshFrequency:So.defaultRefreshFrequency}}static stripUndefinedProperties(r){return Object.keys(r).reduce((i,l)=>(r[l]!==void 0&&(i[l]=r[l]),i),{})}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(r=>{const i=()=>{if(!this.waiting&&this._state===Er.Registered){this.stateChange.addListener(()=>{this.terminated(),r()},{once:!0}),this.unregister();return}this.terminated(),r()};this.waiting?this.waitingChange.addListener(()=>{i()},{once:!0}):i()}))}register(r={}){if(this.state===Er.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 f=new Nx("REGISTER request already in progress, waiting for final response");return Promise.reject(f)}r.requestOptions&&(this.options=Object.assign(Object.assign({},this.options),r.requestOptions));const i=(this.options.extraHeaders||[]).slice();i.push("Contact: "+this.generateContactHeader(this.expires)),i.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=i,this.waitingToggle(!0);const l=this.userAgent.userAgentCore.register(this.request,{onAccept:f=>{let p;f.message.hasHeader("expires")&&(p=Number(f.message.getHeader("expires"))),this._contacts=f.message.getHeaders("contact");let v=this._contacts.length;if(!v){this.logger.error("No Contact header in response to REGISTER, dropping response."),this.unregistered();return}let C;for(;v--;){if(C=f.message.parseHeader("contact",v),!C)throw new Error("Contact undefined");if(this.userAgent.contact.pubGruu&&L2(C.uri,this.userAgent.contact.pubGruu)){p=Number(C.getParam("expires"));break}if(this.userAgent.configuration.contactName===""){if(C.uri.user===this.userAgent.contact.uri.user){p=Number(C.getParam("expires"));break}}else if(L2(C.uri,this.userAgent.contact.uri)){p=Number(C.getParam("expires"));break}C=void 0}if(C===void 0){this.logger.error("No Contact header pointing to us, dropping response"),this.unregistered(),this.waitingToggle(!1);return}if(p===void 0){this.logger.error("Contact pointing to us is missing expires parameter, dropping response"),this.unregistered(),this.waitingToggle(!1);return}if(C.hasParam("temp-gruu")){const w=C.getParam("temp-gruu");w&&(this.userAgent.contact.tempGruu=qn.URIParse(w.replace(/"/g,"")))}if(C.hasParam("pub-gruu")){const w=C.getParam("pub-gruu");w&&(this.userAgent.contact.pubGruu=qn.URIParse(w.replace(/"/g,"")))}this.registered(p),r.requestDelegate&&r.requestDelegate.onAccept&&r.requestDelegate.onAccept(f),this.waitingToggle(!1)},onProgress:f=>{r.requestDelegate&&r.requestDelegate.onProgress&&r.requestDelegate.onProgress(f)},onRedirect:f=>{this.logger.error("Redirect received. Not supported."),this.unregistered(),r.requestDelegate&&r.requestDelegate.onRedirect&&r.requestDelegate.onRedirect(f),this.waitingToggle(!1)},onReject:f=>{if(f.message.statusCode===423){if(!f.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(f.message.getHeader("min-expires")),this.waitingToggle(!1),this.register();return}this.logger.warn(`Failed to register, status code ${f.message.statusCode}`);let p=NaN;if(f.message.statusCode===500||f.message.statusCode===503){const v=f.message.getHeader("retry-after");v&&(p=Number.parseInt(v,void 0))}this._retryAfter=isNaN(p)?void 0:p,this.unregistered(),r.requestDelegate&&r.requestDelegate.onReject&&r.requestDelegate.onReject(f),this._retryAfter=void 0,this.waitingToggle(!1)},onTrying:f=>{r.requestDelegate&&r.requestDelegate.onTrying&&r.requestDelegate.onTrying(f)}});return Promise.resolve(l)}unregister(r={}){if(this.state===Er.Terminated)throw this.stateError(),new Error("Registerer terminated. Unable to register.");if(this.disposed&&this.state!==Er.Registered)throw this.stateError(),new Error("Registerer disposed. Unable to register.");if(this.waiting){this.waitingWarning();const f=new Nx("REGISTER request already in progress, waiting for final response");return Promise.reject(f)}this._state!==Er.Registered&&!r.all&&this.logger.warn("Not currently registered, but sending an unregister anyway.");const i=(r.requestOptions&&r.requestOptions.extraHeaders||[]).slice();this.request.extraHeaders=i,r.all?(i.push("Contact: *"),i.push("Expires: 0")):i.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 l=this.userAgent.userAgentCore.register(this.request,{onAccept:f=>{this._contacts=f.message.getHeaders("contact"),this.unregistered(),r.requestDelegate&&r.requestDelegate.onAccept&&r.requestDelegate.onAccept(f),this.waitingToggle(!1)},onProgress:f=>{r.requestDelegate&&r.requestDelegate.onProgress&&r.requestDelegate.onProgress(f)},onRedirect:f=>{this.logger.error("Unregister redirected. Not currently supported."),this.unregistered(),r.requestDelegate&&r.requestDelegate.onRedirect&&r.requestDelegate.onRedirect(f),this.waitingToggle(!1)},onReject:f=>{this.logger.error(`Unregister rejected with status code ${f.message.statusCode}`),this.unregistered(),r.requestDelegate&&r.requestDelegate.onReject&&r.requestDelegate.onReject(f),this.waitingToggle(!1)},onTrying:f=>{r.requestDelegate&&r.requestDelegate.onTrying&&r.requestDelegate.onTrying(f)}});return Promise.resolve(l)}clearTimers(){this.registrationTimer!==void 0&&(clearTimeout(this.registrationTimer),this.registrationTimer=void 0),this.registrationExpiredTimer!==void 0&&(clearTimeout(this.registrationExpiredTimer),this.registrationExpiredTimer=void 0)}generateContactHeader(r){let i=this.userAgent.contact.toString({register:!0});return this.options.regId&&this.options.instanceId&&(i+=";reg-id="+this.options.regId,i+=';+sip.instance="<urn:uuid:'+this.options.instanceId+'>"'),this.options.extraContactHeaderParams&&this.options.extraContactHeaderParams.forEach(l=>{i+=";"+l}),i+=";expires="+r,i}registered(r){this.clearTimers(),this.registrationTimer=setTimeout(()=>{this.registrationTimer=void 0,this.register()},this.refreshFrequency/100*r*1e3),this.registrationExpiredTimer=setTimeout(()=>{this.logger.warn("Registration expired"),this.unregistered()},r*1e3),this._state!==Er.Registered&&this.stateTransition(Er.Registered)}unregistered(){this.clearTimers(),this._state!==Er.Unregistered&&this.stateTransition(Er.Unregistered)}terminated(){this.clearTimers(),this._state!==Er.Terminated&&this.stateTransition(Er.Terminated)}stateTransition(r){const i=()=>{throw new Error(`Invalid state transition from ${this._state} to ${r}`)};switch(this._state){case Er.Initial:r!==Er.Registered&&r!==Er.Unregistered&&r!==Er.Terminated&&i();break;case Er.Registered:r!==Er.Unregistered&&r!==Er.Terminated&&i();break;case Er.Unregistered:r!==Er.Registered&&r!==Er.Terminated&&i();break;case Er.Terminated:i();break;default:throw new Error("Unrecognized state.")}this._state=r,this.logger.log(`Registration transitioned to state ${this._state}`),this._stateEventEmitter.emit(this._state),r===Er.Terminated&&this.dispose()}get waiting(){return this._waiting}get waitingChange(){return this._waitingEventEmitter}waitingToggle(r){if(this._waiting===r)throw new Error(`Invalid waiting transition from ${this._waiting} to ${r}`);this._waiting=r,this.logger.log(`Waiting toggled to ${this._waiting}`),this._waitingEventEmitter.emit(this._waiting)}waitingWarning(){let r="An attempt was made to send a REGISTER request while a prior one was still in progress.";r+=" RFC 3261 requires UAs MUST NOT send a new registration until they have received a final response",r+=" from the registrar for the previous one or the previous REGISTER request has timed out.",r+=" Note that if the transport disconnects, you still must wait for the prior request to time out before",r+=" sending a new REGISTER request or alternatively dispose of the current Registerer and create a new Registerer.",this.logger.warn(r)}stateError(){let i=`An attempt was made to send a REGISTER request when the Registerer ${this.state===Er.Terminated?"is in 'Terminated' state":"has been disposed"}.`;i+=" The Registerer transitions to 'Terminated' when Registerer.dispose() is called.",i+=" Perhaps you called UserAgent.stop() which dipsoses of all Registerers?",this.logger.error(i)}}So.defaultExpires=600,So.defaultRefreshFrequency=99;var pr;(function(o){o.Initial="Initial",o.NotifyWait="NotifyWait",o.Pending="Pending",o.Active="Active",o.Terminated="Terminated"})(pr=pr||(pr={}));var At;(function(o){o.Connecting="Connecting",o.Connected="Connected",o.Disconnecting="Disconnecting",o.Disconnected="Disconnected"})(At=At||(At={}));var vi;(function(o){o.Started="Started",o.Stopped="Stopped"})(vi=vi||(vi={}));class In{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(r,i=!1){return this.onePassHasher.start().appendStr(r).end(i)}static hashAsciiStr(r,i=!1){return this.onePassHasher.start().appendAsciiStr(r).end(i)}static _hex(r){const i=In.hexChars,l=In.hexOut;let f,p,v,C;for(C=0;C<4;C+=1)for(p=C*8,f=r[C],v=0;v<8;v+=2)l[p+1+v]=i.charAt(f&15),f>>>=4,l[p+0+v]=i.charAt(f&15),f>>>=4;return l.join("")}static _md5cycle(r,i){let l=r[0],f=r[1],p=r[2],v=r[3];l+=(f&p|~f&v)+i[0]-680876936|0,l=(l<<7|l>>>25)+f|0,v+=(l&f|~l&p)+i[1]-389564586|0,v=(v<<12|v>>>20)+l|0,p+=(v&l|~v&f)+i[2]+606105819|0,p=(p<<17|p>>>15)+v|0,f+=(p&v|~p&l)+i[3]-1044525330|0,f=(f<<22|f>>>10)+p|0,l+=(f&p|~f&v)+i[4]-176418897|0,l=(l<<7|l>>>25)+f|0,v+=(l&f|~l&p)+i[5]+1200080426|0,v=(v<<12|v>>>20)+l|0,p+=(v&l|~v&f)+i[6]-1473231341|0,p=(p<<17|p>>>15)+v|0,f+=(p&v|~p&l)+i[7]-45705983|0,f=(f<<22|f>>>10)+p|0,l+=(f&p|~f&v)+i[8]+1770035416|0,l=(l<<7|l>>>25)+f|0,v+=(l&f|~l&p)+i[9]-1958414417|0,v=(v<<12|v>>>20)+l|0,p+=(v&l|~v&f)+i[10]-42063|0,p=(p<<17|p>>>15)+v|0,f+=(p&v|~p&l)+i[11]-1990404162|0,f=(f<<22|f>>>10)+p|0,l+=(f&p|~f&v)+i[12]+1804603682|0,l=(l<<7|l>>>25)+f|0,v+=(l&f|~l&p)+i[13]-40341101|0,v=(v<<12|v>>>20)+l|0,p+=(v&l|~v&f)+i[14]-1502002290|0,p=(p<<17|p>>>15)+v|0,f+=(p&v|~p&l)+i[15]+1236535329|0,f=(f<<22|f>>>10)+p|0,l+=(f&v|p&~v)+i[1]-165796510|0,l=(l<<5|l>>>27)+f|0,v+=(l&p|f&~p)+i[6]-1069501632|0,v=(v<<9|v>>>23)+l|0,p+=(v&f|l&~f)+i[11]+643717713|0,p=(p<<14|p>>>18)+v|0,f+=(p&l|v&~l)+i[0]-373897302|0,f=(f<<20|f>>>12)+p|0,l+=(f&v|p&~v)+i[5]-701558691|0,l=(l<<5|l>>>27)+f|0,v+=(l&p|f&~p)+i[10]+38016083|0,v=(v<<9|v>>>23)+l|0,p+=(v&f|l&~f)+i[15]-660478335|0,p=(p<<14|p>>>18)+v|0,f+=(p&l|v&~l)+i[4]-405537848|0,f=(f<<20|f>>>12)+p|0,l+=(f&v|p&~v)+i[9]+568446438|0,l=(l<<5|l>>>27)+f|0,v+=(l&p|f&~p)+i[14]-1019803690|0,v=(v<<9|v>>>23)+l|0,p+=(v&f|l&~f)+i[3]-187363961|0,p=(p<<14|p>>>18)+v|0,f+=(p&l|v&~l)+i[8]+1163531501|0,f=(f<<20|f>>>12)+p|0,l+=(f&v|p&~v)+i[13]-1444681467|0,l=(l<<5|l>>>27)+f|0,v+=(l&p|f&~p)+i[2]-51403784|0,v=(v<<9|v>>>23)+l|0,p+=(v&f|l&~f)+i[7]+1735328473|0,p=(p<<14|p>>>18)+v|0,f+=(p&l|v&~l)+i[12]-1926607734|0,f=(f<<20|f>>>12)+p|0,l+=(f^p^v)+i[5]-378558|0,l=(l<<4|l>>>28)+f|0,v+=(l^f^p)+i[8]-2022574463|0,v=(v<<11|v>>>21)+l|0,p+=(v^l^f)+i[11]+1839030562|0,p=(p<<16|p>>>16)+v|0,f+=(p^v^l)+i[14]-35309556|0,f=(f<<23|f>>>9)+p|0,l+=(f^p^v)+i[1]-1530992060|0,l=(l<<4|l>>>28)+f|0,v+=(l^f^p)+i[4]+1272893353|0,v=(v<<11|v>>>21)+l|0,p+=(v^l^f)+i[7]-155497632|0,p=(p<<16|p>>>16)+v|0,f+=(p^v^l)+i[10]-1094730640|0,f=(f<<23|f>>>9)+p|0,l+=(f^p^v)+i[13]+681279174|0,l=(l<<4|l>>>28)+f|0,v+=(l^f^p)+i[0]-358537222|0,v=(v<<11|v>>>21)+l|0,p+=(v^l^f)+i[3]-722521979|0,p=(p<<16|p>>>16)+v|0,f+=(p^v^l)+i[6]+76029189|0,f=(f<<23|f>>>9)+p|0,l+=(f^p^v)+i[9]-640364487|0,l=(l<<4|l>>>28)+f|0,v+=(l^f^p)+i[12]-421815835|0,v=(v<<11|v>>>21)+l|0,p+=(v^l^f)+i[15]+530742520|0,p=(p<<16|p>>>16)+v|0,f+=(p^v^l)+i[2]-995338651|0,f=(f<<23|f>>>9)+p|0,l+=(p^(f|~v))+i[0]-198630844|0,l=(l<<6|l>>>26)+f|0,v+=(f^(l|~p))+i[7]+1126891415|0,v=(v<<10|v>>>22)+l|0,p+=(l^(v|~f))+i[14]-1416354905|0,p=(p<<15|p>>>17)+v|0,f+=(v^(p|~l))+i[5]-57434055|0,f=(f<<21|f>>>11)+p|0,l+=(p^(f|~v))+i[12]+1700485571|0,l=(l<<6|l>>>26)+f|0,v+=(f^(l|~p))+i[3]-1894986606|0,v=(v<<10|v>>>22)+l|0,p+=(l^(v|~f))+i[10]-1051523|0,p=(p<<15|p>>>17)+v|0,f+=(v^(p|~l))+i[1]-2054922799|0,f=(f<<21|f>>>11)+p|0,l+=(p^(f|~v))+i[8]+1873313359|0,l=(l<<6|l>>>26)+f|0,v+=(f^(l|~p))+i[15]-30611744|0,v=(v<<10|v>>>22)+l|0,p+=(l^(v|~f))+i[6]-1560198380|0,p=(p<<15|p>>>17)+v|0,f+=(v^(p|~l))+i[13]+1309151649|0,f=(f<<21|f>>>11)+p|0,l+=(p^(f|~v))+i[4]-145523070|0,l=(l<<6|l>>>26)+f|0,v+=(f^(l|~p))+i[11]-1120210379|0,v=(v<<10|v>>>22)+l|0,p+=(l^(v|~f))+i[2]+718787259|0,p=(p<<15|p>>>17)+v|0,f+=(v^(p|~l))+i[9]-343485551|0,f=(f<<21|f>>>11)+p|0,r[0]=l+r[0]|0,r[1]=f+r[1]|0,r[2]=p+r[2]|0,r[3]=v+r[3]|0}start(){return this._dataLength=0,this._bufferLength=0,this._state.set(In.stateIdentity),this}appendStr(r){const i=this._buffer8,l=this._buffer32;let f=this._bufferLength,p,v;for(v=0;v<r.length;v+=1){if(p=r.charCodeAt(v),p<128)i[f++]=p;else if(p<2048)i[f++]=(p>>>6)+192,i[f++]=p&63|128;else if(p<55296||p>56319)i[f++]=(p>>>12)+224,i[f++]=p>>>6&63|128,i[f++]=p&63|128;else{if(p=(p-55296)*1024+(r.charCodeAt(++v)-56320)+65536,p>1114111)throw new Error("Unicode standard supports code points up to U+10FFFF");i[f++]=(p>>>18)+240,i[f++]=p>>>12&63|128,i[f++]=p>>>6&63|128,i[f++]=p&63|128}f>=64&&(this._dataLength+=64,In._md5cycle(this._state,l),f-=64,l[0]=l[16])}return this._bufferLength=f,this}appendAsciiStr(r){const i=this._buffer8,l=this._buffer32;let f=this._bufferLength,p,v=0;for(;;){for(p=Math.min(r.length-v,64-f);p--;)i[f++]=r.charCodeAt(v++);if(f<64)break;this._dataLength+=64,In._md5cycle(this._state,l),f=0}return this._bufferLength=f,this}appendByteArray(r){const i=this._buffer8,l=this._buffer32;let f=this._bufferLength,p,v=0;for(;;){for(p=Math.min(r.length-v,64-f);p--;)i[f++]=r[v++];if(f<64)break;this._dataLength+=64,In._md5cycle(this._state,l),f=0}return this._bufferLength=f,this}getState(){const r=this,i=r._state;return{buffer:String.fromCharCode.apply(null,r._buffer8),buflen:r._bufferLength,length:r._dataLength,state:[i[0],i[1],i[2],i[3]]}}setState(r){const i=r.buffer,l=r.state,f=this._state;let p;for(this._dataLength=r.length,this._bufferLength=r.buflen,f[0]=l[0],f[1]=l[1],f[2]=l[2],f[3]=l[3],p=0;p<i.length;p+=1)this._buffer8[p]=i.charCodeAt(p)}end(r=!1){const i=this._bufferLength,l=this._buffer8,f=this._buffer32,p=(i>>2)+1;let v;if(this._dataLength+=i,l[i]=128,l[i+1]=l[i+2]=l[i+3]=0,f.set(In.buffer32Identity.subarray(p),p),i>55&&(In._md5cycle(this._state,f),f.set(In.buffer32Identity)),v=this._dataLength*8,v<=4294967295)f[14]=v;else{const C=v.toString(16).match(/(.*?)(.{0,8})$/);if(C===null)return;const w=parseInt(C[2],16),S=parseInt(C[1],16)||0;f[14]=w,f[15]=S}return In._md5cycle(this._state,f),r?this._state:In._hex(this._state)}}In.stateIdentity=new Int32Array([1732584193,-271733879,-1732584194,271733878]),In.buffer32Identity=new Int32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),In.hexChars="0123456789abcdef",In.hexOut=[],In.onePassHasher=new In,In.hashStr("hello")!=="5d41402abc4b2a76b9719d911017c592"&&console.error("Md5 self test failed.");function yu(o){return In.hashStr(o)}class ZR{constructor(r,i,l,f){this.logger=r.getLogger("sipjs.digestauthentication"),this.username=l,this.password=f,this.ha1=i,this.nc=0,this.ncHex="00000000"}authenticate(r,i,l){if(this.algorithm=i.algorithm,this.realm=i.realm,this.nonce=i.nonce,this.opaque=i.opaque,this.stale=i.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(i.qop)if(i.qop.indexOf("auth")>-1)this.qop="auth";else if(i.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=r.method,this.uri=r.ruri,this.cnonce=_c(12),this.nc+=1,this.updateNcHex(),this.nc===4294967296&&(this.nc=1,this.ncHex="00000001"),this.calculateResponse(l),!0}toString(){const r=[];if(!this.response)throw new Error("response field does not exist, cannot generate Authorization header");return r.push("algorithm="+this.algorithm),r.push('username="'+this.username+'"'),r.push('realm="'+this.realm+'"'),r.push('nonce="'+this.nonce+'"'),r.push('uri="'+this.uri+'"'),r.push('response="'+this.response+'"'),this.opaque&&r.push('opaque="'+this.opaque+'"'),this.qop&&(r.push("qop="+this.qop),r.push('cnonce="'+this.cnonce+'"'),r.push("nc="+this.ncHex)),"Digest "+r.join(", ")}updateNcHex(){const r=Number(this.nc).toString(16);this.ncHex="00000000".substr(0,8-r.length)+r}calculateResponse(r){let i,l;i=this.ha1,(i===""||i===void 0)&&(i=yu(this.username+":"+this.realm+":"+this.password)),this.qop==="auth"?(l=yu(this.method+":"+this.uri),this.response=yu(i+":"+this.nonce+":"+this.ncHex+":"+this.cnonce+":auth:"+l)):this.qop==="auth-int"?(l=yu(this.method+":"+this.uri+":"+yu(r||"")),this.response=yu(i+":"+this.nonce+":"+this.ncHex+":"+this.cnonce+":auth-int:"+l)):this.qop===void 0&&(l=yu(this.method+":"+this.uri),this.response=yu(i+":"+this.nonce+":"+l))}}var ui;(function(o){o[o.error=0]="error",o[o.warn=1]="warn",o[o.log=2]="log",o[o.debug=3]="debug"})(ui=ui||(ui={}));class W2{constructor(r,i,l){this.logger=r,this.category=i,this.label=l}error(r){this.genericLog(ui.error,r)}warn(r){this.genericLog(ui.warn,r)}log(r){this.genericLog(ui.log,r)}debug(r){this.genericLog(ui.debug,r)}genericLog(r,i){this.logger.genericLog(r,this.category,this.label,i)}get level(){return this.logger.level}set level(r){this.logger.level=r}}class JR{constructor(){this.builtinEnabled=!0,this._level=ui.log,this.loggers={},this.logger=this.getLogger("sip:loggerfactory")}get level(){return this._level}set level(r){r>=0&&r<=3?this._level=r:r>3?this._level=3:ui.hasOwnProperty(r)?this._level=r:this.logger.error("invalid 'level' parameter value: "+JSON.stringify(r))}get connector(){return this._connector}set connector(r){r?typeof r=="function"?this._connector=r:this.logger.error("invalid 'connector' parameter value: "+JSON.stringify(r)):this._connector=void 0}getLogger(r,i){if(i&&this.level===3)return new W2(this,r,i);if(this.loggers[r])return this.loggers[r];{const l=new W2(this,r);return this.loggers[r]=l,l}}genericLog(r,i,l,f){this.level>=r&&this.builtinEnabled&&this.print(r,i,l,f),this.connector&&this.connector(ui[r],i,l,f)}print(r,i,l,f){if(typeof f=="string"){const p=[new Date,i];l&&p.push(l),f=p.concat(f).join(" | ")}switch(r){case ui.error:console.error(f);break;case ui.warn:console.warn(f);break;case ui.log:console.log(f);break;case ui.debug:console.debug(f);break}}}var _v;(function(o){function r(f,p){let v=p,C=0,w=0;if(f.substring(v,v+2).match(/(^\r\n)/))return-2;for(;C===0;){if(w=f.indexOf(`\r
376
- `,v),w===-1)return w;!f.substring(w+2,w+4).match(/(^\r\n)/)&&f.charAt(w+2).match(/(^\s+)/)?v=w+2:C=w}return C}o.getHeader=r;function i(f,p,v,C){const w=p.indexOf(":",v),S=p.substring(v,w).trim(),b=p.substring(w+1,C).trim();let T;switch(S.toLowerCase()){case"via":case"v":f.addHeader("via",b),f.getHeaders("via").length===1?(T=f.parseHeader("Via"),T&&(f.via=T,f.viaBranch=T.branch)):T=0;break;case"from":case"f":f.setHeader("from",b),T=f.parseHeader("from"),T&&(f.from=T,f.fromTag=T.getParam("tag"));break;case"to":case"t":f.setHeader("to",b),T=f.parseHeader("to"),T&&(f.to=T,f.toTag=T.getParam("tag"));break;case"record-route":if(T=qn.parse(b,"Record_Route"),T===-1){T=void 0;break}if(!(T instanceof Array)){T=void 0;break}T.forEach(A=>{f.addHeader("record-route",b.substring(A.position,A.offset)),f.headers["Record-Route"][f.getHeaders("record-route").length-1].parsed=A.parsed});break;case"call-id":case"i":f.setHeader("call-id",b),T=f.parseHeader("call-id"),T&&(f.callId=b);break;case"contact":case"m":if(T=qn.parse(b,"Contact"),T===-1){T=void 0;break}if(!(T instanceof Array)){T=void 0;break}T.forEach(A=>{f.addHeader("contact",b.substring(A.position,A.offset)),f.headers.Contact[f.getHeaders("contact").length-1].parsed=A.parsed});break;case"content-length":case"l":f.setHeader("content-length",b),T=f.parseHeader("content-length");break;case"content-type":case"c":f.setHeader("content-type",b),T=f.parseHeader("content-type");break;case"cseq":f.setHeader("cseq",b),T=f.parseHeader("cseq"),T&&(f.cseq=T.value),f instanceof vu&&(f.method=T.method);break;case"max-forwards":f.setHeader("max-forwards",b),T=f.parseHeader("max-forwards");break;case"www-authenticate":f.setHeader("www-authenticate",b),T=f.parseHeader("www-authenticate");break;case"proxy-authenticate":f.setHeader("proxy-authenticate",b),T=f.parseHeader("proxy-authenticate");break;case"refer-to":case"r":f.setHeader("refer-to",b),T=f.parseHeader("refer-to"),T&&(f.referTo=T);break;default:f.addHeader(S.toLowerCase(),b),T=0}return T===void 0?{error:"error parsing header '"+S+"'"}:!0}o.parseHeader=i;function l(f,p){let v=0,C=f.indexOf(`\r
377
- `);if(C===-1){p.warn("no CRLF found, not a SIP message, discarded");return}const w=f.substring(0,C),S=qn.parse(w,"Request_Response");let b;if(S===-1){p.warn('error parsing first line of SIP message: "'+w+'"');return}else S.status_code?(b=new vu,b.statusCode=S.status_code,b.reasonPhrase=S.reason_phrase):(b=new Qf,b.method=S.method,b.ruri=S.uri);b.data=f,v=C+2;let T;for(;;){if(C=r(f,v),C===-2){T=v+2;break}else if(C===-1){p.error("malformed message");return}const A=i(b,f,v,C);if(A&&A!==!0){p.error(A.error);return}v=C+2}return b.hasHeader("content-length")?b.body=f.substr(T,Number(b.getHeader("content-length"))):b.body=f.substring(T),b}o.parseMessage=l})(_v=_v||(_v={}));function G2(o,r){const i=`\r
378
- `;if(r.statusCode<100||r.statusCode>699)throw new TypeError("Invalid statusCode: "+r.statusCode);const l=r.reasonPhrase?r.reasonPhrase:Cv(r.statusCode);let f="SIP/2.0 "+r.statusCode+" "+l+i;r.statusCode>=100&&r.statusCode<200,r.statusCode;const p="From: "+o.getHeader("From")+i,v="Call-ID: "+o.callId+i,C="CSeq: "+o.cseq+" "+o.method+i,w=o.getHeaders("via").reduce((H,P)=>H+"Via: "+P+i,"");let S="To: "+o.getHeader("to");if(r.statusCode>100&&!o.parseHeader("to").hasParam("tag")){let H=r.toTag;H||(H=wv()),S+=";tag="+H}S+=i;let b="";r.supported&&(b="Supported: "+r.supported.join(", ")+i);let T="";r.userAgent&&(T="User-Agent: "+r.userAgent+i);let A="";return r.extraHeaders&&(A=r.extraHeaders.reduce((H,P)=>H+P.trim()+i,"")),f+=w,f+=p,f+=S,f+=C,f+=v,f+=b,f+=T,f+=A,r.body?(f+="Content-Type: "+r.body.contentType+i,f+="Content-Length: "+e0(r.body.content)+i+i,f+=r.body.content):f+="Content-Length: 0"+i+i,{message:f}}class Ix extends bc{constructor(r){super(r||"Unspecified transport error.")}}class K2{constructor(r,i,l,f,p){this._transport=r,this._user=i,this._id=l,this._state=f,this.listeners=new Array,this.logger=i.loggerFactory.getLogger(p,l),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(r,i){const l=()=>{this.removeStateChangeListener(l),r()};(i==null?void 0:i.once)===!0?this.listeners.push(l):this.listeners.push(r)}notifyStateChangeListeners(){this.listeners.slice().forEach(r=>r())}removeStateChangeListener(r){this.listeners=this.listeners.filter(i=>i!==r)}logTransportError(r,i){this.logger.error(r.message),this.logger.error(`Transport error occurred in ${this.typeToString()} with id ${this.id}.`),this.logger.error(i)}send(r){return this.transport.send(r).catch(i=>{if(i instanceof Ix)throw this.onTransportError(i),i;let l;throw i&&typeof i.message=="string"?l=new Ix(i.message):l=new Ix,this.onTransportError(l),l})}setState(r){this.logger.debug(`State change to "${r}" on ${this.typeToString()} with id ${this.id}.`),this._state=r,this._user.onStateChange&&this._user.onStateChange(r),this.notifyStateChangeListeners()}typeToString(){return"UnknownType"}}class Q2 extends K2{constructor(r,i,l,f,p){super(i,l,r.viaBranch,f,p),this._request=r,this.user=l}get request(){return this._request}}var pe;(function(o){o.Accepted="Accepted",o.Calling="Calling",o.Completed="Completed",o.Confirmed="Confirmed",o.Proceeding="Proceeding",o.Terminated="Terminated",o.Trying="Trying"})(pe=pe||(pe={}));class ya extends Q2{constructor(r,i,l){super(r,i,l,pe.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(r){switch(this.state){case pe.Proceeding:if(r.method===nt.INVITE){this.lastProvisionalResponse&&this.send(this.lastProvisionalResponse).catch(l=>{this.logTransportError(l,"Failed to send retransmission of provisional response.")});return}break;case pe.Accepted:if(r.method===nt.INVITE)return;break;case pe.Completed:if(r.method===nt.INVITE){if(!this.lastFinalResponse)throw new Error("Last final response undefined.");this.send(this.lastFinalResponse).catch(l=>{this.logTransportError(l,"Failed to send retransmission of final response.")});return}if(r.method===nt.ACK){this.stateTransition(pe.Confirmed);return}break;case pe.Confirmed:if(r.method===nt.INVITE||r.method===nt.ACK)return;break;case pe.Terminated:if(r.method===nt.INVITE||r.method===nt.ACK)return;break;default:throw new Error(`Invalid state ${this.state}`)}const i=`INVITE server transaction received unexpected ${r.method} request while in state ${this.state}.`;this.logger.warn(i)}receiveResponse(r,i){if(r<100||r>699)throw new Error(`Invalid status code ${r}`);switch(this.state){case pe.Proceeding:if(r>=100&&r<=199){this.lastProvisionalResponse=i,r>100&&this.startProgressExtensionTimer(),this.send(i).catch(f=>{this.logTransportError(f,"Failed to send 1xx response.")});return}if(r>=200&&r<=299){this.lastFinalResponse=i,this.stateTransition(pe.Accepted),this.send(i).catch(f=>{this.logTransportError(f,"Failed to send 2xx response.")});return}if(r>=300&&r<=699){this.lastFinalResponse=i,this.stateTransition(pe.Completed),this.send(i).catch(f=>{this.logTransportError(f,"Failed to send non-2xx final response.")});return}break;case pe.Accepted:if(r>=200&&r<=299){this.send(i).catch(f=>{this.logTransportError(f,"Failed to send 2xx response.")});return}break;case pe.Completed:break;case pe.Confirmed:break;case pe.Terminated:break;default:throw new Error(`Invalid state ${this.state}`)}const l=`INVITE server transaction received unexpected ${r} response from TU while in state ${this.state}.`;throw this.logger.error(l),new Error(l)}retransmitAcceptedResponse(){this.state===pe.Accepted&&this.lastFinalResponse&&this.send(this.lastFinalResponse).catch(r=>{this.logTransportError(r,"Failed to send 2xx response.")})}onTransportError(r){this.user.onTransportError&&this.user.onTransportError(r)}typeToString(){return"INVITE server transaction"}stateTransition(r){const i=()=>{throw new Error(`Invalid state transition from ${this.state} to ${r}`)};switch(r){case pe.Proceeding:i();break;case pe.Accepted:case pe.Completed:this.state!==pe.Proceeding&&i();break;case pe.Confirmed:this.state!==pe.Completed&&i();break;case pe.Terminated:this.state!==pe.Accepted&&this.state!==pe.Completed&&this.state!==pe.Confirmed&&i();break;default:i()}this.stopProgressExtensionTimer(),r===pe.Accepted&&(this.L=setTimeout(()=>this.timerL(),li.TIMER_L)),r===pe.Completed&&(this.H=setTimeout(()=>this.timerH(),li.TIMER_H)),r===pe.Confirmed&&(this.I=setTimeout(()=>this.timerI(),li.TIMER_I)),r===pe.Terminated&&this.dispose(),this.setState(r)}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(r=>{this.logTransportError(r,"Failed to send retransmission of provisional response.")})},li.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===pe.Completed&&(this.logger.warn("ACK to negative final response was never received, terminating transaction."),this.stateTransition(pe.Terminated))}timerI(){this.logger.debug(`Timer I expired for INVITE server transaction ${this.id}.`),this.stateTransition(pe.Terminated)}timerL(){this.logger.debug(`Timer L expired for INVITE server transaction ${this.id}.`),this.state===pe.Accepted&&this.stateTransition(pe.Terminated)}}class Dv extends K2{constructor(r,i,l,f,p){super(i,l,Dv.makeId(r),f,p),this._request=r,this.user=l,r.setViaHeader(this.id,i.protocol)}static makeId(r){if(r.method==="CANCEL"){if(!r.branch)throw new Error("Outgoing CANCEL request without a branch.");return r.branch}else return"z9hG4bK"+Math.floor(Math.random()*1e7)}get request(){return this._request}onRequestTimeout(){this.user.onRequestTimeout&&this.user.onRequestTimeout()}}class Pa extends Dv{constructor(r,i,l){super(r,i,l,pe.Trying,"sip.transaction.nict"),this.F=setTimeout(()=>this.timerF(),li.TIMER_F),this.send(r.toString()).catch(f=>{this.logTransportError(f,"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(r){const i=r.statusCode;if(!i||i<100||i>699)throw new Error(`Invalid status code ${i}`);switch(this.state){case pe.Trying:if(i>=100&&i<=199){this.stateTransition(pe.Proceeding),this.user.receiveResponse&&this.user.receiveResponse(r);return}if(i>=200&&i<=699){if(this.stateTransition(pe.Completed),i===408){this.onRequestTimeout();return}this.user.receiveResponse&&this.user.receiveResponse(r);return}break;case pe.Proceeding:if(i>=100&&i<=199&&this.user.receiveResponse)return this.user.receiveResponse(r);if(i>=200&&i<=699){if(this.stateTransition(pe.Completed),i===408){this.onRequestTimeout();return}this.user.receiveResponse&&this.user.receiveResponse(r);return}break;case pe.Completed:return;case pe.Terminated:return;default:throw new Error(`Invalid state ${this.state}`)}const l=`Non-INVITE client transaction received unexpected ${i} response while in state ${this.state}.`;this.logger.warn(l)}onTransportError(r){this.user.onTransportError&&this.user.onTransportError(r),this.stateTransition(pe.Terminated,!0)}typeToString(){return"non-INVITE client transaction"}stateTransition(r,i=!1){const l=()=>{throw new Error(`Invalid state transition from ${this.state} to ${r}`)};switch(r){case pe.Trying:l();break;case pe.Proceeding:this.state!==pe.Trying&&l();break;case pe.Completed:this.state!==pe.Trying&&this.state!==pe.Proceeding&&l();break;case pe.Terminated:this.state!==pe.Trying&&this.state!==pe.Proceeding&&this.state!==pe.Completed&&(i||l());break;default:l()}r===pe.Completed&&(this.F&&(clearTimeout(this.F),this.F=void 0),this.K=setTimeout(()=>this.timerK(),li.TIMER_K)),r===pe.Terminated&&this.dispose(),this.setState(r)}timerF(){this.logger.debug(`Timer F expired for non-INVITE client transaction ${this.id}.`),(this.state===pe.Trying||this.state===pe.Proceeding)&&(this.onRequestTimeout(),this.stateTransition(pe.Terminated))}timerK(){this.state===pe.Completed&&this.stateTransition(pe.Terminated)}}class Xf{constructor(r,i){this.core=r,this.dialogState=i,this.core.dialogs.set(this.id,this)}static initialDialogStateForUserAgentClient(r,i){const f=i.getHeaders("record-route").reverse(),p=i.parseHeader("contact");if(!p)throw new Error("Contact undefined.");if(!(p instanceof ma))throw new Error("Contact not instance of NameAddrHeader.");const v=p.uri,C=r.cseq,w=void 0,S=r.callId,b=r.fromTag,T=i.toTag;if(!S)throw new Error("Call id undefined.");if(!b)throw new Error("From tag undefined.");if(!T)throw new Error("To tag undefined.");if(!r.from)throw new Error("From undefined.");if(!r.to)throw new Error("To undefined.");const A=r.from.uri,H=r.to.uri;if(!i.statusCode)throw new Error("Incoming response status code undefined.");const P=i.statusCode<200;return{id:S+b+T,early:P,callId:S,localTag:b,remoteTag:T,localSequenceNumber:C,remoteSequenceNumber:w,localURI:A,remoteURI:H,remoteTarget:v,routeSet:f,secure:!1}}static initialDialogStateForUserAgentServer(r,i,l=!1){const p=r.getHeaders("record-route"),v=r.parseHeader("contact");if(!v)throw new Error("Contact undefined.");if(!(v instanceof ma))throw new Error("Contact not instance of NameAddrHeader.");const C=v.uri,w=r.cseq,S=void 0,b=r.callId,T=i,A=r.fromTag,H=r.from.uri,P=r.to.uri;return{id:b+T+A,early:l,callId:b,localTag:T,remoteTag:A,localSequenceNumber:S,remoteSequenceNumber:w,localURI:P,remoteURI:H,remoteTarget:C,routeSet:p,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(r){if(r.method!==nt.ACK){if(this.remoteSequenceNumber){if(r.cseq<=this.remoteSequenceNumber)throw new Error("Out of sequence in dialog request. Did you forget to call sequenceGuard()?");this.dialogState.remoteSequenceNumber=r.cseq}this.remoteSequenceNumber||(this.dialogState.remoteSequenceNumber=r.cseq)}}recomputeRouteSet(r){this.dialogState.routeSet=r.getHeaders("record-route").reverse()}createOutgoingRequestMessage(r,i){const l=this.remoteURI,f=this.remoteTag,p=this.localURI,v=this.localTag,C=this.callId;let w;i&&i.cseq?w=i.cseq:this.dialogState.localSequenceNumber?w=this.dialogState.localSequenceNumber+=1:w=this.dialogState.localSequenceNumber=1;const S=this.remoteTarget,b=this.routeSet,T=i&&i.extraHeaders,A=i&&i.body;return this.userAgentCore.makeOutgoingRequestMessage(r,S,p,l,{callId:C,cseq:w,fromTag:v,toTag:f,routeSet:b},T,A)}incrementLocalSequenceNumber(){if(!this.dialogState.localSequenceNumber)throw new Error("Local sequence number undefined.");this.dialogState.localSequenceNumber+=1}sequenceGuard(r){return r.method===nt.ACK?!0:this.remoteSequenceNumber&&r.cseq<=this.remoteSequenceNumber?(this.core.replyStateless(r,{statusCode:500}),!1):!0}}class xu extends Dv{constructor(r,i,l){super(r,i,l,pe.Calling,"sip.transaction.ict"),this.ackRetransmissionCache=new Map,this.B=setTimeout(()=>this.timerB(),li.TIMER_B),this.send(r.toString()).catch(f=>{this.logTransportError(f,"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(r){const i=r.toTag;if(!i)throw new Error("To tag undefined.");const l="z9hG4bK"+Math.floor(Math.random()*1e7);r.setViaHeader(l,this.transport.protocol),this.ackRetransmissionCache.set(i,r),this.send(r.toString()).catch(f=>{this.logTransportError(f,"Failed to send ACK to 2xx response.")})}receiveResponse(r){const i=r.statusCode;if(!i||i<100||i>699)throw new Error(`Invalid status code ${i}`);switch(this.state){case pe.Calling:if(i>=100&&i<=199){this.stateTransition(pe.Proceeding),this.user.receiveResponse&&this.user.receiveResponse(r);return}if(i>=200&&i<=299){this.ackRetransmissionCache.set(r.toTag,void 0),this.stateTransition(pe.Accepted),this.user.receiveResponse&&this.user.receiveResponse(r);return}if(i>=300&&i<=699){this.stateTransition(pe.Completed),this.ack(r),this.user.receiveResponse&&this.user.receiveResponse(r);return}break;case pe.Proceeding:if(i>=100&&i<=199){this.user.receiveResponse&&this.user.receiveResponse(r);return}if(i>=200&&i<=299){this.ackRetransmissionCache.set(r.toTag,void 0),this.stateTransition(pe.Accepted),this.user.receiveResponse&&this.user.receiveResponse(r);return}if(i>=300&&i<=699){this.stateTransition(pe.Completed),this.ack(r),this.user.receiveResponse&&this.user.receiveResponse(r);return}break;case pe.Accepted:if(i>=200&&i<=299){if(!this.ackRetransmissionCache.has(r.toTag)){this.ackRetransmissionCache.set(r.toTag,void 0),this.user.receiveResponse&&this.user.receiveResponse(r);return}const f=this.ackRetransmissionCache.get(r.toTag);if(f){this.send(f.toString()).catch(p=>{this.logTransportError(p,"Failed to send retransmission of ACK to 2xx response.")});return}return}break;case pe.Completed:if(i>=300&&i<=699){this.ack(r);return}break;case pe.Terminated:break;default:throw new Error(`Invalid state ${this.state}`)}const l=`Received unexpected ${i} response while in state ${this.state}.`;this.logger.warn(l)}onTransportError(r){this.user.onTransportError&&this.user.onTransportError(r),this.stateTransition(pe.Terminated,!0)}typeToString(){return"INVITE client transaction"}ack(r){const i=this.request.ruri,l=this.request.callId,f=this.request.cseq,p=this.request.getHeader("from"),v=r.getHeader("to"),C=this.request.getHeader("via"),w=this.request.getHeader("route");if(!p)throw new Error("From undefined.");if(!v)throw new Error("To undefined.");if(!C)throw new Error("Via undefined.");let S=`ACK ${i} SIP/2.0\r
379
- `;w&&(S+=`Route: ${w}\r
380
- `),S+=`Via: ${C}\r
381
- `,S+=`To: ${v}\r
382
- `,S+=`From: ${p}\r
383
- `,S+=`Call-ID: ${l}\r
384
- `,S+=`CSeq: ${f} ACK\r
385
- `,S+=`Max-Forwards: 70\r
386
- `,S+=`Content-Length: 0\r
34
+ `;this.server_transaction.receiveResponse(n,g,t,d)}reply_sl(n=null,s=null){const o=this.getHeaders("via");if(!n||n<100||n>699)throw new TypeError(`Invalid status_code: ${n}`);if(s&&typeof s!="string"&&!(s instanceof String))throw new TypeError(`Invalid reason_phrase: ${s}`);s=s||Ae.REASON_PHRASE[n]||"";let c=`SIP/2.0 ${n} ${s}\r
35
+ `;for(const d of o)c+=`Via: ${d}\r
36
+ `;let t=this.getHeader("To");if(!this.to_tag&&n>100?t+=`;tag=${me.newTag()}`:this.to_tag&&!this.s("to").hasParam("tag")&&(t+=`;tag=${this.to_tag}`),c+=`To: ${t}\r
37
+ `,c+=`From: ${this.getHeader("From")}\r
38
+ `,c+=`Call-ID: ${this.call_id}\r
39
+ `,c+=`CSeq: ${this.cseq} ${this.method}\r
40
+ `,this.ua.configuration.extra_headers)for(const d of this.ua.configuration.extra_headers)c+=`${d.trim()}\r
41
+ `;c+=`Content-Length: 0\r
387
42
  \r
388
- `,this.send(S).catch(b=>{this.logTransportError(b,"Failed to send ACK to non-2xx response.")})}stateTransition(r,i=!1){const l=()=>{throw new Error(`Invalid state transition from ${this.state} to ${r}`)};switch(r){case pe.Calling:l();break;case pe.Proceeding:this.state!==pe.Calling&&l();break;case pe.Accepted:case pe.Completed:this.state!==pe.Calling&&this.state!==pe.Proceeding&&l();break;case pe.Terminated:this.state!==pe.Calling&&this.state!==pe.Accepted&&this.state!==pe.Completed&&(i||l());break;default:l()}this.B&&(clearTimeout(this.B),this.B=void 0),pe.Proceeding,r===pe.Completed&&(this.D=setTimeout(()=>this.timerD(),li.TIMER_D)),r===pe.Accepted&&(this.M=setTimeout(()=>this.timerM(),li.TIMER_M)),r===pe.Terminated&&this.dispose(),this.setState(r)}timerA(){}timerB(){this.logger.debug(`Timer B expired for INVITE client transaction ${this.id}.`),this.state===pe.Calling&&(this.onRequestTimeout(),this.stateTransition(pe.Terminated))}timerD(){this.logger.debug(`Timer D expired for INVITE client transaction ${this.id}.`),this.state===pe.Completed&&this.stateTransition(pe.Terminated)}timerM(){this.logger.debug(`Timer M expired for INVITE client transaction ${this.id}.`),this.state===pe.Accepted&&this.stateTransition(pe.Terminated)}}class Bi{constructor(r,i,l,f){this.transactionConstructor=r,this.core=i,this.message=l,this.delegate=f,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(r,i={}){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 l=this.core.makeOutgoingRequestMessage(nt.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},i.extraHeaders);return l.branch=this.message.branch,this.message.headers.Route&&(l.headers.Route=this.message.headers.Route),r&&l.setHeader("Reason",r),this.transaction.state===pe.Proceeding?new Bi(Pa,this.core,l):this.transaction.addStateChangeListener(()=>{this.transaction&&this.transaction.state===pe.Proceeding&&new Bi(Pa,this.core,l)},{once:!0}),l}authenticationGuard(r,i){const l=r.statusCode;if(!l)throw new Error("Response status code undefined.");if(l!==401&&l!==407)return!0;let f,p;if(l===401?(f=r.parseHeader("www-authenticate"),p="authorization"):(f=r.parseHeader("proxy-authenticate"),p="proxy-authorization"),!f)return this.logger.warn(l+" with wrong or missing challenge, cannot authenticate"),!0;if(this.challenged&&(this.stale||f.stale!==!0))return this.logger.warn(l+" 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,f))return!0;this.challenged=!0,f.stale&&(this.stale=!0);let v=this.message.cseq+=1;return i&&i.localSequenceNumber&&(i.incrementLocalSequenceNumber(),v=this.message.cseq=i.localSequenceNumber),this.message.setHeader("cseq",v+" "+this.message.method),this.message.setHeader(p,this.credentials.toString()),this.init(),!1}onRequestTimeout(){this.logger.warn("User agent client request timed out. Generating internal 408 Request Timeout.");const r=new vu;r.statusCode=408,r.reasonPhrase="Request Timeout",this.receiveResponse(r)}onTransportError(r){this.logger.error(r.message),this.logger.error("User agent client request transport error. Generating internal 503 Service Unavailable.");const i=new vu;i.statusCode=503,i.reasonPhrase="Service Unavailable",this.receiveResponse(i)}receiveResponse(r){if(!this.authenticationGuard(r))return;const i=r.statusCode?r.statusCode.toString():"";if(!i)throw new Error("Response status code undefined.");switch(!0){case/^100$/.test(i):this.delegate&&this.delegate.onTrying&&this.delegate.onTrying({message:r});break;case/^1[0-9]{2}$/.test(i):this.delegate&&this.delegate.onProgress&&this.delegate.onProgress({message:r});break;case/^2[0-9]{2}$/.test(i):this.delegate&&this.delegate.onAccept&&this.delegate.onAccept({message:r});break;case/^3[0-9]{2}$/.test(i):this.delegate&&this.delegate.onRedirect&&this.delegate.onRedirect({message:r});break;case/^[4-6][0-9]{2}$/.test(i):this.delegate&&this.delegate.onReject&&this.delegate.onReject({message:r});break;default:throw new Error(`Invalid status code ${i}`)}}init(){const r={loggerFactory:this.loggerFactory,onRequestTimeout:()=>this.onRequestTimeout(),onStateChange:f=>{f===pe.Terminated&&(this.core.userAgentClients.delete(l),i===this._transaction&&this.dispose())},onTransportError:f=>this.onTransportError(f),receiveResponse:f=>this.receiveResponse(f)},i=new this.transactionConstructor(this.message,this.core.transport,r);this._transaction=i;const l=i.id+i.request.method;this.core.userAgentClients.set(l,this)}}class e8 extends Bi{constructor(r,i,l){const f=r.createOutgoingRequestMessage(nt.BYE,l);super(Pa,r.userAgentCore,f,i),r.dispose()}}class La extends Q2{constructor(r,i,l){super(r,i,l,pe.Trying,"sip.transaction.nist")}dispose(){this.J&&(clearTimeout(this.J),this.J=void 0),super.dispose()}get kind(){return"nist"}receiveRequest(r){switch(this.state){case pe.Trying:break;case pe.Proceeding:if(!this.lastResponse)throw new Error("Last response undefined.");this.send(this.lastResponse).catch(i=>{this.logTransportError(i,"Failed to send retransmission of provisional response.")});break;case pe.Completed:if(!this.lastResponse)throw new Error("Last response undefined.");this.send(this.lastResponse).catch(i=>{this.logTransportError(i,"Failed to send retransmission of final response.")});break;case pe.Terminated:break;default:throw new Error(`Invalid state ${this.state}`)}}receiveResponse(r,i){if(r<100||r>699)throw new Error(`Invalid status code ${r}`);if(r>100&&r<=199)throw new Error("Provisional response other than 100 not allowed.");switch(this.state){case pe.Trying:if(this.lastResponse=i,r>=100&&r<200){this.stateTransition(pe.Proceeding),this.send(i).catch(f=>{this.logTransportError(f,"Failed to send provisional response.")});return}if(r>=200&&r<=699){this.stateTransition(pe.Completed),this.send(i).catch(f=>{this.logTransportError(f,"Failed to send final response.")});return}break;case pe.Proceeding:if(this.lastResponse=i,r>=200&&r<=699){this.stateTransition(pe.Completed),this.send(i).catch(f=>{this.logTransportError(f,"Failed to send final response.")});return}break;case pe.Completed:return;case pe.Terminated:break;default:throw new Error(`Invalid state ${this.state}`)}const l=`Non-INVITE server transaction received unexpected ${r} response from TU while in state ${this.state}.`;throw this.logger.error(l),new Error(l)}onTransportError(r){this.user.onTransportError&&this.user.onTransportError(r),this.stateTransition(pe.Terminated,!0)}typeToString(){return"non-INVITE server transaction"}stateTransition(r,i=!1){const l=()=>{throw new Error(`Invalid state transition from ${this.state} to ${r}`)};switch(r){case pe.Trying:l();break;case pe.Proceeding:this.state!==pe.Trying&&l();break;case pe.Completed:this.state!==pe.Trying&&this.state!==pe.Proceeding&&l();break;case pe.Terminated:this.state!==pe.Proceeding&&this.state!==pe.Completed&&(i||l());break;default:l()}r===pe.Completed&&(this.J=setTimeout(()=>this.timerJ(),li.TIMER_J)),r===pe.Terminated&&this.dispose(),this.setState(r)}timerJ(){this.logger.debug(`Timer J expired for NON-INVITE server transaction ${this.id}.`),this.state===pe.Completed&&this.stateTransition(pe.Terminated)}}class Co{constructor(r,i,l,f){this.transactionConstructor=r,this.core=i,this.message=l,this.delegate=f,this.logger=this.loggerFactory.getLogger("sip.user-agent-server"),this.toTag=l.toTag?l.toTag:wv(),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(r={statusCode:200}){if(!this.acceptable)throw new gu(`${this.message.method} not acceptable in state ${this.transaction.state}.`);const i=r.statusCode;if(i<200||i>299)throw new TypeError(`Invalid statusCode: ${i}`);return this.reply(r)}progress(r={statusCode:180}){if(!this.progressable)throw new gu(`${this.message.method} not progressable in state ${this.transaction.state}.`);const i=r.statusCode;if(i<101||i>199)throw new TypeError(`Invalid statusCode: ${i}`);return this.reply(r)}redirect(r,i={statusCode:302}){if(!this.redirectable)throw new gu(`${this.message.method} not redirectable in state ${this.transaction.state}.`);const l=i.statusCode;if(l<300||l>399)throw new TypeError(`Invalid statusCode: ${l}`);const f=new Array;return r.forEach(v=>f.push(`Contact: ${v.toString()}`)),i.extraHeaders=(i.extraHeaders||[]).concat(f),this.reply(i)}reject(r={statusCode:480}){if(!this.rejectable)throw new gu(`${this.message.method} not rejectable in state ${this.transaction.state}.`);const i=r.statusCode;if(i<400||i>699)throw new TypeError(`Invalid statusCode: ${i}`);return this.reply(r)}trying(r){if(!this.tryingable)throw new gu(`${this.message.method} not tryingable in state ${this.transaction.state}.`);return this.reply({statusCode:100})}receiveCancel(r){this.delegate&&this.delegate.onCancel&&this.delegate.onCancel(r)}get acceptable(){if(this.transaction instanceof ya)return this.transaction.state===pe.Proceeding||this.transaction.state===pe.Accepted;if(this.transaction instanceof La)return this.transaction.state===pe.Trying||this.transaction.state===pe.Proceeding;throw new Error("Unknown transaction type.")}get progressable(){if(this.transaction instanceof ya)return this.transaction.state===pe.Proceeding;if(this.transaction instanceof La)return!1;throw new Error("Unknown transaction type.")}get redirectable(){if(this.transaction instanceof ya)return this.transaction.state===pe.Proceeding;if(this.transaction instanceof La)return this.transaction.state===pe.Trying||this.transaction.state===pe.Proceeding;throw new Error("Unknown transaction type.")}get rejectable(){if(this.transaction instanceof ya)return this.transaction.state===pe.Proceeding;if(this.transaction instanceof La)return this.transaction.state===pe.Trying||this.transaction.state===pe.Proceeding;throw new Error("Unknown transaction type.")}get tryingable(){if(this.transaction instanceof ya)return this.transaction.state===pe.Proceeding;if(this.transaction instanceof La)return this.transaction.state===pe.Trying;throw new Error("Unknown transaction type.")}reply(r){!r.toTag&&r.statusCode!==100&&(r.toTag=this.toTag),r.userAgent=r.userAgent||this.core.configuration.userAgentHeaderFieldValue,r.supported=r.supported||this.core.configuration.supportedOptionTagsResponse;const i=G2(this.message,r);return this.transaction.receiveResponse(r.statusCode,i.message),i}init(){const r={loggerFactory:this.loggerFactory,onStateChange:f=>{f===pe.Terminated&&(this.core.userAgentServers.delete(l),this.dispose())},onTransportError:f=>{this.logger.error(f.message),this.delegate&&this.delegate.onTransportError?this.delegate.onTransportError(f):this.logger.error("User agent server response transport error.")}},i=new this.transactionConstructor(this.message,this.core.transport,r);this._transaction=i;const l=i.id;this.core.userAgentServers.set(i.id,this)}}class t8 extends Co{constructor(r,i,l){super(La,r.userAgentCore,i,l)}}class r8 extends Bi{constructor(r,i,l){const f=r.createOutgoingRequestMessage(nt.INFO,l);super(Pa,r.userAgentCore,f,i)}}class n8 extends Co{constructor(r,i,l){super(La,r.userAgentCore,i,l)}}class X2 extends Bi{constructor(r,i,l){super(Pa,r,i,l)}}class Z2 extends Co{constructor(r,i,l){super(La,r,i,l)}}class i8 extends Bi{constructor(r,i,l){const f=r.createOutgoingRequestMessage(nt.NOTIFY,l);super(Pa,r.userAgentCore,f,i)}}function a8(o){return o.userAgentCore!==void 0}class Tv extends Co{constructor(r,i,l){const f=a8(r)?r.userAgentCore:r;super(La,f,i,l)}}class s8 extends Bi{constructor(r,i,l){const f=r.createOutgoingRequestMessage(nt.PRACK,l);super(Pa,r.userAgentCore,f,i),r.signalingStateTransition(f)}}class o8 extends Co{constructor(r,i,l){super(La,r.userAgentCore,i,l),r.signalingStateTransition(i),this.dialog=r}accept(r={statusCode:200}){return r.body&&this.dialog.signalingStateTransition(r.body),super.accept(r)}}class l8 extends Bi{constructor(r,i,l){const f=r.createOutgoingRequestMessage(nt.INVITE,l);super(xu,r.userAgentCore,f,i),this.delegate=i,r.signalingStateTransition(f),r.reinviteUserAgentClient=this,this.dialog=r}receiveResponse(r){if(!this.authenticationGuard(r,this.dialog))return;const i=r.statusCode?r.statusCode.toString():"";if(!i)throw new Error("Response status code undefined.");switch(!0){case/^100$/.test(i):this.delegate&&this.delegate.onTrying&&this.delegate.onTrying({message:r});break;case/^1[0-9]{2}$/.test(i):this.delegate&&this.delegate.onProgress&&this.delegate.onProgress({message:r,session:this.dialog,prack:l=>{throw new Error("Unimplemented.")}});break;case/^2[0-9]{2}$/.test(i):this.dialog.signalingStateTransition(r),this.delegate&&this.delegate.onAccept&&this.delegate.onAccept({message:r,session:this.dialog,ack:l=>this.dialog.ack(l)});break;case/^3[0-9]{2}$/.test(i):this.dialog.signalingStateRollback(),this.dialog.reinviteUserAgentClient=void 0,this.delegate&&this.delegate.onRedirect&&this.delegate.onRedirect({message:r});break;case/^[4-6][0-9]{2}$/.test(i):this.dialog.signalingStateRollback(),this.dialog.reinviteUserAgentClient=void 0,this.delegate&&this.delegate.onReject&&this.delegate.onReject({message:r});break;default:throw new Error(`Invalid status code ${i}`)}}}class u8 extends Co{constructor(r,i,l){super(ya,r.userAgentCore,i,l),r.reinviteUserAgentServer=this,this.dialog=r}accept(r={statusCode:200}){r.extraHeaders=r.extraHeaders||[],r.extraHeaders=r.extraHeaders.concat(this.dialog.routeSet.map(p=>`Record-Route: ${p}`));const i=super.accept(r),l=this.dialog,f=Object.assign(Object.assign({},i),{session:l});return r.body&&this.dialog.signalingStateTransition(r.body),this.dialog.reConfirm(),f}progress(r={statusCode:180}){const i=super.progress(r),l=this.dialog,f=Object.assign(Object.assign({},i),{session:l});return r.body&&this.dialog.signalingStateTransition(r.body),f}redirect(r,i={statusCode:302}){throw this.dialog.signalingStateRollback(),this.dialog.reinviteUserAgentServer=void 0,new Error("Unimplemented.")}reject(r={statusCode:488}){return this.dialog.signalingStateRollback(),this.dialog.reinviteUserAgentServer=void 0,super.reject(r)}}class c8 extends Bi{constructor(r,i,l){const f=r.createOutgoingRequestMessage(nt.REFER,l);super(Pa,r.userAgentCore,f,i)}}function f8(o){return o.userAgentCore!==void 0}class J2 extends Co{constructor(r,i,l){const f=f8(r)?r.userAgentCore:r;super(La,f,i,l)}}class Rv extends Xf{constructor(r,i,l,f){super(i,l),this.initialTransaction=r,this._signalingState=Ve.Initial,this.ackWait=!1,this.ackProcessing=!1,this.delegate=f,r instanceof ya&&(this.ackWait=!0),this.early||this.start2xxRetransmissionTimer(),this.signalingStateTransition(r.request),this.logger=i.loggerFactory.getLogger("sip.invite-dialog"),this.logger.log(`INVITE dialog ${this.id} constructed`)}dispose(){super.dispose(),this._signalingState=Ve.Closed,this._offer=void 0,this._answer=void 0,this.invite2xxTimer&&(clearTimeout(this.invite2xxTimer),this.invite2xxTimer=void 0),this.logger.log(`INVITE dialog ${this.id} destroyed`)}get sessionState(){return this.early?as.Early:this.ackWait?as.AckWait:this._signalingState===Ve.Closed?as.Terminated:as.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(r={}){this.logger.log(`INVITE dialog ${this.id} sending ACK request`);let i;if(this.reinviteUserAgentClient){if(!(this.reinviteUserAgentClient.transaction instanceof xu))throw new Error("Transaction not instance of InviteClientTransaction.");i=this.reinviteUserAgentClient.transaction,this.reinviteUserAgentClient=void 0}else{if(!(this.initialTransaction instanceof xu))throw new Error("Initial transaction not instance of InviteClientTransaction.");i=this.initialTransaction}const l=this.createOutgoingRequestMessage(nt.ACK,{cseq:i.request.cseq,extraHeaders:r.extraHeaders,body:r.body});return i.ackResponse(l),this.signalingStateTransition(l),{message:l}}bye(r,i){if(this.logger.log(`INVITE dialog ${this.id} sending BYE request`),this.initialTransaction instanceof ya){if(this.early)throw new Error("UAS MUST NOT send a BYE on early dialogs.");if(this.ackWait&&this.initialTransaction.state!==pe.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 e8(this,r,i)}info(r,i){if(this.logger.log(`INVITE dialog ${this.id} sending INFO request`),this.early)throw new Error("Dialog not confirmed.");return new r8(this,r,i)}invite(r,i){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 l8(this,r,i)}message(r,i){if(this.logger.log(`INVITE dialog ${this.id} sending MESSAGE request`),this.early)throw new Error("Dialog not confirmed.");const l=this.createOutgoingRequestMessage(nt.MESSAGE,i);return new X2(this.core,l,r)}notify(r,i){if(this.logger.log(`INVITE dialog ${this.id} sending NOTIFY request`),this.early)throw new Error("Dialog not confirmed.");return new i8(this,r,i)}prack(r,i){return this.logger.log(`INVITE dialog ${this.id} sending PRACK request`),new s8(this,r,i)}refer(r,i){if(this.logger.log(`INVITE dialog ${this.id} sending REFER request`),this.early)throw new Error("Dialog not confirmed.");return new c8(this,r,i)}receiveRequest(r){if(this.logger.log(`INVITE dialog ${this.id} received ${r.method} request`),r.method===nt.ACK){if(this.ackWait){if(this.initialTransaction instanceof xu){this.logger.warn(`INVITE dialog ${this.id} received unexpected ${r.method} request, dropping.`);return}if(this.initialTransaction.request.cseq!==r.cseq){this.logger.warn(`INVITE dialog ${this.id} received unexpected ${r.method} request, dropping.`);return}this.ackWait=!1}else{if(!this.reinviteUserAgentServer){this.logger.warn(`INVITE dialog ${this.id} received unexpected ${r.method} request, dropping.`);return}if(this.reinviteUserAgentServer.transaction.request.cseq!==r.cseq){this.logger.warn(`INVITE dialog ${this.id} received unexpected ${r.method} request, dropping.`);return}this.reinviteUserAgentServer=void 0}if(this.signalingStateTransition(r),this.delegate&&this.delegate.onAck){const i=this.delegate.onAck({message:r});i instanceof Promise&&(this.ackProcessing=!0,i.then(()=>this.ackProcessing=!1).catch(()=>this.ackProcessing=!1))}return}if(!this.sequenceGuard(r)){this.logger.log(`INVITE dialog ${this.id} rejected out of order ${r.method} request.`);return}if(super.receiveRequest(r),r.method===nt.INVITE){const i=()=>{const p=this.ackWait?"waiting for initial ACK":"processing initial ACK";this.logger.warn(`INVITE dialog ${this.id} received re-INVITE while ${p}`);let v="RFC 5407 suggests the following to avoid this race condition... ";v+=" Note: Implementation issues are outside the scope of this document,",v+=" but the following tip is provided for avoiding race conditions of",v+=" this type. The caller can delay sending re-INVITE F6 for some period",v+=" of time (2 seconds, perhaps), after which the caller can reasonably",v+=" assume that its ACK has been received. Implementors can decouple the",v+=" actions of the user (e.g., pressing the hold button) from the actions",v+=" of the protocol (the sending of re-INVITE F6), so that the UA can",v+=" behave like this. In this case, it is the implementor's choice as to",v+=" how long to wait. In most cases, such an implementation may be",v+=" useful to prevent the type of race condition shown in this section.",v+=" This document expresses no preference about whether or not they",v+=" should wait for an ACK to be delivered. After considering the impact",v+=" on user experience, implementors should decide whether or not to wait",v+=" for a while, because the user experience depends on the",v+=" implementation and has no direct bearing on protocol behavior.",this.logger.warn(v)},f=[`Retry-After: ${Math.floor(Math.random()*10)+1}`];if(this.ackProcessing){this.core.replyStateless(r,{statusCode:500,extraHeaders:f}),i();return}if(this.ackWait&&this.signalingState!==Ve.Stable){this.core.replyStateless(r,{statusCode:500,extraHeaders:f}),i();return}if(this.reinviteUserAgentServer){this.core.replyStateless(r,{statusCode:500,extraHeaders:f});return}if(this.reinviteUserAgentClient){this.core.replyStateless(r,{statusCode:491});return}}if(r.method===nt.INVITE){const i=r.parseHeader("contact");if(!i)throw new Error("Contact undefined.");if(!(i instanceof ma))throw new Error("Contact not instance of NameAddrHeader.");this.dialogState.remoteTarget=i.uri}switch(r.method){case nt.BYE:{const i=new t8(this,r);this.delegate&&this.delegate.onBye?this.delegate.onBye(i):i.accept(),this.dispose()}break;case nt.INFO:{const i=new n8(this,r);this.delegate&&this.delegate.onInfo?this.delegate.onInfo(i):i.reject({statusCode:469,extraHeaders:["Recv-Info:"]})}break;case nt.INVITE:{const i=new u8(this,r);this.signalingStateTransition(r),this.delegate&&this.delegate.onInvite?this.delegate.onInvite(i):i.reject({statusCode:488})}break;case nt.MESSAGE:{const i=new Z2(this.core,r);this.delegate&&this.delegate.onMessage?this.delegate.onMessage(i):i.accept()}break;case nt.NOTIFY:{const i=new Tv(this,r);this.delegate&&this.delegate.onNotify?this.delegate.onNotify(i):i.accept()}break;case nt.PRACK:{const i=new o8(this,r);this.delegate&&this.delegate.onPrack?this.delegate.onPrack(i):i.accept()}break;case nt.REFER:{const i=new J2(this,r);this.delegate&&this.delegate.onRefer?this.delegate.onRefer(i):i.reject()}break;default:this.logger.log(`INVITE dialog ${this.id} received unimplemented ${r.method} request`),this.core.replyStateless(r,{statusCode:501});break}}reliableSequenceGuard(r){const i=r.statusCode;if(!i)throw new Error("Status code undefined");if(i>100&&i<200){const l=r.getHeader("require"),f=r.getHeader("rseq"),p=l&&l.includes("100rel")&&f?Number(f):void 0;if(p){if(this.rseq&&this.rseq+1!==p)return!1;this.rseq=this.rseq?this.rseq+1:p}}return!0}signalingStateRollback(){(this._signalingState===Ve.HaveLocalOffer||this.signalingState===Ve.HaveRemoteOffer)&&this._rollbackOffer&&this._rollbackAnswer&&(this._signalingState=Ve.Stable,this._offer=this._rollbackOffer,this._answer=this._rollbackAnswer)}signalingStateTransition(r){const i=t0(r);if(!(!i||i.contentDisposition!=="session")){if(this._signalingState===Ve.Stable&&(this._rollbackOffer=this._offer,this._rollbackAnswer=this._answer),r instanceof Qf)switch(this._signalingState){case Ve.Initial:case Ve.Stable:this._signalingState=Ve.HaveRemoteOffer,this._offer=i,this._answer=void 0;break;case Ve.HaveLocalOffer:this._signalingState=Ve.Stable,this._answer=i;break;case Ve.HaveRemoteOffer:break;case Ve.Closed:break;default:throw new Error("Unexpected signaling state.")}if(r instanceof vu)switch(this._signalingState){case Ve.Initial:case Ve.Stable:this._signalingState=Ve.HaveRemoteOffer,this._offer=i,this._answer=void 0;break;case Ve.HaveLocalOffer:this._signalingState=Ve.Stable,this._answer=i;break;case Ve.HaveRemoteOffer:break;case Ve.Closed:break;default:throw new Error("Unexpected signaling state.")}if(r instanceof Dc)switch(this._signalingState){case Ve.Initial:case Ve.Stable:this._signalingState=Ve.HaveLocalOffer,this._offer=i,this._answer=void 0;break;case Ve.HaveLocalOffer:break;case Ve.HaveRemoteOffer:this._signalingState=Ve.Stable,this._answer=i;break;case Ve.Closed:break;default:throw new Error("Unexpected signaling state.")}if(z2(r))switch(this._signalingState){case Ve.Initial:case Ve.Stable:this._signalingState=Ve.HaveLocalOffer,this._offer=i,this._answer=void 0;break;case Ve.HaveLocalOffer:break;case Ve.HaveRemoteOffer:this._signalingState=Ve.Stable,this._answer=i;break;case Ve.Closed:break;default:throw new Error("Unexpected signaling state.")}}}start2xxRetransmissionTimer(){if(this.initialTransaction instanceof ya){const r=this.initialTransaction;let i=li.T1;const l=()=>{if(!this.ackWait){this.invite2xxTimer=void 0;return}this.logger.log("No ACK for 2xx response received, attempting retransmission"),r.retransmitAcceptedResponse(),i=Math.min(i*2,li.T2),this.invite2xxTimer=setTimeout(l,i)};this.invite2xxTimer=setTimeout(l,i);const f=()=>{r.state===pe.Terminated&&(r.removeStateChangeListener(f),this.invite2xxTimer&&(clearTimeout(this.invite2xxTimer),this.invite2xxTimer=void 0),this.ackWait&&(this.delegate&&this.delegate.onAckTimeout?this.delegate.onAckTimeout():this.bye()))};r.addStateChangeListener(f)}}startReInvite2xxRetransmissionTimer(){if(this.reinviteUserAgentServer&&this.reinviteUserAgentServer.transaction instanceof ya){const r=this.reinviteUserAgentServer.transaction;let i=li.T1;const l=()=>{if(!this.reinviteUserAgentServer){this.invite2xxTimer=void 0;return}this.logger.log("No ACK for 2xx response received, attempting retransmission"),r.retransmitAcceptedResponse(),i=Math.min(i*2,li.T2),this.invite2xxTimer=setTimeout(l,i)};this.invite2xxTimer=setTimeout(l,i);const f=()=>{r.state===pe.Terminated&&(r.removeStateChangeListener(f),this.invite2xxTimer&&(clearTimeout(this.invite2xxTimer),this.invite2xxTimer=void 0),this.reinviteUserAgentServer)};r.addStateChangeListener(f)}}}class d8 extends Bi{constructor(r,i,l){super(xu,r,i,l),this.confirmedDialogAcks=new Map,this.confirmedDialogs=new Map,this.earlyDialogs=new Map,this.delegate=l}dispose(){this.earlyDialogs.forEach(r=>r.dispose()),this.earlyDialogs.clear(),super.dispose()}onTransportError(r){if(this.transaction.state===pe.Calling)return super.onTransportError(r);this.logger.error(r.message),this.logger.error("User agent client request transport error while sending ACK.")}receiveResponse(r){if(!this.authenticationGuard(r))return;const i=r.statusCode?r.statusCode.toString():"";if(!i)throw new Error("Response status code undefined.");switch(!0){case/^100$/.test(i):this.delegate&&this.delegate.onTrying&&this.delegate.onTrying({message:r});return;case/^1[0-9]{2}$/.test(i):{if(!r.toTag){this.logger.warn("Non-100 1xx INVITE response received without a to tag, dropping.");return}if(!r.parseHeader("contact")){this.logger.error("Non-100 1xx INVITE response received without a Contact header field, dropping.");return}const f=Xf.initialDialogStateForUserAgentClient(this.message,r);let p=this.earlyDialogs.get(f.id);if(!p){const C=this.transaction;if(!(C instanceof xu))throw new Error("Transaction not instance of InviteClientTransaction.");p=new Rv(C,this.core,f),this.earlyDialogs.set(p.id,p)}if(!p.reliableSequenceGuard(r)){this.logger.warn("1xx INVITE reliable response received out of order or is a retransmission, dropping.");return}(p.signalingState===Ve.Initial||p.signalingState===Ve.HaveLocalOffer)&&p.signalingStateTransition(r);const v=p;this.delegate&&this.delegate.onProgress&&this.delegate.onProgress({message:r,session:v,prack:C=>v.prack(void 0,C)})}return;case/^2[0-9]{2}$/.test(i):{if(!r.toTag){this.logger.error("2xx INVITE response received without a to tag, dropping.");return}if(!r.parseHeader("contact")){this.logger.error("2xx INVITE response received without a Contact header field, dropping.");return}const f=Xf.initialDialogStateForUserAgentClient(this.message,r);let p=this.confirmedDialogs.get(f.id);if(p){const C=this.confirmedDialogAcks.get(f.id);if(C){const w=this.transaction;if(!(w instanceof xu))throw new Error("Client transaction not instance of InviteClientTransaction.");w.ackResponse(C.message)}return}if(p=this.earlyDialogs.get(f.id),p)p.confirm(),p.recomputeRouteSet(r),this.earlyDialogs.delete(p.id),this.confirmedDialogs.set(p.id,p);else{const C=this.transaction;if(!(C instanceof xu))throw new Error("Transaction not instance of InviteClientTransaction.");p=new Rv(C,this.core,f),this.confirmedDialogs.set(p.id,p)}(p.signalingState===Ve.Initial||p.signalingState===Ve.HaveLocalOffer)&&p.signalingStateTransition(r);const v=p;if(this.delegate&&this.delegate.onAccept)this.delegate.onAccept({message:r,session:v,ack:C=>{const w=v.ack(C);return this.confirmedDialogAcks.set(v.id,w),w}});else{const C=v.ack();this.confirmedDialogAcks.set(v.id,C)}}return;case/^3[0-9]{2}$/.test(i):this.earlyDialogs.forEach(l=>l.dispose()),this.earlyDialogs.clear(),this.delegate&&this.delegate.onRedirect&&this.delegate.onRedirect({message:r});return;case/^[4-6][0-9]{2}$/.test(i):this.earlyDialogs.forEach(l=>l.dispose()),this.earlyDialogs.clear(),this.delegate&&this.delegate.onReject&&this.delegate.onReject({message:r});return;default:throw new Error(`Invalid status code ${i}`)}}}class $x extends Co{constructor(r,i,l){super(ya,r,i,l),this.core=r}dispose(){this.earlyDialog&&this.earlyDialog.dispose(),super.dispose()}accept(r={statusCode:200}){if(!this.acceptable)throw new gu(`${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 w=this.transaction;if(!(w instanceof ya))throw new Error("Transaction not instance of InviteClientTransaction.");const S=Xf.initialDialogStateForUserAgentServer(this.message,this.toTag);this.confirmedDialog=new Rv(w,this.core,S)}const i=this.message.getHeaders("record-route").map(w=>`Record-Route: ${w}`),l=`Contact: ${this.core.configuration.contact.toString()}`,f="Allow: "+mu.toString();if(!r.body){if(this.confirmedDialog.signalingState===Ve.Stable)r.body=this.confirmedDialog.answer;else if(this.confirmedDialog.signalingState===Ve.Initial||this.confirmedDialog.signalingState===Ve.HaveRemoteOffer)throw new Error("Response must have a body.")}r.statusCode=r.statusCode||200,r.extraHeaders=r.extraHeaders||[],r.extraHeaders=r.extraHeaders.concat(i),r.extraHeaders.push(f),r.extraHeaders.push(l);const p=super.accept(r),v=this.confirmedDialog,C=Object.assign(Object.assign({},p),{session:v});return r.body&&this.confirmedDialog.signalingState!==Ve.Stable&&this.confirmedDialog.signalingStateTransition(r.body),C}progress(r={statusCode:180}){if(!this.progressable)throw new gu(`${this.message.method} not progressable in state ${this.transaction.state}.`);if(!this.earlyDialog){const C=this.transaction;if(!(C instanceof ya))throw new Error("Transaction not instance of InviteClientTransaction.");const w=Xf.initialDialogStateForUserAgentServer(this.message,this.toTag,!0);this.earlyDialog=new Rv(C,this.core,w)}const i=this.message.getHeaders("record-route").map(C=>`Record-Route: ${C}`),l=`Contact: ${this.core.configuration.contact}`;r.extraHeaders=r.extraHeaders||[],r.extraHeaders=r.extraHeaders.concat(i),r.extraHeaders.push(l);const f=super.progress(r),p=this.earlyDialog,v=Object.assign(Object.assign({},f),{session:p});return r.body&&this.earlyDialog.signalingState!==Ve.Stable&&this.earlyDialog.signalingStateTransition(r.body),v}redirect(r,i={statusCode:302}){return super.redirect(r,i)}reject(r={statusCode:486}){return super.reject(r)}}class h8 extends Bi{constructor(r,i,l){super(Pa,r,i,l)}}class p8 extends Bi{constructor(r,i,l){super(Pa,r,i,l)}}class v8 extends Co{constructor(r,i,l){super(La,r,i,l),this.core=r}}class g8 extends Bi{constructor(r,i,l){const f=r.createOutgoingRequestMessage(nt.SUBSCRIBE,l);super(Pa,r.userAgentCore,f,i),this.dialog=r}waitNotifyStop(){}receiveResponse(r){if(r.statusCode&&r.statusCode>=200&&r.statusCode<300){const i=r.getHeader("Expires");if(!i)this.logger.warn("Expires header missing in a 200-class response to SUBSCRIBE");else{const l=Number(i);this.dialog.subscriptionExpires>l&&(this.dialog.subscriptionExpires=l)}}r.statusCode&&r.statusCode>=400&&r.statusCode<700&&[404,405,410,416,480,481,482,483,484,485,489,501,604].includes(r.statusCode)&&this.dialog.terminate(),super.receiveResponse(r)}}class ew extends Xf{constructor(r,i,l,f,p,v){super(f,p),this.delegate=v,this._autoRefresh=!1,this._subscriptionEvent=r,this._subscriptionExpires=i,this._subscriptionExpiresInitial=i,this._subscriptionExpiresLastSet=Math.floor(Date.now()/1e3),this._subscriptionRefresh=void 0,this._subscriptionRefreshLastSet=void 0,this._subscriptionState=l,this.logger=f.loggerFactory.getLogger("sip.subscribe-dialog"),this.logger.log(`SUBSCRIBE dialog ${this.id} constructed`)}static initialDialogStateForSubscription(r,i){const f=i.getHeaders("record-route"),p=i.parseHeader("contact");if(!p)throw new Error("Contact undefined.");if(!(p instanceof ma))throw new Error("Contact not instance of NameAddrHeader.");const v=p.uri,C=r.cseq,w=void 0,S=r.callId,b=r.fromTag,T=i.fromTag;if(!S)throw new Error("Call id undefined.");if(!b)throw new Error("From tag undefined.");if(!T)throw new Error("To tag undefined.");if(!r.from)throw new Error("From undefined.");if(!r.to)throw new Error("To undefined.");const A=r.from.uri,H=r.to.uri;return{id:S+b+T,early:!1,callId:S,localTag:b,remoteTag:T,localSequenceNumber:C,remoteSequenceNumber:w,localURI:A,remoteURI:H,remoteTarget:v,routeSet:f,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(r){this._autoRefresh=!0,this.refreshTimerSet()}get subscriptionEvent(){return this._subscriptionEvent}get subscriptionExpires(){const r=Math.floor(Date.now()/1e3)-this._subscriptionExpiresLastSet,i=this._subscriptionExpires-r;return Math.max(i,0)}set subscriptionExpires(r){if(r<0)throw new Error("Expires must be greater than or equal to zero.");if(this._subscriptionExpires=r,this._subscriptionExpiresLastSet=Math.floor(Date.now()/1e3),this.autoRefresh){const i=this.subscriptionRefresh;(i===void 0||i>=r)&&this.refreshTimerSet()}}get subscriptionExpiresInitial(){return this._subscriptionExpiresInitial}get subscriptionRefresh(){if(this._subscriptionRefresh===void 0||this._subscriptionRefreshLastSet===void 0)return;const r=Math.floor(Date.now()/1e3)-this._subscriptionRefreshLastSet,i=this._subscriptionRefresh-r;return Math.max(i,0)}get subscriptionState(){return this._subscriptionState}receiveRequest(r){if(this.logger.log(`SUBSCRIBE dialog ${this.id} received ${r.method} request`),!this.sequenceGuard(r)){this.logger.log(`SUBSCRIBE dialog ${this.id} rejected out of order ${r.method} request.`);return}switch(super.receiveRequest(r),r.method){case nt.NOTIFY:this.onNotify(r);break;default:this.logger.log(`SUBSCRIBE dialog ${this.id} received unimplemented ${r.method} request`),this.core.replyStateless(r,{statusCode:501});break}}refresh(){const r="Allow: "+mu.toString(),i={};return i.extraHeaders=(i.extraHeaders||[]).slice(),i.extraHeaders.push(r),i.extraHeaders.push("Event: "+this.subscriptionEvent),i.extraHeaders.push("Expires: "+this.subscriptionExpiresInitial),i.extraHeaders.push("Contact: "+this.core.configuration.contact.toString()),this.subscribe(void 0,i)}subscribe(r,i={}){var l;if(this.subscriptionState!==pr.Pending&&this.subscriptionState!==pr.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 f=new g8(this,r,i);return this.N&&(clearTimeout(this.N),this.N=void 0),!((l=i.extraHeaders)===null||l===void 0)&&l.includes("Expires: 0")||(this.N=setTimeout(()=>this.timerN(),li.TIMER_N)),f}terminate(){this.stateTransition(pr.Terminated),this.onTerminated()}unsubscribe(){const r="Allow: "+mu.toString(),i={};return i.extraHeaders=(i.extraHeaders||[]).slice(),i.extraHeaders.push(r),i.extraHeaders.push("Event: "+this.subscriptionEvent),i.extraHeaders.push("Expires: 0"),i.extraHeaders.push("Contact: "+this.core.configuration.contact.toString()),this.subscribe(void 0,i)}onNotify(r){const i=r.parseHeader("Event").event;if(!i||i!==this.subscriptionEvent){this.core.replyStateless(r,{statusCode:489});return}this.N&&(clearTimeout(this.N),this.N=void 0);const l=r.parseHeader("Subscription-State");if(!l||!l.state){this.core.replyStateless(r,{statusCode:489});return}const f=l.state,p=l.expires?Math.max(l.expires,0):void 0;switch(f){case"pending":this.stateTransition(pr.Pending,p);break;case"active":this.stateTransition(pr.Active,p);break;case"terminated":this.stateTransition(pr.Terminated,p);break;default:this.logger.warn("Unrecognized subscription state.");break}const v=new Tv(this,r);this.delegate&&this.delegate.onNotify?this.delegate.onNotify(v):v.accept()}onRefresh(r){this.delegate&&this.delegate.onRefresh&&this.delegate.onRefresh(r)}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 r=this.subscriptionExpires*900;this._subscriptionRefresh=Math.floor(r/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())},r)}}stateTransition(r,i){const l=()=>{this.logger.warn(`Invalid subscription state transition from ${this.subscriptionState} to ${r}`)};switch(r){case pr.Initial:l();return;case pr.NotifyWait:l();return;case pr.Pending:if(this.subscriptionState!==pr.NotifyWait&&this.subscriptionState!==pr.Pending){l();return}break;case pr.Active:if(this.subscriptionState!==pr.NotifyWait&&this.subscriptionState!==pr.Pending&&this.subscriptionState!==pr.Active){l();return}break;case pr.Terminated:if(this.subscriptionState!==pr.NotifyWait&&this.subscriptionState!==pr.Pending&&this.subscriptionState!==pr.Active){l();return}break;default:l();return}r===pr.Pending&&i&&(this.subscriptionExpires=i),r===pr.Active&&i&&(this.subscriptionExpires=i),r===pr.Terminated&&this.dispose(),this._subscriptionState=r}timerN(){this.logger.warn("Timer N expired for SUBSCRIBE dialog. Timed out waiting for NOTIFY."),this.subscriptionState!==pr.Terminated&&(this.stateTransition(pr.Terminated),this.onTerminated())}}class m8 extends Bi{constructor(r,i,l){const f=i.getHeader("Event");if(!f)throw new Error("Event undefined");const p=i.getHeader("Expires");if(!p)throw new Error("Expires undefined");super(Pa,r,i,l),this.delegate=l,this.subscriberId=i.callId+i.fromTag+f,this.subscriptionExpiresRequested=this.subscriptionExpires=Number(p),this.subscriptionEvent=f,this.subscriptionState=pr.NotifyWait,this.waitNotifyStart()}dispose(){super.dispose()}onNotify(r){const i=r.message.parseHeader("Event").event;if(!i||i!==this.subscriptionEvent){this.logger.warn("Failed to parse event."),r.reject({statusCode:489});return}const l=r.message.parseHeader("Subscription-State");if(!l||!l.state){this.logger.warn("Failed to parse subscription state."),r.reject({statusCode:489});return}const f=l.state;switch(f){case"pending":break;case"active":break;case"terminated":break;default:this.logger.warn(`Invalid subscription state ${f}`),r.reject({statusCode:489});return}if(f!=="terminated"&&!r.message.parseHeader("contact")){this.logger.warn("Failed to parse contact."),r.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=l.expires?Math.min(this.subscriptionExpires,Math.max(l.expires,0)):this.subscriptionExpires,f){case"pending":this.subscriptionState=pr.Pending;break;case"active":this.subscriptionState=pr.Active;break;case"terminated":this.subscriptionState=pr.Terminated;break;default:throw new Error(`Unrecognized state ${f}.`)}if(this.subscriptionState!==pr.Terminated){const p=ew.initialDialogStateForSubscription(this.message,r.message);this.dialog=new ew(this.subscriptionEvent,this.subscriptionExpires,this.subscriptionState,this.core,p)}if(this.delegate&&this.delegate.onNotify){const p=r,v=this.dialog;this.delegate.onNotify({request:p,subscription:v})}else r.accept()}waitNotifyStart(){this.N||(this.core.subscribers.set(this.subscriberId,this),this.N=setTimeout(()=>this.timerN(),li.TIMER_N))}waitNotifyStop(){this.N&&(this.core.subscribers.delete(this.subscriberId),clearTimeout(this.N),this.N=void 0)}receiveResponse(r){if(this.authenticationGuard(r)){if(r.statusCode&&r.statusCode>=200&&r.statusCode<300){const i=r.getHeader("Expires");if(!i)this.logger.warn("Expires header missing in a 200-class response to SUBSCRIBE");else{const l=Number(i);l>this.subscriptionExpiresRequested&&this.logger.warn("Expires header in a 200-class response to SUBSCRIBE with a higher value than the one in the request"),l<this.subscriptionExpires&&(this.subscriptionExpires=l)}this.dialog&&this.dialog.subscriptionExpires>this.subscriptionExpires&&(this.dialog.subscriptionExpires=this.subscriptionExpires)}r.statusCode&&r.statusCode>=300&&r.statusCode<700&&this.waitNotifyStop(),super.receiveResponse(r)}}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()}}class y8 extends Co{constructor(r,i,l){super(La,r,i,l),this.core=r}}const tw=["application/sdp","application/dtmf-relay"];class x8{constructor(r,i={}){this.userAgentClients=new Map,this.userAgentServers=new Map,this.configuration=r,this.delegate=i,this.dialogs=new Map,this.subscribers=new Map,this.logger=r.loggerFactory.getLogger("sip.user-agent-core")}dispose(){this.reset()}reset(){this.dialogs.forEach(r=>r.dispose()),this.dialogs.clear(),this.subscribers.forEach(r=>r.dispose()),this.subscribers.clear(),this.userAgentClients.forEach(r=>r.dispose()),this.userAgentClients.clear(),this.userAgentServers.forEach(r=>r.dispose()),this.userAgentServers.clear()}get loggerFactory(){return this.configuration.loggerFactory}get transport(){const r=this.configuration.transportAccessor();if(!r)throw new Error("Transport undefined.");return r}invite(r,i){return new d8(this,r,i)}message(r,i){return new X2(this,r,i)}publish(r,i){return new h8(this,r,i)}register(r,i){return new p8(this,r,i)}subscribe(r,i){return new m8(this,r,i)}request(r,i){return new Bi(Pa,this,r,i)}makeOutgoingRequestMessage(r,i,l,f,p,v,C){const w=this.configuration.sipjsId,S=this.configuration.displayName,b=this.configuration.viaForceRport,T=this.configuration.hackViaTcp,A=this.configuration.supportedOptionTags.slice();r===nt.REGISTER&&A.push("path","gruu"),r===nt.INVITE&&(this.configuration.contact.pubGruu||this.configuration.contact.tempGruu)&&A.push("gruu");const H=this.configuration.routeSet,P=this.configuration.userAgentHeaderFieldValue,j=this.configuration.viaHost,N=Object.assign(Object.assign({},{callIdPrefix:w,forceRport:b,fromDisplayName:S,hackViaTcp:T,optionTags:A,routeSet:H,userAgentString:P,viaHost:j}),p);return new Dc(r,i,l,f,N,v,C)}receiveIncomingRequestFromTransport(r){this.receiveRequestFromTransport(r)}receiveIncomingResponseFromTransport(r){this.receiveResponseFromTransport(r)}replyStateless(r,i){const l=this.configuration.userAgentHeaderFieldValue,f=this.configuration.supportedOptionTagsResponse;i=Object.assign(Object.assign({},i),{userAgent:l,supported:f});const p=G2(r,i);return this.transport.send(p.message).catch(v=>{v instanceof Error&&this.logger.error(v.message),this.logger.error(`Transport error occurred sending stateless reply to ${r.method} request.`)}),p}receiveRequestFromTransport(r){const i=r.viaBranch,l=this.userAgentServers.get(i);if(r.method===nt.ACK&&l&&l.transaction.state===pe.Accepted&&l instanceof $x){this.logger.warn(`Discarding out of dialog ACK after 2xx response sent on transaction ${i}.`);return}if(r.method===nt.CANCEL){l?(this.replyStateless(r,{statusCode:200}),l.transaction instanceof ya&&l.transaction.state===pe.Proceeding&&l instanceof $x&&l.receiveCancel(r)):this.replyStateless(r,{statusCode:481});return}if(l){l.transaction.receiveRequest(r);return}this.receiveRequest(r)}receiveRequest(r){if(!mu.includes(r.method)){const f="Allow: "+mu.toString();this.replyStateless(r,{statusCode:405,extraHeaders:[f]});return}if(!r.ruri)throw new Error("Request-URI undefined.");if(r.ruri.scheme!=="sip"){this.replyStateless(r,{statusCode:416});return}const i=r.ruri,l=f=>!!f&&f.user===i.user;if(!l(this.configuration.aor)&&!(l(this.configuration.contact.uri)||l(this.configuration.contact.pubGruu)||l(this.configuration.contact.tempGruu))){this.logger.warn("Request-URI does not point to us."),r.method!==nt.ACK&&this.replyStateless(r,{statusCode:404});return}if(r.method===nt.INVITE&&!r.hasHeader("Contact")){this.replyStateless(r,{statusCode:400,reasonPhrase:"Missing Contact Header"});return}if(!r.toTag){const f=r.viaBranch;if(!this.userAgentServers.has(f)&&Array.from(this.userAgentServers.values()).some(v=>v.transaction.request.fromTag===r.fromTag&&v.transaction.request.callId===r.callId&&v.transaction.request.cseq===r.cseq)){this.replyStateless(r,{statusCode:482});return}}r.toTag?this.receiveInsideDialogRequest(r):this.receiveOutsideDialogRequest(r)}receiveInsideDialogRequest(r){if(r.method===nt.NOTIFY){const f=r.parseHeader("Event");if(!f||!f.event){this.replyStateless(r,{statusCode:489});return}const p=r.callId+r.toTag+f.event,v=this.subscribers.get(p);if(v){const C=new Tv(this,r);v.onNotify(C);return}}const i=r.callId+r.toTag+r.fromTag,l=this.dialogs.get(i);if(l){if(r.method===nt.OPTIONS){const f="Allow: "+mu.toString(),p="Accept: "+tw.toString();this.replyStateless(r,{statusCode:200,extraHeaders:[f,p]});return}l.receiveRequest(r);return}r.method!==nt.ACK&&this.replyStateless(r,{statusCode:481})}receiveOutsideDialogRequest(r){switch(r.method){case nt.ACK:break;case nt.BYE:this.replyStateless(r,{statusCode:481});break;case nt.CANCEL:throw new Error(`Unexpected out of dialog request method ${r.method}.`);case nt.INFO:this.replyStateless(r,{statusCode:405});break;case nt.INVITE:{const i=new $x(this,r);this.delegate.onInvite?this.delegate.onInvite(i):i.reject()}break;case nt.MESSAGE:{const i=new Z2(this,r);this.delegate.onMessage?this.delegate.onMessage(i):i.accept()}break;case nt.NOTIFY:{const i=new Tv(this,r);this.delegate.onNotify?this.delegate.onNotify(i):i.reject({statusCode:405})}break;case nt.OPTIONS:{const i="Allow: "+mu.toString(),l="Accept: "+tw.toString();this.replyStateless(r,{statusCode:200,extraHeaders:[i,l]})}break;case nt.REFER:{const i=new J2(this,r);this.delegate.onRefer?this.delegate.onRefer(i):i.reject({statusCode:405})}break;case nt.REGISTER:{const i=new v8(this,r);this.delegate.onRegister?this.delegate.onRegister(i):i.reject({statusCode:405})}break;case nt.SUBSCRIBE:{const i=new y8(this,r);this.delegate.onSubscribe?this.delegate.onSubscribe(i):i.reject({statusCode:480})}break;default:throw new Error(`Unexpected out of dialog request method ${r.method}.`)}}receiveResponseFromTransport(r){if(r.getHeaders("via").length>1){this.logger.warn("More than one Via header field present in the response, dropping");return}const i=r.viaBranch+r.method,l=this.userAgentClients.get(i);l?l.transaction.receiveResponse(r):this.logger.warn(`Discarding unmatched ${r.statusCode} response to ${r.method} ${i}.`)}}function E8(){return o=>!o.audio&&!o.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,o)}function S8(){return{bundlePolicy:"balanced",certificates:void 0,iceCandidatePoolSize:0,iceServers:[{urls:"stun:stun.l.google.com:19302"}],iceTransportPolicy:"all",rtcpMuxPolicy:"require"}}class hl{constructor(r,i,l){r.debug("SessionDescriptionHandler.constructor"),this.logger=r,this.mediaStreamFactory=i,this.sessionDescriptionHandlerConfiguration=l,this._localMediaStream=new MediaStream,this._remoteMediaStream=new MediaStream,this._peerConnection=new RTCPeerConnection(l==null?void 0:l.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(r){this._peerConnectionDelegate=r}static dispatchAddTrackEvent(r,i){r.dispatchEvent(new MediaStreamTrackEvent("addtrack",{track:i}))}static dispatchRemoveTrackEvent(r,i){r.dispatchEvent(new MediaStreamTrackEvent("removetrack",{track:i}))}close(){this.logger.debug("SessionDescriptionHandler.close"),this._peerConnection!==void 0&&(this._peerConnection.getReceivers().forEach(r=>{r.track&&r.track.stop()}),this._peerConnection.getSenders().forEach(r=>{r.track&&r.track.stop()}),this._dataChannel&&this._dataChannel.close(),this._peerConnection.close(),this._peerConnection=void 0)}enableReceiverTracks(r){const i=this.peerConnection;if(!i)throw new Error("Peer connection closed.");i.getReceivers().forEach(l=>{l.track&&(l.track.enabled=r)})}enableSenderTracks(r){const i=this.peerConnection;if(!i)throw new Error("Peer connection closed.");i.getSenders().forEach(l=>{l.track&&(l.track.enabled=r)})}getDescription(r,i){var l,f;if(this.logger.debug("SessionDescriptionHandler.getDescription"),this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));this.onDataChannel=r==null?void 0:r.onDataChannel;const p=(l=r==null?void 0:r.offerOptions)===null||l===void 0?void 0:l.iceRestart,v=(r==null?void 0:r.iceGatheringTimeout)===void 0?(f=this.sessionDescriptionHandlerConfiguration)===null||f===void 0?void 0:f.iceGatheringTimeout:r==null?void 0:r.iceGatheringTimeout;return this.getLocalMediaStream(r).then(()=>this.updateDirection(r)).then(()=>this.createDataChannel(r)).then(()=>this.createLocalOfferOrAnswer(r)).then(C=>this.applyModifiers(C,i)).then(C=>this.setLocalSessionDescription(C)).then(()=>this.waitForIceGatheringComplete(p,v)).then(()=>this.getLocalSessionDescription()).then(C=>({body:C.sdp,contentType:"application/sdp"})).catch(C=>{throw this.logger.error("SessionDescriptionHandler.getDescription failed - "+C),C})}hasDescription(r){return this.logger.debug("SessionDescriptionHandler.hasDescription"),r==="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(r,i){if(this.logger.debug("SessionDescriptionHandler.sendDtmf"),this._peerConnection===void 0)return this.logger.error("SessionDescriptionHandler.sendDtmf failed - peer connection closed"),!1;const l=this._peerConnection.getSenders();if(l.length===0)return this.logger.error("SessionDescriptionHandler.sendDtmf failed - no senders"),!1;const f=l[0].dtmf;if(!f)return this.logger.error("SessionDescriptionHandler.sendDtmf failed - no DTMF sender"),!1;const p=i==null?void 0:i.duration,v=i==null?void 0:i.interToneGap;try{f.insertDTMF(r,p,v)}catch(C){return this.logger.error(C.toString()),!1}return this.logger.log("SessionDescriptionHandler.sendDtmf sent via RTP: "+r.toString()),!0}setDescription(r,i,l){if(this.logger.debug("SessionDescriptionHandler.setDescription"),this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));this.onDataChannel=i==null?void 0:i.onDataChannel;const f=this._peerConnection.signalingState==="have-local-offer"?"answer":"offer";return this.getLocalMediaStream(i).then(()=>this.applyModifiers({sdp:r,type:f},l)).then(p=>this.setRemoteSessionDescription(p)).catch(p=>{throw this.logger.error("SessionDescriptionHandler.setDescription failed - "+p),p})}applyModifiers(r,i){return this.logger.debug("SessionDescriptionHandler.applyModifiers"),!i||i.length===0?Promise.resolve(r):i.reduce((l,f)=>l.then(f),Promise.resolve(r)).then(l=>{if(this.logger.debug("SessionDescriptionHandler.applyModifiers - modified sdp"),!l.sdp||!l.type)throw new Error("Invalid SDP.");return{sdp:l.sdp,type:l.type}})}createDataChannel(r){if(this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));if((r==null?void 0:r.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((r==null?void 0:r.dataChannelLabel)||"",r==null?void 0:r.dataChannelOptions),this.onDataChannel&&this.onDataChannel(this._dataChannel),Promise.resolve()}catch(i){return Promise.reject(i)}case"have-remote-offer":return Promise.resolve();case"have-local-offer":case"have-local-pranswer":case"have-remote-pranswer":case"closed":default:return Promise.reject(new Error("Invalid signaling state "+this._peerConnection.signalingState))}}createLocalOfferOrAnswer(r){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(r==null?void 0:r.offerOptions);case"have-remote-offer":return this.logger.debug("SessionDescriptionHandler.createLocalOfferOrAnswer - creating SDP answer"),this._peerConnection.createAnswer(r==null?void 0:r.answerOptions);case"have-local-offer":case"have-local-pranswer":case"have-remote-pranswer":case"closed":default:return Promise.reject(new Error("Invalid signaling state "+this._peerConnection.signalingState))}}getLocalMediaStream(r){if(this.logger.debug("SessionDescriptionHandler.getLocalMediaStream"),this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));let i=Object.assign({},r==null?void 0:r.constraints);if(this.localMediaStreamConstraints){if(i.audio=i.audio||this.localMediaStreamConstraints.audio,i.video=i.video||this.localMediaStreamConstraints.video,JSON.stringify(this.localMediaStreamConstraints.audio)===JSON.stringify(i.audio)&&JSON.stringify(this.localMediaStreamConstraints.video)===JSON.stringify(i.video))return Promise.resolve()}else i.audio===void 0&&i.video===void 0&&(i={audio:!0});return this.localMediaStreamConstraints=i,this.mediaStreamFactory(i,this,r).then(l=>this.setLocalMediaStream(l))}setLocalMediaStream(r){if(this.logger.debug("SessionDescriptionHandler.setLocalMediaStream"),!this._peerConnection)throw new Error("Peer connection undefined.");const i=this._peerConnection,l=this._localMediaStream,f=[],p=w=>{const S=w.kind;if(S!=="audio"&&S!=="video")throw new Error(`Unknown new track kind ${S}.`);const b=i.getSenders().find(T=>T.track&&T.track.kind===S);b?f.push(new Promise(T=>{this.logger.debug(`SessionDescriptionHandler.setLocalMediaStream - replacing sender ${S} track`),T()}).then(()=>b.replaceTrack(w).then(()=>{const T=l.getTracks().find(A=>A.kind===S);T&&(T.stop(),l.removeTrack(T),hl.dispatchRemoveTrackEvent(l,T)),l.addTrack(w),hl.dispatchAddTrackEvent(l,w)}).catch(T=>{throw this.logger.error(`SessionDescriptionHandler.setLocalMediaStream - failed to replace sender ${S} track`),T}))):f.push(new Promise(T=>{this.logger.debug(`SessionDescriptionHandler.setLocalMediaStream - adding sender ${S} track`),T()}).then(()=>{try{i.addTrack(w,l)}catch(T){throw this.logger.error(`SessionDescriptionHandler.setLocalMediaStream - failed to add sender ${S} track`),T}l.addTrack(w),hl.dispatchAddTrackEvent(l,w)}))},v=r.getAudioTracks();v.length&&p(v[0]);const C=r.getVideoTracks();return C.length&&p(C[0]),f.reduce((w,S)=>w.then(()=>S),Promise.resolve())}getLocalSessionDescription(){if(this.logger.debug("SessionDescriptionHandler.getLocalSessionDescription"),this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));const r=this._peerConnection.localDescription;return r?Promise.resolve(r):Promise.reject(new Error("Failed to get local session description"))}setLocalSessionDescription(r){return this.logger.debug("SessionDescriptionHandler.setLocalSessionDescription"),this._peerConnection===void 0?Promise.reject(new Error("Peer connection closed.")):this._peerConnection.setLocalDescription(r)}setRemoteSessionDescription(r){if(this.logger.debug("SessionDescriptionHandler.setRemoteSessionDescription"),this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));const i=r.sdp;let l;switch(this._peerConnection.signalingState){case"stable":l="offer";break;case"have-local-offer":l="answer";break;case"have-local-pranswer":case"have-remote-offer":case"have-remote-pranswer":case"closed":default:return Promise.reject(new Error("Invalid signaling state "+this._peerConnection.signalingState))}return i?this._peerConnection.setRemoteDescription({sdp:i,type:l}):(this.logger.error("SessionDescriptionHandler.setRemoteSessionDescription failed - cannot set null sdp"),Promise.reject(new Error("SDP is undefined")))}setRemoteTrack(r){this.logger.debug("SessionDescriptionHandler.setRemoteTrack");const i=this._remoteMediaStream;i.getTrackById(r.id)?this.logger.debug(`SessionDescriptionHandler.setRemoteTrack - have remote ${r.kind} track`):r.kind==="audio"?(this.logger.debug(`SessionDescriptionHandler.setRemoteTrack - adding remote ${r.kind} track`),i.getAudioTracks().forEach(l=>{l.stop(),i.removeTrack(l),hl.dispatchRemoveTrackEvent(i,l)}),i.addTrack(r),hl.dispatchAddTrackEvent(i,r)):r.kind==="video"&&(this.logger.debug(`SessionDescriptionHandler.setRemoteTrack - adding remote ${r.kind} track`),i.getVideoTracks().forEach(l=>{l.stop(),i.removeTrack(l),hl.dispatchRemoveTrackEvent(i,l)}),i.addTrack(r),hl.dispatchAddTrackEvent(i,r))}updateDirection(r){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 i=l=>{switch(l){case"inactive":return r!=null&&r.hold?"inactive":"recvonly";case"recvonly":return r!=null&&r.hold?"inactive":"recvonly";case"sendonly":return r!=null&&r.hold?"sendonly":"sendrecv";case"sendrecv":return r!=null&&r.hold?"sendonly":"sendrecv";case"stopped":return"stopped";default:throw new Error("Should never happen")}};this._peerConnection.getTransceivers().forEach(l=>{if(l.direction){const f=i(l.direction);l.direction!==f&&(l.direction=f)}})}break;case"have-remote-offer":this.logger.debug("SessionDescriptionHandler.updateDirection - setting answer direction");{const i=(()=>{const f=this._peerConnection.remoteDescription;if(!f)throw new Error("Failed to read remote offer");const p=/a=sendrecv\r\n|a=sendonly\r\n|a=recvonly\r\n|a=inactive\r\n/.exec(f.sdp);if(p)switch(p[0]){case`a=inactive\r
389
- `:return"inactive";case`a=recvonly\r
390
- `:return"recvonly";case`a=sendonly\r
391
- `:return"sendonly";case`a=sendrecv\r
392
- `:return"sendrecv";default:throw new Error("Should never happen")}return"sendrecv"})(),l=(()=>{switch(i){case"inactive":return"inactive";case"recvonly":return"sendonly";case"sendonly":return r!=null&&r.hold?"inactive":"recvonly";case"sendrecv":return r!=null&&r.hold?"sendonly":"sendrecv";default:throw new Error("Should never happen")}})();this._peerConnection.getTransceivers().forEach(f=>{f.direction&&f.direction!=="stopped"&&f.direction!==l&&(f.direction=l)})}break;case"have-local-offer":case"have-local-pranswer":case"have-remote-pranswer":case"closed":default:return Promise.reject(new Error("Invalid signaling state "+this._peerConnection.signalingState))}return Promise.resolve()}waitForIceGatheringComplete(r=!1,i=0){return this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete"),this._peerConnection===void 0?Promise.reject("Peer connection closed."):!r&&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((l,f)=>{this.iceGatheringCompleteResolve=l,this.iceGatheringCompleteReject=f,i>0&&(this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete - timeout in "+i),this.iceGatheringCompleteTimeoutId=setTimeout(()=>{this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete - timeout"),this.iceGatheringComplete()},i))}),this.iceGatheringCompletePromise)}initPeerConnectionEventHandlers(){if(this.logger.debug("SessionDescriptionHandler.initPeerConnectionEventHandlers"),!this._peerConnection)throw new Error("Peer connection undefined.");const r=this._peerConnection;r.onconnectionstatechange=i=>{var l;const f=r.connectionState;this.logger.debug(`SessionDescriptionHandler.onconnectionstatechange ${f}`),!((l=this._peerConnectionDelegate)===null||l===void 0)&&l.onconnectionstatechange&&this._peerConnectionDelegate.onconnectionstatechange(i)},r.ondatachannel=i=>{var l;this.logger.debug("SessionDescriptionHandler.ondatachannel"),this._dataChannel=i.channel,this.onDataChannel&&this.onDataChannel(this._dataChannel),!((l=this._peerConnectionDelegate)===null||l===void 0)&&l.ondatachannel&&this._peerConnectionDelegate.ondatachannel(i)},r.onicecandidate=i=>{var l;this.logger.debug("SessionDescriptionHandler.onicecandidate"),!((l=this._peerConnectionDelegate)===null||l===void 0)&&l.onicecandidate&&this._peerConnectionDelegate.onicecandidate(i)},r.onicecandidateerror=i=>{var l;this.logger.debug("SessionDescriptionHandler.onicecandidateerror"),!((l=this._peerConnectionDelegate)===null||l===void 0)&&l.onicecandidateerror&&this._peerConnectionDelegate.onicecandidateerror(i)},r.oniceconnectionstatechange=i=>{var l;const f=r.iceConnectionState;this.logger.debug(`SessionDescriptionHandler.oniceconnectionstatechange ${f}`),!((l=this._peerConnectionDelegate)===null||l===void 0)&&l.oniceconnectionstatechange&&this._peerConnectionDelegate.oniceconnectionstatechange(i)},r.onicegatheringstatechange=i=>{var l;const f=r.iceGatheringState;this.logger.debug(`SessionDescriptionHandler.onicegatheringstatechange ${f}`),f==="complete"&&this.iceGatheringComplete(),!((l=this._peerConnectionDelegate)===null||l===void 0)&&l.onicegatheringstatechange&&this._peerConnectionDelegate.onicegatheringstatechange(i)},r.onnegotiationneeded=i=>{var l;this.logger.debug("SessionDescriptionHandler.onnegotiationneeded"),!((l=this._peerConnectionDelegate)===null||l===void 0)&&l.onnegotiationneeded&&this._peerConnectionDelegate.onnegotiationneeded(i)},r.onsignalingstatechange=i=>{var l;const f=r.signalingState;this.logger.debug(`SessionDescriptionHandler.onsignalingstatechange ${f}`),!((l=this._peerConnectionDelegate)===null||l===void 0)&&l.onsignalingstatechange&&this._peerConnectionDelegate.onsignalingstatechange(i)},r.ontrack=i=>{var l;const f=i.track.kind,p=i.track.enabled?"enabled":"disabled";this.logger.debug(`SessionDescriptionHandler.ontrack ${f} ${p}`),this.setRemoteTrack(i.track),!((l=this._peerConnectionDelegate)===null||l===void 0)&&l.ontrack&&this._peerConnectionDelegate.ontrack(i)}}}function C8(o){return(r,i)=>{o===void 0&&(o=E8());const f={iceGatheringTimeout:(i==null?void 0:i.iceGatheringTimeout)!==void 0?i==null?void 0:i.iceGatheringTimeout:5e3,peerConnectionConfiguration:Object.assign(Object.assign({},S8()),i==null?void 0:i.peerConnectionConfiguration)},p=r.userAgent.getLogger("sip.SessionDescriptionHandler");return new hl(p,o,f)}}class Av{constructor(r,i){if(this._state=At.Disconnected,this.transitioningState=!1,this._stateEventEmitter=new Jh,this.logger=r,i){const p=i,v=p==null?void 0:p.wsServers,C=p==null?void 0:p.maxReconnectionAttempts;v!==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.'),C!==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.'),v&&!i.server&&(typeof v=="string"&&(i.server=v),v instanceof Array&&(i.server=v[0]))}this.configuration=Object.assign(Object.assign({},Av.defaultOptions),i);const l=this.configuration.server,f=qn.parse(l,"absoluteURI");if(f===-1)throw this.logger.error(`Invalid WebSocket Server URL "${l}"`),new Error("Invalid WebSocket Server URL");if(!["wss","ws","udp"].includes(f.scheme))throw this.logger.error(`Invalid scheme in WebSocket Server URL "${l}"`),new Error("Invalid scheme in WebSocket Server URL");this._protocol=f.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===At.Connected}send(r){return this._send(r)}_connect(){switch(this.logger.log(`Connecting ${this.server}`),this.state){case At.Connecting:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(At.Connecting));if(!this.connectPromise)throw new Error("Connect promise must be defined.");return this.connectPromise;case At.Connected:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(At.Connecting));if(this.connectPromise)throw new Error("Connect promise must not be defined.");return Promise.resolve();case At.Disconnecting:if(this.connectPromise)throw new Error("Connect promise must not be defined.");try{this.transitionState(At.Connecting)}catch(i){if(i instanceof Zh)return Promise.reject(i);throw i}break;case At.Disconnected:if(this.connectPromise)throw new Error("Connect promise must not be defined.");try{this.transitionState(At.Connecting)}catch(i){if(i instanceof Zh)return Promise.reject(i);throw i}break;default:throw new Error("Unknown state")}let r;try{r=new WebSocket(this.server,"sip"),r.binaryType="arraybuffer",r.addEventListener("close",i=>this.onWebSocketClose(i,r)),r.addEventListener("error",i=>this.onWebSocketError(i,r)),r.addEventListener("open",i=>this.onWebSocketOpen(i,r)),r.addEventListener("message",i=>this.onWebSocketMessage(i,r)),this._ws=r}catch(i){return this._ws=void 0,this.logger.error("WebSocket construction failed."),this.logger.error(i.toString()),new Promise((l,f)=>{this.connectResolve=l,this.connectReject=f,this.transitionState(At.Disconnected,i)})}return this.connectPromise=new Promise((i,l)=>{this.connectResolve=i,this.connectReject=l,this.connectTimeout=setTimeout(()=>{this.logger.warn("Connect timed out. Exceeded time set in configuration.connectionTimeout: "+this.configuration.connectionTimeout+"s."),r.close(1e3)},this.configuration.connectionTimeout*1e3)}),this.connectPromise}_disconnect(){switch(this.logger.log(`Disconnecting ${this.server}`),this.state){case At.Connecting:if(this.disconnectPromise)throw new Error("Disconnect promise must not be defined.");try{this.transitionState(At.Disconnecting)}catch(i){if(i instanceof Zh)return Promise.reject(i);throw i}break;case At.Connected:if(this.disconnectPromise)throw new Error("Disconnect promise must not be defined.");try{this.transitionState(At.Disconnecting)}catch(i){if(i instanceof Zh)return Promise.reject(i);throw i}break;case At.Disconnecting:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(At.Disconnecting));if(!this.disconnectPromise)throw new Error("Disconnect promise must be defined.");return this.disconnectPromise;case At.Disconnected:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(At.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 r=this._ws;return this.disconnectPromise=new Promise((i,l)=>{this.disconnectResolve=i,this.disconnectReject=l;try{r.close(1e3)}catch(f){throw this.logger.error("WebSocket close failed."),this.logger.error(f.toString()),f}}),this.disconnectPromise}_send(r){if(this.configuration.traceSip===!0&&this.logger.log(`Sending WebSocket message:
393
-
394
- `+r+`
395
- `),this._state!==At.Connected)return Promise.reject(new Error("Not connected."));if(!this._ws)throw new Error("WebSocket undefined.");try{this._ws.send(r)}catch(i){return i instanceof Error?Promise.reject(i):Promise.reject(new Error("WebSocket send failed."))}return Promise.resolve()}onWebSocketClose(r,i){if(i!==this._ws)return;const l=`WebSocket closed ${this.server} (code: ${r.code})`,f=this.disconnectPromise?void 0:new Error(l);f&&this.logger.warn("WebSocket closed unexpectedly"),this.logger.log(l),this._ws=void 0,this.transitionState(At.Disconnected,f)}onWebSocketError(r,i){i===this._ws&&this.logger.error("WebSocket error occurred.")}onWebSocketMessage(r,i){if(i!==this._ws)return;const l=r.data;let f;if(/^(\r\n)+$/.test(l)){this.clearKeepAliveTimeout(),this.configuration.traceSip===!0&&this.logger.log("Received WebSocket message with CRLF Keep Alive response");return}if(!l){this.logger.warn("Received empty message, discarding...");return}if(typeof l!="string"){try{f=new TextDecoder().decode(new Uint8Array(l))}catch(p){this.logger.error(p.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:
396
-
397
- `+f+`
398
- `)}else f=l,this.configuration.traceSip===!0&&this.logger.log(`Received WebSocket text message:
43
+ `,this.transport.send(c)}}class va extends Sn{constructor(){super(),this.headers={},this.status_code=null,this.reason_phrase=null}}var ke={OutgoingRequest:ss,InitialOutgoingInviteRequest:Ws,IncomingRequest:Aa,IncomingResponse:va};const Ra=pe,je=Ce(),Me=new Ra("DigestAuthentication");var Ia=class{constructor(n){this._credentials=n,this._cnonce=null,this._nc=0,this._ncHex="00000000",this._algorithm=null,this._realm=null,this._nonce=null,this._opaque=null,this._stale=null,this._qop=null,this._method=null,this._uri=null,this._ha1=null,this._response=null}get(n){switch(n){case"realm":return this._realm;case"ha1":return this._ha1;default:{Me.warn('get() | cannot get "%s" parameter',n);return}}}authenticate({method:n,ruri:s,body:o},c,t=null){if(this._algorithm=c.algorithm,this._realm=c.realm,this._nonce=c.nonce,this._opaque=c.opaque,this._stale=c.stale,this._algorithm){if(this._algorithm!=="MD5")return Me.warn('authenticate() | challenge with Digest algorithm different than "MD5", authentication aborted'),!1}else this._algorithm="MD5";if(!this._nonce)return Me.warn("authenticate() | challenge without Digest nonce, authentication aborted"),!1;if(!this._realm)return Me.warn("authenticate() | challenge without Digest realm, authentication aborted"),!1;if(!this._credentials.password){if(!this._credentials.ha1)return Me.warn("authenticate() | no plain SIP password nor ha1 provided, authentication aborted"),!1;if(this._credentials.realm!==this._realm)return Me.warn('authenticate() | no plain SIP password, and stored `realm` does not match the given `realm`, cannot authenticate [stored:"%s", given:"%s"]',this._credentials.realm,this._realm),!1}if(c.qop)if(c.qop.indexOf("auth-int")>-1)this._qop="auth-int";else if(c.qop.indexOf("auth")>-1)this._qop="auth";else return Me.warn('authenticate() | challenge without Digest qop different than "auth" or "auth-int", authentication aborted'),!1;else this._qop=null;this._method=n,this._uri=s,this._cnonce=t||je.createRandomToken(12),this._nc+=1;const d=Number(this._nc).toString(16);this._ncHex="00000000".substr(0,8-d.length)+d,this._nc===4294967296&&(this._nc=1,this._ncHex="00000001"),this._credentials.password?this._ha1=je.calculateMD5(`${this._credentials.username}:${this._realm}:${this._credentials.password}`):this._ha1=this._credentials.ha1;let p,a;return this._qop==="auth"?(p=`${this._method}:${this._uri}`,a=je.calculateMD5(p),Me.debug('authenticate() | using qop=auth [a2:"%s"]',p),this._response=je.calculateMD5(`${this._ha1}:${this._nonce}:${this._ncHex}:${this._cnonce}:auth:${a}`)):this._qop==="auth-int"?(p=`${this._method}:${this._uri}:${je.calculateMD5(o||"")}`,a=je.calculateMD5(p),Me.debug('authenticate() | using qop=auth-int [a2:"%s"]',p),this._response=je.calculateMD5(`${this._ha1}:${this._nonce}:${this._ncHex}:${this._cnonce}:auth-int:${a}`)):this._qop===null&&(p=`${this._method}:${this._uri}`,a=je.calculateMD5(p),Me.debug('authenticate() | using qop=null [a2:"%s"]',p),this._response=je.calculateMD5(`${this._ha1}:${this._nonce}:${a}`)),Me.debug("authenticate() | response generated"),!0}toString(){const n=[];if(!this._response)throw new Error("response field does not exist, cannot generate Authorization header");return n.push(`algorithm=${this._algorithm}`),n.push(`username="${this._credentials.username}"`),n.push(`realm="${this._realm}"`),n.push(`nonce="${this._nonce}"`),n.push(`uri="${this._uri}"`),n.push(`response="${this._response}"`),this._opaque&&n.push(`opaque="${this._opaque}"`),this._qop&&(n.push(`qop=${this._qop}`),n.push(`cnonce="${this._cnonce}"`),n.push(`nc=${this._ncHex}`)),`Digest ${n.join(", ")}`}};const Ye=500;var Cn={T1:Ye,T2:4e3,TIMER_B:64*Ye,TIMER_D:0*Ye,TIMER_F:64*Ye,TIMER_H:64*Ye,TIMER_I:0*Ye,TIMER_J:0*Ye,TIMER_K:0*5e3,TIMER_L:64*Ye,TIMER_M:64*Ye,PROVISIONAL_RESPONSE_INTERVAL:6e4};const Ot=Fe.EventEmitter,xt=pe,Dt=oe,An=ke,qe=Cn,vn=new xt("NonInviteClientTransaction"),rs=new xt("InviteClientTransaction"),ba=new xt("AckClientTransaction"),Rn=new xt("NonInviteServerTransaction"),ns=new xt("InviteServerTransaction"),D={STATUS_TRYING:1,STATUS_PROCEEDING:2,STATUS_CALLING:3,STATUS_ACCEPTED:4,STATUS_COMPLETED:5,STATUS_TERMINATED:6,STATUS_CONFIRMED:7,NON_INVITE_CLIENT:"nict",NON_INVITE_SERVER:"nist",INVITE_CLIENT:"ict",INVITE_SERVER:"ist"};class wa extends Ot{constructor(n,s,o,c){super(),this.type=D.NON_INVITE_CLIENT,this.id=`z9hG4bK${Math.floor(Math.random()*1e7)}`,this.ua=n,this.transport=s,this.request=o,this.eventHandlers=c;let t=`SIP/2.0/${s.via_transport}`;t+=` ${n.configuration.via_host};branch=${this.id}`,this.request.setHeader("via",t),this.ua.newTransaction(this)}get C(){return D}stateChanged(n){this.state=n,this.emit("stateChanged")}send(){this.stateChanged(D.STATUS_TRYING),this.F=setTimeout(()=>{this.timer_F()},qe.TIMER_F),this.transport.send(this.request)||this.onTransportError()}onTransportError(){vn.debug(`transport error occurred, deleting transaction ${this.id}`),clearTimeout(this.F),clearTimeout(this.K),this.stateChanged(D.STATUS_TERMINATED),this.ua.destroyTransaction(this),this.eventHandlers.onTransportError()}timer_F(){vn.debug(`Timer F expired for transaction ${this.id}`),this.stateChanged(D.STATUS_TERMINATED),this.ua.destroyTransaction(this),this.eventHandlers.onRequestTimeout()}timer_K(){this.stateChanged(D.STATUS_TERMINATED),this.ua.destroyTransaction(this)}receiveResponse(n){const s=n.status_code;if(s<200)switch(this.state){case D.STATUS_TRYING:case D.STATUS_PROCEEDING:{this.stateChanged(D.STATUS_PROCEEDING),this.eventHandlers.onReceiveResponse(n);break}}else switch(this.state){case D.STATUS_TRYING:case D.STATUS_PROCEEDING:{this.stateChanged(D.STATUS_COMPLETED),clearTimeout(this.F),s===408?this.eventHandlers.onRequestTimeout():this.eventHandlers.onReceiveResponse(n),this.K=setTimeout(()=>{this.timer_K()},qe.TIMER_K);break}case D.STATUS_COMPLETED:break}}}class ya extends Ot{constructor(n,s,o,c){super(),this.type=D.INVITE_CLIENT,this.id=`z9hG4bK${Math.floor(Math.random()*1e7)}`,this.ua=n,this.transport=s,this.request=o,this.eventHandlers=c,o.transaction=this;let t=`SIP/2.0/${s.via_transport}`;t+=` ${n.configuration.via_host};branch=${this.id}`,this.request.setHeader("via",t),this.ua.newTransaction(this)}get C(){return D}stateChanged(n){this.state=n,this.emit("stateChanged")}send(){this.stateChanged(D.STATUS_CALLING),this.B=setTimeout(()=>{this.timer_B()},qe.TIMER_B),this.transport.send(this.request)||this.onTransportError()}onTransportError(){clearTimeout(this.B),clearTimeout(this.D),clearTimeout(this.M),this.state!==D.STATUS_ACCEPTED&&(rs.debug(`transport error occurred, deleting transaction ${this.id}`),this.eventHandlers.onTransportError()),this.stateChanged(D.STATUS_TERMINATED),this.ua.destroyTransaction(this)}timer_M(){rs.debug(`Timer M expired for transaction ${this.id}`),this.state===D.STATUS_ACCEPTED&&(clearTimeout(this.B),this.stateChanged(D.STATUS_TERMINATED),this.ua.destroyTransaction(this))}timer_B(){rs.debug(`Timer B expired for transaction ${this.id}`),this.state===D.STATUS_CALLING&&(this.stateChanged(D.STATUS_TERMINATED),this.ua.destroyTransaction(this),this.eventHandlers.onRequestTimeout())}timer_D(){rs.debug(`Timer D expired for transaction ${this.id}`),clearTimeout(this.B),this.stateChanged(D.STATUS_TERMINATED),this.ua.destroyTransaction(this)}sendACK(n){const s=new An.OutgoingRequest(Dt.ACK,this.request.ruri,this.ua,{route_set:this.request.getHeaders("route"),call_id:this.request.getHeader("call-id"),cseq:this.request.cseq});s.setHeader("from",this.request.getHeader("from")),s.setHeader("via",this.request.getHeader("via")),s.setHeader("to",n.getHeader("to")),this.D=setTimeout(()=>{this.timer_D()},qe.TIMER_D),this.transport.send(s)}cancel(n){if(this.state!==D.STATUS_PROCEEDING)return;const s=new An.OutgoingRequest(Dt.CANCEL,this.request.ruri,this.ua,{route_set:this.request.getHeaders("route"),call_id:this.request.getHeader("call-id"),cseq:this.request.cseq});s.setHeader("from",this.request.getHeader("from")),s.setHeader("via",this.request.getHeader("via")),s.setHeader("to",this.request.getHeader("to")),n&&s.setHeader("reason",n),this.transport.send(s)}receiveResponse(n){const s=n.status_code;if(s>=100&&s<=199)switch(this.state){case D.STATUS_CALLING:{this.stateChanged(D.STATUS_PROCEEDING),this.eventHandlers.onReceiveResponse(n);break}case D.STATUS_PROCEEDING:{this.eventHandlers.onReceiveResponse(n);break}}else if(s>=200&&s<=299)switch(this.state){case D.STATUS_CALLING:case D.STATUS_PROCEEDING:{this.stateChanged(D.STATUS_ACCEPTED),this.M=setTimeout(()=>{this.timer_M()},qe.TIMER_M),this.eventHandlers.onReceiveResponse(n);break}case D.STATUS_ACCEPTED:{this.eventHandlers.onReceiveResponse(n);break}}else if(s>=300&&s<=699)switch(this.state){case D.STATUS_CALLING:case D.STATUS_PROCEEDING:{this.stateChanged(D.STATUS_COMPLETED),this.sendACK(n),this.eventHandlers.onReceiveResponse(n);break}case D.STATUS_COMPLETED:{this.sendACK(n);break}}}}class Na extends Ot{constructor(n,s,o,c){super(),this.id=`z9hG4bK${Math.floor(Math.random()*1e7)}`,this.transport=s,this.request=o,this.eventHandlers=c;let t=`SIP/2.0/${s.via_transport}`;t+=` ${n.configuration.via_host};branch=${this.id}`,this.request.setHeader("via",t)}get C(){return D}send(){this.transport.send(this.request)||this.onTransportError()}onTransportError(){ba.debug(`transport error occurred for transaction ${this.id}`),this.eventHandlers.onTransportError()}}class Oa extends Ot{constructor(n,s,o){super(),this.type=D.NON_INVITE_SERVER,this.id=o.via_branch,this.ua=n,this.transport=s,this.request=o,this.last_response="",o.server_transaction=this,this.state=D.STATUS_TRYING,n.newTransaction(this)}get C(){return D}stateChanged(n){this.state=n,this.emit("stateChanged")}timer_J(){Rn.debug(`Timer J expired for transaction ${this.id}`),this.stateChanged(D.STATUS_TERMINATED),this.ua.destroyTransaction(this)}onTransportError(){this.transportError||(this.transportError=!0,Rn.debug(`transport error occurred, deleting transaction ${this.id}`),clearTimeout(this.J),this.stateChanged(D.STATUS_TERMINATED),this.ua.destroyTransaction(this))}receiveResponse(n,s,o,c){if(n===100)switch(this.state){case D.STATUS_TRYING:{this.stateChanged(D.STATUS_PROCEEDING),this.transport.send(s)||this.onTransportError();break}case D.STATUS_PROCEEDING:{this.last_response=s,this.transport.send(s)?o&&o():(this.onTransportError(),c&&c());break}}else if(n>=200&&n<=699)switch(this.state){case D.STATUS_TRYING:case D.STATUS_PROCEEDING:{this.stateChanged(D.STATUS_COMPLETED),this.last_response=s,this.J=setTimeout(()=>{this.timer_J()},qe.TIMER_J),this.transport.send(s)?o&&o():(this.onTransportError(),c&&c());break}case D.STATUS_COMPLETED:break}}}class xa extends Ot{constructor(n,s,o){super(),this.type=D.INVITE_SERVER,this.id=o.via_branch,this.ua=n,this.transport=s,this.request=o,this.last_response="",o.server_transaction=this,this.state=D.STATUS_PROCEEDING,n.newTransaction(this),this.resendProvisionalTimer=null,o.reply(100)}get C(){return D}stateChanged(n){this.state=n,this.emit("stateChanged")}timer_H(){ns.debug(`Timer H expired for transaction ${this.id}`),this.state===D.STATUS_COMPLETED&&ns.debug("ACK not received, dialog will be terminated"),this.stateChanged(D.STATUS_TERMINATED),this.ua.destroyTransaction(this)}timer_I(){this.stateChanged(D.STATUS_TERMINATED),this.ua.destroyTransaction(this)}timer_L(){ns.debug(`Timer L expired for transaction ${this.id}`),this.state===D.STATUS_ACCEPTED&&(this.stateChanged(D.STATUS_TERMINATED),this.ua.destroyTransaction(this))}onTransportError(){this.transportError||(this.transportError=!0,ns.debug(`transport error occurred, deleting transaction ${this.id}`),this.resendProvisionalTimer!==null&&(clearInterval(this.resendProvisionalTimer),this.resendProvisionalTimer=null),clearTimeout(this.L),clearTimeout(this.H),clearTimeout(this.I),this.stateChanged(D.STATUS_TERMINATED),this.ua.destroyTransaction(this))}resend_provisional(){this.transport.send(this.last_response)||this.onTransportError()}receiveResponse(n,s,o,c){if(n>=100&&n<=199)switch(this.state){case D.STATUS_PROCEEDING:{this.transport.send(s)||this.onTransportError(),this.last_response=s;break}}if(n>100&&n<=199&&this.state===D.STATUS_PROCEEDING)this.resendProvisionalTimer===null&&(this.resendProvisionalTimer=setInterval(()=>{this.resend_provisional()},qe.PROVISIONAL_RESPONSE_INTERVAL));else if(n>=200&&n<=299)switch(this.state){case D.STATUS_PROCEEDING:this.stateChanged(D.STATUS_ACCEPTED),this.last_response=s,this.L=setTimeout(()=>{this.timer_L()},qe.TIMER_L),this.resendProvisionalTimer!==null&&(clearInterval(this.resendProvisionalTimer),this.resendProvisionalTimer=null);case D.STATUS_ACCEPTED:{this.transport.send(s)?o&&o():(this.onTransportError(),c&&c());break}}else if(n>=300&&n<=699)switch(this.state){case D.STATUS_PROCEEDING:{this.resendProvisionalTimer!==null&&(clearInterval(this.resendProvisionalTimer),this.resendProvisionalTimer=null),this.transport.send(s)?(this.stateChanged(D.STATUS_COMPLETED),this.H=setTimeout(()=>{this.timer_H()},qe.TIMER_H),o&&o()):(this.onTransportError(),c&&c());break}}}}function Da({_transactions:f},n){let s;switch(n.method){case Dt.INVITE:{if(s=f.ist[n.via_branch],s){switch(s.state){case D.STATUS_PROCEEDING:{s.transport.send(s.last_response);break}case D.STATUS_ACCEPTED:break}return!0}break}case Dt.ACK:{if(s=f.ist[n.via_branch],s){if(s.state===D.STATUS_ACCEPTED)return!1;if(s.state===D.STATUS_COMPLETED)return s.state=D.STATUS_CONFIRMED,s.I=setTimeout(()=>{s.timer_I()},qe.TIMER_I),!0}else return!1;break}case Dt.CANCEL:return s=f.ist[n.via_branch],s?(n.reply_sl(200),s.state!==D.STATUS_PROCEEDING):(n.reply_sl(481),!0);default:{if(s=f.nist[n.via_branch],s){switch(s.state){case D.STATUS_TRYING:break;case D.STATUS_PROCEEDING:case D.STATUS_COMPLETED:{s.transport.send(s.last_response);break}}return!0}break}}}var Ut={C:D,NonInviteClientTransaction:wa,InviteClientTransaction:ya,AckClientTransaction:Na,NonInviteServerTransaction:Oa,InviteServerTransaction:xa,checkTransaction:Da};const Ua=pe,In=oe,$a=Ia,Vs=Ut,Pa=new Ua("RequestSender"),js={onRequestTimeout:()=>{},onTransportError:()=>{},onReceiveResponse:()=>{},onAuthenticated:()=>{}};var Ct=class{constructor(n,s,o){this._ua=n,this._eventHandlers=o,this._method=s.method,this._request=s,this._auth=null,this._challenged=!1,this._staled=!1;for(const c in js)Object.prototype.hasOwnProperty.call(js,c)&&(this._eventHandlers[c]||(this._eventHandlers[c]=js[c]));n.status===n.C.STATUS_USER_CLOSED&&(this._method!==In.BYE||this._method!==In.ACK)&&this._eventHandlers.onTransportError()}send(){const n={onRequestTimeout:()=>{this._eventHandlers.onRequestTimeout()},onTransportError:()=>{this._eventHandlers.onTransportError()},onReceiveResponse:s=>{this._receiveResponse(s)}};switch(this._method){case"INVITE":{this.clientTransaction=new Vs.InviteClientTransaction(this._ua,this._ua.transport,this._request,n);break}case"ACK":{this.clientTransaction=new Vs.AckClientTransaction(this._ua,this._ua.transport,this._request,n);break}default:this.clientTransaction=new Vs.NonInviteClientTransaction(this._ua,this._ua.transport,this._request,n)}this._ua._configuration.authorization_jwt&&this._request.setHeader("Authorization",this._ua._configuration.authorization_jwt),this.clientTransaction.send()}_receiveResponse(n){let s,o;const c=n.status_code;if((c===401||c===407)&&(this._ua.configuration.password!==null||this._ua.configuration.ha1!==null)){if(n.status_code===401?(s=n.parseHeader("www-authenticate"),o="authorization"):(s=n.parseHeader("proxy-authenticate"),o="proxy-authorization"),!s){Pa.debug(`${n.status_code} with wrong or missing challenge, cannot authenticate`),this._eventHandlers.onReceiveResponse(n);return}if(!this._challenged||!this._staled&&s.stale===!0){if(this._auth||(this._auth=new $a({username:this._ua.configuration.authorization_user,password:this._ua.configuration.password,realm:this._ua.configuration.realm,ha1:this._ua.configuration.ha1})),!this._auth.authenticate(this._request,s)){this._eventHandlers.onReceiveResponse(n);return}this._challenged=!0,this._ua.set("realm",this._auth.get("realm")),this._ua.set("ha1",this._auth.get("ha1")),s.stale&&(this._staled=!0),this._request=this._request.clone(),this._request.cseq+=1,this._request.setHeader("cseq",`${this._request.cseq} ${this._method}`),this._request.setHeader(o,this._auth.toString()),this._eventHandlers.onAuthenticated(this._request),this.send()}else this._eventHandlers.onReceiveResponse(n)}else this._eventHandlers.onReceiveResponse(n)}};const Ma=pe,At=Ce(),it=oe,bn=ke,wn=Ct,$t=new Ma("Registrator"),ls=10;var La=class{constructor(n,s){this._reg_id=1,this._ua=n,this._transport=s,this._registrar=n.configuration.registrar_server,this._expires=n.configuration.register_expires,this._call_id=At.createRandomToken(22),this._cseq=0,this._to_uri=n.configuration.uri,this._registrationTimer=null,this._registering=!1,this._registered=!1,this._contact=this._ua.contact.toString(),this._contact+=";+sip.ice",this._extraHeaders=[],this._extraContactParams="",this._sipInstance=`"<urn:uuid:${this._ua.configuration.instance_id}>"`,this._contact+=`;reg-id=${this._reg_id}`,this._contact+=`;+sip.instance=${this._sipInstance}`}get registered(){return this._registered}setExtraHeaders(n){Array.isArray(n)||(n=[]),this._extraHeaders=n.slice()}setExtraContactParams(n){n instanceof Object||(n={}),this._extraContactParams="";for(const s in n)if(Object.prototype.hasOwnProperty.call(n,s)){const o=n[s];this._extraContactParams+=`;${s}`,o&&(this._extraContactParams+=`=${o}`)}}register(){if(this._registering){$t.debug("Register request in progress...");return}const n=At.cloneArray(this._extraHeaders);let s;this._expires?(s=`${this._contact};expires=${this._expires}${this._extraContactParams}`,n.push(`Expires: ${this._expires}`)):s=`${this._contact}${this._extraContactParams}`,n.push(`Contact: ${s}`);let o=At.newTag();this._ua.configuration.register_from_tag_trail&&(typeof this._ua.configuration.register_from_tag_trail=="function"?o+=this._ua.configuration.register_from_tag_trail():o+=this._ua.configuration.register_from_tag_trail);const c=new bn.OutgoingRequest(it.REGISTER,this._registrar,this._ua,{to_uri:this._to_uri,call_id:this._call_id,cseq:this._cseq+=1,from_tag:o},n),t=new wn(this._ua,c,{onRequestTimeout:()=>{this._registrationFailure(null,it.causes.REQUEST_TIMEOUT)},onTransportError:()=>{this._registrationFailure(null,it.causes.CONNECTION_ERROR)},onAuthenticated:()=>{this._cseq+=1},onReceiveResponse:d=>{if(d.cseq===this._cseq)switch(this._registrationTimer!==null&&(clearTimeout(this._registrationTimer),this._registrationTimer=null),!0){case/^1[0-9]{2}$/.test(d.status_code):break;case/^2[0-9]{2}$/.test(d.status_code):{if(this._registering=!1,!d.hasHeader("Contact")){$t.debug("no Contact header in response to REGISTER, response ignored");break}const p=d.headers.Contact.reduce((S,O)=>S.concat(O.parsed),[]);let a=p.find(S=>this._sipInstance===S.getParam("+sip.instance")&&this._reg_id===parseInt(S.getParam("reg-id")));if(a||(a=p.find(S=>S.uri.user===this._ua.contact.uri.user)),!a){$t.debug("no Contact header pointing to us, response ignored");break}let g=a.getParam("expires");!g&&d.hasHeader("expires")&&(g=d.getHeader("expires")),g||(g=this._expires),g=Number(g),g<ls&&(g=ls);const m=g>64?g*1e3/2+Math.floor((g/2-32)*1e3*Math.random()):g*1e3-5e3;this._registrationTimer=setTimeout(()=>{this._registrationTimer=null,this._ua.listeners("registrationExpiring").length===0?this.register():this._ua.emit("registrationExpiring")},m),a.hasParam("temp-gruu")&&(this._ua.contact.temp_gruu=a.getParam("temp-gruu").replace(/"/g,"")),a.hasParam("pub-gruu")&&(this._ua.contact.pub_gruu=a.getParam("pub-gruu").replace(/"/g,"")),this._registered||(this._registered=!0,this._ua.registered({response:d}));break}case/^423$/.test(d.status_code):{d.hasHeader("min-expires")?(this._expires=Number(d.getHeader("min-expires")),this._expires<ls&&(this._expires=ls),this._registering=!1,this.register()):($t.debug("423 response received for REGISTER without Min-Expires"),this._registrationFailure(d,it.causes.SIP_FAILURE_CODE));break}default:{const p=At.sipErrorCause(d.status_code);this._registrationFailure(d,p)}}}});this._registering=!0,t.send()}unregister(n={}){if(!this._registered){$t.debug("already unregistered");return}this._registered=!1,this._registrationTimer!==null&&(clearTimeout(this._registrationTimer),this._registrationTimer=null);const s=At.cloneArray(this._extraHeaders);n.all?s.push(`Contact: *${this._extraContactParams}`):s.push(`Contact: ${this._contact};expires=0${this._extraContactParams}`),s.push("Expires: 0");const o=new bn.OutgoingRequest(it.REGISTER,this._registrar,this._ua,{to_uri:this._to_uri,call_id:this._call_id,cseq:this._cseq+=1},s);new wn(this._ua,o,{onRequestTimeout:()=>{this._unregistered(null,it.causes.REQUEST_TIMEOUT)},onTransportError:()=>{this._unregistered(null,it.causes.CONNECTION_ERROR)},onAuthenticated:()=>{this._cseq+=1},onReceiveResponse:t=>{switch(!0){case/^1[0-9]{2}$/.test(t.status_code):break;case/^2[0-9]{2}$/.test(t.status_code):{this._unregistered(t);break}default:{const d=At.sipErrorCause(t.status_code);this._unregistered(t,d)}}}}).send()}close(){this._registered&&this.unregister()}onTransportClosed(){this._registering=!1,this._registrationTimer!==null&&(clearTimeout(this._registrationTimer),this._registrationTimer=null),this._registered&&(this._registered=!1,this._ua.unregistered({}))}_registrationFailure(n,s){this._registering=!1,this._ua.registrationFailed({response:n||null,cause:s}),this._registered&&(this._registered=!1,this._ua.unregistered({response:n||null,cause:s}))}_unregistered(n,s){this._registering=!1,this._registered=!1,this._ua.unregistered({response:n||null,cause:s||null})}};const Ys=oe,is=Ut,Ha=Ct,Ks={onRequestTimeout:()=>{},onTransportError:()=>{},onSuccessResponse:()=>{},onErrorResponse:()=>{},onAuthenticated:()=>{},onDialogError:()=>{}};var Fa=class{constructor(n,s,o){this._dialog=n,this._ua=n._ua,this._request=s,this._eventHandlers=o,this._reattempt=!1,this._reattemptTimer=null;for(const c in Ks)Object.prototype.hasOwnProperty.call(Ks,c)&&(this._eventHandlers[c]||(this._eventHandlers[c]=Ks[c]))}get request(){return this._request}send(){const n=new Ha(this._ua,this._request,{onRequestTimeout:()=>{this._eventHandlers.onRequestTimeout()},onTransportError:()=>{this._eventHandlers.onTransportError()},onAuthenticated:s=>{this._eventHandlers.onAuthenticated(s)},onReceiveResponse:s=>{this._receiveResponse(s)}});if(n.send(),(this._request.method===Ys.INVITE||this._request.method===Ys.UPDATE&&this._request.body)&&n.clientTransaction.state!==is.C.STATUS_TERMINATED){this._dialog.uac_pending_reply=!0;const s=()=>{(n.clientTransaction.state===is.C.STATUS_ACCEPTED||n.clientTransaction.state===is.C.STATUS_COMPLETED||n.clientTransaction.state===is.C.STATUS_TERMINATED)&&(n.clientTransaction.removeListener("stateChanged",s),this._dialog.uac_pending_reply=!1)};n.clientTransaction.on("stateChanged",s)}}_receiveResponse(n){n.status_code===408||n.status_code===481?this._eventHandlers.onDialogError(n):n.method===Ys.INVITE&&n.status_code===491?this._reattempt?this._eventHandlers.onErrorResponse(n):(this._request.cseq=this._dialog.local_seqnum+=1,this._reattemptTimer=setTimeout(()=>{this._dialog.isTerminated()||(this._reattempt=!0,this.send())},1e3)):n.status_code>=200&&n.status_code<300?this._eventHandlers.onSuccessResponse(n):n.status_code>=300&&this._eventHandlers.onErrorResponse(n)}};const ka=pe,yn=ke,Ge=oe,Pt=Ut,qa=Fa,zs=Ce(),Xs=new ka("Dialog"),et={STATUS_EARLY:1,STATUS_CONFIRMED:2,STATUS_TERMINATED:3};var Js=class{static get C(){return et}constructor(n,s,o,c=et.STATUS_CONFIRMED){if(this._owner=n,this._ua=n._ua,this._uac_pending_reply=!1,this._uas_pending_reply=!1,!s.hasHeader("contact"))return{error:"unable to create a Dialog without Contact header field"};s instanceof yn.IncomingResponse&&(c=s.status_code<200?et.STATUS_EARLY:et.STATUS_CONFIRMED);const t=s.parseHeader("contact");o==="UAS"?(this._id={call_id:s.call_id,local_tag:s.to_tag,remote_tag:s.from_tag,toString(){return this.call_id+this.local_tag+this.remote_tag}},this._state=c,this._remote_seqnum=s.cseq,this._local_uri=s.parseHeader("to").uri,this._remote_uri=s.parseHeader("from").uri,this._remote_target=t.uri,this._route_set=s.getHeaders("record-route"),this._incoming_ack_seqnum=s.cseq,this._outgoing_ack_seqnum=null):o==="UAC"&&(this._id={call_id:s.call_id,local_tag:s.from_tag,remote_tag:s.to_tag,toString(){return this.call_id+this.local_tag+this.remote_tag}},this._state=c,this._local_seqnum=s.cseq,this._local_uri=s.parseHeader("from").uri,this._remote_uri=s.parseHeader("to").uri,this._remote_target=t.uri,this._route_set=s.getHeaders("record-route").reverse(),this._incoming_ack_seqnum=null,this._outgoing_ack_seqnum=this._local_seqnum),this._ua.newDialog(this),Xs.debug(`new ${o} dialog created with status ${this._state===et.STATUS_EARLY?"EARLY":"CONFIRMED"}`)}get id(){return this._id}get local_seqnum(){return this._local_seqnum}set local_seqnum(n){this._local_seqnum=n}get owner(){return this._owner}get uac_pending_reply(){return this._uac_pending_reply}set uac_pending_reply(n){this._uac_pending_reply=n}get uas_pending_reply(){return this._uas_pending_reply}isTerminated(){return this._status===et.STATUS_TERMINATED}update(n,s){this._state=et.STATUS_CONFIRMED,Xs.debug(`dialog ${this._id.toString()} changed to CONFIRMED state`),s==="UAC"&&(this._route_set=n.getHeaders("record-route").reverse())}terminate(){Xs.debug(`dialog ${this._id.toString()} deleted`),this._ua.destroyDialog(this),this._state=et.STATUS_TERMINATED}sendRequest(n,s={}){const o=zs.cloneArray(s.extraHeaders),c=zs.cloneObject(s.eventHandlers),t=s.body||null,d=this._createRequest(n,o,t),p=c.onAuthenticated||(()=>{});return c.onAuthenticated=g=>{this._local_seqnum+=1,d.method===Ge.INVITE&&(this._outgoing_ack_seqnum=this._local_seqnum),p(g)},new qa(this,d,c).send(),d}receiveRequest(n){this._checkInDialogRequest(n)&&(n.method===Ge.ACK&&this._incoming_ack_seqnum!==null?this._incoming_ack_seqnum=null:n.method===Ge.INVITE&&(this._incoming_ack_seqnum=n.cseq),this._owner.receiveRequest(n))}_createRequest(n,s,o){s=zs.cloneArray(s),this._local_seqnum||(this._local_seqnum=Math.floor(Math.random()*1e4));const c=n===Ge.CANCEL||n===Ge.ACK?this._outgoing_ack_seqnum:this._local_seqnum+=1;return n===Ge.INVITE&&(this._outgoing_ack_seqnum=c),new yn.OutgoingRequest(n,this._remote_target,this._ua,{cseq:c,call_id:this._id.call_id,from_uri:this._local_uri,from_tag:this._id.local_tag,to_uri:this._remote_uri,to_tag:this._id.remote_tag,route_set:this._route_set},s,o)}_checkInDialogRequest(n){if(!this._remote_seqnum)this._remote_seqnum=n.cseq;else if(n.cseq<this._remote_seqnum)if(n.method===Ge.ACK){if(this._incoming_ack_seqnum===null||n.cseq!==this._incoming_ack_seqnum)return!1}else return n.reply(500),!1;else n.cseq>this._remote_seqnum&&(this._remote_seqnum=n.cseq);if(n.method===Ge.INVITE||n.method===Ge.UPDATE&&n.body){if(this._uac_pending_reply===!0)n.reply(491);else if(this._uas_pending_reply===!0){const s=(Math.random()*10|0)+1;return n.reply(500,null,[`Retry-After:${s}`]),!1}else{this._uas_pending_reply=!0;const s=()=>{(n.server_transaction.state===Pt.C.STATUS_ACCEPTED||n.server_transaction.state===Pt.C.STATUS_COMPLETED||n.server_transaction.state===Pt.C.STATUS_TERMINATED)&&(n.server_transaction.removeListener("stateChanged",s),this._uas_pending_reply=!1)};n.server_transaction.on("stateChanged",s)}n.hasHeader("contact")&&n.server_transaction.on("stateChanged",()=>{n.server_transaction.state===Pt.C.STATUS_ACCEPTED&&(this._remote_target=n.parseHeader("contact").uri)})}else n.method===Ge.NOTIFY&&n.hasHeader("contact")&&n.server_transaction.on("stateChanged",()=>{n.server_transaction.state===Pt.C.STATUS_COMPLETED&&(this._remote_target=n.parseHeader("contact").uri)});return!0}},Qs={exports:{}};const Ga=Fe.EventEmitter,Ba=pe,Wa=oe,Va=He,Nn=Ce(),ja=new Ba("RTCSession:DTMF"),On={MIN_DURATION:70,MAX_DURATION:6e3,DEFAULT_DURATION:100,MIN_INTER_TONE_GAP:50,DEFAULT_INTER_TONE_GAP:500};Qs.exports=class extends Ga{constructor(n){super(),this._session=n,this._direction=null,this._tone=null,this._duration=null,this._request=null}get tone(){return this._tone}get duration(){return this._duration}send(n,s={}){if(n===void 0)throw new TypeError("Not enough arguments");if(this._direction="outgoing",this._session.status!==this._session.C.STATUS_CONFIRMED&&this._session.status!==this._session.C.STATUS_WAITING_FOR_ACK&&this._session.status!==this._session.C.STATUS_1XX_RECEIVED)throw new Va.InvalidStateError(this._session.status);const o=Nn.cloneArray(s.extraHeaders);if(this.eventHandlers=Nn.cloneObject(s.eventHandlers),typeof n=="string")n=n.toUpperCase();else if(typeof n=="number")n=n.toString();else throw new TypeError(`Invalid tone: ${n}`);if(n.match(/^[0-9A-DR#*]$/))this._tone=n;else throw new TypeError(`Invalid tone: ${n}`);this._duration=s.duration,o.push("Content-Type: application/dtmf-relay");let c=`Signal=${this._tone}\r
44
+ `;c+=`Duration=${this._duration}`,this._session.newDTMF({originator:"local",dtmf:this,request:this._request}),this._session.sendRequest(Wa.INFO,{extraHeaders:o,eventHandlers:{onSuccessResponse:t=>{this.emit("succeeded",{originator:"remote",response:t})},onErrorResponse:t=>{this.eventHandlers.onFailed&&this.eventHandlers.onFailed(),this.emit("failed",{originator:"remote",response:t})},onRequestTimeout:()=>{this._session.onRequestTimeout()},onTransportError:()=>{this._session.onTransportError()},onDialogError:()=>{this._session.onDialogError()}},body:c})}init_incoming(n){const s=/^(Signal\s*?=\s*?)([0-9A-D#*]{1})(\s)?.*/,o=/^(Duration\s?=\s?)([0-9]{1,4})(\s)?.*/;if(this._direction="incoming",this._request=n,n.reply(200),n.body){const c=n.body.split(`
45
+ `);c.length>=1&&s.test(c[0])&&(this._tone=c[0].replace(s,"$2")),c.length>=2&&o.test(c[1])&&(this._duration=parseInt(c[1].replace(o,"$2"),10))}this._duration||(this._duration=On.DEFAULT_DURATION),this._tone?this._session.newDTMF({originator:"remote",dtmf:this,request:n}):ja.debug("invalid INFO DTMF received, discarded")}},Qs.exports.C=On;var Ya=Qs.exports;const Ka=Fe.EventEmitter,za=oe,Xa=He,Ja=Ce();var Qa=class extends Ka{constructor(n){super(),this._session=n,this._direction=null,this._contentType=null,this._body=null}get contentType(){return this._contentType}get body(){return this._body}send(n,s,o={}){if(this._direction="outgoing",n===void 0)throw new TypeError("Not enough arguments");if(this._session.status!==this._session.C.STATUS_CONFIRMED&&this._session.status!==this._session.C.STATUS_WAITING_FOR_ACK)throw new Xa.InvalidStateError(this._session.status);this._contentType=n,this._body=s;const c=Ja.cloneArray(o.extraHeaders);c.push(`Content-Type: ${n}`),this._session.newInfo({originator:"local",info:this,request:this.request}),this._session.sendRequest(za.INFO,{extraHeaders:c,eventHandlers:{onSuccessResponse:t=>{this.emit("succeeded",{originator:"remote",response:t})},onErrorResponse:t=>{this.emit("failed",{originator:"remote",response:t})},onTransportError:()=>{this._session.onTransportError()},onRequestTimeout:()=>{this._session.onRequestTimeout()},onDialogError:()=>{this._session.onDialogError()}},body:s})}init_incoming(n){this._direction="incoming",this.request=n,n.reply(200),this._contentType=n.hasHeader("Content-Type")?n.getHeader("Content-Type").toLowerCase():void 0,this._body=n.body,this._session.newInfo({originator:"remote",info:this,request:n})}};const Za=pe,xn=oe,eo=new Za("RTCSession:ReferNotifier"),Zs={event_type:"refer",body_type:"message/sipfrag;version=2.0",expires:300};var to=class{constructor(n,s,o){this._session=n,this._id=s,this._expires=o||Zs.expires,this._active=!0,this.notify(100)}notify(n,s){if(eo.debug("notify()"),this._active===!1)return;s=s||xn.REASON_PHRASE[n]||"";let o;n>=200?o="terminated;reason=noresource":o=`active;expires=${this._expires}`,this._session.sendRequest(xn.NOTIFY,{extraHeaders:[`Event: ${Zs.event_type};id=${this._id}`,`Subscription-State: ${o}`,`Content-Type: ${Zs.body_type}`],body:`SIP/2.0 ${n} ${s}`,eventHandlers:{onErrorResponse(){this._active=!1}}})}};const so=Fe.EventEmitter,ro=pe,Mt=oe,no=$e(),Dn=Ce(),at=new ro("RTCSession:ReferSubscriber");var lo=class extends so{constructor(n){super(),this._id=null,this._session=n}get id(){return this._id}sendRefer(n,s={}){at.debug("sendRefer()");const o=Dn.cloneArray(s.extraHeaders),c=Dn.cloneObject(s.eventHandlers);for(const a in c)Object.prototype.hasOwnProperty.call(c,a)&&this.on(a,c[a]);let t=null;s.replaces&&(t=s.replaces._request.call_id,t+=`;to-tag=${s.replaces._to_tag}`,t+=`;from-tag=${s.replaces._from_tag}`,t=encodeURIComponent(t));const d=`Refer-To: <${n}${t?`?Replaces=${t}`:""}>`;if(o.push(d),!o.some(a=>a.toLowerCase().startsWith("referred-by:"))){const a=`Referred-By: <${this._session._ua._configuration.uri._scheme}:${this._session._ua._configuration.uri._user}@${this._session._ua._configuration.uri._host}>`;o.push(a)}o.push(`Contact: ${this._session.contact}`);const p=this._session.sendRequest(Mt.REFER,{extraHeaders:o,eventHandlers:{onSuccessResponse:a=>{this._requestSucceeded(a)},onErrorResponse:a=>{this._requestFailed(a,Mt.causes.REJECTED)},onTransportError:()=>{this._requestFailed(null,Mt.causes.CONNECTION_ERROR)},onRequestTimeout:()=>{this._requestFailed(null,Mt.causes.REQUEST_TIMEOUT)},onDialogError:()=>{this._requestFailed(null,Mt.causes.DIALOG_ERROR)},onAuthenticated:a=>{this._id=a.cseq,this.emit("authenticated")}}});this._id=p.cseq}receiveNotify(n){if(at.debug("receiveNotify()"),!n.body)return;const s=no.parse(n.body.trim().split(`\r
46
+ `,1)[0],"Status_Line");if(s===-1){at.debug(`receiveNotify() | error parsing NOTIFY body: "${n.body}"`);return}switch(!0){case/^100$/.test(s.status_code):{this.emit("trying",{request:n,status_line:s});break}case/^1[0-9]{2}$/.test(s.status_code):{this.emit("progress",{request:n,status_line:s});break}case/^2[0-9]{2}$/.test(s.status_code):{this.emit("accepted",{request:n,status_line:s});break}default:{this.emit("failed",{request:n,status_line:s});break}}}_requestSucceeded(n){at.debug("REFER succeeded"),at.debug('emit "requestSucceeded"'),this.emit("requestSucceeded",{response:n})}_requestFailed(n,s){at.debug("REFER failed"),at.debug('emit "requestFailed"'),this.emit("requestFailed",{response:n||null,cause:s})}};const io=Fe.EventEmitter,Un=Pe,ao=pe,x=oe,ot=He,$n=Ut,ie=Ce(),Lt=Cn,oo=ke,as=Js,uo=Ct,ye=Ya,Pn=Qa,co=to,fo=lo,Mn=Ze(),A=new ao("RTCSession"),R={STATUS_NULL:0,STATUS_INVITE_SENT:1,STATUS_1XX_RECEIVED:2,STATUS_INVITE_RECEIVED:3,STATUS_WAITING_FOR_ANSWER:4,STATUS_ANSWERED:5,STATUS_WAITING_FOR_ACK:6,STATUS_CANCELED:7,STATUS_TERMINATED:8,STATUS_CONFIRMED:9},os=["audio","video"];var Ln=class zr extends io{static get C(){return R}constructor(n){A.debug("new"),super(),this._id=null,this._ua=n,this._status=R.STATUS_NULL,this._dialog=null,this._earlyDialogs={},this._contact=null,this._from_tag=null,this._to_tag=null,this._connection=null,this._connectionPromiseQueue=Promise.resolve(),this._request=null,this._is_canceled=!1,this._cancel_reason="",this._is_confirmed=!1,this._late_sdp=!1,this._rtcOfferConstraints=null,this._rtcAnswerConstraints=null,this._localMediaStream=null,this._localMediaStreamLocallyGenerated=!1,this._rtcReady=!0,this._iceReady=!1,this._timers={ackTimer:null,expiresTimer:null,invite2xxTimer:null,userNoAnswerTimer:null},this._direction=null,this._local_identity=null,this._remote_identity=null,this._start_time=null,this._end_time=null,this._tones=null,this._audioMuted=!1,this._videoMuted=!1,this._localHold=!1,this._remoteHold=!1,this._sessionTimers={enabled:this._ua.configuration.session_timers,refreshMethod:this._ua.configuration.session_timers_refresh_method,defaultExpires:x.SESSION_EXPIRES,currentExpires:null,running:!1,refresher:!1,timer:null},this._referSubscribers={},this._data={}}get C(){return R}get causes(){return x.causes}get id(){return this._id}get connection(){return this._connection}get contact(){return this._contact}get direction(){return this._direction}get local_identity(){return this._local_identity}get remote_identity(){return this._remote_identity}get start_time(){return this._start_time}get end_time(){return this._end_time}get data(){return this._data}set data(n){this._data=n}get status(){return this._status}isInProgress(){switch(this._status){case R.STATUS_NULL:case R.STATUS_INVITE_SENT:case R.STATUS_1XX_RECEIVED:case R.STATUS_INVITE_RECEIVED:case R.STATUS_WAITING_FOR_ANSWER:return!0;default:return!1}}isEstablished(){switch(this._status){case R.STATUS_ANSWERED:case R.STATUS_WAITING_FOR_ACK:case R.STATUS_CONFIRMED:return!0;default:return!1}}isEnded(){switch(this._status){case R.STATUS_CANCELED:case R.STATUS_TERMINATED:return!0;default:return!1}}isMuted(){return{audio:this._audioMuted,video:this._videoMuted}}isOnHold(){return{local:this._localHold,remote:this._remoteHold}}connect(n,s={},o){A.debug("connect()");const c=n,t=ie.cloneObject(s.eventHandlers),d=ie.cloneArray(s.extraHeaders),p=ie.cloneObject(s.mediaConstraints,{audio:!0,video:!0}),a=s.mediaStream||null,g=ie.cloneObject(s.pcConfig,{iceServers:[]}),m=s.rtcConstraints||null,S=s.rtcOfferConstraints||null;if(this._rtcOfferConstraints=S,this._rtcAnswerConstraints=s.rtcAnswerConstraints||null,this._data=s.data||this._data,n===void 0)throw new TypeError("Not enough arguments");if(this._status!==R.STATUS_NULL)throw new ot.InvalidStateError(this._status);if(!window.RTCPeerConnection)throw new ot.NotSupportedError("WebRTC not supported");if(n=this._ua.normalizeTarget(n),!n)throw new TypeError(`Invalid target: ${c}`);this._sessionTimers.enabled&&ie.isDecimal(s.sessionTimersExpires)&&(s.sessionTimersExpires>=x.MIN_SESSION_EXPIRES?this._sessionTimers.defaultExpires=s.sessionTimersExpires:this._sessionTimers.defaultExpires=x.SESSION_EXPIRES);for(const B in t)Object.prototype.hasOwnProperty.call(t,B)&&this.on(B,t[B]);this._from_tag=ie.newTag();const O=s.anonymous||!1,H={from_tag:this._from_tag};this._contact=this._ua.contact.toString({anonymous:O,outbound:!0}),O?(H.from_display_name="Anonymous",H.from_uri=new Mn("sip","anonymous","anonymous.invalid"),d.push(`P-Preferred-Identity: ${this._ua.configuration.uri.toString()}`),d.push("Privacy: id")):s.fromUserName&&(H.from_uri=new Mn("sip",s.fromUserName,this._ua.configuration.uri.host),d.push(`P-Preferred-Identity: ${this._ua.configuration.uri.toString()}`)),s.fromDisplayName&&(H.from_display_name=s.fromDisplayName),d.push(`Contact: ${this._contact}`),d.push("Content-Type: application/sdp"),this._sessionTimers.enabled&&d.push(`Session-Expires: ${this._sessionTimers.defaultExpires}${this._ua.configuration.session_timers_force_refresher?";refresher=uac":""}`),this._request=new oo.InitialOutgoingInviteRequest(n,this._ua,H,d),this._id=this._request.call_id+this._from_tag,this._createRTCConnection(g,m),this._direction="outgoing",this._local_identity=this._request.from,this._remote_identity=this._request.to,o&&o(this),this._newRTCSession("local",this._request),this._sendInitialRequest(p,S,a)}init_incoming(n,s){A.debug("init_incoming()");let o;const c=n.hasHeader("Content-Type")?n.getHeader("Content-Type").toLowerCase():void 0;if(n.body&&c!=="application/sdp"){n.reply(415);return}if(this._status=R.STATUS_INVITE_RECEIVED,this._from_tag=n.from_tag,this._id=n.call_id+this._from_tag,this._request=n,this._contact=this._ua.contact.toString(),n.hasHeader("expires")&&(o=n.getHeader("expires")*1e3),n.to_tag=ie.newTag(),!this._createDialog(n,"UAS",!0)){n.reply(500,"Missing Contact header field");return}n.body?this._late_sdp=!1:this._late_sdp=!0,this._status=R.STATUS_WAITING_FOR_ANSWER,this._timers.userNoAnswerTimer=setTimeout(()=>{n.reply(408),this._failed("local",null,x.causes.NO_ANSWER)},this._ua.configuration.no_answer_timeout),o&&(this._timers.expiresTimer=setTimeout(()=>{this._status===R.STATUS_WAITING_FOR_ANSWER&&(n.reply(487),this._failed("system",null,x.causes.EXPIRES))},o)),this._direction="incoming",this._local_identity=n.to,this._remote_identity=n.from,s&&s(this),this._newRTCSession("remote",n),this._status!==R.STATUS_TERMINATED&&(n.reply(180,null,[`Contact: ${this._contact}`]),this._progress("local",null))}answer(n={}){A.debug("answer()");const s=this._request,o=ie.cloneArray(n.extraHeaders),c=ie.cloneObject(n.mediaConstraints),t=n.mediaStream||null,d=ie.cloneObject(n.pcConfig,{iceServers:[]}),p=n.rtcConstraints||null,a=n.rtcAnswerConstraints||null,g=ie.cloneObject(n.rtcOfferConstraints);let m,S=!1,O=!1,H=!1,B=!1;if(this._rtcAnswerConstraints=a,this._rtcOfferConstraints=n.rtcOfferConstraints||null,this._data=n.data||this._data,this._direction!=="incoming")throw new ot.NotSupportedError('"answer" not supported for outgoing RTCSession');if(this._status!==R.STATUS_WAITING_FOR_ANSWER)throw new ot.InvalidStateError(this._status);if(this._sessionTimers.enabled&&ie.isDecimal(n.sessionTimersExpires)&&(n.sessionTimersExpires>=x.MIN_SESSION_EXPIRES?this._sessionTimers.defaultExpires=n.sessionTimersExpires:this._sessionTimers.defaultExpires=x.SESSION_EXPIRES),this._status=R.STATUS_ANSWERED,!this._createDialog(s,"UAS")){s.reply(500,"Error creating dialog");return}clearTimeout(this._timers.userNoAnswerTimer),o.unshift(`Contact: ${this._contact}`);const k=s.parseSDP();Array.isArray(k.media)||(k.media=[k.media]);for(const U of k.media)U.type==="audio"&&(S=!0,(!U.direction||U.direction==="sendrecv")&&(H=!0)),U.type==="video"&&(O=!0,(!U.direction||U.direction==="sendrecv")&&(B=!0));if(t&&c.audio===!1){m=t.getAudioTracks();for(const U of m)t.removeTrack(U)}if(t&&c.video===!1){m=t.getVideoTracks();for(const U of m)t.removeTrack(U)}!t&&c.audio===void 0&&(c.audio=H),!t&&c.video===void 0&&(c.video=B),!t&&!S&&!g.offerToReceiveAudio&&(c.audio=!1),!t&&!O&&!g.offerToReceiveVideo&&(c.video=!1),this._createRTCConnection(d,p),Promise.resolve().then(()=>{if(t)return t;if(c.audio||c.video)return this._localMediaStreamLocallyGenerated=!0,navigator.mediaDevices.getUserMedia(c).catch(U=>{throw this._status===R.STATUS_TERMINATED?new Error("terminated"):(s.reply(480),this._failed("local",null,x.causes.USER_DENIED_MEDIA_ACCESS),A.warn('emit "getusermediafailed" [error:%o]',U),this.emit("getusermediafailed",U),new Error("getUserMedia() failed"))})}).then(U=>{if(this._status===R.STATUS_TERMINATED)throw new Error("terminated");this._localMediaStream=U,U&&U.getTracks().forEach(de=>{this._connection.addTrack(de,U)})}).then(()=>{if(this._late_sdp)return;const U={originator:"remote",type:"offer",sdp:s.body};A.debug('emit "sdp"'),this.emit("sdp",U);const de=new RTCSessionDescription({type:"offer",sdp:U.sdp});return this._connectionPromiseQueue=this._connectionPromiseQueue.then(()=>this._connection.setRemoteDescription(de)).catch(ne=>{throw s.reply(488),this._failed("system",null,x.causes.WEBRTC_ERROR),A.warn('emit "peerconnection:setremotedescriptionfailed" [error:%o]',ne),this.emit("peerconnection:setremotedescriptionfailed",ne),new Error("peerconnection.setRemoteDescription() failed")}),this._connectionPromiseQueue}).then(()=>{if(this._status===R.STATUS_TERMINATED)throw new Error("terminated");return this._connecting(s),this._late_sdp?this._createLocalDescription("offer",this._rtcOfferConstraints).catch(()=>{throw s.reply(500),new Error("_createLocalDescription() failed")}):this._createLocalDescription("answer",a).catch(()=>{throw s.reply(500),new Error("_createLocalDescription() failed")})}).then(U=>{if(this._status===R.STATUS_TERMINATED)throw new Error("terminated");this._handleSessionTimersInIncomingRequest(s,o),s.reply(200,null,o,U,()=>{this._status=R.STATUS_WAITING_FOR_ACK,this._setInvite2xxTimer(s,U),this._setACKTimer(),this._accepted("local")},()=>{this._failed("system",null,x.causes.CONNECTION_ERROR)})}).catch(U=>{this._status!==R.STATUS_TERMINATED&&(A.warn(`answer() failed: ${U.message}`),this._failed("system",U.message,x.causes.INTERNAL_ERROR))})}terminate(n={}){A.debug("terminate()");const s=n.cause||x.causes.BYE,o=ie.cloneArray(n.extraHeaders),c=n.body;let t,d=n.status_code,p=n.reason_phrase;if(this._status===R.STATUS_TERMINATED)throw new ot.InvalidStateError(this._status);switch(this._status){case R.STATUS_NULL:case R.STATUS_INVITE_SENT:case R.STATUS_1XX_RECEIVED:{if(A.debug("canceling session"),d&&(d<200||d>=700))throw new TypeError(`Invalid status_code: ${d}`);d&&(p=p||x.REASON_PHRASE[d]||"",t=`SIP ;cause=${d} ;text="${p}"`),this._status===R.STATUS_NULL||this._status===R.STATUS_INVITE_SENT?(this._is_canceled=!0,this._cancel_reason=t):this._status===R.STATUS_1XX_RECEIVED&&this._request.cancel(t),this._status=R.STATUS_CANCELED,this._failed("local",null,x.causes.CANCELED);break}case R.STATUS_WAITING_FOR_ANSWER:case R.STATUS_ANSWERED:{if(A.debug("rejecting session"),d=d||480,d<300||d>=700)throw new TypeError(`Invalid status_code: ${d}`);this._request.reply(d,p,o,c),this._failed("local",null,x.causes.REJECTED);break}case R.STATUS_WAITING_FOR_ACK:case R.STATUS_CONFIRMED:{if(A.debug("terminating session"),p=n.reason_phrase||x.REASON_PHRASE[d]||"",d&&(d<200||d>=700))throw new TypeError(`Invalid status_code: ${d}`);if(d&&o.push(`Reason: SIP ;cause=${d}; text="${p}"`),this._status===R.STATUS_WAITING_FOR_ACK&&this._direction==="incoming"&&this._request.server_transaction.state!==$n.C.STATUS_TERMINATED){const a=this._dialog;this.receiveRequest=({method:g})=>{g===x.ACK&&(this.sendRequest(x.BYE,{extraHeaders:o,body:c}),a.terminate())},this._request.server_transaction.on("stateChanged",()=>{this._request.server_transaction.state===$n.C.STATUS_TERMINATED&&(this.sendRequest(x.BYE,{extraHeaders:o,body:c}),a.terminate())}),this._ended("local",null,s),this._dialog=a,this._ua.newDialog(a)}else this.sendRequest(x.BYE,{extraHeaders:o,body:c}),this._ended("local",null,s)}}}sendDTMF(n,s={}){A.debug("sendDTMF() | tones: %s",n);let o=s.duration||null,c=s.interToneGap||null;const t=s.transportType||x.DTMF_TRANSPORT.INFO;if(n===void 0)throw new TypeError("Not enough arguments");if(this._status!==R.STATUS_CONFIRMED&&this._status!==R.STATUS_WAITING_FOR_ACK&&this._status!==R.STATUS_1XX_RECEIVED)throw new ot.InvalidStateError(this._status);if(t!==x.DTMF_TRANSPORT.INFO&&t!==x.DTMF_TRANSPORT.RFC2833)throw new TypeError(`invalid transportType: ${t}`);if(typeof n=="number"&&(n=n.toString()),!n||typeof n!="string"||!n.match(/^[0-9A-DR#*,]+$/i))throw new TypeError(`Invalid tones: ${n}`);if(o&&!ie.isDecimal(o))throw new TypeError(`Invalid tone duration: ${o}`);if(o?o<ye.C.MIN_DURATION?(A.debug(`"duration" value is lower than the minimum allowed, setting it to ${ye.C.MIN_DURATION} milliseconds`),o=ye.C.MIN_DURATION):o>ye.C.MAX_DURATION?(A.debug(`"duration" value is greater than the maximum allowed, setting it to ${ye.C.MAX_DURATION} milliseconds`),o=ye.C.MAX_DURATION):o=Math.abs(o):o=ye.C.DEFAULT_DURATION,s.duration=o,c&&!ie.isDecimal(c))throw new TypeError(`Invalid interToneGap: ${c}`);if(c?c<ye.C.MIN_INTER_TONE_GAP?(A.debug(`"interToneGap" value is lower than the minimum allowed, setting it to ${ye.C.MIN_INTER_TONE_GAP} milliseconds`),c=ye.C.MIN_INTER_TONE_GAP):c=Math.abs(c):c=ye.C.DEFAULT_INTER_TONE_GAP,t===x.DTMF_TRANSPORT.RFC2833){const p=this._getDTMFRTPSender();p&&(n=p.toneBuffer+n,p.insertDTMF(n,o,c));return}if(this._tones){this._tones+=n;return}this._tones=n,d.call(this);function d(){let p;if(this._status===R.STATUS_TERMINATED||!this._tones){this._tones=null;return}const a=this._tones[0];if(this._tones=this._tones.substring(1),a===",")p=2e3;else{const g=new ye(this);s.eventHandlers={onFailed:()=>{this._tones=null}},g.send(a,s),p=o+c}setTimeout(d.bind(this),p)}}sendInfo(n,s,o={}){if(A.debug("sendInfo()"),this._status!==R.STATUS_CONFIRMED&&this._status!==R.STATUS_WAITING_FOR_ACK&&this._status!==R.STATUS_1XX_RECEIVED)throw new ot.InvalidStateError(this._status);new Pn(this).send(n,s,o)}mute(n={audio:!0,video:!1}){A.debug("mute()");let s=!1,o=!1;this._audioMuted===!1&&n.audio&&(s=!0,this._audioMuted=!0,this._toggleMuteAudio(!0)),this._videoMuted===!1&&n.video&&(o=!0,this._videoMuted=!0,this._toggleMuteVideo(!0)),(s===!0||o===!0)&&this._onmute({audio:s,video:o})}unmute(n={audio:!0,video:!0}){A.debug("unmute()");let s=!1,o=!1;this._audioMuted===!0&&n.audio&&(s=!0,this._audioMuted=!1,this._localHold===!1&&this._toggleMuteAudio(!1)),this._videoMuted===!0&&n.video&&(o=!0,this._videoMuted=!1,this._localHold===!1&&this._toggleMuteVideo(!1)),(s===!0||o===!0)&&this._onunmute({audio:s,video:o})}hold(n={},s){if(A.debug("hold()"),this._status!==R.STATUS_WAITING_FOR_ACK&&this._status!==R.STATUS_CONFIRMED||this._localHold===!0||!this.isReadyToReOffer())return!1;this._localHold=!0,this._onhold("local");const o={succeeded:()=>{s&&s()},failed:()=>{this.terminate({cause:x.causes.WEBRTC_ERROR,status_code:500,reason_phrase:"Hold Failed"})}};return n.useUpdate?this._sendUpdate({sdpOffer:!0,eventHandlers:o,extraHeaders:n.extraHeaders}):this._sendReinvite({eventHandlers:o,extraHeaders:n.extraHeaders}),!0}unhold(n={},s){if(A.debug("unhold()"),this._status!==R.STATUS_WAITING_FOR_ACK&&this._status!==R.STATUS_CONFIRMED||this._localHold===!1||!this.isReadyToReOffer())return!1;this._localHold=!1,this._onunhold("local");const o={succeeded:()=>{s&&s()},failed:()=>{this.terminate({cause:x.causes.WEBRTC_ERROR,status_code:500,reason_phrase:"Unhold Failed"})}};return n.useUpdate?this._sendUpdate({sdpOffer:!0,eventHandlers:o,extraHeaders:n.extraHeaders}):this._sendReinvite({eventHandlers:o,extraHeaders:n.extraHeaders}),!0}renegotiate(n={},s){A.debug("renegotiate()");const o=n.rtcOfferConstraints||null;if(this._status!==R.STATUS_WAITING_FOR_ACK&&this._status!==R.STATUS_CONFIRMED||!this.isReadyToReOffer())return!1;const c={succeeded:()=>{s&&s()},failed:()=>{this.terminate({cause:x.causes.WEBRTC_ERROR,status_code:500,reason_phrase:"Media Renegotiation Failed"})}};return this._setLocalMediaStatus(),n.useUpdate?this._sendUpdate({sdpOffer:!0,eventHandlers:c,rtcOfferConstraints:o,extraHeaders:n.extraHeaders}):this._sendReinvite({eventHandlers:c,rtcOfferConstraints:o,extraHeaders:n.extraHeaders}),!0}refer(n,s){A.debug("refer()");const o=n;if(this._status!==R.STATUS_WAITING_FOR_ACK&&this._status!==R.STATUS_CONFIRMED)return!1;if(n=this._ua.normalizeTarget(n),!n)throw new TypeError(`Invalid target: ${o}`);const c=new fo(this);c.sendRefer(n,s);let t=c.id;return this._referSubscribers[t]=c,c.on("requestFailed",()=>{delete this._referSubscribers[t]}),c.on("accepted",()=>{delete this._referSubscribers[t]}),c.on("failed",()=>{delete this._referSubscribers[t]}),c.on("authenticated",()=>{delete this._referSubscribers[t],t=c.id,this._referSubscribers[t]=c}),c}sendRequest(n,s){if(A.debug("sendRequest()"),this._dialog)return this._dialog.sendRequest(n,s);{const o=Object.values(this._earlyDialogs);if(o.length>0)return o[0].sendRequest(n,s);A.warn("sendRequest() | no valid early dialog found");return}}receiveRequest(n){if(A.debug("receiveRequest()"),n.method===x.CANCEL)(this._status===R.STATUS_WAITING_FOR_ANSWER||this._status===R.STATUS_ANSWERED)&&(this._status=R.STATUS_CANCELED,this._request.reply(487),this._failed("remote",n,x.causes.CANCELED));else switch(n.method){case x.ACK:{if(this._status!==R.STATUS_WAITING_FOR_ACK)return;if(this._status=R.STATUS_CONFIRMED,clearTimeout(this._timers.ackTimer),clearTimeout(this._timers.invite2xxTimer),this._late_sdp){if(!n.body){this.terminate({cause:x.causes.MISSING_SDP,status_code:400});break}const s={originator:"remote",type:"answer",sdp:n.body};A.debug('emit "sdp"'),this.emit("sdp",s);const o=new RTCSessionDescription({type:"answer",sdp:s.sdp});this._connectionPromiseQueue=this._connectionPromiseQueue.then(()=>this._connection.setRemoteDescription(o)).then(()=>{this._is_confirmed||this._confirmed("remote",n)}).catch(c=>{this.terminate({cause:x.causes.BAD_MEDIA_DESCRIPTION,status_code:488}),A.warn('emit "peerconnection:setremotedescriptionfailed" [error:%o]',c),this.emit("peerconnection:setremotedescriptionfailed",c)})}else this._is_confirmed||this._confirmed("remote",n);break}case x.BYE:{this._status===R.STATUS_CONFIRMED||this._status===R.STATUS_WAITING_FOR_ACK?(n.reply(200),this._ended("remote",n,x.causes.BYE)):this._status===R.STATUS_INVITE_RECEIVED||this._status===R.STATUS_WAITING_FOR_ANSWER?(n.reply(200),this._request.reply(487,"BYE Received"),this._ended("remote",n,x.causes.BYE)):n.reply(403,"Wrong Status");break}case x.INVITE:{this._status===R.STATUS_CONFIRMED?n.hasHeader("replaces")?this._receiveReplaces(n):this._receiveReinvite(n):n.reply(403,"Wrong Status");break}case x.INFO:{if(this._status===R.STATUS_1XX_RECEIVED||this._status===R.STATUS_WAITING_FOR_ANSWER||this._status===R.STATUS_ANSWERED||this._status===R.STATUS_WAITING_FOR_ACK||this._status===R.STATUS_CONFIRMED){const s=n.hasHeader("Content-Type")?n.getHeader("Content-Type").toLowerCase():void 0;s&&s.match(/^application\/dtmf-relay/i)?new ye(this).init_incoming(n):s!==void 0?new Pn(this).init_incoming(n):n.reply(415)}else n.reply(403,"Wrong Status");break}case x.UPDATE:{this._status===R.STATUS_CONFIRMED?this._receiveUpdate(n):n.reply(403,"Wrong Status");break}case x.REFER:{this._status===R.STATUS_CONFIRMED?this._receiveRefer(n):n.reply(403,"Wrong Status");break}case x.NOTIFY:{this._status===R.STATUS_CONFIRMED?this._receiveNotify(n):n.reply(403,"Wrong Status");break}default:n.reply(501)}}onTransportError(){A.warn("onTransportError()"),this._status!==R.STATUS_TERMINATED&&this.terminate({status_code:500,reason_phrase:x.causes.CONNECTION_ERROR,cause:x.causes.CONNECTION_ERROR})}onRequestTimeout(){A.warn("onRequestTimeout()"),this._status!==R.STATUS_TERMINATED&&this.terminate({status_code:408,reason_phrase:x.causes.REQUEST_TIMEOUT,cause:x.causes.REQUEST_TIMEOUT})}onDialogError(){A.warn("onDialogError()"),this._status!==R.STATUS_TERMINATED&&this.terminate({status_code:500,reason_phrase:x.causes.DIALOG_ERROR,cause:x.causes.DIALOG_ERROR})}newDTMF(n){A.debug("newDTMF()"),this.emit("newDTMF",n)}newInfo(n){A.debug("newInfo()"),this.emit("newInfo",n)}isReadyToReOffer(){return this._rtcReady?this._dialog?this._dialog.uac_pending_reply===!0||this._dialog.uas_pending_reply===!0?(A.debug("isReadyToReOffer() | there is another INVITE/UPDATE transaction in progress"),!1):!0:(A.debug("isReadyToReOffer() | session not established yet"),!1):(A.debug("isReadyToReOffer() | internal WebRTC status not ready"),!1)}_close(){if(A.debug("close()"),this._localMediaStream&&this._localMediaStreamLocallyGenerated&&(A.debug("close() | closing local MediaStream"),ie.closeMediaStream(this._localMediaStream)),this._status!==R.STATUS_TERMINATED){if(this._status=R.STATUS_TERMINATED,this._connection)try{this._connection.close()}catch(n){A.warn("close() | error closing the RTCPeerConnection: %o",n)}for(const n in this._timers)Object.prototype.hasOwnProperty.call(this._timers,n)&&clearTimeout(this._timers[n]);clearTimeout(this._sessionTimers.timer),this._dialog&&(this._dialog.terminate(),delete this._dialog);for(const n in this._earlyDialogs)Object.prototype.hasOwnProperty.call(this._earlyDialogs,n)&&(this._earlyDialogs[n].terminate(),delete this._earlyDialogs[n]);for(const n in this._referSubscribers)Object.prototype.hasOwnProperty.call(this._referSubscribers,n)&&delete this._referSubscribers[n];this._ua.destroyRTCSession(this)}}_setInvite2xxTimer(n,s){let o=Lt.T1;function c(){this._status===R.STATUS_WAITING_FOR_ACK&&(n.reply(200,null,[`Contact: ${this._contact}`],s),o<Lt.T2&&(o=o*2,o>Lt.T2&&(o=Lt.T2)),this._timers.invite2xxTimer=setTimeout(c.bind(this),o))}this._timers.invite2xxTimer=setTimeout(c.bind(this),o)}_setACKTimer(){this._timers.ackTimer=setTimeout(()=>{this._status===R.STATUS_WAITING_FOR_ACK&&(A.debug("no ACK received, terminating the session"),clearTimeout(this._timers.invite2xxTimer),this.sendRequest(x.BYE),this._ended("remote",null,x.causes.NO_ACK))},Lt.TIMER_H)}_createRTCConnection(n,s){this._connection=new RTCPeerConnection(n,s),this._connection.addEventListener("iceconnectionstatechange",()=>{this._connection.iceConnectionState==="failed"&&this.terminate({cause:x.causes.RTP_TIMEOUT,status_code:408,reason_phrase:x.causes.RTP_TIMEOUT})}),A.debug('emit "peerconnection"'),this.emit("peerconnection",{peerconnection:this._connection})}_createLocalDescription(n,s){if(A.debug("createLocalDescription()"),n!=="offer"&&n!=="answer")throw new Error(`createLocalDescription() | invalid type "${n}"`);const o=this._connection;return this._rtcReady=!1,Promise.resolve().then(()=>n==="offer"?o.createOffer(s).catch(c=>(A.warn('emit "peerconnection:createofferfailed" [error:%o]',c),this.emit("peerconnection:createofferfailed",c),Promise.reject(c))):o.createAnswer(s).catch(c=>(A.warn('emit "peerconnection:createanswerfailed" [error:%o]',c),this.emit("peerconnection:createanswerfailed",c),Promise.reject(c)))).then(c=>o.setLocalDescription(c).catch(t=>(this._rtcReady=!0,A.warn('emit "peerconnection:setlocaldescriptionfailed" [error:%o]',t),this.emit("peerconnection:setlocaldescriptionfailed",t),Promise.reject(t)))).then(()=>{const c=s&&s.iceRestart;if(o.iceGatheringState==="complete"&&!c||o.iceGatheringState==="gathering"&&this._iceReady){this._rtcReady=!0;const t={originator:"local",type:n,sdp:o.localDescription.sdp};return A.debug('emit "sdp"'),this.emit("sdp",t),Promise.resolve(t.sdp)}return new Promise(t=>{let d=!1,p,a;this._iceReady=!1;const g=()=>{if(d)return;o.removeEventListener("icecandidate",p),o.removeEventListener("icegatheringstatechange",a),d=!0,this._rtcReady=!0,this._iceReady=!0;const m={originator:"local",type:n,sdp:o.localDescription.sdp};A.debug('emit "sdp"'),this.emit("sdp",m),t(m.sdp)};o.addEventListener("icecandidate",p=m=>{const S=m.candidate;S?this.emit("icecandidate",{candidate:S,ready:g}):g()}),o.addEventListener("icegatheringstatechange",a=()=>{o.iceGatheringState==="complete"&&g()})})})}_createDialog(n,s,o){const c=s==="UAS"?n.to_tag:n.from_tag,t=s==="UAS"?n.from_tag:n.to_tag,d=n.call_id+c+t;let p=this._earlyDialogs[d];if(o)return p?!0:(p=new as(this,n,s,as.C.STATUS_EARLY),p.error?(A.debug(p.error),this._failed("remote",n,x.causes.INTERNAL_ERROR),!1):(this._earlyDialogs[d]=p,!0));{if(this._from_tag=n.from_tag,this._to_tag=n.to_tag,p)return p.update(n,s),this._dialog=p,delete this._earlyDialogs[d],!0;const a=new as(this,n,s);return a.error?(A.debug(a.error),this._failed("remote",n,x.causes.INTERNAL_ERROR),!1):(this._dialog=a,!0)}}_receiveReinvite(n){A.debug("receiveReinvite()");const s=n.hasHeader("Content-Type")?n.getHeader("Content-Type").toLowerCase():void 0,o={request:n,callback:void 0,reject:t.bind(this)};let c=!1;function t(p={}){c=!0;const a=p.status_code||403,g=p.reason_phrase||"",m=ie.cloneArray(p.extraHeaders);if(this._status!==R.STATUS_CONFIRMED)return!1;if(a<300||a>=700)throw new TypeError(`Invalid status_code: ${a}`);n.reply(a,g,m)}if(this.emit("reinvite",o),c)return;if(this._late_sdp=!1,!n.body){this._late_sdp=!0,this._remoteHold&&(this._remoteHold=!1,this._onunhold("remote")),this._connectionPromiseQueue=this._connectionPromiseQueue.then(()=>this._createLocalDescription("offer",this._rtcOfferConstraints)).then(p=>{d.call(this,p)}).catch(()=>{n.reply(500)});return}if(s!=="application/sdp"){A.debug("invalid Content-Type"),n.reply(415);return}this._processInDialogSdpOffer(n).then(p=>{this._status!==R.STATUS_TERMINATED&&d.call(this,p)}).catch(p=>{A.warn(p)});function d(p){const a=[`Contact: ${this._contact}`];this._handleSessionTimersInIncomingRequest(n,a),this._late_sdp&&(p=this._mangleOffer(p)),n.reply(200,null,a,p,()=>{this._status=R.STATUS_WAITING_FOR_ACK,this._setInvite2xxTimer(n,p),this._setACKTimer()}),typeof o.callback=="function"&&o.callback()}}_receiveUpdate(n){A.debug("receiveUpdate()");const s=n.hasHeader("Content-Type")?n.getHeader("Content-Type").toLowerCase():void 0,o={request:n,callback:void 0,reject:t.bind(this)};let c=!1;function t(p={}){c=!0;const a=p.status_code||403,g=p.reason_phrase||"",m=ie.cloneArray(p.extraHeaders);if(this._status!==R.STATUS_CONFIRMED)return!1;if(a<300||a>=700)throw new TypeError(`Invalid status_code: ${a}`);n.reply(a,g,m)}if(this.emit("update",o),c)return;if(!n.body){d.call(this,null);return}if(s!=="application/sdp"){A.debug("invalid Content-Type"),n.reply(415);return}this._processInDialogSdpOffer(n).then(p=>{this._status!==R.STATUS_TERMINATED&&d.call(this,p)}).catch(p=>{A.warn(p)});function d(p){const a=[`Contact: ${this._contact}`];this._handleSessionTimersInIncomingRequest(n,a),n.reply(200,null,a,p),typeof o.callback=="function"&&o.callback()}}_processInDialogSdpOffer(n){A.debug("_processInDialogSdpOffer()");const s=n.parseSDP();let o=!1;for(const d of s.media){if(os.indexOf(d.type)===-1)continue;const p=d.direction||s.direction||"sendrecv";if(p==="sendonly"||p==="inactive")o=!0;else{o=!1;break}}const c={originator:"remote",type:"offer",sdp:n.body};A.debug('emit "sdp"'),this.emit("sdp",c);const t=new RTCSessionDescription({type:"offer",sdp:c.sdp});return this._connectionPromiseQueue=this._connectionPromiseQueue.then(()=>{if(this._status===R.STATUS_TERMINATED)throw new Error("terminated");return this._connection.setRemoteDescription(t).catch(d=>{throw n.reply(488),A.warn('emit "peerconnection:setremotedescriptionfailed" [error:%o]',d),this.emit("peerconnection:setremotedescriptionfailed",d),d})}).then(()=>{if(this._status===R.STATUS_TERMINATED)throw new Error("terminated");this._remoteHold===!0&&o===!1?(this._remoteHold=!1,this._onunhold("remote")):this._remoteHold===!1&&o===!0&&(this._remoteHold=!0,this._onhold("remote"))}).then(()=>{if(this._status===R.STATUS_TERMINATED)throw new Error("terminated");return this._createLocalDescription("answer",this._rtcAnswerConstraints).catch(d=>{throw n.reply(500),A.warn('emit "peerconnection:createtelocaldescriptionfailed" [error:%o]',d),d})}).catch(d=>{A.warn("_processInDialogSdpOffer() failed [error: %o]",d)}),this._connectionPromiseQueue}_receiveRefer(n){if(A.debug("receiveRefer()"),!n.refer_to){A.debug("no Refer-To header field present in REFER"),n.reply(400);return}if(n.refer_to.uri.scheme!==x.SIP){A.debug("Refer-To header field points to a non-SIP URI scheme"),n.reply(416);return}n.reply(202);const s=new co(this,n.cseq);A.debug('emit "refer"'),this.emit("refer",{request:n,accept:(t,d)=>{o.call(this,t,d)},reject:()=>{c.call(this)}});function o(t,d={}){if(t=typeof t=="function"?t:null,this._status!==R.STATUS_WAITING_FOR_ACK&&this._status!==R.STATUS_CONFIRMED)return!1;const p=new zr(this._ua);if(p.on("progress",({response:g})=>{s.notify(g.status_code,g.reason_phrase)}),p.on("accepted",({response:g})=>{s.notify(g.status_code,g.reason_phrase)}),p.on("_failed",({message:g,cause:m})=>{g?s.notify(g.status_code,g.reason_phrase):s.notify(487,m)}),n.refer_to.uri.hasHeader("replaces")){const g=decodeURIComponent(n.refer_to.uri.getHeader("replaces"));d.extraHeaders=ie.cloneArray(d.extraHeaders),d.extraHeaders.push(`Replaces: ${g}`)}const a=n.refer_to.uri.clone();a.clearHeaders(),p.connect(a,d,t)}function c(){s.notify(603)}}_receiveNotify(n){switch(A.debug("receiveNotify()"),n.event||n.reply(400),n.event.event){case"refer":{let s,o;if(n.event.params&&n.event.params.id)s=n.event.params.id,o=this._referSubscribers[s];else if(Object.keys(this._referSubscribers).length===1)o=this._referSubscribers[Object.keys(this._referSubscribers)[0]];else{n.reply(400,"Missing event id parameter");return}if(!o){n.reply(481,"Subscription does not exist");return}o.receiveNotify(n),n.reply(200);break}default:n.reply(489)}}_receiveReplaces(n){A.debug("receiveReplaces()");function s(c){if(this._status!==R.STATUS_WAITING_FOR_ACK&&this._status!==R.STATUS_CONFIRMED)return!1;const t=new zr(this._ua);t.on("confirmed",()=>{this.terminate()}),t.init_incoming(n,c)}function o(){A.debug("Replaced INVITE rejected by the user"),n.reply(486)}this.emit("replaces",{request:n,accept:c=>{s.call(this,c)},reject:()=>{o.call(this)}})}_sendInitialRequest(n,s,o){const c=new uo(this._ua,this._request,{onRequestTimeout:()=>{this.onRequestTimeout()},onTransportError:()=>{this.onTransportError()},onAuthenticated:t=>{this._request=t},onReceiveResponse:t=>{this._receiveInviteResponse(t)}});Promise.resolve().then(()=>{if(o)return o;if(n.audio||n.video)return this._localMediaStreamLocallyGenerated=!0,navigator.mediaDevices.getUserMedia(n).catch(t=>{throw this._status===R.STATUS_TERMINATED?new Error("terminated"):(this._failed("local",null,x.causes.USER_DENIED_MEDIA_ACCESS),A.warn('emit "getusermediafailed" [error:%o]',t),this.emit("getusermediafailed",t),t)})}).then(t=>{if(this._status===R.STATUS_TERMINATED)throw new Error("terminated");return this._localMediaStream=t,t&&t.getTracks().forEach(d=>{this._connection.addTrack(d,t)}),this._connecting(this._request),this._createLocalDescription("offer",s).catch(d=>{throw this._failed("local",null,x.causes.WEBRTC_ERROR),d})}).then(t=>{if(this._is_canceled||this._status===R.STATUS_TERMINATED)throw new Error("terminated");this._request.body=t,this._status=R.STATUS_INVITE_SENT,A.debug('emit "sending" [request:%o]',this._request),this.emit("sending",{request:this._request}),c.send()}).catch(t=>{this._status!==R.STATUS_TERMINATED&&A.warn(t)})}_getDTMFRTPSender(){const n=this._connection.getSenders().find(s=>s.track&&s.track.kind==="audio");if(!(n&&n.dtmf)){A.warn("sendDTMF() | no local audio track to send DTMF with");return}return n.dtmf}_receiveInviteResponse(n){if(A.debug("receiveInviteResponse()"),this._dialog&&n.status_code>=200&&n.status_code<=299)if(this._dialog.id.call_id===n.call_id&&this._dialog.id.local_tag===n.from_tag&&this._dialog.id.remote_tag===n.to_tag){this.sendRequest(x.ACK);return}else{const s=new as(this,n,"UAC");if(s.error!==void 0){A.debug(s.error);return}this.sendRequest(x.ACK),this.sendRequest(x.BYE);return}if(this._is_canceled){n.status_code>=100&&n.status_code<200?this._request.cancel(this._cancel_reason):n.status_code>=200&&n.status_code<299&&this._acceptAndTerminate(n);return}if(!(this._status!==R.STATUS_INVITE_SENT&&this._status!==R.STATUS_1XX_RECEIVED))switch(!0){case/^100$/.test(n.status_code):{this._status=R.STATUS_1XX_RECEIVED;break}case/^1[0-9]{2}$/.test(n.status_code):{if(!n.to_tag){A.debug("1xx response received without to tag");break}if(n.hasHeader("contact")&&!this._createDialog(n,"UAC",!0))break;if(this._status=R.STATUS_1XX_RECEIVED,!n.body){this._progress("remote",n);break}const s={originator:"remote",type:"answer",sdp:n.body};A.debug('emit "sdp"'),this.emit("sdp",s);const o=new RTCSessionDescription({type:"answer",sdp:s.sdp});this._connectionPromiseQueue=this._connectionPromiseQueue.then(()=>this._connection.setRemoteDescription(o)).then(()=>this._progress("remote",n)).catch(c=>{A.warn('emit "peerconnection:setremotedescriptionfailed" [error:%o]',c),this.emit("peerconnection:setremotedescriptionfailed",c)});break}case/^2[0-9]{2}$/.test(n.status_code):{if(this._status=R.STATUS_CONFIRMED,!n.body){this._acceptAndTerminate(n,400,x.causes.MISSING_SDP),this._failed("remote",n,x.causes.BAD_MEDIA_DESCRIPTION);break}if(!this._createDialog(n,"UAC"))break;const s={originator:"remote",type:"answer",sdp:n.body};A.debug('emit "sdp"'),this.emit("sdp",s);const o=new RTCSessionDescription({type:"answer",sdp:s.sdp});this._connectionPromiseQueue=this._connectionPromiseQueue.then(()=>{if(this._connection.signalingState==="stable")return this._connection.createOffer(this._rtcOfferConstraints).then(c=>this._connection.setLocalDescription(c)).catch(c=>{this._acceptAndTerminate(n,500,c.toString()),this._failed("local",n,x.causes.WEBRTC_ERROR)})}).then(()=>{this._connection.setRemoteDescription(o).then(()=>{this._handleSessionTimersInIncomingResponse(n),this._accepted("remote",n),this.sendRequest(x.ACK),this._confirmed("local",null)}).catch(c=>{this._acceptAndTerminate(n,488,"Not Acceptable Here"),this._failed("remote",n,x.causes.BAD_MEDIA_DESCRIPTION),A.warn('emit "peerconnection:setremotedescriptionfailed" [error:%o]',c),this.emit("peerconnection:setremotedescriptionfailed",c)})});break}default:{const s=ie.sipErrorCause(n.status_code);this._failed("remote",n,s)}}}_sendReinvite(n={}){A.debug("sendReinvite()");const s=ie.cloneArray(n.extraHeaders),o=ie.cloneObject(n.eventHandlers),c=n.rtcOfferConstraints||this._rtcOfferConstraints||null;let t=!1;s.push(`Contact: ${this._contact}`),s.push("Content-Type: application/sdp"),this._sessionTimers.running&&s.push(`Session-Expires: ${this._sessionTimers.currentExpires};refresher=${this._sessionTimers.refresher?"uac":"uas"}`),this._connectionPromiseQueue=this._connectionPromiseQueue.then(()=>this._createLocalDescription("offer",c)).then(a=>{a=this._mangleOffer(a);const g={originator:"local",type:"offer",sdp:a};A.debug('emit "sdp"'),this.emit("sdp",g),this.sendRequest(x.INVITE,{extraHeaders:s,body:a,eventHandlers:{onSuccessResponse:m=>{d.call(this,m),t=!0},onErrorResponse:m=>{p.call(this,m)},onTransportError:()=>{this.onTransportError()},onRequestTimeout:()=>{this.onRequestTimeout()},onDialogError:()=>{this.onDialogError()}}})}).catch(()=>{p()});function d(a){if(this._status===R.STATUS_TERMINATED||(this.sendRequest(x.ACK),t))return;if(this._handleSessionTimersInIncomingResponse(a),a.body){if(!a.hasHeader("Content-Type")||a.getHeader("Content-Type").toLowerCase()!=="application/sdp"){p.call(this);return}}else{p.call(this);return}const g={originator:"remote",type:"answer",sdp:a.body};A.debug('emit "sdp"'),this.emit("sdp",g);const m=new RTCSessionDescription({type:"answer",sdp:g.sdp});this._connectionPromiseQueue=this._connectionPromiseQueue.then(()=>this._connection.setRemoteDescription(m)).then(()=>{o.succeeded&&o.succeeded(a)}).catch(S=>{p.call(this),A.warn('emit "peerconnection:setremotedescriptionfailed" [error:%o]',S),this.emit("peerconnection:setremotedescriptionfailed",S)})}function p(a){o.failed&&o.failed(a)}}_sendUpdate(n={}){A.debug("sendUpdate()");const s=ie.cloneArray(n.extraHeaders),o=ie.cloneObject(n.eventHandlers),c=n.rtcOfferConstraints||this._rtcOfferConstraints||null,t=n.sdpOffer||!1;let d=!1;s.push(`Contact: ${this._contact}`),this._sessionTimers.running&&s.push(`Session-Expires: ${this._sessionTimers.currentExpires};refresher=${this._sessionTimers.refresher?"uac":"uas"}`),t?(s.push("Content-Type: application/sdp"),this._connectionPromiseQueue=this._connectionPromiseQueue.then(()=>this._createLocalDescription("offer",c)).then(g=>{g=this._mangleOffer(g);const m={originator:"local",type:"offer",sdp:g};A.debug('emit "sdp"'),this.emit("sdp",m),this.sendRequest(x.UPDATE,{extraHeaders:s,body:g,eventHandlers:{onSuccessResponse:S=>{p.call(this,S),d=!0},onErrorResponse:S=>{a.call(this,S)},onTransportError:()=>{this.onTransportError()},onRequestTimeout:()=>{this.onRequestTimeout()},onDialogError:()=>{this.onDialogError()}}})}).catch(()=>{a.call(this)})):this.sendRequest(x.UPDATE,{extraHeaders:s,eventHandlers:{onSuccessResponse:g=>{p.call(this,g)},onErrorResponse:g=>{a.call(this,g)},onTransportError:()=>{this.onTransportError()},onRequestTimeout:()=>{this.onRequestTimeout()},onDialogError:()=>{this.onDialogError()}}});function p(g){if(this._status!==R.STATUS_TERMINATED&&!d)if(this._handleSessionTimersInIncomingResponse(g),t){if(g.body){if(!g.hasHeader("Content-Type")||g.getHeader("Content-Type").toLowerCase()!=="application/sdp"){a.call(this);return}}else{a.call(this);return}const m={originator:"remote",type:"answer",sdp:g.body};A.debug('emit "sdp"'),this.emit("sdp",m);const S=new RTCSessionDescription({type:"answer",sdp:m.sdp});this._connectionPromiseQueue=this._connectionPromiseQueue.then(()=>this._connection.setRemoteDescription(S)).then(()=>{o.succeeded&&o.succeeded(g)}).catch(O=>{a.call(this),A.warn('emit "peerconnection:setremotedescriptionfailed" [error:%o]',O),this.emit("peerconnection:setremotedescriptionfailed",O)})}else o.succeeded&&o.succeeded(g)}function a(g){o.failed&&o.failed(g)}}_acceptAndTerminate(n,s,o){A.debug("acceptAndTerminate()");const c=[];s&&(o=o||x.REASON_PHRASE[s]||"",c.push(`Reason: SIP ;cause=${s}; text="${o}"`)),(this._dialog||this._createDialog(n,"UAC"))&&(this.sendRequest(x.ACK),this.sendRequest(x.BYE,{extraHeaders:c})),this._status=R.STATUS_TERMINATED}_mangleOffer(n){if(!this._localHold&&!this._remoteHold)return n;if(n=Un.parse(n),this._localHold&&!this._remoteHold){A.debug("mangleOffer() | me on hold, mangling offer");for(const s of n.media)os.indexOf(s.type)!==-1&&(s.direction?s.direction==="sendrecv"?s.direction="sendonly":s.direction==="recvonly"&&(s.direction="inactive"):s.direction="sendonly")}else if(this._localHold&&this._remoteHold){A.debug("mangleOffer() | both on hold, mangling offer");for(const s of n.media)os.indexOf(s.type)!==-1&&(s.direction="inactive")}else if(this._remoteHold){A.debug("mangleOffer() | remote on hold, mangling offer");for(const s of n.media)os.indexOf(s.type)!==-1&&(s.direction?s.direction==="sendrecv"?s.direction="recvonly":s.direction==="recvonly"&&(s.direction="inactive"):s.direction="recvonly")}return Un.write(n)}_setLocalMediaStatus(){let n=!0,s=!0;(this._localHold||this._remoteHold)&&(n=!1,s=!1),this._audioMuted&&(n=!1),this._videoMuted&&(s=!1),this._toggleMuteAudio(!n),this._toggleMuteVideo(!s)}_handleSessionTimersInIncomingRequest(n,s){if(!this._sessionTimers.enabled)return;let o;n.session_expires&&n.session_expires>=x.MIN_SESSION_EXPIRES?(this._sessionTimers.currentExpires=n.session_expires,o=n.session_expires_refresher||"uas"):(this._sessionTimers.currentExpires=this._sessionTimers.defaultExpires,o="uas"),s.push(`Session-Expires: ${this._sessionTimers.currentExpires};refresher=${o}`),this._sessionTimers.refresher=o==="uas",this._runSessionTimer()}_handleSessionTimersInIncomingResponse(n){if(!this._sessionTimers.enabled)return;let s;n.session_expires&&n.session_expires>=x.MIN_SESSION_EXPIRES?(this._sessionTimers.currentExpires=n.session_expires,s=n.session_expires_refresher||"uac"):(this._sessionTimers.currentExpires=this._sessionTimers.defaultExpires,s="uac"),this._sessionTimers.refresher=s==="uac",this._runSessionTimer()}_runSessionTimer(){const n=this._sessionTimers.currentExpires;this._sessionTimers.running=!0,clearTimeout(this._sessionTimers.timer),this._sessionTimers.refresher?this._sessionTimers.timer=setTimeout(()=>{this._status!==R.STATUS_TERMINATED&&this.isReadyToReOffer()&&(A.debug("runSessionTimer() | sending session refresh request"),this._sessionTimers.refreshMethod===x.UPDATE?this._sendUpdate():this._sendReinvite())},n*500):this._sessionTimers.timer=setTimeout(()=>{this._status!==R.STATUS_TERMINATED&&(A.warn("runSessionTimer() | timer expired, terminating the session"),this.terminate({cause:x.causes.REQUEST_TIMEOUT,status_code:408,reason_phrase:"Session Timer Expired"}))},n*1100)}_toggleMuteAudio(n){const s=this._connection.getSenders().filter(o=>o.track&&o.track.kind==="audio");for(const o of s)o.track.enabled=!n}_toggleMuteVideo(n){const s=this._connection.getSenders().filter(o=>o.track&&o.track.kind==="video");for(const o of s)o.track.enabled=!n}_newRTCSession(n,s){A.debug("newRTCSession()"),this._ua.newRTCSession(this,{originator:n,session:this,request:s})}_connecting(n){A.debug("session connecting"),A.debug('emit "connecting"'),this.emit("connecting",{request:n})}_progress(n,s){A.debug("session progress"),A.debug('emit "progress"'),this.emit("progress",{originator:n,response:s||null})}_accepted(n,s){A.debug("session accepted"),this._start_time=new Date,A.debug('emit "accepted"'),this.emit("accepted",{originator:n,response:s||null})}_confirmed(n,s){A.debug("session confirmed"),this._is_confirmed=!0,A.debug('emit "confirmed"'),this.emit("confirmed",{originator:n,ack:s||null})}_ended(n,s,o){A.debug("session ended"),this._end_time=new Date,this._close(),A.debug('emit "ended"'),this.emit("ended",{originator:n,message:s||null,cause:o})}_failed(n,s,o){A.debug("session failed"),A.debug('emit "_failed"'),this.emit("_failed",{originator:n,message:s||null,cause:o}),this._close(),A.debug('emit "failed"'),this.emit("failed",{originator:n,message:s||null,cause:o})}_onhold(n){A.debug("session onhold"),this._setLocalMediaStatus(),A.debug('emit "hold"'),this.emit("hold",{originator:n})}_onunhold(n){A.debug("session onunhold"),this._setLocalMediaStatus(),A.debug('emit "unhold"'),this.emit("unhold",{originator:n})}_onmute({audio:n,video:s}){A.debug("session onmute"),this._setLocalMediaStatus(),A.debug('emit "muted"'),this.emit("muted",{audio:n,video:s})}_onunmute({audio:n,video:s}){A.debug("session onunmute"),this._setLocalMediaStatus(),A.debug('emit "unmuted"'),this.emit("unmuted",{audio:n,video:s})}};const ho=Fe.EventEmitter,_o=He,po=pe,er=oe,Ke=Ce(),mo=$e(),go=ke,To=Ct,Eo=Js,Ee=new po("Subscriber"),Y={SUBSCRIBE_RESPONSE_TIMEOUT:0,SUBSCRIBE_TRANSPORT_ERROR:1,SUBSCRIBE_NON_OK_RESPONSE:2,SUBSCRIBE_WRONG_OK_RESPONSE:3,SUBSCRIBE_AUTHENTICATION_FAILED:4,UNSUBSCRIBE_TIMEOUT:5,FINAL_NOTIFY_RECEIVED:6,WRONG_NOTIFY_RECEIVED:7,STATE_PENDING:0,STATE_ACTIVE:1,STATE_TERMINATED:2,STATE_INIT:3,STATE_WAITING_NOTIFY:4,DEFAULT_EXPIRES_SEC:900};var So=class extends ho{static get C(){return Y}constructor(n,s,o,c,{expires:t,contentType:d,allowEvents:p,params:a,extraHeaders:g}){if(Ee.debug("new"),super(),!s)throw new TypeError("Not enough arguments: Missing target");if(!o)throw new TypeError("Not enough arguments: Missing eventName");if(!c)throw new TypeError("Not enough arguments: Missing accept");const m=mo.parse(o,"Event");if(m===-1)throw new TypeError("Missing Event header field");this._ua=n,this._target=s,(!Ke.isDecimal(t)||t<=0)&&(t=Y.DEFAULT_EXPIRES_SEC),this._expires=t,this._content_type=d,this._params=Ke.cloneObject(a),this._params.from_uri||(this._params.from_uri=this._ua.configuration.uri),this._params.from_tag=Ke.newTag(),this._params.to_tag=null,this._params.call_id=Ke.createRandomToken(20),this._params.cseq===void 0&&(this._params.cseq=Math.floor(Math.random()*1e4+1)),this._state=Y.STATE_INIT,this._dialog=null,this._expires_timer=null,this._expires_timestamp=null,this._terminated=!1,this._event_name=m.event,this._event_id=m.params&&m.params.id;let S=this._event_name;if(this._event_id&&(S+=`;id=${this._event_id}`),this._headers=Ke.cloneArray(g),this._headers=this._headers.concat([`Event: ${S}`,`Expires: ${this._expires}`,`Accept: ${c}`]),!this._headers.find(O=>O.startsWith("Contact"))){const O=`Contact: ${this._ua._contact.toString()}`;this._headers.push(O)}p&&this._headers.push(`Allow-Events: ${p}`),this._queue=[],this._data={}}get C(){return Y}get state(){return this._state}get id(){return this._dialog?this._dialog.id:null}get data(){return this._data}set data(n){this._data=n}onRequestTimeout(){this._terminateDialog(Y.SUBSCRIBE_RESPONSE_TIMEOUT)}onTransportError(){this._terminateDialog(Y.SUBSCRIBE_TRANSPORT_ERROR)}receiveRequest(n){if(n.method!==er.NOTIFY){Ee.warn("received non-NOTIFY request"),n.reply(405);return}const s=n.parseHeader("Event");if(!s){Ee.warn("missing Event header"),n.reply(400),this._terminateDialog(Y.WRONG_NOTIFY_RECEIVED);return}const o=s.event,c=s.params&&s.params.id;if(o!==this._event_name||c!==this._event_id){Ee.warn("Event header does not match the one in SUBSCRIBE request"),n.reply(489),this._terminateDialog(Y.WRONG_NOTIFY_RECEIVED);return}const t=n.parseHeader("subscription-state");if(!t){Ee.warn("missing Subscription-State header"),n.reply(400),this._terminateDialog(Y.WRONG_NOTIFY_RECEIVED);return}const d=this._parseSubscriptionState(t.state);if(d===void 0){Ee.warn(`Invalid Subscription-State header value: ${t.state}`),n.reply(400),this._terminateDialog(Y.WRONG_NOTIFY_RECEIVED);return}n.reply(200);const p=this._state;if(p!==Y.STATE_TERMINATED&&d!==Y.STATE_TERMINATED&&(this._state=d,t.expires!==void 0)){const m=t.expires,S=new Date().getTime()+m*1e3;this._expires_timestamp-S>2e3&&(Ee.debug("update sending re-SUBSCRIBE time"),this._scheduleSubscribe(m))}p!==Y.STATE_PENDING&&d===Y.STATE_PENDING?(Ee.debug('emit "pending"'),this.emit("pending")):p!==Y.STATE_ACTIVE&&d===Y.STATE_ACTIVE&&(Ee.debug('emit "active"'),this.emit("active"));const a=n.body,g=d===Y.STATE_TERMINATED;if(a){const m=n.getHeader("content-type");Ee.debug('emit "notify"'),this.emit("notify",g,n,a,m)}if(g){const m=t.reason;let S;t.params&&t.params["retry-after"]!==void 0&&(S=parseInt(t.params["retry-after"])),this._terminateDialog(Y.FINAL_NOTIFY_RECEIVED,m,S)}}subscribe(n=null){Ee.debug("subscribe()"),this._state===Y.STATE_INIT?this._sendInitialSubscribe(n,this._headers):this._sendSubsequentSubscribe(n,this._headers)}terminate(n=null){if(Ee.debug("terminate()"),this._state===Y.STATE_INIT)throw new _o.InvalidStateError(this._state);if(this._terminated)return;this._terminated=!0;const s=this._headers.map(o=>o.startsWith("Expires")?"Expires: 0":o);this._sendSubsequentSubscribe(n,s)}_terminateDialog(n,s=void 0,o=void 0){this._state!==Y.STATE_TERMINATED&&(this._state=Y.STATE_TERMINATED,clearTimeout(this._expires_timer),this._dialog&&(this._dialog.terminate(),this._dialog=null),Ee.debug(`emit "terminated" code=${n}`),this.emit("terminated",n,s,o))}_sendInitialSubscribe(n,s){if(n){if(!this._content_type)throw new TypeError("content_type is undefined");s=Ke.cloneArray(s),s.push(`Content-Type: ${this._content_type}`)}this._state=Y.STATE_WAITING_NOTIFY;const o=new go.OutgoingRequest(er.SUBSCRIBE,this._ua.normalizeTarget(this._target),this._ua,this._params,s,n);new To(this._ua,o,{onRequestTimeout:()=>{this.onRequestTimeout()},onTransportError:()=>{this.onTransportError()},onReceiveResponse:t=>{this._receiveSubscribeResponse(t)}}).send()}_sendSubsequentSubscribe(n,s){if(this._state!==Y.STATE_TERMINATED){if(!this._dialog){Ee.debug("enqueue subscribe"),this._queue.push({body:n,headers:Ke.cloneArray(s)});return}if(n){if(!this._content_type)throw new TypeError("content_type is undefined");s=Ke.cloneArray(s),s.push(`Content-Type: ${this._content_type}`)}this._dialog.sendRequest(er.SUBSCRIBE,{body:n,extraHeaders:s,eventHandlers:{onRequestTimeout:()=>{this.onRequestTimeout()},onTransportError:()=>{this.onTransportError()},onSuccessResponse:o=>{this._receiveSubscribeResponse(o)},onErrorResponse:o=>{this._receiveSubscribeResponse(o)},onDialogError:o=>{this._receiveSubscribeResponse(o)}}})}}_receiveSubscribeResponse(n){if(this._state!==Y.STATE_TERMINATED)if(n.status_code>=200&&n.status_code<300){if(this._dialog===null){const c=new Eo(this,n,"UAC");if(c.error){Ee.warn(c.error),this._terminateDialog(Y.SUBSCRIBE_WRONG_OK_RESPONSE);return}this._dialog=c,Ee.debug('emit "accepted"'),this.emit("accepted");for(const t of this._queue)Ee.debug("dequeue subscribe"),this._sendSubsequentSubscribe(t.body,t.headers)}const s=n.getHeader("expires");let o=parseInt(s);(!Ke.isDecimal(o)||o<=0)&&(Ee.warn(`response without Expires header, setting a default value of ${Y.DEFAULT_EXPIRES_SEC}`),o=Y.DEFAULT_EXPIRES_SEC),o>0&&this._scheduleSubscribe(o)}else n.status_code===401||n.status_code===407?this._terminateDialog(Y.SUBSCRIBE_AUTHENTICATION_FAILED):n.status_code>=300&&this._terminateDialog(Y.SUBSCRIBE_NON_OK_RESPONSE)}_scheduleSubscribe(n){const s=n>=140?n*1e3/2+Math.floor((n/2-70)*1e3*Math.random()):n*1e3-5e3;this._expires_timestamp=new Date().getTime()+n*1e3,Ee.debug(`next SUBSCRIBE will be sent in ${Math.floor(s/1e3)} sec`),clearTimeout(this._expires_timer),this._expires_timer=setTimeout(()=>{this._expires_timer=null,this._sendSubsequentSubscribe(null,this._headers)},s)}_parseSubscriptionState(n){switch(n){case"pending":return Y.STATE_PENDING;case"active":return Y.STATE_ACTIVE;case"terminated":return Y.STATE_TERMINATED;case"init":return Y.STATE_INIT;case"notify_wait":return Y.STATE_WAITING_NOTIFY;default:return}}};const Co=Fe.EventEmitter,tr=He,Ao=pe,sr=oe,us=Ce(),vo=Js,De=new Ao("Notifier"),se={NOTIFY_RESPONSE_TIMEOUT:0,NOTIFY_TRANSPORT_ERROR:1,NOTIFY_NON_OK_RESPONSE:2,NOTIFY_AUTHENTICATION_FAILED:3,FINAL_NOTIFY_SENT:4,UNSUBSCRIBE_RECEIVED:5,SUBSCRIPTION_EXPIRED:6,STATE_PENDING:0,STATE_ACTIVE:1,STATE_TERMINATED:2,DEFAULT_EXPIRES_SEC:900};var Ro=class Xr extends Co{static get C(){return se}static init_incoming(n,s){try{Xr.checkSubscribe(n)}catch(o){De.warn("Notifier.init_incoming: invalid request. Error: ",o.message),n.reply(405);return}s()}static checkSubscribe(n){if(!n)throw new TypeError("Not enough arguments. Missing subscribe request");if(n.method!==sr.SUBSCRIBE)throw new TypeError("Invalid method for Subscribe request");if(!n.hasHeader("contact"))throw new TypeError("Missing Contact header in subscribe request");if(!n.hasHeader("event"))throw new TypeError("Missing Event header in subscribe request");const s=n.getHeader("expires");if(s){const o=parseInt(s);if(!us.isDecimal(o)||o<0)throw new TypeError("Invalid Expires header field in subscribe request")}}constructor(n,s,o,{extraHeaders:c,allowEvents:t,pending:d,defaultExpires:p}){if(De.debug("new"),super(),!o)throw new TypeError("Not enough arguments. Missing contentType");Xr.checkSubscribe(s);const a=s.getHeader("event");this._ua=n,this._initial_subscribe=s,this._expires_timestamp=null,this._expires_timer=null,this._defaultExpires=p||se.DEFAULT_EXPIRES_SEC,this._state=d?se.STATE_PENDING:se.STATE_ACTIVE,this._content_type=o,this._headers=us.cloneArray(c),this._headers.push(`Event: ${a}`),this._contact=this._headers.find(g=>g.startsWith("Contact")),this._contact||(this._contact=`Contact: ${this._ua._contact.toString()}`,this._headers.push(this._contact)),t&&this._headers.push(`Allow-Events: ${t}`),this._target=s.from.uri.user,s.to_tag=us.newTag(),this._data={}}get C(){return se}get state(){return this._state}get id(){return this._dialog?this._dialog.id:null}get data(){return this._data}set data(n){this._data=n}receiveRequest(n){if(n.method!==sr.SUBSCRIBE){n.reply(405);return}this._setExpires(n),this._dialog||(this._dialog=new vo(this,n,"UAS")),n.reply(200,null,[`Expires: ${this._expires}`,`${this._contact}`]);const s=n.body,o=n.getHeader("content-type"),c=this._expires===0;c||this._setExpiresTimer(),De.debug('emit "subscribe"'),this.emit("subscribe",c,n,s,o),c&&this._terminateDialog(se.UNSUBSCRIBE_RECEIVED)}start(){if(De.debug("start()"),this._state===se.STATE_TERMINATED)throw new tr.InvalidStateError(this._state);this.receiveRequest(this._initial_subscribe)}setActiveState(){if(De.debug("setActiveState()"),this._state===se.STATE_TERMINATED)throw new tr.InvalidStateError(this._state);this._state===se.STATE_PENDING&&(this._state=se.STATE_ACTIVE)}notify(n=null){if(De.debug("notify()"),this._state===se.STATE_TERMINATED)throw new tr.InvalidStateError(this._state);const s=Math.floor((this._expires_timestamp-new Date().getTime())/1e3);s<=0?(this._expires_timer||De.error("expires timer is not set"),clearTimeout(this._expires_timer),this.terminate(n,"timeout")):this._sendNotify([`;expires=${s}`],n)}terminate(n=null,s=null,o=null){if(De.debug("terminate()"),this._state===se.STATE_TERMINATED)return;const c=[];s&&c.push(`;reason=${s}`),o!==null&&c.push(`;retry-after=${o}`),this._sendNotify(c,n,null,"terminated"),this._terminateDialog(s==="timeout"?se.SUBSCRIPTION_EXPIRED:se.FINAL_NOTIFY_SENT)}_terminateDialog(n){this._state!==se.STATE_TERMINATED&&(this._state=se.STATE_TERMINATED,clearTimeout(this._expires_timer),this._dialog&&(this._dialog.terminate(),this._dialog=null),De.debug(`emit "terminated" code=${n}`),this.emit("terminated",n))}_setExpires(n){n.hasHeader("expires")?this._expires=parseInt(n.getHeader("expires")):(this._expires=this._defaultExpires,De.debug(`missing Expires header field, default value set: ${this._expires}`))}_sendNotify(n,s=null,o=null,c=null){if(this._state===se.STATE_TERMINATED){De.warn("final notify already sent");return}let t=`Subscription-State: ${c||this._parseState()}`;for(const p of n)t+=p;let d=us.cloneArray(this._headers);d.push(t),o&&(d=d.concat(o)),s&&d.push(`Content-Type: ${this._content_type}`),this._dialog.sendRequest(sr.NOTIFY,{body:s,extraHeaders:d,eventHandlers:{onRequestTimeout:()=>{this._terminateDialog(se.NOTIFY_RESPONSE_TIMEOUT)},onTransportError:()=>{this._terminateDialog(se.NOTIFY_TRANSPORT_ERROR)},onErrorResponse:p=>{p.status_code===401||p.status_code===407?this._terminateDialog(se.NOTIFY_AUTHENTICATION_FAILED):this._terminateDialog(se.NOTIFY_NON_OK_RESPONSE)},onDialogError:()=>{this._terminateDialog(se.NOTIFY_NON_OK_RESPONSE)}}})}_setExpiresTimer(){this._expires_timestamp=new Date().getTime()+this._expires*1e3,clearTimeout(this._expires_timer),this._expires_timer=setTimeout(()=>{this._state!==se.STATE_TERMINATED&&(De.debug('emit "expired"'),this.emit("expired"),this.terminate(null,"timeout"))},this._expires*1e3)}_parseState(){switch(this._state){case se.STATE_PENDING:return"pending";case se.STATE_ACTIVE:return"active";case se.STATE_TERMINATED:return"terminated";default:throw new TypeError("wrong state value")}}};const Io=Fe.EventEmitter,bo=pe,rr=oe,wo=ke,Ht=Ce(),yo=Ct,Hn=He,No=Ze(),cs=new bo("Message");var Oo=class extends Io{constructor(n){super(),this._ua=n,this._request=null,this._closed=!1,this._direction=null,this._local_identity=null,this._remote_identity=null,this._is_replied=!1,this._data={}}get direction(){return this._direction}get local_identity(){return this._local_identity}get remote_identity(){return this._remote_identity}send(n,s,o={}){const c=n;if(n===void 0||s===void 0)throw new TypeError("Not enough arguments");if(n=this._ua.normalizeTarget(n),!n)throw new TypeError(`Invalid target: ${c}`);const t=Ht.cloneArray(o.extraHeaders),d=Ht.cloneObject(o.eventHandlers),p=o.contentType||"text/plain",a={};o.fromUserName&&(a.from_uri=new No("sip",o.fromUserName,this._ua.configuration.uri.host),t.push(`P-Preferred-Identity: ${this._ua.configuration.uri.toString()}`)),o.fromDisplayName&&(a.from_display_name=o.fromDisplayName);for(const m in d)Object.prototype.hasOwnProperty.call(d,m)&&this.on(m,d[m]);t.push(`Content-Type: ${p}`),this._request=new wo.OutgoingRequest(rr.MESSAGE,n,this._ua,a,t),s&&(this._request.body=s);const g=new yo(this._ua,this._request,{onRequestTimeout:()=>{this._onRequestTimeout()},onTransportError:()=>{this._onTransportError()},onReceiveResponse:m=>{this._receiveResponse(m)}});this._newMessage("local",this._request),g.send()}init_incoming(n){this._request=n,this._newMessage("remote",n),this._is_replied||(this._is_replied=!0,n.reply(200)),this._close()}accept(n={}){const s=Ht.cloneArray(n.extraHeaders),o=n.body;if(this._direction!=="incoming")throw new Hn.NotSupportedError('"accept" not supported for outgoing Message');if(this._is_replied)throw new Error("incoming Message already replied");this._is_replied=!0,this._request.reply(200,null,s,o)}reject(n={}){const s=n.status_code||480,o=n.reason_phrase,c=Ht.cloneArray(n.extraHeaders),t=n.body;if(this._direction!=="incoming")throw new Hn.NotSupportedError('"reject" not supported for outgoing Message');if(this._is_replied)throw new Error("incoming Message already replied");if(s<300||s>=700)throw new TypeError(`Invalid status_code: ${s}`);this._is_replied=!0,this._request.reply(s,o,c,t)}_receiveResponse(n){if(!this._closed)switch(!0){case/^1[0-9]{2}$/.test(n.status_code):break;case/^2[0-9]{2}$/.test(n.status_code):{this._succeeded("remote",n);break}default:{const s=Ht.sipErrorCause(n.status_code);this._failed("remote",n,s);break}}}_onRequestTimeout(){this._closed||this._failed("system",null,rr.causes.REQUEST_TIMEOUT)}_onTransportError(){this._closed||this._failed("system",null,rr.causes.CONNECTION_ERROR)}_close(){this._closed=!0,this._ua.destroyMessage(this)}_newMessage(n,s){n==="remote"?(this._direction="incoming",this._local_identity=s.to,this._remote_identity=s.from):n==="local"&&(this._direction="outgoing",this._local_identity=s.from,this._remote_identity=s.to),this._ua.newMessage(this,{originator:n,message:this,request:s})}_failed(n,s,o){cs.debug("MESSAGE failed"),this._close(),cs.debug('emit "failed"'),this.emit("failed",{originator:n,response:s||null,cause:o})}_succeeded(n,s){cs.debug("MESSAGE succeeded"),this._close(),cs.debug('emit "succeeded"'),this.emit("succeeded",{originator:n,response:s})}};const xo=Fe.EventEmitter,Do=pe,nr=oe,Uo=ke,Ft=Ce(),$o=Ct,Fn=He,fs=new Do("Options");var Po=class extends xo{constructor(n){super(),this._ua=n,this._request=null,this._closed=!1,this._direction=null,this._local_identity=null,this._remote_identity=null,this._is_replied=!1,this._data={}}get direction(){return this._direction}get local_identity(){return this._local_identity}get remote_identity(){return this._remote_identity}send(n,s,o={}){const c=n;if(n===void 0)throw new TypeError("A target is required for OPTIONS");if(n=this._ua.normalizeTarget(n),!n)throw new TypeError(`Invalid target: ${c}`);const t=Ft.cloneArray(o.extraHeaders),d=Ft.cloneObject(o.eventHandlers),p=o.contentType||"application/sdp";for(const g in d)Object.prototype.hasOwnProperty.call(d,g)&&this.on(g,d[g]);t.push(`Content-Type: ${p}`),this._request=new Uo.OutgoingRequest(nr.OPTIONS,n,this._ua,null,t),s&&(this._request.body=s);const a=new $o(this._ua,this._request,{onRequestTimeout:()=>{this._onRequestTimeout()},onTransportError:()=>{this._onTransportError()},onReceiveResponse:g=>{this._receiveResponse(g)}});this._newOptions("local",this._request),a.send()}init_incoming(n){this._request=n,this._newOptions("remote",n),this._is_replied||(this._is_replied=!0,n.reply(200)),this._close()}accept(n={}){const s=Ft.cloneArray(n.extraHeaders),o=n.body;if(this._direction!=="incoming")throw new Fn.NotSupportedError('"accept" not supported for outgoing Options');if(this._is_replied)throw new Error("incoming Options already replied");this._is_replied=!0,this._request.reply(200,null,s,o)}reject(n={}){const s=n.status_code||480,o=n.reason_phrase,c=Ft.cloneArray(n.extraHeaders),t=n.body;if(this._direction!=="incoming")throw new Fn.NotSupportedError('"reject" not supported for outgoing Options');if(this._is_replied)throw new Error("incoming Options already replied");if(s<300||s>=700)throw new TypeError(`Invalid status_code: ${s}`);this._is_replied=!0,this._request.reply(s,o,c,t)}_receiveResponse(n){if(!this._closed)switch(!0){case/^1[0-9]{2}$/.test(n.status_code):break;case/^2[0-9]{2}$/.test(n.status_code):{this._succeeded("remote",n);break}default:{const s=Ft.sipErrorCause(n.status_code);this._failed("remote",n,s);break}}}_onRequestTimeout(){this._closed||this._failed("system",null,nr.causes.REQUEST_TIMEOUT)}_onTransportError(){this._closed||this._failed("system",null,nr.causes.CONNECTION_ERROR)}_close(){this._closed=!0,this._ua.destroyMessage(this)}_newOptions(n,s){n==="remote"?(this._direction="incoming",this._local_identity=s.to,this._remote_identity=s.from):n==="local"&&(this._direction="outgoing",this._local_identity=s.from,this._remote_identity=s.to),this._ua.newOptions(this,{originator:n,message:this,request:s})}_failed(n,s,o){fs.debug("OPTIONS failed"),this._close(),fs.debug('emit "failed"'),this.emit("failed",{originator:n,response:s||null,cause:o})}_succeeded(n,s){fs.debug("OPTIONS succeeded"),this._close(),fs.debug('emit "succeeded"'),this.emit("succeeded",{originator:n,response:s})}},lr={};const Mo=pe,ir=Ce(),Lo=$e(),kt=new Mo("Socket");lr.isSocket=f=>{if(Array.isArray(f))return!1;if(typeof f>"u")return kt.warn("undefined JsSIP.Socket instance"),!1;try{if(!ir.isString(f.url))throw kt.warn("missing or invalid JsSIP.Socket url property"),new Error("Missing or invalid JsSIP.Socket url property");if(!ir.isString(f.via_transport))throw kt.warn("missing or invalid JsSIP.Socket via_transport property"),new Error("Missing or invalid JsSIP.Socket via_transport property");if(Lo.parse(f.sip_uri,"SIP_URI")===-1)throw kt.warn("missing or invalid JsSIP.Socket sip_uri property"),new Error("missing or invalid JsSIP.Socket sip_uri property")}catch{return!1}try{["connect","disconnect","send"].forEach(n=>{if(!ir.isFunction(f[n]))throw kt.warn(`missing or invalid JsSIP.Socket method: ${n}`),new Error(`Missing or invalid JsSIP.Socket method: ${n}`)})}catch{return!1}return!0};const Ho=pe,Fo=lr,kn=oe,Ie=new Ho("Transport"),Ue={STATUS_CONNECTED:0,STATUS_CONNECTING:1,STATUS_DISCONNECTED:2,SOCKET_STATUS_READY:0,SOCKET_STATUS_ERROR:1,recovery_options:{min_interval:kn.CONNECTION_RECOVERY_MIN_INTERVAL,max_interval:kn.CONNECTION_RECOVERY_MAX_INTERVAL}};var ko=class{constructor(n,s=Ue.recovery_options){Ie.debug("new()"),this.status=Ue.STATUS_DISCONNECTED,this.socket=null,this.sockets=[],this.recovery_options=s,this.recover_attempts=0,this.recovery_timer=null,this.close_requested=!1;try{this.textDecoder=new TextDecoder("utf8")}catch(o){Ie.warn(`cannot use TextDecoder: ${o}`)}if(typeof n>"u")throw new TypeError("Invalid argument. undefined 'sockets' argument");n instanceof Array||(n=[n]),n.forEach(function(o){if(!Fo.isSocket(o.socket))throw new TypeError("Invalid argument. invalid 'JsSIP.Socket' instance");if(o.weight&&!Number(o.weight))throw new TypeError("Invalid argument. 'weight' attribute is not a number");this.sockets.push({socket:o.socket,weight:o.weight||0,status:Ue.SOCKET_STATUS_READY})},this),this._getSocket()}get via_transport(){return this.socket.via_transport}get url(){return this.socket.url}get sip_uri(){return this.socket.sip_uri}connect(){if(Ie.debug("connect()"),this.isConnected()){Ie.debug("Transport is already connected");return}else if(this.isConnecting()){Ie.debug("Transport is connecting");return}this.close_requested=!1,this.status=Ue.STATUS_CONNECTING,this.onconnecting({socket:this.socket,attempts:this.recover_attempts}),this.close_requested||(this.socket.onconnect=this._onConnect.bind(this),this.socket.ondisconnect=this._onDisconnect.bind(this),this.socket.ondata=this._onData.bind(this),this.socket.connect())}disconnect(){Ie.debug("close()"),this.close_requested=!0,this.recover_attempts=0,this.status=Ue.STATUS_DISCONNECTED,this.recovery_timer!==null&&(clearTimeout(this.recovery_timer),this.recovery_timer=null),this.socket.onconnect=()=>{},this.socket.ondisconnect=()=>{},this.socket.ondata=()=>{},this.socket.disconnect(),this.ondisconnect({socket:this.socket,error:!1})}send(n){if(Ie.debug("send()"),!this.isConnected())return Ie.warn("unable to send message, transport is not connected"),!1;const s=n.toString();return Ie.debug(`sending message:
399
47
 
400
- `+f+`
401
- `);if(this.state!==At.Connected){this.logger.warn("Received message while not connected, discarding...");return}if(this.onMessage)try{this.onMessage(f)}catch(p){throw this.logger.error(p.toString()),this.logger.error("Exception thrown by onMessage callback"),p}}onWebSocketOpen(r,i){i===this._ws&&this._state===At.Connecting&&(this.logger.log(`WebSocket opened ${this.server}`),this.transitionState(At.Connected))}transitionLoopDetectedError(r){let i="A state transition loop has been detected.";return i+=` An attempt to transition from ${this._state} to ${r} before the prior transition completed.`,i+=" Perhaps you are synchronously calling connect() or disconnect() from a callback or state change handler?",this.logger.error(i),new Zh("Loop detected.")}transitionState(r,i){const l=()=>{throw new Error(`Invalid state transition from ${this._state} to ${r}`)};if(this.transitioningState)throw this.transitionLoopDetectedError(r);switch(this.transitioningState=!0,this._state){case At.Connecting:r!==At.Connected&&r!==At.Disconnecting&&r!==At.Disconnected&&l();break;case At.Connected:r!==At.Disconnecting&&r!==At.Disconnected&&l();break;case At.Disconnecting:r!==At.Connecting&&r!==At.Disconnected&&l();break;case At.Disconnected:r!==At.Connecting&&l();break;default:throw new Error("Unknown state.")}const f=this._state;this._state=r;const p=this.connectResolve,v=this.connectReject;f===At.Connecting&&(this.connectPromise=void 0,this.connectResolve=void 0,this.connectReject=void 0);const C=this.disconnectResolve,w=this.disconnectReject;if(f===At.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 ${f} to ${this._state}`),this._stateEventEmitter.emit(this._state),r===At.Connected&&(this.startSendingKeepAlives(),this.onConnect))try{this.onConnect()}catch(S){throw this.logger.error(S.toString()),this.logger.error("Exception thrown by onConnect callback"),S}if(f===At.Connected&&(this.stopSendingKeepAlives(),this.onDisconnect))try{i?this.onDisconnect(i):this.onDisconnect()}catch(S){throw this.logger.error(S.toString()),this.logger.error("Exception thrown by onDisconnect callback"),S}if(f===At.Connecting){if(!p)throw new Error("Connect resolve undefined.");if(!v)throw new Error("Connect reject undefined.");r===At.Connected?p():v(i||new Error("Connect aborted."))}if(f===At.Disconnecting){if(!C)throw new Error("Disconnect resolve undefined.");if(!w)throw new Error("Disconnect reject undefined.");r===At.Disconnected?C():w(i||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
48
+ ${s}
49
+ `),this.socket.send(s)}isConnected(){return this.status===Ue.STATUS_CONNECTED}isConnecting(){return this.status===Ue.STATUS_CONNECTING}_reconnect(){this.recover_attempts+=1;let n=Math.floor(Math.random()*Math.pow(2,this.recover_attempts)+1);n<this.recovery_options.min_interval?n=this.recovery_options.min_interval:n>this.recovery_options.max_interval&&(n=this.recovery_options.max_interval),Ie.debug(`reconnection attempt: ${this.recover_attempts}. next connection attempt in ${n} seconds`),this.recovery_timer=setTimeout(()=>{!this.close_requested&&!(this.isConnected()||this.isConnecting())&&(this._getSocket(),this.connect())},n*1e3)}_getSocket(){let n=[];if(this.sockets.forEach(o=>{o.status!==Ue.SOCKET_STATUS_ERROR&&(n.length===0?n.push(o):o.weight>n[0].weight?n=[o]:o.weight===n[0].weight&&n.push(o))}),n.length===0){this.sockets.forEach(o=>{o.status=Ue.SOCKET_STATUS_READY}),this._getSocket();return}const s=Math.floor(Math.random()*n.length);this.socket=n[s].socket}_onConnect(){this.recover_attempts=0,this.status=Ue.STATUS_CONNECTED,this.recovery_timer!==null&&(clearTimeout(this.recovery_timer),this.recovery_timer=null),this.onconnect({socket:this})}_onDisconnect(n,s,o){this.status=Ue.STATUS_DISCONNECTED,this.ondisconnect({socket:this.socket,error:n,code:s,reason:o}),!this.close_requested&&(this.sockets.forEach(function(c){this.socket===c.socket&&(c.status=Ue.SOCKET_STATUS_ERROR)},this),this._reconnect(n))}_onData(n){if(n===`\r
402
50
  \r
403
- `))}startSendingKeepAlives(){const r=i=>{const l=i*.8;return 1e3*(Math.random()*(i-l)+l)};this.configuration.keepAliveInterval&&!this.keepAliveInterval&&(this.keepAliveInterval=setInterval(()=>{this.sendKeepAlive(),this.startSendingKeepAlives()},r(this.configuration.keepAliveInterval)))}stopSendingKeepAlives(){this.keepAliveInterval&&clearInterval(this.keepAliveInterval),this.keepAliveDebounceTimeout&&clearTimeout(this.keepAliveDebounceTimeout),this.keepAliveInterval=void 0,this.keepAliveDebounceTimeout=void 0}}Av.defaultOptions={server:"",connectionTimeout:5,keepAliveInterval:0,keepAliveDebounce:10,traceSip:!0};class Tc{constructor(r={}){if(this._publishers={},this._registerers={},this._sessions={},this._subscriptions={},this._state=vi.Stopped,this._stateEventEmitter=new Jh,this.delegate=r.delegate,this.options=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Tc.defaultOptions()),{sipjsId:_c(5)}),{uri:new xo("sip","anonymous."+_c(6),"anonymous.invalid")}),{viaHost:_c(12)+".invalid"}),Tc.stripUndefinedProperties(r)),this.options.hackIpInContact)if(typeof this.options.hackIpInContact=="boolean"&&this.options.hackIpInContact){const f=Math.floor(Math.random()*254+1);this.options.viaHost="192.0.2."+f}else this.options.hackIpInContact&&(this.options.viaHost=this.options.hackIpInContact);switch(this.loggerFactory=new JR,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=ui.error;break;case"warn":this.loggerFactory.level=ui.warn;break;case"log":this.loggerFactory.level=ui.log;break;case"debug":this.loggerFactory.level=ui.debug;break}if(this.options.logConfiguration&&(this.logger.log("Configuration:"),Object.keys(this.options).forEach(i=>{const l=this.options[i];switch(i){case"uri":case"sessionDescriptionHandlerFactory":this.logger.log("· "+i+": "+l);break;case"authorizationPassword":this.logger.log("· "+i+": NOT SHOWN");break;case"transportConstructor":this.logger.log("· "+i+": "+l.name);break;default:this.logger.log("· "+i+": "+JSON.stringify(l))}})),this.options.transportOptions){const i=this.options.transportOptions,l=i.maxReconnectionAttempts,f=i.reconnectionTimeout;l!==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.'),f!==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.'),r.reconnectionDelay===void 0&&f!==void 0&&(this.options.reconnectionDelay=f),r.reconnectionAttempts===void 0&&l!==void 0&&(this.options.reconnectionAttempts=l)}if(r.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.'),r.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:Tc.newUUID(),qn.parse(this._instanceId,"uuid")===-1)throw new Error("Invalid instanceId.");this._userAgentCore=this.initCore()}static makeURI(r){return qn.URIParse(r)}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:C8(),sessionDescriptionHandlerFactoryOptions:{},sipExtension100rel:Ps.Unsupported,sipExtensionReplaces:Ps.Unsupported,sipExtensionExtraSupported:[],sipjsId:"",transportConstructor:Av,transportOptions:{},uri:new xo("sip","anonymous","anonymous.invalid"),userAgentString:"SIP.js/"+PR,viaHost:""}}static newUUID(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,i=>{const l=Math.floor(Math.random()*16);return(i==="x"?l:l%4+8).toString(16)})}static stripUndefinedProperties(r){return Object.keys(r).reduce((i,l)=>(r[l]!==void 0&&(i[l]=r[l]),i),{})}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(r,i){return this.loggerFactory.getLogger(r,i)}getLoggerFactory(){return this.loggerFactory}isConnected(){return this.transport.isConnected()}reconnect(){return this.state===vi.Stopped?Promise.reject(new Error("User agent stopped.")):Promise.resolve().then(()=>this.transport.connect())}start(){return this.state===vi.Started?(this.logger.warn("User agent already started"),Promise.resolve()):(this.logger.log(`Starting ${this.configuration.uri}`),this.transitionState(vi.Started),this.transport.connect())}async stop(){if(this.state===vi.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(C=>{throw this.logger.error(C.message),C}),this.logger.log("Dispose of core"),this.userAgentCore.dispose(),this._publishers={},this._registerers={},this._sessions={},this._subscriptions={},this.transitionState(vi.Stopped),Promise.resolve();const r=Object.assign({},this._publishers),i=Object.assign({},this._registerers),l=Object.assign({},this._sessions),f=Object.assign({},this._subscriptions),p=this.transport,v=this.userAgentCore;this.logger.log("Dispose of registerers");for(const C in i)i[C]&&await i[C].dispose().catch(w=>{throw this.logger.error(w.message),delete this._registerers[C],w});this.logger.log("Dispose of sessions");for(const C in l)l[C]&&await l[C].dispose().catch(w=>{throw this.logger.error(w.message),delete this._sessions[C],w});this.logger.log("Dispose of subscriptions");for(const C in f)f[C]&&await f[C].dispose().catch(w=>{throw this.logger.error(w.message),delete this._subscriptions[C],w});this.logger.log("Dispose of publishers");for(const C in r)r[C]&&await r[C].dispose().catch(w=>{throw this.logger.error(w.message),delete this._publishers[C],w});this.logger.log("Dispose of transport"),await p.dispose().catch(C=>{throw this.logger.error(C.message),C}),this.logger.log("Dispose of core"),v.dispose(),this.transitionState(vi.Stopped)}_makeInviter(r,i){return new V2(this,r,i)}attemptReconnection(r=1){const i=this.options.reconnectionAttempts,l=this.options.reconnectionDelay;if(r>i){this.logger.log("Maximum reconnection attempts reached");return}this.logger.log(`Reconnection attempt ${r} of ${i} - trying`),setTimeout(()=>{this.reconnect().then(()=>{this.logger.log(`Reconnection attempt ${r} of ${i} - succeeded`)}).catch(f=>{this.logger.error(f.message),this.logger.log(`Reconnection attempt ${r} of ${i} - failed`),this.attemptReconnection(++r)})},r===1?0:l*1e3)}initContact(){const r=this.options.contactName!==""?this.options.contactName:_c(8),i=this.options.contactParams;return{pubGruu:void 0,tempGruu:void 0,uri:new xo("sip",r,this.options.viaHost,void 0,i),toString:(f={})=>{const p=f.anonymous||!1,v=f.outbound||!1,C=f.register||!1;let w="<";return p?w+=this.contact.tempGruu||`sip:anonymous@anonymous.invalid;transport=${i.transport?i.transport:"ws"}`:C?w+=this.contact.uri:w+=this.contact.pubGruu||this.contact.uri,v&&(w+=";ob"),w+=">",this.options.instanceIdAlwaysAdded&&(w+=';+sip.instance="<urn:uuid:'+this._instanceId+'>"'),w}}}initCore(){let r=[];r.push("outbound"),this.options.sipExtension100rel===Ps.Supported&&r.push("100rel"),this.options.sipExtensionReplaces===Ps.Supported&&r.push("replaces"),this.options.sipExtensionExtraSupported&&r.push(...this.options.sipExtensionExtraSupported),this.options.hackAllowUnregisteredOptionTags||(r=r.filter(p=>QR[p])),r=Array.from(new Set(r));const i=r.slice();(this.contact.pubGruu||this.contact.tempGruu)&&i.push("gruu");const l={aor:this.options.uri,contact:this.contact,displayName:this.options.displayName,loggerFactory:this.loggerFactory,hackViaTcp:this.options.hackViaTcp,routeSet:this.options.preloadedRouteSet,supportedOptionTags:r,supportedOptionTagsResponse:i,sipjsId:this.options.sipjsId,userAgentHeaderFieldValue:this.options.userAgentString,viaForceRport:this.options.forceRport,viaHost:this.options.viaHost,authenticationFactory:()=>{const p=this.options.authorizationUsername?this.options.authorizationUsername:this.options.uri.user,v=this.options.authorizationPassword?this.options.authorizationPassword:void 0,C=this.options.authorizationHa1?this.options.authorizationHa1:void 0;return new ZR(this.getLoggerFactory(),C,p,v)},transportAccessor:()=>this.transport},f={onInvite:p=>{var v;const C=new XR(this,p);if(p.delegate={onCancel:w=>{C._onCancel(w)},onTransportError:w=>{this.logger.error("A transport error has occurred while handling an incoming INVITE request.")}},p.trying(),this.options.sipExtensionReplaces!==Ps.Unsupported){const S=p.message.parseHeader("replaces");if(S){const b=S.call_id;if(typeof b!="string")throw new Error("Type of call id is not string");const T=S.replaces_to_tag;if(typeof T!="string")throw new Error("Type of to tag is not string");const A=S.replaces_from_tag;if(typeof A!="string")throw new Error("type of from tag is not string");const H=b+T+A,P=this.userAgentCore.dialogs.get(H);if(!P){C.reject({statusCode:481});return}if(!P.early&&S.early_only===!0){C.reject({statusCode:486});return}const j=this._sessions[b+A]||this._sessions[b+T]||void 0;if(!j)throw new Error("Session does not exist.");C._replacee=j}}if(!((v=this.delegate)===null||v===void 0)&&v.onInvite){if(C.autoSendAnInitialProvisionalResponse){C.progress().then(()=>{var w;if(((w=this.delegate)===null||w===void 0?void 0:w.onInvite)===void 0)throw new Error("onInvite undefined.");this.delegate.onInvite(C)});return}this.delegate.onInvite(C);return}C.reject({statusCode:486})},onMessage:p=>{if(this.delegate&&this.delegate.onMessage){const v=new Y2(p);this.delegate.onMessage(v)}else p.accept()},onNotify:p=>{if(this.delegate&&this.delegate.onNotify){const v=new Hx(p);this.delegate.onNotify(v)}else this.options.allowLegacyNotifications?p.accept():p.reject({statusCode:481})},onRefer:p=>{this.logger.warn("Received an out of dialog REFER request"),this.delegate&&this.delegate.onReferRequest?this.delegate.onReferRequest(p):p.reject({statusCode:405})},onRegister:p=>{this.logger.warn("Received an out of dialog REGISTER request"),this.delegate&&this.delegate.onRegisterRequest?this.delegate.onRegisterRequest(p):p.reject({statusCode:405})},onSubscribe:p=>{this.logger.warn("Received an out of dialog SUBSCRIBE request"),this.delegate&&this.delegate.onSubscribeRequest?this.delegate.onSubscribeRequest(p):p.reject({statusCode:405})}};return new x8(l,f)}initTransportCallbacks(){this.transport.onConnect=()=>this.onTransportConnect(),this.transport.onDisconnect=r=>this.onTransportDisconnect(r),this.transport.onMessage=r=>this.onTransportMessage(r)}onTransportConnect(){this.state!==vi.Stopped&&this.delegate&&this.delegate.onConnect&&this.delegate.onConnect()}onTransportDisconnect(r){this.state!==vi.Stopped&&(this.delegate&&this.delegate.onDisconnect&&this.delegate.onDisconnect(r),r&&this.options.reconnectionAttempts>0&&this.attemptReconnection())}onTransportMessage(r){const i=_v.parseMessage(r,this.getLogger("sip.Parser"));if(!i){this.logger.warn("Failed to parse incoming message. Dropping.");return}if(this.state===vi.Stopped&&i instanceof Qf){this.logger.warn(`Received ${i.method} request while stopped. Dropping.`);return}const l=()=>{const f=["from","to","call_id","cseq","via"];for(const p of f)if(!i.hasHeader(p))return this.logger.warn(`Missing mandatory header field : ${p}.`),!1;return!0};if(i instanceof Qf){if(!l()){this.logger.warn("Request missing mandatory header field. Dropping.");return}if(!i.toTag&&i.callId.substr(0,5)===this.options.sipjsId){this.userAgentCore.replyStateless(i,{statusCode:482});return}const f=e0(i.body),p=i.getHeader("content-length");if(p&&f<Number(p)){this.userAgentCore.replyStateless(i,{statusCode:400});return}}if(i instanceof vu){if(!l()){this.logger.warn("Response missing mandatory header field. Dropping.");return}if(i.getHeaders("via").length>1){this.logger.warn("More than one Via header field present in the response. Dropping.");return}if(i.via.host!==this.options.viaHost||i.via.port!==void 0){this.logger.warn("Via sent-by in the response does not match UA Via host value. Dropping.");return}const f=e0(i.body),p=i.getHeader("content-length");if(p&&f<Number(p)){this.logger.warn("Message body length is lower than the value in Content-Length header field. Dropping.");return}}if(i instanceof Qf){this.userAgentCore.receiveIncomingRequestFromTransport(i);return}if(i instanceof vu){this.userAgentCore.receiveIncomingResponseFromTransport(i);return}throw new Error("Invalid message type.")}transitionState(r,i){const l=()=>{throw new Error(`Invalid state transition from ${this._state} to ${r}`)};switch(this._state){case vi.Started:r!==vi.Stopped&&l();break;case vi.Stopped:r!==vi.Started&&l();break;default:throw new Error("Unknown state.")}this.logger.log(`Transitioned from ${this._state} to ${r}`),this._state=r,this._stateEventEmitter.emit(this._state)}}//! moment.js
404
- //! version : 2.30.1
405
- //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
406
- //! license : MIT
407
- //! momentjs.com
408
- var rw;function We(){return rw.apply(null,arguments)}function w8(o){rw=o}function Ls(o){return o instanceof Array||Object.prototype.toString.call(o)==="[object Array]"}function Rc(o){return o!=null&&Object.prototype.toString.call(o)==="[object Object]"}function vr(o,r){return Object.prototype.hasOwnProperty.call(o,r)}function Px(o){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(o).length===0;var r;for(r in o)if(vr(o,r))return!1;return!0}function xa(o){return o===void 0}function pl(o){return typeof o=="number"||Object.prototype.toString.call(o)==="[object Number]"}function n0(o){return o instanceof Date||Object.prototype.toString.call(o)==="[object Date]"}function nw(o,r){var i=[],l,f=o.length;for(l=0;l<f;++l)i.push(r(o[l],l));return i}function Eu(o,r){for(var i in r)vr(r,i)&&(o[i]=r[i]);return vr(r,"toString")&&(o.toString=r.toString),vr(r,"valueOf")&&(o.valueOf=r.valueOf),o}function wo(o,r,i,l){return kw(o,r,i,l,!0).utc()}function b8(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function $t(o){return o._pf==null&&(o._pf=b8()),o._pf}var Lx;Array.prototype.some?Lx=Array.prototype.some:Lx=function(o){var r=Object(this),i=r.length>>>0,l;for(l=0;l<i;l++)if(l in r&&o.call(this,r[l],l,r))return!0;return!1};function Ux(o){var r=null,i=!1,l=o._d&&!isNaN(o._d.getTime());if(l&&(r=$t(o),i=Lx.call(r.parsedDateParts,function(f){return f!=null}),l=r.overflow<0&&!r.empty&&!r.invalidEra&&!r.invalidMonth&&!r.invalidWeekday&&!r.weekdayMismatch&&!r.nullInput&&!r.invalidFormat&&!r.userInvalidated&&(!r.meridiem||r.meridiem&&i),o._strict&&(l=l&&r.charsLeftOver===0&&r.unusedTokens.length===0&&r.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(o))o._isValid=l;else return l;return o._isValid}function kv(o){var r=wo(NaN);return o!=null?Eu($t(r),o):$t(r).userInvalidated=!0,r}var iw=We.momentProperties=[],jx=!1;function zx(o,r){var i,l,f,p=iw.length;if(xa(r._isAMomentObject)||(o._isAMomentObject=r._isAMomentObject),xa(r._i)||(o._i=r._i),xa(r._f)||(o._f=r._f),xa(r._l)||(o._l=r._l),xa(r._strict)||(o._strict=r._strict),xa(r._tzm)||(o._tzm=r._tzm),xa(r._isUTC)||(o._isUTC=r._isUTC),xa(r._offset)||(o._offset=r._offset),xa(r._pf)||(o._pf=$t(r)),xa(r._locale)||(o._locale=r._locale),p>0)for(i=0;i<p;i++)l=iw[i],f=r[l],xa(f)||(o[l]=f);return o}function i0(o){zx(this,o),this._d=new Date(o._d!=null?o._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),jx===!1&&(jx=!0,We.updateOffset(this),jx=!1)}function Us(o){return o instanceof i0||o!=null&&o._isAMomentObject!=null}function aw(o){We.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+o)}function ss(o,r){var i=!0;return Eu(function(){if(We.deprecationHandler!=null&&We.deprecationHandler(null,o),i){var l=[],f,p,v,C=arguments.length;for(p=0;p<C;p++){if(f="",typeof arguments[p]=="object"){f+=`
409
- [`+p+"] ";for(v in arguments[0])vr(arguments[0],v)&&(f+=v+": "+arguments[0][v]+", ");f=f.slice(0,-2)}else f=arguments[p];l.push(f)}aw(o+`
410
- Arguments: `+Array.prototype.slice.call(l).join("")+`
411
- `+new Error().stack),i=!1}return r.apply(this,arguments)},r)}var sw={};function ow(o,r){We.deprecationHandler!=null&&We.deprecationHandler(o,r),sw[o]||(aw(r),sw[o]=!0)}We.suppressDeprecationWarnings=!1,We.deprecationHandler=null;function bo(o){return typeof Function<"u"&&o instanceof Function||Object.prototype.toString.call(o)==="[object Function]"}function _8(o){var r,i;for(i in o)vr(o,i)&&(r=o[i],bo(r)?this[i]=r:this["_"+i]=r);this._config=o,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function qx(o,r){var i=Eu({},o),l;for(l in r)vr(r,l)&&(Rc(o[l])&&Rc(r[l])?(i[l]={},Eu(i[l],o[l]),Eu(i[l],r[l])):r[l]!=null?i[l]=r[l]:delete i[l]);for(l in o)vr(o,l)&&!vr(r,l)&&Rc(o[l])&&(i[l]=Eu({},i[l]));return i}function Yx(o){o!=null&&this.set(o)}var Vx;Object.keys?Vx=Object.keys:Vx=function(o){var r,i=[];for(r in o)vr(o,r)&&i.push(r);return i};var D8={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function T8(o,r,i){var l=this._calendar[o]||this._calendar.sameElse;return bo(l)?l.call(r,i):l}function _o(o,r,i){var l=""+Math.abs(o),f=r-l.length,p=o>=0;return(p?i?"+":"":"-")+Math.pow(10,Math.max(0,f)).toString().substr(1)+l}var Wx=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Fv=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Gx={},Zf={};function mt(o,r,i,l){var f=l;typeof l=="string"&&(f=function(){return this[l]()}),o&&(Zf[o]=f),r&&(Zf[r[0]]=function(){return _o(f.apply(this,arguments),r[1],r[2])}),i&&(Zf[i]=function(){return this.localeData().ordinal(f.apply(this,arguments),o)})}function R8(o){return o.match(/\[[\s\S]/)?o.replace(/^\[|\]$/g,""):o.replace(/\\/g,"")}function A8(o){var r=o.match(Wx),i,l;for(i=0,l=r.length;i<l;i++)Zf[r[i]]?r[i]=Zf[r[i]]:r[i]=R8(r[i]);return function(f){var p="",v;for(v=0;v<l;v++)p+=bo(r[v])?r[v].call(f,o):r[v];return p}}function Ov(o,r){return o.isValid()?(r=lw(r,o.localeData()),Gx[r]=Gx[r]||A8(r),Gx[r](o)):o.localeData().invalidDate()}function lw(o,r){var i=5;function l(f){return r.longDateFormat(f)||f}for(Fv.lastIndex=0;i>=0&&Fv.test(o);)o=o.replace(Fv,l),Fv.lastIndex=0,i-=1;return o}var k8={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function F8(o){var r=this._longDateFormat[o],i=this._longDateFormat[o.toUpperCase()];return r||!i?r:(this._longDateFormat[o]=i.match(Wx).map(function(l){return l==="MMMM"||l==="MM"||l==="DD"||l==="dddd"?l.slice(1):l}).join(""),this._longDateFormat[o])}var O8="Invalid date";function N8(){return this._invalidDate}var B8="%d",M8=/\d{1,2}/;function H8(o){return this._ordinal.replace("%d",o)}var I8={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function $8(o,r,i,l){var f=this._relativeTime[i];return bo(f)?f(o,r,i,l):f.replace(/%d/i,o)}function P8(o,r){var i=this._relativeTime[o>0?"future":"past"];return bo(i)?i(r):i.replace(/%s/i,r)}var uw={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function os(o){return typeof o=="string"?uw[o]||uw[o.toLowerCase()]:void 0}function Kx(o){var r={},i,l;for(l in o)vr(o,l)&&(i=os(l),i&&(r[i]=o[l]));return r}var L8={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function U8(o){var r=[],i;for(i in o)vr(o,i)&&r.push({unit:i,priority:L8[i]});return r.sort(function(l,f){return l.priority-f.priority}),r}var cw=/\d/,Ua=/\d\d/,fw=/\d{3}/,Qx=/\d{4}/,Nv=/[+-]?\d{6}/,Wr=/\d\d?/,dw=/\d\d\d\d?/,hw=/\d\d\d\d\d\d?/,Bv=/\d{1,3}/,Xx=/\d{1,4}/,Mv=/[+-]?\d{1,6}/,Jf=/\d+/,Hv=/[+-]?\d+/,j8=/Z|[+-]\d\d:?\d\d/gi,Iv=/Z|[+-]\d\d(?::?\d\d)?/gi,z8=/[+-]?\d+(\.\d{1,3})?/,a0=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ed=/^[1-9]\d?/,Zx=/^([1-9]\d|\d)/,$v;$v={};function at(o,r,i){$v[o]=bo(r)?r:function(l,f){return l&&i?i:r}}function q8(o,r){return vr($v,o)?$v[o](r._strict,r._locale):new RegExp(Y8(o))}function Y8(o){return vl(o.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(r,i,l,f,p){return i||l||f||p}))}function vl(o){return o.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ls(o){return o<0?Math.ceil(o)||0:Math.floor(o)}function Qt(o){var r=+o,i=0;return r!==0&&isFinite(r)&&(i=ls(r)),i}var Jx={};function Br(o,r){var i,l=r,f;for(typeof o=="string"&&(o=[o]),pl(r)&&(l=function(p,v){v[r]=Qt(p)}),f=o.length,i=0;i<f;i++)Jx[o[i]]=l}function s0(o,r){Br(o,function(i,l,f,p){f._w=f._w||{},r(i,f._w,f,p)})}function V8(o,r,i){r!=null&&vr(Jx,o)&&Jx[o](r,i._a,i,o)}function Pv(o){return o%4===0&&o%100!==0||o%400===0}var Mi=0,gl=1,Do=2,Yn=3,js=4,ml=5,Ac=6,W8=7,G8=8;mt("Y",0,0,function(){var o=this.year();return o<=9999?_o(o,4):"+"+o}),mt(0,["YY",2],0,function(){return this.year()%100}),mt(0,["YYYY",4],0,"year"),mt(0,["YYYYY",5],0,"year"),mt(0,["YYYYYY",6,!0],0,"year"),at("Y",Hv),at("YY",Wr,Ua),at("YYYY",Xx,Qx),at("YYYYY",Mv,Nv),at("YYYYYY",Mv,Nv),Br(["YYYYY","YYYYYY"],Mi),Br("YYYY",function(o,r){r[Mi]=o.length===2?We.parseTwoDigitYear(o):Qt(o)}),Br("YY",function(o,r){r[Mi]=We.parseTwoDigitYear(o)}),Br("Y",function(o,r){r[Mi]=parseInt(o,10)});function o0(o){return Pv(o)?366:365}We.parseTwoDigitYear=function(o){return Qt(o)+(Qt(o)>68?1900:2e3)};var pw=td("FullYear",!0);function K8(){return Pv(this.year())}function td(o,r){return function(i){return i!=null?(vw(this,o,i),We.updateOffset(this,r),this):l0(this,o)}}function l0(o,r){if(!o.isValid())return NaN;var i=o._d,l=o._isUTC;switch(r){case"Milliseconds":return l?i.getUTCMilliseconds():i.getMilliseconds();case"Seconds":return l?i.getUTCSeconds():i.getSeconds();case"Minutes":return l?i.getUTCMinutes():i.getMinutes();case"Hours":return l?i.getUTCHours():i.getHours();case"Date":return l?i.getUTCDate():i.getDate();case"Day":return l?i.getUTCDay():i.getDay();case"Month":return l?i.getUTCMonth():i.getMonth();case"FullYear":return l?i.getUTCFullYear():i.getFullYear();default:return NaN}}function vw(o,r,i){var l,f,p,v,C;if(!(!o.isValid()||isNaN(i))){switch(l=o._d,f=o._isUTC,r){case"Milliseconds":return void(f?l.setUTCMilliseconds(i):l.setMilliseconds(i));case"Seconds":return void(f?l.setUTCSeconds(i):l.setSeconds(i));case"Minutes":return void(f?l.setUTCMinutes(i):l.setMinutes(i));case"Hours":return void(f?l.setUTCHours(i):l.setHours(i));case"Date":return void(f?l.setUTCDate(i):l.setDate(i));case"FullYear":break;default:return}p=i,v=o.month(),C=o.date(),C=C===29&&v===1&&!Pv(p)?28:C,f?l.setUTCFullYear(p,v,C):l.setFullYear(p,v,C)}}function Q8(o){return o=os(o),bo(this[o])?this[o]():this}function X8(o,r){if(typeof o=="object"){o=Kx(o);var i=U8(o),l,f=i.length;for(l=0;l<f;l++)this[i[l].unit](o[i[l].unit])}else if(o=os(o),bo(this[o]))return this[o](r);return this}function Z8(o,r){return(o%r+r)%r}var Tn;Array.prototype.indexOf?Tn=Array.prototype.indexOf:Tn=function(o){var r;for(r=0;r<this.length;++r)if(this[r]===o)return r;return-1};function e1(o,r){if(isNaN(o)||isNaN(r))return NaN;var i=Z8(r,12);return o+=(r-i)/12,i===1?Pv(o)?29:28:31-i%7%2}mt("M",["MM",2],"Mo",function(){return this.month()+1}),mt("MMM",0,0,function(o){return this.localeData().monthsShort(this,o)}),mt("MMMM",0,0,function(o){return this.localeData().months(this,o)}),at("M",Wr,ed),at("MM",Wr,Ua),at("MMM",function(o,r){return r.monthsShortRegex(o)}),at("MMMM",function(o,r){return r.monthsRegex(o)}),Br(["M","MM"],function(o,r){r[gl]=Qt(o)-1}),Br(["MMM","MMMM"],function(o,r,i,l){var f=i._locale.monthsParse(o,l,i._strict);f!=null?r[gl]=f:$t(i).invalidMonth=o});var J8="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),gw="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),mw=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,e4=a0,t4=a0;function r4(o,r){return o?Ls(this._months)?this._months[o.month()]:this._months[(this._months.isFormat||mw).test(r)?"format":"standalone"][o.month()]:Ls(this._months)?this._months:this._months.standalone}function n4(o,r){return o?Ls(this._monthsShort)?this._monthsShort[o.month()]:this._monthsShort[mw.test(r)?"format":"standalone"][o.month()]:Ls(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function i4(o,r,i){var l,f,p,v=o.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],l=0;l<12;++l)p=wo([2e3,l]),this._shortMonthsParse[l]=this.monthsShort(p,"").toLocaleLowerCase(),this._longMonthsParse[l]=this.months(p,"").toLocaleLowerCase();return i?r==="MMM"?(f=Tn.call(this._shortMonthsParse,v),f!==-1?f:null):(f=Tn.call(this._longMonthsParse,v),f!==-1?f:null):r==="MMM"?(f=Tn.call(this._shortMonthsParse,v),f!==-1?f:(f=Tn.call(this._longMonthsParse,v),f!==-1?f:null)):(f=Tn.call(this._longMonthsParse,v),f!==-1?f:(f=Tn.call(this._shortMonthsParse,v),f!==-1?f:null))}function a4(o,r,i){var l,f,p;if(this._monthsParseExact)return i4.call(this,o,r,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),l=0;l<12;l++){if(f=wo([2e3,l]),i&&!this._longMonthsParse[l]&&(this._longMonthsParse[l]=new RegExp("^"+this.months(f,"").replace(".","")+"$","i"),this._shortMonthsParse[l]=new RegExp("^"+this.monthsShort(f,"").replace(".","")+"$","i")),!i&&!this._monthsParse[l]&&(p="^"+this.months(f,"")+"|^"+this.monthsShort(f,""),this._monthsParse[l]=new RegExp(p.replace(".",""),"i")),i&&r==="MMMM"&&this._longMonthsParse[l].test(o))return l;if(i&&r==="MMM"&&this._shortMonthsParse[l].test(o))return l;if(!i&&this._monthsParse[l].test(o))return l}}function yw(o,r){if(!o.isValid())return o;if(typeof r=="string"){if(/^\d+$/.test(r))r=Qt(r);else if(r=o.localeData().monthsParse(r),!pl(r))return o}var i=r,l=o.date();return l=l<29?l:Math.min(l,e1(o.year(),i)),o._isUTC?o._d.setUTCMonth(i,l):o._d.setMonth(i,l),o}function xw(o){return o!=null?(yw(this,o),We.updateOffset(this,!0),this):l0(this,"Month")}function s4(){return e1(this.year(),this.month())}function o4(o){return this._monthsParseExact?(vr(this,"_monthsRegex")||Ew.call(this),o?this._monthsShortStrictRegex:this._monthsShortRegex):(vr(this,"_monthsShortRegex")||(this._monthsShortRegex=e4),this._monthsShortStrictRegex&&o?this._monthsShortStrictRegex:this._monthsShortRegex)}function l4(o){return this._monthsParseExact?(vr(this,"_monthsRegex")||Ew.call(this),o?this._monthsStrictRegex:this._monthsRegex):(vr(this,"_monthsRegex")||(this._monthsRegex=t4),this._monthsStrictRegex&&o?this._monthsStrictRegex:this._monthsRegex)}function Ew(){function o(w,S){return S.length-w.length}var r=[],i=[],l=[],f,p,v,C;for(f=0;f<12;f++)p=wo([2e3,f]),v=vl(this.monthsShort(p,"")),C=vl(this.months(p,"")),r.push(v),i.push(C),l.push(C),l.push(v);r.sort(o),i.sort(o),l.sort(o),this._monthsRegex=new RegExp("^("+l.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function u4(o,r,i,l,f,p,v){var C;return o<100&&o>=0?(C=new Date(o+400,r,i,l,f,p,v),isFinite(C.getFullYear())&&C.setFullYear(o)):C=new Date(o,r,i,l,f,p,v),C}function u0(o){var r,i;return o<100&&o>=0?(i=Array.prototype.slice.call(arguments),i[0]=o+400,r=new Date(Date.UTC.apply(null,i)),isFinite(r.getUTCFullYear())&&r.setUTCFullYear(o)):r=new Date(Date.UTC.apply(null,arguments)),r}function Lv(o,r,i){var l=7+r-i,f=(7+u0(o,0,l).getUTCDay()-r)%7;return-f+l-1}function Sw(o,r,i,l,f){var p=(7+i-l)%7,v=Lv(o,l,f),C=1+7*(r-1)+p+v,w,S;return C<=0?(w=o-1,S=o0(w)+C):C>o0(o)?(w=o+1,S=C-o0(o)):(w=o,S=C),{year:w,dayOfYear:S}}function c0(o,r,i){var l=Lv(o.year(),r,i),f=Math.floor((o.dayOfYear()-l-1)/7)+1,p,v;return f<1?(v=o.year()-1,p=f+yl(v,r,i)):f>yl(o.year(),r,i)?(p=f-yl(o.year(),r,i),v=o.year()+1):(v=o.year(),p=f),{week:p,year:v}}function yl(o,r,i){var l=Lv(o,r,i),f=Lv(o+1,r,i);return(o0(o)-l+f)/7}mt("w",["ww",2],"wo","week"),mt("W",["WW",2],"Wo","isoWeek"),at("w",Wr,ed),at("ww",Wr,Ua),at("W",Wr,ed),at("WW",Wr,Ua),s0(["w","ww","W","WW"],function(o,r,i,l){r[l.substr(0,1)]=Qt(o)});function c4(o){return c0(o,this._week.dow,this._week.doy).week}var f4={dow:0,doy:6};function d4(){return this._week.dow}function h4(){return this._week.doy}function p4(o){var r=this.localeData().week(this);return o==null?r:this.add((o-r)*7,"d")}function v4(o){var r=c0(this,1,4).week;return o==null?r:this.add((o-r)*7,"d")}mt("d",0,"do","day"),mt("dd",0,0,function(o){return this.localeData().weekdaysMin(this,o)}),mt("ddd",0,0,function(o){return this.localeData().weekdaysShort(this,o)}),mt("dddd",0,0,function(o){return this.localeData().weekdays(this,o)}),mt("e",0,0,"weekday"),mt("E",0,0,"isoWeekday"),at("d",Wr),at("e",Wr),at("E",Wr),at("dd",function(o,r){return r.weekdaysMinRegex(o)}),at("ddd",function(o,r){return r.weekdaysShortRegex(o)}),at("dddd",function(o,r){return r.weekdaysRegex(o)}),s0(["dd","ddd","dddd"],function(o,r,i,l){var f=i._locale.weekdaysParse(o,l,i._strict);f!=null?r.d=f:$t(i).invalidWeekday=o}),s0(["d","e","E"],function(o,r,i,l){r[l]=Qt(o)});function g4(o,r){return typeof o!="string"?o:isNaN(o)?(o=r.weekdaysParse(o),typeof o=="number"?o:null):parseInt(o,10)}function m4(o,r){return typeof o=="string"?r.weekdaysParse(o)%7||7:isNaN(o)?null:o}function t1(o,r){return o.slice(r,7).concat(o.slice(0,r))}var y4="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Cw="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),x4="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),E4=a0,S4=a0,C4=a0;function w4(o,r){var i=Ls(this._weekdays)?this._weekdays:this._weekdays[o&&o!==!0&&this._weekdays.isFormat.test(r)?"format":"standalone"];return o===!0?t1(i,this._week.dow):o?i[o.day()]:i}function b4(o){return o===!0?t1(this._weekdaysShort,this._week.dow):o?this._weekdaysShort[o.day()]:this._weekdaysShort}function _4(o){return o===!0?t1(this._weekdaysMin,this._week.dow):o?this._weekdaysMin[o.day()]:this._weekdaysMin}function D4(o,r,i){var l,f,p,v=o.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],l=0;l<7;++l)p=wo([2e3,1]).day(l),this._minWeekdaysParse[l]=this.weekdaysMin(p,"").toLocaleLowerCase(),this._shortWeekdaysParse[l]=this.weekdaysShort(p,"").toLocaleLowerCase(),this._weekdaysParse[l]=this.weekdays(p,"").toLocaleLowerCase();return i?r==="dddd"?(f=Tn.call(this._weekdaysParse,v),f!==-1?f:null):r==="ddd"?(f=Tn.call(this._shortWeekdaysParse,v),f!==-1?f:null):(f=Tn.call(this._minWeekdaysParse,v),f!==-1?f:null):r==="dddd"?(f=Tn.call(this._weekdaysParse,v),f!==-1||(f=Tn.call(this._shortWeekdaysParse,v),f!==-1)?f:(f=Tn.call(this._minWeekdaysParse,v),f!==-1?f:null)):r==="ddd"?(f=Tn.call(this._shortWeekdaysParse,v),f!==-1||(f=Tn.call(this._weekdaysParse,v),f!==-1)?f:(f=Tn.call(this._minWeekdaysParse,v),f!==-1?f:null)):(f=Tn.call(this._minWeekdaysParse,v),f!==-1||(f=Tn.call(this._weekdaysParse,v),f!==-1)?f:(f=Tn.call(this._shortWeekdaysParse,v),f!==-1?f:null))}function T4(o,r,i){var l,f,p;if(this._weekdaysParseExact)return D4.call(this,o,r,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),l=0;l<7;l++){if(f=wo([2e3,1]).day(l),i&&!this._fullWeekdaysParse[l]&&(this._fullWeekdaysParse[l]=new RegExp("^"+this.weekdays(f,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[l]=new RegExp("^"+this.weekdaysShort(f,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[l]=new RegExp("^"+this.weekdaysMin(f,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[l]||(p="^"+this.weekdays(f,"")+"|^"+this.weekdaysShort(f,"")+"|^"+this.weekdaysMin(f,""),this._weekdaysParse[l]=new RegExp(p.replace(".",""),"i")),i&&r==="dddd"&&this._fullWeekdaysParse[l].test(o))return l;if(i&&r==="ddd"&&this._shortWeekdaysParse[l].test(o))return l;if(i&&r==="dd"&&this._minWeekdaysParse[l].test(o))return l;if(!i&&this._weekdaysParse[l].test(o))return l}}function R4(o){if(!this.isValid())return o!=null?this:NaN;var r=l0(this,"Day");return o!=null?(o=g4(o,this.localeData()),this.add(o-r,"d")):r}function A4(o){if(!this.isValid())return o!=null?this:NaN;var r=(this.day()+7-this.localeData()._week.dow)%7;return o==null?r:this.add(o-r,"d")}function k4(o){if(!this.isValid())return o!=null?this:NaN;if(o!=null){var r=m4(o,this.localeData());return this.day(this.day()%7?r:r-7)}else return this.day()||7}function F4(o){return this._weekdaysParseExact?(vr(this,"_weekdaysRegex")||r1.call(this),o?this._weekdaysStrictRegex:this._weekdaysRegex):(vr(this,"_weekdaysRegex")||(this._weekdaysRegex=E4),this._weekdaysStrictRegex&&o?this._weekdaysStrictRegex:this._weekdaysRegex)}function O4(o){return this._weekdaysParseExact?(vr(this,"_weekdaysRegex")||r1.call(this),o?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(vr(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=S4),this._weekdaysShortStrictRegex&&o?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function N4(o){return this._weekdaysParseExact?(vr(this,"_weekdaysRegex")||r1.call(this),o?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(vr(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=C4),this._weekdaysMinStrictRegex&&o?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function r1(){function o(b,T){return T.length-b.length}var r=[],i=[],l=[],f=[],p,v,C,w,S;for(p=0;p<7;p++)v=wo([2e3,1]).day(p),C=vl(this.weekdaysMin(v,"")),w=vl(this.weekdaysShort(v,"")),S=vl(this.weekdays(v,"")),r.push(C),i.push(w),l.push(S),f.push(C),f.push(w),f.push(S);r.sort(o),i.sort(o),l.sort(o),f.sort(o),this._weekdaysRegex=new RegExp("^("+f.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function n1(){return this.hours()%12||12}function B4(){return this.hours()||24}mt("H",["HH",2],0,"hour"),mt("h",["hh",2],0,n1),mt("k",["kk",2],0,B4),mt("hmm",0,0,function(){return""+n1.apply(this)+_o(this.minutes(),2)}),mt("hmmss",0,0,function(){return""+n1.apply(this)+_o(this.minutes(),2)+_o(this.seconds(),2)}),mt("Hmm",0,0,function(){return""+this.hours()+_o(this.minutes(),2)}),mt("Hmmss",0,0,function(){return""+this.hours()+_o(this.minutes(),2)+_o(this.seconds(),2)});function ww(o,r){mt(o,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),r)})}ww("a",!0),ww("A",!1);function bw(o,r){return r._meridiemParse}at("a",bw),at("A",bw),at("H",Wr,Zx),at("h",Wr,ed),at("k",Wr,ed),at("HH",Wr,Ua),at("hh",Wr,Ua),at("kk",Wr,Ua),at("hmm",dw),at("hmmss",hw),at("Hmm",dw),at("Hmmss",hw),Br(["H","HH"],Yn),Br(["k","kk"],function(o,r,i){var l=Qt(o);r[Yn]=l===24?0:l}),Br(["a","A"],function(o,r,i){i._isPm=i._locale.isPM(o),i._meridiem=o}),Br(["h","hh"],function(o,r,i){r[Yn]=Qt(o),$t(i).bigHour=!0}),Br("hmm",function(o,r,i){var l=o.length-2;r[Yn]=Qt(o.substr(0,l)),r[js]=Qt(o.substr(l)),$t(i).bigHour=!0}),Br("hmmss",function(o,r,i){var l=o.length-4,f=o.length-2;r[Yn]=Qt(o.substr(0,l)),r[js]=Qt(o.substr(l,2)),r[ml]=Qt(o.substr(f)),$t(i).bigHour=!0}),Br("Hmm",function(o,r,i){var l=o.length-2;r[Yn]=Qt(o.substr(0,l)),r[js]=Qt(o.substr(l))}),Br("Hmmss",function(o,r,i){var l=o.length-4,f=o.length-2;r[Yn]=Qt(o.substr(0,l)),r[js]=Qt(o.substr(l,2)),r[ml]=Qt(o.substr(f))});function M4(o){return(o+"").toLowerCase().charAt(0)==="p"}var H4=/[ap]\.?m?\.?/i,I4=td("Hours",!0);function $4(o,r,i){return o>11?i?"pm":"PM":i?"am":"AM"}var _w={calendar:D8,longDateFormat:k8,invalidDate:O8,ordinal:B8,dayOfMonthOrdinalParse:M8,relativeTime:I8,months:J8,monthsShort:gw,week:f4,weekdays:y4,weekdaysMin:x4,weekdaysShort:Cw,meridiemParse:H4},rn={},f0={},d0;function P4(o,r){var i,l=Math.min(o.length,r.length);for(i=0;i<l;i+=1)if(o[i]!==r[i])return i;return l}function Dw(o){return o&&o.toLowerCase().replace("_","-")}function L4(o){for(var r=0,i,l,f,p;r<o.length;){for(p=Dw(o[r]).split("-"),i=p.length,l=Dw(o[r+1]),l=l?l.split("-"):null;i>0;){if(f=Uv(p.slice(0,i).join("-")),f)return f;if(l&&l.length>=i&&P4(p,l)>=i-1)break;i--}r++}return d0}function U4(o){return!!(o&&o.match("^[^/\\\\]*$"))}function Uv(o){var r=null,i;if(rn[o]===void 0&&typeof module<"u"&&module&&module.exports&&U4(o))try{r=d0._abbr,i=require,i("./locale/"+o),Su(r)}catch{rn[o]=null}return rn[o]}function Su(o,r){var i;return o&&(xa(r)?i=xl(o):i=i1(o,r),i?d0=i:typeof console<"u"&&console.warn&&console.warn("Locale "+o+" not found. Did you forget to load it?")),d0._abbr}function i1(o,r){if(r!==null){var i,l=_w;if(r.abbr=o,rn[o]!=null)ow("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),l=rn[o]._config;else if(r.parentLocale!=null)if(rn[r.parentLocale]!=null)l=rn[r.parentLocale]._config;else if(i=Uv(r.parentLocale),i!=null)l=i._config;else return f0[r.parentLocale]||(f0[r.parentLocale]=[]),f0[r.parentLocale].push({name:o,config:r}),null;return rn[o]=new Yx(qx(l,r)),f0[o]&&f0[o].forEach(function(f){i1(f.name,f.config)}),Su(o),rn[o]}else return delete rn[o],null}function j4(o,r){if(r!=null){var i,l,f=_w;rn[o]!=null&&rn[o].parentLocale!=null?rn[o].set(qx(rn[o]._config,r)):(l=Uv(o),l!=null&&(f=l._config),r=qx(f,r),l==null&&(r.abbr=o),i=new Yx(r),i.parentLocale=rn[o],rn[o]=i),Su(o)}else rn[o]!=null&&(rn[o].parentLocale!=null?(rn[o]=rn[o].parentLocale,o===Su()&&Su(o)):rn[o]!=null&&delete rn[o]);return rn[o]}function xl(o){var r;if(o&&o._locale&&o._locale._abbr&&(o=o._locale._abbr),!o)return d0;if(!Ls(o)){if(r=Uv(o),r)return r;o=[o]}return L4(o)}function z4(){return Vx(rn)}function a1(o){var r,i=o._a;return i&&$t(o).overflow===-2&&(r=i[gl]<0||i[gl]>11?gl:i[Do]<1||i[Do]>e1(i[Mi],i[gl])?Do:i[Yn]<0||i[Yn]>24||i[Yn]===24&&(i[js]!==0||i[ml]!==0||i[Ac]!==0)?Yn:i[js]<0||i[js]>59?js:i[ml]<0||i[ml]>59?ml:i[Ac]<0||i[Ac]>999?Ac:-1,$t(o)._overflowDayOfYear&&(r<Mi||r>Do)&&(r=Do),$t(o)._overflowWeeks&&r===-1&&(r=W8),$t(o)._overflowWeekday&&r===-1&&(r=G8),$t(o).overflow=r),o}var q4=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Y4=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,V4=/Z|[+-]\d\d(?::?\d\d)?/,jv=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],s1=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],W4=/^\/?Date\((-?\d+)/i,G4=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,K4={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Tw(o){var r,i,l=o._i,f=q4.exec(l)||Y4.exec(l),p,v,C,w,S=jv.length,b=s1.length;if(f){for($t(o).iso=!0,r=0,i=S;r<i;r++)if(jv[r][1].exec(f[1])){v=jv[r][0],p=jv[r][2]!==!1;break}if(v==null){o._isValid=!1;return}if(f[3]){for(r=0,i=b;r<i;r++)if(s1[r][1].exec(f[3])){C=(f[2]||" ")+s1[r][0];break}if(C==null){o._isValid=!1;return}}if(!p&&C!=null){o._isValid=!1;return}if(f[4])if(V4.exec(f[4]))w="Z";else{o._isValid=!1;return}o._f=v+(C||"")+(w||""),l1(o)}else o._isValid=!1}function Q4(o,r,i,l,f,p){var v=[X4(o),gw.indexOf(r),parseInt(i,10),parseInt(l,10),parseInt(f,10)];return p&&v.push(parseInt(p,10)),v}function X4(o){var r=parseInt(o,10);return r<=49?2e3+r:r<=999?1900+r:r}function Z4(o){return o.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function J4(o,r,i){if(o){var l=Cw.indexOf(o),f=new Date(r[0],r[1],r[2]).getDay();if(l!==f)return $t(i).weekdayMismatch=!0,i._isValid=!1,!1}return!0}function e6(o,r,i){if(o)return K4[o];if(r)return 0;var l=parseInt(i,10),f=l%100,p=(l-f)/100;return p*60+f}function Rw(o){var r=G4.exec(Z4(o._i)),i;if(r){if(i=Q4(r[4],r[3],r[2],r[5],r[6],r[7]),!J4(r[1],i,o))return;o._a=i,o._tzm=e6(r[8],r[9],r[10]),o._d=u0.apply(null,o._a),o._d.setUTCMinutes(o._d.getUTCMinutes()-o._tzm),$t(o).rfc2822=!0}else o._isValid=!1}function t6(o){var r=W4.exec(o._i);if(r!==null){o._d=new Date(+r[1]);return}if(Tw(o),o._isValid===!1)delete o._isValid;else return;if(Rw(o),o._isValid===!1)delete o._isValid;else return;o._strict?o._isValid=!1:We.createFromInputFallback(o)}We.createFromInputFallback=ss("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(o){o._d=new Date(o._i+(o._useUTC?" UTC":""))});function rd(o,r,i){return o??r??i}function r6(o){var r=new Date(We.now());return o._useUTC?[r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate()]:[r.getFullYear(),r.getMonth(),r.getDate()]}function o1(o){var r,i,l=[],f,p,v;if(!o._d){for(f=r6(o),o._w&&o._a[Do]==null&&o._a[gl]==null&&n6(o),o._dayOfYear!=null&&(v=rd(o._a[Mi],f[Mi]),(o._dayOfYear>o0(v)||o._dayOfYear===0)&&($t(o)._overflowDayOfYear=!0),i=u0(v,0,o._dayOfYear),o._a[gl]=i.getUTCMonth(),o._a[Do]=i.getUTCDate()),r=0;r<3&&o._a[r]==null;++r)o._a[r]=l[r]=f[r];for(;r<7;r++)o._a[r]=l[r]=o._a[r]==null?r===2?1:0:o._a[r];o._a[Yn]===24&&o._a[js]===0&&o._a[ml]===0&&o._a[Ac]===0&&(o._nextDay=!0,o._a[Yn]=0),o._d=(o._useUTC?u0:u4).apply(null,l),p=o._useUTC?o._d.getUTCDay():o._d.getDay(),o._tzm!=null&&o._d.setUTCMinutes(o._d.getUTCMinutes()-o._tzm),o._nextDay&&(o._a[Yn]=24),o._w&&typeof o._w.d<"u"&&o._w.d!==p&&($t(o).weekdayMismatch=!0)}}function n6(o){var r,i,l,f,p,v,C,w,S;r=o._w,r.GG!=null||r.W!=null||r.E!=null?(p=1,v=4,i=rd(r.GG,o._a[Mi],c0(Gr(),1,4).year),l=rd(r.W,1),f=rd(r.E,1),(f<1||f>7)&&(w=!0)):(p=o._locale._week.dow,v=o._locale._week.doy,S=c0(Gr(),p,v),i=rd(r.gg,o._a[Mi],S.year),l=rd(r.w,S.week),r.d!=null?(f=r.d,(f<0||f>6)&&(w=!0)):r.e!=null?(f=r.e+p,(r.e<0||r.e>6)&&(w=!0)):f=p),l<1||l>yl(i,p,v)?$t(o)._overflowWeeks=!0:w!=null?$t(o)._overflowWeekday=!0:(C=Sw(i,l,f,p,v),o._a[Mi]=C.year,o._dayOfYear=C.dayOfYear)}We.ISO_8601=function(){},We.RFC_2822=function(){};function l1(o){if(o._f===We.ISO_8601){Tw(o);return}if(o._f===We.RFC_2822){Rw(o);return}o._a=[],$t(o).empty=!0;var r=""+o._i,i,l,f,p,v,C=r.length,w=0,S,b;for(f=lw(o._f,o._locale).match(Wx)||[],b=f.length,i=0;i<b;i++)p=f[i],l=(r.match(q8(p,o))||[])[0],l&&(v=r.substr(0,r.indexOf(l)),v.length>0&&$t(o).unusedInput.push(v),r=r.slice(r.indexOf(l)+l.length),w+=l.length),Zf[p]?(l?$t(o).empty=!1:$t(o).unusedTokens.push(p),V8(p,l,o)):o._strict&&!l&&$t(o).unusedTokens.push(p);$t(o).charsLeftOver=C-w,r.length>0&&$t(o).unusedInput.push(r),o._a[Yn]<=12&&$t(o).bigHour===!0&&o._a[Yn]>0&&($t(o).bigHour=void 0),$t(o).parsedDateParts=o._a.slice(0),$t(o).meridiem=o._meridiem,o._a[Yn]=i6(o._locale,o._a[Yn],o._meridiem),S=$t(o).era,S!==null&&(o._a[Mi]=o._locale.erasConvertYear(S,o._a[Mi])),o1(o),a1(o)}function i6(o,r,i){var l;return i==null?r:o.meridiemHour!=null?o.meridiemHour(r,i):(o.isPM!=null&&(l=o.isPM(i),l&&r<12&&(r+=12),!l&&r===12&&(r=0)),r)}function a6(o){var r,i,l,f,p,v,C=!1,w=o._f.length;if(w===0){$t(o).invalidFormat=!0,o._d=new Date(NaN);return}for(f=0;f<w;f++)p=0,v=!1,r=zx({},o),o._useUTC!=null&&(r._useUTC=o._useUTC),r._f=o._f[f],l1(r),Ux(r)&&(v=!0),p+=$t(r).charsLeftOver,p+=$t(r).unusedTokens.length*10,$t(r).score=p,C?p<l&&(l=p,i=r):(l==null||p<l||v)&&(l=p,i=r,v&&(C=!0));Eu(o,i||r)}function s6(o){if(!o._d){var r=Kx(o._i),i=r.day===void 0?r.date:r.day;o._a=nw([r.year,r.month,i,r.hour,r.minute,r.second,r.millisecond],function(l){return l&&parseInt(l,10)}),o1(o)}}function o6(o){var r=new i0(a1(Aw(o)));return r._nextDay&&(r.add(1,"d"),r._nextDay=void 0),r}function Aw(o){var r=o._i,i=o._f;return o._locale=o._locale||xl(o._l),r===null||i===void 0&&r===""?kv({nullInput:!0}):(typeof r=="string"&&(o._i=r=o._locale.preparse(r)),Us(r)?new i0(a1(r)):(n0(r)?o._d=r:Ls(i)?a6(o):i?l1(o):l6(o),Ux(o)||(o._d=null),o))}function l6(o){var r=o._i;xa(r)?o._d=new Date(We.now()):n0(r)?o._d=new Date(r.valueOf()):typeof r=="string"?t6(o):Ls(r)?(o._a=nw(r.slice(0),function(i){return parseInt(i,10)}),o1(o)):Rc(r)?s6(o):pl(r)?o._d=new Date(r):We.createFromInputFallback(o)}function kw(o,r,i,l,f){var p={};return(r===!0||r===!1)&&(l=r,r=void 0),(i===!0||i===!1)&&(l=i,i=void 0),(Rc(o)&&Px(o)||Ls(o)&&o.length===0)&&(o=void 0),p._isAMomentObject=!0,p._useUTC=p._isUTC=f,p._l=i,p._i=o,p._f=r,p._strict=l,o6(p)}function Gr(o,r,i,l){return kw(o,r,i,l,!1)}var u6=ss("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var o=Gr.apply(null,arguments);return this.isValid()&&o.isValid()?o<this?this:o:kv()}),c6=ss("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var o=Gr.apply(null,arguments);return this.isValid()&&o.isValid()?o>this?this:o:kv()});function Fw(o,r){var i,l;if(r.length===1&&Ls(r[0])&&(r=r[0]),!r.length)return Gr();for(i=r[0],l=1;l<r.length;++l)(!r[l].isValid()||r[l][o](i))&&(i=r[l]);return i}function f6(){var o=[].slice.call(arguments,0);return Fw("isBefore",o)}function d6(){var o=[].slice.call(arguments,0);return Fw("isAfter",o)}var h6=function(){return Date.now?Date.now():+new Date},h0=["year","quarter","month","week","day","hour","minute","second","millisecond"];function p6(o){var r,i=!1,l,f=h0.length;for(r in o)if(vr(o,r)&&!(Tn.call(h0,r)!==-1&&(o[r]==null||!isNaN(o[r]))))return!1;for(l=0;l<f;++l)if(o[h0[l]]){if(i)return!1;parseFloat(o[h0[l]])!==Qt(o[h0[l]])&&(i=!0)}return!0}function v6(){return this._isValid}function g6(){return zs(NaN)}function zv(o){var r=Kx(o),i=r.year||0,l=r.quarter||0,f=r.month||0,p=r.week||r.isoWeek||0,v=r.day||0,C=r.hour||0,w=r.minute||0,S=r.second||0,b=r.millisecond||0;this._isValid=p6(r),this._milliseconds=+b+S*1e3+w*6e4+C*1e3*60*60,this._days=+v+p*7,this._months=+f+l*3+i*12,this._data={},this._locale=xl(),this._bubble()}function qv(o){return o instanceof zv}function u1(o){return o<0?Math.round(-1*o)*-1:Math.round(o)}function m6(o,r,i){var l=Math.min(o.length,r.length),f=Math.abs(o.length-r.length),p=0,v;for(v=0;v<l;v++)Qt(o[v])!==Qt(r[v])&&p++;return p+f}function Ow(o,r){mt(o,0,0,function(){var i=this.utcOffset(),l="+";return i<0&&(i=-i,l="-"),l+_o(~~(i/60),2)+r+_o(~~i%60,2)})}Ow("Z",":"),Ow("ZZ",""),at("Z",Iv),at("ZZ",Iv),Br(["Z","ZZ"],function(o,r,i){i._useUTC=!0,i._tzm=c1(Iv,o)});var y6=/([\+\-]|\d\d)/gi;function c1(o,r){var i=(r||"").match(o),l,f,p;return i===null?null:(l=i[i.length-1]||[],f=(l+"").match(y6)||["-",0,0],p=+(f[1]*60)+Qt(f[2]),p===0?0:f[0]==="+"?p:-p)}function f1(o,r){var i,l;return r._isUTC?(i=r.clone(),l=(Us(o)||n0(o)?o.valueOf():Gr(o).valueOf())-i.valueOf(),i._d.setTime(i._d.valueOf()+l),We.updateOffset(i,!1),i):Gr(o).local()}function d1(o){return-Math.round(o._d.getTimezoneOffset())}We.updateOffset=function(){};function x6(o,r,i){var l=this._offset||0,f;if(!this.isValid())return o!=null?this:NaN;if(o!=null){if(typeof o=="string"){if(o=c1(Iv,o),o===null)return this}else Math.abs(o)<16&&!i&&(o=o*60);return!this._isUTC&&r&&(f=d1(this)),this._offset=o,this._isUTC=!0,f!=null&&this.add(f,"m"),l!==o&&(!r||this._changeInProgress?Hw(this,zs(o-l,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,We.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?l:d1(this)}function E6(o,r){return o!=null?(typeof o!="string"&&(o=-o),this.utcOffset(o,r),this):-this.utcOffset()}function S6(o){return this.utcOffset(0,o)}function C6(o){return this._isUTC&&(this.utcOffset(0,o),this._isUTC=!1,o&&this.subtract(d1(this),"m")),this}function w6(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var o=c1(j8,this._i);o!=null?this.utcOffset(o):this.utcOffset(0,!0)}return this}function b6(o){return this.isValid()?(o=o?Gr(o).utcOffset():0,(this.utcOffset()-o)%60===0):!1}function _6(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function D6(){if(!xa(this._isDSTShifted))return this._isDSTShifted;var o={},r;return zx(o,this),o=Aw(o),o._a?(r=o._isUTC?wo(o._a):Gr(o._a),this._isDSTShifted=this.isValid()&&m6(o._a,r.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function T6(){return this.isValid()?!this._isUTC:!1}function R6(){return this.isValid()?this._isUTC:!1}function Nw(){return this.isValid()?this._isUTC&&this._offset===0:!1}var A6=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,k6=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function zs(o,r){var i=o,l=null,f,p,v;return qv(o)?i={ms:o._milliseconds,d:o._days,M:o._months}:pl(o)||!isNaN(+o)?(i={},r?i[r]=+o:i.milliseconds=+o):(l=A6.exec(o))?(f=l[1]==="-"?-1:1,i={y:0,d:Qt(l[Do])*f,h:Qt(l[Yn])*f,m:Qt(l[js])*f,s:Qt(l[ml])*f,ms:Qt(u1(l[Ac]*1e3))*f}):(l=k6.exec(o))?(f=l[1]==="-"?-1:1,i={y:kc(l[2],f),M:kc(l[3],f),w:kc(l[4],f),d:kc(l[5],f),h:kc(l[6],f),m:kc(l[7],f),s:kc(l[8],f)}):i==null?i={}:typeof i=="object"&&("from"in i||"to"in i)&&(v=F6(Gr(i.from),Gr(i.to)),i={},i.ms=v.milliseconds,i.M=v.months),p=new zv(i),qv(o)&&vr(o,"_locale")&&(p._locale=o._locale),qv(o)&&vr(o,"_isValid")&&(p._isValid=o._isValid),p}zs.fn=zv.prototype,zs.invalid=g6;function kc(o,r){var i=o&&parseFloat(o.replace(",","."));return(isNaN(i)?0:i)*r}function Bw(o,r){var i={};return i.months=r.month()-o.month()+(r.year()-o.year())*12,o.clone().add(i.months,"M").isAfter(r)&&--i.months,i.milliseconds=+r-+o.clone().add(i.months,"M"),i}function F6(o,r){var i;return o.isValid()&&r.isValid()?(r=f1(r,o),o.isBefore(r)?i=Bw(o,r):(i=Bw(r,o),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function Mw(o,r){return function(i,l){var f,p;return l!==null&&!isNaN(+l)&&(ow(r,"moment()."+r+"(period, number) is deprecated. Please use moment()."+r+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),p=i,i=l,l=p),f=zs(i,l),Hw(this,f,o),this}}function Hw(o,r,i,l){var f=r._milliseconds,p=u1(r._days),v=u1(r._months);o.isValid()&&(l=l??!0,v&&yw(o,l0(o,"Month")+v*i),p&&vw(o,"Date",l0(o,"Date")+p*i),f&&o._d.setTime(o._d.valueOf()+f*i),l&&We.updateOffset(o,p||v))}var O6=Mw(1,"add"),N6=Mw(-1,"subtract");function Iw(o){return typeof o=="string"||o instanceof String}function B6(o){return Us(o)||n0(o)||Iw(o)||pl(o)||H6(o)||M6(o)||o===null||o===void 0}function M6(o){var r=Rc(o)&&!Px(o),i=!1,l=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],f,p,v=l.length;for(f=0;f<v;f+=1)p=l[f],i=i||vr(o,p);return r&&i}function H6(o){var r=Ls(o),i=!1;return r&&(i=o.filter(function(l){return!pl(l)&&Iw(o)}).length===0),r&&i}function I6(o){var r=Rc(o)&&!Px(o),i=!1,l=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],f,p;for(f=0;f<l.length;f+=1)p=l[f],i=i||vr(o,p);return r&&i}function $6(o,r){var i=o.diff(r,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"}function P6(o,r){arguments.length===1&&(arguments[0]?B6(arguments[0])?(o=arguments[0],r=void 0):I6(arguments[0])&&(r=arguments[0],o=void 0):(o=void 0,r=void 0));var i=o||Gr(),l=f1(i,this).startOf("day"),f=We.calendarFormat(this,l)||"sameElse",p=r&&(bo(r[f])?r[f].call(this,i):r[f]);return this.format(p||this.localeData().calendar(f,this,Gr(i)))}function L6(){return new i0(this)}function U6(o,r){var i=Us(o)?o:Gr(o);return this.isValid()&&i.isValid()?(r=os(r)||"millisecond",r==="millisecond"?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(r).valueOf()):!1}function j6(o,r){var i=Us(o)?o:Gr(o);return this.isValid()&&i.isValid()?(r=os(r)||"millisecond",r==="millisecond"?this.valueOf()<i.valueOf():this.clone().endOf(r).valueOf()<i.valueOf()):!1}function z6(o,r,i,l){var f=Us(o)?o:Gr(o),p=Us(r)?r:Gr(r);return this.isValid()&&f.isValid()&&p.isValid()?(l=l||"()",(l[0]==="("?this.isAfter(f,i):!this.isBefore(f,i))&&(l[1]===")"?this.isBefore(p,i):!this.isAfter(p,i))):!1}function q6(o,r){var i=Us(o)?o:Gr(o),l;return this.isValid()&&i.isValid()?(r=os(r)||"millisecond",r==="millisecond"?this.valueOf()===i.valueOf():(l=i.valueOf(),this.clone().startOf(r).valueOf()<=l&&l<=this.clone().endOf(r).valueOf())):!1}function Y6(o,r){return this.isSame(o,r)||this.isAfter(o,r)}function V6(o,r){return this.isSame(o,r)||this.isBefore(o,r)}function W6(o,r,i){var l,f,p;if(!this.isValid())return NaN;if(l=f1(o,this),!l.isValid())return NaN;switch(f=(l.utcOffset()-this.utcOffset())*6e4,r=os(r),r){case"year":p=Yv(this,l)/12;break;case"month":p=Yv(this,l);break;case"quarter":p=Yv(this,l)/3;break;case"second":p=(this-l)/1e3;break;case"minute":p=(this-l)/6e4;break;case"hour":p=(this-l)/36e5;break;case"day":p=(this-l-f)/864e5;break;case"week":p=(this-l-f)/6048e5;break;default:p=this-l}return i?p:ls(p)}function Yv(o,r){if(o.date()<r.date())return-Yv(r,o);var i=(r.year()-o.year())*12+(r.month()-o.month()),l=o.clone().add(i,"months"),f,p;return r-l<0?(f=o.clone().add(i-1,"months"),p=(r-l)/(l-f)):(f=o.clone().add(i+1,"months"),p=(r-l)/(f-l)),-(i+p)||0}We.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",We.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function G6(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function K6(o){if(!this.isValid())return null;var r=o!==!0,i=r?this.clone().utc():this;return i.year()<0||i.year()>9999?Ov(i,r?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):bo(Date.prototype.toISOString)?r?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Ov(i,"Z")):Ov(i,r?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Q6(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var o="moment",r="",i,l,f,p;return this.isLocal()||(o=this.utcOffset()===0?"moment.utc":"moment.parseZone",r="Z"),i="["+o+'("]',l=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",f="-MM-DD[T]HH:mm:ss.SSS",p=r+'[")]',this.format(i+l+f+p)}function X6(o){o||(o=this.isUtc()?We.defaultFormatUtc:We.defaultFormat);var r=Ov(this,o);return this.localeData().postformat(r)}function Z6(o,r){return this.isValid()&&(Us(o)&&o.isValid()||Gr(o).isValid())?zs({to:this,from:o}).locale(this.locale()).humanize(!r):this.localeData().invalidDate()}function J6(o){return this.from(Gr(),o)}function eA(o,r){return this.isValid()&&(Us(o)&&o.isValid()||Gr(o).isValid())?zs({from:this,to:o}).locale(this.locale()).humanize(!r):this.localeData().invalidDate()}function tA(o){return this.to(Gr(),o)}function $w(o){var r;return o===void 0?this._locale._abbr:(r=xl(o),r!=null&&(this._locale=r),this)}var Pw=ss("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(o){return o===void 0?this.localeData():this.locale(o)});function Lw(){return this._locale}var Vv=1e3,nd=60*Vv,Wv=60*nd,Uw=(365*400+97)*24*Wv;function id(o,r){return(o%r+r)%r}function jw(o,r,i){return o<100&&o>=0?new Date(o+400,r,i)-Uw:new Date(o,r,i).valueOf()}function zw(o,r,i){return o<100&&o>=0?Date.UTC(o+400,r,i)-Uw:Date.UTC(o,r,i)}function rA(o){var r,i;if(o=os(o),o===void 0||o==="millisecond"||!this.isValid())return this;switch(i=this._isUTC?zw:jw,o){case"year":r=i(this.year(),0,1);break;case"quarter":r=i(this.year(),this.month()-this.month()%3,1);break;case"month":r=i(this.year(),this.month(),1);break;case"week":r=i(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":r=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":r=i(this.year(),this.month(),this.date());break;case"hour":r=this._d.valueOf(),r-=id(r+(this._isUTC?0:this.utcOffset()*nd),Wv);break;case"minute":r=this._d.valueOf(),r-=id(r,nd);break;case"second":r=this._d.valueOf(),r-=id(r,Vv);break}return this._d.setTime(r),We.updateOffset(this,!0),this}function nA(o){var r,i;if(o=os(o),o===void 0||o==="millisecond"||!this.isValid())return this;switch(i=this._isUTC?zw:jw,o){case"year":r=i(this.year()+1,0,1)-1;break;case"quarter":r=i(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":r=i(this.year(),this.month()+1,1)-1;break;case"week":r=i(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":r=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":r=i(this.year(),this.month(),this.date()+1)-1;break;case"hour":r=this._d.valueOf(),r+=Wv-id(r+(this._isUTC?0:this.utcOffset()*nd),Wv)-1;break;case"minute":r=this._d.valueOf(),r+=nd-id(r,nd)-1;break;case"second":r=this._d.valueOf(),r+=Vv-id(r,Vv)-1;break}return this._d.setTime(r),We.updateOffset(this,!0),this}function iA(){return this._d.valueOf()-(this._offset||0)*6e4}function aA(){return Math.floor(this.valueOf()/1e3)}function sA(){return new Date(this.valueOf())}function oA(){var o=this;return[o.year(),o.month(),o.date(),o.hour(),o.minute(),o.second(),o.millisecond()]}function lA(){var o=this;return{years:o.year(),months:o.month(),date:o.date(),hours:o.hours(),minutes:o.minutes(),seconds:o.seconds(),milliseconds:o.milliseconds()}}function uA(){return this.isValid()?this.toISOString():null}function cA(){return Ux(this)}function fA(){return Eu({},$t(this))}function dA(){return $t(this).overflow}function hA(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}mt("N",0,0,"eraAbbr"),mt("NN",0,0,"eraAbbr"),mt("NNN",0,0,"eraAbbr"),mt("NNNN",0,0,"eraName"),mt("NNNNN",0,0,"eraNarrow"),mt("y",["y",1],"yo","eraYear"),mt("y",["yy",2],0,"eraYear"),mt("y",["yyy",3],0,"eraYear"),mt("y",["yyyy",4],0,"eraYear"),at("N",h1),at("NN",h1),at("NNN",h1),at("NNNN",bA),at("NNNNN",_A),Br(["N","NN","NNN","NNNN","NNNNN"],function(o,r,i,l){var f=i._locale.erasParse(o,l,i._strict);f?$t(i).era=f:$t(i).invalidEra=o}),at("y",Jf),at("yy",Jf),at("yyy",Jf),at("yyyy",Jf),at("yo",DA),Br(["y","yy","yyy","yyyy"],Mi),Br(["yo"],function(o,r,i,l){var f;i._locale._eraYearOrdinalRegex&&(f=o.match(i._locale._eraYearOrdinalRegex)),i._locale.eraYearOrdinalParse?r[Mi]=i._locale.eraYearOrdinalParse(o,f):r[Mi]=parseInt(o,10)});function pA(o,r){var i,l,f,p=this._eras||xl("en")._eras;for(i=0,l=p.length;i<l;++i){switch(typeof p[i].since){case"string":f=We(p[i].since).startOf("day"),p[i].since=f.valueOf();break}switch(typeof p[i].until){case"undefined":p[i].until=1/0;break;case"string":f=We(p[i].until).startOf("day").valueOf(),p[i].until=f.valueOf();break}}return p}function vA(o,r,i){var l,f,p=this.eras(),v,C,w;for(o=o.toUpperCase(),l=0,f=p.length;l<f;++l)if(v=p[l].name.toUpperCase(),C=p[l].abbr.toUpperCase(),w=p[l].narrow.toUpperCase(),i)switch(r){case"N":case"NN":case"NNN":if(C===o)return p[l];break;case"NNNN":if(v===o)return p[l];break;case"NNNNN":if(w===o)return p[l];break}else if([v,C,w].indexOf(o)>=0)return p[l]}function gA(o,r){var i=o.since<=o.until?1:-1;return r===void 0?We(o.since).year():We(o.since).year()+(r-o.offset)*i}function mA(){var o,r,i,l=this.localeData().eras();for(o=0,r=l.length;o<r;++o)if(i=this.clone().startOf("day").valueOf(),l[o].since<=i&&i<=l[o].until||l[o].until<=i&&i<=l[o].since)return l[o].name;return""}function yA(){var o,r,i,l=this.localeData().eras();for(o=0,r=l.length;o<r;++o)if(i=this.clone().startOf("day").valueOf(),l[o].since<=i&&i<=l[o].until||l[o].until<=i&&i<=l[o].since)return l[o].narrow;return""}function xA(){var o,r,i,l=this.localeData().eras();for(o=0,r=l.length;o<r;++o)if(i=this.clone().startOf("day").valueOf(),l[o].since<=i&&i<=l[o].until||l[o].until<=i&&i<=l[o].since)return l[o].abbr;return""}function EA(){var o,r,i,l,f=this.localeData().eras();for(o=0,r=f.length;o<r;++o)if(i=f[o].since<=f[o].until?1:-1,l=this.clone().startOf("day").valueOf(),f[o].since<=l&&l<=f[o].until||f[o].until<=l&&l<=f[o].since)return(this.year()-We(f[o].since).year())*i+f[o].offset;return this.year()}function SA(o){return vr(this,"_erasNameRegex")||p1.call(this),o?this._erasNameRegex:this._erasRegex}function CA(o){return vr(this,"_erasAbbrRegex")||p1.call(this),o?this._erasAbbrRegex:this._erasRegex}function wA(o){return vr(this,"_erasNarrowRegex")||p1.call(this),o?this._erasNarrowRegex:this._erasRegex}function h1(o,r){return r.erasAbbrRegex(o)}function bA(o,r){return r.erasNameRegex(o)}function _A(o,r){return r.erasNarrowRegex(o)}function DA(o,r){return r._eraYearOrdinalRegex||Jf}function p1(){var o=[],r=[],i=[],l=[],f,p,v,C,w,S=this.eras();for(f=0,p=S.length;f<p;++f)v=vl(S[f].name),C=vl(S[f].abbr),w=vl(S[f].narrow),r.push(v),o.push(C),i.push(w),l.push(v),l.push(C),l.push(w);this._erasRegex=new RegExp("^("+l.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+r.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+i.join("|")+")","i")}mt(0,["gg",2],0,function(){return this.weekYear()%100}),mt(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Gv(o,r){mt(0,[o,o.length],0,r)}Gv("gggg","weekYear"),Gv("ggggg","weekYear"),Gv("GGGG","isoWeekYear"),Gv("GGGGG","isoWeekYear"),at("G",Hv),at("g",Hv),at("GG",Wr,Ua),at("gg",Wr,Ua),at("GGGG",Xx,Qx),at("gggg",Xx,Qx),at("GGGGG",Mv,Nv),at("ggggg",Mv,Nv),s0(["gggg","ggggg","GGGG","GGGGG"],function(o,r,i,l){r[l.substr(0,2)]=Qt(o)}),s0(["gg","GG"],function(o,r,i,l){r[l]=We.parseTwoDigitYear(o)});function TA(o){return qw.call(this,o,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function RA(o){return qw.call(this,o,this.isoWeek(),this.isoWeekday(),1,4)}function AA(){return yl(this.year(),1,4)}function kA(){return yl(this.isoWeekYear(),1,4)}function FA(){var o=this.localeData()._week;return yl(this.year(),o.dow,o.doy)}function OA(){var o=this.localeData()._week;return yl(this.weekYear(),o.dow,o.doy)}function qw(o,r,i,l,f){var p;return o==null?c0(this,l,f).year:(p=yl(o,l,f),r>p&&(r=p),NA.call(this,o,r,i,l,f))}function NA(o,r,i,l,f){var p=Sw(o,r,i,l,f),v=u0(p.year,0,p.dayOfYear);return this.year(v.getUTCFullYear()),this.month(v.getUTCMonth()),this.date(v.getUTCDate()),this}mt("Q",0,"Qo","quarter"),at("Q",cw),Br("Q",function(o,r){r[gl]=(Qt(o)-1)*3});function BA(o){return o==null?Math.ceil((this.month()+1)/3):this.month((o-1)*3+this.month()%3)}mt("D",["DD",2],"Do","date"),at("D",Wr,ed),at("DD",Wr,Ua),at("Do",function(o,r){return o?r._dayOfMonthOrdinalParse||r._ordinalParse:r._dayOfMonthOrdinalParseLenient}),Br(["D","DD"],Do),Br("Do",function(o,r){r[Do]=Qt(o.match(Wr)[0])});var Yw=td("Date",!0);mt("DDD",["DDDD",3],"DDDo","dayOfYear"),at("DDD",Bv),at("DDDD",fw),Br(["DDD","DDDD"],function(o,r,i){i._dayOfYear=Qt(o)});function MA(o){var r=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return o==null?r:this.add(o-r,"d")}mt("m",["mm",2],0,"minute"),at("m",Wr,Zx),at("mm",Wr,Ua),Br(["m","mm"],js);var HA=td("Minutes",!1);mt("s",["ss",2],0,"second"),at("s",Wr,Zx),at("ss",Wr,Ua),Br(["s","ss"],ml);var IA=td("Seconds",!1);mt("S",0,0,function(){return~~(this.millisecond()/100)}),mt(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),mt(0,["SSS",3],0,"millisecond"),mt(0,["SSSS",4],0,function(){return this.millisecond()*10}),mt(0,["SSSSS",5],0,function(){return this.millisecond()*100}),mt(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),mt(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),mt(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),mt(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),at("S",Bv,cw),at("SS",Bv,Ua),at("SSS",Bv,fw);var Cu,Vw;for(Cu="SSSS";Cu.length<=9;Cu+="S")at(Cu,Jf);function $A(o,r){r[Ac]=Qt(("0."+o)*1e3)}for(Cu="S";Cu.length<=9;Cu+="S")Br(Cu,$A);Vw=td("Milliseconds",!1),mt("z",0,0,"zoneAbbr"),mt("zz",0,0,"zoneName");function PA(){return this._isUTC?"UTC":""}function LA(){return this._isUTC?"Coordinated Universal Time":""}var Me=i0.prototype;Me.add=O6,Me.calendar=P6,Me.clone=L6,Me.diff=W6,Me.endOf=nA,Me.format=X6,Me.from=Z6,Me.fromNow=J6,Me.to=eA,Me.toNow=tA,Me.get=Q8,Me.invalidAt=dA,Me.isAfter=U6,Me.isBefore=j6,Me.isBetween=z6,Me.isSame=q6,Me.isSameOrAfter=Y6,Me.isSameOrBefore=V6,Me.isValid=cA,Me.lang=Pw,Me.locale=$w,Me.localeData=Lw,Me.max=c6,Me.min=u6,Me.parsingFlags=fA,Me.set=X8,Me.startOf=rA,Me.subtract=N6,Me.toArray=oA,Me.toObject=lA,Me.toDate=sA,Me.toISOString=K6,Me.inspect=Q6,typeof Symbol<"u"&&Symbol.for!=null&&(Me[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Me.toJSON=uA,Me.toString=G6,Me.unix=aA,Me.valueOf=iA,Me.creationData=hA,Me.eraName=mA,Me.eraNarrow=yA,Me.eraAbbr=xA,Me.eraYear=EA,Me.year=pw,Me.isLeapYear=K8,Me.weekYear=TA,Me.isoWeekYear=RA,Me.quarter=Me.quarters=BA,Me.month=xw,Me.daysInMonth=s4,Me.week=Me.weeks=p4,Me.isoWeek=Me.isoWeeks=v4,Me.weeksInYear=FA,Me.weeksInWeekYear=OA,Me.isoWeeksInYear=AA,Me.isoWeeksInISOWeekYear=kA,Me.date=Yw,Me.day=Me.days=R4,Me.weekday=A4,Me.isoWeekday=k4,Me.dayOfYear=MA,Me.hour=Me.hours=I4,Me.minute=Me.minutes=HA,Me.second=Me.seconds=IA,Me.millisecond=Me.milliseconds=Vw,Me.utcOffset=x6,Me.utc=S6,Me.local=C6,Me.parseZone=w6,Me.hasAlignedHourOffset=b6,Me.isDST=_6,Me.isLocal=T6,Me.isUtcOffset=R6,Me.isUtc=Nw,Me.isUTC=Nw,Me.zoneAbbr=PA,Me.zoneName=LA,Me.dates=ss("dates accessor is deprecated. Use date instead.",Yw),Me.months=ss("months accessor is deprecated. Use month instead",xw),Me.years=ss("years accessor is deprecated. Use year instead",pw),Me.zone=ss("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",E6),Me.isDSTShifted=ss("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",D6);function UA(o){return Gr(o*1e3)}function jA(){return Gr.apply(null,arguments).parseZone()}function Ww(o){return o}var gr=Yx.prototype;gr.calendar=T8,gr.longDateFormat=F8,gr.invalidDate=N8,gr.ordinal=H8,gr.preparse=Ww,gr.postformat=Ww,gr.relativeTime=$8,gr.pastFuture=P8,gr.set=_8,gr.eras=pA,gr.erasParse=vA,gr.erasConvertYear=gA,gr.erasAbbrRegex=CA,gr.erasNameRegex=SA,gr.erasNarrowRegex=wA,gr.months=r4,gr.monthsShort=n4,gr.monthsParse=a4,gr.monthsRegex=l4,gr.monthsShortRegex=o4,gr.week=c4,gr.firstDayOfYear=h4,gr.firstDayOfWeek=d4,gr.weekdays=w4,gr.weekdaysMin=_4,gr.weekdaysShort=b4,gr.weekdaysParse=T4,gr.weekdaysRegex=F4,gr.weekdaysShortRegex=O4,gr.weekdaysMinRegex=N4,gr.isPM=M4,gr.meridiem=$4;function Kv(o,r,i,l){var f=xl(),p=wo().set(l,r);return f[i](p,o)}function Gw(o,r,i){if(pl(o)&&(r=o,o=void 0),o=o||"",r!=null)return Kv(o,r,i,"month");var l,f=[];for(l=0;l<12;l++)f[l]=Kv(o,l,i,"month");return f}function v1(o,r,i,l){typeof o=="boolean"?(pl(r)&&(i=r,r=void 0),r=r||""):(r=o,i=r,o=!1,pl(r)&&(i=r,r=void 0),r=r||"");var f=xl(),p=o?f._week.dow:0,v,C=[];if(i!=null)return Kv(r,(i+p)%7,l,"day");for(v=0;v<7;v++)C[v]=Kv(r,(v+p)%7,l,"day");return C}function zA(o,r){return Gw(o,r,"months")}function qA(o,r){return Gw(o,r,"monthsShort")}function YA(o,r,i){return v1(o,r,i,"weekdays")}function VA(o,r,i){return v1(o,r,i,"weekdaysShort")}function WA(o,r,i){return v1(o,r,i,"weekdaysMin")}Su("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(o){var r=o%10,i=Qt(o%100/10)===1?"th":r===1?"st":r===2?"nd":r===3?"rd":"th";return o+i}}),We.lang=ss("moment.lang is deprecated. Use moment.locale instead.",Su),We.langData=ss("moment.langData is deprecated. Use moment.localeData instead.",xl);var El=Math.abs;function GA(){var o=this._data;return this._milliseconds=El(this._milliseconds),this._days=El(this._days),this._months=El(this._months),o.milliseconds=El(o.milliseconds),o.seconds=El(o.seconds),o.minutes=El(o.minutes),o.hours=El(o.hours),o.months=El(o.months),o.years=El(o.years),this}function Kw(o,r,i,l){var f=zs(r,i);return o._milliseconds+=l*f._milliseconds,o._days+=l*f._days,o._months+=l*f._months,o._bubble()}function KA(o,r){return Kw(this,o,r,1)}function QA(o,r){return Kw(this,o,r,-1)}function Qw(o){return o<0?Math.floor(o):Math.ceil(o)}function XA(){var o=this._milliseconds,r=this._days,i=this._months,l=this._data,f,p,v,C,w;return o>=0&&r>=0&&i>=0||o<=0&&r<=0&&i<=0||(o+=Qw(g1(i)+r)*864e5,r=0,i=0),l.milliseconds=o%1e3,f=ls(o/1e3),l.seconds=f%60,p=ls(f/60),l.minutes=p%60,v=ls(p/60),l.hours=v%24,r+=ls(v/24),w=ls(Xw(r)),i+=w,r-=Qw(g1(w)),C=ls(i/12),i%=12,l.days=r,l.months=i,l.years=C,this}function Xw(o){return o*4800/146097}function g1(o){return o*146097/4800}function ZA(o){if(!this.isValid())return NaN;var r,i,l=this._milliseconds;if(o=os(o),o==="month"||o==="quarter"||o==="year")switch(r=this._days+l/864e5,i=this._months+Xw(r),o){case"month":return i;case"quarter":return i/3;case"year":return i/12}else switch(r=this._days+Math.round(g1(this._months)),o){case"week":return r/7+l/6048e5;case"day":return r+l/864e5;case"hour":return r*24+l/36e5;case"minute":return r*1440+l/6e4;case"second":return r*86400+l/1e3;case"millisecond":return Math.floor(r*864e5)+l;default:throw new Error("Unknown unit "+o)}}function Sl(o){return function(){return this.as(o)}}var Zw=Sl("ms"),JA=Sl("s"),ek=Sl("m"),tk=Sl("h"),rk=Sl("d"),nk=Sl("w"),ik=Sl("M"),ak=Sl("Q"),sk=Sl("y"),ok=Zw;function lk(){return zs(this)}function uk(o){return o=os(o),this.isValid()?this[o+"s"]():NaN}function Fc(o){return function(){return this.isValid()?this._data[o]:NaN}}var ck=Fc("milliseconds"),fk=Fc("seconds"),dk=Fc("minutes"),hk=Fc("hours"),pk=Fc("days"),vk=Fc("months"),gk=Fc("years");function mk(){return ls(this.days()/7)}var Cl=Math.round,ad={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function yk(o,r,i,l,f){return f.relativeTime(r||1,!!i,o,l)}function xk(o,r,i,l){var f=zs(o).abs(),p=Cl(f.as("s")),v=Cl(f.as("m")),C=Cl(f.as("h")),w=Cl(f.as("d")),S=Cl(f.as("M")),b=Cl(f.as("w")),T=Cl(f.as("y")),A=p<=i.ss&&["s",p]||p<i.s&&["ss",p]||v<=1&&["m"]||v<i.m&&["mm",v]||C<=1&&["h"]||C<i.h&&["hh",C]||w<=1&&["d"]||w<i.d&&["dd",w];return i.w!=null&&(A=A||b<=1&&["w"]||b<i.w&&["ww",b]),A=A||S<=1&&["M"]||S<i.M&&["MM",S]||T<=1&&["y"]||["yy",T],A[2]=r,A[3]=+o>0,A[4]=l,yk.apply(null,A)}function Ek(o){return o===void 0?Cl:typeof o=="function"?(Cl=o,!0):!1}function Sk(o,r){return ad[o]===void 0?!1:r===void 0?ad[o]:(ad[o]=r,o==="s"&&(ad.ss=r-1),!0)}function Ck(o,r){if(!this.isValid())return this.localeData().invalidDate();var i=!1,l=ad,f,p;return typeof o=="object"&&(r=o,o=!1),typeof o=="boolean"&&(i=o),typeof r=="object"&&(l=Object.assign({},ad,r),r.s!=null&&r.ss==null&&(l.ss=r.s-1)),f=this.localeData(),p=xk(this,!i,l,f),i&&(p=f.pastFuture(+this,p)),f.postformat(p)}var m1=Math.abs;function sd(o){return(o>0)-(o<0)||+o}function Qv(){if(!this.isValid())return this.localeData().invalidDate();var o=m1(this._milliseconds)/1e3,r=m1(this._days),i=m1(this._months),l,f,p,v,C=this.asSeconds(),w,S,b,T;return C?(l=ls(o/60),f=ls(l/60),o%=60,l%=60,p=ls(i/12),i%=12,v=o?o.toFixed(3).replace(/\.?0+$/,""):"",w=C<0?"-":"",S=sd(this._months)!==sd(C)?"-":"",b=sd(this._days)!==sd(C)?"-":"",T=sd(this._milliseconds)!==sd(C)?"-":"",w+"P"+(p?S+p+"Y":"")+(i?S+i+"M":"")+(r?b+r+"D":"")+(f||l||o?"T":"")+(f?T+f+"H":"")+(l?T+l+"M":"")+(o?T+v+"S":"")):"P0D"}var ir=zv.prototype;ir.isValid=v6,ir.abs=GA,ir.add=KA,ir.subtract=QA,ir.as=ZA,ir.asMilliseconds=Zw,ir.asSeconds=JA,ir.asMinutes=ek,ir.asHours=tk,ir.asDays=rk,ir.asWeeks=nk,ir.asMonths=ik,ir.asQuarters=ak,ir.asYears=sk,ir.valueOf=ok,ir._bubble=XA,ir.clone=lk,ir.get=uk,ir.milliseconds=ck,ir.seconds=fk,ir.minutes=dk,ir.hours=hk,ir.days=pk,ir.weeks=mk,ir.months=vk,ir.years=gk,ir.humanize=Ck,ir.toISOString=Qv,ir.toString=Qv,ir.toJSON=Qv,ir.locale=$w,ir.localeData=Lw,ir.toIsoString=ss("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Qv),ir.lang=Pw,mt("X",0,0,"unix"),mt("x",0,0,"valueOf"),at("x",Hv),at("X",z8),Br("X",function(o,r,i){i._d=new Date(parseFloat(o)*1e3)}),Br("x",function(o,r,i){i._d=new Date(Qt(o))});//! moment.js
412
- We.version="2.30.1",w8(Gr),We.fn=Me,We.min=f6,We.max=d6,We.now=h6,We.utc=wo,We.unix=UA,We.months=zA,We.isDate=n0,We.locale=Su,We.invalid=kv,We.duration=zs,We.isMoment=Us,We.weekdays=YA,We.parseZone=jA,We.localeData=xl,We.isDuration=qv,We.monthsShort=qA,We.weekdaysMin=WA,We.defineLocale=i1,We.updateLocale=j4,We.locales=z4,We.weekdaysShort=VA,We.normalizeUnits=os,We.relativeTimeRounding=Ek,We.relativeTimeThreshold=Sk,We.calendarFormat=$6,We.prototype=Me,We.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};let Xv=null,y1=null,on=null,Jw=null,To=null;function wk(o,r){if(!o||!o.sessionDescriptionHandler)return;const i=o.sessionDescriptionHandler.peerConnection;i&&i.getSenders().forEach(l=>{l.track&&l.track.kind==="audio"&&(l.track.enabled=r)})}function eb(o){To||(To=document.createElement("audio"),To.id="voxnix-remote-audio",To.autoplay=!0,document.body.appendChild(To));const r=new MediaStream;if(o.sessionDescriptionHandler&&o.sessionDescriptionHandler.peerConnection){o.sessionDescriptionHandler.peerConnection.getReceivers().forEach(l=>{l.track&&r.addTrack(l.track)});const i=o.sessionDescriptionHandler.peerConnection;if(!i._isSetRemoteDescPatched){const l=i.setRemoteDescription.bind(i);i.setRemoteDescription=function(f){if(f&&f.sdp&&f.type==="answer"){const v=(((i.localDescription||{}).sdp||"").match(/^m=/gm)||[]).length,C=(f.sdp.match(/^m=/gm)||[]).length;if(console.log("[RTC Patch] local offer m-lines:",v,"| remote answer m-lines:",C),v>0&&C>v){const w=f.sdp.split(/\r?\n/);let S=0,b=!1;const T=[];for(const H of w)H.startsWith("m=")&&(S++,b=S>v),b||T.push(H);let A=T.join(`\r
413
- `);A.endsWith(`\r
414
- `)||(A+=`\r
415
- `),console.log("[RTC Patch] filtered to",(A.match(/^m=/gm)||[]).length,"m-lines. Applying to Chrome."),f={type:"answer",sdp:A}}}return l(f)},i._isSetRemoteDescPatched=!0}}To.srcObject=r,To.play().catch(i=>console.error("Error playing media:",i))}function tb(){To&&(To.srcObject=null,To.pause())}const bk=()=>{Ze.on("incoming_call",()=>{Dn.pushSound()}),Ze.on("local_dial",({number:o})=>{if(Xv){const r=Tc.makeURI(`sip:${o}@${Xv.configuration.uri.domain}`),i=new V2(Xv,r);i.stateChange.addListener(l=>{l===xe.Establishing?Ze.emitLocal("call_status","Calling..."):l===xe.Established?(eb(i),on=i,Ze.emitLocal("call_status","InCall")):l===xe.Terminated&&(tb(),Ze.emitLocal("call_status","Idle"),on=null)}),i.invite()}}),Ze.on("local_hangup",()=>{Dn.stopSound(),on&&(on.state===xe.Established?on.bye():typeof on.reject=="function"?on.reject():on.cancel()),Ze.emitLocal("call_status","Idle"),Ze.emitLocal("call_duration","00:00"),Ze.emitToParent("sync_call_ended")}),Ze.on("local_reject",()=>{Dn.stopSound(),on&&(typeof on.reject=="function"?on.reject():on.cancel()),Ze.emitLocal("call_status","Idle"),Ze.emitLocal("call_duration","00:00"),Ze.emitToParent("sync_call_ended")}),Ze.on("local_answer",()=>{Dn.stopSound();const o={sessionDescriptionHandlerOptions:{constraints:{audio:!0,video:!1}}};on&&on.accept(o)}),Ze.on("local_toggle_mute",({muted:o})=>{on&&wk(on,!o)}),Ze.on("local_toggle_hold",({isOnHold:o,setIsOnHold:r})=>{if(on)try{const i=!o,l={sessionDescriptionHandlerOptions:{hold:i}};on.invite(l).then(()=>{r(i),console.log(i?"Call successfully put on hold":"Call successfully resumed")}).catch(f=>{console.error("Hold/Unhold failed",f)})}catch(i){console.error("Gagal mengubah status hold:",i)}}),Ze.on("local_dtmf",({key:o})=>{on&&on.sessionDescriptionHandler&&on.sessionDescriptionHandler.sendDtmf(o)})},_k=()=>new Promise(o=>{if(!y1)return o(!1);y1.register({requestDelegate:{onAccept:()=>o(!0),onReject:r=>{var i;console.error("SIP re-register rejected:",(i=r==null?void 0:r.message)==null?void 0:i.statusCode),o(!1)}}}).catch(r=>{console.error("SIP re-register failed:",r),o(!1)})}),Dk=3,Tk=1e3,rb=async o=>{let r=await Dn.fetchExtensionStatus(o);if(!r||Number(r.is_register)!==0)return{ext:r,registered:!0};if(!await _k())return{ext:r,registered:!1};for(let i=0;i<Dk;i++)if(await new Promise(l=>setTimeout(l,Tk)),r=await Dn.fetchExtensionStatus(o),r&&Number(r.is_register)===1)return{ext:r,registered:!0};return console.warn("[ExtStatus] is_register still 0 after SIP re-register"),{ext:r,registered:!1}},Rk=async()=>{const{ext:o,registered:r}=await rb(Dn.getExtensionUsername());if(!r){Ze.emitLocal("register_status",{status:"FAILED",reason:"Extension not registered after SIP re-register"});return}const i=o==null?void 0:o.extension_status;if(i==="Ready"){Ze.emitLocal("register_status","REGISTERED"),Ze.emitLocal("agent_status","READY");return}const l=typeof i=="string"&&i.toLowerCase().startsWith("aux");Ze.emitLocal("register_status","SIP_CONNECTED"),Ze.emitLocal("agent_status",l?"AUX":"NOT_READY")},nb=async(o,r)=>{const i=Dn.getExtensionUsername(),{ext:l,registered:f}=await rb(i);return f?o==="Ready"&&(l==null?void 0:l.extension_status)==="Ready"?!0:Dn.updateExtensionStatus(i,o,r):!1},Ak=async o=>{window.__sipjsEventsBound||(bk(),window.__sipjsEventsBound=!0);const{auth:r}=o;if(!r)return;const i=r.user_pbx||r.username,l=r.pwd_pbx||r.secret,f=Dn.getSipHost(),p=Dn.getWssHost(),v=r.port||8089;if(!(!i||!f)){console.log("[SIP Debug] globalConfig:",Dn.getConfig()),console.log("[SIP Debug] sipHost:",f),console.log("[SIP Debug] wssHost:",p);try{const C=Tc.makeURI(`sip:${i}@${f}`);if(!C)throw new Error("Failed to create SIP URI");const w=`wss://${p}:${v}`,S=new Tc({uri:C,transportOptions:{server:w,useSSL:!0,keepAliveInterval:15},authorizationUsername:i,authorizationPassword:l,sessionDescriptionHandlerFactoryOptions:{peerConnectionConfiguration:{iceServers:[]},constraints:{audio:!0,video:!1}},logLevel:"warn",contactParams:{transport:"tls"},registererOptions:{expires:600,refreshFrequency:90}});Xv=S;const b=new So(S);y1=b,b.stateChange.addListener(async T=>{var A;console.log("NEW STATE",T),T===Er.Registered?((A=Dn.getConfig())==null?void 0:A.autoReady)!==!1?await nb("Ready","ready")?(Ze.emitLocal("register_status","REGISTERED"),Ze.emitLocal("agent_status","READY")):Ze.emitLocal("register_status",{status:"FAILED",reason:"Failed to hit extension ready API"}):await Rk():(T===Er.Unregistered||T===Er.Terminated)&&Ze.emitLocal("register_status",{status:"FAILED",reason:"SIP Unregistered or Terminated"})}),S.delegate={onInvite(T){let A=!1;on=T,Ze.emitLocal("sipjsSession",T),Dn.pushSound(),Dn.pushNotification(`New incoming call from ${T.remoteIdentity.uri.user}`),Ze.emitLocal("incoming_call",T),Ze.emitToParent("sync_incoming_call",T),T.stateChange.addListener(H=>{if(H===xe.Established){eb(T),A=!0,Ze.emitLocal("call_status","InCall"),Ze.emitToParent("sync_call_answered",T);const P=We();Jw=setInterval(()=>{const j=We.duration(We().diff(P));Ze.emitLocal("call_duration",Dn.toHHMMSS(j.asSeconds()))},1e3)}else H===xe.Terminated&&(tb(),clearInterval(Jw),Dn.stopSound(),Ze.emitLocal("call_duration","00:00"),Ze.emitLocal("call_status","Idle"),A?Ze.emitToParent("sync_call_ended",T):Ze.emitToParent("sync_call_unanswered"),on=null)})}},await S.start(),await b.register()}catch(C){console.error("SipJS init error:",C),Ze.emitLocal("register_status",{status:"FAILED",reason:C.message||"Failed to connect to SIP server"})}}};function kk({initialRegisterStatus:o="CONNECTING",autoReady:r=!0,showAuxButton:i=!1,auxOptions:l=[]}){const[f,p]=qt.useState(""),[v,C]=qt.useState("Idle"),[w,S]=qt.useState("00:00"),[b,T]=qt.useState(!1),[A,H]=qt.useState(!1),[P,j]=qt.useState(!1),[z,N]=qt.useState(""),[B,U]=qt.useState(""),[q,K]=qt.useState(""),[Z,ee]=qt.useState(o),[R,Se]=qt.useState(""),[X,F]=qt.useState(r&&o==="REGISTERED"?"READY":"NOT_READY"),[L,M]=qt.useState(!1),[_e,be]=qt.useState(null),$e=qt.useCallback(Ce=>{U(Ce),setTimeout(()=>U(""),4e3)},[]);qt.useEffect(()=>{const Ce=[Ze.on("call_status",Te=>{C(Te),Te!=="InCall"&&(j(!1),N(""),H(!1),T(!1))}),Ze.on("call_duration",S),Ze.on("incoming_call",Te=>{var zr,Yt,Xt,Fr,br,nn,Rn,vn;const xt=((Yt=(zr=Te==null?void 0:Te.remoteIdentity)==null?void 0:zr.uri)==null?void 0:Yt.user)||(Te==null?void 0:Te.from_id)||"Unknown",Sr=((Xt=Te==null?void 0:Te.remoteIdentity)==null?void 0:Xt.displayName)||((br=(Fr=Te==null?void 0:Te.request)==null?void 0:Fr.from)==null?void 0:br.displayName)||((vn=(Rn=(nn=Te==null?void 0:Te.incomingInviteRequest)==null?void 0:nn.message)==null?void 0:Rn.from)==null?void 0:vn.displayName)||(Te==null?void 0:Te.from_name)||Dn.getContactName(xt)||"";p(xt),K(Sr),C("Ringing")}),Ze.on("register_status",Te=>{const xt=typeof Te=="string"?Te:(Te==null?void 0:Te.status)??"FAILED",Sr=typeof Te=="object"?Te==null?void 0:Te.reason:"";ee(xt),Se(xt==="FAILED"?Sr||"Failed to connect to Voice Platform":""),xt!=="REGISTERED"&&xt!=="SIP_CONNECTED"&&F("NOT_READY")}),Ze.on("agent_status",Te=>{F(Te),Te!=="AUX"&&be(null)}),Ze.on("call_failed",Te=>$e(Te||"Call Failed"))];return()=>Ce.forEach(Te=>Te())},[$e]),qt.useEffect(()=>{v==="Idle"&&K(Dn.getContactName(f)||"")},[f,v]),qt.useEffect(()=>{const Ce=Te=>{Te.metaKey||Te.ctrlKey||Te.altKey||(v==="InCall"&&/^[0-9*#]$/.test(Te.key)?G(Te.key):v==="Idle"&&Z==="REGISTERED"&&/^[0-9+*#]$/.test(Te.key)?p(xt=>xt+Te.key):v==="Idle"&&Te.key==="Backspace"?p(xt=>xt.slice(0,-1)):v==="Idle"&&Te.key==="Enter"&&$())};return window.addEventListener("keydown",Ce),()=>window.removeEventListener("keydown",Ce)},[v,Z,f]);const ge=async(Ce,Te)=>{if(!Dn.getExtensionUsername())return!1;M(!0);const xt=await nb(Ce,Te);return M(!1),xt},Ee=async()=>{await ge("Ready","ready")&&(F("READY"),be(null),Ze.emitLocal("register_status","REGISTERED"),Ze.emitLocal("agent_status","READY"))},He=async()=>{await ge("Logout","not_ready")&&(F("NOT_READY"),be(null),Ze.emitLocal("register_status","SIP_CONNECTED"),Ze.emitLocal("agent_status","NOT_READY"))},De=async(Ce=null)=>{const Te=(Ce==null?void 0:Ce.code)||"AUX",xt=(Ce==null?void 0:Ce.label)||"AUX";await ge("AUX",Te)&&(F("AUX"),be({code:Te,label:xt}),Ze.emitLocal("agent_status","AUX")),setShowAuxMenu(!1)},$=()=>{const Ce=f.trim();Ce&&Ze.emitLocal("local_dial",{number:Ce})},G=Ce=>{N(Te=>Te+Ce),Ze.emitLocal("local_dtmf",{key:Ce})},he=()=>Ze.emitLocal("local_hangup"),le=()=>Ze.emitLocal("local_answer"),tt=()=>Ze.emitLocal("local_reject"),Ke=()=>{const Ce=!b;T(Ce),Ze.emitLocal("local_toggle_mute",{muted:Ce})},ct=()=>{Ze.emitLocal("local_toggle_hold",{isOnHold:A,setIsOnHold:H})};if(v==="Ringing")return se.jsxs(od,{error:B,children:[se.jsxs("div",{className:"flex flex-col items-center justify-center px-6 py-10 gap-7 min-h-[300px] animate-fadeIn",children:[se.jsx(x1,{color:"green",pulse:!0,children:se.jsx(JC,{className:"w-9 h-9 text-green-600"})}),se.jsxs("div",{className:"text-center space-y-1",children:[se.jsx("p",{className:"text-lg font-bold text-gray-800 leading-tight",children:q||f||"Unknown"}),q&&se.jsx("p",{className:"text-sm font-mono text-gray-400 tracking-wider",children:f}),se.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-green-50 border border-green-100 mt-1",children:[se.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse"}),se.jsx("span",{className:"text-[11px] font-semibold text-green-600 uppercase tracking-widest",children:"Incoming Call"})]})]})]}),se.jsxs(ib,{children:[se.jsx(E1,{color:"red",size:"lg",onClick:tt,title:"Reject",children:se.jsx(Ev,{className:"w-6 h-6"})}),se.jsx(E1,{color:"green",size:"lg",onClick:le,title:"Answer",pulse:!0,children:se.jsx(Xh,{className:"w-6 h-6 fill-white"})})]})]});if(v==="Calling...")return se.jsxs(od,{error:B,children:[se.jsxs("div",{className:"flex flex-col items-center justify-center px-6 py-10 gap-7 min-h-[300px] animate-fadeIn",children:[se.jsx(x1,{color:"primary",pulse:!0,children:se.jsx(sR,{className:"w-9 h-9 text-primary"})}),se.jsxs("div",{className:"text-center space-y-1",children:[se.jsx("p",{className:"text-lg font-bold text-gray-800 leading-tight",children:q||f}),q&&se.jsx("p",{className:"text-xs font-mono text-gray-400 tracking-wider",children:f}),se.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-primary/8 border border-primary/15 mt-1",children:[se.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-primary animate-pulse"}),se.jsx("span",{className:"text-[11px] font-semibold text-primary uppercase tracking-widest",children:"Dialing..."})]})]})]}),se.jsx(ib,{children:se.jsx(E1,{color:"red",size:"lg",onClick:he,title:"Cancel",children:se.jsx(Ev,{className:"w-6 h-6"})})})]});if(v==="InCall")return se.jsxs(od,{error:B,children:[P?se.jsxs("div",{className:"animate-fadeIn",children:[se.jsxs("div",{className:"px-6 pt-5 pb-2 text-center",children:[se.jsx("p",{className:"text-[10px] font-bold text-gray-400 uppercase tracking-[0.2em] mb-2",children:"DTMF"}),se.jsx("div",{className:"min-h-[44px] flex items-center justify-center",children:se.jsx("span",{className:"text-3xl font-light text-gray-700 tracking-[0.25em] font-mono",children:z||se.jsx("span",{className:"text-gray-200",children:"—"})})})]}),se.jsx(e2,{onKeyPress:G})]}):se.jsxs("div",{className:"flex flex-col items-center justify-center px-6 py-10 gap-7 min-h-[300px] animate-fadeIn",children:[se.jsx(x1,{color:A?"primary":"green",pulse:!A,children:A?se.jsx(ZC,{className:"w-9 h-9 text-primary"}):se.jsx(JC,{className:"w-9 h-9 text-green-600"})}),se.jsxs("div",{className:"text-center space-y-1",children:[se.jsx("p",{className:"text-base font-bold text-gray-800 leading-tight",children:q||f||"Connected"}),q&&se.jsx("p",{className:"text-xs font-mono text-gray-400 tracking-wider",children:f}),se.jsxs("div",{className:"flex items-center justify-center gap-2 mt-1",children:[!A&&se.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse"}),se.jsx("span",{className:`text-sm font-mono font-semibold ${A?"text-primary":"text-green-600"}`,children:A?"On Hold":w})]})]})]}),se.jsx("div",{className:"border-t border-gray-100 bg-gray-50/60 px-6 py-4",children:se.jsxs("div",{className:"flex items-center justify-between gap-2 max-w-[260px] mx-auto",children:[se.jsx(S1,{onClick:Ke,active:b,activeColor:"red",title:b?"Unmute":"Mute",children:b?se.jsx(iR,{className:"w-[18px] h-[18px]"}):se.jsx(aR,{className:"w-[18px] h-[18px]"})}),se.jsx(S1,{onClick:ct,active:A,activeColor:"primary",title:A?"Resume":"Hold",children:A?se.jsx(oR,{className:"w-[18px] h-[18px]"}):se.jsx(ZC,{className:"w-[18px] h-[18px]"})}),se.jsx(S1,{onClick:()=>j(Ce=>!Ce),active:P,activeColor:"primary",title:"Keypad",children:se.jsx(nR,{className:"w-[18px] h-[18px]"})}),se.jsx("button",{onClick:he,title:"End Call",className:"w-12 h-12 rounded-full bg-red-500 hover:bg-red-600 text-white flex items-center justify-center shadow-[0_4px_14px_rgba(239,68,68,0.4)] hover:shadow-[0_6px_18px_rgba(239,68,68,0.5)] transition-all active:scale-95",children:se.jsx(Ev,{className:"w-5 h-5"})})]})})]});if(Z==="REGISTERED")return se.jsxs(od,{error:B,children:[se.jsxs("div",{className:"px-5 pt-5 pb-1",children:[se.jsxs("div",{className:"relative flex items-center justify-center min-h-[56px] bg-gray-50 rounded-2xl border border-gray-100 px-10",children:[se.jsx("input",{type:"text",value:f,onChange:Ce=>p(Ce.target.value.replace(/[^0-9+*#]/g,"")),onKeyDown:Ce=>Ce.key==="Enter"&&$(),className:"w-full text-center text-[28px] font-light text-gray-800 tracking-[0.12em] bg-transparent outline-none placeholder:text-gray-300 placeholder:text-2xl placeholder:font-normal",placeholder:"Enter number"}),f&&se.jsx("button",{onClick:()=>p(Ce=>Ce.slice(0,-1)),onMouseDown:Ce=>Ce.preventDefault(),className:"absolute right-3 p-1.5 rounded-full text-gray-300 hover:text-gray-500 hover:bg-gray-200 transition-all",children:se.jsx(rR,{className:"w-4 h-4"})})]}),q&&se.jsx("p",{className:"text-center text-xs text-primary/70 font-medium mt-1.5 tracking-wide",children:q})]}),se.jsx(e2,{onKeyPress:Ce=>p(Te=>Te+Ce)}),se.jsx("div",{className:"px-5 pb-4 pt-1 flex justify-center",children:se.jsxs("button",{onClick:$,disabled:!f.trim(),className:`
416
- flex items-center gap-3 px-10 py-3.5 rounded-full
417
- bg-gradient-to-r from-green-500 to-green-600
418
- hover:from-green-600 hover:to-green-700
419
- disabled:from-gray-200 disabled:to-gray-200 disabled:text-gray-400 disabled:cursor-not-allowed
420
- text-white font-semibold text-sm tracking-wide
421
- shadow-[0_4px_14px_rgba(34,197,94,0.4)]
422
- hover:shadow-[0_6px_20px_rgba(34,197,94,0.5)]
423
- disabled:shadow-none
424
- transition-all active:scale-95
425
- `,children:[se.jsx(Xh,{className:"w-4 h-4 fill-white"}),"Call"]})}),se.jsx(Fk,{agentStatus:X,currentAux:_e,loading:L,autoReady:r,showAuxButton:i,auxOptions:l,onReady:Ee,onNotReady:He,onAux:De})]});if(Z==="SIP_CONNECTED"){const Ce={READY:{label:"Ready",dot:"bg-green-500",text:"text-green-600"},NOT_READY:{label:"Not Ready",dot:"bg-blue-400",text:"text-blue-500"},AUX:{label:(_e==null?void 0:_e.label)||"AUX",dot:"bg-amber-400",text:"text-amber-600"}},Te=Ce[X]||Ce.NOT_READY;return se.jsx(od,{error:B,children:se.jsxs("div",{className:"flex flex-col items-center justify-center px-6 py-10 gap-6 min-h-[300px] animate-fadeIn",children:[se.jsxs("div",{className:"relative w-16 h-16",children:[se.jsx("div",{className:"absolute inset-0 rounded-full border-4 border-primary/20"}),se.jsx("div",{className:"absolute inset-2 rounded-full bg-primary/10 flex items-center justify-center",children:se.jsx(Xh,{className:"w-5 h-5 text-primary",style:{transform:"rotate(90deg)"}})})]}),se.jsxs("div",{className:"text-center space-y-2",children:[se.jsx("p",{className:"text-sm font-semibold text-gray-700",children:"SIP Connected"}),se.jsx("p",{className:"text-xs text-gray-400",children:"Click Ready to activate your session"}),se.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-gray-50 border border-gray-200 mt-1",children:[se.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${Te.dot}`}),se.jsx("span",{className:`text-[11px] font-semibold ${Te.text} uppercase tracking-wider`,children:Te.label})]})]}),se.jsxs("button",{onClick:Ee,disabled:L,className:"flex items-center gap-2 px-6 py-2.5 rounded-full bg-primary text-white text-sm font-semibold shadow-md shadow-primary/30 hover:bg-primary-hover transition-all active:scale-95 disabled:opacity-60 disabled:cursor-not-allowed",children:[se.jsx(QC,{className:"w-4 h-4"}),L?"Setting Ready...":"Set Ready"]})]})})}return se.jsx(od,{error:B,children:se.jsx("div",{className:"flex flex-col items-center justify-center px-6 py-12 gap-4 min-h-[280px] animate-fadeIn",children:Z==="CONNECTING"?se.jsxs(se.Fragment,{children:[se.jsxs("div",{className:"relative w-16 h-16",children:[se.jsx("div",{className:"absolute inset-0 rounded-full border-4 border-primary/20"}),se.jsx("div",{className:"absolute inset-0 rounded-full border-4 border-transparent border-t-primary animate-spin"}),se.jsx("div",{className:"absolute inset-2 rounded-full bg-primary/10 flex items-center justify-center",children:se.jsx(Xh,{className:"w-5 h-5 text-primary",style:{transform:"rotate(90deg)"}})})]}),se.jsxs("div",{className:"text-center space-y-1",children:[se.jsx("p",{className:"text-sm font-semibold text-gray-700",children:"Connecting to server"}),se.jsx("p",{className:"text-xs text-gray-400",children:"Please wait..."})]})]}):se.jsxs(se.Fragment,{children:[se.jsx("div",{className:"w-16 h-16 rounded-full bg-red-50 border-2 border-red-100 flex items-center justify-center",children:se.jsx(Ev,{className:"w-7 h-7 text-red-400"})}),se.jsxs("div",{className:"text-center space-y-1.5",children:[se.jsx("p",{className:"text-sm font-bold text-red-600",children:"Not Registered"}),R&&se.jsx("p",{className:"text-xs text-gray-400 max-w-[220px] leading-relaxed",children:R})]})]})})})}function od({children:o,error:r}){return se.jsxs("div",{className:"w-full relative select-none",children:[r&&se.jsxs("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 z-50 flex items-center gap-2 px-4 py-2 rounded-full bg-red-500 text-white text-xs font-semibold shadow-lg animate-slideUp whitespace-nowrap",children:[se.jsx(JT,{className:"w-3.5 h-3.5 shrink-0"}),r]}),o]})}function ib({children:o}){return se.jsx("div",{className:"border-t border-gray-100 bg-gray-50/60 px-6 py-5 flex items-center justify-center gap-10 animate-slideUp",children:o})}function x1({children:o,color:r="green",pulse:i=!1}){const l={green:{ring:"bg-green-500/15",ring2:"bg-green-500/8",wrap:"bg-green-50 border-green-200"},primary:{ring:"bg-primary/15",ring2:"bg-primary/8",wrap:"bg-primary/10 border-primary/20"},red:{ring:"bg-red-500/15",ring2:"bg-red-500/8",wrap:"bg-red-50 border-red-200"}},f=l[r]||l.green;return se.jsxs("div",{className:"relative flex items-center justify-center w-20 h-20",children:[i&&se.jsxs(se.Fragment,{children:[se.jsx("span",{className:`absolute w-20 h-20 rounded-full ${f.ring} animate-ping opacity-75`}),se.jsx("span",{className:`absolute w-28 h-28 rounded-full ${f.ring2} animate-pulse`})]}),se.jsx("div",{className:`relative z-10 w-16 h-16 rounded-full ${f.wrap} border-2 flex items-center justify-center shadow-sm`,children:o})]})}function E1({children:o,onClick:r,color:i="gray",size:l="md",title:f,pulse:p=!1}){const v={md:"w-12 h-12",lg:"w-14 h-14"},C={green:"bg-green-500 hover:bg-green-600 shadow-[0_4px_14px_rgba(34,197,94,0.4)] hover:shadow-[0_6px_20px_rgba(34,197,94,0.5)]",red:"bg-red-500 hover:bg-red-600 shadow-[0_4px_14px_rgba(239,68,68,0.4)] hover:shadow-[0_6px_20px_rgba(239,68,68,0.5)]",gray:"bg-white border border-gray-200 text-gray-600 hover:bg-gray-50 shadow-sm"};return se.jsx("button",{onClick:r,title:f,className:`${v[l]} rounded-full text-white flex items-center justify-center transition-all active:scale-95 ${C[i]} ${p?"animate-pulse":""}`,children:o})}const ab={READY:{dot:"bg-green-500",label:"Ready",text:"text-green-700",bg:"bg-green-50 border-green-200"},NOT_READY:{dot:"bg-gray-400",label:"Not Ready",text:"text-gray-600",bg:"bg-gray-50 border-gray-200"},AUX:{dot:"bg-amber-400",label:"AUX",text:"text-amber-700",bg:"bg-amber-50 border-amber-200"}};function Fk({agentStatus:o,currentAux:r,loading:i,autoReady:l,showAuxButton:f,auxOptions:p,onReady:v,onNotReady:C,onAux:w}){const[S,b]=qt.useState(!1),T=qt.useRef(null);qt.useEffect(()=>{const B=U=>{T.current&&!T.current.contains(U.target)&&b(!1)};return document.addEventListener("mousedown",B),()=>document.removeEventListener("mousedown",B)},[]);const A=ab[o]||ab.NOT_READY,H=o==="AUX"&&r?`AUX: ${r.label}`:A.label,P=!l||f,j=()=>{b(!1),v()},z=()=>{b(!1),C()},N=B=>{b(!1),w(B)};return se.jsx("div",{className:"border-t border-gray-100 bg-gray-50/70 px-4 py-3",children:se.jsxs("div",{className:"flex items-center justify-between gap-2",children:[se.jsxs("div",{className:`flex items-center gap-1.5 px-2.5 py-1 rounded-full border text-xs font-semibold ${A.bg} ${A.text}`,children:[se.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${A.dot}`}),H]}),P&&se.jsxs("div",{className:"relative",ref:T,children:[se.jsxs("button",{onClick:()=>!i&&b(B=>!B),disabled:i,className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg text-[11px] font-semibold bg-white border border-gray-200 text-gray-600 hover:bg-gray-50 transition-all active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed",children:[i?se.jsx("span",{className:"w-3 h-3 border-2 border-gray-300 border-t-gray-600 rounded-full animate-spin"}):se.jsx(tR,{className:`w-3 h-3 transition-transform duration-150 ${S?"":"rotate-180"}`}),"Status"]}),S&&se.jsxs("div",{className:"absolute bottom-full mb-1.5 right-0 w-48 bg-white rounded-xl shadow-xl border border-gray-100 overflow-hidden z-50 animate-slideUp",children:[!l&&se.jsxs(se.Fragment,{children:[se.jsxs("button",{onClick:j,disabled:o==="READY",className:"w-full flex items-center gap-2.5 px-3.5 py-2.5 text-left text-xs font-medium text-gray-700 hover:bg-green-50 hover:text-green-800 transition-colors disabled:opacity-40 disabled:cursor-not-allowed border-b border-gray-50",children:[se.jsx(QC,{className:"w-3.5 h-3.5 text-green-500 shrink-0"}),"Ready",o==="READY"&&se.jsx("span",{className:"ml-auto text-[10px] text-green-500 font-semibold",children:"✓ Active"})]}),se.jsxs("button",{onClick:z,disabled:o==="NOT_READY",className:"w-full flex items-center gap-2.5 px-3.5 py-2.5 text-left text-xs font-medium text-gray-700 hover:bg-gray-100 transition-colors disabled:opacity-40 disabled:cursor-not-allowed border-b border-gray-50",children:[se.jsx(lR,{className:"w-3.5 h-3.5 text-gray-400 shrink-0"}),"Not Ready",o==="NOT_READY"&&se.jsx("span",{className:"ml-auto text-[10px] text-gray-400 font-semibold",children:"✓ Active"})]})]}),!l&&f&&p.length>0&&se.jsxs("div",{className:"px-3.5 py-1.5 flex items-center gap-2",children:[se.jsx("div",{className:"flex-1 h-px bg-gray-100"}),se.jsx("span",{className:"text-[10px] text-gray-400 font-semibold uppercase tracking-wider",children:"AUX"}),se.jsx("div",{className:"flex-1 h-px bg-gray-100"})]}),f&&p.map(B=>se.jsxs("button",{onClick:()=>N(B),disabled:o==="AUX"&&(r==null?void 0:r.code)===B.code,className:"w-full flex items-center gap-2.5 px-3.5 py-2.5 text-left text-xs font-medium text-gray-700 hover:bg-amber-50 hover:text-amber-800 transition-colors border-b border-gray-50 last:border-0 disabled:opacity-40 disabled:cursor-not-allowed",children:[se.jsx(XC,{className:"w-3.5 h-3.5 text-amber-500 shrink-0"}),B.label,o==="AUX"&&(r==null?void 0:r.code)===B.code&&se.jsx("span",{className:"ml-auto text-[10px] text-amber-500 font-semibold",children:"✓ Active"})]},B.code)),f&&p.length===0&&se.jsxs("button",{onClick:()=>N(null),disabled:o==="AUX",className:"w-full flex items-center gap-2.5 px-3.5 py-2.5 text-left text-xs font-medium text-gray-700 hover:bg-amber-50 hover:text-amber-800 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:[se.jsx(XC,{className:"w-3.5 h-3.5 text-amber-500 shrink-0"}),"AUX",o==="AUX"&&se.jsx("span",{className:"ml-auto text-[10px] text-amber-500 font-semibold",children:"✓ Active"})]})]})]})]})})}function S1({children:o,onClick:r,active:i,activeColor:l="primary",title:f}){const p={red:"bg-red-500 border-red-500 text-white shadow-[0_2px_8px_rgba(239,68,68,0.35)]",primary:"bg-primary border-primary text-white shadow-[0_2px_8px_rgba(63,49,146,0.35)]"};return se.jsx("button",{onClick:r,title:f,className:`
426
- w-11 h-11 rounded-full flex items-center justify-center
427
- border transition-all active:scale-95
428
- ${i?p[l]:"bg-white border-gray-200 text-gray-500 hover:bg-gray-100 hover:text-gray-700"}
429
- `,children:o})}const sb={"bottom-left":"bottom-6 left-3 items-start","bottom-right":"bottom-6 right-3 items-end","top-left":"top-6 left-3 items-start","top-right":"top-6 right-3 items-end"};function Ok({config:o,placement:r="bottom-left",offset:i,onIncomingCall:l,onCallAnswered:f,onCallEnded:p,onCallUnanswered:v,onRegisterStatus:C,onAgentStatus:w}){const[S,b]=qt.useState(!1),[T,A]=qt.useState("CONNECTING"),[H,P]=qt.useState("NOT_READY"),[j,z]=qt.useState(!1),N=qt.useRef(!1),B=qt.useRef({}),U=(o==null?void 0:o.autoReady)!==!1,q=(o==null?void 0:o.showAuxButton)===!0,K=(o==null?void 0:o.auxOptions)||[];qt.useEffect(()=>{B.current={onIncomingCall:l,onCallAnswered:f,onCallEnded:p,onCallUnanswered:v,onRegisterStatus:C,onAgentStatus:w}}),qt.useEffect(()=>{var F;o&&Dn.setConfig(o);const X=(o==null?void 0:o.auth)||((F=o==null?void 0:o.pabxConfig)==null?void 0:F.auth)||{};!N.current&&(X.username||X.user_pbx)&&(X.pwd_pbx||X.secret)&&(X.pabx_host||X.pbxurl||X.host)&&(N.current=!0,Ak({auth:X}))},[o]),qt.useEffect(()=>{const X=[Ze.on("register_status",F=>{var M,_e;const L=typeof F=="string"?F:(F==null?void 0:F.status)??"FAILED";A(L),(L==="REGISTERED"||L==="SIP_CONNECTED")&&b(!0),L!=="SIP_CONNECTED"&&((_e=(M=B.current).onRegisterStatus)==null||_e.call(M,L==="FAILED"?F:L))}),Ze.on("agent_status",F=>{var L,M;P(F),(M=(L=B.current).onAgentStatus)==null||M.call(L,F)}),Ze.on("sync_incoming_call",F=>{var L,M;z(!0),b(!0),(M=(L=B.current).onIncomingCall)==null||M.call(L,F)}),Ze.on("sync_call_answered",F=>{var L,M;z(!1),(M=(L=B.current).onCallAnswered)==null||M.call(L,F)}),Ze.on("sync_call_ended",F=>{var L,M;z(!1),(M=(L=B.current).onCallEnded)==null||M.call(L,F)}),Ze.on("sync_call_unanswered",F=>{var L,M;z(!1),(M=(L=B.current).onCallUnanswered)==null||M.call(L,F)})];return()=>X.forEach(F=>F())},[]);const Z=sb[r]||sb["bottom-left"],ee=T!=="REGISTERED"?T==="FAILED"?"bg-red-500":"bg-blue-400":H==="READY"?"bg-green-500":H==="AUX"?"bg-amber-400":"bg-gray-400",R=i?{position:"fixed",zIndex:9999,...i}:void 0,Se=r!=null&&r.includes("right")?"origin-bottom-right":"origin-bottom-left";return se.jsxs("div",{className:i?void 0:`fixed ${Z} z-[9999] flex flex-col gap-3`,style:R,children:[se.jsxs("div",{className:`w-[360px] bg-white rounded-3xl overflow-hidden ${Se} shadow-[0_20px_60px_rgba(0,0,0,0.18),0_4px_16px_rgba(0,0,0,0.08)] ${S?"animate-slideUp":"hidden"}`,children:[se.jsxs("div",{className:"flex items-center justify-between px-4 py-3.5 bg-gradient-to-r from-[#3f3192] to-[#5240c2]",children:[se.jsx("div",{className:"flex items-center gap-2.5",children:se.jsx("span",{className:"text-white font-semibold text-sm tracking-wide",children:"Voice Widget"})}),se.jsx("button",{onClick:()=>b(!1),className:"text-white/50 hover:text-white transition-colors p-1 rounded-lg",title:"Minimize",children:se.jsx(eR,{className:"w-4 h-4"})})]}),se.jsx(kk,{initialRegisterStatus:T,autoReady:U,showAuxButton:q,auxOptions:K})]}),se.jsxs("button",{onClick:()=>b(X=>!X),className:"w-12 h-12 rounded-full bg-primary hover:bg-primary-hover text-white shadow-lg shadow-primary/30 flex items-center justify-center transition-all active:scale-95 relative",title:"Voice Widget",children:[se.jsx(Xh,{className:"w-5 h-5"}),j&&se.jsx("span",{className:"absolute -top-1 -right-1 w-4 h-4 rounded-full bg-green-500 border-2 border-white animate-ping"}),se.jsx("span",{className:`absolute -top-0.5 -right-0.5 w-3 h-3 rounded-full border-2 border-white ${ee}`})]})]})}let wu=null,us=null;function Nk(o,r){if(Gh.createRoot){const i=Gh.createRoot(r);return i.render(o),{render:l=>i.render(l),unmount:()=>i.unmount()}}return Gh.render(o,r),{render:i=>Gh.render(i,r),unmount:()=>Gh.unmountComponentAtNode(r)}}const Bk={init(o={}){const{container:r,placement:i="bottom-left",offset:l,platform:f="sipjs",auth:p,pabxConfig:v,autoReady:C=!0,showAuxButton:w=!1,auxOptions:S=[],onIncomingCall:b,onCallAnswered:T,onCallEnded:A,onCallUnanswered:H,onRegisterStatus:P,onAgentStatus:j,...z}=o;typeof r=="string"?us=document.querySelector(r):r instanceof HTMLElement&&(us=r),us||(us=document.createElement("div"),us.id="omnix-widget-root",document.body.appendChild(us)),wu&&(wu.unmount(),wu=null);const N=qT.createElement(Ok,{config:{platform:f,auth:p,pabxConfig:v,autoReady:C,showAuxButton:w,auxOptions:S,...z},placement:i,offset:l,onIncomingCall:b,onCallAnswered:T,onCallEnded:A,onCallUnanswered:H,onRegisterStatus:P,onAgentStatus:j});return wu=Nk(N,us),{answer:()=>Ze.emitLocal("local_answer"),hangup:()=>Ze.emitLocal("local_hangup"),reject:()=>Ze.emitLocal("local_reject"),mute:B=>Ze.emitLocal("local_toggle_mute",{muted:B}),hold:B=>Ze.emitLocal("local_toggle_hold",{isOnHold:B,setIsOnHold:()=>{}}),dial:B=>Ze.emitLocal("local_dial",{number:B}),destroy:()=>{wu==null||wu.unmount(),wu=null,(us==null?void 0:us.id)==="omnix-widget-root"&&us.remove(),us=null}}}};return zy.OmnixWidget=Bk,Object.defineProperty(zy,Symbol.toStringTag,{value:"Module"}),zy}({});
51
+ `){Ie.debug("received message with double-CRLF Keep Alive request");try{this.socket.send(`\r
52
+ `)}catch(s){Ie.warn(`error sending Keep Alive response: ${s}`)}return}if(n===`\r
53
+ `){Ie.debug("received message with CRLF Keep Alive response");return}else if(typeof n!="string"){try{this.textDecoder?n=this.textDecoder.decode(n):n=String.fromCharCode.apply(null,new Uint8Array(n))}catch(s){Ie.debug(`received binary message failed to be converted into string: ${s}`);return}Ie.debug(`received binary message:
54
+
55
+ ${n}
56
+ `)}else Ie.debug(`received text message:
57
+
58
+ ${n}
59
+ `);this.ondata({transport:this,message:n})}},qn={};const qo=pe,ar=$e(),or=ke,hs=new qo("Parser");qn.parseMessage=(f,n)=>{let s,o,c=f.indexOf(`\r
60
+ `);if(c===-1){hs.warn("parseMessage() | no CRLF found, not a SIP message");return}const t=f.substring(0,c);let d=ar.parse(t,"Request_Response");if(d===-1){hs.warn(`parseMessage() | error parsing first line of SIP message: "${t}"`);return}else d.status_code?(s=new or.IncomingResponse,s.status_code=d.status_code,s.reason_phrase=d.reason_phrase):(s=new or.IncomingRequest(n),s.method=d.method,s.ruri=d.uri);s.data=f;let p=c+2;for(;;){if(c=Go(f,p),c===-2){o=p+2;break}else if(c===-1){hs.warn("parseMessage() | malformed message");return}if(d=Bo(s,f,p,c),d!==!0){hs.warn("parseMessage() |",d.error);return}p=c+2}if(s.hasHeader("content-length")){const a=s.getHeader("content-length");s.body=f.substr(o,a)}else s.body=f.substring(o);return s};function Go(f,n){let s=n,o=0,c=0;if(f.substring(s,s+2).match(/(^\r\n)/))return-2;for(;o===0;){if(c=f.indexOf(`\r
61
+ `,s),c===-1)return c;!f.substring(c+2,c+4).match(/(^\r\n)/)&&f.charAt(c+2).match(/(^\s+)/)?s=c+2:o=c}return o}function Bo(f,n,s,o){let c;const t=n.indexOf(":",s),d=n.substring(s,t).trim(),p=n.substring(t+1,o).trim();switch(d.toLowerCase()){case"via":case"v":{f.addHeader("via",p),f.getHeaders("via").length===1?(c=f.parseHeader("Via"),c&&(f.via=c,f.via_branch=c.branch)):c=0;break}case"from":case"f":{f.setHeader("from",p),c=f.parseHeader("from"),c&&(f.from=c,f.from_tag=c.getParam("tag"));break}case"to":case"t":{f.setHeader("to",p),c=f.parseHeader("to"),c&&(f.to=c,f.to_tag=c.getParam("tag"));break}case"record-route":{if(c=ar.parse(p,"Record_Route"),c===-1)c=void 0;else for(const a of c)f.addHeader("record-route",p.substring(a.possition,a.offset)),f.headers["Record-Route"][f.getHeaders("record-route").length-1].parsed=a.parsed;break}case"call-id":case"i":{f.setHeader("call-id",p),c=f.parseHeader("call-id"),c&&(f.call_id=p);break}case"contact":case"m":{if(c=ar.parse(p,"Contact"),c===-1)c=void 0;else for(const a of c)f.addHeader("contact",p.substring(a.possition,a.offset)),f.headers.Contact[f.getHeaders("contact").length-1].parsed=a.parsed;break}case"content-length":case"l":{f.setHeader("content-length",p),c=f.parseHeader("content-length");break}case"content-type":case"c":{f.setHeader("content-type",p),c=f.parseHeader("content-type");break}case"cseq":{f.setHeader("cseq",p),c=f.parseHeader("cseq"),c&&(f.cseq=c.value),f instanceof or.IncomingResponse&&(f.method=c.method);break}case"max-forwards":{f.setHeader("max-forwards",p),c=f.parseHeader("max-forwards");break}case"www-authenticate":{f.setHeader("www-authenticate",p),c=f.parseHeader("www-authenticate");break}case"proxy-authenticate":{f.setHeader("proxy-authenticate",p),c=f.parseHeader("proxy-authenticate");break}case"session-expires":case"x":{f.setHeader("session-expires",p),c=f.parseHeader("session-expires"),c&&(f.session_expires=c.expires,f.session_expires_refresher=c.refresher);break}case"refer-to":case"r":{f.setHeader("refer-to",p),c=f.parseHeader("refer-to"),c&&(f.refer_to=c);break}case"replaces":{f.setHeader("replaces",p),c=f.parseHeader("replaces"),c&&(f.replaces=c);break}case"event":case"o":{f.setHeader("event",p),c=f.parseHeader("event"),c&&(f.event=c);break}default:f.addHeader(d,p),c=0}return c===void 0?{error:`error parsing header "${d}"`}:!0}const Wo=pe,Gn=oe,Bn=ke,ur=Ce(),cr=new Wo("sanityCheck"),Vo=[tu],jo=[zo,Xo,Jo,Qo],Yo=[Zo,eu];let re,Be,Wn;var Ko=(f,n,s)=>{re=f,Be=n,Wn=s;for(const o of Vo)if(o()===!1)return!1;if(re instanceof Bn.IncomingRequest){for(const o of jo)if(o()===!1)return!1}else if(re instanceof Bn.IncomingResponse){for(const o of Yo)if(o()===!1)return!1}return!0};function zo(){if(re.s("to").uri.scheme!=="sip")return qt(416),!1}function Xo(){if(!re.to_tag&&re.call_id.substr(0,5)===Be.configuration.jssip_id)return qt(482),!1}function Jo(){const f=ur.str_utf8_length(re.body),n=re.getHeader("content-length");if(f<n)return qt(400),!1}function Qo(){const f=re.from_tag,n=re.call_id,s=re.cseq;let o;if(!re.to_tag)if(re.method===Gn.INVITE){if(Be._transactions.ist[re.via_branch])return!1;for(const c in Be._transactions.ist)if(Object.prototype.hasOwnProperty.call(Be._transactions.ist,c)&&(o=Be._transactions.ist[c],o.request.from_tag===f&&o.request.call_id===n&&o.request.cseq===s))return qt(482),!1}else{if(Be._transactions.nist[re.via_branch])return!1;for(const c in Be._transactions.nist)if(Object.prototype.hasOwnProperty.call(Be._transactions.nist,c)&&(o=Be._transactions.nist[c],o.request.from_tag===f&&o.request.call_id===n&&o.request.cseq===s))return qt(482),!1}}function Zo(){if(re.getHeaders("via").length>1)return cr.debug("more than one Via header field present in the response, dropping the response"),!1}function eu(){const f=ur.str_utf8_length(re.body),n=re.getHeader("content-length");if(f<n)return cr.debug("message body length is lower than the value in Content-Length header field, dropping the response"),!1}function tu(){const f=["from","to","call_id","cseq","via"];for(const n of f)if(!re.hasHeader(n))return cr.debug(`missing mandatory header field : ${n}, dropping the response`),!1}function qt(f){const n=re.getHeaders("via");let s,o=`SIP/2.0 ${f} ${Gn.REASON_PHRASE[f]}\r
62
+ `;for(const c of n)o+=`Via: ${c}\r
63
+ `;s=re.getHeader("To"),re.to_tag||(s+=`;tag=${ur.newTag()}`),o+=`To: ${s}\r
64
+ `,o+=`From: ${re.getHeader("From")}\r
65
+ `,o+=`Call-ID: ${re.call_id}\r
66
+ `,o+=`CSeq: ${re.cseq} ${re.method}\r
67
+ `,o+=`\r
68
+ `,Wn.send(o)}var fr={};const vt=Ce(),ut=oe,hr=$e(),Vn=Ze(),dr=lr,_r=He;fr.settings={authorization_user:null,password:null,realm:null,ha1:null,authorization_jwt:null,display_name:null,uri:null,contact_uri:null,instance_id:null,use_preloaded_route:!1,session_timers:!0,session_timers_refresh_method:ut.UPDATE,session_timers_force_refresher:!1,no_answer_timeout:60,register:!0,register_expires:600,register_from_tag_trail:"",registrar_server:null,sockets:null,connection_recovery_max_interval:ut.CONNECTION_RECOVERY_MAX_INTERVAL,connection_recovery_min_interval:ut.CONNECTION_RECOVERY_MIN_INTERVAL,extra_headers:null,via_host:`${vt.createRandomToken(12)}.invalid`};const ds={mandatory:{sockets(f){const n=[];if(dr.isSocket(f))n.push({socket:f});else if(Array.isArray(f)&&f.length)for(const s of f)Object.prototype.hasOwnProperty.call(s,"socket")&&dr.isSocket(s.socket)?n.push(s):dr.isSocket(s)&&n.push({socket:s});else return;return n},uri(f){/^sip:/i.test(f)||(f=`${ut.SIP}:${f}`);const n=Vn.parse(f);if(n)return n.user?n:void 0}},optional:{authorization_user(f){if(hr.parse(`"${f}"`,"quoted_string")!==-1)return f},authorization_jwt(f){if(typeof f=="string")return f},user_agent(f){if(typeof f=="string")return f},connection_recovery_max_interval(f){if(vt.isDecimal(f)){const n=Number(f);if(n>0)return n}},connection_recovery_min_interval(f){if(vt.isDecimal(f)){const n=Number(f);if(n>0)return n}},contact_uri(f){if(typeof f=="string"){const n=hr.parse(f,"SIP_URI");if(n!==-1)return n}},display_name(f){return f},instance_id(f){if(/^uuid:/i.test(f)&&(f=f.substr(5)),hr.parse(f,"uuid")!==-1)return f},no_answer_timeout(f){if(vt.isDecimal(f)){const n=Number(f);if(n>0)return n}},session_timers(f){if(typeof f=="boolean")return f},session_timers_refresh_method(f){if(typeof f=="string"&&(f=f.toUpperCase(),f===ut.INVITE||f===ut.UPDATE))return f},session_timers_force_refresher(f){if(typeof f=="boolean")return f},password(f){return String(f)},realm(f){return String(f)},ha1(f){return String(f)},register(f){if(typeof f=="boolean")return f},register_expires(f){if(vt.isDecimal(f)){const n=Number(f);if(n>=0)return n}},register_from_tag_trail(f){return typeof f=="function"?f:String(f)},registrar_server(f){/^sip:/i.test(f)||(f=`${ut.SIP}:${f}`);const n=Vn.parse(f);if(n)return n.user?void 0:n},use_preloaded_route(f){if(typeof f=="boolean")return f},extra_headers(f){const n=[];if(Array.isArray(f)&&f.length)for(const s of f)typeof s=="string"&&n.push(s);else return;return n}}};fr.load=(f,n)=>{for(const s in ds.mandatory)if(n.hasOwnProperty(s)){const o=n[s],c=ds.mandatory[s](o);if(c!==void 0)f[s]=c;else throw new _r.ConfigurationError(s,o)}else throw new _r.ConfigurationError(s);for(const s in ds.optional)if(n.hasOwnProperty(s)){const o=n[s];if(vt.isEmpty(o))continue;const c=ds.optional[s](o);if(c!==void 0)f[s]=c;else throw new _r.ConfigurationError(s,o)}};const su=Fe.EventEmitter,ru=pe,Se=oe,nu=La,jn=Ln,lu=So,Yn=Ro,Kn=Oo,zn=Po,pr=Ut,iu=ko,_s=Ce(),au=He,ou=Ze(),uu=qn,mr=ke,cu=Ko,gr=fr,ee=new ru("UA"),ve={STATUS_INIT:0,STATUS_READY:1,STATUS_USER_CLOSED:2,STATUS_NOT_READY:3,CONFIGURATION_ERROR:1,NETWORK_ERROR:2};var fu=class extends su{static get C(){return ve}constructor(n){if(!n)throw new TypeError("Not enough arguments");const s=["password","ha1","authorization_jwt"];ee.debug("new() [configuration:%o]",Object.entries(n).filter(([o])=>!s.includes(o))),super(),this._cache={credentials:{}},this._configuration=Object.assign({},gr.settings),this._dynConfiguration={},this._dialogs={},this._applicants={},this._sessions={},this._transport=null,this._contact=null,this._status=ve.STATUS_INIT,this._error=null,this._transactions={nist:{},nict:{},ist:{},ict:{}},this._data={},this._closeTimer=null;try{this._loadConfig(n)}catch(o){throw this._status=ve.STATUS_NOT_READY,this._error=ve.CONFIGURATION_ERROR,o}this._registrator=new nu(this)}get C(){return ve}get status(){return this._status}get contact(){return this._contact}get configuration(){return this._configuration}get transport(){return this._transport}start(){ee.debug("start()"),this._status===ve.STATUS_INIT?this._transport.connect():this._status===ve.STATUS_USER_CLOSED?(ee.debug("restarting UA"),this._closeTimer!==null&&(clearTimeout(this._closeTimer),this._closeTimer=null,this._transport.disconnect()),this._status=ve.STATUS_INIT,this._transport.connect()):this._status===ve.STATUS_READY?ee.debug("UA is in READY status, not restarted"):ee.debug("ERROR: connection is down, Auto-Recovery system is trying to reconnect"),this._dynConfiguration.register=this._configuration.register}register(){ee.debug("register()"),this._dynConfiguration.register=!0,this._registrator.register()}unregister(n){ee.debug("unregister()"),this._dynConfiguration.register=!1,this._registrator.unregister(n)}registrator(){return this._registrator}isRegistered(){return this._registrator.registered}isConnected(){return this._transport.isConnected()}call(n,s){ee.debug("call()");const o=new jn(this);return o.connect(n,s),o}sendMessage(n,s,o){ee.debug("sendMessage()");const c=new Kn(this);return c.send(n,s,o),c}subscribe(n,s,o,c){return ee.debug("subscribe()"),new lu(this,n,s,o,c)}notify(n,s,o){return ee.debug("notify()"),new Yn(this,n,s,o)}sendOptions(n,s,o){ee.debug("sendOptions()");const c=new zn(this);return c.send(n,s,o),c}terminateSessions(n){ee.debug("terminateSessions()");for(const s in this._sessions)this._sessions[s].isEnded()||this._sessions[s].terminate(n)}stop(){if(ee.debug("stop()"),this._dynConfiguration={},this._status===ve.STATUS_USER_CLOSED){ee.debug("UA already closed");return}this._registrator.close();const n=Object.keys(this._sessions).length;for(const o in this._sessions)if(Object.prototype.hasOwnProperty.call(this._sessions,o)){ee.debug(`closing session ${o}`);try{this._sessions[o].terminate()}catch{}}for(const o in this._applicants)if(Object.prototype.hasOwnProperty.call(this._applicants,o))try{this._applicants[o].close()}catch{}this._status=ve.STATUS_USER_CLOSED,Object.keys(this._transactions.nict).length+Object.keys(this._transactions.nist).length+Object.keys(this._transactions.ict).length+Object.keys(this._transactions.ist).length===0&&n===0?this._transport.disconnect():this._closeTimer=setTimeout(()=>{this._closeTimer=null,this._transport.disconnect()},2e3)}normalizeTarget(n){return _s.normalizeTarget(n,this._configuration.hostport_params)}get(n){switch(n){case"authorization_user":return this._configuration.authorization_user;case"realm":return this._configuration.realm;case"ha1":return this._configuration.ha1;case"authorization_jwt":return this._configuration.authorization_jwt;default:{ee.warn('get() | cannot get "%s" parameter in runtime',n);return}}}set(n,s){switch(n){case"authorization_user":{this._configuration.authorization_user=String(s);break}case"password":{this._configuration.password=String(s);break}case"realm":{this._configuration.realm=String(s);break}case"ha1":{this._configuration.ha1=String(s),this._configuration.password=null;break}case"authorization_jwt":{this._configuration.authorization_jwt=String(s);break}case"display_name":{this._configuration.display_name=s;break}case"extra_headers":{this._configuration.extra_headers=s;break}default:return ee.warn('set() | cannot set "%s" parameter in runtime',n),!1}return!0}newTransaction(n){this._transactions[n.type][n.id]=n,this.emit("newTransaction",{transaction:n})}destroyTransaction(n){delete this._transactions[n.type][n.id],this.emit("transactionDestroyed",{transaction:n})}newDialog(n){this._dialogs[n.id]=n}destroyDialog(n){delete this._dialogs[n.id]}newMessage(n,s){this._applicants[n]=n,this.emit("newMessage",s)}newOptions(n,s){this._applicants[n]=n,this.emit("newOptions",s)}destroyMessage(n){delete this._applicants[n]}newRTCSession(n,s){this._sessions[n.id]=n,this.emit("newRTCSession",s)}destroyRTCSession(n){delete this._sessions[n.id]}registered(n){this.emit("registered",n)}unregistered(n){this.emit("unregistered",n)}registrationFailed(n){this.emit("registrationFailed",n)}receiveRequest(n){const s=n.method;if(n.ruri.user!==this._configuration.uri.user&&n.ruri.user!==this._contact.uri.user){ee.debug("Request-URI does not point to us"),n.method!==Se.ACK&&n.reply_sl(404);return}if(n.ruri.scheme===Se.SIPS){n.reply_sl(416);return}if(pr.checkTransaction(this,n))return;if(s===Se.INVITE?new pr.InviteServerTransaction(this,this._transport,n):s!==Se.ACK&&s!==Se.CANCEL&&new pr.NonInviteServerTransaction(this,this._transport,n),s===Se.OPTIONS){if(this.listeners("newOptions").length===0){n.reply(200);return}new zn(this).init_incoming(n)}else if(s===Se.MESSAGE){if(this.listeners("newMessage").length===0){n.reply(405);return}new Kn(this).init_incoming(n)}else if(s===Se.SUBSCRIBE){if(this.listeners("newSubscribe").length===0){n.reply(405);return}}else if(s===Se.INVITE&&!n.to_tag&&this.listeners("newRTCSession").length===0){n.reply(405);return}let o,c;if(n.to_tag)o=this._findDialog(n.call_id,n.from_tag,n.to_tag),o?o.receiveRequest(n):s===Se.NOTIFY?(c=this._findSession(n),c?c.receiveRequest(n):(ee.debug("received NOTIFY request for a non existent subscription"),n.reply(481,"Subscription does not exist"))):s!==Se.ACK&&n.reply(481);else switch(s){case Se.INVITE:{if(window.RTCPeerConnection)if(n.hasHeader("replaces")){const t=n.replaces;o=this._findDialog(t.call_id,t.from_tag,t.to_tag),o?(c=o.owner,c.isEnded()?n.reply(603):c.receiveRequest(n)):n.reply(481)}else c=new jn(this),c.init_incoming(n);else ee.warn("INVITE received but WebRTC is not supported"),n.reply(488);break}case Se.BYE:{n.reply(481);break}case Se.CANCEL:{c=this._findSession(n),c?c.receiveRequest(n):ee.debug("received CANCEL request for a non existent session");break}case Se.ACK:break;case Se.NOTIFY:{this.emit("sipEvent",{event:n.event,request:n}),n.reply(200);break}case Se.SUBSCRIBE:{Yn.init_incoming(n,()=>{this.emit("newSubscribe",{event:n.event,request:n})});break}default:{n.reply(405);break}}}_findSession({call_id:n,from_tag:s,to_tag:o}){const c=n+s,t=this._sessions[c],d=n+o,p=this._sessions[d];return t||p||null}_findDialog(n,s,o){let c=n+s+o,t=this._dialogs[c];return t||(c=n+o+s,t=this._dialogs[c],t||null)}_loadConfig(n){gr.load(this._configuration,n),this._configuration.display_name===0&&(this._configuration.display_name="0"),this._configuration.instance_id||(this._configuration.instance_id=_s.newUUID()),this._configuration.jssip_id=_s.createRandomToken(5);const s=this._configuration.uri.clone();s.user=null,this._configuration.hostport_params=s.toString().replace(/^sip:/i,"");try{this._transport=new iu(this._configuration.sockets,{max_interval:this._configuration.connection_recovery_max_interval,min_interval:this._configuration.connection_recovery_min_interval}),this._transport.onconnecting=hu.bind(this),this._transport.onconnect=du.bind(this),this._transport.ondisconnect=_u.bind(this),this._transport.ondata=pu.bind(this)}catch(c){throw ee.warn(c),new au.ConfigurationError("sockets",this._configuration.sockets)}if(delete this._configuration.sockets,this._configuration.authorization_user||(this._configuration.authorization_user=this._configuration.uri.user),!this._configuration.registrar_server){const c=this._configuration.uri.clone();c.user=null,c.clearParams(),c.clearHeaders(),this._configuration.registrar_server=c}this._configuration.no_answer_timeout*=1e3,this._configuration.contact_uri?this._configuration.via_host=this._configuration.contact_uri.host:this._configuration.contact_uri=new ou("sip",_s.createRandomToken(8),this._configuration.via_host,null,{transport:"ws"}),this._contact={pub_gruu:null,temp_gruu:null,uri:this._configuration.contact_uri,toString(c={}){const t=c.anonymous||null,d=c.outbound||null;let p="<";return t?p+=this.temp_gruu||"sip:anonymous@anonymous.invalid;transport=ws":p+=this.pub_gruu||this.uri.toString(),d&&(t?!this.temp_gruu:!this.pub_gruu)&&(p+=";ob"),p+=">",p}};const o=["authorization_user","password","realm","ha1","authorization_jwt","display_name","register","extra_headers"];for(const c in this._configuration)Object.prototype.hasOwnProperty.call(this._configuration,c)&&(o.indexOf(c)!==-1?Object.defineProperty(this._configuration,c,{writable:!0,configurable:!1}):Object.defineProperty(this._configuration,c,{writable:!1,configurable:!1}));ee.debug("configuration parameters after validation:");for(const c in this._configuration)if(Object.prototype.hasOwnProperty.call(gr.settings,c))switch(c){case"uri":case"registrar_server":{ee.debug(`- ${c}: ${this._configuration[c]}`);break}case"password":case"ha1":case"authorization_jwt":{ee.debug(`- ${c}: NOT SHOWN`);break}default:ee.debug(`- ${c}: ${JSON.stringify(this._configuration[c])}`)}}};function hu(f){this.emit("connecting",f)}function du(f){this._status!==ve.STATUS_USER_CLOSED&&(this._status=ve.STATUS_READY,this._error=null,this.emit("connected",f),this._dynConfiguration.register&&this._registrator.register())}function _u(f){const n=["nict","ict","nist","ist"];for(const s of n)for(const o in this._transactions[s])Object.prototype.hasOwnProperty.call(this._transactions[s],o)&&this._transactions[s][o].onTransportError();this.emit("disconnected",f),this._registrator.onTransportClosed(),this._status!==ve.STATUS_USER_CLOSED&&(this._status=ve.STATUS_NOT_READY,this._error=ve.NETWORK_ERROR)}function pu(f){const n=f.transport;let s=f.message;if(s=uu.parseMessage(s,this),!!s&&!(this._status===ve.STATUS_USER_CLOSED&&s instanceof mr.IncomingRequest)&&cu(s,this,n)){if(s instanceof mr.IncomingRequest)s.transport=n,this.receiveRequest(s);else if(s instanceof mr.IncomingResponse){let o;switch(s.method){case Se.INVITE:{o=this._transactions.ict[s.via_branch],o&&o.receiveResponse(s);break}case Se.ACK:break;default:{o=this._transactions.nict[s.via_branch],o&&o.receiveResponse(s);break}}}}}const mu=pe,gu=$e(),we=new mu("WebSocketInterface");var Tu=class{constructor(n){we.debug('new() [url:"%s"]',n),this._url=n,this._sip_uri=null,this._via_transport=null,this._ws=null;const s=gu.parse(n,"absoluteURI");if(s===-1)throw we.warn(`invalid WebSocket URI: ${n}`),new TypeError(`Invalid argument: ${n}`);if(s.scheme!=="wss"&&s.scheme!=="ws")throw we.warn(`invalid WebSocket URI scheme: ${s.scheme}`),new TypeError(`Invalid argument: ${n}`);this._sip_uri=`sip:${s.host}${s.port?`:${s.port}`:""};transport=ws`,this._via_transport=s.scheme.toUpperCase()}get via_transport(){return this._via_transport}set via_transport(n){this._via_transport=n.toUpperCase()}get sip_uri(){return this._sip_uri}get url(){return this._url}connect(){if(we.debug("connect()"),this.isConnected()){we.debug(`WebSocket ${this._url} is already connected`);return}else if(this.isConnecting()){we.debug(`WebSocket ${this._url} is connecting`);return}this._ws&&this.disconnect(),we.debug(`connecting to WebSocket ${this._url}`);try{this._ws=new WebSocket(this._url,"sip"),this._ws.binaryType="arraybuffer",this._ws.onopen=this._onOpen.bind(this),this._ws.onclose=this._onClose.bind(this),this._ws.onmessage=this._onMessage.bind(this),this._ws.onerror=this._onError.bind(this)}catch(n){this._onError(n)}}disconnect(){we.debug("disconnect()"),this._ws&&(this._ws.onopen=()=>{},this._ws.onclose=()=>{},this._ws.onmessage=()=>{},this._ws.onerror=()=>{},this._ws.close(),this._ws=null)}send(n){return we.debug("send()"),this.isConnected()?(this._ws.send(n),!0):(we.warn("unable to send message, WebSocket is not open"),!1)}isConnected(){return this._ws&&this._ws.readyState===this._ws.OPEN}isConnecting(){return this._ws&&this._ws.readyState===this._ws.CONNECTING}_onOpen(){we.debug(`WebSocket ${this._url} connected`),this.onconnect()}_onClose({wasClean:n,code:s,reason:o}){we.debug(`WebSocket ${this._url} closed`),n===!1&&we.debug("WebSocket abrupt disconnection"),this.ondisconnect(!n,s,o)}_onMessage({data:n}){we.debug("received WebSocket message"),this.ondata(n)}_onError(n){we.warn(`WebSocket ${this._url} error: `,n)}};const Tr=Jr,Eu=oe,Su=He,Cu=Ce(),Au=fu,vu=Ze(),Ru=$s(),Iu=$e(),bu=Tu,wu=ks("JsSIP"),yu=Ln;wu("version %s",Tr.version);var Nu={C:Eu,Exceptions:Su,Utils:Cu,UA:Au,URI:vu,NameAddrHeader:Ru,WebSocketInterface:bu,Grammar:Iu,RTCSession:yu,debug:ks,get name(){return Tr.title},get version(){return Tr.version}};const Xn=Zi(Nu);let L=null,he=null,Rt=null;const ct=f=>(f==null?void 0:f.replace(/^(https?|wss?):\/\//,"").replace(/\/+$/,""))||null,ge={setConfig(f){L=f},getConfig(){return L},pushSound(){try{Rt&&clearInterval(Rt);const f=()=>{try{(!he||he.state==="closed")&&(he=new(window.AudioContext||window.webkitAudioContext)),he.state==="suspended"&&he.resume();const n=he.createOscillator(),s=he.createOscillator(),o=he.createGain();n.type="sine",s.type="sine",n.frequency.setValueAtTime(400,he.currentTime),s.frequency.setValueAtTime(450,he.currentTime);const c=he.createOscillator(),t=he.createGain();c.frequency.value=25,t.gain.value=15,c.connect(t),t.connect(n.frequency),t.connect(s.frequency),n.connect(o),s.connect(o),o.connect(he.destination),o.gain.setValueAtTime(0,he.currentTime),o.gain.linearRampToValueAtTime(.08,he.currentTime+.05),o.gain.setValueAtTime(.08,he.currentTime+1.2),o.gain.linearRampToValueAtTime(0,he.currentTime+1.3),[c,n,s].forEach(d=>{d.start(),d.stop(he.currentTime+1.4)})}catch(n){console.warn("Failed to play synthesized tone:",n)}};f(),Rt=setInterval(f,3e3)}catch(f){console.warn("AudioContext initialization failed:",f)}},stopSound(){Rt&&(clearInterval(Rt),Rt=null),he&&(he.close().catch(()=>{}),he=null)},toHHMMSS(f){const n=parseInt(f,10),s=Math.floor(n/3600),o=Math.floor(n/60)%60,c=n%60;return[s,o,c].map(t=>t<10?"0"+t:t).filter((t,d)=>t!=="00"||d>0).join(":")},getContactName(f){var n;return f&&((n=L==null?void 0:L.contacts)==null?void 0:n[f])||null},getCpaasBaseUrl(){var n,s;const f=((L==null?void 0:L.cpaas_base_url)||(L==null?void 0:L.cpaasBaseUrl)||((n=L==null?void 0:L.env)==null?void 0:n.CPAAS_BASE_URL)||((s=L==null?void 0:L.pabxConfig)==null?void 0:s.cpaas_base_url)||"https://api-cpaas.omnix.co.id").replace(/\/+$/,"");return!/^https:\/\//.test(f)&&!/^http:\/\/(localhost|127\.0\.0\.1)(:|\/|$)/.test(f)?(console.error("cpaas_base_url must use https. CPaaS API calls are disabled."),null):f},getSipHost(){var f,n,s,o;return ct(L==null?void 0:L.pbx_url)||ct((f=L==null?void 0:L.pabxConfig)==null?void 0:f.pbx_url)||ct((n=L==null?void 0:L.auth)==null?void 0:n.pabx_host)||ct((s=L==null?void 0:L.auth)==null?void 0:s.pbxurl)||ct((o=L==null?void 0:L.auth)==null?void 0:o.host)},getWssHost(){var f;return ct(L==null?void 0:L.sip_url)||ct((f=L==null?void 0:L.pabxConfig)==null?void 0:f.sip_url)||this.getSipHost()},getFingerprint(){var f,n,s;return(L==null?void 0:L["X-CPAAS-Key-Fingerprint"])||(L==null?void 0:L.fingerprint)||(L==null?void 0:L.cpaasKeyFingerprint)||((f=L==null?void 0:L.env)==null?void 0:f.fingerprint)||((n=L==null?void 0:L.env)==null?void 0:n.X_CPAAS_Key_Fingerprint)||((s=L==null?void 0:L.pabxConfig)==null?void 0:s["X-CPAAS-Key-Fingerprint"])},getExtensionUsername(){var f,n;return((f=L==null?void 0:L.auth)==null?void 0:f.user_pbx)||((n=L==null?void 0:L.auth)==null?void 0:n.username)||null},async updateExtensionStatus(f,n="Ready",s="ready"){const o=this.getFingerprint(),c=this.getCpaasBaseUrl();if(!c)return!1;if(!o)return console.warn("X-CPAAS-Key-Fingerprint not found. Cannot update extension status."),!1;try{return(await fetch(`${c}/voice/extensions/status`,{method:"POST",headers:{"X-CPAAS-Key-Fingerprint":o,"Content-Type":"application/json"},body:JSON.stringify({extension:f,status:n,reason:s})})).ok}catch(t){return console.error("Failed to update extension status:",t),!1}},async fetchExtensionStatus(f){var o,c;const n=this.getFingerprint(),s=this.getCpaasBaseUrl();if(!s)return null;if(!n)return console.warn("X-CPAAS-Key-Fingerprint not found. Cannot fetch extension status."),null;try{const t=await fetch(`${s}/voice/portal/extension?extension=${encodeURIComponent(f)}`,{headers:{"X-CPAAS-Key-Fingerprint":n,"Content-Type":"application/json"}});return t.ok&&((c=(o=await t.json())==null?void 0:o.data)==null?void 0:c[0])||null}catch(t){return console.error("Failed to fetch extension status:",t),null}}},Er={audio:!0,video:!1},Sr={iceServers:[]};let Re=null,Q=null,Cr=null,Ne=null,Ar=!1,vr=!1;const Jn={registerStatus:"CONNECTING",agentStatus:"NOT_READY",currentAux:null,callStatus:"Idle",callDuration:"00:00",isMuted:!1,isOnHold:!1,remote:null};let It={...Jn};const Ou=()=>({...It}),be=(f,n,s)=>{s&&Object.assign(It,s),Zt.emitLocal(f,n)},Le=(f,n)=>be("register_status",f==="FAILED"?{status:f,reason:n}:f,f==="FAILED"?{registerStatus:f,agentStatus:"NOT_READY",currentAux:null}:{registerStatus:f}),Gt=(f,n=null)=>be("agent_status",f,{agentStatus:f,currentAux:f==="AUX"?n:null}),Bt=f=>be("call_status",f,{callStatus:f}),Qn=f=>{f.addEventListener("track",n=>{n.track.kind==="audio"&&(Ne||(Ne=document.createElement("audio"),Ne.id="voxnix-remote-audio",Ne.autoplay=!0,document.body.appendChild(Ne)),Ne.srcObject=n.streams[0]||new MediaStream([n.track]),Ne.play().catch(s=>console.error("Error playing media:",s)))})},xu=f=>n=>{var d,p;if(n.originator!=="remote"||n.type!=="answer")return;const s=(((p=(d=f.connection)==null?void 0:d.localDescription)==null?void 0:p.sdp.match(/^m=/gm))||[]).length,o=(n.sdp.match(/^m=/gm)||[]).length;if(!s||o<=s)return;let c=0;const t=n.sdp.split(/\r?\n/).filter(a=>(a.startsWith("m=")&&c++,c<=s));n.sdp=t.join(`\r
69
+ `).replace(/(\r\n)*$/,`\r
70
+ `)},Du=f=>Object.fromEntries(Object.keys((f==null?void 0:f.headers)||{}).filter(n=>/^X-/i.test(n)).map(n=>[n,f.getHeader(n)])),Uu=(f,n)=>{var o,c,t;const s=((c=(o=f.remote_identity)==null?void 0:o.uri)==null?void 0:c.user)||"Unknown";return{number:s,name:((t=f.remote_identity)==null?void 0:t.display_name)||ge.getContactName(s)||"",direction:f.direction,headers:f.direction==="incoming"?Du(n):{}}},Zn=(f,n)=>{Q=f;const s=Uu(f,n);Object.assign(It,{remote:s,isMuted:!1,isOnHold:!1}),f.connection?Qn(f.connection):f.on("peerconnection",c=>Qn(c.peerconnection)),f.on("sdp",xu(f)),f.on("confirmed",()=>{ge.stopSound(),Bt("InCall"),be("sync_call_answered",s);const c=Date.now();Cr=setInterval(()=>{const t=ge.toHHMMSS((Date.now()-c)/1e3);be("call_duration",t,{callDuration:t})},1e3)}),f.on("muted",()=>be("mute_status",!0,{isMuted:!0})),f.on("unmuted",()=>be("mute_status",!1,{isMuted:!1})),f.on("hold",c=>c.originator==="local"&&be("hold_status",!0,{isOnHold:!0})),f.on("unhold",c=>c.originator==="local"&&be("hold_status",!1,{isOnHold:!1}));const o=c=>t=>{ge.stopSound(),clearInterval(Cr),Ne&&(Ne.srcObject=null),Q=null,be("call_duration","00:00",{callDuration:"00:00",isMuted:!1,isOnHold:!1,remote:null}),Bt("Idle");const d={...s,cause:t.cause,originator:t.originator};c?be("sync_call_ended",d):s.direction==="incoming"?be("sync_call_unanswered",d):t.originator!=="local"&&be("call_failed",t.cause||"Call Failed")};f.on("ended",o(!0)),f.on("failed",o(!1))},$u=({session:f,originator:n,request:s})=>{var o;if(n==="local")return vr?void 0:Zn(f);if(Q)return f.terminate({status_code:486,reason_phrase:"Busy Here"});Zn(f,s),((o=ge.getConfig())==null?void 0:o.ringtone)!==!1&&ge.pushSound(),Bt("Ringing"),be("incoming_call",It.remote)},el=/^[0-9A-Za-z+*#._-]+$/,Pu=f=>{if(f=String(f??"").trim(),!(!Re||Q||!f)){if(!el.test(f))return be("call_failed","Invalid number");Bt("Calling...");try{Re.call(`sip:${f}@${ge.getSipHost()}`,{mediaConstraints:Er,pcConfig:Sr})}catch(n){console.error("Dial failed:",n),Bt("Idle"),be("call_failed",n.message||"Call Failed")}}},Mu=()=>{ge.stopSound(),(Q==null?void 0:Q.direction)==="incoming"&&!Q.isEstablished()&&Q.answer({mediaConstraints:Er,pcConfig:Sr})},tl=()=>{ge.stopSound(),Q&&!Q.isEnded()&&Q.terminate()},Lu=tl,Hu=(f=!0)=>{Q!=null&&Q.isEstablished()&&(f?Q.mute({audio:!0}):Q.unmute({audio:!0}))},Fu=(f=!0)=>{Q!=null&&Q.isEstablished()&&(f?Q.hold():Q.unhold())},ku=f=>{if(Q!=null&&Q.isEstablished())try{Q.sendDTMF(String(f))}catch(n){console.error("DTMF failed:",n)}},qu=(f,{attended:n=!1}={})=>new Promise(s=>{f=String(f??"").trim();const o=Q;if(!Re||!(o!=null&&o.isEstablished())||!el.test(f))return s(!1);const c=`sip:${f}@${ge.getSipHost()}`;let t=null,d=!1;const p=g=>{d||(d=!0,t&&!t.isEnded()&&t.terminate(),g&&!o.isEnded()&&o.terminate(),!g&&!o.isEnded()&&n&&o.unhold(),s(g))},a=(g={})=>{let m=!1;if(!o.refer(c,{...g,eventHandlers:{requestSucceeded:()=>m=!0,requestFailed:()=>p(!1),accepted:()=>p(!0),failed:()=>p(!1)}}))return p(!1);o.once("ended",()=>p(m))};if(!n)return a();o.hold(),vr=!0;try{t=Re.call(c,{mediaConstraints:Er,pcConfig:Sr})}catch(g){return console.error("Transfer consult call failed:",g),p(!1)}finally{vr=!1}t.on("confirmed",()=>a({replaces:t})),t.on("failed",()=>p(!1))}),Gu=3,sl=1e3,Bu=()=>new Promise(f=>{const n=Re;if(!n)return f(!1);Ar=!0;const s=d=>{Ar=!1,clearTimeout(t),n.off("registered",o),n.off("registrationFailed",c),f(d)},o=()=>s(!0),c=d=>{console.error("SIP re-register rejected:",d==null?void 0:d.cause),s(!1)},t=setTimeout(()=>s(!0),sl);n.on("registered",o),n.on("registrationFailed",c),n.register()}),rl=async f=>{let n=await ge.fetchExtensionStatus(f);if(!n||Number(n.is_register)!==0)return{ext:n,registered:!0};if(!await Bu())return{ext:n,registered:!1};for(let s=0;s<Gu;s++)if(await new Promise(o=>setTimeout(o,sl)),n=await ge.fetchExtensionStatus(f),n&&Number(n.is_register)===1)return{ext:n,registered:!0};return console.warn("[ExtStatus] is_register still 0 after SIP re-register"),{ext:n,registered:!1}},Rr=async(f,n)=>{const s=ge.getExtensionUsername();if(!s)return!1;const{ext:o,registered:c}=await rl(s);return c?f==="Ready"&&(o==null?void 0:o.extension_status)==="Ready"?!0:ge.updateExtensionStatus(s,f,n):!1},Wu=async()=>{const{ext:f,registered:n}=await rl(ge.getExtensionUsername());if(!n)return Le("FAILED","Extension not registered after SIP re-register");const s=f==null?void 0:f.extension_status;if(s==="Ready")return Le("REGISTERED"),Gt("READY");const o=typeof s=="string"&&s.toLowerCase().startsWith("aux");Le("SIP_CONNECTED"),Gt(o?"AUX":"NOT_READY",o?{code:s,label:s}:null)},nl=async()=>{const f=await Rr("Ready","ready");return f&&(Le("REGISTERED"),Gt("READY")),f},Vu=async()=>{const f=await Rr("Logout","not_ready");return f&&(Le("SIP_CONNECTED"),Gt("NOT_READY")),f},ju=async(f="AUX",n=f)=>{const s=await Rr("AUX",f);return s&&Gt("AUX",{code:f,label:n}),s},Yu=async()=>{var f;if(!Ar){if(((f=ge.getConfig())==null?void 0:f.autoReady)===!1)return Wu();await nl()||Le("FAILED","Failed to hit extension ready API")}},ll=()=>Math.random().toString(36).slice(2,10),Ku=(f={})=>{var p;il();const n=f.auth||((p=f.pabxConfig)==null?void 0:p.auth)||{};ge.setConfig({...f,auth:n});const s=n.user_pbx||n.username,o=n.pwd_pbx||n.secret,c=ge.getSipHost(),t=ge.getWssHost(),d=n.port||8089;if(!s||!o||!c)return Le("FAILED","Missing SIP credentials (username, password, host)");try{Re=new Xn.UA({sockets:[new Xn.WebSocketInterface(`wss://${t}:${d}`)],uri:`sip:${s}@${c}`,authorization_user:s,password:o,register_expires:600,session_timers:!1,contact_uri:`sip:${ll()}@${ll()}.invalid;transport=tls`}),Re.on("registered",Yu),Re.on("unregistered",()=>Le("FAILED","SIP Unregistered")),Re.on("registrationFailed",a=>Le("FAILED",`SIP registration failed: ${a.cause}`)),Re.on("disconnected",()=>{It.registerStatus!=="FAILED"&&Le("FAILED","WebSocket disconnected, retrying...")}),Re.on("newRTCSession",$u),Re.start()}catch(a){console.error("JsSIP init error:",a),Re=null,Le("FAILED",a.message||"Failed to connect to SIP server")}},il=()=>{ge.stopSound(),clearInterval(Cr),Re&&(Re.removeAllListeners(),Re.stop(),Re=null),Q=null,Ne==null||Ne.remove(),Ne=null,It={...Jn}},zu={register_status:"onRegisterStatus",agent_status:"onAgentStatus",call_status:"onCallStatus",call_failed:"onCallFailed",incoming_call:"onIncomingCall",sync_call_answered:"onCallAnswered",sync_call_ended:"onCallEnded",sync_call_unanswered:"onCallUnanswered"};function al(){il(),Zt.listeners={}}const Xu={init(f={}){return al(),Object.entries(zu).forEach(([n,s])=>Zt.on(n,o=>{var c;n==="register_status"&&o==="SIP_CONNECTED"||(c=f[s])==null||c.call(f,o)})),Ku(f),{dial:Pu,answer:Mu,reject:Lu,hangup:tl,mute:Hu,hold:Fu,sendDtmf:ku,transfer:qu,setReady:nl,setNotReady:Vu,setAux:ju,getState:Ou,on:(n,s)=>Zt.on(n,s),destroy:al}}};return Ds.OmnixWidget=Xu,Object.defineProperty(Ds,Symbol.toStringTag,{value:"Module"}),Ds}({});OmnixWidget=OmnixWidget.OmnixWidget;OmnixWidget.OmnixWidget=OmnixWidget;