PageSourceSearch

https://www.useparsley.ai/_next/static/chunks/431-ac1b03ca71290baf.js

js useparsley.ai collected 2026-10-02 01:12:25 UTC 122,081 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[431],{9205:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(2265);let i=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),o=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim()};var a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let s=(0,r.forwardRef)((e,t)=>{let{color:n="currentColor",size:i=24,strokeWidth:s=2,absoluteStrokeWidth:l,className:u="",children:c,iconNode:d,...f}=e;return(0,r.createElement)("svg",{ref:t,...a,width:i,height:i,stroke:n,strokeWidth:l?24*Number(s)/Number(i):s,className:o("lucide",u),...f},[...d.map(e=>{let[t,n]=e;return(0,r.createElement)(t,n)}),...Array.isArray(c)?c:[c]])}),l=(e,t)=>{let n=(0,r.forwardRef)((n,a)=>{let{className:l,...u}=n;return(0,r.createElement)(s,{ref:a,iconNode:t,className:o("lucide-".concat(i(e)),l),...u})});return n.displayName="".concat(e),n}},2489:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(9205).Z)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},257:function(e,t,n){"use strict";var r,i;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(i=n.g.process)?void 0:i.env)?n.g.process:n(4227)},8221:function(e,t){"use strict";let n;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{DOMAttributeNames:function(){return r},default:function(){return a},isEqualNode:function(){return o}});let r={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"};function i(e){let{type:t,props:n}=e,i=document.createElement(t);for(let e in n){if(!n.hasOwnProperty(e)||"children"===e||"dangerouslySetInnerHTML"===e||void 0===n[e])continue;let o=r[e]||e.toLowerCase();"script"===t&&("async"===o||"defer"===o||"noModule"===o)?i[o]=!!n[e]:i.setAttribute(o,n[e])}let{children:o,dangerouslySetInnerHTML:a}=n;return a?i.innerHTML=a.__html||"":o&&(i.textContent="string"==typeof o?o:Array.isArray(o)?o.join(""):""),i}function o(e,t){if(e instanceof HTMLElement&&t instanceof HTMLElement){let n=t.getAttribute("nonce");if(n&&!e.getAttribute("nonce")){let r=t.cloneNode(!0);return r.setAttribute("nonce",""),r.nonce=n,n===e.nonce&&e.isEqualNode(r)}}return e.isEqualNode(t)}function a(){return{mountedInstances:new Set,updateHead:e=>{let t={};e.forEach(e=>{if("link"===e.type&&e.props["data-optimized-fonts"]){if(document.querySelector('style[data-href="'+e.props["data-href"]+'"]'))return;e.props.href=e.props["data-href"],e.props["data-href"]=void 0}let n=t[e.type]||[];n.push(e),t[e.type]=n});let r=t.title?t.title[0]:null,i="";if(r){let{children:e}=r.props;i="string"==typeof e?e:Array.isArray(e)?e.join(""):""}i!==document.title&&(document.title=i),["meta","base","link","style","script"].forEach(e=>{n(e,t[e]||[])})}}}n=(e,t)=>{let n=document.getElementsByTagName("head")[0],r=n.querySelector("meta[name=next-head-count]"),a=Number(r.content),s=[];for(let t=0,n=r.previousElementSibling;t<a;t++,n=(null==n?void 0:n.previousElementSibling)||null){var l;(null==n?void 0:null==(l=n.tagName)?void 0:l.toLowerCase())===e&&s.push(n)}let u=t.map(i).filter(e=>{for(let t=0,n=s.length;t<n;t++)if(o(s[t],e))return s.splice(t,1),!1;return!0});s.forEach(e=>{var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),u.forEach(e=>n.insertBefore(e,r)),r.content=(a-s.length+u.length).toString()},("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8003:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{default:function(){return b},handleClientScriptLoad:function(){return v},initScriptLoader:function(){return y}});let r=n(7043),i=n(3099),o=n(7437),a=r._(n(4887)),s=i._(n(2265)),l=n(8701),u=n(8221),c=n(3515),d=new Map,f=new Set,h=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"],p=e=>
1{if(a.default.preinit){e.forEach(e=>{a.default.preinit(e,{as:"style"})});return}if("undefined"!=typeof window){let t=document.head;e.forEach(e=>{let n=document.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=e,t.appendChild(n)})}},m=e=>{let{src:t,id:n,onLoad:r=()=>{},onReady:i=null,dangerouslySetInnerHTML:o,children:a="",strategy:s="afterInteractive",onError:l,stylesheets:c}=e,m=n||t;if(m&&f.has(m))return;if(d.has(t)){f.add(m),d.get(t).then(r,l);return}let v=()=>{i&&i(),f.add(m)},y=document.createElement("script"),g=new Promise((e,t)=>{y.addEventListener("load",function(t){e(),r&&r.call(this,t),v()}),y.addEventListener("error",function(e){t(e)})}).catch(function(e){l&&l(e)});for(let[n,r]of(o?(y.innerHTML=o.__html||"",v()):a?(y.textContent="string"==typeof a?a:Array.isArray(a)?a.join(""):"",v()):t&&(y.src=t,d.set(t,g)),Object.entries(e))){if(void 0===r||h.includes(n))continue;let e=u.DOMAttributeNames[n]||n.toLowerCase();y.setAttribute(e,r)}"worker"===s&&y.setAttribute("type","text/partytown"),y.setAttribute("data-nscript",s),c&&p(c),document.body.appendChild(y)};function v(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,c.requestIdleCallback)(()=>m(e))}):m(e)}function y(e){e.forEach(v),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(e=>{let t=e.id||e.getAttribute("src");f.add(t)})}function g(e){let{id:t,src:n="",onLoad:r=()=>{},onReady:i=null,strategy:u="afterInteractive",onError:d,stylesheets:h,...p}=e,{updateScripts:v,scripts:y,getIsSsr:g,appDir:b,nonce:w}=(0,s.useContext)(l.HeadManagerContext),x=(0,s.useRef)(!1);(0,s.useEffect)(()=>{let e=t||n;x.current||(i&&e&&f.has(e)&&i(),x.current=!0)},[i,t,n]);let E=(0,s.useRef)(!1);if((0,s.useEffect)(()=>{!E.current&&("afterInteractive"===u?m(e):"lazyOnload"===u&&("complete"===document.readyState?(0,c.requestIdleCallback)(()=>m(e)):window.addEventListener("load",()=>{(0,c.requestIdleCallback)(()=>m(e))})),E.current=!0)},[e,u]),("beforeInteractive"===u||"worker"===u)&&(v?(y[u]=(y[u]||[]).concat([{id:t,src:n,onLoad:r,onReady:i,onError:d,...p}]),v(y)):g&&g()?f.add(t||n):g&&!g()&&m(e)),b){if(h&&h.forEach(e=>{a.default.preinit(e,{as:"style"})}),"beforeInteractive"===u)return n?(a.default.preload(n,p.integrity?{as:"script",integrity:p.integrity,nonce:w,crossOrigin:p.crossOrigin}:{as:"script",nonce:w,crossOrigin:p.crossOrigin}),(0,o.jsx)("script",{nonce:w,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([n,{...p,id:t}])+")"}})):(p.dangerouslySetInnerHTML&&(p.children=p.dangerouslySetInnerHTML.__html,delete p.dangerouslySetInnerHTML),(0,o.jsx)("script",{nonce:w,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...p,id:t}])+")"}}));"afterInteractive"===u&&n&&a.default.preload(n,p.integrity?{as:"script",integrity:p.integrity,nonce:w,crossOrigin:p.crossOrigin}:{as:"script",nonce:w,crossOrigin:p.crossOrigin})}return null}Object.defineProperty(g,"__nextScript",{value:!0});let b=g;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4227:function(e){!function(){var t={229:function(e){var t,n,r,i=e.exports={};function o(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var l=[],u=!1,c=-1;function d(){u&&r&&(u=!1,r.length?l=r.concat(l):c=-1,l.length&&f())}function f(){if(!u){var e=s(d);u=!0;for(var t=l.length;t;){for(r=l,l=[];++c<t;)r&&r[c].run();c=-1,t=l.length}r=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new h(e,t)),1!==l.length||u||s(f)},h.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw Error("process.chdir is not supported")},i.umask=function(){return 0}}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var o=n[e]={exports:{}},a=!0;try{t[e](o,o.exports,r),a=!1}finally{a&&delete n[e]}return o.exports}r.ab="//";var i=r(229);e.exports=i}()},3664:function(e,t,n){"use strict";n.d(t,{zf:function(){return s}});var r,i=n(6214),o=n(2265),a=(0,o.createContext)({get client(){return r},bootstrap:void 0});function s(e){var t,n,i=e.children,s=e.client,l=e.apiKey,u=e.options,c=(0,o.useRef)(null),d=(0,o.useMemo)(function(){if(s)return l&&console.warn("[PostHog.js] You have provided both `client` and `apiKey` to `PostHogProvider`. `apiKey` will be ignored in favour of `client`."),u&&console.warn("[PostHog.js] You have provided both `client` and `options` to `PostHogProvider`. `options` will be ignored in favour of `client`."),s;var e=r;return l||console.warn("[PostHog.js] No `apiKey` or `client` were provided to `PostHogProvider`. Using default global `window.posthog` instance. You must initialize it manually. This is not recommended behavior."),e},[s,l,JSON.stringify(u)]);return(0,o.useEffect)(function(){if(!s&&l){var e=r,t=c.current;t?(l!==t.apiKey&&console.warn("[PostHog.js] You have provided a different `apiKey` to `PostHogProvider` than the one that was already initialized. This is not supported by our provider and we'll keep using the previous key. If you need to toggle between API Keys you need to control the `client` yourself and pass it in as a prop rather than an `apiKey` prop."),u&&!function e(t,n,r){if(void 0===r&&(r=new WeakMap),t===n)return!0;
1if("object"!=typeof t||null===t||"object"!=typeof n||null===n)return!1;if(r.has(t)&&r.get(t)===n)return!0;r.set(t,n);var i=Object.keys(t),o=Object.keys(n);if(i.length!==o.length)return!1;for(var a=0;a<i.length;a++){var s=i[a];if(!o.includes(s)||!e(t[s],n[s],r))return!1}return!0}(u,t.options)&&e.set_config(u)):(e.__loaded&&console.warn("[PostHog.js] `posthog` was already loaded elsewhere. This may cause issues."),e.init(l,u)),c.current={apiKey:l,options:null!=u?u:{}}}},[s,l,JSON.stringify(u)]),o.createElement(a.Provider,{value:{client:d,bootstrap:null!==(t=null==u?void 0:u.bootstrap)&&void 0!==t?t:null===(n=null==s?void 0:s.config)||void 0===n?void 0:n.bootstrap}},i)}var l=function(e){return"function"==typeof e},u=function(e,t){return(u=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};"function"==typeof SuppressedError&&SuppressedError;var c={componentStack:null,exceptionEvent:null,error:null};!function(e){function t(t){var n=e.call(this,t)||this;return n.state=c,n}(function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)})(t,e),t.prototype.componentDidCatch=function(e,t){var n,r=this.props.additionalProperties;l(r)?n=r(e):"object"==typeof r&&(n=r);var i=this.context.client.captureException(e,n),o=t.componentStack;this.setState({error:e,componentStack:null!=o?o:null,exceptionEvent:i})},t.prototype.render=function(){var e=this.props,t=e.children,n=e.fallback,r=this.state;if(null==r.componentStack)return l(t)?t():t;var i=l(n)?o.createElement(n,{error:r.error,componentStack:r.componentStack,exceptionEvent:r.exceptionEvent}):n;return o.isValidElement(i)?i:(console.warn("[PostHog.js][PostHogErrorBoundary] Invalid fallback prop, provide a valid React element or a function that returns a valid React element."),o.createElement(o.Fragment,null))},t.contextType=a}(o.Component),r=i.ZP},6780:function(e){e.exports={style:{fontFamily:"'__IBM_Plex_Mono_b396fc', '__IBM_Plex_Mono_Fallback_b396fc'",fontStyle:"normal"},className:"__className_b396fc",variable:"__variable_b396fc"}},7841:function(e){e.exports={style:{fontFamily:"'__Plus_Jakarta_Sans_14db65', '__Plus_Jakarta_Sans_Fallback_14db65'",fontStyle:"normal"},className:"__className_14db65",variable:"__variable_14db65"}},9803:function(e){e.exports={style:{fontFamily:"'__satoshi_85e388', '__satoshi_Fallback_85e388'"},className:"__className_85e388",variable:"__variable_85e388"}},6741:function(e,t,n){"use strict";function r(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}n.d(t,{M:function(){return r}})},3966:function(e,t,n){"use strict";n.d(t,{b:function(){return o}});var r=n(2265),i=n(7437);function o(e,t=[]){let n=[],o=()=>{let t=n.map(e=>r.createContext(e));return function(n){let i=n?.[e]||t;return r.useMemo(()=>({[`__scope${e}`]:{...n,[e]:i}}),[n,i])}};return o.scopeName=e,[function(t,o){let a=r.createContext(o),s=n.length;n=[...n,o];let l=t=>{let{scope:n,children:o,...l}=t,u=n?.[e]?.[s]||a,c=r.useMemo(()=>l,Object.values(l));return(0,i.jsx)(u.Provider,{value:c,children:o})};return l.displayName=t+"Provider",[l,function(n,i){let l=i?.[e]?.[s]||a,u=r.useContext(l);if(u)return u;if(void 0!==o)return o;throw Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let i=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return r.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}(o,...t)]}},5278:function(e,t,n){"use strict";n.d(t,{I0:function(){return y},XB:function(){return f},fC:function(){return v}});var r,i=n(2265),o=n(6741),a=n(6840),s=n(8575),l=n(6606),u=n(7437),c="dismissableLayer.update",d=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),f=i.forwardRef((e,t)=>
1{var n,f;let{disableOutsidePointerEvents:h=!1,onEscapeKeyDown:v,onPointerDownOutside:y,onFocusOutside:g,onInteractOutside:b,onDismiss:w,...x}=e,E=i.useContext(d),[C,T]=i.useState(null),P=null!==(f=null==C?void 0:C.ownerDocument)&&void 0!==f?f:null===(n=globalThis)||void 0===n?void 0:n.document,[,S]=i.useState({}),R=(0,s.e)(t,e=>T(e)),O=Array.from(E.layers),[M]=[...E.layersWithOutsidePointerEventsDisabled].slice(-1),k=O.indexOf(M),N=C?O.indexOf(C):-1,A=E.layersWithOutsidePointerEventsDisabled.size>0,L=N>=k,j=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===(t=globalThis)||void 0===t?void 0:t.document,r=(0,l.W)(e),o=i.useRef(!1),a=i.useRef(()=>{});return i.useEffect(()=>{let e=e=>{if(e.target&&!o.current){let t=function(){m("dismissableLayer.pointerDownOutside",r,i,{discrete:!0})},i={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",a.current),a.current=t,n.addEventListener("click",a.current,{once:!0})):t()}else n.removeEventListener("click",a.current);o.current=!1},t=window.setTimeout(()=>{n.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",a.current)}},[n,r]),{onPointerDownCapture:()=>o.current=!0}}(e=>{let t=e.target,n=[...E.branches].some(e=>e.contains(t));!L||n||(null==y||y(e),null==b||b(e),e.defaultPrevented||null==w||w())},P),_=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===(t=globalThis)||void 0===t?void 0:t.document,r=(0,l.W)(e),o=i.useRef(!1);return i.useEffect(()=>{let e=e=>{e.target&&!o.current&&m("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)},[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(e=>{let t=e.target;[...E.branches].some(e=>e.contains(t))||(null==g||g(e),null==b||b(e),e.defaultPrevented||null==w||w())},P);return!function(e,t=globalThis?.document){let n=(0,l.W)(e);i.useEffect(()=>{let e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{N!==E.layers.size-1||(null==v||v(e),!e.defaultPrevented&&w&&(e.preventDefault(),w()))},P),i.useEffect(()=>{if(C)return h&&(0===E.layersWithOutsidePointerEventsDisabled.size&&(r=P.body.style.pointerEvents,P.body.style.pointerEvents="none"),E.layersWithOutsidePointerEventsDisabled.add(C)),E.layers.add(C),p(),()=>{h&&1===E.layersWithOutsidePointerEventsDisabled.size&&(P.body.style.pointerEvents=r)}},[C,P,h,E]),i.useEffect(()=>()=>{C&&(E.layers.delete(C),E.layersWithOutsidePointerEventsDisabled.delete(C),p())},[C,E]),i.useEffect(()=>{let e=()=>S({});return document.addEventListener(c,e),()=>document.removeEventListener(c,e)},[]),(0,u.jsx)(a.WV.div,{...x,ref:R,style:{pointerEvents:A?L?"auto":"none":void 0,...e.style},onFocusCapture:(0,o.M)(e.onFocusCapture,_.onFocusCapture),onBlurCapture:(0,o.M)(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:(0,o.M)(e.onPointerDownCapture,j.onPointerDownCapture)})});f.displayName="DismissableLayer";var h=i.forwardRef((e,t)=>{let n=i.useContext(d),r=i.useRef(null),o=(0,s.e)(t,r);return i.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,u.jsx)(a.WV.div,{...e,ref:o})});function p(){let e=new CustomEvent(c);document.dispatchEvent(e)}function m(e,t,n,r){let{discrete:i}=r,o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),i?(0,a.jH)(o,s):o.dispatchEvent(s)}h.displayName="DismissableLayerBranch";var v=f,y=h},3832:function(e,t,n){"use strict";n.d(t,{h:function(){return l}});var r=n(2265),i=n(4887),o=n(6840),a=n(1188),s=n(7437),l=r.forwardRef((e,t)=>{var n,l;let{container:u,...c}=e,[d,f]=r.useState(!1);(0,a.b)(()=>f(!0),[]);let h=u||d&&(null===(l=globalThis)||void 0===l?void 0:null===(n=l.document)||void 0===n?void 0:n.body);return h?i.createPortal((0,s.jsx)(o.WV.div,{...c,ref:t}),h):null});l.displayName="Portal"},1599:function(e,t,n){"use strict";n.d(t,{z:function(){return a}});var r=n(2265),i=n(8575),o=n(1188),a=e=>{var t,n;let a,l;let{present:u,children:c}=e,d=function(e){var t,n;let[i,a]=r.useState(),l=r.useRef({}),u=r.useRef(e),c=r.useRef("none"),[d,f]=(t=e?"mounted":"unmounted",n={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},r.useReducer((e,t)=>
1{let r=n[e][t];return null!=r?r:e},t));return r.useEffect(()=>{let e=s(l.current);c.current="mounted"===d?e:"none"},[d]),(0,o.b)(()=>{let t=l.current,n=u.current;if(n!==e){let r=c.current,i=s(t);e?f("MOUNT"):"none"===i||(null==t?void 0:t.display)==="none"?f("UNMOUNT"):n&&r!==i?f("ANIMATION_OUT"):f("UNMOUNT"),u.current=e}},[e,f]),(0,o.b)(()=>{if(i){var e;let t;let n=null!==(e=i.ownerDocument.defaultView)&&void 0!==e?e:window,r=e=>{let r=s(l.current).includes(e.animationName);if(e.target===i&&r&&(f("ANIMATION_END"),!u.current)){let e=i.style.animationFillMode;i.style.animationFillMode="forwards",t=n.setTimeout(()=>{"forwards"===i.style.animationFillMode&&(i.style.animationFillMode=e)})}},o=e=>{e.target===i&&(c.current=s(l.current))};return i.addEventListener("animationstart",o),i.addEventListener("animationcancel",r),i.addEventListener("animationend",r),()=>{n.clearTimeout(t),i.removeEventListener("animationstart",o),i.removeEventListener("animationcancel",r),i.removeEventListener("animationend",r)}}f("ANIMATION_END")},[i,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:r.useCallback(e=>{e&&(l.current=getComputedStyle(e)),a(e)},[])}}(u),f="function"==typeof c?c({present:d.isPresent}):r.Children.only(c),h=(0,i.e)(d.ref,(a=null===(t=Object.getOwnPropertyDescriptor(f.props,"ref"))||void 0===t?void 0:t.get)&&"isReactWarning"in a&&a.isReactWarning?f.ref:(a=null===(n=Object.getOwnPropertyDescriptor(f,"ref"))||void 0===n?void 0:n.get)&&"isReactWarning"in a&&a.isReactWarning?f.props.ref:f.props.ref||f.ref);return"function"==typeof c||d.isPresent?r.cloneElement(f,{ref:h}):null};function s(e){return(null==e?void 0:e.animationName)||"none"}a.displayName="Presence"},6840:function(e,t,n){"use strict";n.d(t,{WV:function(){return s},jH:function(){return l}});var r=n(2265),i=n(4887),o=n(7495),a=n(7437),s=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let n=r.forwardRef((e,n)=>{let{asChild:r,...i}=e,s=r?o.g7:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,a.jsx)(s,{...i,ref:n})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function l(e,t){e&&i.flushSync(()=>e.dispatchEvent(t))}},1580:function(e,t,n){"use strict";n.d(t,{aU:function(){return et},x8:function(){return en},dk:function(){return ee},zt:function(){return G},fC:function(){return J},Dx:function(){return Z},l_:function(){return X}});var r=n(2265),i=n(4887),o=n(6741),a=n(8575),s=n(7437),l=n(7495),u=n(3966),c=n(5278),d=n(3832),f=n(1599),h=n(6840),p=n(6606),m=n(886),v=n(1188),y=n(5098),g="ToastProvider",[b,w,x]=function(e){let t=e+"CollectionProvider",[n,i]=function(e,t=[]){let n=[],i=()=>{let t=n.map(e=>r.createContext(e));return function(n){let i=n?.[e]||t;return r.useMemo(()=>({[`__scope${e}`]:{...n,[e]:i}}),[n,i])}};return i.scopeName=e,[function(t,i){let o=r.createContext(i),a=n.length;function l(t){let{scope:n,children:i,...l}=t,u=n?.[e][a]||o,c=r.useMemo(()=>l,Object.values(l));return(0,s.jsx)(u.Provider,{value:c,children:i})}return n=[...n,i],l.displayName=t+"Provider",[l,function(n,s){let l=s?.[e][a]||o,u=r.useContext(l);if(u)return u;if(void 0!==i)return i;throw Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let i=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return r.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}(i,...t)]}(t),[o,u]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=e=>{let{scope:t,children:n}=e,i=r.useRef(null),a=r.useRef(new Map).current;return(0,s.jsx)(o,{scope:t,itemMap:a,collectionRef:i,children:n})};c.displayName=t;let d=e+"CollectionSlot",f=r.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=u(d,n),o=(0,a.e)(t,i.collectionRef);return(0,s.jsx)(l.g7,{ref:o,children:r})});f.displayName=d;let h=e+"CollectionItemSlot",p="data-radix-collection-item",m=r.forwardRef((e,t)=>{let{scope:n,children:i,...o}=e,c=r.useRef(null),d=(0,a.e)(t,c),f=u(h,n);return r.useEffect(()=>(f.itemMap.set(c,{ref:c,...o}),()=>void f.itemMap.delete(c))),(0,s.jsx)(l.g7,{[p]:"",ref:d,children:i})});return m.displayName=h,[{Provider:c,Slot:f,ItemSlot:m},function(t){let n=u(e+"CollectionConsumer",t);return r.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll("[".concat(p,"]")));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])},i]}("Toast"),[E,C]=(0,u.b)("Toast",[x]),[T,P]=E(g),S=e=>{let{__scopeToast:t,label:n="Notification",duration:i=5e3,swipeDirection:o="right",swipeThreshold:a=50,children:l}=e,[u,c]=r.useState(null),[d,f]=r.useState(0),h=r.useRef(!1),p=r.useRef(!1);return n.trim()||console.error("Invalid prop `label` supplied to `".concat(g,"`. Expected non-empty `string`.")),(0,s.jsx)(b.Provider,{scope:t,children:(0,s.jsx)(T,{scope:t,label:n,duration:i,swipeDirection:o,swipeThreshold:a,toastCount:d,viewport:u,onViewportChange:c,onToastAdd:r.useCallback(()=>f(e=>e+1),[]),onToastRemove:r.useCallback(()=>f(e=>e-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:p,children:l})})};S.displayName=g;var R="ToastViewport",O=["F8"],M="toast.viewportPause",k="toast.viewportResume",N=r.forwardRef((e,t)=>
1{let{__scopeToast:n,hotkey:i=O,label:o="Notifications ({hotkey})",...l}=e,u=P(R,n),d=w(n),f=r.useRef(null),p=r.useRef(null),m=r.useRef(null),v=r.useRef(null),y=(0,a.e)(t,v,u.onViewportChange),g=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=u.toastCount>0;r.useEffect(()=>{let e=e=>{var t;0!==i.length&&i.every(t=>e[t]||e.code===t)&&(null===(t=v.current)||void 0===t||t.focus())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[i]),r.useEffect(()=>{let e=f.current,t=v.current;if(x&&e&&t){let n=()=>{if(!u.isClosePausedRef.current){let e=new CustomEvent(M);t.dispatchEvent(e),u.isClosePausedRef.current=!0}},r=()=>{if(u.isClosePausedRef.current){let e=new CustomEvent(k);t.dispatchEvent(e),u.isClosePausedRef.current=!1}},i=t=>{e.contains(t.relatedTarget)||r()},o=()=>{e.contains(document.activeElement)||r()};return e.addEventListener("focusin",n),e.addEventListener("focusout",i),e.addEventListener("pointermove",n),e.addEventListener("pointerleave",o),window.addEventListener("blur",n),window.addEventListener("focus",r),()=>{e.removeEventListener("focusin",n),e.removeEventListener("focusout",i),e.removeEventListener("pointermove",n),e.removeEventListener("pointerleave",o),window.removeEventListener("blur",n),window.removeEventListener("focus",r)}}},[x,u.isClosePausedRef]);let E=r.useCallback(e=>{let{tabbingDirection:t}=e,n=d().map(e=>{let n=e.ref.current,r=[n,...function(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}(n)];return"forwards"===t?r:r.reverse()});return("forwards"===t?n.reverse():n).flat()},[d]);return r.useEffect(()=>{let e=v.current;if(e){let t=t=>{let n=t.altKey||t.ctrlKey||t.metaKey;if("Tab"===t.key&&!n){var r,i,o;let n=document.activeElement,a=t.shiftKey;if(t.target===e&&a){null===(r=p.current)||void 0===r||r.focus();return}let s=E({tabbingDirection:a?"backwards":"forwards"}),l=s.findIndex(e=>e===n);$(s.slice(l+1))?t.preventDefault():a?null===(i=p.current)||void 0===i||i.focus():null===(o=m.current)||void 0===o||o.focus()}};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)}},[d,E]),(0,s.jsxs)(c.I0,{ref:f,role:"region","aria-label":o.replace("{hotkey}",g),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&(0,s.jsx)(L,{ref:p,onFocusFromOutsideViewport:()=>{$(E({tabbingDirection:"forwards"}))}}),(0,s.jsx)(b.Slot,{scope:n,children:(0,s.jsx)(h.WV.ol,{tabIndex:-1,...l,ref:y})}),x&&(0,s.jsx)(L,{ref:m,onFocusFromOutsideViewport:()=>{$(E({tabbingDirection:"backwards"}))}})]})});N.displayName=R;var A="ToastFocusProxy",L=r.forwardRef((e,t)=>{let{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,o=P(A,n);return(0,s.jsx)(y.T,{"aria-hidden":!0,tabIndex:0,...i,ref:t,style:{position:"fixed"},onFocus:e=>{var t;let n=e.relatedTarget;(null===(t=o.viewport)||void 0===t?void 0:t.contains(n))||r()}})});L.displayName=A;var j="Toast",_=r.forwardRef((e,t)=>{let{forceMount:n,open:r,defaultOpen:i,onOpenChange:a,...l}=e,[u=!0,c]=(0,m.T)({prop:r,defaultProp:i,onChange:a});return(0,s.jsx)(f.z,{present:n||u,children:(0,s.jsx)(I,{open:u,...l,ref:t,onClose:()=>c(!1),onPause:(0,p.W)(e.onPause),onResume:(0,p.W)(e.onResume),onSwipeStart:(0,o.M)(e.onSwipeStart,e=>{e.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:(0,o.M)(e.onSwipeMove,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","move"),e.currentTarget.style.setProperty("--radix-toast-swipe-move-x","".concat(t,"px")),e.currentTarget.style.setProperty("--radix-toast-swipe-move-y","".concat(n,"px"))}),onSwipeCancel:(0,o.M)(e.onSwipeCancel,e=>{e.currentTarget.setAttribute("data-swipe","cancel"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:(0,o.M)(e.onSwipeEnd,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","end"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.setProperty("--radix-toast-swipe-end-x","".concat(t,"px")),e.currentTarget.style.setProperty("--radix-toast-swipe-end-y","".concat(n,"px")),c(!1)})})})});_.displayName=j;var[D,F]=E(j,{onClose(){}}),I=r.forwardRef((e,t)=>
1{let{__scopeToast:n,type:l="foreground",duration:u,open:d,onClose:f,onEscapeKeyDown:m,onPause:v,onResume:y,onSwipeStart:g,onSwipeMove:w,onSwipeCancel:x,onSwipeEnd:E,...C}=e,T=P(j,n),[S,R]=r.useState(null),O=(0,a.e)(t,e=>R(e)),N=r.useRef(null),A=r.useRef(null),L=u||T.duration,_=r.useRef(0),F=r.useRef(L),I=r.useRef(0),{onToastAdd:H,onToastRemove:B}=T,W=(0,p.W)(()=>{var e;(null==S?void 0:S.contains(document.activeElement))&&(null===(e=T.viewport)||void 0===e||e.focus()),f()}),z=r.useCallback(e=>{e&&e!==1/0&&(window.clearTimeout(I.current),_.current=new Date().getTime(),I.current=window.setTimeout(W,e))},[W]);r.useEffect(()=>{let e=T.viewport;if(e){let t=()=>{z(F.current),null==y||y()},n=()=>{let e=new Date().getTime()-_.current;F.current=F.current-e,window.clearTimeout(I.current),null==v||v()};return e.addEventListener(M,n),e.addEventListener(k,t),()=>{e.removeEventListener(M,n),e.removeEventListener(k,t)}}},[T.viewport,L,v,y,z]),r.useEffect(()=>{d&&!T.isClosePausedRef.current&&z(L)},[d,L,T.isClosePausedRef,z]),r.useEffect(()=>(H(),()=>B()),[H,B]);let K=r.useMemo(()=>S?function e(t){let n=[];return Array.from(t.childNodes).forEach(t=>{if(t.nodeType===t.TEXT_NODE&&t.textContent&&n.push(t.textContent),t.nodeType===t.ELEMENT_NODE){let r=t.ariaHidden||t.hidden||"none"===t.style.display,i=""===t.dataset.radixToastAnnounceExclude;if(!r){if(i){let e=t.dataset.radixToastAnnounceAlt;e&&n.push(e)}else n.push(...e(t))}}}),n}(S):null,[S]);return T.viewport?(0,s.jsxs)(s.Fragment,{children:[K&&(0,s.jsx)(q,{__scopeToast:n,role:"status","aria-live":"foreground"===l?"assertive":"polite","aria-atomic":!0,children:K}),(0,s.jsx)(D,{scope:n,onClose:W,children:i.createPortal((0,s.jsx)(b.ItemSlot,{scope:n,children:(0,s.jsx)(c.fC,{asChild:!0,onEscapeKeyDown:(0,o.M)(m,()=>{T.isFocusedToastEscapeKeyDownRef.current||W(),T.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,s.jsx)(h.WV.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":d?"open":"closed","data-swipe-direction":T.swipeDirection,...C,ref:O,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:(0,o.M)(e.onKeyDown,e=>{"Escape"!==e.key||(null==m||m(e.nativeEvent),e.nativeEvent.defaultPrevented||(T.isFocusedToastEscapeKeyDownRef.current=!0,W()))}),onPointerDown:(0,o.M)(e.onPointerDown,e=>{0===e.button&&(N.current={x:e.clientX,y:e.clientY})}),onPointerMove:(0,o.M)(e.onPointerMove,e=>{if(!N.current)return;let t=e.clientX-N.current.x,n=e.clientY-N.current.y,r=!!A.current,i=["left","right"].includes(T.swipeDirection),o=["left","up"].includes(T.swipeDirection)?Math.min:Math.max,a=i?o(0,t):0,s=i?0:o(0,n),l="touch"===e.pointerType?10:2,u={x:a,y:s},c={originalEvent:e,delta:u};r?(A.current=u,V("toast.swipeMove",w,c,{discrete:!1})):Y(u,T.swipeDirection,l)?(A.current=u,V("toast.swipeStart",g,c,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>l||Math.abs(n)>l)&&(N.current=null)}),onPointerUp:(0,o.M)(e.onPointerUp,e=>{let t=A.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),A.current=null,N.current=null,t){let n=e.currentTarget,r={originalEvent:e,delta:t};Y(t,T.swipeDirection,T.swipeThreshold)?V("toast.swipeEnd",E,r,{discrete:!0}):V("toast.swipeCancel",x,r,{discrete:!0}),n.addEventListener("click",e=>e.preventDefault(),{once:!0})}})})})}),T.viewport)})]}):null}),q=e=>{let{__scopeToast:t,children:n,...i}=e,o=P(j,t),[a,l]=r.useState(!1),[u,c]=r.useState(!1);return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>{},t=(0,p.W)(e);(0,v.b)(()=>{let e=0,n=0;return e=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}},[t])}(()=>l(!0)),r.useEffect(()=>{let e=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(e)},[]),u?null:(0,s.jsx)(d.h,{asChild:!0,children:(0,s.jsx)(y.T,{...i,children:a&&(0,s.jsxs)(s.Fragment,{children:[o.label," ",n]})})})},H=r.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,s.jsx)(h.WV.div,{...r,ref:t})});H.displayName="ToastTitle";var B=r.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,s.jsx)(h.WV.div,{...r,ref:t})});B.displayName="ToastDescription";var W="ToastAction",z=r.forwardRef((e,t)=>
1{let{altText:n,...r}=e;return n.trim()?(0,s.jsx)(Q,{altText:n,asChild:!0,children:(0,s.jsx)(U,{...r,ref:t})}):(console.error("Invalid prop `altText` supplied to `".concat(W,"`. Expected non-empty `string`.")),null)});z.displayName=W;var K="ToastClose",U=r.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e,i=F(K,n);return(0,s.jsx)(Q,{asChild:!0,children:(0,s.jsx)(h.WV.button,{type:"button",...r,ref:t,onClick:(0,o.M)(e.onClick,i.onClose)})})});U.displayName=K;var Q=r.forwardRef((e,t)=>{let{__scopeToast:n,altText:r,...i}=e;return(0,s.jsx)(h.WV.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function V(e,t,n,r){let{discrete:i}=r,o=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),i?(0,h.jH)(o,a):o.dispatchEvent(a)}var Y=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=Math.abs(e.x),i=Math.abs(e.y),o=r>i;return"left"===t||"right"===t?o&&r>n:!o&&i>n};function $(e){let t=document.activeElement;return e.some(e=>e===t||(e.focus(),document.activeElement!==t))}var G=S,X=N,J=_,Z=H,ee=B,et=z,en=U},5346:function(e,t,n){"use strict";n.d(t,{VY:function(){return ty},zt:function(){return tp},fC:function(){return tm},xz:function(){return tv}});var r=n(2265),i=n.t(r,2),o=n(6741),a=n(8575),s=n(3966),l=n(5278),u=n(1188),c=i["useId".toString()]||(()=>void 0),d=0;let f=["top","right","bottom","left"],h=Math.min,p=Math.max,m=Math.round,v=Math.floor,y=e=>({x:e,y:e}
1),g={left:"right",right:"left",bottom:"top",top:"bottom"},b={start:"end",end:"start"};function w(e,t){return"function"==typeof e?e(t):e}function x(e){return e.split("-")[0]}function E(e){return e.split("-")[1]}function C(e){return"x"===e?"y":"x"}function T(e){return"y"===e?"height":"width"}function P(e){return["top","bottom"].includes(x(e))?"y":"x"}function S(e){return e.replace(/start|end/g,e=>b[e])}function R(e){return e.replace(/left|right|bottom|top/g,e=>g[e])}function O(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function M(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function k(e,t,n){let r,{reference:i,floating:o}=e,a=P(t),s=C(P(t)),l=T(s),u=x(t),c="y"===a,d=i.x+i.width/2-o.width/2,f=i.y+i.height/2-o.height/2,h=i[l]/2-o[l]/2;switch(u){case"top":r={x:d,y:i.y-o.height};break;case"bottom":r={x:d,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:f};break;case"left":r={x:i.x-o.width,y:f};break;default:r={x:i.x,y:i.y}}switch(E(t)){case"start":r[s]-=h*(n&&c?-1:1);break;case"end":r[s]+=h*(n&&c?-1:1)}return r}let N=async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),l=await (null==a.isRTL?void 0:a.isRTL(t)),u=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=k(u,r,l),f=r,h={},p=0;for(let n=0;n<s.length;n++){let{name:o,fn:m}=s[n],{x:v,y:y,data:g,reset:b}=await m({x:c,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:u,platform:a,elements:{reference:e,floating:t}});c=null!=v?v:c,d=null!=y?y:d,h={...h,[o]:{...h[o],...g}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(u=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:i}):b.rects),{x:c,y:d}=k(u,f,l)),n=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:h}};async function A(e,t){var n;void 0===t&&(t={});let{x:r,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=w(t,e),p=O(h),m=s[f?"floating"===d?"reference":"floating":d],v=M(await o.getClippingRect({element:null==(n=await (null==o.isElement?void 0:o.isElement(m)))||n?m:m.contextElement||await (null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),y="floating"===d?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,g=await (null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),b=await (null==o.isElement?void 0:o.isElement(g))&&await (null==o.getScale?void 0:o.getScale(g))||{x:1,y:1},x=M(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:g,strategy:l}):y);return{top:(v.top-x.top+p.top)/b.y,bottom:(x.bottom-v.bottom+p.bottom)/b.y,left:(v.left-x.left+p.left)/b.x,right:(x.right-v.right+p.right)/b.x}}function L(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function j(e){return f.some(t=>e[t]>=0)}async function _(e,t){let{placement:n,platform:r,elements:i}=e,o=await (null==r.isRTL?void 0:r.isRTL(i.floating)),a=x(n),s=E(n),l="y"===P(n),u=["left","top"].includes(a)?-1:1,c=o&&l?-1:1,d=w(t,e),{mainAxis:f,crossAxis:h,alignmentAxis:p}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof p&&(h="end"===s?-1*p:p),l?{x:h*c,y:f*u}:{x:f*u,y:h*c}}function D(){return"undefined"!=typeof window}function F(e){return H(e)?(e.nodeName||"").toLowerCase():"#document"}function I(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function q(e){var t;return null==(t=(H(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function H(e){return!!D()&&(e instanceof Node||e instanceof I(e).Node)}function B(e){return!!D()&&(e instanceof Element||e instanceof I(e).Element)}function W(e){return!!D()&&(e instanceof HTMLElement||e instanceof I(e).HTMLElement)}function z(e){return!!D()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof I(e).ShadowRoot)}function K(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=$(e);
1return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function U(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(e){return!1}})}function Q(e){let t=V(),n=B(e)?$(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some(e=>(n.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(n.contain||"").includes(e))}function V(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}function Y(e){return["html","body","#document"].includes(F(e))}function $(e){return I(e).getComputedStyle(e)}function G(e){return B(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function X(e){if("html"===F(e))return e;let t=e.assignedSlot||e.parentNode||z(e)&&e.host||q(e);return z(t)?t.host:t}function J(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let i=function e(t){let n=X(t);return Y(n)?t.ownerDocument?t.ownerDocument.body:t.body:W(n)&&K(n)?n:e(n)}(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),a=I(i);if(o){let e=Z(a);return t.concat(a,a.visualViewport||[],K(i)?i:[],e&&n?J(e):[])}return t.concat(i,J(i,[],n))}function Z(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ee(e){let t=$(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=W(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=m(n)!==o||m(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function et(e){return B(e)?e:e.contextElement}function en(e){let t=et(e);if(!W(t))return y(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:o}=ee(t),a=(o?m(n.width):n.width)/r,s=(o?m(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}let er=y(0);function ei(e){let t=I(e);return V()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:er}function eo(e,t,n,r){var i;void 0===t&&(t=!1),void 0===n&&(n=!1);let o=e.getBoundingClientRect(),a=et(e),s=y(1);t&&(r?B(r)&&(s=en(r)):s=en(e));let l=(void 0===(i=n)&&(i=!1),r&&(!i||r===I(a))&&i)?ei(a):y(0),u=(o.left+l.x)/s.x,c=(o.top+l.y)/s.y,d=o.width/s.x,f=o.height/s.y;if(a){let e=I(a),t=r&&B(r)?I(r):r,n=e,i=Z(n);for(;i&&r&&t!==n;){let e=en(i),t=i.getBoundingClientRect(),r=$(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;u*=e.x,c*=e.y,d*=e.x,f*=e.y,u+=o,c+=a,i=Z(n=I(i))}}return M({width:d,height:f,x:u,y:c})}function ea(e,t){let n=G(e).scrollLeft;return t?t.left+n:eo(q(e)).left+n}
1function es(e,t,n){let r;if("viewport"===t)r=function(e,t){let n=I(e),r=q(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;let e=V();(!e||e&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){let t=q(e),n=G(e),r=e.ownerDocument.body,i=p(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=p(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),a=-n.scrollLeft+ea(e),s=-n.scrollTop;return"rtl"===$(r).direction&&(a+=p(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}(q(e));else if(B(t))r=function(e,t){let n=eo(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=W(e)?en(e):y(1),a=e.clientWidth*o.x;return{width:a,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}(t,n);else{let n=ei(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return M(r)}function el(e){return"static"===$(e).position}function eu(e,t){if(!W(e)||"fixed"===$(e).position)return null;if(t)return t(e);let n=e.offsetParent;return q(e)===n&&(n=n.ownerDocument.body),n}function ec(e,t){let n=I(e);if(U(e))return n;if(!W(e)){let t=X(e);for(;t&&!Y(t);){if(B(t)&&!el(t))return t;t=X(t)}return n}let r=eu(e,t);for(;r&&["table","td","th"].includes(F(r))&&el(r);)r=eu(r,t);return r&&Y(r)&&el(r)&&!Q(r)?n:r||function(e){let t=X(e);for(;W(t)&&!Y(t);){if(Q(t))return t;if(U(t))break;t=X(t)}return null}(e)||n}let ed=async function(e){let t=this.getOffsetParent||ec,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=W(t),i=q(t),o="fixed"===n,a=eo(e,!0,o,t),s={scrollLeft:0,scrollTop:0},l=y(0);if(r||!r&&!o){if(("body"!==F(t)||K(i))&&(s=G(t)),r){let e=eo(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&(l.x=ea(i))}let u=0,c=0;if(i&&!r&&!o){let e=i.getBoundingClientRect();c=e.top+s.scrollTop,u=e.left+s.scrollLeft-ea(i,e)}return{x:a.left+s.scrollLeft-l.x-u,y:a.top+s.scrollTop-l.y-c,width:a.width,height:a.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},ef={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,o="fixed"===i,a=q(r),s=!!t&&U(t.floating);if(r===a||s&&o)return n;let l={scrollLeft:0,scrollTop:0},u=y(1),c=y(0),d=W(r);if((d||!d&&!o)&&(("body"!==F(r)||K(a))&&(l=G(r)),W(r))){let e=eo(r);u=en(r),c.x=e.x+r.clientLeft,c.y=e.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x,y:n.y*u.y-l.scrollTop*u.y+c.y}},getDocumentElement:q,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,o=[..."clippingAncestors"===n?U(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=J(e,[],!1).filter(e=>B(e)&&"body"!==F(e)),i=null,o="fixed"===$(e).position,a=o?X(e):e;for(;B(a)&&!Y(a);){let t=$(a),n=Q(a);n||"fixed"!==t.position||(i=null),(o?!n&&!i:!n&&"static"===t.position&&!!i&&["absolute","fixed"].includes(i.position)||K(a)&&!n&&function e(t,n){let r=X(t);return!(r===n||!B(r)||Y(r))&&("fixed"===$(r).position||e(r,n))}(e,a))?r=r.filter(e=>e!==a):i=t,a=X(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=o[0],s=o.reduce((e,n)=>{let r=es(t,n,i);return e.top=p(r.top,e.top),e.right=h(r.right,e.right),e.bottom=h(r.bottom,e.bottom),e.left=p(r.left,e.left),e},es(t,a,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:ec,getElementRects:ed,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=ee(e);return{width:t,height:n}},getScale:en,isElement:B,isRTL:function(e){return"rtl"===$(e).direction}},eh=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:i,rects:o,platform:a,elements:s,middlewareData:l}=t,{element:u,padding:c=0}=w(e,t)||{};if(null==u)return{};let d=O(c),f={x:n,y:r},m=C(P(i)),v=T(m),y=await a.getDimensions(u),g="y"===m,b=g?"clientHeight":"clientWidth",x=o.reference[v]+o.reference[m]-f[m]-o.floating[v],S=f[m]-o.reference[m],R=await (null==a.getOffsetParent?void 0:a.getOffsetParent(u)),M=R?R[b]:0;M&&await (null==a.isElement?void 0:a.isElement(R))||(M=s.floating[b]||o.floating[v]);let k=M/2-y[v]/2-1,N=h(d[g?"top":"left"],k),A=h(d[g?"bottom":"right"],k),L=M-y[v]-A,j=M/2-y[v]/2+(x/2-S/2),_=p(N,h(j,L)),D=!l.arrow&&null!=E(i)&&j!==_&&o.reference[v]/2-(j<N?N:A)-y[v]/2<0,F=D?j<N?j-N:j-L:0;return{[m]:f[m]+F,data:{[m]:_,centerOffset:j-_-F,...D&&{alignmentOffset:F}},reset:D}}}),ep=(e,t,n)=>{let r=new Map,i={platform:ef,...n},o={...i.platform,_c:r};return N(e,t,{...i,platform:o})};var em=n(4887),ev="undefined"!=typeof document?r.useLayoutEffect:r.useEffect;function ey(e,t){let n,r,i;if(e===t)return!0;
1if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!ey(e[r],t[r]))return!1;return!0}if((n=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){let n=i[r];if(("_owner"!==n||!e.$$typeof)&&!ey(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function eg(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function eb(e,t){let n=eg(e);return Math.round(t*n)/n}function ew(e){let t=r.useRef(e);return ev(()=>{t.current=e}),t}let ex=e=>({name:"arrow",options:e,fn(t){let{element:n,padding:r}="function"==typeof e?e(t):e;return n&&({}).hasOwnProperty.call(n,"current")?null!=n.current?eh({element:n.current,padding:r}).fn(t):{}:n?eh({element:n,padding:r}).fn(t):{}}}),eE=(e,t)=>{var n;return{...(void 0===(n=e)&&(n=0),{name:"offset",options:n,async fn(e){var t,r;let{x:i,y:o,placement:a,middlewareData:s}=e,l=await _(e,n);return a===(null==(t=s.offset)?void 0:t.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}),options:[e,t]}},eC=(e,t)=>{var n;return{...(void 0===(n=e)&&(n={}),{name:"shift",options:n,async fn(e){let{x:t,y:r,placement:i}=e,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=w(n,e),u={x:t,y:r},c=await A(e,l),d=P(x(i)),f=C(d),m=u[f],v=u[d];if(o){let e="y"===f?"top":"left",t="y"===f?"bottom":"right",n=m+c[e],r=m-c[t];m=p(n,h(m,r))}if(a){let e="y"===d?"top":"left",t="y"===d?"bottom":"right",n=v+c[e],r=v-c[t];v=p(n,h(v,r))}let y=s.fn({...e,[f]:m,[d]:v});return{...y,data:{x:y.x-t,y:y.y-r,enabled:{[f]:o,[d]:a}}}}}),options:[e,t]}},eT=(e,t)=>{var n;return{...(void 0===(n=e)&&(n={}),{options:n,fn(e){let{x:t,y:r,placement:i,rects:o,middlewareData:a}=e,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=w(n,e),c={x:t,y:r},d=P(i),f=C(d),h=c[f],p=c[d],m=w(s,e),v="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){let e="y"===f?"height":"width",t=o.reference[f]-o.floating[e]+v.mainAxis,n=o.reference[f]+o.reference[e]-v.mainAxis;h<t?h=t:h>n&&(h=n)}if(u){var y,g;let e="y"===f?"width":"height",t=["top","left"].includes(x(i)),n=o.reference[d]-o.floating[e]+(t&&(null==(y=a.offset)?void 0:y[d])||0)+(t?0:v.crossAxis),r=o.reference[d]+o.reference[e]+(t?0:(null==(g=a.offset)?void 0:g[d])||0)-(t?v.crossAxis:0);p<n?p=n:p>r&&(p=r)}return{[f]:h,[d]:p}}}),options:[e,t]}},eP=(e,t)=>{var n;return{...(void 0===(n=e)&&(n={}),{name:"flip",options:n,async fn(e){var t,r,i,o,a;let{placement:s,middlewareData:l,rects:u,initialPlacement:c,platform:d,elements:f}=e,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0,...b}=w(n,e);if(null!=(t=l.arrow)&&t.alignmentOffset)return{};let O=x(s),M=P(c),k=x(c)===c,N=await (null==d.isRTL?void 0:d.isRTL(f.floating)),L=m||(k||!g?[R(c)]:function(e){let t=R(e);return[S(e),t,S(t)]}(c)),j="none"!==y;!m&&j&&L.push(...function(e,t,n,r){let i=E(e),o=function(e,t,n){let r=["left","right"],i=["right","left"];switch(e){case"top":case"bottom":if(n)return t?i:r;return t?r:i;case"left":case"right":return t?["top","bottom"]:["bottom","top"];default:return[]}}(x(e),"start"===n,r);return i&&(o=o.map(e=>e+"-"+i),t&&(o=o.concat(o.map(S)))),o}(c,g,y,N));let _=[c,...L],D=await A(e,b),F=[],I=(null==(r=l.flip)?void 0:r.overflows)||[];if(h&&F.push(D[O]),p){let e=function(e,t,n){void 0===n&&(n=!1);let r=E(e),i=C(P(e)),o=T(i),a="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=R(a)),[a,R(a)]}(s,u,N);F.push(D[e[0]],D[e[1]])}if(I=[...I,{placement:s,overflows:F}],!F.every(e=>e<=0)){let e=((null==(i=l.flip)?void 0:i.index)||0)+1,t=_[e];if(t)return{data:{index:e,overflows:I},reset:{placement:t}};let n=null==(o=I.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:o.placement;if(!n)switch(v){case"bestFit":{let e=null==(a=I.filter(e=>{if(j){let t=P(e.placement);return t===M||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>
1e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:a[0];e&&(n=e);break}case"initialPlacement":n=c}if(s!==n)return{reset:{placement:n}}}return{}}}),options:[e,t]}},eS=(e,t)=>{var n;return{...(void 0===(n=e)&&(n={}),{name:"size",options:n,async fn(e){var t,r;let i,o;let{placement:a,rects:s,platform:l,elements:u}=e,{apply:c=()=>{},...d}=w(n,e),f=await A(e,d),m=x(a),v=E(a),y="y"===P(a),{width:g,height:b}=s.floating;"top"===m||"bottom"===m?(i=m,o=v===(await (null==l.isRTL?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(o=m,i="end"===v?"top":"bottom");let C=b-f.top-f.bottom,T=g-f.left-f.right,S=h(b-f[i],C),R=h(g-f[o],T),O=!e.middlewareData.shift,M=S,k=R;if(null!=(t=e.middlewareData.shift)&&t.enabled.x&&(k=T),null!=(r=e.middlewareData.shift)&&r.enabled.y&&(M=C),O&&!v){let e=p(f.left,0),t=p(f.right,0),n=p(f.top,0),r=p(f.bottom,0);y?k=g-2*(0!==e||0!==t?e+t:p(f.left,f.right)):M=b-2*(0!==n||0!==r?n+r:p(f.top,f.bottom))}await c({...e,availableWidth:k,availableHeight:M});let N=await l.getDimensions(u.floating);return g!==N.width||b!==N.height?{reset:{rects:!0}}:{}}}),options:[e,t]}},eR=(e,t)=>{var n;return{...(void 0===(n=e)&&(n={}),{name:"hide",options:n,async fn(e){let{rects:t}=e,{strategy:r="referenceHidden",...i}=w(n,e);switch(r){case"referenceHidden":{let n=L(await A(e,{...i,elementContext:"reference"}),t.reference);return{data:{referenceHiddenOffsets:n,referenceHidden:j(n)}}}case"escaped":{let n=L(await A(e,{...i,altBoundary:!0}),t.floating);return{data:{escapedOffsets:n,escaped:j(n)}}}default:return{}}}}),options:[e,t]}},eO=(e,t)=>({...ex(e),options:[e,t]});var eM=n(6840),ek=n(7437),eN=r.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...o}=e;return(0,ek.jsx)(eM.WV.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,ek.jsx)("polygon",{points:"0,0 30,0 15,10"})})});eN.displayName="Arrow";var eA=n(6606),eL="Popper",[ej,e_]=function(e,t=[]){let n=[],i=()=>{let t=n.map(e=>r.createContext(e));return function(n){let i=n?.[e]||t;return r.useMemo(()=>({[`__scope${e}`]:{...n,[e]:i}}),[n,i])}};return i.scopeName=e,[function(t,i){let o=r.createContext(i),a=n.length;function s(t){let{scope:n,children:i,...s}=t,l=n?.[e][a]||o,u=r.useMemo(()=>s,Object.values(s));return(0,ek.jsx)(l.Provider,{value:u,children:i})}return n=[...n,i],s.displayName=t+"Provider",[s,function(n,s){let l=s?.[e][a]||o,u=r.useContext(l);if(u)return u;if(void 0!==i)return i;throw Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let i=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return r.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}(i,...t)]}(eL),[eD,eF]=ej(eL),eI=e=>{let{__scopePopper:t,children:n}=e,[i,o]=r.useState(null);return(0,ek.jsx)(eD,{scope:t,anchor:i,onAnchorChange:o,children:n})};eI.displayName=eL;var eq="PopperAnchor",eH=r.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:i,...o}=e,s=eF(eq,n),l=r.useRef(null),u=(0,a.e)(t,l);return r.useEffect(()=>{s.onAnchorChange((null==i?void 0:i.current)||l.current)}),i?null:(0,ek.jsx)(eM.WV.div,{...o,ref:u})});eH.displayName=eq;var eB="PopperContent",[eW,ez]=ej(eB),eK=r.forwardRef((e,t)=>{var n,i,o,s,l,c,d,f;let{__scopePopper:m,side:y="bottom",sideOffset:g=0,align:b="center",alignOffset:w=0,arrowPadding:x=0,avoidCollisions:E=!0,collisionBoundary:C=[],collisionPadding:T=0,sticky:P="partial",hideWhenDetached:S=!1,updatePositionStrategy:R="optimized",onPlaced:O,...M}=e,k=eF(eB,m),[N,A]=r.useState(null),L=(0,a.e)(t,e=>A(e)),[j,_]=r.useState(null),D=function(e){let[t,n]=r.useState(void 0);return(0,u.b)(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,i;if(!Array.isArray(t)||!t.length)return;let o=t[0];if("borderBoxSize"in o){let e=o.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,i=t.blockSize}else r=e.offsetWidth,i=e.offsetHeight;n({width:r,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}(j),F=null!==(d=null==D?void 0:D.width)&&void 0!==d?d:0,I=null!==(f=null==D?void 0:D.height)&&void 0!==f?f:0,H="number"==typeof T?T:{top:0,right:0,bottom:0,left:0,...T},B=Array.isArray(C)?C:[C],W=B.length>0,z={padding:H,boundary:B.filter(eY),altBoundary:W},{refs:K,floatingStyles:U,placement:Q,isPositioned:V,middlewareData:Y}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:o,elements:{reference:a,floating:s}={},transform:l=!0,whileElementsMounted:u,open:c}=e,[d,f]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=r.useState(i);ey(h,i)||p(i);let[m,v]=r.useState(null),[y,g]=r.useState(null),b=r.useCallback(e=>
1{e!==C.current&&(C.current=e,v(e))},[]),w=r.useCallback(e=>{e!==T.current&&(T.current=e,g(e))},[]),x=a||m,E=s||y,C=r.useRef(null),T=r.useRef(null),P=r.useRef(d),S=null!=u,R=ew(u),O=ew(o),M=ew(c),k=r.useCallback(()=>{if(!C.current||!T.current)return;let e={placement:t,strategy:n,middleware:h};O.current&&(e.platform=O.current),ep(C.current,T.current,e).then(e=>{let t={...e,isPositioned:!1!==M.current};N.current&&!ey(P.current,t)&&(P.current=t,em.flushSync(()=>{f(t)}))})},[h,t,n,O,M]);ev(()=>{!1===c&&P.current.isPositioned&&(P.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[c]);let N=r.useRef(!1);ev(()=>(N.current=!0,()=>{N.current=!1}),[]),ev(()=>{if(x&&(C.current=x),E&&(T.current=E),x&&E){if(R.current)return R.current(x,E,k);k()}},[x,E,k,R,S]);let A=r.useMemo(()=>({reference:C,floating:T,setReference:b,setFloating:w}),[b,w]),L=r.useMemo(()=>({reference:x,floating:E}),[x,E]),j=r.useMemo(()=>{let e={position:n,left:0,top:0};if(!L.floating)return e;let t=eb(L.floating,d.x),r=eb(L.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...eg(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,l,L.floating,d.x,d.y]);return r.useMemo(()=>({...d,update:k,refs:A,elements:L,floatingStyles:j}),[d,k,A,L,j])}({strategy:"fixed",placement:y+("center"!==b?"-"+b:""),whileElementsMounted:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,t,n,r){let i;void 0===r&&(r={});let{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:u=!1}=r,c=et(e),d=o||a?[...c?J(c):[],...J(t)]:[];d.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)});let f=c&&l?function(e,t){let n,r=null,i=q(e);function o(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return!function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),o();let{left:u,top:c,width:d,height:f}=e.getBoundingClientRect();if(s||t(),!d||!f)return;let m=v(c),y=v(i.clientWidth-(u+d)),g={rootMargin:-m+"px "+-y+"px "+-v(i.clientHeight-(c+f))+"px "+-v(u)+"px",threshold:p(0,h(1,l))||1},b=!0;function w(e){let t=e[0].intersectionRatio;if(t!==l){if(!b)return a();t?a(!1,t):n=setTimeout(()=>{a(!1,1e-7)},1e3)}b=!1}try{r=new IntersectionObserver(w,{...g,root:i.ownerDocument})}catch(e){r=new IntersectionObserver(w,g)}r.observe(e)}(!0),o}(c,n):null,m=-1,y=null;s&&(y=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&y&&(y.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var e;null==(e=y)||e.observe(t)})),n()}),c&&!u&&y.observe(c),y.observe(t));let g=u?eo(e):null;return u&&function t(){let r=eo(e);g&&(r.x!==g.x||r.y!==g.y||r.width!==g.width||r.height!==g.height)&&n(),g=r,i=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach(e=>{o&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)}),null==f||f(),null==(e=y)||e.disconnect(),y=null,u&&cancelAnimationFrame(i)}}(...t,{animationFrame:"always"===R})},elements:{reference:k.anchor},middleware:[eE({mainAxis:g+I,alignmentAxis:w}),E&&eC({mainAxis:!0,crossAxis:!1,limiter:"partial"===P?eT():void 0,...z}),E&&eP({...z}),eS({...z,apply:e=>{let{elements:t,rects:n,availableWidth:r,availableHeight:i}=e,{width:o,height:a}=n.reference,s=t.floating.style;s.setProperty("--radix-popper-available-width","".concat(r,"px")),s.setProperty("--radix-popper-available-height","".concat(i,"px")),s.setProperty("--radix-popper-anchor-width","".concat(o,"px")),s.setProperty("--radix-popper-anchor-height","".concat(a,"px"))}}),j&&eO({element:j,padding:x}),e$({arrowWidth:F,arrowHeight:I}),S&&eR({strategy:"referenceHidden",...z})]}),[$,G]=eG(Q),X=(0,eA.W)(O);(0,u.b)(()=>{V&&(null==X||X())},[V,X]);let Z=null===(n=Y.arrow)||void 0===n?void 0:n.x,ee=null===(i=Y.arrow)||void 0===i?void 0:i.y,en=(null===(o=Y.arrow)||void 0===o?void 0:o.centerOffset)!==0,[er,ei]=r.useState();return(0,u.b)(()=>{N&&ei(window.getComputedStyle(N).zIndex)},[N]),(0,ek.jsx)("div",{ref:K.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:V?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:er,"--radix-popper-transform-origin":[null===(s=Y.transformOrigin)||void 0===s?void 0:s.x,null===(l=Y.transformOrigin)||void 0===l?void 0:l.y].join(" "),...(null===(c=Y.hide)||void 0===c?void 0:c.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,ek.jsx)(eW,{scope:m,placedSide:$,onArrowChange:_,arrowX:Z,arrowY:ee,shouldHideArrow:en,children:(0,ek.jsx)(eM.WV.div,{"data-side":$,"data-align":G,...M,ref:L,style:{...M.style,animation:V?void 0:"none"}})})})});eK.displayName=eB;var eU="PopperArrow",eQ={top:"bottom",right:"left",bottom:"top",left:"r
1ight"},eV=r.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=ez(eU,n),o=eQ[i.placedSide];return(0,ek.jsx)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:(0,ek.jsx)(eN,{...r,ref:t,style:{...r.style,display:"block"}})})});function eY(e){return null!==e}eV.displayName=eU;var e$=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;let{placement:s,rects:l,middlewareData:u}=t,c=(null===(n=u.arrow)||void 0===n?void 0:n.centerOffset)!==0,d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[h,p]=eG(s),m={start:"0%",center:"50%",end:"100%"}[p],v=(null!==(o=null===(r=u.arrow)||void 0===r?void 0:r.x)&&void 0!==o?o:0)+d/2,y=(null!==(a=null===(i=u.arrow)||void 0===i?void 0:i.y)&&void 0!==a?a:0)+f/2,g="",b="";return"bottom"===h?(g=c?m:"".concat(v,"px"),b="".concat(-f,"px")):"top"===h?(g=c?m:"".concat(v,"px"),b="".concat(l.floating.height+f,"px")):"right"===h?(g="".concat(-f,"px"),b=c?m:"".concat(y,"px")):"left"===h&&(g="".concat(l.floating.width+f,"px"),b=c?m:"".concat(y,"px")),{data:{x:g,y:b}}}});function eG(e){let[t,n="center"]=e.split("-");return[t,n]}n(3832);var eX=n(1599),eJ=n(7495),eZ=n(886),e0=n(5098),[e1,e2]=(0,s.b)("Tooltip",[e_]),e5=e_(),e8="TooltipProvider",e4="tooltip.open",[e6,e7]=e1(e8),e3=e=>{let{__scopeTooltip:t,delayDuration:n=700,skipDelayDuration:i=300,disableHoverableContent:o=!1,children:a}=e,[s,l]=r.useState(!0),u=r.useRef(!1),c=r.useRef(0);return r.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,ek.jsx)(e6,{scope:t,isOpenDelayed:s,delayDuration:n,onOpen:r.useCallback(()=>{window.clearTimeout(c.current),l(!1)},[]),onClose:r.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>l(!0),i)},[i]),isPointerInTransitRef:u,onPointerInTransitChange:r.useCallback(e=>{u.current=e},[]),disableHoverableContent:o,children:a})};e3.displayName=e8;var e9="Tooltip",[te,tt]=e1(e9),tn=e=>{let{__scopeTooltip:t,children:n,open:i,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:l}=e,f=e7(e9,e.__scopeTooltip),h=e5(t),[p,m]=r.useState(null),v=function(e){let[t,n]=r.useState(c());return(0,u.b)(()=>{n(e=>e??String(d++))},[void 0]),t?`radix-${t}`:""}(),y=r.useRef(0),g=null!=s?s:f.disableHoverableContent,b=null!=l?l:f.delayDuration,w=r.useRef(!1),[x=!1,E]=(0,eZ.T)({prop:i,defaultProp:o,onChange:e=>{e?(f.onOpen(),document.dispatchEvent(new CustomEvent(e4))):f.onClose(),null==a||a(e)}}),C=r.useMemo(()=>x?w.current?"delayed-open":"instant-open":"closed",[x]),T=r.useCallback(()=>{window.clearTimeout(y.current),y.current=0,w.current=!1,E(!0)},[E]),P=r.useCallback(()=>{window.clearTimeout(y.current),y.current=0,E(!1)},[E]),S=r.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{w.current=!0,E(!0),y.current=0},b)},[b,E]);return r.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),(0,ek.jsx)(eI,{...h,children:(0,ek.jsx)(te,{scope:t,contentId:v,open:x,stateAttribute:C,trigger:p,onTriggerChange:m,onTriggerEnter:r.useCallback(()=>{f.isOpenDelayed?S():T()},[f.isOpenDelayed,S,T]),onTriggerLeave:r.useCallback(()=>{g?P():(window.clearTimeout(y.current),y.current=0)},[P,g]),onOpen:T,onClose:P,disableHoverableContent:g,children:n})})};tn.displayName=e9;var tr="TooltipTrigger",ti=r.forwardRef((e,t)=>{let{__scopeTooltip:n,...i}=e,s=tt(tr,n),l=e7(tr,n),u=e5(n),c=r.useRef(null),d=(0,a.e)(t,c,s.onTriggerChange),f=r.useRef(!1),h=r.useRef(!1),p=r.useCallback(()=>f.current=!1,[]);return r.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),(0,ek.jsx)(eH,{asChild:!0,...u,children:(0,ek.jsx)(eM.WV.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...i,ref:d,onPointerMove:(0,o.M)(e.onPointerMove,e=>{"touch"===e.pointerType||h.current||l.isPointerInTransitRef.current||(s.onTriggerEnter(),h.current=!0)}),onPointerLeave:(0,o.M)(e.onPointerLeave,()=>{s.onTriggerLeave(),h.current=!1}),onPointerDown:(0,o.M)(e.onPointerDown,()=>{f.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:(0,o.M)(e.onFocus,()=>{f.current||s.onOpen()}),onBlur:(0,o.M)(e.onBlur,s.onClose),onClick:(0,o.M)(e.onClick,s.onClose)})})});ti.displayName=tr;var[to,ta]=e1("TooltipPortal",{forceMount:void 0}),ts="TooltipContent",tl=r.forwardRef((e,t)=>
1{let n=ta(ts,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,a=tt(ts,e.__scopeTooltip);return(0,ek.jsx)(eX.z,{present:r||a.open,children:a.disableHoverableContent?(0,ek.jsx)(tf,{side:i,...o,ref:t}):(0,ek.jsx)(tu,{side:i,...o,ref:t})})}),tu=r.forwardRef((e,t)=>{let n=tt(ts,e.__scopeTooltip),i=e7(ts,e.__scopeTooltip),o=r.useRef(null),s=(0,a.e)(t,o),[l,u]=r.useState(null),{trigger:c,onClose:d}=n,f=o.current,{onPointerInTransitChange:h}=i,p=r.useCallback(()=>{u(null),h(!1)},[h]),m=r.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=function(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw Error("unreachable")}}(r,n.getBoundingClientRect());u(function(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),function(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return(n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y)?t:t.concat(n)}(t)}([...function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5,r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,i),...function(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}(t.getBoundingClientRect())])),h(!0)},[h]);return r.useEffect(()=>()=>p(),[p]),r.useEffect(()=>{if(c&&f){let e=e=>m(e,f),t=e=>m(e,c);return c.addEventListener("pointerleave",e),f.addEventListener("pointerleave",t),()=>{c.removeEventListener("pointerleave",e),f.removeEventListener("pointerleave",t)}}},[c,f,m,p]),r.useEffect(()=>{if(l){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=(null==c?void 0:c.contains(t))||(null==f?void 0:f.contains(t)),i=!function(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,o=t.length-1;e<t.length;o=e++){let a=t[e].x,s=t[e].y,l=t[o].x,u=t[o].y;s>r!=u>r&&n<(l-a)*(r-s)/(u-s)+a&&(i=!i)}return i}(n,l);r?p():i&&(p(),d())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[c,f,l,d,p]),(0,ek.jsx)(tf,{...e,ref:s})}),[tc,td]=e1(e9,{isInside:!1}),tf=r.forwardRef((e,t)=>{let{__scopeTooltip:n,children:i,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...u}=e,c=tt(ts,n),d=e5(n),{onClose:f}=c;return r.useEffect(()=>(document.addEventListener(e4,f),()=>document.removeEventListener(e4,f)),[f]),r.useEffect(()=>{if(c.trigger){let e=e=>{let t=e.target;(null==t?void 0:t.contains(c.trigger))&&f()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[c.trigger,f]),(0,ek.jsx)(l.XB,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:f,children:(0,ek.jsxs)(eK,{"data-state":c.stateAttribute,...d,...u,ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,ek.jsx)(eJ.A4,{children:i}),(0,ek.jsx)(tc,{scope:n,isInside:!0,children:(0,ek.jsx)(e0.f,{id:c.contentId,role:"tooltip",children:o||i})})]})})});tl.displayName=ts;var th="TooltipArrow";r.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=e5(n);return td(th,n).isInside?null:(0,ek.jsx)(eV,{...i,...r,ref:t})}).displayName=th;var tp=e3,tm=tn,tv=ti,ty=tl},6606:function(e,t,n){"use strict";n.d(t,{W:function(){return i}});var r=n(2265);function i(e){let t=r.useRef(e);return r.useEffect(()=>{t.current=e}),r.useMemo(()=>(...e)=>t.current?.(...e),[])}},886:function(e,t,n){"use strict";n.d(t,{T:function(){return o}});var r=n(2265),i=n(6606);function o({prop:e,defaultProp:t,onChange:n=()=>{}}){let[o,a]=function({defaultProp:e,onChange:t}){let n=r.useState(e),[o]=n,a=r.useRef(o),s=(0,i.W)(t);return r.useEffect(()=>{a.current!==o&&(s(o),a.current=o)},[o,a,s]),n}({defaultProp:t,onChange:n}),s=void 0!==e,l=s?e:o,u=(0,i.W)(n);return[l,r.useCallback(t=>{if(s){let n="function"==typeof t?t(e):t;n!==e&&u(n)}else a(t)},[s,e,a,u])]}},1188:function(e,t,n){"use strict";n.d(t,{b:function(){return i}});var r=n(2265),i=globalThis?.document?r.useLayoutEffect:()=>{}},5098:function(e,t,n){"use strict";n.d(t,{T:function(){return a},f:function(){return s}});var r=n(2265),i=n(6840),o=n(7437),a=r.forwardRef((e,t)=>
1(0,o.jsx)(i.WV.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));a.displayName="VisuallyHidden";var s=a},1800:function(e,t,n){"use strict";n.d(t,{S:function(){return _}});var r="undefined"==typeof window||"Deno"in globalThis;function i(){}function o(e,t){return"function"==typeof e?e(t):e}function a(e,t){let{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:a,stale:s}=e;if(a){if(r){if(t.queryHash!==l(a,t.options))return!1}else if(!c(t.queryKey,a))return!1}if("all"!==n){let e=t.isActive();if("active"===n&&!e||"inactive"===n&&e)return!1}return("boolean"!=typeof s||t.isStale()===s)&&(!i||i===t.state.fetchStatus)&&(!o||!!o(t))}function s(e,t){let{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(u(t.options.mutationKey)!==u(o))return!1}else if(!c(t.options.mutationKey,o))return!1}return(!r||t.state.status===r)&&(!i||!!i(t))}function l(e,t){return(t?.queryKeyHashFn||u)(e)}function u(e){return JSON.stringify(e,(e,t)=>f(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function c(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&!Object.keys(t).some(n=>!c(e[n],t[n]))}function d(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function f(e){if(!h(e))return!1;let t=e.constructor;if(void 0===t)return!0;let n=t.prototype;return!!(h(n)&&n.hasOwnProperty("isPrototypeOf"))&&Object.getPrototypeOf(e)===Object.prototype}function h(e){return"[object Object]"===Object.prototype.toString.call(e)}function p(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function m(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var v=Symbol();function y(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==v?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))}var g=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=e=>setTimeout(e,0),o=r=>{t?e.push(r):i(()=>{n(r)})},a=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{--t||a()}return n},batchCalls:e=>(...t)=>{o(()=>{e(...t)})},schedule:o,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}(),b=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},w=new class extends b{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!r&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#e?this.#e:globalThis.document?.visibilityState!=="hidden"}},x=new class extends b{#r=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!r&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#r!==e&&(this.#r=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#r}};function E(e){return Math.min(1e3*2**e,3e4)}function C(e){return(e??"online")!=="online"||x.isOnline()}var T=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function P(e){return e instanceof T}function S(e){let t,n=!1,i=0,o=!1,a=function(){let e,t;let n=new Promise((n,r)=>{e=n,t=r});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.status="pending",n.catch(()=>{}),n.resolve=t=>{r({status:"fulfilled",value:t}),e(t)},n.reject=e=>{r({status:"rejected",reason:e}),t(e)},n}(),s=()=>w.isFocused()&&("always"===e.networkMode||x.isOnline())&&e.canRun(),l=()=>C(e.networkMode)&&e.canRun(),u=n=>{o||(o=!0,e.onSuccess?.(n),t?.(),a.resolve(n))},c=n=>{o||(o=!0,e.onError?.(n),t?.(),a.reject(n))},d=()=>new Promise(n=>{t=e=>{(o||s())&&n(e)},e.onPause?.()}).then(()=>{t=void 0,o||e.onContinue?.()}),f=()=>{let t;if(o)return;let a=0===i?e.initialPromise:void 0;try{t=a??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(u).catch(t=>{if(o)return;let a=e.retry??(r?0:3),l=e.retryDelay??E,u="function"==typeof l?l(i,t):l,h=!0===a||"number"==typeof a&&i<a||"function"==typeof a&&a(i,t);if(n||!h){c(t);return}i++,e.onFail?.(i,t),new Promise(e=>{setTimeout(e,u)}).then(()=>s()?void 0:d()).then(()=>{n?c(t):f()})})};return{promise:a,cancel:t=>{o||(c(new T(t)),e.abort?.())},continue:()=>
1(t?.(),a),cancelRetry:()=>{n=!0},continueRetry:()=>{n=!1},canStart:l,start:()=>(l()?f():d().then(f),a)}}var R=class{#i;destroy(){this.clearGcTimeout()}scheduleGc(){var e;this.clearGcTimeout(),"number"==typeof(e=this.gcTime)&&e>=0&&e!==1/0&&(this.#i=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(r?1/0:3e5))}clearGcTimeout(){this.#i&&(clearTimeout(this.#i),this.#i=void 0)}},O=class extends R{#o;#a;#s;#l;#u;#c;constructor(e){super(),this.#c=!1,this.#u=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#o=function(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,r=n?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}(this.options),this.state=e.state??this.#o,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#l?.promise}setOptions(e){this.options={...this.#u,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#s.remove(this)}setData(e,t){var n,r;let i=(n=this.state.data,"function"==typeof(r=this.options).structuralSharing?r.structuralSharing(n,e):!1!==r.structuralSharing?function e(t,n){if(t===n)return t;let r=d(t)&&d(n);if(r||f(t)&&f(n)){let i=r?t:Object.keys(t),o=i.length,a=r?n:Object.keys(n),s=a.length,l=r?[]:{},u=0;for(let o=0;o<s;o++){let s=r?o:a[o];(!r&&i.includes(s)||r)&&void 0===t[s]&&void 0===n[s]?(l[s]=void 0,u++):(l[s]=e(t[s],n[s]),l[s]===t[s]&&void 0!==t[s]&&u++)}return o===s&&u===o?t:l}return n}(n,e):e);return this.#d({data:i,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),i}setState(e,t){this.#d({type:"setState",state:e,setStateOptions:t})}cancel(e){let t=this.#l?.promise;return this.#l?.cancel(e),t?t.then(i).catch(i):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#o)}isActive(){return this.observers.some(e=>{var t;return!1!==("function"==typeof(t=e.options.enabled)?t(this):t)})}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===v||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data)}isStaleByTime(e=0){return this.state.isInvalidated||void 0===this.state.data||!Math.max(this.state.dataUpdatedAt+(e||0)-Date.now(),0)}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#l?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#l?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#l&&(this.#c?this.#l.cancel({revert:!0}):this.#l.cancelRetry()),this.scheduleGc()),this.#s.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#d({type:"invalidate"})}fetch(e,t){if("idle"!==this.state.fetchStatus){if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#l)return this.#l.continueRetry(),this.#l.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#c=!0,n.signal)})},i={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>{let e=y(this.options,t),n={queryKey:this.queryKey,meta:this.meta};return(r(n),this.#c=!1,this.options.persister)?this.options.persister(e,n,this):e(n)}};r(i),this.options.behavior?.onFetch(i,this),this.#a=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==i.fetchOptions?.meta)&&this.#d({type:"fetch",meta:i.fetchOptions?.meta});let o=e=>{P(e)&&e.silent||this.#d({type:"error",error:e}),P(e)||(this.#s.config.onError?.(e,this),this.#s.config.onSettled?.(this.state.data,e,this)),this.scheduleGc()};return this.#l=S({initialPromise:t?.initialPromise,fn:i.fetchFn,abort:n.abort.bind(n),onSuccess:e=>{if(void 0===e){o(Error(`${this.queryHash} data is undefined`));return}try{this.setData(e)}catch(e){o(e);return}this.#s.config.onSuccess?.(e,this),this.#s.config.onSettled?.(e,this.state.error,this),this.scheduleGc()},onError:o,onFail:(e,t)=>{this.#d({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#d({type:"pause"})},onContinue:()=>{this.#d({type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0}),this.#l.start()}#d(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":var n;return{...t,...(n=t.data,{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:C(this.options.networkMode)?"fetching":"paused",...void 0===n&&{error:null,status:"pending"}}),fetchMeta:e.meta??null};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":let r=e.error;if(P(r)&&r.revert&&this.#a)return{...this.#a,fetchStatus:"idle"};
1return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),g.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#s.notify({query:this,type:"updated",action:e})})}},M=class extends b{constructor(e={}){super(),this.config=e,this.#f=new Map}#f;build(e,t,n){let r=t.queryKey,i=t.queryHash??l(r,t),o=this.get(i);return o||(o=new O({cache:this,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){this.#f.has(e.queryHash)||(this.#f.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#f.get(e.queryHash);t&&(e.destroy(),t===e&&this.#f.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){g.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#f.get(e)}getAll(){return[...this.#f.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>a(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>a(e,t)):t}notify(e){g.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){g.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){g.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},k=class extends R{#h;#p;#l;constructor(e){super(),this.mutationId=e.mutationId,this.#p=e.mutationCache,this.#h=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#h.includes(e)||(this.#h.push(e),this.clearGcTimeout(),this.#p.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#h=this.#h.filter(t=>t!==e),this.scheduleGc(),this.#p.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#h.length||("pending"===this.state.status?this.scheduleGc():this.#p.remove(this))}continue(){return this.#l?.continue()??this.execute(this.state.variables)}async execute(e){this.#l=S({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#d({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#d({type:"pause"})},onContinue:()=>{this.#d({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#p.canRun(this)});let t="pending"===this.state.status,n=!this.#l.canStart();try{if(!t){this.#d({type:"pending",variables:e,isPaused:n}),await this.#p.config.onMutate?.(e,this);let t=await this.options.onMutate?.(e);t!==this.state.context&&this.#d({type:"pending",context:t,variables:e,isPaused:n})}let r=await this.#l.start();return await this.#p.config.onSuccess?.(r,e,this.state.context,this),await this.options.onSuccess?.(r,e,this.state.context),await this.#p.config.onSettled?.(r,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(r,null,e,this.state.context),this.#d({type:"success",data:r}),r}catch(t){try{throw await this.#p.config.onError?.(t,e,this.state.context,this),await this.options.onError?.(t,e,this.state.context),await this.#p.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,t,e,this.state.context),t}finally{this.#d({type:"error",error:t})}}finally{this.#p.runNext(this)}}#d(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPau
1sed:!1,status:"error"}}})(this.state),g.batch(()=>{this.#h.forEach(t=>{t.onMutationUpdate(e)}),this.#p.notify({mutation:this,type:"updated",action:e})})}},N=class extends b{constructor(e={}){super(),this.config=e,this.#m=new Map,this.#v=Date.now()}#m;#v;build(e,t,n){let r=new k({mutationCache:this,mutationId:++this.#v,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){let t=A(e),n=this.#m.get(t)??[];n.push(e),this.#m.set(t,n),this.notify({type:"added",mutation:e})}remove(e){let t=A(e);if(this.#m.has(t)){let n=this.#m.get(t)?.filter(t=>t!==e);n&&(0===n.length?this.#m.delete(t):this.#m.set(t,n))}this.notify({type:"removed",mutation:e})}canRun(e){let t=this.#m.get(A(e))?.find(e=>"pending"===e.state.status);return!t||t===e}runNext(e){let t=this.#m.get(A(e))?.find(t=>t!==e&&t.state.isPaused);return t?.continue()??Promise.resolve()}clear(){g.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...this.#m.values()].flat()}find(e){let t={exact:!0,...e};return this.getAll().find(e=>s(t,e))}findAll(e={}){return this.getAll().filter(t=>s(e,t))}notify(e){g.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>
1e.state.isPaused);return g.batch(()=>Promise.all(e.map(e=>e.continue().catch(i))))}};function A(e){return e.options.scope?.id??String(e.mutationId)}function L(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],a=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},l=0,u=async()=>{let n=!1,u=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(t.signal.aborted?n=!0:t.signal.addEventListener("abort",()=>{n=!0}),t.signal)})},c=y(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject();if(null==r&&e.pages.length)return Promise.resolve(e);let o={queryKey:t.queryKey,pageParam:r,direction:i?"backward":"forward",meta:t.options.meta};u(o);let a=await c(o),{maxPages:s}=t.options,l=i?m:p;return{pages:l(e.pages,a,s),pageParams:l(e.pageParams,r,s)}};if(i&&o.length){let e="backward"===i,t={pages:o,pageParams:a},n=(e?function(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}:j)(r,t);s=await d(t,n,e)}else{let t=e??o.length;do{let e=0===l?a[0]??r.initialPageParam:j(r,s);if(l>0&&null==e)break;s=await d(s,e),l++}while(l<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=u}}}function j(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}var _=class{#y;#p;#u;#g;#b;#w;#x;#E;constructor(e={}){this.#y=e.queryCache||new M,this.#p=e.mutationCache||new N,this.#u=e.defaultOptions||{},this.#g=new Map,this.#b=new Map,this.#w=0}mount(){this.#w++,1===this.#w&&(this.#x=w.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#y.onFocus())}),this.#E=x.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#y.onOnline())}))}unmount(){this.#w--,0===this.#w&&(this.#x?.(),this.#x=void 0,this.#E?.(),this.#E=void 0)}isFetching(e){return this.#y.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#p.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#y.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.getQueryData(e.queryKey);if(void 0===t)return this.fetchQuery(e);{let n=this.defaultQueryOptions(e),r=this.#y.build(this,n);return e.revalidateIfStale&&r.isStaleByTime(o(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return this.#y.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#y.get(r.queryHash),o=i?.state.data,a="function"==typeof t?t(o):t;if(void 0!==a)return this.#y.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return g.batch(()=>this.#y.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#y.get(t.queryHash)?.state}removeQueries(e){let t=this.#y;g.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#y,r={type:"active",...e};return g.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){let n={revert:!0,...t};return Promise.all(g.batch(()=>this.#y.findAll(e).map(e=>e.cancel(n)))).then(i).catch(i)}invalidateQueries(e={},t={}){return g.batch(()=>{if(this.#y.findAll(e).forEach(e=>{e.invalidate()}),"none"===e.refetchType)return Promise.resolve();let n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){let n={...t,cancelRefetch:t?.cancelRefetch??!0};return Promise.all(g.batch(()=>this.#y.findAll(e).filter(e=>!e.isDisabled()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(i)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(i)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let n=this.#y.build(this,t);return n.isStaleByTime(o(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(i).catch(i)}fetchInfiniteQuery(e){return e.behavior=L(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(i).catch(i)}ensureInfiniteQueryData(e){return e.behavior=L(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return x.isOnline()?this.#p.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#y}getMutationCache(){return this.#p}getDefaultOptions(){return this.#u}setDefaultOptions(e){this.#u=e}setQueryDefaults(e,t){this.#g.set(u(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#g.values()],n={};return t.forEach(t=>{c(e,t.queryKey)&&(n={...n,...t.defaultOptions})}),n}setMutationDefaults(e,t){this.#b.set(u(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#b.values()],n={};return t.forEach(t=>{c(e,t.mutationKey)&&(n={...n,...t.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#u.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=l(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),!0!==t.enabled&&t.queryFn===v&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#u.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#y.clear(),this.#p.clear()}}},9827:function(e,t,n){"use strict";n.d(t,{aH:function(){return a}});var r=n(2265),i=n(7437),o=r.createContext(void 0),a=e=>{let{client:t,children:n}=e;return r.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),(0,i.jsx)(o.Provider,{value:t,children:n})}},5922:function(e,t,n){"use strict";n.d(t,{F:function(){return a}});var r=n(2265),i=r.createContext(void 0),o={setTheme:e=>{},themes:[]},a=()=>{var e;return null!=(e=r.useContext(i))?e:o}},4438:function(e,t,n){"use strict";n.d(t,{x7:function(){return w}});var r=n(2265),i=n(4887),o=e=>{switch(e){case"success":return l;case"info":return c;case"warning":return u;case"error":return d;default:return null}},a=Array(12).fill(0),s=e=>{let{visible:t}=e;return r.createElement("div",{className:"sonner-loading-wrapper","data-visible":t},r.createElement("div",{className:"sonner-spinner"},a.map((e,t)=>r.createElement("div",{className:"sonner-loading-bar",key:"spinner-bar-".concat(t)}))))},l=r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},r.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"})),u=r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
1currentColor",height:"20",width:"20"},r.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"})),c=r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},r.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"})),d=r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},r.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"})),f=()=>{let[e,t]=r.useState(document.hidden);return r.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)},[]),e},h=1,p=new 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,...r}=e,i="number"==typeof(null==e?void 0:e.id)||(null==(t=e.id)?void 0:t.length)>0?e.id:h++,o=this.toasts.find(e=>e.id===i),a=void 0===e.dismissible||e.dismissible;return o?this.toasts=this.toasts.map(t=>t.id===i?(this.publish({...t,...e,id:i,title:n}),{...t,...e,id:i,dismissible:a,title:n}):t):this.addToast({title:n,...r,dismissible:a,id:i}),i},this.dismiss=e=>(e||this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.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)=>
1this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{let n;if(!t)return;void 0!==t.loading&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:"function"!=typeof t.description?t.description:void 0}));let r=e instanceof Promise?e:e(),i=void 0!==n;return r.then(async e=>{if(m(e)&&!e.ok){i=!1;let r="function"==typeof t.error?await t.error("HTTP error! status: ".concat(e.status)):t.error,o="function"==typeof t.description?await t.description("HTTP error! status: ".concat(e.status)):t.description;this.create({id:n,type:"error",message:r,description:o})}else if(void 0!==t.success){i=!1;let r="function"==typeof t.success?await t.success(e):t.success,o="function"==typeof t.description?await t.description(e):t.description;this.create({id:n,type:"success",message:r,description:o})}}).catch(async e=>{if(void 0!==t.error){i=!1;let r="function"==typeof t.error?await t.error(e):t.error,o="function"==typeof t.description?await t.description(e):t.description;this.create({id:n,type:"error",message:r,description:o})}}).finally(()=>{var e;i&&(this.dismiss(n),n=void 0),null==(e=t.finally)||e.call(t)}),n},this.custom=(e,t)=>{let n=(null==t?void 0:t.id)||h++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},m=e=>e&&"object"==typeof e&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status;function v(e){return void 0!==e.label}function y(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")}Object.assign((e,t)=>{let n=(null==t?void 0:t.id)||h++;return p.addToast({title:e,...t,id:n}),n},{success:p.success,info:p.info,warning:p.warning,error:p.error,custom:p.custom,message:p.message,promise:p.promise,dismiss:p.dismiss,loading:p.loading},{getHistory:()=>p.toasts}),function(e){let{insertAt:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e||"undefined"==typeof document)return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===t&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}(':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}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-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;
1left: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;background:var(--gray1);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}: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:0;right:0;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}
1: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, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);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-border: hsl(0, 0%, 20%);--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-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%)}\n');var g=e=>{var t,n,i,a,l,u,c,d,h,p;let{invert:m,toast:y,unstyled:g,interacting:b,setHeights:w,visibleToasts:x,heights:E,index:C,toasts:T,expanded:P,removeToast:S,defaultRichColors:R,closeButton:O,style:M,cancelButtonStyle:k,actionButtonStyle:N,className:A="",descriptionClassName:L="",duration:j,position:_,gap:D,loadingIcon:F,expandByDefault:I,classNames:q,icons:H,closeButtonAriaLabel:B="Close toast",pauseWhenPageIsHidden:W,cn:z}=e,[K,U]=r.useState(!1),[Q,V]=r.useState(!1),[Y,$]=r.useState(!1),[G,X]=r.useState(!1),[J,Z]=r.useState(0),[ee,et]=r.useState(0),en=r.useRef(null),er=r.useRef(null),ei=0===C,eo=C+1<=x,ea=y.type,es=!1!==y.dismissible,el=y.className||"",eu=y.descriptionClassName||"",ec=r.useMemo(()=>E.findIndex(e=>e.toastId===y.id)||0,[E,y.id]),ed=r.useMemo(()=>{var e;return null!=(e=y.closeButton)?e:O},[y.closeButton,O]),ef=r.useMemo(()=>y.duration||j||4e3,[y.duration,j]),eh=r.useRef(0),ep=r.useRef(0),em=r.useRef(0),ev=r.useRef(null),[ey,eg]=_.split("-"),eb=r.useMemo(()=>
1E.reduce((e,t,n)=>n>=ec?e:e+t.height,0),[E,ec]),ew=f(),ex=y.invert||m,eE="loading"===ea;ep.current=r.useMemo(()=>ec*D+eb,[ec,eb]),r.useEffect(()=>{U(!0)},[]),r.useLayoutEffect(()=>{if(!K)return;let e=er.current,t=e.style.height;e.style.height="auto";let n=e.getBoundingClientRect().height;e.style.height=t,et(n),w(e=>e.find(e=>e.toastId===y.id)?e.map(e=>e.toastId===y.id?{...e,height:n}:e):[{toastId:y.id,height:n,position:y.position},...e])},[K,y.title,y.description,w,y.id]);let eC=r.useCallback(()=>{V(!0),Z(ep.current),w(e=>e.filter(e=>e.toastId!==y.id)),setTimeout(()=>{S(y)},200)},[y,S,w,ep]);return r.useEffect(()=>{if(y.promise&&"loading"===ea||y.duration===1/0||"loading"===y.type)return;let e,t=ef;return P||b||W&&ew?(()=>{if(em.current<eh.current){let e=new Date().getTime()-eh.current;t-=e}em.current=new Date().getTime()})():t!==1/0&&(eh.current=new Date().getTime(),e=setTimeout(()=>{var e;null==(e=y.onAutoClose)||e.call(y,y),eC()},t)),()=>clearTimeout(e)},[P,b,I,y,ef,eC,y.promise,ea,W,ew]),r.useEffect(()=>{let e=er.current;if(e){let t=e.getBoundingClientRect().height;return et(t),w(e=>[{toastId:y.id,height:t,position:y.position},...e]),()=>w(e=>e.filter(e=>e.toastId!==y.id))}},[w,y.id]),r.useEffect(()=>{y.delete&&eC()},[eC,y.delete]),r.createElement("li",{"aria-live":y.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:er,className:z(A,el,null==q?void 0:q.toast,null==(t=null==y?void 0:y.classNames)?void 0:t.toast,null==q?void 0:q.default,null==q?void 0:q[ea],null==(n=null==y?void 0:y.classNames)?void 0:n[ea]),"data-sonner-toast":"","data-rich-colors":null!=(i=y.richColors)?i:R,"data-styled":!(y.jsx||y.unstyled||g),"data-mounted":K,"data-promise":!!y.promise,"data-removed":Q,"data-visible":eo,"data-y-position":ey,"data-x-position":eg,"data-index":C,"data-front":ei,"data-swiping":Y,"data-dismissible":es,"data-type":ea,"data-invert":ex,"data-swipe-out":G,"data-expanded":!!(P||I&&K),style:{"--index":C,"--toasts-before":C,"--z-index":T.length-C,"--offset":"".concat(Q?J:ep.current,"px"),"--initial-height":I?"auto":"".concat(ee,"px"),...M,...y.style},onPointerDown:e=>{eE||!es||(en.current=new Date,Z(ep.current),e.target.setPointerCapture(e.pointerId),"BUTTON"!==e.target.tagName&&($(!0),ev.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{var e,t,n,r;if(G||!es)return;ev.current=null;let i=Number((null==(e=er.current)?void 0:e.style.getPropertyValue("--swipe-amount").replace("px",""))||0),o=new Date().getTime()-(null==(t=en.current)?void 0:t.getTime());if(Math.abs(i)>=20||Math.abs(i)/o>.11){Z(ep.current),null==(n=y.onDismiss)||n.call(y,y),eC(),X(!0);return}null==(r=er.current)||r.style.setProperty("--swipe-amount","0px"),$(!1)},onPointerMove:e=>{var t;if(!ev.current||!es)return;let n=e.clientY-ev.current.y,r=e.clientX-ev.current.x,i=("top"===ey?Math.min:Math.max)(0,n),o="touch"===e.pointerType?10:2;Math.abs(i)>o?null==(t=er.current)||t.style.setProperty("--swipe-amount","".concat(n,"px")):Math.abs(r)>o&&(ev.current=null)}},ed&&!y.jsx?r.createElement("button",{"aria-label":B,"data-disabled":eE,"data-close-button":!0,onClick:eE||!es?()=>{}:()=>{var e;eC(),null==(e=y.onDismiss)||e.call(y,y)},className:z(null==q?void 0:q.closeButton,null==(a=null==y?void 0:y.classNames)?void 0:a.closeButton)},r.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"},r.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,y.jsx||r.isValidElement(y.title)?y.jsx||y.title:r.createElement(r.Fragment,null,ea||y.icon||y.promise?r.createElement("div",{"data-icon":"",className:z(null==q?void 0:q.icon,null==(l=null==y?void 0:y.classNames)?void 0:l.icon)},y.promise||"loading"===y.type&&!y.icon?y.icon||(null!=H&&H.loading?r.createElement("div",{className:"sonner-loader","data-visible":"loading"===ea},H.loading):F?r.createElement("div",{className:"sonner-loader","data-visible":"loading"===ea},F):r.createElement(s,{visible:"loading"===ea})):null,"loading"!==y.type?y.icon||(null==H?void 0:H[ea])||o(ea):null):null,r.createElement("div",{"data-content":"",className:z(null==q?void 0:q.content,null==(u=null==y?void 0:y.classNames)?void 0:u.content)},r.createElement("div",{"data-title":"",className:z(null==q?void 0:q.title,null==(c=null==y?void 0:y.classNames)?void 0:c.title)},y.title),y.description?r.createElement("div",{"data-description":"",className:z(L,eu,null==q?void 0:q.description,null==(d=null==y?void 0:y.classNames)?void 0:d.description)},y.description):null),r.isValidElement(y.cancel)?y.cancel:y.cancel&&v(y.cancel)?r.createElement("button",{"data-button":!0,"data-cancel":!0,style:y.cancelButtonStyle||k,onClick:e=>{var t,n;v(y.cancel)&&es&&(null==(n=(t=y.cancel).onClick)||n.call(t,e),eC())},className:z(null==q?void 0:q.cancelButton,null==(h=null==y?void 0:y.classNames)?void 0:h.cancelButton)},y.cancel.label):null,r.isValidElement(y.action)?y.action:y.action&&v(y.action)?r.createElement("button",{"data-button":!0,"data-action":!0,style:y.actionButtonStyle||N,onClick:e=>{var t,n;v(y.action)&&(e.defaultPrevented||(null==(n=(t=y.action).onClick)||n.call(t,e),eC()))},className:z(null==q?void 0:q.actionButton,null==(p=null==y?void 0:y.classNames)?void 0:p.actionButton)},y.action.label):null))};function b(){if("undefined"==typeof window||"undefined"==typeof document)return"ltr";let e=document.documentElement.getAttribute("dir");return"auto"!==e&&e?e:window.getComputedStyle(document.documentElement).direction}var w=e=>{let{invert:t,position:n="bottom-right",hotkey:o=["altKey","KeyT"],expand:a,closeButton:s,className:l,offset:u,theme:c="light",richColors:d,duration:f,style:h,visibleToasts:m=3,toastOptions:v,dir:w=b(),gap:x=14,loadingIcon:E,icons:C,containerAriaLabel:T="Notifications",pauseWhenPageIsHidden:P,cn:S=y}=e,[R,O]=r.useState([]),M=r.useMemo(()=>Array.from(new Set([n].concat(R.filter(e=>e.position).map(e=>e.position)))),[R,n]),[k,N]=r.useState([]),[A,L]=r.useState(!1),[j,_]=r.useState(!1),[D,F]=r.useState("system"!==c?c:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
1k":"light"),I=r.useRef(null),q=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),H=r.useRef(null),B=r.useRef(!1),W=r.useCallback(e=>{var t;null!=(t=R.find(t=>t.id===e.id))&&t.delete||p.dismiss(e.id),O(t=>t.filter(t=>{let{id:n}=t;return n!==e.id}))},[R]);return r.useEffect(()=>p.subscribe(e=>{if(e.dismiss){O(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t));return}setTimeout(()=>{i.flushSync(()=>{O(t=>{let n=t.findIndex(t=>t.id===e.id);return -1!==n?[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]:[e,...t]})})})}),[]),r.useEffect(()=>{if("system"!==c){F(c);return}"system"===c&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?F("dark"):F("light")),"undefined"!=typeof window&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",e=>{let{matches:t}=e;F(t?"dark":"light")})},[c]),r.useEffect(()=>{R.length<=1&&L(!1)},[R]),r.useEffect(()=>{let e=e=>{var t,n;o.every(t=>e[t]||e.code===t)&&(L(!0),null==(t=I.current)||t.focus()),"Escape"===e.code&&(document.activeElement===I.current||null!=(n=I.current)&&n.contains(document.activeElement))&&L(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[o]),r.useEffect(()=>{if(I.current)return()=>{H.current&&(H.current.focus({preventScroll:!0}),H.current=null,B.current=!1)}},[I.current]),R.length?r.createElement("section",{"aria-label":"".concat(T," ").concat(q),tabIndex:-1},M.map((e,n)=>{var i;let[o,c]=e.split("-");return r.createElement("ol",{key:e,dir:"auto"===w?b():w,tabIndex:-1,ref:I,className:l,"data-sonner-toaster":!0,"data-theme":D,"data-y-position":o,"data-x-position":c,style:{"--front-toast-height":"".concat((null==(i=k[0])?void 0:i.height)||0,"px"),"--offset":"number"==typeof u?"".concat(u,"px"):u||"32px","--width":"".concat(356,"px"),"--gap":"".concat(x,"px"),...h},onBlur:e=>{B.current&&!e.currentTarget.contains(e.relatedTarget)&&(B.current=!1,H.current&&(H.current.focus({preventScroll:!0}),H.current=null))},onFocus:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||B.current||(B.current=!0,H.current=e.relatedTarget)},onMouseEnter:()=>L(!0),onMouseMove:()=>L(!0),onMouseLeave:()=>{j||L(!1)},onPointerDown:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||_(!0)},onPointerUp:()=>_(!1)},R.filter(t=>!t.position&&0===n||t.position===e).map((n,i)=>{var o,l;return r.createElement(g,{key:n.id,icons:C,index:i,toast:n,defaultRichColors:d,duration:null!=(o=null==v?void 0:v.duration)?o:f,className:null==v?void 0:v.className,descriptionClassName:null==v?void 0:v.descriptionClassName,invert:t,visibleToasts:m,closeButton:null!=(l=null==v?void 0:v.closeButton)?l:s,interacting:j,position:e,style:null==v?void 0:v.style,unstyled:null==v?void 0:v.unstyled,classNames:null==v?void 0:v.classNames,cancelButtonStyle:null==v?void 0:v.cancelButtonStyle,actionButtonStyle:null==v?void 0:v.actionButtonStyle,removeToast:W,toasts:R.filter(e=>e.position==n.position),heights:k.filter(e=>e.position==n.position),setHeights:N,expandByDefault:a,gap:x,loadingIcon:E,expanded:A,pauseWhenPageIsHidden:P,cn:S})}))})):null}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.