tia-chatbot 1.2.3 → 1.2.4

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.
@@ -11,7 +11,7 @@ Check the top-level render call using <`+ot+">.")}return H}}function ce(E,H){{if
11
11
  <%s {...props} />
12
12
  React keys must be passed directly to JSX without using spread:
13
13
  let props = %s;
14
- <%s key={someKey} {...props} />`,Rs,Un,Zc,Un),Ce[Un+Rs]=!0}}return E===o?qe(ze):Be(ze),ze}}function Kc(E,H,ot){return Re(E,H,ot,!0)}function Hc(E,H,ot){return Re(E,H,ot,!1)}var Jc=Hc,Gc=Kc;$i.Fragment=o,$i.jsx=Jc,$i.jsxs=Gc})(),$i}var fd;function vM(){if(fd)return to.exports;fd=1;var e={env:{}};return e.env.NODE_ENV==="production"?to.exports=mM():to.exports=yM(),to.exports}var rt=vM(),pi={},dd;function MM(){if(dd)return pi;dd=1;var e={env:{}},t=tl;if(e.env.NODE_ENV==="production")pi.createRoot=t.createRoot,pi.hydrateRoot=t.hydrateRoot;else{var n=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;pi.createRoot=function(i,o){n.usingClientEntryPoint=!0;try{return t.createRoot(i,o)}finally{n.usingClientEntryPoint=!1}},pi.hydrateRoot=function(i,o,l){n.usingClientEntryPoint=!0;try{return t.hydrateRoot(i,o,l)}finally{n.usingClientEntryPoint=!1}}}return pi}var wM=MM();const xM='@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-700:oklch(37.3% .034 259.733);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-6xl:3.75rem;--text-6xl--line-height:1;--text-7xl:4.5rem;--text-7xl--line-height:1;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--radius-md:.375rem;--radius-lg:.5rem;--radius-2xl:1rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.collapse{visibility:collapse}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.right-14{right:calc(var(--spacing)*14)}.bottom-8{bottom:calc(var(--spacing)*8)}.bottom-16{bottom:calc(var(--spacing)*16)}.z-10{z-index:10}.z-50{z-index:50}.container{width:100%}@media(min-width:30rem){.container{max-width:30rem}}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}@media(min-width:120rem){.container{max-width:120rem}}@media(min-width:160rem){.container{max-width:160rem}}.mx-auto{margin-inline:auto}.my-2{margin-block:calc(var(--spacing)*2)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mr-4{margin-right:calc(var(--spacing)*4)}.flex{display:flex}.inline{display:inline}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-8{height:calc(var(--spacing)*8)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.h-\\[50vh\\]{height:50vh}.h-\\[200px\\]{height:200px}.h-\\[500px\\]{height:500px}.h-full{height:100%}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-\\[100\\%\\]{width:100%}.w-\\[200px\\]{width:200px}.w-full{width:100%}.max-w-\\[70\\%\\]{max-width:70%}.max-w-full{max-width:100%}.min-w-\\[70\\%\\]{min-width:70%}.flex-1{flex:1}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-2{gap:calc(var(--spacing)*2)}.gap-4{gap:calc(var(--spacing)*4)}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}.gap-x-2{column-gap:calc(var(--spacing)*2)}.gap-x-4{column-gap:calc(var(--spacing)*4)}.gap-y-2{row-gap:calc(var(--spacing)*2)}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-t-lg{border-top-left-radius:var(--radius-lg);border-top-right-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.bg-\\[\\#EFF1FF\\]{background-color:#eff1ff}.bg-\\[\\#F3F3F3\\]{background-color:#f3f3f3}.bg-\\[\\#F5605724\\]{background-color:#f5605724}.bg-\\[\\#FFFFFF\\]{background-color:#fff}.bg-gray-200{background-color:var(--color-gray-200)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-gradient-to-l{--tw-gradient-position:to left in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-\\[\\#4F5FCE\\]{--tw-gradient-from:#4f5fce;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-\\[\\#283068\\]{--tw-gradient-from:#283068;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-\\[\\#F56057\\]{--tw-gradient-from:#f56057;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-\\[\\#FFE6E4\\]{--tw-gradient-from:#ffe6e4;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.via-\\[\\#49507F\\]{--tw-gradient-via:#49507f;--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-\\[\\#A03F39\\]{--tw-gradient-via:#a03f39;--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-\\[\\#FFE6E4\\]{--tw-gradient-via:#ffe6e4;--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-\\[\\#2D3776\\]{--tw-gradient-to:#2d3776;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-\\[\\#49507F\\]{--tw-gradient-to:#49507f;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-\\[\\#283068\\]{--tw-gradient-to:#283068;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-\\[\\#FDACA7\\]\\/70{--tw-gradient-to:oklab(82.1256% .0883578 .0380105/.7);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-4{padding:calc(var(--spacing)*4)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.text-center{text-align:center}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.whitespace-pre-wrap{white-space:pre-wrap}.text-\\[\\#0D082C\\]{color:#0d082c}.text-\\[\\#283068\\]{color:#283068}.text-black{color:var(--color-black)}.text-gray-700{color:var(--color-gray-700)}.text-transparent{color:#0000}.text-white{color:var(--color-white)}.italic{font-style:italic}.opacity-75{opacity:.75}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.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,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.outline-none{--tw-outline-style:none;outline-style:none}.\\[vite\\:dts\\]{vite:dts}.placeholder\\:text-gray-500::placeholder{color:var(--color-gray-500)}@media(hover:hover){.hover\\:bg-\\[\\#283068\\]:hover{background-color:#283068}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:opacity-80:hover{opacity:.8}}@media(min-width:40rem){.sm\\:max-w-none{max-width:none}}@media(min-width:48rem){.md\\:h-\\[60vh\\]{height:60vh}.md\\:text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}}@media(min-width:64rem){.lg\\:h-\\[65vh\\]{height:65vh}}@media(min-width:96rem){.\\32xl\\:right-20{right:calc(var(--spacing)*20)}.\\32xl\\:bottom-18{bottom:calc(var(--spacing)*18)}.\\32xl\\:bottom-24{bottom:calc(var(--spacing)*24)}.\\32xl\\:h-8{height:calc(var(--spacing)*8)}.\\32xl\\:h-10{height:calc(var(--spacing)*10)}.\\32xl\\:h-12{height:calc(var(--spacing)*12)}.\\32xl\\:w-8{width:calc(var(--spacing)*8)}.\\32xl\\:w-10{width:calc(var(--spacing)*10)}.\\32xl\\:w-12{width:calc(var(--spacing)*12)}}.custom-scrollbar::-webkit-scrollbar{width:4px;height:px}.custom-scrollbar::-webkit-scrollbar-track{background:0 0}.custom-scrollbar::-webkit-scrollbar-thumb{background:linear-gradient(#21294c,#61b872);border-radius:8px;transition:background .3s,width .3s}.custom-scrollbar:hover::-webkit-scrollbar-thumb{background:linear-gradient(#283950,#4ae48b);width:8px}.custom-scrollbar::-webkit-scrollbar-thumb:active{background:linear-gradient(#1b2124,#2ecc71)}.custom-scrollbar{scrollbar-width:thin;scrollbar-color:#21294c #f3f3f3}.custom-scrollbar:after{content:"";pointer-events:none;background:linear-gradient(#0000,#fff);width:100%;height:20px;position:absolute;bottom:0;left:0}.inputHeight{height:40px}@media(min-width:48rem){.inputHeight{height:36px}}@media(min-width:64rem){.inputHeight{height:38px}}@media(min-width:80rem){.inputHeight{height:42px}}@media(min-width:96rem){.inputHeight{height:46px}}@media(min-width:120rem){.inputHeight{height:50px}}@media(min-width:160rem){.inputHeight{height:54px}}.fs32{font-family:Manrope,sans-serif;font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}@media(min-width:48rem){.fs32{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}}@media(min-width:64rem){.fs32{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}}@media(min-width:80rem){.fs32{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}}@media(min-width:96rem){.fs32{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}}@media(min-width:120rem){.fs32{font-size:var(--text-7xl);line-height:var(--tw-leading,var(--text-7xl--line-height))}}.fs28{font-family:Manrope,sans-serif;font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}@media(min-width:48rem){.fs28{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}}@media(min-width:64rem){.fs28{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}}@media(min-width:80rem){.fs28{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}}@media(min-width:96rem){.fs28{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}}@media(min-width:120rem){.fs28{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}}.fs24{font-family:Manrope,sans-serif;font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}@media(min-width:48rem){.fs24{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}}@media(min-width:64rem){.fs24{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}}@media(min-width:80rem){.fs24{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}}@media(min-width:96rem){.fs24{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}}@media(min-width:120rem){.fs24{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}}.fs22{font-family:Manrope,sans-serif;font-size:22px}@media(min-width:48rem){.fs22{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}}@media(min-width:64rem){.fs22{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}}@media(min-width:80rem){.fs22{font-size:22px}}@media(min-width:96rem){.fs22{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}}@media(min-width:120rem){.fs22{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}}@media(min-width:160rem){.fs22{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}}.fs20{font-family:Manrope,sans-serif;font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}@media(min-width:48rem){.fs20{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}}@media(min-width:64rem){.fs20{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}}@media(min-width:80rem){.fs20{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}}@media(min-width:96rem){.fs20{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}}@media(min-width:120rem){.fs20{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}}@media(min-width:160rem){.fs20{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}}.fs18{font-family:Manrope,sans-serif;font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}@media(min-width:48rem){.fs18{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}}@media(min-width:64rem){.fs18{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}}@media(min-width:80rem){.fs18{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}}@media(min-width:96rem){.fs18{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}}@media(min-width:120rem){.fs18{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}}@media(min-width:160rem){.fs18{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}}.fs16{font-family:Manrope,sans-serif;font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}@media(min-width:48rem){.fs16{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}}@media(min-width:64rem){.fs16{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media(min-width:80rem){.fs16{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}}@media(min-width:96rem){.fs16{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}}@media(min-width:120rem){.fs16{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}}@media(min-width:160rem){.fs16{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}}.fs14{font-family:Manrope,sans-serif;font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}@media(min-width:48rem){.fs14{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}}@media(min-width:64rem){.fs14{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media(min-width:80rem){.fs14{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media(min-width:96rem){.fs14{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}}@media(min-width:120rem){.fs14{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}}@media(min-width:160rem){.fs14{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}}.fs12{font-family:Manrope,sans-serif;font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}@media(min-width:48rem){.fs12{font-size:8px}}@media(min-width:64rem){.fs12{font-size:10px}}@media(min-width:80rem){.fs12{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}}@media(min-width:96rem){.fs12{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media(min-width:120rem){.fs12{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}}@media(min-width:160rem){.fs12{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}}.fs10{font-family:Manrope,sans-serif;font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}@media(min-width:48rem){.fs10{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));font-size:7px}}@media(min-width:64rem){.fs10{font-size:9px}}@media(min-width:96rem){.fs10{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media(min-width:120rem){.fs10{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media(min-width:160rem){.fs10{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}}}:host{color:#000;--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;font-family:Manrope,sans-serif;font-size:16px;line-height:1.5}:host *,:host :before,:host :after{box-sizing:border-box}.header{top:calc(var(--spacing)*0);right:calc(var(--spacing)*0);left:calc(var(--spacing)*0);z-index:10;background-color:#fff;position:fixed}.appHeader{border-bottom-style:var(--tw-border-style);vertical-align:middle;border-color:#f3f3f3;border-bottom-width:1px;justify-content:space-between;align-items:center;height:72px;display:flex}@media(min-width:48rem){.appHeader{height:45px}}@media(min-width:64rem){.appHeader{height:54px}}@media(min-width:80rem){.appHeader{height:62px}}@media(min-width:96rem){.appHeader{height:65px}}@media(min-width:120rem){.appHeader{height:72px}}@media(min-width:160rem){.appHeader{height:75px}}.sidebar{bottom:calc(var(--spacing)*0);z-index:5;border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px;background-color:#fff;border-color:#f3f3f3;position:fixed;top:72px;overflow-y:auto}@media(min-width:48rem){.sidebar{top:45px}}@media(min-width:64rem){.sidebar{top:54px}}@media(min-width:80rem){.sidebar{top:62px}}@media(min-width:96rem){.sidebar{top:65px}}@media(min-width:120rem){.sidebar{top:72px}}@media(min-width:160rem){.sidebar{top:75px}}.sidebar{width:220px}@media(min-width:48rem){.sidebar{width:190px}}@media(min-width:64rem){.sidebar{width:210px}}@media(min-width:80rem){.sidebar{width:260px}}@media(min-width:96rem){.sidebar{width:280px}}@media(min-width:120rem){.sidebar{width:300px}}@media(min-width:160rem){.sidebar{width:280px}}.layoutBodyWithSidebar{right:calc(var(--spacing)*0);z-index:0;padding-top:calc(var(--spacing)*6);padding-right:calc(var(--spacing)*6);padding-bottom:calc(var(--spacing)*4);padding-left:calc(var(--spacing)*6);position:absolute;left:220px}@media(min-width:48rem){.layoutBodyWithSidebar{left:190px}}@media(min-width:64rem){.layoutBodyWithSidebar{left:210px}}@media(min-width:80rem){.layoutBodyWithSidebar{left:260px}}@media(min-width:96rem){.layoutBodyWithSidebar{left:280px}}@media(min-width:120rem){.layoutBodyWithSidebar{left:300px}}@media(min-width:160rem){.layoutBodyWithSidebar{left:280px}}.layoutBodyWithSidebar{top:72px}@media(min-width:48rem){.layoutBodyWithSidebar{top:45px}}@media(min-width:64rem){.layoutBodyWithSidebar{top:54px}}@media(min-width:80rem){.layoutBodyWithSidebar{top:62px}}@media(min-width:96rem){.layoutBodyWithSidebar{top:65px}}@media(min-width:120rem){.layoutBodyWithSidebar{top:72px}}@media(min-width:160rem){.layoutBodyWithSidebar{top:75px}}.layoutBodyWithSidebar{min-height:calc(100vh - 72px)}@media(min-width:48rem){.layoutBodyWithSidebar{min-height:calc(100vh - 45px)}}@media(min-width:64rem){.layoutBodyWithSidebar{min-height:calc(100vh - 54px)}}@media(min-width:80rem){.layoutBodyWithSidebar{min-height:calc(100vh - 62px)}}@media(min-width:96rem){.layoutBodyWithSidebar{min-height:calc(100vh - 65px)}}@media(min-width:120rem){.layoutBodyWithSidebar{min-height:calc(100vh - 72px)}}@media(min-width:160rem){.layoutBodyWithSidebar{min-height:calc(100vh - 75px)}}.layoutBodyWithoutSidebar{right:calc(var(--spacing)*0);left:calc(var(--spacing)*0);padding-inline-start:calc(var(--spacing)*6);padding-inline-end:calc(var(--spacing)*6);padding-top:calc(var(--spacing)*3);padding-bottom:calc(var(--spacing)*4);flex:1;top:72px}@media(min-width:48rem){.layoutBodyWithoutSidebar{top:45px}}@media(min-width:64rem){.layoutBodyWithoutSidebar{top:54px}}@media(min-width:80rem){.layoutBodyWithoutSidebar{top:62px}}@media(min-width:96rem){.layoutBodyWithoutSidebar{top:65px}}@media(min-width:120rem){.layoutBodyWithoutSidebar{top:72px}}@media(min-width:160rem){.layoutBodyWithoutSidebar{top:75px}}.inputWrapper{align-items:center;width:100%;display:flex;position:relative}.input{appearance:none;border-style:var(--tw-border-style);border-width:1.5px;border-color:var(--color-gray-200);color:#21294c;border-radius:.25rem;flex-grow:1;width:100%}.input::placeholder{color:#666}.input:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-outline-style:none;box-shadow:none;outline-style:none}.input:focus:disabled{cursor:not-allowed;background-color:#666}.leftIcon{left:calc(var(--spacing)*3);color:#21294c;position:absolute}.leftIcon+.input{padding-left:calc(var(--spacing)*10)}.rightIcon{right:calc(var(--spacing)*3);color:#21294c;position:absolute}.rightIcon+.input{padding-right:calc(var(--spacing)*10)}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}',TM="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12%2022C17.5228%2022%2022%2017.5228%2022%2012C22%206.47715%2017.5228%202%2012%202C6.47715%202%202%206.47715%202%2012C2%2013.5997%202.37562%2015.1116%203.04346%2016.4525C3.22094%2016.8088%203.28001%2017.2161%203.17712%2017.6006L2.58151%2019.8267C2.32295%2020.793%203.20701%2021.677%204.17335%2021.4185L6.39939%2020.8229C6.78393%2020.72%207.19121%2020.7791%207.54753%2020.9565C8.88837%2021.6244%2010.4003%2022%2012%2022Z'%20fill='%23262D7B'/%3e%3c/svg%3e",el=x.createContext({});function nl(e){const t=x.useRef(null);return t.current===null&&(t.current=e()),t.current}const rl=typeof window<"u",hd=rl?x.useLayoutEffect:x.useEffect,eo=x.createContext(null);function il(e,t){e.indexOf(t)===-1&&e.push(t)}function sl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const fr=(e,t,n)=>n>t?t:n<e?e:n;function ol(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}var EM={env:{}};let gi=()=>{},dr=()=>{};EM.env.NODE_ENV!=="production"&&(gi=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(ol(t,n))},dr=(e,t,n)=>{if(!e)throw new Error(ol(t,n))});const hr={},pd=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function gd(e){return typeof e=="object"&&e!==null}const md=e=>/^0[^.\s]+$/u.test(e);function al(e){let t;return()=>(t===void 0&&(t=e()),t)}const Dn=e=>e,AM=(e,t)=>n=>t(e(n)),ts=(...e)=>e.reduce(AM),es=(e,t,n)=>{const i=t-e;return i===0?1:(n-e)/i};class ll{constructor(){this.subscriptions=[]}add(t){return il(this.subscriptions,t),()=>sl(this.subscriptions,t)}notify(t,n,i){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,i);else for(let l=0;l<o;l++){const u=this.subscriptions[l];u&&u(t,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const _n=e=>e*1e3,In=e=>e/1e3;function yd(e,t){return t?e*(1e3/t):0}const vd=new Set;function ul(e,t,n){e||vd.has(t)||(console.warn(ol(t,n)),vd.add(t))}const Md=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,bM=1e-7,SM=12;function NM(e,t,n,i,o){let l,u,c=0;do u=t+(n-t)/2,l=Md(u,i,o)-e,l>0?n=u:t=u;while(Math.abs(l)>bM&&++c<SM);return u}function ns(e,t,n,i){if(e===t&&n===i)return Dn;const o=l=>NM(l,0,1,e,n);return l=>l===0||l===1?l:Md(o(l),t,i)}const wd=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,xd=e=>t=>1-e(1-t),Td=ns(.33,1.53,.69,.99),cl=xd(Td),Ed=wd(cl),Ad=e=>(e*=2)<1?.5*cl(e):.5*(2-Math.pow(2,-10*(e-1))),fl=e=>1-Math.sin(Math.acos(e)),bd=xd(fl),Sd=wd(fl),DM=ns(.42,0,1,1),IM=ns(0,0,.58,1),Nd=ns(.42,0,.58,1),CM=e=>Array.isArray(e)&&typeof e[0]!="number",Dd=e=>Array.isArray(e)&&typeof e[0]=="number",Id={linear:Dn,easeIn:DM,easeInOut:Nd,easeOut:IM,circIn:fl,circInOut:Sd,circOut:bd,backIn:cl,backInOut:Ed,backOut:Td,anticipate:Ad},zM=e=>typeof e=="string",Cd=e=>{if(Dd(e)){dr(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,i,o]=e;return ns(t,n,i,o)}else if(zM(e))return dr(Id[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Id[e];return e},no=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function kM(e,t){let n=new Set,i=new Set,o=!1,l=!1;const u=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1};function d(p){u.has(p)&&(h.schedule(p),e()),p(c)}const h={schedule:(p,m=!1,w=!1)=>{const S=w&&o?n:i;return m&&u.add(p),S.has(p)||S.add(p),p},cancel:p=>{i.delete(p),u.delete(p)},process:p=>{if(c=p,o){l=!0;return}o=!0,[n,i]=[i,n],n.forEach(d),n.clear(),o=!1,l&&(l=!1,h.process(p))}};return h}const OM=40;function zd(e,t){let n=!1,i=!0;const o={delta:0,timestamp:0,isProcessing:!1},l=()=>n=!0,u=no.reduce((z,Z)=>(z[Z]=kM(l),z),{}),{setup:c,read:d,resolveKeyframes:h,preUpdate:p,update:m,preRender:w,render:v,postRender:S}=u,A=()=>{const z=hr.useManualTiming?o.timestamp:performance.now();n=!1,hr.useManualTiming||(o.delta=i?1e3/60:Math.max(Math.min(z-o.timestamp,OM),1)),o.timestamp=z,o.isProcessing=!0,c.process(o),d.process(o),h.process(o),p.process(o),m.process(o),w.process(o),v.process(o),S.process(o),o.isProcessing=!1,n&&t&&(i=!1,e(A))},P=()=>{n=!0,i=!0,o.isProcessing||e(A)};return{schedule:no.reduce((z,Z)=>{const Q=u[Z];return z[Z]=(J,G=!1,K=!1)=>(n||P(),Q.schedule(J,G,K)),z},{}),cancel:z=>{for(let Z=0;Z<no.length;Z++)u[no[Z]].cancel(z)},state:o,steps:u}}const{schedule:Te,cancel:Sr,state:Ke,steps:dl}=zd(typeof requestAnimationFrame<"u"?requestAnimationFrame:Dn,!0);let ro;function LM(){ro=void 0}const dn={now:()=>(ro===void 0&&dn.set(Ke.isProcessing||hr.useManualTiming?Ke.timestamp:performance.now()),ro),set:e=>{ro=e,queueMicrotask(LM)}},kd=e=>t=>typeof t=="string"&&t.startsWith(e),hl=kd("--"),jM=kd("var(--"),pl=e=>jM(e)?RM.test(e.split("/*")[0].trim()):!1,RM=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,mi={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},rs={...mi,transform:e=>fr(0,1,e)},io={...mi,default:1},is=e=>Math.round(e*1e5)/1e5,gl=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function UM(e){return e==null}const VM=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ml=(e,t)=>n=>!!(typeof n=="string"&&VM.test(n)&&n.startsWith(e)||t&&!UM(n)&&Object.prototype.hasOwnProperty.call(n,t)),Od=(e,t,n)=>i=>{if(typeof i!="string")return i;const[o,l,u,c]=i.match(gl);return{[e]:parseFloat(o),[t]:parseFloat(l),[n]:parseFloat(u),alpha:c!==void 0?parseFloat(c):1}},PM=e=>fr(0,255,e),yl={...mi,transform:e=>Math.round(PM(e))},qr={test:ml("rgb","red"),parse:Od("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+yl.transform(e)+", "+yl.transform(t)+", "+yl.transform(n)+", "+is(rs.transform(i))+")"};function QM(e){let t="",n="",i="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,i+=i,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:o?parseInt(o,16)/255:1}}const vl={test:ml("#"),parse:QM,transform:qr.transform},ss=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Nr=ss("deg"),rr=ss("%"),Dt=ss("px"),FM=ss("vh"),BM=ss("vw"),Ld={...rr,parse:e=>rr.parse(e)/100,transform:e=>rr.transform(e*100)},yi={test:ml("hsl","hue"),parse:Od("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+rr.transform(is(t))+", "+rr.transform(is(n))+", "+is(rs.transform(i))+")"},Pe={test:e=>qr.test(e)||vl.test(e)||yi.test(e),parse:e=>qr.test(e)?qr.parse(e):yi.test(e)?yi.parse(e):vl.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?qr.transform(e):yi.transform(e),getAnimatableNone:e=>{const t=Pe.parse(e);return t.alpha=0,Pe.transform(t)}},YM=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function WM(e){return isNaN(e)&&typeof e=="string"&&(e.match(gl)?.length||0)+(e.match(YM)?.length||0)>0}const jd="number",Rd="color",qM="var",_M="var(",Ud="${}",KM=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function os(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},o=[];let l=0;const c=t.replace(KM,d=>(Pe.test(d)?(i.color.push(l),o.push(Rd),n.push(Pe.parse(d))):d.startsWith(_M)?(i.var.push(l),o.push(qM),n.push(d)):(i.number.push(l),o.push(jd),n.push(parseFloat(d))),++l,Ud)).split(Ud);return{values:n,split:c,indexes:i,types:o}}function Vd(e){return os(e).values}function Pd(e){const{split:t,types:n}=os(e),i=t.length;return o=>{let l="";for(let u=0;u<i;u++)if(l+=t[u],o[u]!==void 0){const c=n[u];c===jd?l+=is(o[u]):c===Rd?l+=Pe.transform(o[u]):l+=o[u]}return l}}const HM=e=>typeof e=="number"?0:Pe.test(e)?Pe.getAnimatableNone(e):e;function JM(e){const t=Vd(e);return Pd(e)(t.map(HM))}const Dr={test:WM,parse:Vd,createTransformer:Pd,getAnimatableNone:JM};function Ml(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<.16666666666666666?e+(t-e)*6*n:n<.5?t:n<.6666666666666666?e+(t-e)*(.6666666666666666-n)*6:e}function GM({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let o=0,l=0,u=0;if(!t)o=l=u=n;else{const c=n<.5?n*(1+t):n+t-n*t,d=2*n-c;o=Ml(d,c,e+.3333333333333333),l=Ml(d,c,e),u=Ml(d,c,e-.3333333333333333)}return{red:Math.round(o*255),green:Math.round(l*255),blue:Math.round(u*255),alpha:i}}function so(e,t){return n=>n>0?t:e}const be=(e,t,n)=>e+(t-e)*n,wl=(e,t,n)=>{const i=e*e,o=n*(t*t-i)+i;return o<0?0:Math.sqrt(o)},ZM=[vl,qr,yi],XM=e=>ZM.find(t=>t.test(e));function Qd(e){const t=XM(e);if(gi(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===yi&&(n=GM(n)),n}const Fd=(e,t)=>{const n=Qd(e),i=Qd(t);if(!n||!i)return so(e,t);const o={...n};return l=>(o.red=wl(n.red,i.red,l),o.green=wl(n.green,i.green,l),o.blue=wl(n.blue,i.blue,l),o.alpha=be(n.alpha,i.alpha,l),qr.transform(o))},xl=new Set(["none","hidden"]);function $M(e,t){return xl.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function tw(e,t){return n=>be(e,t,n)}function Tl(e){return typeof e=="number"?tw:typeof e=="string"?pl(e)?so:Pe.test(e)?Fd:rw:Array.isArray(e)?Bd:typeof e=="object"?Pe.test(e)?Fd:ew:so}function Bd(e,t){const n=[...e],i=n.length,o=e.map((l,u)=>Tl(l)(l,t[u]));return l=>{for(let u=0;u<i;u++)n[u]=o[u](l);return n}}function ew(e,t){const n={...e,...t},i={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(i[o]=Tl(e[o])(e[o],t[o]));return o=>{for(const l in i)n[l]=i[l](o);return n}}function nw(e,t){const n=[],i={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const l=t.types[o],u=e.indexes[l][i[l]],c=e.values[u]??0;n[o]=c,i[l]++}return n}const rw=(e,t)=>{const n=Dr.createTransformer(t),i=os(e),o=os(t);return i.indexes.var.length===o.indexes.var.length&&i.indexes.color.length===o.indexes.color.length&&i.indexes.number.length>=o.indexes.number.length?xl.has(e)&&!o.values.length||xl.has(t)&&!i.values.length?$M(e,t):ts(Bd(nw(i,o),o.values),n):(gi(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),so(e,t))};function Yd(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?be(e,t,n):Tl(e)(e,t)}const iw=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Te.update(t,n),stop:()=>Sr(t),now:()=>Ke.isProcessing?Ke.timestamp:dn.now()}},Wd=(e,t,n=10)=>{let i="";const o=Math.max(Math.round(t/n),2);for(let l=0;l<o;l++)i+=Math.round(e(l/(o-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},oo=2e4;function El(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t<oo;)t+=n,i=e.next(t);return t>=oo?1/0:t}function sw(e,t=100,n){const i=n({...e,keyframes:[0,t]}),o=Math.min(El(i),oo);return{type:"keyframes",ease:l=>i.next(o*l).value/t,duration:In(o)}}const ow=5;function qd(e,t,n){const i=Math.max(t-ow,0);return yd(n-e(i),t-i)}const Se={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Al=.001;function aw({duration:e=Se.duration,bounce:t=Se.bounce,velocity:n=Se.velocity,mass:i=Se.mass}){let o,l;gi(e<=_n(Se.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let u=1-t;u=fr(Se.minDamping,Se.maxDamping,u),e=fr(Se.minDuration,Se.maxDuration,In(e)),u<1?(o=h=>{const p=h*u,m=p*e,w=p-n,v=bl(h,u),S=Math.exp(-m);return Al-w/v*S},l=h=>{const m=h*u*e,w=m*n+n,v=Math.pow(u,2)*Math.pow(h,2)*e,S=Math.exp(-m),A=bl(Math.pow(h,2),u);return(-o(h)+Al>0?-1:1)*((w-v)*S)/A}):(o=h=>{const p=Math.exp(-h*e),m=(h-n)*e+1;return-Al+p*m},l=h=>{const p=Math.exp(-h*e),m=(n-h)*(e*e);return p*m});const c=5/e,d=uw(o,l,c);if(e=_n(e),isNaN(d))return{stiffness:Se.stiffness,damping:Se.damping,duration:e};{const h=Math.pow(d,2)*i;return{stiffness:h,damping:u*2*Math.sqrt(i*h),duration:e}}}const lw=12;function uw(e,t,n){let i=n;for(let o=1;o<lw;o++)i=i-e(i)/t(i);return i}function bl(e,t){return e*Math.sqrt(1-t*t)}const cw=["duration","bounce"],fw=["stiffness","damping","mass"];function _d(e,t){return t.some(n=>e[n]!==void 0)}function dw(e){let t={velocity:Se.velocity,stiffness:Se.stiffness,damping:Se.damping,mass:Se.mass,isResolvedFromDuration:!1,...e};if(!_d(e,fw)&&_d(e,cw))if(e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),o=i*i,l=2*fr(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Se.mass,stiffness:o,damping:l}}else{const n=aw(e);t={...t,...n,mass:Se.mass},t.isResolvedFromDuration=!0}return t}function ao(e=Se.visualDuration,t=Se.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:o}=n;const l=n.keyframes[0],u=n.keyframes[n.keyframes.length-1],c={done:!1,value:l},{stiffness:d,damping:h,mass:p,duration:m,velocity:w,isResolvedFromDuration:v}=dw({...n,velocity:-In(n.velocity||0)}),S=w||0,A=h/(2*Math.sqrt(d*p)),P=u-l,j=In(Math.sqrt(d/p)),L=Math.abs(P)<5;i||(i=L?Se.restSpeed.granular:Se.restSpeed.default),o||(o=L?Se.restDelta.granular:Se.restDelta.default);let z;if(A<1){const Q=bl(j,A);z=J=>{const G=Math.exp(-A*j*J);return u-G*((S+A*j*P)/Q*Math.sin(Q*J)+P*Math.cos(Q*J))}}else if(A===1)z=Q=>u-Math.exp(-j*Q)*(P+(S+j*P)*Q);else{const Q=j*Math.sqrt(A*A-1);z=J=>{const G=Math.exp(-A*j*J),K=Math.min(Q*J,300);return u-G*((S+A*j*P)*Math.sinh(K)+Q*P*Math.cosh(K))/Q}}const Z={calculatedDuration:v&&m||null,next:Q=>{const J=z(Q);if(v)c.done=Q>=m;else{let G=Q===0?S:0;A<1&&(G=Q===0?_n(S):qd(z,Q,J));const K=Math.abs(G)<=i,vt=Math.abs(u-J)<=o;c.done=K&&vt}return c.value=c.done?u:J,c},toString:()=>{const Q=Math.min(El(Z),oo),J=Wd(G=>Z.next(Q*G).value,Q,30);return Q+"ms "+J},toTransition:()=>{}};return Z}ao.applyToOptions=e=>{const t=sw(e,100,ao);return e.ease=t.ease,e.duration=_n(t.duration),e.type="keyframes",e};function Sl({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:o=10,bounceStiffness:l=500,modifyTarget:u,min:c,max:d,restDelta:h=.5,restSpeed:p}){const m=e[0],w={done:!1,value:m},v=K=>c!==void 0&&K<c||d!==void 0&&K>d,S=K=>c===void 0?d:d===void 0||Math.abs(c-K)<Math.abs(d-K)?c:d;let A=n*t;const P=m+A,j=u===void 0?P:u(P);j!==P&&(A=j-m);const L=K=>-A*Math.exp(-K/i),z=K=>j+L(K),Z=K=>{const vt=L(K),ft=z(K);w.done=Math.abs(vt)<=h,w.value=w.done?j:ft};let Q,J;const G=K=>{v(w.value)&&(Q=K,J=ao({keyframes:[w.value,S(w.value)],velocity:qd(z,K,w.value),damping:o,stiffness:l,restDelta:h,restSpeed:p}))};return G(0),{calculatedDuration:null,next:K=>{let vt=!1;return!J&&Q===void 0&&(vt=!0,Z(K),G(K)),Q!==void 0&&K>=Q?J.next(K-Q):(!vt&&Z(K),w)}}}function hw(e,t,n){const i=[],o=n||hr.mix||Yd,l=e.length-1;for(let u=0;u<l;u++){let c=o(e[u],e[u+1]);if(t){const d=Array.isArray(t)?t[u]||Dn:t;c=ts(d,c)}i.push(c)}return i}function pw(e,t,{clamp:n=!0,ease:i,mixer:o}={}){const l=e.length;if(dr(l===t.length,"Both input and output ranges must be the same length","range-length"),l===1)return()=>t[0];if(l===2&&t[0]===t[1])return()=>t[1];const u=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),t=[...t].reverse());const c=hw(t,i,o),d=c.length,h=p=>{if(u&&p<e[0])return t[0];let m=0;if(d>1)for(;m<e.length-2&&!(p<e[m+1]);m++);const w=es(e[m],e[m+1],p);return c[m](w)};return n?p=>h(fr(e[0],e[l-1],p)):h}function gw(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const o=es(0,t,i);e.push(be(n,1,o))}}function mw(e){const t=[0];return gw(t,e.length-1),t}function yw(e,t){return e.map(n=>n*t)}function vw(e,t){return e.map(()=>t||Nd).splice(0,e.length-1)}function vi({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const o=CM(i)?i.map(Cd):Cd(i),l={done:!1,value:t[0]},u=yw(n&&n.length===t.length?n:mw(t),e),c=pw(u,t,{ease:Array.isArray(o)?o:vw(t,o)});return{calculatedDuration:e,next:d=>(l.value=c(d),l.done=d>=e,l)}}const Mw=e=>e!==null;function Nl(e,{repeat:t,repeatType:n="loop"},i,o=1){const l=e.filter(Mw),c=o<0||t&&n!=="loop"&&t%2===1?0:l.length-1;return!c||i===void 0?l[c]:i}const ww={decay:Sl,inertia:Sl,tween:vi,keyframes:vi,spring:ao};function Kd(e){typeof e.type=="string"&&(e.type=ww[e.type])}class Dl{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}var xw={env:{}};const Tw=e=>e/100;class Il extends Dl{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==dn.now()&&this.tick(dn.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Kd(t);const{type:n=vi,repeat:i=0,repeatDelay:o=0,repeatType:l,velocity:u=0}=t;let{keyframes:c}=t;const d=n||vi;xw.env.NODE_ENV!=="production"&&d!==vi&&dr(c.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${c}`,"spring-two-frames"),d!==vi&&typeof c[0]!="number"&&(this.mixKeyframes=ts(Tw,Yd(c[0],c[1])),c=[0,100]);const h=d({...t,keyframes:c});l==="mirror"&&(this.mirroredGenerator=d({...t,keyframes:[...c].reverse(),velocity:-u})),h.calculatedDuration===null&&(h.calculatedDuration=El(h));const{calculatedDuration:p}=h;this.calculatedDuration=p,this.resolvedDuration=p+o,this.totalDuration=this.resolvedDuration*(i+1)-o,this.generator=h}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:i,totalDuration:o,mixKeyframes:l,mirroredGenerator:u,resolvedDuration:c,calculatedDuration:d}=this;if(this.startTime===null)return i.next(0);const{delay:h=0,keyframes:p,repeat:m,repeatType:w,repeatDelay:v,type:S,onUpdate:A,finalKeyframe:P}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const j=this.currentTime-h*(this.playbackSpeed>=0?1:-1),L=this.playbackSpeed>=0?j<0:j>o;this.currentTime=Math.max(j,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let z=this.currentTime,Z=i;if(m){const K=Math.min(this.currentTime,o)/c;let vt=Math.floor(K),ft=K%1;!ft&&K>=1&&(ft=1),ft===1&&vt--,vt=Math.min(vt,m+1),!!(vt%2)&&(w==="reverse"?(ft=1-ft,v&&(ft-=v/c)):w==="mirror"&&(Z=u)),z=fr(0,1,ft)*c}const Q=L?{done:!1,value:p[0]}:Z.next(z);l&&(Q.value=l(Q.value));let{done:J}=Q;!L&&d!==null&&(J=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const G=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&J);return G&&S!==Sl&&(Q.value=Nl(p,this.options,P,this.speed)),A&&A(Q.value),G&&this.finish(),Q}then(t,n){return this.finished.then(t,n)}get duration(){return In(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+In(t)}get time(){return In(this.currentTime)}set time(t){t=_n(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(dn.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=In(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=iw,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(dn.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Ew(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const _r=e=>e*180/Math.PI,Cl=e=>{const t=_r(Math.atan2(e[1],e[0]));return zl(t)},Aw={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Cl,rotateZ:Cl,skewX:e=>_r(Math.atan(e[1])),skewY:e=>_r(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},zl=e=>(e=e%360,e<0&&(e+=360),e),Hd=Cl,Jd=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Gd=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),bw={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Jd,scaleY:Gd,scale:e=>(Jd(e)+Gd(e))/2,rotateX:e=>zl(_r(Math.atan2(e[6],e[5]))),rotateY:e=>zl(_r(Math.atan2(-e[2],e[0]))),rotateZ:Hd,rotate:Hd,skewX:e=>_r(Math.atan(e[4])),skewY:e=>_r(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function kl(e){return e.includes("scale")?1:0}function Ol(e,t){if(!e||e==="none")return kl(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,o;if(n)i=bw,o=n;else{const c=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Aw,o=c}if(!o)return kl(t);const l=i[t],u=o[1].split(",").map(Nw);return typeof l=="function"?l(u):u[l]}const Sw=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Ol(n,t)};function Nw(e){return parseFloat(e.trim())}const Mi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],wi=new Set(Mi),Zd=e=>e===mi||e===Dt,Dw=new Set(["x","y","z"]),Iw=Mi.filter(e=>!Dw.has(e));function Cw(e){const t=[];return Iw.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const Kr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Ol(t,"x"),y:(e,{transform:t})=>Ol(t,"y")};Kr.translateX=Kr.x,Kr.translateY=Kr.y;const Hr=new Set;let Ll=!1,jl=!1,Rl=!1;function Xd(){if(jl){const e=Array.from(Hr).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const o=Cw(i);o.length&&(n.set(i,o),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const o=n.get(i);o&&o.forEach(([l,u])=>{i.getValue(l)?.set(u)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}jl=!1,Ll=!1,Hr.forEach(e=>e.complete(Rl)),Hr.clear()}function $d(){Hr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(jl=!0)})}function zw(){Rl=!0,$d(),Xd(),Rl=!1}class Ul{constructor(t,n,i,o,l,u=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=o,this.element=l,this.isAsync=u}scheduleResolve(){this.state="scheduled",this.isAsync?(Hr.add(this),Ll||(Ll=!0,Te.read($d),Te.resolveKeyframes(Xd))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:o}=this;if(t[0]===null){const l=o?.get(),u=t[t.length-1];if(l!==void 0)t[0]=l;else if(i&&n){const c=i.readValue(n,u);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=u),o&&l===void 0&&o.set(t[0])}Ew(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Hr.delete(this)}cancel(){this.state==="scheduled"&&(Hr.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const kw=e=>e.startsWith("--");function Ow(e,t,n){kw(t)?e.style.setProperty(t,n):e.style[t]=n}const Lw=al(()=>window.ScrollTimeline!==void 0),jw={};function Rw(e,t){const n=al(e);return()=>jw[t]??n()}const th=Rw(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),as=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,eh={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:as([0,.65,.55,1]),circOut:as([.55,0,1,.45]),backIn:as([.31,.01,.66,-.59]),backOut:as([.33,1.53,.69,.99])};function nh(e,t){if(e)return typeof e=="function"?th()?Wd(e,t):"ease-out":Dd(e)?as(e):Array.isArray(e)?e.map(n=>nh(n,t)||eh.easeOut):eh[e]}function Uw(e,t,n,{delay:i=0,duration:o=300,repeat:l=0,repeatType:u="loop",ease:c="easeOut",times:d}={},h=void 0){const p={[t]:n};d&&(p.offset=d);const m=nh(c,o);Array.isArray(m)&&(p.easing=m);const w={delay:i,duration:o,easing:Array.isArray(m)?"linear":m,fill:"both",iterations:l+1,direction:u==="reverse"?"alternate":"normal"};return h&&(w.pseudoElement=h),e.animate(p,w)}function rh(e){return typeof e=="function"&&"applyToOptions"in e}function Vw({type:e,...t}){return rh(e)&&th()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Pw extends Dl{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:i,keyframes:o,pseudoElement:l,allowFlatten:u=!1,finalKeyframe:c,onComplete:d}=t;this.isPseudoElement=!!l,this.allowFlatten=u,this.options=t,dr(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const h=Vw(t);this.animation=Uw(n,i,o,h,l),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!l){const p=Nl(o,this.options,c,this.speed);this.updateMotionValue?this.updateMotionValue(p):Ow(n,i,p),this.animation.cancel()}d?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return In(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+In(t)}get time(){return In(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=_n(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Lw()?(this.animation.timeline=t,Dn):n(this)}}const ih={anticipate:Ad,backInOut:Ed,circInOut:Sd};function Qw(e){return e in ih}function Fw(e){typeof e.ease=="string"&&Qw(e.ease)&&(e.ease=ih[e.ease])}const sh=10;class Bw extends Pw{constructor(t){Fw(t),Kd(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:o,element:l,...u}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const c=new Il({...u,autoplay:!1}),d=_n(this.finishedTime??this.time);n.setWithVelocity(c.sample(d-sh).value,c.sample(d).value,sh),c.stop()}}const oh=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Dr.test(e)||e==="0")&&!e.startsWith("url("));function Yw(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Ww(e,t,n,i){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const l=e[e.length-1],u=oh(o,t),c=oh(l,t);return gi(u===c,`You are trying to animate ${t} from "${o}" to "${l}". "${u?l:o}" is not an animatable value.`,"value-not-animatable"),!u||!c?!1:Yw(e)||(n==="spring"||rh(n))&&i}function Vl(e){e.duration=0,e.type="keyframes"}const qw=new Set(["opacity","clipPath","filter","transform"]),_w=al(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Kw(e){const{motionValue:t,name:n,repeatDelay:i,repeatType:o,damping:l,type:u}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:h}=t.owner.getProps();return _w()&&n&&qw.has(n)&&(n!=="transform"||!h)&&!d&&!i&&o!=="mirror"&&l!==0&&u!=="inertia"}const Hw=40;class Jw extends Dl{constructor({autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:o=0,repeatDelay:l=0,repeatType:u="loop",keyframes:c,name:d,motionValue:h,element:p,...m}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=dn.now();const w={autoplay:t,delay:n,type:i,repeat:o,repeatDelay:l,repeatType:u,name:d,motionValue:h,element:p,...m},v=p?.KeyframeResolver||Ul;this.keyframeResolver=new v(c,(S,A,P)=>this.onKeyframesResolved(S,A,w,!P),d,h,p),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,i,o){this.keyframeResolver=void 0;const{name:l,type:u,velocity:c,delay:d,isHandoff:h,onUpdate:p}=i;this.resolvedAt=dn.now(),Ww(t,l,u,c)||((hr.instantAnimations||!d)&&p?.(Nl(t,i,n)),t[0]=t[t.length-1],Vl(i),i.repeat=0);const w={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>Hw?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},v=!h&&Kw(w)?new Bw({...w,element:w.motionValue.owner.current}):new Il(w);v.finished.then(()=>this.notifyFinished()).catch(Dn),this.pendingTimeline&&(this.stopTimeline=v.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=v}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),zw()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const Gw=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Zw(e){const t=Gw.exec(e);if(!t)return[,];const[,n,i,o]=t;return[`--${n??i}`,o]}const Xw=4;function ah(e,t,n=1){dr(n<=Xw,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,o]=Zw(e);if(!i)return;const l=window.getComputedStyle(t).getPropertyValue(i);if(l){const u=l.trim();return pd(u)?parseFloat(u):u}return pl(o)?ah(o,t,n+1):o}function Pl(e,t){return e?.[t]??e?.default??e}const lh=new Set(["width","height","top","left","right","bottom",...Mi]),$w={test:e=>e==="auto",parse:e=>e},uh=e=>t=>t.test(e),ch=[mi,Dt,rr,Nr,BM,FM,$w],fh=e=>ch.find(uh(e));function tx(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||md(e):!0}const ex=new Set(["brightness","contrast","saturate","opacity"]);function nx(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(gl)||[];if(!i)return e;const o=n.replace(i,"");let l=ex.has(t)?1:0;return i!==n&&(l*=100),t+"("+l+o+")"}const rx=/\b([a-z-]*)\(.*?\)/gu,Ql={...Dr,getAnimatableNone:e=>{const t=e.match(rx);return t?t.map(nx).join(" "):e}},dh={...mi,transform:Math.round},Fl={borderWidth:Dt,borderTopWidth:Dt,borderRightWidth:Dt,borderBottomWidth:Dt,borderLeftWidth:Dt,borderRadius:Dt,radius:Dt,borderTopLeftRadius:Dt,borderTopRightRadius:Dt,borderBottomRightRadius:Dt,borderBottomLeftRadius:Dt,width:Dt,maxWidth:Dt,height:Dt,maxHeight:Dt,top:Dt,right:Dt,bottom:Dt,left:Dt,padding:Dt,paddingTop:Dt,paddingRight:Dt,paddingBottom:Dt,paddingLeft:Dt,margin:Dt,marginTop:Dt,marginRight:Dt,marginBottom:Dt,marginLeft:Dt,backgroundPositionX:Dt,backgroundPositionY:Dt,...{rotate:Nr,rotateX:Nr,rotateY:Nr,rotateZ:Nr,scale:io,scaleX:io,scaleY:io,scaleZ:io,skew:Nr,skewX:Nr,skewY:Nr,distance:Dt,translateX:Dt,translateY:Dt,translateZ:Dt,x:Dt,y:Dt,z:Dt,perspective:Dt,transformPerspective:Dt,opacity:rs,originX:Ld,originY:Ld,originZ:Dt},zIndex:dh,fillOpacity:rs,strokeOpacity:rs,numOctaves:dh},ix={...Fl,color:Pe,backgroundColor:Pe,outlineColor:Pe,fill:Pe,stroke:Pe,borderColor:Pe,borderTopColor:Pe,borderRightColor:Pe,borderBottomColor:Pe,borderLeftColor:Pe,filter:Ql,WebkitFilter:Ql},hh=e=>ix[e];function ph(e,t){let n=hh(e);return n!==Ql&&(n=Dr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const sx=new Set(["auto","none","0"]);function ox(e,t,n){let i=0,o;for(;i<e.length&&!o;){const l=e[i];typeof l=="string"&&!sx.has(l)&&os(l).values.length&&(o=e[i]),i++}if(o&&n)for(const l of t)e[l]=ph(n,o)}class ax extends Ul{constructor(t,n,i,o,l){super(t,n,i,o,l,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let h=t[d];if(typeof h=="string"&&(h=h.trim(),pl(h))){const p=ah(h,n.current);p!==void 0&&(t[d]=p),d===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!lh.has(i)||t.length!==2)return;const[o,l]=t,u=fh(o),c=fh(l);if(u!==c)if(Zd(u)&&Zd(c))for(let d=0;d<t.length;d++){const h=t[d];typeof h=="string"&&(t[d]=parseFloat(h))}else Kr[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,i=[];for(let o=0;o<t.length;o++)(t[o]===null||tx(t[o]))&&i.push(o);i.length&&ox(t,i,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Kr[i](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(i,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const l=i.length-1,u=i[l];i[l]=Kr[n](t.measureViewportBox(),window.getComputedStyle(t.current)),u!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=u),this.removedTransforms?.length&&this.removedTransforms.forEach(([c,d])=>{t.getValue(c).set(d)}),this.resolveNoneKeyframes()}}function lx(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const o=n?.[e]??i.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}const gh=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function mh(e){return gd(e)&&"offsetHeight"in e}var ux={env:{}};const yh=30,cx=e=>!isNaN(parseFloat(e));class fx{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const o=dn.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=dn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=cx(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return ux.env.NODE_ENV!=="production"&&ul(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new ll);const i=this.events[t].add(n);return t==="change"?()=>{i(),Te.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=dn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>yh)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,yh);return yd(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function xi(e,t){return new fx(e,t)}const{schedule:Bl}=zd(queueMicrotask,!1),Kn={x:!1,y:!1};function vh(){return Kn.x||Kn.y}function dx(e){return e==="x"||e==="y"?Kn[e]?null:(Kn[e]=!0,()=>{Kn[e]=!1}):Kn.x||Kn.y?null:(Kn.x=Kn.y=!0,()=>{Kn.x=Kn.y=!1})}function Mh(e,t){const n=lx(e),i=new AbortController,o={passive:!0,...t,signal:i.signal};return[n,o,()=>i.abort()]}function wh(e){return!(e.pointerType==="touch"||vh())}function hx(e,t,n={}){const[i,o,l]=Mh(e,n),u=c=>{if(!wh(c))return;const{target:d}=c,h=t(d,c);if(typeof h!="function"||!d)return;const p=m=>{wh(m)&&(h(m),d.removeEventListener("pointerleave",p))};d.addEventListener("pointerleave",p,o)};return i.forEach(c=>{c.addEventListener("pointerenter",u,o)}),l}const xh=(e,t)=>t?e===t?!0:xh(e,t.parentElement):!1,Yl=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,px=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function gx(e){return px.has(e.tagName)||e.tabIndex!==-1}const lo=new WeakSet;function Th(e){return t=>{t.key==="Enter"&&e(t)}}function Wl(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const mx=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=Th(()=>{if(lo.has(n))return;Wl(n,"down");const o=Th(()=>{Wl(n,"up")}),l=()=>Wl(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",l,t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)};function Eh(e){return Yl(e)&&!vh()}function yx(e,t,n={}){const[i,o,l]=Mh(e,n),u=c=>{const d=c.currentTarget;if(!Eh(c))return;lo.add(d);const h=t(d,c),p=(v,S)=>{window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",w),lo.has(d)&&lo.delete(d),Eh(v)&&typeof h=="function"&&h(v,{success:S})},m=v=>{p(v,d===window||d===document||n.useGlobalTarget||xh(d,v.target))},w=v=>{p(v,!1)};window.addEventListener("pointerup",m,o),window.addEventListener("pointercancel",w,o)};return i.forEach(c=>{(n.useGlobalTarget?window:c).addEventListener("pointerdown",u,o),mh(c)&&(c.addEventListener("focus",h=>mx(h,o)),!gx(c)&&!c.hasAttribute("tabindex")&&(c.tabIndex=0))}),l}function Ah(e){return gd(e)&&"ownerSVGElement"in e}function vx(e){return Ah(e)&&e.tagName==="svg"}const tn=e=>!!(e&&e.getVelocity),Mx=[...ch,Pe,Dr],wx=e=>Mx.find(uh(e)),ql=x.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function bh(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function xx(...e){return t=>{let n=!1;const i=e.map(o=>{const l=bh(o,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let o=0;o<i.length;o++){const l=i[o];typeof l=="function"?l():bh(e[o],null)}}}}function Tx(...e){return Xs.useCallback(xx(...e),e)}class Ex extends Xs.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const i=n.offsetParent,o=mh(i)&&i.offsetWidth||0,l=this.props.sizeRef.current;l.height=n.offsetHeight||0,l.width=n.offsetWidth||0,l.top=n.offsetTop,l.left=n.offsetLeft,l.right=o-l.width-l.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Ax({children:e,isPresent:t,anchorX:n,root:i}){const o=x.useId(),l=x.useRef(null),u=x.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:c}=x.useContext(ql),d=Tx(l,e?.ref);return x.useInsertionEffect(()=>{const{width:h,height:p,top:m,left:w,right:v}=u.current;if(t||!l.current||!h||!p)return;const S=n==="left"?`left: ${w}`:`right: ${v}`;l.current.dataset.motionPopId=o;const A=document.createElement("style");c&&(A.nonce=c);const P=i??document.head;return P.appendChild(A),A.sheet&&A.sheet.insertRule(`
14
+ <%s key={someKey} {...props} />`,Rs,Un,Zc,Un),Ce[Un+Rs]=!0}}return E===o?qe(ze):Be(ze),ze}}function Kc(E,H,ot){return Re(E,H,ot,!0)}function Hc(E,H,ot){return Re(E,H,ot,!1)}var Jc=Hc,Gc=Kc;$i.Fragment=o,$i.jsx=Jc,$i.jsxs=Gc})(),$i}var fd;function vM(){if(fd)return to.exports;fd=1;var e={env:{}};return e.env.NODE_ENV==="production"?to.exports=mM():to.exports=yM(),to.exports}var rt=vM(),pi={},dd;function MM(){if(dd)return pi;dd=1;var e={env:{}},t=tl;if(e.env.NODE_ENV==="production")pi.createRoot=t.createRoot,pi.hydrateRoot=t.hydrateRoot;else{var n=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;pi.createRoot=function(i,o){n.usingClientEntryPoint=!0;try{return t.createRoot(i,o)}finally{n.usingClientEntryPoint=!1}},pi.hydrateRoot=function(i,o,l){n.usingClientEntryPoint=!0;try{return t.hydrateRoot(i,o,l)}finally{n.usingClientEntryPoint=!1}}}return pi}var wM=MM();const xM='@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-700:oklch(37.3% .034 259.733);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-6xl:3.75rem;--text-6xl--line-height:1;--text-7xl:4.5rem;--text-7xl--line-height:1;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--radius-md:.375rem;--radius-lg:.5rem;--radius-2xl:1rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.collapse{visibility:collapse}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.right-14{right:calc(var(--spacing)*14)}.bottom-8{bottom:calc(var(--spacing)*8)}.bottom-16{bottom:calc(var(--spacing)*16)}.z-10{z-index:10}.z-50{z-index:50}.container{width:100%}@media(min-width:30rem){.container{max-width:30rem}}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}@media(min-width:120rem){.container{max-width:120rem}}@media(min-width:160rem){.container{max-width:160rem}}.mx-auto{margin-inline:auto}.my-2{margin-block:calc(var(--spacing)*2)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mr-4{margin-right:calc(var(--spacing)*4)}.flex{display:flex}.inline{display:inline}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-8{height:calc(var(--spacing)*8)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.h-\\[50vh\\]{height:50vh}.h-\\[200px\\]{height:200px}.h-\\[500px\\]{height:500px}.h-full{height:100%}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-\\[100\\%\\]{width:100%}.w-\\[200px\\]{width:200px}.w-full{width:100%}.max-w-\\[70\\%\\]{max-width:70%}.max-w-full{max-width:100%}.min-w-\\[70\\%\\]{min-width:70%}.flex-1{flex:1}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-2{gap:calc(var(--spacing)*2)}.gap-4{gap:calc(var(--spacing)*4)}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}.gap-x-2{column-gap:calc(var(--spacing)*2)}.gap-x-4{column-gap:calc(var(--spacing)*4)}.gap-y-2{row-gap:calc(var(--spacing)*2)}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-t-lg{border-top-left-radius:var(--radius-lg);border-top-right-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.bg-\\[\\#EFF1FF\\]{background-color:#eff1ff}.bg-\\[\\#F3F3F3\\]{background-color:#f3f3f3}.bg-\\[\\#F5605724\\]{background-color:#f5605724}.bg-\\[\\#FFFFFF\\]{background-color:#fff}.bg-gray-200{background-color:var(--color-gray-200)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-gradient-to-l{--tw-gradient-position:to left in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-\\[\\#4F5FCE\\]{--tw-gradient-from:#4f5fce;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-\\[\\#F56057\\]{--tw-gradient-from:#f56057;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-\\[\\#FFE6E4\\]{--tw-gradient-from:#ffe6e4;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.via-\\[\\#A03F39\\]{--tw-gradient-via:#a03f39;--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-\\[\\#FFE6E4\\]{--tw-gradient-via:#ffe6e4;--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-\\[\\#2D3776\\]{--tw-gradient-to:#2d3776;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-\\[\\#283068\\]{--tw-gradient-to:#283068;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-\\[\\#FDACA7\\]\\/70{--tw-gradient-to:oklab(82.1256% .0883578 .0380105/.7);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-4{padding:calc(var(--spacing)*4)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.text-center{text-align:center}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.whitespace-pre-wrap{white-space:pre-wrap}.text-\\[\\#0D082C\\]{color:#0d082c}.text-\\[\\#283068\\]{color:#283068}.text-black{color:var(--color-black)}.text-gray-700{color:var(--color-gray-700)}.text-transparent{color:#0000}.text-white{color:var(--color-white)}.italic{font-style:italic}.opacity-75{opacity:.75}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.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,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.outline-none{--tw-outline-style:none;outline-style:none}.\\[vite\\:dts\\]{vite:dts}.placeholder\\:text-gray-500::placeholder{color:var(--color-gray-500)}@media(hover:hover){.hover\\:bg-\\[\\#283068\\]:hover{background-color:#283068}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:opacity-80:hover{opacity:.8}}@media(min-width:40rem){.sm\\:max-w-none{max-width:none}}@media(min-width:48rem){.md\\:h-\\[60vh\\]{height:60vh}.md\\:text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}}@media(min-width:64rem){.lg\\:h-\\[65vh\\]{height:65vh}}@media(min-width:96rem){.\\32xl\\:right-20{right:calc(var(--spacing)*20)}.\\32xl\\:bottom-18{bottom:calc(var(--spacing)*18)}.\\32xl\\:bottom-24{bottom:calc(var(--spacing)*24)}.\\32xl\\:h-8{height:calc(var(--spacing)*8)}.\\32xl\\:h-10{height:calc(var(--spacing)*10)}.\\32xl\\:h-12{height:calc(var(--spacing)*12)}.\\32xl\\:w-8{width:calc(var(--spacing)*8)}.\\32xl\\:w-10{width:calc(var(--spacing)*10)}.\\32xl\\:w-12{width:calc(var(--spacing)*12)}}.custom-scrollbar::-webkit-scrollbar{width:4px;height:px}.custom-scrollbar::-webkit-scrollbar-track{background:0 0}.custom-scrollbar::-webkit-scrollbar-thumb{background:linear-gradient(#21294c,#61b872);border-radius:8px;transition:background .3s,width .3s}.custom-scrollbar:hover::-webkit-scrollbar-thumb{background:linear-gradient(#283950,#4ae48b);width:8px}.custom-scrollbar::-webkit-scrollbar-thumb:active{background:linear-gradient(#1b2124,#2ecc71)}.custom-scrollbar{scrollbar-width:thin;scrollbar-color:#21294c #f3f3f3}.custom-scrollbar:after{content:"";pointer-events:none;background:linear-gradient(#0000,#fff);width:100%;height:20px;position:absolute;bottom:0;left:0}.inputHeight{height:40px}@media(min-width:48rem){.inputHeight{height:36px}}@media(min-width:64rem){.inputHeight{height:38px}}@media(min-width:80rem){.inputHeight{height:42px}}@media(min-width:96rem){.inputHeight{height:46px}}@media(min-width:120rem){.inputHeight{height:50px}}@media(min-width:160rem){.inputHeight{height:54px}}.fs32{font-family:Manrope,sans-serif;font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}@media(min-width:48rem){.fs32{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}}@media(min-width:64rem){.fs32{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}}@media(min-width:80rem){.fs32{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}}@media(min-width:96rem){.fs32{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}}@media(min-width:120rem){.fs32{font-size:var(--text-7xl);line-height:var(--tw-leading,var(--text-7xl--line-height))}}.fs28{font-family:Manrope,sans-serif;font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}@media(min-width:48rem){.fs28{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}}@media(min-width:64rem){.fs28{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}}@media(min-width:80rem){.fs28{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}}@media(min-width:96rem){.fs28{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}}@media(min-width:120rem){.fs28{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}}.fs24{font-family:Manrope,sans-serif;font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}@media(min-width:48rem){.fs24{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}}@media(min-width:64rem){.fs24{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}}@media(min-width:80rem){.fs24{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}}@media(min-width:96rem){.fs24{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}}@media(min-width:120rem){.fs24{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}}.fs22{font-family:Manrope,sans-serif;font-size:22px}@media(min-width:48rem){.fs22{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}}@media(min-width:64rem){.fs22{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}}@media(min-width:80rem){.fs22{font-size:22px}}@media(min-width:96rem){.fs22{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}}@media(min-width:120rem){.fs22{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}}@media(min-width:160rem){.fs22{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}}.fs20{font-family:Manrope,sans-serif;font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}@media(min-width:48rem){.fs20{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}}@media(min-width:64rem){.fs20{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}}@media(min-width:80rem){.fs20{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}}@media(min-width:96rem){.fs20{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}}@media(min-width:120rem){.fs20{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}}@media(min-width:160rem){.fs20{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}}.fs18{font-family:Manrope,sans-serif;font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}@media(min-width:48rem){.fs18{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}}@media(min-width:64rem){.fs18{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}}@media(min-width:80rem){.fs18{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}}@media(min-width:96rem){.fs18{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}}@media(min-width:120rem){.fs18{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}}@media(min-width:160rem){.fs18{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}}.fs16{font-family:Manrope,sans-serif;font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}@media(min-width:48rem){.fs16{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}}@media(min-width:64rem){.fs16{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media(min-width:80rem){.fs16{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}}@media(min-width:96rem){.fs16{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}}@media(min-width:120rem){.fs16{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}}@media(min-width:160rem){.fs16{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}}.fs14{font-family:Manrope,sans-serif;font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}@media(min-width:48rem){.fs14{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}}@media(min-width:64rem){.fs14{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media(min-width:80rem){.fs14{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media(min-width:96rem){.fs14{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}}@media(min-width:120rem){.fs14{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}}@media(min-width:160rem){.fs14{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}}.fs12{font-family:Manrope,sans-serif;font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}@media(min-width:48rem){.fs12{font-size:8px}}@media(min-width:64rem){.fs12{font-size:10px}}@media(min-width:80rem){.fs12{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}}@media(min-width:96rem){.fs12{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media(min-width:120rem){.fs12{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}}@media(min-width:160rem){.fs12{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}}.fs10{font-family:Manrope,sans-serif;font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}@media(min-width:48rem){.fs10{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));font-size:7px}}@media(min-width:64rem){.fs10{font-size:9px}}@media(min-width:96rem){.fs10{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media(min-width:120rem){.fs10{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media(min-width:160rem){.fs10{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}}}:host{color:#000;--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;font-family:Manrope,sans-serif;font-size:16px;line-height:1.5}:host *,:host :before,:host :after{box-sizing:border-box}.chat-header-gradient{background:linear-gradient(90deg,#283068,#49507f,#49507f)}.header{top:calc(var(--spacing)*0);right:calc(var(--spacing)*0);left:calc(var(--spacing)*0);z-index:10;background-color:#fff;position:fixed}.appHeader{border-bottom-style:var(--tw-border-style);vertical-align:middle;border-color:#f3f3f3;border-bottom-width:1px;justify-content:space-between;align-items:center;height:72px;display:flex}@media(min-width:48rem){.appHeader{height:45px}}@media(min-width:64rem){.appHeader{height:54px}}@media(min-width:80rem){.appHeader{height:62px}}@media(min-width:96rem){.appHeader{height:65px}}@media(min-width:120rem){.appHeader{height:72px}}@media(min-width:160rem){.appHeader{height:75px}}.sidebar{bottom:calc(var(--spacing)*0);z-index:5;border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px;background-color:#fff;border-color:#f3f3f3;position:fixed;top:72px;overflow-y:auto}@media(min-width:48rem){.sidebar{top:45px}}@media(min-width:64rem){.sidebar{top:54px}}@media(min-width:80rem){.sidebar{top:62px}}@media(min-width:96rem){.sidebar{top:65px}}@media(min-width:120rem){.sidebar{top:72px}}@media(min-width:160rem){.sidebar{top:75px}}.sidebar{width:220px}@media(min-width:48rem){.sidebar{width:190px}}@media(min-width:64rem){.sidebar{width:210px}}@media(min-width:80rem){.sidebar{width:260px}}@media(min-width:96rem){.sidebar{width:280px}}@media(min-width:120rem){.sidebar{width:300px}}@media(min-width:160rem){.sidebar{width:280px}}.layoutBodyWithSidebar{right:calc(var(--spacing)*0);z-index:0;padding-top:calc(var(--spacing)*6);padding-right:calc(var(--spacing)*6);padding-bottom:calc(var(--spacing)*4);padding-left:calc(var(--spacing)*6);position:absolute;left:220px}@media(min-width:48rem){.layoutBodyWithSidebar{left:190px}}@media(min-width:64rem){.layoutBodyWithSidebar{left:210px}}@media(min-width:80rem){.layoutBodyWithSidebar{left:260px}}@media(min-width:96rem){.layoutBodyWithSidebar{left:280px}}@media(min-width:120rem){.layoutBodyWithSidebar{left:300px}}@media(min-width:160rem){.layoutBodyWithSidebar{left:280px}}.layoutBodyWithSidebar{top:72px}@media(min-width:48rem){.layoutBodyWithSidebar{top:45px}}@media(min-width:64rem){.layoutBodyWithSidebar{top:54px}}@media(min-width:80rem){.layoutBodyWithSidebar{top:62px}}@media(min-width:96rem){.layoutBodyWithSidebar{top:65px}}@media(min-width:120rem){.layoutBodyWithSidebar{top:72px}}@media(min-width:160rem){.layoutBodyWithSidebar{top:75px}}.layoutBodyWithSidebar{min-height:calc(100vh - 72px)}@media(min-width:48rem){.layoutBodyWithSidebar{min-height:calc(100vh - 45px)}}@media(min-width:64rem){.layoutBodyWithSidebar{min-height:calc(100vh - 54px)}}@media(min-width:80rem){.layoutBodyWithSidebar{min-height:calc(100vh - 62px)}}@media(min-width:96rem){.layoutBodyWithSidebar{min-height:calc(100vh - 65px)}}@media(min-width:120rem){.layoutBodyWithSidebar{min-height:calc(100vh - 72px)}}@media(min-width:160rem){.layoutBodyWithSidebar{min-height:calc(100vh - 75px)}}.layoutBodyWithoutSidebar{right:calc(var(--spacing)*0);left:calc(var(--spacing)*0);padding-inline-start:calc(var(--spacing)*6);padding-inline-end:calc(var(--spacing)*6);padding-top:calc(var(--spacing)*3);padding-bottom:calc(var(--spacing)*4);flex:1;top:72px}@media(min-width:48rem){.layoutBodyWithoutSidebar{top:45px}}@media(min-width:64rem){.layoutBodyWithoutSidebar{top:54px}}@media(min-width:80rem){.layoutBodyWithoutSidebar{top:62px}}@media(min-width:96rem){.layoutBodyWithoutSidebar{top:65px}}@media(min-width:120rem){.layoutBodyWithoutSidebar{top:72px}}@media(min-width:160rem){.layoutBodyWithoutSidebar{top:75px}}.inputWrapper{align-items:center;width:100%;display:flex;position:relative}.input{appearance:none;border-style:var(--tw-border-style);border-width:1.5px;border-color:var(--color-gray-200);color:#21294c;border-radius:.25rem;flex-grow:1;width:100%}.input::placeholder{color:#666}.input:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-outline-style:none;box-shadow:none;outline-style:none}.input:focus:disabled{cursor:not-allowed;background-color:#666}.leftIcon{left:calc(var(--spacing)*3);color:#21294c;position:absolute}.leftIcon+.input{padding-left:calc(var(--spacing)*10)}.rightIcon{right:calc(var(--spacing)*3);color:#21294c;position:absolute}.rightIcon+.input{padding-right:calc(var(--spacing)*10)}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}',TM="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12%2022C17.5228%2022%2022%2017.5228%2022%2012C22%206.47715%2017.5228%202%2012%202C6.47715%202%202%206.47715%202%2012C2%2013.5997%202.37562%2015.1116%203.04346%2016.4525C3.22094%2016.8088%203.28001%2017.2161%203.17712%2017.6006L2.58151%2019.8267C2.32295%2020.793%203.20701%2021.677%204.17335%2021.4185L6.39939%2020.8229C6.78393%2020.72%207.19121%2020.7791%207.54753%2020.9565C8.88837%2021.6244%2010.4003%2022%2012%2022Z'%20fill='%23262D7B'/%3e%3c/svg%3e",el=x.createContext({});function nl(e){const t=x.useRef(null);return t.current===null&&(t.current=e()),t.current}const rl=typeof window<"u",hd=rl?x.useLayoutEffect:x.useEffect,eo=x.createContext(null);function il(e,t){e.indexOf(t)===-1&&e.push(t)}function sl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const fr=(e,t,n)=>n>t?t:n<e?e:n;function ol(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}var EM={env:{}};let gi=()=>{},dr=()=>{};EM.env.NODE_ENV!=="production"&&(gi=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(ol(t,n))},dr=(e,t,n)=>{if(!e)throw new Error(ol(t,n))});const hr={},pd=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function gd(e){return typeof e=="object"&&e!==null}const md=e=>/^0[^.\s]+$/u.test(e);function al(e){let t;return()=>(t===void 0&&(t=e()),t)}const Dn=e=>e,AM=(e,t)=>n=>t(e(n)),ts=(...e)=>e.reduce(AM),es=(e,t,n)=>{const i=t-e;return i===0?1:(n-e)/i};class ll{constructor(){this.subscriptions=[]}add(t){return il(this.subscriptions,t),()=>sl(this.subscriptions,t)}notify(t,n,i){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,i);else for(let l=0;l<o;l++){const u=this.subscriptions[l];u&&u(t,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const _n=e=>e*1e3,In=e=>e/1e3;function yd(e,t){return t?e*(1e3/t):0}const vd=new Set;function ul(e,t,n){e||vd.has(t)||(console.warn(ol(t,n)),vd.add(t))}const Md=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,bM=1e-7,SM=12;function NM(e,t,n,i,o){let l,u,c=0;do u=t+(n-t)/2,l=Md(u,i,o)-e,l>0?n=u:t=u;while(Math.abs(l)>bM&&++c<SM);return u}function ns(e,t,n,i){if(e===t&&n===i)return Dn;const o=l=>NM(l,0,1,e,n);return l=>l===0||l===1?l:Md(o(l),t,i)}const wd=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,xd=e=>t=>1-e(1-t),Td=ns(.33,1.53,.69,.99),cl=xd(Td),Ed=wd(cl),Ad=e=>(e*=2)<1?.5*cl(e):.5*(2-Math.pow(2,-10*(e-1))),fl=e=>1-Math.sin(Math.acos(e)),bd=xd(fl),Sd=wd(fl),DM=ns(.42,0,1,1),IM=ns(0,0,.58,1),Nd=ns(.42,0,.58,1),CM=e=>Array.isArray(e)&&typeof e[0]!="number",Dd=e=>Array.isArray(e)&&typeof e[0]=="number",Id={linear:Dn,easeIn:DM,easeInOut:Nd,easeOut:IM,circIn:fl,circInOut:Sd,circOut:bd,backIn:cl,backInOut:Ed,backOut:Td,anticipate:Ad},zM=e=>typeof e=="string",Cd=e=>{if(Dd(e)){dr(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,i,o]=e;return ns(t,n,i,o)}else if(zM(e))return dr(Id[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Id[e];return e},no=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function kM(e,t){let n=new Set,i=new Set,o=!1,l=!1;const u=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1};function d(p){u.has(p)&&(h.schedule(p),e()),p(c)}const h={schedule:(p,m=!1,w=!1)=>{const S=w&&o?n:i;return m&&u.add(p),S.has(p)||S.add(p),p},cancel:p=>{i.delete(p),u.delete(p)},process:p=>{if(c=p,o){l=!0;return}o=!0,[n,i]=[i,n],n.forEach(d),n.clear(),o=!1,l&&(l=!1,h.process(p))}};return h}const OM=40;function zd(e,t){let n=!1,i=!0;const o={delta:0,timestamp:0,isProcessing:!1},l=()=>n=!0,u=no.reduce((z,Z)=>(z[Z]=kM(l),z),{}),{setup:c,read:d,resolveKeyframes:h,preUpdate:p,update:m,preRender:w,render:v,postRender:S}=u,A=()=>{const z=hr.useManualTiming?o.timestamp:performance.now();n=!1,hr.useManualTiming||(o.delta=i?1e3/60:Math.max(Math.min(z-o.timestamp,OM),1)),o.timestamp=z,o.isProcessing=!0,c.process(o),d.process(o),h.process(o),p.process(o),m.process(o),w.process(o),v.process(o),S.process(o),o.isProcessing=!1,n&&t&&(i=!1,e(A))},P=()=>{n=!0,i=!0,o.isProcessing||e(A)};return{schedule:no.reduce((z,Z)=>{const Q=u[Z];return z[Z]=(J,G=!1,K=!1)=>(n||P(),Q.schedule(J,G,K)),z},{}),cancel:z=>{for(let Z=0;Z<no.length;Z++)u[no[Z]].cancel(z)},state:o,steps:u}}const{schedule:Te,cancel:Sr,state:Ke,steps:dl}=zd(typeof requestAnimationFrame<"u"?requestAnimationFrame:Dn,!0);let ro;function LM(){ro=void 0}const dn={now:()=>(ro===void 0&&dn.set(Ke.isProcessing||hr.useManualTiming?Ke.timestamp:performance.now()),ro),set:e=>{ro=e,queueMicrotask(LM)}},kd=e=>t=>typeof t=="string"&&t.startsWith(e),hl=kd("--"),jM=kd("var(--"),pl=e=>jM(e)?RM.test(e.split("/*")[0].trim()):!1,RM=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,mi={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},rs={...mi,transform:e=>fr(0,1,e)},io={...mi,default:1},is=e=>Math.round(e*1e5)/1e5,gl=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function UM(e){return e==null}const VM=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ml=(e,t)=>n=>!!(typeof n=="string"&&VM.test(n)&&n.startsWith(e)||t&&!UM(n)&&Object.prototype.hasOwnProperty.call(n,t)),Od=(e,t,n)=>i=>{if(typeof i!="string")return i;const[o,l,u,c]=i.match(gl);return{[e]:parseFloat(o),[t]:parseFloat(l),[n]:parseFloat(u),alpha:c!==void 0?parseFloat(c):1}},PM=e=>fr(0,255,e),yl={...mi,transform:e=>Math.round(PM(e))},qr={test:ml("rgb","red"),parse:Od("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+yl.transform(e)+", "+yl.transform(t)+", "+yl.transform(n)+", "+is(rs.transform(i))+")"};function QM(e){let t="",n="",i="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,i+=i,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:o?parseInt(o,16)/255:1}}const vl={test:ml("#"),parse:QM,transform:qr.transform},ss=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Nr=ss("deg"),rr=ss("%"),Dt=ss("px"),FM=ss("vh"),BM=ss("vw"),Ld={...rr,parse:e=>rr.parse(e)/100,transform:e=>rr.transform(e*100)},yi={test:ml("hsl","hue"),parse:Od("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+rr.transform(is(t))+", "+rr.transform(is(n))+", "+is(rs.transform(i))+")"},Pe={test:e=>qr.test(e)||vl.test(e)||yi.test(e),parse:e=>qr.test(e)?qr.parse(e):yi.test(e)?yi.parse(e):vl.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?qr.transform(e):yi.transform(e),getAnimatableNone:e=>{const t=Pe.parse(e);return t.alpha=0,Pe.transform(t)}},YM=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function WM(e){return isNaN(e)&&typeof e=="string"&&(e.match(gl)?.length||0)+(e.match(YM)?.length||0)>0}const jd="number",Rd="color",qM="var",_M="var(",Ud="${}",KM=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function os(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},o=[];let l=0;const c=t.replace(KM,d=>(Pe.test(d)?(i.color.push(l),o.push(Rd),n.push(Pe.parse(d))):d.startsWith(_M)?(i.var.push(l),o.push(qM),n.push(d)):(i.number.push(l),o.push(jd),n.push(parseFloat(d))),++l,Ud)).split(Ud);return{values:n,split:c,indexes:i,types:o}}function Vd(e){return os(e).values}function Pd(e){const{split:t,types:n}=os(e),i=t.length;return o=>{let l="";for(let u=0;u<i;u++)if(l+=t[u],o[u]!==void 0){const c=n[u];c===jd?l+=is(o[u]):c===Rd?l+=Pe.transform(o[u]):l+=o[u]}return l}}const HM=e=>typeof e=="number"?0:Pe.test(e)?Pe.getAnimatableNone(e):e;function JM(e){const t=Vd(e);return Pd(e)(t.map(HM))}const Dr={test:WM,parse:Vd,createTransformer:Pd,getAnimatableNone:JM};function Ml(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<.16666666666666666?e+(t-e)*6*n:n<.5?t:n<.6666666666666666?e+(t-e)*(.6666666666666666-n)*6:e}function GM({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let o=0,l=0,u=0;if(!t)o=l=u=n;else{const c=n<.5?n*(1+t):n+t-n*t,d=2*n-c;o=Ml(d,c,e+.3333333333333333),l=Ml(d,c,e),u=Ml(d,c,e-.3333333333333333)}return{red:Math.round(o*255),green:Math.round(l*255),blue:Math.round(u*255),alpha:i}}function so(e,t){return n=>n>0?t:e}const be=(e,t,n)=>e+(t-e)*n,wl=(e,t,n)=>{const i=e*e,o=n*(t*t-i)+i;return o<0?0:Math.sqrt(o)},ZM=[vl,qr,yi],XM=e=>ZM.find(t=>t.test(e));function Qd(e){const t=XM(e);if(gi(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===yi&&(n=GM(n)),n}const Fd=(e,t)=>{const n=Qd(e),i=Qd(t);if(!n||!i)return so(e,t);const o={...n};return l=>(o.red=wl(n.red,i.red,l),o.green=wl(n.green,i.green,l),o.blue=wl(n.blue,i.blue,l),o.alpha=be(n.alpha,i.alpha,l),qr.transform(o))},xl=new Set(["none","hidden"]);function $M(e,t){return xl.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function tw(e,t){return n=>be(e,t,n)}function Tl(e){return typeof e=="number"?tw:typeof e=="string"?pl(e)?so:Pe.test(e)?Fd:rw:Array.isArray(e)?Bd:typeof e=="object"?Pe.test(e)?Fd:ew:so}function Bd(e,t){const n=[...e],i=n.length,o=e.map((l,u)=>Tl(l)(l,t[u]));return l=>{for(let u=0;u<i;u++)n[u]=o[u](l);return n}}function ew(e,t){const n={...e,...t},i={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(i[o]=Tl(e[o])(e[o],t[o]));return o=>{for(const l in i)n[l]=i[l](o);return n}}function nw(e,t){const n=[],i={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const l=t.types[o],u=e.indexes[l][i[l]],c=e.values[u]??0;n[o]=c,i[l]++}return n}const rw=(e,t)=>{const n=Dr.createTransformer(t),i=os(e),o=os(t);return i.indexes.var.length===o.indexes.var.length&&i.indexes.color.length===o.indexes.color.length&&i.indexes.number.length>=o.indexes.number.length?xl.has(e)&&!o.values.length||xl.has(t)&&!i.values.length?$M(e,t):ts(Bd(nw(i,o),o.values),n):(gi(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),so(e,t))};function Yd(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?be(e,t,n):Tl(e)(e,t)}const iw=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Te.update(t,n),stop:()=>Sr(t),now:()=>Ke.isProcessing?Ke.timestamp:dn.now()}},Wd=(e,t,n=10)=>{let i="";const o=Math.max(Math.round(t/n),2);for(let l=0;l<o;l++)i+=Math.round(e(l/(o-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},oo=2e4;function El(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t<oo;)t+=n,i=e.next(t);return t>=oo?1/0:t}function sw(e,t=100,n){const i=n({...e,keyframes:[0,t]}),o=Math.min(El(i),oo);return{type:"keyframes",ease:l=>i.next(o*l).value/t,duration:In(o)}}const ow=5;function qd(e,t,n){const i=Math.max(t-ow,0);return yd(n-e(i),t-i)}const Se={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Al=.001;function aw({duration:e=Se.duration,bounce:t=Se.bounce,velocity:n=Se.velocity,mass:i=Se.mass}){let o,l;gi(e<=_n(Se.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let u=1-t;u=fr(Se.minDamping,Se.maxDamping,u),e=fr(Se.minDuration,Se.maxDuration,In(e)),u<1?(o=h=>{const p=h*u,m=p*e,w=p-n,v=bl(h,u),S=Math.exp(-m);return Al-w/v*S},l=h=>{const m=h*u*e,w=m*n+n,v=Math.pow(u,2)*Math.pow(h,2)*e,S=Math.exp(-m),A=bl(Math.pow(h,2),u);return(-o(h)+Al>0?-1:1)*((w-v)*S)/A}):(o=h=>{const p=Math.exp(-h*e),m=(h-n)*e+1;return-Al+p*m},l=h=>{const p=Math.exp(-h*e),m=(n-h)*(e*e);return p*m});const c=5/e,d=uw(o,l,c);if(e=_n(e),isNaN(d))return{stiffness:Se.stiffness,damping:Se.damping,duration:e};{const h=Math.pow(d,2)*i;return{stiffness:h,damping:u*2*Math.sqrt(i*h),duration:e}}}const lw=12;function uw(e,t,n){let i=n;for(let o=1;o<lw;o++)i=i-e(i)/t(i);return i}function bl(e,t){return e*Math.sqrt(1-t*t)}const cw=["duration","bounce"],fw=["stiffness","damping","mass"];function _d(e,t){return t.some(n=>e[n]!==void 0)}function dw(e){let t={velocity:Se.velocity,stiffness:Se.stiffness,damping:Se.damping,mass:Se.mass,isResolvedFromDuration:!1,...e};if(!_d(e,fw)&&_d(e,cw))if(e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),o=i*i,l=2*fr(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Se.mass,stiffness:o,damping:l}}else{const n=aw(e);t={...t,...n,mass:Se.mass},t.isResolvedFromDuration=!0}return t}function ao(e=Se.visualDuration,t=Se.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:o}=n;const l=n.keyframes[0],u=n.keyframes[n.keyframes.length-1],c={done:!1,value:l},{stiffness:d,damping:h,mass:p,duration:m,velocity:w,isResolvedFromDuration:v}=dw({...n,velocity:-In(n.velocity||0)}),S=w||0,A=h/(2*Math.sqrt(d*p)),P=u-l,j=In(Math.sqrt(d/p)),L=Math.abs(P)<5;i||(i=L?Se.restSpeed.granular:Se.restSpeed.default),o||(o=L?Se.restDelta.granular:Se.restDelta.default);let z;if(A<1){const Q=bl(j,A);z=J=>{const G=Math.exp(-A*j*J);return u-G*((S+A*j*P)/Q*Math.sin(Q*J)+P*Math.cos(Q*J))}}else if(A===1)z=Q=>u-Math.exp(-j*Q)*(P+(S+j*P)*Q);else{const Q=j*Math.sqrt(A*A-1);z=J=>{const G=Math.exp(-A*j*J),K=Math.min(Q*J,300);return u-G*((S+A*j*P)*Math.sinh(K)+Q*P*Math.cosh(K))/Q}}const Z={calculatedDuration:v&&m||null,next:Q=>{const J=z(Q);if(v)c.done=Q>=m;else{let G=Q===0?S:0;A<1&&(G=Q===0?_n(S):qd(z,Q,J));const K=Math.abs(G)<=i,vt=Math.abs(u-J)<=o;c.done=K&&vt}return c.value=c.done?u:J,c},toString:()=>{const Q=Math.min(El(Z),oo),J=Wd(G=>Z.next(Q*G).value,Q,30);return Q+"ms "+J},toTransition:()=>{}};return Z}ao.applyToOptions=e=>{const t=sw(e,100,ao);return e.ease=t.ease,e.duration=_n(t.duration),e.type="keyframes",e};function Sl({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:o=10,bounceStiffness:l=500,modifyTarget:u,min:c,max:d,restDelta:h=.5,restSpeed:p}){const m=e[0],w={done:!1,value:m},v=K=>c!==void 0&&K<c||d!==void 0&&K>d,S=K=>c===void 0?d:d===void 0||Math.abs(c-K)<Math.abs(d-K)?c:d;let A=n*t;const P=m+A,j=u===void 0?P:u(P);j!==P&&(A=j-m);const L=K=>-A*Math.exp(-K/i),z=K=>j+L(K),Z=K=>{const vt=L(K),ft=z(K);w.done=Math.abs(vt)<=h,w.value=w.done?j:ft};let Q,J;const G=K=>{v(w.value)&&(Q=K,J=ao({keyframes:[w.value,S(w.value)],velocity:qd(z,K,w.value),damping:o,stiffness:l,restDelta:h,restSpeed:p}))};return G(0),{calculatedDuration:null,next:K=>{let vt=!1;return!J&&Q===void 0&&(vt=!0,Z(K),G(K)),Q!==void 0&&K>=Q?J.next(K-Q):(!vt&&Z(K),w)}}}function hw(e,t,n){const i=[],o=n||hr.mix||Yd,l=e.length-1;for(let u=0;u<l;u++){let c=o(e[u],e[u+1]);if(t){const d=Array.isArray(t)?t[u]||Dn:t;c=ts(d,c)}i.push(c)}return i}function pw(e,t,{clamp:n=!0,ease:i,mixer:o}={}){const l=e.length;if(dr(l===t.length,"Both input and output ranges must be the same length","range-length"),l===1)return()=>t[0];if(l===2&&t[0]===t[1])return()=>t[1];const u=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),t=[...t].reverse());const c=hw(t,i,o),d=c.length,h=p=>{if(u&&p<e[0])return t[0];let m=0;if(d>1)for(;m<e.length-2&&!(p<e[m+1]);m++);const w=es(e[m],e[m+1],p);return c[m](w)};return n?p=>h(fr(e[0],e[l-1],p)):h}function gw(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const o=es(0,t,i);e.push(be(n,1,o))}}function mw(e){const t=[0];return gw(t,e.length-1),t}function yw(e,t){return e.map(n=>n*t)}function vw(e,t){return e.map(()=>t||Nd).splice(0,e.length-1)}function vi({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const o=CM(i)?i.map(Cd):Cd(i),l={done:!1,value:t[0]},u=yw(n&&n.length===t.length?n:mw(t),e),c=pw(u,t,{ease:Array.isArray(o)?o:vw(t,o)});return{calculatedDuration:e,next:d=>(l.value=c(d),l.done=d>=e,l)}}const Mw=e=>e!==null;function Nl(e,{repeat:t,repeatType:n="loop"},i,o=1){const l=e.filter(Mw),c=o<0||t&&n!=="loop"&&t%2===1?0:l.length-1;return!c||i===void 0?l[c]:i}const ww={decay:Sl,inertia:Sl,tween:vi,keyframes:vi,spring:ao};function Kd(e){typeof e.type=="string"&&(e.type=ww[e.type])}class Dl{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}var xw={env:{}};const Tw=e=>e/100;class Il extends Dl{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==dn.now()&&this.tick(dn.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Kd(t);const{type:n=vi,repeat:i=0,repeatDelay:o=0,repeatType:l,velocity:u=0}=t;let{keyframes:c}=t;const d=n||vi;xw.env.NODE_ENV!=="production"&&d!==vi&&dr(c.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${c}`,"spring-two-frames"),d!==vi&&typeof c[0]!="number"&&(this.mixKeyframes=ts(Tw,Yd(c[0],c[1])),c=[0,100]);const h=d({...t,keyframes:c});l==="mirror"&&(this.mirroredGenerator=d({...t,keyframes:[...c].reverse(),velocity:-u})),h.calculatedDuration===null&&(h.calculatedDuration=El(h));const{calculatedDuration:p}=h;this.calculatedDuration=p,this.resolvedDuration=p+o,this.totalDuration=this.resolvedDuration*(i+1)-o,this.generator=h}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:i,totalDuration:o,mixKeyframes:l,mirroredGenerator:u,resolvedDuration:c,calculatedDuration:d}=this;if(this.startTime===null)return i.next(0);const{delay:h=0,keyframes:p,repeat:m,repeatType:w,repeatDelay:v,type:S,onUpdate:A,finalKeyframe:P}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const j=this.currentTime-h*(this.playbackSpeed>=0?1:-1),L=this.playbackSpeed>=0?j<0:j>o;this.currentTime=Math.max(j,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let z=this.currentTime,Z=i;if(m){const K=Math.min(this.currentTime,o)/c;let vt=Math.floor(K),ft=K%1;!ft&&K>=1&&(ft=1),ft===1&&vt--,vt=Math.min(vt,m+1),!!(vt%2)&&(w==="reverse"?(ft=1-ft,v&&(ft-=v/c)):w==="mirror"&&(Z=u)),z=fr(0,1,ft)*c}const Q=L?{done:!1,value:p[0]}:Z.next(z);l&&(Q.value=l(Q.value));let{done:J}=Q;!L&&d!==null&&(J=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const G=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&J);return G&&S!==Sl&&(Q.value=Nl(p,this.options,P,this.speed)),A&&A(Q.value),G&&this.finish(),Q}then(t,n){return this.finished.then(t,n)}get duration(){return In(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+In(t)}get time(){return In(this.currentTime)}set time(t){t=_n(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(dn.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=In(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=iw,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(dn.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Ew(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const _r=e=>e*180/Math.PI,Cl=e=>{const t=_r(Math.atan2(e[1],e[0]));return zl(t)},Aw={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Cl,rotateZ:Cl,skewX:e=>_r(Math.atan(e[1])),skewY:e=>_r(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},zl=e=>(e=e%360,e<0&&(e+=360),e),Hd=Cl,Jd=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Gd=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),bw={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Jd,scaleY:Gd,scale:e=>(Jd(e)+Gd(e))/2,rotateX:e=>zl(_r(Math.atan2(e[6],e[5]))),rotateY:e=>zl(_r(Math.atan2(-e[2],e[0]))),rotateZ:Hd,rotate:Hd,skewX:e=>_r(Math.atan(e[4])),skewY:e=>_r(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function kl(e){return e.includes("scale")?1:0}function Ol(e,t){if(!e||e==="none")return kl(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,o;if(n)i=bw,o=n;else{const c=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Aw,o=c}if(!o)return kl(t);const l=i[t],u=o[1].split(",").map(Nw);return typeof l=="function"?l(u):u[l]}const Sw=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Ol(n,t)};function Nw(e){return parseFloat(e.trim())}const Mi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],wi=new Set(Mi),Zd=e=>e===mi||e===Dt,Dw=new Set(["x","y","z"]),Iw=Mi.filter(e=>!Dw.has(e));function Cw(e){const t=[];return Iw.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const Kr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Ol(t,"x"),y:(e,{transform:t})=>Ol(t,"y")};Kr.translateX=Kr.x,Kr.translateY=Kr.y;const Hr=new Set;let Ll=!1,jl=!1,Rl=!1;function Xd(){if(jl){const e=Array.from(Hr).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const o=Cw(i);o.length&&(n.set(i,o),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const o=n.get(i);o&&o.forEach(([l,u])=>{i.getValue(l)?.set(u)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}jl=!1,Ll=!1,Hr.forEach(e=>e.complete(Rl)),Hr.clear()}function $d(){Hr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(jl=!0)})}function zw(){Rl=!0,$d(),Xd(),Rl=!1}class Ul{constructor(t,n,i,o,l,u=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=o,this.element=l,this.isAsync=u}scheduleResolve(){this.state="scheduled",this.isAsync?(Hr.add(this),Ll||(Ll=!0,Te.read($d),Te.resolveKeyframes(Xd))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:o}=this;if(t[0]===null){const l=o?.get(),u=t[t.length-1];if(l!==void 0)t[0]=l;else if(i&&n){const c=i.readValue(n,u);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=u),o&&l===void 0&&o.set(t[0])}Ew(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Hr.delete(this)}cancel(){this.state==="scheduled"&&(Hr.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const kw=e=>e.startsWith("--");function Ow(e,t,n){kw(t)?e.style.setProperty(t,n):e.style[t]=n}const Lw=al(()=>window.ScrollTimeline!==void 0),jw={};function Rw(e,t){const n=al(e);return()=>jw[t]??n()}const th=Rw(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),as=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,eh={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:as([0,.65,.55,1]),circOut:as([.55,0,1,.45]),backIn:as([.31,.01,.66,-.59]),backOut:as([.33,1.53,.69,.99])};function nh(e,t){if(e)return typeof e=="function"?th()?Wd(e,t):"ease-out":Dd(e)?as(e):Array.isArray(e)?e.map(n=>nh(n,t)||eh.easeOut):eh[e]}function Uw(e,t,n,{delay:i=0,duration:o=300,repeat:l=0,repeatType:u="loop",ease:c="easeOut",times:d}={},h=void 0){const p={[t]:n};d&&(p.offset=d);const m=nh(c,o);Array.isArray(m)&&(p.easing=m);const w={delay:i,duration:o,easing:Array.isArray(m)?"linear":m,fill:"both",iterations:l+1,direction:u==="reverse"?"alternate":"normal"};return h&&(w.pseudoElement=h),e.animate(p,w)}function rh(e){return typeof e=="function"&&"applyToOptions"in e}function Vw({type:e,...t}){return rh(e)&&th()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Pw extends Dl{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:i,keyframes:o,pseudoElement:l,allowFlatten:u=!1,finalKeyframe:c,onComplete:d}=t;this.isPseudoElement=!!l,this.allowFlatten=u,this.options=t,dr(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const h=Vw(t);this.animation=Uw(n,i,o,h,l),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!l){const p=Nl(o,this.options,c,this.speed);this.updateMotionValue?this.updateMotionValue(p):Ow(n,i,p),this.animation.cancel()}d?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return In(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+In(t)}get time(){return In(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=_n(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Lw()?(this.animation.timeline=t,Dn):n(this)}}const ih={anticipate:Ad,backInOut:Ed,circInOut:Sd};function Qw(e){return e in ih}function Fw(e){typeof e.ease=="string"&&Qw(e.ease)&&(e.ease=ih[e.ease])}const sh=10;class Bw extends Pw{constructor(t){Fw(t),Kd(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:o,element:l,...u}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const c=new Il({...u,autoplay:!1}),d=_n(this.finishedTime??this.time);n.setWithVelocity(c.sample(d-sh).value,c.sample(d).value,sh),c.stop()}}const oh=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Dr.test(e)||e==="0")&&!e.startsWith("url("));function Yw(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Ww(e,t,n,i){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const l=e[e.length-1],u=oh(o,t),c=oh(l,t);return gi(u===c,`You are trying to animate ${t} from "${o}" to "${l}". "${u?l:o}" is not an animatable value.`,"value-not-animatable"),!u||!c?!1:Yw(e)||(n==="spring"||rh(n))&&i}function Vl(e){e.duration=0,e.type="keyframes"}const qw=new Set(["opacity","clipPath","filter","transform"]),_w=al(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Kw(e){const{motionValue:t,name:n,repeatDelay:i,repeatType:o,damping:l,type:u}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:h}=t.owner.getProps();return _w()&&n&&qw.has(n)&&(n!=="transform"||!h)&&!d&&!i&&o!=="mirror"&&l!==0&&u!=="inertia"}const Hw=40;class Jw extends Dl{constructor({autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:o=0,repeatDelay:l=0,repeatType:u="loop",keyframes:c,name:d,motionValue:h,element:p,...m}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=dn.now();const w={autoplay:t,delay:n,type:i,repeat:o,repeatDelay:l,repeatType:u,name:d,motionValue:h,element:p,...m},v=p?.KeyframeResolver||Ul;this.keyframeResolver=new v(c,(S,A,P)=>this.onKeyframesResolved(S,A,w,!P),d,h,p),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,i,o){this.keyframeResolver=void 0;const{name:l,type:u,velocity:c,delay:d,isHandoff:h,onUpdate:p}=i;this.resolvedAt=dn.now(),Ww(t,l,u,c)||((hr.instantAnimations||!d)&&p?.(Nl(t,i,n)),t[0]=t[t.length-1],Vl(i),i.repeat=0);const w={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>Hw?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},v=!h&&Kw(w)?new Bw({...w,element:w.motionValue.owner.current}):new Il(w);v.finished.then(()=>this.notifyFinished()).catch(Dn),this.pendingTimeline&&(this.stopTimeline=v.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=v}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),zw()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const Gw=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Zw(e){const t=Gw.exec(e);if(!t)return[,];const[,n,i,o]=t;return[`--${n??i}`,o]}const Xw=4;function ah(e,t,n=1){dr(n<=Xw,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,o]=Zw(e);if(!i)return;const l=window.getComputedStyle(t).getPropertyValue(i);if(l){const u=l.trim();return pd(u)?parseFloat(u):u}return pl(o)?ah(o,t,n+1):o}function Pl(e,t){return e?.[t]??e?.default??e}const lh=new Set(["width","height","top","left","right","bottom",...Mi]),$w={test:e=>e==="auto",parse:e=>e},uh=e=>t=>t.test(e),ch=[mi,Dt,rr,Nr,BM,FM,$w],fh=e=>ch.find(uh(e));function tx(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||md(e):!0}const ex=new Set(["brightness","contrast","saturate","opacity"]);function nx(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(gl)||[];if(!i)return e;const o=n.replace(i,"");let l=ex.has(t)?1:0;return i!==n&&(l*=100),t+"("+l+o+")"}const rx=/\b([a-z-]*)\(.*?\)/gu,Ql={...Dr,getAnimatableNone:e=>{const t=e.match(rx);return t?t.map(nx).join(" "):e}},dh={...mi,transform:Math.round},Fl={borderWidth:Dt,borderTopWidth:Dt,borderRightWidth:Dt,borderBottomWidth:Dt,borderLeftWidth:Dt,borderRadius:Dt,radius:Dt,borderTopLeftRadius:Dt,borderTopRightRadius:Dt,borderBottomRightRadius:Dt,borderBottomLeftRadius:Dt,width:Dt,maxWidth:Dt,height:Dt,maxHeight:Dt,top:Dt,right:Dt,bottom:Dt,left:Dt,padding:Dt,paddingTop:Dt,paddingRight:Dt,paddingBottom:Dt,paddingLeft:Dt,margin:Dt,marginTop:Dt,marginRight:Dt,marginBottom:Dt,marginLeft:Dt,backgroundPositionX:Dt,backgroundPositionY:Dt,...{rotate:Nr,rotateX:Nr,rotateY:Nr,rotateZ:Nr,scale:io,scaleX:io,scaleY:io,scaleZ:io,skew:Nr,skewX:Nr,skewY:Nr,distance:Dt,translateX:Dt,translateY:Dt,translateZ:Dt,x:Dt,y:Dt,z:Dt,perspective:Dt,transformPerspective:Dt,opacity:rs,originX:Ld,originY:Ld,originZ:Dt},zIndex:dh,fillOpacity:rs,strokeOpacity:rs,numOctaves:dh},ix={...Fl,color:Pe,backgroundColor:Pe,outlineColor:Pe,fill:Pe,stroke:Pe,borderColor:Pe,borderTopColor:Pe,borderRightColor:Pe,borderBottomColor:Pe,borderLeftColor:Pe,filter:Ql,WebkitFilter:Ql},hh=e=>ix[e];function ph(e,t){let n=hh(e);return n!==Ql&&(n=Dr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const sx=new Set(["auto","none","0"]);function ox(e,t,n){let i=0,o;for(;i<e.length&&!o;){const l=e[i];typeof l=="string"&&!sx.has(l)&&os(l).values.length&&(o=e[i]),i++}if(o&&n)for(const l of t)e[l]=ph(n,o)}class ax extends Ul{constructor(t,n,i,o,l){super(t,n,i,o,l,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let h=t[d];if(typeof h=="string"&&(h=h.trim(),pl(h))){const p=ah(h,n.current);p!==void 0&&(t[d]=p),d===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!lh.has(i)||t.length!==2)return;const[o,l]=t,u=fh(o),c=fh(l);if(u!==c)if(Zd(u)&&Zd(c))for(let d=0;d<t.length;d++){const h=t[d];typeof h=="string"&&(t[d]=parseFloat(h))}else Kr[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,i=[];for(let o=0;o<t.length;o++)(t[o]===null||tx(t[o]))&&i.push(o);i.length&&ox(t,i,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Kr[i](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(i,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const l=i.length-1,u=i[l];i[l]=Kr[n](t.measureViewportBox(),window.getComputedStyle(t.current)),u!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=u),this.removedTransforms?.length&&this.removedTransforms.forEach(([c,d])=>{t.getValue(c).set(d)}),this.resolveNoneKeyframes()}}function lx(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const o=n?.[e]??i.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}const gh=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function mh(e){return gd(e)&&"offsetHeight"in e}var ux={env:{}};const yh=30,cx=e=>!isNaN(parseFloat(e));class fx{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const o=dn.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=dn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=cx(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return ux.env.NODE_ENV!=="production"&&ul(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new ll);const i=this.events[t].add(n);return t==="change"?()=>{i(),Te.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=dn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>yh)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,yh);return yd(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function xi(e,t){return new fx(e,t)}const{schedule:Bl}=zd(queueMicrotask,!1),Kn={x:!1,y:!1};function vh(){return Kn.x||Kn.y}function dx(e){return e==="x"||e==="y"?Kn[e]?null:(Kn[e]=!0,()=>{Kn[e]=!1}):Kn.x||Kn.y?null:(Kn.x=Kn.y=!0,()=>{Kn.x=Kn.y=!1})}function Mh(e,t){const n=lx(e),i=new AbortController,o={passive:!0,...t,signal:i.signal};return[n,o,()=>i.abort()]}function wh(e){return!(e.pointerType==="touch"||vh())}function hx(e,t,n={}){const[i,o,l]=Mh(e,n),u=c=>{if(!wh(c))return;const{target:d}=c,h=t(d,c);if(typeof h!="function"||!d)return;const p=m=>{wh(m)&&(h(m),d.removeEventListener("pointerleave",p))};d.addEventListener("pointerleave",p,o)};return i.forEach(c=>{c.addEventListener("pointerenter",u,o)}),l}const xh=(e,t)=>t?e===t?!0:xh(e,t.parentElement):!1,Yl=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,px=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function gx(e){return px.has(e.tagName)||e.tabIndex!==-1}const lo=new WeakSet;function Th(e){return t=>{t.key==="Enter"&&e(t)}}function Wl(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const mx=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=Th(()=>{if(lo.has(n))return;Wl(n,"down");const o=Th(()=>{Wl(n,"up")}),l=()=>Wl(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",l,t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)};function Eh(e){return Yl(e)&&!vh()}function yx(e,t,n={}){const[i,o,l]=Mh(e,n),u=c=>{const d=c.currentTarget;if(!Eh(c))return;lo.add(d);const h=t(d,c),p=(v,S)=>{window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",w),lo.has(d)&&lo.delete(d),Eh(v)&&typeof h=="function"&&h(v,{success:S})},m=v=>{p(v,d===window||d===document||n.useGlobalTarget||xh(d,v.target))},w=v=>{p(v,!1)};window.addEventListener("pointerup",m,o),window.addEventListener("pointercancel",w,o)};return i.forEach(c=>{(n.useGlobalTarget?window:c).addEventListener("pointerdown",u,o),mh(c)&&(c.addEventListener("focus",h=>mx(h,o)),!gx(c)&&!c.hasAttribute("tabindex")&&(c.tabIndex=0))}),l}function Ah(e){return gd(e)&&"ownerSVGElement"in e}function vx(e){return Ah(e)&&e.tagName==="svg"}const tn=e=>!!(e&&e.getVelocity),Mx=[...ch,Pe,Dr],wx=e=>Mx.find(uh(e)),ql=x.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function bh(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function xx(...e){return t=>{let n=!1;const i=e.map(o=>{const l=bh(o,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let o=0;o<i.length;o++){const l=i[o];typeof l=="function"?l():bh(e[o],null)}}}}function Tx(...e){return Xs.useCallback(xx(...e),e)}class Ex extends Xs.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const i=n.offsetParent,o=mh(i)&&i.offsetWidth||0,l=this.props.sizeRef.current;l.height=n.offsetHeight||0,l.width=n.offsetWidth||0,l.top=n.offsetTop,l.left=n.offsetLeft,l.right=o-l.width-l.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Ax({children:e,isPresent:t,anchorX:n,root:i}){const o=x.useId(),l=x.useRef(null),u=x.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:c}=x.useContext(ql),d=Tx(l,e?.ref);return x.useInsertionEffect(()=>{const{width:h,height:p,top:m,left:w,right:v}=u.current;if(t||!l.current||!h||!p)return;const S=n==="left"?`left: ${w}`:`right: ${v}`;l.current.dataset.motionPopId=o;const A=document.createElement("style");c&&(A.nonce=c);const P=i??document.head;return P.appendChild(A),A.sheet&&A.sheet.insertRule(`
15
15
  [data-motion-pop-id="${o}"] {
16
16
  position: absolute !important;
17
17
  width: ${h}px !important;
@@ -32,9 +32,9 @@ Recoil Snapshots only last for the duration of the callback they are provided to
32
32
  }
33
33
 
34
34
  This is currently a DEV-only warning but will become a thrown exception in the next release of Recoil.
35
- `;class Io{constructor(t,n){Pt(this,"_store",void 0),Pt(this,"_refCount",1),Pt(this,"getLoadable",i=>(this.checkRefCount_INTERNAL(),jS(this._store,i))),Pt(this,"getPromise",i=>(this.checkRefCount_INTERNAL(),this.getLoadable(i).toPromise())),Pt(this,"getNodes_UNSTABLE",i=>{if(this.checkRefCount_INTERNAL(),i?.isModified===!0){if(i?.isInitialized===!1)return[];const u=this._store.getState().currentTree;return Fg(u.dirtyAtoms)}const o=this._store.getState().knownAtoms,l=this._store.getState().knownSelectors;return i?.isInitialized==null?Qg.values():i.isInitialized===!0?Fg(Vg([o,l])):Ou(Qg.values(),({key:u})=>!o.has(u)&&!l.has(u))}),Pt(this,"getInfo_UNSTABLE",({key:i})=>(this.checkRefCount_INTERNAL(),CS(this._store,this._store.getState().currentTree,i))),Pt(this,"map",i=>{this.checkRefCount_INTERNAL();const o=new Pu(this,Vu);return i(o),o}),Pt(this,"asyncMap",async i=>{this.checkRefCount_INTERNAL();const o=new Pu(this,Vu);return o.retain(),await i(o),o.autoRelease_INTERNAL(),o}),this._store={storeID:kS(),parentStoreID:n,getState:()=>t,replaceState:i=>{t.currentTree=i(t.currentTree)},getGraph:i=>{const o=t.graphsByVersion;if(o.has(i))return Ee(o.get(i));const l=zS();return o.set(i,l),l},subscribeToTransactions:()=>({release:()=>{}}),addTransactionMetadata:()=>{throw Ot("Cannot subscribe to Snapshots")}};for(const i of this._store.getState().knownAtoms)IS(this._store,i,"get"),Do(this._store,i,1);this.autoRelease_INTERNAL()}retain(){if(this._refCount<=0){if(se.env.NODE_ENV!=="production")throw Ot("Snapshot has already been released.");en("Attempt to retain() Snapshot that was already released.")}this._refCount++;let t=!1;return()=>{t||(t=!0,this._release())}}autoRelease_INTERNAL(){QS||window.setTimeout(()=>this._release(),10)}_release(){if(this._refCount--,this._refCount===0){if(this._store.getState().nodeCleanupFunctions.forEach(t=>t()),this._store.getState().nodeCleanupFunctions.clear(),!ye("recoil_memory_managament_2020"))return}else this._refCount<0&&se.env.NODE_ENV!=="production"&&en("Snapshot released an extra time.")}isRetained(){return this._refCount>0}checkRefCount_INTERNAL(){ye("recoil_memory_managament_2020")&&this._refCount<=0&&se.env.NODE_ENV!=="production"&&en(BS)}getStore_INTERNAL(){return this.checkRefCount_INTERNAL(),this._store}getID(){return this.checkRefCount_INTERNAL(),this._store.getState().currentTree.stateID}getStoreID(){return this.checkRefCount_INTERNAL(),this._store.storeID}}function Yg(e,t,n=!1){const i=e.getState(),o=n?VS():t.version;return{currentTree:{version:n?o:t.version,stateID:n?o:t.stateID,transactionMetadata:{...t.transactionMetadata},dirtyAtoms:new Set(t.dirtyAtoms),atomValues:t.atomValues.clone(),nonvalidatedAtoms:t.nonvalidatedAtoms.clone()},commitDepth:0,nextTree:null,previousTree:null,knownAtoms:new Set(i.knownAtoms),knownSelectors:new Set(i.knownSelectors),transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:new Map().set(o,e.getGraph(t.version)),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map(Eo(i.nodeCleanupFunctions.entries(),([l])=>[l,()=>{}]))}}function YS(e){const t=new Io(PS());return e!=null?t.map(e):t}const[Wg,qg]=FS((e,t)=>{var n;const i=e.getState(),o=t==="latest"?(n=i.nextTree)!==null&&n!==void 0?n:i.currentTree:Ee(i.previousTree);return new Io(Yg(e,o),e.storeID)},(e,t)=>{var n,i;return String(t)+String(e.storeID)+String((n=e.getState().nextTree)===null||n===void 0?void 0:n.version)+String(e.getState().currentTree.version)+String((i=e.getState().previousTree)===null||i===void 0?void 0:i.version)});US(qg);function WS(e,t="latest"){const n=Wg(e,t);return n.isRetained()?n:(qg(),Wg(e,t))}class Pu extends Io{constructor(t,n){super(Yg(t.getStore_INTERNAL(),t.getStore_INTERNAL().getState().currentTree,!0),t.getStoreID()),Pt(this,"_batch",void 0),Pt(this,"set",(i,o)=>{this.checkRefCount_INTERNAL();const l=this.getStore_INTERNAL();this._batch(()=>{Do(l,i.key,1),Bg(this.getStore_INTERNAL(),i,o)})}),Pt(this,"reset",i=>{this.checkRefCount_INTERNAL();const o=this.getStore_INTERNAL();this._batch(()=>{Do(o,i.key,1),Bg(this.getStore_INTERNAL(),i,OS)})}),Pt(this,"setUnvalidatedAtomValues_DEPRECATED",i=>{this.checkRefCount_INTERNAL();const o=this.getStore_INTERNAL();Vu(()=>{for(const[l,u]of i.entries())Do(o,l,1),RS(o,new LS(l),u)})}),this._batch=n}}var Co={Snapshot:Io,MutableSnapshot:Pu,freshSnapshot:YS,cloneSnapshot:WS},qS=Co.Snapshot,_S=Co.MutableSnapshot,KS=Co.freshSnapshot,HS=Co.cloneSnapshot,zo=Object.freeze({__proto__:null,Snapshot:qS,MutableSnapshot:_S,freshSnapshot:KS,cloneSnapshot:HS});function JS(...e){const t=new Set;for(const n of e)for(const i of n)t.add(i);return t}var GS=JS;const{useRef:ZS}=x;function XS(e){const t=ZS(e);return t.current===e&&typeof e=="function"&&(t.current=e()),t}var _g=XS;const{getNextTreeStateVersion:$S,makeEmptyStoreState:Kg}=Mg,{cleanUpNode:t1,getDownstreamNodes:e1,initializeNode:n1,setNodeValue:r1,setUnvalidatedAtomValue_DEPRECATED:i1}=ti,{graph:s1}=Ms,{cloneGraph:o1}=Ms,{getNextStoreID:Hg}=bo,{createMutableSource:Qu,reactMode:Jg}=bu,{applyAtomValueWrites:a1}=pr,{releaseScheduledRetainablesNow:Gg}=Ci,{freshSnapshot:l1}=zo,{useCallback:u1,useContext:Zg,useEffect:Fu,useMemo:c1,useRef:f1,useState:d1}=x;function Ts(){throw Ot("This component must be used inside a <RecoilRoot> component.")}const Xg=Object.freeze({storeID:Hg(),getState:Ts,replaceState:Ts,getGraph:Ts,subscribeToTransactions:Ts,addTransactionMetadata:Ts});let Bu=!1;function $g(e){if(Bu)throw Ot("An atom update was triggered within the execution of a state updater function. State updater functions provided to Recoil must be pure functions.");const t=e.getState();if(t.nextTree===null){ye("recoil_memory_managament_2020")&&ye("recoil_release_on_cascading_update_killswitch_2021")&&t.commitDepth>0&&Gg(e);const n=t.currentTree.version,i=$S();t.nextTree={...t.currentTree,version:i,stateID:i,dirtyAtoms:new Set,transactionMetadata:{}},t.graphsByVersion.set(i,o1(Ee(t.graphsByVersion.get(n))))}}const tm=x.createContext({current:Xg}),Yu=()=>Zg(tm),em=x.createContext(null);function h1(){const e=Zg(em);return e==null&&Nu("Attempted to use a Recoil hook outside of a <RecoilRoot>. <RecoilRoot> must be an ancestor of any component that uses Recoil hooks."),e}function nm(e,t,n){const i=e1(e,n,n.dirtyAtoms);for(const o of i){const l=t.nodeToComponentSubscriptions.get(o);if(l)for(const[u,[c,d]]of l)d(n)}}function p1(e){const t=e.getState(),n=t.currentTree,i=n.dirtyAtoms;if(i.size){for(const[o,l]of t.nodeTransactionSubscriptions)if(i.has(o))for(const[u,c]of l)c(e);for(const[o,l]of t.transactionSubscriptions)l(e);(!Jg().early||t.suspendedComponentResolvers.size>0)&&(nm(e,t,n),t.suspendedComponentResolvers.forEach(o=>o()),t.suspendedComponentResolvers.clear())}t.queuedComponentCallbacks_DEPRECATED.forEach(o=>o(n)),t.queuedComponentCallbacks_DEPRECATED.splice(0,t.queuedComponentCallbacks_DEPRECATED.length)}function g1(e){const t=e.getState();t.commitDepth++;try{const{nextTree:n}=t;if(n==null)return;t.previousTree=t.currentTree,t.currentTree=n,t.nextTree=null,p1(e),t.previousTree!=null?t.graphsByVersion.delete(t.previousTree.version):en("Ended batch with no previous state, which is unexpected","recoil"),t.previousTree=null,ye("recoil_memory_managament_2020")&&n==null&&Gg(e)}finally{t.commitDepth--}}function m1({setNotifyBatcherOfChange:e}){const t=Yu(),[,n]=d1([]);return e(()=>n({})),Fu(()=>(e(()=>n({})),()=>{e(()=>{})}),[e]),Fu(()=>{nb.enqueueExecution("Batcher",()=>{g1(t.current)})}),null}se.env.NODE_ENV!=="production"&&typeof window<"u"&&!window.$recoilDebugStates&&(window.$recoilDebugStates=[]);function y1(e,t){const n=Kg();return t({set:(i,o)=>{const l=n.currentTree,u=r1(e,l,i.key,o),c=new Set(u.keys()),d=l.nonvalidatedAtoms.clone();for(const h of c)d.delete(h);n.currentTree={...l,dirtyAtoms:GS(l.dirtyAtoms,c),atomValues:a1(l.atomValues,u),nonvalidatedAtoms:d}},setUnvalidatedAtomValues:i=>{i.forEach((o,l)=>{n.currentTree=i1(n.currentTree,l,o)})}}),n}function v1(e){const t=l1(e),n=t.getStore_INTERNAL().getState();return t.retain(),n.nodeCleanupFunctions.forEach(i=>i()),n.nodeCleanupFunctions.clear(),n}let rm=0;function M1({initializeState_DEPRECATED:e,initializeState:t,store_INTERNAL:n,children:i}){let o;const l=v=>{const S=o.current.graphsByVersion;if(S.has(v))return Ee(S.get(v));const A=s1();return S.set(v,A),A},u=(v,S)=>{if(S==null){const{transactionSubscriptions:A}=m.current.getState(),P=rm++;return A.set(P,v),{release:()=>{A.delete(P)}}}else{const{nodeTransactionSubscriptions:A}=m.current.getState();A.has(S)||A.set(S,new Map);const P=rm++;return Ee(A.get(S)).set(P,v),{release:()=>{const j=A.get(S);j&&(j.delete(P),j.size===0&&A.delete(S))}}}},c=v=>{$g(m.current);for(const S of Object.keys(v))Ee(m.current.getState().nextTree).transactionMetadata[S]=v[S]},d=v=>{$g(m.current);const S=Ee(o.current.nextTree);let A;try{Bu=!0,A=v(S)}finally{Bu=!1}A!==S&&(se.env.NODE_ENV!=="production"&&typeof window<"u"&&window.$recoilDebugStates.push(A),o.current.nextTree=A,Jg().early&&nm(m.current,o.current,A),Ee(h.current)())},h=f1(null),p=u1(v=>{h.current=v},[h]),m=_g(()=>n??{storeID:Hg(),getState:()=>o.current,replaceState:d,getGraph:l,subscribeToTransactions:u,addTransactionMetadata:c});n!=null&&(m.current=n),o=_g(()=>e!=null?y1(m.current,e):t!=null?v1(t):Kg());const w=c1(()=>Qu?.(o,()=>o.current.currentTree.version),[o]);return Fu(()=>{const v=m.current;for(const S of new Set(v.getState().knownAtoms))n1(v,S,"get");return()=>{for(const S of v.getState().knownAtoms)t1(v,S)}},[m]),x.createElement(tm.Provider,{value:m},x.createElement(em.Provider,{value:w},x.createElement(m1,{setNotifyBatcherOfChange:p}),i))}function w1(e){const{override:t,...n}=e,i=Yu();return t===!1&&i.current!==Xg?e.children:x.createElement(M1,n)}var Wu={RecoilRoot:w1,useStoreRef:Yu,useRecoilMutableSource:h1};function x1(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0,i=e.length;n<i;n++)if(e[n]!==t[n])return!1;return!0}var T1=x1;const{useEffect:E1,useRef:A1}=x;function b1(e){const t=A1();return E1(()=>{t.current=e}),t.current}var S1=b1;const{useStoreRef:N1}=Wu,{SUSPENSE_TIMEOUT_MS:D1}=Ci,{updateRetainCount:Es}=Ci,{RetentionZone:I1}=ku,{useEffect:C1,useRef:z1}=x,{isSSR:im}=No;function k1(e){if(ye("recoil_memory_managament_2020"))return O1(e)}function O1(e){const n=(Array.isArray(e)?e:[e]).map(u=>u instanceof I1?u:u.key),i=N1();C1(()=>{if(!ye("recoil_memory_managament_2020"))return;const u=i.current;if(o.current&&!im)window.clearTimeout(o.current),o.current=null;else for(const c of n)Es(u,c,1);return()=>{for(const c of n)Es(u,c,-1)}},[i,...n]);const o=z1(),l=S1(n);if(!im&&(l===void 0||!T1(l,n))){const u=i.current;for(const c of n)Es(u,c,1);if(l)for(const c of l)Es(u,c,-1);o.current&&window.clearTimeout(o.current),o.current=window.setTimeout(()=>{o.current=null;for(const c of n)Es(u,c,-1)},D1)}}var L1=k1;function j1(){return"<component name not available>"}var ko=j1;const{DEFAULT_VALUE:R1}=Mn,{currentRendererSupportsUseSyncExternalStore:U1,reactMode:As,useMutableSource:V1,useSyncExternalStore:P1}=bu,{useRecoilMutableSource:Q1,useStoreRef:ei}=Wu,{isRecoilValue:F1}=$r,{getRecoilValueAsLoadable:Oo,setRecoilValue:sm,subscribeToRecoilValue:Lo}=pr,{useCallback:kn,useEffect:jo,useMemo:B1,useRef:om,useState:am}=x,{isSSR:Y1}=No;function W1(e,t,n){if(e.state==="hasValue")return e.contents;throw e.state==="loading"?new Promise(o=>{const l=n.current.getState().suspendedComponentResolvers;l.add(o),Y1&&ge(e.contents)&&e.contents.finally(()=>{l.delete(o)})}):e.state==="hasError"?e.contents:Ot(`Invalid value of loadable atom "${t.key}"`)}function bs(e,t){if(!F1(e))throw Ot(`Invalid argument to ${t}: expected an atom or selector but got ${String(e)}`)}function q1(e){const t=ei(),n=ko(),i=kn(()=>{var c;se.env.NODE_ENV;const d=t.current,h=d.getState(),p=As().early&&(c=h.nextTree)!==null&&c!==void 0?c:h.currentTree;return{loadable:Oo(d,e,p),key:e.key}},[t,e]),o=kn(c=>{let d;return()=>{var h,p;const m=c();return(h=d)!==null&&h!==void 0&&h.loadable.is(m.loadable)&&((p=d)===null||p===void 0?void 0:p.key)===m.key?d:(d=m,m)}},[]),l=B1(()=>o(i),[i,o]),u=kn(c=>{const d=t.current;return Lo(d,e,c,n).release},[t,e,n]);return P1(u,l,l).loadable}function _1(e){const t=ei(),n=kn(()=>{var h;const p=t.current,m=p.getState(),w=As().early&&(h=m.nextTree)!==null&&h!==void 0?h:m.currentTree;return Oo(p,e,w)},[t,e]),i=kn(()=>(se.env.NODE_ENV,n()),[n]),o=ko(),l=kn((h,p)=>{const m=t.current;return Lo(m,e,()=>{if(!ye("recoil_suppress_rerender_in_callback"))return p();const v=n();d.current.is(v)||p(),d.current=v},o).release},[t,e,o,n]),u=Q1();if(u==null)throw Ot("Recoil hooks must be used in components contained within a <RecoilRoot> component.");const c=V1(u,i,l),d=om(c);return jo(()=>{d.current=c}),c}function lm(e){const t=ei(),n=ko(),i=kn(()=>{var d;se.env.NODE_ENV;const h=t.current,p=h.getState(),m=As().early&&(d=p.nextTree)!==null&&d!==void 0?d:p.currentTree;return Oo(h,e,m)},[t,e]),o=kn(()=>({loadable:i(),key:e.key}),[i,e.key]),l=kn(d=>{const h=o();return d.loadable.is(h.loadable)&&d.key===h.key?d:h},[o]);jo(()=>{const d=Lo(t.current,e,h=>{c(l)},n);return c(l),d.release},[n,e,t,l]);const[u,c]=am(o);return u.key!==e.key?o().loadable:u.loadable}function K1(e){const t=ei(),[,n]=am([]),i=ko(),o=kn(()=>{var c;se.env.NODE_ENV;const d=t.current,h=d.getState(),p=As().early&&(c=h.nextTree)!==null&&c!==void 0?c:h.currentTree;return Oo(d,e,p)},[t,e]),l=o(),u=om(l);return jo(()=>{u.current=l}),jo(()=>{const c=t.current,d=c.getState(),h=Lo(c,e,m=>{var w;if(!ye("recoil_suppress_rerender_in_callback"))return n([]);const v=o();(w=u.current)!==null&&w!==void 0&&w.is(v)||n(v),u.current=v},i);if(d.nextTree)c.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{u.current=null,n([])});else{var p;if(!ye("recoil_suppress_rerender_in_callback"))return n([]);const m=o();(p=u.current)!==null&&p!==void 0&&p.is(m)||n(m),u.current=m}return h.release},[i,o,e,t]),l}function H1(e){return se.env.NODE_ENV!=="production"&&bs(e,"useRecoilValueLoadable"),ye("recoil_memory_managament_2020")&&L1(e),{TRANSITION_SUPPORT:lm,SYNC_EXTERNAL_STORE:U1()?q1:lm,MUTABLE_SOURCE:_1,LEGACY:K1}[As().mode](e)}function um(e){se.env.NODE_ENV!=="production"&&bs(e,"useRecoilValue");const t=ei(),n=H1(e);return W1(n,e,t)}function cm(e){se.env.NODE_ENV!=="production"&&bs(e,"useSetRecoilState");const t=ei();return kn(n=>{sm(t.current,e,n)},[t,e])}function J1(e){se.env.NODE_ENV!=="production"&&bs(e,"useResetRecoilState");const t=ei();return kn(()=>{sm(t.current,e,R1)},[t,e])}function G1(e){return se.env.NODE_ENV!=="production"&&bs(e,"useRecoilState"),[um(e),cm(e)]}var Z1={useRecoilState:G1,useRecoilValue:um,useResetRecoilState:J1,useSetRecoilState:cm};const{batchUpdates:X1}=Uu,{DEFAULT_VALUE:$1,getNode:tN}=Mn,{AbstractRecoilValue:eN,setRecoilValueLoadable:nN}=pr,{cloneSnapshot:e3}=zo,{useCallback:n3,useEffect:r3,useRef:i3,useState:s3}=x;function rN(e,t){var n;const i=e.getState(),o=(n=i.nextTree)!==null&&n!==void 0?n:i.currentTree,l=t.getStore_INTERNAL().getState().currentTree;X1(()=>{const u=new Set;for(const h of[o.atomValues.keys(),l.atomValues.keys()])for(const p of h){var c,d;((c=o.atomValues.get(p))===null||c===void 0?void 0:c.contents)!==((d=l.atomValues.get(p))===null||d===void 0?void 0:d.contents)&&tN(p).shouldRestoreFromSnapshots&&u.add(p)}u.forEach(h=>{nN(e,new eN(h),l.atomValues.has(h)?Ee(l.atomValues.get(h)):$1)}),e.replaceState(h=>({...h,stateID:t.getID()}))})}var iN={gotoSnapshot:rN};const{useMemo:o3}=x,{loadableWithValue:sN}=ys,{initializeNode:oN}=ti,{DEFAULT_VALUE:aN,getNode:lN}=Mn,{copyTreeState:uN,getRecoilValueAsLoadable:cN,invalidateDownstreams:fN,writeLoadableToTreeState:dN}=pr;function fm(e){return lN(e.key).nodeType==="atom"}class hN{constructor(t,n){Pt(this,"_store",void 0),Pt(this,"_treeState",void 0),Pt(this,"_changes",void 0),Pt(this,"get",i=>{if(this._changes.has(i.key))return this._changes.get(i.key);if(!fm(i))throw Ot("Reading selectors within atomicUpdate is not supported");const o=cN(this._store,i,this._treeState);if(o.state==="hasValue")return o.contents;throw o.state==="hasError"?o.contents:Ot(`Expected Recoil atom ${i.key} to have a value, but it is in a loading state.`)}),Pt(this,"set",(i,o)=>{if(!fm(i))throw Ot("Setting selectors within atomicUpdate is not supported");if(typeof o=="function"){const l=this.get(i);this._changes.set(i.key,o(l))}else oN(this._store,i.key,"set"),this._changes.set(i.key,o)}),Pt(this,"reset",i=>{this.set(i,aN)}),this._store=t,this._treeState=n,this._changes=new Map}newTreeState_INTERNAL(){if(this._changes.size===0)return this._treeState;const t=uN(this._treeState);for(const[n,i]of this._changes)dN(t,n,sN(i));return fN(this._store,t),t}}function pN(e){return t=>{e.replaceState(n=>{const i=new hN(e,n);return t(i),i.newTreeState_INTERNAL()})}}var gN={atomicUpdater:pN},mN=gN.atomicUpdater,dm=Object.freeze({__proto__:null,atomicUpdater:mN});function yN(e,t){if(!e)throw new Error(t)}var vN=yN,ir=vN;const{atomicUpdater:MN}=dm,{batchUpdates:wN}=Uu,{DEFAULT_VALUE:xN}=Mn,{refreshRecoilValue:TN,setRecoilValue:hm}=pr,{cloneSnapshot:EN}=zo,{gotoSnapshot:AN}=iN,{useCallback:a3}=x;class pm{}const bN=new pm;function SN(e,t,n,i){let o=bN,l;if(wN(()=>{const c="useRecoilCallback() expects a function that returns a function: it accepts a function of the type (RecoilInterface) => (Args) => ReturnType and returns a callback function (Args) => ReturnType, where RecoilInterface is an object {snapshot, set, ...} and Args and ReturnType are the argument and return types of the callback you want to create. Please see the docs at recoiljs.org for details.";if(typeof t!="function")throw Ot(c);const d=wg({...i??{},set:(p,m)=>hm(e,p,m),reset:p=>hm(e,p,xN),refresh:p=>TN(e,p),gotoSnapshot:p=>AN(e,p),transact_UNSTABLE:p=>MN(e)(p)},{snapshot:()=>{const p=EN(e);return l=p.retain(),p}}),h=t(d);if(typeof h!="function")throw Ot(c);o=h(...n)}),o instanceof pm&&(se.env.NODE_ENV!=="production"?ir(!1,"batchUpdates should return immediately"):ir(!1)),ge(o))o=o.finally(()=>{var c;(c=l)===null||c===void 0||c()});else{var u;(u=l)===null||u===void 0||u()}return o}var NN={recoilCallback:SN};const{useCallback:l3}=x,{atomicUpdater:u3}=dm,{useMemo:c3}=x;class DN{constructor(t){Pt(this,"value",void 0),this.value=t}}var IN={WrappedValue:DN},CN=IN.WrappedValue,gm=Object.freeze({__proto__:null,WrappedValue:CN});class mm extends Error{}class zN{constructor(t){var n,i,o;Pt(this,"_name",void 0),Pt(this,"_numLeafs",void 0),Pt(this,"_root",void 0),Pt(this,"_onHit",void 0),Pt(this,"_onSet",void 0),Pt(this,"_mapNodeValue",void 0),this._name=t?.name,this._numLeafs=0,this._root=null,this._onHit=(n=t?.onHit)!==null&&n!==void 0?n:()=>{},this._onSet=(i=t?.onSet)!==null&&i!==void 0?i:()=>{},this._mapNodeValue=(o=t?.mapNodeValue)!==null&&o!==void 0?o:l=>l}size(){return this._numLeafs}root(){return this._root}get(t,n){var i;return(i=this.getLeafNode(t,n))===null||i===void 0?void 0:i.value}getLeafNode(t,n){if(this._root==null)return;let i=this._root;for(;i;){if(n?.onNodeVisit(i),i.type==="leaf")return this._onHit(i),i;const o=this._mapNodeValue(t(i.nodeKey));i=i.branches.get(o)}}set(t,n,i){const o=()=>{var l,u,c,d;let h,p;for(const[P,j]of t){var m,w,v;const L=this._root;if(L?.type==="leaf")throw this.invalidCacheError();const z=h;if(h=z?z.branches.get(p):L,h=(m=h)!==null&&m!==void 0?m:{type:"branch",nodeKey:P,parent:z,branches:new Map,branchKey:p},h.type!=="branch"||h.nodeKey!==P)throw this.invalidCacheError();z?.branches.set(p,h),i==null||(w=i.onNodeVisit)===null||w===void 0||w.call(i,h),p=this._mapNodeValue(j),this._root=(v=this._root)!==null&&v!==void 0?v:h}const S=h?(l=h)===null||l===void 0?void 0:l.branches.get(p):this._root;if(S!=null&&(S.type!=="leaf"||S.branchKey!==p))throw this.invalidCacheError();const A={type:"leaf",value:n,parent:h,branchKey:p};(u=h)===null||u===void 0||u.branches.set(p,A),this._root=(c=this._root)!==null&&c!==void 0?c:A,this._numLeafs++,this._onSet(A),i==null||(d=i.onNodeVisit)===null||d===void 0||d.call(i,A)};try{o()}catch(l){if(l instanceof mm)this.clear(),o();else throw l}}delete(t){const n=this.root();if(!n)return!1;if(t===n)return this._root=null,this._numLeafs=0,!0;let i=t.parent,o=t.branchKey;for(;i;){var l;if(i.branches.delete(o),i===n)return i.branches.size===0?(this._root=null,this._numLeafs=0):this._numLeafs--,!0;if(i.branches.size>0)break;o=(l=i)===null||l===void 0?void 0:l.branchKey,i=i.parent}for(;i!==n;i=i.parent)if(i==null)return!1;return this._numLeafs--,!0}clear(){this._numLeafs=0,this._root=null}invalidCacheError(){throw en("Invalid cache values. This happens when selectors do not return consistent values for the same input dependency values. That may also be caused when using Fast Refresh to change a selector implementation. Resetting cache."+(this._name!=null?` - ${this._name}`:"")),new mm}}var kN={TreeCache:zN},ON=kN.TreeCache,ym=Object.freeze({__proto__:null,TreeCache:ON});class LN{constructor(t){var n;Pt(this,"_maxSize",void 0),Pt(this,"_size",void 0),Pt(this,"_head",void 0),Pt(this,"_tail",void 0),Pt(this,"_map",void 0),Pt(this,"_keyMapper",void 0),this._maxSize=t.maxSize,this._size=0,this._head=null,this._tail=null,this._map=new Map,this._keyMapper=(n=t.mapKey)!==null&&n!==void 0?n:i=>i}head(){return this._head}tail(){return this._tail}size(){return this._size}maxSize(){return this._maxSize}has(t){return this._map.has(this._keyMapper(t))}get(t){const n=this._keyMapper(t),i=this._map.get(n);if(i)return this.set(t,i.value),i.value}set(t,n){const i=this._keyMapper(t);this._map.get(i)&&this.delete(t);const l=this.head(),u={key:t,right:l,left:null,value:n};l?l.left=u:this._tail=u,this._map.set(i,u),this._head=u,this._size++,this._maybeDeleteLRU()}_maybeDeleteLRU(){this.size()>this.maxSize()&&this.deleteLru()}deleteLru(){const t=this.tail();t&&this.delete(t.key)}delete(t){const n=this._keyMapper(t);if(!this._size||!this._map.has(n))return;const i=Ee(this._map.get(n)),o=i.right,l=i.left;o&&(o.left=i.left),l&&(l.right=i.right),i===this.head()&&(this._head=o),i===this.tail()&&(this._tail=l),this._map.delete(n),this._size--}clear(){this._size=0,this._head=null,this._tail=null,this._map=new Map}}var jN={LRUCache:LN},RN=jN.LRUCache,vm=Object.freeze({__proto__:null,LRUCache:RN});const{LRUCache:UN}=vm,{TreeCache:VN}=ym;function PN({name:e,maxSize:t,mapNodeValue:n=i=>i}){const i=new UN({maxSize:t}),o=new VN({name:e,mapNodeValue:n,onHit:l=>{i.set(l,!0)},onSet:l=>{const u=i.tail();i.set(l,!0),u&&o.size()>t&&o.delete(u.key)}});return o}var Mm=PN;const QN=15;function On(e,t,n){if(typeof e=="string"&&!e.includes('"')&&!e.includes("\\"))return`"${e}"`;switch(typeof e){case"undefined":return"";case"boolean":return e?"true":"false";case"number":case"symbol":return String(e);case"string":return JSON.stringify(e);case"function":if(t?.allowFunctions!==!0)throw Ot("Attempt to serialize function in a Recoil cache key");return`__FUNCTION(${e.name})__`}if(e===null)return"null";if(typeof e!="object"){var i;return(i=JSON.stringify(e))!==null&&i!==void 0?i:""}if(ge(e))return"__PROMISE__";if(Array.isArray(e))return`[${e.map((o,l)=>On(o,t,l.toString()))}]`;if(typeof e.toJSON=="function")return On(e.toJSON(n),t,n);if(e instanceof Map){const o={};for(const[l,u]of e)o[typeof l=="string"?l:On(l,t)]=u;return On(o,t,n)}return e instanceof Set?On(Array.from(e).sort((o,l)=>On(o,t).localeCompare(On(l,t))),t,n):Symbol!==void 0&&e[Symbol.iterator]!=null&&typeof e[Symbol.iterator]=="function"?On(Array.from(e),t,n):`{${Object.keys(e).filter(o=>e[o]!==void 0).sort().map(o=>`${On(o,t)}:${On(e[o],t,o)}`).join(",")}}`}function FN(e,t={allowFunctions:!1}){if(se.env.NODE_ENV!=="production"&&typeof window<"u"){const n=window.performance?window.performance.now():0,i=On(e,t),o=window.performance?window.performance.now():0;return o-n>QN&&(console.groupCollapsed(`Recoil: Spent ${o-n}ms computing a cache key`),console.warn(e,i),console.groupEnd()),i}return On(e,t)}var qu=FN;const{TreeCache:BN}=ym,Ro={equality:"reference",eviction:"keep-all",maxSize:1/0};function YN({equality:e=Ro.equality,eviction:t=Ro.eviction,maxSize:n=Ro.maxSize}=Ro,i){const o=WN(e);return qN(t,n,o,i)}function WN(e){switch(e){case"reference":return t=>t;case"value":return t=>qu(t)}throw Ot(`Unrecognized equality policy ${e}`)}function qN(e,t,n,i){switch(e){case"keep-all":return new BN({name:i,mapNodeValue:n});case"lru":return Mm({name:i,maxSize:Ee(t),mapNodeValue:n});case"most-recent":return Mm({name:i,maxSize:1,mapNodeValue:n})}throw Ot(`Unrecognized eviction policy ${e}`)}var _N=YN;function KN(e){var t,n;if(typeof window>"u")return!1;const o=(n=(e!=null?(t=e.ownerDocument)!==null&&t!==void 0?t:e:document).defaultView)!==null&&n!==void 0?n:window;return e!=null&&(typeof o.Node=="function"?e instanceof o.Node:typeof e=="object"&&typeof e.nodeType=="number"&&typeof e.nodeName=="string")}var HN=KN;const{isReactNative:JN,isWindow:GN}=No;function ZN(e){if(e===null||typeof e!="object")return!0;switch(typeof e.$$typeof){case"symbol":return!0;case"number":return!0}return!!(e["@@__IMMUTABLE_ITERABLE__@@"]!=null||e["@@__IMMUTABLE_KEYED__@@"]!=null||e["@@__IMMUTABLE_INDEXED__@@"]!=null||e["@@__IMMUTABLE_ORDERED__@@"]!=null||e["@@__IMMUTABLE_RECORD__@@"]!=null||HN(e)||ge(e)||e instanceof Error||ArrayBuffer.isView(e)||!JN&&GN(e))}function wm(e){if(!(typeof e!="object"||ZN(e))){Object.freeze(e);for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];typeof n=="object"&&n!=null&&!Object.isFrozen(n)&&wm(n)}Object.seal(e)}}var _u=wm;const{isLoadable:XN,loadableWithError:Uo,loadableWithPromise:$N,loadableWithValue:Ku}=ys,{WrappedValue:xm}=gm,{getNodeLoadable:Vo,peekNodeLoadable:tD,setNodeValue:eD}=ti,{saveDepsToStore:nD}=Ms,{DEFAULT_VALUE:rD,getConfigDeletionHandler:iD,getNode:sD,registerNode:Tm}=Mn,{isRecoilValue:oD}=$r,{markRecoilValueModified:Em}=pr,{retainedByOptionWithDefault:aD}=Ci,{recoilCallback:lD}=NN;class Am{}const Ss=new Am,Ns=[],Po=new Map,uD=(()=>{let e=0;return()=>e++})();function bm(e){let t=null;const{key:n,get:i,cachePolicy_UNSTABLE:o}=e,l=e.set!=null?e.set:void 0;if(se.env.NODE_ENV!=="production"){if(typeof n!="string")throw Ot("A key option with a unique string value must be provided when creating a selector.");if(typeof i!="function")throw Ot("Selectors must specify a get callback option to get the selector value.")}const u=new Set,c=_N(o??{equality:"reference",eviction:"keep-all"},n),d=aD(e.retainedBy_UNSTABLE),h=new Map;let p=0;function m(){return!ye("recoil_memory_managament_2020")||p>0}function w(I){return I.getState().knownSelectors.add(n),p++,()=>{p--}}function v(){return iD(n)!==void 0&&!m()}function S(I,R,N,V,B){Xt(R,V,B),A(I,N)}function A(I,R){Mt(I,R)&&Tt(I),j(R,!0)}function P(I,R){Mt(I,R)&&(Ee(ft(I)).stateVersions.clear(),j(R,!1))}function j(I,R){const N=Po.get(I);if(N!=null){for(const V of N)Em(V,Ee(t));R&&Po.delete(I)}}function L(I,R){let N=Po.get(R);N==null&&Po.set(R,N=new Set),N.add(I)}function z(I,R,N,V,B,$){return R.then(X=>{if(!m())throw Tt(I),Ss;const wt=Ku(X);return S(I,N,B,wt,V),X}).catch(X=>{if(!m())throw Tt(I),Ss;if(ge(X))return Z(I,X,N,V,B,$);const wt=Uo(X);throw S(I,N,B,wt,V),X})}function Z(I,R,N,V,B,$){return R.then(X=>{if(!m())throw Tt(I),Ss;$.loadingDepKey!=null&&$.loadingDepPromise===R?N.atomValues.set($.loadingDepKey,Ku(X)):I.getState().knownSelectors.forEach(Ut=>{N.atomValues.delete(Ut)});const wt=G(I,N);if(wt&&wt.state!=="loading"){if((Mt(I,B)||ft(I)==null)&&A(I,B),wt.state==="hasValue")return wt.contents;throw wt.contents}if(!Mt(I,B)){const Ut=vt(I,N);if(Ut!=null)return Ut.loadingLoadable.contents}const[kt,qt]=J(I,N,B);if(kt.state!=="loading"&&S(I,N,B,kt,qt),kt.state==="hasError")throw kt.contents;return kt.contents}).catch(X=>{if(X instanceof Am)throw Ss;if(!m())throw Tt(I),Ss;const wt=Uo(X);throw S(I,N,B,wt,V),X})}function Q(I,R,N,V){var B,$,X,wt;if(Mt(I,V)||R.version===((B=I.getState())===null||B===void 0||($=B.currentTree)===null||$===void 0?void 0:$.version)||R.version===((X=I.getState())===null||X===void 0||(wt=X.nextTree)===null||wt===void 0?void 0:wt.version)){var kt,qt,Ut;nD(n,N,I,(kt=(qt=I.getState())===null||qt===void 0||(Ut=qt.nextTree)===null||Ut===void 0?void 0:Ut.version)!==null&&kt!==void 0?kt:I.getState().currentTree.version)}for(const yt of N)u.add(yt)}function J(I,R,N){let V=!0,B=!0;const $=()=>{B=!1};let X,wt=!1,kt;const qt={loadingDepKey:null,loadingDepPromise:null},Ut=new Map;function yt({key:Ft}){const At=Vo(I,R,Ft);switch(Ut.set(Ft,At),V||(Q(I,R,new Set(Ut.keys()),N),P(I,N)),At.state){case"hasValue":return At.contents;case"hasError":throw At.contents;case"loading":throw qt.loadingDepKey=Ft,qt.loadingDepPromise=At.contents,At.contents}throw Ot("Invalid Loadable state")}const Et=Ft=>(...At)=>{if(B)throw Ot("Callbacks from getCallback() should only be called asynchronously after the selector is evalutated. It can be used for selectors to return objects with callbacks that can work with Recoil state without a subscription.");return t==null&&(se.env.NODE_ENV!=="production"?ir(!1,"Recoil Value can never be null"):ir(!1)),lD(I,Ft,At,{node:t})};try{X=i({get:yt,getCallback:Et}),X=oD(X)?yt(X):X,XN(X)&&(X.state==="hasError"&&(wt=!0),X=X.contents),ge(X)?X=z(I,X,R,Ut,N,qt).finally($):$(),X=X instanceof xm?X.value:X}catch(Ft){X=Ft,ge(X)?X=Z(I,X,R,Ut,N,qt).finally($):(wt=!0,$())}return wt?kt=Uo(X):ge(X)?kt=$N(X):kt=Ku(X),V=!1,Qt(I,N,Ut),Q(I,R,new Set(Ut.keys()),N),[kt,Ut]}function G(I,R){let N=R.atomValues.get(n);if(N!=null)return N;const V=new Set;try{N=c.get($=>(typeof $!="string"&&(se.env.NODE_ENV!=="production"?ir(!1,"Cache nodeKey is type string"):ir(!1)),Vo(I,R,$).contents),{onNodeVisit:$=>{$.type==="branch"&&$.nodeKey!==n&&V.add($.nodeKey)}})}catch($){throw Ot(`Problem with cache lookup for selector "${n}": ${$.message}`)}if(N){var B;R.atomValues.set(n,N),Q(I,R,V,(B=ft(I))===null||B===void 0?void 0:B.executionID)}return N}function K(I,R){const N=G(I,R);if(N!=null)return Tt(I),N;const V=vt(I,R);if(V!=null){var B;return((B=V.loadingLoadable)===null||B===void 0?void 0:B.state)==="loading"&&L(I,V.executionID),V.loadingLoadable}const $=uD(),[X,wt]=J(I,R,$);return X.state==="loading"?(ut(I,$,X,wt,R),L(I,$)):(Tt(I),Xt(R,X,wt)),X}function vt(I,R){const N=Vg([h.has(I)?[Ee(h.get(I))]:[],Eo(Ou(h,([B])=>B!==I),([,B])=>B)]);function V(B){for(const[$,X]of B)if(!Vo(I,R,$).is(X))return!0;return!1}for(const B of N){if(B.stateVersions.get(R.version)||!V(B.depValuesDiscoveredSoFarDuringAsyncWork))return B.stateVersions.set(R.version,!0),B;B.stateVersions.set(R.version,!1)}}function ft(I){return h.get(I)}function ut(I,R,N,V,B){h.set(I,{depValuesDiscoveredSoFarDuringAsyncWork:V,executionID:R,loadingLoadable:N,stateVersions:new Map([[B.version,!0]])})}function Qt(I,R,N){if(Mt(I,R)){const V=ft(I);V!=null&&(V.depValuesDiscoveredSoFarDuringAsyncWork=N)}}function Tt(I){h.delete(I)}function Mt(I,R){var N;return R===((N=ft(I))===null||N===void 0?void 0:N.executionID)}function ee(I){return Array.from(I.entries()).map(([R,N])=>[R,N.contents])}function Xt(I,R,N){se.env.NODE_ENV!=="production"&&R.state!=="loading"&&!e.dangerouslyAllowMutability&&_u(R.contents),I.atomValues.set(n,R);try{c.set(ee(N),R)}catch(V){throw Ot(`Problem with setting cache for selector "${n}": ${V.message}`)}}function xt(I){if(Ns.includes(n)){const R=`Recoil selector has circular dependencies: ${Ns.slice(Ns.indexOf(n)).join(" → ")}`;return Uo(Ot(R))}Ns.push(n);try{return I()}finally{Ns.pop()}}function Lt(I,R){const N=R.atomValues.get(n);return N??c.get(V=>{var B;return typeof V!="string"&&(se.env.NODE_ENV!=="production"?ir(!1,"Cache nodeKey is type string"):ir(!1)),(B=tD(I,R,V))===null||B===void 0?void 0:B.contents})}function ht(I,R){return xt(()=>K(I,R))}function at(I){I.atomValues.delete(n)}function pt(I,R){t==null&&(se.env.NODE_ENV!=="production"?ir(!1,"Recoil Value can never be null"):ir(!1));for(const V of u){var N;const B=sD(V);(N=B.clearCache)===null||N===void 0||N.call(B,I,R)}u.clear(),at(R),c.clear(),Em(I,t)}return l!=null?t=Tm({key:n,nodeType:"selector",peek:Lt,get:ht,set:(R,N,V)=>{let B=!1;const $=new Map;function X({key:Ut}){if(B)throw Ot("Recoil: Async selector sets are not currently supported.");const yt=Vo(R,N,Ut);if(yt.state==="hasValue")return yt.contents;if(yt.state==="loading"){const Et=`Getting value of asynchronous atom or selector "${Ut}" in a pending state while setting selector "${n}" is not yet supported.`;throw en(Et),Ot(Et)}else throw yt.contents}function wt(Ut,yt){if(B){const At="Recoil: Async selector sets are not currently supported.";throw en(At),Ot(At)}const Et=typeof yt=="function"?yt(X(Ut)):yt;eD(R,N,Ut.key,Et).forEach((At,$t)=>$.set($t,At))}function kt(Ut){wt(Ut,rD)}const qt=l({set:wt,get:X,reset:kt},V);if(qt!==void 0)throw ge(qt)?Ot("Recoil: Async selector sets are not currently supported."):Ot("Recoil: selector set should be a void function.");return B=!0,$},init:w,invalidate:at,clearCache:pt,shouldDeleteConfigOnRelease:v,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:d}):t=Tm({key:n,nodeType:"selector",peek:Lt,get:ht,init:w,invalidate:at,clearCache:pt,shouldDeleteConfigOnRelease:v,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:d})}bm.value=e=>new xm(e);var zi=bm;const{isLoadable:cD,loadableWithError:Hu,loadableWithPromise:Ju,loadableWithValue:ki}=ys,{WrappedValue:Sm}=gm,{peekNodeInfo:fD}=ti,{DEFAULT_VALUE:ni,DefaultValue:Cr,getConfigDeletionHandler:Nm,registerNode:dD,setConfigDeletionHandler:hD}=Mn,{isRecoilValue:pD}=$r,{getRecoilValueAsLoadable:gD,markRecoilValueModified:mD,setRecoilValue:Dm,setRecoilValueLoadable:yD}=pr,{retainedByOptionWithDefault:vD}=Ci,Ds=e=>e instanceof Sm?e.value:e;function MD(e){const{key:t,persistence_UNSTABLE:n}=e,i=vD(e.retainedBy_UNSTABLE);let o=0;function l(L){return Ju(L.then(z=>(u=ki(z),z)).catch(z=>{throw u=Hu(z),z}))}let u=ge(e.default)?l(e.default):cD(e.default)?e.default.state==="loading"?l(e.default.contents):e.default:ki(Ds(e.default));h(u.contents);let c;const d=new Map;function h(L){return se.env.NODE_ENV!=="production"&&e.dangerouslyAllowMutability!==!0?ge(L)?L.then(z=>(_u(z),z)):(_u(L),L):L}function p(L,z){const Z=z.then(Q=>{var J,G;return((G=((J=L.getState().nextTree)!==null&&J!==void 0?J:L.getState().currentTree).atomValues.get(t))===null||G===void 0?void 0:G.contents)===Z&&Dm(L,j,Q),Q}).catch(Q=>{var J,G;throw((G=((J=L.getState().nextTree)!==null&&J!==void 0?J:L.getState().currentTree).atomValues.get(t))===null||G===void 0?void 0:G.contents)===Z&&yD(L,j,Hu(Q)),Q});return Z}function m(L,z,Z){var Q;o++;const J=()=>{var ft;o--,(ft=d.get(L))===null||ft===void 0||ft.forEach(ut=>ut()),d.delete(L)};if(L.getState().knownAtoms.add(t),u.state==="loading"){const ft=()=>{var ut;((ut=L.getState().nextTree)!==null&&ut!==void 0?ut:L.getState().currentTree).atomValues.has(t)||mD(L,j)};u.contents.finally(ft)}const G=(Q=e.effects)!==null&&Q!==void 0?Q:e.effects_UNSTABLE;if(G!=null){let ft=function(at){if(Mt&&at.key===t){const pt=Tt;return pt instanceof Cr?w(L,z):ge(pt)?Ju(pt.then(I=>I instanceof Cr?u.toPromise():I)):ki(pt)}return gD(L,at)},ut=function(at){return ft(at).toPromise()},Qt=function(at){var pt;const I=fD(L,(pt=L.getState().nextTree)!==null&&pt!==void 0?pt:L.getState().currentTree,at.key);return Mt&&at.key===t&&!(Tt instanceof Cr)?{...I,isSet:!0,loadable:ft(at)}:I},Tt=ni,Mt=!0,ee=!1,Xt=null;const xt=at=>pt=>{if(Mt){const I=ft(j),R=I.state==="hasValue"?I.contents:ni;Tt=typeof pt=="function"?pt(R):pt,ge(Tt)&&(Tt=Tt.then(N=>(Xt={effect:at,value:N},N)))}else{if(ge(pt))throw Ot("Setting atoms to async values is not implemented.");typeof pt!="function"&&(Xt={effect:at,value:Ds(pt)}),Dm(L,j,typeof pt=="function"?I=>{const R=Ds(pt(I));return Xt={effect:at,value:R},R}:Ds(pt))}},Lt=at=>()=>xt(at)(ni),ht=at=>pt=>{var I;const{release:R}=L.subscribeToTransactions(N=>{var V;let{currentTree:B,previousTree:$}=N.getState();$||(en("Transaction subscribers notified without a next tree being present -- this is a bug in Recoil"),$=B);const X=(V=B.atomValues.get(t))!==null&&V!==void 0?V:u;if(X.state==="hasValue"){var wt,kt,qt,Ut;const yt=X.contents,Et=(wt=$.atomValues.get(t))!==null&&wt!==void 0?wt:u,Ft=Et.state==="hasValue"?Et.contents:ni;((kt=Xt)===null||kt===void 0?void 0:kt.effect)!==at||((qt=Xt)===null||qt===void 0?void 0:qt.value)!==yt?pt(yt,Ft,!B.atomValues.has(t)):((Ut=Xt)===null||Ut===void 0?void 0:Ut.effect)===at&&(Xt=null)}},t);d.set(L,[...(I=d.get(L))!==null&&I!==void 0?I:[],R])};for(const at of G)try{const pt=at({node:j,storeID:L.storeID,parentStoreID_UNSTABLE:L.parentStoreID,trigger:Z,setSelf:xt(at),resetSelf:Lt(at),onSet:ht(at),getPromise:ut,getLoadable:ft,getInfo_UNSTABLE:Qt});if(pt!=null){var K;d.set(L,[...(K=d.get(L))!==null&&K!==void 0?K:[],pt])}}catch(pt){Tt=pt,ee=!0}if(Mt=!1,!(Tt instanceof Cr)){var vt;const at=ee?Hu(Tt):ge(Tt)?Ju(p(L,Tt)):ki(Ds(Tt));h(at.contents),z.atomValues.set(t,at),(vt=L.getState().nextTree)===null||vt===void 0||vt.atomValues.set(t,at)}}return J}function w(L,z){var Z,Q;return(Z=(Q=z.atomValues.get(t))!==null&&Q!==void 0?Q:c)!==null&&Z!==void 0?Z:u}function v(L,z){if(z.atomValues.has(t))return Ee(z.atomValues.get(t));if(z.nonvalidatedAtoms.has(t)){if(c!=null)return c;if(n==null)return Nu(`Tried to restore a persisted value for atom ${t} but it has no persistence settings.`),u;const Z=z.nonvalidatedAtoms.get(t),Q=n.validator(Z,ni);return c=Q instanceof Cr?u:ki(Q),c}else return u}function S(){c=void 0}function A(L,z,Z){if(z.atomValues.has(t)){const Q=Ee(z.atomValues.get(t));if(Q.state==="hasValue"&&Z===Q.contents)return new Map}else if(!z.nonvalidatedAtoms.has(t)&&Z instanceof Cr)return new Map;return h(Z),c=void 0,new Map().set(t,ki(Z))}function P(){return Nm(t)!==void 0&&o<=0}const j=dD({key:t,nodeType:"atom",peek:w,get:v,set:A,init:m,invalidate:S,shouldDeleteConfigOnRelease:P,dangerouslyAllowMutability:e.dangerouslyAllowMutability,persistence_UNSTABLE:e.persistence_UNSTABLE?{type:e.persistence_UNSTABLE.type,backButton:e.persistence_UNSTABLE.backButton}:void 0,shouldRestoreFromSnapshots:!0,retainedBy:i});return j}function Gu(e){if(se.env.NODE_ENV!=="production"&&typeof e.key!="string")throw Ot("A key option with a unique string value must be provided when creating an atom.");const{...t}=e,n="default"in e?e.default:new Promise(()=>{});return pD(n)?wD({...t,default:n}):MD({...t,default:n})}function wD(e){const t=Gu({...e,default:ni,persistence_UNSTABLE:e.persistence_UNSTABLE===void 0?void 0:{...e.persistence_UNSTABLE,validator:i=>i instanceof Cr?i:Ee(e.persistence_UNSTABLE).validator(i,ni)},effects:e.effects,effects_UNSTABLE:e.effects_UNSTABLE}),n=zi({key:`${e.key}__withFallback`,get:({get:i})=>{const o=i(t);return o instanceof Cr?e.default:o},set:({set:i},o)=>i(t,o),cachePolicy_UNSTABLE:{eviction:"most-recent"},dangerouslyAllowMutability:e.dangerouslyAllowMutability});return hD(n.key,Nm(e.key)),n}Gu.value=e=>new Sm(e);var xD=Gu;class TD{constructor(t){var n;Pt(this,"_map",void 0),Pt(this,"_keyMapper",void 0),this._map=new Map,this._keyMapper=(n=t?.mapKey)!==null&&n!==void 0?n:i=>i}size(){return this._map.size}has(t){return this._map.has(this._keyMapper(t))}get(t){return this._map.get(this._keyMapper(t))}set(t,n){this._map.set(this._keyMapper(t),n)}delete(t){this._map.delete(this._keyMapper(t))}clear(){this._map.clear()}}var ED={MapCache:TD},AD=ED.MapCache,bD=Object.freeze({__proto__:null,MapCache:AD});const{LRUCache:Im}=vm,{MapCache:SD}=bD,Qo={equality:"reference",eviction:"none",maxSize:1/0};function ND({equality:e=Qo.equality,eviction:t=Qo.eviction,maxSize:n=Qo.maxSize}=Qo){const i=DD(e);return ID(t,n,i)}function DD(e){switch(e){case"reference":return t=>t;case"value":return t=>qu(t)}throw Ot(`Unrecognized equality policy ${e}`)}function ID(e,t,n){switch(e){case"keep-all":return new SD({mapKey:n});case"lru":return new Im({mapKey:n,maxSize:Ee(t)});case"most-recent":return new Im({mapKey:n,maxSize:1})}throw Ot(`Unrecognized eviction policy ${e}`)}var CD=ND;const{setConfigDeletionHandler:zD}=Mn;let kD=0;function OD(e){var t,n;const i=CD({equality:(t=(n=e.cachePolicyForParams_UNSTABLE)===null||n===void 0?void 0:n.equality)!==null&&t!==void 0?t:"value",eviction:"keep-all"});return o=>{var l;let u;try{u=i.get(o)}catch(w){throw Ot(`Problem with cache lookup for selector ${e.key}: ${w.message}`)}if(u!=null)return u;const c=`${e.key}__selectorFamily/${(l=qu(o,{allowFunctions:!0}))!==null&&l!==void 0?l:"void"}/${kD++}`,d=w=>e.get(o)(w),h=e.cachePolicy_UNSTABLE,p=typeof e.retainedBy_UNSTABLE=="function"?e.retainedBy_UNSTABLE(o):e.retainedBy_UNSTABLE;let m;if(e.set!=null){const w=e.set;m=zi({key:c,get:d,set:(S,A)=>w(o)(S,A),cachePolicy_UNSTABLE:h,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:p})}else m=zi({key:c,get:d,cachePolicy_UNSTABLE:h,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:p});return i.set(o,m),zD(m.key,()=>{i.delete(o)}),m}}var ri=OD;ri({key:"__constant",get:e=>()=>e,cachePolicyForParams_UNSTABLE:{equality:"reference"}}),ri({key:"__error",get:e=>()=>{throw Ot(e)},cachePolicyForParams_UNSTABLE:{equality:"reference"}});const{loadableWithError:Cm,loadableWithPromise:zm,loadableWithValue:km}=ys;function Fo(e,t){const n=Array(t.length).fill(void 0),i=Array(t.length).fill(void 0);for(const[o,l]of t.entries())try{n[o]=e(l)}catch(u){i[o]=u}return[n,i]}function LD(e){return e!=null&&!ge(e)}function Bo(e){return Array.isArray(e)?e:Object.getOwnPropertyNames(e).map(t=>e[t])}function Zu(e,t){return Array.isArray(e)?t:Object.getOwnPropertyNames(e).reduce((n,i,o)=>({...n,[i]:t[o]}),{})}function Oi(e,t,n){const i=n.map((o,l)=>o==null?km(t[l]):ge(o)?zm(o):Cm(o));return Zu(e,i)}function jD(e,t){return t.map((n,i)=>n===void 0?e[i]:n)}ri({key:"__waitForNone",get:e=>({get:t})=>{const n=Bo(e),[i,o]=Fo(t,n);return Oi(e,i,o)},dangerouslyAllowMutability:!0}),ri({key:"__waitForAny",get:e=>({get:t})=>{const n=Bo(e),[i,o]=Fo(t,n);return o.some(l=>!ge(l))?Oi(e,i,o):new Promise(l=>{for(const[u,c]of o.entries())ge(c)&&c.then(d=>{i[u]=d,o[u]=void 0,l(Oi(e,i,o))}).catch(d=>{o[u]=d,l(Oi(e,i,o))})})},dangerouslyAllowMutability:!0}),ri({key:"__waitForAll",get:e=>({get:t})=>{const n=Bo(e),[i,o]=Fo(t,n);if(o.every(u=>u==null))return Zu(e,i);const l=o.find(LD);if(l!=null)throw l;return Promise.all(o).then(u=>Zu(e,jD(i,u)))},dangerouslyAllowMutability:!0}),ri({key:"__waitForAllSettled",get:e=>({get:t})=>{const n=Bo(e),[i,o]=Fo(t,n);return o.every(l=>!ge(l))?Oi(e,i,o):Promise.all(o.map((l,u)=>ge(l)?l.then(c=>{i[u]=c,o[u]=void 0}).catch(c=>{i[u]=void 0,o[u]=c}):null)).then(()=>Oi(e,i,o))},dangerouslyAllowMutability:!0}),ri({key:"__noWait",get:e=>({get:t})=>{try{return zi.value(km(t(e)))}catch(n){return zi.value(ge(n)?zm(n):Cm(n))}},dangerouslyAllowMutability:!0});const{RecoilLoadable:f3}=ys,{DefaultValue:RD}=Mn,{RecoilRoot:UD}=Wu,{isRecoilValue:d3}=$r,{freshSnapshot:h3}=zo,{useRecoilState:VD,useRecoilValue:PD,useResetRecoilState:QD,useSetRecoilState:FD}=Z1;var zr={DefaultValue:RD,RecoilRoot:UD,atom:xD,selector:zi,useRecoilValue:PD,useRecoilState:VD,useSetRecoilState:FD,useResetRecoilState:QD},BD=zr.DefaultValue,YD=zr.RecoilRoot,le=zr.atom,Om=zr.selector,Ie=zr.useRecoilValue,Li=zr.useRecoilState,he=zr.useSetRecoilState,Yo=zr.useResetRecoilState,Is={exports:{}};var WD=Is.exports,Lm;function qD(){return Lm||(Lm=1,(function(e,t){(function(){var n,i="4.17.21",o=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",c="Invalid `variable` option passed into `_.template`",d="__lodash_hash_undefined__",h=500,p="__lodash_placeholder__",m=1,w=2,v=4,S=1,A=2,P=1,j=2,L=4,z=8,Z=16,Q=32,J=64,G=128,K=256,vt=512,ft=30,ut="...",Qt=800,Tt=16,Mt=1,ee=2,Xt=3,xt=1/0,Lt=9007199254740991,ht=17976931348623157e292,at=NaN,pt=4294967295,I=pt-1,R=pt>>>1,N=[["ary",G],["bind",P],["bindKey",j],["curry",z],["curryRight",Z],["flip",vt],["partial",Q],["partialRight",J],["rearg",K]],V="[object Arguments]",B="[object Array]",$="[object AsyncFunction]",X="[object Boolean]",wt="[object Date]",kt="[object DOMException]",qt="[object Error]",Ut="[object Function]",yt="[object GeneratorFunction]",Et="[object Map]",Ft="[object Number]",At="[object Null]",$t="[object Object]",Fe="[object Promise]",ve="[object Proxy]",ne="[object RegExp]",ie="[object Set]",nn="[object String]",Le="[object Symbol]",Rn="[object Undefined]",Me="[object WeakMap]",ue="[object WeakSet]",je="[object ArrayBuffer]",ln="[object DataView]",wn="[object Float32Array]",xn="[object Float64Array]",ar="[object Int8Array]",Zn="[object Int16Array]",Xn="[object Int32Array]",pn="[object Uint8Array]",O="[object Uint8ClampedArray]",D="[object Uint16Array]",_="[object Uint32Array]",et=/\b__p \+= '';/g,tt=/\b(__p \+=) '' \+/g,it=/(__e\(.*?\)|\b__t\)) \+\n'';/g,gt=/&(?:amp|lt|gt|quot|#39);/g,mt=/[&<>"']/g,ct=RegExp(gt.source),jt=RegExp(mt.source),st=/<%-([\s\S]+?)%>/g,It=/<%([\s\S]+?)%>/g,Ct=/<%=([\s\S]+?)%>/g,ce=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,pe=/^\w*$/,Be=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qe=/[\\^$.*+?()[\]{}|]/g,Ce=RegExp(qe.source),Re=/^\s+/,Kc=/\s/,Hc=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Jc=/\{\n\/\* \[wrapped with (.+)\] \*/,Gc=/,? & /,E=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,H=/[()=,{}\[\]\/\s]/,ot=/\\(\\)?/g,zt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,re=/\w*$/,fe=/^[-+]0x[0-9a-f]+$/i,Ht=/^0b[01]+$/i,_t=/^\[object .+?Constructor\]$/,Ge=/^0o[0-7]+$/i,Ne=/^(?:0|[1-9]\d*)$/,ze=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ze=/($^)/,jr=/['\n\r\u2028\u2029\\]/g,Un="\\ud800-\\udfff",rn="\\u0300-\\u036f",Rs="\\ufe20-\\ufe2f",Zc="\\u20d0-\\u20ff",da=rn+Rs+Zc,W0="\\u2700-\\u27bf",q0="a-z\\xdf-\\xf6\\xf8-\\xff",FC="\\xac\\xb1\\xd7\\xf7",BC="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",YC="\\u2000-\\u206f",WC=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",_0="A-Z\\xc0-\\xd6\\xd8-\\xde",K0="\\ufe0e\\ufe0f",H0=FC+BC+YC+WC,Xc="['’]",qC="["+Un+"]",J0="["+H0+"]",ha="["+da+"]",G0="\\d+",_C="["+W0+"]",Z0="["+q0+"]",X0="[^"+Un+H0+G0+W0+q0+_0+"]",$c="\\ud83c[\\udffb-\\udfff]",KC="(?:"+ha+"|"+$c+")",$0="[^"+Un+"]",tf="(?:\\ud83c[\\udde6-\\uddff]){2}",ef="[\\ud800-\\udbff][\\udc00-\\udfff]",Vi="["+_0+"]",ty="\\u200d",ey="(?:"+Z0+"|"+X0+")",HC="(?:"+Vi+"|"+X0+")",ny="(?:"+Xc+"(?:d|ll|m|re|s|t|ve))?",ry="(?:"+Xc+"(?:D|LL|M|RE|S|T|VE))?",iy=KC+"?",sy="["+K0+"]?",JC="(?:"+ty+"(?:"+[$0,tf,ef].join("|")+")"+sy+iy+")*",GC="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ZC="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",oy=sy+iy+JC,XC="(?:"+[_C,tf,ef].join("|")+")"+oy,$C="(?:"+[$0+ha+"?",ha,tf,ef,qC].join("|")+")",tz=RegExp(Xc,"g"),ez=RegExp(ha,"g"),nf=RegExp($c+"(?="+$c+")|"+$C+oy,"g"),nz=RegExp([Vi+"?"+Z0+"+"+ny+"(?="+[J0,Vi,"$"].join("|")+")",HC+"+"+ry+"(?="+[J0,Vi+ey,"$"].join("|")+")",Vi+"?"+ey+"+"+ny,Vi+"+"+ry,ZC,GC,G0,XC].join("|"),"g"),rz=RegExp("["+ty+Un+da+K0+"]"),iz=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,sz=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],oz=-1,xe={};xe[wn]=xe[xn]=xe[ar]=xe[Zn]=xe[Xn]=xe[pn]=xe[O]=xe[D]=xe[_]=!0,xe[V]=xe[B]=xe[je]=xe[X]=xe[ln]=xe[wt]=xe[qt]=xe[Ut]=xe[Et]=xe[Ft]=xe[$t]=xe[ne]=xe[ie]=xe[nn]=xe[Me]=!1;var we={};we[V]=we[B]=we[je]=we[ln]=we[X]=we[wt]=we[wn]=we[xn]=we[ar]=we[Zn]=we[Xn]=we[Et]=we[Ft]=we[$t]=we[ne]=we[ie]=we[nn]=we[Le]=we[pn]=we[O]=we[D]=we[_]=!0,we[qt]=we[Ut]=we[Me]=!1;var az={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},lz={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},uz={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},cz={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},fz=parseFloat,dz=parseInt,ay=typeof $s=="object"&&$s&&$s.Object===Object&&$s,hz=typeof self=="object"&&self&&self.Object===Object&&self,Xe=ay||hz||Function("return this")(),rf=t&&!t.nodeType&&t,si=rf&&!0&&e&&!e.nodeType&&e,ly=si&&si.exports===rf,sf=ly&&ay.process,Vn=(function(){try{var C=si&&si.require&&si.require("util").types;return C||sf&&sf.binding&&sf.binding("util")}catch{}})(),uy=Vn&&Vn.isArrayBuffer,cy=Vn&&Vn.isDate,fy=Vn&&Vn.isMap,dy=Vn&&Vn.isRegExp,hy=Vn&&Vn.isSet,py=Vn&&Vn.isTypedArray;function Tn(C,F,U){switch(U.length){case 0:return C.call(F);case 1:return C.call(F,U[0]);case 2:return C.call(F,U[0],U[1]);case 3:return C.call(F,U[0],U[1],U[2])}return C.apply(F,U)}function pz(C,F,U,lt){for(var Rt=-1,oe=C==null?0:C.length;++Rt<oe;){var Ye=C[Rt];F(lt,Ye,U(Ye),C)}return lt}function Pn(C,F){for(var U=-1,lt=C==null?0:C.length;++U<lt&&F(C[U],U,C)!==!1;);return C}function gz(C,F){for(var U=C==null?0:C.length;U--&&F(C[U],U,C)!==!1;);return C}function gy(C,F){for(var U=-1,lt=C==null?0:C.length;++U<lt;)if(!F(C[U],U,C))return!1;return!0}function Rr(C,F){for(var U=-1,lt=C==null?0:C.length,Rt=0,oe=[];++U<lt;){var Ye=C[U];F(Ye,U,C)&&(oe[Rt++]=Ye)}return oe}function pa(C,F){var U=C==null?0:C.length;return!!U&&Pi(C,F,0)>-1}function of(C,F,U){for(var lt=-1,Rt=C==null?0:C.length;++lt<Rt;)if(U(F,C[lt]))return!0;return!1}function Ae(C,F){for(var U=-1,lt=C==null?0:C.length,Rt=Array(lt);++U<lt;)Rt[U]=F(C[U],U,C);return Rt}function Ur(C,F){for(var U=-1,lt=F.length,Rt=C.length;++U<lt;)C[Rt+U]=F[U];return C}function af(C,F,U,lt){var Rt=-1,oe=C==null?0:C.length;for(lt&&oe&&(U=C[++Rt]);++Rt<oe;)U=F(U,C[Rt],Rt,C);return U}function mz(C,F,U,lt){var Rt=C==null?0:C.length;for(lt&&Rt&&(U=C[--Rt]);Rt--;)U=F(U,C[Rt],Rt,C);return U}function lf(C,F){for(var U=-1,lt=C==null?0:C.length;++U<lt;)if(F(C[U],U,C))return!0;return!1}var yz=uf("length");function vz(C){return C.split("")}function Mz(C){return C.match(E)||[]}function my(C,F,U){var lt;return U(C,function(Rt,oe,Ye){if(F(Rt,oe,Ye))return lt=oe,!1}),lt}function ga(C,F,U,lt){for(var Rt=C.length,oe=U+(lt?1:-1);lt?oe--:++oe<Rt;)if(F(C[oe],oe,C))return oe;return-1}function Pi(C,F,U){return F===F?zz(C,F,U):ga(C,yy,U)}function wz(C,F,U,lt){for(var Rt=U-1,oe=C.length;++Rt<oe;)if(lt(C[Rt],F))return Rt;return-1}function yy(C){return C!==C}function vy(C,F){var U=C==null?0:C.length;return U?ff(C,F)/U:at}function uf(C){return function(F){return F==null?n:F[C]}}function cf(C){return function(F){return C==null?n:C[F]}}function My(C,F,U,lt,Rt){return Rt(C,function(oe,Ye,me){U=lt?(lt=!1,oe):F(U,oe,Ye,me)}),U}function xz(C,F){var U=C.length;for(C.sort(F);U--;)C[U]=C[U].value;return C}function ff(C,F){for(var U,lt=-1,Rt=C.length;++lt<Rt;){var oe=F(C[lt]);oe!==n&&(U=U===n?oe:U+oe)}return U}function df(C,F){for(var U=-1,lt=Array(C);++U<C;)lt[U]=F(U);return lt}function Tz(C,F){return Ae(F,function(U){return[U,C[U]]})}function wy(C){return C&&C.slice(0,Ay(C)+1).replace(Re,"")}function En(C){return function(F){return C(F)}}function hf(C,F){return Ae(F,function(U){return C[U]})}function Us(C,F){return C.has(F)}function xy(C,F){for(var U=-1,lt=C.length;++U<lt&&Pi(F,C[U],0)>-1;);return U}function Ty(C,F){for(var U=C.length;U--&&Pi(F,C[U],0)>-1;);return U}function Ez(C,F){for(var U=C.length,lt=0;U--;)C[U]===F&&++lt;return lt}var Az=cf(az),bz=cf(lz);function Sz(C){return"\\"+cz[C]}function Nz(C,F){return C==null?n:C[F]}function Qi(C){return rz.test(C)}function Dz(C){return iz.test(C)}function Iz(C){for(var F,U=[];!(F=C.next()).done;)U.push(F.value);return U}function pf(C){var F=-1,U=Array(C.size);return C.forEach(function(lt,Rt){U[++F]=[Rt,lt]}),U}function Ey(C,F){return function(U){return C(F(U))}}function Vr(C,F){for(var U=-1,lt=C.length,Rt=0,oe=[];++U<lt;){var Ye=C[U];(Ye===F||Ye===p)&&(C[U]=p,oe[Rt++]=U)}return oe}function ma(C){var F=-1,U=Array(C.size);return C.forEach(function(lt){U[++F]=lt}),U}function Cz(C){var F=-1,U=Array(C.size);return C.forEach(function(lt){U[++F]=[lt,lt]}),U}function zz(C,F,U){for(var lt=U-1,Rt=C.length;++lt<Rt;)if(C[lt]===F)return lt;return-1}function kz(C,F,U){for(var lt=U+1;lt--;)if(C[lt]===F)return lt;return lt}function Fi(C){return Qi(C)?Lz(C):yz(C)}function $n(C){return Qi(C)?jz(C):vz(C)}function Ay(C){for(var F=C.length;F--&&Kc.test(C.charAt(F)););return F}var Oz=cf(uz);function Lz(C){for(var F=nf.lastIndex=0;nf.test(C);)++F;return F}function jz(C){return C.match(nf)||[]}function Rz(C){return C.match(nz)||[]}var Uz=(function C(F){F=F==null?Xe:Bi.defaults(Xe.Object(),F,Bi.pick(Xe,sz));var U=F.Array,lt=F.Date,Rt=F.Error,oe=F.Function,Ye=F.Math,me=F.Object,gf=F.RegExp,Vz=F.String,Qn=F.TypeError,ya=U.prototype,Pz=oe.prototype,Yi=me.prototype,va=F["__core-js_shared__"],Ma=Pz.toString,de=Yi.hasOwnProperty,Qz=0,by=(function(){var r=/[^.]+$/.exec(va&&va.keys&&va.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})(),wa=Yi.toString,Fz=Ma.call(me),Bz=Xe._,Yz=gf("^"+Ma.call(de).replace(qe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),xa=ly?F.Buffer:n,Pr=F.Symbol,Ta=F.Uint8Array,Sy=xa?xa.allocUnsafe:n,Ea=Ey(me.getPrototypeOf,me),Ny=me.create,Dy=Yi.propertyIsEnumerable,Aa=ya.splice,Iy=Pr?Pr.isConcatSpreadable:n,Vs=Pr?Pr.iterator:n,oi=Pr?Pr.toStringTag:n,ba=(function(){try{var r=fi(me,"defineProperty");return r({},"",{}),r}catch{}})(),Wz=F.clearTimeout!==Xe.clearTimeout&&F.clearTimeout,qz=lt&&lt.now!==Xe.Date.now&&lt.now,_z=F.setTimeout!==Xe.setTimeout&&F.setTimeout,Sa=Ye.ceil,Na=Ye.floor,mf=me.getOwnPropertySymbols,Kz=xa?xa.isBuffer:n,Cy=F.isFinite,Hz=ya.join,Jz=Ey(me.keys,me),We=Ye.max,sn=Ye.min,Gz=lt.now,Zz=F.parseInt,zy=Ye.random,Xz=ya.reverse,yf=fi(F,"DataView"),Ps=fi(F,"Map"),vf=fi(F,"Promise"),Wi=fi(F,"Set"),Qs=fi(F,"WeakMap"),Fs=fi(me,"create"),Da=Qs&&new Qs,qi={},$z=di(yf),tk=di(Ps),ek=di(vf),nk=di(Wi),rk=di(Qs),Ia=Pr?Pr.prototype:n,Bs=Ia?Ia.valueOf:n,ky=Ia?Ia.toString:n;function y(r){if(ke(r)&&!Vt(r)&&!(r instanceof Jt)){if(r instanceof Fn)return r;if(de.call(r,"__wrapped__"))return Ov(r)}return new Fn(r)}var _i=(function(){function r(){}return function(s){if(!De(s))return{};if(Ny)return Ny(s);r.prototype=s;var a=new r;return r.prototype=n,a}})();function Ca(){}function Fn(r,s){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!s,this.__index__=0,this.__values__=n}y.templateSettings={escape:st,evaluate:It,interpolate:Ct,variable:"",imports:{_:y}},y.prototype=Ca.prototype,y.prototype.constructor=y,Fn.prototype=_i(Ca.prototype),Fn.prototype.constructor=Fn;function Jt(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=pt,this.__views__=[]}function ik(){var r=new Jt(this.__wrapped__);return r.__actions__=gn(this.__actions__),r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=gn(this.__iteratees__),r.__takeCount__=this.__takeCount__,r.__views__=gn(this.__views__),r}function sk(){if(this.__filtered__){var r=new Jt(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r}function ok(){var r=this.__wrapped__.value(),s=this.__dir__,a=Vt(r),f=s<0,g=a?r.length:0,M=v4(0,g,this.__views__),T=M.start,b=M.end,k=b-T,Y=f?b:T-1,W=this.__iteratees__,q=W.length,nt=0,dt=sn(k,this.__takeCount__);if(!a||!f&&g==k&&dt==k)return nv(r,this.__actions__);var St=[];t:for(;k--&&nt<dt;){Y+=s;for(var Yt=-1,Nt=r[Y];++Yt<q;){var Kt=W[Yt],Zt=Kt.iteratee,Sn=Kt.type,fn=Zt(Nt);if(Sn==ee)Nt=fn;else if(!fn){if(Sn==Mt)continue t;break t}}St[nt++]=Nt}return St}Jt.prototype=_i(Ca.prototype),Jt.prototype.constructor=Jt;function ai(r){var s=-1,a=r==null?0:r.length;for(this.clear();++s<a;){var f=r[s];this.set(f[0],f[1])}}function ak(){this.__data__=Fs?Fs(null):{},this.size=0}function lk(r){var s=this.has(r)&&delete this.__data__[r];return this.size-=s?1:0,s}function uk(r){var s=this.__data__;if(Fs){var a=s[r];return a===d?n:a}return de.call(s,r)?s[r]:n}function ck(r){var s=this.__data__;return Fs?s[r]!==n:de.call(s,r)}function fk(r,s){var a=this.__data__;return this.size+=this.has(r)?0:1,a[r]=Fs&&s===n?d:s,this}ai.prototype.clear=ak,ai.prototype.delete=lk,ai.prototype.get=uk,ai.prototype.has=ck,ai.prototype.set=fk;function yr(r){var s=-1,a=r==null?0:r.length;for(this.clear();++s<a;){var f=r[s];this.set(f[0],f[1])}}function dk(){this.__data__=[],this.size=0}function hk(r){var s=this.__data__,a=za(s,r);if(a<0)return!1;var f=s.length-1;return a==f?s.pop():Aa.call(s,a,1),--this.size,!0}function pk(r){var s=this.__data__,a=za(s,r);return a<0?n:s[a][1]}function gk(r){return za(this.__data__,r)>-1}function mk(r,s){var a=this.__data__,f=za(a,r);return f<0?(++this.size,a.push([r,s])):a[f][1]=s,this}yr.prototype.clear=dk,yr.prototype.delete=hk,yr.prototype.get=pk,yr.prototype.has=gk,yr.prototype.set=mk;function vr(r){var s=-1,a=r==null?0:r.length;for(this.clear();++s<a;){var f=r[s];this.set(f[0],f[1])}}function yk(){this.size=0,this.__data__={hash:new ai,map:new(Ps||yr),string:new ai}}function vk(r){var s=Ya(this,r).delete(r);return this.size-=s?1:0,s}function Mk(r){return Ya(this,r).get(r)}function wk(r){return Ya(this,r).has(r)}function xk(r,s){var a=Ya(this,r),f=a.size;return a.set(r,s),this.size+=a.size==f?0:1,this}vr.prototype.clear=yk,vr.prototype.delete=vk,vr.prototype.get=Mk,vr.prototype.has=wk,vr.prototype.set=xk;function li(r){var s=-1,a=r==null?0:r.length;for(this.__data__=new vr;++s<a;)this.add(r[s])}function Tk(r){return this.__data__.set(r,d),this}function Ek(r){return this.__data__.has(r)}li.prototype.add=li.prototype.push=Tk,li.prototype.has=Ek;function tr(r){var s=this.__data__=new yr(r);this.size=s.size}function Ak(){this.__data__=new yr,this.size=0}function bk(r){var s=this.__data__,a=s.delete(r);return this.size=s.size,a}function Sk(r){return this.__data__.get(r)}function Nk(r){return this.__data__.has(r)}function Dk(r,s){var a=this.__data__;if(a instanceof yr){var f=a.__data__;if(!Ps||f.length<o-1)return f.push([r,s]),this.size=++a.size,this;a=this.__data__=new vr(f)}return a.set(r,s),this.size=a.size,this}tr.prototype.clear=Ak,tr.prototype.delete=bk,tr.prototype.get=Sk,tr.prototype.has=Nk,tr.prototype.set=Dk;function Oy(r,s){var a=Vt(r),f=!a&&hi(r),g=!a&&!f&&Wr(r),M=!a&&!f&&!g&&Gi(r),T=a||f||g||M,b=T?df(r.length,Vz):[],k=b.length;for(var Y in r)(s||de.call(r,Y))&&!(T&&(Y=="length"||g&&(Y=="offset"||Y=="parent")||M&&(Y=="buffer"||Y=="byteLength"||Y=="byteOffset")||Tr(Y,k)))&&b.push(Y);return b}function Ly(r){var s=r.length;return s?r[If(0,s-1)]:n}function Ik(r,s){return Wa(gn(r),ui(s,0,r.length))}function Ck(r){return Wa(gn(r))}function Mf(r,s,a){(a!==n&&!er(r[s],a)||a===n&&!(s in r))&&Mr(r,s,a)}function Ys(r,s,a){var f=r[s];(!(de.call(r,s)&&er(f,a))||a===n&&!(s in r))&&Mr(r,s,a)}function za(r,s){for(var a=r.length;a--;)if(er(r[a][0],s))return a;return-1}function zk(r,s,a,f){return Qr(r,function(g,M,T){s(f,g,a(g),T)}),f}function jy(r,s){return r&&ur(s,_e(s),r)}function kk(r,s){return r&&ur(s,yn(s),r)}function Mr(r,s,a){s=="__proto__"&&ba?ba(r,s,{configurable:!0,enumerable:!0,value:a,writable:!0}):r[s]=a}function wf(r,s){for(var a=-1,f=s.length,g=U(f),M=r==null;++a<f;)g[a]=M?n:td(r,s[a]);return g}function ui(r,s,a){return r===r&&(a!==n&&(r=r<=a?r:a),s!==n&&(r=r>=s?r:s)),r}function Bn(r,s,a,f,g,M){var T,b=s&m,k=s&w,Y=s&v;if(a&&(T=g?a(r,f,g,M):a(r)),T!==n)return T;if(!De(r))return r;var W=Vt(r);if(W){if(T=w4(r),!b)return gn(r,T)}else{var q=on(r),nt=q==Ut||q==yt;if(Wr(r))return sv(r,b);if(q==$t||q==V||nt&&!g){if(T=k||nt?{}:Av(r),!b)return k?u4(r,kk(T,r)):l4(r,jy(T,r))}else{if(!we[q])return g?r:{};T=x4(r,q,b)}}M||(M=new tr);var dt=M.get(r);if(dt)return dt;M.set(r,T),$v(r)?r.forEach(function(Nt){T.add(Bn(Nt,s,a,Nt,r,M))}):Zv(r)&&r.forEach(function(Nt,Kt){T.set(Kt,Bn(Nt,s,a,Kt,r,M))});var St=Y?k?Qf:Pf:k?yn:_e,Yt=W?n:St(r);return Pn(Yt||r,function(Nt,Kt){Yt&&(Kt=Nt,Nt=r[Kt]),Ys(T,Kt,Bn(Nt,s,a,Kt,r,M))}),T}function Ok(r){var s=_e(r);return function(a){return Ry(a,r,s)}}function Ry(r,s,a){var f=a.length;if(r==null)return!f;for(r=me(r);f--;){var g=a[f],M=s[g],T=r[g];if(T===n&&!(g in r)||!M(T))return!1}return!0}function Uy(r,s,a){if(typeof r!="function")throw new Qn(u);return Gs(function(){r.apply(n,a)},s)}function Ws(r,s,a,f){var g=-1,M=pa,T=!0,b=r.length,k=[],Y=s.length;if(!b)return k;a&&(s=Ae(s,En(a))),f?(M=of,T=!1):s.length>=o&&(M=Us,T=!1,s=new li(s));t:for(;++g<b;){var W=r[g],q=a==null?W:a(W);if(W=f||W!==0?W:0,T&&q===q){for(var nt=Y;nt--;)if(s[nt]===q)continue t;k.push(W)}else M(s,q,f)||k.push(W)}return k}var Qr=cv(lr),Vy=cv(Tf,!0);function Lk(r,s){var a=!0;return Qr(r,function(f,g,M){return a=!!s(f,g,M),a}),a}function ka(r,s,a){for(var f=-1,g=r.length;++f<g;){var M=r[f],T=s(M);if(T!=null&&(b===n?T===T&&!bn(T):a(T,b)))var b=T,k=M}return k}function jk(r,s,a,f){var g=r.length;for(a=Bt(a),a<0&&(a=-a>g?0:g+a),f=f===n||f>g?g:Bt(f),f<0&&(f+=g),f=a>f?0:eM(f);a<f;)r[a++]=s;return r}function Py(r,s){var a=[];return Qr(r,function(f,g,M){s(f,g,M)&&a.push(f)}),a}function $e(r,s,a,f,g){var M=-1,T=r.length;for(a||(a=E4),g||(g=[]);++M<T;){var b=r[M];s>0&&a(b)?s>1?$e(b,s-1,a,f,g):Ur(g,b):f||(g[g.length]=b)}return g}var xf=fv(),Qy=fv(!0);function lr(r,s){return r&&xf(r,s,_e)}function Tf(r,s){return r&&Qy(r,s,_e)}function Oa(r,s){return Rr(s,function(a){return Er(r[a])})}function ci(r,s){s=Br(s,r);for(var a=0,f=s.length;r!=null&&a<f;)r=r[cr(s[a++])];return a&&a==f?r:n}function Fy(r,s,a){var f=s(r);return Vt(r)?f:Ur(f,a(r))}function un(r){return r==null?r===n?Rn:At:oi&&oi in me(r)?y4(r):C4(r)}function Ef(r,s){return r>s}function Rk(r,s){return r!=null&&de.call(r,s)}function Uk(r,s){return r!=null&&s in me(r)}function Vk(r,s,a){return r>=sn(s,a)&&r<We(s,a)}function Af(r,s,a){for(var f=a?of:pa,g=r[0].length,M=r.length,T=M,b=U(M),k=1/0,Y=[];T--;){var W=r[T];T&&s&&(W=Ae(W,En(s))),k=sn(W.length,k),b[T]=!a&&(s||g>=120&&W.length>=120)?new li(T&&W):n}W=r[0];var q=-1,nt=b[0];t:for(;++q<g&&Y.length<k;){var dt=W[q],St=s?s(dt):dt;if(dt=a||dt!==0?dt:0,!(nt?Us(nt,St):f(Y,St,a))){for(T=M;--T;){var Yt=b[T];if(!(Yt?Us(Yt,St):f(r[T],St,a)))continue t}nt&&nt.push(St),Y.push(dt)}}return Y}function Pk(r,s,a,f){return lr(r,function(g,M,T){s(f,a(g),M,T)}),f}function qs(r,s,a){s=Br(s,r),r=Dv(r,s);var f=r==null?r:r[cr(Wn(s))];return f==null?n:Tn(f,r,a)}function By(r){return ke(r)&&un(r)==V}function Qk(r){return ke(r)&&un(r)==je}function Fk(r){return ke(r)&&un(r)==wt}function _s(r,s,a,f,g){return r===s?!0:r==null||s==null||!ke(r)&&!ke(s)?r!==r&&s!==s:Bk(r,s,a,f,_s,g)}function Bk(r,s,a,f,g,M){var T=Vt(r),b=Vt(s),k=T?B:on(r),Y=b?B:on(s);k=k==V?$t:k,Y=Y==V?$t:Y;var W=k==$t,q=Y==$t,nt=k==Y;if(nt&&Wr(r)){if(!Wr(s))return!1;T=!0,W=!1}if(nt&&!W)return M||(M=new tr),T||Gi(r)?xv(r,s,a,f,g,M):g4(r,s,k,a,f,g,M);if(!(a&S)){var dt=W&&de.call(r,"__wrapped__"),St=q&&de.call(s,"__wrapped__");if(dt||St){var Yt=dt?r.value():r,Nt=St?s.value():s;return M||(M=new tr),g(Yt,Nt,a,f,M)}}return nt?(M||(M=new tr),m4(r,s,a,f,g,M)):!1}function Yk(r){return ke(r)&&on(r)==Et}function bf(r,s,a,f){var g=a.length,M=g,T=!f;if(r==null)return!M;for(r=me(r);g--;){var b=a[g];if(T&&b[2]?b[1]!==r[b[0]]:!(b[0]in r))return!1}for(;++g<M;){b=a[g];var k=b[0],Y=r[k],W=b[1];if(T&&b[2]){if(Y===n&&!(k in r))return!1}else{var q=new tr;if(f)var nt=f(Y,W,k,r,s,q);if(!(nt===n?_s(W,Y,S|A,f,q):nt))return!1}}return!0}function Yy(r){if(!De(r)||b4(r))return!1;var s=Er(r)?Yz:_t;return s.test(di(r))}function Wk(r){return ke(r)&&un(r)==ne}function qk(r){return ke(r)&&on(r)==ie}function _k(r){return ke(r)&&Ga(r.length)&&!!xe[un(r)]}function Wy(r){return typeof r=="function"?r:r==null?vn:typeof r=="object"?Vt(r)?Ky(r[0],r[1]):_y(r):dM(r)}function Sf(r){if(!Js(r))return Jz(r);var s=[];for(var a in me(r))de.call(r,a)&&a!="constructor"&&s.push(a);return s}function Kk(r){if(!De(r))return I4(r);var s=Js(r),a=[];for(var f in r)f=="constructor"&&(s||!de.call(r,f))||a.push(f);return a}function Nf(r,s){return r<s}function qy(r,s){var a=-1,f=mn(r)?U(r.length):[];return Qr(r,function(g,M,T){f[++a]=s(g,M,T)}),f}function _y(r){var s=Bf(r);return s.length==1&&s[0][2]?Sv(s[0][0],s[0][1]):function(a){return a===r||bf(a,r,s)}}function Ky(r,s){return Wf(r)&&bv(s)?Sv(cr(r),s):function(a){var f=td(a,r);return f===n&&f===s?ed(a,r):_s(s,f,S|A)}}function La(r,s,a,f,g){r!==s&&xf(s,function(M,T){if(g||(g=new tr),De(M))Hk(r,s,T,a,La,f,g);else{var b=f?f(_f(r,T),M,T+"",r,s,g):n;b===n&&(b=M),Mf(r,T,b)}},yn)}function Hk(r,s,a,f,g,M,T){var b=_f(r,a),k=_f(s,a),Y=T.get(k);if(Y){Mf(r,a,Y);return}var W=M?M(b,k,a+"",r,s,T):n,q=W===n;if(q){var nt=Vt(k),dt=!nt&&Wr(k),St=!nt&&!dt&&Gi(k);W=k,nt||dt||St?Vt(b)?W=b:Ue(b)?W=gn(b):dt?(q=!1,W=sv(k,!0)):St?(q=!1,W=ov(k,!0)):W=[]:Zs(k)||hi(k)?(W=b,hi(b)?W=nM(b):(!De(b)||Er(b))&&(W=Av(k))):q=!1}q&&(T.set(k,W),g(W,k,f,M,T),T.delete(k)),Mf(r,a,W)}function Hy(r,s){var a=r.length;if(a)return s+=s<0?a:0,Tr(s,a)?r[s]:n}function Jy(r,s,a){s.length?s=Ae(s,function(M){return Vt(M)?function(T){return ci(T,M.length===1?M[0]:M)}:M}):s=[vn];var f=-1;s=Ae(s,En(bt()));var g=qy(r,function(M,T,b){var k=Ae(s,function(Y){return Y(M)});return{criteria:k,index:++f,value:M}});return xz(g,function(M,T){return a4(M,T,a)})}function Jk(r,s){return Gy(r,s,function(a,f){return ed(r,f)})}function Gy(r,s,a){for(var f=-1,g=s.length,M={};++f<g;){var T=s[f],b=ci(r,T);a(b,T)&&Ks(M,Br(T,r),b)}return M}function Gk(r){return function(s){return ci(s,r)}}function Df(r,s,a,f){var g=f?wz:Pi,M=-1,T=s.length,b=r;for(r===s&&(s=gn(s)),a&&(b=Ae(r,En(a)));++M<T;)for(var k=0,Y=s[M],W=a?a(Y):Y;(k=g(b,W,k,f))>-1;)b!==r&&Aa.call(b,k,1),Aa.call(r,k,1);return r}function Zy(r,s){for(var a=r?s.length:0,f=a-1;a--;){var g=s[a];if(a==f||g!==M){var M=g;Tr(g)?Aa.call(r,g,1):kf(r,g)}}return r}function If(r,s){return r+Na(zy()*(s-r+1))}function Zk(r,s,a,f){for(var g=-1,M=We(Sa((s-r)/(a||1)),0),T=U(M);M--;)T[f?M:++g]=r,r+=a;return T}function Cf(r,s){var a="";if(!r||s<1||s>Lt)return a;do s%2&&(a+=r),s=Na(s/2),s&&(r+=r);while(s);return a}function Wt(r,s){return Kf(Nv(r,s,vn),r+"")}function Xk(r){return Ly(Zi(r))}function $k(r,s){var a=Zi(r);return Wa(a,ui(s,0,a.length))}function Ks(r,s,a,f){if(!De(r))return r;s=Br(s,r);for(var g=-1,M=s.length,T=M-1,b=r;b!=null&&++g<M;){var k=cr(s[g]),Y=a;if(k==="__proto__"||k==="constructor"||k==="prototype")return r;if(g!=T){var W=b[k];Y=f?f(W,k,b):n,Y===n&&(Y=De(W)?W:Tr(s[g+1])?[]:{})}Ys(b,k,Y),b=b[k]}return r}var Xy=Da?function(r,s){return Da.set(r,s),r}:vn,t4=ba?function(r,s){return ba(r,"toString",{configurable:!0,enumerable:!1,value:rd(s),writable:!0})}:vn;function e4(r){return Wa(Zi(r))}function Yn(r,s,a){var f=-1,g=r.length;s<0&&(s=-s>g?0:g+s),a=a>g?g:a,a<0&&(a+=g),g=s>a?0:a-s>>>0,s>>>=0;for(var M=U(g);++f<g;)M[f]=r[f+s];return M}function n4(r,s){var a;return Qr(r,function(f,g,M){return a=s(f,g,M),!a}),!!a}function ja(r,s,a){var f=0,g=r==null?f:r.length;if(typeof s=="number"&&s===s&&g<=R){for(;f<g;){var M=f+g>>>1,T=r[M];T!==null&&!bn(T)&&(a?T<=s:T<s)?f=M+1:g=M}return g}return zf(r,s,vn,a)}function zf(r,s,a,f){var g=0,M=r==null?0:r.length;if(M===0)return 0;s=a(s);for(var T=s!==s,b=s===null,k=bn(s),Y=s===n;g<M;){var W=Na((g+M)/2),q=a(r[W]),nt=q!==n,dt=q===null,St=q===q,Yt=bn(q);if(T)var Nt=f||St;else Y?Nt=St&&(f||nt):b?Nt=St&&nt&&(f||!dt):k?Nt=St&&nt&&!dt&&(f||!Yt):dt||Yt?Nt=!1:Nt=f?q<=s:q<s;Nt?g=W+1:M=W}return sn(M,I)}function $y(r,s){for(var a=-1,f=r.length,g=0,M=[];++a<f;){var T=r[a],b=s?s(T):T;if(!a||!er(b,k)){var k=b;M[g++]=T===0?0:T}}return M}function tv(r){return typeof r=="number"?r:bn(r)?at:+r}function An(r){if(typeof r=="string")return r;if(Vt(r))return Ae(r,An)+"";if(bn(r))return ky?ky.call(r):"";var s=r+"";return s=="0"&&1/r==-xt?"-0":s}function Fr(r,s,a){var f=-1,g=pa,M=r.length,T=!0,b=[],k=b;if(a)T=!1,g=of;else if(M>=o){var Y=s?null:h4(r);if(Y)return ma(Y);T=!1,g=Us,k=new li}else k=s?[]:b;t:for(;++f<M;){var W=r[f],q=s?s(W):W;if(W=a||W!==0?W:0,T&&q===q){for(var nt=k.length;nt--;)if(k[nt]===q)continue t;s&&k.push(q),b.push(W)}else g(k,q,a)||(k!==b&&k.push(q),b.push(W))}return b}function kf(r,s){return s=Br(s,r),r=Dv(r,s),r==null||delete r[cr(Wn(s))]}function ev(r,s,a,f){return Ks(r,s,a(ci(r,s)),f)}function Ra(r,s,a,f){for(var g=r.length,M=f?g:-1;(f?M--:++M<g)&&s(r[M],M,r););return a?Yn(r,f?0:M,f?M+1:g):Yn(r,f?M+1:0,f?g:M)}function nv(r,s){var a=r;return a instanceof Jt&&(a=a.value()),af(s,function(f,g){return g.func.apply(g.thisArg,Ur([f],g.args))},a)}function Of(r,s,a){var f=r.length;if(f<2)return f?Fr(r[0]):[];for(var g=-1,M=U(f);++g<f;)for(var T=r[g],b=-1;++b<f;)b!=g&&(M[g]=Ws(M[g]||T,r[b],s,a));return Fr($e(M,1),s,a)}function rv(r,s,a){for(var f=-1,g=r.length,M=s.length,T={};++f<g;){var b=f<M?s[f]:n;a(T,r[f],b)}return T}function Lf(r){return Ue(r)?r:[]}function jf(r){return typeof r=="function"?r:vn}function Br(r,s){return Vt(r)?r:Wf(r,s)?[r]:kv(ae(r))}var r4=Wt;function Yr(r,s,a){var f=r.length;return a=a===n?f:a,!s&&a>=f?r:Yn(r,s,a)}var iv=Wz||function(r){return Xe.clearTimeout(r)};function sv(r,s){if(s)return r.slice();var a=r.length,f=Sy?Sy(a):new r.constructor(a);return r.copy(f),f}function Rf(r){var s=new r.constructor(r.byteLength);return new Ta(s).set(new Ta(r)),s}function i4(r,s){var a=s?Rf(r.buffer):r.buffer;return new r.constructor(a,r.byteOffset,r.byteLength)}function s4(r){var s=new r.constructor(r.source,re.exec(r));return s.lastIndex=r.lastIndex,s}function o4(r){return Bs?me(Bs.call(r)):{}}function ov(r,s){var a=s?Rf(r.buffer):r.buffer;return new r.constructor(a,r.byteOffset,r.length)}function av(r,s){if(r!==s){var a=r!==n,f=r===null,g=r===r,M=bn(r),T=s!==n,b=s===null,k=s===s,Y=bn(s);if(!b&&!Y&&!M&&r>s||M&&T&&k&&!b&&!Y||f&&T&&k||!a&&k||!g)return 1;if(!f&&!M&&!Y&&r<s||Y&&a&&g&&!f&&!M||b&&a&&g||!T&&g||!k)return-1}return 0}function a4(r,s,a){for(var f=-1,g=r.criteria,M=s.criteria,T=g.length,b=a.length;++f<T;){var k=av(g[f],M[f]);if(k){if(f>=b)return k;var Y=a[f];return k*(Y=="desc"?-1:1)}}return r.index-s.index}function lv(r,s,a,f){for(var g=-1,M=r.length,T=a.length,b=-1,k=s.length,Y=We(M-T,0),W=U(k+Y),q=!f;++b<k;)W[b]=s[b];for(;++g<T;)(q||g<M)&&(W[a[g]]=r[g]);for(;Y--;)W[b++]=r[g++];return W}function uv(r,s,a,f){for(var g=-1,M=r.length,T=-1,b=a.length,k=-1,Y=s.length,W=We(M-b,0),q=U(W+Y),nt=!f;++g<W;)q[g]=r[g];for(var dt=g;++k<Y;)q[dt+k]=s[k];for(;++T<b;)(nt||g<M)&&(q[dt+a[T]]=r[g++]);return q}function gn(r,s){var a=-1,f=r.length;for(s||(s=U(f));++a<f;)s[a]=r[a];return s}function ur(r,s,a,f){var g=!a;a||(a={});for(var M=-1,T=s.length;++M<T;){var b=s[M],k=f?f(a[b],r[b],b,a,r):n;k===n&&(k=r[b]),g?Mr(a,b,k):Ys(a,b,k)}return a}function l4(r,s){return ur(r,Yf(r),s)}function u4(r,s){return ur(r,Tv(r),s)}function Ua(r,s){return function(a,f){var g=Vt(a)?pz:zk,M=s?s():{};return g(a,r,bt(f,2),M)}}function Ki(r){return Wt(function(s,a){var f=-1,g=a.length,M=g>1?a[g-1]:n,T=g>2?a[2]:n;for(M=r.length>3&&typeof M=="function"?(g--,M):n,T&&cn(a[0],a[1],T)&&(M=g<3?n:M,g=1),s=me(s);++f<g;){var b=a[f];b&&r(s,b,f,M)}return s})}function cv(r,s){return function(a,f){if(a==null)return a;if(!mn(a))return r(a,f);for(var g=a.length,M=s?g:-1,T=me(a);(s?M--:++M<g)&&f(T[M],M,T)!==!1;);return a}}function fv(r){return function(s,a,f){for(var g=-1,M=me(s),T=f(s),b=T.length;b--;){var k=T[r?b:++g];if(a(M[k],k,M)===!1)break}return s}}function c4(r,s,a){var f=s&P,g=Hs(r);function M(){var T=this&&this!==Xe&&this instanceof M?g:r;return T.apply(f?a:this,arguments)}return M}function dv(r){return function(s){s=ae(s);var a=Qi(s)?$n(s):n,f=a?a[0]:s.charAt(0),g=a?Yr(a,1).join(""):s.slice(1);return f[r]()+g}}function Hi(r){return function(s){return af(cM(uM(s).replace(tz,"")),r,"")}}function Hs(r){return function(){var s=arguments;switch(s.length){case 0:return new r;case 1:return new r(s[0]);case 2:return new r(s[0],s[1]);case 3:return new r(s[0],s[1],s[2]);case 4:return new r(s[0],s[1],s[2],s[3]);case 5:return new r(s[0],s[1],s[2],s[3],s[4]);case 6:return new r(s[0],s[1],s[2],s[3],s[4],s[5]);case 7:return new r(s[0],s[1],s[2],s[3],s[4],s[5],s[6])}var a=_i(r.prototype),f=r.apply(a,s);return De(f)?f:a}}function f4(r,s,a){var f=Hs(r);function g(){for(var M=arguments.length,T=U(M),b=M,k=Ji(g);b--;)T[b]=arguments[b];var Y=M<3&&T[0]!==k&&T[M-1]!==k?[]:Vr(T,k);if(M-=Y.length,M<a)return yv(r,s,Va,g.placeholder,n,T,Y,n,n,a-M);var W=this&&this!==Xe&&this instanceof g?f:r;return Tn(W,this,T)}return g}function hv(r){return function(s,a,f){var g=me(s);if(!mn(s)){var M=bt(a,3);s=_e(s),a=function(b){return M(g[b],b,g)}}var T=r(s,a,f);return T>-1?g[M?s[T]:T]:n}}function pv(r){return xr(function(s){var a=s.length,f=a,g=Fn.prototype.thru;for(r&&s.reverse();f--;){var M=s[f];if(typeof M!="function")throw new Qn(u);if(g&&!T&&Ba(M)=="wrapper")var T=new Fn([],!0)}for(f=T?f:a;++f<a;){M=s[f];var b=Ba(M),k=b=="wrapper"?Ff(M):n;k&&qf(k[0])&&k[1]==(G|z|Q|K)&&!k[4].length&&k[9]==1?T=T[Ba(k[0])].apply(T,k[3]):T=M.length==1&&qf(M)?T[b]():T.thru(M)}return function(){var Y=arguments,W=Y[0];if(T&&Y.length==1&&Vt(W))return T.plant(W).value();for(var q=0,nt=a?s[q].apply(this,Y):W;++q<a;)nt=s[q].call(this,nt);return nt}})}function Va(r,s,a,f,g,M,T,b,k,Y){var W=s&G,q=s&P,nt=s&j,dt=s&(z|Z),St=s&vt,Yt=nt?n:Hs(r);function Nt(){for(var Kt=arguments.length,Zt=U(Kt),Sn=Kt;Sn--;)Zt[Sn]=arguments[Sn];if(dt)var fn=Ji(Nt),Nn=Ez(Zt,fn);if(f&&(Zt=lv(Zt,f,g,dt)),M&&(Zt=uv(Zt,M,T,dt)),Kt-=Nn,dt&&Kt<Y){var Ve=Vr(Zt,fn);return yv(r,s,Va,Nt.placeholder,a,Zt,Ve,b,k,Y-Kt)}var nr=q?a:this,br=nt?nr[r]:r;return Kt=Zt.length,b?Zt=z4(Zt,b):St&&Kt>1&&Zt.reverse(),W&&k<Kt&&(Zt.length=k),this&&this!==Xe&&this instanceof Nt&&(br=Yt||Hs(br)),br.apply(nr,Zt)}return Nt}function gv(r,s){return function(a,f){return Pk(a,r,s(f),{})}}function Pa(r,s){return function(a,f){var g;if(a===n&&f===n)return s;if(a!==n&&(g=a),f!==n){if(g===n)return f;typeof a=="string"||typeof f=="string"?(a=An(a),f=An(f)):(a=tv(a),f=tv(f)),g=r(a,f)}return g}}function Uf(r){return xr(function(s){return s=Ae(s,En(bt())),Wt(function(a){var f=this;return r(s,function(g){return Tn(g,f,a)})})})}function Qa(r,s){s=s===n?" ":An(s);var a=s.length;if(a<2)return a?Cf(s,r):s;var f=Cf(s,Sa(r/Fi(s)));return Qi(s)?Yr($n(f),0,r).join(""):f.slice(0,r)}function d4(r,s,a,f){var g=s&P,M=Hs(r);function T(){for(var b=-1,k=arguments.length,Y=-1,W=f.length,q=U(W+k),nt=this&&this!==Xe&&this instanceof T?M:r;++Y<W;)q[Y]=f[Y];for(;k--;)q[Y++]=arguments[++b];return Tn(nt,g?a:this,q)}return T}function mv(r){return function(s,a,f){return f&&typeof f!="number"&&cn(s,a,f)&&(a=f=n),s=Ar(s),a===n?(a=s,s=0):a=Ar(a),f=f===n?s<a?1:-1:Ar(f),Zk(s,a,f,r)}}function Fa(r){return function(s,a){return typeof s=="string"&&typeof a=="string"||(s=qn(s),a=qn(a)),r(s,a)}}function yv(r,s,a,f,g,M,T,b,k,Y){var W=s&z,q=W?T:n,nt=W?n:T,dt=W?M:n,St=W?n:M;s|=W?Q:J,s&=~(W?J:Q),s&L||(s&=-4);var Yt=[r,s,g,dt,q,St,nt,b,k,Y],Nt=a.apply(n,Yt);return qf(r)&&Iv(Nt,Yt),Nt.placeholder=f,Cv(Nt,r,s)}function Vf(r){var s=Ye[r];return function(a,f){if(a=qn(a),f=f==null?0:sn(Bt(f),292),f&&Cy(a)){var g=(ae(a)+"e").split("e"),M=s(g[0]+"e"+(+g[1]+f));return g=(ae(M)+"e").split("e"),+(g[0]+"e"+(+g[1]-f))}return s(a)}}var h4=Wi&&1/ma(new Wi([,-0]))[1]==xt?function(r){return new Wi(r)}:od;function vv(r){return function(s){var a=on(s);return a==Et?pf(s):a==ie?Cz(s):Tz(s,r(s))}}function wr(r,s,a,f,g,M,T,b){var k=s&j;if(!k&&typeof r!="function")throw new Qn(u);var Y=f?f.length:0;if(Y||(s&=-97,f=g=n),T=T===n?T:We(Bt(T),0),b=b===n?b:Bt(b),Y-=g?g.length:0,s&J){var W=f,q=g;f=g=n}var nt=k?n:Ff(r),dt=[r,s,a,f,g,W,q,M,T,b];if(nt&&D4(dt,nt),r=dt[0],s=dt[1],a=dt[2],f=dt[3],g=dt[4],b=dt[9]=dt[9]===n?k?0:r.length:We(dt[9]-Y,0),!b&&s&(z|Z)&&(s&=-25),!s||s==P)var St=c4(r,s,a);else s==z||s==Z?St=f4(r,s,b):(s==Q||s==(P|Q))&&!g.length?St=d4(r,s,a,f):St=Va.apply(n,dt);var Yt=nt?Xy:Iv;return Cv(Yt(St,dt),r,s)}function Mv(r,s,a,f){return r===n||er(r,Yi[a])&&!de.call(f,a)?s:r}function wv(r,s,a,f,g,M){return De(r)&&De(s)&&(M.set(s,r),La(r,s,n,wv,M),M.delete(s)),r}function p4(r){return Zs(r)?n:r}function xv(r,s,a,f,g,M){var T=a&S,b=r.length,k=s.length;if(b!=k&&!(T&&k>b))return!1;var Y=M.get(r),W=M.get(s);if(Y&&W)return Y==s&&W==r;var q=-1,nt=!0,dt=a&A?new li:n;for(M.set(r,s),M.set(s,r);++q<b;){var St=r[q],Yt=s[q];if(f)var Nt=T?f(Yt,St,q,s,r,M):f(St,Yt,q,r,s,M);if(Nt!==n){if(Nt)continue;nt=!1;break}if(dt){if(!lf(s,function(Kt,Zt){if(!Us(dt,Zt)&&(St===Kt||g(St,Kt,a,f,M)))return dt.push(Zt)})){nt=!1;break}}else if(!(St===Yt||g(St,Yt,a,f,M))){nt=!1;break}}return M.delete(r),M.delete(s),nt}function g4(r,s,a,f,g,M,T){switch(a){case ln:if(r.byteLength!=s.byteLength||r.byteOffset!=s.byteOffset)return!1;r=r.buffer,s=s.buffer;case je:return!(r.byteLength!=s.byteLength||!M(new Ta(r),new Ta(s)));case X:case wt:case Ft:return er(+r,+s);case qt:return r.name==s.name&&r.message==s.message;case ne:case nn:return r==s+"";case Et:var b=pf;case ie:var k=f&S;if(b||(b=ma),r.size!=s.size&&!k)return!1;var Y=T.get(r);if(Y)return Y==s;f|=A,T.set(r,s);var W=xv(b(r),b(s),f,g,M,T);return T.delete(r),W;case Le:if(Bs)return Bs.call(r)==Bs.call(s)}return!1}function m4(r,s,a,f,g,M){var T=a&S,b=Pf(r),k=b.length,Y=Pf(s),W=Y.length;if(k!=W&&!T)return!1;for(var q=k;q--;){var nt=b[q];if(!(T?nt in s:de.call(s,nt)))return!1}var dt=M.get(r),St=M.get(s);if(dt&&St)return dt==s&&St==r;var Yt=!0;M.set(r,s),M.set(s,r);for(var Nt=T;++q<k;){nt=b[q];var Kt=r[nt],Zt=s[nt];if(f)var Sn=T?f(Zt,Kt,nt,s,r,M):f(Kt,Zt,nt,r,s,M);if(!(Sn===n?Kt===Zt||g(Kt,Zt,a,f,M):Sn)){Yt=!1;break}Nt||(Nt=nt=="constructor")}if(Yt&&!Nt){var fn=r.constructor,Nn=s.constructor;fn!=Nn&&"constructor"in r&&"constructor"in s&&!(typeof fn=="function"&&fn instanceof fn&&typeof Nn=="function"&&Nn instanceof Nn)&&(Yt=!1)}return M.delete(r),M.delete(s),Yt}function xr(r){return Kf(Nv(r,n,Rv),r+"")}function Pf(r){return Fy(r,_e,Yf)}function Qf(r){return Fy(r,yn,Tv)}var Ff=Da?function(r){return Da.get(r)}:od;function Ba(r){for(var s=r.name+"",a=qi[s],f=de.call(qi,s)?a.length:0;f--;){var g=a[f],M=g.func;if(M==null||M==r)return g.name}return s}function Ji(r){var s=de.call(y,"placeholder")?y:r;return s.placeholder}function bt(){var r=y.iteratee||id;return r=r===id?Wy:r,arguments.length?r(arguments[0],arguments[1]):r}function Ya(r,s){var a=r.__data__;return A4(s)?a[typeof s=="string"?"string":"hash"]:a.map}function Bf(r){for(var s=_e(r),a=s.length;a--;){var f=s[a],g=r[f];s[a]=[f,g,bv(g)]}return s}function fi(r,s){var a=Nz(r,s);return Yy(a)?a:n}function y4(r){var s=de.call(r,oi),a=r[oi];try{r[oi]=n;var f=!0}catch{}var g=wa.call(r);return f&&(s?r[oi]=a:delete r[oi]),g}var Yf=mf?function(r){return r==null?[]:(r=me(r),Rr(mf(r),function(s){return Dy.call(r,s)}))}:ad,Tv=mf?function(r){for(var s=[];r;)Ur(s,Yf(r)),r=Ea(r);return s}:ad,on=un;(yf&&on(new yf(new ArrayBuffer(1)))!=ln||Ps&&on(new Ps)!=Et||vf&&on(vf.resolve())!=Fe||Wi&&on(new Wi)!=ie||Qs&&on(new Qs)!=Me)&&(on=function(r){var s=un(r),a=s==$t?r.constructor:n,f=a?di(a):"";if(f)switch(f){case $z:return ln;case tk:return Et;case ek:return Fe;case nk:return ie;case rk:return Me}return s});function v4(r,s,a){for(var f=-1,g=a.length;++f<g;){var M=a[f],T=M.size;switch(M.type){case"drop":r+=T;break;case"dropRight":s-=T;break;case"take":s=sn(s,r+T);break;case"takeRight":r=We(r,s-T);break}}return{start:r,end:s}}function M4(r){var s=r.match(Jc);return s?s[1].split(Gc):[]}function Ev(r,s,a){s=Br(s,r);for(var f=-1,g=s.length,M=!1;++f<g;){var T=cr(s[f]);if(!(M=r!=null&&a(r,T)))break;r=r[T]}return M||++f!=g?M:(g=r==null?0:r.length,!!g&&Ga(g)&&Tr(T,g)&&(Vt(r)||hi(r)))}function w4(r){var s=r.length,a=new r.constructor(s);return s&&typeof r[0]=="string"&&de.call(r,"index")&&(a.index=r.index,a.input=r.input),a}function Av(r){return typeof r.constructor=="function"&&!Js(r)?_i(Ea(r)):{}}function x4(r,s,a){var f=r.constructor;switch(s){case je:return Rf(r);case X:case wt:return new f(+r);case ln:return i4(r,a);case wn:case xn:case ar:case Zn:case Xn:case pn:case O:case D:case _:return ov(r,a);case Et:return new f;case Ft:case nn:return new f(r);case ne:return s4(r);case ie:return new f;case Le:return o4(r)}}function T4(r,s){var a=s.length;if(!a)return r;var f=a-1;return s[f]=(a>1?"& ":"")+s[f],s=s.join(a>2?", ":" "),r.replace(Hc,`{
35
+ `;class Io{constructor(t,n){Pt(this,"_store",void 0),Pt(this,"_refCount",1),Pt(this,"getLoadable",i=>(this.checkRefCount_INTERNAL(),jS(this._store,i))),Pt(this,"getPromise",i=>(this.checkRefCount_INTERNAL(),this.getLoadable(i).toPromise())),Pt(this,"getNodes_UNSTABLE",i=>{if(this.checkRefCount_INTERNAL(),i?.isModified===!0){if(i?.isInitialized===!1)return[];const u=this._store.getState().currentTree;return Fg(u.dirtyAtoms)}const o=this._store.getState().knownAtoms,l=this._store.getState().knownSelectors;return i?.isInitialized==null?Qg.values():i.isInitialized===!0?Fg(Vg([o,l])):Ou(Qg.values(),({key:u})=>!o.has(u)&&!l.has(u))}),Pt(this,"getInfo_UNSTABLE",({key:i})=>(this.checkRefCount_INTERNAL(),CS(this._store,this._store.getState().currentTree,i))),Pt(this,"map",i=>{this.checkRefCount_INTERNAL();const o=new Pu(this,Vu);return i(o),o}),Pt(this,"asyncMap",async i=>{this.checkRefCount_INTERNAL();const o=new Pu(this,Vu);return o.retain(),await i(o),o.autoRelease_INTERNAL(),o}),this._store={storeID:kS(),parentStoreID:n,getState:()=>t,replaceState:i=>{t.currentTree=i(t.currentTree)},getGraph:i=>{const o=t.graphsByVersion;if(o.has(i))return Ee(o.get(i));const l=zS();return o.set(i,l),l},subscribeToTransactions:()=>({release:()=>{}}),addTransactionMetadata:()=>{throw Ot("Cannot subscribe to Snapshots")}};for(const i of this._store.getState().knownAtoms)IS(this._store,i,"get"),Do(this._store,i,1);this.autoRelease_INTERNAL()}retain(){if(this._refCount<=0){if(se.env.NODE_ENV!=="production")throw Ot("Snapshot has already been released.");en("Attempt to retain() Snapshot that was already released.")}this._refCount++;let t=!1;return()=>{t||(t=!0,this._release())}}autoRelease_INTERNAL(){QS||window.setTimeout(()=>this._release(),10)}_release(){if(this._refCount--,this._refCount===0){if(this._store.getState().nodeCleanupFunctions.forEach(t=>t()),this._store.getState().nodeCleanupFunctions.clear(),!ye("recoil_memory_managament_2020"))return}else this._refCount<0&&se.env.NODE_ENV!=="production"&&en("Snapshot released an extra time.")}isRetained(){return this._refCount>0}checkRefCount_INTERNAL(){ye("recoil_memory_managament_2020")&&this._refCount<=0&&se.env.NODE_ENV!=="production"&&en(BS)}getStore_INTERNAL(){return this.checkRefCount_INTERNAL(),this._store}getID(){return this.checkRefCount_INTERNAL(),this._store.getState().currentTree.stateID}getStoreID(){return this.checkRefCount_INTERNAL(),this._store.storeID}}function Yg(e,t,n=!1){const i=e.getState(),o=n?VS():t.version;return{currentTree:{version:n?o:t.version,stateID:n?o:t.stateID,transactionMetadata:{...t.transactionMetadata},dirtyAtoms:new Set(t.dirtyAtoms),atomValues:t.atomValues.clone(),nonvalidatedAtoms:t.nonvalidatedAtoms.clone()},commitDepth:0,nextTree:null,previousTree:null,knownAtoms:new Set(i.knownAtoms),knownSelectors:new Set(i.knownSelectors),transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:new Map().set(o,e.getGraph(t.version)),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map(Eo(i.nodeCleanupFunctions.entries(),([l])=>[l,()=>{}]))}}function YS(e){const t=new Io(PS());return e!=null?t.map(e):t}const[Wg,qg]=FS((e,t)=>{var n;const i=e.getState(),o=t==="latest"?(n=i.nextTree)!==null&&n!==void 0?n:i.currentTree:Ee(i.previousTree);return new Io(Yg(e,o),e.storeID)},(e,t)=>{var n,i;return String(t)+String(e.storeID)+String((n=e.getState().nextTree)===null||n===void 0?void 0:n.version)+String(e.getState().currentTree.version)+String((i=e.getState().previousTree)===null||i===void 0?void 0:i.version)});US(qg);function WS(e,t="latest"){const n=Wg(e,t);return n.isRetained()?n:(qg(),Wg(e,t))}class Pu extends Io{constructor(t,n){super(Yg(t.getStore_INTERNAL(),t.getStore_INTERNAL().getState().currentTree,!0),t.getStoreID()),Pt(this,"_batch",void 0),Pt(this,"set",(i,o)=>{this.checkRefCount_INTERNAL();const l=this.getStore_INTERNAL();this._batch(()=>{Do(l,i.key,1),Bg(this.getStore_INTERNAL(),i,o)})}),Pt(this,"reset",i=>{this.checkRefCount_INTERNAL();const o=this.getStore_INTERNAL();this._batch(()=>{Do(o,i.key,1),Bg(this.getStore_INTERNAL(),i,OS)})}),Pt(this,"setUnvalidatedAtomValues_DEPRECATED",i=>{this.checkRefCount_INTERNAL();const o=this.getStore_INTERNAL();Vu(()=>{for(const[l,u]of i.entries())Do(o,l,1),RS(o,new LS(l),u)})}),this._batch=n}}var Co={Snapshot:Io,MutableSnapshot:Pu,freshSnapshot:YS,cloneSnapshot:WS},qS=Co.Snapshot,_S=Co.MutableSnapshot,KS=Co.freshSnapshot,HS=Co.cloneSnapshot,zo=Object.freeze({__proto__:null,Snapshot:qS,MutableSnapshot:_S,freshSnapshot:KS,cloneSnapshot:HS});function JS(...e){const t=new Set;for(const n of e)for(const i of n)t.add(i);return t}var GS=JS;const{useRef:ZS}=x;function XS(e){const t=ZS(e);return t.current===e&&typeof e=="function"&&(t.current=e()),t}var _g=XS;const{getNextTreeStateVersion:$S,makeEmptyStoreState:Kg}=Mg,{cleanUpNode:t1,getDownstreamNodes:e1,initializeNode:n1,setNodeValue:r1,setUnvalidatedAtomValue_DEPRECATED:i1}=ti,{graph:s1}=Ms,{cloneGraph:o1}=Ms,{getNextStoreID:Hg}=bo,{createMutableSource:Qu,reactMode:Jg}=bu,{applyAtomValueWrites:a1}=pr,{releaseScheduledRetainablesNow:Gg}=Ci,{freshSnapshot:l1}=zo,{useCallback:u1,useContext:Zg,useEffect:Fu,useMemo:c1,useRef:f1,useState:d1}=x;function Ts(){throw Ot("This component must be used inside a <RecoilRoot> component.")}const Xg=Object.freeze({storeID:Hg(),getState:Ts,replaceState:Ts,getGraph:Ts,subscribeToTransactions:Ts,addTransactionMetadata:Ts});let Bu=!1;function $g(e){if(Bu)throw Ot("An atom update was triggered within the execution of a state updater function. State updater functions provided to Recoil must be pure functions.");const t=e.getState();if(t.nextTree===null){ye("recoil_memory_managament_2020")&&ye("recoil_release_on_cascading_update_killswitch_2021")&&t.commitDepth>0&&Gg(e);const n=t.currentTree.version,i=$S();t.nextTree={...t.currentTree,version:i,stateID:i,dirtyAtoms:new Set,transactionMetadata:{}},t.graphsByVersion.set(i,o1(Ee(t.graphsByVersion.get(n))))}}const tm=x.createContext({current:Xg}),Yu=()=>Zg(tm),em=x.createContext(null);function h1(){const e=Zg(em);return e==null&&Nu("Attempted to use a Recoil hook outside of a <RecoilRoot>. <RecoilRoot> must be an ancestor of any component that uses Recoil hooks."),e}function nm(e,t,n){const i=e1(e,n,n.dirtyAtoms);for(const o of i){const l=t.nodeToComponentSubscriptions.get(o);if(l)for(const[u,[c,d]]of l)d(n)}}function p1(e){const t=e.getState(),n=t.currentTree,i=n.dirtyAtoms;if(i.size){for(const[o,l]of t.nodeTransactionSubscriptions)if(i.has(o))for(const[u,c]of l)c(e);for(const[o,l]of t.transactionSubscriptions)l(e);(!Jg().early||t.suspendedComponentResolvers.size>0)&&(nm(e,t,n),t.suspendedComponentResolvers.forEach(o=>o()),t.suspendedComponentResolvers.clear())}t.queuedComponentCallbacks_DEPRECATED.forEach(o=>o(n)),t.queuedComponentCallbacks_DEPRECATED.splice(0,t.queuedComponentCallbacks_DEPRECATED.length)}function g1(e){const t=e.getState();t.commitDepth++;try{const{nextTree:n}=t;if(n==null)return;t.previousTree=t.currentTree,t.currentTree=n,t.nextTree=null,p1(e),t.previousTree!=null?t.graphsByVersion.delete(t.previousTree.version):en("Ended batch with no previous state, which is unexpected","recoil"),t.previousTree=null,ye("recoil_memory_managament_2020")&&n==null&&Gg(e)}finally{t.commitDepth--}}function m1({setNotifyBatcherOfChange:e}){const t=Yu(),[,n]=d1([]);return e(()=>n({})),Fu(()=>(e(()=>n({})),()=>{e(()=>{})}),[e]),Fu(()=>{nb.enqueueExecution("Batcher",()=>{g1(t.current)})}),null}se.env.NODE_ENV!=="production"&&typeof window<"u"&&!window.$recoilDebugStates&&(window.$recoilDebugStates=[]);function y1(e,t){const n=Kg();return t({set:(i,o)=>{const l=n.currentTree,u=r1(e,l,i.key,o),c=new Set(u.keys()),d=l.nonvalidatedAtoms.clone();for(const h of c)d.delete(h);n.currentTree={...l,dirtyAtoms:GS(l.dirtyAtoms,c),atomValues:a1(l.atomValues,u),nonvalidatedAtoms:d}},setUnvalidatedAtomValues:i=>{i.forEach((o,l)=>{n.currentTree=i1(n.currentTree,l,o)})}}),n}function v1(e){const t=l1(e),n=t.getStore_INTERNAL().getState();return t.retain(),n.nodeCleanupFunctions.forEach(i=>i()),n.nodeCleanupFunctions.clear(),n}let rm=0;function M1({initializeState_DEPRECATED:e,initializeState:t,store_INTERNAL:n,children:i}){let o;const l=v=>{const S=o.current.graphsByVersion;if(S.has(v))return Ee(S.get(v));const A=s1();return S.set(v,A),A},u=(v,S)=>{if(S==null){const{transactionSubscriptions:A}=m.current.getState(),P=rm++;return A.set(P,v),{release:()=>{A.delete(P)}}}else{const{nodeTransactionSubscriptions:A}=m.current.getState();A.has(S)||A.set(S,new Map);const P=rm++;return Ee(A.get(S)).set(P,v),{release:()=>{const j=A.get(S);j&&(j.delete(P),j.size===0&&A.delete(S))}}}},c=v=>{$g(m.current);for(const S of Object.keys(v))Ee(m.current.getState().nextTree).transactionMetadata[S]=v[S]},d=v=>{$g(m.current);const S=Ee(o.current.nextTree);let A;try{Bu=!0,A=v(S)}finally{Bu=!1}A!==S&&(se.env.NODE_ENV!=="production"&&typeof window<"u"&&window.$recoilDebugStates.push(A),o.current.nextTree=A,Jg().early&&nm(m.current,o.current,A),Ee(h.current)())},h=f1(null),p=u1(v=>{h.current=v},[h]),m=_g(()=>n??{storeID:Hg(),getState:()=>o.current,replaceState:d,getGraph:l,subscribeToTransactions:u,addTransactionMetadata:c});n!=null&&(m.current=n),o=_g(()=>e!=null?y1(m.current,e):t!=null?v1(t):Kg());const w=c1(()=>Qu?.(o,()=>o.current.currentTree.version),[o]);return Fu(()=>{const v=m.current;for(const S of new Set(v.getState().knownAtoms))n1(v,S,"get");return()=>{for(const S of v.getState().knownAtoms)t1(v,S)}},[m]),x.createElement(tm.Provider,{value:m},x.createElement(em.Provider,{value:w},x.createElement(m1,{setNotifyBatcherOfChange:p}),i))}function w1(e){const{override:t,...n}=e,i=Yu();return t===!1&&i.current!==Xg?e.children:x.createElement(M1,n)}var Wu={RecoilRoot:w1,useStoreRef:Yu,useRecoilMutableSource:h1};function x1(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0,i=e.length;n<i;n++)if(e[n]!==t[n])return!1;return!0}var T1=x1;const{useEffect:E1,useRef:A1}=x;function b1(e){const t=A1();return E1(()=>{t.current=e}),t.current}var S1=b1;const{useStoreRef:N1}=Wu,{SUSPENSE_TIMEOUT_MS:D1}=Ci,{updateRetainCount:Es}=Ci,{RetentionZone:I1}=ku,{useEffect:C1,useRef:z1}=x,{isSSR:im}=No;function k1(e){if(ye("recoil_memory_managament_2020"))return O1(e)}function O1(e){const n=(Array.isArray(e)?e:[e]).map(u=>u instanceof I1?u:u.key),i=N1();C1(()=>{if(!ye("recoil_memory_managament_2020"))return;const u=i.current;if(o.current&&!im)window.clearTimeout(o.current),o.current=null;else for(const c of n)Es(u,c,1);return()=>{for(const c of n)Es(u,c,-1)}},[i,...n]);const o=z1(),l=S1(n);if(!im&&(l===void 0||!T1(l,n))){const u=i.current;for(const c of n)Es(u,c,1);if(l)for(const c of l)Es(u,c,-1);o.current&&window.clearTimeout(o.current),o.current=window.setTimeout(()=>{o.current=null;for(const c of n)Es(u,c,-1)},D1)}}var L1=k1;function j1(){return"<component name not available>"}var ko=j1;const{DEFAULT_VALUE:R1}=Mn,{currentRendererSupportsUseSyncExternalStore:U1,reactMode:As,useMutableSource:V1,useSyncExternalStore:P1}=bu,{useRecoilMutableSource:Q1,useStoreRef:ei}=Wu,{isRecoilValue:F1}=$r,{getRecoilValueAsLoadable:Oo,setRecoilValue:sm,subscribeToRecoilValue:Lo}=pr,{useCallback:kn,useEffect:jo,useMemo:B1,useRef:om,useState:am}=x,{isSSR:Y1}=No;function W1(e,t,n){if(e.state==="hasValue")return e.contents;throw e.state==="loading"?new Promise(o=>{const l=n.current.getState().suspendedComponentResolvers;l.add(o),Y1&&ge(e.contents)&&e.contents.finally(()=>{l.delete(o)})}):e.state==="hasError"?e.contents:Ot(`Invalid value of loadable atom "${t.key}"`)}function bs(e,t){if(!F1(e))throw Ot(`Invalid argument to ${t}: expected an atom or selector but got ${String(e)}`)}function q1(e){const t=ei(),n=ko(),i=kn(()=>{var c;se.env.NODE_ENV;const d=t.current,h=d.getState(),p=As().early&&(c=h.nextTree)!==null&&c!==void 0?c:h.currentTree;return{loadable:Oo(d,e,p),key:e.key}},[t,e]),o=kn(c=>{let d;return()=>{var h,p;const m=c();return(h=d)!==null&&h!==void 0&&h.loadable.is(m.loadable)&&((p=d)===null||p===void 0?void 0:p.key)===m.key?d:(d=m,m)}},[]),l=B1(()=>o(i),[i,o]),u=kn(c=>{const d=t.current;return Lo(d,e,c,n).release},[t,e,n]);return P1(u,l,l).loadable}function _1(e){const t=ei(),n=kn(()=>{var h;const p=t.current,m=p.getState(),w=As().early&&(h=m.nextTree)!==null&&h!==void 0?h:m.currentTree;return Oo(p,e,w)},[t,e]),i=kn(()=>(se.env.NODE_ENV,n()),[n]),o=ko(),l=kn((h,p)=>{const m=t.current;return Lo(m,e,()=>{if(!ye("recoil_suppress_rerender_in_callback"))return p();const v=n();d.current.is(v)||p(),d.current=v},o).release},[t,e,o,n]),u=Q1();if(u==null)throw Ot("Recoil hooks must be used in components contained within a <RecoilRoot> component.");const c=V1(u,i,l),d=om(c);return jo(()=>{d.current=c}),c}function lm(e){const t=ei(),n=ko(),i=kn(()=>{var d;se.env.NODE_ENV;const h=t.current,p=h.getState(),m=As().early&&(d=p.nextTree)!==null&&d!==void 0?d:p.currentTree;return Oo(h,e,m)},[t,e]),o=kn(()=>({loadable:i(),key:e.key}),[i,e.key]),l=kn(d=>{const h=o();return d.loadable.is(h.loadable)&&d.key===h.key?d:h},[o]);jo(()=>{const d=Lo(t.current,e,h=>{c(l)},n);return c(l),d.release},[n,e,t,l]);const[u,c]=am(o);return u.key!==e.key?o().loadable:u.loadable}function K1(e){const t=ei(),[,n]=am([]),i=ko(),o=kn(()=>{var c;se.env.NODE_ENV;const d=t.current,h=d.getState(),p=As().early&&(c=h.nextTree)!==null&&c!==void 0?c:h.currentTree;return Oo(d,e,p)},[t,e]),l=o(),u=om(l);return jo(()=>{u.current=l}),jo(()=>{const c=t.current,d=c.getState(),h=Lo(c,e,m=>{var w;if(!ye("recoil_suppress_rerender_in_callback"))return n([]);const v=o();(w=u.current)!==null&&w!==void 0&&w.is(v)||n(v),u.current=v},i);if(d.nextTree)c.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{u.current=null,n([])});else{var p;if(!ye("recoil_suppress_rerender_in_callback"))return n([]);const m=o();(p=u.current)!==null&&p!==void 0&&p.is(m)||n(m),u.current=m}return h.release},[i,o,e,t]),l}function H1(e){return se.env.NODE_ENV!=="production"&&bs(e,"useRecoilValueLoadable"),ye("recoil_memory_managament_2020")&&L1(e),{TRANSITION_SUPPORT:lm,SYNC_EXTERNAL_STORE:U1()?q1:lm,MUTABLE_SOURCE:_1,LEGACY:K1}[As().mode](e)}function um(e){se.env.NODE_ENV!=="production"&&bs(e,"useRecoilValue");const t=ei(),n=H1(e);return W1(n,e,t)}function cm(e){se.env.NODE_ENV!=="production"&&bs(e,"useSetRecoilState");const t=ei();return kn(n=>{sm(t.current,e,n)},[t,e])}function J1(e){se.env.NODE_ENV!=="production"&&bs(e,"useResetRecoilState");const t=ei();return kn(()=>{sm(t.current,e,R1)},[t,e])}function G1(e){return se.env.NODE_ENV!=="production"&&bs(e,"useRecoilState"),[um(e),cm(e)]}var Z1={useRecoilState:G1,useRecoilValue:um,useResetRecoilState:J1,useSetRecoilState:cm};const{batchUpdates:X1}=Uu,{DEFAULT_VALUE:$1,getNode:tN}=Mn,{AbstractRecoilValue:eN,setRecoilValueLoadable:nN}=pr,{cloneSnapshot:e3}=zo,{useCallback:n3,useEffect:r3,useRef:i3,useState:s3}=x;function rN(e,t){var n;const i=e.getState(),o=(n=i.nextTree)!==null&&n!==void 0?n:i.currentTree,l=t.getStore_INTERNAL().getState().currentTree;X1(()=>{const u=new Set;for(const h of[o.atomValues.keys(),l.atomValues.keys()])for(const p of h){var c,d;((c=o.atomValues.get(p))===null||c===void 0?void 0:c.contents)!==((d=l.atomValues.get(p))===null||d===void 0?void 0:d.contents)&&tN(p).shouldRestoreFromSnapshots&&u.add(p)}u.forEach(h=>{nN(e,new eN(h),l.atomValues.has(h)?Ee(l.atomValues.get(h)):$1)}),e.replaceState(h=>({...h,stateID:t.getID()}))})}var iN={gotoSnapshot:rN};const{useMemo:o3}=x,{loadableWithValue:sN}=ys,{initializeNode:oN}=ti,{DEFAULT_VALUE:aN,getNode:lN}=Mn,{copyTreeState:uN,getRecoilValueAsLoadable:cN,invalidateDownstreams:fN,writeLoadableToTreeState:dN}=pr;function fm(e){return lN(e.key).nodeType==="atom"}class hN{constructor(t,n){Pt(this,"_store",void 0),Pt(this,"_treeState",void 0),Pt(this,"_changes",void 0),Pt(this,"get",i=>{if(this._changes.has(i.key))return this._changes.get(i.key);if(!fm(i))throw Ot("Reading selectors within atomicUpdate is not supported");const o=cN(this._store,i,this._treeState);if(o.state==="hasValue")return o.contents;throw o.state==="hasError"?o.contents:Ot(`Expected Recoil atom ${i.key} to have a value, but it is in a loading state.`)}),Pt(this,"set",(i,o)=>{if(!fm(i))throw Ot("Setting selectors within atomicUpdate is not supported");if(typeof o=="function"){const l=this.get(i);this._changes.set(i.key,o(l))}else oN(this._store,i.key,"set"),this._changes.set(i.key,o)}),Pt(this,"reset",i=>{this.set(i,aN)}),this._store=t,this._treeState=n,this._changes=new Map}newTreeState_INTERNAL(){if(this._changes.size===0)return this._treeState;const t=uN(this._treeState);for(const[n,i]of this._changes)dN(t,n,sN(i));return fN(this._store,t),t}}function pN(e){return t=>{e.replaceState(n=>{const i=new hN(e,n);return t(i),i.newTreeState_INTERNAL()})}}var gN={atomicUpdater:pN},mN=gN.atomicUpdater,dm=Object.freeze({__proto__:null,atomicUpdater:mN});function yN(e,t){if(!e)throw new Error(t)}var vN=yN,ir=vN;const{atomicUpdater:MN}=dm,{batchUpdates:wN}=Uu,{DEFAULT_VALUE:xN}=Mn,{refreshRecoilValue:TN,setRecoilValue:hm}=pr,{cloneSnapshot:EN}=zo,{gotoSnapshot:AN}=iN,{useCallback:a3}=x;class pm{}const bN=new pm;function SN(e,t,n,i){let o=bN,l;if(wN(()=>{const c="useRecoilCallback() expects a function that returns a function: it accepts a function of the type (RecoilInterface) => (Args) => ReturnType and returns a callback function (Args) => ReturnType, where RecoilInterface is an object {snapshot, set, ...} and Args and ReturnType are the argument and return types of the callback you want to create. Please see the docs at recoiljs.org for details.";if(typeof t!="function")throw Ot(c);const d=wg({...i??{},set:(p,m)=>hm(e,p,m),reset:p=>hm(e,p,xN),refresh:p=>TN(e,p),gotoSnapshot:p=>AN(e,p),transact_UNSTABLE:p=>MN(e)(p)},{snapshot:()=>{const p=EN(e);return l=p.retain(),p}}),h=t(d);if(typeof h!="function")throw Ot(c);o=h(...n)}),o instanceof pm&&(se.env.NODE_ENV!=="production"?ir(!1,"batchUpdates should return immediately"):ir(!1)),ge(o))o=o.finally(()=>{var c;(c=l)===null||c===void 0||c()});else{var u;(u=l)===null||u===void 0||u()}return o}var NN={recoilCallback:SN};const{useCallback:l3}=x,{atomicUpdater:u3}=dm,{useMemo:c3}=x;class DN{constructor(t){Pt(this,"value",void 0),this.value=t}}var IN={WrappedValue:DN},CN=IN.WrappedValue,gm=Object.freeze({__proto__:null,WrappedValue:CN});class mm extends Error{}class zN{constructor(t){var n,i,o;Pt(this,"_name",void 0),Pt(this,"_numLeafs",void 0),Pt(this,"_root",void 0),Pt(this,"_onHit",void 0),Pt(this,"_onSet",void 0),Pt(this,"_mapNodeValue",void 0),this._name=t?.name,this._numLeafs=0,this._root=null,this._onHit=(n=t?.onHit)!==null&&n!==void 0?n:()=>{},this._onSet=(i=t?.onSet)!==null&&i!==void 0?i:()=>{},this._mapNodeValue=(o=t?.mapNodeValue)!==null&&o!==void 0?o:l=>l}size(){return this._numLeafs}root(){return this._root}get(t,n){var i;return(i=this.getLeafNode(t,n))===null||i===void 0?void 0:i.value}getLeafNode(t,n){if(this._root==null)return;let i=this._root;for(;i;){if(n?.onNodeVisit(i),i.type==="leaf")return this._onHit(i),i;const o=this._mapNodeValue(t(i.nodeKey));i=i.branches.get(o)}}set(t,n,i){const o=()=>{var l,u,c,d;let h,p;for(const[P,j]of t){var m,w,v;const L=this._root;if(L?.type==="leaf")throw this.invalidCacheError();const z=h;if(h=z?z.branches.get(p):L,h=(m=h)!==null&&m!==void 0?m:{type:"branch",nodeKey:P,parent:z,branches:new Map,branchKey:p},h.type!=="branch"||h.nodeKey!==P)throw this.invalidCacheError();z?.branches.set(p,h),i==null||(w=i.onNodeVisit)===null||w===void 0||w.call(i,h),p=this._mapNodeValue(j),this._root=(v=this._root)!==null&&v!==void 0?v:h}const S=h?(l=h)===null||l===void 0?void 0:l.branches.get(p):this._root;if(S!=null&&(S.type!=="leaf"||S.branchKey!==p))throw this.invalidCacheError();const A={type:"leaf",value:n,parent:h,branchKey:p};(u=h)===null||u===void 0||u.branches.set(p,A),this._root=(c=this._root)!==null&&c!==void 0?c:A,this._numLeafs++,this._onSet(A),i==null||(d=i.onNodeVisit)===null||d===void 0||d.call(i,A)};try{o()}catch(l){if(l instanceof mm)this.clear(),o();else throw l}}delete(t){const n=this.root();if(!n)return!1;if(t===n)return this._root=null,this._numLeafs=0,!0;let i=t.parent,o=t.branchKey;for(;i;){var l;if(i.branches.delete(o),i===n)return i.branches.size===0?(this._root=null,this._numLeafs=0):this._numLeafs--,!0;if(i.branches.size>0)break;o=(l=i)===null||l===void 0?void 0:l.branchKey,i=i.parent}for(;i!==n;i=i.parent)if(i==null)return!1;return this._numLeafs--,!0}clear(){this._numLeafs=0,this._root=null}invalidCacheError(){throw en("Invalid cache values. This happens when selectors do not return consistent values for the same input dependency values. That may also be caused when using Fast Refresh to change a selector implementation. Resetting cache."+(this._name!=null?` - ${this._name}`:"")),new mm}}var kN={TreeCache:zN},ON=kN.TreeCache,ym=Object.freeze({__proto__:null,TreeCache:ON});class LN{constructor(t){var n;Pt(this,"_maxSize",void 0),Pt(this,"_size",void 0),Pt(this,"_head",void 0),Pt(this,"_tail",void 0),Pt(this,"_map",void 0),Pt(this,"_keyMapper",void 0),this._maxSize=t.maxSize,this._size=0,this._head=null,this._tail=null,this._map=new Map,this._keyMapper=(n=t.mapKey)!==null&&n!==void 0?n:i=>i}head(){return this._head}tail(){return this._tail}size(){return this._size}maxSize(){return this._maxSize}has(t){return this._map.has(this._keyMapper(t))}get(t){const n=this._keyMapper(t),i=this._map.get(n);if(i)return this.set(t,i.value),i.value}set(t,n){const i=this._keyMapper(t);this._map.get(i)&&this.delete(t);const l=this.head(),u={key:t,right:l,left:null,value:n};l?l.left=u:this._tail=u,this._map.set(i,u),this._head=u,this._size++,this._maybeDeleteLRU()}_maybeDeleteLRU(){this.size()>this.maxSize()&&this.deleteLru()}deleteLru(){const t=this.tail();t&&this.delete(t.key)}delete(t){const n=this._keyMapper(t);if(!this._size||!this._map.has(n))return;const i=Ee(this._map.get(n)),o=i.right,l=i.left;o&&(o.left=i.left),l&&(l.right=i.right),i===this.head()&&(this._head=o),i===this.tail()&&(this._tail=l),this._map.delete(n),this._size--}clear(){this._size=0,this._head=null,this._tail=null,this._map=new Map}}var jN={LRUCache:LN},RN=jN.LRUCache,vm=Object.freeze({__proto__:null,LRUCache:RN});const{LRUCache:UN}=vm,{TreeCache:VN}=ym;function PN({name:e,maxSize:t,mapNodeValue:n=i=>i}){const i=new UN({maxSize:t}),o=new VN({name:e,mapNodeValue:n,onHit:l=>{i.set(l,!0)},onSet:l=>{const u=i.tail();i.set(l,!0),u&&o.size()>t&&o.delete(u.key)}});return o}var Mm=PN;const QN=15;function On(e,t,n){if(typeof e=="string"&&!e.includes('"')&&!e.includes("\\"))return`"${e}"`;switch(typeof e){case"undefined":return"";case"boolean":return e?"true":"false";case"number":case"symbol":return String(e);case"string":return JSON.stringify(e);case"function":if(t?.allowFunctions!==!0)throw Ot("Attempt to serialize function in a Recoil cache key");return`__FUNCTION(${e.name})__`}if(e===null)return"null";if(typeof e!="object"){var i;return(i=JSON.stringify(e))!==null&&i!==void 0?i:""}if(ge(e))return"__PROMISE__";if(Array.isArray(e))return`[${e.map((o,l)=>On(o,t,l.toString()))}]`;if(typeof e.toJSON=="function")return On(e.toJSON(n),t,n);if(e instanceof Map){const o={};for(const[l,u]of e)o[typeof l=="string"?l:On(l,t)]=u;return On(o,t,n)}return e instanceof Set?On(Array.from(e).sort((o,l)=>On(o,t).localeCompare(On(l,t))),t,n):Symbol!==void 0&&e[Symbol.iterator]!=null&&typeof e[Symbol.iterator]=="function"?On(Array.from(e),t,n):`{${Object.keys(e).filter(o=>e[o]!==void 0).sort().map(o=>`${On(o,t)}:${On(e[o],t,o)}`).join(",")}}`}function FN(e,t={allowFunctions:!1}){if(se.env.NODE_ENV!=="production"&&typeof window<"u"){const n=window.performance?window.performance.now():0,i=On(e,t),o=window.performance?window.performance.now():0;return o-n>QN&&(console.groupCollapsed(`Recoil: Spent ${o-n}ms computing a cache key`),console.warn(e,i),console.groupEnd()),i}return On(e,t)}var qu=FN;const{TreeCache:BN}=ym,Ro={equality:"reference",eviction:"keep-all",maxSize:1/0};function YN({equality:e=Ro.equality,eviction:t=Ro.eviction,maxSize:n=Ro.maxSize}=Ro,i){const o=WN(e);return qN(t,n,o,i)}function WN(e){switch(e){case"reference":return t=>t;case"value":return t=>qu(t)}throw Ot(`Unrecognized equality policy ${e}`)}function qN(e,t,n,i){switch(e){case"keep-all":return new BN({name:i,mapNodeValue:n});case"lru":return Mm({name:i,maxSize:Ee(t),mapNodeValue:n});case"most-recent":return Mm({name:i,maxSize:1,mapNodeValue:n})}throw Ot(`Unrecognized eviction policy ${e}`)}var _N=YN;function KN(e){var t,n;if(typeof window>"u")return!1;const o=(n=(e!=null?(t=e.ownerDocument)!==null&&t!==void 0?t:e:document).defaultView)!==null&&n!==void 0?n:window;return e!=null&&(typeof o.Node=="function"?e instanceof o.Node:typeof e=="object"&&typeof e.nodeType=="number"&&typeof e.nodeName=="string")}var HN=KN;const{isReactNative:JN,isWindow:GN}=No;function ZN(e){if(e===null||typeof e!="object")return!0;switch(typeof e.$$typeof){case"symbol":return!0;case"number":return!0}return!!(e["@@__IMMUTABLE_ITERABLE__@@"]!=null||e["@@__IMMUTABLE_KEYED__@@"]!=null||e["@@__IMMUTABLE_INDEXED__@@"]!=null||e["@@__IMMUTABLE_ORDERED__@@"]!=null||e["@@__IMMUTABLE_RECORD__@@"]!=null||HN(e)||ge(e)||e instanceof Error||ArrayBuffer.isView(e)||!JN&&GN(e))}function wm(e){if(!(typeof e!="object"||ZN(e))){Object.freeze(e);for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];typeof n=="object"&&n!=null&&!Object.isFrozen(n)&&wm(n)}Object.seal(e)}}var _u=wm;const{isLoadable:XN,loadableWithError:Uo,loadableWithPromise:$N,loadableWithValue:Ku}=ys,{WrappedValue:xm}=gm,{getNodeLoadable:Vo,peekNodeLoadable:tD,setNodeValue:eD}=ti,{saveDepsToStore:nD}=Ms,{DEFAULT_VALUE:rD,getConfigDeletionHandler:iD,getNode:sD,registerNode:Tm}=Mn,{isRecoilValue:oD}=$r,{markRecoilValueModified:Em}=pr,{retainedByOptionWithDefault:aD}=Ci,{recoilCallback:lD}=NN;class Am{}const Ss=new Am,Ns=[],Po=new Map,uD=(()=>{let e=0;return()=>e++})();function bm(e){let t=null;const{key:n,get:i,cachePolicy_UNSTABLE:o}=e,l=e.set!=null?e.set:void 0;if(se.env.NODE_ENV!=="production"){if(typeof n!="string")throw Ot("A key option with a unique string value must be provided when creating a selector.");if(typeof i!="function")throw Ot("Selectors must specify a get callback option to get the selector value.")}const u=new Set,c=_N(o??{equality:"reference",eviction:"keep-all"},n),d=aD(e.retainedBy_UNSTABLE),h=new Map;let p=0;function m(){return!ye("recoil_memory_managament_2020")||p>0}function w(I){return I.getState().knownSelectors.add(n),p++,()=>{p--}}function v(){return iD(n)!==void 0&&!m()}function S(I,R,N,V,B){Xt(R,V,B),A(I,N)}function A(I,R){Mt(I,R)&&Tt(I),j(R,!0)}function P(I,R){Mt(I,R)&&(Ee(ft(I)).stateVersions.clear(),j(R,!1))}function j(I,R){const N=Po.get(I);if(N!=null){for(const V of N)Em(V,Ee(t));R&&Po.delete(I)}}function L(I,R){let N=Po.get(R);N==null&&Po.set(R,N=new Set),N.add(I)}function z(I,R,N,V,B,$){return R.then(X=>{if(!m())throw Tt(I),Ss;const wt=Ku(X);return S(I,N,B,wt,V),X}).catch(X=>{if(!m())throw Tt(I),Ss;if(ge(X))return Z(I,X,N,V,B,$);const wt=Uo(X);throw S(I,N,B,wt,V),X})}function Z(I,R,N,V,B,$){return R.then(X=>{if(!m())throw Tt(I),Ss;$.loadingDepKey!=null&&$.loadingDepPromise===R?N.atomValues.set($.loadingDepKey,Ku(X)):I.getState().knownSelectors.forEach(Ut=>{N.atomValues.delete(Ut)});const wt=G(I,N);if(wt&&wt.state!=="loading"){if((Mt(I,B)||ft(I)==null)&&A(I,B),wt.state==="hasValue")return wt.contents;throw wt.contents}if(!Mt(I,B)){const Ut=vt(I,N);if(Ut!=null)return Ut.loadingLoadable.contents}const[kt,qt]=J(I,N,B);if(kt.state!=="loading"&&S(I,N,B,kt,qt),kt.state==="hasError")throw kt.contents;return kt.contents}).catch(X=>{if(X instanceof Am)throw Ss;if(!m())throw Tt(I),Ss;const wt=Uo(X);throw S(I,N,B,wt,V),X})}function Q(I,R,N,V){var B,$,X,wt;if(Mt(I,V)||R.version===((B=I.getState())===null||B===void 0||($=B.currentTree)===null||$===void 0?void 0:$.version)||R.version===((X=I.getState())===null||X===void 0||(wt=X.nextTree)===null||wt===void 0?void 0:wt.version)){var kt,qt,Ut;nD(n,N,I,(kt=(qt=I.getState())===null||qt===void 0||(Ut=qt.nextTree)===null||Ut===void 0?void 0:Ut.version)!==null&&kt!==void 0?kt:I.getState().currentTree.version)}for(const yt of N)u.add(yt)}function J(I,R,N){let V=!0,B=!0;const $=()=>{B=!1};let X,wt=!1,kt;const qt={loadingDepKey:null,loadingDepPromise:null},Ut=new Map;function yt({key:Ft}){const At=Vo(I,R,Ft);switch(Ut.set(Ft,At),V||(Q(I,R,new Set(Ut.keys()),N),P(I,N)),At.state){case"hasValue":return At.contents;case"hasError":throw At.contents;case"loading":throw qt.loadingDepKey=Ft,qt.loadingDepPromise=At.contents,At.contents}throw Ot("Invalid Loadable state")}const Et=Ft=>(...At)=>{if(B)throw Ot("Callbacks from getCallback() should only be called asynchronously after the selector is evalutated. It can be used for selectors to return objects with callbacks that can work with Recoil state without a subscription.");return t==null&&(se.env.NODE_ENV!=="production"?ir(!1,"Recoil Value can never be null"):ir(!1)),lD(I,Ft,At,{node:t})};try{X=i({get:yt,getCallback:Et}),X=oD(X)?yt(X):X,XN(X)&&(X.state==="hasError"&&(wt=!0),X=X.contents),ge(X)?X=z(I,X,R,Ut,N,qt).finally($):$(),X=X instanceof xm?X.value:X}catch(Ft){X=Ft,ge(X)?X=Z(I,X,R,Ut,N,qt).finally($):(wt=!0,$())}return wt?kt=Uo(X):ge(X)?kt=$N(X):kt=Ku(X),V=!1,Qt(I,N,Ut),Q(I,R,new Set(Ut.keys()),N),[kt,Ut]}function G(I,R){let N=R.atomValues.get(n);if(N!=null)return N;const V=new Set;try{N=c.get($=>(typeof $!="string"&&(se.env.NODE_ENV!=="production"?ir(!1,"Cache nodeKey is type string"):ir(!1)),Vo(I,R,$).contents),{onNodeVisit:$=>{$.type==="branch"&&$.nodeKey!==n&&V.add($.nodeKey)}})}catch($){throw Ot(`Problem with cache lookup for selector "${n}": ${$.message}`)}if(N){var B;R.atomValues.set(n,N),Q(I,R,V,(B=ft(I))===null||B===void 0?void 0:B.executionID)}return N}function K(I,R){const N=G(I,R);if(N!=null)return Tt(I),N;const V=vt(I,R);if(V!=null){var B;return((B=V.loadingLoadable)===null||B===void 0?void 0:B.state)==="loading"&&L(I,V.executionID),V.loadingLoadable}const $=uD(),[X,wt]=J(I,R,$);return X.state==="loading"?(ut(I,$,X,wt,R),L(I,$)):(Tt(I),Xt(R,X,wt)),X}function vt(I,R){const N=Vg([h.has(I)?[Ee(h.get(I))]:[],Eo(Ou(h,([B])=>B!==I),([,B])=>B)]);function V(B){for(const[$,X]of B)if(!Vo(I,R,$).is(X))return!0;return!1}for(const B of N){if(B.stateVersions.get(R.version)||!V(B.depValuesDiscoveredSoFarDuringAsyncWork))return B.stateVersions.set(R.version,!0),B;B.stateVersions.set(R.version,!1)}}function ft(I){return h.get(I)}function ut(I,R,N,V,B){h.set(I,{depValuesDiscoveredSoFarDuringAsyncWork:V,executionID:R,loadingLoadable:N,stateVersions:new Map([[B.version,!0]])})}function Qt(I,R,N){if(Mt(I,R)){const V=ft(I);V!=null&&(V.depValuesDiscoveredSoFarDuringAsyncWork=N)}}function Tt(I){h.delete(I)}function Mt(I,R){var N;return R===((N=ft(I))===null||N===void 0?void 0:N.executionID)}function ee(I){return Array.from(I.entries()).map(([R,N])=>[R,N.contents])}function Xt(I,R,N){se.env.NODE_ENV!=="production"&&R.state!=="loading"&&!e.dangerouslyAllowMutability&&_u(R.contents),I.atomValues.set(n,R);try{c.set(ee(N),R)}catch(V){throw Ot(`Problem with setting cache for selector "${n}": ${V.message}`)}}function xt(I){if(Ns.includes(n)){const R=`Recoil selector has circular dependencies: ${Ns.slice(Ns.indexOf(n)).join(" → ")}`;return Uo(Ot(R))}Ns.push(n);try{return I()}finally{Ns.pop()}}function Lt(I,R){const N=R.atomValues.get(n);return N??c.get(V=>{var B;return typeof V!="string"&&(se.env.NODE_ENV!=="production"?ir(!1,"Cache nodeKey is type string"):ir(!1)),(B=tD(I,R,V))===null||B===void 0?void 0:B.contents})}function ht(I,R){return xt(()=>K(I,R))}function at(I){I.atomValues.delete(n)}function pt(I,R){t==null&&(se.env.NODE_ENV!=="production"?ir(!1,"Recoil Value can never be null"):ir(!1));for(const V of u){var N;const B=sD(V);(N=B.clearCache)===null||N===void 0||N.call(B,I,R)}u.clear(),at(R),c.clear(),Em(I,t)}return l!=null?t=Tm({key:n,nodeType:"selector",peek:Lt,get:ht,set:(R,N,V)=>{let B=!1;const $=new Map;function X({key:Ut}){if(B)throw Ot("Recoil: Async selector sets are not currently supported.");const yt=Vo(R,N,Ut);if(yt.state==="hasValue")return yt.contents;if(yt.state==="loading"){const Et=`Getting value of asynchronous atom or selector "${Ut}" in a pending state while setting selector "${n}" is not yet supported.`;throw en(Et),Ot(Et)}else throw yt.contents}function wt(Ut,yt){if(B){const At="Recoil: Async selector sets are not currently supported.";throw en(At),Ot(At)}const Et=typeof yt=="function"?yt(X(Ut)):yt;eD(R,N,Ut.key,Et).forEach((At,$t)=>$.set($t,At))}function kt(Ut){wt(Ut,rD)}const qt=l({set:wt,get:X,reset:kt},V);if(qt!==void 0)throw ge(qt)?Ot("Recoil: Async selector sets are not currently supported."):Ot("Recoil: selector set should be a void function.");return B=!0,$},init:w,invalidate:at,clearCache:pt,shouldDeleteConfigOnRelease:v,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:d}):t=Tm({key:n,nodeType:"selector",peek:Lt,get:ht,init:w,invalidate:at,clearCache:pt,shouldDeleteConfigOnRelease:v,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:d})}bm.value=e=>new xm(e);var zi=bm;const{isLoadable:cD,loadableWithError:Hu,loadableWithPromise:Ju,loadableWithValue:ki}=ys,{WrappedValue:Sm}=gm,{peekNodeInfo:fD}=ti,{DEFAULT_VALUE:ni,DefaultValue:Cr,getConfigDeletionHandler:Nm,registerNode:dD,setConfigDeletionHandler:hD}=Mn,{isRecoilValue:pD}=$r,{getRecoilValueAsLoadable:gD,markRecoilValueModified:mD,setRecoilValue:Dm,setRecoilValueLoadable:yD}=pr,{retainedByOptionWithDefault:vD}=Ci,Ds=e=>e instanceof Sm?e.value:e;function MD(e){const{key:t,persistence_UNSTABLE:n}=e,i=vD(e.retainedBy_UNSTABLE);let o=0;function l(L){return Ju(L.then(z=>(u=ki(z),z)).catch(z=>{throw u=Hu(z),z}))}let u=ge(e.default)?l(e.default):cD(e.default)?e.default.state==="loading"?l(e.default.contents):e.default:ki(Ds(e.default));h(u.contents);let c;const d=new Map;function h(L){return se.env.NODE_ENV!=="production"&&e.dangerouslyAllowMutability!==!0?ge(L)?L.then(z=>(_u(z),z)):(_u(L),L):L}function p(L,z){const Z=z.then(Q=>{var J,G;return((G=((J=L.getState().nextTree)!==null&&J!==void 0?J:L.getState().currentTree).atomValues.get(t))===null||G===void 0?void 0:G.contents)===Z&&Dm(L,j,Q),Q}).catch(Q=>{var J,G;throw((G=((J=L.getState().nextTree)!==null&&J!==void 0?J:L.getState().currentTree).atomValues.get(t))===null||G===void 0?void 0:G.contents)===Z&&yD(L,j,Hu(Q)),Q});return Z}function m(L,z,Z){var Q;o++;const J=()=>{var ft;o--,(ft=d.get(L))===null||ft===void 0||ft.forEach(ut=>ut()),d.delete(L)};if(L.getState().knownAtoms.add(t),u.state==="loading"){const ft=()=>{var ut;((ut=L.getState().nextTree)!==null&&ut!==void 0?ut:L.getState().currentTree).atomValues.has(t)||mD(L,j)};u.contents.finally(ft)}const G=(Q=e.effects)!==null&&Q!==void 0?Q:e.effects_UNSTABLE;if(G!=null){let ft=function(at){if(Mt&&at.key===t){const pt=Tt;return pt instanceof Cr?w(L,z):ge(pt)?Ju(pt.then(I=>I instanceof Cr?u.toPromise():I)):ki(pt)}return gD(L,at)},ut=function(at){return ft(at).toPromise()},Qt=function(at){var pt;const I=fD(L,(pt=L.getState().nextTree)!==null&&pt!==void 0?pt:L.getState().currentTree,at.key);return Mt&&at.key===t&&!(Tt instanceof Cr)?{...I,isSet:!0,loadable:ft(at)}:I},Tt=ni,Mt=!0,ee=!1,Xt=null;const xt=at=>pt=>{if(Mt){const I=ft(j),R=I.state==="hasValue"?I.contents:ni;Tt=typeof pt=="function"?pt(R):pt,ge(Tt)&&(Tt=Tt.then(N=>(Xt={effect:at,value:N},N)))}else{if(ge(pt))throw Ot("Setting atoms to async values is not implemented.");typeof pt!="function"&&(Xt={effect:at,value:Ds(pt)}),Dm(L,j,typeof pt=="function"?I=>{const R=Ds(pt(I));return Xt={effect:at,value:R},R}:Ds(pt))}},Lt=at=>()=>xt(at)(ni),ht=at=>pt=>{var I;const{release:R}=L.subscribeToTransactions(N=>{var V;let{currentTree:B,previousTree:$}=N.getState();$||(en("Transaction subscribers notified without a next tree being present -- this is a bug in Recoil"),$=B);const X=(V=B.atomValues.get(t))!==null&&V!==void 0?V:u;if(X.state==="hasValue"){var wt,kt,qt,Ut;const yt=X.contents,Et=(wt=$.atomValues.get(t))!==null&&wt!==void 0?wt:u,Ft=Et.state==="hasValue"?Et.contents:ni;((kt=Xt)===null||kt===void 0?void 0:kt.effect)!==at||((qt=Xt)===null||qt===void 0?void 0:qt.value)!==yt?pt(yt,Ft,!B.atomValues.has(t)):((Ut=Xt)===null||Ut===void 0?void 0:Ut.effect)===at&&(Xt=null)}},t);d.set(L,[...(I=d.get(L))!==null&&I!==void 0?I:[],R])};for(const at of G)try{const pt=at({node:j,storeID:L.storeID,parentStoreID_UNSTABLE:L.parentStoreID,trigger:Z,setSelf:xt(at),resetSelf:Lt(at),onSet:ht(at),getPromise:ut,getLoadable:ft,getInfo_UNSTABLE:Qt});if(pt!=null){var K;d.set(L,[...(K=d.get(L))!==null&&K!==void 0?K:[],pt])}}catch(pt){Tt=pt,ee=!0}if(Mt=!1,!(Tt instanceof Cr)){var vt;const at=ee?Hu(Tt):ge(Tt)?Ju(p(L,Tt)):ki(Ds(Tt));h(at.contents),z.atomValues.set(t,at),(vt=L.getState().nextTree)===null||vt===void 0||vt.atomValues.set(t,at)}}return J}function w(L,z){var Z,Q;return(Z=(Q=z.atomValues.get(t))!==null&&Q!==void 0?Q:c)!==null&&Z!==void 0?Z:u}function v(L,z){if(z.atomValues.has(t))return Ee(z.atomValues.get(t));if(z.nonvalidatedAtoms.has(t)){if(c!=null)return c;if(n==null)return Nu(`Tried to restore a persisted value for atom ${t} but it has no persistence settings.`),u;const Z=z.nonvalidatedAtoms.get(t),Q=n.validator(Z,ni);return c=Q instanceof Cr?u:ki(Q),c}else return u}function S(){c=void 0}function A(L,z,Z){if(z.atomValues.has(t)){const Q=Ee(z.atomValues.get(t));if(Q.state==="hasValue"&&Z===Q.contents)return new Map}else if(!z.nonvalidatedAtoms.has(t)&&Z instanceof Cr)return new Map;return h(Z),c=void 0,new Map().set(t,ki(Z))}function P(){return Nm(t)!==void 0&&o<=0}const j=dD({key:t,nodeType:"atom",peek:w,get:v,set:A,init:m,invalidate:S,shouldDeleteConfigOnRelease:P,dangerouslyAllowMutability:e.dangerouslyAllowMutability,persistence_UNSTABLE:e.persistence_UNSTABLE?{type:e.persistence_UNSTABLE.type,backButton:e.persistence_UNSTABLE.backButton}:void 0,shouldRestoreFromSnapshots:!0,retainedBy:i});return j}function Gu(e){if(se.env.NODE_ENV!=="production"&&typeof e.key!="string")throw Ot("A key option with a unique string value must be provided when creating an atom.");const{...t}=e,n="default"in e?e.default:new Promise(()=>{});return pD(n)?wD({...t,default:n}):MD({...t,default:n})}function wD(e){const t=Gu({...e,default:ni,persistence_UNSTABLE:e.persistence_UNSTABLE===void 0?void 0:{...e.persistence_UNSTABLE,validator:i=>i instanceof Cr?i:Ee(e.persistence_UNSTABLE).validator(i,ni)},effects:e.effects,effects_UNSTABLE:e.effects_UNSTABLE}),n=zi({key:`${e.key}__withFallback`,get:({get:i})=>{const o=i(t);return o instanceof Cr?e.default:o},set:({set:i},o)=>i(t,o),cachePolicy_UNSTABLE:{eviction:"most-recent"},dangerouslyAllowMutability:e.dangerouslyAllowMutability});return hD(n.key,Nm(e.key)),n}Gu.value=e=>new Sm(e);var xD=Gu;class TD{constructor(t){var n;Pt(this,"_map",void 0),Pt(this,"_keyMapper",void 0),this._map=new Map,this._keyMapper=(n=t?.mapKey)!==null&&n!==void 0?n:i=>i}size(){return this._map.size}has(t){return this._map.has(this._keyMapper(t))}get(t){return this._map.get(this._keyMapper(t))}set(t,n){this._map.set(this._keyMapper(t),n)}delete(t){this._map.delete(this._keyMapper(t))}clear(){this._map.clear()}}var ED={MapCache:TD},AD=ED.MapCache,bD=Object.freeze({__proto__:null,MapCache:AD});const{LRUCache:Im}=vm,{MapCache:SD}=bD,Qo={equality:"reference",eviction:"none",maxSize:1/0};function ND({equality:e=Qo.equality,eviction:t=Qo.eviction,maxSize:n=Qo.maxSize}=Qo){const i=DD(e);return ID(t,n,i)}function DD(e){switch(e){case"reference":return t=>t;case"value":return t=>qu(t)}throw Ot(`Unrecognized equality policy ${e}`)}function ID(e,t,n){switch(e){case"keep-all":return new SD({mapKey:n});case"lru":return new Im({mapKey:n,maxSize:Ee(t)});case"most-recent":return new Im({mapKey:n,maxSize:1})}throw Ot(`Unrecognized eviction policy ${e}`)}var CD=ND;const{setConfigDeletionHandler:zD}=Mn;let kD=0;function OD(e){var t,n;const i=CD({equality:(t=(n=e.cachePolicyForParams_UNSTABLE)===null||n===void 0?void 0:n.equality)!==null&&t!==void 0?t:"value",eviction:"keep-all"});return o=>{var l;let u;try{u=i.get(o)}catch(w){throw Ot(`Problem with cache lookup for selector ${e.key}: ${w.message}`)}if(u!=null)return u;const c=`${e.key}__selectorFamily/${(l=qu(o,{allowFunctions:!0}))!==null&&l!==void 0?l:"void"}/${kD++}`,d=w=>e.get(o)(w),h=e.cachePolicy_UNSTABLE,p=typeof e.retainedBy_UNSTABLE=="function"?e.retainedBy_UNSTABLE(o):e.retainedBy_UNSTABLE;let m;if(e.set!=null){const w=e.set;m=zi({key:c,get:d,set:(S,A)=>w(o)(S,A),cachePolicy_UNSTABLE:h,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:p})}else m=zi({key:c,get:d,cachePolicy_UNSTABLE:h,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:p});return i.set(o,m),zD(m.key,()=>{i.delete(o)}),m}}var ri=OD;ri({key:"__constant",get:e=>()=>e,cachePolicyForParams_UNSTABLE:{equality:"reference"}}),ri({key:"__error",get:e=>()=>{throw Ot(e)},cachePolicyForParams_UNSTABLE:{equality:"reference"}});const{loadableWithError:Cm,loadableWithPromise:zm,loadableWithValue:km}=ys;function Fo(e,t){const n=Array(t.length).fill(void 0),i=Array(t.length).fill(void 0);for(const[o,l]of t.entries())try{n[o]=e(l)}catch(u){i[o]=u}return[n,i]}function LD(e){return e!=null&&!ge(e)}function Bo(e){return Array.isArray(e)?e:Object.getOwnPropertyNames(e).map(t=>e[t])}function Zu(e,t){return Array.isArray(e)?t:Object.getOwnPropertyNames(e).reduce((n,i,o)=>({...n,[i]:t[o]}),{})}function Oi(e,t,n){const i=n.map((o,l)=>o==null?km(t[l]):ge(o)?zm(o):Cm(o));return Zu(e,i)}function jD(e,t){return t.map((n,i)=>n===void 0?e[i]:n)}ri({key:"__waitForNone",get:e=>({get:t})=>{const n=Bo(e),[i,o]=Fo(t,n);return Oi(e,i,o)},dangerouslyAllowMutability:!0}),ri({key:"__waitForAny",get:e=>({get:t})=>{const n=Bo(e),[i,o]=Fo(t,n);return o.some(l=>!ge(l))?Oi(e,i,o):new Promise(l=>{for(const[u,c]of o.entries())ge(c)&&c.then(d=>{i[u]=d,o[u]=void 0,l(Oi(e,i,o))}).catch(d=>{o[u]=d,l(Oi(e,i,o))})})},dangerouslyAllowMutability:!0}),ri({key:"__waitForAll",get:e=>({get:t})=>{const n=Bo(e),[i,o]=Fo(t,n);if(o.every(u=>u==null))return Zu(e,i);const l=o.find(LD);if(l!=null)throw l;return Promise.all(o).then(u=>Zu(e,jD(i,u)))},dangerouslyAllowMutability:!0}),ri({key:"__waitForAllSettled",get:e=>({get:t})=>{const n=Bo(e),[i,o]=Fo(t,n);return o.every(l=>!ge(l))?Oi(e,i,o):Promise.all(o.map((l,u)=>ge(l)?l.then(c=>{i[u]=c,o[u]=void 0}).catch(c=>{i[u]=void 0,o[u]=c}):null)).then(()=>Oi(e,i,o))},dangerouslyAllowMutability:!0}),ri({key:"__noWait",get:e=>({get:t})=>{try{return zi.value(km(t(e)))}catch(n){return zi.value(ge(n)?zm(n):Cm(n))}},dangerouslyAllowMutability:!0});const{RecoilLoadable:f3}=ys,{DefaultValue:RD}=Mn,{RecoilRoot:UD}=Wu,{isRecoilValue:d3}=$r,{freshSnapshot:h3}=zo,{useRecoilState:VD,useRecoilValue:PD,useResetRecoilState:QD,useSetRecoilState:FD}=Z1;var zr={DefaultValue:RD,RecoilRoot:UD,atom:xD,selector:zi,useRecoilValue:PD,useRecoilState:VD,useSetRecoilState:FD,useResetRecoilState:QD},BD=zr.DefaultValue,YD=zr.RecoilRoot,le=zr.atom,Om=zr.selector,Ie=zr.useRecoilValue,Li=zr.useRecoilState,he=zr.useSetRecoilState,Yo=zr.useResetRecoilState,Is={exports:{}};var WD=Is.exports,Lm;function qD(){return Lm||(Lm=1,(function(e,t){(function(){var n,i="4.17.21",o=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",c="Invalid `variable` option passed into `_.template`",d="__lodash_hash_undefined__",h=500,p="__lodash_placeholder__",m=1,w=2,v=4,S=1,A=2,P=1,j=2,L=4,z=8,Z=16,Q=32,J=64,G=128,K=256,vt=512,ft=30,ut="...",Qt=800,Tt=16,Mt=1,ee=2,Xt=3,xt=1/0,Lt=9007199254740991,ht=17976931348623157e292,at=NaN,pt=4294967295,I=pt-1,R=pt>>>1,N=[["ary",G],["bind",P],["bindKey",j],["curry",z],["curryRight",Z],["flip",vt],["partial",Q],["partialRight",J],["rearg",K]],V="[object Arguments]",B="[object Array]",$="[object AsyncFunction]",X="[object Boolean]",wt="[object Date]",kt="[object DOMException]",qt="[object Error]",Ut="[object Function]",yt="[object GeneratorFunction]",Et="[object Map]",Ft="[object Number]",At="[object Null]",$t="[object Object]",Fe="[object Promise]",ve="[object Proxy]",ne="[object RegExp]",ie="[object Set]",nn="[object String]",Le="[object Symbol]",Rn="[object Undefined]",Me="[object WeakMap]",ue="[object WeakSet]",je="[object ArrayBuffer]",ln="[object DataView]",wn="[object Float32Array]",xn="[object Float64Array]",ar="[object Int8Array]",Zn="[object Int16Array]",Xn="[object Int32Array]",pn="[object Uint8Array]",O="[object Uint8ClampedArray]",D="[object Uint16Array]",_="[object Uint32Array]",et=/\b__p \+= '';/g,tt=/\b(__p \+=) '' \+/g,it=/(__e\(.*?\)|\b__t\)) \+\n'';/g,gt=/&(?:amp|lt|gt|quot|#39);/g,mt=/[&<>"']/g,ct=RegExp(gt.source),jt=RegExp(mt.source),st=/<%-([\s\S]+?)%>/g,It=/<%([\s\S]+?)%>/g,Ct=/<%=([\s\S]+?)%>/g,ce=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,pe=/^\w*$/,Be=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qe=/[\\^$.*+?()[\]{}|]/g,Ce=RegExp(qe.source),Re=/^\s+/,Kc=/\s/,Hc=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Jc=/\{\n\/\* \[wrapped with (.+)\] \*/,Gc=/,? & /,E=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,H=/[()=,{}\[\]\/\s]/,ot=/\\(\\)?/g,zt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,re=/\w*$/,fe=/^[-+]0x[0-9a-f]+$/i,Ht=/^0b[01]+$/i,_t=/^\[object .+?Constructor\]$/,Ge=/^0o[0-7]+$/i,Ne=/^(?:0|[1-9]\d*)$/,ze=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ze=/($^)/,jr=/['\n\r\u2028\u2029\\]/g,Un="\\ud800-\\udfff",rn="\\u0300-\\u036f",Rs="\\ufe20-\\ufe2f",Zc="\\u20d0-\\u20ff",da=rn+Rs+Zc,W0="\\u2700-\\u27bf",q0="a-z\\xdf-\\xf6\\xf8-\\xff",FC="\\xac\\xb1\\xd7\\xf7",BC="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",YC="\\u2000-\\u206f",WC=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",_0="A-Z\\xc0-\\xd6\\xd8-\\xde",K0="\\ufe0e\\ufe0f",H0=FC+BC+YC+WC,Xc="['’]",qC="["+Un+"]",J0="["+H0+"]",ha="["+da+"]",G0="\\d+",_C="["+W0+"]",Z0="["+q0+"]",X0="[^"+Un+H0+G0+W0+q0+_0+"]",$c="\\ud83c[\\udffb-\\udfff]",KC="(?:"+ha+"|"+$c+")",$0="[^"+Un+"]",tf="(?:\\ud83c[\\udde6-\\uddff]){2}",ef="[\\ud800-\\udbff][\\udc00-\\udfff]",Vi="["+_0+"]",ty="\\u200d",ey="(?:"+Z0+"|"+X0+")",HC="(?:"+Vi+"|"+X0+")",ny="(?:"+Xc+"(?:d|ll|m|re|s|t|ve))?",ry="(?:"+Xc+"(?:D|LL|M|RE|S|T|VE))?",iy=KC+"?",sy="["+K0+"]?",JC="(?:"+ty+"(?:"+[$0,tf,ef].join("|")+")"+sy+iy+")*",GC="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ZC="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",oy=sy+iy+JC,XC="(?:"+[_C,tf,ef].join("|")+")"+oy,$C="(?:"+[$0+ha+"?",ha,tf,ef,qC].join("|")+")",tz=RegExp(Xc,"g"),ez=RegExp(ha,"g"),nf=RegExp($c+"(?="+$c+")|"+$C+oy,"g"),nz=RegExp([Vi+"?"+Z0+"+"+ny+"(?="+[J0,Vi,"$"].join("|")+")",HC+"+"+ry+"(?="+[J0,Vi+ey,"$"].join("|")+")",Vi+"?"+ey+"+"+ny,Vi+"+"+ry,ZC,GC,G0,XC].join("|"),"g"),rz=RegExp("["+ty+Un+da+K0+"]"),iz=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,sz=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],oz=-1,xe={};xe[wn]=xe[xn]=xe[ar]=xe[Zn]=xe[Xn]=xe[pn]=xe[O]=xe[D]=xe[_]=!0,xe[V]=xe[B]=xe[je]=xe[X]=xe[ln]=xe[wt]=xe[qt]=xe[Ut]=xe[Et]=xe[Ft]=xe[$t]=xe[ne]=xe[ie]=xe[nn]=xe[Me]=!1;var we={};we[V]=we[B]=we[je]=we[ln]=we[X]=we[wt]=we[wn]=we[xn]=we[ar]=we[Zn]=we[Xn]=we[Et]=we[Ft]=we[$t]=we[ne]=we[ie]=we[nn]=we[Le]=we[pn]=we[O]=we[D]=we[_]=!0,we[qt]=we[Ut]=we[Me]=!1;var az={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},lz={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},uz={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},cz={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},fz=parseFloat,dz=parseInt,ay=typeof $s=="object"&&$s&&$s.Object===Object&&$s,hz=typeof self=="object"&&self&&self.Object===Object&&self,Xe=ay||hz||Function("return this")(),rf=t&&!t.nodeType&&t,si=rf&&!0&&e&&!e.nodeType&&e,ly=si&&si.exports===rf,sf=ly&&ay.process,Vn=(function(){try{var C=si&&si.require&&si.require("util").types;return C||sf&&sf.binding&&sf.binding("util")}catch{}})(),uy=Vn&&Vn.isArrayBuffer,cy=Vn&&Vn.isDate,fy=Vn&&Vn.isMap,dy=Vn&&Vn.isRegExp,hy=Vn&&Vn.isSet,py=Vn&&Vn.isTypedArray;function Tn(C,F,U){switch(U.length){case 0:return C.call(F);case 1:return C.call(F,U[0]);case 2:return C.call(F,U[0],U[1]);case 3:return C.call(F,U[0],U[1],U[2])}return C.apply(F,U)}function pz(C,F,U,lt){for(var Rt=-1,oe=C==null?0:C.length;++Rt<oe;){var Ye=C[Rt];F(lt,Ye,U(Ye),C)}return lt}function Pn(C,F){for(var U=-1,lt=C==null?0:C.length;++U<lt&&F(C[U],U,C)!==!1;);return C}function gz(C,F){for(var U=C==null?0:C.length;U--&&F(C[U],U,C)!==!1;);return C}function gy(C,F){for(var U=-1,lt=C==null?0:C.length;++U<lt;)if(!F(C[U],U,C))return!1;return!0}function Rr(C,F){for(var U=-1,lt=C==null?0:C.length,Rt=0,oe=[];++U<lt;){var Ye=C[U];F(Ye,U,C)&&(oe[Rt++]=Ye)}return oe}function pa(C,F){var U=C==null?0:C.length;return!!U&&Pi(C,F,0)>-1}function of(C,F,U){for(var lt=-1,Rt=C==null?0:C.length;++lt<Rt;)if(U(F,C[lt]))return!0;return!1}function Ae(C,F){for(var U=-1,lt=C==null?0:C.length,Rt=Array(lt);++U<lt;)Rt[U]=F(C[U],U,C);return Rt}function Ur(C,F){for(var U=-1,lt=F.length,Rt=C.length;++U<lt;)C[Rt+U]=F[U];return C}function af(C,F,U,lt){var Rt=-1,oe=C==null?0:C.length;for(lt&&oe&&(U=C[++Rt]);++Rt<oe;)U=F(U,C[Rt],Rt,C);return U}function mz(C,F,U,lt){var Rt=C==null?0:C.length;for(lt&&Rt&&(U=C[--Rt]);Rt--;)U=F(U,C[Rt],Rt,C);return U}function lf(C,F){for(var U=-1,lt=C==null?0:C.length;++U<lt;)if(F(C[U],U,C))return!0;return!1}var yz=uf("length");function vz(C){return C.split("")}function Mz(C){return C.match(E)||[]}function my(C,F,U){var lt;return U(C,function(Rt,oe,Ye){if(F(Rt,oe,Ye))return lt=oe,!1}),lt}function ga(C,F,U,lt){for(var Rt=C.length,oe=U+(lt?1:-1);lt?oe--:++oe<Rt;)if(F(C[oe],oe,C))return oe;return-1}function Pi(C,F,U){return F===F?zz(C,F,U):ga(C,yy,U)}function wz(C,F,U,lt){for(var Rt=U-1,oe=C.length;++Rt<oe;)if(lt(C[Rt],F))return Rt;return-1}function yy(C){return C!==C}function vy(C,F){var U=C==null?0:C.length;return U?ff(C,F)/U:at}function uf(C){return function(F){return F==null?n:F[C]}}function cf(C){return function(F){return C==null?n:C[F]}}function My(C,F,U,lt,Rt){return Rt(C,function(oe,Ye,me){U=lt?(lt=!1,oe):F(U,oe,Ye,me)}),U}function xz(C,F){var U=C.length;for(C.sort(F);U--;)C[U]=C[U].value;return C}function ff(C,F){for(var U,lt=-1,Rt=C.length;++lt<Rt;){var oe=F(C[lt]);oe!==n&&(U=U===n?oe:U+oe)}return U}function df(C,F){for(var U=-1,lt=Array(C);++U<C;)lt[U]=F(U);return lt}function Tz(C,F){return Ae(F,function(U){return[U,C[U]]})}function wy(C){return C&&C.slice(0,Ay(C)+1).replace(Re,"")}function En(C){return function(F){return C(F)}}function hf(C,F){return Ae(F,function(U){return C[U]})}function Us(C,F){return C.has(F)}function xy(C,F){for(var U=-1,lt=C.length;++U<lt&&Pi(F,C[U],0)>-1;);return U}function Ty(C,F){for(var U=C.length;U--&&Pi(F,C[U],0)>-1;);return U}function Ez(C,F){for(var U=C.length,lt=0;U--;)C[U]===F&&++lt;return lt}var Az=cf(az),bz=cf(lz);function Sz(C){return"\\"+cz[C]}function Nz(C,F){return C==null?n:C[F]}function Qi(C){return rz.test(C)}function Dz(C){return iz.test(C)}function Iz(C){for(var F,U=[];!(F=C.next()).done;)U.push(F.value);return U}function pf(C){var F=-1,U=Array(C.size);return C.forEach(function(lt,Rt){U[++F]=[Rt,lt]}),U}function Ey(C,F){return function(U){return C(F(U))}}function Vr(C,F){for(var U=-1,lt=C.length,Rt=0,oe=[];++U<lt;){var Ye=C[U];(Ye===F||Ye===p)&&(C[U]=p,oe[Rt++]=U)}return oe}function ma(C){var F=-1,U=Array(C.size);return C.forEach(function(lt){U[++F]=lt}),U}function Cz(C){var F=-1,U=Array(C.size);return C.forEach(function(lt){U[++F]=[lt,lt]}),U}function zz(C,F,U){for(var lt=U-1,Rt=C.length;++lt<Rt;)if(C[lt]===F)return lt;return-1}function kz(C,F,U){for(var lt=U+1;lt--;)if(C[lt]===F)return lt;return lt}function Fi(C){return Qi(C)?Lz(C):yz(C)}function $n(C){return Qi(C)?jz(C):vz(C)}function Ay(C){for(var F=C.length;F--&&Kc.test(C.charAt(F)););return F}var Oz=cf(uz);function Lz(C){for(var F=nf.lastIndex=0;nf.test(C);)++F;return F}function jz(C){return C.match(nf)||[]}function Rz(C){return C.match(nz)||[]}var Uz=(function C(F){F=F==null?Xe:Bi.defaults(Xe.Object(),F,Bi.pick(Xe,sz));var U=F.Array,lt=F.Date,Rt=F.Error,oe=F.Function,Ye=F.Math,me=F.Object,gf=F.RegExp,Vz=F.String,Qn=F.TypeError,ya=U.prototype,Pz=oe.prototype,Yi=me.prototype,va=F["__core-js_shared__"],Ma=Pz.toString,de=Yi.hasOwnProperty,Qz=0,by=(function(){var r=/[^.]+$/.exec(va&&va.keys&&va.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})(),wa=Yi.toString,Fz=Ma.call(me),Bz=Xe._,Yz=gf("^"+Ma.call(de).replace(qe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),xa=ly?F.Buffer:n,Pr=F.Symbol,Ta=F.Uint8Array,Sy=xa?xa.allocUnsafe:n,Ea=Ey(me.getPrototypeOf,me),Ny=me.create,Dy=Yi.propertyIsEnumerable,Aa=ya.splice,Iy=Pr?Pr.isConcatSpreadable:n,Vs=Pr?Pr.iterator:n,oi=Pr?Pr.toStringTag:n,ba=(function(){try{var r=fi(me,"defineProperty");return r({},"",{}),r}catch{}})(),Wz=F.clearTimeout!==Xe.clearTimeout&&F.clearTimeout,qz=lt&&lt.now!==Xe.Date.now&&lt.now,_z=F.setTimeout!==Xe.setTimeout&&F.setTimeout,Sa=Ye.ceil,Na=Ye.floor,mf=me.getOwnPropertySymbols,Kz=xa?xa.isBuffer:n,Cy=F.isFinite,Hz=ya.join,Jz=Ey(me.keys,me),We=Ye.max,sn=Ye.min,Gz=lt.now,Zz=F.parseInt,zy=Ye.random,Xz=ya.reverse,yf=fi(F,"DataView"),Ps=fi(F,"Map"),vf=fi(F,"Promise"),Wi=fi(F,"Set"),Qs=fi(F,"WeakMap"),Fs=fi(me,"create"),Da=Qs&&new Qs,qi={},$z=di(yf),tk=di(Ps),ek=di(vf),nk=di(Wi),rk=di(Qs),Ia=Pr?Pr.prototype:n,Bs=Ia?Ia.valueOf:n,ky=Ia?Ia.toString:n;function y(r){if(ke(r)&&!Vt(r)&&!(r instanceof Jt)){if(r instanceof Fn)return r;if(de.call(r,"__wrapped__"))return Ov(r)}return new Fn(r)}var _i=(function(){function r(){}return function(s){if(!De(s))return{};if(Ny)return Ny(s);r.prototype=s;var a=new r;return r.prototype=n,a}})();function Ca(){}function Fn(r,s){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!s,this.__index__=0,this.__values__=n}y.templateSettings={escape:st,evaluate:It,interpolate:Ct,variable:"",imports:{_:y}},y.prototype=Ca.prototype,y.prototype.constructor=y,Fn.prototype=_i(Ca.prototype),Fn.prototype.constructor=Fn;function Jt(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=pt,this.__views__=[]}function ik(){var r=new Jt(this.__wrapped__);return r.__actions__=gn(this.__actions__),r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=gn(this.__iteratees__),r.__takeCount__=this.__takeCount__,r.__views__=gn(this.__views__),r}function sk(){if(this.__filtered__){var r=new Jt(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r}function ok(){var r=this.__wrapped__.value(),s=this.__dir__,a=Vt(r),f=s<0,g=a?r.length:0,M=vO(0,g,this.__views__),T=M.start,b=M.end,k=b-T,Y=f?b:T-1,W=this.__iteratees__,q=W.length,nt=0,dt=sn(k,this.__takeCount__);if(!a||!f&&g==k&&dt==k)return nv(r,this.__actions__);var St=[];t:for(;k--&&nt<dt;){Y+=s;for(var Yt=-1,Nt=r[Y];++Yt<q;){var Kt=W[Yt],Zt=Kt.iteratee,Sn=Kt.type,fn=Zt(Nt);if(Sn==ee)Nt=fn;else if(!fn){if(Sn==Mt)continue t;break t}}St[nt++]=Nt}return St}Jt.prototype=_i(Ca.prototype),Jt.prototype.constructor=Jt;function ai(r){var s=-1,a=r==null?0:r.length;for(this.clear();++s<a;){var f=r[s];this.set(f[0],f[1])}}function ak(){this.__data__=Fs?Fs(null):{},this.size=0}function lk(r){var s=this.has(r)&&delete this.__data__[r];return this.size-=s?1:0,s}function uk(r){var s=this.__data__;if(Fs){var a=s[r];return a===d?n:a}return de.call(s,r)?s[r]:n}function ck(r){var s=this.__data__;return Fs?s[r]!==n:de.call(s,r)}function fk(r,s){var a=this.__data__;return this.size+=this.has(r)?0:1,a[r]=Fs&&s===n?d:s,this}ai.prototype.clear=ak,ai.prototype.delete=lk,ai.prototype.get=uk,ai.prototype.has=ck,ai.prototype.set=fk;function yr(r){var s=-1,a=r==null?0:r.length;for(this.clear();++s<a;){var f=r[s];this.set(f[0],f[1])}}function dk(){this.__data__=[],this.size=0}function hk(r){var s=this.__data__,a=za(s,r);if(a<0)return!1;var f=s.length-1;return a==f?s.pop():Aa.call(s,a,1),--this.size,!0}function pk(r){var s=this.__data__,a=za(s,r);return a<0?n:s[a][1]}function gk(r){return za(this.__data__,r)>-1}function mk(r,s){var a=this.__data__,f=za(a,r);return f<0?(++this.size,a.push([r,s])):a[f][1]=s,this}yr.prototype.clear=dk,yr.prototype.delete=hk,yr.prototype.get=pk,yr.prototype.has=gk,yr.prototype.set=mk;function vr(r){var s=-1,a=r==null?0:r.length;for(this.clear();++s<a;){var f=r[s];this.set(f[0],f[1])}}function yk(){this.size=0,this.__data__={hash:new ai,map:new(Ps||yr),string:new ai}}function vk(r){var s=Ya(this,r).delete(r);return this.size-=s?1:0,s}function Mk(r){return Ya(this,r).get(r)}function wk(r){return Ya(this,r).has(r)}function xk(r,s){var a=Ya(this,r),f=a.size;return a.set(r,s),this.size+=a.size==f?0:1,this}vr.prototype.clear=yk,vr.prototype.delete=vk,vr.prototype.get=Mk,vr.prototype.has=wk,vr.prototype.set=xk;function li(r){var s=-1,a=r==null?0:r.length;for(this.__data__=new vr;++s<a;)this.add(r[s])}function Tk(r){return this.__data__.set(r,d),this}function Ek(r){return this.__data__.has(r)}li.prototype.add=li.prototype.push=Tk,li.prototype.has=Ek;function tr(r){var s=this.__data__=new yr(r);this.size=s.size}function Ak(){this.__data__=new yr,this.size=0}function bk(r){var s=this.__data__,a=s.delete(r);return this.size=s.size,a}function Sk(r){return this.__data__.get(r)}function Nk(r){return this.__data__.has(r)}function Dk(r,s){var a=this.__data__;if(a instanceof yr){var f=a.__data__;if(!Ps||f.length<o-1)return f.push([r,s]),this.size=++a.size,this;a=this.__data__=new vr(f)}return a.set(r,s),this.size=a.size,this}tr.prototype.clear=Ak,tr.prototype.delete=bk,tr.prototype.get=Sk,tr.prototype.has=Nk,tr.prototype.set=Dk;function Oy(r,s){var a=Vt(r),f=!a&&hi(r),g=!a&&!f&&Wr(r),M=!a&&!f&&!g&&Gi(r),T=a||f||g||M,b=T?df(r.length,Vz):[],k=b.length;for(var Y in r)(s||de.call(r,Y))&&!(T&&(Y=="length"||g&&(Y=="offset"||Y=="parent")||M&&(Y=="buffer"||Y=="byteLength"||Y=="byteOffset")||Tr(Y,k)))&&b.push(Y);return b}function Ly(r){var s=r.length;return s?r[If(0,s-1)]:n}function Ik(r,s){return Wa(gn(r),ui(s,0,r.length))}function Ck(r){return Wa(gn(r))}function Mf(r,s,a){(a!==n&&!er(r[s],a)||a===n&&!(s in r))&&Mr(r,s,a)}function Ys(r,s,a){var f=r[s];(!(de.call(r,s)&&er(f,a))||a===n&&!(s in r))&&Mr(r,s,a)}function za(r,s){for(var a=r.length;a--;)if(er(r[a][0],s))return a;return-1}function zk(r,s,a,f){return Qr(r,function(g,M,T){s(f,g,a(g),T)}),f}function jy(r,s){return r&&ur(s,_e(s),r)}function kk(r,s){return r&&ur(s,yn(s),r)}function Mr(r,s,a){s=="__proto__"&&ba?ba(r,s,{configurable:!0,enumerable:!0,value:a,writable:!0}):r[s]=a}function wf(r,s){for(var a=-1,f=s.length,g=U(f),M=r==null;++a<f;)g[a]=M?n:td(r,s[a]);return g}function ui(r,s,a){return r===r&&(a!==n&&(r=r<=a?r:a),s!==n&&(r=r>=s?r:s)),r}function Bn(r,s,a,f,g,M){var T,b=s&m,k=s&w,Y=s&v;if(a&&(T=g?a(r,f,g,M):a(r)),T!==n)return T;if(!De(r))return r;var W=Vt(r);if(W){if(T=wO(r),!b)return gn(r,T)}else{var q=on(r),nt=q==Ut||q==yt;if(Wr(r))return sv(r,b);if(q==$t||q==V||nt&&!g){if(T=k||nt?{}:Av(r),!b)return k?uO(r,kk(T,r)):lO(r,jy(T,r))}else{if(!we[q])return g?r:{};T=xO(r,q,b)}}M||(M=new tr);var dt=M.get(r);if(dt)return dt;M.set(r,T),$v(r)?r.forEach(function(Nt){T.add(Bn(Nt,s,a,Nt,r,M))}):Zv(r)&&r.forEach(function(Nt,Kt){T.set(Kt,Bn(Nt,s,a,Kt,r,M))});var St=Y?k?Qf:Pf:k?yn:_e,Yt=W?n:St(r);return Pn(Yt||r,function(Nt,Kt){Yt&&(Kt=Nt,Nt=r[Kt]),Ys(T,Kt,Bn(Nt,s,a,Kt,r,M))}),T}function Ok(r){var s=_e(r);return function(a){return Ry(a,r,s)}}function Ry(r,s,a){var f=a.length;if(r==null)return!f;for(r=me(r);f--;){var g=a[f],M=s[g],T=r[g];if(T===n&&!(g in r)||!M(T))return!1}return!0}function Uy(r,s,a){if(typeof r!="function")throw new Qn(u);return Gs(function(){r.apply(n,a)},s)}function Ws(r,s,a,f){var g=-1,M=pa,T=!0,b=r.length,k=[],Y=s.length;if(!b)return k;a&&(s=Ae(s,En(a))),f?(M=of,T=!1):s.length>=o&&(M=Us,T=!1,s=new li(s));t:for(;++g<b;){var W=r[g],q=a==null?W:a(W);if(W=f||W!==0?W:0,T&&q===q){for(var nt=Y;nt--;)if(s[nt]===q)continue t;k.push(W)}else M(s,q,f)||k.push(W)}return k}var Qr=cv(lr),Vy=cv(Tf,!0);function Lk(r,s){var a=!0;return Qr(r,function(f,g,M){return a=!!s(f,g,M),a}),a}function ka(r,s,a){for(var f=-1,g=r.length;++f<g;){var M=r[f],T=s(M);if(T!=null&&(b===n?T===T&&!bn(T):a(T,b)))var b=T,k=M}return k}function jk(r,s,a,f){var g=r.length;for(a=Bt(a),a<0&&(a=-a>g?0:g+a),f=f===n||f>g?g:Bt(f),f<0&&(f+=g),f=a>f?0:eM(f);a<f;)r[a++]=s;return r}function Py(r,s){var a=[];return Qr(r,function(f,g,M){s(f,g,M)&&a.push(f)}),a}function $e(r,s,a,f,g){var M=-1,T=r.length;for(a||(a=EO),g||(g=[]);++M<T;){var b=r[M];s>0&&a(b)?s>1?$e(b,s-1,a,f,g):Ur(g,b):f||(g[g.length]=b)}return g}var xf=fv(),Qy=fv(!0);function lr(r,s){return r&&xf(r,s,_e)}function Tf(r,s){return r&&Qy(r,s,_e)}function Oa(r,s){return Rr(s,function(a){return Er(r[a])})}function ci(r,s){s=Br(s,r);for(var a=0,f=s.length;r!=null&&a<f;)r=r[cr(s[a++])];return a&&a==f?r:n}function Fy(r,s,a){var f=s(r);return Vt(r)?f:Ur(f,a(r))}function un(r){return r==null?r===n?Rn:At:oi&&oi in me(r)?yO(r):CO(r)}function Ef(r,s){return r>s}function Rk(r,s){return r!=null&&de.call(r,s)}function Uk(r,s){return r!=null&&s in me(r)}function Vk(r,s,a){return r>=sn(s,a)&&r<We(s,a)}function Af(r,s,a){for(var f=a?of:pa,g=r[0].length,M=r.length,T=M,b=U(M),k=1/0,Y=[];T--;){var W=r[T];T&&s&&(W=Ae(W,En(s))),k=sn(W.length,k),b[T]=!a&&(s||g>=120&&W.length>=120)?new li(T&&W):n}W=r[0];var q=-1,nt=b[0];t:for(;++q<g&&Y.length<k;){var dt=W[q],St=s?s(dt):dt;if(dt=a||dt!==0?dt:0,!(nt?Us(nt,St):f(Y,St,a))){for(T=M;--T;){var Yt=b[T];if(!(Yt?Us(Yt,St):f(r[T],St,a)))continue t}nt&&nt.push(St),Y.push(dt)}}return Y}function Pk(r,s,a,f){return lr(r,function(g,M,T){s(f,a(g),M,T)}),f}function qs(r,s,a){s=Br(s,r),r=Dv(r,s);var f=r==null?r:r[cr(Wn(s))];return f==null?n:Tn(f,r,a)}function By(r){return ke(r)&&un(r)==V}function Qk(r){return ke(r)&&un(r)==je}function Fk(r){return ke(r)&&un(r)==wt}function _s(r,s,a,f,g){return r===s?!0:r==null||s==null||!ke(r)&&!ke(s)?r!==r&&s!==s:Bk(r,s,a,f,_s,g)}function Bk(r,s,a,f,g,M){var T=Vt(r),b=Vt(s),k=T?B:on(r),Y=b?B:on(s);k=k==V?$t:k,Y=Y==V?$t:Y;var W=k==$t,q=Y==$t,nt=k==Y;if(nt&&Wr(r)){if(!Wr(s))return!1;T=!0,W=!1}if(nt&&!W)return M||(M=new tr),T||Gi(r)?xv(r,s,a,f,g,M):gO(r,s,k,a,f,g,M);if(!(a&S)){var dt=W&&de.call(r,"__wrapped__"),St=q&&de.call(s,"__wrapped__");if(dt||St){var Yt=dt?r.value():r,Nt=St?s.value():s;return M||(M=new tr),g(Yt,Nt,a,f,M)}}return nt?(M||(M=new tr),mO(r,s,a,f,g,M)):!1}function Yk(r){return ke(r)&&on(r)==Et}function bf(r,s,a,f){var g=a.length,M=g,T=!f;if(r==null)return!M;for(r=me(r);g--;){var b=a[g];if(T&&b[2]?b[1]!==r[b[0]]:!(b[0]in r))return!1}for(;++g<M;){b=a[g];var k=b[0],Y=r[k],W=b[1];if(T&&b[2]){if(Y===n&&!(k in r))return!1}else{var q=new tr;if(f)var nt=f(Y,W,k,r,s,q);if(!(nt===n?_s(W,Y,S|A,f,q):nt))return!1}}return!0}function Yy(r){if(!De(r)||bO(r))return!1;var s=Er(r)?Yz:_t;return s.test(di(r))}function Wk(r){return ke(r)&&un(r)==ne}function qk(r){return ke(r)&&on(r)==ie}function _k(r){return ke(r)&&Ga(r.length)&&!!xe[un(r)]}function Wy(r){return typeof r=="function"?r:r==null?vn:typeof r=="object"?Vt(r)?Ky(r[0],r[1]):_y(r):dM(r)}function Sf(r){if(!Js(r))return Jz(r);var s=[];for(var a in me(r))de.call(r,a)&&a!="constructor"&&s.push(a);return s}function Kk(r){if(!De(r))return IO(r);var s=Js(r),a=[];for(var f in r)f=="constructor"&&(s||!de.call(r,f))||a.push(f);return a}function Nf(r,s){return r<s}function qy(r,s){var a=-1,f=mn(r)?U(r.length):[];return Qr(r,function(g,M,T){f[++a]=s(g,M,T)}),f}function _y(r){var s=Bf(r);return s.length==1&&s[0][2]?Sv(s[0][0],s[0][1]):function(a){return a===r||bf(a,r,s)}}function Ky(r,s){return Wf(r)&&bv(s)?Sv(cr(r),s):function(a){var f=td(a,r);return f===n&&f===s?ed(a,r):_s(s,f,S|A)}}function La(r,s,a,f,g){r!==s&&xf(s,function(M,T){if(g||(g=new tr),De(M))Hk(r,s,T,a,La,f,g);else{var b=f?f(_f(r,T),M,T+"",r,s,g):n;b===n&&(b=M),Mf(r,T,b)}},yn)}function Hk(r,s,a,f,g,M,T){var b=_f(r,a),k=_f(s,a),Y=T.get(k);if(Y){Mf(r,a,Y);return}var W=M?M(b,k,a+"",r,s,T):n,q=W===n;if(q){var nt=Vt(k),dt=!nt&&Wr(k),St=!nt&&!dt&&Gi(k);W=k,nt||dt||St?Vt(b)?W=b:Ue(b)?W=gn(b):dt?(q=!1,W=sv(k,!0)):St?(q=!1,W=ov(k,!0)):W=[]:Zs(k)||hi(k)?(W=b,hi(b)?W=nM(b):(!De(b)||Er(b))&&(W=Av(k))):q=!1}q&&(T.set(k,W),g(W,k,f,M,T),T.delete(k)),Mf(r,a,W)}function Hy(r,s){var a=r.length;if(a)return s+=s<0?a:0,Tr(s,a)?r[s]:n}function Jy(r,s,a){s.length?s=Ae(s,function(M){return Vt(M)?function(T){return ci(T,M.length===1?M[0]:M)}:M}):s=[vn];var f=-1;s=Ae(s,En(bt()));var g=qy(r,function(M,T,b){var k=Ae(s,function(Y){return Y(M)});return{criteria:k,index:++f,value:M}});return xz(g,function(M,T){return aO(M,T,a)})}function Jk(r,s){return Gy(r,s,function(a,f){return ed(r,f)})}function Gy(r,s,a){for(var f=-1,g=s.length,M={};++f<g;){var T=s[f],b=ci(r,T);a(b,T)&&Ks(M,Br(T,r),b)}return M}function Gk(r){return function(s){return ci(s,r)}}function Df(r,s,a,f){var g=f?wz:Pi,M=-1,T=s.length,b=r;for(r===s&&(s=gn(s)),a&&(b=Ae(r,En(a)));++M<T;)for(var k=0,Y=s[M],W=a?a(Y):Y;(k=g(b,W,k,f))>-1;)b!==r&&Aa.call(b,k,1),Aa.call(r,k,1);return r}function Zy(r,s){for(var a=r?s.length:0,f=a-1;a--;){var g=s[a];if(a==f||g!==M){var M=g;Tr(g)?Aa.call(r,g,1):kf(r,g)}}return r}function If(r,s){return r+Na(zy()*(s-r+1))}function Zk(r,s,a,f){for(var g=-1,M=We(Sa((s-r)/(a||1)),0),T=U(M);M--;)T[f?M:++g]=r,r+=a;return T}function Cf(r,s){var a="";if(!r||s<1||s>Lt)return a;do s%2&&(a+=r),s=Na(s/2),s&&(r+=r);while(s);return a}function Wt(r,s){return Kf(Nv(r,s,vn),r+"")}function Xk(r){return Ly(Zi(r))}function $k(r,s){var a=Zi(r);return Wa(a,ui(s,0,a.length))}function Ks(r,s,a,f){if(!De(r))return r;s=Br(s,r);for(var g=-1,M=s.length,T=M-1,b=r;b!=null&&++g<M;){var k=cr(s[g]),Y=a;if(k==="__proto__"||k==="constructor"||k==="prototype")return r;if(g!=T){var W=b[k];Y=f?f(W,k,b):n,Y===n&&(Y=De(W)?W:Tr(s[g+1])?[]:{})}Ys(b,k,Y),b=b[k]}return r}var Xy=Da?function(r,s){return Da.set(r,s),r}:vn,tO=ba?function(r,s){return ba(r,"toString",{configurable:!0,enumerable:!1,value:rd(s),writable:!0})}:vn;function eO(r){return Wa(Zi(r))}function Yn(r,s,a){var f=-1,g=r.length;s<0&&(s=-s>g?0:g+s),a=a>g?g:a,a<0&&(a+=g),g=s>a?0:a-s>>>0,s>>>=0;for(var M=U(g);++f<g;)M[f]=r[f+s];return M}function nO(r,s){var a;return Qr(r,function(f,g,M){return a=s(f,g,M),!a}),!!a}function ja(r,s,a){var f=0,g=r==null?f:r.length;if(typeof s=="number"&&s===s&&g<=R){for(;f<g;){var M=f+g>>>1,T=r[M];T!==null&&!bn(T)&&(a?T<=s:T<s)?f=M+1:g=M}return g}return zf(r,s,vn,a)}function zf(r,s,a,f){var g=0,M=r==null?0:r.length;if(M===0)return 0;s=a(s);for(var T=s!==s,b=s===null,k=bn(s),Y=s===n;g<M;){var W=Na((g+M)/2),q=a(r[W]),nt=q!==n,dt=q===null,St=q===q,Yt=bn(q);if(T)var Nt=f||St;else Y?Nt=St&&(f||nt):b?Nt=St&&nt&&(f||!dt):k?Nt=St&&nt&&!dt&&(f||!Yt):dt||Yt?Nt=!1:Nt=f?q<=s:q<s;Nt?g=W+1:M=W}return sn(M,I)}function $y(r,s){for(var a=-1,f=r.length,g=0,M=[];++a<f;){var T=r[a],b=s?s(T):T;if(!a||!er(b,k)){var k=b;M[g++]=T===0?0:T}}return M}function tv(r){return typeof r=="number"?r:bn(r)?at:+r}function An(r){if(typeof r=="string")return r;if(Vt(r))return Ae(r,An)+"";if(bn(r))return ky?ky.call(r):"";var s=r+"";return s=="0"&&1/r==-xt?"-0":s}function Fr(r,s,a){var f=-1,g=pa,M=r.length,T=!0,b=[],k=b;if(a)T=!1,g=of;else if(M>=o){var Y=s?null:hO(r);if(Y)return ma(Y);T=!1,g=Us,k=new li}else k=s?[]:b;t:for(;++f<M;){var W=r[f],q=s?s(W):W;if(W=a||W!==0?W:0,T&&q===q){for(var nt=k.length;nt--;)if(k[nt]===q)continue t;s&&k.push(q),b.push(W)}else g(k,q,a)||(k!==b&&k.push(q),b.push(W))}return b}function kf(r,s){return s=Br(s,r),r=Dv(r,s),r==null||delete r[cr(Wn(s))]}function ev(r,s,a,f){return Ks(r,s,a(ci(r,s)),f)}function Ra(r,s,a,f){for(var g=r.length,M=f?g:-1;(f?M--:++M<g)&&s(r[M],M,r););return a?Yn(r,f?0:M,f?M+1:g):Yn(r,f?M+1:0,f?g:M)}function nv(r,s){var a=r;return a instanceof Jt&&(a=a.value()),af(s,function(f,g){return g.func.apply(g.thisArg,Ur([f],g.args))},a)}function Of(r,s,a){var f=r.length;if(f<2)return f?Fr(r[0]):[];for(var g=-1,M=U(f);++g<f;)for(var T=r[g],b=-1;++b<f;)b!=g&&(M[g]=Ws(M[g]||T,r[b],s,a));return Fr($e(M,1),s,a)}function rv(r,s,a){for(var f=-1,g=r.length,M=s.length,T={};++f<g;){var b=f<M?s[f]:n;a(T,r[f],b)}return T}function Lf(r){return Ue(r)?r:[]}function jf(r){return typeof r=="function"?r:vn}function Br(r,s){return Vt(r)?r:Wf(r,s)?[r]:kv(ae(r))}var rO=Wt;function Yr(r,s,a){var f=r.length;return a=a===n?f:a,!s&&a>=f?r:Yn(r,s,a)}var iv=Wz||function(r){return Xe.clearTimeout(r)};function sv(r,s){if(s)return r.slice();var a=r.length,f=Sy?Sy(a):new r.constructor(a);return r.copy(f),f}function Rf(r){var s=new r.constructor(r.byteLength);return new Ta(s).set(new Ta(r)),s}function iO(r,s){var a=s?Rf(r.buffer):r.buffer;return new r.constructor(a,r.byteOffset,r.byteLength)}function sO(r){var s=new r.constructor(r.source,re.exec(r));return s.lastIndex=r.lastIndex,s}function oO(r){return Bs?me(Bs.call(r)):{}}function ov(r,s){var a=s?Rf(r.buffer):r.buffer;return new r.constructor(a,r.byteOffset,r.length)}function av(r,s){if(r!==s){var a=r!==n,f=r===null,g=r===r,M=bn(r),T=s!==n,b=s===null,k=s===s,Y=bn(s);if(!b&&!Y&&!M&&r>s||M&&T&&k&&!b&&!Y||f&&T&&k||!a&&k||!g)return 1;if(!f&&!M&&!Y&&r<s||Y&&a&&g&&!f&&!M||b&&a&&g||!T&&g||!k)return-1}return 0}function aO(r,s,a){for(var f=-1,g=r.criteria,M=s.criteria,T=g.length,b=a.length;++f<T;){var k=av(g[f],M[f]);if(k){if(f>=b)return k;var Y=a[f];return k*(Y=="desc"?-1:1)}}return r.index-s.index}function lv(r,s,a,f){for(var g=-1,M=r.length,T=a.length,b=-1,k=s.length,Y=We(M-T,0),W=U(k+Y),q=!f;++b<k;)W[b]=s[b];for(;++g<T;)(q||g<M)&&(W[a[g]]=r[g]);for(;Y--;)W[b++]=r[g++];return W}function uv(r,s,a,f){for(var g=-1,M=r.length,T=-1,b=a.length,k=-1,Y=s.length,W=We(M-b,0),q=U(W+Y),nt=!f;++g<W;)q[g]=r[g];for(var dt=g;++k<Y;)q[dt+k]=s[k];for(;++T<b;)(nt||g<M)&&(q[dt+a[T]]=r[g++]);return q}function gn(r,s){var a=-1,f=r.length;for(s||(s=U(f));++a<f;)s[a]=r[a];return s}function ur(r,s,a,f){var g=!a;a||(a={});for(var M=-1,T=s.length;++M<T;){var b=s[M],k=f?f(a[b],r[b],b,a,r):n;k===n&&(k=r[b]),g?Mr(a,b,k):Ys(a,b,k)}return a}function lO(r,s){return ur(r,Yf(r),s)}function uO(r,s){return ur(r,Tv(r),s)}function Ua(r,s){return function(a,f){var g=Vt(a)?pz:zk,M=s?s():{};return g(a,r,bt(f,2),M)}}function Ki(r){return Wt(function(s,a){var f=-1,g=a.length,M=g>1?a[g-1]:n,T=g>2?a[2]:n;for(M=r.length>3&&typeof M=="function"?(g--,M):n,T&&cn(a[0],a[1],T)&&(M=g<3?n:M,g=1),s=me(s);++f<g;){var b=a[f];b&&r(s,b,f,M)}return s})}function cv(r,s){return function(a,f){if(a==null)return a;if(!mn(a))return r(a,f);for(var g=a.length,M=s?g:-1,T=me(a);(s?M--:++M<g)&&f(T[M],M,T)!==!1;);return a}}function fv(r){return function(s,a,f){for(var g=-1,M=me(s),T=f(s),b=T.length;b--;){var k=T[r?b:++g];if(a(M[k],k,M)===!1)break}return s}}function cO(r,s,a){var f=s&P,g=Hs(r);function M(){var T=this&&this!==Xe&&this instanceof M?g:r;return T.apply(f?a:this,arguments)}return M}function dv(r){return function(s){s=ae(s);var a=Qi(s)?$n(s):n,f=a?a[0]:s.charAt(0),g=a?Yr(a,1).join(""):s.slice(1);return f[r]()+g}}function Hi(r){return function(s){return af(cM(uM(s).replace(tz,"")),r,"")}}function Hs(r){return function(){var s=arguments;switch(s.length){case 0:return new r;case 1:return new r(s[0]);case 2:return new r(s[0],s[1]);case 3:return new r(s[0],s[1],s[2]);case 4:return new r(s[0],s[1],s[2],s[3]);case 5:return new r(s[0],s[1],s[2],s[3],s[4]);case 6:return new r(s[0],s[1],s[2],s[3],s[4],s[5]);case 7:return new r(s[0],s[1],s[2],s[3],s[4],s[5],s[6])}var a=_i(r.prototype),f=r.apply(a,s);return De(f)?f:a}}function fO(r,s,a){var f=Hs(r);function g(){for(var M=arguments.length,T=U(M),b=M,k=Ji(g);b--;)T[b]=arguments[b];var Y=M<3&&T[0]!==k&&T[M-1]!==k?[]:Vr(T,k);if(M-=Y.length,M<a)return yv(r,s,Va,g.placeholder,n,T,Y,n,n,a-M);var W=this&&this!==Xe&&this instanceof g?f:r;return Tn(W,this,T)}return g}function hv(r){return function(s,a,f){var g=me(s);if(!mn(s)){var M=bt(a,3);s=_e(s),a=function(b){return M(g[b],b,g)}}var T=r(s,a,f);return T>-1?g[M?s[T]:T]:n}}function pv(r){return xr(function(s){var a=s.length,f=a,g=Fn.prototype.thru;for(r&&s.reverse();f--;){var M=s[f];if(typeof M!="function")throw new Qn(u);if(g&&!T&&Ba(M)=="wrapper")var T=new Fn([],!0)}for(f=T?f:a;++f<a;){M=s[f];var b=Ba(M),k=b=="wrapper"?Ff(M):n;k&&qf(k[0])&&k[1]==(G|z|Q|K)&&!k[4].length&&k[9]==1?T=T[Ba(k[0])].apply(T,k[3]):T=M.length==1&&qf(M)?T[b]():T.thru(M)}return function(){var Y=arguments,W=Y[0];if(T&&Y.length==1&&Vt(W))return T.plant(W).value();for(var q=0,nt=a?s[q].apply(this,Y):W;++q<a;)nt=s[q].call(this,nt);return nt}})}function Va(r,s,a,f,g,M,T,b,k,Y){var W=s&G,q=s&P,nt=s&j,dt=s&(z|Z),St=s&vt,Yt=nt?n:Hs(r);function Nt(){for(var Kt=arguments.length,Zt=U(Kt),Sn=Kt;Sn--;)Zt[Sn]=arguments[Sn];if(dt)var fn=Ji(Nt),Nn=Ez(Zt,fn);if(f&&(Zt=lv(Zt,f,g,dt)),M&&(Zt=uv(Zt,M,T,dt)),Kt-=Nn,dt&&Kt<Y){var Ve=Vr(Zt,fn);return yv(r,s,Va,Nt.placeholder,a,Zt,Ve,b,k,Y-Kt)}var nr=q?a:this,br=nt?nr[r]:r;return Kt=Zt.length,b?Zt=zO(Zt,b):St&&Kt>1&&Zt.reverse(),W&&k<Kt&&(Zt.length=k),this&&this!==Xe&&this instanceof Nt&&(br=Yt||Hs(br)),br.apply(nr,Zt)}return Nt}function gv(r,s){return function(a,f){return Pk(a,r,s(f),{})}}function Pa(r,s){return function(a,f){var g;if(a===n&&f===n)return s;if(a!==n&&(g=a),f!==n){if(g===n)return f;typeof a=="string"||typeof f=="string"?(a=An(a),f=An(f)):(a=tv(a),f=tv(f)),g=r(a,f)}return g}}function Uf(r){return xr(function(s){return s=Ae(s,En(bt())),Wt(function(a){var f=this;return r(s,function(g){return Tn(g,f,a)})})})}function Qa(r,s){s=s===n?" ":An(s);var a=s.length;if(a<2)return a?Cf(s,r):s;var f=Cf(s,Sa(r/Fi(s)));return Qi(s)?Yr($n(f),0,r).join(""):f.slice(0,r)}function dO(r,s,a,f){var g=s&P,M=Hs(r);function T(){for(var b=-1,k=arguments.length,Y=-1,W=f.length,q=U(W+k),nt=this&&this!==Xe&&this instanceof T?M:r;++Y<W;)q[Y]=f[Y];for(;k--;)q[Y++]=arguments[++b];return Tn(nt,g?a:this,q)}return T}function mv(r){return function(s,a,f){return f&&typeof f!="number"&&cn(s,a,f)&&(a=f=n),s=Ar(s),a===n?(a=s,s=0):a=Ar(a),f=f===n?s<a?1:-1:Ar(f),Zk(s,a,f,r)}}function Fa(r){return function(s,a){return typeof s=="string"&&typeof a=="string"||(s=qn(s),a=qn(a)),r(s,a)}}function yv(r,s,a,f,g,M,T,b,k,Y){var W=s&z,q=W?T:n,nt=W?n:T,dt=W?M:n,St=W?n:M;s|=W?Q:J,s&=~(W?J:Q),s&L||(s&=-4);var Yt=[r,s,g,dt,q,St,nt,b,k,Y],Nt=a.apply(n,Yt);return qf(r)&&Iv(Nt,Yt),Nt.placeholder=f,Cv(Nt,r,s)}function Vf(r){var s=Ye[r];return function(a,f){if(a=qn(a),f=f==null?0:sn(Bt(f),292),f&&Cy(a)){var g=(ae(a)+"e").split("e"),M=s(g[0]+"e"+(+g[1]+f));return g=(ae(M)+"e").split("e"),+(g[0]+"e"+(+g[1]-f))}return s(a)}}var hO=Wi&&1/ma(new Wi([,-0]))[1]==xt?function(r){return new Wi(r)}:od;function vv(r){return function(s){var a=on(s);return a==Et?pf(s):a==ie?Cz(s):Tz(s,r(s))}}function wr(r,s,a,f,g,M,T,b){var k=s&j;if(!k&&typeof r!="function")throw new Qn(u);var Y=f?f.length:0;if(Y||(s&=-97,f=g=n),T=T===n?T:We(Bt(T),0),b=b===n?b:Bt(b),Y-=g?g.length:0,s&J){var W=f,q=g;f=g=n}var nt=k?n:Ff(r),dt=[r,s,a,f,g,W,q,M,T,b];if(nt&&DO(dt,nt),r=dt[0],s=dt[1],a=dt[2],f=dt[3],g=dt[4],b=dt[9]=dt[9]===n?k?0:r.length:We(dt[9]-Y,0),!b&&s&(z|Z)&&(s&=-25),!s||s==P)var St=cO(r,s,a);else s==z||s==Z?St=fO(r,s,b):(s==Q||s==(P|Q))&&!g.length?St=dO(r,s,a,f):St=Va.apply(n,dt);var Yt=nt?Xy:Iv;return Cv(Yt(St,dt),r,s)}function Mv(r,s,a,f){return r===n||er(r,Yi[a])&&!de.call(f,a)?s:r}function wv(r,s,a,f,g,M){return De(r)&&De(s)&&(M.set(s,r),La(r,s,n,wv,M),M.delete(s)),r}function pO(r){return Zs(r)?n:r}function xv(r,s,a,f,g,M){var T=a&S,b=r.length,k=s.length;if(b!=k&&!(T&&k>b))return!1;var Y=M.get(r),W=M.get(s);if(Y&&W)return Y==s&&W==r;var q=-1,nt=!0,dt=a&A?new li:n;for(M.set(r,s),M.set(s,r);++q<b;){var St=r[q],Yt=s[q];if(f)var Nt=T?f(Yt,St,q,s,r,M):f(St,Yt,q,r,s,M);if(Nt!==n){if(Nt)continue;nt=!1;break}if(dt){if(!lf(s,function(Kt,Zt){if(!Us(dt,Zt)&&(St===Kt||g(St,Kt,a,f,M)))return dt.push(Zt)})){nt=!1;break}}else if(!(St===Yt||g(St,Yt,a,f,M))){nt=!1;break}}return M.delete(r),M.delete(s),nt}function gO(r,s,a,f,g,M,T){switch(a){case ln:if(r.byteLength!=s.byteLength||r.byteOffset!=s.byteOffset)return!1;r=r.buffer,s=s.buffer;case je:return!(r.byteLength!=s.byteLength||!M(new Ta(r),new Ta(s)));case X:case wt:case Ft:return er(+r,+s);case qt:return r.name==s.name&&r.message==s.message;case ne:case nn:return r==s+"";case Et:var b=pf;case ie:var k=f&S;if(b||(b=ma),r.size!=s.size&&!k)return!1;var Y=T.get(r);if(Y)return Y==s;f|=A,T.set(r,s);var W=xv(b(r),b(s),f,g,M,T);return T.delete(r),W;case Le:if(Bs)return Bs.call(r)==Bs.call(s)}return!1}function mO(r,s,a,f,g,M){var T=a&S,b=Pf(r),k=b.length,Y=Pf(s),W=Y.length;if(k!=W&&!T)return!1;for(var q=k;q--;){var nt=b[q];if(!(T?nt in s:de.call(s,nt)))return!1}var dt=M.get(r),St=M.get(s);if(dt&&St)return dt==s&&St==r;var Yt=!0;M.set(r,s),M.set(s,r);for(var Nt=T;++q<k;){nt=b[q];var Kt=r[nt],Zt=s[nt];if(f)var Sn=T?f(Zt,Kt,nt,s,r,M):f(Kt,Zt,nt,r,s,M);if(!(Sn===n?Kt===Zt||g(Kt,Zt,a,f,M):Sn)){Yt=!1;break}Nt||(Nt=nt=="constructor")}if(Yt&&!Nt){var fn=r.constructor,Nn=s.constructor;fn!=Nn&&"constructor"in r&&"constructor"in s&&!(typeof fn=="function"&&fn instanceof fn&&typeof Nn=="function"&&Nn instanceof Nn)&&(Yt=!1)}return M.delete(r),M.delete(s),Yt}function xr(r){return Kf(Nv(r,n,Rv),r+"")}function Pf(r){return Fy(r,_e,Yf)}function Qf(r){return Fy(r,yn,Tv)}var Ff=Da?function(r){return Da.get(r)}:od;function Ba(r){for(var s=r.name+"",a=qi[s],f=de.call(qi,s)?a.length:0;f--;){var g=a[f],M=g.func;if(M==null||M==r)return g.name}return s}function Ji(r){var s=de.call(y,"placeholder")?y:r;return s.placeholder}function bt(){var r=y.iteratee||id;return r=r===id?Wy:r,arguments.length?r(arguments[0],arguments[1]):r}function Ya(r,s){var a=r.__data__;return AO(s)?a[typeof s=="string"?"string":"hash"]:a.map}function Bf(r){for(var s=_e(r),a=s.length;a--;){var f=s[a],g=r[f];s[a]=[f,g,bv(g)]}return s}function fi(r,s){var a=Nz(r,s);return Yy(a)?a:n}function yO(r){var s=de.call(r,oi),a=r[oi];try{r[oi]=n;var f=!0}catch{}var g=wa.call(r);return f&&(s?r[oi]=a:delete r[oi]),g}var Yf=mf?function(r){return r==null?[]:(r=me(r),Rr(mf(r),function(s){return Dy.call(r,s)}))}:ad,Tv=mf?function(r){for(var s=[];r;)Ur(s,Yf(r)),r=Ea(r);return s}:ad,on=un;(yf&&on(new yf(new ArrayBuffer(1)))!=ln||Ps&&on(new Ps)!=Et||vf&&on(vf.resolve())!=Fe||Wi&&on(new Wi)!=ie||Qs&&on(new Qs)!=Me)&&(on=function(r){var s=un(r),a=s==$t?r.constructor:n,f=a?di(a):"";if(f)switch(f){case $z:return ln;case tk:return Et;case ek:return Fe;case nk:return ie;case rk:return Me}return s});function vO(r,s,a){for(var f=-1,g=a.length;++f<g;){var M=a[f],T=M.size;switch(M.type){case"drop":r+=T;break;case"dropRight":s-=T;break;case"take":s=sn(s,r+T);break;case"takeRight":r=We(r,s-T);break}}return{start:r,end:s}}function MO(r){var s=r.match(Jc);return s?s[1].split(Gc):[]}function Ev(r,s,a){s=Br(s,r);for(var f=-1,g=s.length,M=!1;++f<g;){var T=cr(s[f]);if(!(M=r!=null&&a(r,T)))break;r=r[T]}return M||++f!=g?M:(g=r==null?0:r.length,!!g&&Ga(g)&&Tr(T,g)&&(Vt(r)||hi(r)))}function wO(r){var s=r.length,a=new r.constructor(s);return s&&typeof r[0]=="string"&&de.call(r,"index")&&(a.index=r.index,a.input=r.input),a}function Av(r){return typeof r.constructor=="function"&&!Js(r)?_i(Ea(r)):{}}function xO(r,s,a){var f=r.constructor;switch(s){case je:return Rf(r);case X:case wt:return new f(+r);case ln:return iO(r,a);case wn:case xn:case ar:case Zn:case Xn:case pn:case O:case D:case _:return ov(r,a);case Et:return new f;case Ft:case nn:return new f(r);case ne:return sO(r);case ie:return new f;case Le:return oO(r)}}function TO(r,s){var a=s.length;if(!a)return r;var f=a-1;return s[f]=(a>1?"& ":"")+s[f],s=s.join(a>2?", ":" "),r.replace(Hc,`{
36
36
  /* [wrapped with `+s+`] */
37
- `)}function E4(r){return Vt(r)||hi(r)||!!(Iy&&r&&r[Iy])}function Tr(r,s){var a=typeof r;return s=s??Lt,!!s&&(a=="number"||a!="symbol"&&Ne.test(r))&&r>-1&&r%1==0&&r<s}function cn(r,s,a){if(!De(a))return!1;var f=typeof s;return(f=="number"?mn(a)&&Tr(s,a.length):f=="string"&&s in a)?er(a[s],r):!1}function Wf(r,s){if(Vt(r))return!1;var a=typeof r;return a=="number"||a=="symbol"||a=="boolean"||r==null||bn(r)?!0:pe.test(r)||!ce.test(r)||s!=null&&r in me(s)}function A4(r){var s=typeof r;return s=="string"||s=="number"||s=="symbol"||s=="boolean"?r!=="__proto__":r===null}function qf(r){var s=Ba(r),a=y[s];if(typeof a!="function"||!(s in Jt.prototype))return!1;if(r===a)return!0;var f=Ff(a);return!!f&&r===f[0]}function b4(r){return!!by&&by in r}var S4=va?Er:ld;function Js(r){var s=r&&r.constructor,a=typeof s=="function"&&s.prototype||Yi;return r===a}function bv(r){return r===r&&!De(r)}function Sv(r,s){return function(a){return a==null?!1:a[r]===s&&(s!==n||r in me(a))}}function N4(r){var s=Ha(r,function(f){return a.size===h&&a.clear(),f}),a=s.cache;return s}function D4(r,s){var a=r[1],f=s[1],g=a|f,M=g<(P|j|G),T=f==G&&a==z||f==G&&a==K&&r[7].length<=s[8]||f==(G|K)&&s[7].length<=s[8]&&a==z;if(!(M||T))return r;f&P&&(r[2]=s[2],g|=a&P?0:L);var b=s[3];if(b){var k=r[3];r[3]=k?lv(k,b,s[4]):b,r[4]=k?Vr(r[3],p):s[4]}return b=s[5],b&&(k=r[5],r[5]=k?uv(k,b,s[6]):b,r[6]=k?Vr(r[5],p):s[6]),b=s[7],b&&(r[7]=b),f&G&&(r[8]=r[8]==null?s[8]:sn(r[8],s[8])),r[9]==null&&(r[9]=s[9]),r[0]=s[0],r[1]=g,r}function I4(r){var s=[];if(r!=null)for(var a in me(r))s.push(a);return s}function C4(r){return wa.call(r)}function Nv(r,s,a){return s=We(s===n?r.length-1:s,0),function(){for(var f=arguments,g=-1,M=We(f.length-s,0),T=U(M);++g<M;)T[g]=f[s+g];g=-1;for(var b=U(s+1);++g<s;)b[g]=f[g];return b[s]=a(T),Tn(r,this,b)}}function Dv(r,s){return s.length<2?r:ci(r,Yn(s,0,-1))}function z4(r,s){for(var a=r.length,f=sn(s.length,a),g=gn(r);f--;){var M=s[f];r[f]=Tr(M,a)?g[M]:n}return r}function _f(r,s){if(!(s==="constructor"&&typeof r[s]=="function")&&s!="__proto__")return r[s]}var Iv=zv(Xy),Gs=_z||function(r,s){return Xe.setTimeout(r,s)},Kf=zv(t4);function Cv(r,s,a){var f=s+"";return Kf(r,T4(f,k4(M4(f),a)))}function zv(r){var s=0,a=0;return function(){var f=Gz(),g=Tt-(f-a);if(a=f,g>0){if(++s>=Qt)return arguments[0]}else s=0;return r.apply(n,arguments)}}function Wa(r,s){var a=-1,f=r.length,g=f-1;for(s=s===n?f:s;++a<s;){var M=If(a,g),T=r[M];r[M]=r[a],r[a]=T}return r.length=s,r}var kv=N4(function(r){var s=[];return r.charCodeAt(0)===46&&s.push(""),r.replace(Be,function(a,f,g,M){s.push(g?M.replace(ot,"$1"):f||a)}),s});function cr(r){if(typeof r=="string"||bn(r))return r;var s=r+"";return s=="0"&&1/r==-xt?"-0":s}function di(r){if(r!=null){try{return Ma.call(r)}catch{}try{return r+""}catch{}}return""}function k4(r,s){return Pn(N,function(a){var f="_."+a[0];s&a[1]&&!pa(r,f)&&r.push(f)}),r.sort()}function Ov(r){if(r instanceof Jt)return r.clone();var s=new Fn(r.__wrapped__,r.__chain__);return s.__actions__=gn(r.__actions__),s.__index__=r.__index__,s.__values__=r.__values__,s}function O4(r,s,a){(a?cn(r,s,a):s===n)?s=1:s=We(Bt(s),0);var f=r==null?0:r.length;if(!f||s<1)return[];for(var g=0,M=0,T=U(Sa(f/s));g<f;)T[M++]=Yn(r,g,g+=s);return T}function L4(r){for(var s=-1,a=r==null?0:r.length,f=0,g=[];++s<a;){var M=r[s];M&&(g[f++]=M)}return g}function j4(){var r=arguments.length;if(!r)return[];for(var s=U(r-1),a=arguments[0],f=r;f--;)s[f-1]=arguments[f];return Ur(Vt(a)?gn(a):[a],$e(s,1))}var R4=Wt(function(r,s){return Ue(r)?Ws(r,$e(s,1,Ue,!0)):[]}),U4=Wt(function(r,s){var a=Wn(s);return Ue(a)&&(a=n),Ue(r)?Ws(r,$e(s,1,Ue,!0),bt(a,2)):[]}),V4=Wt(function(r,s){var a=Wn(s);return Ue(a)&&(a=n),Ue(r)?Ws(r,$e(s,1,Ue,!0),n,a):[]});function P4(r,s,a){var f=r==null?0:r.length;return f?(s=a||s===n?1:Bt(s),Yn(r,s<0?0:s,f)):[]}function Q4(r,s,a){var f=r==null?0:r.length;return f?(s=a||s===n?1:Bt(s),s=f-s,Yn(r,0,s<0?0:s)):[]}function F4(r,s){return r&&r.length?Ra(r,bt(s,3),!0,!0):[]}function B4(r,s){return r&&r.length?Ra(r,bt(s,3),!0):[]}function Y4(r,s,a,f){var g=r==null?0:r.length;return g?(a&&typeof a!="number"&&cn(r,s,a)&&(a=0,f=g),jk(r,s,a,f)):[]}function Lv(r,s,a){var f=r==null?0:r.length;if(!f)return-1;var g=a==null?0:Bt(a);return g<0&&(g=We(f+g,0)),ga(r,bt(s,3),g)}function jv(r,s,a){var f=r==null?0:r.length;if(!f)return-1;var g=f-1;return a!==n&&(g=Bt(a),g=a<0?We(f+g,0):sn(g,f-1)),ga(r,bt(s,3),g,!0)}function Rv(r){var s=r==null?0:r.length;return s?$e(r,1):[]}function W4(r){var s=r==null?0:r.length;return s?$e(r,xt):[]}function q4(r,s){var a=r==null?0:r.length;return a?(s=s===n?1:Bt(s),$e(r,s)):[]}function _4(r){for(var s=-1,a=r==null?0:r.length,f={};++s<a;){var g=r[s];f[g[0]]=g[1]}return f}function Uv(r){return r&&r.length?r[0]:n}function K4(r,s,a){var f=r==null?0:r.length;if(!f)return-1;var g=a==null?0:Bt(a);return g<0&&(g=We(f+g,0)),Pi(r,s,g)}function H4(r){var s=r==null?0:r.length;return s?Yn(r,0,-1):[]}var J4=Wt(function(r){var s=Ae(r,Lf);return s.length&&s[0]===r[0]?Af(s):[]}),G4=Wt(function(r){var s=Wn(r),a=Ae(r,Lf);return s===Wn(a)?s=n:a.pop(),a.length&&a[0]===r[0]?Af(a,bt(s,2)):[]}),Z4=Wt(function(r){var s=Wn(r),a=Ae(r,Lf);return s=typeof s=="function"?s:n,s&&a.pop(),a.length&&a[0]===r[0]?Af(a,n,s):[]});function X4(r,s){return r==null?"":Hz.call(r,s)}function Wn(r){var s=r==null?0:r.length;return s?r[s-1]:n}function $4(r,s,a){var f=r==null?0:r.length;if(!f)return-1;var g=f;return a!==n&&(g=Bt(a),g=g<0?We(f+g,0):sn(g,f-1)),s===s?kz(r,s,g):ga(r,yy,g,!0)}function tO(r,s){return r&&r.length?Hy(r,Bt(s)):n}var eO=Wt(Vv);function Vv(r,s){return r&&r.length&&s&&s.length?Df(r,s):r}function nO(r,s,a){return r&&r.length&&s&&s.length?Df(r,s,bt(a,2)):r}function rO(r,s,a){return r&&r.length&&s&&s.length?Df(r,s,n,a):r}var iO=xr(function(r,s){var a=r==null?0:r.length,f=wf(r,s);return Zy(r,Ae(s,function(g){return Tr(g,a)?+g:g}).sort(av)),f});function sO(r,s){var a=[];if(!(r&&r.length))return a;var f=-1,g=[],M=r.length;for(s=bt(s,3);++f<M;){var T=r[f];s(T,f,r)&&(a.push(T),g.push(f))}return Zy(r,g),a}function Hf(r){return r==null?r:Xz.call(r)}function oO(r,s,a){var f=r==null?0:r.length;return f?(a&&typeof a!="number"&&cn(r,s,a)?(s=0,a=f):(s=s==null?0:Bt(s),a=a===n?f:Bt(a)),Yn(r,s,a)):[]}function aO(r,s){return ja(r,s)}function lO(r,s,a){return zf(r,s,bt(a,2))}function uO(r,s){var a=r==null?0:r.length;if(a){var f=ja(r,s);if(f<a&&er(r[f],s))return f}return-1}function cO(r,s){return ja(r,s,!0)}function fO(r,s,a){return zf(r,s,bt(a,2),!0)}function dO(r,s){var a=r==null?0:r.length;if(a){var f=ja(r,s,!0)-1;if(er(r[f],s))return f}return-1}function hO(r){return r&&r.length?$y(r):[]}function pO(r,s){return r&&r.length?$y(r,bt(s,2)):[]}function gO(r){var s=r==null?0:r.length;return s?Yn(r,1,s):[]}function mO(r,s,a){return r&&r.length?(s=a||s===n?1:Bt(s),Yn(r,0,s<0?0:s)):[]}function yO(r,s,a){var f=r==null?0:r.length;return f?(s=a||s===n?1:Bt(s),s=f-s,Yn(r,s<0?0:s,f)):[]}function vO(r,s){return r&&r.length?Ra(r,bt(s,3),!1,!0):[]}function MO(r,s){return r&&r.length?Ra(r,bt(s,3)):[]}var wO=Wt(function(r){return Fr($e(r,1,Ue,!0))}),xO=Wt(function(r){var s=Wn(r);return Ue(s)&&(s=n),Fr($e(r,1,Ue,!0),bt(s,2))}),TO=Wt(function(r){var s=Wn(r);return s=typeof s=="function"?s:n,Fr($e(r,1,Ue,!0),n,s)});function EO(r){return r&&r.length?Fr(r):[]}function AO(r,s){return r&&r.length?Fr(r,bt(s,2)):[]}function bO(r,s){return s=typeof s=="function"?s:n,r&&r.length?Fr(r,n,s):[]}function Jf(r){if(!(r&&r.length))return[];var s=0;return r=Rr(r,function(a){if(Ue(a))return s=We(a.length,s),!0}),df(s,function(a){return Ae(r,uf(a))})}function Pv(r,s){if(!(r&&r.length))return[];var a=Jf(r);return s==null?a:Ae(a,function(f){return Tn(s,n,f)})}var SO=Wt(function(r,s){return Ue(r)?Ws(r,s):[]}),NO=Wt(function(r){return Of(Rr(r,Ue))}),DO=Wt(function(r){var s=Wn(r);return Ue(s)&&(s=n),Of(Rr(r,Ue),bt(s,2))}),IO=Wt(function(r){var s=Wn(r);return s=typeof s=="function"?s:n,Of(Rr(r,Ue),n,s)}),CO=Wt(Jf);function zO(r,s){return rv(r||[],s||[],Ys)}function kO(r,s){return rv(r||[],s||[],Ks)}var OO=Wt(function(r){var s=r.length,a=s>1?r[s-1]:n;return a=typeof a=="function"?(r.pop(),a):n,Pv(r,a)});function Qv(r){var s=y(r);return s.__chain__=!0,s}function LO(r,s){return s(r),r}function qa(r,s){return s(r)}var jO=xr(function(r){var s=r.length,a=s?r[0]:0,f=this.__wrapped__,g=function(M){return wf(M,r)};return s>1||this.__actions__.length||!(f instanceof Jt)||!Tr(a)?this.thru(g):(f=f.slice(a,+a+(s?1:0)),f.__actions__.push({func:qa,args:[g],thisArg:n}),new Fn(f,this.__chain__).thru(function(M){return s&&!M.length&&M.push(n),M}))});function RO(){return Qv(this)}function UO(){return new Fn(this.value(),this.__chain__)}function VO(){this.__values__===n&&(this.__values__=tM(this.value()));var r=this.__index__>=this.__values__.length,s=r?n:this.__values__[this.__index__++];return{done:r,value:s}}function PO(){return this}function QO(r){for(var s,a=this;a instanceof Ca;){var f=Ov(a);f.__index__=0,f.__values__=n,s?g.__wrapped__=f:s=f;var g=f;a=a.__wrapped__}return g.__wrapped__=r,s}function FO(){var r=this.__wrapped__;if(r instanceof Jt){var s=r;return this.__actions__.length&&(s=new Jt(this)),s=s.reverse(),s.__actions__.push({func:qa,args:[Hf],thisArg:n}),new Fn(s,this.__chain__)}return this.thru(Hf)}function BO(){return nv(this.__wrapped__,this.__actions__)}var YO=Ua(function(r,s,a){de.call(r,a)?++r[a]:Mr(r,a,1)});function WO(r,s,a){var f=Vt(r)?gy:Lk;return a&&cn(r,s,a)&&(s=n),f(r,bt(s,3))}function qO(r,s){var a=Vt(r)?Rr:Py;return a(r,bt(s,3))}var _O=hv(Lv),KO=hv(jv);function HO(r,s){return $e(_a(r,s),1)}function JO(r,s){return $e(_a(r,s),xt)}function GO(r,s,a){return a=a===n?1:Bt(a),$e(_a(r,s),a)}function Fv(r,s){var a=Vt(r)?Pn:Qr;return a(r,bt(s,3))}function Bv(r,s){var a=Vt(r)?gz:Vy;return a(r,bt(s,3))}var ZO=Ua(function(r,s,a){de.call(r,a)?r[a].push(s):Mr(r,a,[s])});function XO(r,s,a,f){r=mn(r)?r:Zi(r),a=a&&!f?Bt(a):0;var g=r.length;return a<0&&(a=We(g+a,0)),Za(r)?a<=g&&r.indexOf(s,a)>-1:!!g&&Pi(r,s,a)>-1}var $O=Wt(function(r,s,a){var f=-1,g=typeof s=="function",M=mn(r)?U(r.length):[];return Qr(r,function(T){M[++f]=g?Tn(s,T,a):qs(T,s,a)}),M}),tL=Ua(function(r,s,a){Mr(r,a,s)});function _a(r,s){var a=Vt(r)?Ae:qy;return a(r,bt(s,3))}function eL(r,s,a,f){return r==null?[]:(Vt(s)||(s=s==null?[]:[s]),a=f?n:a,Vt(a)||(a=a==null?[]:[a]),Jy(r,s,a))}var nL=Ua(function(r,s,a){r[a?0:1].push(s)},function(){return[[],[]]});function rL(r,s,a){var f=Vt(r)?af:My,g=arguments.length<3;return f(r,bt(s,4),a,g,Qr)}function iL(r,s,a){var f=Vt(r)?mz:My,g=arguments.length<3;return f(r,bt(s,4),a,g,Vy)}function sL(r,s){var a=Vt(r)?Rr:Py;return a(r,Ja(bt(s,3)))}function oL(r){var s=Vt(r)?Ly:Xk;return s(r)}function aL(r,s,a){(a?cn(r,s,a):s===n)?s=1:s=Bt(s);var f=Vt(r)?Ik:$k;return f(r,s)}function lL(r){var s=Vt(r)?Ck:e4;return s(r)}function uL(r){if(r==null)return 0;if(mn(r))return Za(r)?Fi(r):r.length;var s=on(r);return s==Et||s==ie?r.size:Sf(r).length}function cL(r,s,a){var f=Vt(r)?lf:n4;return a&&cn(r,s,a)&&(s=n),f(r,bt(s,3))}var fL=Wt(function(r,s){if(r==null)return[];var a=s.length;return a>1&&cn(r,s[0],s[1])?s=[]:a>2&&cn(s[0],s[1],s[2])&&(s=[s[0]]),Jy(r,$e(s,1),[])}),Ka=qz||function(){return Xe.Date.now()};function dL(r,s){if(typeof s!="function")throw new Qn(u);return r=Bt(r),function(){if(--r<1)return s.apply(this,arguments)}}function Yv(r,s,a){return s=a?n:s,s=r&&s==null?r.length:s,wr(r,G,n,n,n,n,s)}function Wv(r,s){var a;if(typeof s!="function")throw new Qn(u);return r=Bt(r),function(){return--r>0&&(a=s.apply(this,arguments)),r<=1&&(s=n),a}}var Gf=Wt(function(r,s,a){var f=P;if(a.length){var g=Vr(a,Ji(Gf));f|=Q}return wr(r,f,s,a,g)}),qv=Wt(function(r,s,a){var f=P|j;if(a.length){var g=Vr(a,Ji(qv));f|=Q}return wr(s,f,r,a,g)});function _v(r,s,a){s=a?n:s;var f=wr(r,z,n,n,n,n,n,s);return f.placeholder=_v.placeholder,f}function Kv(r,s,a){s=a?n:s;var f=wr(r,Z,n,n,n,n,n,s);return f.placeholder=Kv.placeholder,f}function Hv(r,s,a){var f,g,M,T,b,k,Y=0,W=!1,q=!1,nt=!0;if(typeof r!="function")throw new Qn(u);s=qn(s)||0,De(a)&&(W=!!a.leading,q="maxWait"in a,M=q?We(qn(a.maxWait)||0,s):M,nt="trailing"in a?!!a.trailing:nt);function dt(Ve){var nr=f,br=g;return f=g=n,Y=Ve,T=r.apply(br,nr),T}function St(Ve){return Y=Ve,b=Gs(Kt,s),W?dt(Ve):T}function Yt(Ve){var nr=Ve-k,br=Ve-Y,hM=s-nr;return q?sn(hM,M-br):hM}function Nt(Ve){var nr=Ve-k,br=Ve-Y;return k===n||nr>=s||nr<0||q&&br>=M}function Kt(){var Ve=Ka();if(Nt(Ve))return Zt(Ve);b=Gs(Kt,Yt(Ve))}function Zt(Ve){return b=n,nt&&f?dt(Ve):(f=g=n,T)}function Sn(){b!==n&&iv(b),Y=0,f=k=g=b=n}function fn(){return b===n?T:Zt(Ka())}function Nn(){var Ve=Ka(),nr=Nt(Ve);if(f=arguments,g=this,k=Ve,nr){if(b===n)return St(k);if(q)return iv(b),b=Gs(Kt,s),dt(k)}return b===n&&(b=Gs(Kt,s)),T}return Nn.cancel=Sn,Nn.flush=fn,Nn}var hL=Wt(function(r,s){return Uy(r,1,s)}),pL=Wt(function(r,s,a){return Uy(r,qn(s)||0,a)});function gL(r){return wr(r,vt)}function Ha(r,s){if(typeof r!="function"||s!=null&&typeof s!="function")throw new Qn(u);var a=function(){var f=arguments,g=s?s.apply(this,f):f[0],M=a.cache;if(M.has(g))return M.get(g);var T=r.apply(this,f);return a.cache=M.set(g,T)||M,T};return a.cache=new(Ha.Cache||vr),a}Ha.Cache=vr;function Ja(r){if(typeof r!="function")throw new Qn(u);return function(){var s=arguments;switch(s.length){case 0:return!r.call(this);case 1:return!r.call(this,s[0]);case 2:return!r.call(this,s[0],s[1]);case 3:return!r.call(this,s[0],s[1],s[2])}return!r.apply(this,s)}}function mL(r){return Wv(2,r)}var yL=r4(function(r,s){s=s.length==1&&Vt(s[0])?Ae(s[0],En(bt())):Ae($e(s,1),En(bt()));var a=s.length;return Wt(function(f){for(var g=-1,M=sn(f.length,a);++g<M;)f[g]=s[g].call(this,f[g]);return Tn(r,this,f)})}),Zf=Wt(function(r,s){var a=Vr(s,Ji(Zf));return wr(r,Q,n,s,a)}),Jv=Wt(function(r,s){var a=Vr(s,Ji(Jv));return wr(r,J,n,s,a)}),vL=xr(function(r,s){return wr(r,K,n,n,n,s)});function ML(r,s){if(typeof r!="function")throw new Qn(u);return s=s===n?s:Bt(s),Wt(r,s)}function wL(r,s){if(typeof r!="function")throw new Qn(u);return s=s==null?0:We(Bt(s),0),Wt(function(a){var f=a[s],g=Yr(a,0,s);return f&&Ur(g,f),Tn(r,this,g)})}function xL(r,s,a){var f=!0,g=!0;if(typeof r!="function")throw new Qn(u);return De(a)&&(f="leading"in a?!!a.leading:f,g="trailing"in a?!!a.trailing:g),Hv(r,s,{leading:f,maxWait:s,trailing:g})}function TL(r){return Yv(r,1)}function EL(r,s){return Zf(jf(s),r)}function AL(){if(!arguments.length)return[];var r=arguments[0];return Vt(r)?r:[r]}function bL(r){return Bn(r,v)}function SL(r,s){return s=typeof s=="function"?s:n,Bn(r,v,s)}function NL(r){return Bn(r,m|v)}function DL(r,s){return s=typeof s=="function"?s:n,Bn(r,m|v,s)}function IL(r,s){return s==null||Ry(r,s,_e(s))}function er(r,s){return r===s||r!==r&&s!==s}var CL=Fa(Ef),zL=Fa(function(r,s){return r>=s}),hi=By((function(){return arguments})())?By:function(r){return ke(r)&&de.call(r,"callee")&&!Dy.call(r,"callee")},Vt=U.isArray,kL=uy?En(uy):Qk;function mn(r){return r!=null&&Ga(r.length)&&!Er(r)}function Ue(r){return ke(r)&&mn(r)}function OL(r){return r===!0||r===!1||ke(r)&&un(r)==X}var Wr=Kz||ld,LL=cy?En(cy):Fk;function jL(r){return ke(r)&&r.nodeType===1&&!Zs(r)}function RL(r){if(r==null)return!0;if(mn(r)&&(Vt(r)||typeof r=="string"||typeof r.splice=="function"||Wr(r)||Gi(r)||hi(r)))return!r.length;var s=on(r);if(s==Et||s==ie)return!r.size;if(Js(r))return!Sf(r).length;for(var a in r)if(de.call(r,a))return!1;return!0}function UL(r,s){return _s(r,s)}function VL(r,s,a){a=typeof a=="function"?a:n;var f=a?a(r,s):n;return f===n?_s(r,s,n,a):!!f}function Xf(r){if(!ke(r))return!1;var s=un(r);return s==qt||s==kt||typeof r.message=="string"&&typeof r.name=="string"&&!Zs(r)}function PL(r){return typeof r=="number"&&Cy(r)}function Er(r){if(!De(r))return!1;var s=un(r);return s==Ut||s==yt||s==$||s==ve}function Gv(r){return typeof r=="number"&&r==Bt(r)}function Ga(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Lt}function De(r){var s=typeof r;return r!=null&&(s=="object"||s=="function")}function ke(r){return r!=null&&typeof r=="object"}var Zv=fy?En(fy):Yk;function QL(r,s){return r===s||bf(r,s,Bf(s))}function FL(r,s,a){return a=typeof a=="function"?a:n,bf(r,s,Bf(s),a)}function BL(r){return Xv(r)&&r!=+r}function YL(r){if(S4(r))throw new Rt(l);return Yy(r)}function WL(r){return r===null}function qL(r){return r==null}function Xv(r){return typeof r=="number"||ke(r)&&un(r)==Ft}function Zs(r){if(!ke(r)||un(r)!=$t)return!1;var s=Ea(r);if(s===null)return!0;var a=de.call(s,"constructor")&&s.constructor;return typeof a=="function"&&a instanceof a&&Ma.call(a)==Fz}var $f=dy?En(dy):Wk;function _L(r){return Gv(r)&&r>=-Lt&&r<=Lt}var $v=hy?En(hy):qk;function Za(r){return typeof r=="string"||!Vt(r)&&ke(r)&&un(r)==nn}function bn(r){return typeof r=="symbol"||ke(r)&&un(r)==Le}var Gi=py?En(py):_k;function KL(r){return r===n}function HL(r){return ke(r)&&on(r)==Me}function JL(r){return ke(r)&&un(r)==ue}var GL=Fa(Nf),ZL=Fa(function(r,s){return r<=s});function tM(r){if(!r)return[];if(mn(r))return Za(r)?$n(r):gn(r);if(Vs&&r[Vs])return Iz(r[Vs]());var s=on(r),a=s==Et?pf:s==ie?ma:Zi;return a(r)}function Ar(r){if(!r)return r===0?r:0;if(r=qn(r),r===xt||r===-xt){var s=r<0?-1:1;return s*ht}return r===r?r:0}function Bt(r){var s=Ar(r),a=s%1;return s===s?a?s-a:s:0}function eM(r){return r?ui(Bt(r),0,pt):0}function qn(r){if(typeof r=="number")return r;if(bn(r))return at;if(De(r)){var s=typeof r.valueOf=="function"?r.valueOf():r;r=De(s)?s+"":s}if(typeof r!="string")return r===0?r:+r;r=wy(r);var a=Ht.test(r);return a||Ge.test(r)?dz(r.slice(2),a?2:8):fe.test(r)?at:+r}function nM(r){return ur(r,yn(r))}function XL(r){return r?ui(Bt(r),-Lt,Lt):r===0?r:0}function ae(r){return r==null?"":An(r)}var $L=Ki(function(r,s){if(Js(s)||mn(s)){ur(s,_e(s),r);return}for(var a in s)de.call(s,a)&&Ys(r,a,s[a])}),rM=Ki(function(r,s){ur(s,yn(s),r)}),Xa=Ki(function(r,s,a,f){ur(s,yn(s),r,f)}),tj=Ki(function(r,s,a,f){ur(s,_e(s),r,f)}),ej=xr(wf);function nj(r,s){var a=_i(r);return s==null?a:jy(a,s)}var rj=Wt(function(r,s){r=me(r);var a=-1,f=s.length,g=f>2?s[2]:n;for(g&&cn(s[0],s[1],g)&&(f=1);++a<f;)for(var M=s[a],T=yn(M),b=-1,k=T.length;++b<k;){var Y=T[b],W=r[Y];(W===n||er(W,Yi[Y])&&!de.call(r,Y))&&(r[Y]=M[Y])}return r}),ij=Wt(function(r){return r.push(n,wv),Tn(iM,n,r)});function sj(r,s){return my(r,bt(s,3),lr)}function oj(r,s){return my(r,bt(s,3),Tf)}function aj(r,s){return r==null?r:xf(r,bt(s,3),yn)}function lj(r,s){return r==null?r:Qy(r,bt(s,3),yn)}function uj(r,s){return r&&lr(r,bt(s,3))}function cj(r,s){return r&&Tf(r,bt(s,3))}function fj(r){return r==null?[]:Oa(r,_e(r))}function dj(r){return r==null?[]:Oa(r,yn(r))}function td(r,s,a){var f=r==null?n:ci(r,s);return f===n?a:f}function hj(r,s){return r!=null&&Ev(r,s,Rk)}function ed(r,s){return r!=null&&Ev(r,s,Uk)}var pj=gv(function(r,s,a){s!=null&&typeof s.toString!="function"&&(s=wa.call(s)),r[s]=a},rd(vn)),gj=gv(function(r,s,a){s!=null&&typeof s.toString!="function"&&(s=wa.call(s)),de.call(r,s)?r[s].push(a):r[s]=[a]},bt),mj=Wt(qs);function _e(r){return mn(r)?Oy(r):Sf(r)}function yn(r){return mn(r)?Oy(r,!0):Kk(r)}function yj(r,s){var a={};return s=bt(s,3),lr(r,function(f,g,M){Mr(a,s(f,g,M),f)}),a}function vj(r,s){var a={};return s=bt(s,3),lr(r,function(f,g,M){Mr(a,g,s(f,g,M))}),a}var Mj=Ki(function(r,s,a){La(r,s,a)}),iM=Ki(function(r,s,a,f){La(r,s,a,f)}),wj=xr(function(r,s){var a={};if(r==null)return a;var f=!1;s=Ae(s,function(M){return M=Br(M,r),f||(f=M.length>1),M}),ur(r,Qf(r),a),f&&(a=Bn(a,m|w|v,p4));for(var g=s.length;g--;)kf(a,s[g]);return a});function xj(r,s){return sM(r,Ja(bt(s)))}var Tj=xr(function(r,s){return r==null?{}:Jk(r,s)});function sM(r,s){if(r==null)return{};var a=Ae(Qf(r),function(f){return[f]});return s=bt(s),Gy(r,a,function(f,g){return s(f,g[0])})}function Ej(r,s,a){s=Br(s,r);var f=-1,g=s.length;for(g||(g=1,r=n);++f<g;){var M=r==null?n:r[cr(s[f])];M===n&&(f=g,M=a),r=Er(M)?M.call(r):M}return r}function Aj(r,s,a){return r==null?r:Ks(r,s,a)}function bj(r,s,a,f){return f=typeof f=="function"?f:n,r==null?r:Ks(r,s,a,f)}var oM=vv(_e),aM=vv(yn);function Sj(r,s,a){var f=Vt(r),g=f||Wr(r)||Gi(r);if(s=bt(s,4),a==null){var M=r&&r.constructor;g?a=f?new M:[]:De(r)?a=Er(M)?_i(Ea(r)):{}:a={}}return(g?Pn:lr)(r,function(T,b,k){return s(a,T,b,k)}),a}function Nj(r,s){return r==null?!0:kf(r,s)}function Dj(r,s,a){return r==null?r:ev(r,s,jf(a))}function Ij(r,s,a,f){return f=typeof f=="function"?f:n,r==null?r:ev(r,s,jf(a),f)}function Zi(r){return r==null?[]:hf(r,_e(r))}function Cj(r){return r==null?[]:hf(r,yn(r))}function zj(r,s,a){return a===n&&(a=s,s=n),a!==n&&(a=qn(a),a=a===a?a:0),s!==n&&(s=qn(s),s=s===s?s:0),ui(qn(r),s,a)}function kj(r,s,a){return s=Ar(s),a===n?(a=s,s=0):a=Ar(a),r=qn(r),Vk(r,s,a)}function Oj(r,s,a){if(a&&typeof a!="boolean"&&cn(r,s,a)&&(s=a=n),a===n&&(typeof s=="boolean"?(a=s,s=n):typeof r=="boolean"&&(a=r,r=n)),r===n&&s===n?(r=0,s=1):(r=Ar(r),s===n?(s=r,r=0):s=Ar(s)),r>s){var f=r;r=s,s=f}if(a||r%1||s%1){var g=zy();return sn(r+g*(s-r+fz("1e-"+((g+"").length-1))),s)}return If(r,s)}var Lj=Hi(function(r,s,a){return s=s.toLowerCase(),r+(a?lM(s):s)});function lM(r){return nd(ae(r).toLowerCase())}function uM(r){return r=ae(r),r&&r.replace(ze,Az).replace(ez,"")}function jj(r,s,a){r=ae(r),s=An(s);var f=r.length;a=a===n?f:ui(Bt(a),0,f);var g=a;return a-=s.length,a>=0&&r.slice(a,g)==s}function Rj(r){return r=ae(r),r&&jt.test(r)?r.replace(mt,bz):r}function Uj(r){return r=ae(r),r&&Ce.test(r)?r.replace(qe,"\\$&"):r}var Vj=Hi(function(r,s,a){return r+(a?"-":"")+s.toLowerCase()}),Pj=Hi(function(r,s,a){return r+(a?" ":"")+s.toLowerCase()}),Qj=dv("toLowerCase");function Fj(r,s,a){r=ae(r),s=Bt(s);var f=s?Fi(r):0;if(!s||f>=s)return r;var g=(s-f)/2;return Qa(Na(g),a)+r+Qa(Sa(g),a)}function Bj(r,s,a){r=ae(r),s=Bt(s);var f=s?Fi(r):0;return s&&f<s?r+Qa(s-f,a):r}function Yj(r,s,a){r=ae(r),s=Bt(s);var f=s?Fi(r):0;return s&&f<s?Qa(s-f,a)+r:r}function Wj(r,s,a){return a||s==null?s=0:s&&(s=+s),Zz(ae(r).replace(Re,""),s||0)}function qj(r,s,a){return(a?cn(r,s,a):s===n)?s=1:s=Bt(s),Cf(ae(r),s)}function _j(){var r=arguments,s=ae(r[0]);return r.length<3?s:s.replace(r[1],r[2])}var Kj=Hi(function(r,s,a){return r+(a?"_":"")+s.toLowerCase()});function Hj(r,s,a){return a&&typeof a!="number"&&cn(r,s,a)&&(s=a=n),a=a===n?pt:a>>>0,a?(r=ae(r),r&&(typeof s=="string"||s!=null&&!$f(s))&&(s=An(s),!s&&Qi(r))?Yr($n(r),0,a):r.split(s,a)):[]}var Jj=Hi(function(r,s,a){return r+(a?" ":"")+nd(s)});function Gj(r,s,a){return r=ae(r),a=a==null?0:ui(Bt(a),0,r.length),s=An(s),r.slice(a,a+s.length)==s}function Zj(r,s,a){var f=y.templateSettings;a&&cn(r,s,a)&&(s=n),r=ae(r),s=Xa({},s,f,Mv);var g=Xa({},s.imports,f.imports,Mv),M=_e(g),T=hf(g,M),b,k,Y=0,W=s.interpolate||Ze,q="__p += '",nt=gf((s.escape||Ze).source+"|"+W.source+"|"+(W===Ct?zt:Ze).source+"|"+(s.evaluate||Ze).source+"|$","g"),dt="//# sourceURL="+(de.call(s,"sourceURL")?(s.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++oz+"]")+`
37
+ `)}function EO(r){return Vt(r)||hi(r)||!!(Iy&&r&&r[Iy])}function Tr(r,s){var a=typeof r;return s=s??Lt,!!s&&(a=="number"||a!="symbol"&&Ne.test(r))&&r>-1&&r%1==0&&r<s}function cn(r,s,a){if(!De(a))return!1;var f=typeof s;return(f=="number"?mn(a)&&Tr(s,a.length):f=="string"&&s in a)?er(a[s],r):!1}function Wf(r,s){if(Vt(r))return!1;var a=typeof r;return a=="number"||a=="symbol"||a=="boolean"||r==null||bn(r)?!0:pe.test(r)||!ce.test(r)||s!=null&&r in me(s)}function AO(r){var s=typeof r;return s=="string"||s=="number"||s=="symbol"||s=="boolean"?r!=="__proto__":r===null}function qf(r){var s=Ba(r),a=y[s];if(typeof a!="function"||!(s in Jt.prototype))return!1;if(r===a)return!0;var f=Ff(a);return!!f&&r===f[0]}function bO(r){return!!by&&by in r}var SO=va?Er:ld;function Js(r){var s=r&&r.constructor,a=typeof s=="function"&&s.prototype||Yi;return r===a}function bv(r){return r===r&&!De(r)}function Sv(r,s){return function(a){return a==null?!1:a[r]===s&&(s!==n||r in me(a))}}function NO(r){var s=Ha(r,function(f){return a.size===h&&a.clear(),f}),a=s.cache;return s}function DO(r,s){var a=r[1],f=s[1],g=a|f,M=g<(P|j|G),T=f==G&&a==z||f==G&&a==K&&r[7].length<=s[8]||f==(G|K)&&s[7].length<=s[8]&&a==z;if(!(M||T))return r;f&P&&(r[2]=s[2],g|=a&P?0:L);var b=s[3];if(b){var k=r[3];r[3]=k?lv(k,b,s[4]):b,r[4]=k?Vr(r[3],p):s[4]}return b=s[5],b&&(k=r[5],r[5]=k?uv(k,b,s[6]):b,r[6]=k?Vr(r[5],p):s[6]),b=s[7],b&&(r[7]=b),f&G&&(r[8]=r[8]==null?s[8]:sn(r[8],s[8])),r[9]==null&&(r[9]=s[9]),r[0]=s[0],r[1]=g,r}function IO(r){var s=[];if(r!=null)for(var a in me(r))s.push(a);return s}function CO(r){return wa.call(r)}function Nv(r,s,a){return s=We(s===n?r.length-1:s,0),function(){for(var f=arguments,g=-1,M=We(f.length-s,0),T=U(M);++g<M;)T[g]=f[s+g];g=-1;for(var b=U(s+1);++g<s;)b[g]=f[g];return b[s]=a(T),Tn(r,this,b)}}function Dv(r,s){return s.length<2?r:ci(r,Yn(s,0,-1))}function zO(r,s){for(var a=r.length,f=sn(s.length,a),g=gn(r);f--;){var M=s[f];r[f]=Tr(M,a)?g[M]:n}return r}function _f(r,s){if(!(s==="constructor"&&typeof r[s]=="function")&&s!="__proto__")return r[s]}var Iv=zv(Xy),Gs=_z||function(r,s){return Xe.setTimeout(r,s)},Kf=zv(tO);function Cv(r,s,a){var f=s+"";return Kf(r,TO(f,kO(MO(f),a)))}function zv(r){var s=0,a=0;return function(){var f=Gz(),g=Tt-(f-a);if(a=f,g>0){if(++s>=Qt)return arguments[0]}else s=0;return r.apply(n,arguments)}}function Wa(r,s){var a=-1,f=r.length,g=f-1;for(s=s===n?f:s;++a<s;){var M=If(a,g),T=r[M];r[M]=r[a],r[a]=T}return r.length=s,r}var kv=NO(function(r){var s=[];return r.charCodeAt(0)===46&&s.push(""),r.replace(Be,function(a,f,g,M){s.push(g?M.replace(ot,"$1"):f||a)}),s});function cr(r){if(typeof r=="string"||bn(r))return r;var s=r+"";return s=="0"&&1/r==-xt?"-0":s}function di(r){if(r!=null){try{return Ma.call(r)}catch{}try{return r+""}catch{}}return""}function kO(r,s){return Pn(N,function(a){var f="_."+a[0];s&a[1]&&!pa(r,f)&&r.push(f)}),r.sort()}function Ov(r){if(r instanceof Jt)return r.clone();var s=new Fn(r.__wrapped__,r.__chain__);return s.__actions__=gn(r.__actions__),s.__index__=r.__index__,s.__values__=r.__values__,s}function OO(r,s,a){(a?cn(r,s,a):s===n)?s=1:s=We(Bt(s),0);var f=r==null?0:r.length;if(!f||s<1)return[];for(var g=0,M=0,T=U(Sa(f/s));g<f;)T[M++]=Yn(r,g,g+=s);return T}function LO(r){for(var s=-1,a=r==null?0:r.length,f=0,g=[];++s<a;){var M=r[s];M&&(g[f++]=M)}return g}function jO(){var r=arguments.length;if(!r)return[];for(var s=U(r-1),a=arguments[0],f=r;f--;)s[f-1]=arguments[f];return Ur(Vt(a)?gn(a):[a],$e(s,1))}var RO=Wt(function(r,s){return Ue(r)?Ws(r,$e(s,1,Ue,!0)):[]}),UO=Wt(function(r,s){var a=Wn(s);return Ue(a)&&(a=n),Ue(r)?Ws(r,$e(s,1,Ue,!0),bt(a,2)):[]}),VO=Wt(function(r,s){var a=Wn(s);return Ue(a)&&(a=n),Ue(r)?Ws(r,$e(s,1,Ue,!0),n,a):[]});function PO(r,s,a){var f=r==null?0:r.length;return f?(s=a||s===n?1:Bt(s),Yn(r,s<0?0:s,f)):[]}function QO(r,s,a){var f=r==null?0:r.length;return f?(s=a||s===n?1:Bt(s),s=f-s,Yn(r,0,s<0?0:s)):[]}function FO(r,s){return r&&r.length?Ra(r,bt(s,3),!0,!0):[]}function BO(r,s){return r&&r.length?Ra(r,bt(s,3),!0):[]}function YO(r,s,a,f){var g=r==null?0:r.length;return g?(a&&typeof a!="number"&&cn(r,s,a)&&(a=0,f=g),jk(r,s,a,f)):[]}function Lv(r,s,a){var f=r==null?0:r.length;if(!f)return-1;var g=a==null?0:Bt(a);return g<0&&(g=We(f+g,0)),ga(r,bt(s,3),g)}function jv(r,s,a){var f=r==null?0:r.length;if(!f)return-1;var g=f-1;return a!==n&&(g=Bt(a),g=a<0?We(f+g,0):sn(g,f-1)),ga(r,bt(s,3),g,!0)}function Rv(r){var s=r==null?0:r.length;return s?$e(r,1):[]}function WO(r){var s=r==null?0:r.length;return s?$e(r,xt):[]}function qO(r,s){var a=r==null?0:r.length;return a?(s=s===n?1:Bt(s),$e(r,s)):[]}function _O(r){for(var s=-1,a=r==null?0:r.length,f={};++s<a;){var g=r[s];f[g[0]]=g[1]}return f}function Uv(r){return r&&r.length?r[0]:n}function KO(r,s,a){var f=r==null?0:r.length;if(!f)return-1;var g=a==null?0:Bt(a);return g<0&&(g=We(f+g,0)),Pi(r,s,g)}function HO(r){var s=r==null?0:r.length;return s?Yn(r,0,-1):[]}var JO=Wt(function(r){var s=Ae(r,Lf);return s.length&&s[0]===r[0]?Af(s):[]}),GO=Wt(function(r){var s=Wn(r),a=Ae(r,Lf);return s===Wn(a)?s=n:a.pop(),a.length&&a[0]===r[0]?Af(a,bt(s,2)):[]}),ZO=Wt(function(r){var s=Wn(r),a=Ae(r,Lf);return s=typeof s=="function"?s:n,s&&a.pop(),a.length&&a[0]===r[0]?Af(a,n,s):[]});function XO(r,s){return r==null?"":Hz.call(r,s)}function Wn(r){var s=r==null?0:r.length;return s?r[s-1]:n}function $O(r,s,a){var f=r==null?0:r.length;if(!f)return-1;var g=f;return a!==n&&(g=Bt(a),g=g<0?We(f+g,0):sn(g,f-1)),s===s?kz(r,s,g):ga(r,yy,g,!0)}function t4(r,s){return r&&r.length?Hy(r,Bt(s)):n}var e4=Wt(Vv);function Vv(r,s){return r&&r.length&&s&&s.length?Df(r,s):r}function n4(r,s,a){return r&&r.length&&s&&s.length?Df(r,s,bt(a,2)):r}function r4(r,s,a){return r&&r.length&&s&&s.length?Df(r,s,n,a):r}var i4=xr(function(r,s){var a=r==null?0:r.length,f=wf(r,s);return Zy(r,Ae(s,function(g){return Tr(g,a)?+g:g}).sort(av)),f});function s4(r,s){var a=[];if(!(r&&r.length))return a;var f=-1,g=[],M=r.length;for(s=bt(s,3);++f<M;){var T=r[f];s(T,f,r)&&(a.push(T),g.push(f))}return Zy(r,g),a}function Hf(r){return r==null?r:Xz.call(r)}function o4(r,s,a){var f=r==null?0:r.length;return f?(a&&typeof a!="number"&&cn(r,s,a)?(s=0,a=f):(s=s==null?0:Bt(s),a=a===n?f:Bt(a)),Yn(r,s,a)):[]}function a4(r,s){return ja(r,s)}function l4(r,s,a){return zf(r,s,bt(a,2))}function u4(r,s){var a=r==null?0:r.length;if(a){var f=ja(r,s);if(f<a&&er(r[f],s))return f}return-1}function c4(r,s){return ja(r,s,!0)}function f4(r,s,a){return zf(r,s,bt(a,2),!0)}function d4(r,s){var a=r==null?0:r.length;if(a){var f=ja(r,s,!0)-1;if(er(r[f],s))return f}return-1}function h4(r){return r&&r.length?$y(r):[]}function p4(r,s){return r&&r.length?$y(r,bt(s,2)):[]}function g4(r){var s=r==null?0:r.length;return s?Yn(r,1,s):[]}function m4(r,s,a){return r&&r.length?(s=a||s===n?1:Bt(s),Yn(r,0,s<0?0:s)):[]}function y4(r,s,a){var f=r==null?0:r.length;return f?(s=a||s===n?1:Bt(s),s=f-s,Yn(r,s<0?0:s,f)):[]}function v4(r,s){return r&&r.length?Ra(r,bt(s,3),!1,!0):[]}function M4(r,s){return r&&r.length?Ra(r,bt(s,3)):[]}var w4=Wt(function(r){return Fr($e(r,1,Ue,!0))}),x4=Wt(function(r){var s=Wn(r);return Ue(s)&&(s=n),Fr($e(r,1,Ue,!0),bt(s,2))}),T4=Wt(function(r){var s=Wn(r);return s=typeof s=="function"?s:n,Fr($e(r,1,Ue,!0),n,s)});function E4(r){return r&&r.length?Fr(r):[]}function A4(r,s){return r&&r.length?Fr(r,bt(s,2)):[]}function b4(r,s){return s=typeof s=="function"?s:n,r&&r.length?Fr(r,n,s):[]}function Jf(r){if(!(r&&r.length))return[];var s=0;return r=Rr(r,function(a){if(Ue(a))return s=We(a.length,s),!0}),df(s,function(a){return Ae(r,uf(a))})}function Pv(r,s){if(!(r&&r.length))return[];var a=Jf(r);return s==null?a:Ae(a,function(f){return Tn(s,n,f)})}var S4=Wt(function(r,s){return Ue(r)?Ws(r,s):[]}),N4=Wt(function(r){return Of(Rr(r,Ue))}),D4=Wt(function(r){var s=Wn(r);return Ue(s)&&(s=n),Of(Rr(r,Ue),bt(s,2))}),I4=Wt(function(r){var s=Wn(r);return s=typeof s=="function"?s:n,Of(Rr(r,Ue),n,s)}),C4=Wt(Jf);function z4(r,s){return rv(r||[],s||[],Ys)}function k4(r,s){return rv(r||[],s||[],Ks)}var O4=Wt(function(r){var s=r.length,a=s>1?r[s-1]:n;return a=typeof a=="function"?(r.pop(),a):n,Pv(r,a)});function Qv(r){var s=y(r);return s.__chain__=!0,s}function L4(r,s){return s(r),r}function qa(r,s){return s(r)}var j4=xr(function(r){var s=r.length,a=s?r[0]:0,f=this.__wrapped__,g=function(M){return wf(M,r)};return s>1||this.__actions__.length||!(f instanceof Jt)||!Tr(a)?this.thru(g):(f=f.slice(a,+a+(s?1:0)),f.__actions__.push({func:qa,args:[g],thisArg:n}),new Fn(f,this.__chain__).thru(function(M){return s&&!M.length&&M.push(n),M}))});function R4(){return Qv(this)}function U4(){return new Fn(this.value(),this.__chain__)}function V4(){this.__values__===n&&(this.__values__=tM(this.value()));var r=this.__index__>=this.__values__.length,s=r?n:this.__values__[this.__index__++];return{done:r,value:s}}function P4(){return this}function Q4(r){for(var s,a=this;a instanceof Ca;){var f=Ov(a);f.__index__=0,f.__values__=n,s?g.__wrapped__=f:s=f;var g=f;a=a.__wrapped__}return g.__wrapped__=r,s}function F4(){var r=this.__wrapped__;if(r instanceof Jt){var s=r;return this.__actions__.length&&(s=new Jt(this)),s=s.reverse(),s.__actions__.push({func:qa,args:[Hf],thisArg:n}),new Fn(s,this.__chain__)}return this.thru(Hf)}function B4(){return nv(this.__wrapped__,this.__actions__)}var Y4=Ua(function(r,s,a){de.call(r,a)?++r[a]:Mr(r,a,1)});function W4(r,s,a){var f=Vt(r)?gy:Lk;return a&&cn(r,s,a)&&(s=n),f(r,bt(s,3))}function q4(r,s){var a=Vt(r)?Rr:Py;return a(r,bt(s,3))}var _4=hv(Lv),K4=hv(jv);function H4(r,s){return $e(_a(r,s),1)}function J4(r,s){return $e(_a(r,s),xt)}function G4(r,s,a){return a=a===n?1:Bt(a),$e(_a(r,s),a)}function Fv(r,s){var a=Vt(r)?Pn:Qr;return a(r,bt(s,3))}function Bv(r,s){var a=Vt(r)?gz:Vy;return a(r,bt(s,3))}var Z4=Ua(function(r,s,a){de.call(r,a)?r[a].push(s):Mr(r,a,[s])});function X4(r,s,a,f){r=mn(r)?r:Zi(r),a=a&&!f?Bt(a):0;var g=r.length;return a<0&&(a=We(g+a,0)),Za(r)?a<=g&&r.indexOf(s,a)>-1:!!g&&Pi(r,s,a)>-1}var $4=Wt(function(r,s,a){var f=-1,g=typeof s=="function",M=mn(r)?U(r.length):[];return Qr(r,function(T){M[++f]=g?Tn(s,T,a):qs(T,s,a)}),M}),tL=Ua(function(r,s,a){Mr(r,a,s)});function _a(r,s){var a=Vt(r)?Ae:qy;return a(r,bt(s,3))}function eL(r,s,a,f){return r==null?[]:(Vt(s)||(s=s==null?[]:[s]),a=f?n:a,Vt(a)||(a=a==null?[]:[a]),Jy(r,s,a))}var nL=Ua(function(r,s,a){r[a?0:1].push(s)},function(){return[[],[]]});function rL(r,s,a){var f=Vt(r)?af:My,g=arguments.length<3;return f(r,bt(s,4),a,g,Qr)}function iL(r,s,a){var f=Vt(r)?mz:My,g=arguments.length<3;return f(r,bt(s,4),a,g,Vy)}function sL(r,s){var a=Vt(r)?Rr:Py;return a(r,Ja(bt(s,3)))}function oL(r){var s=Vt(r)?Ly:Xk;return s(r)}function aL(r,s,a){(a?cn(r,s,a):s===n)?s=1:s=Bt(s);var f=Vt(r)?Ik:$k;return f(r,s)}function lL(r){var s=Vt(r)?Ck:eO;return s(r)}function uL(r){if(r==null)return 0;if(mn(r))return Za(r)?Fi(r):r.length;var s=on(r);return s==Et||s==ie?r.size:Sf(r).length}function cL(r,s,a){var f=Vt(r)?lf:nO;return a&&cn(r,s,a)&&(s=n),f(r,bt(s,3))}var fL=Wt(function(r,s){if(r==null)return[];var a=s.length;return a>1&&cn(r,s[0],s[1])?s=[]:a>2&&cn(s[0],s[1],s[2])&&(s=[s[0]]),Jy(r,$e(s,1),[])}),Ka=qz||function(){return Xe.Date.now()};function dL(r,s){if(typeof s!="function")throw new Qn(u);return r=Bt(r),function(){if(--r<1)return s.apply(this,arguments)}}function Yv(r,s,a){return s=a?n:s,s=r&&s==null?r.length:s,wr(r,G,n,n,n,n,s)}function Wv(r,s){var a;if(typeof s!="function")throw new Qn(u);return r=Bt(r),function(){return--r>0&&(a=s.apply(this,arguments)),r<=1&&(s=n),a}}var Gf=Wt(function(r,s,a){var f=P;if(a.length){var g=Vr(a,Ji(Gf));f|=Q}return wr(r,f,s,a,g)}),qv=Wt(function(r,s,a){var f=P|j;if(a.length){var g=Vr(a,Ji(qv));f|=Q}return wr(s,f,r,a,g)});function _v(r,s,a){s=a?n:s;var f=wr(r,z,n,n,n,n,n,s);return f.placeholder=_v.placeholder,f}function Kv(r,s,a){s=a?n:s;var f=wr(r,Z,n,n,n,n,n,s);return f.placeholder=Kv.placeholder,f}function Hv(r,s,a){var f,g,M,T,b,k,Y=0,W=!1,q=!1,nt=!0;if(typeof r!="function")throw new Qn(u);s=qn(s)||0,De(a)&&(W=!!a.leading,q="maxWait"in a,M=q?We(qn(a.maxWait)||0,s):M,nt="trailing"in a?!!a.trailing:nt);function dt(Ve){var nr=f,br=g;return f=g=n,Y=Ve,T=r.apply(br,nr),T}function St(Ve){return Y=Ve,b=Gs(Kt,s),W?dt(Ve):T}function Yt(Ve){var nr=Ve-k,br=Ve-Y,hM=s-nr;return q?sn(hM,M-br):hM}function Nt(Ve){var nr=Ve-k,br=Ve-Y;return k===n||nr>=s||nr<0||q&&br>=M}function Kt(){var Ve=Ka();if(Nt(Ve))return Zt(Ve);b=Gs(Kt,Yt(Ve))}function Zt(Ve){return b=n,nt&&f?dt(Ve):(f=g=n,T)}function Sn(){b!==n&&iv(b),Y=0,f=k=g=b=n}function fn(){return b===n?T:Zt(Ka())}function Nn(){var Ve=Ka(),nr=Nt(Ve);if(f=arguments,g=this,k=Ve,nr){if(b===n)return St(k);if(q)return iv(b),b=Gs(Kt,s),dt(k)}return b===n&&(b=Gs(Kt,s)),T}return Nn.cancel=Sn,Nn.flush=fn,Nn}var hL=Wt(function(r,s){return Uy(r,1,s)}),pL=Wt(function(r,s,a){return Uy(r,qn(s)||0,a)});function gL(r){return wr(r,vt)}function Ha(r,s){if(typeof r!="function"||s!=null&&typeof s!="function")throw new Qn(u);var a=function(){var f=arguments,g=s?s.apply(this,f):f[0],M=a.cache;if(M.has(g))return M.get(g);var T=r.apply(this,f);return a.cache=M.set(g,T)||M,T};return a.cache=new(Ha.Cache||vr),a}Ha.Cache=vr;function Ja(r){if(typeof r!="function")throw new Qn(u);return function(){var s=arguments;switch(s.length){case 0:return!r.call(this);case 1:return!r.call(this,s[0]);case 2:return!r.call(this,s[0],s[1]);case 3:return!r.call(this,s[0],s[1],s[2])}return!r.apply(this,s)}}function mL(r){return Wv(2,r)}var yL=rO(function(r,s){s=s.length==1&&Vt(s[0])?Ae(s[0],En(bt())):Ae($e(s,1),En(bt()));var a=s.length;return Wt(function(f){for(var g=-1,M=sn(f.length,a);++g<M;)f[g]=s[g].call(this,f[g]);return Tn(r,this,f)})}),Zf=Wt(function(r,s){var a=Vr(s,Ji(Zf));return wr(r,Q,n,s,a)}),Jv=Wt(function(r,s){var a=Vr(s,Ji(Jv));return wr(r,J,n,s,a)}),vL=xr(function(r,s){return wr(r,K,n,n,n,s)});function ML(r,s){if(typeof r!="function")throw new Qn(u);return s=s===n?s:Bt(s),Wt(r,s)}function wL(r,s){if(typeof r!="function")throw new Qn(u);return s=s==null?0:We(Bt(s),0),Wt(function(a){var f=a[s],g=Yr(a,0,s);return f&&Ur(g,f),Tn(r,this,g)})}function xL(r,s,a){var f=!0,g=!0;if(typeof r!="function")throw new Qn(u);return De(a)&&(f="leading"in a?!!a.leading:f,g="trailing"in a?!!a.trailing:g),Hv(r,s,{leading:f,maxWait:s,trailing:g})}function TL(r){return Yv(r,1)}function EL(r,s){return Zf(jf(s),r)}function AL(){if(!arguments.length)return[];var r=arguments[0];return Vt(r)?r:[r]}function bL(r){return Bn(r,v)}function SL(r,s){return s=typeof s=="function"?s:n,Bn(r,v,s)}function NL(r){return Bn(r,m|v)}function DL(r,s){return s=typeof s=="function"?s:n,Bn(r,m|v,s)}function IL(r,s){return s==null||Ry(r,s,_e(s))}function er(r,s){return r===s||r!==r&&s!==s}var CL=Fa(Ef),zL=Fa(function(r,s){return r>=s}),hi=By((function(){return arguments})())?By:function(r){return ke(r)&&de.call(r,"callee")&&!Dy.call(r,"callee")},Vt=U.isArray,kL=uy?En(uy):Qk;function mn(r){return r!=null&&Ga(r.length)&&!Er(r)}function Ue(r){return ke(r)&&mn(r)}function OL(r){return r===!0||r===!1||ke(r)&&un(r)==X}var Wr=Kz||ld,LL=cy?En(cy):Fk;function jL(r){return ke(r)&&r.nodeType===1&&!Zs(r)}function RL(r){if(r==null)return!0;if(mn(r)&&(Vt(r)||typeof r=="string"||typeof r.splice=="function"||Wr(r)||Gi(r)||hi(r)))return!r.length;var s=on(r);if(s==Et||s==ie)return!r.size;if(Js(r))return!Sf(r).length;for(var a in r)if(de.call(r,a))return!1;return!0}function UL(r,s){return _s(r,s)}function VL(r,s,a){a=typeof a=="function"?a:n;var f=a?a(r,s):n;return f===n?_s(r,s,n,a):!!f}function Xf(r){if(!ke(r))return!1;var s=un(r);return s==qt||s==kt||typeof r.message=="string"&&typeof r.name=="string"&&!Zs(r)}function PL(r){return typeof r=="number"&&Cy(r)}function Er(r){if(!De(r))return!1;var s=un(r);return s==Ut||s==yt||s==$||s==ve}function Gv(r){return typeof r=="number"&&r==Bt(r)}function Ga(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Lt}function De(r){var s=typeof r;return r!=null&&(s=="object"||s=="function")}function ke(r){return r!=null&&typeof r=="object"}var Zv=fy?En(fy):Yk;function QL(r,s){return r===s||bf(r,s,Bf(s))}function FL(r,s,a){return a=typeof a=="function"?a:n,bf(r,s,Bf(s),a)}function BL(r){return Xv(r)&&r!=+r}function YL(r){if(SO(r))throw new Rt(l);return Yy(r)}function WL(r){return r===null}function qL(r){return r==null}function Xv(r){return typeof r=="number"||ke(r)&&un(r)==Ft}function Zs(r){if(!ke(r)||un(r)!=$t)return!1;var s=Ea(r);if(s===null)return!0;var a=de.call(s,"constructor")&&s.constructor;return typeof a=="function"&&a instanceof a&&Ma.call(a)==Fz}var $f=dy?En(dy):Wk;function _L(r){return Gv(r)&&r>=-Lt&&r<=Lt}var $v=hy?En(hy):qk;function Za(r){return typeof r=="string"||!Vt(r)&&ke(r)&&un(r)==nn}function bn(r){return typeof r=="symbol"||ke(r)&&un(r)==Le}var Gi=py?En(py):_k;function KL(r){return r===n}function HL(r){return ke(r)&&on(r)==Me}function JL(r){return ke(r)&&un(r)==ue}var GL=Fa(Nf),ZL=Fa(function(r,s){return r<=s});function tM(r){if(!r)return[];if(mn(r))return Za(r)?$n(r):gn(r);if(Vs&&r[Vs])return Iz(r[Vs]());var s=on(r),a=s==Et?pf:s==ie?ma:Zi;return a(r)}function Ar(r){if(!r)return r===0?r:0;if(r=qn(r),r===xt||r===-xt){var s=r<0?-1:1;return s*ht}return r===r?r:0}function Bt(r){var s=Ar(r),a=s%1;return s===s?a?s-a:s:0}function eM(r){return r?ui(Bt(r),0,pt):0}function qn(r){if(typeof r=="number")return r;if(bn(r))return at;if(De(r)){var s=typeof r.valueOf=="function"?r.valueOf():r;r=De(s)?s+"":s}if(typeof r!="string")return r===0?r:+r;r=wy(r);var a=Ht.test(r);return a||Ge.test(r)?dz(r.slice(2),a?2:8):fe.test(r)?at:+r}function nM(r){return ur(r,yn(r))}function XL(r){return r?ui(Bt(r),-Lt,Lt):r===0?r:0}function ae(r){return r==null?"":An(r)}var $L=Ki(function(r,s){if(Js(s)||mn(s)){ur(s,_e(s),r);return}for(var a in s)de.call(s,a)&&Ys(r,a,s[a])}),rM=Ki(function(r,s){ur(s,yn(s),r)}),Xa=Ki(function(r,s,a,f){ur(s,yn(s),r,f)}),tj=Ki(function(r,s,a,f){ur(s,_e(s),r,f)}),ej=xr(wf);function nj(r,s){var a=_i(r);return s==null?a:jy(a,s)}var rj=Wt(function(r,s){r=me(r);var a=-1,f=s.length,g=f>2?s[2]:n;for(g&&cn(s[0],s[1],g)&&(f=1);++a<f;)for(var M=s[a],T=yn(M),b=-1,k=T.length;++b<k;){var Y=T[b],W=r[Y];(W===n||er(W,Yi[Y])&&!de.call(r,Y))&&(r[Y]=M[Y])}return r}),ij=Wt(function(r){return r.push(n,wv),Tn(iM,n,r)});function sj(r,s){return my(r,bt(s,3),lr)}function oj(r,s){return my(r,bt(s,3),Tf)}function aj(r,s){return r==null?r:xf(r,bt(s,3),yn)}function lj(r,s){return r==null?r:Qy(r,bt(s,3),yn)}function uj(r,s){return r&&lr(r,bt(s,3))}function cj(r,s){return r&&Tf(r,bt(s,3))}function fj(r){return r==null?[]:Oa(r,_e(r))}function dj(r){return r==null?[]:Oa(r,yn(r))}function td(r,s,a){var f=r==null?n:ci(r,s);return f===n?a:f}function hj(r,s){return r!=null&&Ev(r,s,Rk)}function ed(r,s){return r!=null&&Ev(r,s,Uk)}var pj=gv(function(r,s,a){s!=null&&typeof s.toString!="function"&&(s=wa.call(s)),r[s]=a},rd(vn)),gj=gv(function(r,s,a){s!=null&&typeof s.toString!="function"&&(s=wa.call(s)),de.call(r,s)?r[s].push(a):r[s]=[a]},bt),mj=Wt(qs);function _e(r){return mn(r)?Oy(r):Sf(r)}function yn(r){return mn(r)?Oy(r,!0):Kk(r)}function yj(r,s){var a={};return s=bt(s,3),lr(r,function(f,g,M){Mr(a,s(f,g,M),f)}),a}function vj(r,s){var a={};return s=bt(s,3),lr(r,function(f,g,M){Mr(a,g,s(f,g,M))}),a}var Mj=Ki(function(r,s,a){La(r,s,a)}),iM=Ki(function(r,s,a,f){La(r,s,a,f)}),wj=xr(function(r,s){var a={};if(r==null)return a;var f=!1;s=Ae(s,function(M){return M=Br(M,r),f||(f=M.length>1),M}),ur(r,Qf(r),a),f&&(a=Bn(a,m|w|v,pO));for(var g=s.length;g--;)kf(a,s[g]);return a});function xj(r,s){return sM(r,Ja(bt(s)))}var Tj=xr(function(r,s){return r==null?{}:Jk(r,s)});function sM(r,s){if(r==null)return{};var a=Ae(Qf(r),function(f){return[f]});return s=bt(s),Gy(r,a,function(f,g){return s(f,g[0])})}function Ej(r,s,a){s=Br(s,r);var f=-1,g=s.length;for(g||(g=1,r=n);++f<g;){var M=r==null?n:r[cr(s[f])];M===n&&(f=g,M=a),r=Er(M)?M.call(r):M}return r}function Aj(r,s,a){return r==null?r:Ks(r,s,a)}function bj(r,s,a,f){return f=typeof f=="function"?f:n,r==null?r:Ks(r,s,a,f)}var oM=vv(_e),aM=vv(yn);function Sj(r,s,a){var f=Vt(r),g=f||Wr(r)||Gi(r);if(s=bt(s,4),a==null){var M=r&&r.constructor;g?a=f?new M:[]:De(r)?a=Er(M)?_i(Ea(r)):{}:a={}}return(g?Pn:lr)(r,function(T,b,k){return s(a,T,b,k)}),a}function Nj(r,s){return r==null?!0:kf(r,s)}function Dj(r,s,a){return r==null?r:ev(r,s,jf(a))}function Ij(r,s,a,f){return f=typeof f=="function"?f:n,r==null?r:ev(r,s,jf(a),f)}function Zi(r){return r==null?[]:hf(r,_e(r))}function Cj(r){return r==null?[]:hf(r,yn(r))}function zj(r,s,a){return a===n&&(a=s,s=n),a!==n&&(a=qn(a),a=a===a?a:0),s!==n&&(s=qn(s),s=s===s?s:0),ui(qn(r),s,a)}function kj(r,s,a){return s=Ar(s),a===n?(a=s,s=0):a=Ar(a),r=qn(r),Vk(r,s,a)}function Oj(r,s,a){if(a&&typeof a!="boolean"&&cn(r,s,a)&&(s=a=n),a===n&&(typeof s=="boolean"?(a=s,s=n):typeof r=="boolean"&&(a=r,r=n)),r===n&&s===n?(r=0,s=1):(r=Ar(r),s===n?(s=r,r=0):s=Ar(s)),r>s){var f=r;r=s,s=f}if(a||r%1||s%1){var g=zy();return sn(r+g*(s-r+fz("1e-"+((g+"").length-1))),s)}return If(r,s)}var Lj=Hi(function(r,s,a){return s=s.toLowerCase(),r+(a?lM(s):s)});function lM(r){return nd(ae(r).toLowerCase())}function uM(r){return r=ae(r),r&&r.replace(ze,Az).replace(ez,"")}function jj(r,s,a){r=ae(r),s=An(s);var f=r.length;a=a===n?f:ui(Bt(a),0,f);var g=a;return a-=s.length,a>=0&&r.slice(a,g)==s}function Rj(r){return r=ae(r),r&&jt.test(r)?r.replace(mt,bz):r}function Uj(r){return r=ae(r),r&&Ce.test(r)?r.replace(qe,"\\$&"):r}var Vj=Hi(function(r,s,a){return r+(a?"-":"")+s.toLowerCase()}),Pj=Hi(function(r,s,a){return r+(a?" ":"")+s.toLowerCase()}),Qj=dv("toLowerCase");function Fj(r,s,a){r=ae(r),s=Bt(s);var f=s?Fi(r):0;if(!s||f>=s)return r;var g=(s-f)/2;return Qa(Na(g),a)+r+Qa(Sa(g),a)}function Bj(r,s,a){r=ae(r),s=Bt(s);var f=s?Fi(r):0;return s&&f<s?r+Qa(s-f,a):r}function Yj(r,s,a){r=ae(r),s=Bt(s);var f=s?Fi(r):0;return s&&f<s?Qa(s-f,a)+r:r}function Wj(r,s,a){return a||s==null?s=0:s&&(s=+s),Zz(ae(r).replace(Re,""),s||0)}function qj(r,s,a){return(a?cn(r,s,a):s===n)?s=1:s=Bt(s),Cf(ae(r),s)}function _j(){var r=arguments,s=ae(r[0]);return r.length<3?s:s.replace(r[1],r[2])}var Kj=Hi(function(r,s,a){return r+(a?"_":"")+s.toLowerCase()});function Hj(r,s,a){return a&&typeof a!="number"&&cn(r,s,a)&&(s=a=n),a=a===n?pt:a>>>0,a?(r=ae(r),r&&(typeof s=="string"||s!=null&&!$f(s))&&(s=An(s),!s&&Qi(r))?Yr($n(r),0,a):r.split(s,a)):[]}var Jj=Hi(function(r,s,a){return r+(a?" ":"")+nd(s)});function Gj(r,s,a){return r=ae(r),a=a==null?0:ui(Bt(a),0,r.length),s=An(s),r.slice(a,a+s.length)==s}function Zj(r,s,a){var f=y.templateSettings;a&&cn(r,s,a)&&(s=n),r=ae(r),s=Xa({},s,f,Mv);var g=Xa({},s.imports,f.imports,Mv),M=_e(g),T=hf(g,M),b,k,Y=0,W=s.interpolate||Ze,q="__p += '",nt=gf((s.escape||Ze).source+"|"+W.source+"|"+(W===Ct?zt:Ze).source+"|"+(s.evaluate||Ze).source+"|$","g"),dt="//# sourceURL="+(de.call(s,"sourceURL")?(s.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++oz+"]")+`
38
38
  `;r.replace(nt,function(Nt,Kt,Zt,Sn,fn,Nn){return Zt||(Zt=Sn),q+=r.slice(Y,Nn).replace(jr,Sz),Kt&&(b=!0,q+=`' +
39
39
  __e(`+Kt+`) +
40
40
  '`),fn&&(k=!0,q+=`';
@@ -51,7 +51,7 @@ __p += '`),Zt&&(q+=`' +
51
51
  function print() { __p += __j.call(arguments, '') }
52
52
  `:`;
53
53
  `)+q+`return __p
54
- }`;var Yt=fM(function(){return oe(M,dt+"return "+q).apply(n,T)});if(Yt.source=q,Xf(Yt))throw Yt;return Yt}function Xj(r){return ae(r).toLowerCase()}function $j(r){return ae(r).toUpperCase()}function tR(r,s,a){if(r=ae(r),r&&(a||s===n))return wy(r);if(!r||!(s=An(s)))return r;var f=$n(r),g=$n(s),M=xy(f,g),T=Ty(f,g)+1;return Yr(f,M,T).join("")}function eR(r,s,a){if(r=ae(r),r&&(a||s===n))return r.slice(0,Ay(r)+1);if(!r||!(s=An(s)))return r;var f=$n(r),g=Ty(f,$n(s))+1;return Yr(f,0,g).join("")}function nR(r,s,a){if(r=ae(r),r&&(a||s===n))return r.replace(Re,"");if(!r||!(s=An(s)))return r;var f=$n(r),g=xy(f,$n(s));return Yr(f,g).join("")}function rR(r,s){var a=ft,f=ut;if(De(s)){var g="separator"in s?s.separator:g;a="length"in s?Bt(s.length):a,f="omission"in s?An(s.omission):f}r=ae(r);var M=r.length;if(Qi(r)){var T=$n(r);M=T.length}if(a>=M)return r;var b=a-Fi(f);if(b<1)return f;var k=T?Yr(T,0,b).join(""):r.slice(0,b);if(g===n)return k+f;if(T&&(b+=k.length-b),$f(g)){if(r.slice(b).search(g)){var Y,W=k;for(g.global||(g=gf(g.source,ae(re.exec(g))+"g")),g.lastIndex=0;Y=g.exec(W);)var q=Y.index;k=k.slice(0,q===n?b:q)}}else if(r.indexOf(An(g),b)!=b){var nt=k.lastIndexOf(g);nt>-1&&(k=k.slice(0,nt))}return k+f}function iR(r){return r=ae(r),r&&ct.test(r)?r.replace(gt,Oz):r}var sR=Hi(function(r,s,a){return r+(a?" ":"")+s.toUpperCase()}),nd=dv("toUpperCase");function cM(r,s,a){return r=ae(r),s=a?n:s,s===n?Dz(r)?Rz(r):Mz(r):r.match(s)||[]}var fM=Wt(function(r,s){try{return Tn(r,n,s)}catch(a){return Xf(a)?a:new Rt(a)}}),oR=xr(function(r,s){return Pn(s,function(a){a=cr(a),Mr(r,a,Gf(r[a],r))}),r});function aR(r){var s=r==null?0:r.length,a=bt();return r=s?Ae(r,function(f){if(typeof f[1]!="function")throw new Qn(u);return[a(f[0]),f[1]]}):[],Wt(function(f){for(var g=-1;++g<s;){var M=r[g];if(Tn(M[0],this,f))return Tn(M[1],this,f)}})}function lR(r){return Ok(Bn(r,m))}function rd(r){return function(){return r}}function uR(r,s){return r==null||r!==r?s:r}var cR=pv(),fR=pv(!0);function vn(r){return r}function id(r){return Wy(typeof r=="function"?r:Bn(r,m))}function dR(r){return _y(Bn(r,m))}function hR(r,s){return Ky(r,Bn(s,m))}var pR=Wt(function(r,s){return function(a){return qs(a,r,s)}}),gR=Wt(function(r,s){return function(a){return qs(r,a,s)}});function sd(r,s,a){var f=_e(s),g=Oa(s,f);a==null&&!(De(s)&&(g.length||!f.length))&&(a=s,s=r,r=this,g=Oa(s,_e(s)));var M=!(De(a)&&"chain"in a)||!!a.chain,T=Er(r);return Pn(g,function(b){var k=s[b];r[b]=k,T&&(r.prototype[b]=function(){var Y=this.__chain__;if(M||Y){var W=r(this.__wrapped__),q=W.__actions__=gn(this.__actions__);return q.push({func:k,args:arguments,thisArg:r}),W.__chain__=Y,W}return k.apply(r,Ur([this.value()],arguments))})}),r}function mR(){return Xe._===this&&(Xe._=Bz),this}function od(){}function yR(r){return r=Bt(r),Wt(function(s){return Hy(s,r)})}var vR=Uf(Ae),MR=Uf(gy),wR=Uf(lf);function dM(r){return Wf(r)?uf(cr(r)):Gk(r)}function xR(r){return function(s){return r==null?n:ci(r,s)}}var TR=mv(),ER=mv(!0);function ad(){return[]}function ld(){return!1}function AR(){return{}}function bR(){return""}function SR(){return!0}function NR(r,s){if(r=Bt(r),r<1||r>Lt)return[];var a=pt,f=sn(r,pt);s=bt(s),r-=pt;for(var g=df(f,s);++a<r;)s(a);return g}function DR(r){return Vt(r)?Ae(r,cr):bn(r)?[r]:gn(kv(ae(r)))}function IR(r){var s=++Qz;return ae(r)+s}var CR=Pa(function(r,s){return r+s},0),zR=Vf("ceil"),kR=Pa(function(r,s){return r/s},1),OR=Vf("floor");function LR(r){return r&&r.length?ka(r,vn,Ef):n}function jR(r,s){return r&&r.length?ka(r,bt(s,2),Ef):n}function RR(r){return vy(r,vn)}function UR(r,s){return vy(r,bt(s,2))}function VR(r){return r&&r.length?ka(r,vn,Nf):n}function PR(r,s){return r&&r.length?ka(r,bt(s,2),Nf):n}var QR=Pa(function(r,s){return r*s},1),FR=Vf("round"),BR=Pa(function(r,s){return r-s},0);function YR(r){return r&&r.length?ff(r,vn):0}function WR(r,s){return r&&r.length?ff(r,bt(s,2)):0}return y.after=dL,y.ary=Yv,y.assign=$L,y.assignIn=rM,y.assignInWith=Xa,y.assignWith=tj,y.at=ej,y.before=Wv,y.bind=Gf,y.bindAll=oR,y.bindKey=qv,y.castArray=AL,y.chain=Qv,y.chunk=O4,y.compact=L4,y.concat=j4,y.cond=aR,y.conforms=lR,y.constant=rd,y.countBy=YO,y.create=nj,y.curry=_v,y.curryRight=Kv,y.debounce=Hv,y.defaults=rj,y.defaultsDeep=ij,y.defer=hL,y.delay=pL,y.difference=R4,y.differenceBy=U4,y.differenceWith=V4,y.drop=P4,y.dropRight=Q4,y.dropRightWhile=F4,y.dropWhile=B4,y.fill=Y4,y.filter=qO,y.flatMap=HO,y.flatMapDeep=JO,y.flatMapDepth=GO,y.flatten=Rv,y.flattenDeep=W4,y.flattenDepth=q4,y.flip=gL,y.flow=cR,y.flowRight=fR,y.fromPairs=_4,y.functions=fj,y.functionsIn=dj,y.groupBy=ZO,y.initial=H4,y.intersection=J4,y.intersectionBy=G4,y.intersectionWith=Z4,y.invert=pj,y.invertBy=gj,y.invokeMap=$O,y.iteratee=id,y.keyBy=tL,y.keys=_e,y.keysIn=yn,y.map=_a,y.mapKeys=yj,y.mapValues=vj,y.matches=dR,y.matchesProperty=hR,y.memoize=Ha,y.merge=Mj,y.mergeWith=iM,y.method=pR,y.methodOf=gR,y.mixin=sd,y.negate=Ja,y.nthArg=yR,y.omit=wj,y.omitBy=xj,y.once=mL,y.orderBy=eL,y.over=vR,y.overArgs=yL,y.overEvery=MR,y.overSome=wR,y.partial=Zf,y.partialRight=Jv,y.partition=nL,y.pick=Tj,y.pickBy=sM,y.property=dM,y.propertyOf=xR,y.pull=eO,y.pullAll=Vv,y.pullAllBy=nO,y.pullAllWith=rO,y.pullAt=iO,y.range=TR,y.rangeRight=ER,y.rearg=vL,y.reject=sL,y.remove=sO,y.rest=ML,y.reverse=Hf,y.sampleSize=aL,y.set=Aj,y.setWith=bj,y.shuffle=lL,y.slice=oO,y.sortBy=fL,y.sortedUniq=hO,y.sortedUniqBy=pO,y.split=Hj,y.spread=wL,y.tail=gO,y.take=mO,y.takeRight=yO,y.takeRightWhile=vO,y.takeWhile=MO,y.tap=LO,y.throttle=xL,y.thru=qa,y.toArray=tM,y.toPairs=oM,y.toPairsIn=aM,y.toPath=DR,y.toPlainObject=nM,y.transform=Sj,y.unary=TL,y.union=wO,y.unionBy=xO,y.unionWith=TO,y.uniq=EO,y.uniqBy=AO,y.uniqWith=bO,y.unset=Nj,y.unzip=Jf,y.unzipWith=Pv,y.update=Dj,y.updateWith=Ij,y.values=Zi,y.valuesIn=Cj,y.without=SO,y.words=cM,y.wrap=EL,y.xor=NO,y.xorBy=DO,y.xorWith=IO,y.zip=CO,y.zipObject=zO,y.zipObjectDeep=kO,y.zipWith=OO,y.entries=oM,y.entriesIn=aM,y.extend=rM,y.extendWith=Xa,sd(y,y),y.add=CR,y.attempt=fM,y.camelCase=Lj,y.capitalize=lM,y.ceil=zR,y.clamp=zj,y.clone=bL,y.cloneDeep=NL,y.cloneDeepWith=DL,y.cloneWith=SL,y.conformsTo=IL,y.deburr=uM,y.defaultTo=uR,y.divide=kR,y.endsWith=jj,y.eq=er,y.escape=Rj,y.escapeRegExp=Uj,y.every=WO,y.find=_O,y.findIndex=Lv,y.findKey=sj,y.findLast=KO,y.findLastIndex=jv,y.findLastKey=oj,y.floor=OR,y.forEach=Fv,y.forEachRight=Bv,y.forIn=aj,y.forInRight=lj,y.forOwn=uj,y.forOwnRight=cj,y.get=td,y.gt=CL,y.gte=zL,y.has=hj,y.hasIn=ed,y.head=Uv,y.identity=vn,y.includes=XO,y.indexOf=K4,y.inRange=kj,y.invoke=mj,y.isArguments=hi,y.isArray=Vt,y.isArrayBuffer=kL,y.isArrayLike=mn,y.isArrayLikeObject=Ue,y.isBoolean=OL,y.isBuffer=Wr,y.isDate=LL,y.isElement=jL,y.isEmpty=RL,y.isEqual=UL,y.isEqualWith=VL,y.isError=Xf,y.isFinite=PL,y.isFunction=Er,y.isInteger=Gv,y.isLength=Ga,y.isMap=Zv,y.isMatch=QL,y.isMatchWith=FL,y.isNaN=BL,y.isNative=YL,y.isNil=qL,y.isNull=WL,y.isNumber=Xv,y.isObject=De,y.isObjectLike=ke,y.isPlainObject=Zs,y.isRegExp=$f,y.isSafeInteger=_L,y.isSet=$v,y.isString=Za,y.isSymbol=bn,y.isTypedArray=Gi,y.isUndefined=KL,y.isWeakMap=HL,y.isWeakSet=JL,y.join=X4,y.kebabCase=Vj,y.last=Wn,y.lastIndexOf=$4,y.lowerCase=Pj,y.lowerFirst=Qj,y.lt=GL,y.lte=ZL,y.max=LR,y.maxBy=jR,y.mean=RR,y.meanBy=UR,y.min=VR,y.minBy=PR,y.stubArray=ad,y.stubFalse=ld,y.stubObject=AR,y.stubString=bR,y.stubTrue=SR,y.multiply=QR,y.nth=tO,y.noConflict=mR,y.noop=od,y.now=Ka,y.pad=Fj,y.padEnd=Bj,y.padStart=Yj,y.parseInt=Wj,y.random=Oj,y.reduce=rL,y.reduceRight=iL,y.repeat=qj,y.replace=_j,y.result=Ej,y.round=FR,y.runInContext=C,y.sample=oL,y.size=uL,y.snakeCase=Kj,y.some=cL,y.sortedIndex=aO,y.sortedIndexBy=lO,y.sortedIndexOf=uO,y.sortedLastIndex=cO,y.sortedLastIndexBy=fO,y.sortedLastIndexOf=dO,y.startCase=Jj,y.startsWith=Gj,y.subtract=BR,y.sum=YR,y.sumBy=WR,y.template=Zj,y.times=NR,y.toFinite=Ar,y.toInteger=Bt,y.toLength=eM,y.toLower=Xj,y.toNumber=qn,y.toSafeInteger=XL,y.toString=ae,y.toUpper=$j,y.trim=tR,y.trimEnd=eR,y.trimStart=nR,y.truncate=rR,y.unescape=iR,y.uniqueId=IR,y.upperCase=sR,y.upperFirst=nd,y.each=Fv,y.eachRight=Bv,y.first=Uv,sd(y,(function(){var r={};return lr(y,function(s,a){de.call(y.prototype,a)||(r[a]=s)}),r})(),{chain:!1}),y.VERSION=i,Pn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){y[r].placeholder=y}),Pn(["drop","take"],function(r,s){Jt.prototype[r]=function(a){a=a===n?1:We(Bt(a),0);var f=this.__filtered__&&!s?new Jt(this):this.clone();return f.__filtered__?f.__takeCount__=sn(a,f.__takeCount__):f.__views__.push({size:sn(a,pt),type:r+(f.__dir__<0?"Right":"")}),f},Jt.prototype[r+"Right"]=function(a){return this.reverse()[r](a).reverse()}}),Pn(["filter","map","takeWhile"],function(r,s){var a=s+1,f=a==Mt||a==Xt;Jt.prototype[r]=function(g){var M=this.clone();return M.__iteratees__.push({iteratee:bt(g,3),type:a}),M.__filtered__=M.__filtered__||f,M}}),Pn(["head","last"],function(r,s){var a="take"+(s?"Right":"");Jt.prototype[r]=function(){return this[a](1).value()[0]}}),Pn(["initial","tail"],function(r,s){var a="drop"+(s?"":"Right");Jt.prototype[r]=function(){return this.__filtered__?new Jt(this):this[a](1)}}),Jt.prototype.compact=function(){return this.filter(vn)},Jt.prototype.find=function(r){return this.filter(r).head()},Jt.prototype.findLast=function(r){return this.reverse().find(r)},Jt.prototype.invokeMap=Wt(function(r,s){return typeof r=="function"?new Jt(this):this.map(function(a){return qs(a,r,s)})}),Jt.prototype.reject=function(r){return this.filter(Ja(bt(r)))},Jt.prototype.slice=function(r,s){r=Bt(r);var a=this;return a.__filtered__&&(r>0||s<0)?new Jt(a):(r<0?a=a.takeRight(-r):r&&(a=a.drop(r)),s!==n&&(s=Bt(s),a=s<0?a.dropRight(-s):a.take(s-r)),a)},Jt.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},Jt.prototype.toArray=function(){return this.take(pt)},lr(Jt.prototype,function(r,s){var a=/^(?:filter|find|map|reject)|While$/.test(s),f=/^(?:head|last)$/.test(s),g=y[f?"take"+(s=="last"?"Right":""):s],M=f||/^find/.test(s);g&&(y.prototype[s]=function(){var T=this.__wrapped__,b=f?[1]:arguments,k=T instanceof Jt,Y=b[0],W=k||Vt(T),q=function(Kt){var Zt=g.apply(y,Ur([Kt],b));return f&&nt?Zt[0]:Zt};W&&a&&typeof Y=="function"&&Y.length!=1&&(k=W=!1);var nt=this.__chain__,dt=!!this.__actions__.length,St=M&&!nt,Yt=k&&!dt;if(!M&&W){T=Yt?T:new Jt(this);var Nt=r.apply(T,b);return Nt.__actions__.push({func:qa,args:[q],thisArg:n}),new Fn(Nt,nt)}return St&&Yt?r.apply(this,b):(Nt=this.thru(q),St?f?Nt.value()[0]:Nt.value():Nt)})}),Pn(["pop","push","shift","sort","splice","unshift"],function(r){var s=ya[r],a=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",f=/^(?:pop|shift)$/.test(r);y.prototype[r]=function(){var g=arguments;if(f&&!this.__chain__){var M=this.value();return s.apply(Vt(M)?M:[],g)}return this[a](function(T){return s.apply(Vt(T)?T:[],g)})}}),lr(Jt.prototype,function(r,s){var a=y[s];if(a){var f=a.name+"";de.call(qi,f)||(qi[f]=[]),qi[f].push({name:s,func:a})}}),qi[Va(n,j).name]=[{name:"wrapper",func:n}],Jt.prototype.clone=ik,Jt.prototype.reverse=sk,Jt.prototype.value=ok,y.prototype.at=jO,y.prototype.chain=RO,y.prototype.commit=UO,y.prototype.next=VO,y.prototype.plant=QO,y.prototype.reverse=FO,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=BO,y.prototype.first=y.prototype.head,Vs&&(y.prototype[Vs]=PO),y}),Bi=Uz();si?((si.exports=Bi)._=Bi,rf._=Bi):Xe._=Bi}).call(WD)})(Is,Is.exports)),Is.exports}var ji=qD();let Wo;const _D=new Uint8Array(16);function KD(){if(!Wo&&(Wo=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Wo))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Wo(_D)}const He=[];for(let e=0;e<256;++e)He.push((e+256).toString(16).slice(1));function HD(e,t=0){return He[e[t+0]]+He[e[t+1]]+He[e[t+2]]+He[e[t+3]]+"-"+He[e[t+4]]+He[e[t+5]]+"-"+He[e[t+6]]+He[e[t+7]]+"-"+He[e[t+8]]+He[e[t+9]]+"-"+He[e[t+10]]+He[e[t+11]]+He[e[t+12]]+He[e[t+13]]+He[e[t+14]]+He[e[t+15]]}const jm={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Xu(e,t,n){if(jm.randomUUID&&!e)return jm.randomUUID();e=e||{};const i=e.random||(e.rng||KD)();return i[6]=i[6]&15|64,i[8]=i[8]&63|128,HD(i)}var qo={exports:{}},$u={};var Rm;function JD(){if(Rm)return $u;Rm=1;var e=x;function t(m,w){return m===w&&(m!==0||1/m===1/w)||m!==m&&w!==w}var n=typeof Object.is=="function"?Object.is:t,i=e.useState,o=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue;function c(m,w){var v=w(),S=i({inst:{value:v,getSnapshot:w}}),A=S[0].inst,P=S[1];return l(function(){A.value=v,A.getSnapshot=w,d(A)&&P({inst:A})},[m,v,w]),o(function(){return d(A)&&P({inst:A}),m(function(){d(A)&&P({inst:A})})},[m]),u(v),v}function d(m){var w=m.getSnapshot;m=m.value;try{var v=w();return!n(m,v)}catch{return!0}}function h(m,w){return w()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:c;return $u.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,$u}var tc={},Um;function GD(){if(Um)return tc;Um=1;var e={env:{}};return e.env.NODE_ENV!=="production"&&(function(){function t(S,A){return S===A&&(S!==0||1/S===1/A)||S!==S&&A!==A}function n(S,A){m||l.startTransition===void 0||(m=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var P=A();if(!w){var j=A();u(P,j)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),w=!0)}j=c({inst:{value:P,getSnapshot:A}});var L=j[0].inst,z=j[1];return h(function(){L.value=P,L.getSnapshot=A,i(L)&&z({inst:L})},[S,P,A]),d(function(){return i(L)&&z({inst:L}),S(function(){i(L)&&z({inst:L})})},[S]),p(P),P}function i(S){var A=S.getSnapshot;S=S.value;try{var P=A();return!u(S,P)}catch{return!0}}function o(S,A){return A()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var l=x,u=typeof Object.is=="function"?Object.is:t,c=l.useState,d=l.useEffect,h=l.useLayoutEffect,p=l.useDebugValue,m=!1,w=!1,v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?o:n;tc.useSyncExternalStore=l.useSyncExternalStore!==void 0?l.useSyncExternalStore:v,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})(),tc}var Vm;function ZD(){if(Vm)return qo.exports;Vm=1;var e={env:{}};return e.env.NODE_ENV==="production"?qo.exports=JD():qo.exports=GD(),qo.exports}var XD=ZD();const Pm=0,Qm=1,Fm=2,Bm=3;var Ym=Object.prototype.hasOwnProperty;function ec(e,t){var n,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((i=e.length)===t.length)for(;i--&&ec(e[i],t[i]););return i===-1}if(!n||typeof e=="object"){i=0;for(n in e)if(Ym.call(e,n)&&++i&&!Ym.call(t,n)||!(n in t)||!ec(e[n],t[n]))return!1;return Object.keys(t).length===i}}return e!==e&&t!==t}const gr=new WeakMap,kr=()=>{},Je=kr(),_o=Object,te=e=>e===Je,Hn=e=>typeof e=="function",mr=(e,t)=>({...e,...t}),Wm=e=>Hn(e.then),nc={},Ko={},rc="undefined",Cs=typeof window!=rc,ic=typeof document!=rc,$D=Cs&&"Deno"in window,t2=()=>Cs&&typeof window.requestAnimationFrame!=rc,qm=(e,t)=>{const n=gr.get(e);return[()=>!te(t)&&e.get(t)||nc,i=>{if(!te(t)){const o=e.get(t);t in Ko||(Ko[t]=o),n[5](t,mr(o,i),o||nc)}},n[6],()=>!te(t)&&t in Ko?Ko[t]:!te(t)&&e.get(t)||nc]};let sc=!0;const e2=()=>sc,[oc,ac]=Cs&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[kr,kr],n2=()=>{const e=ic&&document.visibilityState;return te(e)||e!=="hidden"},r2=e=>(ic&&document.addEventListener("visibilitychange",e),oc("focus",e),()=>{ic&&document.removeEventListener("visibilitychange",e),ac("focus",e)}),i2=e=>{const t=()=>{sc=!0,e()},n=()=>{sc=!1};return oc("online",t),oc("offline",n),()=>{ac("online",t),ac("offline",n)}},s2={isOnline:e2,isVisible:n2},o2={initFocus:r2,initReconnect:i2},_m=!x.useId,zs=!Cs||$D,a2=e=>t2()?window.requestAnimationFrame(e):setTimeout(e,1),Ho=zs?x.useEffect:x.useLayoutEffect,lc=typeof navigator<"u"&&navigator.connection,Km=!zs&&lc&&(["slow-2g","2g"].includes(lc.effectiveType)||lc.saveData),Jo=new WeakMap,l2=e=>_o.prototype.toString.call(e),uc=(e,t)=>e===`[object ${t}]`;let u2=0;const cc=e=>{const t=typeof e,n=l2(e),i=uc(n,"Date"),o=uc(n,"RegExp"),l=uc(n,"Object");let u,c;if(_o(e)===e&&!i&&!o){if(u=Jo.get(e),u)return u;if(u=++u2+"~",Jo.set(e,u),Array.isArray(e)){for(u="@",c=0;c<e.length;c++)u+=cc(e[c])+",";Jo.set(e,u)}if(l){u="#";const d=_o.keys(e).sort();for(;!te(c=d.pop());)te(e[c])||(u+=c+":"+cc(e[c])+",");Jo.set(e,u)}}else u=i?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return u},fc=e=>{if(Hn(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?cc(e):"",[e,t]};let c2=0;const dc=()=>++c2;async function Hm(...e){const[t,n,i,o]=e,l=mr({populateCache:!0,throwOnError:!0},typeof o=="boolean"?{revalidate:o}:o||{});let u=l.populateCache;const c=l.rollbackOnError;let d=l.optimisticData;const h=w=>typeof c=="function"?c(w):c!==!1,p=l.throwOnError;if(Hn(n)){const w=n,v=[],S=t.keys();for(const A of S)!/^\$(inf|sub)\$/.test(A)&&w(t.get(A)._k)&&v.push(A);return Promise.all(v.map(m))}return m(n);async function m(w){const[v]=fc(w);if(!v)return;const[S,A]=qm(t,v),[P,j,L,z]=gr.get(t),Z=()=>{const Mt=P[v];return(Hn(l.revalidate)?l.revalidate(S().data,w):l.revalidate!==!1)&&(delete L[v],delete z[v],Mt&&Mt[0])?Mt[0](Fm).then(()=>S().data):S().data};if(e.length<3)return Z();let Q=i,J,G=!1;const K=dc();j[v]=[K,0];const vt=!te(d),ft=S(),ut=ft.data,Qt=ft._c,Tt=te(Qt)?ut:Qt;if(vt&&(d=Hn(d)?d(Tt,ut):d,A({data:d,_c:Tt})),Hn(Q))try{Q=Q(Tt)}catch(Mt){J=Mt,G=!0}if(Q&&Wm(Q))if(Q=await Q.catch(Mt=>{J=Mt,G=!0}),K!==j[v][0]){if(G)throw J;return Q}else G&&vt&&h(J)&&(u=!0,A({data:Tt,_c:Je}));if(u&&!G)if(Hn(u)){const Mt=u(Q,Tt);A({data:Mt,error:Je,_c:Je})}else A({data:Q,error:Je,_c:Je});if(j[v][1]=dc(),Promise.resolve(Z()).then(()=>{A({_c:Je})}),G){if(p)throw J;return}return Q}}const Jm=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},Gm=(e,t)=>{if(!gr.has(e)){const n=mr(o2,t),i=Object.create(null),o=Hm.bind(Je,e);let l=kr;const u=Object.create(null),c=(p,m)=>{const w=u[p]||[];return u[p]=w,w.push(m),()=>w.splice(w.indexOf(m),1)},d=(p,m,w)=>{e.set(p,m);const v=u[p];if(v)for(const S of v)S(m,w)},h=()=>{if(!gr.has(e)&&(gr.set(e,[i,Object.create(null),Object.create(null),Object.create(null),o,d,c]),!zs)){const p=n.initFocus(setTimeout.bind(Je,Jm.bind(Je,i,Pm))),m=n.initReconnect(setTimeout.bind(Je,Jm.bind(Je,i,Qm)));l=()=>{p&&p(),m&&m(),gr.delete(e)}}};return h(),[e,o,h,l]}return[e,gr.get(e)[4]]},f2=(e,t,n,i,o)=>{const l=n.errorRetryCount,u=o.retryCount,c=~~((Math.random()+.5)*(1<<(u<8?u:8)))*n.errorRetryInterval;!te(l)&&u>l||setTimeout(i,c,o)},d2=ec,[hc,h2]=Gm(new Map),Zm=mr({onLoadingSlow:kr,onSuccess:kr,onError:kr,onErrorRetry:f2,onDiscarded:kr,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Km?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:Km?5e3:3e3,compare:d2,isPaused:()=>!1,cache:hc,mutate:h2,fallback:{}},s2),Xm=(e,t)=>{const n=mr(e,t);if(t){const{use:i,fallback:o}=e,{use:l,fallback:u}=t;i&&l&&(n.use=i.concat(l)),o&&u&&(n.fallback=mr(o,u))}return n},pc=x.createContext({}),p2=e=>{const{value:t}=e,n=x.useContext(pc),i=Hn(t),o=x.useMemo(()=>i?t(n):t,[i,n,t]),l=x.useMemo(()=>i?o:Xm(n,o),[i,n,o]),u=o&&o.provider,c=x.useRef(Je);u&&!c.current&&(c.current=Gm(u(l.cache||hc),o));const d=c.current;return d&&(l.cache=d[0],l.mutate=d[1]),Ho(()=>{if(d)return d[2]&&d[2](),d[3]},[]),x.createElement(pc.Provider,mr(e,{value:l}))},g2="$inf$",$m=Cs&&window.__SWR_DEVTOOLS_USE__,m2=$m?window.__SWR_DEVTOOLS_USE__:[],y2=()=>{$m&&(window.__SWR_DEVTOOLS_REACT__=x)},v2=e=>Hn(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],M2=()=>{const e=x.useContext(pc);return x.useMemo(()=>mr(Zm,e),[e])},w2=e=>(t,n,i)=>e(t,n&&((...l)=>{const[u]=fc(t),[,,,c]=gr.get(hc);if(u.startsWith(g2))return n(...l);const d=c[u];return te(d)?n(...l):(delete c[u],d)}),i),x2=m2.concat(w2),T2=e=>function(...n){const i=M2(),[o,l,u]=v2(n),c=Xm(i,u);let d=e;const{use:h}=c,p=(h||[]).concat(x2);for(let m=p.length;m--;)d=p[m](d);return d(o,l||c.fetcher||null,c)},E2=(e,t,n)=>{const i=t[e]||(t[e]=[]);return i.push(n),()=>{const o=i.indexOf(n);o>=0&&(i[o]=i[i.length-1],i.pop())}};y2();const gc=x.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}}),mc={dedupe:!0},t0=Promise.resolve(Je),A2=(e,t,n)=>{const{cache:i,compare:o,suspense:l,fallbackData:u,revalidateOnMount:c,revalidateIfStale:d,refreshInterval:h,refreshWhenHidden:p,refreshWhenOffline:m,keepPreviousData:w}=n,[v,S,A,P]=gr.get(i),[j,L]=fc(e),z=x.useRef(!1),Z=x.useRef(!1),Q=x.useRef(j),J=x.useRef(t),G=x.useRef(n),K=()=>G.current,vt=()=>K().isVisible()&&K().isOnline(),[ft,ut,Qt,Tt]=qm(i,j),Mt=x.useRef({}).current,ee=te(u)?te(n.fallback)?Je:n.fallback[j]:u,Xt=(yt,Et)=>{for(const Ft in Mt){const At=Ft;if(At==="data"){if(!o(yt[At],Et[At])&&(!te(yt[At])||!o(V,Et[At])))return!1}else if(Et[At]!==yt[At])return!1}return!0},xt=x.useMemo(()=>{const yt=!j||!t?!1:te(c)?K().isPaused()||l?!1:d!==!1:c,Et=ne=>{const ie=mr(ne);return delete ie._k,yt?{isValidating:!0,isLoading:!0,...ie}:ie},Ft=ft(),At=Tt(),$t=Et(Ft),Fe=Ft===At?$t:Et(At);let ve=$t;return[()=>{const ne=Et(ft());return Xt(ne,ve)?(ve.data=ne.data,ve.isLoading=ne.isLoading,ve.isValidating=ne.isValidating,ve.error=ne.error,ve):(ve=ne,ne)},()=>Fe]},[i,j]),Lt=XD.useSyncExternalStore(x.useCallback(yt=>Qt(j,(Et,Ft)=>{Xt(Ft,Et)||yt()}),[i,j]),xt[0],xt[1]),ht=!z.current,at=v[j]&&v[j].length>0,pt=Lt.data,I=te(pt)?ee&&Wm(ee)?gc(ee):ee:pt,R=Lt.error,N=x.useRef(I),V=w?te(pt)?te(N.current)?I:N.current:pt:I,B=at&&!te(R)?!1:ht&&!te(c)?c:K().isPaused()?!1:l?te(I)?!1:d:te(I)||d,$=!!(j&&t&&ht&&B),X=te(Lt.isValidating)?$:Lt.isValidating,wt=te(Lt.isLoading)?$:Lt.isLoading,kt=x.useCallback(async yt=>{const Et=J.current;if(!j||!Et||Z.current||K().isPaused())return!1;let Ft,At,$t=!0;const Fe=yt||{},ve=!A[j]||!Fe.dedupe,ne=()=>_m?!Z.current&&j===Q.current&&z.current:j===Q.current,ie={isValidating:!1,isLoading:!1},nn=()=>{ut(ie)},Le=()=>{const Me=A[j];Me&&Me[1]===At&&delete A[j]},Rn={isValidating:!0};te(ft().data)&&(Rn.isLoading=!0);try{if(ve&&(ut(Rn),n.loadingTimeout&&te(ft().data)&&setTimeout(()=>{$t&&ne()&&K().onLoadingSlow(j,n)},n.loadingTimeout),A[j]=[Et(L),dc()]),[Ft,At]=A[j],Ft=await Ft,ve&&setTimeout(Le,n.dedupingInterval),!A[j]||A[j][1]!==At)return ve&&ne()&&K().onDiscarded(j),!1;ie.error=Je;const Me=S[j];if(!te(Me)&&(At<=Me[0]||At<=Me[1]||Me[1]===0))return nn(),ve&&ne()&&K().onDiscarded(j),!1;const ue=ft().data;ie.data=o(ue,Ft)?ue:Ft,ve&&ne()&&K().onSuccess(Ft,j,n)}catch(Me){Le();const ue=K(),{shouldRetryOnError:je}=ue;ue.isPaused()||(ie.error=Me,ve&&ne()&&(ue.onError(Me,j,ue),(je===!0||Hn(je)&&je(Me))&&(!K().revalidateOnFocus||!K().revalidateOnReconnect||vt())&&ue.onErrorRetry(Me,j,ue,ln=>{const wn=v[j];wn&&wn[0]&&wn[0](Bm,ln)},{retryCount:(Fe.retryCount||0)+1,dedupe:!0})))}return $t=!1,nn(),!0},[j,i]),qt=x.useCallback((...yt)=>Hm(i,Q.current,...yt),[]);if(Ho(()=>{J.current=t,G.current=n,te(pt)||(N.current=pt)}),Ho(()=>{if(!j)return;const yt=kt.bind(Je,mc);let Et=0;K().revalidateOnFocus&&(Et=Date.now()+K().focusThrottleInterval);const At=E2(j,v,($t,Fe={})=>{if($t==Pm){const ve=Date.now();K().revalidateOnFocus&&ve>Et&&vt()&&(Et=ve+K().focusThrottleInterval,yt())}else if($t==Qm)K().revalidateOnReconnect&&vt()&&yt();else{if($t==Fm)return kt();if($t==Bm)return kt(Fe)}});return Z.current=!1,Q.current=j,z.current=!0,ut({_k:L}),B&&(A[j]||(te(I)||zs?yt():a2(yt))),()=>{Z.current=!0,At()}},[j]),Ho(()=>{let yt;function Et(){const At=Hn(h)?h(ft().data):h;At&&yt!==-1&&(yt=setTimeout(Ft,At))}function Ft(){!ft().error&&(p||K().isVisible())&&(m||K().isOnline())?kt(mc).then(Et):Et()}return Et(),()=>{yt&&(clearTimeout(yt),yt=-1)}},[h,p,m,j]),x.useDebugValue(V),l){const yt=j&&te(I);if(!_m&&zs&&yt)throw new Error("Fallback data is required when using Suspense in SSR.");yt&&(J.current=t,G.current=n,Z.current=!1);const Et=P[j],Ft=!te(Et)&&yt?qt(Et):t0;if(gc(Ft),!te(R)&&yt)throw R;const At=yt?kt(mc):t0;!te(V)&&yt&&(At.status="fulfilled",At.value=!0),gc(At)}return{mutate:qt,get data(){return Mt.data=!0,V},get error(){return Mt.error=!0,R},get isValidating(){return Mt.isValidating=!0,X},get isLoading(){return Mt.isLoading=!0,wt}}},b2=_o.defineProperty(p2,"defaultValue",{value:Zm}),S2=T2(A2),sr=Object.create(null);sr.open="0",sr.close="1",sr.ping="2",sr.pong="3",sr.message="4",sr.upgrade="5",sr.noop="6";const Go=Object.create(null);Object.keys(sr).forEach(e=>{Go[sr[e]]=e});const yc={type:"error",data:"parser error"},e0=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",n0=typeof ArrayBuffer=="function",r0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,vc=({type:e,data:t},n,i)=>e0&&t instanceof Blob?n?i(t):i0(t,i):n0&&(t instanceof ArrayBuffer||r0(t))?n?i(t):i0(new Blob([t]),i):i(sr[e]+(t||"")),i0=(e,t)=>{const n=new FileReader;return n.onload=function(){const i=n.result.split(",")[1];t("b"+(i||""))},n.readAsDataURL(e)};function s0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Mc;function N2(e,t){if(e0&&e.data instanceof Blob)return e.data.arrayBuffer().then(s0).then(t);if(n0&&(e.data instanceof ArrayBuffer||r0(e.data)))return t(s0(e.data));vc(e,!1,n=>{Mc||(Mc=new TextEncoder),t(Mc.encode(n))})}const o0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ks=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<o0.length;e++)ks[o0.charCodeAt(e)]=e;const D2=e=>{let t=e.length*.75,n=e.length,i,o=0,l,u,c,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const h=new ArrayBuffer(t),p=new Uint8Array(h);for(i=0;i<n;i+=4)l=ks[e.charCodeAt(i)],u=ks[e.charCodeAt(i+1)],c=ks[e.charCodeAt(i+2)],d=ks[e.charCodeAt(i+3)],p[o++]=l<<2|u>>4,p[o++]=(u&15)<<4|c>>2,p[o++]=(c&3)<<6|d&63;return h},I2=typeof ArrayBuffer=="function",wc=(e,t)=>{if(typeof e!="string")return{type:"message",data:a0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:C2(e.substring(1),t)}:Go[n]?e.length>1?{type:Go[n],data:e.substring(1)}:{type:Go[n]}:yc},C2=(e,t)=>{if(I2){const n=D2(e);return a0(n,t)}else return{base64:!0,data:e}},a0=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},l0="",z2=(e,t)=>{const n=e.length,i=new Array(n);let o=0;e.forEach((l,u)=>{vc(l,!1,c=>{i[u]=c,++o===n&&t(i.join(l0))})})},k2=(e,t)=>{const n=e.split(l0),i=[];for(let o=0;o<n.length;o++){const l=wc(n[o],t);if(i.push(l),l.type==="error")break}return i};function O2(){return new TransformStream({transform(e,t){N2(e,n=>{const i=n.length;let o;if(i<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,i);else if(i<65536){o=new Uint8Array(3);const l=new DataView(o.buffer);l.setUint8(0,126),l.setUint16(1,i)}else{o=new Uint8Array(9);const l=new DataView(o.buffer);l.setUint8(0,127),l.setBigUint64(1,BigInt(i))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let xc;function Zo(e){return e.reduce((t,n)=>t+n.length,0)}function Xo(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let i=0;for(let o=0;o<t;o++)n[o]=e[0][i++],i===e[0].length&&(e.shift(),i=0);return e.length&&i<e[0].length&&(e[0]=e[0].slice(i)),n}function L2(e,t){xc||(xc=new TextDecoder);const n=[];let i=0,o=-1,l=!1;return new TransformStream({transform(u,c){for(n.push(u);;){if(i===0){if(Zo(n)<1)break;const d=Xo(n,1);l=(d[0]&128)===128,o=d[0]&127,o<126?i=3:o===126?i=1:i=2}else if(i===1){if(Zo(n)<2)break;const d=Xo(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),i=3}else if(i===2){if(Zo(n)<8)break;const d=Xo(n,8),h=new DataView(d.buffer,d.byteOffset,d.length),p=h.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(yc);break}o=p*Math.pow(2,32)+h.getUint32(4),i=3}else{if(Zo(n)<o)break;const d=Xo(n,o);c.enqueue(wc(l?d:xc.decode(d),t)),i=0}if(o===0||o>e){c.enqueue(yc);break}}}})}const u0=4;function Qe(e){if(e)return j2(e)}function j2(e){for(var t in Qe.prototype)e[t]=Qe.prototype[t];return e}Qe.prototype.on=Qe.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Qe.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Qe.prototype.off=Qe.prototype.removeListener=Qe.prototype.removeAllListeners=Qe.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var i,o=0;o<n.length;o++)if(i=n[o],i===t||i.fn===t){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+e],this},Qe.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(n){n=n.slice(0);for(var i=0,o=n.length;i<o;++i)n[i].apply(this,t)}return this},Qe.prototype.emitReserved=Qe.prototype.emit,Qe.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Qe.prototype.hasListeners=function(e){return!!this.listeners(e).length};const $o=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Ln=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),R2="arraybuffer";function g3(){}function c0(e,...t){return t.reduce((n,i)=>(e.hasOwnProperty(i)&&(n[i]=e[i]),n),{})}const U2=Ln.setTimeout,V2=Ln.clearTimeout;function ta(e,t){t.useNativeTimers?(e.setTimeoutFn=U2.bind(Ln),e.clearTimeoutFn=V2.bind(Ln)):(e.setTimeoutFn=Ln.setTimeout.bind(Ln),e.clearTimeoutFn=Ln.clearTimeout.bind(Ln))}const P2=1.33;function Q2(e){return typeof e=="string"?F2(e):Math.ceil((e.byteLength||e.size)*P2)}function F2(e){let t=0,n=0;for(let i=0,o=e.length;i<o;i++)t=e.charCodeAt(i),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(i++,n+=4);return n}function f0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function B2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Y2(e){let t={},n=e.split("&");for(let i=0,o=n.length;i<o;i++){let l=n[i].split("=");t[decodeURIComponent(l[0])]=decodeURIComponent(l[1])}return t}class W2 extends Error{constructor(t,n,i){super(t),this.description=n,this.context=i,this.type="TransportError"}}class Tc extends Qe{constructor(t){super(),this.writable=!1,ta(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,i){return super.emitReserved("error",new W2(t,n,i)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=wc(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=B2(t);return n.length?"?"+n:""}}class q2 extends Tc{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let i=0;this._polling&&(i++,this.once("pollComplete",function(){--i||n()})),this.writable||(i++,this.once("drain",function(){--i||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=i=>{if(this.readyState==="opening"&&i.type==="open"&&this.onOpen(),i.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(i)};k2(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,z2(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=f0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let d0=!1;try{d0=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const _2=d0;function K2(){}class H2 extends q2{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let i=location.port;i||(i=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||i!==t.port}}doWrite(t,n){const i=this.request({method:"POST",data:t});i.on("success",n),i.on("error",(o,l)=>{this.onError("xhr post error",o,l)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,i)=>{this.onError("xhr poll error",n,i)}),this.pollXhr=t}}class or extends Qe{constructor(t,n,i){super(),this.createRequest=t,ta(this,i),this._opts=i,this._method=i.method||"GET",this._uri=n,this._data=i.data!==void 0?i.data:null,this._create()}_create(){var t;const n=c0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const i=this._xhr=this.createRequest(n);try{i.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){i.setDisableHeaderCheck&&i.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&i.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{i.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{i.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(i),"withCredentials"in i&&(i.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(i.timeout=this._opts.requestTimeout),i.onreadystatechange=()=>{var o;i.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(i.getResponseHeader("set-cookie"))),i.readyState===4&&(i.status===200||i.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof i.status=="number"?i.status:0)},0))},i.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=or.requestsCount++,or.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=K2,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete or.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(or.requestsCount=0,or.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",h0);else if(typeof addEventListener=="function"){const e="onpagehide"in Ln?"pagehide":"unload";addEventListener(e,h0,!1)}}function h0(){for(let e in or.requests)or.requests.hasOwnProperty(e)&&or.requests[e].abort()}const J2=(function(){const e=p0({xdomain:!1});return e&&e.responseType!==null})();class G2 extends H2{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=J2&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new or(p0,this.uri(),t)}}function p0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||_2))return new XMLHttpRequest}catch{}if(!t)try{return new Ln[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const g0=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Z2 extends Tc{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,i=g0?{}:c0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,i)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const i=t[n],o=n===t.length-1;vc(i,this.supportsBinary,l=>{try{this.doWrite(i,l)}catch{}o&&$o(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=f0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Ec=Ln.WebSocket||Ln.MozWebSocket;class X2 extends Z2{createSocket(t,n,i){return g0?new Ec(t,n,i):n?new Ec(t,n):new Ec(t)}doWrite(t,n){this.ws.send(n)}}class $2 extends Tc{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=L2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),i=t.readable.pipeThrough(n).getReader(),o=O2();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const l=()=>{i.read().then(({done:c,value:d})=>{c||(this.onPacket(d),l())}).catch(c=>{})};l();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const i=t[n],o=n===t.length-1;this._writer.write(i).then(()=>{o&&$o(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const tI={websocket:X2,webtransport:$2,polling:G2},eI=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,nI=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Ac(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),i=e.indexOf("]");n!=-1&&i!=-1&&(e=e.substring(0,n)+e.substring(n,i).replace(/:/g,";")+e.substring(i,e.length));let o=eI.exec(e||""),l={},u=14;for(;u--;)l[nI[u]]=o[u]||"";return n!=-1&&i!=-1&&(l.source=t,l.host=l.host.substring(1,l.host.length-1).replace(/;/g,":"),l.authority=l.authority.replace("[","").replace("]","").replace(/;/g,":"),l.ipv6uri=!0),l.pathNames=rI(l,l.path),l.queryKey=iI(l,l.query),l}function rI(e,t){const n=/\/{2,9}/g,i=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&i.splice(0,1),t.slice(-1)=="/"&&i.splice(i.length-1,1),i}function iI(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(i,o,l){o&&(n[o]=l)}),n}const bc=typeof addEventListener=="function"&&typeof removeEventListener=="function",ea=[];bc&&addEventListener("offline",()=>{ea.forEach(e=>e())},!1);class Or extends Qe{constructor(t,n){if(super(),this.binaryType=R2,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const i=Ac(t);n.hostname=i.host,n.secure=i.protocol==="https"||i.protocol==="wss",n.port=i.port,i.query&&(n.query=i.query)}else n.host&&(n.hostname=Ac(n.host).host);ta(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(i=>{const o=i.prototype.name;this.transports.push(o),this._transportsByName[o]=i}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Y2(this.opts.query)),bc&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},ea.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=u0,n.transport=t,this.id&&(n.sid=this.id);const i=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](i)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Or.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Or.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let i=0;i<this.writeBuffer.length;i++){const o=this.writeBuffer[i].data;if(o&&(n+=Q2(o)),i>0&&n>this._maxPayload)return this.writeBuffer.slice(0,i);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,$o(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,i){return this._sendPacket("message",t,n,i),this}send(t,n,i){return this._sendPacket("message",t,n,i),this}_sendPacket(t,n,i,o){if(typeof n=="function"&&(o=n,n=void 0),typeof i=="function"&&(o=i,i=null),this.readyState==="closing"||this.readyState==="closed")return;i=i||{},i.compress=i.compress!==!1;const l={type:t,data:n,options:i};this.emitReserved("packetCreate",l),this.writeBuffer.push(l),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},i=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?i():t()}):this.upgrading?i():t()),this}_onError(t){if(Or.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),bc&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const i=ea.indexOf(this._offlineEventListener);i!==-1&&ea.splice(i,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Or.protocol=u0;class sI extends Or{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),i=!1;Or.priorWebsocketSuccess=!1;const o=()=>{i||(n.send([{type:"ping",data:"probe"}]),n.once("packet",m=>{if(!i)if(m.type==="pong"&&m.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Or.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{i||this.readyState!=="closed"&&(p(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const w=new Error("probe error");w.transport=n.name,this.emitReserved("upgradeError",w)}}))};function l(){i||(i=!0,p(),n.close(),n=null)}const u=m=>{const w=new Error("probe error: "+m);w.transport=n.name,l(),this.emitReserved("upgradeError",w)};function c(){u("transport closed")}function d(){u("socket closed")}function h(m){n&&m.name!==n.name&&l()}const p=()=>{n.removeListener("open",o),n.removeListener("error",u),n.removeListener("close",c),this.off("close",d),this.off("upgrading",h)};n.once("open",o),n.once("error",u),n.once("close",c),this.once("close",d),this.once("upgrading",h),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{i||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let i=0;i<t.length;i++)~this.transports.indexOf(t[i])&&n.push(t[i]);return n}}let oI=class extends sI{constructor(t,n={}){const i=typeof t=="object"?t:n;(!i.transports||i.transports&&typeof i.transports[0]=="string")&&(i.transports=(i.transports||["polling","websocket","webtransport"]).map(o=>tI[o]).filter(o=>!!o)),super(t,i)}};function aI(e,t="",n){let i=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),i=Ac(e)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";const l=i.host.indexOf(":")!==-1?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+l+":"+i.port+t,i.href=i.protocol+"://"+l+(n&&n.port===i.port?"":":"+i.port),i}const lI=typeof ArrayBuffer=="function",uI=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,m0=Object.prototype.toString,cI=typeof Blob=="function"||typeof Blob<"u"&&m0.call(Blob)==="[object BlobConstructor]",fI=typeof File=="function"||typeof File<"u"&&m0.call(File)==="[object FileConstructor]";function Sc(e){return lI&&(e instanceof ArrayBuffer||uI(e))||cI&&e instanceof Blob||fI&&e instanceof File}function na(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,i=e.length;n<i;n++)if(na(e[n]))return!0;return!1}if(Sc(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return na(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&na(e[n]))return!0;return!1}function dI(e){const t=[],n=e.data,i=e;return i.data=Nc(n,t),i.attachments=t.length,{packet:i,buffers:t}}function Nc(e,t){if(!e)return e;if(Sc(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let i=0;i<e.length;i++)n[i]=Nc(e[i],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=Nc(e[i],t));return n}return e}function hI(e,t){return e.data=Dc(e.data,t),delete e.attachments,e}function Dc(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Dc(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Dc(e[n],t));return e}const pI=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],gI=5;var Gt;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(Gt||(Gt={}));class mI{constructor(t){this.replacer=t}encode(t){return(t.type===Gt.EVENT||t.type===Gt.ACK)&&na(t)?this.encodeAsBinary({type:t.type===Gt.EVENT?Gt.BINARY_EVENT:Gt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Gt.BINARY_EVENT||t.type===Gt.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=dI(t),i=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(i),o}}function y0(e){return Object.prototype.toString.call(e)==="[object Object]"}class Ic extends Qe{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const i=n.type===Gt.BINARY_EVENT;i||n.type===Gt.BINARY_ACK?(n.type=i?Gt.EVENT:Gt.ACK,this.reconstructor=new yI(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Sc(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const i={type:Number(t.charAt(0))};if(Gt[i.type]===void 0)throw new Error("unknown packet type "+i.type);if(i.type===Gt.BINARY_EVENT||i.type===Gt.BINARY_ACK){const l=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(l,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");i.attachments=Number(u)}if(t.charAt(n+1)==="/"){const l=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););i.nsp=t.substring(l,n)}else i.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const l=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}i.id=Number(t.substring(l,n+1))}if(t.charAt(++n)){const l=this.tryParse(t.substr(n));if(Ic.isPayloadValid(i.type,l))i.data=l;else throw new Error("invalid payload")}return i}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case Gt.CONNECT:return y0(n);case Gt.DISCONNECT:return n===void 0;case Gt.CONNECT_ERROR:return typeof n=="string"||y0(n);case Gt.EVENT:case Gt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&pI.indexOf(n[0])===-1);case Gt.ACK:case Gt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class yI{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=hI(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const vI=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Ic,Encoder:mI,get PacketType(){return Gt},protocol:gI},Symbol.toStringTag,{value:"Module"}));function Jn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const MI=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class v0 extends Qe{constructor(t,n,i){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,i&&i.auth&&(this.auth=i.auth),this._opts=Object.assign({},i),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Jn(t,"open",this.onopen.bind(this)),Jn(t,"packet",this.onpacket.bind(this)),Jn(t,"error",this.onerror.bind(this)),Jn(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var i,o,l;if(MI.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const u={type:Gt.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,m=n.pop();this._registerAckCallback(p,m),u.id=p}const c=(o=(i=this.io.engine)===null||i===void 0?void 0:i.transport)===null||o===void 0?void 0:o.writable,d=this.connected&&!(!((l=this.io.engine)===null||l===void 0)&&l._hasPingExpired());return this.flags.volatile&&!c||(d?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var i;const o=(i=this.flags.timeout)!==null&&i!==void 0?i:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const l=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},o),u=(...c)=>{this.io.clearTimeoutFn(l),n.apply(this,c)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((i,o)=>{const l=(u,c)=>u?o(u):i(c);l.withError=!0,n.push(l),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const i={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...l)=>i!==this._queue[0]?void 0:(o!==null?i.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...l)),i.pending=!1,this._drainQueue())),this._queue.push(i),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Gt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(i=>String(i.id)===t)){const i=this.acks[t];delete this.acks[t],i.withError&&i.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Gt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Gt.EVENT:case Gt.BINARY_EVENT:this.onevent(t);break;case Gt.ACK:case Gt.BINARY_ACK:this.onack(t);break;case Gt.DISCONNECT:this.ondisconnect();break;case Gt.CONNECT_ERROR:this.destroy();const i=new Error(t.data.message);i.data=t.data.data,this.emitReserved("connect_error",i);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const i of n)i.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let i=!1;return function(...o){i||(i=!0,n.packet({type:Gt.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Gt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let i=0;i<n.length;i++)if(t===n[i])return n.splice(i,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let i=0;i<n.length;i++)if(t===n[i])return n.splice(i,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const i of n)i.apply(this,t.data)}}}function Ri(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Ri.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0},Ri.prototype.reset=function(){this.attempts=0},Ri.prototype.setMin=function(e){this.ms=e},Ri.prototype.setMax=function(e){this.max=e},Ri.prototype.setJitter=function(e){this.jitter=e};class Cc extends Qe{constructor(t,n){var i;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,ta(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((i=n.randomizationFactor)!==null&&i!==void 0?i:.5),this.backoff=new Ri({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||vI;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new oI(this.uri,this.opts);const n=this.engine,i=this;this._readyState="opening",this.skipReconnect=!1;const o=Jn(n,"open",function(){i.onopen(),t&&t()}),l=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=Jn(n,"error",l);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{o(),l(new Error("timeout")),n.close()},c);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(o),this.subs.push(u),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Jn(t,"ping",this.onping.bind(this)),Jn(t,"data",this.ondata.bind(this)),Jn(t,"error",this.onerror.bind(this)),Jn(t,"close",this.onclose.bind(this)),Jn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){$o(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let i=this.nsps[t];return i?this._autoConnect&&!i.active&&i.connect():(i=new v0(this,t,n),this.nsps[t]=i),i}_destroy(t){const n=Object.keys(this.nsps);for(const i of n)if(this.nsps[i].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let i=0;i<n.length;i++)this.engine.write(n[i],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var i;this.cleanup(),(i=this.engine)===null||i===void 0||i.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const i=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},n);this.opts.autoUnref&&i.unref(),this.subs.push(()=>{this.clearTimeoutFn(i)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Os={};function ra(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=aI(e,t.path||"/socket.io"),i=n.source,o=n.id,l=n.path,u=Os[o]&&l in Os[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new Cc(i,t):(Os[o]||(Os[o]=new Cc(i,t)),d=Os[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(ra,{Manager:Cc,Socket:v0,io:ra,connect:ra});var wI=e=>{switch(e){case"success":return EI;case"info":return bI;case"warning":return AI;case"error":return SI;default:return null}},xI=Array(12).fill(0),TI=({visible:e,className:t})=>x.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},x.createElement("div",{className:"sonner-spinner"},xI.map((n,i)=>x.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),EI=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),AI=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),bI=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),SI=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),NI=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},x.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),x.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),DI=()=>{let[e,t]=x.useState(document.hidden);return x.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},zc=1,II=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...i}=e,o=typeof e?.id=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:zc++,l=this.toasts.find(c=>c.id===o),u=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),l?this.toasts=this.toasts.map(c=>c.id===o?(this.publish({...c,...e,id:o,title:n}),{...c,...e,id:o,dismissible:u,title:n}):c):this.addToast({title:n,...i,dismissible:u,id:o}),o},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let i=e instanceof Promise?e:e(),o=n!==void 0,l,u=i.then(async d=>{if(l=["resolve",d],x.isValidElement(d))o=!1,this.create({id:n,type:"default",message:d});else if(zI(d)&&!d.ok){o=!1;let h=typeof t.error=="function"?await t.error(`HTTP error! status: ${d.status}`):t.error,p=typeof t.description=="function"?await t.description(`HTTP error! status: ${d.status}`):t.description;this.create({id:n,type:"error",message:h,description:p})}else if(t.success!==void 0){o=!1;let h=typeof t.success=="function"?await t.success(d):t.success,p=typeof t.description=="function"?await t.description(d):t.description;this.create({id:n,type:"success",message:h,description:p})}}).catch(async d=>{if(l=["reject",d],t.error!==void 0){o=!1;let h=typeof t.error=="function"?await t.error(d):t.error,p=typeof t.description=="function"?await t.description(d):t.description;this.create({id:n,type:"error",message:h,description:p})}}).finally(()=>{var d;o&&(this.dismiss(n),n=void 0),(d=t.finally)==null||d.call(t)}),c=()=>new Promise((d,h)=>u.then(()=>l[0]==="reject"?h(l[1]):d(l[1])).catch(h));return typeof n!="string"&&typeof n!="number"?{unwrap:c}:Object.assign(n,{unwrap:c})},this.custom=(e,t)=>{let n=t?.id||zc++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},hn=new II,CI=(e,t)=>{let n=t?.id||zc++;return hn.addToast({title:e,...t,id:n}),n},zI=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",kI=CI,OI=()=>hn.toasts,LI=()=>hn.getActiveToasts(),Ls=Object.assign(kI,{success:hn.success,info:hn.info,warning:hn.warning,error:hn.error,custom:hn.custom,message:hn.message,promise:hn.promise,dismiss:hn.dismiss,loading:hn.loading},{getHistory:OI,getToasts:LI});function jI(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",t==="top"&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}jI(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
54
+ }`;var Yt=fM(function(){return oe(M,dt+"return "+q).apply(n,T)});if(Yt.source=q,Xf(Yt))throw Yt;return Yt}function Xj(r){return ae(r).toLowerCase()}function $j(r){return ae(r).toUpperCase()}function tR(r,s,a){if(r=ae(r),r&&(a||s===n))return wy(r);if(!r||!(s=An(s)))return r;var f=$n(r),g=$n(s),M=xy(f,g),T=Ty(f,g)+1;return Yr(f,M,T).join("")}function eR(r,s,a){if(r=ae(r),r&&(a||s===n))return r.slice(0,Ay(r)+1);if(!r||!(s=An(s)))return r;var f=$n(r),g=Ty(f,$n(s))+1;return Yr(f,0,g).join("")}function nR(r,s,a){if(r=ae(r),r&&(a||s===n))return r.replace(Re,"");if(!r||!(s=An(s)))return r;var f=$n(r),g=xy(f,$n(s));return Yr(f,g).join("")}function rR(r,s){var a=ft,f=ut;if(De(s)){var g="separator"in s?s.separator:g;a="length"in s?Bt(s.length):a,f="omission"in s?An(s.omission):f}r=ae(r);var M=r.length;if(Qi(r)){var T=$n(r);M=T.length}if(a>=M)return r;var b=a-Fi(f);if(b<1)return f;var k=T?Yr(T,0,b).join(""):r.slice(0,b);if(g===n)return k+f;if(T&&(b+=k.length-b),$f(g)){if(r.slice(b).search(g)){var Y,W=k;for(g.global||(g=gf(g.source,ae(re.exec(g))+"g")),g.lastIndex=0;Y=g.exec(W);)var q=Y.index;k=k.slice(0,q===n?b:q)}}else if(r.indexOf(An(g),b)!=b){var nt=k.lastIndexOf(g);nt>-1&&(k=k.slice(0,nt))}return k+f}function iR(r){return r=ae(r),r&&ct.test(r)?r.replace(gt,Oz):r}var sR=Hi(function(r,s,a){return r+(a?" ":"")+s.toUpperCase()}),nd=dv("toUpperCase");function cM(r,s,a){return r=ae(r),s=a?n:s,s===n?Dz(r)?Rz(r):Mz(r):r.match(s)||[]}var fM=Wt(function(r,s){try{return Tn(r,n,s)}catch(a){return Xf(a)?a:new Rt(a)}}),oR=xr(function(r,s){return Pn(s,function(a){a=cr(a),Mr(r,a,Gf(r[a],r))}),r});function aR(r){var s=r==null?0:r.length,a=bt();return r=s?Ae(r,function(f){if(typeof f[1]!="function")throw new Qn(u);return[a(f[0]),f[1]]}):[],Wt(function(f){for(var g=-1;++g<s;){var M=r[g];if(Tn(M[0],this,f))return Tn(M[1],this,f)}})}function lR(r){return Ok(Bn(r,m))}function rd(r){return function(){return r}}function uR(r,s){return r==null||r!==r?s:r}var cR=pv(),fR=pv(!0);function vn(r){return r}function id(r){return Wy(typeof r=="function"?r:Bn(r,m))}function dR(r){return _y(Bn(r,m))}function hR(r,s){return Ky(r,Bn(s,m))}var pR=Wt(function(r,s){return function(a){return qs(a,r,s)}}),gR=Wt(function(r,s){return function(a){return qs(r,a,s)}});function sd(r,s,a){var f=_e(s),g=Oa(s,f);a==null&&!(De(s)&&(g.length||!f.length))&&(a=s,s=r,r=this,g=Oa(s,_e(s)));var M=!(De(a)&&"chain"in a)||!!a.chain,T=Er(r);return Pn(g,function(b){var k=s[b];r[b]=k,T&&(r.prototype[b]=function(){var Y=this.__chain__;if(M||Y){var W=r(this.__wrapped__),q=W.__actions__=gn(this.__actions__);return q.push({func:k,args:arguments,thisArg:r}),W.__chain__=Y,W}return k.apply(r,Ur([this.value()],arguments))})}),r}function mR(){return Xe._===this&&(Xe._=Bz),this}function od(){}function yR(r){return r=Bt(r),Wt(function(s){return Hy(s,r)})}var vR=Uf(Ae),MR=Uf(gy),wR=Uf(lf);function dM(r){return Wf(r)?uf(cr(r)):Gk(r)}function xR(r){return function(s){return r==null?n:ci(r,s)}}var TR=mv(),ER=mv(!0);function ad(){return[]}function ld(){return!1}function AR(){return{}}function bR(){return""}function SR(){return!0}function NR(r,s){if(r=Bt(r),r<1||r>Lt)return[];var a=pt,f=sn(r,pt);s=bt(s),r-=pt;for(var g=df(f,s);++a<r;)s(a);return g}function DR(r){return Vt(r)?Ae(r,cr):bn(r)?[r]:gn(kv(ae(r)))}function IR(r){var s=++Qz;return ae(r)+s}var CR=Pa(function(r,s){return r+s},0),zR=Vf("ceil"),kR=Pa(function(r,s){return r/s},1),OR=Vf("floor");function LR(r){return r&&r.length?ka(r,vn,Ef):n}function jR(r,s){return r&&r.length?ka(r,bt(s,2),Ef):n}function RR(r){return vy(r,vn)}function UR(r,s){return vy(r,bt(s,2))}function VR(r){return r&&r.length?ka(r,vn,Nf):n}function PR(r,s){return r&&r.length?ka(r,bt(s,2),Nf):n}var QR=Pa(function(r,s){return r*s},1),FR=Vf("round"),BR=Pa(function(r,s){return r-s},0);function YR(r){return r&&r.length?ff(r,vn):0}function WR(r,s){return r&&r.length?ff(r,bt(s,2)):0}return y.after=dL,y.ary=Yv,y.assign=$L,y.assignIn=rM,y.assignInWith=Xa,y.assignWith=tj,y.at=ej,y.before=Wv,y.bind=Gf,y.bindAll=oR,y.bindKey=qv,y.castArray=AL,y.chain=Qv,y.chunk=OO,y.compact=LO,y.concat=jO,y.cond=aR,y.conforms=lR,y.constant=rd,y.countBy=Y4,y.create=nj,y.curry=_v,y.curryRight=Kv,y.debounce=Hv,y.defaults=rj,y.defaultsDeep=ij,y.defer=hL,y.delay=pL,y.difference=RO,y.differenceBy=UO,y.differenceWith=VO,y.drop=PO,y.dropRight=QO,y.dropRightWhile=FO,y.dropWhile=BO,y.fill=YO,y.filter=q4,y.flatMap=H4,y.flatMapDeep=J4,y.flatMapDepth=G4,y.flatten=Rv,y.flattenDeep=WO,y.flattenDepth=qO,y.flip=gL,y.flow=cR,y.flowRight=fR,y.fromPairs=_O,y.functions=fj,y.functionsIn=dj,y.groupBy=Z4,y.initial=HO,y.intersection=JO,y.intersectionBy=GO,y.intersectionWith=ZO,y.invert=pj,y.invertBy=gj,y.invokeMap=$4,y.iteratee=id,y.keyBy=tL,y.keys=_e,y.keysIn=yn,y.map=_a,y.mapKeys=yj,y.mapValues=vj,y.matches=dR,y.matchesProperty=hR,y.memoize=Ha,y.merge=Mj,y.mergeWith=iM,y.method=pR,y.methodOf=gR,y.mixin=sd,y.negate=Ja,y.nthArg=yR,y.omit=wj,y.omitBy=xj,y.once=mL,y.orderBy=eL,y.over=vR,y.overArgs=yL,y.overEvery=MR,y.overSome=wR,y.partial=Zf,y.partialRight=Jv,y.partition=nL,y.pick=Tj,y.pickBy=sM,y.property=dM,y.propertyOf=xR,y.pull=e4,y.pullAll=Vv,y.pullAllBy=n4,y.pullAllWith=r4,y.pullAt=i4,y.range=TR,y.rangeRight=ER,y.rearg=vL,y.reject=sL,y.remove=s4,y.rest=ML,y.reverse=Hf,y.sampleSize=aL,y.set=Aj,y.setWith=bj,y.shuffle=lL,y.slice=o4,y.sortBy=fL,y.sortedUniq=h4,y.sortedUniqBy=p4,y.split=Hj,y.spread=wL,y.tail=g4,y.take=m4,y.takeRight=y4,y.takeRightWhile=v4,y.takeWhile=M4,y.tap=L4,y.throttle=xL,y.thru=qa,y.toArray=tM,y.toPairs=oM,y.toPairsIn=aM,y.toPath=DR,y.toPlainObject=nM,y.transform=Sj,y.unary=TL,y.union=w4,y.unionBy=x4,y.unionWith=T4,y.uniq=E4,y.uniqBy=A4,y.uniqWith=b4,y.unset=Nj,y.unzip=Jf,y.unzipWith=Pv,y.update=Dj,y.updateWith=Ij,y.values=Zi,y.valuesIn=Cj,y.without=S4,y.words=cM,y.wrap=EL,y.xor=N4,y.xorBy=D4,y.xorWith=I4,y.zip=C4,y.zipObject=z4,y.zipObjectDeep=k4,y.zipWith=O4,y.entries=oM,y.entriesIn=aM,y.extend=rM,y.extendWith=Xa,sd(y,y),y.add=CR,y.attempt=fM,y.camelCase=Lj,y.capitalize=lM,y.ceil=zR,y.clamp=zj,y.clone=bL,y.cloneDeep=NL,y.cloneDeepWith=DL,y.cloneWith=SL,y.conformsTo=IL,y.deburr=uM,y.defaultTo=uR,y.divide=kR,y.endsWith=jj,y.eq=er,y.escape=Rj,y.escapeRegExp=Uj,y.every=W4,y.find=_4,y.findIndex=Lv,y.findKey=sj,y.findLast=K4,y.findLastIndex=jv,y.findLastKey=oj,y.floor=OR,y.forEach=Fv,y.forEachRight=Bv,y.forIn=aj,y.forInRight=lj,y.forOwn=uj,y.forOwnRight=cj,y.get=td,y.gt=CL,y.gte=zL,y.has=hj,y.hasIn=ed,y.head=Uv,y.identity=vn,y.includes=X4,y.indexOf=KO,y.inRange=kj,y.invoke=mj,y.isArguments=hi,y.isArray=Vt,y.isArrayBuffer=kL,y.isArrayLike=mn,y.isArrayLikeObject=Ue,y.isBoolean=OL,y.isBuffer=Wr,y.isDate=LL,y.isElement=jL,y.isEmpty=RL,y.isEqual=UL,y.isEqualWith=VL,y.isError=Xf,y.isFinite=PL,y.isFunction=Er,y.isInteger=Gv,y.isLength=Ga,y.isMap=Zv,y.isMatch=QL,y.isMatchWith=FL,y.isNaN=BL,y.isNative=YL,y.isNil=qL,y.isNull=WL,y.isNumber=Xv,y.isObject=De,y.isObjectLike=ke,y.isPlainObject=Zs,y.isRegExp=$f,y.isSafeInteger=_L,y.isSet=$v,y.isString=Za,y.isSymbol=bn,y.isTypedArray=Gi,y.isUndefined=KL,y.isWeakMap=HL,y.isWeakSet=JL,y.join=XO,y.kebabCase=Vj,y.last=Wn,y.lastIndexOf=$O,y.lowerCase=Pj,y.lowerFirst=Qj,y.lt=GL,y.lte=ZL,y.max=LR,y.maxBy=jR,y.mean=RR,y.meanBy=UR,y.min=VR,y.minBy=PR,y.stubArray=ad,y.stubFalse=ld,y.stubObject=AR,y.stubString=bR,y.stubTrue=SR,y.multiply=QR,y.nth=t4,y.noConflict=mR,y.noop=od,y.now=Ka,y.pad=Fj,y.padEnd=Bj,y.padStart=Yj,y.parseInt=Wj,y.random=Oj,y.reduce=rL,y.reduceRight=iL,y.repeat=qj,y.replace=_j,y.result=Ej,y.round=FR,y.runInContext=C,y.sample=oL,y.size=uL,y.snakeCase=Kj,y.some=cL,y.sortedIndex=a4,y.sortedIndexBy=l4,y.sortedIndexOf=u4,y.sortedLastIndex=c4,y.sortedLastIndexBy=f4,y.sortedLastIndexOf=d4,y.startCase=Jj,y.startsWith=Gj,y.subtract=BR,y.sum=YR,y.sumBy=WR,y.template=Zj,y.times=NR,y.toFinite=Ar,y.toInteger=Bt,y.toLength=eM,y.toLower=Xj,y.toNumber=qn,y.toSafeInteger=XL,y.toString=ae,y.toUpper=$j,y.trim=tR,y.trimEnd=eR,y.trimStart=nR,y.truncate=rR,y.unescape=iR,y.uniqueId=IR,y.upperCase=sR,y.upperFirst=nd,y.each=Fv,y.eachRight=Bv,y.first=Uv,sd(y,(function(){var r={};return lr(y,function(s,a){de.call(y.prototype,a)||(r[a]=s)}),r})(),{chain:!1}),y.VERSION=i,Pn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){y[r].placeholder=y}),Pn(["drop","take"],function(r,s){Jt.prototype[r]=function(a){a=a===n?1:We(Bt(a),0);var f=this.__filtered__&&!s?new Jt(this):this.clone();return f.__filtered__?f.__takeCount__=sn(a,f.__takeCount__):f.__views__.push({size:sn(a,pt),type:r+(f.__dir__<0?"Right":"")}),f},Jt.prototype[r+"Right"]=function(a){return this.reverse()[r](a).reverse()}}),Pn(["filter","map","takeWhile"],function(r,s){var a=s+1,f=a==Mt||a==Xt;Jt.prototype[r]=function(g){var M=this.clone();return M.__iteratees__.push({iteratee:bt(g,3),type:a}),M.__filtered__=M.__filtered__||f,M}}),Pn(["head","last"],function(r,s){var a="take"+(s?"Right":"");Jt.prototype[r]=function(){return this[a](1).value()[0]}}),Pn(["initial","tail"],function(r,s){var a="drop"+(s?"":"Right");Jt.prototype[r]=function(){return this.__filtered__?new Jt(this):this[a](1)}}),Jt.prototype.compact=function(){return this.filter(vn)},Jt.prototype.find=function(r){return this.filter(r).head()},Jt.prototype.findLast=function(r){return this.reverse().find(r)},Jt.prototype.invokeMap=Wt(function(r,s){return typeof r=="function"?new Jt(this):this.map(function(a){return qs(a,r,s)})}),Jt.prototype.reject=function(r){return this.filter(Ja(bt(r)))},Jt.prototype.slice=function(r,s){r=Bt(r);var a=this;return a.__filtered__&&(r>0||s<0)?new Jt(a):(r<0?a=a.takeRight(-r):r&&(a=a.drop(r)),s!==n&&(s=Bt(s),a=s<0?a.dropRight(-s):a.take(s-r)),a)},Jt.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},Jt.prototype.toArray=function(){return this.take(pt)},lr(Jt.prototype,function(r,s){var a=/^(?:filter|find|map|reject)|While$/.test(s),f=/^(?:head|last)$/.test(s),g=y[f?"take"+(s=="last"?"Right":""):s],M=f||/^find/.test(s);g&&(y.prototype[s]=function(){var T=this.__wrapped__,b=f?[1]:arguments,k=T instanceof Jt,Y=b[0],W=k||Vt(T),q=function(Kt){var Zt=g.apply(y,Ur([Kt],b));return f&&nt?Zt[0]:Zt};W&&a&&typeof Y=="function"&&Y.length!=1&&(k=W=!1);var nt=this.__chain__,dt=!!this.__actions__.length,St=M&&!nt,Yt=k&&!dt;if(!M&&W){T=Yt?T:new Jt(this);var Nt=r.apply(T,b);return Nt.__actions__.push({func:qa,args:[q],thisArg:n}),new Fn(Nt,nt)}return St&&Yt?r.apply(this,b):(Nt=this.thru(q),St?f?Nt.value()[0]:Nt.value():Nt)})}),Pn(["pop","push","shift","sort","splice","unshift"],function(r){var s=ya[r],a=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",f=/^(?:pop|shift)$/.test(r);y.prototype[r]=function(){var g=arguments;if(f&&!this.__chain__){var M=this.value();return s.apply(Vt(M)?M:[],g)}return this[a](function(T){return s.apply(Vt(T)?T:[],g)})}}),lr(Jt.prototype,function(r,s){var a=y[s];if(a){var f=a.name+"";de.call(qi,f)||(qi[f]=[]),qi[f].push({name:s,func:a})}}),qi[Va(n,j).name]=[{name:"wrapper",func:n}],Jt.prototype.clone=ik,Jt.prototype.reverse=sk,Jt.prototype.value=ok,y.prototype.at=j4,y.prototype.chain=R4,y.prototype.commit=U4,y.prototype.next=V4,y.prototype.plant=Q4,y.prototype.reverse=F4,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=B4,y.prototype.first=y.prototype.head,Vs&&(y.prototype[Vs]=P4),y}),Bi=Uz();si?((si.exports=Bi)._=Bi,rf._=Bi):Xe._=Bi}).call(WD)})(Is,Is.exports)),Is.exports}var ji=qD();let Wo;const _D=new Uint8Array(16);function KD(){if(!Wo&&(Wo=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Wo))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Wo(_D)}const He=[];for(let e=0;e<256;++e)He.push((e+256).toString(16).slice(1));function HD(e,t=0){return He[e[t+0]]+He[e[t+1]]+He[e[t+2]]+He[e[t+3]]+"-"+He[e[t+4]]+He[e[t+5]]+"-"+He[e[t+6]]+He[e[t+7]]+"-"+He[e[t+8]]+He[e[t+9]]+"-"+He[e[t+10]]+He[e[t+11]]+He[e[t+12]]+He[e[t+13]]+He[e[t+14]]+He[e[t+15]]}const jm={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Xu(e,t,n){if(jm.randomUUID&&!e)return jm.randomUUID();e=e||{};const i=e.random||(e.rng||KD)();return i[6]=i[6]&15|64,i[8]=i[8]&63|128,HD(i)}var qo={exports:{}},$u={};var Rm;function JD(){if(Rm)return $u;Rm=1;var e=x;function t(m,w){return m===w&&(m!==0||1/m===1/w)||m!==m&&w!==w}var n=typeof Object.is=="function"?Object.is:t,i=e.useState,o=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue;function c(m,w){var v=w(),S=i({inst:{value:v,getSnapshot:w}}),A=S[0].inst,P=S[1];return l(function(){A.value=v,A.getSnapshot=w,d(A)&&P({inst:A})},[m,v,w]),o(function(){return d(A)&&P({inst:A}),m(function(){d(A)&&P({inst:A})})},[m]),u(v),v}function d(m){var w=m.getSnapshot;m=m.value;try{var v=w();return!n(m,v)}catch{return!0}}function h(m,w){return w()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:c;return $u.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,$u}var tc={},Um;function GD(){if(Um)return tc;Um=1;var e={env:{}};return e.env.NODE_ENV!=="production"&&(function(){function t(S,A){return S===A&&(S!==0||1/S===1/A)||S!==S&&A!==A}function n(S,A){m||l.startTransition===void 0||(m=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var P=A();if(!w){var j=A();u(P,j)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),w=!0)}j=c({inst:{value:P,getSnapshot:A}});var L=j[0].inst,z=j[1];return h(function(){L.value=P,L.getSnapshot=A,i(L)&&z({inst:L})},[S,P,A]),d(function(){return i(L)&&z({inst:L}),S(function(){i(L)&&z({inst:L})})},[S]),p(P),P}function i(S){var A=S.getSnapshot;S=S.value;try{var P=A();return!u(S,P)}catch{return!0}}function o(S,A){return A()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var l=x,u=typeof Object.is=="function"?Object.is:t,c=l.useState,d=l.useEffect,h=l.useLayoutEffect,p=l.useDebugValue,m=!1,w=!1,v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?o:n;tc.useSyncExternalStore=l.useSyncExternalStore!==void 0?l.useSyncExternalStore:v,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})(),tc}var Vm;function ZD(){if(Vm)return qo.exports;Vm=1;var e={env:{}};return e.env.NODE_ENV==="production"?qo.exports=JD():qo.exports=GD(),qo.exports}var XD=ZD();const Pm=0,Qm=1,Fm=2,Bm=3;var Ym=Object.prototype.hasOwnProperty;function ec(e,t){var n,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((i=e.length)===t.length)for(;i--&&ec(e[i],t[i]););return i===-1}if(!n||typeof e=="object"){i=0;for(n in e)if(Ym.call(e,n)&&++i&&!Ym.call(t,n)||!(n in t)||!ec(e[n],t[n]))return!1;return Object.keys(t).length===i}}return e!==e&&t!==t}const gr=new WeakMap,kr=()=>{},Je=kr(),_o=Object,te=e=>e===Je,Hn=e=>typeof e=="function",mr=(e,t)=>({...e,...t}),Wm=e=>Hn(e.then),nc={},Ko={},rc="undefined",Cs=typeof window!=rc,ic=typeof document!=rc,$D=Cs&&"Deno"in window,t2=()=>Cs&&typeof window.requestAnimationFrame!=rc,qm=(e,t)=>{const n=gr.get(e);return[()=>!te(t)&&e.get(t)||nc,i=>{if(!te(t)){const o=e.get(t);t in Ko||(Ko[t]=o),n[5](t,mr(o,i),o||nc)}},n[6],()=>!te(t)&&t in Ko?Ko[t]:!te(t)&&e.get(t)||nc]};let sc=!0;const e2=()=>sc,[oc,ac]=Cs&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[kr,kr],n2=()=>{const e=ic&&document.visibilityState;return te(e)||e!=="hidden"},r2=e=>(ic&&document.addEventListener("visibilitychange",e),oc("focus",e),()=>{ic&&document.removeEventListener("visibilitychange",e),ac("focus",e)}),i2=e=>{const t=()=>{sc=!0,e()},n=()=>{sc=!1};return oc("online",t),oc("offline",n),()=>{ac("online",t),ac("offline",n)}},s2={isOnline:e2,isVisible:n2},o2={initFocus:r2,initReconnect:i2},_m=!x.useId,zs=!Cs||$D,a2=e=>t2()?window.requestAnimationFrame(e):setTimeout(e,1),Ho=zs?x.useEffect:x.useLayoutEffect,lc=typeof navigator<"u"&&navigator.connection,Km=!zs&&lc&&(["slow-2g","2g"].includes(lc.effectiveType)||lc.saveData),Jo=new WeakMap,l2=e=>_o.prototype.toString.call(e),uc=(e,t)=>e===`[object ${t}]`;let u2=0;const cc=e=>{const t=typeof e,n=l2(e),i=uc(n,"Date"),o=uc(n,"RegExp"),l=uc(n,"Object");let u,c;if(_o(e)===e&&!i&&!o){if(u=Jo.get(e),u)return u;if(u=++u2+"~",Jo.set(e,u),Array.isArray(e)){for(u="@",c=0;c<e.length;c++)u+=cc(e[c])+",";Jo.set(e,u)}if(l){u="#";const d=_o.keys(e).sort();for(;!te(c=d.pop());)te(e[c])||(u+=c+":"+cc(e[c])+",");Jo.set(e,u)}}else u=i?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return u},fc=e=>{if(Hn(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?cc(e):"",[e,t]};let c2=0;const dc=()=>++c2;async function Hm(...e){const[t,n,i,o]=e,l=mr({populateCache:!0,throwOnError:!0},typeof o=="boolean"?{revalidate:o}:o||{});let u=l.populateCache;const c=l.rollbackOnError;let d=l.optimisticData;const h=w=>typeof c=="function"?c(w):c!==!1,p=l.throwOnError;if(Hn(n)){const w=n,v=[],S=t.keys();for(const A of S)!/^\$(inf|sub)\$/.test(A)&&w(t.get(A)._k)&&v.push(A);return Promise.all(v.map(m))}return m(n);async function m(w){const[v]=fc(w);if(!v)return;const[S,A]=qm(t,v),[P,j,L,z]=gr.get(t),Z=()=>{const Mt=P[v];return(Hn(l.revalidate)?l.revalidate(S().data,w):l.revalidate!==!1)&&(delete L[v],delete z[v],Mt&&Mt[0])?Mt[0](Fm).then(()=>S().data):S().data};if(e.length<3)return Z();let Q=i,J,G=!1;const K=dc();j[v]=[K,0];const vt=!te(d),ft=S(),ut=ft.data,Qt=ft._c,Tt=te(Qt)?ut:Qt;if(vt&&(d=Hn(d)?d(Tt,ut):d,A({data:d,_c:Tt})),Hn(Q))try{Q=Q(Tt)}catch(Mt){J=Mt,G=!0}if(Q&&Wm(Q))if(Q=await Q.catch(Mt=>{J=Mt,G=!0}),K!==j[v][0]){if(G)throw J;return Q}else G&&vt&&h(J)&&(u=!0,A({data:Tt,_c:Je}));if(u&&!G)if(Hn(u)){const Mt=u(Q,Tt);A({data:Mt,error:Je,_c:Je})}else A({data:Q,error:Je,_c:Je});if(j[v][1]=dc(),Promise.resolve(Z()).then(()=>{A({_c:Je})}),G){if(p)throw J;return}return Q}}const Jm=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},Gm=(e,t)=>{if(!gr.has(e)){const n=mr(o2,t),i=Object.create(null),o=Hm.bind(Je,e);let l=kr;const u=Object.create(null),c=(p,m)=>{const w=u[p]||[];return u[p]=w,w.push(m),()=>w.splice(w.indexOf(m),1)},d=(p,m,w)=>{e.set(p,m);const v=u[p];if(v)for(const S of v)S(m,w)},h=()=>{if(!gr.has(e)&&(gr.set(e,[i,Object.create(null),Object.create(null),Object.create(null),o,d,c]),!zs)){const p=n.initFocus(setTimeout.bind(Je,Jm.bind(Je,i,Pm))),m=n.initReconnect(setTimeout.bind(Je,Jm.bind(Je,i,Qm)));l=()=>{p&&p(),m&&m(),gr.delete(e)}}};return h(),[e,o,h,l]}return[e,gr.get(e)[4]]},f2=(e,t,n,i,o)=>{const l=n.errorRetryCount,u=o.retryCount,c=~~((Math.random()+.5)*(1<<(u<8?u:8)))*n.errorRetryInterval;!te(l)&&u>l||setTimeout(i,c,o)},d2=ec,[hc,h2]=Gm(new Map),Zm=mr({onLoadingSlow:kr,onSuccess:kr,onError:kr,onErrorRetry:f2,onDiscarded:kr,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Km?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:Km?5e3:3e3,compare:d2,isPaused:()=>!1,cache:hc,mutate:h2,fallback:{}},s2),Xm=(e,t)=>{const n=mr(e,t);if(t){const{use:i,fallback:o}=e,{use:l,fallback:u}=t;i&&l&&(n.use=i.concat(l)),o&&u&&(n.fallback=mr(o,u))}return n},pc=x.createContext({}),p2=e=>{const{value:t}=e,n=x.useContext(pc),i=Hn(t),o=x.useMemo(()=>i?t(n):t,[i,n,t]),l=x.useMemo(()=>i?o:Xm(n,o),[i,n,o]),u=o&&o.provider,c=x.useRef(Je);u&&!c.current&&(c.current=Gm(u(l.cache||hc),o));const d=c.current;return d&&(l.cache=d[0],l.mutate=d[1]),Ho(()=>{if(d)return d[2]&&d[2](),d[3]},[]),x.createElement(pc.Provider,mr(e,{value:l}))},g2="$inf$",$m=Cs&&window.__SWR_DEVTOOLS_USE__,m2=$m?window.__SWR_DEVTOOLS_USE__:[],y2=()=>{$m&&(window.__SWR_DEVTOOLS_REACT__=x)},v2=e=>Hn(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],M2=()=>{const e=x.useContext(pc);return x.useMemo(()=>mr(Zm,e),[e])},w2=e=>(t,n,i)=>e(t,n&&((...l)=>{const[u]=fc(t),[,,,c]=gr.get(hc);if(u.startsWith(g2))return n(...l);const d=c[u];return te(d)?n(...l):(delete c[u],d)}),i),x2=m2.concat(w2),T2=e=>function(...n){const i=M2(),[o,l,u]=v2(n),c=Xm(i,u);let d=e;const{use:h}=c,p=(h||[]).concat(x2);for(let m=p.length;m--;)d=p[m](d);return d(o,l||c.fetcher||null,c)},E2=(e,t,n)=>{const i=t[e]||(t[e]=[]);return i.push(n),()=>{const o=i.indexOf(n);o>=0&&(i[o]=i[i.length-1],i.pop())}};y2();const gc=x.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}}),mc={dedupe:!0},t0=Promise.resolve(Je),A2=(e,t,n)=>{const{cache:i,compare:o,suspense:l,fallbackData:u,revalidateOnMount:c,revalidateIfStale:d,refreshInterval:h,refreshWhenHidden:p,refreshWhenOffline:m,keepPreviousData:w}=n,[v,S,A,P]=gr.get(i),[j,L]=fc(e),z=x.useRef(!1),Z=x.useRef(!1),Q=x.useRef(j),J=x.useRef(t),G=x.useRef(n),K=()=>G.current,vt=()=>K().isVisible()&&K().isOnline(),[ft,ut,Qt,Tt]=qm(i,j),Mt=x.useRef({}).current,ee=te(u)?te(n.fallback)?Je:n.fallback[j]:u,Xt=(yt,Et)=>{for(const Ft in Mt){const At=Ft;if(At==="data"){if(!o(yt[At],Et[At])&&(!te(yt[At])||!o(V,Et[At])))return!1}else if(Et[At]!==yt[At])return!1}return!0},xt=x.useMemo(()=>{const yt=!j||!t?!1:te(c)?K().isPaused()||l?!1:d!==!1:c,Et=ne=>{const ie=mr(ne);return delete ie._k,yt?{isValidating:!0,isLoading:!0,...ie}:ie},Ft=ft(),At=Tt(),$t=Et(Ft),Fe=Ft===At?$t:Et(At);let ve=$t;return[()=>{const ne=Et(ft());return Xt(ne,ve)?(ve.data=ne.data,ve.isLoading=ne.isLoading,ve.isValidating=ne.isValidating,ve.error=ne.error,ve):(ve=ne,ne)},()=>Fe]},[i,j]),Lt=XD.useSyncExternalStore(x.useCallback(yt=>Qt(j,(Et,Ft)=>{Xt(Ft,Et)||yt()}),[i,j]),xt[0],xt[1]),ht=!z.current,at=v[j]&&v[j].length>0,pt=Lt.data,I=te(pt)?ee&&Wm(ee)?gc(ee):ee:pt,R=Lt.error,N=x.useRef(I),V=w?te(pt)?te(N.current)?I:N.current:pt:I,B=at&&!te(R)?!1:ht&&!te(c)?c:K().isPaused()?!1:l?te(I)?!1:d:te(I)||d,$=!!(j&&t&&ht&&B),X=te(Lt.isValidating)?$:Lt.isValidating,wt=te(Lt.isLoading)?$:Lt.isLoading,kt=x.useCallback(async yt=>{const Et=J.current;if(!j||!Et||Z.current||K().isPaused())return!1;let Ft,At,$t=!0;const Fe=yt||{},ve=!A[j]||!Fe.dedupe,ne=()=>_m?!Z.current&&j===Q.current&&z.current:j===Q.current,ie={isValidating:!1,isLoading:!1},nn=()=>{ut(ie)},Le=()=>{const Me=A[j];Me&&Me[1]===At&&delete A[j]},Rn={isValidating:!0};te(ft().data)&&(Rn.isLoading=!0);try{if(ve&&(ut(Rn),n.loadingTimeout&&te(ft().data)&&setTimeout(()=>{$t&&ne()&&K().onLoadingSlow(j,n)},n.loadingTimeout),A[j]=[Et(L),dc()]),[Ft,At]=A[j],Ft=await Ft,ve&&setTimeout(Le,n.dedupingInterval),!A[j]||A[j][1]!==At)return ve&&ne()&&K().onDiscarded(j),!1;ie.error=Je;const Me=S[j];if(!te(Me)&&(At<=Me[0]||At<=Me[1]||Me[1]===0))return nn(),ve&&ne()&&K().onDiscarded(j),!1;const ue=ft().data;ie.data=o(ue,Ft)?ue:Ft,ve&&ne()&&K().onSuccess(Ft,j,n)}catch(Me){Le();const ue=K(),{shouldRetryOnError:je}=ue;ue.isPaused()||(ie.error=Me,ve&&ne()&&(ue.onError(Me,j,ue),(je===!0||Hn(je)&&je(Me))&&(!K().revalidateOnFocus||!K().revalidateOnReconnect||vt())&&ue.onErrorRetry(Me,j,ue,ln=>{const wn=v[j];wn&&wn[0]&&wn[0](Bm,ln)},{retryCount:(Fe.retryCount||0)+1,dedupe:!0})))}return $t=!1,nn(),!0},[j,i]),qt=x.useCallback((...yt)=>Hm(i,Q.current,...yt),[]);if(Ho(()=>{J.current=t,G.current=n,te(pt)||(N.current=pt)}),Ho(()=>{if(!j)return;const yt=kt.bind(Je,mc);let Et=0;K().revalidateOnFocus&&(Et=Date.now()+K().focusThrottleInterval);const At=E2(j,v,($t,Fe={})=>{if($t==Pm){const ve=Date.now();K().revalidateOnFocus&&ve>Et&&vt()&&(Et=ve+K().focusThrottleInterval,yt())}else if($t==Qm)K().revalidateOnReconnect&&vt()&&yt();else{if($t==Fm)return kt();if($t==Bm)return kt(Fe)}});return Z.current=!1,Q.current=j,z.current=!0,ut({_k:L}),B&&(A[j]||(te(I)||zs?yt():a2(yt))),()=>{Z.current=!0,At()}},[j]),Ho(()=>{let yt;function Et(){const At=Hn(h)?h(ft().data):h;At&&yt!==-1&&(yt=setTimeout(Ft,At))}function Ft(){!ft().error&&(p||K().isVisible())&&(m||K().isOnline())?kt(mc).then(Et):Et()}return Et(),()=>{yt&&(clearTimeout(yt),yt=-1)}},[h,p,m,j]),x.useDebugValue(V),l){const yt=j&&te(I);if(!_m&&zs&&yt)throw new Error("Fallback data is required when using Suspense in SSR.");yt&&(J.current=t,G.current=n,Z.current=!1);const Et=P[j],Ft=!te(Et)&&yt?qt(Et):t0;if(gc(Ft),!te(R)&&yt)throw R;const At=yt?kt(mc):t0;!te(V)&&yt&&(At.status="fulfilled",At.value=!0),gc(At)}return{mutate:qt,get data(){return Mt.data=!0,V},get error(){return Mt.error=!0,R},get isValidating(){return Mt.isValidating=!0,X},get isLoading(){return Mt.isLoading=!0,wt}}},b2=_o.defineProperty(p2,"defaultValue",{value:Zm}),S2=T2(A2),sr=Object.create(null);sr.open="0",sr.close="1",sr.ping="2",sr.pong="3",sr.message="4",sr.upgrade="5",sr.noop="6";const Go=Object.create(null);Object.keys(sr).forEach(e=>{Go[sr[e]]=e});const yc={type:"error",data:"parser error"},e0=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",n0=typeof ArrayBuffer=="function",r0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,vc=({type:e,data:t},n,i)=>e0&&t instanceof Blob?n?i(t):i0(t,i):n0&&(t instanceof ArrayBuffer||r0(t))?n?i(t):i0(new Blob([t]),i):i(sr[e]+(t||"")),i0=(e,t)=>{const n=new FileReader;return n.onload=function(){const i=n.result.split(",")[1];t("b"+(i||""))},n.readAsDataURL(e)};function s0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Mc;function N2(e,t){if(e0&&e.data instanceof Blob)return e.data.arrayBuffer().then(s0).then(t);if(n0&&(e.data instanceof ArrayBuffer||r0(e.data)))return t(s0(e.data));vc(e,!1,n=>{Mc||(Mc=new TextEncoder),t(Mc.encode(n))})}const o0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ks=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<o0.length;e++)ks[o0.charCodeAt(e)]=e;const D2=e=>{let t=e.length*.75,n=e.length,i,o=0,l,u,c,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const h=new ArrayBuffer(t),p=new Uint8Array(h);for(i=0;i<n;i+=4)l=ks[e.charCodeAt(i)],u=ks[e.charCodeAt(i+1)],c=ks[e.charCodeAt(i+2)],d=ks[e.charCodeAt(i+3)],p[o++]=l<<2|u>>4,p[o++]=(u&15)<<4|c>>2,p[o++]=(c&3)<<6|d&63;return h},I2=typeof ArrayBuffer=="function",wc=(e,t)=>{if(typeof e!="string")return{type:"message",data:a0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:C2(e.substring(1),t)}:Go[n]?e.length>1?{type:Go[n],data:e.substring(1)}:{type:Go[n]}:yc},C2=(e,t)=>{if(I2){const n=D2(e);return a0(n,t)}else return{base64:!0,data:e}},a0=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},l0="",z2=(e,t)=>{const n=e.length,i=new Array(n);let o=0;e.forEach((l,u)=>{vc(l,!1,c=>{i[u]=c,++o===n&&t(i.join(l0))})})},k2=(e,t)=>{const n=e.split(l0),i=[];for(let o=0;o<n.length;o++){const l=wc(n[o],t);if(i.push(l),l.type==="error")break}return i};function O2(){return new TransformStream({transform(e,t){N2(e,n=>{const i=n.length;let o;if(i<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,i);else if(i<65536){o=new Uint8Array(3);const l=new DataView(o.buffer);l.setUint8(0,126),l.setUint16(1,i)}else{o=new Uint8Array(9);const l=new DataView(o.buffer);l.setUint8(0,127),l.setBigUint64(1,BigInt(i))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let xc;function Zo(e){return e.reduce((t,n)=>t+n.length,0)}function Xo(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let i=0;for(let o=0;o<t;o++)n[o]=e[0][i++],i===e[0].length&&(e.shift(),i=0);return e.length&&i<e[0].length&&(e[0]=e[0].slice(i)),n}function L2(e,t){xc||(xc=new TextDecoder);const n=[];let i=0,o=-1,l=!1;return new TransformStream({transform(u,c){for(n.push(u);;){if(i===0){if(Zo(n)<1)break;const d=Xo(n,1);l=(d[0]&128)===128,o=d[0]&127,o<126?i=3:o===126?i=1:i=2}else if(i===1){if(Zo(n)<2)break;const d=Xo(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),i=3}else if(i===2){if(Zo(n)<8)break;const d=Xo(n,8),h=new DataView(d.buffer,d.byteOffset,d.length),p=h.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(yc);break}o=p*Math.pow(2,32)+h.getUint32(4),i=3}else{if(Zo(n)<o)break;const d=Xo(n,o);c.enqueue(wc(l?d:xc.decode(d),t)),i=0}if(o===0||o>e){c.enqueue(yc);break}}}})}const u0=4;function Qe(e){if(e)return j2(e)}function j2(e){for(var t in Qe.prototype)e[t]=Qe.prototype[t];return e}Qe.prototype.on=Qe.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Qe.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Qe.prototype.off=Qe.prototype.removeListener=Qe.prototype.removeAllListeners=Qe.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var i,o=0;o<n.length;o++)if(i=n[o],i===t||i.fn===t){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+e],this},Qe.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(n){n=n.slice(0);for(var i=0,o=n.length;i<o;++i)n[i].apply(this,t)}return this},Qe.prototype.emitReserved=Qe.prototype.emit,Qe.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Qe.prototype.hasListeners=function(e){return!!this.listeners(e).length};const $o=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Ln=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),R2="arraybuffer";function g3(){}function c0(e,...t){return t.reduce((n,i)=>(e.hasOwnProperty(i)&&(n[i]=e[i]),n),{})}const U2=Ln.setTimeout,V2=Ln.clearTimeout;function ta(e,t){t.useNativeTimers?(e.setTimeoutFn=U2.bind(Ln),e.clearTimeoutFn=V2.bind(Ln)):(e.setTimeoutFn=Ln.setTimeout.bind(Ln),e.clearTimeoutFn=Ln.clearTimeout.bind(Ln))}const P2=1.33;function Q2(e){return typeof e=="string"?F2(e):Math.ceil((e.byteLength||e.size)*P2)}function F2(e){let t=0,n=0;for(let i=0,o=e.length;i<o;i++)t=e.charCodeAt(i),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(i++,n+=4);return n}function f0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function B2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Y2(e){let t={},n=e.split("&");for(let i=0,o=n.length;i<o;i++){let l=n[i].split("=");t[decodeURIComponent(l[0])]=decodeURIComponent(l[1])}return t}class W2 extends Error{constructor(t,n,i){super(t),this.description=n,this.context=i,this.type="TransportError"}}class Tc extends Qe{constructor(t){super(),this.writable=!1,ta(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,i){return super.emitReserved("error",new W2(t,n,i)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=wc(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=B2(t);return n.length?"?"+n:""}}class q2 extends Tc{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let i=0;this._polling&&(i++,this.once("pollComplete",function(){--i||n()})),this.writable||(i++,this.once("drain",function(){--i||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=i=>{if(this.readyState==="opening"&&i.type==="open"&&this.onOpen(),i.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(i)};k2(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,z2(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=f0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let d0=!1;try{d0=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const _2=d0;function K2(){}class H2 extends q2{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let i=location.port;i||(i=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||i!==t.port}}doWrite(t,n){const i=this.request({method:"POST",data:t});i.on("success",n),i.on("error",(o,l)=>{this.onError("xhr post error",o,l)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,i)=>{this.onError("xhr poll error",n,i)}),this.pollXhr=t}}class or extends Qe{constructor(t,n,i){super(),this.createRequest=t,ta(this,i),this._opts=i,this._method=i.method||"GET",this._uri=n,this._data=i.data!==void 0?i.data:null,this._create()}_create(){var t;const n=c0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const i=this._xhr=this.createRequest(n);try{i.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){i.setDisableHeaderCheck&&i.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&i.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{i.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{i.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(i),"withCredentials"in i&&(i.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(i.timeout=this._opts.requestTimeout),i.onreadystatechange=()=>{var o;i.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(i.getResponseHeader("set-cookie"))),i.readyState===4&&(i.status===200||i.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof i.status=="number"?i.status:0)},0))},i.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=or.requestsCount++,or.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=K2,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete or.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(or.requestsCount=0,or.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",h0);else if(typeof addEventListener=="function"){const e="onpagehide"in Ln?"pagehide":"unload";addEventListener(e,h0,!1)}}function h0(){for(let e in or.requests)or.requests.hasOwnProperty(e)&&or.requests[e].abort()}const J2=(function(){const e=p0({xdomain:!1});return e&&e.responseType!==null})();class G2 extends H2{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=J2&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new or(p0,this.uri(),t)}}function p0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||_2))return new XMLHttpRequest}catch{}if(!t)try{return new Ln[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const g0=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Z2 extends Tc{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,i=g0?{}:c0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,i)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const i=t[n],o=n===t.length-1;vc(i,this.supportsBinary,l=>{try{this.doWrite(i,l)}catch{}o&&$o(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=f0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Ec=Ln.WebSocket||Ln.MozWebSocket;class X2 extends Z2{createSocket(t,n,i){return g0?new Ec(t,n,i):n?new Ec(t,n):new Ec(t)}doWrite(t,n){this.ws.send(n)}}class $2 extends Tc{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=L2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),i=t.readable.pipeThrough(n).getReader(),o=O2();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const l=()=>{i.read().then(({done:c,value:d})=>{c||(this.onPacket(d),l())}).catch(c=>{})};l();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const i=t[n],o=n===t.length-1;this._writer.write(i).then(()=>{o&&$o(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const tI={websocket:X2,webtransport:$2,polling:G2},eI=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,nI=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Ac(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),i=e.indexOf("]");n!=-1&&i!=-1&&(e=e.substring(0,n)+e.substring(n,i).replace(/:/g,";")+e.substring(i,e.length));let o=eI.exec(e||""),l={},u=14;for(;u--;)l[nI[u]]=o[u]||"";return n!=-1&&i!=-1&&(l.source=t,l.host=l.host.substring(1,l.host.length-1).replace(/;/g,":"),l.authority=l.authority.replace("[","").replace("]","").replace(/;/g,":"),l.ipv6uri=!0),l.pathNames=rI(l,l.path),l.queryKey=iI(l,l.query),l}function rI(e,t){const n=/\/{2,9}/g,i=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&i.splice(0,1),t.slice(-1)=="/"&&i.splice(i.length-1,1),i}function iI(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(i,o,l){o&&(n[o]=l)}),n}const bc=typeof addEventListener=="function"&&typeof removeEventListener=="function",ea=[];bc&&addEventListener("offline",()=>{ea.forEach(e=>e())},!1);class Or extends Qe{constructor(t,n){if(super(),this.binaryType=R2,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const i=Ac(t);n.hostname=i.host,n.secure=i.protocol==="https"||i.protocol==="wss",n.port=i.port,i.query&&(n.query=i.query)}else n.host&&(n.hostname=Ac(n.host).host);ta(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(i=>{const o=i.prototype.name;this.transports.push(o),this._transportsByName[o]=i}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Y2(this.opts.query)),bc&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},ea.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=u0,n.transport=t,this.id&&(n.sid=this.id);const i=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](i)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Or.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Or.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let i=0;i<this.writeBuffer.length;i++){const o=this.writeBuffer[i].data;if(o&&(n+=Q2(o)),i>0&&n>this._maxPayload)return this.writeBuffer.slice(0,i);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,$o(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,i){return this._sendPacket("message",t,n,i),this}send(t,n,i){return this._sendPacket("message",t,n,i),this}_sendPacket(t,n,i,o){if(typeof n=="function"&&(o=n,n=void 0),typeof i=="function"&&(o=i,i=null),this.readyState==="closing"||this.readyState==="closed")return;i=i||{},i.compress=i.compress!==!1;const l={type:t,data:n,options:i};this.emitReserved("packetCreate",l),this.writeBuffer.push(l),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},i=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?i():t()}):this.upgrading?i():t()),this}_onError(t){if(Or.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),bc&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const i=ea.indexOf(this._offlineEventListener);i!==-1&&ea.splice(i,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Or.protocol=u0;class sI extends Or{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),i=!1;Or.priorWebsocketSuccess=!1;const o=()=>{i||(n.send([{type:"ping",data:"probe"}]),n.once("packet",m=>{if(!i)if(m.type==="pong"&&m.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Or.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{i||this.readyState!=="closed"&&(p(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const w=new Error("probe error");w.transport=n.name,this.emitReserved("upgradeError",w)}}))};function l(){i||(i=!0,p(),n.close(),n=null)}const u=m=>{const w=new Error("probe error: "+m);w.transport=n.name,l(),this.emitReserved("upgradeError",w)};function c(){u("transport closed")}function d(){u("socket closed")}function h(m){n&&m.name!==n.name&&l()}const p=()=>{n.removeListener("open",o),n.removeListener("error",u),n.removeListener("close",c),this.off("close",d),this.off("upgrading",h)};n.once("open",o),n.once("error",u),n.once("close",c),this.once("close",d),this.once("upgrading",h),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{i||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let i=0;i<t.length;i++)~this.transports.indexOf(t[i])&&n.push(t[i]);return n}}let oI=class extends sI{constructor(t,n={}){const i=typeof t=="object"?t:n;(!i.transports||i.transports&&typeof i.transports[0]=="string")&&(i.transports=(i.transports||["polling","websocket","webtransport"]).map(o=>tI[o]).filter(o=>!!o)),super(t,i)}};function aI(e,t="",n){let i=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),i=Ac(e)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";const l=i.host.indexOf(":")!==-1?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+l+":"+i.port+t,i.href=i.protocol+"://"+l+(n&&n.port===i.port?"":":"+i.port),i}const lI=typeof ArrayBuffer=="function",uI=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,m0=Object.prototype.toString,cI=typeof Blob=="function"||typeof Blob<"u"&&m0.call(Blob)==="[object BlobConstructor]",fI=typeof File=="function"||typeof File<"u"&&m0.call(File)==="[object FileConstructor]";function Sc(e){return lI&&(e instanceof ArrayBuffer||uI(e))||cI&&e instanceof Blob||fI&&e instanceof File}function na(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,i=e.length;n<i;n++)if(na(e[n]))return!0;return!1}if(Sc(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return na(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&na(e[n]))return!0;return!1}function dI(e){const t=[],n=e.data,i=e;return i.data=Nc(n,t),i.attachments=t.length,{packet:i,buffers:t}}function Nc(e,t){if(!e)return e;if(Sc(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let i=0;i<e.length;i++)n[i]=Nc(e[i],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=Nc(e[i],t));return n}return e}function hI(e,t){return e.data=Dc(e.data,t),delete e.attachments,e}function Dc(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Dc(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Dc(e[n],t));return e}const pI=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],gI=5;var Gt;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(Gt||(Gt={}));class mI{constructor(t){this.replacer=t}encode(t){return(t.type===Gt.EVENT||t.type===Gt.ACK)&&na(t)?this.encodeAsBinary({type:t.type===Gt.EVENT?Gt.BINARY_EVENT:Gt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Gt.BINARY_EVENT||t.type===Gt.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=dI(t),i=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(i),o}}function y0(e){return Object.prototype.toString.call(e)==="[object Object]"}class Ic extends Qe{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const i=n.type===Gt.BINARY_EVENT;i||n.type===Gt.BINARY_ACK?(n.type=i?Gt.EVENT:Gt.ACK,this.reconstructor=new yI(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Sc(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const i={type:Number(t.charAt(0))};if(Gt[i.type]===void 0)throw new Error("unknown packet type "+i.type);if(i.type===Gt.BINARY_EVENT||i.type===Gt.BINARY_ACK){const l=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(l,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");i.attachments=Number(u)}if(t.charAt(n+1)==="/"){const l=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););i.nsp=t.substring(l,n)}else i.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const l=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}i.id=Number(t.substring(l,n+1))}if(t.charAt(++n)){const l=this.tryParse(t.substr(n));if(Ic.isPayloadValid(i.type,l))i.data=l;else throw new Error("invalid payload")}return i}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case Gt.CONNECT:return y0(n);case Gt.DISCONNECT:return n===void 0;case Gt.CONNECT_ERROR:return typeof n=="string"||y0(n);case Gt.EVENT:case Gt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&pI.indexOf(n[0])===-1);case Gt.ACK:case Gt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class yI{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=hI(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const vI=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Ic,Encoder:mI,get PacketType(){return Gt},protocol:gI},Symbol.toStringTag,{value:"Module"}));function Jn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const MI=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class v0 extends Qe{constructor(t,n,i){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,i&&i.auth&&(this.auth=i.auth),this._opts=Object.assign({},i),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Jn(t,"open",this.onopen.bind(this)),Jn(t,"packet",this.onpacket.bind(this)),Jn(t,"error",this.onerror.bind(this)),Jn(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var i,o,l;if(MI.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const u={type:Gt.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,m=n.pop();this._registerAckCallback(p,m),u.id=p}const c=(o=(i=this.io.engine)===null||i===void 0?void 0:i.transport)===null||o===void 0?void 0:o.writable,d=this.connected&&!(!((l=this.io.engine)===null||l===void 0)&&l._hasPingExpired());return this.flags.volatile&&!c||(d?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var i;const o=(i=this.flags.timeout)!==null&&i!==void 0?i:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const l=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},o),u=(...c)=>{this.io.clearTimeoutFn(l),n.apply(this,c)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((i,o)=>{const l=(u,c)=>u?o(u):i(c);l.withError=!0,n.push(l),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const i={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...l)=>i!==this._queue[0]?void 0:(o!==null?i.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...l)),i.pending=!1,this._drainQueue())),this._queue.push(i),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Gt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(i=>String(i.id)===t)){const i=this.acks[t];delete this.acks[t],i.withError&&i.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Gt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Gt.EVENT:case Gt.BINARY_EVENT:this.onevent(t);break;case Gt.ACK:case Gt.BINARY_ACK:this.onack(t);break;case Gt.DISCONNECT:this.ondisconnect();break;case Gt.CONNECT_ERROR:this.destroy();const i=new Error(t.data.message);i.data=t.data.data,this.emitReserved("connect_error",i);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const i of n)i.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let i=!1;return function(...o){i||(i=!0,n.packet({type:Gt.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Gt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let i=0;i<n.length;i++)if(t===n[i])return n.splice(i,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let i=0;i<n.length;i++)if(t===n[i])return n.splice(i,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const i of n)i.apply(this,t.data)}}}function Ri(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Ri.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0},Ri.prototype.reset=function(){this.attempts=0},Ri.prototype.setMin=function(e){this.ms=e},Ri.prototype.setMax=function(e){this.max=e},Ri.prototype.setJitter=function(e){this.jitter=e};class Cc extends Qe{constructor(t,n){var i;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,ta(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((i=n.randomizationFactor)!==null&&i!==void 0?i:.5),this.backoff=new Ri({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||vI;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new oI(this.uri,this.opts);const n=this.engine,i=this;this._readyState="opening",this.skipReconnect=!1;const o=Jn(n,"open",function(){i.onopen(),t&&t()}),l=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=Jn(n,"error",l);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{o(),l(new Error("timeout")),n.close()},c);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(o),this.subs.push(u),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Jn(t,"ping",this.onping.bind(this)),Jn(t,"data",this.ondata.bind(this)),Jn(t,"error",this.onerror.bind(this)),Jn(t,"close",this.onclose.bind(this)),Jn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){$o(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let i=this.nsps[t];return i?this._autoConnect&&!i.active&&i.connect():(i=new v0(this,t,n),this.nsps[t]=i),i}_destroy(t){const n=Object.keys(this.nsps);for(const i of n)if(this.nsps[i].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let i=0;i<n.length;i++)this.engine.write(n[i],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var i;this.cleanup(),(i=this.engine)===null||i===void 0||i.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const i=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},n);this.opts.autoUnref&&i.unref(),this.subs.push(()=>{this.clearTimeoutFn(i)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Os={};function ra(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=aI(e,t.path||"/socket.io"),i=n.source,o=n.id,l=n.path,u=Os[o]&&l in Os[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new Cc(i,t):(Os[o]||(Os[o]=new Cc(i,t)),d=Os[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(ra,{Manager:Cc,Socket:v0,io:ra,connect:ra});var wI=e=>{switch(e){case"success":return EI;case"info":return bI;case"warning":return AI;case"error":return SI;default:return null}},xI=Array(12).fill(0),TI=({visible:e,className:t})=>x.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},x.createElement("div",{className:"sonner-spinner"},xI.map((n,i)=>x.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),EI=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),AI=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),bI=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),SI=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),NI=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},x.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),x.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),DI=()=>{let[e,t]=x.useState(document.hidden);return x.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},zc=1,II=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...i}=e,o=typeof e?.id=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:zc++,l=this.toasts.find(c=>c.id===o),u=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),l?this.toasts=this.toasts.map(c=>c.id===o?(this.publish({...c,...e,id:o,title:n}),{...c,...e,id:o,dismissible:u,title:n}):c):this.addToast({title:n,...i,dismissible:u,id:o}),o},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let i=e instanceof Promise?e:e(),o=n!==void 0,l,u=i.then(async d=>{if(l=["resolve",d],x.isValidElement(d))o=!1,this.create({id:n,type:"default",message:d});else if(zI(d)&&!d.ok){o=!1;let h=typeof t.error=="function"?await t.error(`HTTP error! status: ${d.status}`):t.error,p=typeof t.description=="function"?await t.description(`HTTP error! status: ${d.status}`):t.description;this.create({id:n,type:"error",message:h,description:p})}else if(t.success!==void 0){o=!1;let h=typeof t.success=="function"?await t.success(d):t.success,p=typeof t.description=="function"?await t.description(d):t.description;this.create({id:n,type:"success",message:h,description:p})}}).catch(async d=>{if(l=["reject",d],t.error!==void 0){o=!1;let h=typeof t.error=="function"?await t.error(d):t.error,p=typeof t.description=="function"?await t.description(d):t.description;this.create({id:n,type:"error",message:h,description:p})}}).finally(()=>{var d;o&&(this.dismiss(n),n=void 0),(d=t.finally)==null||d.call(t)}),c=()=>new Promise((d,h)=>u.then(()=>l[0]==="reject"?h(l[1]):d(l[1])).catch(h));return typeof n!="string"&&typeof n!="number"?{unwrap:c}:Object.assign(n,{unwrap:c})},this.custom=(e,t)=>{let n=t?.id||zc++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},hn=new II,CI=(e,t)=>{let n=t?.id||zc++;return hn.addToast({title:e,...t,id:n}),n},zI=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",kI=CI,OI=()=>hn.toasts,LI=()=>hn.getActiveToasts(),Ls=Object.assign(kI,{success:hn.success,info:hn.info,warning:hn.warning,error:hn.error,custom:hn.custom,message:hn.message,promise:hn.promise,dismiss:hn.dismiss,loading:hn.loading},{getHistory:OI,getToasts:LI});function jI(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",t==="top"&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}jI(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
55
55
  `);function ia(e){return e.label!==void 0}var RI=3,UI="32px",VI="16px",M0=4e3,PI=356,QI=14,FI=20,BI=200;function Gn(...e){return e.filter(Boolean).join(" ")}function YI(e){let[t,n]=e.split("-"),i=[];return t&&i.push(t),n&&i.push(n),i}var WI=e=>{var t,n,i,o,l,u,c,d,h,p,m;let{invert:w,toast:v,unstyled:S,interacting:A,setHeights:P,visibleToasts:j,heights:L,index:z,toasts:Z,expanded:Q,removeToast:J,defaultRichColors:G,closeButton:K,style:vt,cancelButtonStyle:ft,actionButtonStyle:ut,className:Qt="",descriptionClassName:Tt="",duration:Mt,position:ee,gap:Xt,loadingIcon:xt,expandByDefault:Lt,classNames:ht,icons:at,closeButtonAriaLabel:pt="Close toast",pauseWhenPageIsHidden:I}=e,[R,N]=x.useState(null),[V,B]=x.useState(null),[$,X]=x.useState(!1),[wt,kt]=x.useState(!1),[qt,Ut]=x.useState(!1),[yt,Et]=x.useState(!1),[Ft,At]=x.useState(!1),[$t,Fe]=x.useState(0),[ve,ne]=x.useState(0),ie=x.useRef(v.duration||Mt||M0),nn=x.useRef(null),Le=x.useRef(null),Rn=z===0,Me=z+1<=j,ue=v.type,je=v.dismissible!==!1,ln=v.className||"",wn=v.descriptionClassName||"",xn=x.useMemo(()=>L.findIndex(st=>st.toastId===v.id)||0,[L,v.id]),ar=x.useMemo(()=>{var st;return(st=v.closeButton)!=null?st:K},[v.closeButton,K]),Zn=x.useMemo(()=>v.duration||Mt||M0,[v.duration,Mt]),Xn=x.useRef(0),pn=x.useRef(0),O=x.useRef(0),D=x.useRef(null),[_,et]=ee.split("-"),tt=x.useMemo(()=>L.reduce((st,It,Ct)=>Ct>=xn?st:st+It.height,0),[L,xn]),it=DI(),gt=v.invert||w,mt=ue==="loading";pn.current=x.useMemo(()=>xn*Xt+tt,[xn,tt]),x.useEffect(()=>{ie.current=Zn},[Zn]),x.useEffect(()=>{X(!0)},[]),x.useEffect(()=>{let st=Le.current;if(st){let It=st.getBoundingClientRect().height;return ne(It),P(Ct=>[{toastId:v.id,height:It,position:v.position},...Ct]),()=>P(Ct=>Ct.filter(ce=>ce.toastId!==v.id))}},[P,v.id]),x.useLayoutEffect(()=>{if(!$)return;let st=Le.current,It=st.style.height;st.style.height="auto";let Ct=st.getBoundingClientRect().height;st.style.height=It,ne(Ct),P(ce=>ce.find(pe=>pe.toastId===v.id)?ce.map(pe=>pe.toastId===v.id?{...pe,height:Ct}:pe):[{toastId:v.id,height:Ct,position:v.position},...ce])},[$,v.title,v.description,P,v.id]);let ct=x.useCallback(()=>{kt(!0),Fe(pn.current),P(st=>st.filter(It=>It.toastId!==v.id)),setTimeout(()=>{J(v)},BI)},[v,J,P,pn]);x.useEffect(()=>{if(v.promise&&ue==="loading"||v.duration===1/0||v.type==="loading")return;let st;return Q||A||I&&it?(()=>{if(O.current<Xn.current){let It=new Date().getTime()-Xn.current;ie.current=ie.current-It}O.current=new Date().getTime()})():ie.current!==1/0&&(Xn.current=new Date().getTime(),st=setTimeout(()=>{var It;(It=v.onAutoClose)==null||It.call(v,v),ct()},ie.current)),()=>clearTimeout(st)},[Q,A,v,ue,I,it,ct]),x.useEffect(()=>{v.delete&&ct()},[ct,v.delete]);function jt(){var st,It,Ct;return at!=null&&at.loading?x.createElement("div",{className:Gn(ht?.loader,(st=v?.classNames)==null?void 0:st.loader,"sonner-loader"),"data-visible":ue==="loading"},at.loading):xt?x.createElement("div",{className:Gn(ht?.loader,(It=v?.classNames)==null?void 0:It.loader,"sonner-loader"),"data-visible":ue==="loading"},xt):x.createElement(TI,{className:Gn(ht?.loader,(Ct=v?.classNames)==null?void 0:Ct.loader),visible:ue==="loading"})}return x.createElement("li",{tabIndex:0,ref:Le,className:Gn(Qt,ln,ht?.toast,(t=v?.classNames)==null?void 0:t.toast,ht?.default,ht?.[ue],(n=v?.classNames)==null?void 0:n[ue]),"data-sonner-toast":"","data-rich-colors":(i=v.richColors)!=null?i:G,"data-styled":!(v.jsx||v.unstyled||S),"data-mounted":$,"data-promise":!!v.promise,"data-swiped":Ft,"data-removed":wt,"data-visible":Me,"data-y-position":_,"data-x-position":et,"data-index":z,"data-front":Rn,"data-swiping":qt,"data-dismissible":je,"data-type":ue,"data-invert":gt,"data-swipe-out":yt,"data-swipe-direction":V,"data-expanded":!!(Q||Lt&&$),style:{"--index":z,"--toasts-before":z,"--z-index":Z.length-z,"--offset":`${wt?$t:pn.current}px`,"--initial-height":Lt?"auto":`${ve}px`,...vt,...v.style},onDragEnd:()=>{Ut(!1),N(null),D.current=null},onPointerDown:st=>{mt||!je||(nn.current=new Date,Fe(pn.current),st.target.setPointerCapture(st.pointerId),st.target.tagName!=="BUTTON"&&(Ut(!0),D.current={x:st.clientX,y:st.clientY}))},onPointerUp:()=>{var st,It,Ct,ce;if(yt||!je)return;D.current=null;let pe=Number(((st=Le.current)==null?void 0:st.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Be=Number(((It=Le.current)==null?void 0:It.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),qe=new Date().getTime()-((Ct=nn.current)==null?void 0:Ct.getTime()),Ce=R==="x"?pe:Be,Re=Math.abs(Ce)/qe;if(Math.abs(Ce)>=FI||Re>.11){Fe(pn.current),(ce=v.onDismiss)==null||ce.call(v,v),B(R==="x"?pe>0?"right":"left":Be>0?"down":"up"),ct(),Et(!0),At(!1);return}Ut(!1),N(null)},onPointerMove:st=>{var It,Ct,ce,pe;if(!D.current||!je||((It=window.getSelection())==null?void 0:It.toString().length)>0)return;let Be=st.clientY-D.current.y,qe=st.clientX-D.current.x,Ce=(Ct=e.swipeDirections)!=null?Ct:YI(ee);!R&&(Math.abs(qe)>1||Math.abs(Be)>1)&&N(Math.abs(qe)>Math.abs(Be)?"x":"y");let Re={x:0,y:0};R==="y"?(Ce.includes("top")||Ce.includes("bottom"))&&(Ce.includes("top")&&Be<0||Ce.includes("bottom")&&Be>0)&&(Re.y=Be):R==="x"&&(Ce.includes("left")||Ce.includes("right"))&&(Ce.includes("left")&&qe<0||Ce.includes("right")&&qe>0)&&(Re.x=qe),(Math.abs(Re.x)>0||Math.abs(Re.y)>0)&&At(!0),(ce=Le.current)==null||ce.style.setProperty("--swipe-amount-x",`${Re.x}px`),(pe=Le.current)==null||pe.style.setProperty("--swipe-amount-y",`${Re.y}px`)}},ar&&!v.jsx?x.createElement("button",{"aria-label":pt,"data-disabled":mt,"data-close-button":!0,onClick:mt||!je?()=>{}:()=>{var st;ct(),(st=v.onDismiss)==null||st.call(v,v)},className:Gn(ht?.closeButton,(o=v?.classNames)==null?void 0:o.closeButton)},(l=at?.close)!=null?l:NI):null,v.jsx||x.isValidElement(v.title)?v.jsx?v.jsx:typeof v.title=="function"?v.title():v.title:x.createElement(x.Fragment,null,ue||v.icon||v.promise?x.createElement("div",{"data-icon":"",className:Gn(ht?.icon,(u=v?.classNames)==null?void 0:u.icon)},v.promise||v.type==="loading"&&!v.icon?v.icon||jt():null,v.type!=="loading"?v.icon||at?.[ue]||wI(ue):null):null,x.createElement("div",{"data-content":"",className:Gn(ht?.content,(c=v?.classNames)==null?void 0:c.content)},x.createElement("div",{"data-title":"",className:Gn(ht?.title,(d=v?.classNames)==null?void 0:d.title)},typeof v.title=="function"?v.title():v.title),v.description?x.createElement("div",{"data-description":"",className:Gn(Tt,wn,ht?.description,(h=v?.classNames)==null?void 0:h.description)},typeof v.description=="function"?v.description():v.description):null),x.isValidElement(v.cancel)?v.cancel:v.cancel&&ia(v.cancel)?x.createElement("button",{"data-button":!0,"data-cancel":!0,style:v.cancelButtonStyle||ft,onClick:st=>{var It,Ct;ia(v.cancel)&&je&&((Ct=(It=v.cancel).onClick)==null||Ct.call(It,st),ct())},className:Gn(ht?.cancelButton,(p=v?.classNames)==null?void 0:p.cancelButton)},v.cancel.label):null,x.isValidElement(v.action)?v.action:v.action&&ia(v.action)?x.createElement("button",{"data-button":!0,"data-action":!0,style:v.actionButtonStyle||ut,onClick:st=>{var It,Ct;ia(v.action)&&((Ct=(It=v.action).onClick)==null||Ct.call(It,st),!st.defaultPrevented&&ct())},className:Gn(ht?.actionButton,(m=v?.classNames)==null?void 0:m.actionButton)},v.action.label):null))};function w0(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function qI(e,t){let n={};return[e,t].forEach((i,o)=>{let l=o===1,u=l?"--mobile-offset":"--offset",c=l?VI:UI;function d(h){["top","right","bottom","left"].forEach(p=>{n[`${u}-${p}`]=typeof h=="number"?`${h}px`:h})}typeof i=="number"||typeof i=="string"?d(i):typeof i=="object"?["top","right","bottom","left"].forEach(h=>{i[h]===void 0?n[`${u}-${h}`]=c:n[`${u}-${h}`]=typeof i[h]=="number"?`${i[h]}px`:i[h]}):d(c)}),n}x.forwardRef(function(e,t){let{invert:n,position:i="bottom-right",hotkey:o=["altKey","KeyT"],expand:l,closeButton:u,className:c,offset:d,mobileOffset:h,theme:p="light",richColors:m,duration:w,style:v,visibleToasts:S=RI,toastOptions:A,dir:P=w0(),gap:j=QI,loadingIcon:L,icons:z,containerAriaLabel:Z="Notifications",pauseWhenPageIsHidden:Q}=e,[J,G]=x.useState([]),K=x.useMemo(()=>Array.from(new Set([i].concat(J.filter(I=>I.position).map(I=>I.position)))),[J,i]),[vt,ft]=x.useState([]),[ut,Qt]=x.useState(!1),[Tt,Mt]=x.useState(!1),[ee,Xt]=x.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),xt=x.useRef(null),Lt=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),ht=x.useRef(null),at=x.useRef(!1),pt=x.useCallback(I=>{G(R=>{var N;return(N=R.find(V=>V.id===I.id))!=null&&N.delete||hn.dismiss(I.id),R.filter(({id:V})=>V!==I.id)})},[]);return x.useEffect(()=>hn.subscribe(I=>{if(I.dismiss){G(R=>R.map(N=>N.id===I.id?{...N,delete:!0}:N));return}setTimeout(()=>{tl.flushSync(()=>{G(R=>{let N=R.findIndex(V=>V.id===I.id);return N!==-1?[...R.slice(0,N),{...R[N],...I},...R.slice(N+1)]:[I,...R]})})})}),[]),x.useEffect(()=>{if(p!=="system"){Xt(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Xt("dark"):Xt("light")),typeof window>"u")return;let I=window.matchMedia("(prefers-color-scheme: dark)");try{I.addEventListener("change",({matches:R})=>{Xt(R?"dark":"light")})}catch{I.addListener(({matches:N})=>{try{Xt(N?"dark":"light")}catch(V){console.error(V)}})}},[p]),x.useEffect(()=>{J.length<=1&&Qt(!1)},[J]),x.useEffect(()=>{let I=R=>{var N,V;o.every(B=>R[B]||R.code===B)&&(Qt(!0),(N=xt.current)==null||N.focus()),R.code==="Escape"&&(document.activeElement===xt.current||(V=xt.current)!=null&&V.contains(document.activeElement))&&Qt(!1)};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[o]),x.useEffect(()=>{if(xt.current)return()=>{ht.current&&(ht.current.focus({preventScroll:!0}),ht.current=null,at.current=!1)}},[xt.current]),x.createElement("section",{ref:t,"aria-label":`${Z} ${Lt}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},K.map((I,R)=>{var N;let[V,B]=I.split("-");return J.length?x.createElement("ol",{key:I,dir:P==="auto"?w0():P,tabIndex:-1,ref:xt,className:c,"data-sonner-toaster":!0,"data-theme":ee,"data-y-position":V,"data-lifted":ut&&J.length>1&&!l,"data-x-position":B,style:{"--front-toast-height":`${((N=vt[0])==null?void 0:N.height)||0}px`,"--width":`${PI}px`,"--gap":`${j}px`,...v,...qI(d,h)},onBlur:$=>{at.current&&!$.currentTarget.contains($.relatedTarget)&&(at.current=!1,ht.current&&(ht.current.focus({preventScroll:!0}),ht.current=null))},onFocus:$=>{$.target instanceof HTMLElement&&$.target.dataset.dismissible==="false"||at.current||(at.current=!0,ht.current=$.relatedTarget)},onMouseEnter:()=>Qt(!0),onMouseMove:()=>Qt(!0),onMouseLeave:()=>{Tt||Qt(!1)},onDragEnd:()=>Qt(!1),onPointerDown:$=>{$.target instanceof HTMLElement&&$.target.dataset.dismissible==="false"||Mt(!0)},onPointerUp:()=>Mt(!1)},J.filter($=>!$.position&&R===0||$.position===I).map(($,X)=>{var wt,kt;return x.createElement(WI,{key:$.id,icons:z,index:X,toast:$,defaultRichColors:m,duration:(wt=A?.duration)!=null?wt:w,className:A?.className,descriptionClassName:A?.descriptionClassName,invert:n,visibleToasts:S,closeButton:(kt=A?.closeButton)!=null?kt:u,interacting:Tt,position:I,style:A?.style,unstyled:A?.unstyled,classNames:A?.classNames,cancelButtonStyle:A?.cancelButtonStyle,actionButtonStyle:A?.actionButtonStyle,removeToast:pt,toasts:J.filter(qt=>qt.position==$.position),heights:vt.filter(qt=>qt.position==$.position),setHeights:ft,expandByDefault:l,gap:j,loadingIcon:L,expanded:ut,pauseWhenPageIsHidden:Q,swipeDirections:e.swipeDirections})})):null}))});var _I=e=>{let t={},n=new Date;return n.setHours(0,0,0,0),[...e].sort((i,o)=>new Date(o.createdAt).getTime()-new Date(i.createdAt).getTime()).forEach(i=>{let o=new Date(i.createdAt);o.setHours(0,0,0,0);let l=Math.floor((n.getTime()-o.getTime())/864e5),u;l===0?u="Today":l===1?u="Yesterday":l<=7?u="Previous 7 days":l<=30?u="Previous 30 days":u=o.toLocaleString("default",{month:"long",year:"numeric"}),t[u]??(t[u]=[]),t[u].push(i)}),t},x0=[4186.01,4434.92,4698.63,4978.03,5274.04,5587.65,5919.91,6271.93,6644.88,7040,7458.62,7902.13],KI=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],Lr=[],kc=[];for(let e=1;e<=8;e++)for(let t=0;t<x0.length;t++){let n=x0[t];Lr.push(n/Math.pow(2,8-e)),kc.push(KI[t]+e)}var sa=[32,2e3],T0=Lr.filter((e,t)=>Lr[t]>sa[0]&&Lr[t]<sa[1]),HI=kc.filter((e,t)=>Lr[t]>sa[0]&&Lr[t]<sa[1]),Oc=class pM{static getFrequencies(t,n,i,o="frequency",l=-100,u=-30){i||(i=new Float32Array(t.frequencyBinCount),t.getFloatFrequencyData(i));let c=n/2,d=1/i.length*c,h,p,m;if(o==="music"||o==="voice"){let v=o==="voice"?T0:Lr,S=Array(v.length).fill(l);for(let A=0;A<i.length;A++){let P=A*d,j=i[A];for(let L=v.length-1;L>=0;L--)if(P>v[L]){S[L]=Math.max(S[L],j);break}}h=S,p=o==="voice"?T0:Lr,m=o==="voice"?HI:kc}else h=Array.from(i),p=h.map((v,S)=>d*S),m=p.map(v=>`${v.toFixed(2)} Hz`);let w=h.map(v=>Math.max(0,Math.min((v-l)/(u-l),1)));return{values:new Float32Array(w),frequencies:p,labels:m}}constructor(t,n=null){if(this.fftResults=[],n){let{length:i,sampleRate:o}=n,l=new OfflineAudioContext({length:i,sampleRate:o}),u=l.createBufferSource();u.buffer=n;let c=l.createAnalyser();c.fftSize=8192,c.smoothingTimeConstant=.1,u.connect(c);let d=1/60,h=i/o,p=m=>{let w=d*m;w<h&&l.suspend(w).then(()=>{let v=new Float32Array(c.frequencyBinCount);c.getFloatFrequencyData(v),this.fftResults.push(v),p(m+1)}),m===1?l.startRendering():l.resume()};u.start(0),p(1),this.audio=t,this.context=l,this.analyser=c,this.sampleRate=o,this.audioBuffer=n}else{let i=new AudioContext,o=i.createMediaElementSource(t),l=i.createAnalyser();l.fftSize=8192,l.smoothingTimeConstant=.1,o.connect(l),l.connect(i.destination),this.audio=t,this.context=i,this.analyser=l,this.sampleRate=this.context.sampleRate,this.audioBuffer=null}}getFrequencies(t="frequency",n=-100,i=-30){let o=null;if(this.audioBuffer&&this.fftResults.length){let l=this.audio.currentTime/this.audio.duration,u=Math.min(l*this.fftResults.length|0,this.fftResults.length-1);o=this.fftResults[u]}return pM.getFrequencies(this.analyser,this.sampleRate,o,t,n,i)}async resumeIfSuspended(){return this.context.state==="suspended"&&await this.context.resume(),!0}};globalThis.AudioAnalysis=Oc;var ii=class{static floatTo16BitPCM(e){let t=new ArrayBuffer(e.length*2),n=new DataView(t),i=0;for(let o=0;o<e.length;o++,i+=2){let l=Math.max(-1,Math.min(1,e[o]));n.setInt16(i,l<0?l*32768:l*32767,!0)}return t}static mergeBuffers(e,t){let n=new Uint8Array(e.byteLength+t.byteLength);return n.set(new Uint8Array(e),0),n.set(new Uint8Array(t),e.byteLength),n.buffer}_packData(e,t){return[new Uint8Array([t,t>>8]),new Uint8Array([t,t>>8,t>>16,t>>24])][e]}pack(e,t){if(t?.bitsPerSample)if(t?.channels){if(!t?.data)throw new Error('Missing "data"')}else throw new Error('Missing "channels"');else throw new Error('Missing "bitsPerSample"');let{bitsPerSample:n,channels:i,data:o}=t,l=["RIFF",this._packData(1,52),"WAVE","fmt ",this._packData(1,16),this._packData(0,1),this._packData(0,i.length),this._packData(1,e),this._packData(1,e*i.length*n/8),this._packData(0,i.length*n/8),this._packData(0,n),"data",this._packData(1,i[0].length*i.length*n/8),o],u=new Blob(l,{type:"audio/mpeg"}),c=URL.createObjectURL(u);return{blob:u,url:c,channelCount:i.length,sampleRate:e,duration:o.byteLength/(i.length*e*2)}}};globalThis.WavPacker=ii;var JI=`
56
56
  class AudioProcessor extends AudioWorkletProcessor {
57
57
 
@@ -350,5 +350,5 @@ class StreamProcessor extends AudioWorkletProcessor {
350
350
  }
351
351
 
352
352
  registerProcessor('stream_processor', StreamProcessor);
353
- `,tC=new Blob([$I],{type:"application/javascript"}),eC=URL.createObjectURL(tC),nC=eC,A0=class{constructor({sampleRate:e=24e3,onStop:t}={}){this.scriptSrc=nC,this.onStop=t,this.sampleRate=e,this.context=null,this.stream=null,this.analyser=null,this.trackSampleOffsets={},this.interruptedTrackIds={}}async connect(){this.context=new AudioContext({sampleRate:this.sampleRate}),this.context.state==="suspended"&&await this.context.resume();try{await this.context.audioWorklet.addModule(this.scriptSrc)}catch(t){throw console.error(t),new Error(`Could not add audioWorklet module: ${this.scriptSrc}`)}let e=this.context.createAnalyser();return e.fftSize=8192,e.smoothingTimeConstant=.1,this.analyser=e,!0}getFrequencies(e="frequency",t=-100,n=-30){if(!this.analyser)throw new Error("Not connected, please call .connect() first");return Oc.getFrequencies(this.analyser,this.sampleRate,null,e,t,n)}_start(){let e=new AudioWorkletNode(this.context,"stream_processor");return e.connect(this.context.destination),e.port.onmessage=t=>{let{event:n}=t.data;if(n==="stop")this.onStop?.(),e.disconnect(),this.stream=null;else if(n==="offset"){let{requestId:i,trackId:o,offset:l}=t.data,u=l/this.sampleRate;this.trackSampleOffsets[i]={trackId:o,offset:l,currentTime:u}}},this.analyser.disconnect(),e.connect(this.analyser),this.stream=e,!0}add16BitPCM(e,t="default"){if(typeof t!="string")throw new Error("trackId must be a string");if(this.interruptedTrackIds[t])return;this.stream||this._start();let n;if(e instanceof Int16Array)n=e;else if(e instanceof ArrayBuffer)n=new Int16Array(e);else throw new Error("argument must be Int16Array or ArrayBuffer");return this.stream.port.postMessage({event:"write",buffer:n,trackId:t}),n}async getTrackSampleOffset(e=!1){if(!this.stream)return null;let t=crypto.randomUUID();this.stream.port.postMessage({event:e?"interrupt":"offset",requestId:t});let n;for(;!n;)n=this.trackSampleOffsets[t],await new Promise(o=>setTimeout(()=>o(),1));let{trackId:i}=n;return e&&i&&(this.interruptedTrackIds[i]=!0),n}async interrupt(){return this.getTrackSampleOffset(!0)}};globalThis.WavStreamPlayer=A0;var b0=le({key:"ThreadIdToResume",default:void 0}),rC=le({key:"ResumeThreadErrorState",default:void 0}),S0=le({key:"ChatProfile",default:void 0}),N0=le({key:"SessionId",default:Xu()}),Lc=Om({key:"SessionIdSelector",get:({get:e})=>e(N0),set:({set:e},t)=>e(N0,t instanceof BD?Xu():t)}),jc=le({key:"Session",dangerouslyAllowMutability:!0,default:void 0}),Rc=le({key:"Actions",default:[]}),Uc=le({key:"Messages",dangerouslyAllowMutability:!0,default:[]}),iC=le({key:"Commands",default:[]}),D0=le({key:"TokenCount",default:0}),Vc=le({key:"Loading",default:!1}),Pc=le({key:"AskUser",default:void 0}),sC=le({key:"WavRecorder",dangerouslyAllowMutability:!0,default:new E0}),oC=le({key:"WavStreamPlayer",dangerouslyAllowMutability:!0,default:new A0}),aC=le({key:"AudioConnection",default:"off"}),lC=le({key:"isAiSpeaking",default:!1}),I0=le({key:"CallFn",default:void 0}),oa=le({key:"ChatSettings",default:[]}),C0=Om({key:"ChatSettingsValue/Default",get:({get:e})=>e(oa).reduce((t,n)=>(t[n.id]=n.initial,t),{})}),aa=le({key:"ChatSettingsValue",default:C0}),Qc=le({key:"DisplayElements",default:[]}),Fc=le({key:"TasklistElements",default:[]}),Bc=le({key:"FirstUserInteraction",default:void 0}),uC=le({key:"User",default:void 0}),cC=le({key:"ChainlitConfig",default:void 0}),fC=le({key:"AuthConfig",default:void 0}),dC=le({key:"ThreadHistory",default:{threads:void 0,currentThreadId:void 0,timeGroupedThreads:void 0,pageInfo:void 0},effects:[({setSelf:e,onSet:t})=>{t((n,i)=>{let o=n?.timeGroupedThreads;n?.threads&&!ji.isEqual(n.threads,i?.timeGroupedThreads)&&(o=_I(n.threads)),e({...n,timeGroupedThreads:o})})}]}),z0=le({key:"SideView",default:void 0}),Yc=le({key:"CurrentThreadId",default:void 0}),hC=e=>({setSelf:t,onSet:n})=>{let i=localStorage.getItem(e);if(i!=null)try{t(JSON.parse(i))}catch(o){console.error(`Error parsing localStorage value for key "${e}":`,o)}n((o,l,u)=>{u?localStorage.removeItem(e):localStorage.setItem(e,JSON.stringify(o))})},pC=le({key:"Mcp",default:[],effects:[hC("mcp_storage_key")]}),gC=()=>{let e=Ie(Vc),t=Ie(Qc),n=Ie(Fc),i=Ie(Rc),o=Ie(jc),l=Ie(Pc),u=Ie(I0),c=Ie(oa),d=Ie(aa),h=Ie(C0),p=o?.socket.connected&&!o?.error,m=!p||e||l?.spec.type==="file"||l?.spec.type==="action"||l?.spec.type==="element";return{actions:i,askUser:l,callFn:u,chatSettingsDefaultValue:h,chatSettingsInputs:c,chatSettingsValue:d,connected:p,disabled:m,elements:t,error:o?.error,loading:e,tasklists:n}},Ui=(e,t)=>la(e,t.id)?Wc(e,t.id,t):"parentId"in t&&t.parentId?O0(e,t.parentId,t):"indent"in t&&t.indent&&t.indent>0?k0(e,t.indent,t):[...e,t],k0=(e,t,n,i=0)=>{let o=[...e];if(o.length===0)return[...o,n];{let l=o.length-1,u=o[l];return u.steps=u.steps||[],i+1===t?(u.steps=[...u.steps,n],o[l]={...u},o):(u.steps=k0(u.steps,t,n,i+1),o[l]={...u},o)}},O0=(e,t,n)=>{let i=[...e];for(let o=0;o<i.length;o++){let l=i[o];ji.isEqual(l.id,t)?(l.steps=l.steps?[...l.steps,n]:[n],i[o]={...l}):la(i,t)&&l.steps&&(l.steps=O0(l.steps,t,n),i[o]={...l})}return i},L0=(e,t)=>{for(let n of e){if(ji.isEqual(n.id,t))return n;if(n.steps&&n.steps.length>0){let i=L0(n.steps,t);if(i)return i}}},la=(e,t)=>L0(e,t)!==void 0,Wc=(e,t,n)=>{let i=[...e];for(let o=0;o<i.length;o++){let l=i[o];ji.isEqual(l.id,t)?i[o]={steps:l.steps,...n}:la(i,t)&&l.steps&&(l.steps=Wc(l.steps,t,n),i[o]={...l})}return i},j0=(e,t)=>{let n=[...e];for(let i=0;i<n.length;i++){let o=n[i];o.id===t?n=[...n.slice(0,i),...n.slice(i+1)]:la(n,t)&&o.steps&&(o.steps=j0(o.steps,t),n[i]={...o})}return n},R0=(e,t,n,i,o)=>{let l=[...e];for(let u=0;u<l.length;u++){let c=l[u];ji.isEqual(c.id,t)?("content"in c&&c.content!==void 0?i?c.content=n:c.content+=n:o?"input"in c&&c.input!==void 0&&(i?c.input=n:c.input+=n):"output"in c&&c.output!==void 0&&(i?c.output=n:c.output+=n),l[u]={...c}):c.steps&&(c.steps=R0(c.steps,t,n,i,o),l[u]={...c})}return l},ua=()=>{let[e,t]=Li(fC),[n,i]=Li(uC),o=he(dC);return{authConfig:e,setAuthConfig:t,user:n,setUser:i,setThreadHistory:o}},mC=async(e,t)=>(await e.get(t))?.json(),yC=e=>{let t=new qc("","webapp");return Object.assign(t,e),t};function ca(e,{...t}={}){let n=x.useContext(js),{setUser:i}=ua(),o=x.useMemo(()=>([u])=>{t.onErrorRetry||(t.onErrorRetry=(...d)=>{let[h]=d;if(h.status===401){i(null);return}return b2.defaultValue.onErrorRetry(...d)});let c=yC(n);return c.on401=c.onError=void 0,mC(c,u)},[n]),l=x.useMemo(()=>e?[e]:null,[e]);return S2(l,o,t)}var vC=()=>{let{authConfig:e,setAuthConfig:t}=ua(),{data:n,isLoading:i}=ca(e?null:"/auth/config");return x.useEffect(()=>{n&&t(n)},[n,t]),{authConfig:e,isLoading:i}},MC=()=>{let e=x.useContext(js),{setUser:t,setThreadHistory:n}=ua();return{logout:async(i=!1)=>{await e.logout(),t(void 0),n(void 0),i&&window.location.reload()}}},wC=()=>{let{user:e,setUser:t}=ua(),{data:n,error:i,mutate:o}=ca("/user");return x.useEffect(()=>{n&&t(n)},[n,t]),x.useEffect(()=>{i&&t(null)},[i]),{user:e,setUserFromAPI:o}},U0=()=>{let{authConfig:e}=vC(),{logout:t}=MC(),{user:n,setUserFromAPI:i}=wC(),o=!!e&&(!e.requireLogin||n!==void 0);return e&&!e.requireLogin?{data:e,user:null,isReady:o,isAuthenticated:!0,logout:()=>Promise.resolve(),setUserFromAPI:()=>Promise.resolve()}:{data:e,user:n,isReady:o,isAuthenticated:!!n,logout:t,setUserFromAPI:i}},V0=class extends Error{constructor(e,t,n){super(e),this.status=t,this.detail=n}toString(){return this.detail?`${this.message}: ${this.detail}`:this.message}},xC=class{constructor(e,t,n,i,o){this.httpEndpoint=e,this.type=t,this.additionalQueryParams=n,this.on401=i,this.onError=o}buildEndpoint(e){let t=`${this.httpEndpoint}${e}`;this.httpEndpoint.endsWith("/")&&(t=`${this.httpEndpoint.slice(0,-1)}${e}`);let n=new URL(t);if(this.additionalQueryParams){let i=new URLSearchParams(this.additionalQueryParams),o=n.search?"&":"?";n.search=n.search+`${o}${i.toString()}`}return n.toString()}async getDetailFromErrorResponse(e){try{return(await e.json())?.detail}catch(t){console.error("Unable to parse error response",t)}}handleRequestError(e){e instanceof V0&&(e.status===401&&this.on401&&this.on401(),this.onError&&this.onError(e)),console.error(e)}async fetch(e,t,n,i,o={}){try{let l;n instanceof FormData?l=n:(o["Content-Type"]="application/json",l=n?JSON.stringify(n):null);let u=await fetch(this.buildEndpoint(t),{method:e,credentials:"include",headers:o,signal:i,body:l});if(!u.ok){let c=await this.getDetailFromErrorResponse(u);throw new V0(u.statusText,u.status,c)}return u}catch(l){throw this.handleRequestError(l),l}}async get(e){return await this.fetch("GET",e)}async post(e,t,n){return await this.fetch("POST",e,t,n)}async put(e,t){return await this.fetch("PUT",e,t)}async patch(e,t){return await this.fetch("PATCH",e,t)}async delete(e,t){return await this.fetch("DELETE",e,t)}},qc=class extends xC{async headerAuth(){return(await this.post("/auth/header",{})).json()}async jwtAuth(e){return(await this.fetch("POST","/auth/jwt",void 0,void 0,{Authorization:`Bearer ${e}`})).json()}async stickyCookie(e){return(await this.fetch("POST","/set-session-cookie",{session_id:e})).json()}async passwordAuth(e){return(await this.post("/login",e)).json()}async getUser(){return(await this.get("/user")).json()}async logout(){return(await this.post("/logout",{})).json()}async setFeedback(e,t){return(await this.put("/feedback",{feedback:e,sessionId:t})).json()}async deleteFeedback(e){return(await this.delete("/feedback",{feedbackId:e})).json()}async listThreads(e,t){return(await this.post("/project/threads",{pagination:e,filter:t})).json()}async renameThread(e,t){return(await this.put("/project/thread",{threadId:e,name:t})).json()}async deleteThread(e){return(await this.delete("/project/thread",{threadId:e})).json()}uploadFile(e,t,n,i){let o=new XMLHttpRequest;o.withCredentials=!0;let l=new Promise((u,c)=>{let d=new FormData;d.append("file",e);let h=i?`&ask_parent_id=${i}`:"";o.open("POST",this.buildEndpoint(`/project/file?session_id=${n}${h}`),!0),o.upload.onprogress=function(p){if(p.lengthComputable){let m=p.loaded/p.total*100;t(m)}},o.onload=function(){if(o.status===200){let m=JSON.parse(o.responseText);u(m);return}let p=o.getResponseHeader("Content-Type");if(p&&p.includes("application/json")){let m=JSON.parse(o.responseText);c(m.detail)}else c("Upload failed")},o.onerror=function(){c("Upload error")},o.send(d)});return{xhr:o,promise:l}}async callAction(e,t){return(await this.post("/project/action",{sessionId:t,action:e})).json()}async updateElement(e,t){return(await this.put("/project/element",{sessionId:t,element:e})).json()}async deleteElement(e,t){return(await this.delete("/project/element",{sessionId:t,element:e})).json()}async connectStdioMCP(e,t,n){return(await this.post("/mcp",{sessionId:e,name:t,fullCommand:n,clientType:"stdio"})).json()}async connectSseMCP(e,t,n,i){return(await this.post("/mcp",{sessionId:e,name:t,url:n,...i?{headers:i}:{},clientType:"sse"})).json()}async connectStreamableHttpMCP(e,t,n,i){return(await this.post("/mcp",{sessionId:e,name:t,url:n,...i?{headers:i}:{},clientType:"streamable-http"})).json()}async disconnectMcp(e,t){return(await this.delete("/mcp",{sessionId:e,name:t})).json()}getElementUrl(e,t){let n=`?session_id=${t}`;return this.buildEndpoint(`/project/file/${e}${n}`)}getLogoEndpoint(e,t){return t||this.buildEndpoint(`/logo?theme=${e}`)}getOAuthEndpoint(e){return this.buildEndpoint(`/auth/oauth/${e}`)}async shareThread(e,t){return(await this.put("/project/thread/share",{threadId:e,isShared:t})).json()}},js=x.createContext(new qc("http://localhost:8000","webapp")),P0=()=>{let e=x.useContext(js),t=Ie(jc),n=Ie(Pc),i=Ie(Lc),o=Yo(oa),l=Yo(Lc),u=Yo(aa),c=he(Bc),d=he(Vc),h=he(Uc),p=he(Qc),m=he(Fc),w=he(Rc),v=he(D0),S=he(b0),A=he(z0),P=he(Yc),j=x.useCallback(()=>{t?.socket.emit("clear_session"),t?.socket.disconnect(),S(void 0),l(),c(void 0),h([]),p([]),m([]),w([]),v(0),o(),u(),A(void 0),P(void 0)},[t]),L=x.useCallback((ut,Qt=[])=>{ut.id||(ut.id=Xu()),ut.createdAt||(ut.createdAt=new Date().toISOString()),h(Tt=>Ui(Tt,ut)),t?.socket.emit("client_message",{message:ut,fileReferences:Qt})},[t?.socket]),z=x.useCallback(ut=>{t?.socket.emit("edit_message",{message:ut})},[t?.socket]),Z=x.useCallback(ut=>{t?.socket.emit("window_message",ut)},[t?.socket]),Q=x.useCallback(()=>{t?.socket.emit("audio_start")},[t?.socket]),J=x.useCallback((ut,Qt,Tt,Mt)=>{t?.socket.emit("audio_chunk",{isStart:ut,mimeType:Qt,elapsedTime:Tt,data:Mt})},[t?.socket]),G=x.useCallback(()=>{t?.socket.emit("audio_end")},[t?.socket]),K=x.useCallback(ut=>{n&&(n.parentId&&(ut.parentId=n.parentId),h(Qt=>Ui(Qt,ut)),n.callback(ut))},[n]),vt=x.useCallback(ut=>{t?.socket.emit("chat_settings_change",ut)},[t?.socket]),ft=x.useCallback(()=>{h(ut=>ut.map(Qt=>(Qt.streaming=!1,Qt))),d(!1),t?.socket.emit("stop")},[t?.socket]);return{uploadFile:x.useCallback((ut,Qt,Tt)=>e.uploadFile(ut,Qt,i,Tt),[i]),clear:j,replyMessage:K,sendMessage:L,editMessage:z,windowMessage:Z,startAudioStream:Q,sendAudioChunk:J,endAudioStream:G,stopTask:ft,setIdToResume:S,updateChatSettings:vt}},TC=()=>{let e=Ie(Uc),t=Ie(Bc);return{threadId:Ie(Yc),messages:e,firstInteraction:t}},Q0=()=>{let e=x.useContext(js),t=Ie(Lc),[n,i]=Li(jc),o=he(lC),l=he(aC),u=Yo(aa),c=he(aa),d=he(Bc),h=he(Vc),p=he(pC),m=Ie(oC),w=Ie(sC),v=he(Uc),S=he(Pc),A=he(I0),P=he(iC),j=he(z0),L=he(Qc),z=he(Fc),Z=he(Rc),Q=he(oa),J=he(D0),[G,K]=Li(S0),vt=Ie(b0),ft=he(rC),[ut,Qt]=Li(Yc);x.useEffect(()=>{n?.socket&&(n.socket.auth.threadId=ut||"")},[ut]);let Tt=x.useCallback(async({transports:Xt,userEnv:xt})=>{let{protocol:Lt,host:ht,pathname:at}=new URL(e.httpEndpoint),pt=`${Lt}//${ht}`,I=at&&at!=="/"?`${at}/ws/socket.io`:"/ws/socket.io";try{await e.stickyCookie(t)}catch(N){console.error(`Failed to set sticky session cookie: ${N}`)}let R=ra(pt,{path:I,withCredentials:!0,transports:Xt,auth:{clientType:e.type,sessionId:t,threadId:vt||"",userEnv:JSON.stringify(xt),chatProfile:G?encodeURIComponent(G):""}});i(N=>(N?.socket?.removeAllListeners(),N?.socket?.close(),{socket:R})),R.on("connect",()=>{R.emit("connection_successful"),i(N=>({...N,error:!1})),p(N=>N.map(V=>{let B;return V.clientType==="sse"?B=e.connectSseMCP(t,V.name,V.url):V.clientType==="streamable-http"?B=e.connectStreamableHttpMCP(t,V.name,V.url):B=e.connectStdioMCP(t,V.name,V.command),B.then(async({success:$,mcp:X})=>{p(wt=>wt.map(kt=>kt.name===X.name?{...kt,status:$?"connected":"failed",tools:X?X.tools:kt.tools}:kt))}).catch(()=>{p($=>$.map(X=>X.name===V.name?{...X,status:"failed"}:X))}),{...V,status:"connecting"}}))}),R.on("connect_error",N=>{i(V=>({...V,error:!0}))}),R.on("task_start",()=>{h(!0)}),R.on("task_end",()=>{h(!1)}),R.on("reload",()=>{R.emit("clear_session"),window.location.reload()}),R.on("audio_connection",async N=>{if(N==="on"){let V=!0,B=Date.now(),$="pcm16";await w.begin(),await m.connect(),await w.record(async X=>{let wt=Date.now()-B;R.emit("audio_chunk",{isStart:V,mimeType:$,elapsedTime:wt,data:X.mono}),V=!1}),m.onStop=()=>o(!1)}else await w.end(),await m.interrupt();l(N)}),R.on("audio_chunk",N=>{m.add16BitPCM(N.data,N.track),o(!0)}),R.on("audio_interrupt",()=>{m.interrupt()}),R.on("resume_thread",N=>{let V=!!N?.metadata?.viewer_read_only;!V&&vt&&N.id!==vt&&(window.location.href=`/thread/${N.id}`),!V&&vt&&Qt(N.id);let B=[];for(let X of N.steps)B=Ui(B,X);N.metadata?.chat_profile&&K(N.metadata?.chat_profile),N.metadata?.chat_settings&&c(N.metadata?.chat_settings),v(B);let $=N.elements||[];z($.filter(X=>X.type==="tasklist")),L($.filter(X=>["avatar","tasklist"].indexOf(X.type)===-1))}),R.on("resume_thread_error",N=>{ft(N)}),R.on("new_message",N=>{v(V=>Ui(V,N))}),R.on("first_interaction",N=>{d(N.interaction),Qt(N.thread_id)}),R.on("update_message",N=>{v(V=>Wc(V,N.id,N))}),R.on("delete_message",N=>{v(V=>j0(V,N.id))}),R.on("stream_start",N=>{v(V=>Ui(V,N))}),R.on("stream_token",({id:N,token:V,isSequence:B,isInput:$})=>{v(X=>R0(X,N,V,B,$))}),R.on("ask",({msg:N,spec:V},B)=>{S({spec:V,callback:B,parentId:N.parentId}),v($=>Ui($,N)),h(!1)}),R.on("ask_timeout",()=>{S(void 0),h(!1)}),R.on("clear_ask",()=>{S(void 0)}),R.on("call_fn",({name:N,args:V},B)=>{A({name:N,args:V,callback:B})}),R.on("clear_call_fn",()=>{A(void 0)}),R.on("call_fn_timeout",()=>{A(void 0)}),R.on("chat_settings",N=>{Q(N),u()}),R.on("set_commands",N=>{P(N)}),R.on("set_sidebar_title",N=>{j(V=>V?.title===N?V:{title:N,elements:V?.elements||[]})}),R.on("set_sidebar_elements",({elements:N,key:V})=>{N.length?(N.forEach(B=>{!B.url&&B.chainlitKey&&(B.url=e.getElementUrl(B.chainlitKey,t))}),j(B=>B?.key===V?B:{title:B?.title||"",elements:N,key:V})):j(void 0)}),R.on("element",N=>{!N.url&&N.chainlitKey&&(N.url=e.getElementUrl(N.chainlitKey,t)),N.type==="tasklist"?z(V=>{let B=V.findIndex($=>$.id===N.id);return B===-1?[...V,N]:[...V.slice(0,B),N,...V.slice(B+1)]}):L(V=>{let B=V.findIndex($=>$.id===N.id);return B===-1?[...V,N]:[...V.slice(0,B),N,...V.slice(B+1)]})}),R.on("remove_element",N=>{L(V=>V.filter(B=>B.id!==N.id)),z(V=>V.filter(B=>B.id!==N.id))}),R.on("action",N=>{Z(V=>[...V,N])}),R.on("remove_action",N=>{Z(V=>{let B=V.findIndex($=>$.id===N.id);return B===-1?V:[...V.slice(0,B),...V.slice(B+1)]})}),R.on("token_usage",N=>{J(V=>V+N)}),R.on("window_message",N=>{window.parent&&window.parent.postMessage(N,"*")}),R.on("toast",N=>{if(!N.message){console.warn("No message received for toast.");return}switch(N.type){case"info":Ls.info(N.message);break;case"error":Ls.error(N.message);break;case"success":Ls.success(N.message);break;case"warning":Ls.warning(N.message);break;default:Ls(N.message);break}})},[i,t,vt,G]),Mt=x.useCallback(ji.debounce(Tt,200),[Tt]),ee=x.useCallback(()=>{n?.socket&&(n.socket.removeAllListeners(),n.socket.close())},[n]);return{connect:Mt,disconnect:ee,session:n,sessionId:t,chatProfile:G,idToResume:vt,setChatProfile:K}},F0=()=>{let[e,t]=Li(cC),{isAuthenticated:n}=U0(),i=Ie(S0),o=navigator.language||"en-US",l=x.useRef(i),u=n?`/project/settings?language=${o}${i?`&chat_profile=${encodeURIComponent(i)}`:""}`:null,c=n&&!e,{data:d,error:h,isLoading:p}=ca(c?u:null);return x.useEffect(()=>{d&&t(d)},[d,t]),x.useEffect(()=>{l.current!==i&&(t(void 0),l.current=i)},[i,t]),{config:e,error:h,isLoading:p,language:o}};const EC=["Dress Code Policy","Leave Policy","Team Lunch Policy","Referral Policy","Performance Review"],AC=({setBack:e,showChat:t,setShowChat:n,showHistory:i,setShowHistory:o})=>{const[l,u]=x.useState(""),{user:c}=U0(),{sendMessage:d}=P0(),{connected:h,loading:p}=gC(),{messages:m}=TC(),{connect:w,disconnect:v}=Q0(),S=x.useRef(null),A=x.useRef(!1);x.useEffect(()=>{if(!A.current)return A.current=!0,w({userEnv:{}}),()=>v()},[w,v]),x.useEffect(()=>{S.current?.scrollIntoView({behavior:"smooth"})},[m,p]);const P=x.useMemo(()=>{const z=[],Z=Q=>{(Q.type==="user_message"||Q.type==="assistant_message")&&typeof Q.output=="string"&&Q.output.trim().length>0&&z.push({id:Q.id,sender:Q.type==="user_message"?"user":"assistant",text:Q.output}),Q.steps&&Q.steps.length&&Q.steps.forEach(Z)};return m.forEach(Z),z},[m]),j=z=>{!z.trim()||!h||(d({type:"user_message",output:z.trim(),name:c?.identifier||"User"}),e(!0),n(!0))},L=(z,Z)=>{j(Z?l:z),u("")};return rt.jsxs("div",{className:`text-gray-700 flex z-10 flex-col items-start ${t?"p-0":"p-4"} w-full`,children:[!t&&!i&&rt.jsxs(rt.Fragment,{children:[rt.jsx("h1",{className:"font-extrabold mx-auto bg-gradient-to-l from-[#F56057] via-[#A03F39] to-[#283068] bg-clip-text text-transparent text-lg md:text-xl",children:"Hi, Ishani Ganguly"}),rt.jsx(lA,{}),rt.jsxs("div",{className:"bg-[#F5605724] rounded-lg w-full flex items-center justify-between px-3 mt-3 cursor-pointer",onClick:()=>{o(!0),e(!0)},children:[rt.jsxs("div",{className:"flex items-center gap-x-2",children:[rt.jsx("img",{src:uA,alt:"history",className:"py-2 h-10 2xl:h-12 w-10 2xl:w-12"}),rt.jsx("p",{className:"fs14 font-semibold text-black",children:"Chat History"})]}),rt.jsx("img",{src:cA,alt:"link",className:"py-1 h-6 2xl:h-8 w-6 2xl:w-8"})]}),rt.jsx("div",{className:"flex flex-wrap gap-x-4 gap-y-2 mt-4",children:EC.map(z=>rt.jsx("div",{onClick:()=>L(z),className:"py-2 px-4 bg-[#EFF1FF] rounded-full border cursor-pointer hover:text-white border-gray-300 hover:bg-[#283068]",children:rt.jsx("p",{className:"text-[#283068] hover:text-white fs10 font-medium",children:z})},z))})]}),t&&!i&&rt.jsx("div",{className:"w-full max-w-full sm:max-w-none h-[50vh] md:h-[60vh] lg:h-[65vh] bg-gradient-to-l from-[#FFE6E4] via-[#FFE6E4] to-[#FDACA7]/70 flex flex-col rounded-lg",children:rt.jsxs("div",{className:"flex-1 overflow-y-auto p-2 space-y-4 scrollbar-hide",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:[rt.jsx("style",{children:".scrollbar-hide::-webkit-scrollbar { display: none; }"}),P.map(z=>rt.jsx("div",{className:`flex items-start gap-2 ${z.sender==="assistant"?"justify-start":"justify-end"}`,children:z.sender==="assistant"?rt.jsxs(rt.Fragment,{children:[rt.jsx("img",{src:Mu,alt:"Tia",className:"2xl:w-10 2xl:h-10 rounded-full flex-strat w-8 h-8"}),rt.jsxs("div",{children:[rt.jsx("span",{className:"fs12 text-[#283068] font-bold",children:"Tia"}),rt.jsx("div",{className:"min-w-[70%] fs12 font-medium px-4 py-2 rounded-md shadow-md bg-[#FFFFFF] text-[#0D082C] mt-1 whitespace-pre-wrap",children:z.text})]})]}):rt.jsxs(rt.Fragment,{children:[rt.jsx("div",{className:"max-w-[70%] fs12 font-medium px-4 py-2 rounded-md shadow-md bg-gradient-to-r from-[#4F5FCE] to-[#2D3776] text-white whitespace-pre-wrap",children:z.text}),rt.jsx("img",{src:dA,alt:"User",className:"2xl:w-10 2xl:h-10 rounded-full flex-strat w-8 h-8"})]})},z.id)),p&&rt.jsxs("div",{className:"flex items-start gap-2 justify-start",children:[rt.jsx("img",{src:Mu,alt:"Tia",className:"2xl:h-10 h-8 f-start"}),rt.jsxs("div",{children:[rt.jsx("span",{className:"fs12 text-[#283068] font-bold",children:"Tia"}),rt.jsx("div",{className:"fs10 bg-gray-200 text-gray-700 px-4 py-2 rounded-2xl italic opacity-75 mt-1",children:"Tia is typing..."})]})]}),rt.jsx("div",{ref:S})]})}),!i&&rt.jsxs("div",{className:"p-1 px-2 rounded-full w-[100%] mx-auto my-2 flex items-center justify-between bg-[#F3F3F3] border border-gray-200 shadow",children:[rt.jsx("input",{type:"text",className:"px-2 fs12 outline-none fs14 placeholder:fs14 placeholder:text-gray-500 flex-1 bg-transparent h-8 2xl:h-12",placeholder:"Chat with Tia...",value:l,onChange:z=>{u(z.target.value),z.target.value.trim()&&(e(!0),n(!0))},onKeyDown:z=>{z.key==="Enter"&&L(l,!0)},disabled:!h||p,"aria-label":"Type a message to Tia"}),rt.jsx("img",{src:fA,alt:"send icon",className:"mt-1 object-contain w-6 h-6",onClick:()=>L(l,!0),style:{opacity:h&&!p?1:.5,cursor:h&&!p?"pointer":"not-allowed"},role:"button","aria-disabled":!h||p})]}),i&&rt.jsx(hA,{onBackToHome:()=>{o(!1),n(!1),e(!1)}})]})},bC="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M18%206.5L6%2018.5'%20stroke='white'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M6%206.5L18%2018.5'%20stroke='white'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",SC="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M15%203.5H21V9.5'%20stroke='white'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M9%2021.5H3V15.5'%20stroke='white'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M21%203.5L14%2010.5'%20stroke='white'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M3%2021.5L10%2014.5'%20stroke='white'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",NC="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M19%2012H5'%20stroke='white'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12%2019L5%2012L12%205'%20stroke='white'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",DC=({isOpen:e,setIsOpen:t})=>{const[n,i]=x.useState(!1),[o,l]=x.useState(!1),[u,c]=x.useState(!1),[d,h]=x.useState(!1),p=()=>i(m=>!m);return rt.jsx(Dx,{children:e&&rt.jsxs(vu.div,{layout:!0,initial:{opacity:0,y:50,scale:.98},animate:{opacity:1,y:0,scale:1,width:n?"60vw":"420px"},exit:{opacity:0,y:50,scale:.98},transition:{opacity:{duration:.28,ease:"easeOut"},y:{duration:.32,ease:"easeOut"},width:{type:"spring",stiffness:300,damping:30},layout:{type:"spring",stiffness:300,damping:30}},className:"fixed bottom-16 2xl:bottom-24 right-14 2xl:right-20 z-50 flex flex-col overflow-hidden rounded-lg shadow-2xl",style:{maxWidth:"80%",maxHeight:"90vh"},"aria-expanded":n,children:[rt.jsxs("div",{className:"bg-gradient-to-r from-[#283068] via-[#49507F] to-[#49507F] p-4 flex items-center justify-between rounded-t-lg text-white",children:[rt.jsxs("div",{className:"flex items-center gap-4",children:[o&&rt.jsx("img",{src:NC,alt:"back",className:"w-6 h-6 cursor-pointer hover:opacity-80 transition",onClick:()=>{c(!1),h(!1),l(!1)}}),rt.jsx("img",{src:Mu,alt:"Tia",className:"w-8 h-8"}),rt.jsx("h1",{className:"text-lg font-semibold",children:"Tia Chat"})]}),rt.jsxs("div",{className:"flex items-center gap-4",children:[rt.jsx("button",{onClick:p,className:"hover:opacity-80 transition p-1","aria-pressed":n,"aria-label":n?"Collapse chat":"Expand chat",children:rt.jsx("img",{src:SC,alt:n?"collapse":"expand",className:"w-5 h-5"})}),rt.jsx("button",{onClick:()=>t(!1),className:"hover:opacity-80 transition p-1","aria-label":"Close chat",children:rt.jsx("img",{src:bC,alt:"close",className:"w-5 h-5"})})]})]}),rt.jsx("div",{className:"flex-1 bg-white flex flex-col",children:rt.jsx(vu.div,{layout:!0,className:"w-full h-full flex flex-col",animate:{opacity:1},initial:{opacity:0},transition:{delay:.08},children:rt.jsx(AC,{setBack:l,showChat:u,setShowChat:c,showHistory:d,setShowHistory:h})})})]})})},B0=localStorage.getItem("userEnv"),IC=le({key:"UserEnv",default:B0?JSON.parse(B0):{}}),CC=()=>{const{config:e}=F0(),t=Ie(IC),{connect:n,chatProfile:i,setChatProfile:o}=Q0(),l=!!e,[u,c]=x.useState(!1),d=l?e.chatProfiles.length?!!i:!0:!1;if(x.useEffect(()=>{d&&n({})},[t,n,d]),x.useEffect(()=>{if(!l||!e||!e.chatProfiles?.length||i)return;const p=e.chatProfiles.find(m=>m.default);o(p?p.name:e.chatProfiles[0].name)},[l,e,i,o]),!l)return null;const h=()=>c(!u);return rt.jsxs("div",{className:"custom-scrollbar",children:[rt.jsx(DC,{isOpen:u,setIsOpen:c}),rt.jsx("img",{src:TM,alt:"chat icon",className:"fixed 2xl:bottom-18 bottom-8 2xl:right-20 right-14 h-12 w-12 cursor-pointer z-50",onClick:h})]})};function zC(){const[e,t]=x.useState(!1),{language:n}=F0(),{windowMessage:i}=P0(),{data:o}=ca(`/project/translations?language=${n}`);return x.useEffect(()=>{o&&t(!0)},[o]),x.useEffect(()=>{const l=u=>{i(u.data)};return window.addEventListener("message",l),()=>window.removeEventListener("message",l)},[i]),e?rt.jsx(CC,{}):null}function kC(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}Array(12).fill(0);let _c=1;class OC{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:i,...o}=t,l=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:_c++,u=this.toasts.find(d=>d.id===l),c=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(l)&&this.dismissedToasts.delete(l),u?this.toasts=this.toasts.map(d=>d.id===l?(this.publish({...d,...t,id:l,title:i}),{...d,...t,id:l,dismissible:c,title:i}):d):this.addToast({title:i,...o,dismissible:c,id:l}),l},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(i=>i({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let i;n.loading!==void 0&&(i=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let l=i!==void 0,u;const c=o.then(async h=>{if(u=["resolve",h],x.isValidElement(h))l=!1,this.create({id:i,type:"default",message:h});else if(jC(h)&&!h.ok){l=!1;const m=typeof n.error=="function"?await n.error(`HTTP error! status: ${h.status}`):n.error,w=typeof n.description=="function"?await n.description(`HTTP error! status: ${h.status}`):n.description,S=typeof m=="object"&&!x.isValidElement(m)?m:{message:m};this.create({id:i,type:"error",description:w,...S})}else if(h instanceof Error){l=!1;const m=typeof n.error=="function"?await n.error(h):n.error,w=typeof n.description=="function"?await n.description(h):n.description,S=typeof m=="object"&&!x.isValidElement(m)?m:{message:m};this.create({id:i,type:"error",description:w,...S})}else if(n.success!==void 0){l=!1;const m=typeof n.success=="function"?await n.success(h):n.success,w=typeof n.description=="function"?await n.description(h):n.description,S=typeof m=="object"&&!x.isValidElement(m)?m:{message:m};this.create({id:i,type:"success",description:w,...S})}}).catch(async h=>{if(u=["reject",h],n.error!==void 0){l=!1;const p=typeof n.error=="function"?await n.error(h):n.error,m=typeof n.description=="function"?await n.description(h):n.description,v=typeof p=="object"&&!x.isValidElement(p)?p:{message:p};this.create({id:i,type:"error",description:m,...v})}}).finally(()=>{l&&(this.dismiss(i),i=void 0),n.finally==null||n.finally.call(n)}),d=()=>new Promise((h,p)=>c.then(()=>u[0]==="reject"?p(u[1]):h(u[1])).catch(p));return typeof i!="string"&&typeof i!="number"?{unwrap:d}:Object.assign(i,{unwrap:d})},this.custom=(t,n)=>{const i=n?.id||_c++;return this.create({jsx:t(i),id:i,...n}),i},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const jn=new OC,LC=(e,t)=>{const n=t?.id||_c++;return jn.addToast({title:e,...t,id:n}),n},jC=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",RC=LC,UC=()=>jn.toasts,VC=()=>jn.getActiveToasts(),PC=Object.assign(RC,{success:jn.success,info:jn.info,warning:jn.warning,error:jn.error,custom:jn.custom,message:jn.message,promise:jn.promise,dismiss:jn.dismiss,loading:jn.loading},{getHistory:UC,getToasts:VC});kC("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");const Y0=()=>{const e=document.querySelector('meta[property="og:root_path"]');return e&&typeof e.getAttribute("content")=="string"?e.getAttribute("content"):""};class QC extends qc{token;constructor(t,n,i,o,l,u){super(t,n,i,o,l),this.token=u}async retryRequest(t){try{return await t()}catch(n){if(n?.status===401)return await t();throw n}}getHeaders(){return this.token?{Authorization:`Bearer ${this.token}`}:{}}async put(t,n){return this.retryRequest(()=>this.fetch("PUT",t,n,void 0,this.getHeaders()))}async get(t){return this.retryRequest(()=>this.fetch("GET",t,void 0,void 0,this.getHeaders()))}async post(t,n){return this.retryRequest(()=>this.fetch("POST",t,n,void 0,this.getHeaders()))}async shareThread(t,n){return(await this.put("/project/thread/share",{threadId:t,isShared:n})).json()}connectStreamableHttpMCP(t,n,i,o){const l=()=>fetch(new URL("mcp",this.httpEndpoint.endsWith("/")?this.httpEndpoint:`${this.httpEndpoint}/`),{method:"POST",headers:{"Content-Type":"application/json",...t?{"x-session-id":t}:{},...this.getHeaders()},body:JSON.stringify({clientType:"streamable-http",name:n,url:i,sessionId:t,...o?{headers:o}:{}})}).then(async u=>{if(u.status===401)throw new Error("Unauthorized");const c=await u.json();return{success:u.ok,mcp:c.mcp,error:c.detail}});return this.retryRequest(l)}}function fa(e={}){console.log("TIAWidget: Initializing...");const{containerId:t="tia-widget-root",onError:n=A=>{console.error("TIAWidget error:",A),PC.error(A.message)},token:i,serverUrl:o}=e,l=o||"https://v2.tia.ascenthr.ai";console.log("TIAWidget: Using API URL:",l),i&&console.log("TIAWidget: Token provided for authentication");let u=document.getElementById(t);u?console.log("TIAWidget: Found existing container element"):(u=document.createElement("div"),u.id=t,u.style.position="fixed",u.style.bottom="20px",u.style.right="20px",u.style.zIndex="9999",document.body.appendChild(u),console.log("TIAWidget: Created container element"));const c="tia-widget-font";if(!document.getElementById(c)){const A=document.createElement("link");A.id=c,A.rel="stylesheet",A.href="https://fonts.googleapis.com/css2?family=Manrope:wght@200..800&display=swap",document.head.appendChild(A)}const d=u.shadowRoot||u.attachShadow({mode:"open"});if(!d.querySelector("style[data-tia-styles]")){const A=document.createElement("style");A.setAttribute("data-tia-styles","true"),A.textContent=xM,d.appendChild(A)}let h=d.querySelector("#tia-react-root");h||(h=document.createElement("div"),h.id="tia-react-root",d.appendChild(h));const p=new URL(l).toString(),m=()=>{window.location.pathname!==Y0()+"/login"&&(window.location.href=Y0()+"/login")},w=A=>{const P=A?.message||A?.toString()||"An error occurred";n(new Error(P))},v=new QC(p,"webapp",{},m,w,i),S=wM.createRoot(h);return S.render(rt.jsx(js.Provider,{value:v,children:rt.jsx(YD,{children:rt.jsx(zC,{})})})),{unmount:()=>S.unmount()}}if(typeof window<"u"){const e=document.currentScript;if(e?.hasAttribute("data-auto-init")){console.log("TIAWidget: Auto-initializing from script tag");const t=e.getAttribute("data-container-id")||void 0;document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{fa({containerId:t})}):fa({containerId:t})}else console.log("TIAWidget: Script loaded, no auto-init. Call TIAWidget.init() manually.")}return typeof window<"u"&&(window.TIAWidget={init:fa}),$a.initTIAWidget=fa,Object.defineProperty($a,Symbol.toStringTag,{value:"Module"}),$a})({},React,ReactDOM);
353
+ `,tC=new Blob([$I],{type:"application/javascript"}),eC=URL.createObjectURL(tC),nC=eC,A0=class{constructor({sampleRate:e=24e3,onStop:t}={}){this.scriptSrc=nC,this.onStop=t,this.sampleRate=e,this.context=null,this.stream=null,this.analyser=null,this.trackSampleOffsets={},this.interruptedTrackIds={}}async connect(){this.context=new AudioContext({sampleRate:this.sampleRate}),this.context.state==="suspended"&&await this.context.resume();try{await this.context.audioWorklet.addModule(this.scriptSrc)}catch(t){throw console.error(t),new Error(`Could not add audioWorklet module: ${this.scriptSrc}`)}let e=this.context.createAnalyser();return e.fftSize=8192,e.smoothingTimeConstant=.1,this.analyser=e,!0}getFrequencies(e="frequency",t=-100,n=-30){if(!this.analyser)throw new Error("Not connected, please call .connect() first");return Oc.getFrequencies(this.analyser,this.sampleRate,null,e,t,n)}_start(){let e=new AudioWorkletNode(this.context,"stream_processor");return e.connect(this.context.destination),e.port.onmessage=t=>{let{event:n}=t.data;if(n==="stop")this.onStop?.(),e.disconnect(),this.stream=null;else if(n==="offset"){let{requestId:i,trackId:o,offset:l}=t.data,u=l/this.sampleRate;this.trackSampleOffsets[i]={trackId:o,offset:l,currentTime:u}}},this.analyser.disconnect(),e.connect(this.analyser),this.stream=e,!0}add16BitPCM(e,t="default"){if(typeof t!="string")throw new Error("trackId must be a string");if(this.interruptedTrackIds[t])return;this.stream||this._start();let n;if(e instanceof Int16Array)n=e;else if(e instanceof ArrayBuffer)n=new Int16Array(e);else throw new Error("argument must be Int16Array or ArrayBuffer");return this.stream.port.postMessage({event:"write",buffer:n,trackId:t}),n}async getTrackSampleOffset(e=!1){if(!this.stream)return null;let t=crypto.randomUUID();this.stream.port.postMessage({event:e?"interrupt":"offset",requestId:t});let n;for(;!n;)n=this.trackSampleOffsets[t],await new Promise(o=>setTimeout(()=>o(),1));let{trackId:i}=n;return e&&i&&(this.interruptedTrackIds[i]=!0),n}async interrupt(){return this.getTrackSampleOffset(!0)}};globalThis.WavStreamPlayer=A0;var b0=le({key:"ThreadIdToResume",default:void 0}),rC=le({key:"ResumeThreadErrorState",default:void 0}),S0=le({key:"ChatProfile",default:void 0}),N0=le({key:"SessionId",default:Xu()}),Lc=Om({key:"SessionIdSelector",get:({get:e})=>e(N0),set:({set:e},t)=>e(N0,t instanceof BD?Xu():t)}),jc=le({key:"Session",dangerouslyAllowMutability:!0,default:void 0}),Rc=le({key:"Actions",default:[]}),Uc=le({key:"Messages",dangerouslyAllowMutability:!0,default:[]}),iC=le({key:"Commands",default:[]}),D0=le({key:"TokenCount",default:0}),Vc=le({key:"Loading",default:!1}),Pc=le({key:"AskUser",default:void 0}),sC=le({key:"WavRecorder",dangerouslyAllowMutability:!0,default:new E0}),oC=le({key:"WavStreamPlayer",dangerouslyAllowMutability:!0,default:new A0}),aC=le({key:"AudioConnection",default:"off"}),lC=le({key:"isAiSpeaking",default:!1}),I0=le({key:"CallFn",default:void 0}),oa=le({key:"ChatSettings",default:[]}),C0=Om({key:"ChatSettingsValue/Default",get:({get:e})=>e(oa).reduce((t,n)=>(t[n.id]=n.initial,t),{})}),aa=le({key:"ChatSettingsValue",default:C0}),Qc=le({key:"DisplayElements",default:[]}),Fc=le({key:"TasklistElements",default:[]}),Bc=le({key:"FirstUserInteraction",default:void 0}),uC=le({key:"User",default:void 0}),cC=le({key:"ChainlitConfig",default:void 0}),fC=le({key:"AuthConfig",default:void 0}),dC=le({key:"ThreadHistory",default:{threads:void 0,currentThreadId:void 0,timeGroupedThreads:void 0,pageInfo:void 0},effects:[({setSelf:e,onSet:t})=>{t((n,i)=>{let o=n?.timeGroupedThreads;n?.threads&&!ji.isEqual(n.threads,i?.timeGroupedThreads)&&(o=_I(n.threads)),e({...n,timeGroupedThreads:o})})}]}),z0=le({key:"SideView",default:void 0}),Yc=le({key:"CurrentThreadId",default:void 0}),hC=e=>({setSelf:t,onSet:n})=>{let i=localStorage.getItem(e);if(i!=null)try{t(JSON.parse(i))}catch(o){console.error(`Error parsing localStorage value for key "${e}":`,o)}n((o,l,u)=>{u?localStorage.removeItem(e):localStorage.setItem(e,JSON.stringify(o))})},pC=le({key:"Mcp",default:[],effects:[hC("mcp_storage_key")]}),gC=()=>{let e=Ie(Vc),t=Ie(Qc),n=Ie(Fc),i=Ie(Rc),o=Ie(jc),l=Ie(Pc),u=Ie(I0),c=Ie(oa),d=Ie(aa),h=Ie(C0),p=o?.socket.connected&&!o?.error,m=!p||e||l?.spec.type==="file"||l?.spec.type==="action"||l?.spec.type==="element";return{actions:i,askUser:l,callFn:u,chatSettingsDefaultValue:h,chatSettingsInputs:c,chatSettingsValue:d,connected:p,disabled:m,elements:t,error:o?.error,loading:e,tasklists:n}},Ui=(e,t)=>la(e,t.id)?Wc(e,t.id,t):"parentId"in t&&t.parentId?O0(e,t.parentId,t):"indent"in t&&t.indent&&t.indent>0?k0(e,t.indent,t):[...e,t],k0=(e,t,n,i=0)=>{let o=[...e];if(o.length===0)return[...o,n];{let l=o.length-1,u=o[l];return u.steps=u.steps||[],i+1===t?(u.steps=[...u.steps,n],o[l]={...u},o):(u.steps=k0(u.steps,t,n,i+1),o[l]={...u},o)}},O0=(e,t,n)=>{let i=[...e];for(let o=0;o<i.length;o++){let l=i[o];ji.isEqual(l.id,t)?(l.steps=l.steps?[...l.steps,n]:[n],i[o]={...l}):la(i,t)&&l.steps&&(l.steps=O0(l.steps,t,n),i[o]={...l})}return i},L0=(e,t)=>{for(let n of e){if(ji.isEqual(n.id,t))return n;if(n.steps&&n.steps.length>0){let i=L0(n.steps,t);if(i)return i}}},la=(e,t)=>L0(e,t)!==void 0,Wc=(e,t,n)=>{let i=[...e];for(let o=0;o<i.length;o++){let l=i[o];ji.isEqual(l.id,t)?i[o]={steps:l.steps,...n}:la(i,t)&&l.steps&&(l.steps=Wc(l.steps,t,n),i[o]={...l})}return i},j0=(e,t)=>{let n=[...e];for(let i=0;i<n.length;i++){let o=n[i];o.id===t?n=[...n.slice(0,i),...n.slice(i+1)]:la(n,t)&&o.steps&&(o.steps=j0(o.steps,t),n[i]={...o})}return n},R0=(e,t,n,i,o)=>{let l=[...e];for(let u=0;u<l.length;u++){let c=l[u];ji.isEqual(c.id,t)?("content"in c&&c.content!==void 0?i?c.content=n:c.content+=n:o?"input"in c&&c.input!==void 0&&(i?c.input=n:c.input+=n):"output"in c&&c.output!==void 0&&(i?c.output=n:c.output+=n),l[u]={...c}):c.steps&&(c.steps=R0(c.steps,t,n,i,o),l[u]={...c})}return l},ua=()=>{let[e,t]=Li(fC),[n,i]=Li(uC),o=he(dC);return{authConfig:e,setAuthConfig:t,user:n,setUser:i,setThreadHistory:o}},mC=async(e,t)=>(await e.get(t))?.json(),yC=e=>{let t=new qc("","webapp");return Object.assign(t,e),t};function ca(e,{...t}={}){let n=x.useContext(js),{setUser:i}=ua(),o=x.useMemo(()=>([u])=>{t.onErrorRetry||(t.onErrorRetry=(...d)=>{let[h]=d;if(h.status===401){i(null);return}return b2.defaultValue.onErrorRetry(...d)});let c=yC(n);return c.on401=c.onError=void 0,mC(c,u)},[n]),l=x.useMemo(()=>e?[e]:null,[e]);return S2(l,o,t)}var vC=()=>{let{authConfig:e,setAuthConfig:t}=ua(),{data:n,isLoading:i}=ca(e?null:"/auth/config");return x.useEffect(()=>{n&&t(n)},[n,t]),{authConfig:e,isLoading:i}},MC=()=>{let e=x.useContext(js),{setUser:t,setThreadHistory:n}=ua();return{logout:async(i=!1)=>{await e.logout(),t(void 0),n(void 0),i&&window.location.reload()}}},wC=()=>{let{user:e,setUser:t}=ua(),{data:n,error:i,mutate:o}=ca("/user");return x.useEffect(()=>{n&&t(n)},[n,t]),x.useEffect(()=>{i&&t(null)},[i]),{user:e,setUserFromAPI:o}},U0=()=>{let{authConfig:e}=vC(),{logout:t}=MC(),{user:n,setUserFromAPI:i}=wC(),o=!!e&&(!e.requireLogin||n!==void 0);return e&&!e.requireLogin?{data:e,user:null,isReady:o,isAuthenticated:!0,logout:()=>Promise.resolve(),setUserFromAPI:()=>Promise.resolve()}:{data:e,user:n,isReady:o,isAuthenticated:!!n,logout:t,setUserFromAPI:i}},V0=class extends Error{constructor(e,t,n){super(e),this.status=t,this.detail=n}toString(){return this.detail?`${this.message}: ${this.detail}`:this.message}},xC=class{constructor(e,t,n,i,o){this.httpEndpoint=e,this.type=t,this.additionalQueryParams=n,this.on401=i,this.onError=o}buildEndpoint(e){let t=`${this.httpEndpoint}${e}`;this.httpEndpoint.endsWith("/")&&(t=`${this.httpEndpoint.slice(0,-1)}${e}`);let n=new URL(t);if(this.additionalQueryParams){let i=new URLSearchParams(this.additionalQueryParams),o=n.search?"&":"?";n.search=n.search+`${o}${i.toString()}`}return n.toString()}async getDetailFromErrorResponse(e){try{return(await e.json())?.detail}catch(t){console.error("Unable to parse error response",t)}}handleRequestError(e){e instanceof V0&&(e.status===401&&this.on401&&this.on401(),this.onError&&this.onError(e)),console.error(e)}async fetch(e,t,n,i,o={}){try{let l;n instanceof FormData?l=n:(o["Content-Type"]="application/json",l=n?JSON.stringify(n):null);let u=await fetch(this.buildEndpoint(t),{method:e,credentials:"include",headers:o,signal:i,body:l});if(!u.ok){let c=await this.getDetailFromErrorResponse(u);throw new V0(u.statusText,u.status,c)}return u}catch(l){throw this.handleRequestError(l),l}}async get(e){return await this.fetch("GET",e)}async post(e,t,n){return await this.fetch("POST",e,t,n)}async put(e,t){return await this.fetch("PUT",e,t)}async patch(e,t){return await this.fetch("PATCH",e,t)}async delete(e,t){return await this.fetch("DELETE",e,t)}},qc=class extends xC{async headerAuth(){return(await this.post("/auth/header",{})).json()}async jwtAuth(e){return(await this.fetch("POST","/auth/jwt",void 0,void 0,{Authorization:`Bearer ${e}`})).json()}async stickyCookie(e){return(await this.fetch("POST","/set-session-cookie",{session_id:e})).json()}async passwordAuth(e){return(await this.post("/login",e)).json()}async getUser(){return(await this.get("/user")).json()}async logout(){return(await this.post("/logout",{})).json()}async setFeedback(e,t){return(await this.put("/feedback",{feedback:e,sessionId:t})).json()}async deleteFeedback(e){return(await this.delete("/feedback",{feedbackId:e})).json()}async listThreads(e,t){return(await this.post("/project/threads",{pagination:e,filter:t})).json()}async renameThread(e,t){return(await this.put("/project/thread",{threadId:e,name:t})).json()}async deleteThread(e){return(await this.delete("/project/thread",{threadId:e})).json()}uploadFile(e,t,n,i){let o=new XMLHttpRequest;o.withCredentials=!0;let l=new Promise((u,c)=>{let d=new FormData;d.append("file",e);let h=i?`&ask_parent_id=${i}`:"";o.open("POST",this.buildEndpoint(`/project/file?session_id=${n}${h}`),!0),o.upload.onprogress=function(p){if(p.lengthComputable){let m=p.loaded/p.total*100;t(m)}},o.onload=function(){if(o.status===200){let m=JSON.parse(o.responseText);u(m);return}let p=o.getResponseHeader("Content-Type");if(p&&p.includes("application/json")){let m=JSON.parse(o.responseText);c(m.detail)}else c("Upload failed")},o.onerror=function(){c("Upload error")},o.send(d)});return{xhr:o,promise:l}}async callAction(e,t){return(await this.post("/project/action",{sessionId:t,action:e})).json()}async updateElement(e,t){return(await this.put("/project/element",{sessionId:t,element:e})).json()}async deleteElement(e,t){return(await this.delete("/project/element",{sessionId:t,element:e})).json()}async connectStdioMCP(e,t,n){return(await this.post("/mcp",{sessionId:e,name:t,fullCommand:n,clientType:"stdio"})).json()}async connectSseMCP(e,t,n,i){return(await this.post("/mcp",{sessionId:e,name:t,url:n,...i?{headers:i}:{},clientType:"sse"})).json()}async connectStreamableHttpMCP(e,t,n,i){return(await this.post("/mcp",{sessionId:e,name:t,url:n,...i?{headers:i}:{},clientType:"streamable-http"})).json()}async disconnectMcp(e,t){return(await this.delete("/mcp",{sessionId:e,name:t})).json()}getElementUrl(e,t){let n=`?session_id=${t}`;return this.buildEndpoint(`/project/file/${e}${n}`)}getLogoEndpoint(e,t){return t||this.buildEndpoint(`/logo?theme=${e}`)}getOAuthEndpoint(e){return this.buildEndpoint(`/auth/oauth/${e}`)}async shareThread(e,t){return(await this.put("/project/thread/share",{threadId:e,isShared:t})).json()}},js=x.createContext(new qc("http://localhost:8000","webapp")),P0=()=>{let e=x.useContext(js),t=Ie(jc),n=Ie(Pc),i=Ie(Lc),o=Yo(oa),l=Yo(Lc),u=Yo(aa),c=he(Bc),d=he(Vc),h=he(Uc),p=he(Qc),m=he(Fc),w=he(Rc),v=he(D0),S=he(b0),A=he(z0),P=he(Yc),j=x.useCallback(()=>{t?.socket.emit("clear_session"),t?.socket.disconnect(),S(void 0),l(),c(void 0),h([]),p([]),m([]),w([]),v(0),o(),u(),A(void 0),P(void 0)},[t]),L=x.useCallback((ut,Qt=[])=>{ut.id||(ut.id=Xu()),ut.createdAt||(ut.createdAt=new Date().toISOString()),h(Tt=>Ui(Tt,ut)),t?.socket.emit("client_message",{message:ut,fileReferences:Qt})},[t?.socket]),z=x.useCallback(ut=>{t?.socket.emit("edit_message",{message:ut})},[t?.socket]),Z=x.useCallback(ut=>{t?.socket.emit("window_message",ut)},[t?.socket]),Q=x.useCallback(()=>{t?.socket.emit("audio_start")},[t?.socket]),J=x.useCallback((ut,Qt,Tt,Mt)=>{t?.socket.emit("audio_chunk",{isStart:ut,mimeType:Qt,elapsedTime:Tt,data:Mt})},[t?.socket]),G=x.useCallback(()=>{t?.socket.emit("audio_end")},[t?.socket]),K=x.useCallback(ut=>{n&&(n.parentId&&(ut.parentId=n.parentId),h(Qt=>Ui(Qt,ut)),n.callback(ut))},[n]),vt=x.useCallback(ut=>{t?.socket.emit("chat_settings_change",ut)},[t?.socket]),ft=x.useCallback(()=>{h(ut=>ut.map(Qt=>(Qt.streaming=!1,Qt))),d(!1),t?.socket.emit("stop")},[t?.socket]);return{uploadFile:x.useCallback((ut,Qt,Tt)=>e.uploadFile(ut,Qt,i,Tt),[i]),clear:j,replyMessage:K,sendMessage:L,editMessage:z,windowMessage:Z,startAudioStream:Q,sendAudioChunk:J,endAudioStream:G,stopTask:ft,setIdToResume:S,updateChatSettings:vt}},TC=()=>{let e=Ie(Uc),t=Ie(Bc);return{threadId:Ie(Yc),messages:e,firstInteraction:t}},Q0=()=>{let e=x.useContext(js),t=Ie(Lc),[n,i]=Li(jc),o=he(lC),l=he(aC),u=Yo(aa),c=he(aa),d=he(Bc),h=he(Vc),p=he(pC),m=Ie(oC),w=Ie(sC),v=he(Uc),S=he(Pc),A=he(I0),P=he(iC),j=he(z0),L=he(Qc),z=he(Fc),Z=he(Rc),Q=he(oa),J=he(D0),[G,K]=Li(S0),vt=Ie(b0),ft=he(rC),[ut,Qt]=Li(Yc);x.useEffect(()=>{n?.socket&&(n.socket.auth.threadId=ut||"")},[ut]);let Tt=x.useCallback(async({transports:Xt,userEnv:xt})=>{let{protocol:Lt,host:ht,pathname:at}=new URL(e.httpEndpoint),pt=`${Lt}//${ht}`,I=at&&at!=="/"?`${at}/ws/socket.io`:"/ws/socket.io";try{await e.stickyCookie(t)}catch(N){console.error(`Failed to set sticky session cookie: ${N}`)}let R=ra(pt,{path:I,withCredentials:!0,transports:Xt,auth:{clientType:e.type,sessionId:t,threadId:vt||"",userEnv:JSON.stringify(xt),chatProfile:G?encodeURIComponent(G):""}});i(N=>(N?.socket?.removeAllListeners(),N?.socket?.close(),{socket:R})),R.on("connect",()=>{R.emit("connection_successful"),i(N=>({...N,error:!1})),p(N=>N.map(V=>{let B;return V.clientType==="sse"?B=e.connectSseMCP(t,V.name,V.url):V.clientType==="streamable-http"?B=e.connectStreamableHttpMCP(t,V.name,V.url):B=e.connectStdioMCP(t,V.name,V.command),B.then(async({success:$,mcp:X})=>{p(wt=>wt.map(kt=>kt.name===X.name?{...kt,status:$?"connected":"failed",tools:X?X.tools:kt.tools}:kt))}).catch(()=>{p($=>$.map(X=>X.name===V.name?{...X,status:"failed"}:X))}),{...V,status:"connecting"}}))}),R.on("connect_error",N=>{i(V=>({...V,error:!0}))}),R.on("task_start",()=>{h(!0)}),R.on("task_end",()=>{h(!1)}),R.on("reload",()=>{R.emit("clear_session"),window.location.reload()}),R.on("audio_connection",async N=>{if(N==="on"){let V=!0,B=Date.now(),$="pcm16";await w.begin(),await m.connect(),await w.record(async X=>{let wt=Date.now()-B;R.emit("audio_chunk",{isStart:V,mimeType:$,elapsedTime:wt,data:X.mono}),V=!1}),m.onStop=()=>o(!1)}else await w.end(),await m.interrupt();l(N)}),R.on("audio_chunk",N=>{m.add16BitPCM(N.data,N.track),o(!0)}),R.on("audio_interrupt",()=>{m.interrupt()}),R.on("resume_thread",N=>{let V=!!N?.metadata?.viewer_read_only;!V&&vt&&N.id!==vt&&(window.location.href=`/thread/${N.id}`),!V&&vt&&Qt(N.id);let B=[];for(let X of N.steps)B=Ui(B,X);N.metadata?.chat_profile&&K(N.metadata?.chat_profile),N.metadata?.chat_settings&&c(N.metadata?.chat_settings),v(B);let $=N.elements||[];z($.filter(X=>X.type==="tasklist")),L($.filter(X=>["avatar","tasklist"].indexOf(X.type)===-1))}),R.on("resume_thread_error",N=>{ft(N)}),R.on("new_message",N=>{v(V=>Ui(V,N))}),R.on("first_interaction",N=>{d(N.interaction),Qt(N.thread_id)}),R.on("update_message",N=>{v(V=>Wc(V,N.id,N))}),R.on("delete_message",N=>{v(V=>j0(V,N.id))}),R.on("stream_start",N=>{v(V=>Ui(V,N))}),R.on("stream_token",({id:N,token:V,isSequence:B,isInput:$})=>{v(X=>R0(X,N,V,B,$))}),R.on("ask",({msg:N,spec:V},B)=>{S({spec:V,callback:B,parentId:N.parentId}),v($=>Ui($,N)),h(!1)}),R.on("ask_timeout",()=>{S(void 0),h(!1)}),R.on("clear_ask",()=>{S(void 0)}),R.on("call_fn",({name:N,args:V},B)=>{A({name:N,args:V,callback:B})}),R.on("clear_call_fn",()=>{A(void 0)}),R.on("call_fn_timeout",()=>{A(void 0)}),R.on("chat_settings",N=>{Q(N),u()}),R.on("set_commands",N=>{P(N)}),R.on("set_sidebar_title",N=>{j(V=>V?.title===N?V:{title:N,elements:V?.elements||[]})}),R.on("set_sidebar_elements",({elements:N,key:V})=>{N.length?(N.forEach(B=>{!B.url&&B.chainlitKey&&(B.url=e.getElementUrl(B.chainlitKey,t))}),j(B=>B?.key===V?B:{title:B?.title||"",elements:N,key:V})):j(void 0)}),R.on("element",N=>{!N.url&&N.chainlitKey&&(N.url=e.getElementUrl(N.chainlitKey,t)),N.type==="tasklist"?z(V=>{let B=V.findIndex($=>$.id===N.id);return B===-1?[...V,N]:[...V.slice(0,B),N,...V.slice(B+1)]}):L(V=>{let B=V.findIndex($=>$.id===N.id);return B===-1?[...V,N]:[...V.slice(0,B),N,...V.slice(B+1)]})}),R.on("remove_element",N=>{L(V=>V.filter(B=>B.id!==N.id)),z(V=>V.filter(B=>B.id!==N.id))}),R.on("action",N=>{Z(V=>[...V,N])}),R.on("remove_action",N=>{Z(V=>{let B=V.findIndex($=>$.id===N.id);return B===-1?V:[...V.slice(0,B),...V.slice(B+1)]})}),R.on("token_usage",N=>{J(V=>V+N)}),R.on("window_message",N=>{window.parent&&window.parent.postMessage(N,"*")}),R.on("toast",N=>{if(!N.message){console.warn("No message received for toast.");return}switch(N.type){case"info":Ls.info(N.message);break;case"error":Ls.error(N.message);break;case"success":Ls.success(N.message);break;case"warning":Ls.warning(N.message);break;default:Ls(N.message);break}})},[i,t,vt,G]),Mt=x.useCallback(ji.debounce(Tt,200),[Tt]),ee=x.useCallback(()=>{n?.socket&&(n.socket.removeAllListeners(),n.socket.close())},[n]);return{connect:Mt,disconnect:ee,session:n,sessionId:t,chatProfile:G,idToResume:vt,setChatProfile:K}},F0=()=>{let[e,t]=Li(cC),{isAuthenticated:n}=U0(),i=Ie(S0),o=navigator.language||"en-US",l=x.useRef(i),u=n?`/project/settings?language=${o}${i?`&chat_profile=${encodeURIComponent(i)}`:""}`:null,c=n&&!e,{data:d,error:h,isLoading:p}=ca(c?u:null);return x.useEffect(()=>{d&&t(d)},[d,t]),x.useEffect(()=>{l.current!==i&&(t(void 0),l.current=i)},[i,t]),{config:e,error:h,isLoading:p,language:o}};const EC=["Dress Code Policy","Leave Policy","Team Lunch Policy","Referral Policy","Performance Review"],AC=({setBack:e,showChat:t,setShowChat:n,showHistory:i,setShowHistory:o})=>{const[l,u]=x.useState(""),{user:c}=U0(),{sendMessage:d}=P0(),{connected:h,loading:p}=gC(),{messages:m}=TC(),{connect:w,disconnect:v}=Q0(),S=x.useRef(null),A=x.useRef(!1);x.useEffect(()=>{if(!A.current)return A.current=!0,w({userEnv:{}}),()=>v()},[w,v]),x.useEffect(()=>{S.current?.scrollIntoView({behavior:"smooth"})},[m,p]);const P=x.useMemo(()=>{const z=[],Z=Q=>{(Q.type==="user_message"||Q.type==="assistant_message")&&typeof Q.output=="string"&&Q.output.trim().length>0&&z.push({id:Q.id,sender:Q.type==="user_message"?"user":"assistant",text:Q.output}),Q.steps&&Q.steps.length&&Q.steps.forEach(Z)};return m.forEach(Z),z},[m]),j=z=>{!z.trim()||!h||(d({type:"user_message",output:z.trim(),name:c?.identifier||"User"}),e(!0),n(!0))},L=(z,Z)=>{j(Z?l:z),u("")};return rt.jsxs("div",{className:`text-gray-700 flex z-10 flex-col items-start ${t?"p-0":"p-4"} w-full`,children:[!t&&!i&&rt.jsxs(rt.Fragment,{children:[rt.jsx("h1",{className:"font-extrabold mx-auto bg-gradient-to-l from-[#F56057] via-[#A03F39] to-[#283068] bg-clip-text text-transparent text-lg md:text-xl",children:"Hi, Ishani Ganguly"}),rt.jsx(lA,{}),rt.jsxs("div",{className:"bg-[#F5605724] rounded-lg w-full flex items-center justify-between px-3 mt-3 cursor-pointer",onClick:()=>{o(!0),e(!0)},children:[rt.jsxs("div",{className:"flex items-center gap-x-2",children:[rt.jsx("img",{src:uA,alt:"history",className:"py-2 h-10 2xl:h-12 w-10 2xl:w-12"}),rt.jsx("p",{className:"fs14 font-semibold text-black",children:"Chat History"})]}),rt.jsx("img",{src:cA,alt:"link",className:"py-1 h-6 2xl:h-8 w-6 2xl:w-8"})]}),rt.jsx("div",{className:"flex flex-wrap gap-x-4 gap-y-2 mt-4",children:EC.map(z=>rt.jsx("div",{onClick:()=>L(z),className:"py-2 px-4 bg-[#EFF1FF] rounded-full border cursor-pointer hover:text-white border-gray-300 hover:bg-[#283068]",children:rt.jsx("p",{className:"text-[#283068] hover:text-white fs10 font-medium",children:z})},z))})]}),t&&!i&&rt.jsx("div",{className:"w-full max-w-full sm:max-w-none h-[50vh] md:h-[60vh] lg:h-[65vh] bg-gradient-to-l from-[#FFE6E4] via-[#FFE6E4] to-[#FDACA7]/70 flex flex-col rounded-lg",children:rt.jsxs("div",{className:"flex-1 overflow-y-auto p-2 space-y-4 scrollbar-hide",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:[rt.jsx("style",{children:".scrollbar-hide::-webkit-scrollbar { display: none; }"}),P.map(z=>rt.jsx("div",{className:`flex items-start gap-2 ${z.sender==="assistant"?"justify-start":"justify-end"}`,children:z.sender==="assistant"?rt.jsxs(rt.Fragment,{children:[rt.jsx("img",{src:Mu,alt:"Tia",className:"2xl:w-10 2xl:h-10 rounded-full flex-strat w-8 h-8"}),rt.jsxs("div",{children:[rt.jsx("span",{className:"fs12 text-[#283068] font-bold",children:"Tia"}),rt.jsx("div",{className:"min-w-[70%] fs12 font-medium px-4 py-2 rounded-md shadow-md bg-[#FFFFFF] text-[#0D082C] mt-1 whitespace-pre-wrap",children:z.text})]})]}):rt.jsxs(rt.Fragment,{children:[rt.jsx("div",{className:"max-w-[70%] fs12 font-medium px-4 py-2 rounded-md shadow-md bg-gradient-to-r from-[#4F5FCE] to-[#2D3776] text-white whitespace-pre-wrap",children:z.text}),rt.jsx("img",{src:dA,alt:"User",className:"2xl:w-10 2xl:h-10 rounded-full flex-strat w-8 h-8"})]})},z.id)),p&&rt.jsxs("div",{className:"flex items-start gap-2 justify-start",children:[rt.jsx("img",{src:Mu,alt:"Tia",className:"2xl:h-10 h-8 f-start"}),rt.jsxs("div",{children:[rt.jsx("span",{className:"fs12 text-[#283068] font-bold",children:"Tia"}),rt.jsx("div",{className:"fs10 bg-gray-200 text-gray-700 px-4 py-2 rounded-2xl italic opacity-75 mt-1",children:"Tia is typing..."})]})]}),rt.jsx("div",{ref:S})]})}),!i&&rt.jsxs("div",{className:"p-1 px-2 rounded-full w-[100%] mx-auto my-2 flex items-center justify-between bg-[#F3F3F3] border border-gray-200 shadow",children:[rt.jsx("input",{type:"text",className:"px-2 fs12 outline-none fs14 placeholder:fs14 placeholder:text-gray-500 flex-1 bg-transparent h-8 2xl:h-12",placeholder:"Chat with Tia...",value:l,onChange:z=>{u(z.target.value),z.target.value.trim()&&(e(!0),n(!0))},onKeyDown:z=>{z.key==="Enter"&&L(l,!0)},disabled:!h||p,"aria-label":"Type a message to Tia"}),rt.jsx("img",{src:fA,alt:"send icon",className:"mt-1 object-contain w-6 h-6",onClick:()=>L(l,!0),style:{opacity:h&&!p?1:.5,cursor:h&&!p?"pointer":"not-allowed"},role:"button","aria-disabled":!h||p})]}),i&&rt.jsx(hA,{onBackToHome:()=>{o(!1),n(!1),e(!1)}})]})},bC="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M18%206.5L6%2018.5'%20stroke='white'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M6%206.5L18%2018.5'%20stroke='white'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",SC="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M15%203.5H21V9.5'%20stroke='white'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M9%2021.5H3V15.5'%20stroke='white'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M21%203.5L14%2010.5'%20stroke='white'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M3%2021.5L10%2014.5'%20stroke='white'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",NC="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M19%2012H5'%20stroke='white'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12%2019L5%2012L12%205'%20stroke='white'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",DC=({isOpen:e,setIsOpen:t})=>{const[n,i]=x.useState(!1),[o,l]=x.useState(!1),[u,c]=x.useState(!1),[d,h]=x.useState(!1),p=()=>i(m=>!m);return rt.jsx(Dx,{children:e&&rt.jsxs(vu.div,{layout:!0,initial:{opacity:0,y:50,scale:.98},animate:{opacity:1,y:0,scale:1,width:n?"60vw":"420px"},exit:{opacity:0,y:50,scale:.98},transition:{opacity:{duration:.28,ease:"easeOut"},y:{duration:.32,ease:"easeOut"},width:{type:"spring",stiffness:300,damping:30},layout:{type:"spring",stiffness:300,damping:30}},className:"fixed bottom-16 2xl:bottom-24 right-14 2xl:right-20 z-50 flex flex-col overflow-hidden rounded-lg shadow-2xl",style:{maxWidth:"80%",maxHeight:"90vh"},"aria-expanded":n,children:[rt.jsxs("div",{className:"chat-header-gradient p-4 flex items-center justify-between rounded-t-lg text-white",children:[rt.jsxs("div",{className:"flex items-center gap-4",children:[o&&rt.jsx("img",{src:NC,alt:"back",className:"w-6 h-6 cursor-pointer hover:opacity-80 transition",onClick:()=>{c(!1),h(!1),l(!1)}}),rt.jsx("img",{src:Mu,alt:"Tia",className:"w-8 h-8"}),rt.jsx("h1",{className:"text-lg font-semibold",children:"Tia Chat"})]}),rt.jsxs("div",{className:"flex items-center gap-4",children:[rt.jsx("button",{onClick:p,className:"hover:opacity-80 transition p-1","aria-pressed":n,"aria-label":n?"Collapse chat":"Expand chat",children:rt.jsx("img",{src:SC,alt:n?"collapse":"expand",className:"w-5 h-5"})}),rt.jsx("button",{onClick:()=>t(!1),className:"hover:opacity-80 transition p-1","aria-label":"Close chat",children:rt.jsx("img",{src:bC,alt:"close",className:"w-5 h-5"})})]})]}),rt.jsx("div",{className:"flex-1 bg-white flex flex-col",children:rt.jsx(vu.div,{layout:!0,className:"w-full h-full flex flex-col",animate:{opacity:1},initial:{opacity:0},transition:{delay:.08},children:rt.jsx(AC,{setBack:l,showChat:u,setShowChat:c,showHistory:d,setShowHistory:h})})})]})})},B0=localStorage.getItem("userEnv"),IC=le({key:"UserEnv",default:B0?JSON.parse(B0):{}}),CC=()=>{const{config:e}=F0(),t=Ie(IC),{connect:n,chatProfile:i,setChatProfile:o}=Q0(),l=!!e,[u,c]=x.useState(!1),d=l?e.chatProfiles.length?!!i:!0:!1;if(x.useEffect(()=>{d&&n({})},[t,n,d]),x.useEffect(()=>{if(!l||!e||!e.chatProfiles?.length||i)return;const p=e.chatProfiles.find(m=>m.default);o(p?p.name:e.chatProfiles[0].name)},[l,e,i,o]),!l)return null;const h=()=>c(!u);return rt.jsxs("div",{className:"custom-scrollbar",children:[rt.jsx(DC,{isOpen:u,setIsOpen:c}),rt.jsx("img",{src:TM,alt:"chat icon",className:"fixed 2xl:bottom-18 bottom-8 2xl:right-20 right-14 h-12 w-12 cursor-pointer z-50",onClick:h})]})};function zC(){const[e,t]=x.useState(!1),{language:n}=F0(),{windowMessage:i}=P0(),{data:o}=ca(`/project/translations?language=${n}`);return x.useEffect(()=>{o&&t(!0)},[o]),x.useEffect(()=>{const l=u=>{i(u.data)};return window.addEventListener("message",l),()=>window.removeEventListener("message",l)},[i]),e?rt.jsx(CC,{}):null}function kC(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}Array(12).fill(0);let _c=1;class OC{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:i,...o}=t,l=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:_c++,u=this.toasts.find(d=>d.id===l),c=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(l)&&this.dismissedToasts.delete(l),u?this.toasts=this.toasts.map(d=>d.id===l?(this.publish({...d,...t,id:l,title:i}),{...d,...t,id:l,dismissible:c,title:i}):d):this.addToast({title:i,...o,dismissible:c,id:l}),l},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(i=>i({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let i;n.loading!==void 0&&(i=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let l=i!==void 0,u;const c=o.then(async h=>{if(u=["resolve",h],x.isValidElement(h))l=!1,this.create({id:i,type:"default",message:h});else if(jC(h)&&!h.ok){l=!1;const m=typeof n.error=="function"?await n.error(`HTTP error! status: ${h.status}`):n.error,w=typeof n.description=="function"?await n.description(`HTTP error! status: ${h.status}`):n.description,S=typeof m=="object"&&!x.isValidElement(m)?m:{message:m};this.create({id:i,type:"error",description:w,...S})}else if(h instanceof Error){l=!1;const m=typeof n.error=="function"?await n.error(h):n.error,w=typeof n.description=="function"?await n.description(h):n.description,S=typeof m=="object"&&!x.isValidElement(m)?m:{message:m};this.create({id:i,type:"error",description:w,...S})}else if(n.success!==void 0){l=!1;const m=typeof n.success=="function"?await n.success(h):n.success,w=typeof n.description=="function"?await n.description(h):n.description,S=typeof m=="object"&&!x.isValidElement(m)?m:{message:m};this.create({id:i,type:"success",description:w,...S})}}).catch(async h=>{if(u=["reject",h],n.error!==void 0){l=!1;const p=typeof n.error=="function"?await n.error(h):n.error,m=typeof n.description=="function"?await n.description(h):n.description,v=typeof p=="object"&&!x.isValidElement(p)?p:{message:p};this.create({id:i,type:"error",description:m,...v})}}).finally(()=>{l&&(this.dismiss(i),i=void 0),n.finally==null||n.finally.call(n)}),d=()=>new Promise((h,p)=>c.then(()=>u[0]==="reject"?p(u[1]):h(u[1])).catch(p));return typeof i!="string"&&typeof i!="number"?{unwrap:d}:Object.assign(i,{unwrap:d})},this.custom=(t,n)=>{const i=n?.id||_c++;return this.create({jsx:t(i),id:i,...n}),i},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const jn=new OC,LC=(e,t)=>{const n=t?.id||_c++;return jn.addToast({title:e,...t,id:n}),n},jC=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",RC=LC,UC=()=>jn.toasts,VC=()=>jn.getActiveToasts(),PC=Object.assign(RC,{success:jn.success,info:jn.info,warning:jn.warning,error:jn.error,custom:jn.custom,message:jn.message,promise:jn.promise,dismiss:jn.dismiss,loading:jn.loading},{getHistory:UC,getToasts:VC});kC("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");const Y0=()=>{const e=document.querySelector('meta[property="og:root_path"]');return e&&typeof e.getAttribute("content")=="string"?e.getAttribute("content"):""};class QC extends qc{token;constructor(t,n,i,o,l,u){super(t,n,i,o,l),this.token=u}async retryRequest(t){try{return await t()}catch(n){if(n?.status===401)return await t();throw n}}getHeaders(){return this.token?{Authorization:`Bearer ${this.token}`}:{}}async put(t,n){return this.retryRequest(()=>this.fetch("PUT",t,n,void 0,this.getHeaders()))}async get(t){return this.retryRequest(()=>this.fetch("GET",t,void 0,void 0,this.getHeaders()))}async post(t,n){return this.retryRequest(()=>this.fetch("POST",t,n,void 0,this.getHeaders()))}async shareThread(t,n){return(await this.put("/project/thread/share",{threadId:t,isShared:n})).json()}connectStreamableHttpMCP(t,n,i,o){const l=()=>fetch(new URL("mcp",this.httpEndpoint.endsWith("/")?this.httpEndpoint:`${this.httpEndpoint}/`),{method:"POST",headers:{"Content-Type":"application/json",...t?{"x-session-id":t}:{},...this.getHeaders()},body:JSON.stringify({clientType:"streamable-http",name:n,url:i,sessionId:t,...o?{headers:o}:{}})}).then(async u=>{if(u.status===401)throw new Error("Unauthorized");const c=await u.json();return{success:u.ok,mcp:c.mcp,error:c.detail}});return this.retryRequest(l)}}function fa(e={}){console.log("TIAWidget: Initializing...");const{containerId:t="tia-widget-root",onError:n=A=>{console.error("TIAWidget error:",A),PC.error(A.message)},token:i,serverUrl:o}=e,l=o||"https://v2.tia.ascenthr.ai";console.log("TIAWidget: Using API URL:",l),i&&console.log("TIAWidget: Token provided for authentication");let u=document.getElementById(t);u?console.log("TIAWidget: Found existing container element"):(u=document.createElement("div"),u.id=t,u.style.position="fixed",u.style.bottom="20px",u.style.right="20px",u.style.zIndex="9999",document.body.appendChild(u),console.log("TIAWidget: Created container element"));const c="tia-widget-font";if(!document.getElementById(c)){const A=document.createElement("link");A.id=c,A.rel="stylesheet",A.href="https://fonts.googleapis.com/css2?family=Manrope:wght@200..800&display=swap",document.head.appendChild(A)}const d=u.shadowRoot||u.attachShadow({mode:"open"});if(!d.querySelector("style[data-tia-styles]")){const A=document.createElement("style");A.setAttribute("data-tia-styles","true"),A.textContent=xM,d.appendChild(A)}let h=d.querySelector("#tia-react-root");h||(h=document.createElement("div"),h.id="tia-react-root",d.appendChild(h));const p=new URL(l).toString(),m=()=>{window.location.pathname!==Y0()+"/login"&&(window.location.href=Y0()+"/login")},w=A=>{const P=A?.message||A?.toString()||"An error occurred";n(new Error(P))},v=new QC(p,"webapp",{},m,w,i),S=wM.createRoot(h);return S.render(rt.jsx(js.Provider,{value:v,children:rt.jsx(YD,{children:rt.jsx(zC,{})})})),{unmount:()=>S.unmount()}}if(typeof window<"u"){const e=document.currentScript;if(e?.hasAttribute("data-auto-init")){console.log("TIAWidget: Auto-initializing from script tag");const t=e.getAttribute("data-container-id")||void 0;document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{fa({containerId:t})}):fa({containerId:t})}else console.log("TIAWidget: Script loaded, no auto-init. Call TIAWidget.init() manually.")}return typeof window<"u"&&(window.TIAWidget={init:fa}),$a.initTIAWidget=fa,Object.defineProperty($a,Symbol.toStringTag,{value:"Module"}),$a})({},React,ReactDOM);
354
354
  //# sourceMappingURL=tia-widget.iife.js.map