@alfatech/livechat 2025.5.1-2.3 → 2025.5.1-7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -1,4 +1,4 @@
1
- var Hm=e=>{throw TypeError(e)};var $T=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ec=(e,t,n)=>t.has(e)||Hm("Cannot "+n);var T=(e,t,n)=>(Ec(e,t,"read from private field"),n?n.call(e):t.get(e)),U=(e,t,n)=>t.has(e)?Hm("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),D=(e,t,n,r)=>(Ec(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),X=(e,t,n)=>(Ec(e,t,"access private method"),n);var Ba=(e,t,n,r)=>({set _(i){D(e,t,i,n)},get _(){return T(e,t,r)}});var O4=$T((Mt,Dt)=>{function VT(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Ws(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Hv={exports:{}},ku={},Wv={exports:{}},Z={};/**
1
+ var Km=e=>{throw TypeError(e)};var BT=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Cc=(e,t,n)=>t.has(e)||Km("Cannot "+n);var T=(e,t,n)=>(Cc(e,t,"read from private field"),n?n.call(e):t.get(e)),U=(e,t,n)=>t.has(e)?Km("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),D=(e,t,n,r)=>(Cc(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),X=(e,t,n)=>(Cc(e,t,"access private method"),n);var za=(e,t,n,r)=>({set _(i){D(e,t,i,n)},get _(){return T(e,t,r)}});var DI=BT((Mt,Dt)=>{function zT(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Ks(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qv={exports:{}},_u={},Gv={exports:{}},Z={};/**
2
2
  * @license React
3
3
  * react.production.min.js
4
4
  *
@@ -6,7 +6,7 @@ var Hm=e=>{throw TypeError(e)};var $T=(e,t)=>()=>(t||e((t={exports:{}}).exports,
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var xa=Symbol.for("react.element"),BT=Symbol.for("react.portal"),zT=Symbol.for("react.fragment"),UT=Symbol.for("react.strict_mode"),HT=Symbol.for("react.profiler"),WT=Symbol.for("react.provider"),KT=Symbol.for("react.context"),qT=Symbol.for("react.forward_ref"),GT=Symbol.for("react.suspense"),QT=Symbol.for("react.memo"),YT=Symbol.for("react.lazy"),Wm=Symbol.iterator;function XT(e){return e===null||typeof e!="object"?null:(e=Wm&&e[Wm]||e["@@iterator"],typeof e=="function"?e:null)}var Kv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},qv=Object.assign,Gv={};function Ks(e,t,n){this.props=e,this.context=t,this.refs=Gv,this.updater=n||Kv}Ks.prototype.isReactComponent={};Ks.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ks.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Qv(){}Qv.prototype=Ks.prototype;function Ch(e,t,n){this.props=e,this.context=t,this.refs=Gv,this.updater=n||Kv}var kh=Ch.prototype=new Qv;kh.constructor=Ch;qv(kh,Ks.prototype);kh.isPureReactComponent=!0;var Km=Array.isArray,Yv=Object.prototype.hasOwnProperty,_h={current:null},Xv={key:!0,ref:!0,__self:!0,__source:!0};function Zv(e,t,n){var r,i={},s=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)Yv.call(t,r)&&!Xv.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:xa,type:e,key:s,ref:o,props:i,_owner:_h.current}}function ZT(e,t){return{$$typeof:xa,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ph(e){return typeof e=="object"&&e!==null&&e.$$typeof===xa}function JT(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var qm=/\/+/g;function Cc(e,t){return typeof e=="object"&&e!==null&&e.key!=null?JT(""+e.key):t.toString(36)}function yl(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case xa:case BT:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+Cc(o,0):r,Km(i)?(n="",e!=null&&(n=e.replace(qm,"$&/")+"/"),yl(i,t,n,"",function(u){return u})):i!=null&&(Ph(i)&&(i=ZT(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(qm,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",Km(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+Cc(s,a);o+=yl(s,t,n,l,i)}else if(l=XT(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+Cc(s,a++),o+=yl(s,t,n,l,i);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function za(e,t,n){if(e==null)return e;var r=[],i=0;return yl(e,r,"","",function(s){return t.call(n,s,i++)}),r}function eE(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var dt={current:null},vl={transition:null},tE={ReactCurrentDispatcher:dt,ReactCurrentBatchConfig:vl,ReactCurrentOwner:_h};function Jv(){throw Error("act(...) is not supported in production builds of React.")}Z.Children={map:za,forEach:function(e,t,n){za(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return za(e,function(){t++}),t},toArray:function(e){return za(e,function(t){return t})||[]},only:function(e){if(!Ph(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Z.Component=Ks;Z.Fragment=zT;Z.Profiler=HT;Z.PureComponent=Ch;Z.StrictMode=UT;Z.Suspense=GT;Z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tE;Z.act=Jv;Z.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=qv({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=_h.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Yv.call(t,l)&&!Xv.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:xa,type:e.type,key:i,ref:s,props:r,_owner:o}};Z.createContext=function(e){return e={$$typeof:KT,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:WT,_context:e},e.Consumer=e};Z.createElement=Zv;Z.createFactory=function(e){var t=Zv.bind(null,e);return t.type=e,t};Z.createRef=function(){return{current:null}};Z.forwardRef=function(e){return{$$typeof:qT,render:e}};Z.isValidElement=Ph;Z.lazy=function(e){return{$$typeof:YT,_payload:{_status:-1,_result:e},_init:eE}};Z.memo=function(e,t){return{$$typeof:QT,type:e,compare:t===void 0?null:t}};Z.startTransition=function(e){var t=vl.transition;vl.transition={};try{e()}finally{vl.transition=t}};Z.unstable_act=Jv;Z.useCallback=function(e,t){return dt.current.useCallback(e,t)};Z.useContext=function(e){return dt.current.useContext(e)};Z.useDebugValue=function(){};Z.useDeferredValue=function(e){return dt.current.useDeferredValue(e)};Z.useEffect=function(e,t){return dt.current.useEffect(e,t)};Z.useId=function(){return dt.current.useId()};Z.useImperativeHandle=function(e,t,n){return dt.current.useImperativeHandle(e,t,n)};Z.useInsertionEffect=function(e,t){return dt.current.useInsertionEffect(e,t)};Z.useLayoutEffect=function(e,t){return dt.current.useLayoutEffect(e,t)};Z.useMemo=function(e,t){return dt.current.useMemo(e,t)};Z.useReducer=function(e,t,n){return dt.current.useReducer(e,t,n)};Z.useRef=function(e){return dt.current.useRef(e)};Z.useState=function(e){return dt.current.useState(e)};Z.useSyncExternalStore=function(e,t,n){return dt.current.useSyncExternalStore(e,t,n)};Z.useTransition=function(){return dt.current.useTransition()};Z.version="18.3.1";Wv.exports=Z;var y=Wv.exports;const R=Ws(y),Pf=VT({__proto__:null,default:R},[y]);/**
9
+ */var wa=Symbol.for("react.element"),UT=Symbol.for("react.portal"),HT=Symbol.for("react.fragment"),WT=Symbol.for("react.strict_mode"),KT=Symbol.for("react.profiler"),qT=Symbol.for("react.provider"),GT=Symbol.for("react.context"),QT=Symbol.for("react.forward_ref"),YT=Symbol.for("react.suspense"),XT=Symbol.for("react.memo"),ZT=Symbol.for("react.lazy"),qm=Symbol.iterator;function JT(e){return e===null||typeof e!="object"?null:(e=qm&&e[qm]||e["@@iterator"],typeof e=="function"?e:null)}var Qv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Yv=Object.assign,Xv={};function qs(e,t,n){this.props=e,this.context=t,this.refs=Xv,this.updater=n||Qv}qs.prototype.isReactComponent={};qs.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};qs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Zv(){}Zv.prototype=qs.prototype;function _h(e,t,n){this.props=e,this.context=t,this.refs=Xv,this.updater=n||Qv}var Ph=_h.prototype=new Zv;Ph.constructor=_h;Yv(Ph,qs.prototype);Ph.isPureReactComponent=!0;var Gm=Array.isArray,Jv=Object.prototype.hasOwnProperty,Ah={current:null},e1={key:!0,ref:!0,__self:!0,__source:!0};function t1(e,t,n){var r,i={},s=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)Jv.call(t,r)&&!e1.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:wa,type:e,key:s,ref:o,props:i,_owner:Ah.current}}function eE(e,t){return{$$typeof:wa,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Rh(e){return typeof e=="object"&&e!==null&&e.$$typeof===wa}function tE(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Qm=/\/+/g;function kc(e,t){return typeof e=="object"&&e!==null&&e.key!=null?tE(""+e.key):t.toString(36)}function vl(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case wa:case UT:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+kc(o,0):r,Gm(i)?(n="",e!=null&&(n=e.replace(Qm,"$&/")+"/"),vl(i,t,n,"",function(u){return u})):i!=null&&(Rh(i)&&(i=eE(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Qm,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",Gm(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+kc(s,a);o+=vl(s,t,n,l,i)}else if(l=JT(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+kc(s,a++),o+=vl(s,t,n,l,i);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Ua(e,t,n){if(e==null)return e;var r=[],i=0;return vl(e,r,"","",function(s){return t.call(n,s,i++)}),r}function nE(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var dt={current:null},xl={transition:null},rE={ReactCurrentDispatcher:dt,ReactCurrentBatchConfig:xl,ReactCurrentOwner:Ah};function n1(){throw Error("act(...) is not supported in production builds of React.")}Z.Children={map:Ua,forEach:function(e,t,n){Ua(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ua(e,function(){t++}),t},toArray:function(e){return Ua(e,function(t){return t})||[]},only:function(e){if(!Rh(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Z.Component=qs;Z.Fragment=HT;Z.Profiler=KT;Z.PureComponent=_h;Z.StrictMode=WT;Z.Suspense=YT;Z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=rE;Z.act=n1;Z.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Yv({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=Ah.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Jv.call(t,l)&&!e1.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:wa,type:e.type,key:i,ref:s,props:r,_owner:o}};Z.createContext=function(e){return e={$$typeof:GT,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:qT,_context:e},e.Consumer=e};Z.createElement=t1;Z.createFactory=function(e){var t=t1.bind(null,e);return t.type=e,t};Z.createRef=function(){return{current:null}};Z.forwardRef=function(e){return{$$typeof:QT,render:e}};Z.isValidElement=Rh;Z.lazy=function(e){return{$$typeof:ZT,_payload:{_status:-1,_result:e},_init:nE}};Z.memo=function(e,t){return{$$typeof:XT,type:e,compare:t===void 0?null:t}};Z.startTransition=function(e){var t=xl.transition;xl.transition={};try{e()}finally{xl.transition=t}};Z.unstable_act=n1;Z.useCallback=function(e,t){return dt.current.useCallback(e,t)};Z.useContext=function(e){return dt.current.useContext(e)};Z.useDebugValue=function(){};Z.useDeferredValue=function(e){return dt.current.useDeferredValue(e)};Z.useEffect=function(e,t){return dt.current.useEffect(e,t)};Z.useId=function(){return dt.current.useId()};Z.useImperativeHandle=function(e,t,n){return dt.current.useImperativeHandle(e,t,n)};Z.useInsertionEffect=function(e,t){return dt.current.useInsertionEffect(e,t)};Z.useLayoutEffect=function(e,t){return dt.current.useLayoutEffect(e,t)};Z.useMemo=function(e,t){return dt.current.useMemo(e,t)};Z.useReducer=function(e,t,n){return dt.current.useReducer(e,t,n)};Z.useRef=function(e){return dt.current.useRef(e)};Z.useState=function(e){return dt.current.useState(e)};Z.useSyncExternalStore=function(e,t,n){return dt.current.useSyncExternalStore(e,t,n)};Z.useTransition=function(){return dt.current.useTransition()};Z.version="18.3.1";Gv.exports=Z;var y=Gv.exports;const R=Ks(y),Rf=zT({__proto__:null,default:R},[y]);/**
10
10
  * @license React
11
11
  * react-jsx-runtime.production.min.js
12
12
  *
@@ -14,7 +14,7 @@ var Hm=e=>{throw TypeError(e)};var $T=(e,t)=>()=>(t||e((t={exports:{}}).exports,
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var nE=y,rE=Symbol.for("react.element"),iE=Symbol.for("react.fragment"),sE=Object.prototype.hasOwnProperty,oE=nE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,aE={key:!0,ref:!0,__self:!0,__source:!0};function e1(e,t,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)sE.call(t,r)&&!aE.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:rE,type:e,key:s,ref:o,props:i,_owner:oE.current}}ku.Fragment=iE;ku.jsx=e1;ku.jsxs=e1;Hv.exports=ku;var w=Hv.exports,t1={exports:{}},It={},n1={exports:{}},r1={};/**
17
+ */var iE=y,sE=Symbol.for("react.element"),oE=Symbol.for("react.fragment"),aE=Object.prototype.hasOwnProperty,lE=iE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,uE={key:!0,ref:!0,__self:!0,__source:!0};function r1(e,t,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)aE.call(t,r)&&!uE.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:sE,type:e,key:s,ref:o,props:i,_owner:lE.current}}_u.Fragment=oE;_u.jsx=r1;_u.jsxs=r1;qv.exports=_u;var w=qv.exports,i1={exports:{}},It={},s1={exports:{}},o1={};/**
18
18
  * @license React
19
19
  * scheduler.production.min.js
20
20
  *
@@ -22,7 +22,7 @@ var Hm=e=>{throw TypeError(e)};var $T=(e,t)=>()=>(t||e((t={exports:{}}).exports,
22
22
  *
23
23
  * This source code is licensed under the MIT license found in the
24
24
  * LICENSE file in the root directory of this source tree.
25
- */(function(e){function t(O,L){var B=O.length;O.push(L);e:for(;0<B;){var V=B-1>>>1,H=O[V];if(0<i(H,L))O[V]=L,O[B]=H,B=V;else break e}}function n(O){return O.length===0?null:O[0]}function r(O){if(O.length===0)return null;var L=O[0],B=O.pop();if(B!==L){O[0]=B;e:for(var V=0,H=O.length,q=H>>>1;V<q;){var ce=2*(V+1)-1,ye=O[ce],J=ce+1,Ve=O[J];if(0>i(ye,B))J<H&&0>i(Ve,ye)?(O[V]=Ve,O[J]=B,V=J):(O[V]=ye,O[ce]=B,V=ce);else if(J<H&&0>i(Ve,B))O[V]=Ve,O[J]=B,V=J;else break e}}return L}function i(O,L){var B=O.sortIndex-L.sortIndex;return B!==0?B:O.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],f=1,c=null,d=3,h=!1,m=!1,x=!1,b=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(O){for(var L=n(u);L!==null;){if(L.callback===null)r(u);else if(L.startTime<=O)r(u),L.sortIndex=L.expirationTime,t(l,L);else break;L=n(u)}}function E(O){if(x=!1,v(O),!m)if(n(l)!==null)m=!0,Q(S);else{var L=n(u);L!==null&&ne(E,L.startTime-O)}}function S(O,L){m=!1,x&&(x=!1,p(P),P=-1),h=!0;var B=d;try{for(v(L),c=n(l);c!==null&&(!(c.expirationTime>L)||O&&!I());){var V=c.callback;if(typeof V=="function"){c.callback=null,d=c.priorityLevel;var H=V(c.expirationTime<=L);L=e.unstable_now(),typeof H=="function"?c.callback=H:c===n(l)&&r(l),v(L)}else r(l);c=n(l)}if(c!==null)var q=!0;else{var ce=n(u);ce!==null&&ne(E,ce.startTime-L),q=!1}return q}finally{c=null,d=B,h=!1}}var C=!1,k=null,P=-1,j=5,N=-1;function I(){return!(e.unstable_now()-N<j)}function re(){if(k!==null){var O=e.unstable_now();N=O;var L=!0;try{L=k(!0,O)}finally{L?ie():(C=!1,k=null)}}else C=!1}var ie;if(typeof g=="function")ie=function(){g(re)};else if(typeof MessageChannel<"u"){var xe=new MessageChannel,Oe=xe.port2;xe.port1.onmessage=re,ie=function(){Oe.postMessage(null)}}else ie=function(){b(re,0)};function Q(O){k=O,C||(C=!0,ie())}function ne(O,L){P=b(function(){O(e.unstable_now())},L)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(O){O.callback=null},e.unstable_continueExecution=function(){m||h||(m=!0,Q(S))},e.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<O?Math.floor(1e3/O):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(O){switch(d){case 1:case 2:case 3:var L=3;break;default:L=d}var B=d;d=L;try{return O()}finally{d=B}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(O,L){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var B=d;d=O;try{return L()}finally{d=B}},e.unstable_scheduleCallback=function(O,L,B){var V=e.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?V+B:V):B=V,O){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=B+H,O={id:f++,callback:L,priorityLevel:O,startTime:B,expirationTime:H,sortIndex:-1},B>V?(O.sortIndex=B,t(u,O),n(l)===null&&O===n(u)&&(x?(p(P),P=-1):x=!0,ne(E,B-V))):(O.sortIndex=H,t(l,O),m||h||(m=!0,Q(S))),O},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(O){var L=d;return function(){var B=d;d=L;try{return O.apply(this,arguments)}finally{d=B}}}})(r1);n1.exports=r1;var lE=n1.exports;/**
25
+ */(function(e){function t(O,L){var B=O.length;O.push(L);e:for(;0<B;){var V=B-1>>>1,H=O[V];if(0<i(H,L))O[V]=L,O[B]=H,B=V;else break e}}function n(O){return O.length===0?null:O[0]}function r(O){if(O.length===0)return null;var L=O[0],B=O.pop();if(B!==L){O[0]=B;e:for(var V=0,H=O.length,q=H>>>1;V<q;){var ce=2*(V+1)-1,ye=O[ce],J=ce+1,Ve=O[J];if(0>i(ye,B))J<H&&0>i(Ve,ye)?(O[V]=Ve,O[J]=B,V=J):(O[V]=ye,O[ce]=B,V=ce);else if(J<H&&0>i(Ve,B))O[V]=Ve,O[J]=B,V=J;else break e}}return L}function i(O,L){var B=O.sortIndex-L.sortIndex;return B!==0?B:O.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],f=1,c=null,d=3,h=!1,m=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(O){for(var L=n(u);L!==null;){if(L.callback===null)r(u);else if(L.startTime<=O)r(u),L.sortIndex=L.expirationTime,t(l,L);else break;L=n(u)}}function E(O){if(v=!1,x(O),!m)if(n(l)!==null)m=!0,Q(S);else{var L=n(u);L!==null&&ne(E,L.startTime-O)}}function S(O,L){m=!1,v&&(v=!1,p(P),P=-1),h=!0;var B=d;try{for(x(L),c=n(l);c!==null&&(!(c.expirationTime>L)||O&&!I());){var V=c.callback;if(typeof V=="function"){c.callback=null,d=c.priorityLevel;var H=V(c.expirationTime<=L);L=e.unstable_now(),typeof H=="function"?c.callback=H:c===n(l)&&r(l),x(L)}else r(l);c=n(l)}if(c!==null)var q=!0;else{var ce=n(u);ce!==null&&ne(E,ce.startTime-L),q=!1}return q}finally{c=null,d=B,h=!1}}var C=!1,k=null,P=-1,j=5,N=-1;function I(){return!(e.unstable_now()-N<j)}function re(){if(k!==null){var O=e.unstable_now();N=O;var L=!0;try{L=k(!0,O)}finally{L?ie():(C=!1,k=null)}}else C=!1}var ie;if(typeof g=="function")ie=function(){g(re)};else if(typeof MessageChannel<"u"){var xe=new MessageChannel,Oe=xe.port2;xe.port1.onmessage=re,ie=function(){Oe.postMessage(null)}}else ie=function(){b(re,0)};function Q(O){k=O,C||(C=!0,ie())}function ne(O,L){P=b(function(){O(e.unstable_now())},L)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(O){O.callback=null},e.unstable_continueExecution=function(){m||h||(m=!0,Q(S))},e.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<O?Math.floor(1e3/O):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(O){switch(d){case 1:case 2:case 3:var L=3;break;default:L=d}var B=d;d=L;try{return O()}finally{d=B}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(O,L){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var B=d;d=O;try{return L()}finally{d=B}},e.unstable_scheduleCallback=function(O,L,B){var V=e.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?V+B:V):B=V,O){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=B+H,O={id:f++,callback:L,priorityLevel:O,startTime:B,expirationTime:H,sortIndex:-1},B>V?(O.sortIndex=B,t(u,O),n(l)===null&&O===n(u)&&(v?(p(P),P=-1):v=!0,ne(E,B-V))):(O.sortIndex=H,t(l,O),m||h||(m=!0,Q(S))),O},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(O){var L=d;return function(){var B=d;d=L;try{return O.apply(this,arguments)}finally{d=B}}}})(o1);s1.exports=o1;var cE=s1.exports;/**
26
26
  * @license React
27
27
  * react-dom.production.min.js
28
28
  *
@@ -30,14 +30,14 @@ var Hm=e=>{throw TypeError(e)};var $T=(e,t)=>()=>(t||e((t={exports:{}}).exports,
30
30
  *
31
31
  * This source code is licensed under the MIT license found in the
32
32
  * LICENSE file in the root directory of this source tree.
33
- */var uE=y,Lt=lE;function A(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i1=new Set,Io={};function Mi(e,t){Ms(e,t),Ms(e+"Capture",t)}function Ms(e,t){for(Io[e]=t,e=0;e<t.length;e++)i1.add(t[e])}var Yn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Af=Object.prototype.hasOwnProperty,cE=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Gm={},Qm={};function fE(e){return Af.call(Qm,e)?!0:Af.call(Gm,e)?!1:cE.test(e)?Qm[e]=!0:(Gm[e]=!0,!1)}function dE(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function hE(e,t,n,r){if(t===null||typeof t>"u"||dE(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ht(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var Ye={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ye[e]=new ht(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ye[t]=new ht(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ye[e]=new ht(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ye[e]=new ht(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ye[e]=new ht(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ye[e]=new ht(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ye[e]=new ht(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ye[e]=new ht(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ye[e]=new ht(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ah=/[\-:]([a-z])/g;function Rh(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Ah,Rh);Ye[t]=new ht(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Ah,Rh);Ye[t]=new ht(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Ah,Rh);Ye[t]=new ht(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ye[e]=new ht(e,1,!1,e.toLowerCase(),null,!1,!1)});Ye.xlinkHref=new ht("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ye[e]=new ht(e,1,!1,e.toLowerCase(),null,!0,!0)});function Oh(e,t,n,r){var i=Ye.hasOwnProperty(t)?Ye[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(hE(t,n,i,r)&&(n=null),r||i===null?fE(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var tr=uE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ua=Symbol.for("react.element"),Yi=Symbol.for("react.portal"),Xi=Symbol.for("react.fragment"),jh=Symbol.for("react.strict_mode"),Rf=Symbol.for("react.profiler"),s1=Symbol.for("react.provider"),o1=Symbol.for("react.context"),Nh=Symbol.for("react.forward_ref"),Of=Symbol.for("react.suspense"),jf=Symbol.for("react.suspense_list"),Mh=Symbol.for("react.memo"),cr=Symbol.for("react.lazy"),a1=Symbol.for("react.offscreen"),Ym=Symbol.iterator;function no(e){return e===null||typeof e!="object"?null:(e=Ym&&e[Ym]||e["@@iterator"],typeof e=="function"?e:null)}var Te=Object.assign,kc;function po(e){if(kc===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);kc=t&&t[1]||""}return`
34
- `+kc+e}var _c=!1;function Pc(e,t){if(!e||_c)return"";_c=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
33
+ */var fE=y,Lt=cE;function A(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a1=new Set,$o={};function Di(e,t){Ds(e,t),Ds(e+"Capture",t)}function Ds(e,t){for($o[e]=t,e=0;e<t.length;e++)a1.add(t[e])}var Yn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Of=Object.prototype.hasOwnProperty,dE=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ym={},Xm={};function hE(e){return Of.call(Xm,e)?!0:Of.call(Ym,e)?!1:dE.test(e)?Xm[e]=!0:(Ym[e]=!0,!1)}function pE(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function mE(e,t,n,r){if(t===null||typeof t>"u"||pE(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ht(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var Ye={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ye[e]=new ht(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ye[t]=new ht(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ye[e]=new ht(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ye[e]=new ht(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ye[e]=new ht(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ye[e]=new ht(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ye[e]=new ht(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ye[e]=new ht(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ye[e]=new ht(e,5,!1,e.toLowerCase(),null,!1,!1)});var Oh=/[\-:]([a-z])/g;function jh(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Oh,jh);Ye[t]=new ht(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Oh,jh);Ye[t]=new ht(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Oh,jh);Ye[t]=new ht(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ye[e]=new ht(e,1,!1,e.toLowerCase(),null,!1,!1)});Ye.xlinkHref=new ht("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ye[e]=new ht(e,1,!1,e.toLowerCase(),null,!0,!0)});function Nh(e,t,n,r){var i=Ye.hasOwnProperty(t)?Ye[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(mE(t,n,i,r)&&(n=null),r||i===null?hE(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var tr=fE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ha=Symbol.for("react.element"),Xi=Symbol.for("react.portal"),Zi=Symbol.for("react.fragment"),Mh=Symbol.for("react.strict_mode"),jf=Symbol.for("react.profiler"),l1=Symbol.for("react.provider"),u1=Symbol.for("react.context"),Dh=Symbol.for("react.forward_ref"),Nf=Symbol.for("react.suspense"),Mf=Symbol.for("react.suspense_list"),Fh=Symbol.for("react.memo"),cr=Symbol.for("react.lazy"),c1=Symbol.for("react.offscreen"),Zm=Symbol.iterator;function ro(e){return e===null||typeof e!="object"?null:(e=Zm&&e[Zm]||e["@@iterator"],typeof e=="function"?e:null)}var Te=Object.assign,_c;function mo(e){if(_c===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);_c=t&&t[1]||""}return`
34
+ `+_c+e}var Pc=!1;function Ac(e,t){if(!e||Pc)return"";Pc=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
35
35
  `),s=r.stack.split(`
36
36
  `),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var l=`
37
- `+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{_c=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?po(e):""}function pE(e){switch(e.tag){case 5:return po(e.type);case 16:return po("Lazy");case 13:return po("Suspense");case 19:return po("SuspenseList");case 0:case 2:case 15:return e=Pc(e.type,!1),e;case 11:return e=Pc(e.type.render,!1),e;case 1:return e=Pc(e.type,!0),e;default:return""}}function Nf(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Xi:return"Fragment";case Yi:return"Portal";case Rf:return"Profiler";case jh:return"StrictMode";case Of:return"Suspense";case jf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case o1:return(e.displayName||"Context")+".Consumer";case s1:return(e._context.displayName||"Context")+".Provider";case Nh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Mh:return t=e.displayName||null,t!==null?t:Nf(e.type)||"Memo";case cr:t=e._payload,e=e._init;try{return Nf(e(t))}catch{}}return null}function mE(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Nf(t);case 8:return t===jh?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Vr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function l1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function gE(e){var t=l1(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ha(e){e._valueTracker||(e._valueTracker=gE(e))}function u1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=l1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Bl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Mf(e,t){var n=t.checked;return Te({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Xm(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Vr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function c1(e,t){t=t.checked,t!=null&&Oh(e,"checked",t,!1)}function Df(e,t){c1(e,t);var n=Vr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ff(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ff(e,t.type,Vr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Zm(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ff(e,t,n){(t!=="number"||Bl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var mo=Array.isArray;function ps(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Vr(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Lf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(A(91));return Te({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Jm(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(A(92));if(mo(n)){if(1<n.length)throw Error(A(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Vr(n)}}function f1(e,t){var n=Vr(t.value),r=Vr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function eg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function d1(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function If(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?d1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Wa,h1=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Wa=Wa||document.createElement("div"),Wa.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Wa.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function $o(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var So={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},yE=["Webkit","ms","Moz","O"];Object.keys(So).forEach(function(e){yE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),So[t]=So[e]})});function p1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||So.hasOwnProperty(e)&&So[e]?(""+t).trim():t+"px"}function m1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=p1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var vE=Te({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function $f(e,t){if(t){if(vE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(A(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(A(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(A(61))}if(t.style!=null&&typeof t.style!="object")throw Error(A(62))}}function Vf(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Bf=null;function Dh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var zf=null,ms=null,gs=null;function tg(e){if(e=Sa(e)){if(typeof zf!="function")throw Error(A(280));var t=e.stateNode;t&&(t=Ou(t),zf(e.stateNode,e.type,t))}}function g1(e){ms?gs?gs.push(e):gs=[e]:ms=e}function y1(){if(ms){var e=ms,t=gs;if(gs=ms=null,tg(e),t)for(e=0;e<t.length;e++)tg(t[e])}}function v1(e,t){return e(t)}function x1(){}var Ac=!1;function w1(e,t,n){if(Ac)return e(t,n);Ac=!0;try{return v1(e,t,n)}finally{Ac=!1,(ms!==null||gs!==null)&&(x1(),y1())}}function Vo(e,t){var n=e.stateNode;if(n===null)return null;var r=Ou(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(A(231,t,typeof n));return n}var Uf=!1;if(Yn)try{var ro={};Object.defineProperty(ro,"passive",{get:function(){Uf=!0}}),window.addEventListener("test",ro,ro),window.removeEventListener("test",ro,ro)}catch{Uf=!1}function xE(e,t,n,r,i,s,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(f){this.onError(f)}}var To=!1,zl=null,Ul=!1,Hf=null,wE={onError:function(e){To=!0,zl=e}};function bE(e,t,n,r,i,s,o,a,l){To=!1,zl=null,xE.apply(wE,arguments)}function SE(e,t,n,r,i,s,o,a,l){if(bE.apply(this,arguments),To){if(To){var u=zl;To=!1,zl=null}else throw Error(A(198));Ul||(Ul=!0,Hf=u)}}function Di(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function b1(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function ng(e){if(Di(e)!==e)throw Error(A(188))}function TE(e){var t=e.alternate;if(!t){if(t=Di(e),t===null)throw Error(A(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return ng(i),e;if(s===r)return ng(i),t;s=s.sibling}throw Error(A(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o)throw Error(A(189))}}if(n.alternate!==r)throw Error(A(190))}if(n.tag!==3)throw Error(A(188));return n.stateNode.current===n?e:t}function S1(e){return e=TE(e),e!==null?T1(e):null}function T1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=T1(e);if(t!==null)return t;e=e.sibling}return null}var E1=Lt.unstable_scheduleCallback,rg=Lt.unstable_cancelCallback,EE=Lt.unstable_shouldYield,CE=Lt.unstable_requestPaint,Ae=Lt.unstable_now,kE=Lt.unstable_getCurrentPriorityLevel,Fh=Lt.unstable_ImmediatePriority,C1=Lt.unstable_UserBlockingPriority,Hl=Lt.unstable_NormalPriority,_E=Lt.unstable_LowPriority,k1=Lt.unstable_IdlePriority,_u=null,_n=null;function PE(e){if(_n&&typeof _n.onCommitFiberRoot=="function")try{_n.onCommitFiberRoot(_u,e,void 0,(e.current.flags&128)===128)}catch{}}var pn=Math.clz32?Math.clz32:OE,AE=Math.log,RE=Math.LN2;function OE(e){return e>>>=0,e===0?32:31-(AE(e)/RE|0)|0}var Ka=64,qa=4194304;function go(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Wl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=go(a):(s&=o,s!==0&&(r=go(s)))}else o=n&~i,o!==0?r=go(o):s!==0&&(r=go(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-pn(t),i=1<<n,r|=e[n],t&=~i;return r}function jE(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function NE(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-pn(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=jE(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function Wf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function _1(){var e=Ka;return Ka<<=1,!(Ka&4194240)&&(Ka=64),e}function Rc(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function wa(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-pn(t),e[t]=n}function ME(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-pn(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function Lh(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-pn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var le=0;function P1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var A1,Ih,R1,O1,j1,Kf=!1,Ga=[],Pr=null,Ar=null,Rr=null,Bo=new Map,zo=new Map,hr=[],DE="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ig(e,t){switch(e){case"focusin":case"focusout":Pr=null;break;case"dragenter":case"dragleave":Ar=null;break;case"mouseover":case"mouseout":Rr=null;break;case"pointerover":case"pointerout":Bo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":zo.delete(t.pointerId)}}function io(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=Sa(t),t!==null&&Ih(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function FE(e,t,n,r,i){switch(t){case"focusin":return Pr=io(Pr,e,t,n,r,i),!0;case"dragenter":return Ar=io(Ar,e,t,n,r,i),!0;case"mouseover":return Rr=io(Rr,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return Bo.set(s,io(Bo.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,zo.set(s,io(zo.get(s)||null,e,t,n,r,i)),!0}return!1}function N1(e){var t=oi(e.target);if(t!==null){var n=Di(t);if(n!==null){if(t=n.tag,t===13){if(t=b1(n),t!==null){e.blockedOn=t,j1(e.priority,function(){R1(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function xl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=qf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Bf=r,n.target.dispatchEvent(r),Bf=null}else return t=Sa(n),t!==null&&Ih(t),e.blockedOn=n,!1;t.shift()}return!0}function sg(e,t,n){xl(e)&&n.delete(t)}function LE(){Kf=!1,Pr!==null&&xl(Pr)&&(Pr=null),Ar!==null&&xl(Ar)&&(Ar=null),Rr!==null&&xl(Rr)&&(Rr=null),Bo.forEach(sg),zo.forEach(sg)}function so(e,t){e.blockedOn===t&&(e.blockedOn=null,Kf||(Kf=!0,Lt.unstable_scheduleCallback(Lt.unstable_NormalPriority,LE)))}function Uo(e){function t(i){return so(i,e)}if(0<Ga.length){so(Ga[0],e);for(var n=1;n<Ga.length;n++){var r=Ga[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Pr!==null&&so(Pr,e),Ar!==null&&so(Ar,e),Rr!==null&&so(Rr,e),Bo.forEach(t),zo.forEach(t),n=0;n<hr.length;n++)r=hr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<hr.length&&(n=hr[0],n.blockedOn===null);)N1(n),n.blockedOn===null&&hr.shift()}var ys=tr.ReactCurrentBatchConfig,Kl=!0;function IE(e,t,n,r){var i=le,s=ys.transition;ys.transition=null;try{le=1,$h(e,t,n,r)}finally{le=i,ys.transition=s}}function $E(e,t,n,r){var i=le,s=ys.transition;ys.transition=null;try{le=4,$h(e,t,n,r)}finally{le=i,ys.transition=s}}function $h(e,t,n,r){if(Kl){var i=qf(e,t,n,r);if(i===null)Vc(e,t,r,ql,n),ig(e,r);else if(FE(i,e,t,n,r))r.stopPropagation();else if(ig(e,r),t&4&&-1<DE.indexOf(e)){for(;i!==null;){var s=Sa(i);if(s!==null&&A1(s),s=qf(e,t,n,r),s===null&&Vc(e,t,r,ql,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Vc(e,t,r,null,n)}}var ql=null;function qf(e,t,n,r){if(ql=null,e=Dh(r),e=oi(e),e!==null)if(t=Di(e),t===null)e=null;else if(n=t.tag,n===13){if(e=b1(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ql=e,null}function M1(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(kE()){case Fh:return 1;case C1:return 4;case Hl:case _E:return 16;case k1:return 536870912;default:return 16}default:return 16}}var Er=null,Vh=null,wl=null;function D1(){if(wl)return wl;var e,t=Vh,n=t.length,r,i="value"in Er?Er.value:Er.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[s-r];r++);return wl=i.slice(e,1<r?1-r:void 0)}function bl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Qa(){return!0}function og(){return!1}function $t(e){function t(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Qa:og,this.isPropagationStopped=og,this}return Te(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Qa)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Qa)},persist:function(){},isPersistent:Qa}),t}var qs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bh=$t(qs),ba=Te({},qs,{view:0,detail:0}),VE=$t(ba),Oc,jc,oo,Pu=Te({},ba,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zh,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==oo&&(oo&&e.type==="mousemove"?(Oc=e.screenX-oo.screenX,jc=e.screenY-oo.screenY):jc=Oc=0,oo=e),Oc)},movementY:function(e){return"movementY"in e?e.movementY:jc}}),ag=$t(Pu),BE=Te({},Pu,{dataTransfer:0}),zE=$t(BE),UE=Te({},ba,{relatedTarget:0}),Nc=$t(UE),HE=Te({},qs,{animationName:0,elapsedTime:0,pseudoElement:0}),WE=$t(HE),KE=Te({},qs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),qE=$t(KE),GE=Te({},qs,{data:0}),lg=$t(GE),QE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},YE={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},XE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ZE(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=XE[e])?!!t[e]:!1}function zh(){return ZE}var JE=Te({},ba,{key:function(e){if(e.key){var t=QE[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=bl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?YE[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zh,charCode:function(e){return e.type==="keypress"?bl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?bl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),eC=$t(JE),tC=Te({},Pu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ug=$t(tC),nC=Te({},ba,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zh}),rC=$t(nC),iC=Te({},qs,{propertyName:0,elapsedTime:0,pseudoElement:0}),sC=$t(iC),oC=Te({},Pu,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),aC=$t(oC),lC=[9,13,27,32],Uh=Yn&&"CompositionEvent"in window,Eo=null;Yn&&"documentMode"in document&&(Eo=document.documentMode);var uC=Yn&&"TextEvent"in window&&!Eo,F1=Yn&&(!Uh||Eo&&8<Eo&&11>=Eo),cg=" ",fg=!1;function L1(e,t){switch(e){case"keyup":return lC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function I1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zi=!1;function cC(e,t){switch(e){case"compositionend":return I1(t);case"keypress":return t.which!==32?null:(fg=!0,cg);case"textInput":return e=t.data,e===cg&&fg?null:e;default:return null}}function fC(e,t){if(Zi)return e==="compositionend"||!Uh&&L1(e,t)?(e=D1(),wl=Vh=Er=null,Zi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return F1&&t.locale!=="ko"?null:t.data;default:return null}}var dC={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function dg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!dC[e.type]:t==="textarea"}function $1(e,t,n,r){g1(r),t=Gl(t,"onChange"),0<t.length&&(n=new Bh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Co=null,Ho=null;function hC(e){Y1(e,0)}function Au(e){var t=ts(e);if(u1(t))return e}function pC(e,t){if(e==="change")return t}var V1=!1;if(Yn){var Mc;if(Yn){var Dc="oninput"in document;if(!Dc){var hg=document.createElement("div");hg.setAttribute("oninput","return;"),Dc=typeof hg.oninput=="function"}Mc=Dc}else Mc=!1;V1=Mc&&(!document.documentMode||9<document.documentMode)}function pg(){Co&&(Co.detachEvent("onpropertychange",B1),Ho=Co=null)}function B1(e){if(e.propertyName==="value"&&Au(Ho)){var t=[];$1(t,Ho,e,Dh(e)),w1(hC,t)}}function mC(e,t,n){e==="focusin"?(pg(),Co=t,Ho=n,Co.attachEvent("onpropertychange",B1)):e==="focusout"&&pg()}function gC(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Au(Ho)}function yC(e,t){if(e==="click")return Au(t)}function vC(e,t){if(e==="input"||e==="change")return Au(t)}function xC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gn=typeof Object.is=="function"?Object.is:xC;function Wo(e,t){if(gn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Af.call(t,i)||!gn(e[i],t[i]))return!1}return!0}function mg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function gg(e,t){var n=mg(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=mg(n)}}function z1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?z1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function U1(){for(var e=window,t=Bl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Bl(e.document)}return t}function Hh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function wC(e){var t=U1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&z1(n.ownerDocument.documentElement,n)){if(r!==null&&Hh(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=gg(n,s);var o=gg(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var bC=Yn&&"documentMode"in document&&11>=document.documentMode,Ji=null,Gf=null,ko=null,Qf=!1;function yg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Qf||Ji==null||Ji!==Bl(r)||(r=Ji,"selectionStart"in r&&Hh(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ko&&Wo(ko,r)||(ko=r,r=Gl(Gf,"onSelect"),0<r.length&&(t=new Bh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ji)))}function Ya(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var es={animationend:Ya("Animation","AnimationEnd"),animationiteration:Ya("Animation","AnimationIteration"),animationstart:Ya("Animation","AnimationStart"),transitionend:Ya("Transition","TransitionEnd")},Fc={},H1={};Yn&&(H1=document.createElement("div").style,"AnimationEvent"in window||(delete es.animationend.animation,delete es.animationiteration.animation,delete es.animationstart.animation),"TransitionEvent"in window||delete es.transitionend.transition);function Ru(e){if(Fc[e])return Fc[e];if(!es[e])return e;var t=es[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in H1)return Fc[e]=t[n];return e}var W1=Ru("animationend"),K1=Ru("animationiteration"),q1=Ru("animationstart"),G1=Ru("transitionend"),Q1=new Map,vg="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Wr(e,t){Q1.set(e,t),Mi(t,[e])}for(var Lc=0;Lc<vg.length;Lc++){var Ic=vg[Lc],SC=Ic.toLowerCase(),TC=Ic[0].toUpperCase()+Ic.slice(1);Wr(SC,"on"+TC)}Wr(W1,"onAnimationEnd");Wr(K1,"onAnimationIteration");Wr(q1,"onAnimationStart");Wr("dblclick","onDoubleClick");Wr("focusin","onFocus");Wr("focusout","onBlur");Wr(G1,"onTransitionEnd");Ms("onMouseEnter",["mouseout","mouseover"]);Ms("onMouseLeave",["mouseout","mouseover"]);Ms("onPointerEnter",["pointerout","pointerover"]);Ms("onPointerLeave",["pointerout","pointerover"]);Mi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Mi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Mi("onBeforeInput",["compositionend","keypress","textInput","paste"]);Mi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Mi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Mi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var yo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),EC=new Set("cancel close invalid load scroll toggle".split(" ").concat(yo));function xg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,SE(r,t,void 0,e),e.currentTarget=null}function Y1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;xg(i,a,u),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;xg(i,a,u),s=l}}}if(Ul)throw e=Hf,Ul=!1,Hf=null,e}function pe(e,t){var n=t[ed];n===void 0&&(n=t[ed]=new Set);var r=e+"__bubble";n.has(r)||(X1(t,e,2,!1),n.add(r))}function $c(e,t,n){var r=0;t&&(r|=4),X1(n,e,r,t)}var Xa="_reactListening"+Math.random().toString(36).slice(2);function Ko(e){if(!e[Xa]){e[Xa]=!0,i1.forEach(function(n){n!=="selectionchange"&&(EC.has(n)||$c(n,!1,e),$c(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Xa]||(t[Xa]=!0,$c("selectionchange",!1,t))}}function X1(e,t,n,r){switch(M1(t)){case 1:var i=IE;break;case 4:i=$E;break;default:i=$h}n=i.bind(null,t,n,e),i=void 0,!Uf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Vc(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;a!==null;){if(o=oi(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}w1(function(){var u=s,f=Dh(n),c=[];e:{var d=Q1.get(e);if(d!==void 0){var h=Bh,m=e;switch(e){case"keypress":if(bl(n)===0)break e;case"keydown":case"keyup":h=eC;break;case"focusin":m="focus",h=Nc;break;case"focusout":m="blur",h=Nc;break;case"beforeblur":case"afterblur":h=Nc;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=ag;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=zE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=rC;break;case W1:case K1:case q1:h=WE;break;case G1:h=sC;break;case"scroll":h=VE;break;case"wheel":h=aC;break;case"copy":case"cut":case"paste":h=qE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=ug}var x=(t&4)!==0,b=!x&&e==="scroll",p=x?d!==null?d+"Capture":null:d;x=[];for(var g=u,v;g!==null;){v=g;var E=v.stateNode;if(v.tag===5&&E!==null&&(v=E,p!==null&&(E=Vo(g,p),E!=null&&x.push(qo(g,E,v)))),b)break;g=g.return}0<x.length&&(d=new h(d,m,null,n,f),c.push({event:d,listeners:x}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&n!==Bf&&(m=n.relatedTarget||n.fromElement)&&(oi(m)||m[Xn]))break e;if((h||d)&&(d=f.window===f?f:(d=f.ownerDocument)?d.defaultView||d.parentWindow:window,h?(m=n.relatedTarget||n.toElement,h=u,m=m?oi(m):null,m!==null&&(b=Di(m),m!==b||m.tag!==5&&m.tag!==6)&&(m=null)):(h=null,m=u),h!==m)){if(x=ag,E="onMouseLeave",p="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(x=ug,E="onPointerLeave",p="onPointerEnter",g="pointer"),b=h==null?d:ts(h),v=m==null?d:ts(m),d=new x(E,g+"leave",h,n,f),d.target=b,d.relatedTarget=v,E=null,oi(f)===u&&(x=new x(p,g+"enter",m,n,f),x.target=v,x.relatedTarget=b,E=x),b=E,h&&m)t:{for(x=h,p=m,g=0,v=x;v;v=Gi(v))g++;for(v=0,E=p;E;E=Gi(E))v++;for(;0<g-v;)x=Gi(x),g--;for(;0<v-g;)p=Gi(p),v--;for(;g--;){if(x===p||p!==null&&x===p.alternate)break t;x=Gi(x),p=Gi(p)}x=null}else x=null;h!==null&&wg(c,d,h,x,!1),m!==null&&b!==null&&wg(c,b,m,x,!0)}}e:{if(d=u?ts(u):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var S=pC;else if(dg(d))if(V1)S=vC;else{S=gC;var C=mC}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(S=yC);if(S&&(S=S(e,u))){$1(c,S,n,f);break e}C&&C(e,d,u),e==="focusout"&&(C=d._wrapperState)&&C.controlled&&d.type==="number"&&Ff(d,"number",d.value)}switch(C=u?ts(u):window,e){case"focusin":(dg(C)||C.contentEditable==="true")&&(Ji=C,Gf=u,ko=null);break;case"focusout":ko=Gf=Ji=null;break;case"mousedown":Qf=!0;break;case"contextmenu":case"mouseup":case"dragend":Qf=!1,yg(c,n,f);break;case"selectionchange":if(bC)break;case"keydown":case"keyup":yg(c,n,f)}var k;if(Uh)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else Zi?L1(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(F1&&n.locale!=="ko"&&(Zi||P!=="onCompositionStart"?P==="onCompositionEnd"&&Zi&&(k=D1()):(Er=f,Vh="value"in Er?Er.value:Er.textContent,Zi=!0)),C=Gl(u,P),0<C.length&&(P=new lg(P,e,null,n,f),c.push({event:P,listeners:C}),k?P.data=k:(k=I1(n),k!==null&&(P.data=k)))),(k=uC?cC(e,n):fC(e,n))&&(u=Gl(u,"onBeforeInput"),0<u.length&&(f=new lg("onBeforeInput","beforeinput",null,n,f),c.push({event:f,listeners:u}),f.data=k))}Y1(c,t)})}function qo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Gl(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Vo(e,n),s!=null&&r.unshift(qo(e,s,i)),s=Vo(e,t),s!=null&&r.push(qo(e,s,i))),e=e.return}return r}function Gi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function wg(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,i?(l=Vo(n,s),l!=null&&o.unshift(qo(n,l,a))):i||(l=Vo(n,s),l!=null&&o.push(qo(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var CC=/\r\n?/g,kC=/\u0000|\uFFFD/g;function bg(e){return(typeof e=="string"?e:""+e).replace(CC,`
38
- `).replace(kC,"")}function Za(e,t,n){if(t=bg(t),bg(e)!==t&&n)throw Error(A(425))}function Ql(){}var Yf=null,Xf=null;function Zf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Jf=typeof setTimeout=="function"?setTimeout:void 0,_C=typeof clearTimeout=="function"?clearTimeout:void 0,Sg=typeof Promise=="function"?Promise:void 0,PC=typeof queueMicrotask=="function"?queueMicrotask:typeof Sg<"u"?function(e){return Sg.resolve(null).then(e).catch(AC)}:Jf;function AC(e){setTimeout(function(){throw e})}function Bc(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Uo(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Uo(t)}function Or(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Tg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Gs=Math.random().toString(36).slice(2),kn="__reactFiber$"+Gs,Go="__reactProps$"+Gs,Xn="__reactContainer$"+Gs,ed="__reactEvents$"+Gs,RC="__reactListeners$"+Gs,OC="__reactHandles$"+Gs;function oi(e){var t=e[kn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Xn]||n[kn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Tg(e);e!==null;){if(n=e[kn])return n;e=Tg(e)}return t}e=n,n=e.parentNode}return null}function Sa(e){return e=e[kn]||e[Xn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ts(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(A(33))}function Ou(e){return e[Go]||null}var td=[],ns=-1;function Kr(e){return{current:e}}function ge(e){0>ns||(e.current=td[ns],td[ns]=null,ns--)}function de(e,t){ns++,td[ns]=e.current,e.current=t}var Br={},st=Kr(Br),Tt=Kr(!1),Ci=Br;function Ds(e,t){var n=e.type.contextTypes;if(!n)return Br;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Et(e){return e=e.childContextTypes,e!=null}function Yl(){ge(Tt),ge(st)}function Eg(e,t,n){if(st.current!==Br)throw Error(A(168));de(st,t),de(Tt,n)}function Z1(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(A(108,mE(e)||"Unknown",i));return Te({},n,r)}function Xl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Br,Ci=st.current,de(st,e),de(Tt,Tt.current),!0}function Cg(e,t,n){var r=e.stateNode;if(!r)throw Error(A(169));n?(e=Z1(e,t,Ci),r.__reactInternalMemoizedMergedChildContext=e,ge(Tt),ge(st),de(st,e)):ge(Tt),de(Tt,n)}var Bn=null,ju=!1,zc=!1;function J1(e){Bn===null?Bn=[e]:Bn.push(e)}function jC(e){ju=!0,J1(e)}function qr(){if(!zc&&Bn!==null){zc=!0;var e=0,t=le;try{var n=Bn;for(le=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Bn=null,ju=!1}catch(i){throw Bn!==null&&(Bn=Bn.slice(e+1)),E1(Fh,qr),i}finally{le=t,zc=!1}}return null}var rs=[],is=0,Zl=null,Jl=0,qt=[],Gt=0,ki=null,Hn=1,Wn="";function ei(e,t){rs[is++]=Jl,rs[is++]=Zl,Zl=e,Jl=t}function ex(e,t,n){qt[Gt++]=Hn,qt[Gt++]=Wn,qt[Gt++]=ki,ki=e;var r=Hn;e=Wn;var i=32-pn(r)-1;r&=~(1<<i),n+=1;var s=32-pn(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Hn=1<<32-pn(t)+i|n<<i|r,Wn=s+e}else Hn=1<<s|n<<i|r,Wn=e}function Wh(e){e.return!==null&&(ei(e,1),ex(e,1,0))}function Kh(e){for(;e===Zl;)Zl=rs[--is],rs[is]=null,Jl=rs[--is],rs[is]=null;for(;e===ki;)ki=qt[--Gt],qt[Gt]=null,Wn=qt[--Gt],qt[Gt]=null,Hn=qt[--Gt],qt[Gt]=null}var Ft=null,Nt=null,ve=!1,dn=null;function tx(e,t){var n=Yt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function kg(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ft=e,Nt=Or(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ft=e,Nt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=ki!==null?{id:Hn,overflow:Wn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Yt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ft=e,Nt=null,!0):!1;default:return!1}}function nd(e){return(e.mode&1)!==0&&(e.flags&128)===0}function rd(e){if(ve){var t=Nt;if(t){var n=t;if(!kg(e,t)){if(nd(e))throw Error(A(418));t=Or(n.nextSibling);var r=Ft;t&&kg(e,t)?tx(r,n):(e.flags=e.flags&-4097|2,ve=!1,Ft=e)}}else{if(nd(e))throw Error(A(418));e.flags=e.flags&-4097|2,ve=!1,Ft=e}}}function _g(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ft=e}function Ja(e){if(e!==Ft)return!1;if(!ve)return _g(e),ve=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Zf(e.type,e.memoizedProps)),t&&(t=Nt)){if(nd(e))throw nx(),Error(A(418));for(;t;)tx(e,t),t=Or(t.nextSibling)}if(_g(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(A(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Nt=Or(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Nt=null}}else Nt=Ft?Or(e.stateNode.nextSibling):null;return!0}function nx(){for(var e=Nt;e;)e=Or(e.nextSibling)}function Fs(){Nt=Ft=null,ve=!1}function qh(e){dn===null?dn=[e]:dn.push(e)}var NC=tr.ReactCurrentBatchConfig;function ao(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(A(309));var r=n.stateNode}if(!r)throw Error(A(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},t._stringRef=s,t)}if(typeof e!="string")throw Error(A(284));if(!n._owner)throw Error(A(290,e))}return e}function el(e,t){throw e=Object.prototype.toString.call(t),Error(A(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Pg(e){var t=e._init;return t(e._payload)}function rx(e){function t(p,g){if(e){var v=p.deletions;v===null?(p.deletions=[g],p.flags|=16):v.push(g)}}function n(p,g){if(!e)return null;for(;g!==null;)t(p,g),g=g.sibling;return null}function r(p,g){for(p=new Map;g!==null;)g.key!==null?p.set(g.key,g):p.set(g.index,g),g=g.sibling;return p}function i(p,g){return p=Dr(p,g),p.index=0,p.sibling=null,p}function s(p,g,v){return p.index=v,e?(v=p.alternate,v!==null?(v=v.index,v<g?(p.flags|=2,g):v):(p.flags|=2,g)):(p.flags|=1048576,g)}function o(p){return e&&p.alternate===null&&(p.flags|=2),p}function a(p,g,v,E){return g===null||g.tag!==6?(g=Qc(v,p.mode,E),g.return=p,g):(g=i(g,v),g.return=p,g)}function l(p,g,v,E){var S=v.type;return S===Xi?f(p,g,v.props.children,E,v.key):g!==null&&(g.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===cr&&Pg(S)===g.type)?(E=i(g,v.props),E.ref=ao(p,g,v),E.return=p,E):(E=Pl(v.type,v.key,v.props,null,p.mode,E),E.ref=ao(p,g,v),E.return=p,E)}function u(p,g,v,E){return g===null||g.tag!==4||g.stateNode.containerInfo!==v.containerInfo||g.stateNode.implementation!==v.implementation?(g=Yc(v,p.mode,E),g.return=p,g):(g=i(g,v.children||[]),g.return=p,g)}function f(p,g,v,E,S){return g===null||g.tag!==7?(g=bi(v,p.mode,E,S),g.return=p,g):(g=i(g,v),g.return=p,g)}function c(p,g,v){if(typeof g=="string"&&g!==""||typeof g=="number")return g=Qc(""+g,p.mode,v),g.return=p,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Ua:return v=Pl(g.type,g.key,g.props,null,p.mode,v),v.ref=ao(p,null,g),v.return=p,v;case Yi:return g=Yc(g,p.mode,v),g.return=p,g;case cr:var E=g._init;return c(p,E(g._payload),v)}if(mo(g)||no(g))return g=bi(g,p.mode,v,null),g.return=p,g;el(p,g)}return null}function d(p,g,v,E){var S=g!==null?g.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return S!==null?null:a(p,g,""+v,E);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Ua:return v.key===S?l(p,g,v,E):null;case Yi:return v.key===S?u(p,g,v,E):null;case cr:return S=v._init,d(p,g,S(v._payload),E)}if(mo(v)||no(v))return S!==null?null:f(p,g,v,E,null);el(p,v)}return null}function h(p,g,v,E,S){if(typeof E=="string"&&E!==""||typeof E=="number")return p=p.get(v)||null,a(g,p,""+E,S);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case Ua:return p=p.get(E.key===null?v:E.key)||null,l(g,p,E,S);case Yi:return p=p.get(E.key===null?v:E.key)||null,u(g,p,E,S);case cr:var C=E._init;return h(p,g,v,C(E._payload),S)}if(mo(E)||no(E))return p=p.get(v)||null,f(g,p,E,S,null);el(g,E)}return null}function m(p,g,v,E){for(var S=null,C=null,k=g,P=g=0,j=null;k!==null&&P<v.length;P++){k.index>P?(j=k,k=null):j=k.sibling;var N=d(p,k,v[P],E);if(N===null){k===null&&(k=j);break}e&&k&&N.alternate===null&&t(p,k),g=s(N,g,P),C===null?S=N:C.sibling=N,C=N,k=j}if(P===v.length)return n(p,k),ve&&ei(p,P),S;if(k===null){for(;P<v.length;P++)k=c(p,v[P],E),k!==null&&(g=s(k,g,P),C===null?S=k:C.sibling=k,C=k);return ve&&ei(p,P),S}for(k=r(p,k);P<v.length;P++)j=h(k,p,P,v[P],E),j!==null&&(e&&j.alternate!==null&&k.delete(j.key===null?P:j.key),g=s(j,g,P),C===null?S=j:C.sibling=j,C=j);return e&&k.forEach(function(I){return t(p,I)}),ve&&ei(p,P),S}function x(p,g,v,E){var S=no(v);if(typeof S!="function")throw Error(A(150));if(v=S.call(v),v==null)throw Error(A(151));for(var C=S=null,k=g,P=g=0,j=null,N=v.next();k!==null&&!N.done;P++,N=v.next()){k.index>P?(j=k,k=null):j=k.sibling;var I=d(p,k,N.value,E);if(I===null){k===null&&(k=j);break}e&&k&&I.alternate===null&&t(p,k),g=s(I,g,P),C===null?S=I:C.sibling=I,C=I,k=j}if(N.done)return n(p,k),ve&&ei(p,P),S;if(k===null){for(;!N.done;P++,N=v.next())N=c(p,N.value,E),N!==null&&(g=s(N,g,P),C===null?S=N:C.sibling=N,C=N);return ve&&ei(p,P),S}for(k=r(p,k);!N.done;P++,N=v.next())N=h(k,p,P,N.value,E),N!==null&&(e&&N.alternate!==null&&k.delete(N.key===null?P:N.key),g=s(N,g,P),C===null?S=N:C.sibling=N,C=N);return e&&k.forEach(function(re){return t(p,re)}),ve&&ei(p,P),S}function b(p,g,v,E){if(typeof v=="object"&&v!==null&&v.type===Xi&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Ua:e:{for(var S=v.key,C=g;C!==null;){if(C.key===S){if(S=v.type,S===Xi){if(C.tag===7){n(p,C.sibling),g=i(C,v.props.children),g.return=p,p=g;break e}}else if(C.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===cr&&Pg(S)===C.type){n(p,C.sibling),g=i(C,v.props),g.ref=ao(p,C,v),g.return=p,p=g;break e}n(p,C);break}else t(p,C);C=C.sibling}v.type===Xi?(g=bi(v.props.children,p.mode,E,v.key),g.return=p,p=g):(E=Pl(v.type,v.key,v.props,null,p.mode,E),E.ref=ao(p,g,v),E.return=p,p=E)}return o(p);case Yi:e:{for(C=v.key;g!==null;){if(g.key===C)if(g.tag===4&&g.stateNode.containerInfo===v.containerInfo&&g.stateNode.implementation===v.implementation){n(p,g.sibling),g=i(g,v.children||[]),g.return=p,p=g;break e}else{n(p,g);break}else t(p,g);g=g.sibling}g=Yc(v,p.mode,E),g.return=p,p=g}return o(p);case cr:return C=v._init,b(p,g,C(v._payload),E)}if(mo(v))return m(p,g,v,E);if(no(v))return x(p,g,v,E);el(p,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,g!==null&&g.tag===6?(n(p,g.sibling),g=i(g,v),g.return=p,p=g):(n(p,g),g=Qc(v,p.mode,E),g.return=p,p=g),o(p)):n(p,g)}return b}var Ls=rx(!0),ix=rx(!1),eu=Kr(null),tu=null,ss=null,Gh=null;function Qh(){Gh=ss=tu=null}function Yh(e){var t=eu.current;ge(eu),e._currentValue=t}function id(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function vs(e,t){tu=e,Gh=ss=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(St=!0),e.firstContext=null)}function Jt(e){var t=e._currentValue;if(Gh!==e)if(e={context:e,memoizedValue:t,next:null},ss===null){if(tu===null)throw Error(A(308));ss=e,tu.dependencies={lanes:0,firstContext:e}}else ss=ss.next=e;return t}var ai=null;function Xh(e){ai===null?ai=[e]:ai.push(e)}function sx(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Xh(t)):(n.next=i.next,i.next=n),t.interleaved=n,Zn(e,r)}function Zn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var fr=!1;function Zh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ox(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function qn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function jr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,se&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Zn(e,n)}return i=r.interleaved,i===null?(t.next=t,Xh(r)):(t.next=i.next,i.next=t),r.interleaved=t,Zn(e,n)}function Sl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Lh(e,n)}}function Ag(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function nu(e,t,n,r){var i=e.updateQueue;fr=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?s=u:o.next=u,o=l;var f=e.alternate;f!==null&&(f=f.updateQueue,a=f.lastBaseUpdate,a!==o&&(a===null?f.firstBaseUpdate=u:a.next=u,f.lastBaseUpdate=l))}if(s!==null){var c=i.baseState;o=0,f=u=l=null,a=s;do{var d=a.lane,h=a.eventTime;if((r&d)===d){f!==null&&(f=f.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,x=a;switch(d=t,h=n,x.tag){case 1:if(m=x.payload,typeof m=="function"){c=m.call(h,c,d);break e}c=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=x.payload,d=typeof m=="function"?m.call(h,c,d):m,d==null)break e;c=Te({},c,d);break e;case 2:fr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[a]:d.push(a))}else h={eventTime:h,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},f===null?(u=f=h,l=c):f=f.next=h,o|=d;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;d=a,a=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(f===null&&(l=c),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);Pi|=o,e.lanes=o,e.memoizedState=c}}function Rg(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(A(191,i));i.call(r)}}}var Ta={},Pn=Kr(Ta),Qo=Kr(Ta),Yo=Kr(Ta);function li(e){if(e===Ta)throw Error(A(174));return e}function Jh(e,t){switch(de(Yo,t),de(Qo,e),de(Pn,Ta),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:If(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=If(t,e)}ge(Pn),de(Pn,t)}function Is(){ge(Pn),ge(Qo),ge(Yo)}function ax(e){li(Yo.current);var t=li(Pn.current),n=If(t,e.type);t!==n&&(de(Qo,e),de(Pn,n))}function ep(e){Qo.current===e&&(ge(Pn),ge(Qo))}var we=Kr(0);function ru(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Uc=[];function tp(){for(var e=0;e<Uc.length;e++)Uc[e]._workInProgressVersionPrimary=null;Uc.length=0}var Tl=tr.ReactCurrentDispatcher,Hc=tr.ReactCurrentBatchConfig,_i=0,Se=null,Fe=null,Ue=null,iu=!1,_o=!1,Xo=0,MC=0;function Ze(){throw Error(A(321))}function np(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!gn(e[n],t[n]))return!1;return!0}function rp(e,t,n,r,i,s){if(_i=s,Se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Tl.current=e===null||e.memoizedState===null?IC:$C,e=n(r,i),_o){s=0;do{if(_o=!1,Xo=0,25<=s)throw Error(A(301));s+=1,Ue=Fe=null,t.updateQueue=null,Tl.current=VC,e=n(r,i)}while(_o)}if(Tl.current=su,t=Fe!==null&&Fe.next!==null,_i=0,Ue=Fe=Se=null,iu=!1,t)throw Error(A(300));return e}function ip(){var e=Xo!==0;return Xo=0,e}function wn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ue===null?Se.memoizedState=Ue=e:Ue=Ue.next=e,Ue}function en(){if(Fe===null){var e=Se.alternate;e=e!==null?e.memoizedState:null}else e=Fe.next;var t=Ue===null?Se.memoizedState:Ue.next;if(t!==null)Ue=t,Fe=e;else{if(e===null)throw Error(A(310));Fe=e,e={memoizedState:Fe.memoizedState,baseState:Fe.baseState,baseQueue:Fe.baseQueue,queue:Fe.queue,next:null},Ue===null?Se.memoizedState=Ue=e:Ue=Ue.next=e}return Ue}function Zo(e,t){return typeof t=="function"?t(e):t}function Wc(e){var t=en(),n=t.queue;if(n===null)throw Error(A(311));n.lastRenderedReducer=e;var r=Fe,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,u=s;do{var f=u.lane;if((_i&f)===f)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var c={lane:f,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=c,o=r):l=l.next=c,Se.lanes|=f,Pi|=f}u=u.next}while(u!==null&&u!==s);l===null?o=r:l.next=a,gn(r,t.memoizedState)||(St=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,Se.lanes|=s,Pi|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Kc(e){var t=en(),n=t.queue;if(n===null)throw Error(A(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=e(s,o.action),o=o.next;while(o!==i);gn(s,t.memoizedState)||(St=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function lx(){}function ux(e,t){var n=Se,r=en(),i=t(),s=!gn(r.memoizedState,i);if(s&&(r.memoizedState=i,St=!0),r=r.queue,sp(dx.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Ue!==null&&Ue.memoizedState.tag&1){if(n.flags|=2048,Jo(9,fx.bind(null,n,r,i,t),void 0,null),He===null)throw Error(A(349));_i&30||cx(n,t,i)}return i}function cx(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Se.updateQueue,t===null?(t={lastEffect:null,stores:null},Se.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function fx(e,t,n,r){t.value=n,t.getSnapshot=r,hx(t)&&px(e)}function dx(e,t,n){return n(function(){hx(t)&&px(e)})}function hx(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!gn(e,n)}catch{return!0}}function px(e){var t=Zn(e,1);t!==null&&mn(t,e,1,-1)}function Og(e){var t=wn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Zo,lastRenderedState:e},t.queue=e,e=e.dispatch=LC.bind(null,Se,e),[t.memoizedState,e]}function Jo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Se.updateQueue,t===null?(t={lastEffect:null,stores:null},Se.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function mx(){return en().memoizedState}function El(e,t,n,r){var i=wn();Se.flags|=e,i.memoizedState=Jo(1|t,n,void 0,r===void 0?null:r)}function Nu(e,t,n,r){var i=en();r=r===void 0?null:r;var s=void 0;if(Fe!==null){var o=Fe.memoizedState;if(s=o.destroy,r!==null&&np(r,o.deps)){i.memoizedState=Jo(t,n,s,r);return}}Se.flags|=e,i.memoizedState=Jo(1|t,n,s,r)}function jg(e,t){return El(8390656,8,e,t)}function sp(e,t){return Nu(2048,8,e,t)}function gx(e,t){return Nu(4,2,e,t)}function yx(e,t){return Nu(4,4,e,t)}function vx(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function xx(e,t,n){return n=n!=null?n.concat([e]):null,Nu(4,4,vx.bind(null,t,e),n)}function op(){}function wx(e,t){var n=en();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&np(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function bx(e,t){var n=en();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&np(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Sx(e,t,n){return _i&21?(gn(n,t)||(n=_1(),Se.lanes|=n,Pi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,St=!0),e.memoizedState=n)}function DC(e,t){var n=le;le=n!==0&&4>n?n:4,e(!0);var r=Hc.transition;Hc.transition={};try{e(!1),t()}finally{le=n,Hc.transition=r}}function Tx(){return en().memoizedState}function FC(e,t,n){var r=Mr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ex(e))Cx(t,n);else if(n=sx(e,t,n,r),n!==null){var i=ft();mn(n,e,r,i),kx(n,t,r)}}function LC(e,t,n){var r=Mr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ex(e))Cx(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,gn(a,o)){var l=t.interleaved;l===null?(i.next=i,Xh(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=sx(e,t,i,r),n!==null&&(i=ft(),mn(n,e,r,i),kx(n,t,r))}}function Ex(e){var t=e.alternate;return e===Se||t!==null&&t===Se}function Cx(e,t){_o=iu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function kx(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Lh(e,n)}}var su={readContext:Jt,useCallback:Ze,useContext:Ze,useEffect:Ze,useImperativeHandle:Ze,useInsertionEffect:Ze,useLayoutEffect:Ze,useMemo:Ze,useReducer:Ze,useRef:Ze,useState:Ze,useDebugValue:Ze,useDeferredValue:Ze,useTransition:Ze,useMutableSource:Ze,useSyncExternalStore:Ze,useId:Ze,unstable_isNewReconciler:!1},IC={readContext:Jt,useCallback:function(e,t){return wn().memoizedState=[e,t===void 0?null:t],e},useContext:Jt,useEffect:jg,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,El(4194308,4,vx.bind(null,t,e),n)},useLayoutEffect:function(e,t){return El(4194308,4,e,t)},useInsertionEffect:function(e,t){return El(4,2,e,t)},useMemo:function(e,t){var n=wn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=wn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=FC.bind(null,Se,e),[r.memoizedState,e]},useRef:function(e){var t=wn();return e={current:e},t.memoizedState=e},useState:Og,useDebugValue:op,useDeferredValue:function(e){return wn().memoizedState=e},useTransition:function(){var e=Og(!1),t=e[0];return e=DC.bind(null,e[1]),wn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Se,i=wn();if(ve){if(n===void 0)throw Error(A(407));n=n()}else{if(n=t(),He===null)throw Error(A(349));_i&30||cx(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,jg(dx.bind(null,r,s,e),[e]),r.flags|=2048,Jo(9,fx.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=wn(),t=He.identifierPrefix;if(ve){var n=Wn,r=Hn;n=(r&~(1<<32-pn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Xo++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=MC++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},$C={readContext:Jt,useCallback:wx,useContext:Jt,useEffect:sp,useImperativeHandle:xx,useInsertionEffect:gx,useLayoutEffect:yx,useMemo:bx,useReducer:Wc,useRef:mx,useState:function(){return Wc(Zo)},useDebugValue:op,useDeferredValue:function(e){var t=en();return Sx(t,Fe.memoizedState,e)},useTransition:function(){var e=Wc(Zo)[0],t=en().memoizedState;return[e,t]},useMutableSource:lx,useSyncExternalStore:ux,useId:Tx,unstable_isNewReconciler:!1},VC={readContext:Jt,useCallback:wx,useContext:Jt,useEffect:sp,useImperativeHandle:xx,useInsertionEffect:gx,useLayoutEffect:yx,useMemo:bx,useReducer:Kc,useRef:mx,useState:function(){return Kc(Zo)},useDebugValue:op,useDeferredValue:function(e){var t=en();return Fe===null?t.memoizedState=e:Sx(t,Fe.memoizedState,e)},useTransition:function(){var e=Kc(Zo)[0],t=en().memoizedState;return[e,t]},useMutableSource:lx,useSyncExternalStore:ux,useId:Tx,unstable_isNewReconciler:!1};function ln(e,t){if(e&&e.defaultProps){t=Te({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function sd(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Te({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Mu={isMounted:function(e){return(e=e._reactInternals)?Di(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ft(),i=Mr(e),s=qn(r,i);s.payload=t,n!=null&&(s.callback=n),t=jr(e,s,i),t!==null&&(mn(t,e,i,r),Sl(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ft(),i=Mr(e),s=qn(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=jr(e,s,i),t!==null&&(mn(t,e,i,r),Sl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ft(),r=Mr(e),i=qn(n,r);i.tag=2,t!=null&&(i.callback=t),t=jr(e,i,r),t!==null&&(mn(t,e,r,n),Sl(t,e,r))}};function Ng(e,t,n,r,i,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,o):t.prototype&&t.prototype.isPureReactComponent?!Wo(n,r)||!Wo(i,s):!0}function _x(e,t,n){var r=!1,i=Br,s=t.contextType;return typeof s=="object"&&s!==null?s=Jt(s):(i=Et(t)?Ci:st.current,r=t.contextTypes,s=(r=r!=null)?Ds(e,i):Br),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Mu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function Mg(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Mu.enqueueReplaceState(t,t.state,null)}function od(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Zh(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=Jt(s):(s=Et(t)?Ci:st.current,i.context=Ds(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(sd(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Mu.enqueueReplaceState(i,i.state,null),nu(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function $s(e,t){try{var n="",r=t;do n+=pE(r),r=r.return;while(r);var i=n}catch(s){i=`
37
+ `+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{Pc=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?mo(e):""}function gE(e){switch(e.tag){case 5:return mo(e.type);case 16:return mo("Lazy");case 13:return mo("Suspense");case 19:return mo("SuspenseList");case 0:case 2:case 15:return e=Ac(e.type,!1),e;case 11:return e=Ac(e.type.render,!1),e;case 1:return e=Ac(e.type,!0),e;default:return""}}function Df(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Zi:return"Fragment";case Xi:return"Portal";case jf:return"Profiler";case Mh:return"StrictMode";case Nf:return"Suspense";case Mf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case u1:return(e.displayName||"Context")+".Consumer";case l1:return(e._context.displayName||"Context")+".Provider";case Dh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Fh:return t=e.displayName||null,t!==null?t:Df(e.type)||"Memo";case cr:t=e._payload,e=e._init;try{return Df(e(t))}catch{}}return null}function yE(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Df(t);case 8:return t===Mh?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Vr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function f1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function vE(e){var t=f1(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Wa(e){e._valueTracker||(e._valueTracker=vE(e))}function d1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=f1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function zl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ff(e,t){var n=t.checked;return Te({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Jm(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Vr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function h1(e,t){t=t.checked,t!=null&&Nh(e,"checked",t,!1)}function Lf(e,t){h1(e,t);var n=Vr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?If(e,t.type,n):t.hasOwnProperty("defaultValue")&&If(e,t.type,Vr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function eg(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function If(e,t,n){(t!=="number"||zl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var go=Array.isArray;function ms(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Vr(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function $f(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(A(91));return Te({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function tg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(A(92));if(go(n)){if(1<n.length)throw Error(A(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Vr(n)}}function p1(e,t){var n=Vr(t.value),r=Vr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function ng(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function m1(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Vf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?m1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ka,g1=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ka=Ka||document.createElement("div"),Ka.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ka.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Vo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var To={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},xE=["Webkit","ms","Moz","O"];Object.keys(To).forEach(function(e){xE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),To[t]=To[e]})});function y1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||To.hasOwnProperty(e)&&To[e]?(""+t).trim():t+"px"}function v1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=y1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var wE=Te({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Bf(e,t){if(t){if(wE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(A(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(A(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(A(61))}if(t.style!=null&&typeof t.style!="object")throw Error(A(62))}}function zf(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Uf=null;function Lh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Hf=null,gs=null,ys=null;function rg(e){if(e=Ta(e)){if(typeof Hf!="function")throw Error(A(280));var t=e.stateNode;t&&(t=ju(t),Hf(e.stateNode,e.type,t))}}function x1(e){gs?ys?ys.push(e):ys=[e]:gs=e}function w1(){if(gs){var e=gs,t=ys;if(ys=gs=null,rg(e),t)for(e=0;e<t.length;e++)rg(t[e])}}function b1(e,t){return e(t)}function S1(){}var Rc=!1;function T1(e,t,n){if(Rc)return e(t,n);Rc=!0;try{return b1(e,t,n)}finally{Rc=!1,(gs!==null||ys!==null)&&(S1(),w1())}}function Bo(e,t){var n=e.stateNode;if(n===null)return null;var r=ju(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(A(231,t,typeof n));return n}var Wf=!1;if(Yn)try{var io={};Object.defineProperty(io,"passive",{get:function(){Wf=!0}}),window.addEventListener("test",io,io),window.removeEventListener("test",io,io)}catch{Wf=!1}function bE(e,t,n,r,i,s,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(f){this.onError(f)}}var Eo=!1,Ul=null,Hl=!1,Kf=null,SE={onError:function(e){Eo=!0,Ul=e}};function TE(e,t,n,r,i,s,o,a,l){Eo=!1,Ul=null,bE.apply(SE,arguments)}function EE(e,t,n,r,i,s,o,a,l){if(TE.apply(this,arguments),Eo){if(Eo){var u=Ul;Eo=!1,Ul=null}else throw Error(A(198));Hl||(Hl=!0,Kf=u)}}function Fi(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function E1(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function ig(e){if(Fi(e)!==e)throw Error(A(188))}function CE(e){var t=e.alternate;if(!t){if(t=Fi(e),t===null)throw Error(A(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return ig(i),e;if(s===r)return ig(i),t;s=s.sibling}throw Error(A(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o)throw Error(A(189))}}if(n.alternate!==r)throw Error(A(190))}if(n.tag!==3)throw Error(A(188));return n.stateNode.current===n?e:t}function C1(e){return e=CE(e),e!==null?k1(e):null}function k1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=k1(e);if(t!==null)return t;e=e.sibling}return null}var _1=Lt.unstable_scheduleCallback,sg=Lt.unstable_cancelCallback,kE=Lt.unstable_shouldYield,_E=Lt.unstable_requestPaint,Ae=Lt.unstable_now,PE=Lt.unstable_getCurrentPriorityLevel,Ih=Lt.unstable_ImmediatePriority,P1=Lt.unstable_UserBlockingPriority,Wl=Lt.unstable_NormalPriority,AE=Lt.unstable_LowPriority,A1=Lt.unstable_IdlePriority,Pu=null,_n=null;function RE(e){if(_n&&typeof _n.onCommitFiberRoot=="function")try{_n.onCommitFiberRoot(Pu,e,void 0,(e.current.flags&128)===128)}catch{}}var pn=Math.clz32?Math.clz32:NE,OE=Math.log,jE=Math.LN2;function NE(e){return e>>>=0,e===0?32:31-(OE(e)/jE|0)|0}var qa=64,Ga=4194304;function yo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Kl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=yo(a):(s&=o,s!==0&&(r=yo(s)))}else o=n&~i,o!==0?r=yo(o):s!==0&&(r=yo(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-pn(t),i=1<<n,r|=e[n],t&=~i;return r}function ME(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function DE(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-pn(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=ME(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function qf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function R1(){var e=qa;return qa<<=1,!(qa&4194240)&&(qa=64),e}function Oc(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ba(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-pn(t),e[t]=n}function FE(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-pn(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function $h(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-pn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var le=0;function O1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var j1,Vh,N1,M1,D1,Gf=!1,Qa=[],Pr=null,Ar=null,Rr=null,zo=new Map,Uo=new Map,hr=[],LE="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function og(e,t){switch(e){case"focusin":case"focusout":Pr=null;break;case"dragenter":case"dragleave":Ar=null;break;case"mouseover":case"mouseout":Rr=null;break;case"pointerover":case"pointerout":zo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Uo.delete(t.pointerId)}}function so(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=Ta(t),t!==null&&Vh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function IE(e,t,n,r,i){switch(t){case"focusin":return Pr=so(Pr,e,t,n,r,i),!0;case"dragenter":return Ar=so(Ar,e,t,n,r,i),!0;case"mouseover":return Rr=so(Rr,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return zo.set(s,so(zo.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Uo.set(s,so(Uo.get(s)||null,e,t,n,r,i)),!0}return!1}function F1(e){var t=oi(e.target);if(t!==null){var n=Fi(t);if(n!==null){if(t=n.tag,t===13){if(t=E1(n),t!==null){e.blockedOn=t,D1(e.priority,function(){N1(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function wl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Qf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Uf=r,n.target.dispatchEvent(r),Uf=null}else return t=Ta(n),t!==null&&Vh(t),e.blockedOn=n,!1;t.shift()}return!0}function ag(e,t,n){wl(e)&&n.delete(t)}function $E(){Gf=!1,Pr!==null&&wl(Pr)&&(Pr=null),Ar!==null&&wl(Ar)&&(Ar=null),Rr!==null&&wl(Rr)&&(Rr=null),zo.forEach(ag),Uo.forEach(ag)}function oo(e,t){e.blockedOn===t&&(e.blockedOn=null,Gf||(Gf=!0,Lt.unstable_scheduleCallback(Lt.unstable_NormalPriority,$E)))}function Ho(e){function t(i){return oo(i,e)}if(0<Qa.length){oo(Qa[0],e);for(var n=1;n<Qa.length;n++){var r=Qa[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Pr!==null&&oo(Pr,e),Ar!==null&&oo(Ar,e),Rr!==null&&oo(Rr,e),zo.forEach(t),Uo.forEach(t),n=0;n<hr.length;n++)r=hr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<hr.length&&(n=hr[0],n.blockedOn===null);)F1(n),n.blockedOn===null&&hr.shift()}var vs=tr.ReactCurrentBatchConfig,ql=!0;function VE(e,t,n,r){var i=le,s=vs.transition;vs.transition=null;try{le=1,Bh(e,t,n,r)}finally{le=i,vs.transition=s}}function BE(e,t,n,r){var i=le,s=vs.transition;vs.transition=null;try{le=4,Bh(e,t,n,r)}finally{le=i,vs.transition=s}}function Bh(e,t,n,r){if(ql){var i=Qf(e,t,n,r);if(i===null)Bc(e,t,r,Gl,n),og(e,r);else if(IE(i,e,t,n,r))r.stopPropagation();else if(og(e,r),t&4&&-1<LE.indexOf(e)){for(;i!==null;){var s=Ta(i);if(s!==null&&j1(s),s=Qf(e,t,n,r),s===null&&Bc(e,t,r,Gl,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Bc(e,t,r,null,n)}}var Gl=null;function Qf(e,t,n,r){if(Gl=null,e=Lh(r),e=oi(e),e!==null)if(t=Fi(e),t===null)e=null;else if(n=t.tag,n===13){if(e=E1(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Gl=e,null}function L1(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(PE()){case Ih:return 1;case P1:return 4;case Wl:case AE:return 16;case A1:return 536870912;default:return 16}default:return 16}}var Er=null,zh=null,bl=null;function I1(){if(bl)return bl;var e,t=zh,n=t.length,r,i="value"in Er?Er.value:Er.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[s-r];r++);return bl=i.slice(e,1<r?1-r:void 0)}function Sl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ya(){return!0}function lg(){return!1}function $t(e){function t(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Ya:lg,this.isPropagationStopped=lg,this}return Te(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ya)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ya)},persist:function(){},isPersistent:Ya}),t}var Gs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Uh=$t(Gs),Sa=Te({},Gs,{view:0,detail:0}),zE=$t(Sa),jc,Nc,ao,Au=Te({},Sa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Hh,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ao&&(ao&&e.type==="mousemove"?(jc=e.screenX-ao.screenX,Nc=e.screenY-ao.screenY):Nc=jc=0,ao=e),jc)},movementY:function(e){return"movementY"in e?e.movementY:Nc}}),ug=$t(Au),UE=Te({},Au,{dataTransfer:0}),HE=$t(UE),WE=Te({},Sa,{relatedTarget:0}),Mc=$t(WE),KE=Te({},Gs,{animationName:0,elapsedTime:0,pseudoElement:0}),qE=$t(KE),GE=Te({},Gs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),QE=$t(GE),YE=Te({},Gs,{data:0}),cg=$t(YE),XE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ZE={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},JE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function eC(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=JE[e])?!!t[e]:!1}function Hh(){return eC}var tC=Te({},Sa,{key:function(e){if(e.key){var t=XE[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Sl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ZE[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Hh,charCode:function(e){return e.type==="keypress"?Sl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Sl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),nC=$t(tC),rC=Te({},Au,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),fg=$t(rC),iC=Te({},Sa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hh}),sC=$t(iC),oC=Te({},Gs,{propertyName:0,elapsedTime:0,pseudoElement:0}),aC=$t(oC),lC=Te({},Au,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),uC=$t(lC),cC=[9,13,27,32],Wh=Yn&&"CompositionEvent"in window,Co=null;Yn&&"documentMode"in document&&(Co=document.documentMode);var fC=Yn&&"TextEvent"in window&&!Co,$1=Yn&&(!Wh||Co&&8<Co&&11>=Co),dg=" ",hg=!1;function V1(e,t){switch(e){case"keyup":return cC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function B1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ji=!1;function dC(e,t){switch(e){case"compositionend":return B1(t);case"keypress":return t.which!==32?null:(hg=!0,dg);case"textInput":return e=t.data,e===dg&&hg?null:e;default:return null}}function hC(e,t){if(Ji)return e==="compositionend"||!Wh&&V1(e,t)?(e=I1(),bl=zh=Er=null,Ji=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return $1&&t.locale!=="ko"?null:t.data;default:return null}}var pC={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function pg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!pC[e.type]:t==="textarea"}function z1(e,t,n,r){x1(r),t=Ql(t,"onChange"),0<t.length&&(n=new Uh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ko=null,Wo=null;function mC(e){J1(e,0)}function Ru(e){var t=ns(e);if(d1(t))return e}function gC(e,t){if(e==="change")return t}var U1=!1;if(Yn){var Dc;if(Yn){var Fc="oninput"in document;if(!Fc){var mg=document.createElement("div");mg.setAttribute("oninput","return;"),Fc=typeof mg.oninput=="function"}Dc=Fc}else Dc=!1;U1=Dc&&(!document.documentMode||9<document.documentMode)}function gg(){ko&&(ko.detachEvent("onpropertychange",H1),Wo=ko=null)}function H1(e){if(e.propertyName==="value"&&Ru(Wo)){var t=[];z1(t,Wo,e,Lh(e)),T1(mC,t)}}function yC(e,t,n){e==="focusin"?(gg(),ko=t,Wo=n,ko.attachEvent("onpropertychange",H1)):e==="focusout"&&gg()}function vC(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ru(Wo)}function xC(e,t){if(e==="click")return Ru(t)}function wC(e,t){if(e==="input"||e==="change")return Ru(t)}function bC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gn=typeof Object.is=="function"?Object.is:bC;function Ko(e,t){if(gn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Of.call(t,i)||!gn(e[i],t[i]))return!1}return!0}function yg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function vg(e,t){var n=yg(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=yg(n)}}function W1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?W1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function K1(){for(var e=window,t=zl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=zl(e.document)}return t}function Kh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function SC(e){var t=K1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&W1(n.ownerDocument.documentElement,n)){if(r!==null&&Kh(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=vg(n,s);var o=vg(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var TC=Yn&&"documentMode"in document&&11>=document.documentMode,es=null,Yf=null,_o=null,Xf=!1;function xg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Xf||es==null||es!==zl(r)||(r=es,"selectionStart"in r&&Kh(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),_o&&Ko(_o,r)||(_o=r,r=Ql(Yf,"onSelect"),0<r.length&&(t=new Uh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=es)))}function Xa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ts={animationend:Xa("Animation","AnimationEnd"),animationiteration:Xa("Animation","AnimationIteration"),animationstart:Xa("Animation","AnimationStart"),transitionend:Xa("Transition","TransitionEnd")},Lc={},q1={};Yn&&(q1=document.createElement("div").style,"AnimationEvent"in window||(delete ts.animationend.animation,delete ts.animationiteration.animation,delete ts.animationstart.animation),"TransitionEvent"in window||delete ts.transitionend.transition);function Ou(e){if(Lc[e])return Lc[e];if(!ts[e])return e;var t=ts[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in q1)return Lc[e]=t[n];return e}var G1=Ou("animationend"),Q1=Ou("animationiteration"),Y1=Ou("animationstart"),X1=Ou("transitionend"),Z1=new Map,wg="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Wr(e,t){Z1.set(e,t),Di(t,[e])}for(var Ic=0;Ic<wg.length;Ic++){var $c=wg[Ic],EC=$c.toLowerCase(),CC=$c[0].toUpperCase()+$c.slice(1);Wr(EC,"on"+CC)}Wr(G1,"onAnimationEnd");Wr(Q1,"onAnimationIteration");Wr(Y1,"onAnimationStart");Wr("dblclick","onDoubleClick");Wr("focusin","onFocus");Wr("focusout","onBlur");Wr(X1,"onTransitionEnd");Ds("onMouseEnter",["mouseout","mouseover"]);Ds("onMouseLeave",["mouseout","mouseover"]);Ds("onPointerEnter",["pointerout","pointerover"]);Ds("onPointerLeave",["pointerout","pointerover"]);Di("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Di("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Di("onBeforeInput",["compositionend","keypress","textInput","paste"]);Di("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Di("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Di("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var vo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),kC=new Set("cancel close invalid load scroll toggle".split(" ").concat(vo));function bg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,EE(r,t,void 0,e),e.currentTarget=null}function J1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;bg(i,a,u),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;bg(i,a,u),s=l}}}if(Hl)throw e=Kf,Hl=!1,Kf=null,e}function pe(e,t){var n=t[nd];n===void 0&&(n=t[nd]=new Set);var r=e+"__bubble";n.has(r)||(ex(t,e,2,!1),n.add(r))}function Vc(e,t,n){var r=0;t&&(r|=4),ex(n,e,r,t)}var Za="_reactListening"+Math.random().toString(36).slice(2);function qo(e){if(!e[Za]){e[Za]=!0,a1.forEach(function(n){n!=="selectionchange"&&(kC.has(n)||Vc(n,!1,e),Vc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Za]||(t[Za]=!0,Vc("selectionchange",!1,t))}}function ex(e,t,n,r){switch(L1(t)){case 1:var i=VE;break;case 4:i=BE;break;default:i=Bh}n=i.bind(null,t,n,e),i=void 0,!Wf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Bc(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;a!==null;){if(o=oi(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}T1(function(){var u=s,f=Lh(n),c=[];e:{var d=Z1.get(e);if(d!==void 0){var h=Uh,m=e;switch(e){case"keypress":if(Sl(n)===0)break e;case"keydown":case"keyup":h=nC;break;case"focusin":m="focus",h=Mc;break;case"focusout":m="blur",h=Mc;break;case"beforeblur":case"afterblur":h=Mc;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=ug;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=HE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=sC;break;case G1:case Q1:case Y1:h=qE;break;case X1:h=aC;break;case"scroll":h=zE;break;case"wheel":h=uC;break;case"copy":case"cut":case"paste":h=QE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=fg}var v=(t&4)!==0,b=!v&&e==="scroll",p=v?d!==null?d+"Capture":null:d;v=[];for(var g=u,x;g!==null;){x=g;var E=x.stateNode;if(x.tag===5&&E!==null&&(x=E,p!==null&&(E=Bo(g,p),E!=null&&v.push(Go(g,E,x)))),b)break;g=g.return}0<v.length&&(d=new h(d,m,null,n,f),c.push({event:d,listeners:v}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&n!==Uf&&(m=n.relatedTarget||n.fromElement)&&(oi(m)||m[Xn]))break e;if((h||d)&&(d=f.window===f?f:(d=f.ownerDocument)?d.defaultView||d.parentWindow:window,h?(m=n.relatedTarget||n.toElement,h=u,m=m?oi(m):null,m!==null&&(b=Fi(m),m!==b||m.tag!==5&&m.tag!==6)&&(m=null)):(h=null,m=u),h!==m)){if(v=ug,E="onMouseLeave",p="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(v=fg,E="onPointerLeave",p="onPointerEnter",g="pointer"),b=h==null?d:ns(h),x=m==null?d:ns(m),d=new v(E,g+"leave",h,n,f),d.target=b,d.relatedTarget=x,E=null,oi(f)===u&&(v=new v(p,g+"enter",m,n,f),v.target=x,v.relatedTarget=b,E=v),b=E,h&&m)t:{for(v=h,p=m,g=0,x=v;x;x=Qi(x))g++;for(x=0,E=p;E;E=Qi(E))x++;for(;0<g-x;)v=Qi(v),g--;for(;0<x-g;)p=Qi(p),x--;for(;g--;){if(v===p||p!==null&&v===p.alternate)break t;v=Qi(v),p=Qi(p)}v=null}else v=null;h!==null&&Sg(c,d,h,v,!1),m!==null&&b!==null&&Sg(c,b,m,v,!0)}}e:{if(d=u?ns(u):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var S=gC;else if(pg(d))if(U1)S=wC;else{S=vC;var C=yC}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(S=xC);if(S&&(S=S(e,u))){z1(c,S,n,f);break e}C&&C(e,d,u),e==="focusout"&&(C=d._wrapperState)&&C.controlled&&d.type==="number"&&If(d,"number",d.value)}switch(C=u?ns(u):window,e){case"focusin":(pg(C)||C.contentEditable==="true")&&(es=C,Yf=u,_o=null);break;case"focusout":_o=Yf=es=null;break;case"mousedown":Xf=!0;break;case"contextmenu":case"mouseup":case"dragend":Xf=!1,xg(c,n,f);break;case"selectionchange":if(TC)break;case"keydown":case"keyup":xg(c,n,f)}var k;if(Wh)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else Ji?V1(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&($1&&n.locale!=="ko"&&(Ji||P!=="onCompositionStart"?P==="onCompositionEnd"&&Ji&&(k=I1()):(Er=f,zh="value"in Er?Er.value:Er.textContent,Ji=!0)),C=Ql(u,P),0<C.length&&(P=new cg(P,e,null,n,f),c.push({event:P,listeners:C}),k?P.data=k:(k=B1(n),k!==null&&(P.data=k)))),(k=fC?dC(e,n):hC(e,n))&&(u=Ql(u,"onBeforeInput"),0<u.length&&(f=new cg("onBeforeInput","beforeinput",null,n,f),c.push({event:f,listeners:u}),f.data=k))}J1(c,t)})}function Go(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ql(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Bo(e,n),s!=null&&r.unshift(Go(e,s,i)),s=Bo(e,t),s!=null&&r.push(Go(e,s,i))),e=e.return}return r}function Qi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Sg(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,i?(l=Bo(n,s),l!=null&&o.unshift(Go(n,l,a))):i||(l=Bo(n,s),l!=null&&o.push(Go(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var _C=/\r\n?/g,PC=/\u0000|\uFFFD/g;function Tg(e){return(typeof e=="string"?e:""+e).replace(_C,`
38
+ `).replace(PC,"")}function Ja(e,t,n){if(t=Tg(t),Tg(e)!==t&&n)throw Error(A(425))}function Yl(){}var Zf=null,Jf=null;function ed(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var td=typeof setTimeout=="function"?setTimeout:void 0,AC=typeof clearTimeout=="function"?clearTimeout:void 0,Eg=typeof Promise=="function"?Promise:void 0,RC=typeof queueMicrotask=="function"?queueMicrotask:typeof Eg<"u"?function(e){return Eg.resolve(null).then(e).catch(OC)}:td;function OC(e){setTimeout(function(){throw e})}function zc(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Ho(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Ho(t)}function Or(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Cg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Qs=Math.random().toString(36).slice(2),kn="__reactFiber$"+Qs,Qo="__reactProps$"+Qs,Xn="__reactContainer$"+Qs,nd="__reactEvents$"+Qs,jC="__reactListeners$"+Qs,NC="__reactHandles$"+Qs;function oi(e){var t=e[kn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Xn]||n[kn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Cg(e);e!==null;){if(n=e[kn])return n;e=Cg(e)}return t}e=n,n=e.parentNode}return null}function Ta(e){return e=e[kn]||e[Xn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ns(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(A(33))}function ju(e){return e[Qo]||null}var rd=[],rs=-1;function Kr(e){return{current:e}}function ge(e){0>rs||(e.current=rd[rs],rd[rs]=null,rs--)}function de(e,t){rs++,rd[rs]=e.current,e.current=t}var Br={},st=Kr(Br),Tt=Kr(!1),ki=Br;function Fs(e,t){var n=e.type.contextTypes;if(!n)return Br;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Et(e){return e=e.childContextTypes,e!=null}function Xl(){ge(Tt),ge(st)}function kg(e,t,n){if(st.current!==Br)throw Error(A(168));de(st,t),de(Tt,n)}function tx(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(A(108,yE(e)||"Unknown",i));return Te({},n,r)}function Zl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Br,ki=st.current,de(st,e),de(Tt,Tt.current),!0}function _g(e,t,n){var r=e.stateNode;if(!r)throw Error(A(169));n?(e=tx(e,t,ki),r.__reactInternalMemoizedMergedChildContext=e,ge(Tt),ge(st),de(st,e)):ge(Tt),de(Tt,n)}var Bn=null,Nu=!1,Uc=!1;function nx(e){Bn===null?Bn=[e]:Bn.push(e)}function MC(e){Nu=!0,nx(e)}function qr(){if(!Uc&&Bn!==null){Uc=!0;var e=0,t=le;try{var n=Bn;for(le=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Bn=null,Nu=!1}catch(i){throw Bn!==null&&(Bn=Bn.slice(e+1)),_1(Ih,qr),i}finally{le=t,Uc=!1}}return null}var is=[],ss=0,Jl=null,eu=0,qt=[],Gt=0,_i=null,Hn=1,Wn="";function ei(e,t){is[ss++]=eu,is[ss++]=Jl,Jl=e,eu=t}function rx(e,t,n){qt[Gt++]=Hn,qt[Gt++]=Wn,qt[Gt++]=_i,_i=e;var r=Hn;e=Wn;var i=32-pn(r)-1;r&=~(1<<i),n+=1;var s=32-pn(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Hn=1<<32-pn(t)+i|n<<i|r,Wn=s+e}else Hn=1<<s|n<<i|r,Wn=e}function qh(e){e.return!==null&&(ei(e,1),rx(e,1,0))}function Gh(e){for(;e===Jl;)Jl=is[--ss],is[ss]=null,eu=is[--ss],is[ss]=null;for(;e===_i;)_i=qt[--Gt],qt[Gt]=null,Wn=qt[--Gt],qt[Gt]=null,Hn=qt[--Gt],qt[Gt]=null}var Ft=null,Nt=null,ve=!1,dn=null;function ix(e,t){var n=Yt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Pg(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ft=e,Nt=Or(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ft=e,Nt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=_i!==null?{id:Hn,overflow:Wn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Yt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ft=e,Nt=null,!0):!1;default:return!1}}function id(e){return(e.mode&1)!==0&&(e.flags&128)===0}function sd(e){if(ve){var t=Nt;if(t){var n=t;if(!Pg(e,t)){if(id(e))throw Error(A(418));t=Or(n.nextSibling);var r=Ft;t&&Pg(e,t)?ix(r,n):(e.flags=e.flags&-4097|2,ve=!1,Ft=e)}}else{if(id(e))throw Error(A(418));e.flags=e.flags&-4097|2,ve=!1,Ft=e}}}function Ag(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ft=e}function el(e){if(e!==Ft)return!1;if(!ve)return Ag(e),ve=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ed(e.type,e.memoizedProps)),t&&(t=Nt)){if(id(e))throw sx(),Error(A(418));for(;t;)ix(e,t),t=Or(t.nextSibling)}if(Ag(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(A(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Nt=Or(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Nt=null}}else Nt=Ft?Or(e.stateNode.nextSibling):null;return!0}function sx(){for(var e=Nt;e;)e=Or(e.nextSibling)}function Ls(){Nt=Ft=null,ve=!1}function Qh(e){dn===null?dn=[e]:dn.push(e)}var DC=tr.ReactCurrentBatchConfig;function lo(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(A(309));var r=n.stateNode}if(!r)throw Error(A(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},t._stringRef=s,t)}if(typeof e!="string")throw Error(A(284));if(!n._owner)throw Error(A(290,e))}return e}function tl(e,t){throw e=Object.prototype.toString.call(t),Error(A(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Rg(e){var t=e._init;return t(e._payload)}function ox(e){function t(p,g){if(e){var x=p.deletions;x===null?(p.deletions=[g],p.flags|=16):x.push(g)}}function n(p,g){if(!e)return null;for(;g!==null;)t(p,g),g=g.sibling;return null}function r(p,g){for(p=new Map;g!==null;)g.key!==null?p.set(g.key,g):p.set(g.index,g),g=g.sibling;return p}function i(p,g){return p=Dr(p,g),p.index=0,p.sibling=null,p}function s(p,g,x){return p.index=x,e?(x=p.alternate,x!==null?(x=x.index,x<g?(p.flags|=2,g):x):(p.flags|=2,g)):(p.flags|=1048576,g)}function o(p){return e&&p.alternate===null&&(p.flags|=2),p}function a(p,g,x,E){return g===null||g.tag!==6?(g=Yc(x,p.mode,E),g.return=p,g):(g=i(g,x),g.return=p,g)}function l(p,g,x,E){var S=x.type;return S===Zi?f(p,g,x.props.children,E,x.key):g!==null&&(g.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===cr&&Rg(S)===g.type)?(E=i(g,x.props),E.ref=lo(p,g,x),E.return=p,E):(E=Al(x.type,x.key,x.props,null,p.mode,E),E.ref=lo(p,g,x),E.return=p,E)}function u(p,g,x,E){return g===null||g.tag!==4||g.stateNode.containerInfo!==x.containerInfo||g.stateNode.implementation!==x.implementation?(g=Xc(x,p.mode,E),g.return=p,g):(g=i(g,x.children||[]),g.return=p,g)}function f(p,g,x,E,S){return g===null||g.tag!==7?(g=bi(x,p.mode,E,S),g.return=p,g):(g=i(g,x),g.return=p,g)}function c(p,g,x){if(typeof g=="string"&&g!==""||typeof g=="number")return g=Yc(""+g,p.mode,x),g.return=p,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Ha:return x=Al(g.type,g.key,g.props,null,p.mode,x),x.ref=lo(p,null,g),x.return=p,x;case Xi:return g=Xc(g,p.mode,x),g.return=p,g;case cr:var E=g._init;return c(p,E(g._payload),x)}if(go(g)||ro(g))return g=bi(g,p.mode,x,null),g.return=p,g;tl(p,g)}return null}function d(p,g,x,E){var S=g!==null?g.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return S!==null?null:a(p,g,""+x,E);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Ha:return x.key===S?l(p,g,x,E):null;case Xi:return x.key===S?u(p,g,x,E):null;case cr:return S=x._init,d(p,g,S(x._payload),E)}if(go(x)||ro(x))return S!==null?null:f(p,g,x,E,null);tl(p,x)}return null}function h(p,g,x,E,S){if(typeof E=="string"&&E!==""||typeof E=="number")return p=p.get(x)||null,a(g,p,""+E,S);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case Ha:return p=p.get(E.key===null?x:E.key)||null,l(g,p,E,S);case Xi:return p=p.get(E.key===null?x:E.key)||null,u(g,p,E,S);case cr:var C=E._init;return h(p,g,x,C(E._payload),S)}if(go(E)||ro(E))return p=p.get(x)||null,f(g,p,E,S,null);tl(g,E)}return null}function m(p,g,x,E){for(var S=null,C=null,k=g,P=g=0,j=null;k!==null&&P<x.length;P++){k.index>P?(j=k,k=null):j=k.sibling;var N=d(p,k,x[P],E);if(N===null){k===null&&(k=j);break}e&&k&&N.alternate===null&&t(p,k),g=s(N,g,P),C===null?S=N:C.sibling=N,C=N,k=j}if(P===x.length)return n(p,k),ve&&ei(p,P),S;if(k===null){for(;P<x.length;P++)k=c(p,x[P],E),k!==null&&(g=s(k,g,P),C===null?S=k:C.sibling=k,C=k);return ve&&ei(p,P),S}for(k=r(p,k);P<x.length;P++)j=h(k,p,P,x[P],E),j!==null&&(e&&j.alternate!==null&&k.delete(j.key===null?P:j.key),g=s(j,g,P),C===null?S=j:C.sibling=j,C=j);return e&&k.forEach(function(I){return t(p,I)}),ve&&ei(p,P),S}function v(p,g,x,E){var S=ro(x);if(typeof S!="function")throw Error(A(150));if(x=S.call(x),x==null)throw Error(A(151));for(var C=S=null,k=g,P=g=0,j=null,N=x.next();k!==null&&!N.done;P++,N=x.next()){k.index>P?(j=k,k=null):j=k.sibling;var I=d(p,k,N.value,E);if(I===null){k===null&&(k=j);break}e&&k&&I.alternate===null&&t(p,k),g=s(I,g,P),C===null?S=I:C.sibling=I,C=I,k=j}if(N.done)return n(p,k),ve&&ei(p,P),S;if(k===null){for(;!N.done;P++,N=x.next())N=c(p,N.value,E),N!==null&&(g=s(N,g,P),C===null?S=N:C.sibling=N,C=N);return ve&&ei(p,P),S}for(k=r(p,k);!N.done;P++,N=x.next())N=h(k,p,P,N.value,E),N!==null&&(e&&N.alternate!==null&&k.delete(N.key===null?P:N.key),g=s(N,g,P),C===null?S=N:C.sibling=N,C=N);return e&&k.forEach(function(re){return t(p,re)}),ve&&ei(p,P),S}function b(p,g,x,E){if(typeof x=="object"&&x!==null&&x.type===Zi&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Ha:e:{for(var S=x.key,C=g;C!==null;){if(C.key===S){if(S=x.type,S===Zi){if(C.tag===7){n(p,C.sibling),g=i(C,x.props.children),g.return=p,p=g;break e}}else if(C.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===cr&&Rg(S)===C.type){n(p,C.sibling),g=i(C,x.props),g.ref=lo(p,C,x),g.return=p,p=g;break e}n(p,C);break}else t(p,C);C=C.sibling}x.type===Zi?(g=bi(x.props.children,p.mode,E,x.key),g.return=p,p=g):(E=Al(x.type,x.key,x.props,null,p.mode,E),E.ref=lo(p,g,x),E.return=p,p=E)}return o(p);case Xi:e:{for(C=x.key;g!==null;){if(g.key===C)if(g.tag===4&&g.stateNode.containerInfo===x.containerInfo&&g.stateNode.implementation===x.implementation){n(p,g.sibling),g=i(g,x.children||[]),g.return=p,p=g;break e}else{n(p,g);break}else t(p,g);g=g.sibling}g=Xc(x,p.mode,E),g.return=p,p=g}return o(p);case cr:return C=x._init,b(p,g,C(x._payload),E)}if(go(x))return m(p,g,x,E);if(ro(x))return v(p,g,x,E);tl(p,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,g!==null&&g.tag===6?(n(p,g.sibling),g=i(g,x),g.return=p,p=g):(n(p,g),g=Yc(x,p.mode,E),g.return=p,p=g),o(p)):n(p,g)}return b}var Is=ox(!0),ax=ox(!1),tu=Kr(null),nu=null,os=null,Yh=null;function Xh(){Yh=os=nu=null}function Zh(e){var t=tu.current;ge(tu),e._currentValue=t}function od(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function xs(e,t){nu=e,Yh=os=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(St=!0),e.firstContext=null)}function Jt(e){var t=e._currentValue;if(Yh!==e)if(e={context:e,memoizedValue:t,next:null},os===null){if(nu===null)throw Error(A(308));os=e,nu.dependencies={lanes:0,firstContext:e}}else os=os.next=e;return t}var ai=null;function Jh(e){ai===null?ai=[e]:ai.push(e)}function lx(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Jh(t)):(n.next=i.next,i.next=n),t.interleaved=n,Zn(e,r)}function Zn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var fr=!1;function ep(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ux(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function qn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function jr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,se&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Zn(e,n)}return i=r.interleaved,i===null?(t.next=t,Jh(r)):(t.next=i.next,i.next=t),r.interleaved=t,Zn(e,n)}function Tl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$h(e,n)}}function Og(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ru(e,t,n,r){var i=e.updateQueue;fr=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?s=u:o.next=u,o=l;var f=e.alternate;f!==null&&(f=f.updateQueue,a=f.lastBaseUpdate,a!==o&&(a===null?f.firstBaseUpdate=u:a.next=u,f.lastBaseUpdate=l))}if(s!==null){var c=i.baseState;o=0,f=u=l=null,a=s;do{var d=a.lane,h=a.eventTime;if((r&d)===d){f!==null&&(f=f.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,v=a;switch(d=t,h=n,v.tag){case 1:if(m=v.payload,typeof m=="function"){c=m.call(h,c,d);break e}c=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=v.payload,d=typeof m=="function"?m.call(h,c,d):m,d==null)break e;c=Te({},c,d);break e;case 2:fr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[a]:d.push(a))}else h={eventTime:h,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},f===null?(u=f=h,l=c):f=f.next=h,o|=d;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;d=a,a=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(f===null&&(l=c),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);Ai|=o,e.lanes=o,e.memoizedState=c}}function jg(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(A(191,i));i.call(r)}}}var Ea={},Pn=Kr(Ea),Yo=Kr(Ea),Xo=Kr(Ea);function li(e){if(e===Ea)throw Error(A(174));return e}function tp(e,t){switch(de(Xo,t),de(Yo,e),de(Pn,Ea),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Vf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Vf(t,e)}ge(Pn),de(Pn,t)}function $s(){ge(Pn),ge(Yo),ge(Xo)}function cx(e){li(Xo.current);var t=li(Pn.current),n=Vf(t,e.type);t!==n&&(de(Yo,e),de(Pn,n))}function np(e){Yo.current===e&&(ge(Pn),ge(Yo))}var we=Kr(0);function iu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Hc=[];function rp(){for(var e=0;e<Hc.length;e++)Hc[e]._workInProgressVersionPrimary=null;Hc.length=0}var El=tr.ReactCurrentDispatcher,Wc=tr.ReactCurrentBatchConfig,Pi=0,Se=null,Fe=null,Ue=null,su=!1,Po=!1,Zo=0,FC=0;function Ze(){throw Error(A(321))}function ip(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!gn(e[n],t[n]))return!1;return!0}function sp(e,t,n,r,i,s){if(Pi=s,Se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,El.current=e===null||e.memoizedState===null?VC:BC,e=n(r,i),Po){s=0;do{if(Po=!1,Zo=0,25<=s)throw Error(A(301));s+=1,Ue=Fe=null,t.updateQueue=null,El.current=zC,e=n(r,i)}while(Po)}if(El.current=ou,t=Fe!==null&&Fe.next!==null,Pi=0,Ue=Fe=Se=null,su=!1,t)throw Error(A(300));return e}function op(){var e=Zo!==0;return Zo=0,e}function wn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ue===null?Se.memoizedState=Ue=e:Ue=Ue.next=e,Ue}function en(){if(Fe===null){var e=Se.alternate;e=e!==null?e.memoizedState:null}else e=Fe.next;var t=Ue===null?Se.memoizedState:Ue.next;if(t!==null)Ue=t,Fe=e;else{if(e===null)throw Error(A(310));Fe=e,e={memoizedState:Fe.memoizedState,baseState:Fe.baseState,baseQueue:Fe.baseQueue,queue:Fe.queue,next:null},Ue===null?Se.memoizedState=Ue=e:Ue=Ue.next=e}return Ue}function Jo(e,t){return typeof t=="function"?t(e):t}function Kc(e){var t=en(),n=t.queue;if(n===null)throw Error(A(311));n.lastRenderedReducer=e;var r=Fe,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,u=s;do{var f=u.lane;if((Pi&f)===f)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var c={lane:f,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=c,o=r):l=l.next=c,Se.lanes|=f,Ai|=f}u=u.next}while(u!==null&&u!==s);l===null?o=r:l.next=a,gn(r,t.memoizedState)||(St=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,Se.lanes|=s,Ai|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function qc(e){var t=en(),n=t.queue;if(n===null)throw Error(A(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=e(s,o.action),o=o.next;while(o!==i);gn(s,t.memoizedState)||(St=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function fx(){}function dx(e,t){var n=Se,r=en(),i=t(),s=!gn(r.memoizedState,i);if(s&&(r.memoizedState=i,St=!0),r=r.queue,ap(mx.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Ue!==null&&Ue.memoizedState.tag&1){if(n.flags|=2048,ea(9,px.bind(null,n,r,i,t),void 0,null),He===null)throw Error(A(349));Pi&30||hx(n,t,i)}return i}function hx(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Se.updateQueue,t===null?(t={lastEffect:null,stores:null},Se.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function px(e,t,n,r){t.value=n,t.getSnapshot=r,gx(t)&&yx(e)}function mx(e,t,n){return n(function(){gx(t)&&yx(e)})}function gx(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!gn(e,n)}catch{return!0}}function yx(e){var t=Zn(e,1);t!==null&&mn(t,e,1,-1)}function Ng(e){var t=wn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Jo,lastRenderedState:e},t.queue=e,e=e.dispatch=$C.bind(null,Se,e),[t.memoizedState,e]}function ea(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Se.updateQueue,t===null?(t={lastEffect:null,stores:null},Se.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function vx(){return en().memoizedState}function Cl(e,t,n,r){var i=wn();Se.flags|=e,i.memoizedState=ea(1|t,n,void 0,r===void 0?null:r)}function Mu(e,t,n,r){var i=en();r=r===void 0?null:r;var s=void 0;if(Fe!==null){var o=Fe.memoizedState;if(s=o.destroy,r!==null&&ip(r,o.deps)){i.memoizedState=ea(t,n,s,r);return}}Se.flags|=e,i.memoizedState=ea(1|t,n,s,r)}function Mg(e,t){return Cl(8390656,8,e,t)}function ap(e,t){return Mu(2048,8,e,t)}function xx(e,t){return Mu(4,2,e,t)}function wx(e,t){return Mu(4,4,e,t)}function bx(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Sx(e,t,n){return n=n!=null?n.concat([e]):null,Mu(4,4,bx.bind(null,t,e),n)}function lp(){}function Tx(e,t){var n=en();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ip(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ex(e,t){var n=en();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ip(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Cx(e,t,n){return Pi&21?(gn(n,t)||(n=R1(),Se.lanes|=n,Ai|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,St=!0),e.memoizedState=n)}function LC(e,t){var n=le;le=n!==0&&4>n?n:4,e(!0);var r=Wc.transition;Wc.transition={};try{e(!1),t()}finally{le=n,Wc.transition=r}}function kx(){return en().memoizedState}function IC(e,t,n){var r=Mr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},_x(e))Px(t,n);else if(n=lx(e,t,n,r),n!==null){var i=ft();mn(n,e,r,i),Ax(n,t,r)}}function $C(e,t,n){var r=Mr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(_x(e))Px(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,gn(a,o)){var l=t.interleaved;l===null?(i.next=i,Jh(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=lx(e,t,i,r),n!==null&&(i=ft(),mn(n,e,r,i),Ax(n,t,r))}}function _x(e){var t=e.alternate;return e===Se||t!==null&&t===Se}function Px(e,t){Po=su=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ax(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$h(e,n)}}var ou={readContext:Jt,useCallback:Ze,useContext:Ze,useEffect:Ze,useImperativeHandle:Ze,useInsertionEffect:Ze,useLayoutEffect:Ze,useMemo:Ze,useReducer:Ze,useRef:Ze,useState:Ze,useDebugValue:Ze,useDeferredValue:Ze,useTransition:Ze,useMutableSource:Ze,useSyncExternalStore:Ze,useId:Ze,unstable_isNewReconciler:!1},VC={readContext:Jt,useCallback:function(e,t){return wn().memoizedState=[e,t===void 0?null:t],e},useContext:Jt,useEffect:Mg,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Cl(4194308,4,bx.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Cl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Cl(4,2,e,t)},useMemo:function(e,t){var n=wn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=wn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=IC.bind(null,Se,e),[r.memoizedState,e]},useRef:function(e){var t=wn();return e={current:e},t.memoizedState=e},useState:Ng,useDebugValue:lp,useDeferredValue:function(e){return wn().memoizedState=e},useTransition:function(){var e=Ng(!1),t=e[0];return e=LC.bind(null,e[1]),wn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Se,i=wn();if(ve){if(n===void 0)throw Error(A(407));n=n()}else{if(n=t(),He===null)throw Error(A(349));Pi&30||hx(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Mg(mx.bind(null,r,s,e),[e]),r.flags|=2048,ea(9,px.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=wn(),t=He.identifierPrefix;if(ve){var n=Wn,r=Hn;n=(r&~(1<<32-pn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Zo++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=FC++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},BC={readContext:Jt,useCallback:Tx,useContext:Jt,useEffect:ap,useImperativeHandle:Sx,useInsertionEffect:xx,useLayoutEffect:wx,useMemo:Ex,useReducer:Kc,useRef:vx,useState:function(){return Kc(Jo)},useDebugValue:lp,useDeferredValue:function(e){var t=en();return Cx(t,Fe.memoizedState,e)},useTransition:function(){var e=Kc(Jo)[0],t=en().memoizedState;return[e,t]},useMutableSource:fx,useSyncExternalStore:dx,useId:kx,unstable_isNewReconciler:!1},zC={readContext:Jt,useCallback:Tx,useContext:Jt,useEffect:ap,useImperativeHandle:Sx,useInsertionEffect:xx,useLayoutEffect:wx,useMemo:Ex,useReducer:qc,useRef:vx,useState:function(){return qc(Jo)},useDebugValue:lp,useDeferredValue:function(e){var t=en();return Fe===null?t.memoizedState=e:Cx(t,Fe.memoizedState,e)},useTransition:function(){var e=qc(Jo)[0],t=en().memoizedState;return[e,t]},useMutableSource:fx,useSyncExternalStore:dx,useId:kx,unstable_isNewReconciler:!1};function ln(e,t){if(e&&e.defaultProps){t=Te({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ad(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Te({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Du={isMounted:function(e){return(e=e._reactInternals)?Fi(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ft(),i=Mr(e),s=qn(r,i);s.payload=t,n!=null&&(s.callback=n),t=jr(e,s,i),t!==null&&(mn(t,e,i,r),Tl(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ft(),i=Mr(e),s=qn(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=jr(e,s,i),t!==null&&(mn(t,e,i,r),Tl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ft(),r=Mr(e),i=qn(n,r);i.tag=2,t!=null&&(i.callback=t),t=jr(e,i,r),t!==null&&(mn(t,e,r,n),Tl(t,e,r))}};function Dg(e,t,n,r,i,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,o):t.prototype&&t.prototype.isPureReactComponent?!Ko(n,r)||!Ko(i,s):!0}function Rx(e,t,n){var r=!1,i=Br,s=t.contextType;return typeof s=="object"&&s!==null?s=Jt(s):(i=Et(t)?ki:st.current,r=t.contextTypes,s=(r=r!=null)?Fs(e,i):Br),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Du,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function Fg(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Du.enqueueReplaceState(t,t.state,null)}function ld(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},ep(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=Jt(s):(s=Et(t)?ki:st.current,i.context=Fs(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(ad(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Du.enqueueReplaceState(i,i.state,null),ru(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Vs(e,t){try{var n="",r=t;do n+=gE(r),r=r.return;while(r);var i=n}catch(s){i=`
39
39
  Error generating stack: `+s.message+`
40
- `+s.stack}return{value:e,source:t,stack:i,digest:null}}function qc(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ad(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var BC=typeof WeakMap=="function"?WeakMap:Map;function Px(e,t,n){n=qn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){au||(au=!0,yd=r),ad(e,t)},n}function Ax(e,t,n){n=qn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ad(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){ad(e,t),typeof r!="function"&&(Nr===null?Nr=new Set([this]):Nr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Dg(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new BC;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=tk.bind(null,e,t,n),t.then(e,e))}function Fg(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Lg(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=qn(-1,1),t.tag=2,jr(n,t,1))),n.lanes|=1),e)}var zC=tr.ReactCurrentOwner,St=!1;function lt(e,t,n,r){t.child=e===null?ix(t,null,n,r):Ls(t,e.child,n,r)}function Ig(e,t,n,r,i){n=n.render;var s=t.ref;return vs(t,i),r=rp(e,t,n,r,s,i),n=ip(),e!==null&&!St?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Jn(e,t,i)):(ve&&n&&Wh(t),t.flags|=1,lt(e,t,r,i),t.child)}function $g(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!pp(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Rx(e,t,s,r,i)):(e=Pl(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:Wo,n(o,r)&&e.ref===t.ref)return Jn(e,t,i)}return t.flags|=1,e=Dr(s,r),e.ref=t.ref,e.return=t,t.child=e}function Rx(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Wo(s,r)&&e.ref===t.ref)if(St=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(St=!0);else return t.lanes=e.lanes,Jn(e,t,i)}return ld(e,t,n,r,i)}function Ox(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},de(as,jt),jt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,de(as,jt),jt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,de(as,jt),jt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,de(as,jt),jt|=r;return lt(e,t,i,n),t.child}function jx(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ld(e,t,n,r,i){var s=Et(n)?Ci:st.current;return s=Ds(t,s),vs(t,i),n=rp(e,t,n,r,s,i),r=ip(),e!==null&&!St?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Jn(e,t,i)):(ve&&r&&Wh(t),t.flags|=1,lt(e,t,n,i),t.child)}function Vg(e,t,n,r,i){if(Et(n)){var s=!0;Xl(t)}else s=!1;if(vs(t,i),t.stateNode===null)Cl(e,t),_x(t,n,r),od(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=Jt(u):(u=Et(n)?Ci:st.current,u=Ds(t,u));var f=n.getDerivedStateFromProps,c=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function";c||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&Mg(t,o,r,u),fr=!1;var d=t.memoizedState;o.state=d,nu(t,r,o,i),l=t.memoizedState,a!==r||d!==l||Tt.current||fr?(typeof f=="function"&&(sd(t,n,f,r),l=t.memoizedState),(a=fr||Ng(t,n,a,r,d,l,u))?(c||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,ox(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:ln(t.type,a),o.props=u,c=t.pendingProps,d=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Jt(l):(l=Et(n)?Ci:st.current,l=Ds(t,l));var h=n.getDerivedStateFromProps;(f=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==c||d!==l)&&Mg(t,o,r,l),fr=!1,d=t.memoizedState,o.state=d,nu(t,r,o,i);var m=t.memoizedState;a!==c||d!==m||Tt.current||fr?(typeof h=="function"&&(sd(t,n,h,r),m=t.memoizedState),(u=fr||Ng(t,n,u,r,d,m,l)||!1)?(f||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,m,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,m,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=l,r=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return ud(e,t,n,r,s,i)}function ud(e,t,n,r,i,s){jx(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&Cg(t,n,!1),Jn(e,t,s);r=t.stateNode,zC.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Ls(t,e.child,null,s),t.child=Ls(t,null,a,s)):lt(e,t,a,s),t.memoizedState=r.state,i&&Cg(t,n,!0),t.child}function Nx(e){var t=e.stateNode;t.pendingContext?Eg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Eg(e,t.context,!1),Jh(e,t.containerInfo)}function Bg(e,t,n,r,i){return Fs(),qh(i),t.flags|=256,lt(e,t,n,r),t.child}var cd={dehydrated:null,treeContext:null,retryLane:0};function fd(e){return{baseLanes:e,cachePool:null,transitions:null}}function Mx(e,t,n){var r=t.pendingProps,i=we.current,s=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),de(we,i&1),e===null)return rd(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,s?(r=t.mode,s=t.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=Lu(o,r,0,null),e=bi(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=fd(n),t.memoizedState=cd,e):ap(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return UC(e,t,o,r,a,i,n);if(s){s=r.fallback,o=t.mode,i=e.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Dr(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Dr(a,s):(s=bi(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?fd(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=cd,r}return s=e.child,e=s.sibling,r=Dr(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function ap(e,t){return t=Lu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function tl(e,t,n,r){return r!==null&&qh(r),Ls(t,e.child,null,n),e=ap(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function UC(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=qc(Error(A(422))),tl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Lu({mode:"visible",children:r.children},i,0,null),s=bi(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Ls(t,e.child,null,o),t.child.memoizedState=fd(o),t.memoizedState=cd,s);if(!(t.mode&1))return tl(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(A(419)),r=qc(s,r,void 0),tl(e,t,o,r)}if(a=(o&e.childLanes)!==0,St||a){if(r=He,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Zn(e,i),mn(r,e,i,-1))}return hp(),r=qc(Error(A(421))),tl(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=nk.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Nt=Or(i.nextSibling),Ft=t,ve=!0,dn=null,e!==null&&(qt[Gt++]=Hn,qt[Gt++]=Wn,qt[Gt++]=ki,Hn=e.id,Wn=e.overflow,ki=t),t=ap(t,r.children),t.flags|=4096,t)}function zg(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),id(e.return,t,n)}function Gc(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function Dx(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(lt(e,t,r.children,n),r=we.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&zg(e,n,t);else if(e.tag===19)zg(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(de(we,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ru(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Gc(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ru(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Gc(t,!0,n,null,s);break;case"together":Gc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Cl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Jn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Pi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(A(153));if(t.child!==null){for(e=t.child,n=Dr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Dr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function HC(e,t,n){switch(t.tag){case 3:Nx(t),Fs();break;case 5:ax(t);break;case 1:Et(t.type)&&Xl(t);break;case 4:Jh(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;de(eu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(de(we,we.current&1),t.flags|=128,null):n&t.child.childLanes?Mx(e,t,n):(de(we,we.current&1),e=Jn(e,t,n),e!==null?e.sibling:null);de(we,we.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Dx(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),de(we,we.current),r)break;return null;case 22:case 23:return t.lanes=0,Ox(e,t,n)}return Jn(e,t,n)}var Fx,dd,Lx,Ix;Fx=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};dd=function(){};Lx=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,li(Pn.current);var s=null;switch(n){case"input":i=Mf(e,i),r=Mf(e,r),s=[];break;case"select":i=Te({},i,{value:void 0}),r=Te({},r,{value:void 0}),s=[];break;case"textarea":i=Lf(e,i),r=Lf(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ql)}$f(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Io.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var l=r[u];if(a=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Io.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&pe("scroll",e),s||a===l||(s=[])):(s=s||[]).push(u,l))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};Ix=function(e,t,n,r){n!==r&&(t.flags|=4)};function lo(e,t){if(!ve)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Je(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function WC(e,t,n){var r=t.pendingProps;switch(Kh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Je(t),null;case 1:return Et(t.type)&&Yl(),Je(t),null;case 3:return r=t.stateNode,Is(),ge(Tt),ge(st),tp(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ja(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,dn!==null&&(wd(dn),dn=null))),dd(e,t),Je(t),null;case 5:ep(t);var i=li(Yo.current);if(n=t.type,e!==null&&t.stateNode!=null)Lx(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(A(166));return Je(t),null}if(e=li(Pn.current),Ja(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[kn]=t,r[Go]=s,e=(t.mode&1)!==0,n){case"dialog":pe("cancel",r),pe("close",r);break;case"iframe":case"object":case"embed":pe("load",r);break;case"video":case"audio":for(i=0;i<yo.length;i++)pe(yo[i],r);break;case"source":pe("error",r);break;case"img":case"image":case"link":pe("error",r),pe("load",r);break;case"details":pe("toggle",r);break;case"input":Xm(r,s),pe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},pe("invalid",r);break;case"textarea":Jm(r,s),pe("invalid",r)}$f(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&Za(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Za(r.textContent,a,e),i=["children",""+a]):Io.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&pe("scroll",r)}switch(n){case"input":Ha(r),Zm(r,s,!0);break;case"textarea":Ha(r),eg(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Ql)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=d1(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[kn]=t,e[Go]=r,Fx(e,t,!1,!1),t.stateNode=e;e:{switch(o=Vf(n,r),n){case"dialog":pe("cancel",e),pe("close",e),i=r;break;case"iframe":case"object":case"embed":pe("load",e),i=r;break;case"video":case"audio":for(i=0;i<yo.length;i++)pe(yo[i],e);i=r;break;case"source":pe("error",e),i=r;break;case"img":case"image":case"link":pe("error",e),pe("load",e),i=r;break;case"details":pe("toggle",e),i=r;break;case"input":Xm(e,r),i=Mf(e,r),pe("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Te({},r,{value:void 0}),pe("invalid",e);break;case"textarea":Jm(e,r),i=Lf(e,r),pe("invalid",e);break;default:i=r}$f(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?m1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&h1(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&$o(e,l):typeof l=="number"&&$o(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Io.hasOwnProperty(s)?l!=null&&s==="onScroll"&&pe("scroll",e):l!=null&&Oh(e,s,l,o))}switch(n){case"input":Ha(e),Zm(e,r,!1);break;case"textarea":Ha(e),eg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Vr(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?ps(e,!!r.multiple,s,!1):r.defaultValue!=null&&ps(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Ql)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Je(t),null;case 6:if(e&&t.stateNode!=null)Ix(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(A(166));if(n=li(Yo.current),li(Pn.current),Ja(t)){if(r=t.stateNode,n=t.memoizedProps,r[kn]=t,(s=r.nodeValue!==n)&&(e=Ft,e!==null))switch(e.tag){case 3:Za(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Za(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[kn]=t,t.stateNode=r}return Je(t),null;case 13:if(ge(we),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ve&&Nt!==null&&t.mode&1&&!(t.flags&128))nx(),Fs(),t.flags|=98560,s=!1;else if(s=Ja(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(A(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(A(317));s[kn]=t}else Fs(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Je(t),s=!1}else dn!==null&&(wd(dn),dn=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||we.current&1?Ie===0&&(Ie=3):hp())),t.updateQueue!==null&&(t.flags|=4),Je(t),null);case 4:return Is(),dd(e,t),e===null&&Ko(t.stateNode.containerInfo),Je(t),null;case 10:return Yh(t.type._context),Je(t),null;case 17:return Et(t.type)&&Yl(),Je(t),null;case 19:if(ge(we),s=t.memoizedState,s===null)return Je(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)lo(s,!1);else{if(Ie!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ru(e),o!==null){for(t.flags|=128,lo(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return de(we,we.current&1|2),t.child}e=e.sibling}s.tail!==null&&Ae()>Vs&&(t.flags|=128,r=!0,lo(s,!1),t.lanes=4194304)}else{if(!r)if(e=ru(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),lo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!ve)return Je(t),null}else 2*Ae()-s.renderingStartTime>Vs&&n!==1073741824&&(t.flags|=128,r=!0,lo(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ae(),t.sibling=null,n=we.current,de(we,r?n&1|2:n&1),t):(Je(t),null);case 22:case 23:return dp(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?jt&1073741824&&(Je(t),t.subtreeFlags&6&&(t.flags|=8192)):Je(t),null;case 24:return null;case 25:return null}throw Error(A(156,t.tag))}function KC(e,t){switch(Kh(t),t.tag){case 1:return Et(t.type)&&Yl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Is(),ge(Tt),ge(st),tp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ep(t),null;case 13:if(ge(we),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(A(340));Fs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ge(we),null;case 4:return Is(),null;case 10:return Yh(t.type._context),null;case 22:case 23:return dp(),null;case 24:return null;default:return null}}var nl=!1,rt=!1,qC=typeof WeakSet=="function"?WeakSet:Set,F=null;function os(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ke(e,t,r)}else n.current=null}function hd(e,t,n){try{n()}catch(r){ke(e,t,r)}}var Ug=!1;function GC(e,t){if(Yf=Kl,e=U1(),Hh(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,f=0,c=e,d=null;t:for(;;){for(var h;c!==n||i!==0&&c.nodeType!==3||(a=o+i),c!==s||r!==0&&c.nodeType!==3||(l=o+r),c.nodeType===3&&(o+=c.nodeValue.length),(h=c.firstChild)!==null;)d=c,c=h;for(;;){if(c===e)break t;if(d===n&&++u===i&&(a=o),d===s&&++f===r&&(l=o),(h=c.nextSibling)!==null)break;c=d,d=c.parentNode}c=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Xf={focusedElem:e,selectionRange:n},Kl=!1,F=t;F!==null;)if(t=F,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,F=e;else for(;F!==null;){t=F;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var x=m.memoizedProps,b=m.memoizedState,p=t.stateNode,g=p.getSnapshotBeforeUpdate(t.elementType===t.type?x:ln(t.type,x),b);p.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(A(163))}}catch(E){ke(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,F=e;break}F=t.return}return m=Ug,Ug=!1,m}function Po(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&hd(t,n,s)}i=i.next}while(i!==r)}}function Du(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function pd(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function $x(e){var t=e.alternate;t!==null&&(e.alternate=null,$x(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[kn],delete t[Go],delete t[ed],delete t[RC],delete t[OC])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Vx(e){return e.tag===5||e.tag===3||e.tag===4}function Hg(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Vx(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function md(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ql));else if(r!==4&&(e=e.child,e!==null))for(md(e,t,n),e=e.sibling;e!==null;)md(e,t,n),e=e.sibling}function gd(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(gd(e,t,n),e=e.sibling;e!==null;)gd(e,t,n),e=e.sibling}var qe=null,cn=!1;function ar(e,t,n){for(n=n.child;n!==null;)Bx(e,t,n),n=n.sibling}function Bx(e,t,n){if(_n&&typeof _n.onCommitFiberUnmount=="function")try{_n.onCommitFiberUnmount(_u,n)}catch{}switch(n.tag){case 5:rt||os(n,t);case 6:var r=qe,i=cn;qe=null,ar(e,t,n),qe=r,cn=i,qe!==null&&(cn?(e=qe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):qe.removeChild(n.stateNode));break;case 18:qe!==null&&(cn?(e=qe,n=n.stateNode,e.nodeType===8?Bc(e.parentNode,n):e.nodeType===1&&Bc(e,n),Uo(e)):Bc(qe,n.stateNode));break;case 4:r=qe,i=cn,qe=n.stateNode.containerInfo,cn=!0,ar(e,t,n),qe=r,cn=i;break;case 0:case 11:case 14:case 15:if(!rt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&hd(n,t,o),i=i.next}while(i!==r)}ar(e,t,n);break;case 1:if(!rt&&(os(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ke(n,t,a)}ar(e,t,n);break;case 21:ar(e,t,n);break;case 22:n.mode&1?(rt=(r=rt)||n.memoizedState!==null,ar(e,t,n),rt=r):ar(e,t,n);break;default:ar(e,t,n)}}function Wg(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new qC),t.forEach(function(r){var i=rk.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function sn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:qe=a.stateNode,cn=!1;break e;case 3:qe=a.stateNode.containerInfo,cn=!0;break e;case 4:qe=a.stateNode.containerInfo,cn=!0;break e}a=a.return}if(qe===null)throw Error(A(160));Bx(s,o,i),qe=null,cn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){ke(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)zx(t,e),t=t.sibling}function zx(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(sn(t,e),vn(e),r&4){try{Po(3,e,e.return),Du(3,e)}catch(x){ke(e,e.return,x)}try{Po(5,e,e.return)}catch(x){ke(e,e.return,x)}}break;case 1:sn(t,e),vn(e),r&512&&n!==null&&os(n,n.return);break;case 5:if(sn(t,e),vn(e),r&512&&n!==null&&os(n,n.return),e.flags&32){var i=e.stateNode;try{$o(i,"")}catch(x){ke(e,e.return,x)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,o=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&c1(i,s),Vf(a,o);var u=Vf(a,s);for(o=0;o<l.length;o+=2){var f=l[o],c=l[o+1];f==="style"?m1(i,c):f==="dangerouslySetInnerHTML"?h1(i,c):f==="children"?$o(i,c):Oh(i,f,c,u)}switch(a){case"input":Df(i,s);break;case"textarea":f1(i,s);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?ps(i,!!s.multiple,h,!1):d!==!!s.multiple&&(s.defaultValue!=null?ps(i,!!s.multiple,s.defaultValue,!0):ps(i,!!s.multiple,s.multiple?[]:"",!1))}i[Go]=s}catch(x){ke(e,e.return,x)}}break;case 6:if(sn(t,e),vn(e),r&4){if(e.stateNode===null)throw Error(A(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(x){ke(e,e.return,x)}}break;case 3:if(sn(t,e),vn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Uo(t.containerInfo)}catch(x){ke(e,e.return,x)}break;case 4:sn(t,e),vn(e);break;case 13:sn(t,e),vn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(cp=Ae())),r&4&&Wg(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(rt=(u=rt)||f,sn(t,e),rt=u):sn(t,e),vn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!f&&e.mode&1)for(F=e,f=e.child;f!==null;){for(c=F=f;F!==null;){switch(d=F,h=d.child,d.tag){case 0:case 11:case 14:case 15:Po(4,d,d.return);break;case 1:os(d,d.return);var m=d.stateNode;if(typeof m.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(x){ke(r,n,x)}}break;case 5:os(d,d.return);break;case 22:if(d.memoizedState!==null){qg(c);continue}}h!==null?(h.return=d,F=h):qg(c)}f=f.sibling}e:for(f=null,c=e;;){if(c.tag===5){if(f===null){f=c;try{i=c.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=c.stateNode,l=c.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=p1("display",o))}catch(x){ke(e,e.return,x)}}}else if(c.tag===6){if(f===null)try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(x){ke(e,e.return,x)}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===e)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===e)break e;for(;c.sibling===null;){if(c.return===null||c.return===e)break e;f===c&&(f=null),c=c.return}f===c&&(f=null),c.sibling.return=c.return,c=c.sibling}}break;case 19:sn(t,e),vn(e),r&4&&Wg(e);break;case 21:break;default:sn(t,e),vn(e)}}function vn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Vx(n)){var r=n;break e}n=n.return}throw Error(A(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&($o(i,""),r.flags&=-33);var s=Hg(e);gd(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Hg(e);md(e,a,o);break;default:throw Error(A(161))}}catch(l){ke(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function QC(e,t,n){F=e,Ux(e)}function Ux(e,t,n){for(var r=(e.mode&1)!==0;F!==null;){var i=F,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||nl;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||rt;a=nl;var u=rt;if(nl=o,(rt=l)&&!u)for(F=i;F!==null;)o=F,l=o.child,o.tag===22&&o.memoizedState!==null?Gg(i):l!==null?(l.return=o,F=l):Gg(i);for(;s!==null;)F=s,Ux(s),s=s.sibling;F=i,nl=a,rt=u}Kg(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,F=s):Kg(e)}}function Kg(e){for(;F!==null;){var t=F;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:rt||Du(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!rt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ln(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&Rg(t,s,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Rg(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var f=u.memoizedState;if(f!==null){var c=f.dehydrated;c!==null&&Uo(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(A(163))}rt||t.flags&512&&pd(t)}catch(d){ke(t,t.return,d)}}if(t===e){F=null;break}if(n=t.sibling,n!==null){n.return=t.return,F=n;break}F=t.return}}function qg(e){for(;F!==null;){var t=F;if(t===e){F=null;break}var n=t.sibling;if(n!==null){n.return=t.return,F=n;break}F=t.return}}function Gg(e){for(;F!==null;){var t=F;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Du(4,t)}catch(l){ke(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){ke(t,i,l)}}var s=t.return;try{pd(t)}catch(l){ke(t,s,l)}break;case 5:var o=t.return;try{pd(t)}catch(l){ke(t,o,l)}}}catch(l){ke(t,t.return,l)}if(t===e){F=null;break}var a=t.sibling;if(a!==null){a.return=t.return,F=a;break}F=t.return}}var YC=Math.ceil,ou=tr.ReactCurrentDispatcher,lp=tr.ReactCurrentOwner,Xt=tr.ReactCurrentBatchConfig,se=0,He=null,je=null,Qe=0,jt=0,as=Kr(0),Ie=0,ea=null,Pi=0,Fu=0,up=0,Ao=null,wt=null,cp=0,Vs=1/0,Vn=null,au=!1,yd=null,Nr=null,rl=!1,Cr=null,lu=0,Ro=0,vd=null,kl=-1,_l=0;function ft(){return se&6?Ae():kl!==-1?kl:kl=Ae()}function Mr(e){return e.mode&1?se&2&&Qe!==0?Qe&-Qe:NC.transition!==null?(_l===0&&(_l=_1()),_l):(e=le,e!==0||(e=window.event,e=e===void 0?16:M1(e.type)),e):1}function mn(e,t,n,r){if(50<Ro)throw Ro=0,vd=null,Error(A(185));wa(e,n,r),(!(se&2)||e!==He)&&(e===He&&(!(se&2)&&(Fu|=n),Ie===4&&pr(e,Qe)),Ct(e,r),n===1&&se===0&&!(t.mode&1)&&(Vs=Ae()+500,ju&&qr()))}function Ct(e,t){var n=e.callbackNode;NE(e,t);var r=Wl(e,e===He?Qe:0);if(r===0)n!==null&&rg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&rg(n),t===1)e.tag===0?jC(Qg.bind(null,e)):J1(Qg.bind(null,e)),PC(function(){!(se&6)&&qr()}),n=null;else{switch(P1(r)){case 1:n=Fh;break;case 4:n=C1;break;case 16:n=Hl;break;case 536870912:n=k1;break;default:n=Hl}n=Xx(n,Hx.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Hx(e,t){if(kl=-1,_l=0,se&6)throw Error(A(327));var n=e.callbackNode;if(xs()&&e.callbackNode!==n)return null;var r=Wl(e,e===He?Qe:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=uu(e,r);else{t=r;var i=se;se|=2;var s=Kx();(He!==e||Qe!==t)&&(Vn=null,Vs=Ae()+500,wi(e,t));do try{JC();break}catch(a){Wx(e,a)}while(!0);Qh(),ou.current=s,se=i,je!==null?t=0:(He=null,Qe=0,t=Ie)}if(t!==0){if(t===2&&(i=Wf(e),i!==0&&(r=i,t=xd(e,i))),t===1)throw n=ea,wi(e,0),pr(e,r),Ct(e,Ae()),n;if(t===6)pr(e,r);else{if(i=e.current.alternate,!(r&30)&&!XC(i)&&(t=uu(e,r),t===2&&(s=Wf(e),s!==0&&(r=s,t=xd(e,s))),t===1))throw n=ea,wi(e,0),pr(e,r),Ct(e,Ae()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(A(345));case 2:ti(e,wt,Vn);break;case 3:if(pr(e,r),(r&130023424)===r&&(t=cp+500-Ae(),10<t)){if(Wl(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){ft(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Jf(ti.bind(null,e,wt,Vn),t);break}ti(e,wt,Vn);break;case 4:if(pr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-pn(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=Ae()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*YC(r/1960))-r,10<r){e.timeoutHandle=Jf(ti.bind(null,e,wt,Vn),r);break}ti(e,wt,Vn);break;case 5:ti(e,wt,Vn);break;default:throw Error(A(329))}}}return Ct(e,Ae()),e.callbackNode===n?Hx.bind(null,e):null}function xd(e,t){var n=Ao;return e.current.memoizedState.isDehydrated&&(wi(e,t).flags|=256),e=uu(e,t),e!==2&&(t=wt,wt=n,t!==null&&wd(t)),e}function wd(e){wt===null?wt=e:wt.push.apply(wt,e)}function XC(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!gn(s(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function pr(e,t){for(t&=~up,t&=~Fu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-pn(t),r=1<<n;e[n]=-1,t&=~r}}function Qg(e){if(se&6)throw Error(A(327));xs();var t=Wl(e,0);if(!(t&1))return Ct(e,Ae()),null;var n=uu(e,t);if(e.tag!==0&&n===2){var r=Wf(e);r!==0&&(t=r,n=xd(e,r))}if(n===1)throw n=ea,wi(e,0),pr(e,t),Ct(e,Ae()),n;if(n===6)throw Error(A(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ti(e,wt,Vn),Ct(e,Ae()),null}function fp(e,t){var n=se;se|=1;try{return e(t)}finally{se=n,se===0&&(Vs=Ae()+500,ju&&qr())}}function Ai(e){Cr!==null&&Cr.tag===0&&!(se&6)&&xs();var t=se;se|=1;var n=Xt.transition,r=le;try{if(Xt.transition=null,le=1,e)return e()}finally{le=r,Xt.transition=n,se=t,!(se&6)&&qr()}}function dp(){jt=as.current,ge(as)}function wi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,_C(n)),je!==null)for(n=je.return;n!==null;){var r=n;switch(Kh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Yl();break;case 3:Is(),ge(Tt),ge(st),tp();break;case 5:ep(r);break;case 4:Is();break;case 13:ge(we);break;case 19:ge(we);break;case 10:Yh(r.type._context);break;case 22:case 23:dp()}n=n.return}if(He=e,je=e=Dr(e.current,null),Qe=jt=t,Ie=0,ea=null,up=Fu=Pi=0,wt=Ao=null,ai!==null){for(t=0;t<ai.length;t++)if(n=ai[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}ai=null}return e}function Wx(e,t){do{var n=je;try{if(Qh(),Tl.current=su,iu){for(var r=Se.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}iu=!1}if(_i=0,Ue=Fe=Se=null,_o=!1,Xo=0,lp.current=null,n===null||n.return===null){Ie=1,ea=t,je=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=Qe,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,f=a,c=f.tag;if(!(f.mode&1)&&(c===0||c===11||c===15)){var d=f.alternate;d?(f.updateQueue=d.updateQueue,f.memoizedState=d.memoizedState,f.lanes=d.lanes):(f.updateQueue=null,f.memoizedState=null)}var h=Fg(o);if(h!==null){h.flags&=-257,Lg(h,o,a,s,t),h.mode&1&&Dg(s,u,t),t=h,l=u;var m=t.updateQueue;if(m===null){var x=new Set;x.add(l),t.updateQueue=x}else m.add(l);break e}else{if(!(t&1)){Dg(s,u,t),hp();break e}l=Error(A(426))}}else if(ve&&a.mode&1){var b=Fg(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),Lg(b,o,a,s,t),qh($s(l,a));break e}}s=l=$s(l,a),Ie!==4&&(Ie=2),Ao===null?Ao=[s]:Ao.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var p=Px(s,l,t);Ag(s,p);break e;case 1:a=l;var g=s.type,v=s.stateNode;if(!(s.flags&128)&&(typeof g.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Nr===null||!Nr.has(v)))){s.flags|=65536,t&=-t,s.lanes|=t;var E=Ax(s,a,t);Ag(s,E);break e}}s=s.return}while(s!==null)}Gx(n)}catch(S){t=S,je===n&&n!==null&&(je=n=n.return);continue}break}while(!0)}function Kx(){var e=ou.current;return ou.current=su,e===null?su:e}function hp(){(Ie===0||Ie===3||Ie===2)&&(Ie=4),He===null||!(Pi&268435455)&&!(Fu&268435455)||pr(He,Qe)}function uu(e,t){var n=se;se|=2;var r=Kx();(He!==e||Qe!==t)&&(Vn=null,wi(e,t));do try{ZC();break}catch(i){Wx(e,i)}while(!0);if(Qh(),se=n,ou.current=r,je!==null)throw Error(A(261));return He=null,Qe=0,Ie}function ZC(){for(;je!==null;)qx(je)}function JC(){for(;je!==null&&!EE();)qx(je)}function qx(e){var t=Yx(e.alternate,e,jt);e.memoizedProps=e.pendingProps,t===null?Gx(e):je=t,lp.current=null}function Gx(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=KC(n,t),n!==null){n.flags&=32767,je=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ie=6,je=null;return}}else if(n=WC(n,t,jt),n!==null){je=n;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);Ie===0&&(Ie=5)}function ti(e,t,n){var r=le,i=Xt.transition;try{Xt.transition=null,le=1,ek(e,t,n,r)}finally{Xt.transition=i,le=r}return null}function ek(e,t,n,r){do xs();while(Cr!==null);if(se&6)throw Error(A(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(A(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(ME(e,s),e===He&&(je=He=null,Qe=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||rl||(rl=!0,Xx(Hl,function(){return xs(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Xt.transition,Xt.transition=null;var o=le;le=1;var a=se;se|=4,lp.current=null,GC(e,n),zx(n,e),wC(Xf),Kl=!!Yf,Xf=Yf=null,e.current=n,QC(n),CE(),se=a,le=o,Xt.transition=s}else e.current=n;if(rl&&(rl=!1,Cr=e,lu=i),s=e.pendingLanes,s===0&&(Nr=null),PE(n.stateNode),Ct(e,Ae()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(au)throw au=!1,e=yd,yd=null,e;return lu&1&&e.tag!==0&&xs(),s=e.pendingLanes,s&1?e===vd?Ro++:(Ro=0,vd=e):Ro=0,qr(),null}function xs(){if(Cr!==null){var e=P1(lu),t=Xt.transition,n=le;try{if(Xt.transition=null,le=16>e?16:e,Cr===null)var r=!1;else{if(e=Cr,Cr=null,lu=0,se&6)throw Error(A(331));var i=se;for(se|=4,F=e.current;F!==null;){var s=F,o=s.child;if(F.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(F=u;F!==null;){var f=F;switch(f.tag){case 0:case 11:case 15:Po(8,f,s)}var c=f.child;if(c!==null)c.return=f,F=c;else for(;F!==null;){f=F;var d=f.sibling,h=f.return;if($x(f),f===u){F=null;break}if(d!==null){d.return=h,F=d;break}F=h}}}var m=s.alternate;if(m!==null){var x=m.child;if(x!==null){m.child=null;do{var b=x.sibling;x.sibling=null,x=b}while(x!==null)}}F=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,F=o;else e:for(;F!==null;){if(s=F,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Po(9,s,s.return)}var p=s.sibling;if(p!==null){p.return=s.return,F=p;break e}F=s.return}}var g=e.current;for(F=g;F!==null;){o=F;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,F=v;else e:for(o=g;F!==null;){if(a=F,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Du(9,a)}}catch(S){ke(a,a.return,S)}if(a===o){F=null;break e}var E=a.sibling;if(E!==null){E.return=a.return,F=E;break e}F=a.return}}if(se=i,qr(),_n&&typeof _n.onPostCommitFiberRoot=="function")try{_n.onPostCommitFiberRoot(_u,e)}catch{}r=!0}return r}finally{le=n,Xt.transition=t}}return!1}function Yg(e,t,n){t=$s(n,t),t=Px(e,t,1),e=jr(e,t,1),t=ft(),e!==null&&(wa(e,1,t),Ct(e,t))}function ke(e,t,n){if(e.tag===3)Yg(e,e,n);else for(;t!==null;){if(t.tag===3){Yg(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Nr===null||!Nr.has(r))){e=$s(n,e),e=Ax(t,e,1),t=jr(t,e,1),e=ft(),t!==null&&(wa(t,1,e),Ct(t,e));break}}t=t.return}}function tk(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ft(),e.pingedLanes|=e.suspendedLanes&n,He===e&&(Qe&n)===n&&(Ie===4||Ie===3&&(Qe&130023424)===Qe&&500>Ae()-cp?wi(e,0):up|=n),Ct(e,t)}function Qx(e,t){t===0&&(e.mode&1?(t=qa,qa<<=1,!(qa&130023424)&&(qa=4194304)):t=1);var n=ft();e=Zn(e,t),e!==null&&(wa(e,t,n),Ct(e,n))}function nk(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Qx(e,n)}function rk(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(A(314))}r!==null&&r.delete(t),Qx(e,n)}var Yx;Yx=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Tt.current)St=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return St=!1,HC(e,t,n);St=!!(e.flags&131072)}else St=!1,ve&&t.flags&1048576&&ex(t,Jl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Cl(e,t),e=t.pendingProps;var i=Ds(t,st.current);vs(t,n),i=rp(null,t,r,e,i,n);var s=ip();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Et(r)?(s=!0,Xl(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Zh(t),i.updater=Mu,t.stateNode=i,i._reactInternals=t,od(t,r,e,n),t=ud(null,t,r,!0,s,n)):(t.tag=0,ve&&s&&Wh(t),lt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Cl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=sk(r),e=ln(r,e),i){case 0:t=ld(null,t,r,e,n);break e;case 1:t=Vg(null,t,r,e,n);break e;case 11:t=Ig(null,t,r,e,n);break e;case 14:t=$g(null,t,r,ln(r.type,e),n);break e}throw Error(A(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ln(r,i),ld(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ln(r,i),Vg(e,t,r,i,n);case 3:e:{if(Nx(t),e===null)throw Error(A(387));r=t.pendingProps,s=t.memoizedState,i=s.element,ox(e,t),nu(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=$s(Error(A(423)),t),t=Bg(e,t,r,n,i);break e}else if(r!==i){i=$s(Error(A(424)),t),t=Bg(e,t,r,n,i);break e}else for(Nt=Or(t.stateNode.containerInfo.firstChild),Ft=t,ve=!0,dn=null,n=ix(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Fs(),r===i){t=Jn(e,t,n);break e}lt(e,t,r,n)}t=t.child}return t;case 5:return ax(t),e===null&&rd(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,Zf(r,i)?o=null:s!==null&&Zf(r,s)&&(t.flags|=32),jx(e,t),lt(e,t,o,n),t.child;case 6:return e===null&&rd(t),null;case 13:return Mx(e,t,n);case 4:return Jh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ls(t,null,r,n):lt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ln(r,i),Ig(e,t,r,i,n);case 7:return lt(e,t,t.pendingProps,n),t.child;case 8:return lt(e,t,t.pendingProps.children,n),t.child;case 12:return lt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,de(eu,r._currentValue),r._currentValue=o,s!==null)if(gn(s.value,o)){if(s.children===i.children&&!Tt.current){t=Jn(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=qn(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?l.next=l:(l.next=f.next,f.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),id(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(A(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),id(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}lt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,vs(t,n),i=Jt(i),r=r(i),t.flags|=1,lt(e,t,r,n),t.child;case 14:return r=t.type,i=ln(r,t.pendingProps),i=ln(r.type,i),$g(e,t,r,i,n);case 15:return Rx(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ln(r,i),Cl(e,t),t.tag=1,Et(r)?(e=!0,Xl(t)):e=!1,vs(t,n),_x(t,r,i),od(t,r,i,n),ud(null,t,r,!0,e,n);case 19:return Dx(e,t,n);case 22:return Ox(e,t,n)}throw Error(A(156,t.tag))};function Xx(e,t){return E1(e,t)}function ik(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yt(e,t,n,r){return new ik(e,t,n,r)}function pp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sk(e){if(typeof e=="function")return pp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Nh)return 11;if(e===Mh)return 14}return 2}function Dr(e,t){var n=e.alternate;return n===null?(n=Yt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Pl(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")pp(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Xi:return bi(n.children,i,s,t);case jh:o=8,i|=8;break;case Rf:return e=Yt(12,n,t,i|2),e.elementType=Rf,e.lanes=s,e;case Of:return e=Yt(13,n,t,i),e.elementType=Of,e.lanes=s,e;case jf:return e=Yt(19,n,t,i),e.elementType=jf,e.lanes=s,e;case a1:return Lu(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case s1:o=10;break e;case o1:o=9;break e;case Nh:o=11;break e;case Mh:o=14;break e;case cr:o=16,r=null;break e}throw Error(A(130,e==null?e:typeof e,""))}return t=Yt(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function bi(e,t,n,r){return e=Yt(7,e,r,t),e.lanes=n,e}function Lu(e,t,n,r){return e=Yt(22,e,r,t),e.elementType=a1,e.lanes=n,e.stateNode={isHidden:!1},e}function Qc(e,t,n){return e=Yt(6,e,null,t),e.lanes=n,e}function Yc(e,t,n){return t=Yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ok(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Rc(0),this.expirationTimes=Rc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rc(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function mp(e,t,n,r,i,s,o,a,l){return e=new ok(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Yt(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Zh(s),e}function ak(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Yi,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Zx(e){if(!e)return Br;e=e._reactInternals;e:{if(Di(e)!==e||e.tag!==1)throw Error(A(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Et(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(A(171))}if(e.tag===1){var n=e.type;if(Et(n))return Z1(e,n,t)}return t}function Jx(e,t,n,r,i,s,o,a,l){return e=mp(n,r,!0,e,i,s,o,a,l),e.context=Zx(null),n=e.current,r=ft(),i=Mr(n),s=qn(r,i),s.callback=t??null,jr(n,s,i),e.current.lanes=i,wa(e,i,r),Ct(e,r),e}function Iu(e,t,n,r){var i=t.current,s=ft(),o=Mr(i);return n=Zx(n),t.context===null?t.context=n:t.pendingContext=n,t=qn(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=jr(i,t,o),e!==null&&(mn(e,i,o,s),Sl(e,i,o)),o}function cu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Xg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function gp(e,t){Xg(e,t),(e=e.alternate)&&Xg(e,t)}function lk(){return null}var ew=typeof reportError=="function"?reportError:function(e){console.error(e)};function yp(e){this._internalRoot=e}$u.prototype.render=yp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(A(409));Iu(e,t,null,null)};$u.prototype.unmount=yp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ai(function(){Iu(null,e,null,null)}),t[Xn]=null}};function $u(e){this._internalRoot=e}$u.prototype.unstable_scheduleHydration=function(e){if(e){var t=O1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<hr.length&&t!==0&&t<hr[n].priority;n++);hr.splice(n,0,e),n===0&&N1(e)}};function vp(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Vu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Zg(){}function uk(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=cu(o);s.call(u)}}var o=Jx(t,r,e,0,null,!1,!1,"",Zg);return e._reactRootContainer=o,e[Xn]=o.current,Ko(e.nodeType===8?e.parentNode:e),Ai(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var u=cu(l);a.call(u)}}var l=mp(e,0,!1,null,null,!1,!1,"",Zg);return e._reactRootContainer=l,e[Xn]=l.current,Ko(e.nodeType===8?e.parentNode:e),Ai(function(){Iu(t,l,n,r)}),l}function Bu(e,t,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var l=cu(o);a.call(l)}}Iu(t,o,e,i)}else o=uk(n,t,e,i,r);return cu(o)}A1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=go(t.pendingLanes);n!==0&&(Lh(t,n|1),Ct(t,Ae()),!(se&6)&&(Vs=Ae()+500,qr()))}break;case 13:Ai(function(){var r=Zn(e,1);if(r!==null){var i=ft();mn(r,e,1,i)}}),gp(e,1)}};Ih=function(e){if(e.tag===13){var t=Zn(e,134217728);if(t!==null){var n=ft();mn(t,e,134217728,n)}gp(e,134217728)}};R1=function(e){if(e.tag===13){var t=Mr(e),n=Zn(e,t);if(n!==null){var r=ft();mn(n,e,t,r)}gp(e,t)}};O1=function(){return le};j1=function(e,t){var n=le;try{return le=e,t()}finally{le=n}};zf=function(e,t,n){switch(t){case"input":if(Df(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Ou(r);if(!i)throw Error(A(90));u1(r),Df(r,i)}}}break;case"textarea":f1(e,n);break;case"select":t=n.value,t!=null&&ps(e,!!n.multiple,t,!1)}};v1=fp;x1=Ai;var ck={usingClientEntryPoint:!1,Events:[Sa,ts,Ou,g1,y1,fp]},uo={findFiberByHostInstance:oi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},fk={bundleType:uo.bundleType,version:uo.version,rendererPackageName:uo.rendererPackageName,rendererConfig:uo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:tr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=S1(e),e===null?null:e.stateNode},findFiberByHostInstance:uo.findFiberByHostInstance||lk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var il=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!il.isDisabled&&il.supportsFiber)try{_u=il.inject(fk),_n=il}catch{}}It.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ck;It.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!vp(t))throw Error(A(200));return ak(e,t,null,n)};It.createRoot=function(e,t){if(!vp(e))throw Error(A(299));var n=!1,r="",i=ew;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=mp(e,1,!1,null,null,n,!1,r,i),e[Xn]=t.current,Ko(e.nodeType===8?e.parentNode:e),new yp(t)};It.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(A(188)):(e=Object.keys(e).join(","),Error(A(268,e)));return e=S1(t),e=e===null?null:e.stateNode,e};It.flushSync=function(e){return Ai(e)};It.hydrate=function(e,t,n){if(!Vu(t))throw Error(A(200));return Bu(null,e,t,!0,n)};It.hydrateRoot=function(e,t,n){if(!vp(e))throw Error(A(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=ew;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Jx(t,null,e,1,n??null,i,!1,s,o),e[Xn]=t.current,Ko(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new $u(t)};It.render=function(e,t,n){if(!Vu(t))throw Error(A(200));return Bu(null,e,t,!1,n)};It.unmountComponentAtNode=function(e){if(!Vu(e))throw Error(A(40));return e._reactRootContainer?(Ai(function(){Bu(null,null,e,!1,function(){e._reactRootContainer=null,e[Xn]=null})}),!0):!1};It.unstable_batchedUpdates=fp;It.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Vu(n))throw Error(A(200));if(e==null||e._reactInternals===void 0)throw Error(A(38));return Bu(e,t,n,!1,r)};It.version="18.3.1-next-f1338f8080-20240426";function tw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(tw)}catch(e){console.error(e)}}tw(),t1.exports=It;var nw=t1.exports;const dk=Ws(nw);var rw,Jg=nw;rw=Jg.createRoot,Jg.hydrateRoot;const hk="@alfatech/livechat",pk="v2025.05.12.3",mk="module",gk="https://api-live.alfatek.dev",yk="wss://api-live.alfatek.dev",vk=["dist","README.md"],xk="dist/widget.js",wk={dev:"vite",build:"tsc -b && vite build",lint:"biome lint --write",prepare:"husky",format:"biome format --write && yarn lint"},bk={"@headlessui/react":"^2.2.2","@tailwindcss/vite":"^4.1.4","@tanstack/react-query":"^5.59.20",classnames:"^2.5.1",dayjs:"^1.11.13",formik:"^2.4.6","framer-motion":"^12.7.4",react:"^18.3.1","react-dom":"^18.3.1","react-router-dom":"^6.26.2","socket.io-client":"^4.8.1",sonner:"^2.0.1",yup:"^1.4.0",zustand:"^4.5.5"},Sk={"@biomejs/biome":"^1.8.3","@types/node":"^22.5.4","@types/react":"^18.3.3","@types/react-dom":"^18.3.0","@vitejs/plugin-react-swc":"^3.5.0",globals:"^15.9.0",husky:"^9.1.5",tailwindcss:"^4.1.4",typescript:"^5.5.3",vite:"^5.4.1"},iw={name:hk,private:!1,version:pk,type:mk,apiURL:gk,wsURL:yk,files:vk,main:xk,scripts:wk,dependencies:bk,devDependencies:Sk,"lint-staged":{"./**/*.{js,ts,tsx,json}":["npm run format"]}},Tk=iw.apiURL,Ek=iw.wsURL,Ck=e=>[{limit:Number.parseInt(e.headers.get("X-Ratelimit-Limit")||"0"),remaining:Number.parseInt(e.headers.get("X-Ratelimit-Remaining")||"0"),reset:Number.parseInt(e.headers.get("X-Ratelimit-Reset")||"0"),retryAfter:Number.parseInt(e.headers.get("Retry-After")||"0")},429],kk=(e,t)=>[{message:"message"in t?t.message:"Not Found"},404],_k={429:Ck,404:kk};async function Ea(e,t={}){const n={};!(t.body instanceof FormData)&&t.body&&(n["Content-Type"]="application/json");const r=await fetch(`${Tk}/${e}`,{...t,credentials:"include",headers:{...t.headers,...n}}).catch(s=>(console.log("err::",s),new Response(null,{status:500})));if(!r.ok){let s={};try{return s=await r.json(),[s,r.status]}catch{console.log("response: ",r)}const o=_k[r.status];return o?o(r,s):[{},r.status]}const i=r.headers.get("Content-Type");return i&&i.includes("application/json")?[await r.json(),r.status]:[await r.text(),r.status]}const xp=e=>[200,201,204].includes(e);var Qs=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(){}},Ri=typeof window>"u"||"Deno"in globalThis;function Kt(){}function Pk(e,t){return typeof e=="function"?e(t):e}function bd(e){return typeof e=="number"&&e>=0&&e!==1/0}function sw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ws(e,t){return typeof e=="function"?e(t):e}function hn(e,t){return typeof e=="function"?e(t):e}function e0(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==wp(o,t.options))return!1}else if(!ta(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||s&&!s(t))}function t0(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Oi(t.options.mutationKey)!==Oi(s))return!1}else if(!ta(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function wp(e,t){return((t==null?void 0:t.queryKeyHashFn)||Oi)(e)}function Oi(e){return JSON.stringify(e,(t,n)=>Sd(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function ta(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!ta(e[n],t[n])):!1}function ow(e,t){if(e===t)return e;const n=n0(e)&&n0(t);if(n||Sd(e)&&Sd(t)){const r=n?e:Object.keys(e),i=r.length,s=n?t:Object.keys(t),o=s.length,a=n?[]:{};let l=0;for(let u=0;u<o;u++){const f=n?u:s[u];(!n&&r.includes(f)||n)&&e[f]===void 0&&t[f]===void 0?(a[f]=void 0,l++):(a[f]=ow(e[f],t[f]),a[f]===e[f]&&e[f]!==void 0&&l++)}return i===o&&l===i?e:a}return t}function fu(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function n0(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Sd(e){if(!r0(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!r0(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function r0(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ak(e){return new Promise(t=>{setTimeout(t,e)})}function Td(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?ow(e,t):t}function Rk(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Ok(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var bp=Symbol();function aw(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===bp?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var hi,mr,bs,Mv,jk=(Mv=class extends Qs{constructor(){super();U(this,hi);U(this,mr);U(this,bs);D(this,bs,t=>{if(!Ri&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){T(this,mr)||this.setEventListener(T(this,bs))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,mr))==null||t.call(this),D(this,mr,void 0))}setEventListener(t){var n;D(this,bs,t),(n=T(this,mr))==null||n.call(this),D(this,mr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){T(this,hi)!==t&&(D(this,hi,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof T(this,hi)=="boolean"?T(this,hi):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},hi=new WeakMap,mr=new WeakMap,bs=new WeakMap,Mv),Sp=new jk,Ss,gr,Ts,Dv,Nk=(Dv=class extends Qs{constructor(){super();U(this,Ss,!0);U(this,gr);U(this,Ts);D(this,Ts,t=>{if(!Ri&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){T(this,gr)||this.setEventListener(T(this,Ts))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,gr))==null||t.call(this),D(this,gr,void 0))}setEventListener(t){var n;D(this,Ts,t),(n=T(this,gr))==null||n.call(this),D(this,gr,t(this.setOnline.bind(this)))}setOnline(t){T(this,Ss)!==t&&(D(this,Ss,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return T(this,Ss)}},Ss=new WeakMap,gr=new WeakMap,Ts=new WeakMap,Dv),du=new Nk;function Ed(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function Mk(e){return Math.min(1e3*2**e,3e4)}function lw(e){return(e??"online")==="online"?du.isOnline():!0}var uw=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Xc(e){return e instanceof uw}function cw(e){let t=!1,n=0,r=!1,i;const s=Ed(),o=x=>{var b;r||(d(new uw(x)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>Sp.isFocused()&&(e.networkMode==="always"||du.isOnline())&&e.canRun(),f=()=>lw(e.networkMode)&&e.canRun(),c=x=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,x),i==null||i(),s.resolve(x))},d=x=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,x),i==null||i(),s.reject(x))},h=()=>new Promise(x=>{var b;i=p=>{(r||u())&&x(p)},(b=e.onPause)==null||b.call(e)}).then(()=>{var x;i=void 0,r||(x=e.onContinue)==null||x.call(e)}),m=()=>{if(r)return;let x;const b=n===0?e.initialPromise:void 0;try{x=b??e.fn()}catch(p){x=Promise.reject(p)}Promise.resolve(x).then(c).catch(p=>{var C;if(r)return;const g=e.retry??(Ri?0:3),v=e.retryDelay??Mk,E=typeof v=="function"?v(n,p):v,S=g===!0||typeof g=="number"&&n<g||typeof g=="function"&&g(n,p);if(t||!S){d(p);return}n++,(C=e.onFail)==null||C.call(e,n,p),Ak(E).then(()=>u()?void 0:h()).then(()=>{t?d(p):m()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:f,start:()=>(f()?m():h().then(m),s)}}function Dk(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=a=>setTimeout(a,0);const s=a=>{t?e.push(a):i(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var Le=Dk(),pi,Fv,fw=(Fv=class{constructor(){U(this,pi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),bd(this.gcTime)&&D(this,pi,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ri?1/0:5*60*1e3))}clearGcTimeout(){T(this,pi)&&(clearTimeout(T(this,pi)),D(this,pi,void 0))}},pi=new WeakMap,Fv),Es,Cs,Wt,tt,ma,mi,un,$n,Lv,Fk=(Lv=class extends fw{constructor(t){super();U(this,un);U(this,Es);U(this,Cs);U(this,Wt);U(this,tt);U(this,ma);U(this,mi);D(this,mi,!1),D(this,ma,t.defaultOptions),this.setOptions(t.options),this.observers=[],D(this,Wt,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,D(this,Es,Lk(this.options)),this.state=t.state??T(this,Es),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=T(this,tt))==null?void 0:t.promise}setOptions(t){this.options={...T(this,ma),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&T(this,Wt).remove(this)}setData(t,n){const r=Td(this.state.data,t,this.options);return X(this,un,$n).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){X(this,un,$n).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=T(this,tt))==null?void 0:r.promise;return(i=T(this,tt))==null||i.cancel(t),n?n.then(Kt).catch(Kt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(T(this,Es))}isActive(){return this.observers.some(t=>hn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===bp||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!sw(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=T(this,tt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=T(this,tt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),T(this,Wt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(T(this,tt)&&(T(this,mi)?T(this,tt).cancel({revert:!0}):T(this,tt).cancelRetry()),this.scheduleGc()),T(this,Wt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||X(this,un,$n).call(this,{type:"invalidate"})}fetch(t,n){var l,u,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(T(this,tt))return T(this,tt).continueRetry(),T(this,tt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const c=this.observers.find(d=>d.options.queryFn);c&&this.setOptions(c.options)}const r=new AbortController,i=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(D(this,mi,!0),r.signal)})},s=()=>{const c=aw(this.options,n),d={queryKey:this.queryKey,meta:this.meta};return i(d),D(this,mi,!1),this.options.persister?this.options.persister(c,d,this):c(d)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};i(o),(l=this.options.behavior)==null||l.onFetch(o,this),D(this,Cs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&X(this,un,$n).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const a=c=>{var d,h,m,x;Xc(c)&&c.silent||X(this,un,$n).call(this,{type:"error",error:c}),Xc(c)||((h=(d=T(this,Wt).config).onError)==null||h.call(d,c,this),(x=(m=T(this,Wt).config).onSettled)==null||x.call(m,this.state.data,c,this)),this.scheduleGc()};return D(this,tt,cw({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:c=>{var d,h,m,x;if(c===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(c)}catch(b){a(b);return}(h=(d=T(this,Wt).config).onSuccess)==null||h.call(d,c,this),(x=(m=T(this,Wt).config).onSettled)==null||x.call(m,c,this.state.error,this),this.scheduleGc()},onError:a,onFail:(c,d)=>{X(this,un,$n).call(this,{type:"failed",failureCount:c,error:d})},onPause:()=>{X(this,un,$n).call(this,{type:"pause"})},onContinue:()=>{X(this,un,$n).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),T(this,tt).start()}},Es=new WeakMap,Cs=new WeakMap,Wt=new WeakMap,tt=new WeakMap,ma=new WeakMap,mi=new WeakMap,un=new WeakSet,$n=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...dw(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return Xc(i)&&i.revert&&T(this,Cs)?{...T(this,Cs),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Le.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),T(this,Wt).notify({query:this,type:"updated",action:t})})},Lv);function dw(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:lw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Lk(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?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"}}var Sn,Iv,Ik=(Iv=class extends Qs{constructor(t={}){super();U(this,Sn);this.config=t,D(this,Sn,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??wp(i,n);let o=this.get(s);return o||(o=new Fk({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){T(this,Sn).has(t.queryHash)||(T(this,Sn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=T(this,Sn).get(t.queryHash);n&&(t.destroy(),n===t&&T(this,Sn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Le.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return T(this,Sn).get(t)}getAll(){return[...T(this,Sn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>e0(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>e0(t,r)):n}notify(t){Le.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Le.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Le.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Sn=new WeakMap,Iv),Tn,ot,gi,En,lr,$v,$k=($v=class extends fw{constructor(t){super();U(this,En);U(this,Tn);U(this,ot);U(this,gi);this.mutationId=t.mutationId,D(this,ot,t.mutationCache),D(this,Tn,[]),this.state=t.state||hw(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){T(this,Tn).includes(t)||(T(this,Tn).push(t),this.clearGcTimeout(),T(this,ot).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){D(this,Tn,T(this,Tn).filter(n=>n!==t)),this.scheduleGc(),T(this,ot).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){T(this,Tn).length||(this.state.status==="pending"?this.scheduleGc():T(this,ot).remove(this))}continue(){var t;return((t=T(this,gi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,u,f,c,d,h,m,x,b,p,g,v,E,S,C,k;D(this,gi,cw({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(P,j)=>{X(this,En,lr).call(this,{type:"failed",failureCount:P,error:j})},onPause:()=>{X(this,En,lr).call(this,{type:"pause"})},onContinue:()=>{X(this,En,lr).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>T(this,ot).canRun(this)}));const n=this.state.status==="pending",r=!T(this,gi).canStart();try{if(!n){X(this,En,lr).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(i=T(this,ot).config).onMutate)==null?void 0:s.call(i,t,this));const j=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));j!==this.state.context&&X(this,En,lr).call(this,{type:"pending",context:j,variables:t,isPaused:r})}const P=await T(this,gi).start();return await((u=(l=T(this,ot).config).onSuccess)==null?void 0:u.call(l,P,t,this.state.context,this)),await((c=(f=this.options).onSuccess)==null?void 0:c.call(f,P,t,this.state.context)),await((h=(d=T(this,ot).config).onSettled)==null?void 0:h.call(d,P,null,this.state.variables,this.state.context,this)),await((x=(m=this.options).onSettled)==null?void 0:x.call(m,P,null,t,this.state.context)),X(this,En,lr).call(this,{type:"success",data:P}),P}catch(P){try{throw await((p=(b=T(this,ot).config).onError)==null?void 0:p.call(b,P,t,this.state.context,this)),await((v=(g=this.options).onError)==null?void 0:v.call(g,P,t,this.state.context)),await((S=(E=T(this,ot).config).onSettled)==null?void 0:S.call(E,void 0,P,this.state.variables,this.state.context,this)),await((k=(C=this.options).onSettled)==null?void 0:k.call(C,void 0,P,t,this.state.context)),P}finally{X(this,En,lr).call(this,{type:"error",error:P})}}finally{T(this,ot).runNext(this)}}},Tn=new WeakMap,ot=new WeakMap,gi=new WeakMap,En=new WeakSet,lr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Le.batch(()=>{T(this,Tn).forEach(r=>{r.onMutationUpdate(t)}),T(this,ot).notify({mutation:this,type:"updated",action:t})})},$v);function hw(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ot,ga,Vv,Vk=(Vv=class extends Qs{constructor(t={}){super();U(this,Ot);U(this,ga);this.config=t,D(this,Ot,new Map),D(this,ga,Date.now())}build(t,n,r){const i=new $k({mutationCache:this,mutationId:++Ba(this,ga)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=sl(t),r=T(this,Ot).get(n)??[];r.push(t),T(this,Ot).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=sl(t);if(T(this,Ot).has(n)){const i=(r=T(this,Ot).get(n))==null?void 0:r.filter(s=>s!==t);i&&(i.length===0?T(this,Ot).delete(n):T(this,Ot).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=T(this,Ot).get(sl(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=T(this,Ot).get(sl(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Le.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...T(this,Ot).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>t0(n,r))}findAll(t={}){return this.getAll().filter(n=>t0(t,n))}notify(t){Le.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Le.batch(()=>Promise.all(t.map(n=>n.continue().catch(Kt))))}},Ot=new WeakMap,ga=new WeakMap,Vv);function sl(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function i0(e){return{onFetch:(t,n)=>{var f,c,d,h,m;const r=t.options,i=(d=(c=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:c.fetchMore)==null?void 0:d.direction,s=((h=t.state.data)==null?void 0:h.pages)||[],o=((m=t.state.data)==null?void 0:m.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let x=!1;const b=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(t.signal.aborted?x=!0:t.signal.addEventListener("abort",()=>{x=!0}),t.signal)})},p=aw(t.options,t.fetchOptions),g=async(v,E,S)=>{if(x)return Promise.reject();if(E==null&&v.pages.length)return Promise.resolve(v);const C={queryKey:t.queryKey,pageParam:E,direction:S?"backward":"forward",meta:t.options.meta};b(C);const k=await p(C),{maxPages:P}=t.options,j=S?Ok:Rk;return{pages:j(v.pages,k,P),pageParams:j(v.pageParams,E,P)}};if(i&&s.length){const v=i==="backward",E=v?Bk:s0,S={pages:s,pageParams:o},C=E(r,S);a=await g(S,C,v)}else{const v=e??s.length;do{const E=l===0?o[0]??r.initialPageParam:s0(r,a);if(l>0&&E==null)break;a=await g(a,E),l++}while(l<v)}return a};t.options.persister?t.fetchFn=()=>{var x,b;return(b=(x=t.options).persister)==null?void 0:b.call(x,u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function s0(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Bk(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Ee,yr,vr,ks,_s,xr,Ps,As,Bv,zk=(Bv=class{constructor(e={}){U(this,Ee);U(this,yr);U(this,vr);U(this,ks);U(this,_s);U(this,xr);U(this,Ps);U(this,As);D(this,Ee,e.queryCache||new Ik),D(this,yr,e.mutationCache||new Vk),D(this,vr,e.defaultOptions||{}),D(this,ks,new Map),D(this,_s,new Map),D(this,xr,0)}mount(){Ba(this,xr)._++,T(this,xr)===1&&(D(this,Ps,Sp.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Ee).onFocus())})),D(this,As,du.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Ee).onOnline())})))}unmount(){var e,t;Ba(this,xr)._--,T(this,xr)===0&&((e=T(this,Ps))==null||e.call(this),D(this,Ps,void 0),(t=T(this,As))==null||t.call(this),D(this,As,void 0))}isFetching(e){return T(this,Ee).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return T(this,yr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=T(this,Ee).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=T(this,Ee).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(ws(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return T(this,Ee).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=T(this,Ee).get(r.queryHash),s=i==null?void 0:i.state.data,o=Pk(t,s);if(o!==void 0)return T(this,Ee).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Le.batch(()=>T(this,Ee).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=T(this,Ee).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=T(this,Ee);Le.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=T(this,Ee),r={type:"active",...e};return Le.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Le.batch(()=>T(this,Ee).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Kt).catch(Kt)}invalidateQueries(e,t={}){return Le.batch(()=>{if(T(this,Ee).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none")return Promise.resolve();const n={...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Le.batch(()=>T(this,Ee).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Kt)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Kt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=T(this,Ee).build(this,t);return n.isStaleByTime(ws(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Kt).catch(Kt)}fetchInfiniteQuery(e){return e.behavior=i0(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Kt).catch(Kt)}ensureInfiniteQueryData(e){return e.behavior=i0(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return du.isOnline()?T(this,yr).resumePausedMutations():Promise.resolve()}getQueryCache(){return T(this,Ee)}getMutationCache(){return T(this,yr)}getDefaultOptions(){return T(this,vr)}setDefaultOptions(e){D(this,vr,e)}setQueryDefaults(e,t){T(this,ks).set(Oi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...T(this,ks).values()],n={};return t.forEach(r=>{ta(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){T(this,_s).set(Oi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...T(this,_s).values()];let n={};return t.forEach(r=>{ta(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...T(this,vr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=wp(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===bp&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...T(this,vr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){T(this,Ee).clear(),T(this,yr).clear()}},Ee=new WeakMap,yr=new WeakMap,vr=new WeakMap,ks=new WeakMap,_s=new WeakMap,xr=new WeakMap,Ps=new WeakMap,As=new WeakMap,Bv),yt,ee,ya,at,yi,Rs,wr,Cn,va,Os,js,vi,xi,br,Ns,ae,vo,Cd,kd,_d,Pd,Ad,Rd,Od,pw,zv,Uk=(zv=class extends Qs{constructor(t,n){super();U(this,ae);U(this,yt);U(this,ee);U(this,ya);U(this,at);U(this,yi);U(this,Rs);U(this,wr);U(this,Cn);U(this,va);U(this,Os);U(this,js);U(this,vi);U(this,xi);U(this,br);U(this,Ns,new Set);this.options=n,D(this,yt,t),D(this,Cn,null),D(this,wr,Ed()),this.options.experimental_prefetchInRender||T(this,wr).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(T(this,ee).addObserver(this),o0(T(this,ee),this.options)?X(this,ae,vo).call(this):this.updateResult(),X(this,ae,Pd).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return jd(T(this,ee),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return jd(T(this,ee),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,X(this,ae,Ad).call(this),X(this,ae,Rd).call(this),T(this,ee).removeObserver(this)}setOptions(t,n){const r=this.options,i=T(this,ee);if(this.options=T(this,yt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof hn(this.options.enabled,T(this,ee))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");X(this,ae,Od).call(this),T(this,ee).setOptions(this.options),r._defaulted&&!fu(this.options,r)&&T(this,yt).getQueryCache().notify({type:"observerOptionsUpdated",query:T(this,ee),observer:this});const s=this.hasListeners();s&&a0(T(this,ee),i,this.options,r)&&X(this,ae,vo).call(this),this.updateResult(n),s&&(T(this,ee)!==i||hn(this.options.enabled,T(this,ee))!==hn(r.enabled,T(this,ee))||ws(this.options.staleTime,T(this,ee))!==ws(r.staleTime,T(this,ee)))&&X(this,ae,Cd).call(this);const o=X(this,ae,kd).call(this);s&&(T(this,ee)!==i||hn(this.options.enabled,T(this,ee))!==hn(r.enabled,T(this,ee))||o!==T(this,br))&&X(this,ae,_d).call(this,o)}getOptimisticResult(t){const n=T(this,yt).getQueryCache().build(T(this,yt),t),r=this.createResult(n,t);return Wk(this,r)&&(D(this,at,r),D(this,Rs,this.options),D(this,yi,T(this,ee).state)),r}getCurrentResult(){return T(this,at)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){T(this,Ns).add(t)}getCurrentQuery(){return T(this,ee)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=T(this,yt).defaultQueryOptions(t),r=T(this,yt).getQueryCache().build(T(this,yt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return X(this,ae,vo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),T(this,at)))}createResult(t,n){var P;const r=T(this,ee),i=this.options,s=T(this,at),o=T(this,yi),a=T(this,Rs),u=t!==r?t.state:T(this,ya),{state:f}=t;let c={...f},d=!1,h;if(n._optimisticResults){const j=this.hasListeners(),N=!j&&o0(t,n),I=j&&a0(t,r,n,i);(N||I)&&(c={...c,...dw(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:m,errorUpdatedAt:x,status:b}=c;if(n.select&&c.data!==void 0)if(s&&c.data===(o==null?void 0:o.data)&&n.select===T(this,va))h=T(this,Os);else try{D(this,va,n.select),h=n.select(c.data),h=Td(s==null?void 0:s.data,h,n),D(this,Os,h),D(this,Cn,null)}catch(j){D(this,Cn,j)}else h=c.data;if(n.placeholderData!==void 0&&h===void 0&&b==="pending"){let j;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))j=s.data;else if(j=typeof n.placeholderData=="function"?n.placeholderData((P=T(this,js))==null?void 0:P.state.data,T(this,js)):n.placeholderData,n.select&&j!==void 0)try{j=n.select(j),D(this,Cn,null)}catch(N){D(this,Cn,N)}j!==void 0&&(b="success",h=Td(s==null?void 0:s.data,j,n),d=!0)}T(this,Cn)&&(m=T(this,Cn),h=T(this,Os),x=Date.now(),b="error");const p=c.fetchStatus==="fetching",g=b==="pending",v=b==="error",E=g&&p,S=h!==void 0,k={status:b,fetchStatus:c.fetchStatus,isPending:g,isSuccess:b==="success",isError:v,isInitialLoading:E,isLoading:E,data:h,dataUpdatedAt:c.dataUpdatedAt,error:m,errorUpdatedAt:x,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>u.dataUpdateCount||c.errorUpdateCount>u.errorUpdateCount,isFetching:p,isRefetching:p&&!g,isLoadingError:v&&!S,isPaused:c.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:v&&S,isStale:Tp(t,n),refetch:this.refetch,promise:T(this,wr)};if(this.options.experimental_prefetchInRender){const j=re=>{k.status==="error"?re.reject(k.error):k.data!==void 0&&re.resolve(k.data)},N=()=>{const re=D(this,wr,k.promise=Ed());j(re)},I=T(this,wr);switch(I.status){case"pending":t.queryHash===r.queryHash&&j(I);break;case"fulfilled":(k.status==="error"||k.data!==I.value)&&N();break;case"rejected":(k.status!=="error"||k.error!==I.reason)&&N();break}}return k}updateResult(t){const n=T(this,at),r=this.createResult(T(this,ee),this.options);if(D(this,yi,T(this,ee).state),D(this,Rs,this.options),T(this,yi).data!==void 0&&D(this,js,T(this,ee)),fu(r,n))return;D(this,at,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!T(this,Ns).size)return!0;const l=new Set(a??T(this,Ns));return this.options.throwOnError&&l.add("error"),Object.keys(T(this,at)).some(u=>{const f=u;return T(this,at)[f]!==n[f]&&l.has(f)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),X(this,ae,pw).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&X(this,ae,Pd).call(this)}},yt=new WeakMap,ee=new WeakMap,ya=new WeakMap,at=new WeakMap,yi=new WeakMap,Rs=new WeakMap,wr=new WeakMap,Cn=new WeakMap,va=new WeakMap,Os=new WeakMap,js=new WeakMap,vi=new WeakMap,xi=new WeakMap,br=new WeakMap,Ns=new WeakMap,ae=new WeakSet,vo=function(t){X(this,ae,Od).call(this);let n=T(this,ee).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Kt)),n},Cd=function(){X(this,ae,Ad).call(this);const t=ws(this.options.staleTime,T(this,ee));if(Ri||T(this,at).isStale||!bd(t))return;const r=sw(T(this,at).dataUpdatedAt,t)+1;D(this,vi,setTimeout(()=>{T(this,at).isStale||this.updateResult()},r))},kd=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(T(this,ee)):this.options.refetchInterval)??!1},_d=function(t){X(this,ae,Rd).call(this),D(this,br,t),!(Ri||hn(this.options.enabled,T(this,ee))===!1||!bd(T(this,br))||T(this,br)===0)&&D(this,xi,setInterval(()=>{(this.options.refetchIntervalInBackground||Sp.isFocused())&&X(this,ae,vo).call(this)},T(this,br)))},Pd=function(){X(this,ae,Cd).call(this),X(this,ae,_d).call(this,X(this,ae,kd).call(this))},Ad=function(){T(this,vi)&&(clearTimeout(T(this,vi)),D(this,vi,void 0))},Rd=function(){T(this,xi)&&(clearInterval(T(this,xi)),D(this,xi,void 0))},Od=function(){const t=T(this,yt).getQueryCache().build(T(this,yt),this.options);if(t===T(this,ee))return;const n=T(this,ee);D(this,ee,t),D(this,ya,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},pw=function(t){Le.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(T(this,at))}),T(this,yt).getQueryCache().notify({query:T(this,ee),type:"observerResultsUpdated"})})},zv);function Hk(e,t){return hn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function o0(e,t){return Hk(e,t)||e.state.data!==void 0&&jd(e,t,t.refetchOnMount)}function jd(e,t,n){if(hn(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Tp(e,t)}return!1}function a0(e,t,n,r){return(e!==t||hn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Tp(e,n)}function Tp(e,t){return hn(t.enabled,e)!==!1&&e.isStaleByTime(ws(t.staleTime,e))}function Wk(e,t){return!fu(e.getCurrentResult(),t)}var Sr,Tr,vt,Un,Qn,Al,Nd,Uv,Kk=(Uv=class extends Qs{constructor(t,n){super();U(this,Qn);U(this,Sr);U(this,Tr);U(this,vt);U(this,Un);D(this,Sr,t),this.setOptions(n),this.bindMethods(),X(this,Qn,Al).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const n=this.options;this.options=T(this,Sr).defaultMutationOptions(t),fu(this.options,n)||T(this,Sr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:T(this,vt),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Oi(n.mutationKey)!==Oi(this.options.mutationKey)?this.reset():((r=T(this,vt))==null?void 0:r.state.status)==="pending"&&T(this,vt).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=T(this,vt))==null||t.removeObserver(this)}onMutationUpdate(t){X(this,Qn,Al).call(this),X(this,Qn,Nd).call(this,t)}getCurrentResult(){return T(this,Tr)}reset(){var t;(t=T(this,vt))==null||t.removeObserver(this),D(this,vt,void 0),X(this,Qn,Al).call(this),X(this,Qn,Nd).call(this)}mutate(t,n){var r;return D(this,Un,n),(r=T(this,vt))==null||r.removeObserver(this),D(this,vt,T(this,Sr).getMutationCache().build(T(this,Sr),this.options)),T(this,vt).addObserver(this),T(this,vt).execute(t)}},Sr=new WeakMap,Tr=new WeakMap,vt=new WeakMap,Un=new WeakMap,Qn=new WeakSet,Al=function(){var n;const t=((n=T(this,vt))==null?void 0:n.state)??hw();D(this,Tr,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Nd=function(t){Le.batch(()=>{var n,r,i,s,o,a,l,u;if(T(this,Un)&&this.hasListeners()){const f=T(this,Tr).variables,c=T(this,Tr).context;(t==null?void 0:t.type)==="success"?((r=(n=T(this,Un)).onSuccess)==null||r.call(n,t.data,f,c),(s=(i=T(this,Un)).onSettled)==null||s.call(i,t.data,null,f,c)):(t==null?void 0:t.type)==="error"&&((a=(o=T(this,Un)).onError)==null||a.call(o,t.error,f,c),(u=(l=T(this,Un)).onSettled)==null||u.call(l,void 0,t.error,f,c))}this.listeners.forEach(f=>{f(T(this,Tr))})})},Uv),mw=y.createContext(void 0),gw=e=>{const t=y.useContext(mw);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},qk=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),w.jsx(mw.Provider,{value:e,children:t})),yw=y.createContext(!1),Gk=()=>y.useContext(yw);yw.Provider;function Qk(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Yk=y.createContext(Qk()),Xk=()=>y.useContext(Yk);function vw(e,t){return typeof e=="function"?e(...t):!!e}function Md(){}var Zk=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Jk=e=>{y.useEffect(()=>{e.clearReset()},[e])},e_=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&vw(n,[e.error,r]),t_=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},n_=(e,t)=>e.isLoading&&e.isFetching&&!t,r_=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,l0=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function i_(e,t,n){var f,c,d,h,m;const r=gw(),i=Gk(),s=Xk(),o=r.defaultQueryOptions(e);(c=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||c.call(f,o),o._optimisticResults=i?"isRestoring":"optimistic",t_(o),Zk(o,s),Jk(s);const a=!r.getQueryCache().get(o.queryHash),[l]=y.useState(()=>new t(r,o)),u=l.getOptimisticResult(o);if(y.useSyncExternalStore(y.useCallback(x=>{const b=i?Md:l.subscribe(Le.batchCalls(x));return l.updateResult(),b},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),y.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),r_(o,u))throw l0(o,l,s);if(e_({result:u,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw u.error;if((h=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_afterQuery)==null||h.call(d,o,u),o.experimental_prefetchInRender&&!Ri&&n_(u,i)){const x=a?l0(o,l,s):(m=r.getQueryCache().get(o.queryHash))==null?void 0:m.promise;x==null||x.catch(Md).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?u:l.trackResult(u)}function s_(e,t){return i_(e,Uk)}function xw(e,t){const n=gw(),[r]=y.useState(()=>new Kk(n,e));y.useEffect(()=>{r.setOptions(e)},[r,e]);const i=y.useSyncExternalStore(y.useCallback(o=>r.subscribe(Le.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=y.useCallback((o,a)=>{r.mutate(o,a).catch(Md)},[r]);if(i.error&&vw(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const o_=e=>s_({queryKey:["widgets",e],queryFn:()=>a_(e)}),a_=e=>Ea(`widgets/with-link/${e}`);var K=(e=>(e.Border="widget_border",e.Background="widget_background",e.InputBackground="widget_input_background",e.InputText="widget_input_text",e.InputBorder="widget_input_border",e.ButtonBackground="widget_button_background",e.ButtonText="widget_button_text",e.TooltipBackground="widget_tooltip_background",e.TooltipText="widget_tooltip_text",e.TooltipBorder="widget_tooltip_border",e.HeaderBackground="widget_header_background",e.HeaderText="widget_header_text",e.HeaderBorder="widget_header_border",e.FooterBackground="widget_footer_background",e.FooterText="widget_footer_text",e.FooterBorder="widget_footer_border",e.MessageAdminBackground="widget_message_admin_background",e.MessageAdminText="widget_message_admin_text",e.MessageVisitorBackground="widget_message_visitor_background",e.MessageVisitorText="widget_message_visitor_text",e.GreeterTopBackground="widget_greeter_top_background",e.GreeterTopText="widget_greeter_top_text",e.GreeterBackground="widget_greeter_background",e.GreeterText="widget_greeter_text",e.GreeterBorder="widget_greeter_border",e.GreeterButtonBackground="widget_greeter_button_background",e.GreeterButtonText="widget_greeter_button_text",e))(K||{});function l_(e){return!!e&&typeof e.public_id=="string"&&typeof e.link_id=="string"&&typeof e.name=="string"&&typeof e.is_browser_notification_enabled=="boolean"&&typeof e.is_hidden_on_offline=="boolean"&&typeof e.is_upload_disabled=="boolean"}/**
40
+ `+s.stack}return{value:e,source:t,stack:i,digest:null}}function Gc(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ud(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var UC=typeof WeakMap=="function"?WeakMap:Map;function Ox(e,t,n){n=qn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){lu||(lu=!0,xd=r),ud(e,t)},n}function jx(e,t,n){n=qn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ud(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){ud(e,t),typeof r!="function"&&(Nr===null?Nr=new Set([this]):Nr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Lg(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new UC;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=rk.bind(null,e,t,n),t.then(e,e))}function Ig(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function $g(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=qn(-1,1),t.tag=2,jr(n,t,1))),n.lanes|=1),e)}var HC=tr.ReactCurrentOwner,St=!1;function lt(e,t,n,r){t.child=e===null?ax(t,null,n,r):Is(t,e.child,n,r)}function Vg(e,t,n,r,i){n=n.render;var s=t.ref;return xs(t,i),r=sp(e,t,n,r,s,i),n=op(),e!==null&&!St?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Jn(e,t,i)):(ve&&n&&qh(t),t.flags|=1,lt(e,t,r,i),t.child)}function Bg(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!gp(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Nx(e,t,s,r,i)):(e=Al(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:Ko,n(o,r)&&e.ref===t.ref)return Jn(e,t,i)}return t.flags|=1,e=Dr(s,r),e.ref=t.ref,e.return=t,t.child=e}function Nx(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Ko(s,r)&&e.ref===t.ref)if(St=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(St=!0);else return t.lanes=e.lanes,Jn(e,t,i)}return cd(e,t,n,r,i)}function Mx(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},de(ls,jt),jt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,de(ls,jt),jt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,de(ls,jt),jt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,de(ls,jt),jt|=r;return lt(e,t,i,n),t.child}function Dx(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function cd(e,t,n,r,i){var s=Et(n)?ki:st.current;return s=Fs(t,s),xs(t,i),n=sp(e,t,n,r,s,i),r=op(),e!==null&&!St?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Jn(e,t,i)):(ve&&r&&qh(t),t.flags|=1,lt(e,t,n,i),t.child)}function zg(e,t,n,r,i){if(Et(n)){var s=!0;Zl(t)}else s=!1;if(xs(t,i),t.stateNode===null)kl(e,t),Rx(t,n,r),ld(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=Jt(u):(u=Et(n)?ki:st.current,u=Fs(t,u));var f=n.getDerivedStateFromProps,c=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function";c||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&Fg(t,o,r,u),fr=!1;var d=t.memoizedState;o.state=d,ru(t,r,o,i),l=t.memoizedState,a!==r||d!==l||Tt.current||fr?(typeof f=="function"&&(ad(t,n,f,r),l=t.memoizedState),(a=fr||Dg(t,n,a,r,d,l,u))?(c||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,ux(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:ln(t.type,a),o.props=u,c=t.pendingProps,d=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Jt(l):(l=Et(n)?ki:st.current,l=Fs(t,l));var h=n.getDerivedStateFromProps;(f=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==c||d!==l)&&Fg(t,o,r,l),fr=!1,d=t.memoizedState,o.state=d,ru(t,r,o,i);var m=t.memoizedState;a!==c||d!==m||Tt.current||fr?(typeof h=="function"&&(ad(t,n,h,r),m=t.memoizedState),(u=fr||Dg(t,n,u,r,d,m,l)||!1)?(f||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,m,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,m,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=l,r=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return fd(e,t,n,r,s,i)}function fd(e,t,n,r,i,s){Dx(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&_g(t,n,!1),Jn(e,t,s);r=t.stateNode,HC.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Is(t,e.child,null,s),t.child=Is(t,null,a,s)):lt(e,t,a,s),t.memoizedState=r.state,i&&_g(t,n,!0),t.child}function Fx(e){var t=e.stateNode;t.pendingContext?kg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&kg(e,t.context,!1),tp(e,t.containerInfo)}function Ug(e,t,n,r,i){return Ls(),Qh(i),t.flags|=256,lt(e,t,n,r),t.child}var dd={dehydrated:null,treeContext:null,retryLane:0};function hd(e){return{baseLanes:e,cachePool:null,transitions:null}}function Lx(e,t,n){var r=t.pendingProps,i=we.current,s=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),de(we,i&1),e===null)return sd(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,s?(r=t.mode,s=t.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=Iu(o,r,0,null),e=bi(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=hd(n),t.memoizedState=dd,e):up(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return WC(e,t,o,r,a,i,n);if(s){s=r.fallback,o=t.mode,i=e.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Dr(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Dr(a,s):(s=bi(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?hd(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=dd,r}return s=e.child,e=s.sibling,r=Dr(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function up(e,t){return t=Iu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function nl(e,t,n,r){return r!==null&&Qh(r),Is(t,e.child,null,n),e=up(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function WC(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=Gc(Error(A(422))),nl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Iu({mode:"visible",children:r.children},i,0,null),s=bi(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Is(t,e.child,null,o),t.child.memoizedState=hd(o),t.memoizedState=dd,s);if(!(t.mode&1))return nl(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(A(419)),r=Gc(s,r,void 0),nl(e,t,o,r)}if(a=(o&e.childLanes)!==0,St||a){if(r=He,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Zn(e,i),mn(r,e,i,-1))}return mp(),r=Gc(Error(A(421))),nl(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=ik.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Nt=Or(i.nextSibling),Ft=t,ve=!0,dn=null,e!==null&&(qt[Gt++]=Hn,qt[Gt++]=Wn,qt[Gt++]=_i,Hn=e.id,Wn=e.overflow,_i=t),t=up(t,r.children),t.flags|=4096,t)}function Hg(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),od(e.return,t,n)}function Qc(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function Ix(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(lt(e,t,r.children,n),r=we.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Hg(e,n,t);else if(e.tag===19)Hg(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(de(we,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&iu(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Qc(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&iu(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Qc(t,!0,n,null,s);break;case"together":Qc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function kl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Jn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ai|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(A(153));if(t.child!==null){for(e=t.child,n=Dr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Dr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function KC(e,t,n){switch(t.tag){case 3:Fx(t),Ls();break;case 5:cx(t);break;case 1:Et(t.type)&&Zl(t);break;case 4:tp(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;de(tu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(de(we,we.current&1),t.flags|=128,null):n&t.child.childLanes?Lx(e,t,n):(de(we,we.current&1),e=Jn(e,t,n),e!==null?e.sibling:null);de(we,we.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Ix(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),de(we,we.current),r)break;return null;case 22:case 23:return t.lanes=0,Mx(e,t,n)}return Jn(e,t,n)}var $x,pd,Vx,Bx;$x=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};pd=function(){};Vx=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,li(Pn.current);var s=null;switch(n){case"input":i=Ff(e,i),r=Ff(e,r),s=[];break;case"select":i=Te({},i,{value:void 0}),r=Te({},r,{value:void 0}),s=[];break;case"textarea":i=$f(e,i),r=$f(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Yl)}Bf(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&($o.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var l=r[u];if(a=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&($o.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&pe("scroll",e),s||a===l||(s=[])):(s=s||[]).push(u,l))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};Bx=function(e,t,n,r){n!==r&&(t.flags|=4)};function uo(e,t){if(!ve)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Je(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function qC(e,t,n){var r=t.pendingProps;switch(Gh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Je(t),null;case 1:return Et(t.type)&&Xl(),Je(t),null;case 3:return r=t.stateNode,$s(),ge(Tt),ge(st),rp(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(el(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,dn!==null&&(Sd(dn),dn=null))),pd(e,t),Je(t),null;case 5:np(t);var i=li(Xo.current);if(n=t.type,e!==null&&t.stateNode!=null)Vx(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(A(166));return Je(t),null}if(e=li(Pn.current),el(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[kn]=t,r[Qo]=s,e=(t.mode&1)!==0,n){case"dialog":pe("cancel",r),pe("close",r);break;case"iframe":case"object":case"embed":pe("load",r);break;case"video":case"audio":for(i=0;i<vo.length;i++)pe(vo[i],r);break;case"source":pe("error",r);break;case"img":case"image":case"link":pe("error",r),pe("load",r);break;case"details":pe("toggle",r);break;case"input":Jm(r,s),pe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},pe("invalid",r);break;case"textarea":tg(r,s),pe("invalid",r)}Bf(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&Ja(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Ja(r.textContent,a,e),i=["children",""+a]):$o.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&pe("scroll",r)}switch(n){case"input":Wa(r),eg(r,s,!0);break;case"textarea":Wa(r),ng(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Yl)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=m1(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[kn]=t,e[Qo]=r,$x(e,t,!1,!1),t.stateNode=e;e:{switch(o=zf(n,r),n){case"dialog":pe("cancel",e),pe("close",e),i=r;break;case"iframe":case"object":case"embed":pe("load",e),i=r;break;case"video":case"audio":for(i=0;i<vo.length;i++)pe(vo[i],e);i=r;break;case"source":pe("error",e),i=r;break;case"img":case"image":case"link":pe("error",e),pe("load",e),i=r;break;case"details":pe("toggle",e),i=r;break;case"input":Jm(e,r),i=Ff(e,r),pe("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Te({},r,{value:void 0}),pe("invalid",e);break;case"textarea":tg(e,r),i=$f(e,r),pe("invalid",e);break;default:i=r}Bf(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?v1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&g1(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Vo(e,l):typeof l=="number"&&Vo(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&($o.hasOwnProperty(s)?l!=null&&s==="onScroll"&&pe("scroll",e):l!=null&&Nh(e,s,l,o))}switch(n){case"input":Wa(e),eg(e,r,!1);break;case"textarea":Wa(e),ng(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Vr(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?ms(e,!!r.multiple,s,!1):r.defaultValue!=null&&ms(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Yl)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Je(t),null;case 6:if(e&&t.stateNode!=null)Bx(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(A(166));if(n=li(Xo.current),li(Pn.current),el(t)){if(r=t.stateNode,n=t.memoizedProps,r[kn]=t,(s=r.nodeValue!==n)&&(e=Ft,e!==null))switch(e.tag){case 3:Ja(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ja(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[kn]=t,t.stateNode=r}return Je(t),null;case 13:if(ge(we),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ve&&Nt!==null&&t.mode&1&&!(t.flags&128))sx(),Ls(),t.flags|=98560,s=!1;else if(s=el(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(A(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(A(317));s[kn]=t}else Ls(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Je(t),s=!1}else dn!==null&&(Sd(dn),dn=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||we.current&1?Ie===0&&(Ie=3):mp())),t.updateQueue!==null&&(t.flags|=4),Je(t),null);case 4:return $s(),pd(e,t),e===null&&qo(t.stateNode.containerInfo),Je(t),null;case 10:return Zh(t.type._context),Je(t),null;case 17:return Et(t.type)&&Xl(),Je(t),null;case 19:if(ge(we),s=t.memoizedState,s===null)return Je(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)uo(s,!1);else{if(Ie!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=iu(e),o!==null){for(t.flags|=128,uo(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return de(we,we.current&1|2),t.child}e=e.sibling}s.tail!==null&&Ae()>Bs&&(t.flags|=128,r=!0,uo(s,!1),t.lanes=4194304)}else{if(!r)if(e=iu(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),uo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!ve)return Je(t),null}else 2*Ae()-s.renderingStartTime>Bs&&n!==1073741824&&(t.flags|=128,r=!0,uo(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ae(),t.sibling=null,n=we.current,de(we,r?n&1|2:n&1),t):(Je(t),null);case 22:case 23:return pp(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?jt&1073741824&&(Je(t),t.subtreeFlags&6&&(t.flags|=8192)):Je(t),null;case 24:return null;case 25:return null}throw Error(A(156,t.tag))}function GC(e,t){switch(Gh(t),t.tag){case 1:return Et(t.type)&&Xl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $s(),ge(Tt),ge(st),rp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return np(t),null;case 13:if(ge(we),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(A(340));Ls()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ge(we),null;case 4:return $s(),null;case 10:return Zh(t.type._context),null;case 22:case 23:return pp(),null;case 24:return null;default:return null}}var rl=!1,rt=!1,QC=typeof WeakSet=="function"?WeakSet:Set,F=null;function as(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ke(e,t,r)}else n.current=null}function md(e,t,n){try{n()}catch(r){ke(e,t,r)}}var Wg=!1;function YC(e,t){if(Zf=ql,e=K1(),Kh(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,f=0,c=e,d=null;t:for(;;){for(var h;c!==n||i!==0&&c.nodeType!==3||(a=o+i),c!==s||r!==0&&c.nodeType!==3||(l=o+r),c.nodeType===3&&(o+=c.nodeValue.length),(h=c.firstChild)!==null;)d=c,c=h;for(;;){if(c===e)break t;if(d===n&&++u===i&&(a=o),d===s&&++f===r&&(l=o),(h=c.nextSibling)!==null)break;c=d,d=c.parentNode}c=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Jf={focusedElem:e,selectionRange:n},ql=!1,F=t;F!==null;)if(t=F,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,F=e;else for(;F!==null;){t=F;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var v=m.memoizedProps,b=m.memoizedState,p=t.stateNode,g=p.getSnapshotBeforeUpdate(t.elementType===t.type?v:ln(t.type,v),b);p.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(A(163))}}catch(E){ke(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,F=e;break}F=t.return}return m=Wg,Wg=!1,m}function Ao(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&md(t,n,s)}i=i.next}while(i!==r)}}function Fu(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function gd(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function zx(e){var t=e.alternate;t!==null&&(e.alternate=null,zx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[kn],delete t[Qo],delete t[nd],delete t[jC],delete t[NC])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ux(e){return e.tag===5||e.tag===3||e.tag===4}function Kg(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ux(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function yd(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Yl));else if(r!==4&&(e=e.child,e!==null))for(yd(e,t,n),e=e.sibling;e!==null;)yd(e,t,n),e=e.sibling}function vd(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(vd(e,t,n),e=e.sibling;e!==null;)vd(e,t,n),e=e.sibling}var qe=null,cn=!1;function ar(e,t,n){for(n=n.child;n!==null;)Hx(e,t,n),n=n.sibling}function Hx(e,t,n){if(_n&&typeof _n.onCommitFiberUnmount=="function")try{_n.onCommitFiberUnmount(Pu,n)}catch{}switch(n.tag){case 5:rt||as(n,t);case 6:var r=qe,i=cn;qe=null,ar(e,t,n),qe=r,cn=i,qe!==null&&(cn?(e=qe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):qe.removeChild(n.stateNode));break;case 18:qe!==null&&(cn?(e=qe,n=n.stateNode,e.nodeType===8?zc(e.parentNode,n):e.nodeType===1&&zc(e,n),Ho(e)):zc(qe,n.stateNode));break;case 4:r=qe,i=cn,qe=n.stateNode.containerInfo,cn=!0,ar(e,t,n),qe=r,cn=i;break;case 0:case 11:case 14:case 15:if(!rt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&md(n,t,o),i=i.next}while(i!==r)}ar(e,t,n);break;case 1:if(!rt&&(as(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ke(n,t,a)}ar(e,t,n);break;case 21:ar(e,t,n);break;case 22:n.mode&1?(rt=(r=rt)||n.memoizedState!==null,ar(e,t,n),rt=r):ar(e,t,n);break;default:ar(e,t,n)}}function qg(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new QC),t.forEach(function(r){var i=sk.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function sn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:qe=a.stateNode,cn=!1;break e;case 3:qe=a.stateNode.containerInfo,cn=!0;break e;case 4:qe=a.stateNode.containerInfo,cn=!0;break e}a=a.return}if(qe===null)throw Error(A(160));Hx(s,o,i),qe=null,cn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){ke(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Wx(t,e),t=t.sibling}function Wx(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(sn(t,e),vn(e),r&4){try{Ao(3,e,e.return),Fu(3,e)}catch(v){ke(e,e.return,v)}try{Ao(5,e,e.return)}catch(v){ke(e,e.return,v)}}break;case 1:sn(t,e),vn(e),r&512&&n!==null&&as(n,n.return);break;case 5:if(sn(t,e),vn(e),r&512&&n!==null&&as(n,n.return),e.flags&32){var i=e.stateNode;try{Vo(i,"")}catch(v){ke(e,e.return,v)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,o=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&h1(i,s),zf(a,o);var u=zf(a,s);for(o=0;o<l.length;o+=2){var f=l[o],c=l[o+1];f==="style"?v1(i,c):f==="dangerouslySetInnerHTML"?g1(i,c):f==="children"?Vo(i,c):Nh(i,f,c,u)}switch(a){case"input":Lf(i,s);break;case"textarea":p1(i,s);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?ms(i,!!s.multiple,h,!1):d!==!!s.multiple&&(s.defaultValue!=null?ms(i,!!s.multiple,s.defaultValue,!0):ms(i,!!s.multiple,s.multiple?[]:"",!1))}i[Qo]=s}catch(v){ke(e,e.return,v)}}break;case 6:if(sn(t,e),vn(e),r&4){if(e.stateNode===null)throw Error(A(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(v){ke(e,e.return,v)}}break;case 3:if(sn(t,e),vn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ho(t.containerInfo)}catch(v){ke(e,e.return,v)}break;case 4:sn(t,e),vn(e);break;case 13:sn(t,e),vn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(dp=Ae())),r&4&&qg(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(rt=(u=rt)||f,sn(t,e),rt=u):sn(t,e),vn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!f&&e.mode&1)for(F=e,f=e.child;f!==null;){for(c=F=f;F!==null;){switch(d=F,h=d.child,d.tag){case 0:case 11:case 14:case 15:Ao(4,d,d.return);break;case 1:as(d,d.return);var m=d.stateNode;if(typeof m.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(v){ke(r,n,v)}}break;case 5:as(d,d.return);break;case 22:if(d.memoizedState!==null){Qg(c);continue}}h!==null?(h.return=d,F=h):Qg(c)}f=f.sibling}e:for(f=null,c=e;;){if(c.tag===5){if(f===null){f=c;try{i=c.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=c.stateNode,l=c.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=y1("display",o))}catch(v){ke(e,e.return,v)}}}else if(c.tag===6){if(f===null)try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(v){ke(e,e.return,v)}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===e)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===e)break e;for(;c.sibling===null;){if(c.return===null||c.return===e)break e;f===c&&(f=null),c=c.return}f===c&&(f=null),c.sibling.return=c.return,c=c.sibling}}break;case 19:sn(t,e),vn(e),r&4&&qg(e);break;case 21:break;default:sn(t,e),vn(e)}}function vn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Ux(n)){var r=n;break e}n=n.return}throw Error(A(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Vo(i,""),r.flags&=-33);var s=Kg(e);vd(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Kg(e);yd(e,a,o);break;default:throw Error(A(161))}}catch(l){ke(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function XC(e,t,n){F=e,Kx(e)}function Kx(e,t,n){for(var r=(e.mode&1)!==0;F!==null;){var i=F,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||rl;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||rt;a=rl;var u=rt;if(rl=o,(rt=l)&&!u)for(F=i;F!==null;)o=F,l=o.child,o.tag===22&&o.memoizedState!==null?Yg(i):l!==null?(l.return=o,F=l):Yg(i);for(;s!==null;)F=s,Kx(s),s=s.sibling;F=i,rl=a,rt=u}Gg(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,F=s):Gg(e)}}function Gg(e){for(;F!==null;){var t=F;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:rt||Fu(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!rt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ln(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&jg(t,s,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}jg(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var f=u.memoizedState;if(f!==null){var c=f.dehydrated;c!==null&&Ho(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(A(163))}rt||t.flags&512&&gd(t)}catch(d){ke(t,t.return,d)}}if(t===e){F=null;break}if(n=t.sibling,n!==null){n.return=t.return,F=n;break}F=t.return}}function Qg(e){for(;F!==null;){var t=F;if(t===e){F=null;break}var n=t.sibling;if(n!==null){n.return=t.return,F=n;break}F=t.return}}function Yg(e){for(;F!==null;){var t=F;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Fu(4,t)}catch(l){ke(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){ke(t,i,l)}}var s=t.return;try{gd(t)}catch(l){ke(t,s,l)}break;case 5:var o=t.return;try{gd(t)}catch(l){ke(t,o,l)}}}catch(l){ke(t,t.return,l)}if(t===e){F=null;break}var a=t.sibling;if(a!==null){a.return=t.return,F=a;break}F=t.return}}var ZC=Math.ceil,au=tr.ReactCurrentDispatcher,cp=tr.ReactCurrentOwner,Xt=tr.ReactCurrentBatchConfig,se=0,He=null,je=null,Qe=0,jt=0,ls=Kr(0),Ie=0,ta=null,Ai=0,Lu=0,fp=0,Ro=null,wt=null,dp=0,Bs=1/0,Vn=null,lu=!1,xd=null,Nr=null,il=!1,Cr=null,uu=0,Oo=0,wd=null,_l=-1,Pl=0;function ft(){return se&6?Ae():_l!==-1?_l:_l=Ae()}function Mr(e){return e.mode&1?se&2&&Qe!==0?Qe&-Qe:DC.transition!==null?(Pl===0&&(Pl=R1()),Pl):(e=le,e!==0||(e=window.event,e=e===void 0?16:L1(e.type)),e):1}function mn(e,t,n,r){if(50<Oo)throw Oo=0,wd=null,Error(A(185));ba(e,n,r),(!(se&2)||e!==He)&&(e===He&&(!(se&2)&&(Lu|=n),Ie===4&&pr(e,Qe)),Ct(e,r),n===1&&se===0&&!(t.mode&1)&&(Bs=Ae()+500,Nu&&qr()))}function Ct(e,t){var n=e.callbackNode;DE(e,t);var r=Kl(e,e===He?Qe:0);if(r===0)n!==null&&sg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&sg(n),t===1)e.tag===0?MC(Xg.bind(null,e)):nx(Xg.bind(null,e)),RC(function(){!(se&6)&&qr()}),n=null;else{switch(O1(r)){case 1:n=Ih;break;case 4:n=P1;break;case 16:n=Wl;break;case 536870912:n=A1;break;default:n=Wl}n=ew(n,qx.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function qx(e,t){if(_l=-1,Pl=0,se&6)throw Error(A(327));var n=e.callbackNode;if(ws()&&e.callbackNode!==n)return null;var r=Kl(e,e===He?Qe:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=cu(e,r);else{t=r;var i=se;se|=2;var s=Qx();(He!==e||Qe!==t)&&(Vn=null,Bs=Ae()+500,wi(e,t));do try{tk();break}catch(a){Gx(e,a)}while(!0);Xh(),au.current=s,se=i,je!==null?t=0:(He=null,Qe=0,t=Ie)}if(t!==0){if(t===2&&(i=qf(e),i!==0&&(r=i,t=bd(e,i))),t===1)throw n=ta,wi(e,0),pr(e,r),Ct(e,Ae()),n;if(t===6)pr(e,r);else{if(i=e.current.alternate,!(r&30)&&!JC(i)&&(t=cu(e,r),t===2&&(s=qf(e),s!==0&&(r=s,t=bd(e,s))),t===1))throw n=ta,wi(e,0),pr(e,r),Ct(e,Ae()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(A(345));case 2:ti(e,wt,Vn);break;case 3:if(pr(e,r),(r&130023424)===r&&(t=dp+500-Ae(),10<t)){if(Kl(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){ft(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=td(ti.bind(null,e,wt,Vn),t);break}ti(e,wt,Vn);break;case 4:if(pr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-pn(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=Ae()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ZC(r/1960))-r,10<r){e.timeoutHandle=td(ti.bind(null,e,wt,Vn),r);break}ti(e,wt,Vn);break;case 5:ti(e,wt,Vn);break;default:throw Error(A(329))}}}return Ct(e,Ae()),e.callbackNode===n?qx.bind(null,e):null}function bd(e,t){var n=Ro;return e.current.memoizedState.isDehydrated&&(wi(e,t).flags|=256),e=cu(e,t),e!==2&&(t=wt,wt=n,t!==null&&Sd(t)),e}function Sd(e){wt===null?wt=e:wt.push.apply(wt,e)}function JC(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!gn(s(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function pr(e,t){for(t&=~fp,t&=~Lu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-pn(t),r=1<<n;e[n]=-1,t&=~r}}function Xg(e){if(se&6)throw Error(A(327));ws();var t=Kl(e,0);if(!(t&1))return Ct(e,Ae()),null;var n=cu(e,t);if(e.tag!==0&&n===2){var r=qf(e);r!==0&&(t=r,n=bd(e,r))}if(n===1)throw n=ta,wi(e,0),pr(e,t),Ct(e,Ae()),n;if(n===6)throw Error(A(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ti(e,wt,Vn),Ct(e,Ae()),null}function hp(e,t){var n=se;se|=1;try{return e(t)}finally{se=n,se===0&&(Bs=Ae()+500,Nu&&qr())}}function Ri(e){Cr!==null&&Cr.tag===0&&!(se&6)&&ws();var t=se;se|=1;var n=Xt.transition,r=le;try{if(Xt.transition=null,le=1,e)return e()}finally{le=r,Xt.transition=n,se=t,!(se&6)&&qr()}}function pp(){jt=ls.current,ge(ls)}function wi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,AC(n)),je!==null)for(n=je.return;n!==null;){var r=n;switch(Gh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Xl();break;case 3:$s(),ge(Tt),ge(st),rp();break;case 5:np(r);break;case 4:$s();break;case 13:ge(we);break;case 19:ge(we);break;case 10:Zh(r.type._context);break;case 22:case 23:pp()}n=n.return}if(He=e,je=e=Dr(e.current,null),Qe=jt=t,Ie=0,ta=null,fp=Lu=Ai=0,wt=Ro=null,ai!==null){for(t=0;t<ai.length;t++)if(n=ai[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}ai=null}return e}function Gx(e,t){do{var n=je;try{if(Xh(),El.current=ou,su){for(var r=Se.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}su=!1}if(Pi=0,Ue=Fe=Se=null,Po=!1,Zo=0,cp.current=null,n===null||n.return===null){Ie=1,ta=t,je=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=Qe,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,f=a,c=f.tag;if(!(f.mode&1)&&(c===0||c===11||c===15)){var d=f.alternate;d?(f.updateQueue=d.updateQueue,f.memoizedState=d.memoizedState,f.lanes=d.lanes):(f.updateQueue=null,f.memoizedState=null)}var h=Ig(o);if(h!==null){h.flags&=-257,$g(h,o,a,s,t),h.mode&1&&Lg(s,u,t),t=h,l=u;var m=t.updateQueue;if(m===null){var v=new Set;v.add(l),t.updateQueue=v}else m.add(l);break e}else{if(!(t&1)){Lg(s,u,t),mp();break e}l=Error(A(426))}}else if(ve&&a.mode&1){var b=Ig(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),$g(b,o,a,s,t),Qh(Vs(l,a));break e}}s=l=Vs(l,a),Ie!==4&&(Ie=2),Ro===null?Ro=[s]:Ro.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var p=Ox(s,l,t);Og(s,p);break e;case 1:a=l;var g=s.type,x=s.stateNode;if(!(s.flags&128)&&(typeof g.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Nr===null||!Nr.has(x)))){s.flags|=65536,t&=-t,s.lanes|=t;var E=jx(s,a,t);Og(s,E);break e}}s=s.return}while(s!==null)}Xx(n)}catch(S){t=S,je===n&&n!==null&&(je=n=n.return);continue}break}while(!0)}function Qx(){var e=au.current;return au.current=ou,e===null?ou:e}function mp(){(Ie===0||Ie===3||Ie===2)&&(Ie=4),He===null||!(Ai&268435455)&&!(Lu&268435455)||pr(He,Qe)}function cu(e,t){var n=se;se|=2;var r=Qx();(He!==e||Qe!==t)&&(Vn=null,wi(e,t));do try{ek();break}catch(i){Gx(e,i)}while(!0);if(Xh(),se=n,au.current=r,je!==null)throw Error(A(261));return He=null,Qe=0,Ie}function ek(){for(;je!==null;)Yx(je)}function tk(){for(;je!==null&&!kE();)Yx(je)}function Yx(e){var t=Jx(e.alternate,e,jt);e.memoizedProps=e.pendingProps,t===null?Xx(e):je=t,cp.current=null}function Xx(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=GC(n,t),n!==null){n.flags&=32767,je=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ie=6,je=null;return}}else if(n=qC(n,t,jt),n!==null){je=n;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);Ie===0&&(Ie=5)}function ti(e,t,n){var r=le,i=Xt.transition;try{Xt.transition=null,le=1,nk(e,t,n,r)}finally{Xt.transition=i,le=r}return null}function nk(e,t,n,r){do ws();while(Cr!==null);if(se&6)throw Error(A(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(A(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(FE(e,s),e===He&&(je=He=null,Qe=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||il||(il=!0,ew(Wl,function(){return ws(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Xt.transition,Xt.transition=null;var o=le;le=1;var a=se;se|=4,cp.current=null,YC(e,n),Wx(n,e),SC(Jf),ql=!!Zf,Jf=Zf=null,e.current=n,XC(n),_E(),se=a,le=o,Xt.transition=s}else e.current=n;if(il&&(il=!1,Cr=e,uu=i),s=e.pendingLanes,s===0&&(Nr=null),RE(n.stateNode),Ct(e,Ae()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(lu)throw lu=!1,e=xd,xd=null,e;return uu&1&&e.tag!==0&&ws(),s=e.pendingLanes,s&1?e===wd?Oo++:(Oo=0,wd=e):Oo=0,qr(),null}function ws(){if(Cr!==null){var e=O1(uu),t=Xt.transition,n=le;try{if(Xt.transition=null,le=16>e?16:e,Cr===null)var r=!1;else{if(e=Cr,Cr=null,uu=0,se&6)throw Error(A(331));var i=se;for(se|=4,F=e.current;F!==null;){var s=F,o=s.child;if(F.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(F=u;F!==null;){var f=F;switch(f.tag){case 0:case 11:case 15:Ao(8,f,s)}var c=f.child;if(c!==null)c.return=f,F=c;else for(;F!==null;){f=F;var d=f.sibling,h=f.return;if(zx(f),f===u){F=null;break}if(d!==null){d.return=h,F=d;break}F=h}}}var m=s.alternate;if(m!==null){var v=m.child;if(v!==null){m.child=null;do{var b=v.sibling;v.sibling=null,v=b}while(v!==null)}}F=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,F=o;else e:for(;F!==null;){if(s=F,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Ao(9,s,s.return)}var p=s.sibling;if(p!==null){p.return=s.return,F=p;break e}F=s.return}}var g=e.current;for(F=g;F!==null;){o=F;var x=o.child;if(o.subtreeFlags&2064&&x!==null)x.return=o,F=x;else e:for(o=g;F!==null;){if(a=F,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Fu(9,a)}}catch(S){ke(a,a.return,S)}if(a===o){F=null;break e}var E=a.sibling;if(E!==null){E.return=a.return,F=E;break e}F=a.return}}if(se=i,qr(),_n&&typeof _n.onPostCommitFiberRoot=="function")try{_n.onPostCommitFiberRoot(Pu,e)}catch{}r=!0}return r}finally{le=n,Xt.transition=t}}return!1}function Zg(e,t,n){t=Vs(n,t),t=Ox(e,t,1),e=jr(e,t,1),t=ft(),e!==null&&(ba(e,1,t),Ct(e,t))}function ke(e,t,n){if(e.tag===3)Zg(e,e,n);else for(;t!==null;){if(t.tag===3){Zg(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Nr===null||!Nr.has(r))){e=Vs(n,e),e=jx(t,e,1),t=jr(t,e,1),e=ft(),t!==null&&(ba(t,1,e),Ct(t,e));break}}t=t.return}}function rk(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ft(),e.pingedLanes|=e.suspendedLanes&n,He===e&&(Qe&n)===n&&(Ie===4||Ie===3&&(Qe&130023424)===Qe&&500>Ae()-dp?wi(e,0):fp|=n),Ct(e,t)}function Zx(e,t){t===0&&(e.mode&1?(t=Ga,Ga<<=1,!(Ga&130023424)&&(Ga=4194304)):t=1);var n=ft();e=Zn(e,t),e!==null&&(ba(e,t,n),Ct(e,n))}function ik(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Zx(e,n)}function sk(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(A(314))}r!==null&&r.delete(t),Zx(e,n)}var Jx;Jx=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Tt.current)St=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return St=!1,KC(e,t,n);St=!!(e.flags&131072)}else St=!1,ve&&t.flags&1048576&&rx(t,eu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;kl(e,t),e=t.pendingProps;var i=Fs(t,st.current);xs(t,n),i=sp(null,t,r,e,i,n);var s=op();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Et(r)?(s=!0,Zl(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ep(t),i.updater=Du,t.stateNode=i,i._reactInternals=t,ld(t,r,e,n),t=fd(null,t,r,!0,s,n)):(t.tag=0,ve&&s&&qh(t),lt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(kl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=ak(r),e=ln(r,e),i){case 0:t=cd(null,t,r,e,n);break e;case 1:t=zg(null,t,r,e,n);break e;case 11:t=Vg(null,t,r,e,n);break e;case 14:t=Bg(null,t,r,ln(r.type,e),n);break e}throw Error(A(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ln(r,i),cd(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ln(r,i),zg(e,t,r,i,n);case 3:e:{if(Fx(t),e===null)throw Error(A(387));r=t.pendingProps,s=t.memoizedState,i=s.element,ux(e,t),ru(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=Vs(Error(A(423)),t),t=Ug(e,t,r,n,i);break e}else if(r!==i){i=Vs(Error(A(424)),t),t=Ug(e,t,r,n,i);break e}else for(Nt=Or(t.stateNode.containerInfo.firstChild),Ft=t,ve=!0,dn=null,n=ax(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ls(),r===i){t=Jn(e,t,n);break e}lt(e,t,r,n)}t=t.child}return t;case 5:return cx(t),e===null&&sd(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,ed(r,i)?o=null:s!==null&&ed(r,s)&&(t.flags|=32),Dx(e,t),lt(e,t,o,n),t.child;case 6:return e===null&&sd(t),null;case 13:return Lx(e,t,n);case 4:return tp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Is(t,null,r,n):lt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ln(r,i),Vg(e,t,r,i,n);case 7:return lt(e,t,t.pendingProps,n),t.child;case 8:return lt(e,t,t.pendingProps.children,n),t.child;case 12:return lt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,de(tu,r._currentValue),r._currentValue=o,s!==null)if(gn(s.value,o)){if(s.children===i.children&&!Tt.current){t=Jn(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=qn(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?l.next=l:(l.next=f.next,f.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),od(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(A(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),od(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}lt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,xs(t,n),i=Jt(i),r=r(i),t.flags|=1,lt(e,t,r,n),t.child;case 14:return r=t.type,i=ln(r,t.pendingProps),i=ln(r.type,i),Bg(e,t,r,i,n);case 15:return Nx(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ln(r,i),kl(e,t),t.tag=1,Et(r)?(e=!0,Zl(t)):e=!1,xs(t,n),Rx(t,r,i),ld(t,r,i,n),fd(null,t,r,!0,e,n);case 19:return Ix(e,t,n);case 22:return Mx(e,t,n)}throw Error(A(156,t.tag))};function ew(e,t){return _1(e,t)}function ok(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yt(e,t,n,r){return new ok(e,t,n,r)}function gp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ak(e){if(typeof e=="function")return gp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Dh)return 11;if(e===Fh)return 14}return 2}function Dr(e,t){var n=e.alternate;return n===null?(n=Yt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Al(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")gp(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Zi:return bi(n.children,i,s,t);case Mh:o=8,i|=8;break;case jf:return e=Yt(12,n,t,i|2),e.elementType=jf,e.lanes=s,e;case Nf:return e=Yt(13,n,t,i),e.elementType=Nf,e.lanes=s,e;case Mf:return e=Yt(19,n,t,i),e.elementType=Mf,e.lanes=s,e;case c1:return Iu(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case l1:o=10;break e;case u1:o=9;break e;case Dh:o=11;break e;case Fh:o=14;break e;case cr:o=16,r=null;break e}throw Error(A(130,e==null?e:typeof e,""))}return t=Yt(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function bi(e,t,n,r){return e=Yt(7,e,r,t),e.lanes=n,e}function Iu(e,t,n,r){return e=Yt(22,e,r,t),e.elementType=c1,e.lanes=n,e.stateNode={isHidden:!1},e}function Yc(e,t,n){return e=Yt(6,e,null,t),e.lanes=n,e}function Xc(e,t,n){return t=Yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function lk(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Oc(0),this.expirationTimes=Oc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Oc(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function yp(e,t,n,r,i,s,o,a,l){return e=new lk(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Yt(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ep(s),e}function uk(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Xi,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function tw(e){if(!e)return Br;e=e._reactInternals;e:{if(Fi(e)!==e||e.tag!==1)throw Error(A(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Et(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(A(171))}if(e.tag===1){var n=e.type;if(Et(n))return tx(e,n,t)}return t}function nw(e,t,n,r,i,s,o,a,l){return e=yp(n,r,!0,e,i,s,o,a,l),e.context=tw(null),n=e.current,r=ft(),i=Mr(n),s=qn(r,i),s.callback=t??null,jr(n,s,i),e.current.lanes=i,ba(e,i,r),Ct(e,r),e}function $u(e,t,n,r){var i=t.current,s=ft(),o=Mr(i);return n=tw(n),t.context===null?t.context=n:t.pendingContext=n,t=qn(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=jr(i,t,o),e!==null&&(mn(e,i,o,s),Tl(e,i,o)),o}function fu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Jg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function vp(e,t){Jg(e,t),(e=e.alternate)&&Jg(e,t)}function ck(){return null}var rw=typeof reportError=="function"?reportError:function(e){console.error(e)};function xp(e){this._internalRoot=e}Vu.prototype.render=xp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(A(409));$u(e,t,null,null)};Vu.prototype.unmount=xp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ri(function(){$u(null,e,null,null)}),t[Xn]=null}};function Vu(e){this._internalRoot=e}Vu.prototype.unstable_scheduleHydration=function(e){if(e){var t=M1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<hr.length&&t!==0&&t<hr[n].priority;n++);hr.splice(n,0,e),n===0&&F1(e)}};function wp(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Bu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function e0(){}function fk(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=fu(o);s.call(u)}}var o=nw(t,r,e,0,null,!1,!1,"",e0);return e._reactRootContainer=o,e[Xn]=o.current,qo(e.nodeType===8?e.parentNode:e),Ri(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var u=fu(l);a.call(u)}}var l=yp(e,0,!1,null,null,!1,!1,"",e0);return e._reactRootContainer=l,e[Xn]=l.current,qo(e.nodeType===8?e.parentNode:e),Ri(function(){$u(t,l,n,r)}),l}function zu(e,t,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var l=fu(o);a.call(l)}}$u(t,o,e,i)}else o=fk(n,t,e,i,r);return fu(o)}j1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=yo(t.pendingLanes);n!==0&&($h(t,n|1),Ct(t,Ae()),!(se&6)&&(Bs=Ae()+500,qr()))}break;case 13:Ri(function(){var r=Zn(e,1);if(r!==null){var i=ft();mn(r,e,1,i)}}),vp(e,1)}};Vh=function(e){if(e.tag===13){var t=Zn(e,134217728);if(t!==null){var n=ft();mn(t,e,134217728,n)}vp(e,134217728)}};N1=function(e){if(e.tag===13){var t=Mr(e),n=Zn(e,t);if(n!==null){var r=ft();mn(n,e,t,r)}vp(e,t)}};M1=function(){return le};D1=function(e,t){var n=le;try{return le=e,t()}finally{le=n}};Hf=function(e,t,n){switch(t){case"input":if(Lf(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=ju(r);if(!i)throw Error(A(90));d1(r),Lf(r,i)}}}break;case"textarea":p1(e,n);break;case"select":t=n.value,t!=null&&ms(e,!!n.multiple,t,!1)}};b1=hp;S1=Ri;var dk={usingClientEntryPoint:!1,Events:[Ta,ns,ju,x1,w1,hp]},co={findFiberByHostInstance:oi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},hk={bundleType:co.bundleType,version:co.version,rendererPackageName:co.rendererPackageName,rendererConfig:co.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:tr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=C1(e),e===null?null:e.stateNode},findFiberByHostInstance:co.findFiberByHostInstance||ck,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var sl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sl.isDisabled&&sl.supportsFiber)try{Pu=sl.inject(hk),_n=sl}catch{}}It.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=dk;It.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!wp(t))throw Error(A(200));return uk(e,t,null,n)};It.createRoot=function(e,t){if(!wp(e))throw Error(A(299));var n=!1,r="",i=rw;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=yp(e,1,!1,null,null,n,!1,r,i),e[Xn]=t.current,qo(e.nodeType===8?e.parentNode:e),new xp(t)};It.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(A(188)):(e=Object.keys(e).join(","),Error(A(268,e)));return e=C1(t),e=e===null?null:e.stateNode,e};It.flushSync=function(e){return Ri(e)};It.hydrate=function(e,t,n){if(!Bu(t))throw Error(A(200));return zu(null,e,t,!0,n)};It.hydrateRoot=function(e,t,n){if(!wp(e))throw Error(A(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=rw;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=nw(t,null,e,1,n??null,i,!1,s,o),e[Xn]=t.current,qo(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Vu(t)};It.render=function(e,t,n){if(!Bu(t))throw Error(A(200));return zu(null,e,t,!1,n)};It.unmountComponentAtNode=function(e){if(!Bu(e))throw Error(A(40));return e._reactRootContainer?(Ri(function(){zu(null,null,e,!1,function(){e._reactRootContainer=null,e[Xn]=null})}),!0):!1};It.unstable_batchedUpdates=hp;It.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Bu(n))throw Error(A(200));if(e==null||e._reactInternals===void 0)throw Error(A(38));return zu(e,t,n,!1,r)};It.version="18.3.1-next-f1338f8080-20240426";function iw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(iw)}catch(e){console.error(e)}}iw(),i1.exports=It;var sw=i1.exports;const pk=Ks(sw);var ow,t0=sw;ow=t0.createRoot,t0.hydrateRoot;const mk="@alfatech/livechat",gk="v2025.05.17.1",yk="module",vk="https://api-live.alfatek.dev",xk="wss://api-live.alfatek.dev",wk=["dist","README.md"],bk="dist/widget.js",Sk={dev:"vite",build:"tsc -b && vite build",lint:"biome lint --write",prepare:"husky",format:"biome format --write && yarn lint"},Tk={"@headlessui/react":"^2.2.2","@tailwindcss/vite":"^4.1.4","@tanstack/react-query":"^5.59.20",classnames:"^2.5.1",dayjs:"^1.11.13",formik:"^2.4.6","framer-motion":"^12.7.4",react:"^18.3.1","react-dom":"^18.3.1","react-router-dom":"^6.26.2","socket.io-client":"^4.8.1",sonner:"^2.0.1",yup:"^1.4.0",zustand:"^4.5.5"},Ek={"@biomejs/biome":"^1.8.3","@types/node":"^22.5.4","@types/react":"^18.3.3","@types/react-dom":"^18.3.0","@vitejs/plugin-react-swc":"^3.5.0",globals:"^15.9.0",husky:"^9.1.5",tailwindcss:"^4.1.4",typescript:"^5.5.3",vite:"^5.4.1"},aw={name:mk,private:!1,version:gk,type:yk,apiURL:vk,wsURL:xk,files:wk,main:bk,scripts:Sk,dependencies:Tk,devDependencies:Ek,"lint-staged":{"./**/*.{js,ts,tsx,json}":["npm run format"]}},Ck=aw.apiURL,kk=aw.wsURL,_k=e=>[{limit:Number.parseInt(e.headers.get("X-Ratelimit-Limit")||"0"),remaining:Number.parseInt(e.headers.get("X-Ratelimit-Remaining")||"0"),reset:Number.parseInt(e.headers.get("X-Ratelimit-Reset")||"0"),retryAfter:Number.parseInt(e.headers.get("Retry-After")||"0")},429],Pk=(e,t)=>[{message:"message"in t?t.message:"Not Found"},404],Ak={429:_k,404:Pk};async function Ca(e,t={}){const n={};!(t.body instanceof FormData)&&t.body&&(n["Content-Type"]="application/json");const r=await fetch(`${Ck}/${e}`,{...t,credentials:"include",headers:{...t.headers,...n}}).catch(s=>(console.log("err::",s),new Response(null,{status:500})));if(!r.ok){let s={};try{return s=await r.json(),[s,r.status]}catch{console.log("response: ",r)}const o=Ak[r.status];return o?o(r,s):[{},r.status]}const i=r.headers.get("Content-Type");return i&&i.includes("application/json")?[await r.json(),r.status]:[await r.text(),r.status]}const bp=e=>[200,201,204].includes(e);var Ys=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(){}},Oi=typeof window>"u"||"Deno"in globalThis;function Kt(){}function Rk(e,t){return typeof e=="function"?e(t):e}function Td(e){return typeof e=="number"&&e>=0&&e!==1/0}function lw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function bs(e,t){return typeof e=="function"?e(t):e}function hn(e,t){return typeof e=="function"?e(t):e}function n0(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==Sp(o,t.options))return!1}else if(!na(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||s&&!s(t))}function r0(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(ji(t.options.mutationKey)!==ji(s))return!1}else if(!na(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Sp(e,t){return((t==null?void 0:t.queryKeyHashFn)||ji)(e)}function ji(e){return JSON.stringify(e,(t,n)=>Ed(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function na(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!na(e[n],t[n])):!1}function uw(e,t){if(e===t)return e;const n=i0(e)&&i0(t);if(n||Ed(e)&&Ed(t)){const r=n?e:Object.keys(e),i=r.length,s=n?t:Object.keys(t),o=s.length,a=n?[]:{};let l=0;for(let u=0;u<o;u++){const f=n?u:s[u];(!n&&r.includes(f)||n)&&e[f]===void 0&&t[f]===void 0?(a[f]=void 0,l++):(a[f]=uw(e[f],t[f]),a[f]===e[f]&&e[f]!==void 0&&l++)}return i===o&&l===i?e:a}return t}function du(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function i0(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ed(e){if(!s0(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!s0(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function s0(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ok(e){return new Promise(t=>{setTimeout(t,e)})}function Cd(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?uw(e,t):t}function jk(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Nk(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Tp=Symbol();function cw(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Tp?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var hi,mr,Ss,Lv,Mk=(Lv=class extends Ys{constructor(){super();U(this,hi);U(this,mr);U(this,Ss);D(this,Ss,t=>{if(!Oi&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){T(this,mr)||this.setEventListener(T(this,Ss))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,mr))==null||t.call(this),D(this,mr,void 0))}setEventListener(t){var n;D(this,Ss,t),(n=T(this,mr))==null||n.call(this),D(this,mr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){T(this,hi)!==t&&(D(this,hi,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof T(this,hi)=="boolean"?T(this,hi):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},hi=new WeakMap,mr=new WeakMap,Ss=new WeakMap,Lv),Ep=new Mk,Ts,gr,Es,Iv,Dk=(Iv=class extends Ys{constructor(){super();U(this,Ts,!0);U(this,gr);U(this,Es);D(this,Es,t=>{if(!Oi&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){T(this,gr)||this.setEventListener(T(this,Es))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,gr))==null||t.call(this),D(this,gr,void 0))}setEventListener(t){var n;D(this,Es,t),(n=T(this,gr))==null||n.call(this),D(this,gr,t(this.setOnline.bind(this)))}setOnline(t){T(this,Ts)!==t&&(D(this,Ts,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return T(this,Ts)}},Ts=new WeakMap,gr=new WeakMap,Es=new WeakMap,Iv),hu=new Dk;function kd(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function Fk(e){return Math.min(1e3*2**e,3e4)}function fw(e){return(e??"online")==="online"?hu.isOnline():!0}var dw=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Zc(e){return e instanceof dw}function hw(e){let t=!1,n=0,r=!1,i;const s=kd(),o=v=>{var b;r||(d(new dw(v)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>Ep.isFocused()&&(e.networkMode==="always"||hu.isOnline())&&e.canRun(),f=()=>fw(e.networkMode)&&e.canRun(),c=v=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,v),i==null||i(),s.resolve(v))},d=v=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,v),i==null||i(),s.reject(v))},h=()=>new Promise(v=>{var b;i=p=>{(r||u())&&v(p)},(b=e.onPause)==null||b.call(e)}).then(()=>{var v;i=void 0,r||(v=e.onContinue)==null||v.call(e)}),m=()=>{if(r)return;let v;const b=n===0?e.initialPromise:void 0;try{v=b??e.fn()}catch(p){v=Promise.reject(p)}Promise.resolve(v).then(c).catch(p=>{var C;if(r)return;const g=e.retry??(Oi?0:3),x=e.retryDelay??Fk,E=typeof x=="function"?x(n,p):x,S=g===!0||typeof g=="number"&&n<g||typeof g=="function"&&g(n,p);if(t||!S){d(p);return}n++,(C=e.onFail)==null||C.call(e,n,p),Ok(E).then(()=>u()?void 0:h()).then(()=>{t?d(p):m()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:f,start:()=>(f()?m():h().then(m),s)}}function Lk(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=a=>setTimeout(a,0);const s=a=>{t?e.push(a):i(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var Le=Lk(),pi,$v,pw=($v=class{constructor(){U(this,pi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Td(this.gcTime)&&D(this,pi,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Oi?1/0:5*60*1e3))}clearGcTimeout(){T(this,pi)&&(clearTimeout(T(this,pi)),D(this,pi,void 0))}},pi=new WeakMap,$v),Cs,ks,Wt,tt,ga,mi,un,$n,Vv,Ik=(Vv=class extends pw{constructor(t){super();U(this,un);U(this,Cs);U(this,ks);U(this,Wt);U(this,tt);U(this,ga);U(this,mi);D(this,mi,!1),D(this,ga,t.defaultOptions),this.setOptions(t.options),this.observers=[],D(this,Wt,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,D(this,Cs,$k(this.options)),this.state=t.state??T(this,Cs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=T(this,tt))==null?void 0:t.promise}setOptions(t){this.options={...T(this,ga),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&T(this,Wt).remove(this)}setData(t,n){const r=Cd(this.state.data,t,this.options);return X(this,un,$n).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){X(this,un,$n).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=T(this,tt))==null?void 0:r.promise;return(i=T(this,tt))==null||i.cancel(t),n?n.then(Kt).catch(Kt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(T(this,Cs))}isActive(){return this.observers.some(t=>hn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Tp||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!lw(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=T(this,tt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=T(this,tt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),T(this,Wt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(T(this,tt)&&(T(this,mi)?T(this,tt).cancel({revert:!0}):T(this,tt).cancelRetry()),this.scheduleGc()),T(this,Wt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||X(this,un,$n).call(this,{type:"invalidate"})}fetch(t,n){var l,u,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(T(this,tt))return T(this,tt).continueRetry(),T(this,tt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const c=this.observers.find(d=>d.options.queryFn);c&&this.setOptions(c.options)}const r=new AbortController,i=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(D(this,mi,!0),r.signal)})},s=()=>{const c=cw(this.options,n),d={queryKey:this.queryKey,meta:this.meta};return i(d),D(this,mi,!1),this.options.persister?this.options.persister(c,d,this):c(d)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};i(o),(l=this.options.behavior)==null||l.onFetch(o,this),D(this,ks,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&X(this,un,$n).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const a=c=>{var d,h,m,v;Zc(c)&&c.silent||X(this,un,$n).call(this,{type:"error",error:c}),Zc(c)||((h=(d=T(this,Wt).config).onError)==null||h.call(d,c,this),(v=(m=T(this,Wt).config).onSettled)==null||v.call(m,this.state.data,c,this)),this.scheduleGc()};return D(this,tt,hw({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:c=>{var d,h,m,v;if(c===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(c)}catch(b){a(b);return}(h=(d=T(this,Wt).config).onSuccess)==null||h.call(d,c,this),(v=(m=T(this,Wt).config).onSettled)==null||v.call(m,c,this.state.error,this),this.scheduleGc()},onError:a,onFail:(c,d)=>{X(this,un,$n).call(this,{type:"failed",failureCount:c,error:d})},onPause:()=>{X(this,un,$n).call(this,{type:"pause"})},onContinue:()=>{X(this,un,$n).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),T(this,tt).start()}},Cs=new WeakMap,ks=new WeakMap,Wt=new WeakMap,tt=new WeakMap,ga=new WeakMap,mi=new WeakMap,un=new WeakSet,$n=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...mw(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return Zc(i)&&i.revert&&T(this,ks)?{...T(this,ks),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Le.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),T(this,Wt).notify({query:this,type:"updated",action:t})})},Vv);function mw(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:fw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function $k(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?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"}}var Sn,Bv,Vk=(Bv=class extends Ys{constructor(t={}){super();U(this,Sn);this.config=t,D(this,Sn,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??Sp(i,n);let o=this.get(s);return o||(o=new Ik({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){T(this,Sn).has(t.queryHash)||(T(this,Sn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=T(this,Sn).get(t.queryHash);n&&(t.destroy(),n===t&&T(this,Sn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Le.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return T(this,Sn).get(t)}getAll(){return[...T(this,Sn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>n0(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>n0(t,r)):n}notify(t){Le.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Le.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Le.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Sn=new WeakMap,Bv),Tn,ot,gi,En,lr,zv,Bk=(zv=class extends pw{constructor(t){super();U(this,En);U(this,Tn);U(this,ot);U(this,gi);this.mutationId=t.mutationId,D(this,ot,t.mutationCache),D(this,Tn,[]),this.state=t.state||gw(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){T(this,Tn).includes(t)||(T(this,Tn).push(t),this.clearGcTimeout(),T(this,ot).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){D(this,Tn,T(this,Tn).filter(n=>n!==t)),this.scheduleGc(),T(this,ot).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){T(this,Tn).length||(this.state.status==="pending"?this.scheduleGc():T(this,ot).remove(this))}continue(){var t;return((t=T(this,gi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,u,f,c,d,h,m,v,b,p,g,x,E,S,C,k;D(this,gi,hw({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(P,j)=>{X(this,En,lr).call(this,{type:"failed",failureCount:P,error:j})},onPause:()=>{X(this,En,lr).call(this,{type:"pause"})},onContinue:()=>{X(this,En,lr).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>T(this,ot).canRun(this)}));const n=this.state.status==="pending",r=!T(this,gi).canStart();try{if(!n){X(this,En,lr).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(i=T(this,ot).config).onMutate)==null?void 0:s.call(i,t,this));const j=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));j!==this.state.context&&X(this,En,lr).call(this,{type:"pending",context:j,variables:t,isPaused:r})}const P=await T(this,gi).start();return await((u=(l=T(this,ot).config).onSuccess)==null?void 0:u.call(l,P,t,this.state.context,this)),await((c=(f=this.options).onSuccess)==null?void 0:c.call(f,P,t,this.state.context)),await((h=(d=T(this,ot).config).onSettled)==null?void 0:h.call(d,P,null,this.state.variables,this.state.context,this)),await((v=(m=this.options).onSettled)==null?void 0:v.call(m,P,null,t,this.state.context)),X(this,En,lr).call(this,{type:"success",data:P}),P}catch(P){try{throw await((p=(b=T(this,ot).config).onError)==null?void 0:p.call(b,P,t,this.state.context,this)),await((x=(g=this.options).onError)==null?void 0:x.call(g,P,t,this.state.context)),await((S=(E=T(this,ot).config).onSettled)==null?void 0:S.call(E,void 0,P,this.state.variables,this.state.context,this)),await((k=(C=this.options).onSettled)==null?void 0:k.call(C,void 0,P,t,this.state.context)),P}finally{X(this,En,lr).call(this,{type:"error",error:P})}}finally{T(this,ot).runNext(this)}}},Tn=new WeakMap,ot=new WeakMap,gi=new WeakMap,En=new WeakSet,lr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Le.batch(()=>{T(this,Tn).forEach(r=>{r.onMutationUpdate(t)}),T(this,ot).notify({mutation:this,type:"updated",action:t})})},zv);function gw(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ot,ya,Uv,zk=(Uv=class extends Ys{constructor(t={}){super();U(this,Ot);U(this,ya);this.config=t,D(this,Ot,new Map),D(this,ya,Date.now())}build(t,n,r){const i=new Bk({mutationCache:this,mutationId:++za(this,ya)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=ol(t),r=T(this,Ot).get(n)??[];r.push(t),T(this,Ot).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=ol(t);if(T(this,Ot).has(n)){const i=(r=T(this,Ot).get(n))==null?void 0:r.filter(s=>s!==t);i&&(i.length===0?T(this,Ot).delete(n):T(this,Ot).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=T(this,Ot).get(ol(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=T(this,Ot).get(ol(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Le.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...T(this,Ot).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>r0(n,r))}findAll(t={}){return this.getAll().filter(n=>r0(t,n))}notify(t){Le.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Le.batch(()=>Promise.all(t.map(n=>n.continue().catch(Kt))))}},Ot=new WeakMap,ya=new WeakMap,Uv);function ol(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function o0(e){return{onFetch:(t,n)=>{var f,c,d,h,m;const r=t.options,i=(d=(c=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:c.fetchMore)==null?void 0:d.direction,s=((h=t.state.data)==null?void 0:h.pages)||[],o=((m=t.state.data)==null?void 0:m.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let v=!1;const b=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?v=!0:t.signal.addEventListener("abort",()=>{v=!0}),t.signal)})},p=cw(t.options,t.fetchOptions),g=async(x,E,S)=>{if(v)return Promise.reject();if(E==null&&x.pages.length)return Promise.resolve(x);const C={queryKey:t.queryKey,pageParam:E,direction:S?"backward":"forward",meta:t.options.meta};b(C);const k=await p(C),{maxPages:P}=t.options,j=S?Nk:jk;return{pages:j(x.pages,k,P),pageParams:j(x.pageParams,E,P)}};if(i&&s.length){const x=i==="backward",E=x?Uk:a0,S={pages:s,pageParams:o},C=E(r,S);a=await g(S,C,x)}else{const x=e??s.length;do{const E=l===0?o[0]??r.initialPageParam:a0(r,a);if(l>0&&E==null)break;a=await g(a,E),l++}while(l<x)}return a};t.options.persister?t.fetchFn=()=>{var v,b;return(b=(v=t.options).persister)==null?void 0:b.call(v,u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function a0(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Uk(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Ee,yr,vr,_s,Ps,xr,As,Rs,Hv,Hk=(Hv=class{constructor(e={}){U(this,Ee);U(this,yr);U(this,vr);U(this,_s);U(this,Ps);U(this,xr);U(this,As);U(this,Rs);D(this,Ee,e.queryCache||new Vk),D(this,yr,e.mutationCache||new zk),D(this,vr,e.defaultOptions||{}),D(this,_s,new Map),D(this,Ps,new Map),D(this,xr,0)}mount(){za(this,xr)._++,T(this,xr)===1&&(D(this,As,Ep.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Ee).onFocus())})),D(this,Rs,hu.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Ee).onOnline())})))}unmount(){var e,t;za(this,xr)._--,T(this,xr)===0&&((e=T(this,As))==null||e.call(this),D(this,As,void 0),(t=T(this,Rs))==null||t.call(this),D(this,Rs,void 0))}isFetching(e){return T(this,Ee).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return T(this,yr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=T(this,Ee).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=T(this,Ee).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(bs(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return T(this,Ee).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=T(this,Ee).get(r.queryHash),s=i==null?void 0:i.state.data,o=Rk(t,s);if(o!==void 0)return T(this,Ee).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Le.batch(()=>T(this,Ee).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=T(this,Ee).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=T(this,Ee);Le.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=T(this,Ee),r={type:"active",...e};return Le.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Le.batch(()=>T(this,Ee).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Kt).catch(Kt)}invalidateQueries(e,t={}){return Le.batch(()=>{if(T(this,Ee).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none")return Promise.resolve();const n={...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Le.batch(()=>T(this,Ee).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Kt)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Kt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=T(this,Ee).build(this,t);return n.isStaleByTime(bs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Kt).catch(Kt)}fetchInfiniteQuery(e){return e.behavior=o0(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Kt).catch(Kt)}ensureInfiniteQueryData(e){return e.behavior=o0(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return hu.isOnline()?T(this,yr).resumePausedMutations():Promise.resolve()}getQueryCache(){return T(this,Ee)}getMutationCache(){return T(this,yr)}getDefaultOptions(){return T(this,vr)}setDefaultOptions(e){D(this,vr,e)}setQueryDefaults(e,t){T(this,_s).set(ji(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...T(this,_s).values()],n={};return t.forEach(r=>{na(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){T(this,Ps).set(ji(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...T(this,Ps).values()];let n={};return t.forEach(r=>{na(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...T(this,vr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Sp(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===Tp&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...T(this,vr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){T(this,Ee).clear(),T(this,yr).clear()}},Ee=new WeakMap,yr=new WeakMap,vr=new WeakMap,_s=new WeakMap,Ps=new WeakMap,xr=new WeakMap,As=new WeakMap,Rs=new WeakMap,Hv),yt,ee,va,at,yi,Os,wr,Cn,xa,js,Ns,vi,xi,br,Ms,ae,xo,_d,Pd,Ad,Rd,Od,jd,Nd,yw,Wv,Wk=(Wv=class extends Ys{constructor(t,n){super();U(this,ae);U(this,yt);U(this,ee);U(this,va);U(this,at);U(this,yi);U(this,Os);U(this,wr);U(this,Cn);U(this,xa);U(this,js);U(this,Ns);U(this,vi);U(this,xi);U(this,br);U(this,Ms,new Set);this.options=n,D(this,yt,t),D(this,Cn,null),D(this,wr,kd()),this.options.experimental_prefetchInRender||T(this,wr).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(T(this,ee).addObserver(this),l0(T(this,ee),this.options)?X(this,ae,xo).call(this):this.updateResult(),X(this,ae,Rd).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Md(T(this,ee),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Md(T(this,ee),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,X(this,ae,Od).call(this),X(this,ae,jd).call(this),T(this,ee).removeObserver(this)}setOptions(t,n){const r=this.options,i=T(this,ee);if(this.options=T(this,yt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof hn(this.options.enabled,T(this,ee))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");X(this,ae,Nd).call(this),T(this,ee).setOptions(this.options),r._defaulted&&!du(this.options,r)&&T(this,yt).getQueryCache().notify({type:"observerOptionsUpdated",query:T(this,ee),observer:this});const s=this.hasListeners();s&&u0(T(this,ee),i,this.options,r)&&X(this,ae,xo).call(this),this.updateResult(n),s&&(T(this,ee)!==i||hn(this.options.enabled,T(this,ee))!==hn(r.enabled,T(this,ee))||bs(this.options.staleTime,T(this,ee))!==bs(r.staleTime,T(this,ee)))&&X(this,ae,_d).call(this);const o=X(this,ae,Pd).call(this);s&&(T(this,ee)!==i||hn(this.options.enabled,T(this,ee))!==hn(r.enabled,T(this,ee))||o!==T(this,br))&&X(this,ae,Ad).call(this,o)}getOptimisticResult(t){const n=T(this,yt).getQueryCache().build(T(this,yt),t),r=this.createResult(n,t);return qk(this,r)&&(D(this,at,r),D(this,Os,this.options),D(this,yi,T(this,ee).state)),r}getCurrentResult(){return T(this,at)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){T(this,Ms).add(t)}getCurrentQuery(){return T(this,ee)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=T(this,yt).defaultQueryOptions(t),r=T(this,yt).getQueryCache().build(T(this,yt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return X(this,ae,xo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),T(this,at)))}createResult(t,n){var P;const r=T(this,ee),i=this.options,s=T(this,at),o=T(this,yi),a=T(this,Os),u=t!==r?t.state:T(this,va),{state:f}=t;let c={...f},d=!1,h;if(n._optimisticResults){const j=this.hasListeners(),N=!j&&l0(t,n),I=j&&u0(t,r,n,i);(N||I)&&(c={...c,...mw(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:m,errorUpdatedAt:v,status:b}=c;if(n.select&&c.data!==void 0)if(s&&c.data===(o==null?void 0:o.data)&&n.select===T(this,xa))h=T(this,js);else try{D(this,xa,n.select),h=n.select(c.data),h=Cd(s==null?void 0:s.data,h,n),D(this,js,h),D(this,Cn,null)}catch(j){D(this,Cn,j)}else h=c.data;if(n.placeholderData!==void 0&&h===void 0&&b==="pending"){let j;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))j=s.data;else if(j=typeof n.placeholderData=="function"?n.placeholderData((P=T(this,Ns))==null?void 0:P.state.data,T(this,Ns)):n.placeholderData,n.select&&j!==void 0)try{j=n.select(j),D(this,Cn,null)}catch(N){D(this,Cn,N)}j!==void 0&&(b="success",h=Cd(s==null?void 0:s.data,j,n),d=!0)}T(this,Cn)&&(m=T(this,Cn),h=T(this,js),v=Date.now(),b="error");const p=c.fetchStatus==="fetching",g=b==="pending",x=b==="error",E=g&&p,S=h!==void 0,k={status:b,fetchStatus:c.fetchStatus,isPending:g,isSuccess:b==="success",isError:x,isInitialLoading:E,isLoading:E,data:h,dataUpdatedAt:c.dataUpdatedAt,error:m,errorUpdatedAt:v,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>u.dataUpdateCount||c.errorUpdateCount>u.errorUpdateCount,isFetching:p,isRefetching:p&&!g,isLoadingError:x&&!S,isPaused:c.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:x&&S,isStale:Cp(t,n),refetch:this.refetch,promise:T(this,wr)};if(this.options.experimental_prefetchInRender){const j=re=>{k.status==="error"?re.reject(k.error):k.data!==void 0&&re.resolve(k.data)},N=()=>{const re=D(this,wr,k.promise=kd());j(re)},I=T(this,wr);switch(I.status){case"pending":t.queryHash===r.queryHash&&j(I);break;case"fulfilled":(k.status==="error"||k.data!==I.value)&&N();break;case"rejected":(k.status!=="error"||k.error!==I.reason)&&N();break}}return k}updateResult(t){const n=T(this,at),r=this.createResult(T(this,ee),this.options);if(D(this,yi,T(this,ee).state),D(this,Os,this.options),T(this,yi).data!==void 0&&D(this,Ns,T(this,ee)),du(r,n))return;D(this,at,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!T(this,Ms).size)return!0;const l=new Set(a??T(this,Ms));return this.options.throwOnError&&l.add("error"),Object.keys(T(this,at)).some(u=>{const f=u;return T(this,at)[f]!==n[f]&&l.has(f)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),X(this,ae,yw).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&X(this,ae,Rd).call(this)}},yt=new WeakMap,ee=new WeakMap,va=new WeakMap,at=new WeakMap,yi=new WeakMap,Os=new WeakMap,wr=new WeakMap,Cn=new WeakMap,xa=new WeakMap,js=new WeakMap,Ns=new WeakMap,vi=new WeakMap,xi=new WeakMap,br=new WeakMap,Ms=new WeakMap,ae=new WeakSet,xo=function(t){X(this,ae,Nd).call(this);let n=T(this,ee).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Kt)),n},_d=function(){X(this,ae,Od).call(this);const t=bs(this.options.staleTime,T(this,ee));if(Oi||T(this,at).isStale||!Td(t))return;const r=lw(T(this,at).dataUpdatedAt,t)+1;D(this,vi,setTimeout(()=>{T(this,at).isStale||this.updateResult()},r))},Pd=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(T(this,ee)):this.options.refetchInterval)??!1},Ad=function(t){X(this,ae,jd).call(this),D(this,br,t),!(Oi||hn(this.options.enabled,T(this,ee))===!1||!Td(T(this,br))||T(this,br)===0)&&D(this,xi,setInterval(()=>{(this.options.refetchIntervalInBackground||Ep.isFocused())&&X(this,ae,xo).call(this)},T(this,br)))},Rd=function(){X(this,ae,_d).call(this),X(this,ae,Ad).call(this,X(this,ae,Pd).call(this))},Od=function(){T(this,vi)&&(clearTimeout(T(this,vi)),D(this,vi,void 0))},jd=function(){T(this,xi)&&(clearInterval(T(this,xi)),D(this,xi,void 0))},Nd=function(){const t=T(this,yt).getQueryCache().build(T(this,yt),this.options);if(t===T(this,ee))return;const n=T(this,ee);D(this,ee,t),D(this,va,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},yw=function(t){Le.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(T(this,at))}),T(this,yt).getQueryCache().notify({query:T(this,ee),type:"observerResultsUpdated"})})},Wv);function Kk(e,t){return hn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function l0(e,t){return Kk(e,t)||e.state.data!==void 0&&Md(e,t,t.refetchOnMount)}function Md(e,t,n){if(hn(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Cp(e,t)}return!1}function u0(e,t,n,r){return(e!==t||hn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Cp(e,n)}function Cp(e,t){return hn(t.enabled,e)!==!1&&e.isStaleByTime(bs(t.staleTime,e))}function qk(e,t){return!du(e.getCurrentResult(),t)}var Sr,Tr,vt,Un,Qn,Rl,Dd,Kv,Gk=(Kv=class extends Ys{constructor(t,n){super();U(this,Qn);U(this,Sr);U(this,Tr);U(this,vt);U(this,Un);D(this,Sr,t),this.setOptions(n),this.bindMethods(),X(this,Qn,Rl).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const n=this.options;this.options=T(this,Sr).defaultMutationOptions(t),du(this.options,n)||T(this,Sr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:T(this,vt),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&ji(n.mutationKey)!==ji(this.options.mutationKey)?this.reset():((r=T(this,vt))==null?void 0:r.state.status)==="pending"&&T(this,vt).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=T(this,vt))==null||t.removeObserver(this)}onMutationUpdate(t){X(this,Qn,Rl).call(this),X(this,Qn,Dd).call(this,t)}getCurrentResult(){return T(this,Tr)}reset(){var t;(t=T(this,vt))==null||t.removeObserver(this),D(this,vt,void 0),X(this,Qn,Rl).call(this),X(this,Qn,Dd).call(this)}mutate(t,n){var r;return D(this,Un,n),(r=T(this,vt))==null||r.removeObserver(this),D(this,vt,T(this,Sr).getMutationCache().build(T(this,Sr),this.options)),T(this,vt).addObserver(this),T(this,vt).execute(t)}},Sr=new WeakMap,Tr=new WeakMap,vt=new WeakMap,Un=new WeakMap,Qn=new WeakSet,Rl=function(){var n;const t=((n=T(this,vt))==null?void 0:n.state)??gw();D(this,Tr,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Dd=function(t){Le.batch(()=>{var n,r,i,s,o,a,l,u;if(T(this,Un)&&this.hasListeners()){const f=T(this,Tr).variables,c=T(this,Tr).context;(t==null?void 0:t.type)==="success"?((r=(n=T(this,Un)).onSuccess)==null||r.call(n,t.data,f,c),(s=(i=T(this,Un)).onSettled)==null||s.call(i,t.data,null,f,c)):(t==null?void 0:t.type)==="error"&&((a=(o=T(this,Un)).onError)==null||a.call(o,t.error,f,c),(u=(l=T(this,Un)).onSettled)==null||u.call(l,void 0,t.error,f,c))}this.listeners.forEach(f=>{f(T(this,Tr))})})},Kv),vw=y.createContext(void 0),xw=e=>{const t=y.useContext(vw);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Qk=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),w.jsx(vw.Provider,{value:e,children:t})),ww=y.createContext(!1),Yk=()=>y.useContext(ww);ww.Provider;function Xk(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Zk=y.createContext(Xk()),Jk=()=>y.useContext(Zk);function bw(e,t){return typeof e=="function"?e(...t):!!e}function Fd(){}var e_=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},t_=e=>{y.useEffect(()=>{e.clearReset()},[e])},n_=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&bw(n,[e.error,r]),r_=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},i_=(e,t)=>e.isLoading&&e.isFetching&&!t,s_=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,c0=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function o_(e,t,n){var f,c,d,h,m;const r=xw(),i=Yk(),s=Jk(),o=r.defaultQueryOptions(e);(c=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||c.call(f,o),o._optimisticResults=i?"isRestoring":"optimistic",r_(o),e_(o,s),t_(s);const a=!r.getQueryCache().get(o.queryHash),[l]=y.useState(()=>new t(r,o)),u=l.getOptimisticResult(o);if(y.useSyncExternalStore(y.useCallback(v=>{const b=i?Fd:l.subscribe(Le.batchCalls(v));return l.updateResult(),b},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),y.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),s_(o,u))throw c0(o,l,s);if(n_({result:u,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw u.error;if((h=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_afterQuery)==null||h.call(d,o,u),o.experimental_prefetchInRender&&!Oi&&i_(u,i)){const v=a?c0(o,l,s):(m=r.getQueryCache().get(o.queryHash))==null?void 0:m.promise;v==null||v.catch(Fd).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?u:l.trackResult(u)}function a_(e,t){return o_(e,Wk)}function Sw(e,t){const n=xw(),[r]=y.useState(()=>new Gk(n,e));y.useEffect(()=>{r.setOptions(e)},[r,e]);const i=y.useSyncExternalStore(y.useCallback(o=>r.subscribe(Le.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=y.useCallback((o,a)=>{r.mutate(o,a).catch(Fd)},[r]);if(i.error&&bw(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const l_=e=>a_({queryKey:["widgets",e],queryFn:()=>u_(e)}),u_=e=>Ca(`widgets/with-link/${e}`);var K=(e=>(e.Border="widget_border",e.Background="widget_background",e.InputBackground="widget_input_background",e.InputText="widget_input_text",e.InputBorder="widget_input_border",e.ButtonBackground="widget_button_background",e.ButtonText="widget_button_text",e.TooltipBackground="widget_tooltip_background",e.TooltipText="widget_tooltip_text",e.TooltipBorder="widget_tooltip_border",e.HeaderBackground="widget_header_background",e.HeaderText="widget_header_text",e.HeaderBorder="widget_header_border",e.FooterBackground="widget_footer_background",e.FooterText="widget_footer_text",e.FooterBorder="widget_footer_border",e.MessageAdminBackground="widget_message_admin_background",e.MessageAdminText="widget_message_admin_text",e.MessageVisitorBackground="widget_message_visitor_background",e.MessageVisitorText="widget_message_visitor_text",e.GreeterTopBackground="widget_greeter_top_background",e.GreeterTopText="widget_greeter_top_text",e.GreeterBackground="widget_greeter_background",e.GreeterText="widget_greeter_text",e.GreeterBorder="widget_greeter_border",e.GreeterButtonBackground="widget_greeter_button_background",e.GreeterButtonText="widget_greeter_button_text",e))(K||{});function c_(e){return!!e&&typeof e.public_id=="string"&&typeof e.link_id=="string"&&typeof e.name=="string"&&typeof e.is_browser_notification_enabled=="boolean"&&typeof e.is_hidden_on_offline=="boolean"&&typeof e.is_upload_disabled=="boolean"}/**
41
41
  * @remix-run/router v1.21.0
42
42
  *
43
43
  * Copyright (c) Remix Software Inc.
@@ -46,7 +46,7 @@ Error generating stack: `+s.message+`
46
46
  * LICENSE.md file in the root directory of this source tree.
47
47
  *
48
48
  * @license MIT
49
- */function hu(){return hu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hu.apply(this,arguments)}var kr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(kr||(kr={}));function u_(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((h,m)=>f(h,typeof h=="string"?null:h.state,m===0?"default":void 0));let s=l(n??i.length-1),o=kr.Pop,a=null;function l(h){return Math.min(Math.max(h,0),i.length-1)}function u(){return i[s]}function f(h,m,x){m===void 0&&(m=null);let b=f_(i?u().pathname:"/",h,m,x);return Ep(b.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(h)),b}function c(h){return typeof h=="string"?h:Dd(h)}return{get index(){return s},get action(){return o},get location(){return u()},createHref:c,createURL(h){return new URL(c(h),"http://localhost")},encodeLocation(h){let m=typeof h=="string"?Fi(h):h;return{pathname:m.pathname||"",search:m.search||"",hash:m.hash||""}},push(h,m){o=kr.Push;let x=f(h,m);s+=1,i.splice(s,i.length,x),r&&a&&a({action:o,location:x,delta:1})},replace(h,m){o=kr.Replace;let x=f(h,m);i[s]=x,r&&a&&a({action:o,location:x,delta:0})},go(h){o=kr.Pop;let m=l(s+h),x=i[m];s=m,a&&a({action:o,location:x,delta:h})},listen(h){return a=h,()=>{a=null}}}}function $e(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ep(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function c_(){return Math.random().toString(36).substr(2,8)}function f_(e,t,n,r){return n===void 0&&(n=null),hu({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Fi(t):t,{state:n,key:t&&t.key||r||c_()})}function Dd(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Fi(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var u0;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(u0||(u0={}));function d_(e,t,n){return n===void 0&&(n="/"),h_(e,t,n,!1)}function h_(e,t,n,r){let i=typeof t=="string"?Fi(t):t,s=Cp(i.pathname||"/",n);if(s==null)return null;let o=ww(e);p_(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=C_(s);a=T_(o[l],u,r)}return a}function ww(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(s,o,a)=>{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&($e(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=Fr([r,l.relativePath]),f=n.concat(l);s.children&&s.children.length>0&&($e(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),ww(s.children,t,f,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:b_(u,s.index),routesMeta:f})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of bw(s.path))i(s,o,l)}),t}function bw(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=bw(r.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function p_(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:S_(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const m_=/^:[\w-]+$/,g_=3,y_=2,v_=1,x_=10,w_=-2,c0=e=>e==="*";function b_(e,t){let n=e.split("/"),r=n.length;return n.some(c0)&&(r+=w_),t&&(r+=y_),n.filter(i=>!c0(i)).reduce((i,s)=>i+(m_.test(s)?g_:s===""?v_:x_),r)}function S_(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function T_(e,t,n){let{routesMeta:r}=e,i={},s="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],u=a===r.length-1,f=s==="/"?t:t.slice(s.length)||"/",c=f0({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},f),d=l.route;if(!c&&u&&n&&!r[r.length-1].route.index&&(c=f0({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},f)),!c)return null;Object.assign(i,c.params),o.push({params:i,pathname:Fr([s,c.pathname]),pathnameBase:A_(Fr([s,c.pathnameBase])),route:d}),c.pathnameBase!=="/"&&(s=Fr([s,c.pathnameBase]))}return o}function f0(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=E_(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((u,f,c)=>{let{paramName:d,isOptional:h}=f;if(d==="*"){let x=a[c]||"";o=s.slice(0,s.length-x.length).replace(/(.)\/+$/,"$1")}const m=a[c];return h&&!m?u[d]=void 0:u[d]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:e}}function E_(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Ep(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function C_(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ep(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Cp(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function k_(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Fi(e):e;return{pathname:n?n.startsWith("/")?n:__(n,t):t,search:R_(r),hash:O_(i)}}function __(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Zc(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function P_(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Sw(e,t){let n=P_(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Tw(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Fi(e):(i=hu({},e),$e(!i.pathname||!i.pathname.includes("?"),Zc("?","pathname","search",i)),$e(!i.pathname||!i.pathname.includes("#"),Zc("#","pathname","hash",i)),$e(!i.search||!i.search.includes("#"),Zc("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let c=t.length-1;if(!r&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),c-=1;i.pathname=d.join("/")}a=c>=0?t[c]:"/"}let l=k_(i,a),u=o&&o!=="/"&&o.endsWith("/"),f=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||f)&&(l.pathname+="/"),l}const Fr=e=>e.join("/").replace(/\/\/+/g,"/"),A_=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),R_=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,O_=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function j_(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Ew=["post","put","patch","delete"];new Set(Ew);const N_=["get",...Ew];new Set(N_);/**
49
+ */function pu(){return pu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pu.apply(this,arguments)}var kr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(kr||(kr={}));function f_(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((h,m)=>f(h,typeof h=="string"?null:h.state,m===0?"default":void 0));let s=l(n??i.length-1),o=kr.Pop,a=null;function l(h){return Math.min(Math.max(h,0),i.length-1)}function u(){return i[s]}function f(h,m,v){m===void 0&&(m=null);let b=h_(i?u().pathname:"/",h,m,v);return kp(b.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(h)),b}function c(h){return typeof h=="string"?h:Ld(h)}return{get index(){return s},get action(){return o},get location(){return u()},createHref:c,createURL(h){return new URL(c(h),"http://localhost")},encodeLocation(h){let m=typeof h=="string"?Li(h):h;return{pathname:m.pathname||"",search:m.search||"",hash:m.hash||""}},push(h,m){o=kr.Push;let v=f(h,m);s+=1,i.splice(s,i.length,v),r&&a&&a({action:o,location:v,delta:1})},replace(h,m){o=kr.Replace;let v=f(h,m);i[s]=v,r&&a&&a({action:o,location:v,delta:0})},go(h){o=kr.Pop;let m=l(s+h),v=i[m];s=m,a&&a({action:o,location:v,delta:h})},listen(h){return a=h,()=>{a=null}}}}function $e(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function kp(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function d_(){return Math.random().toString(36).substr(2,8)}function h_(e,t,n,r){return n===void 0&&(n=null),pu({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Li(t):t,{state:n,key:t&&t.key||r||d_()})}function Ld(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Li(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var f0;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(f0||(f0={}));function p_(e,t,n){return n===void 0&&(n="/"),m_(e,t,n,!1)}function m_(e,t,n,r){let i=typeof t=="string"?Li(t):t,s=_p(i.pathname||"/",n);if(s==null)return null;let o=Tw(e);g_(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=__(s);a=C_(o[l],u,r)}return a}function Tw(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(s,o,a)=>{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&($e(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=Fr([r,l.relativePath]),f=n.concat(l);s.children&&s.children.length>0&&($e(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Tw(s.children,t,f,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:T_(u,s.index),routesMeta:f})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of Ew(s.path))i(s,o,l)}),t}function Ew(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=Ew(r.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function g_(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:E_(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const y_=/^:[\w-]+$/,v_=3,x_=2,w_=1,b_=10,S_=-2,d0=e=>e==="*";function T_(e,t){let n=e.split("/"),r=n.length;return n.some(d0)&&(r+=S_),t&&(r+=x_),n.filter(i=>!d0(i)).reduce((i,s)=>i+(y_.test(s)?v_:s===""?w_:b_),r)}function E_(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function C_(e,t,n){let{routesMeta:r}=e,i={},s="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],u=a===r.length-1,f=s==="/"?t:t.slice(s.length)||"/",c=h0({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},f),d=l.route;if(!c&&u&&n&&!r[r.length-1].route.index&&(c=h0({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},f)),!c)return null;Object.assign(i,c.params),o.push({params:i,pathname:Fr([s,c.pathname]),pathnameBase:O_(Fr([s,c.pathnameBase])),route:d}),c.pathnameBase!=="/"&&(s=Fr([s,c.pathnameBase]))}return o}function h0(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=k_(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((u,f,c)=>{let{paramName:d,isOptional:h}=f;if(d==="*"){let v=a[c]||"";o=s.slice(0,s.length-v.length).replace(/(.)\/+$/,"$1")}const m=a[c];return h&&!m?u[d]=void 0:u[d]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:e}}function k_(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),kp(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function __(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return kp(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function _p(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function P_(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Li(e):e;return{pathname:n?n.startsWith("/")?n:A_(n,t):t,search:j_(r),hash:N_(i)}}function A_(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Jc(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function R_(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Cw(e,t){let n=R_(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function kw(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Li(e):(i=pu({},e),$e(!i.pathname||!i.pathname.includes("?"),Jc("?","pathname","search",i)),$e(!i.pathname||!i.pathname.includes("#"),Jc("#","pathname","hash",i)),$e(!i.search||!i.search.includes("#"),Jc("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let c=t.length-1;if(!r&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),c-=1;i.pathname=d.join("/")}a=c>=0?t[c]:"/"}let l=P_(i,a),u=o&&o!=="/"&&o.endsWith("/"),f=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||f)&&(l.pathname+="/"),l}const Fr=e=>e.join("/").replace(/\/\/+/g,"/"),O_=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),j_=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,N_=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function M_(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const _w=["post","put","patch","delete"];new Set(_w);const D_=["get",..._w];new Set(D_);/**
50
50
  * React Router v6.28.0
51
51
  *
52
52
  * Copyright (c) Remix Software Inc.
@@ -55,7 +55,7 @@ Error generating stack: `+s.message+`
55
55
  * LICENSE.md file in the root directory of this source tree.
56
56
  *
57
57
  * @license MIT
58
- */function na(){return na=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},na.apply(this,arguments)}const kp=y.createContext(null),M_=y.createContext(null),Li=y.createContext(null),zu=y.createContext(null),Ii=y.createContext({outlet:null,matches:[],isDataRoute:!1}),Cw=y.createContext(null);function D_(e,t){let{relative:n}=t===void 0?{}:t;Ca()||$e(!1);let{basename:r,navigator:i}=y.useContext(Li),{hash:s,pathname:o,search:a}=Pw(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:Fr([r,o])),i.createHref({pathname:l,search:a,hash:s})}function Ca(){return y.useContext(zu)!=null}function ka(){return Ca()||$e(!1),y.useContext(zu).location}function kw(e){y.useContext(Li).static||y.useLayoutEffect(e)}function _w(){let{isDataRoute:e}=y.useContext(Ii);return e?G_():F_()}function F_(){Ca()||$e(!1);let e=y.useContext(kp),{basename:t,future:n,navigator:r}=y.useContext(Li),{matches:i}=y.useContext(Ii),{pathname:s}=ka(),o=JSON.stringify(Sw(i,n.v7_relativeSplatPath)),a=y.useRef(!1);return kw(()=>{a.current=!0}),y.useCallback(function(u,f){if(f===void 0&&(f={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let c=Tw(u,JSON.parse(o),s,f.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Fr([t,c.pathname])),(f.replace?r.replace:r.push)(c,f.state,f)},[t,r,o,s,e])}function Pw(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=y.useContext(Li),{matches:i}=y.useContext(Ii),{pathname:s}=ka(),o=JSON.stringify(Sw(i,r.v7_relativeSplatPath));return y.useMemo(()=>Tw(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function L_(e,t){return I_(e,t)}function I_(e,t,n,r){Ca()||$e(!1);let{navigator:i}=y.useContext(Li),{matches:s}=y.useContext(Ii),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=ka(),f;if(t){var c;let b=typeof t=="string"?Fi(t):t;l==="/"||(c=b.pathname)!=null&&c.startsWith(l)||$e(!1),f=b}else f=u;let d=f.pathname||"/",h=d;if(l!=="/"){let b=l.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(b.length).join("/")}let m=d_(e,{pathname:h}),x=U_(m&&m.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:Fr([l,i.encodeLocation?i.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:Fr([l,i.encodeLocation?i.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),s,n,r);return t&&x?y.createElement(zu.Provider,{value:{location:na({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:kr.Pop}},x):x}function $_(){let e=q_(),t=j_(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:i},n):null,null)}const V_=y.createElement($_,null);class B_ extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?y.createElement(Ii.Provider,{value:this.props.routeContext},y.createElement(Cw.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function z_(e){let{routeContext:t,match:n,children:r}=e,i=y.useContext(kp);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),y.createElement(Ii.Provider,{value:t},r)}function U_(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if(!n)return null;if(n.errors)e=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let f=o.findIndex(c=>c.route.id&&(a==null?void 0:a[c.route.id])!==void 0);f>=0||$e(!1),o=o.slice(0,Math.min(o.length,f+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f<o.length;f++){let c=o[f];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(u=f),c.route.id){let{loaderData:d,errors:h}=n,m=c.route.loader&&d[c.route.id]===void 0&&(!h||h[c.route.id]===void 0);if(c.route.lazy||m){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((f,c,d)=>{let h,m=!1,x=null,b=null;n&&(h=a&&c.route.id?a[c.route.id]:void 0,x=c.route.errorElement||V_,l&&(u<0&&d===0?(m=!0,b=null):u===d&&(m=!0,b=c.route.hydrateFallbackElement||null)));let p=t.concat(o.slice(0,d+1)),g=()=>{let v;return h?v=x:m?v=b:c.route.Component?v=y.createElement(c.route.Component,null):c.route.element?v=c.route.element:v=f,y.createElement(z_,{match:c,routeContext:{outlet:f,matches:p,isDataRoute:n!=null},children:v})};return n&&(c.route.ErrorBoundary||c.route.errorElement||d===0)?y.createElement(B_,{location:n.location,revalidation:n.revalidation,component:x,error:h,children:g(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):g()},null)}var Aw=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Aw||{}),pu=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(pu||{});function H_(e){let t=y.useContext(kp);return t||$e(!1),t}function W_(e){let t=y.useContext(M_);return t||$e(!1),t}function K_(e){let t=y.useContext(Ii);return t||$e(!1),t}function Rw(e){let t=K_(),n=t.matches[t.matches.length-1];return n.route.id||$e(!1),n.route.id}function q_(){var e;let t=y.useContext(Cw),n=W_(pu.UseRouteError),r=Rw(pu.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function G_(){let{router:e}=H_(Aw.UseNavigateStable),t=Rw(pu.UseNavigateStable),n=y.useRef(!1);return kw(()=>{n.current=!0}),y.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,na({fromRouteId:t},s)))},[e,t])}const d0={};function Q_(e,t){d0[t]||(d0[t]=!0,console.warn(t))}const h0=(e,t,n)=>Q_(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function Y_(e,t){e!=null&&e.v7_startTransition||h0("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),!(e!=null&&e.v7_relativeSplatPath)&&!t&&h0("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}const X_="startTransition",p0=Pf[X_];function Z_(e){let{basename:t,children:n,initialEntries:r,initialIndex:i,future:s}=e,o=y.useRef();o.current==null&&(o.current=u_({initialEntries:r,initialIndex:i,v5Compat:!0}));let a=o.current,[l,u]=y.useState({action:a.action,location:a.location}),{v7_startTransition:f}=s||{},c=y.useCallback(d=>{f&&p0?p0(()=>u(d)):u(d)},[u,f]);return y.useLayoutEffect(()=>a.listen(c),[a,c]),y.useEffect(()=>Y_(s),[s]),y.createElement(J_,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:s})}function Fd(e){$e(!1)}function J_(e){let{basename:t="/",children:n=null,location:r,navigationType:i=kr.Pop,navigator:s,static:o=!1,future:a}=e;Ca()&&$e(!1);let l=t.replace(/^\/*/,"/"),u=y.useMemo(()=>({basename:l,navigator:s,static:o,future:na({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof r=="string"&&(r=Fi(r));let{pathname:f="/",search:c="",hash:d="",state:h=null,key:m="default"}=r,x=y.useMemo(()=>{let b=Cp(f,l);return b==null?null:{location:{pathname:b,search:c,hash:d,state:h,key:m},navigationType:i}},[l,f,c,d,h,m,i]);return x==null?null:y.createElement(Li.Provider,{value:u},y.createElement(zu.Provider,{children:n,value:x}))}function e2(e){let{children:t,location:n}=e;return L_(Ld(t),n)}new Promise(()=>{});function Ld(e,t){t===void 0&&(t=[]);let n=[];return y.Children.forEach(e,(r,i)=>{if(!y.isValidElement(r))return;let s=[...t,i];if(r.type===y.Fragment){n.push.apply(n,Ld(r.props.children,s));return}r.type!==Fd&&$e(!1),!r.props.index||!r.props.children||$e(!1);let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Ld(r.props.children,s)),n.push(o)}),n}/**
58
+ */function ra(){return ra=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ra.apply(this,arguments)}const Pp=y.createContext(null),F_=y.createContext(null),Ii=y.createContext(null),Uu=y.createContext(null),$i=y.createContext({outlet:null,matches:[],isDataRoute:!1}),Pw=y.createContext(null);function L_(e,t){let{relative:n}=t===void 0?{}:t;ka()||$e(!1);let{basename:r,navigator:i}=y.useContext(Ii),{hash:s,pathname:o,search:a}=Ow(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:Fr([r,o])),i.createHref({pathname:l,search:a,hash:s})}function ka(){return y.useContext(Uu)!=null}function _a(){return ka()||$e(!1),y.useContext(Uu).location}function Aw(e){y.useContext(Ii).static||y.useLayoutEffect(e)}function Rw(){let{isDataRoute:e}=y.useContext($i);return e?Y_():I_()}function I_(){ka()||$e(!1);let e=y.useContext(Pp),{basename:t,future:n,navigator:r}=y.useContext(Ii),{matches:i}=y.useContext($i),{pathname:s}=_a(),o=JSON.stringify(Cw(i,n.v7_relativeSplatPath)),a=y.useRef(!1);return Aw(()=>{a.current=!0}),y.useCallback(function(u,f){if(f===void 0&&(f={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let c=kw(u,JSON.parse(o),s,f.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Fr([t,c.pathname])),(f.replace?r.replace:r.push)(c,f.state,f)},[t,r,o,s,e])}function Ow(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=y.useContext(Ii),{matches:i}=y.useContext($i),{pathname:s}=_a(),o=JSON.stringify(Cw(i,r.v7_relativeSplatPath));return y.useMemo(()=>kw(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function $_(e,t){return V_(e,t)}function V_(e,t,n,r){ka()||$e(!1);let{navigator:i}=y.useContext(Ii),{matches:s}=y.useContext($i),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=_a(),f;if(t){var c;let b=typeof t=="string"?Li(t):t;l==="/"||(c=b.pathname)!=null&&c.startsWith(l)||$e(!1),f=b}else f=u;let d=f.pathname||"/",h=d;if(l!=="/"){let b=l.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(b.length).join("/")}let m=p_(e,{pathname:h}),v=W_(m&&m.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:Fr([l,i.encodeLocation?i.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:Fr([l,i.encodeLocation?i.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),s,n,r);return t&&v?y.createElement(Uu.Provider,{value:{location:ra({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:kr.Pop}},v):v}function B_(){let e=Q_(),t=M_(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:i},n):null,null)}const z_=y.createElement(B_,null);class U_ extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?y.createElement($i.Provider,{value:this.props.routeContext},y.createElement(Pw.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function H_(e){let{routeContext:t,match:n,children:r}=e,i=y.useContext(Pp);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),y.createElement($i.Provider,{value:t},r)}function W_(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if(!n)return null;if(n.errors)e=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let f=o.findIndex(c=>c.route.id&&(a==null?void 0:a[c.route.id])!==void 0);f>=0||$e(!1),o=o.slice(0,Math.min(o.length,f+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f<o.length;f++){let c=o[f];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(u=f),c.route.id){let{loaderData:d,errors:h}=n,m=c.route.loader&&d[c.route.id]===void 0&&(!h||h[c.route.id]===void 0);if(c.route.lazy||m){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((f,c,d)=>{let h,m=!1,v=null,b=null;n&&(h=a&&c.route.id?a[c.route.id]:void 0,v=c.route.errorElement||z_,l&&(u<0&&d===0?(m=!0,b=null):u===d&&(m=!0,b=c.route.hydrateFallbackElement||null)));let p=t.concat(o.slice(0,d+1)),g=()=>{let x;return h?x=v:m?x=b:c.route.Component?x=y.createElement(c.route.Component,null):c.route.element?x=c.route.element:x=f,y.createElement(H_,{match:c,routeContext:{outlet:f,matches:p,isDataRoute:n!=null},children:x})};return n&&(c.route.ErrorBoundary||c.route.errorElement||d===0)?y.createElement(U_,{location:n.location,revalidation:n.revalidation,component:v,error:h,children:g(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):g()},null)}var jw=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(jw||{}),mu=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(mu||{});function K_(e){let t=y.useContext(Pp);return t||$e(!1),t}function q_(e){let t=y.useContext(F_);return t||$e(!1),t}function G_(e){let t=y.useContext($i);return t||$e(!1),t}function Nw(e){let t=G_(),n=t.matches[t.matches.length-1];return n.route.id||$e(!1),n.route.id}function Q_(){var e;let t=y.useContext(Pw),n=q_(mu.UseRouteError),r=Nw(mu.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Y_(){let{router:e}=K_(jw.UseNavigateStable),t=Nw(mu.UseNavigateStable),n=y.useRef(!1);return Aw(()=>{n.current=!0}),y.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,ra({fromRouteId:t},s)))},[e,t])}const p0={};function X_(e,t){p0[t]||(p0[t]=!0,console.warn(t))}const m0=(e,t,n)=>X_(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function Z_(e,t){e!=null&&e.v7_startTransition||m0("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),!(e!=null&&e.v7_relativeSplatPath)&&!t&&m0("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}const J_="startTransition",g0=Rf[J_];function e2(e){let{basename:t,children:n,initialEntries:r,initialIndex:i,future:s}=e,o=y.useRef();o.current==null&&(o.current=f_({initialEntries:r,initialIndex:i,v5Compat:!0}));let a=o.current,[l,u]=y.useState({action:a.action,location:a.location}),{v7_startTransition:f}=s||{},c=y.useCallback(d=>{f&&g0?g0(()=>u(d)):u(d)},[u,f]);return y.useLayoutEffect(()=>a.listen(c),[a,c]),y.useEffect(()=>Z_(s),[s]),y.createElement(t2,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:s})}function Id(e){$e(!1)}function t2(e){let{basename:t="/",children:n=null,location:r,navigationType:i=kr.Pop,navigator:s,static:o=!1,future:a}=e;ka()&&$e(!1);let l=t.replace(/^\/*/,"/"),u=y.useMemo(()=>({basename:l,navigator:s,static:o,future:ra({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof r=="string"&&(r=Li(r));let{pathname:f="/",search:c="",hash:d="",state:h=null,key:m="default"}=r,v=y.useMemo(()=>{let b=_p(f,l);return b==null?null:{location:{pathname:b,search:c,hash:d,state:h,key:m},navigationType:i}},[l,f,c,d,h,m,i]);return v==null?null:y.createElement(Ii.Provider,{value:u},y.createElement(Uu.Provider,{children:n,value:v}))}function n2(e){let{children:t,location:n}=e;return $_($d(t),n)}new Promise(()=>{});function $d(e,t){t===void 0&&(t=[]);let n=[];return y.Children.forEach(e,(r,i)=>{if(!y.isValidElement(r))return;let s=[...t,i];if(r.type===y.Fragment){n.push.apply(n,$d(r.props.children,s));return}r.type!==Id&&$e(!1),!r.props.index||!r.props.children||$e(!1);let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=$d(r.props.children,s)),n.push(o)}),n}/**
59
59
  * React Router DOM v6.28.0
60
60
  *
61
61
  * Copyright (c) Remix Software Inc.
@@ -64,7 +64,7 @@ Error generating stack: `+s.message+`
64
64
  * LICENSE.md file in the root directory of this source tree.
65
65
  *
66
66
  * @license MIT
67
- */function Id(){return Id=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Id.apply(this,arguments)}function t2(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function n2(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function r2(e,t){return e.button===0&&(!t||t==="_self")&&!n2(e)}const i2=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],s2="6";try{window.__reactRouterVersion=s2}catch{}const o2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",a2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,l2=y.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:u,preventScrollReset:f,viewTransition:c}=t,d=t2(t,i2),{basename:h}=y.useContext(Li),m,x=!1;if(typeof u=="string"&&a2.test(u)&&(m=u,o2))try{let v=new URL(window.location.href),E=u.startsWith("//")?new URL(v.protocol+u):new URL(u),S=Cp(E.pathname,h);E.origin===v.origin&&S!=null?u=S+E.search+E.hash:x=!0}catch{}let b=D_(u,{relative:i}),p=u2(u,{replace:o,state:a,target:l,preventScrollReset:f,relative:i,viewTransition:c});function g(v){r&&r(v),v.defaultPrevented||p(v)}return y.createElement("a",Id({},d,{href:m||b,onClick:x||s?r:g,ref:n,target:l}))});var m0;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(m0||(m0={}));var g0;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(g0||(g0={}));function u2(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:a}=t===void 0?{}:t,l=_w(),u=ka(),f=Pw(e,{relative:o});return y.useCallback(c=>{if(r2(c,n)){c.preventDefault();let d=r!==void 0?r:Dd(u)===Dd(f);l(e,{replace:d,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[u,l,f,r,i,n,e,s,o,a])}const c2={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},y0=e=>{let t;const n=new Set,r=(f,c)=>{const d=typeof f=="function"?f(t):f;if(!Object.is(d,t)){const h=t;t=c??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(m=>m(t,h))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>u,subscribe:f=>(n.add(f),()=>n.delete(f)),destroy:()=>{(c2?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,i,l);return l},f2=e=>e?y0(e):y0;var Ow={exports:{}},jw={},Nw={exports:{}},Mw={};/**
67
+ */function Vd(){return Vd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vd.apply(this,arguments)}function r2(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function i2(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function s2(e,t){return e.button===0&&(!t||t==="_self")&&!i2(e)}const o2=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],a2="6";try{window.__reactRouterVersion=a2}catch{}const l2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",u2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,c2=y.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:u,preventScrollReset:f,viewTransition:c}=t,d=r2(t,o2),{basename:h}=y.useContext(Ii),m,v=!1;if(typeof u=="string"&&u2.test(u)&&(m=u,l2))try{let x=new URL(window.location.href),E=u.startsWith("//")?new URL(x.protocol+u):new URL(u),S=_p(E.pathname,h);E.origin===x.origin&&S!=null?u=S+E.search+E.hash:v=!0}catch{}let b=L_(u,{relative:i}),p=f2(u,{replace:o,state:a,target:l,preventScrollReset:f,relative:i,viewTransition:c});function g(x){r&&r(x),x.defaultPrevented||p(x)}return y.createElement("a",Vd({},d,{href:m||b,onClick:v||s?r:g,ref:n,target:l}))});var y0;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(y0||(y0={}));var v0;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(v0||(v0={}));function f2(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:a}=t===void 0?{}:t,l=Rw(),u=_a(),f=Ow(e,{relative:o});return y.useCallback(c=>{if(s2(c,n)){c.preventDefault();let d=r!==void 0?r:Ld(u)===Ld(f);l(e,{replace:d,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[u,l,f,r,i,n,e,s,o,a])}const d2={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},x0=e=>{let t;const n=new Set,r=(f,c)=>{const d=typeof f=="function"?f(t):f;if(!Object.is(d,t)){const h=t;t=c??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(m=>m(t,h))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>u,subscribe:f=>(n.add(f),()=>n.delete(f)),destroy:()=>{(d2?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,i,l);return l},h2=e=>e?x0(e):x0;var Mw={exports:{}},Dw={},Fw={exports:{}},Lw={};/**
68
68
  * @license React
69
69
  * use-sync-external-store-shim.production.min.js
70
70
  *
@@ -72,7 +72,7 @@ Error generating stack: `+s.message+`
72
72
  *
73
73
  * This source code is licensed under the MIT license found in the
74
74
  * LICENSE file in the root directory of this source tree.
75
- */var Bs=y;function d2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var h2=typeof Object.is=="function"?Object.is:d2,p2=Bs.useState,m2=Bs.useEffect,g2=Bs.useLayoutEffect,y2=Bs.useDebugValue;function v2(e,t){var n=t(),r=p2({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return g2(function(){i.value=n,i.getSnapshot=t,Jc(i)&&s({inst:i})},[e,n,t]),m2(function(){return Jc(i)&&s({inst:i}),e(function(){Jc(i)&&s({inst:i})})},[e]),y2(n),n}function Jc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!h2(e,n)}catch{return!0}}function x2(e,t){return t()}var w2=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?x2:v2;Mw.useSyncExternalStore=Bs.useSyncExternalStore!==void 0?Bs.useSyncExternalStore:w2;Nw.exports=Mw;var b2=Nw.exports;/**
75
+ */var zs=y;function p2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var m2=typeof Object.is=="function"?Object.is:p2,g2=zs.useState,y2=zs.useEffect,v2=zs.useLayoutEffect,x2=zs.useDebugValue;function w2(e,t){var n=t(),r=g2({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return v2(function(){i.value=n,i.getSnapshot=t,ef(i)&&s({inst:i})},[e,n,t]),y2(function(){return ef(i)&&s({inst:i}),e(function(){ef(i)&&s({inst:i})})},[e]),x2(n),n}function ef(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!m2(e,n)}catch{return!0}}function b2(e,t){return t()}var S2=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?b2:w2;Lw.useSyncExternalStore=zs.useSyncExternalStore!==void 0?zs.useSyncExternalStore:S2;Fw.exports=Lw;var T2=Fw.exports;/**
76
76
  * @license React
77
77
  * use-sync-external-store-shim/with-selector.production.min.js
78
78
  *
@@ -80,11 +80,11 @@ Error generating stack: `+s.message+`
80
80
  *
81
81
  * This source code is licensed under the MIT license found in the
82
82
  * LICENSE file in the root directory of this source tree.
83
- */var Uu=y,S2=b2;function T2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var E2=typeof Object.is=="function"?Object.is:T2,C2=S2.useSyncExternalStore,k2=Uu.useRef,_2=Uu.useEffect,P2=Uu.useMemo,A2=Uu.useDebugValue;jw.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=k2(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=P2(function(){function l(h){if(!u){if(u=!0,f=h,h=r(h),i!==void 0&&o.hasValue){var m=o.value;if(i(m,h))return c=m}return c=h}if(m=c,E2(f,h))return m;var x=r(h);return i!==void 0&&i(m,x)?m:(f=h,c=x)}var u=!1,f,c,d=n===void 0?null:n;return[function(){return l(t())},d===null?void 0:function(){return l(d())}]},[t,n,r,i]);var a=C2(e,s[0],s[1]);return _2(function(){o.hasValue=!0,o.value=a},[a]),A2(a),a};Ow.exports=jw;var R2=Ow.exports;const O2=Ws(R2),Dw={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:j2}=R,{useSyncExternalStoreWithSelector:N2}=O2;let v0=!1;const M2=e=>e;function D2(e,t=M2,n){(Dw?"production":void 0)!=="production"&&n&&!v0&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),v0=!0);const r=N2(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return j2(r),r}const x0=e=>{(Dw?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?f2(e):e,n=(r,i)=>D2(t,r,i);return Object.assign(n,t),n},F2=e=>e?x0(e):x0,tn=F2(e=>({widget:null,open:localStorage.getItem("lc:widget:open")==="true",isHaveChat:localStorage.getItem("lc:widget:isHaveChat")==="true",defaultValues:{},setOpen:t=>{e({open:t}),localStorage.setItem("lc:widget:open",t.toString())},setWidget:t=>e({widget:t}),setDefaultValues:t=>e({defaultValues:t}),setIsHaveChat:t=>{e({isHaveChat:t}),localStorage.setItem("lc:widget:isHaveChat",t.toString())}})),L2={xs:{default:"!p-1",rounded:"!p-1"},sm:{default:"text-xs px-2.5 py-1.5",rounded:"p-1.5"},md:{default:"text-sm px-3 py-2",rounded:"p-2"},lg:{default:"text-sm px-4 py-2.5",rounded:"p-2.5"},xl:{default:"text-base px-5 py-3",rounded:"p-3"}},w0={primary:{solid:"bg-blue-600 border border-transparent text-white hover:bg-blue-700 disabled:bg-blue-100 disabled:text-blue-500",outline:"bg-transparent border border-blue-600 text-blue-600 hover:bg-blue-100 disabled:bg-blue-50 disabled:text-blue-300 disabled:border-blue-100",subtle:"bg-blue-100 border border-transparent text-blue-500 hover:bg-blue-200 disabled:bg-blue-50 disabled:text-blue-300",link:"hover:underline px-1.5 py-0 text-blue-500 disabled:text-blue-300 bg-transparent !border-none"},secondary:{solid:"bg-zink-400 border border-transparent text-white hover:bg-zink-500 disabled:bg-zink-100 disabled:text-zink-500",outline:"bg-transparent border border-gray-600 text-gray-600 hover:bg-gray-100 disabled:bg-gray-50 disabled:text-gray-300 disabled:border-gray-100",subtle:"bg-gray-100 border border-transparent text-gray-500 hover:bg-gray-200 disabled:bg-gray-50 disabled:text-gray-300",link:"hover:underline px-1.5 py-0 text-gray-500 disabled:text-gray-300 bg-transparent !border-none"},danger:{solid:"bg-red-600 border border-transparent text-white hover:bg-red-700 disabled:bg-red-100 disabled:text-red-500",outline:"bg-transparent border border-red-600 text-red-600 hover:bg-red-100 disabled:bg-red-50 disabled:text-red-300 disabled:border-red-100",subtle:"bg-red-100 border border-transparent text-red-500 hover:bg-red-200 disabled:bg-red-50 disabled:text-red-300",link:"hover:underline px-1.5 py-0 text-red-500 disabled:text-red-300 bg-transparent !border-none"},success:{solid:"bg-green-600 border border-transparent text-white hover:bg-green-700 disabled:bg-green-100 disabled:text-green-500",outline:"bg-transparent border border-green-600 text-green-600 hover:bg-green-100 disabled:bg-green-50 disabled:text-green-300 disabled:border-green-100",subtle:"bg-green-100 border border-transparent text-green-500 hover:bg-green-200 disabled:bg-green-50 disabled:text-green-300",link:"hover:underline px-1.5 py-0 text-green-500 disabled:text-green-300 bg-transparent !border-none"},warning:{solid:"bg-yellow-600 border border-transparent text-white hover:bg-yellow-700 disabled:bg-yellow-100 disabled:text-yellow-500",outline:"bg-transparent border border-yellow-600 text-yellow-600 hover:bg-yellow-100 disabled:bg-yellow-50 disabled:text-yellow-300 disabled:border-yellow-100",subtle:"bg-yellow-100 border border-transparent text-yellow-500 hover:bg-yellow-200 disabled:bg-yellow-50 disabled:text-yellow-300",link:"hover:underline px-1.5 py-0 text-yellow-500 disabled:text-yellow-300 bg-transparent !border-none"}};var Fw={exports:{}};/*!
83
+ */var Hu=y,E2=T2;function C2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var k2=typeof Object.is=="function"?Object.is:C2,_2=E2.useSyncExternalStore,P2=Hu.useRef,A2=Hu.useEffect,R2=Hu.useMemo,O2=Hu.useDebugValue;Dw.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=P2(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=R2(function(){function l(h){if(!u){if(u=!0,f=h,h=r(h),i!==void 0&&o.hasValue){var m=o.value;if(i(m,h))return c=m}return c=h}if(m=c,k2(f,h))return m;var v=r(h);return i!==void 0&&i(m,v)?m:(f=h,c=v)}var u=!1,f,c,d=n===void 0?null:n;return[function(){return l(t())},d===null?void 0:function(){return l(d())}]},[t,n,r,i]);var a=_2(e,s[0],s[1]);return A2(function(){o.hasValue=!0,o.value=a},[a]),O2(a),a};Mw.exports=Dw;var j2=Mw.exports;const N2=Ks(j2),Iw={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:M2}=R,{useSyncExternalStoreWithSelector:D2}=N2;let w0=!1;const F2=e=>e;function L2(e,t=F2,n){(Iw?"production":void 0)!=="production"&&n&&!w0&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),w0=!0);const r=D2(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return M2(r),r}const b0=e=>{(Iw?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?h2(e):e,n=(r,i)=>L2(t,r,i);return Object.assign(n,t),n},I2=e=>e?b0(e):b0,tn=I2(e=>({widget:null,open:localStorage.getItem("lc:widget:open")==="true",isHaveChat:localStorage.getItem("lc:widget:isHaveChat")==="true",defaultValues:{},soundPath:void 0,setOpen:t=>{e({open:t}),localStorage.setItem("lc:widget:open",t.toString())},setWidget:t=>e({widget:t}),setDefaultValues:t=>e({defaultValues:t}),setIsHaveChat:t=>{e({isHaveChat:t}),localStorage.setItem("lc:widget:isHaveChat",t.toString())},setSoundPath:t=>{e({soundPath:t})}})),$2={xs:{default:"!p-1",rounded:"!p-1"},sm:{default:"text-xs px-2.5 py-1.5",rounded:"p-1.5"},md:{default:"text-sm px-3 py-2",rounded:"p-2"},lg:{default:"text-sm px-4 py-2.5",rounded:"p-2.5"},xl:{default:"text-base px-5 py-3",rounded:"p-3"}},S0={primary:{solid:"bg-blue-600 border border-transparent text-white hover:bg-blue-700 disabled:bg-blue-100 disabled:text-blue-500",outline:"bg-transparent border border-blue-600 text-blue-600 hover:bg-blue-100 disabled:bg-blue-50 disabled:text-blue-300 disabled:border-blue-100",subtle:"bg-blue-100 border border-transparent text-blue-500 hover:bg-blue-200 disabled:bg-blue-50 disabled:text-blue-300",link:"hover:underline px-1.5 py-0 text-blue-500 disabled:text-blue-300 bg-transparent !border-none"},secondary:{solid:"bg-zink-400 border border-transparent text-white hover:bg-zink-500 disabled:bg-zink-100 disabled:text-zink-500",outline:"bg-transparent border border-gray-600 text-gray-600 hover:bg-gray-100 disabled:bg-gray-50 disabled:text-gray-300 disabled:border-gray-100",subtle:"bg-gray-100 border border-transparent text-gray-500 hover:bg-gray-200 disabled:bg-gray-50 disabled:text-gray-300",link:"hover:underline px-1.5 py-0 text-gray-500 disabled:text-gray-300 bg-transparent !border-none"},danger:{solid:"bg-red-600 border border-transparent text-white hover:bg-red-700 disabled:bg-red-100 disabled:text-red-500",outline:"bg-transparent border border-red-600 text-red-600 hover:bg-red-100 disabled:bg-red-50 disabled:text-red-300 disabled:border-red-100",subtle:"bg-red-100 border border-transparent text-red-500 hover:bg-red-200 disabled:bg-red-50 disabled:text-red-300",link:"hover:underline px-1.5 py-0 text-red-500 disabled:text-red-300 bg-transparent !border-none"},success:{solid:"bg-green-600 border border-transparent text-white hover:bg-green-700 disabled:bg-green-100 disabled:text-green-500",outline:"bg-transparent border border-green-600 text-green-600 hover:bg-green-100 disabled:bg-green-50 disabled:text-green-300 disabled:border-green-100",subtle:"bg-green-100 border border-transparent text-green-500 hover:bg-green-200 disabled:bg-green-50 disabled:text-green-300",link:"hover:underline px-1.5 py-0 text-green-500 disabled:text-green-300 bg-transparent !border-none"},warning:{solid:"bg-yellow-600 border border-transparent text-white hover:bg-yellow-700 disabled:bg-yellow-100 disabled:text-yellow-500",outline:"bg-transparent border border-yellow-600 text-yellow-600 hover:bg-yellow-100 disabled:bg-yellow-50 disabled:text-yellow-300 disabled:border-yellow-100",subtle:"bg-yellow-100 border border-transparent text-yellow-500 hover:bg-yellow-200 disabled:bg-yellow-50 disabled:text-yellow-300",link:"hover:underline px-1.5 py-0 text-yellow-500 disabled:text-yellow-300 bg-transparent !border-none"}};var $w={exports:{}};/*!
84
84
  Copyright (c) 2018 Jed Watson.
85
85
  Licensed under the MIT License (MIT), see
86
86
  http://jedwatson.github.io/classnames
87
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(s=i(s,r(a)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var a in s)t.call(s,a)&&s[a]&&(o=i(o,a));return o}function i(s,o){return o?s?s+" "+o:s+o:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Fw);var I2=Fw.exports;const Ne=Ws(I2),_p=y.createContext({});function Pp(e){const t=y.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ap=typeof window<"u",Lw=Ap?y.useLayoutEffect:y.useEffect,Hu=y.createContext(null),Rp=y.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class $2 extends y.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=r instanceof HTMLElement&&r.offsetWidth||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=i-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function V2({children:e,isPresent:t,anchorX:n}){const r=y.useId(),i=y.useRef(null),s=y.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:o}=y.useContext(Rp);return y.useInsertionEffect(()=>{const{width:a,height:l,top:u,left:f,right:c}=s.current;if(t||!i.current||!a||!l)return;const d=n==="left"?`left: ${f}`:`right: ${c}`;i.current.dataset.motionPopId=r;const h=document.createElement("style");return o&&(h.nonce=o),document.head.appendChild(h),h.sheet&&h.sheet.insertRule(`
87
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(s=i(s,r(a)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var a in s)t.call(s,a)&&s[a]&&(o=i(o,a));return o}function i(s,o){return o?s?s+" "+o:s+o:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})($w);var V2=$w.exports;const Ne=Ks(V2),Ap=y.createContext({});function Rp(e){const t=y.useRef(null);return t.current===null&&(t.current=e()),t.current}const Op=typeof window<"u",Vw=Op?y.useLayoutEffect:y.useEffect,Wu=y.createContext(null),jp=y.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class B2 extends y.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=r instanceof HTMLElement&&r.offsetWidth||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=i-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function z2({children:e,isPresent:t,anchorX:n}){const r=y.useId(),i=y.useRef(null),s=y.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:o}=y.useContext(jp);return y.useInsertionEffect(()=>{const{width:a,height:l,top:u,left:f,right:c}=s.current;if(t||!i.current||!a||!l)return;const d=n==="left"?`left: ${f}`:`right: ${c}`;i.current.dataset.motionPopId=r;const h=document.createElement("style");return o&&(h.nonce=o),document.head.appendChild(h),h.sheet&&h.sheet.insertRule(`
88
88
  [data-motion-pop-id="${r}"] {
89
89
  position: absolute !important;
90
90
  width: ${a}px !important;
@@ -92,19 +92,19 @@ Error generating stack: `+s.message+`
92
92
  ${d}px !important;
93
93
  top: ${u}px !important;
94
94
  }
95
- `),()=>{document.head.removeChild(h)}},[t]),w.jsx($2,{isPresent:t,childRef:i,sizeRef:s,children:y.cloneElement(e,{ref:i})})}const B2=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a})=>{const l=Pp(z2),u=y.useId();let f=!0,c=y.useMemo(()=>(f=!1,{id:u,initial:t,isPresent:n,custom:i,onExitComplete:d=>{l.set(d,!0);for(const h of l.values())if(!h)return;r&&r()},register:d=>(l.set(d,!1),()=>l.delete(d))}),[n,l,r]);return s&&f&&(c={...c}),y.useMemo(()=>{l.forEach((d,h)=>l.set(h,!1))},[n]),y.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o==="popLayout"&&(e=w.jsx(V2,{isPresent:n,anchorX:a,children:e})),w.jsx(Hu.Provider,{value:c,children:e})};function z2(){return new Map}function Iw(e=!0){const t=y.useContext(Hu);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=y.useId();y.useEffect(()=>{if(e)return i(s)},[e]);const o=y.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const ol=e=>e.key||"";function b0(e){const t=[];return y.Children.forEach(e,n=>{y.isValidElement(n)&&t.push(n)}),t}const ji=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left"})=>{const[l,u]=Iw(o),f=y.useMemo(()=>b0(e),[e]),c=o&&!l?[]:f.map(ol),d=y.useRef(!0),h=y.useRef(f),m=Pp(()=>new Map),[x,b]=y.useState(f),[p,g]=y.useState(f);Lw(()=>{d.current=!1,h.current=f;for(let S=0;S<p.length;S++){const C=ol(p[S]);c.includes(C)?m.delete(C):m.get(C)!==!0&&m.set(C,!1)}},[p,c.length,c.join("-")]);const v=[];if(f!==x){let S=[...f];for(let C=0;C<p.length;C++){const k=p[C],P=ol(k);c.includes(P)||(S.splice(C,0,k),v.push(k))}return s==="wait"&&v.length&&(S=v),g(b0(S)),b(f),null}const{forceRender:E}=y.useContext(_p);return w.jsx(w.Fragment,{children:p.map(S=>{const C=ol(S),k=o&&!l?!1:f===p||c.includes(C),P=()=>{if(m.has(C))m.set(C,!0);else return;let j=!0;m.forEach(N=>{N||(j=!1)}),j&&(E==null||E(),g(h.current),o&&(u==null||u()),r&&r())};return w.jsx(B2,{isPresent:k,initial:!d.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,onExitComplete:k?void 0:P,anchorX:a,children:S},C)})})};function Op(e,t){e.indexOf(t)===-1&&e.push(t)}function jp(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let $d=()=>{};const Vd={skipAnimations:!1,useManualTiming:!1};function Np(e){let t;return()=>(t===void 0&&(t=e()),t)}const Zt=e=>e,ra=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Mp{constructor(){this.subscriptions=[]}add(t){return Op(this.subscriptions,t),()=>jp(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;s<i;s++){const o=this.subscriptions[s];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const An=e=>e*1e3,Rn=e=>e/1e3;function $w(e,t){return t?e*(1e3/t):0}const U2=Np(()=>window.ScrollTimeline!==void 0);class H2{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(i=>{if(U2()&&i.attachTimeline)return i.attachTimeline(t);if(typeof n=="function")return n(i)});return()=>{r.forEach((i,s)=>{i&&i(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class W2 extends H2{then(t,n){return this.finished.finally(t).then(()=>{})}}const S0={value:null,addProjectionMetrics:null},Dp=e=>Array.isArray(e)&&typeof e[0]=="number",K2={};function q2(e,t){const n=Np(e);return()=>K2[t]??n()}const ia=q2(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Vw=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s<i;s++)r+=e(s/(i-1))+", ";return`linear(${r.substring(0,r.length-2)})`},xo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Bd={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:xo([0,.65,.55,1]),circOut:xo([.55,0,1,.45]),backIn:xo([.31,.01,.66,-.59]),backOut:xo([.33,1.53,.69,.99])};function Bw(e,t){if(e)return typeof e=="function"&&ia()?Vw(e,t):Dp(e)?xo(e):Array.isArray(e)?e.map(n=>Bw(n,t)||Bd.easeOut):Bd[e]}function G2(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeInOut",times:l}={},u=void 0){const f={[t]:n};l&&(f.offset=l);const c=Bw(a,i);return Array.isArray(c)&&(f.easing=c),e.animate(f,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal",pseudoElement:u})}function Fp(e){return typeof e=="function"&&"applyToOptions"in e}function Lp(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const mu=2e4;function Ip(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<mu;)t+=n,r=e.next(t);return t>=mu?1/0:t}function Q2(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Ip(r),mu);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:Rn(i)}}function zw(e){return!!(typeof e=="function"&&ia()||!e||typeof e=="string"&&(e in Bd||ia())||Dp(e)||Array.isArray(e)&&e.every(zw))}function T0(e,t){e.timeline=t,e.onfinish=null}const al=["read","resolveKeyframes","update","preRender","render","postRender"];function Y2(e,t){let n=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(c){o.has(c)&&(f.schedule(c),e()),l++,c(a)}const f={schedule:(c,d=!1,h=!1)=>{const x=h&&i?n:r;return d&&o.add(c),x.has(c)||x.add(c),c},cancel:c=>{r.delete(c),o.delete(c)},process:c=>{if(a=c,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(u),t&&S0.value&&S0.value.frameloop[t].push(l),l=0,n.clear(),i=!1,s&&(s=!1,f.process(c))}};return f}const X2=40;function Uw(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=al.reduce((p,g)=>(p[g]=Y2(s,t?g:void 0),p),{}),{read:a,resolveKeyframes:l,update:u,preRender:f,render:c,postRender:d}=o,h=()=>{const p=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(p-i.timestamp,X2),1),i.timestamp=p,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),f.process(i),c.process(i),d.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},m=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:al.reduce((p,g)=>{const v=o[g];return p[g]=(E,S=!1,C=!1)=>(n||m(),v.schedule(E,S,C)),p},{}),cancel:p=>{for(let g=0;g<al.length;g++)o[al[g]].cancel(p)},state:i,steps:o}}const{schedule:$p,cancel:M4}=Uw(queueMicrotask,!1),{schedule:he,cancel:zr,state:Ge,steps:ef}=Uw(typeof requestAnimationFrame<"u"?requestAnimationFrame:Zt,!0);let Rl;function Z2(){Rl=void 0}const On={now:()=>(Rl===void 0&&On.set(Ge.isProcessing||Vd.useManualTiming?Ge.timestamp:performance.now()),Rl),set:e=>{Rl=e,queueMicrotask(Z2)}},an={x:!1,y:!1};function Hw(){return an.x||an.y}function J2(e){return e==="x"||e==="y"?an[e]?null:(an[e]=!0,()=>{an[e]=!1}):an.x||an.y?null:(an.x=an.y=!0,()=>{an.x=an.y=!1})}function eP(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){const i=document.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function Ww(e,t){const n=eP(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function E0(e){return!(e.pointerType==="touch"||Hw())}function tP(e,t,n={}){const[r,i,s]=Ww(e,n),o=a=>{if(!E0(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const f=c=>{E0(c)&&(u(c),l.removeEventListener("pointerleave",f))};l.addEventListener("pointerleave",f,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const Kw=(e,t)=>t?e===t?!0:Kw(e,t.parentElement):!1,Vp=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,nP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function rP(e){return nP.has(e.tagName)||e.tabIndex!==-1}const wo=new WeakSet;function C0(e){return t=>{t.key==="Enter"&&e(t)}}function tf(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const iP=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=C0(()=>{if(wo.has(n))return;tf(n,"down");const i=C0(()=>{tf(n,"up")}),s=()=>tf(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function k0(e){return Vp(e)&&!Hw()}function sP(e,t,n={}){const[r,i,s]=Ww(e,n),o=a=>{const l=a.currentTarget;if(!k0(a)||wo.has(l))return;wo.add(l);const u=t(l,a),f=(h,m)=>{window.removeEventListener("pointerup",c),window.removeEventListener("pointercancel",d),!(!k0(h)||!wo.has(l))&&(wo.delete(l),typeof u=="function"&&u(h,{success:m}))},c=h=>{f(h,l===window||l===document||n.useGlobalTarget||Kw(l,h.target))},d=h=>{f(h,!1)};window.addEventListener("pointerup",c,i),window.addEventListener("pointercancel",d,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),a instanceof HTMLElement&&(a.addEventListener("focus",u=>iP(u,i)),!rP(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}const _0=30,oP=e=>!isNaN(parseFloat(e));class aP{constructor(t,n={}){this.version="12.7.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=On.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=On.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=oP(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Mp);const r=this.events[t].add(n);return t==="change"?()=>{r(),he.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=On.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>_0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,_0);return $w(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function sa(e,t){return new aP(e,t)}const qw=y.createContext({strict:!1}),P0={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},zs={};for(const e in P0)zs[e]={isEnabled:t=>P0[e].some(n=>!!t[n])};function lP(e){for(const t in e)zs[t]={...zs[t],...e[t]}}const uP=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function gu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||uP.has(e)}let Gw=e=>!gu(e);function cP(e){e&&(Gw=t=>t.startsWith("on")?!gu(t):e(t))}try{cP(require("@emotion/is-prop-valid").default)}catch{}function fP(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Gw(i)||n===!0&&gu(i)||!t&&!gu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function dP(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}const Wu=y.createContext({});function Ku(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function oa(e){return typeof e=="string"||Array.isArray(e)}const Bp=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],zp=["initial",...Bp];function qu(e){return Ku(e.animate)||zp.some(t=>oa(e[t]))}function Qw(e){return!!(qu(e)||e.variants)}function hP(e,t){if(qu(e)){const{initial:n,animate:r}=e;return{initial:n===!1||oa(n)?n:void 0,animate:oa(r)?r:void 0}}return e.inherit!==!1?t:{}}function pP(e){const{initial:t,animate:n}=hP(e,y.useContext(Wu));return y.useMemo(()=>({initial:t,animate:n}),[A0(t),A0(n)])}function A0(e){return Array.isArray(e)?e.join(" "):e}const mP=Symbol.for("motionComponentSymbol");function ls(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function gP(e,t,n){return y.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):ls(n)&&(n.current=r))},[t])}const Up=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),yP="framerAppearId",Yw="data-"+Up(yP),Xw=y.createContext({});function vP(e,t,n,r,i){var x,b;const{visualElement:s}=y.useContext(Wu),o=y.useContext(qw),a=y.useContext(Hu),l=y.useContext(Rp).reducedMotion,u=y.useRef(null);r=r||o.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const f=u.current,c=y.useContext(Xw);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&xP(u.current,n,i,c);const d=y.useRef(!1);y.useInsertionEffect(()=>{f&&d.current&&f.update(n,a)});const h=n[Yw],m=y.useRef(!!h&&!((x=window.MotionHandoffIsComplete)!=null&&x.call(window,h))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,h)));return Lw(()=>{f&&(d.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),$p.render(f.render),m.current&&f.animationState&&f.animationState.animateChanges())}),y.useEffect(()=>{f&&(!m.current&&f.animationState&&f.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var p;(p=window.MotionHandoffMarkAsComplete)==null||p.call(window,h)}),m.current=!1))}),f}function xP(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Zw(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&ls(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:f,layoutScroll:l,layoutRoot:u})}function Zw(e){if(e)return e.options.allowProjection!==!1?e.projection:Zw(e.parent)}function wP({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&lP(e);function s(a,l){let u;const f={...y.useContext(Rp),...a,layoutId:bP(a)},{isStatic:c}=f,d=pP(a),h=r(a,c);if(!c&&Ap){SP();const m=TP(f);u=m.MeasureLayout,d.visualElement=vP(i,h,f,t,m.ProjectionNode)}return w.jsxs(Wu.Provider,{value:d,children:[u&&d.visualElement?w.jsx(u,{visualElement:d.visualElement,...f}):null,n(i,a,gP(h,d.visualElement,l),h,c,d.visualElement)]})}s.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const o=y.forwardRef(s);return o[mP]=i,o}function bP({layoutId:e}){const t=y.useContext(_p).id;return t&&e!==void 0?t+"-"+e:e}function SP(e,t){y.useContext(qw).strict}function TP(e){const{drag:t,layout:n}=zs;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Jw=e=>t=>typeof t=="string"&&t.startsWith(e),Hp=Jw("--"),EP=Jw("var(--"),Wp=e=>EP(e)?CP.test(e.split("/*")[0].trim()):!1,CP=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,aa={};function kP(e){for(const t in e)aa[t]=e[t],Hp(t)&&(aa[t].isCSSVariable=!0)}const Ys=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],$i=new Set(Ys);function eb(e,{layout:t,layoutId:n}){return $i.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!aa[e]||e==="opacity")}const it=e=>!!(e&&e.getVelocity),tb=(e,t)=>t&&typeof e=="number"?t.transform(e):e,er=(e,t,n)=>n>t?t:n<e?e:n,Xs={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},la={...Xs,transform:e=>er(0,1,e)},ll={...Xs,default:1},_a=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ur=_a("deg"),jn=_a("%"),W=_a("px"),_P=_a("vh"),PP=_a("vw"),R0={...jn,parse:e=>jn.parse(e)/100,transform:e=>jn.transform(e*100)},AP={borderWidth:W,borderTopWidth:W,borderRightWidth:W,borderBottomWidth:W,borderLeftWidth:W,borderRadius:W,radius:W,borderTopLeftRadius:W,borderTopRightRadius:W,borderBottomRightRadius:W,borderBottomLeftRadius:W,width:W,maxWidth:W,height:W,maxHeight:W,top:W,right:W,bottom:W,left:W,padding:W,paddingTop:W,paddingRight:W,paddingBottom:W,paddingLeft:W,margin:W,marginTop:W,marginRight:W,marginBottom:W,marginLeft:W,backgroundPositionX:W,backgroundPositionY:W},RP={rotate:ur,rotateX:ur,rotateY:ur,rotateZ:ur,scale:ll,scaleX:ll,scaleY:ll,scaleZ:ll,skew:ur,skewX:ur,skewY:ur,distance:W,translateX:W,translateY:W,translateZ:W,x:W,y:W,z:W,perspective:W,transformPerspective:W,opacity:la,originX:R0,originY:R0,originZ:W},O0={...Xs,transform:Math.round},Kp={...AP,...RP,zIndex:O0,size:W,fillOpacity:la,strokeOpacity:la,numOctaves:O0},OP={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},jP=Ys.length;function NP(e,t,n){let r="",i=!0;for(let s=0;s<jP;s++){const o=Ys[s],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=tb(a,Kp[o]);if(!l){i=!1;const f=OP[o]||o;r+=`${f}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function qp(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let o=!1,a=!1;for(const l in t){const u=t[l];if($i.has(l)){o=!0;continue}else if(Hp(l)){i[l]=u;continue}else{const f=tb(u,Kp[l]);l.startsWith("origin")?(a=!0,s[l]=f):r[l]=f}}if(t.transform||(o||n?r.transform=NP(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:f=0}=s;r.transformOrigin=`${l} ${u} ${f}`}}const Gp=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function nb(e,t,n){for(const r in t)!it(t[r])&&!eb(r,n)&&(e[r]=t[r])}function MP({transformTemplate:e},t){return y.useMemo(()=>{const n=Gp();return qp(n,t,e),Object.assign({},n.vars,n.style)},[t])}function DP(e,t){const n=e.style||{},r={};return nb(r,n,e),Object.assign(r,MP(e,t)),r}function FP(e,t){const n={},r=DP(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const LP=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Qp(e){return typeof e!="string"||e.includes("-")?!1:!!(LP.indexOf(e)>-1||/[A-Z]/u.test(e))}const IP={offset:"stroke-dashoffset",array:"stroke-dasharray"},$P={offset:"strokeDashoffset",array:"strokeDasharray"};function VP(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?IP:$P;e[s.offset]=W.transform(-r);const o=W.transform(t),a=W.transform(n);e[s.array]=`${o} ${a}`}function j0(e,t,n){return typeof e=="string"?e:W.transform(t+n*e)}function BP(e,t,n){const r=j0(t,e.x,e.width),i=j0(n,e.y,e.height);return`${r} ${i}`}function Yp(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},f,c){if(qp(e,u,c),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:h,dimensions:m}=e;d.transform&&(m&&(h.transform=d.transform),delete d.transform),m&&(i!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=BP(m,i!==void 0?i:.5,s!==void 0?s:.5)),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&VP(d,o,a,l,!1)}const rb=()=>({...Gp(),attrs:{}}),Xp=e=>typeof e=="string"&&e.toLowerCase()==="svg";function zP(e,t,n,r){const i=y.useMemo(()=>{const s=rb();return Yp(s,t,Xp(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};nb(s,e.style,e),i.style={...s,...i.style}}return i}function UP(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(Qp(n)?zP:FP)(r,s,o,n),u=fP(r,typeof n=="string",e),f=n!==y.Fragment?{...u,...l,ref:i}:{},{children:c}=r,d=y.useMemo(()=>it(c)?c.get():c,[c]);return y.createElement(n,{...f,children:d})}}function N0(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Zp(e,t,n,r){if(typeof t=="function"){const[i,s]=N0(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=N0(r);t=t(n!==void 0?n:e.custom,i,s)}return t}const zd=e=>Array.isArray(e),HP=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),WP=e=>zd(e)?e[e.length-1]||0:e;function Ol(e){const t=it(e)?e.get():e;return HP(t)?t.toValue():t}function KP({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,s){const o={latestValues:qP(r,i,s,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const ib=e=>(t,n)=>{const r=y.useContext(Wu),i=y.useContext(Hu),s=()=>KP(e,t,r,i);return n?s():Pp(s)};function qP(e,t,n,r){const i={},s=r(e,{});for(const d in s)i[d]=Ol(s[d]);let{initial:o,animate:a}=e;const l=qu(e),u=Qw(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let f=n?n.initial===!1:!1;f=f||o===!1;const c=f?a:o;if(c&&typeof c!="boolean"&&!Ku(c)){const d=Array.isArray(c)?c:[c];for(let h=0;h<d.length;h++){const m=Zp(e,d[h]);if(m){const{transitionEnd:x,transition:b,...p}=m;for(const g in p){let v=p[g];if(Array.isArray(v)){const E=f?v.length-1:0;v=v[E]}v!==null&&(i[g]=v)}for(const g in x)i[g]=x[g]}}}return i}function Jp(e,t,n){var s;const{style:r}=e,i={};for(const o in r)(it(r[o])||t.style&&it(t.style[o])||eb(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const GP={useVisualState:ib({scrapeMotionValuesFromProps:Jp,createRenderState:Gp})};function sb(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function ob(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const ab=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function lb(e,t,n,r){ob(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(ab.has(i)?i:Up(i),t.attrs[i])}function ub(e,t,n){const r=Jp(e,t,n);for(const i in e)if(it(e[i])||it(t[i])){const s=Ys.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const M0=["x","y","width","height","cx","cy","r"],QP={useVisualState:ib({scrapeMotionValuesFromProps:ub,createRenderState:rb,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:i})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in i)if($i.has(a)){s=!0;break}}if(!s)return;let o=!t;if(t)for(let a=0;a<M0.length;a++){const l=M0[a];e[l]!==t[l]&&(o=!0)}o&&he.read(()=>{sb(n,r),he.render(()=>{Yp(r,i,Xp(n.tagName),e.transformTemplate),lb(n,r)})})}})};function YP(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Qp(r)?QP:GP,preloadedFeatures:e,useRender:UP(i),createVisualElement:t,Component:r};return wP(o)}}function ua(e,t,n){const r=e.getProps();return Zp(r,t,n!==void 0?n:r.custom,e)}const cb=new Set(["width","height","top","left","right","bottom",...Ys]);function XP(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,sa(n))}function ZP(e,t){const n=ua(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=WP(s[o]);XP(e,o,a)}}function JP(e){return!!(it(e)&&e.add)}function Ud(e,t){const n=e.getValue("willChange");if(JP(n))return n.add(t);if(!n&&Vd.WillChange){const r=new Vd.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function fb(e){return e.props[Yw]}const db=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,eA=1e-7,tA=12;function nA(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=db(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>eA&&++a<tA);return o}function Pa(e,t,n,r){if(e===t&&n===r)return Zt;const i=s=>nA(s,0,1,e,n);return s=>s===0||s===1?s:db(i(s),t,r)}const hb=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,pb=e=>t=>1-e(1-t),mb=Pa(.33,1.53,.69,.99),em=pb(mb),gb=hb(em),yb=e=>(e*=2)<1?.5*em(e):.5*(2-Math.pow(2,-10*(e-1))),tm=e=>1-Math.sin(Math.acos(e)),vb=pb(tm),xb=hb(tm),wb=e=>/^0[^.\s]+$/u.test(e);function rA(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||wb(e):!0}const Oo=e=>Math.round(e*1e5)/1e5,nm=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function iA(e){return e==null}const sA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,rm=(e,t)=>n=>!!(typeof n=="string"&&sA.test(n)&&n.startsWith(e)||t&&!iA(n)&&Object.prototype.hasOwnProperty.call(n,t)),bb=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(nm);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},oA=e=>er(0,255,e),nf={...Xs,transform:e=>Math.round(oA(e))},ui={test:rm("rgb","red"),parse:bb("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+nf.transform(e)+", "+nf.transform(t)+", "+nf.transform(n)+", "+Oo(la.transform(r))+")"};function aA(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Hd={test:rm("#"),parse:aA,transform:ui.transform},us={test:rm("hsl","hue"),parse:bb("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+jn.transform(Oo(t))+", "+jn.transform(Oo(n))+", "+Oo(la.transform(r))+")"},nt={test:e=>ui.test(e)||Hd.test(e)||us.test(e),parse:e=>ui.test(e)?ui.parse(e):us.test(e)?us.parse(e):Hd.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ui.transform(e):us.transform(e)},lA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function uA(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(nm))==null?void 0:t.length)||0)+(((n=e.match(lA))==null?void 0:n.length)||0)>0}const Sb="number",Tb="color",cA="var",fA="var(",D0="${}",dA=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ca(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(dA,l=>(nt.test(l)?(r.color.push(s),i.push(Tb),n.push(nt.parse(l))):l.startsWith(fA)?(r.var.push(s),i.push(cA),n.push(l)):(r.number.push(s),i.push(Sb),n.push(parseFloat(l))),++s,D0)).split(D0);return{values:n,split:a,indexes:r,types:i}}function Eb(e){return ca(e).values}function Cb(e){const{split:t,types:n}=ca(e),r=t.length;return i=>{let s="";for(let o=0;o<r;o++)if(s+=t[o],i[o]!==void 0){const a=n[o];a===Sb?s+=Oo(i[o]):a===Tb?s+=nt.transform(i[o]):s+=i[o]}return s}}const hA=e=>typeof e=="number"?0:e;function pA(e){const t=Eb(e);return Cb(e)(t.map(hA))}const Ur={test:uA,parse:Eb,createTransformer:Cb,getAnimatableNone:pA},mA=new Set(["brightness","contrast","saturate","opacity"]);function gA(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(nm)||[];if(!r)return e;const i=n.replace(r,"");let s=mA.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const yA=/\b([a-z-]*)\(.*?\)/gu,Wd={...Ur,getAnimatableNone:e=>{const t=e.match(yA);return t?t.map(gA).join(" "):e}},vA={...Kp,color:nt,backgroundColor:nt,outlineColor:nt,fill:nt,stroke:nt,borderColor:nt,borderTopColor:nt,borderRightColor:nt,borderBottomColor:nt,borderLeftColor:nt,filter:Wd,WebkitFilter:Wd},kb=e=>vA[e];function _b(e,t){let n=kb(e);return n!==Wd&&(n=Ur),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const xA=new Set(["auto","none","0"]);function wA(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!xA.has(s)&&ca(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=_b(n,i)}const ci=e=>e*180/Math.PI,Kd=e=>{const t=ci(Math.atan2(e[1],e[0]));return qd(t)},bA={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Kd,rotateZ:Kd,skewX:e=>ci(Math.atan(e[1])),skewY:e=>ci(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},qd=e=>(e=e%360,e<0&&(e+=360),e),F0=Kd,L0=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),I0=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),SA={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:L0,scaleY:I0,scale:e=>(L0(e)+I0(e))/2,rotateX:e=>qd(ci(Math.atan2(e[6],e[5]))),rotateY:e=>qd(ci(Math.atan2(-e[2],e[0]))),rotateZ:F0,rotate:F0,skewX:e=>ci(Math.atan(e[4])),skewY:e=>ci(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function $0(e){return e.includes("scale")?1:0}function Gd(e,t){if(!e||e==="none")return $0(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=SA,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=bA,i=a}if(!i)return $0(t);const s=r[t],o=i[1].split(",").map(EA);return typeof s=="function"?s(o):o[s]}const TA=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Gd(n,t)};function EA(e){return parseFloat(e.trim())}const V0=e=>e===Xs||e===W,CA=new Set(["x","y","z"]),kA=Ys.filter(e=>!CA.has(e));function _A(e){const t=[];return kA.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Us={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Gd(t,"x"),y:(e,{transform:t})=>Gd(t,"y")};Us.translateX=Us.x;Us.translateY=Us.y;const Si=new Set;let Qd=!1,Yd=!1;function Pb(){if(Yd){const e=Array.from(Si).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=_A(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var a;(a=r.getValue(s))==null||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Yd=!1,Qd=!1,Si.forEach(e=>e.complete()),Si.clear()}function Ab(){Si.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Yd=!0)})}function PA(){Ab(),Pb()}class im{constructor(t,n,r,i,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Si.add(this),Qd||(Qd=!0,he.read(Ab),he.resolveKeyframes(Pb))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const o=i==null?void 0:i.get(),a=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),i&&o===void 0&&i.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Si.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Si.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Rb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),AA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function RA(e){const t=AA.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function Ob(e,t,n=1){const[r,i]=RA(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return Rb(o)?parseFloat(o):o}return Wp(i)?Ob(i,t,n+1):i}const jb=e=>t=>t.test(e),OA={test:e=>e==="auto",parse:e=>e},Nb=[Xs,W,jn,ur,PP,_P,OA],B0=e=>Nb.find(jb(e));class Mb extends im{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),Wp(u))){const f=Ob(u,n.current);f!==void 0&&(t[l]=f),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!cb.has(r)||t.length!==2)return;const[i,s]=t,o=B0(i),a=B0(s);if(o!==a)if(V0(o)&&V0(a))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)rA(t[i])&&r.push(i);r.length&&wA(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Us[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const s=r.length-1,o=r[s];r[s]=Us[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const z0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ur.test(e)||e==="0")&&!e.startsWith("url("));function jA(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function NA(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],o=z0(i,t),a=z0(s,t);return!o||!a?!1:jA(e)||(n==="spring"||Fp(n))&&r}const MA=e=>e!==null;function Gu(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(MA),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const DA=40;class Db{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=On.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>DA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&PA(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=On.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!NA(t,r,i,s))if(o)this.options.duration=0;else{l&&l(Gu(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const f=this.initPlayback(t,n);f!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...f},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const be=(e,t,n)=>e+(t-e)*n;function rf(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function FA({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,o=0;if(!t)i=s=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=rf(l,a,e+1/3),s=rf(l,a,e),o=rf(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function yu(e,t){return n=>n>0?t:e}const sf=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},LA=[Hd,ui,us],IA=e=>LA.find(t=>t.test(e));function U0(e){const t=IA(e);if(!t)return!1;let n=t.parse(e);return t===us&&(n=FA(n)),n}const H0=(e,t)=>{const n=U0(e),r=U0(t);if(!n||!r)return yu(e,t);const i={...n};return s=>(i.red=sf(n.red,r.red,s),i.green=sf(n.green,r.green,s),i.blue=sf(n.blue,r.blue,s),i.alpha=be(n.alpha,r.alpha,s),ui.transform(i))},$A=(e,t)=>n=>t(e(n)),Aa=(...e)=>e.reduce($A),Xd=new Set(["none","hidden"]);function VA(e,t){return Xd.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function BA(e,t){return n=>be(e,t,n)}function sm(e){return typeof e=="number"?BA:typeof e=="string"?Wp(e)?yu:nt.test(e)?H0:HA:Array.isArray(e)?Fb:typeof e=="object"?nt.test(e)?H0:zA:yu}function Fb(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>sm(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function zA(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=sm(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function UA(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],o=e.indexes[s][r[s]],a=e.values[o]??0;n[i]=a,r[s]++}return n}const HA=(e,t)=>{const n=Ur.createTransformer(t),r=ca(e),i=ca(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Xd.has(e)&&!i.values.length||Xd.has(t)&&!r.values.length?VA(e,t):Aa(Fb(UA(r,i),i.values),n):yu(e,t)};function Lb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?be(e,t,n):sm(e)(e,t)}const WA=5;function Ib(e,t,n){const r=Math.max(t-WA,0);return $w(n-e(r),t-r)}const Ce={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},of=.001;function KA({duration:e=Ce.duration,bounce:t=Ce.bounce,velocity:n=Ce.velocity,mass:r=Ce.mass}){let i,s,o=1-t;o=er(Ce.minDamping,Ce.maxDamping,o),e=er(Ce.minDuration,Ce.maxDuration,Rn(e)),o<1?(i=u=>{const f=u*o,c=f*e,d=f-n,h=Zd(u,o),m=Math.exp(-c);return of-d/h*m},s=u=>{const c=u*o*e,d=c*n+n,h=Math.pow(o,2)*Math.pow(u,2)*e,m=Math.exp(-c),x=Zd(Math.pow(u,2),o);return(-i(u)+of>0?-1:1)*((d-h)*m)/x}):(i=u=>{const f=Math.exp(-u*e),c=(u-n)*e+1;return-of+f*c},s=u=>{const f=Math.exp(-u*e),c=(n-u)*(e*e);return f*c});const a=5/e,l=GA(i,s,a);if(e=An(e),isNaN(l))return{stiffness:Ce.stiffness,damping:Ce.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const qA=12;function GA(e,t,n){let r=n;for(let i=1;i<qA;i++)r=r-e(r)/t(r);return r}function Zd(e,t){return e*Math.sqrt(1-t*t)}const QA=["duration","bounce"],YA=["stiffness","damping","mass"];function W0(e,t){return t.some(n=>e[n]!==void 0)}function XA(e){let t={velocity:Ce.velocity,stiffness:Ce.stiffness,damping:Ce.damping,mass:Ce.mass,isResolvedFromDuration:!1,...e};if(!W0(e,YA)&&W0(e,QA))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*er(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Ce.mass,stiffness:i,damping:s}}else{const n=KA(e);t={...t,...n,mass:Ce.mass},t.isResolvedFromDuration=!0}return t}function vu(e=Ce.visualDuration,t=Ce.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:u,mass:f,duration:c,velocity:d,isResolvedFromDuration:h}=XA({...n,velocity:-Rn(n.velocity||0)}),m=d||0,x=u/(2*Math.sqrt(l*f)),b=o-s,p=Rn(Math.sqrt(l/f)),g=Math.abs(b)<5;r||(r=g?Ce.restSpeed.granular:Ce.restSpeed.default),i||(i=g?Ce.restDelta.granular:Ce.restDelta.default);let v;if(x<1){const S=Zd(p,x);v=C=>{const k=Math.exp(-x*p*C);return o-k*((m+x*p*b)/S*Math.sin(S*C)+b*Math.cos(S*C))}}else if(x===1)v=S=>o-Math.exp(-p*S)*(b+(m+p*b)*S);else{const S=p*Math.sqrt(x*x-1);v=C=>{const k=Math.exp(-x*p*C),P=Math.min(S*C,300);return o-k*((m+x*p*b)*Math.sinh(P)+S*b*Math.cosh(P))/S}}const E={calculatedDuration:h&&c||null,next:S=>{const C=v(S);if(h)a.done=S>=c;else{let k=0;x<1&&(k=S===0?An(m):Ib(v,S,C));const P=Math.abs(k)<=r,j=Math.abs(o-C)<=i;a.done=P&&j}return a.value=a.done?o:C,a},toString:()=>{const S=Math.min(Ip(E),mu),C=Vw(k=>E.next(S*k).value,S,30);return S+"ms "+C},toTransition:()=>{}};return E}vu.applyToOptions=e=>{const t=Q2(e,100,vu);return e.ease=ia()?t.ease:"easeOut",e.duration=An(t.duration),e.type="keyframes",e};function K0({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:f}){const c=e[0],d={done:!1,value:c},h=P=>a!==void 0&&P<a||l!==void 0&&P>l,m=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l;let x=n*t;const b=c+x,p=o===void 0?b:o(b);p!==b&&(x=p-c);const g=P=>-x*Math.exp(-P/r),v=P=>p+g(P),E=P=>{const j=g(P),N=v(P);d.done=Math.abs(j)<=u,d.value=d.done?p:N};let S,C;const k=P=>{h(d.value)&&(S=P,C=vu({keyframes:[d.value,m(d.value)],velocity:Ib(v,P,d.value),damping:i,stiffness:s,restDelta:u,restSpeed:f}))};return k(0),{calculatedDuration:null,next:P=>{let j=!1;return!C&&S===void 0&&(j=!0,E(P),k(P)),S!==void 0&&P>=S?C.next(P-S):(!j&&E(P),d)}}}const ZA=Pa(.42,0,1,1),JA=Pa(0,0,.58,1),$b=Pa(.42,0,.58,1),eR=e=>Array.isArray(e)&&typeof e[0]!="number",q0={linear:Zt,easeIn:ZA,easeInOut:$b,easeOut:JA,circIn:tm,circInOut:xb,circOut:vb,backIn:em,backInOut:gb,backOut:mb,anticipate:yb},G0=e=>{if(Dp(e)){$d(e.length===4);const[t,n,r,i]=e;return Pa(t,n,r,i)}else if(typeof e=="string")return $d(q0[e]!==void 0),q0[e];return e};function tR(e,t,n){const r=[],i=n||Lb,s=e.length-1;for(let o=0;o<s;o++){let a=i(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||Zt:t;a=Aa(l,a)}r.push(a)}return r}function nR(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if($d(s===t.length),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=tR(t,r,i),l=a.length,u=f=>{if(o&&f<e[0])return t[0];let c=0;if(l>1)for(;c<e.length-2&&!(f<e[c+1]);c++);const d=ra(e[c],e[c+1],f);return a[c](d)};return n?f=>u(er(e[0],e[s-1],f)):u}function rR(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=ra(0,t,r);e.push(be(n,1,i))}}function iR(e){const t=[0];return rR(t,e.length-1),t}function sR(e,t){return e.map(n=>n*t)}function oR(e,t){return e.map(()=>t||$b).splice(0,e.length-1)}function xu({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=eR(r)?r.map(G0):G0(r),s={done:!1,value:t[0]},o=sR(n&&n.length===t.length?n:iR(t),e),a=nR(o,t,{ease:Array.isArray(i)?i:oR(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const aR=e=>{const t=({timestamp:n})=>e(n);return{start:()=>he.update(t,!0),stop:()=>zr(t),now:()=>Ge.isProcessing?Ge.timestamp:On.now()}},lR={decay:K0,inertia:K0,tween:xu,keyframes:xu,spring:vu},uR=e=>e/100;class om extends Db{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:i,keyframes:s}=this.options,o=(i==null?void 0:i.KeyframeResolver)||im,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new o(s,a,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,a=Fp(n)?n:lR[n]||xu;let l,u;a!==xu&&typeof t[0]!="number"&&(l=Aa(uR,Lb(t[0],t[1])),t=[0,100]);const f=a({...this.options,keyframes:t});s==="mirror"&&(u=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),f.calculatedDuration===null&&(f.calculatedDuration=Ip(f));const{calculatedDuration:c}=f,d=c+i,h=d*(r+1)-i;return{generator:f,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:c,resolvedDuration:d,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:P}=this.options;return{done:!0,value:P[P.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:f,resolvedDuration:c}=r;if(this.startTime===null)return s.next(0);const{delay:d,repeat:h,repeatType:m,repeatDelay:x,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-f/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const p=this.currentTime-d*(this.speed>=0?1:-1),g=this.speed>=0?p<0:p>f;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=f);let v=this.currentTime,E=s;if(h){const P=Math.min(this.currentTime,f)/c;let j=Math.floor(P),N=P%1;!N&&P>=1&&(N=1),N===1&&j--,j=Math.min(j,h+1),!!(j%2)&&(m==="reverse"?(N=1-N,x&&(N-=x/c)):m==="mirror"&&(E=o)),v=er(0,1,N)*c}const S=g?{done:!1,value:l[0]}:E.next(v);a&&(S.value=a(S.value));let{done:C}=S;!g&&u!==null&&(C=this.speed>=0?this.currentTime>=f:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return k&&i!==void 0&&(S.value=Gu(l,this.options,i)),b&&b(S.value),k&&this.finish(),S}get duration(){const{resolved:t}=this;return t?Rn(t.calculatedDuration):0}get time(){return Rn(this.currentTime)}set time(t){t=An(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Rn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=aR,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=this.currentTime??0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}get finished(){return this.currentFinishedPromise}}const cR=new Set(["opacity","clipPath","filter","transform"]),fR=Np(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),wu=10,dR=2e4;function hR(e){return Fp(e.type)||e.type==="spring"||!zw(e.ease)}function pR(e,t){const n=new om({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let s=0;for(;!r.done&&s<dR;)r=n.sample(s),i.push(r.value),s+=wu;return{times:void 0,keyframes:i,duration:s-wu,ease:"linear"}}const Vb={anticipate:yb,backInOut:gb,circInOut:xb};function mR(e){return e in Vb}class Q0 extends Db{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new Mb(s,(o,a)=>this.onKeyframesResolved(o,a),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:i,ease:s,type:o,motionValue:a,name:l,startTime:u}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&ia()&&mR(s)&&(s=Vb[s]),hR(this.options)){const{onComplete:c,onUpdate:d,motionValue:h,element:m,...x}=this.options,b=pR(t,x);t=b.keyframes,t.length===1&&(t[1]=t[0]),r=b.duration,i=b.times,s=b.ease,o="keyframes"}const f=G2(a.owner.current,l,t,{...this.options,duration:r,times:i,ease:s});return f.startTime=u??this.calcStartTime(),this.pendingTimeline?(T0(f,this.pendingTimeline),this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:c}=this.options;a.set(Gu(t,this.options,n)),c&&c(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:r,times:i,type:o,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Rn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Rn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=An(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}get finished(){return this.resolved.animation.finished}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Zt;const{animation:r}=n;T0(r,t)}return Zt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:s,ease:o,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:f,onComplete:c,element:d,...h}=this.options,m=new om({...h,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),x=An(this.time);u.setWithVelocity(m.sample(x-wu).value,m.sample(x).value,wu)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:s,damping:o,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=n.owner.getProps();return fR()&&r&&cR.has(r)&&(r!=="transform"||!u)&&!l&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}const gR={type:"spring",stiffness:500,damping:25,restSpeed:10},yR=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),vR={type:"keyframes",duration:.8},xR={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},wR=(e,{keyframes:t})=>t.length>2?vR:$i.has(e)?e.startsWith("scale")?yR(t[1]):gR:xR;function bR({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:u,...f}){return!!Object.keys(f).length}const am=(e,t,n,r={},i,s)=>o=>{const a=Lp(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-An(l);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:d=>{t.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};bR(a)||(f={...f,...wR(e,f)}),f.duration&&(f.duration=An(f.duration)),f.repeatDelay&&(f.repeatDelay=An(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let c=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(c=!0)),f.allowFlatten=!a.type&&!a.ease,c&&!s&&t.get()!==void 0){const d=Gu(f.keyframes,a);if(d!==void 0)return he.update(()=>{f.onUpdate(d),f.onComplete()}),new W2([])}return!s&&Q0.supports(f)?new Q0(f):new om(f)};function SR({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Bb(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:o,...a}=t;r&&(s=r);const l=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const f in a){const c=e.getValue(f,e.latestValues[f]??null),d=a[f];if(d===void 0||u&&SR(u,f))continue;const h={delay:n,...Lp(s||{},f)};let m=!1;if(window.MotionHandoffAnimation){const b=fb(e);if(b){const p=window.MotionHandoffAnimation(b,f,he);p!==null&&(h.startTime=p,m=!0)}}Ud(e,f),c.start(am(f,c,d,e.shouldReduceMotion&&cb.has(f)?{type:!1}:h,e,m));const x=c.animation;x&&l.push(x)}return o&&Promise.all(l).then(()=>{he.update(()=>{o&&ZP(e,o)})}),l}function Jd(e,t,n={}){var l;const r=ua(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(Bb(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:f=0,staggerChildren:c,staggerDirection:d}=i;return TR(e,t,f+u,c,d,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,f]=a==="beforeChildren"?[s,o]:[o,s];return u().then(()=>f())}else return Promise.all([s(),o(n.delay)])}function TR(e,t,n=0,r=0,i=1,s){const o=[],a=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(ER).forEach((u,f)=>{u.notify("AnimationStart",t),o.push(Jd(u,t,{...s,delay:n+l(f)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function ER(e,t){return e.sortNodePosition(t)}function CR(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Jd(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Jd(e,t,n);else{const i=typeof t=="function"?ua(e,t,n.custom):t;r=Promise.all(Bb(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function zb(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const kR=zp.length;function Ub(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Ub(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<kR;n++){const r=zp[n],i=e.props[r];(oa(i)||i===!1)&&(t[r]=i)}return t}const _R=[...Bp].reverse(),PR=Bp.length;function AR(e){return t=>Promise.all(t.map(({animation:n,options:r})=>CR(e,n,r)))}function RR(e){let t=AR(e),n=Y0(),r=!0;const i=l=>(u,f)=>{var d;const c=ua(e,f,l==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);if(c){const{transition:h,transitionEnd:m,...x}=c;u={...u,...x,...m}}return u};function s(l){t=l(e)}function o(l){const{props:u}=e,f=Ub(e.parent)||{},c=[],d=new Set;let h={},m=1/0;for(let b=0;b<PR;b++){const p=_R[b],g=n[p],v=u[p]!==void 0?u[p]:f[p],E=oa(v),S=p===l?g.isActive:null;S===!1&&(m=b);let C=v===f[p]&&v!==u[p]&&E;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),g.protectedKeys={...h},!g.isActive&&S===null||!v&&!g.prevProp||Ku(v)||typeof v=="boolean")continue;const k=OR(g.prevProp,v);let P=k||p===l&&g.isActive&&!C&&E||b>m&&E,j=!1;const N=Array.isArray(v)?v:[v];let I=N.reduce(i(p),{});S===!1&&(I={});const{prevResolvedValues:re={}}=g,ie={...re,...I},xe=ne=>{P=!0,d.has(ne)&&(j=!0,d.delete(ne)),g.needsAnimating[ne]=!0;const O=e.getValue(ne);O&&(O.liveStyle=!1)};for(const ne in ie){const O=I[ne],L=re[ne];if(h.hasOwnProperty(ne))continue;let B=!1;zd(O)&&zd(L)?B=!zb(O,L):B=O!==L,B?O!=null?xe(ne):d.add(ne):O!==void 0&&d.has(ne)?xe(ne):g.protectedKeys[ne]=!0}g.prevProp=v,g.prevResolvedValues=I,g.isActive&&(h={...h,...I}),r&&e.blockInitialAnimation&&(P=!1),P&&(!(C&&k)||j)&&c.push(...N.map(ne=>({animation:ne,options:{type:p}})))}if(d.size){const b={};if(typeof u.initial!="boolean"){const p=ua(e,Array.isArray(u.initial)?u.initial[0]:u.initial);p&&p.transition&&(b.transition=p.transition)}d.forEach(p=>{const g=e.getBaseTarget(p),v=e.getValue(p);v&&(v.liveStyle=!0),b[p]=g??null}),c.push({animation:b})}let x=!!c.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(x=!1),r=!1,x?t(c):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=e.variantChildren)==null||c.forEach(d=>{var h;return(h=d.animationState)==null?void 0:h.setActive(l,u)}),n[l].isActive=u;const f=o(l);for(const d in n)n[d].protectedKeys={};return f}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Y0(),r=!0}}}function OR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!zb(t,e):!1}function Zr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Y0(){return{animate:Zr(!0),whileInView:Zr(),whileHover:Zr(),whileTap:Zr(),whileDrag:Zr(),whileFocus:Zr(),exit:Zr()}}class Gr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class jR extends Gr{constructor(t){super(t),t.animationState||(t.animationState=RR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ku(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let NR=0;class MR extends Gr{constructor(){super(...arguments),this.id=NR++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const DR={animation:{Feature:jR},exit:{Feature:MR}};function fa(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Ra(e){return{point:{x:e.pageX,y:e.pageY}}}const FR=e=>t=>Vp(t)&&e(t,Ra(t));function jo(e,t,n,r){return fa(e,t,FR(n),r)}function Hb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function LR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function IR(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const Wb=1e-4,$R=1-Wb,VR=1+Wb,Kb=.01,BR=0-Kb,zR=0+Kb;function ct(e){return e.max-e.min}function UR(e,t,n){return Math.abs(e-t)<=n}function X0(e,t,n,r=.5){e.origin=r,e.originPoint=be(t.min,t.max,e.origin),e.scale=ct(n)/ct(t),e.translate=be(n.min,n.max,e.origin)-e.originPoint,(e.scale>=$R&&e.scale<=VR||isNaN(e.scale))&&(e.scale=1),(e.translate>=BR&&e.translate<=zR||isNaN(e.translate))&&(e.translate=0)}function No(e,t,n,r){X0(e.x,t.x,n.x,r?r.originX:void 0),X0(e.y,t.y,n.y,r?r.originY:void 0)}function Z0(e,t,n){e.min=n.min+t.min,e.max=e.min+ct(t)}function HR(e,t,n){Z0(e.x,t.x,n.x),Z0(e.y,t.y,n.y)}function J0(e,t,n){e.min=t.min-n.min,e.max=e.min+ct(t)}function Mo(e,t,n){J0(e.x,t.x,n.x),J0(e.y,t.y,n.y)}const ey=()=>({translate:0,scale:1,origin:0,originPoint:0}),cs=()=>({x:ey(),y:ey()}),ty=()=>({min:0,max:0}),Pe=()=>({x:ty(),y:ty()});function Ht(e){return[e("x"),e("y")]}function af(e){return e===void 0||e===1}function eh({scale:e,scaleX:t,scaleY:n}){return!af(e)||!af(t)||!af(n)}function ni(e){return eh(e)||qb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function qb(e){return ny(e.x)||ny(e.y)}function ny(e){return e&&e!=="0%"}function bu(e,t,n){const r=e-n,i=t*r;return n+i}function ry(e,t,n,r,i){return i!==void 0&&(e=bu(e,i,r)),bu(e,n,r)+t}function th(e,t=0,n=1,r,i){e.min=ry(e.min,t,n,r,i),e.max=ry(e.max,t,n,r,i)}function Gb(e,{x:t,y:n}){th(e.x,t.translate,t.scale,t.originPoint),th(e.y,n.translate,n.scale,n.originPoint)}const iy=.999999999999,sy=1.0000000000001;function WR(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let a=0;a<i;a++){s=n[a],o=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&ds(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Gb(e,o)),r&&ni(s.latestValues)&&ds(e,s.latestValues))}t.x<sy&&t.x>iy&&(t.x=1),t.y<sy&&t.y>iy&&(t.y=1)}function fs(e,t){e.min=e.min+t,e.max=e.max+t}function oy(e,t,n,r,i=.5){const s=be(e.min,e.max,i);th(e,t,n,s,r)}function ds(e,t){oy(e.x,t.x,t.scaleX,t.scale,t.originX),oy(e.y,t.y,t.scaleY,t.scale,t.originY)}function Qb(e,t){return Hb(IR(e.getBoundingClientRect(),t))}function KR(e,t,n){const r=Qb(e,n),{scroll:i}=t;return i&&(fs(r.x,i.offset.x),fs(r.y,i.offset.y)),r}const Yb=({current:e})=>e?e.ownerDocument.defaultView:null,ay=(e,t)=>Math.abs(e-t);function qR(e,t){const n=ay(e.x,t.x),r=ay(e.y,t.y);return Math.sqrt(n**2+r**2)}class Xb{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const c=uf(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=qR(c.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:m}=c,{timestamp:x}=Ge;this.history.push({...m,timestamp:x});const{onStart:b,onMove:p}=this.handlers;d||(b&&b(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),p&&p(this.lastMoveEvent,c)},this.handlePointerMove=(c,d)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=lf(d,this.transformPagePoint),he.update(this.updatePoint,!0)},this.handlePointerUp=(c,d)=>{this.end();const{onEnd:h,onSessionEnd:m,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=uf(c.type==="pointercancel"?this.lastMoveEventInfo:lf(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(c,b),m&&m(c,b)},!Vp(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=Ra(t),a=lf(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=Ge;this.history=[{...l,timestamp:u}];const{onSessionStart:f}=n;f&&f(t,uf(a,this.history)),this.removeListeners=Aa(jo(this.contextWindow,"pointermove",this.handlePointerMove),jo(this.contextWindow,"pointerup",this.handlePointerUp),jo(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),zr(this.updatePoint)}}function lf(e,t){return t?{point:t(e.point)}:e}function ly(e,t){return{x:e.x-t.x,y:e.y-t.y}}function uf({point:e},t){return{point:e,delta:ly(e,Zb(t)),offset:ly(e,GR(t)),velocity:QR(t,.1)}}function GR(e){return e[0]}function Zb(e){return e[e.length-1]}function QR(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Zb(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>An(t)));)n--;if(!r)return{x:0,y:0};const s=Rn(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function YR(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?be(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?be(n,e,r.max):Math.min(e,n)),e}function uy(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function XR(e,{top:t,left:n,bottom:r,right:i}){return{x:uy(e.x,n,i),y:uy(e.y,t,r)}}function cy(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function ZR(e,t){return{x:cy(e.x,t.x),y:cy(e.y,t.y)}}function JR(e,t){let n=.5;const r=ct(e),i=ct(t);return i>r?n=ra(t.min,t.max-r,e.min):r>i&&(n=ra(e.min,e.max-i,t.min)),er(0,1,n)}function eO(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const nh=.35;function tO(e=nh){return e===!1?e=0:e===!0&&(e=nh),{x:fy(e,"left","right"),y:fy(e,"top","bottom")}}function fy(e,t,n){return{min:dy(e,t),max:dy(e,n)}}function dy(e,t){return typeof e=="number"?e:e[t]||0}const nO=new WeakMap;class rO{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Pe(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=f=>{const{dragSnapToOrigin:c}=this.getProps();c?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ra(f).point)},s=(f,c)=>{const{drag:d,dragPropagation:h,onDragStart:m}=this.getProps();if(d&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=J2(d),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ht(b=>{let p=this.getAxisMotionValue(b).get()||0;if(jn.test(p)){const{projection:g}=this.visualElement;if(g&&g.layout){const v=g.layout.layoutBox[b];v&&(p=ct(v)*(parseFloat(p)/100))}}this.originPoint[b]=p}),m&&he.postRender(()=>m(f,c)),Ud(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},o=(f,c)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:m,onDrag:x}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:b}=c;if(h&&this.currentDirection===null){this.currentDirection=iO(b),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",c.point,b),this.updateAxis("y",c.point,b),this.visualElement.render(),x&&x(f,c)},a=(f,c)=>this.stop(f,c),l=()=>Ht(f=>{var c;return this.getAnimationState(f)==="paused"&&((c=this.getAxisMotionValue(f).animation)==null?void 0:c.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Xb(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Yb(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&he.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!ul(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=YR(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;t&&ls(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=XR(r.layoutBox,t):this.constraints=!1,this.elastic=tO(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ht(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=eO(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ls(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=KR(r,i.root,this.visualElement.getTransformPagePoint());let o=ZR(i.layout.layoutBox,s);if(n){const a=n(LR(o));this.hasMutatedConstraints=!!a,a&&(o=Hb(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Ht(f=>{if(!ul(f,n,this.currentDirection))return;let c=l&&l[f]||{};o&&(c={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,m={type:"inertia",velocity:r?t[f]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...c};return this.startAxisValueAnimation(f,m)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Ud(this.visualElement,t),r.start(am(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ht(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ht(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ht(n=>{const{drag:r}=this.getProps();if(!ul(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];s.set(t[n]-be(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ls(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ht(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=JR({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ht(o=>{if(!ul(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(be(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;nO.set(this.visualElement,this);const t=this.visualElement.current,n=jo(t,"pointerdown",l=>{const{drag:u,dragListener:f=!0}=this.getProps();u&&f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();ls(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),he.read(r);const o=fa(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Ht(f=>{const c=this.getAxisMotionValue(f);c&&(this.originPoint[f]+=l[f].translate,c.set(c.get()+l[f].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=nh,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function ul(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function iO(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class sO extends Gr{constructor(t){super(t),this.removeGroupControls=Zt,this.removeListeners=Zt,this.controls=new rO(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Zt}unmount(){this.removeGroupControls(),this.removeListeners()}}const hy=e=>(t,n)=>{e&&he.postRender(()=>e(t,n))};class oO extends Gr{constructor(){super(...arguments),this.removePointerDownListener=Zt}onPointerDown(t){this.session=new Xb(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Yb(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:hy(t),onStart:hy(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&he.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=jo(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const jl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function py(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const co={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(W.test(e))e=parseFloat(e);else return e;const n=py(e,t.target.x),r=py(e,t.target.y);return`${n}% ${r}%`}},aO={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Ur.parse(e);if(i.length>5)return r;const s=Ur.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const u=be(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}};class lO extends y.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;kP(uO),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),jl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,o=r.projection;return o&&(o.isPresent=s,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||he.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),$p.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Jb(e){const[t,n]=Iw(),r=y.useContext(_p);return w.jsx(lO,{...e,layoutGroup:r,switchLayoutGroup:y.useContext(Xw),isPresent:t,safeToRemove:n})}const uO={borderRadius:{...co,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:co,borderTopRightRadius:co,borderBottomLeftRadius:co,borderBottomRightRadius:co,boxShadow:aO};function cO(e,t,n){const r=it(e)?e:sa(e);return r.start(am("",r,t,n)),r.animation}function fO(e){return e instanceof SVGElement&&e.tagName!=="svg"}const dO=(e,t)=>e.depth-t.depth;class hO{constructor(){this.children=[],this.isDirty=!1}add(t){Op(this.children,t),this.isDirty=!0}remove(t){jp(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(dO),this.isDirty=!1,this.children.forEach(t)}}function pO(e,t){const n=On.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(zr(r),e(s-t))};return he.read(r,!0),()=>zr(r)}const eS=["TopLeft","TopRight","BottomLeft","BottomRight"],mO=eS.length,my=e=>typeof e=="string"?parseFloat(e):e,gy=e=>typeof e=="number"||W.test(e);function gO(e,t,n,r,i,s){i?(e.opacity=be(0,n.opacity??1,yO(r)),e.opacityExit=be(t.opacity??1,0,vO(r))):s&&(e.opacity=be(t.opacity??1,n.opacity??1,r));for(let o=0;o<mO;o++){const a=`border${eS[o]}Radius`;let l=yy(t,a),u=yy(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||gy(l)===gy(u)?(e[a]=Math.max(be(my(l),my(u),r),0),(jn.test(u)||jn.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=be(t.rotate||0,n.rotate||0,r))}function yy(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const yO=tS(0,.5,vb),vO=tS(.5,.95,Zt);function tS(e,t,n){return r=>r<e?0:r>t?1:n(ra(e,t,r))}function vy(e,t){e.min=t.min,e.max=t.max}function zt(e,t){vy(e.x,t.x),vy(e.y,t.y)}function xy(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function wy(e,t,n,r,i){return e-=t,e=bu(e,1/n,r),i!==void 0&&(e=bu(e,1/i,r)),e}function xO(e,t=0,n=1,r=.5,i,s=e,o=e){if(jn.test(t)&&(t=parseFloat(t),t=be(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=be(s.min,s.max,r);e===s&&(a-=t),e.min=wy(e.min,t,n,a,i),e.max=wy(e.max,t,n,a,i)}function by(e,t,[n,r,i],s,o){xO(e,t[n],t[r],t[i],t.scale,s,o)}const wO=["x","scaleX","originX"],bO=["y","scaleY","originY"];function Sy(e,t,n,r){by(e.x,t,wO,n?n.x:void 0,r?r.x:void 0),by(e.y,t,bO,n?n.y:void 0,r?r.y:void 0)}function Ty(e){return e.translate===0&&e.scale===1}function nS(e){return Ty(e.x)&&Ty(e.y)}function Ey(e,t){return e.min===t.min&&e.max===t.max}function SO(e,t){return Ey(e.x,t.x)&&Ey(e.y,t.y)}function Cy(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function rS(e,t){return Cy(e.x,t.x)&&Cy(e.y,t.y)}function ky(e){return ct(e.x)/ct(e.y)}function _y(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class TO{constructor(){this.members=[]}add(t){Op(this.members,t),t.scheduleRender()}remove(t){if(jp(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function EO(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:f,rotateX:c,rotateY:d,skewX:h,skewY:m}=n;u&&(r=`perspective(${u}px) ${r}`),f&&(r+=`rotate(${f}deg) `),c&&(r+=`rotateX(${c}deg) `),d&&(r+=`rotateY(${d}deg) `),h&&(r+=`skewX(${h}deg) `),m&&(r+=`skewY(${m}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const cf=["","X","Y","Z"],CO={visibility:"hidden"},Py=1e3;let kO=0;function ff(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function iS(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=fb(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",he,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&iS(r)}function sS({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=kO++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(AO),this.nodes.forEach(MO),this.nodes.forEach(DO),this.nodes.forEach(RO)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new hO)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Mp),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=fO(o),this.instance=o;const{layoutId:l,layout:u,visualElement:f}=this.options;if(f&&!f.current&&f.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),e){let c;const d=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,c&&c(),c=pO(d,250),jl.hasAnimatedSinceResize&&(jl.hasAnimatedSinceResize=!1,this.nodes.forEach(Ry))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&f&&(l||u)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||f.getDefaultTransition()||VO,{onLayoutAnimationStart:b,onLayoutAnimationComplete:p}=f.getProps(),g=!this.targetLayout||!rS(this.targetLayout,m),v=!d&&h;if(this.options.layoutRoot||this.resumeFrom||v||d&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(c,v);const E={...Lp(x,"layout"),onPlay:b,onComplete:p};(f.shouldReduceMotion||this.options.layoutRoot)&&(E.delay=0,E.type=!1),this.startAnimation(E)}else d||Ry(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,zr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(FO),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&iS(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f<this.path.length;f++){const c=this.path[f];c.shouldResetTransform=!0,c.updateScroll("snapshot"),c.options.layoutRoot&&c.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ay);return}this.isUpdating||this.nodes.forEach(jO),this.isUpdating=!1,this.nodes.forEach(NO),this.nodes.forEach(_O),this.nodes.forEach(PO),this.clearAllSnapshots();const a=On.now();Ge.delta=er(0,1e3/60,a-Ge.timestamp),Ge.timestamp=a,Ge.isProcessing=!0,ef.update.process(Ge),ef.preRender.process(Ge),ef.render.process(Ge),Ge.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,$p.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(OO),this.sharedNodes.forEach(LO)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,he.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){he.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ct(this.snapshot.measuredBox.x)&&!ct(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Pe(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!nS(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,f=u!==this.prevTransformTemplateValue;o&&(a||ni(this.latestValues)||f)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),BO(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return Pe();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(zO))){const{scroll:f}=this.root;f&&(fs(a.x,f.offset.x),fs(a.y,f.offset.y))}return a}removeElementScroll(o){var l;const a=Pe();if(zt(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const f=this.path[u],{scroll:c,options:d}=f;f!==this.root&&c&&d.layoutScroll&&(c.wasRoot&&zt(a,o),fs(a.x,c.offset.x),fs(a.y,c.offset.y))}return a}applyTransform(o,a=!1){const l=Pe();zt(l,o);for(let u=0;u<this.path.length;u++){const f=this.path[u];!a&&f.options.layoutScroll&&f.scroll&&f!==f.root&&ds(l,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),ni(f.latestValues)&&ds(l,f.latestValues)}return ni(this.latestValues)&&ds(l,this.latestValues),l}removeTransform(o){const a=Pe();zt(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!ni(u.latestValues))continue;eh(u.latestValues)&&u.updateSnapshot();const f=Pe(),c=u.measurePageBox();zt(f,c),Sy(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,f)}return ni(this.latestValues)&&Sy(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ge.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var d;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(d=this.parent)!=null&&d.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:c}=this.options;if(!(!this.layout||!(f||c))){if(this.resolvedRelativeTargetAt=Ge.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pe(),this.relativeTargetOrigin=Pe(),Mo(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),zt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Pe(),this.targetWithTransforms=Pe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),HR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):zt(this.target,this.layout.layoutBox),Gb(this.target,this.targetDelta)):zt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pe(),this.relativeTargetOrigin=Pe(),Mo(this.relativeTargetOrigin,this.target,h.target),zt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||eh(this.parent.latestValues)||qb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var m;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Ge.timestamp&&(l=!1),l)return;const{layout:u,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||f))return;zt(this.layoutCorrected,this.layout.layoutBox);const c=this.treeScale.x,d=this.treeScale.y;WR(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Pe());const{target:h}=o;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(xy(this.prevProjectionDelta.x,this.projectionDelta.x),xy(this.prevProjectionDelta.y,this.projectionDelta.y)),No(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==c||this.treeScale.y!==d||!_y(this.projectionDelta.x,this.prevProjectionDelta.x)||!_y(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=cs(),this.projectionDelta=cs(),this.projectionDeltaWithTransform=cs()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},f={...this.latestValues},c=cs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=Pe(),h=l?l.source:void 0,m=this.layout?this.layout.source:void 0,x=h!==m,b=this.getStack(),p=!b||b.members.length<=1,g=!!(x&&!p&&this.options.crossfade===!0&&!this.path.some($O));this.animationProgress=0;let v;this.mixTargetDelta=E=>{const S=E/1e3;Oy(c.x,o.x,S),Oy(c.y,o.y,S),this.setTargetDelta(c),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Mo(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),IO(this.relativeTarget,this.relativeTargetOrigin,d,S),v&&SO(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=Pe()),zt(v,this.relativeTarget)),x&&(this.animationValues=f,gO(f,u,this.latestValues,S,g,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(zr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=he.update(()=>{jl.hasAnimatedSinceResize=!0,this.currentAnimation=cO(0,Py,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Py),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:f}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&oS(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Pe();const c=ct(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+c;const d=ct(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}zt(a,l),ds(a,f),No(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new TO),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&ff("z",o,u,this.animationValues);for(let f=0;f<cf.length;f++)ff(`rotate${cf[f]}`,o,u,this.animationValues),ff(`skew${cf[f]}`,o,u,this.animationValues);o.render();for(const f in u)o.setStaticValue(f,u[f]),this.animationValues&&(this.animationValues[f]=u[f]);o.scheduleRender()}getProjectionStyles(o){if(!this.instance||this.isSVG)return;if(!this.isVisible)return CO;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=Ol(o==null?void 0:o.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none",a;const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){const h={};return this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=Ol(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!ni(this.latestValues)&&(h.transform=l?l({},""):"none",this.hasProjected=!1),h}const f=u.animationValues||u.latestValues;this.applyTransformsToTarget(),a.transform=EO(this.projectionDeltaWithTransform,this.treeScale,f),l&&(a.transform=l(f,a.transform));const{x:c,y:d}=this.projectionDelta;a.transformOrigin=`${c.origin*100}% ${d.origin*100}% 0`,u.animationValues?a.opacity=u===this?f.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:a.opacity=u===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const h in aa){if(f[h]===void 0)continue;const{correct:m,applyTo:x,isCSSVariable:b}=aa[h],p=a.transform==="none"?f[h]:m(f[h],u);if(x){const g=x.length;for(let v=0;v<g;v++)a[x[v]]=p}else b?this.options.visualElement.renderState.vars[h]=p:a[h]=p}return this.options.layoutId&&(a.pointerEvents=u===this?Ol(o==null?void 0:o.pointerEvents)||"":"none"),a}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Ay),this.root.sharedNodes.clear()}}}function _O(e){e.updateLayout()}function PO(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,o=t.source!==e.layout.source;s==="size"?Ht(c=>{const d=o?t.measuredBox[c]:t.layoutBox[c],h=ct(d);d.min=r[c].min,d.max=d.min+h}):oS(s,t.layoutBox,r)&&Ht(c=>{const d=o?t.measuredBox[c]:t.layoutBox[c],h=ct(r[c]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+h)});const a=cs();No(a,r,t.layoutBox);const l=cs();o?No(l,e.applyTransform(i,!0),t.measuredBox):No(l,r,t.layoutBox);const u=!nS(a);let f=!1;if(!e.resumeFrom){const c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:d,layout:h}=c;if(d&&h){const m=Pe();Mo(m,t.layoutBox,d.layoutBox);const x=Pe();Mo(x,r,h.layoutBox),rS(m,x)||(f=!0),c.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=m,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:f})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function AO(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function RO(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function OO(e){e.clearSnapshot()}function Ay(e){e.clearMeasurements()}function jO(e){e.isLayoutDirty=!1}function NO(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ry(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function MO(e){e.resolveTargetDelta()}function DO(e){e.calcProjection()}function FO(e){e.resetSkewAndRotation()}function LO(e){e.removeLeadSnapshot()}function Oy(e,t,n){e.translate=be(t.translate,0,n),e.scale=be(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function jy(e,t,n,r){e.min=be(t.min,n.min,r),e.max=be(t.max,n.max,r)}function IO(e,t,n,r){jy(e.x,t.x,n.x,r),jy(e.y,t.y,n.y,r)}function $O(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const VO={duration:.45,ease:[.4,0,.1,1]},Ny=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),My=Ny("applewebkit/")&&!Ny("chrome/")?Math.round:Zt;function Dy(e){e.min=My(e.min),e.max=My(e.max)}function BO(e){Dy(e.x),Dy(e.y)}function oS(e,t,n){return e==="position"||e==="preserve-aspect"&&!UR(ky(t),ky(n),.2)}function zO(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const UO=sS({attachResizeListener:(e,t)=>fa(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),df={current:void 0},aS=sS({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!df.current){const e=new UO({});e.mount(window),e.setOptions({layoutScroll:!0}),df.current=e}return df.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),HO={pan:{Feature:oO},drag:{Feature:sO,ProjectionNode:aS,MeasureLayout:Jb}};function Fy(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&he.postRender(()=>s(t,Ra(t)))}class WO extends Gr{mount(){const{current:t}=this.node;t&&(this.unmount=tP(t,(n,r)=>(Fy(this.node,r,"Start"),i=>Fy(this.node,i,"End"))))}unmount(){}}class KO extends Gr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Aa(fa(this.node.current,"focus",()=>this.onFocus()),fa(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ly(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&he.postRender(()=>s(t,Ra(t)))}class qO extends Gr{mount(){const{current:t}=this.node;t&&(this.unmount=sP(t,(n,r)=>(Ly(this.node,r,"Start"),(i,{success:s})=>Ly(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const rh=new WeakMap,hf=new WeakMap,GO=e=>{const t=rh.get(e.target);t&&t(e)},QO=e=>{e.forEach(GO)};function YO({root:e,...t}){const n=e||document;hf.has(n)||hf.set(n,{});const r=hf.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(QO,{root:e,...t})),r[i]}function XO(e,t,n){const r=YO(t);return rh.set(e,n),r.observe(e),()=>{rh.delete(e),r.unobserve(e)}}const ZO={some:0,all:1};class JO extends Gr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:ZO[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:f,onViewportLeave:c}=this.node.getProps(),d=u?f:c;d&&d(l)};return XO(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(ej(t,n))&&this.startObserver()}unmount(){}}function ej({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const tj={inView:{Feature:JO},tap:{Feature:qO},focus:{Feature:KO},hover:{Feature:WO}},nj={layout:{ProjectionNode:aS,MeasureLayout:Jb}},ih={current:null},lS={current:!1};function rj(){if(lS.current=!0,!!Ap)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ih.current=e.matches;e.addListener(t),t()}else ih.current=!1}const ij=[...Nb,nt,Ur],sj=e=>ij.find(jb(e)),oj=new WeakMap;function aj(e,t,n){for(const r in t){const i=t[r],s=n[r];if(it(i))e.addValue(r,i);else if(it(s))e.addValue(r,sa(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,sa(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Iy=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class lj{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=im,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=On.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,he.render(this.render,!1,!0))};const{latestValues:l,renderState:u,onUpdate:f}=o;this.onUpdate=f,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=qu(n),this.isVariantNode=Qw(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in d){const m=d[h];l[h]!==void 0&&it(m)&&m.set(l[h],!1)}}mount(t){this.current=t,oj.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),lS.current||rj(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ih.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),zr(this.notifyUpdate),zr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=$i.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&he.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in zs){const n=zs[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Pe()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Iy.length;r++){const i=Iy[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,o=t[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=aj(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=sa(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Rb(r)||wb(r))?r=parseFloat(r):!sj(r)&&Ur.test(n)&&(r=_b(t,n)),this.setBaseTarget(t,it(r)?r.get():r)),it(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=Zp(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!it(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Mp),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class uS extends lj{constructor(){super(...arguments),this.KeyframeResolver=Mb}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;it(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function uj(e){return window.getComputedStyle(e)}class cj extends uS{constructor(){super(...arguments),this.type="html",this.renderInstance=ob}readValueFromInstance(t,n){if($i.has(n))return TA(t,n);{const r=uj(t),i=(Hp(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Qb(t,n)}build(t,n,r){qp(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Jp(t,n,r)}}class fj extends uS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Pe,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&sb(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if($i.has(n)){const r=kb(n);return r&&r.default||0}return n=ab.has(n)?n:Up(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return ub(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&he.postRender(this.updateDimensions)}build(t,n,r){Yp(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){lb(t,n,r,i)}mount(t){this.isSVGTag=Xp(t.tagName),super.mount(t)}}const dj=(e,t)=>Qp(e)?new fj(t):new cj(t,{allowProjection:e!==y.Fragment}),hj=YP({...DR,...tj,...HO,...nj},dj),Re=dP(hj),pj=e=>["zink","slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"].includes(e),At=e=>{const[t,n]=e.split("-");return pj(t)?n?`var(--color-${t}-${n})`:`var(--color-${e}-500)`:`var(--color-${e})`};var dr=(e=>(e.None="none",e.Sm="sm",e.Md="md",e.Lg="lg",e.Xl="xl",e.Full="full",e))(dr||{});const cS=y.createContext({}),mj={[K.Background]:"",[K.Border]:"initial",[K.TooltipText]:At("blue-700"),[K.TooltipBackground]:At("blue-100"),[K.TooltipBorder]:At("blue-500"),[K.HeaderBackground]:At("blue-600"),[K.HeaderBorder]:"initial",[K.HeaderText]:"white",[K.FooterBackground]:"",[K.FooterBorder]:"",[K.FooterText]:"",[K.MessageAdminBackground]:"",[K.MessageAdminText]:"",[K.MessageVisitorBackground]:"",[K.MessageVisitorText]:"",[K.GreeterBackground]:"white",[K.GreeterText]:At("slate-700"),[K.GreeterBorder]:At("slate-200"),[K.GreeterTopBackground]:"linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%)",[K.GreeterTopText]:"white",[K.GreeterButtonBackground]:At("indigo-600"),[K.GreeterButtonText]:At("white"),[K.ButtonBackground]:At("indigo-600"),[K.ButtonText]:At("white"),[K.InputBackground]:At("white"),[K.InputText]:At("slate-800"),[K.InputBorder]:At("slate-200")},gj={[dr.None]:"0px",[dr.Sm]:"var(--radius-xs)",[dr.Md]:"var(--radius-sm)",[dr.Lg]:"var(--radius-md)",[dr.Xl]:"var(--radius-lg)",[dr.Full]:"calc(infinity * 1px)"},yj=e=>{const t={...mj};if(!e||!e.appearance||!e.appearance.design||!e.appearance.design.colors)return t;for(const n in e.appearance.design.colors){const r=n;e.appearance.design.colors[r]&&(t[r]=e.appearance.design.colors[r])}return t};function vj({children:e,widget:t}){const n=yj(t),r=t&&t.appearance&&t.appearance.design&&t.appearance.design.border_radius?t.appearance.design.border_radius:dr.Md,i=o=>n[o],s=()=>gj[r];return w.jsx(cS.Provider,{value:{colors:n,getColor:i,getRadius:s},children:e})}const nr=()=>y.useContext(cS);function Gn({children:e,type:t="button",variant:n="primary",kind:r="solid",size:i="md",disabled:s=!1,rounded:o=!1,className:a,textKey:l=K.ButtonText,bgKey:u=K.ButtonBackground,animations:f={},withoutTheming:c,...d}){const h=nr();return w.jsx(Re.button,{type:t,className:Ne("flex items-center justify-center focus:!ring-0 font-medium",{"rounded-full":o&&i!=="xs","rounded-lg":!o},a,w0[n]&&w0[n][r],L2[i][o?"rounded":"default"]),disabled:s,style:!c&&{color:h.getColor(l),backgroundColor:h.getColor(u),...o?{}:{borderRadius:h.getRadius()}},...f,...d,children:e})}function De(){}De.Home=function(t){return w.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:w.jsx("path",{d:"M3 13h1v7c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2v-7h1a1 1 0 00.707-1.707l-9-9a.999.999 0 00-1.414 0l-9 9A1 1 0 003 13zm7 7v-5h4v5h-4zm2-15.586l6 6V15l.001 5H16v-5c0-1.103-.897-2-2-2h-4c-1.103 0-2 .897-2 2v5H6v-9.586l6-6z"})})};De.Chat=e=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 0 1 .865-.501 48.172 48.172 0 0 0 3.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"})});De.Menu=e=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})});De.MessageTyping=({className:e="size-5",...t})=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.625 9.75a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H8.25m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H12m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0h-.375m-13.5 3.01c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.184-4.183a1.14 1.14 0 0 1 .778-.332 48.294 48.294 0 0 0 5.83-.498c1.585-.233 2.708-1.626 2.708-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"})});De.Check=function(t){return w.jsx("svg",{fill:"currentColor",viewBox:"0 0 16 16",height:"1em",width:"1em",...t,children:w.jsx("path",{d:"M12.736 3.97a.733.733 0 011.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 01-1.065.02L3.217 8.384a.757.757 0 010-1.06.733.733 0 011.047 0l3.052 3.093 5.4-6.425a.247.247 0 01.02-.022z"})})};De.Website=function(t){return w.jsxs("svg",{fill:"none",viewBox:"0 0 24 24",height:"1em",width:"1em",...t,children:[w.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14 7a1 1 0 00-1 1v8a1 1 0 001 1h4a1 1 0 001-1V8a1 1 0 00-1-1h-4zm3 2h-2v6h2V9z",clipRule:"evenodd"}),w.jsx("path",{fill:"currentColor",d:"M6 7a1 1 0 000 2h4a1 1 0 100-2H6zM6 11a1 1 0 100 2h4a1 1 0 100-2H6zM5 16a1 1 0 011-1h4a1 1 0 110 2H6a1 1 0 01-1-1z"}),w.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4 3a3 3 0 00-3 3v12a3 3 0 003 3h16a3 3 0 003-3V6a3 3 0 00-3-3H4zm16 2H4a1 1 0 00-1 1v12a1 1 0 001 1h16a1 1 0 001-1V6a1 1 0 00-1-1z",clipRule:"evenodd"})]})};De.ArrowDown=e=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3"})});De.XCircle=({className:e="e-5",...t})=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})});De.X=({className:e="e-5",...t})=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})});De.PaperAirplane=({className:e="e-5",...t})=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"})});const Mn=Object.create(null);Mn.open="0";Mn.close="1";Mn.ping="2";Mn.pong="3";Mn.message="4";Mn.upgrade="5";Mn.noop="6";const Nl=Object.create(null);Object.keys(Mn).forEach(e=>{Nl[Mn[e]]=e});const sh={type:"error",data:"parser error"},fS=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",dS=typeof ArrayBuffer=="function",hS=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,lm=({type:e,data:t},n,r)=>fS&&t instanceof Blob?n?r(t):$y(t,r):dS&&(t instanceof ArrayBuffer||hS(t))?n?r(t):$y(new Blob([t]),r):r(Mn[e]+(t||"")),$y=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Vy(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let pf;function xj(e,t){if(fS&&e.data instanceof Blob)return e.data.arrayBuffer().then(Vy).then(t);if(dS&&(e.data instanceof ArrayBuffer||hS(e.data)))return t(Vy(e.data));lm(e,!1,n=>{pf||(pf=new TextEncoder),t(pf.encode(n))})}const By="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bo=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<By.length;e++)bo[By.charCodeAt(e)]=e;const wj=e=>{let t=e.length*.75,n=e.length,r,i=0,s,o,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),f=new Uint8Array(u);for(r=0;r<n;r+=4)s=bo[e.charCodeAt(r)],o=bo[e.charCodeAt(r+1)],a=bo[e.charCodeAt(r+2)],l=bo[e.charCodeAt(r+3)],f[i++]=s<<2|o>>4,f[i++]=(o&15)<<4|a>>2,f[i++]=(a&3)<<6|l&63;return u},bj=typeof ArrayBuffer=="function",um=(e,t)=>{if(typeof e!="string")return{type:"message",data:pS(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Sj(e.substring(1),t)}:Nl[n]?e.length>1?{type:Nl[n],data:e.substring(1)}:{type:Nl[n]}:sh},Sj=(e,t)=>{if(bj){const n=wj(e);return pS(n,t)}else return{base64:!0,data:e}},pS=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},mS="",Tj=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,o)=>{lm(s,!1,a=>{r[o]=a,++i===n&&t(r.join(mS))})})},Ej=(e,t)=>{const n=e.split(mS),r=[];for(let i=0;i<n.length;i++){const s=um(n[i],t);if(r.push(s),s.type==="error")break}return r};function Cj(){return new TransformStream({transform(e,t){xj(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const s=new DataView(i.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{i=new Uint8Array(9);const s=new DataView(i.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let mf;function cl(e){return e.reduce((t,n)=>t+n.length,0)}function fl(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function kj(e,t){mf||(mf=new TextDecoder);const n=[];let r=0,i=-1,s=!1;return new TransformStream({transform(o,a){for(n.push(o);;){if(r===0){if(cl(n)<1)break;const l=fl(n,1);s=(l[0]&128)===128,i=l[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(cl(n)<2)break;const l=fl(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(cl(n)<8)break;const l=fl(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),f=u.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(sh);break}i=f*Math.pow(2,32)+u.getUint32(4),r=3}else{if(cl(n)<i)break;const l=fl(n,i);a.enqueue(um(s?l:mf.decode(l),t)),r=0}if(i===0||i>e){a.enqueue(sh);break}}}})}const gS=4;function Me(e){if(e)return _j(e)}function _j(e){for(var t in Me.prototype)e[t]=Me.prototype[t];return e}Me.prototype.on=Me.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Me.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Me.prototype.off=Me.prototype.removeListener=Me.prototype.removeAllListeners=Me.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};Me.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};Me.prototype.emitReserved=Me.prototype.emit;Me.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Me.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Qu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Qt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Pj="arraybuffer";function yS(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Aj=Qt.setTimeout,Rj=Qt.clearTimeout;function Yu(e,t){t.useNativeTimers?(e.setTimeoutFn=Aj.bind(Qt),e.clearTimeoutFn=Rj.bind(Qt)):(e.setTimeoutFn=Qt.setTimeout.bind(Qt),e.clearTimeoutFn=Qt.clearTimeout.bind(Qt))}const Oj=1.33;function jj(e){return typeof e=="string"?Nj(e):Math.ceil((e.byteLength||e.size)*Oj)}function Nj(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function vS(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Mj(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Dj(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let s=n[r].split("=");t[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return t}class Fj extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class cm extends Me{constructor(t){super(),this.writable=!1,Yu(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new Fj(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=um(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=Mj(t);return n.length?"?"+n:""}}class Lj extends cm{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};Ej(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Tj(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=vS()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let xS=!1;try{xS=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Ij=xS;function $j(){}class Vj extends Lj{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,s)=>{this.onError("xhr post error",i,s)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Nn extends Me{constructor(t,n,r){super(),this.createRequest=t,Yu(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=yS(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=Nn.requestsCount++,Nn.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=$j,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Nn.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Nn.requestsCount=0;Nn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",zy);else if(typeof addEventListener=="function"){const e="onpagehide"in Qt?"pagehide":"unload";addEventListener(e,zy,!1)}}function zy(){for(let e in Nn.requests)Nn.requests.hasOwnProperty(e)&&Nn.requests[e].abort()}const Bj=function(){const e=wS({xdomain:!1});return e&&e.responseType!==null}();class zj extends Vj{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=Bj&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Nn(wS,this.uri(),t)}}function wS(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Ij))return new XMLHttpRequest}catch{}if(!t)try{return new Qt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const bS=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Uj extends cm{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=bS?{}:yS(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;lm(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}i&&Qu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=vS()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const gf=Qt.WebSocket||Qt.MozWebSocket;class Hj extends Uj{createSocket(t,n,r){return bS?new gf(t,n,r):n?new gf(t,n):new gf(t)}doWrite(t,n){this.ws.send(n)}}class Wj extends cm{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=kj(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=Cj();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const s=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),s())}).catch(a=>{})};s();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this._writer.write(r).then(()=>{i&&Qu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Kj={websocket:Hj,webtransport:Wj,polling:zj},qj=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Gj=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function oh(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=qj.exec(e||""),s={},o=14;for(;o--;)s[Gj[o]]=i[o]||"";return n!=-1&&r!=-1&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=Qj(s,s.path),s.queryKey=Yj(s,s.query),s}function Qj(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Yj(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const ah=typeof addEventListener=="function"&&typeof removeEventListener=="function",Ml=[];ah&&addEventListener("offline",()=>{Ml.forEach(e=>e())},!1);class Lr extends Me{constructor(t,n){if(super(),this.binaryType=Pj,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=oh(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=oh(n.host).host);Yu(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Dj(this.opts.query)),ah&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Ml.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=gS,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Lr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Lr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=jj(i)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Qu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const s={type:t,data:n,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Lr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),ah&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Ml.indexOf(this._offlineEventListener);r!==-1&&Ml.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Lr.protocol=gS;class Xj extends Lr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Lr.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",c=>{if(!r)if(c.type==="pong"&&c.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Lr.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const d=new Error("probe error");d.transport=n.name,this.emitReserved("upgradeError",d)}}))};function s(){r||(r=!0,f(),n.close(),n=null)}const o=c=>{const d=new Error("probe error: "+c);d.transport=n.name,s(),this.emitReserved("upgradeError",d)};function a(){o("transport closed")}function l(){o("socket closed")}function u(c){n&&c.name!==n.name&&s()}const f=()=>{n.removeListener("open",i),n.removeListener("error",o),n.removeListener("close",a),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",o),n.once("close",a),this.once("close",l),this.once("upgrading",u),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let Zj=class extends Xj{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(i=>Kj[i]).filter(i=>!!i)),super(t,r)}};function Jj(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=oh(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+t,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}const eN=typeof ArrayBuffer=="function",tN=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,SS=Object.prototype.toString,nN=typeof Blob=="function"||typeof Blob<"u"&&SS.call(Blob)==="[object BlobConstructor]",rN=typeof File=="function"||typeof File<"u"&&SS.call(File)==="[object FileConstructor]";function fm(e){return eN&&(e instanceof ArrayBuffer||tN(e))||nN&&e instanceof Blob||rN&&e instanceof File}function Dl(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Dl(e[n]))return!0;return!1}if(fm(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Dl(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Dl(e[n]))return!0;return!1}function iN(e){const t=[],n=e.data,r=e;return r.data=lh(n,t),r.attachments=t.length,{packet:r,buffers:t}}function lh(e,t){if(!e)return e;if(fm(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=lh(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=lh(e[r],t));return n}return e}function sN(e,t){return e.data=uh(e.data,t),delete e.attachments,e}function uh(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=uh(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=uh(e[n],t));return e}const oN=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],aN=5;var te;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(te||(te={}));class lN{constructor(t){this.replacer=t}encode(t){return(t.type===te.EVENT||t.type===te.ACK)&&Dl(t)?this.encodeAsBinary({type:t.type===te.EVENT?te.BINARY_EVENT:te.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===te.BINARY_EVENT||t.type===te.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=iN(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function Uy(e){return Object.prototype.toString.call(e)==="[object Object]"}class dm extends Me{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===te.BINARY_EVENT;r||n.type===te.BINARY_ACK?(n.type=r?te.EVENT:te.ACK,this.reconstructor=new uN(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(fm(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(te[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===te.BINARY_EVENT||r.type===te.BINARY_ACK){const s=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const o=t.substring(s,n);if(o!=Number(o)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(o)}if(t.charAt(n+1)==="/"){const s=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(s,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const s=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}r.id=Number(t.substring(s,n+1))}if(t.charAt(++n)){const s=this.tryParse(t.substr(n));if(dm.isPayloadValid(r.type,s))r.data=s;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case te.CONNECT:return Uy(n);case te.DISCONNECT:return n===void 0;case te.CONNECT_ERROR:return typeof n=="string"||Uy(n);case te.EVENT:case te.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&oN.indexOf(n[0])===-1);case te.ACK:case te.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class uN{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=sN(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const cN=Object.freeze(Object.defineProperty({__proto__:null,Decoder:dm,Encoder:lN,get PacketType(){return te},protocol:aN},Symbol.toStringTag,{value:"Module"}));function fn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const fN=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class TS extends Me{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[fn(t,"open",this.onopen.bind(this)),fn(t,"packet",this.onpacket.bind(this)),fn(t,"error",this.onerror.bind(this)),fn(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,i,s;if(fN.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const o={type:te.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const f=this.ids++,c=n.pop();this._registerAckCallback(f,c),o.id=f}const a=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,l=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!a||(l?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const s=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},i),o=(...a)=>{this.io.clearTimeoutFn(s),n.apply(this,a)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((r,i)=>{const s=(o,a)=>o?i(o):r(a);s.withError=!0,n.push(s),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...s)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...s)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:te.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case te.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case te.EVENT:case te.BINARY_EVENT:this.onevent(t);break;case te.ACK:case te.BINARY_ACK:this.onack(t);break;case te.DISCONNECT:this.ondisconnect();break;case te.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:te.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:te.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Zs(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Zs.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Zs.prototype.reset=function(){this.attempts=0};Zs.prototype.setMin=function(e){this.ms=e};Zs.prototype.setMax=function(e){this.max=e};Zs.prototype.setJitter=function(e){this.jitter=e};class ch extends Me{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Yu(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Zs({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||cN;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Zj(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=fn(n,"open",function(){r.onopen(),t&&t()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=fn(n,"error",s);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{i(),s(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(fn(t,"ping",this.onping.bind(this)),fn(t,"data",this.ondata.bind(this)),fn(t,"error",this.onerror.bind(this)),fn(t,"close",this.onclose.bind(this)),fn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Qu(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new TS(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const fo={};function Fl(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Jj(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=fo[i]&&s in fo[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new ch(r,t):(fo[i]||(fo[i]=new ch(r,t)),l=fo[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(Fl,{Manager:ch,Socket:TS,io:Fl,connect:Fl});const Ll=e=>{const t=document.cookie.split(";").find(n=>n.includes(e));return t?t.split("=")[1]:null},ES=y.createContext(null),Vi=()=>y.useContext(ES),dN=({children:e})=>{const[t,n]=y.useState(null),[r,i]=y.useState(!1),s=()=>{const c=Fl(Ek,{transports:["websocket"],auth:{customer_token:Ll("customer_token"),device_id:Ll("device_id"),customer_refresh_token:Ll("customer_refresh_token")}});c.on("error",d=>{console.error("Websocket error",d)}),c.on("connect",()=>{n(c),i(!0)})},o=()=>{t&&(t.connect(),i(!0))},a=()=>{t&&(t.disconnect(),i(!1))},l=(c,d)=>{t&&t.on(c,d)},u=(c,d)=>{t&&t.off(c,d)},f=(c,d,h)=>{t&&t.emit(c,d,h)};return w.jsx(ES.Provider,{value:{socket:t,connected:r,connect:s,reconnect:o,disconnect:a,on:l,off:u,emit:f},children:e})};var Dn=(e=>(e.ChatView="chat:user:view",e.ChatClose="chat:user:close",e.MessageList="message:list",e.MessageCreate="message:create",e.MessageTyping="message:typing",e.WidgetOpen="widget:open",e.WidgetClose="widget:close",e.PageChange="page-change",e))(Dn||{}),ut=(e=>(e.MessageAgentCreate="message:agent:create",e.MessageAgentTyping="message:agent:typing",e.Banned="banned",e.ChatUserClose="chat:user:close",e.ChatUserAssignee="chat:user:assignee",e))(ut||{});const hm=e=>{const t=_w(),n=(r,i)=>{var o;const s=((o=k4.find(a=>a.name===r))==null?void 0:o.path)??"/";return typeof i=="object"&&s.includes(":")?Object.entries(i).reduce((a,[l,u])=>a.replace(`:${l}`,u),s):i?`${s}?${i}`:s};return{push:(r,i)=>{t(n(r,i),e)},path:n}},hN=()=>xw({mutationFn:e=>Ea(`clients/${e.client_id}/chats`,{method:"POST",body:JSON.stringify({inputs:e.inputs,client_id:void 0,widget_id:e.widget_id,history:e.history})})}),pN=e=>Ea(`clients/${e}/chats`),fh=e=>Ea(`clients/${e}/chats`,{method:"DELETE"}),mN=(e,t)=>Ea("review",{method:"POST",body:JSON.stringify({rating:e,comment:t})}),gN=()=>xw({mutationFn:e=>mN(e.rating,e.comment)}),CS=(e,t,n)=>{const r=typeof window<"u"?window:void 0;y.useEffect(()=>(r.addEventListener(e,t),()=>{r.removeEventListener(e,t,!1)}),[e,t,r])},pm=()=>typeof window<"u"?/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent):!1;function kS({text:e}){var i,s,o,a;const{widget:t,isHaveChat:n}=tn(),r=nr();return w.jsxs(Re.div,{initial:{opacity:0,scale:.8,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.8,y:10},transition:{type:"spring",damping:20,stiffness:300},className:Ne("absolute bottom-full mb-3 p-3 shadow-lg whitespace-nowrap","w-auto right-0"),style:{borderRadius:r.getRadius(),backgroundColor:r.getColor(K.TooltipBackground),color:r.getColor(K.TooltipText)},children:[w.jsx(Re.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.1,duration:.3},className:"text-sm font-medium",style:{color:r.getColor(K.TooltipText)},children:e||(n?(s=(i=t==null?void 0:t.appearance)==null?void 0:i.design)==null?void 0:s.tooltip_message_active:(a=(o=t==null?void 0:t.appearance)==null?void 0:o.design)==null?void 0:a.tooltip_message)||"Bizimle sohbet edin!"}),w.jsx("div",{className:Ne("absolute bottom-0 right-4 w-3 h-3 transform rotate-45 translate-y-1.5 bg-blue-100")})]})}const yN="/notify.mp3",yf=async()=>{await new Audio(yN).play()};function vN({fallback:e,fallbackOpen:t}){const[n]=y.useState(window.document.title),r=Vi(),{isHaveChat:i,open:s}=tn(),[o,a]=y.useState(!0),[l,u]=y.useState(0),[f,c]=y.useState(null),d=(h,m)=>{if(f&&clearInterval(f),h||!i||m===0||Number.isNaN(m)){window.document.title=n,c(null);return}const x=setInterval(()=>{if(h||!i||m===0||Number.isNaN(m)){window.document.title=n,clearInterval(x),c(null);return}const b=`${m} Yeni mesajınız var! - ${n}`;window.document.title!==b?window.document.title=b:window.document.title=n},1e3);return c(x),()=>{clearInterval(x),c(null)}};return y.useEffect(()=>d(s&&o,l),[l,s,o]),y.useEffect(()=>{const h=()=>{a(document.visibilityState==="visible")};return document.addEventListener("visibilitychange",h,!1),()=>{document.removeEventListener("visibilitychange",h)}},[]),y.useEffect(()=>{if(!r||!i||s&&o)return;const h=()=>{!i||s&&o||(u(m=>m+1),yf())};return r.on(ut.MessageAgentCreate,h),r.on(ut.ChatUserAssignee,yf),()=>{r.off(ut.MessageAgentCreate,h),r.off(ut.ChatUserAssignee,yf)}},[r,i,s,o]),s?null:!i||l===0?t?e:null:w.jsx(kS,{text:"Yeni mesajlar var!"})}function xN({children:e,defaultOpen:t,border:n}){var p,g,v,E;const r=Vi(),{open:i,setOpen:s,setIsHaveChat:o,isHaveChat:a,widget:l}=tn(),[u]=y.useState(!0),f=hm(),c=ka(),d=nr(),h=pm();y.useEffect(()=>{a&&c.pathname==="/"&&f.push("chat")},[a]);const m=()=>{s(!0),r&&r.emit(Dn.WidgetOpen,{})},x=()=>{s(!1),r&&r.emit(Dn.WidgetClose,{})},b=()=>{s(!1),o(!1),fh(l.client_id),f.push("registration")};return y.useEffect(()=>{if(t&&s(!0),!(!r||!l))return r.on(ut.Banned,b),()=>{r.off(ut.Banned,b)}},[]),w.jsx("section",{className:"relative w-full h-full",children:w.jsxs(ji,{children:[i&&w.jsx(Re.div,{initial:{opacity:0,scale:.95,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:10},transition:{type:"spring",damping:25,stiffness:300,duration:.3},style:{width:h?"":((g=(p=l==null?void 0:l.appearance)==null?void 0:p.design)==null?void 0:g.width)||"21rem",height:h?"":((E=(v=l==null?void 0:l.appearance)==null?void 0:v.design)==null?void 0:E.height)||"30rem",left:h?"0":"",borderColor:d.getColor(K.Border),boxShadow:"0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05)"},className:Ne("fixed z-300 overflow-hidden rounded-xl",{"border border-solid dark:border-zink-500":n,"bottom-12 right-12":!h,"bottom-0 right-0":h}),children:e}),w.jsx("div",{className:"absolute bottom-0 right-0 z-400",children:w.jsxs(ji,{children:[w.jsx(vN,{fallback:w.jsx(kS,{}),fallbackOpen:u}),!i&&w.jsxs(Gn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:m,children:[w.jsx(Re.span,{initial:{scale:.8,opacity:0},animate:{scale:[1,1.2,1],opacity:[.7,0,.7]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,repeatType:"loop"},className:Ne("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:d.getColor(K.ButtonBackground)}}),w.jsx(De.Chat,{className:"size-7"})]}),i&&!h&&w.jsx(Gn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:x,children:w.jsx(De.X,{className:"size-7"})})]})})]})})}function _S(e){const{widget:t}=tn();return w.jsx(vj,{widget:t,children:w.jsx(xN,{...e})})}function Bi(e){this._maxSize=e,this.clear()}Bi.prototype.clear=function(){this._size=0,this._values=Object.create(null)};Bi.prototype.get=function(e){return this._values[e]};Bi.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var wN=/[^.^\]^[]+|(?=\[\]|\.\.)/g,PS=/^\d+$/,bN=/^\d/,SN=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,TN=/^\s*(['"]?)(.*?)(\1)\s*$/,mm=512,Hy=new Bi(mm),Wy=new Bi(mm),Ky=new Bi(mm),Ti={Cache:Bi,split:dh,normalizePath:vf,setter:function(e){var t=vf(e);return Wy.get(e)||Wy.set(e,function(r,i){for(var s=0,o=t.length,a=r;s<o-1;){var l=t[s];if(l==="__proto__"||l==="constructor"||l==="prototype")return r;a=a[t[s++]]}a[t[s]]=i})},getter:function(e,t){var n=vf(e);return Ky.get(e)||Ky.set(e,function(i){for(var s=0,o=n.length;s<o;)if(i!=null||!t)i=i[n[s++]];else return;return i})},join:function(e){return e.reduce(function(t,n){return t+(gm(n)||PS.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){EN(Array.isArray(e)?e:dh(e),t,n)}};function vf(e){return Hy.get(e)||Hy.set(e,dh(e).map(function(t){return t.replace(TN,"$2")}))}function dh(e){return e.match(wN)||[""]}function EN(e,t,n){var r=e.length,i,s,o,a;for(s=0;s<r;s++)i=e[s],i&&(_N(i)&&(i='"'+i+'"'),a=gm(i),o=!a&&/^\d+$/.test(i),t.call(n,i,a,o,s,e))}function gm(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function CN(e){return e.match(bN)&&!e.match(PS)}function kN(e){return SN.test(e)}function _N(e){return!gm(e)&&(CN(e)||kN(e))}const PN=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,Xu=e=>e.match(PN)||[],Zu=e=>e[0].toUpperCase()+e.slice(1),ym=(e,t)=>Xu(e).join(t).toLowerCase(),AS=e=>Xu(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),AN=e=>Zu(AS(e)),RN=e=>ym(e,"_"),ON=e=>ym(e,"-"),jN=e=>Zu(ym(e," ")),NN=e=>Xu(e).map(Zu).join(" ");var xf={words:Xu,upperFirst:Zu,camelCase:AS,pascalCase:AN,snakeCase:RN,kebabCase:ON,sentenceCase:jN,titleCase:NN},vm={exports:{}};vm.exports=function(e){return RS(MN(e),e)};vm.exports.array=RS;function RS(e,t){var n=e.length,r=new Array(n),i={},s=n,o=DN(t),a=FN(e);for(t.forEach(function(u){if(!a.has(u[0])||!a.has(u[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)i[s]||l(e[s],s,new Set);return r;function l(u,f,c){if(c.has(u)){var d;try{d=", node was:"+JSON.stringify(u)}catch{d=""}throw new Error("Cyclic dependency"+d)}if(!a.has(u))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(u));if(!i[f]){i[f]=!0;var h=o.get(u)||new Set;if(h=Array.from(h),f=h.length){c.add(u);do{var m=h[--f];l(m,a.get(m),c)}while(f);c.delete(u)}r[--n]=u}}}function MN(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}function DN(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}function FN(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}var LN=vm.exports;const IN=Ws(LN),$N=Object.prototype.toString,VN=Error.prototype.toString,BN=RegExp.prototype.toString,zN=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",UN=/^Symbol\((.*)\)(.*)$/;function HN(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function qy(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return HN(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return zN.call(e).replace(UN,"Symbol($1)");const r=$N.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+VN.call(e)+"]":r==="RegExp"?BN.call(e):null}function Ir(e,t){let n=qy(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let s=qy(this[r],t);return s!==null?s:i},2)}function OS(e){return e==null?[]:[].concat(e)}let jS,NS,MS,WN=/\$\{\s*(\w+)\s*\}/g;jS=Symbol.toStringTag;class Gy{constructor(t,n,r,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[jS]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],OS(t).forEach(s=>{if(bt.isError(s)){this.errors.push(...s.errors);const o=s.inner.length?s.inner:[s];this.inner.push(...o)}else this.errors.push(s)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}NS=Symbol.hasInstance;MS=Symbol.toStringTag;class bt extends Error{static formatError(t,n){const r=n.label||n.path||"this";return n=Object.assign({},n,{path:r,originalPath:n.path}),typeof t=="string"?t.replace(WN,(i,s)=>Ir(n[s])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,i,s){const o=new Gy(t,n,r,i);if(s)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[MS]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,bt)}static[NS](t){return Gy[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let bn={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const i=r!=null&&r!==n?` (cast from the value \`${Ir(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Ir(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${Ir(n,!0)}\``+i}},gt={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},KN={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},hh={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},qN={isValue:"${path} field must be ${value}"},Il={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},GN={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},QN={notType:e=>{const{path:t,value:n,spec:r}=e,i=r.types.length;if(Array.isArray(n)){if(n.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${n.length} for value: \`${Ir(n,!0)}\``;if(n.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${n.length} for value: \`${Ir(n,!0)}\``}return bt.formatError(bn.notType,e)}};Object.assign(Object.create(null),{mixed:bn,string:gt,number:KN,date:hh,object:Il,array:GN,boolean:qN,tuple:QN});const xm=e=>e&&e.__isYupSchema__;class Su{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:i,otherwise:s}=n,o=typeof r=="function"?r:(...a)=>a.every(l=>l===r);return new Su(t,(a,l)=>{var u;let f=o(...a)?i:s;return(u=f==null?void 0:f(l))!=null?u:l})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(s=>s.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),i=this.fn(r,t,n);if(i===void 0||i===t)return t;if(!xm(i))throw new TypeError("conditions must return a schema object");return i.resolve(n)}}const dl={context:"$",value:"."};class zi{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===dl.context,this.isValue=this.key[0]===dl.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?dl.context:this.isValue?dl.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&Ti.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let i=this.isContext?r:this.isValue?t:n;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}zi.prototype.__isYupRef=!0;const fi=e=>e==null;function Qi(e){function t({value:n,path:r="",options:i,originalValue:s,schema:o},a,l){const{name:u,test:f,params:c,message:d,skipAbsent:h}=e;let{parent:m,context:x,abortEarly:b=o.spec.abortEarly,disableStackTrace:p=o.spec.disableStackTrace}=i;function g(I){return zi.isRef(I)?I.getValue(n,m,x):I}function v(I={}){const re=Object.assign({value:n,originalValue:s,label:o.spec.label,path:I.path||r,spec:o.spec,disableStackTrace:I.disableStackTrace||p},c,I.params);for(const xe of Object.keys(re))re[xe]=g(re[xe]);const ie=new bt(bt.formatError(I.message||d,re),n,re.path,I.type||u,re.disableStackTrace);return ie.params=re,ie}const E=b?a:l;let S={path:r,parent:m,type:u,from:i.from,createError:v,resolve:g,options:i,originalValue:s,schema:o};const C=I=>{bt.isError(I)?E(I):I?l(null):E(v())},k=I=>{bt.isError(I)?E(I):a(I)};if(h&&fi(n))return C(!0);let j;try{var N;if(j=f.call(S,n,S),typeof((N=j)==null?void 0:N.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${S.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(j).then(C,k)}}catch(I){k(I);return}C(j)}return t.OPTIONS=e,t}function YN(e,t,n,r=n){let i,s,o;return t?(Ti.forEach(t,(a,l,u)=>{let f=l?a.slice(1,a.length-1):a;e=e.resolve({context:r,parent:i,value:n});let c=e.type==="tuple",d=u?parseInt(f,10):0;if(e.innerType||c){if(c&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(n&&d>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);i=n,n=n&&n[d],e=c?e.spec.types[d]:e.innerType}if(!u){if(!e.fields||!e.fields[f])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);i=n,n=n&&n[f],e=e.fields[f]}s=f,o=l?"["+a+"]":"."+a}),{schema:e,parent:i,parentPath:s}):{parent:i,parentPath:t,schema:e}}class Tu extends Set{describe(){const t=[];for(const n of this.values())t.push(zi.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new Tu(this.values())}merge(t,n){const r=this.clone();return t.forEach(i=>r.add(i)),n.forEach(i=>r.delete(i)),r}}function hs(e,t=new Map){if(xm(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=hs(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,i]of e.entries())n.set(r,hs(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(hs(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=hs(i,t)}else throw Error(`Unable to clone ${e}`);return n}class Fn{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Tu,this._blacklist=new Tu,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(bn.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=hs(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const i=Object.assign({},n.spec,r.spec);return r.spec=i,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(s=>{t.tests.forEach(o=>{s.test(o.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((i,s)=>s.resolve(i,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,i,s;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(s=t.disableStackTrace)!=null?s:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),i=n.assert==="ignore-optionality",s=r._cast(t,n);if(n.assert!==!1&&!r.isType(s)){if(i&&fi(s))return s;let o=Ir(t),a=Ir(s);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
95
+ `),()=>{document.head.removeChild(h)}},[t]),w.jsx(B2,{isPresent:t,childRef:i,sizeRef:s,children:y.cloneElement(e,{ref:i})})}const U2=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a})=>{const l=Rp(H2),u=y.useId();let f=!0,c=y.useMemo(()=>(f=!1,{id:u,initial:t,isPresent:n,custom:i,onExitComplete:d=>{l.set(d,!0);for(const h of l.values())if(!h)return;r&&r()},register:d=>(l.set(d,!1),()=>l.delete(d))}),[n,l,r]);return s&&f&&(c={...c}),y.useMemo(()=>{l.forEach((d,h)=>l.set(h,!1))},[n]),y.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o==="popLayout"&&(e=w.jsx(z2,{isPresent:n,anchorX:a,children:e})),w.jsx(Wu.Provider,{value:c,children:e})};function H2(){return new Map}function Bw(e=!0){const t=y.useContext(Wu);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=y.useId();y.useEffect(()=>{if(e)return i(s)},[e]);const o=y.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const al=e=>e.key||"";function T0(e){const t=[];return y.Children.forEach(e,n=>{y.isValidElement(n)&&t.push(n)}),t}const Ni=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left"})=>{const[l,u]=Bw(o),f=y.useMemo(()=>T0(e),[e]),c=o&&!l?[]:f.map(al),d=y.useRef(!0),h=y.useRef(f),m=Rp(()=>new Map),[v,b]=y.useState(f),[p,g]=y.useState(f);Vw(()=>{d.current=!1,h.current=f;for(let S=0;S<p.length;S++){const C=al(p[S]);c.includes(C)?m.delete(C):m.get(C)!==!0&&m.set(C,!1)}},[p,c.length,c.join("-")]);const x=[];if(f!==v){let S=[...f];for(let C=0;C<p.length;C++){const k=p[C],P=al(k);c.includes(P)||(S.splice(C,0,k),x.push(k))}return s==="wait"&&x.length&&(S=x),g(T0(S)),b(f),null}const{forceRender:E}=y.useContext(Ap);return w.jsx(w.Fragment,{children:p.map(S=>{const C=al(S),k=o&&!l?!1:f===p||c.includes(C),P=()=>{if(m.has(C))m.set(C,!0);else return;let j=!0;m.forEach(N=>{N||(j=!1)}),j&&(E==null||E(),g(h.current),o&&(u==null||u()),r&&r())};return w.jsx(U2,{isPresent:k,initial:!d.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,onExitComplete:k?void 0:P,anchorX:a,children:S},C)})})};function Np(e,t){e.indexOf(t)===-1&&e.push(t)}function Mp(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let Bd=()=>{};const zd={skipAnimations:!1,useManualTiming:!1};function Dp(e){let t;return()=>(t===void 0&&(t=e()),t)}const Zt=e=>e,ia=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Fp{constructor(){this.subscriptions=[]}add(t){return Np(this.subscriptions,t),()=>Mp(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;s<i;s++){const o=this.subscriptions[s];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const An=e=>e*1e3,Rn=e=>e/1e3;function zw(e,t){return t?e*(1e3/t):0}const W2=Dp(()=>window.ScrollTimeline!==void 0);class K2{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(i=>{if(W2()&&i.attachTimeline)return i.attachTimeline(t);if(typeof n=="function")return n(i)});return()=>{r.forEach((i,s)=>{i&&i(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class q2 extends K2{then(t,n){return this.finished.finally(t).then(()=>{})}}const E0={value:null,addProjectionMetrics:null},Lp=e=>Array.isArray(e)&&typeof e[0]=="number",G2={};function Q2(e,t){const n=Dp(e);return()=>G2[t]??n()}const sa=Q2(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Uw=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s<i;s++)r+=e(s/(i-1))+", ";return`linear(${r.substring(0,r.length-2)})`},wo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Ud={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:wo([0,.65,.55,1]),circOut:wo([.55,0,1,.45]),backIn:wo([.31,.01,.66,-.59]),backOut:wo([.33,1.53,.69,.99])};function Hw(e,t){if(e)return typeof e=="function"&&sa()?Uw(e,t):Lp(e)?wo(e):Array.isArray(e)?e.map(n=>Hw(n,t)||Ud.easeOut):Ud[e]}function Y2(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeInOut",times:l}={},u=void 0){const f={[t]:n};l&&(f.offset=l);const c=Hw(a,i);return Array.isArray(c)&&(f.easing=c),e.animate(f,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal",pseudoElement:u})}function Ip(e){return typeof e=="function"&&"applyToOptions"in e}function $p(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const gu=2e4;function Vp(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<gu;)t+=n,r=e.next(t);return t>=gu?1/0:t}function X2(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Vp(r),gu);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:Rn(i)}}function Ww(e){return!!(typeof e=="function"&&sa()||!e||typeof e=="string"&&(e in Ud||sa())||Lp(e)||Array.isArray(e)&&e.every(Ww))}function C0(e,t){e.timeline=t,e.onfinish=null}const ll=["read","resolveKeyframes","update","preRender","render","postRender"];function Z2(e,t){let n=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(c){o.has(c)&&(f.schedule(c),e()),l++,c(a)}const f={schedule:(c,d=!1,h=!1)=>{const v=h&&i?n:r;return d&&o.add(c),v.has(c)||v.add(c),c},cancel:c=>{r.delete(c),o.delete(c)},process:c=>{if(a=c,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(u),t&&E0.value&&E0.value.frameloop[t].push(l),l=0,n.clear(),i=!1,s&&(s=!1,f.process(c))}};return f}const J2=40;function Kw(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=ll.reduce((p,g)=>(p[g]=Z2(s,t?g:void 0),p),{}),{read:a,resolveKeyframes:l,update:u,preRender:f,render:c,postRender:d}=o,h=()=>{const p=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(p-i.timestamp,J2),1),i.timestamp=p,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),f.process(i),c.process(i),d.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},m=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:ll.reduce((p,g)=>{const x=o[g];return p[g]=(E,S=!1,C=!1)=>(n||m(),x.schedule(E,S,C)),p},{}),cancel:p=>{for(let g=0;g<ll.length;g++)o[ll[g]].cancel(p)},state:i,steps:o}}const{schedule:Bp,cancel:II}=Kw(queueMicrotask,!1),{schedule:he,cancel:zr,state:Ge,steps:tf}=Kw(typeof requestAnimationFrame<"u"?requestAnimationFrame:Zt,!0);let Ol;function eP(){Ol=void 0}const On={now:()=>(Ol===void 0&&On.set(Ge.isProcessing||zd.useManualTiming?Ge.timestamp:performance.now()),Ol),set:e=>{Ol=e,queueMicrotask(eP)}},an={x:!1,y:!1};function qw(){return an.x||an.y}function tP(e){return e==="x"||e==="y"?an[e]?null:(an[e]=!0,()=>{an[e]=!1}):an.x||an.y?null:(an.x=an.y=!0,()=>{an.x=an.y=!1})}function nP(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){const i=document.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function Gw(e,t){const n=nP(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function k0(e){return!(e.pointerType==="touch"||qw())}function rP(e,t,n={}){const[r,i,s]=Gw(e,n),o=a=>{if(!k0(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const f=c=>{k0(c)&&(u(c),l.removeEventListener("pointerleave",f))};l.addEventListener("pointerleave",f,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const Qw=(e,t)=>t?e===t?!0:Qw(e,t.parentElement):!1,zp=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,iP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function sP(e){return iP.has(e.tagName)||e.tabIndex!==-1}const bo=new WeakSet;function _0(e){return t=>{t.key==="Enter"&&e(t)}}function nf(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const oP=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=_0(()=>{if(bo.has(n))return;nf(n,"down");const i=_0(()=>{nf(n,"up")}),s=()=>nf(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function P0(e){return zp(e)&&!qw()}function aP(e,t,n={}){const[r,i,s]=Gw(e,n),o=a=>{const l=a.currentTarget;if(!P0(a)||bo.has(l))return;bo.add(l);const u=t(l,a),f=(h,m)=>{window.removeEventListener("pointerup",c),window.removeEventListener("pointercancel",d),!(!P0(h)||!bo.has(l))&&(bo.delete(l),typeof u=="function"&&u(h,{success:m}))},c=h=>{f(h,l===window||l===document||n.useGlobalTarget||Qw(l,h.target))},d=h=>{f(h,!1)};window.addEventListener("pointerup",c,i),window.addEventListener("pointercancel",d,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),a instanceof HTMLElement&&(a.addEventListener("focus",u=>oP(u,i)),!sP(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}const A0=30,lP=e=>!isNaN(parseFloat(e));class uP{constructor(t,n={}){this.version="12.7.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=On.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=On.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=lP(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Fp);const r=this.events[t].add(n);return t==="change"?()=>{r(),he.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=On.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>A0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,A0);return zw(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function oa(e,t){return new uP(e,t)}const Yw=y.createContext({strict:!1}),R0={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Us={};for(const e in R0)Us[e]={isEnabled:t=>R0[e].some(n=>!!t[n])};function cP(e){for(const t in e)Us[t]={...Us[t],...e[t]}}const fP=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function yu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||fP.has(e)}let Xw=e=>!yu(e);function dP(e){e&&(Xw=t=>t.startsWith("on")?!yu(t):e(t))}try{dP(require("@emotion/is-prop-valid").default)}catch{}function hP(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Xw(i)||n===!0&&yu(i)||!t&&!yu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function pP(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}const Ku=y.createContext({});function qu(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function aa(e){return typeof e=="string"||Array.isArray(e)}const Up=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Hp=["initial",...Up];function Gu(e){return qu(e.animate)||Hp.some(t=>aa(e[t]))}function Zw(e){return!!(Gu(e)||e.variants)}function mP(e,t){if(Gu(e)){const{initial:n,animate:r}=e;return{initial:n===!1||aa(n)?n:void 0,animate:aa(r)?r:void 0}}return e.inherit!==!1?t:{}}function gP(e){const{initial:t,animate:n}=mP(e,y.useContext(Ku));return y.useMemo(()=>({initial:t,animate:n}),[O0(t),O0(n)])}function O0(e){return Array.isArray(e)?e.join(" "):e}const yP=Symbol.for("motionComponentSymbol");function us(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function vP(e,t,n){return y.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):us(n)&&(n.current=r))},[t])}const Wp=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),xP="framerAppearId",Jw="data-"+Wp(xP),eb=y.createContext({});function wP(e,t,n,r,i){var v,b;const{visualElement:s}=y.useContext(Ku),o=y.useContext(Yw),a=y.useContext(Wu),l=y.useContext(jp).reducedMotion,u=y.useRef(null);r=r||o.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const f=u.current,c=y.useContext(eb);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&bP(u.current,n,i,c);const d=y.useRef(!1);y.useInsertionEffect(()=>{f&&d.current&&f.update(n,a)});const h=n[Jw],m=y.useRef(!!h&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,h))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,h)));return Vw(()=>{f&&(d.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Bp.render(f.render),m.current&&f.animationState&&f.animationState.animateChanges())}),y.useEffect(()=>{f&&(!m.current&&f.animationState&&f.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var p;(p=window.MotionHandoffMarkAsComplete)==null||p.call(window,h)}),m.current=!1))}),f}function bP(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:tb(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&us(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:f,layoutScroll:l,layoutRoot:u})}function tb(e){if(e)return e.options.allowProjection!==!1?e.projection:tb(e.parent)}function SP({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&cP(e);function s(a,l){let u;const f={...y.useContext(jp),...a,layoutId:TP(a)},{isStatic:c}=f,d=gP(a),h=r(a,c);if(!c&&Op){EP();const m=CP(f);u=m.MeasureLayout,d.visualElement=wP(i,h,f,t,m.ProjectionNode)}return w.jsxs(Ku.Provider,{value:d,children:[u&&d.visualElement?w.jsx(u,{visualElement:d.visualElement,...f}):null,n(i,a,vP(h,d.visualElement,l),h,c,d.visualElement)]})}s.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const o=y.forwardRef(s);return o[yP]=i,o}function TP({layoutId:e}){const t=y.useContext(Ap).id;return t&&e!==void 0?t+"-"+e:e}function EP(e,t){y.useContext(Yw).strict}function CP(e){const{drag:t,layout:n}=Us;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const nb=e=>t=>typeof t=="string"&&t.startsWith(e),Kp=nb("--"),kP=nb("var(--"),qp=e=>kP(e)?_P.test(e.split("/*")[0].trim()):!1,_P=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,la={};function PP(e){for(const t in e)la[t]=e[t],Kp(t)&&(la[t].isCSSVariable=!0)}const Xs=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Vi=new Set(Xs);function rb(e,{layout:t,layoutId:n}){return Vi.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!la[e]||e==="opacity")}const it=e=>!!(e&&e.getVelocity),ib=(e,t)=>t&&typeof e=="number"?t.transform(e):e,er=(e,t,n)=>n>t?t:n<e?e:n,Zs={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ua={...Zs,transform:e=>er(0,1,e)},ul={...Zs,default:1},Pa=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ur=Pa("deg"),jn=Pa("%"),W=Pa("px"),AP=Pa("vh"),RP=Pa("vw"),j0={...jn,parse:e=>jn.parse(e)/100,transform:e=>jn.transform(e*100)},OP={borderWidth:W,borderTopWidth:W,borderRightWidth:W,borderBottomWidth:W,borderLeftWidth:W,borderRadius:W,radius:W,borderTopLeftRadius:W,borderTopRightRadius:W,borderBottomRightRadius:W,borderBottomLeftRadius:W,width:W,maxWidth:W,height:W,maxHeight:W,top:W,right:W,bottom:W,left:W,padding:W,paddingTop:W,paddingRight:W,paddingBottom:W,paddingLeft:W,margin:W,marginTop:W,marginRight:W,marginBottom:W,marginLeft:W,backgroundPositionX:W,backgroundPositionY:W},jP={rotate:ur,rotateX:ur,rotateY:ur,rotateZ:ur,scale:ul,scaleX:ul,scaleY:ul,scaleZ:ul,skew:ur,skewX:ur,skewY:ur,distance:W,translateX:W,translateY:W,translateZ:W,x:W,y:W,z:W,perspective:W,transformPerspective:W,opacity:ua,originX:j0,originY:j0,originZ:W},N0={...Zs,transform:Math.round},Gp={...OP,...jP,zIndex:N0,size:W,fillOpacity:ua,strokeOpacity:ua,numOctaves:N0},NP={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},MP=Xs.length;function DP(e,t,n){let r="",i=!0;for(let s=0;s<MP;s++){const o=Xs[s],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=ib(a,Gp[o]);if(!l){i=!1;const f=NP[o]||o;r+=`${f}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function Qp(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let o=!1,a=!1;for(const l in t){const u=t[l];if(Vi.has(l)){o=!0;continue}else if(Kp(l)){i[l]=u;continue}else{const f=ib(u,Gp[l]);l.startsWith("origin")?(a=!0,s[l]=f):r[l]=f}}if(t.transform||(o||n?r.transform=DP(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:f=0}=s;r.transformOrigin=`${l} ${u} ${f}`}}const Yp=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function sb(e,t,n){for(const r in t)!it(t[r])&&!rb(r,n)&&(e[r]=t[r])}function FP({transformTemplate:e},t){return y.useMemo(()=>{const n=Yp();return Qp(n,t,e),Object.assign({},n.vars,n.style)},[t])}function LP(e,t){const n=e.style||{},r={};return sb(r,n,e),Object.assign(r,FP(e,t)),r}function IP(e,t){const n={},r=LP(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const $P=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Xp(e){return typeof e!="string"||e.includes("-")?!1:!!($P.indexOf(e)>-1||/[A-Z]/u.test(e))}const VP={offset:"stroke-dashoffset",array:"stroke-dasharray"},BP={offset:"strokeDashoffset",array:"strokeDasharray"};function zP(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?VP:BP;e[s.offset]=W.transform(-r);const o=W.transform(t),a=W.transform(n);e[s.array]=`${o} ${a}`}function M0(e,t,n){return typeof e=="string"?e:W.transform(t+n*e)}function UP(e,t,n){const r=M0(t,e.x,e.width),i=M0(n,e.y,e.height);return`${r} ${i}`}function Zp(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},f,c){if(Qp(e,u,c),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:h,dimensions:m}=e;d.transform&&(m&&(h.transform=d.transform),delete d.transform),m&&(i!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=UP(m,i!==void 0?i:.5,s!==void 0?s:.5)),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&zP(d,o,a,l,!1)}const ob=()=>({...Yp(),attrs:{}}),Jp=e=>typeof e=="string"&&e.toLowerCase()==="svg";function HP(e,t,n,r){const i=y.useMemo(()=>{const s=ob();return Zp(s,t,Jp(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};sb(s,e.style,e),i.style={...s,...i.style}}return i}function WP(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(Xp(n)?HP:IP)(r,s,o,n),u=hP(r,typeof n=="string",e),f=n!==y.Fragment?{...u,...l,ref:i}:{},{children:c}=r,d=y.useMemo(()=>it(c)?c.get():c,[c]);return y.createElement(n,{...f,children:d})}}function D0(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function em(e,t,n,r){if(typeof t=="function"){const[i,s]=D0(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=D0(r);t=t(n!==void 0?n:e.custom,i,s)}return t}const Hd=e=>Array.isArray(e),KP=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),qP=e=>Hd(e)?e[e.length-1]||0:e;function jl(e){const t=it(e)?e.get():e;return KP(t)?t.toValue():t}function GP({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,s){const o={latestValues:QP(r,i,s,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const ab=e=>(t,n)=>{const r=y.useContext(Ku),i=y.useContext(Wu),s=()=>GP(e,t,r,i);return n?s():Rp(s)};function QP(e,t,n,r){const i={},s=r(e,{});for(const d in s)i[d]=jl(s[d]);let{initial:o,animate:a}=e;const l=Gu(e),u=Zw(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let f=n?n.initial===!1:!1;f=f||o===!1;const c=f?a:o;if(c&&typeof c!="boolean"&&!qu(c)){const d=Array.isArray(c)?c:[c];for(let h=0;h<d.length;h++){const m=em(e,d[h]);if(m){const{transitionEnd:v,transition:b,...p}=m;for(const g in p){let x=p[g];if(Array.isArray(x)){const E=f?x.length-1:0;x=x[E]}x!==null&&(i[g]=x)}for(const g in v)i[g]=v[g]}}}return i}function tm(e,t,n){var s;const{style:r}=e,i={};for(const o in r)(it(r[o])||t.style&&it(t.style[o])||rb(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const YP={useVisualState:ab({scrapeMotionValuesFromProps:tm,createRenderState:Yp})};function lb(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function ub(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const cb=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function fb(e,t,n,r){ub(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(cb.has(i)?i:Wp(i),t.attrs[i])}function db(e,t,n){const r=tm(e,t,n);for(const i in e)if(it(e[i])||it(t[i])){const s=Xs.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const F0=["x","y","width","height","cx","cy","r"],XP={useVisualState:ab({scrapeMotionValuesFromProps:db,createRenderState:ob,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:i})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in i)if(Vi.has(a)){s=!0;break}}if(!s)return;let o=!t;if(t)for(let a=0;a<F0.length;a++){const l=F0[a];e[l]!==t[l]&&(o=!0)}o&&he.read(()=>{lb(n,r),he.render(()=>{Zp(r,i,Jp(n.tagName),e.transformTemplate),fb(n,r)})})}})};function ZP(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Xp(r)?XP:YP,preloadedFeatures:e,useRender:WP(i),createVisualElement:t,Component:r};return SP(o)}}function ca(e,t,n){const r=e.getProps();return em(r,t,n!==void 0?n:r.custom,e)}const hb=new Set(["width","height","top","left","right","bottom",...Xs]);function JP(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,oa(n))}function eA(e,t){const n=ca(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=qP(s[o]);JP(e,o,a)}}function tA(e){return!!(it(e)&&e.add)}function Wd(e,t){const n=e.getValue("willChange");if(tA(n))return n.add(t);if(!n&&zd.WillChange){const r=new zd.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function pb(e){return e.props[Jw]}const mb=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,nA=1e-7,rA=12;function iA(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=mb(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>nA&&++a<rA);return o}function Aa(e,t,n,r){if(e===t&&n===r)return Zt;const i=s=>iA(s,0,1,e,n);return s=>s===0||s===1?s:mb(i(s),t,r)}const gb=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,yb=e=>t=>1-e(1-t),vb=Aa(.33,1.53,.69,.99),nm=yb(vb),xb=gb(nm),wb=e=>(e*=2)<1?.5*nm(e):.5*(2-Math.pow(2,-10*(e-1))),rm=e=>1-Math.sin(Math.acos(e)),bb=yb(rm),Sb=gb(rm),Tb=e=>/^0[^.\s]+$/u.test(e);function sA(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Tb(e):!0}const jo=e=>Math.round(e*1e5)/1e5,im=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function oA(e){return e==null}const aA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,sm=(e,t)=>n=>!!(typeof n=="string"&&aA.test(n)&&n.startsWith(e)||t&&!oA(n)&&Object.prototype.hasOwnProperty.call(n,t)),Eb=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(im);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},lA=e=>er(0,255,e),rf={...Zs,transform:e=>Math.round(lA(e))},ui={test:sm("rgb","red"),parse:Eb("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+rf.transform(e)+", "+rf.transform(t)+", "+rf.transform(n)+", "+jo(ua.transform(r))+")"};function uA(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Kd={test:sm("#"),parse:uA,transform:ui.transform},cs={test:sm("hsl","hue"),parse:Eb("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+jn.transform(jo(t))+", "+jn.transform(jo(n))+", "+jo(ua.transform(r))+")"},nt={test:e=>ui.test(e)||Kd.test(e)||cs.test(e),parse:e=>ui.test(e)?ui.parse(e):cs.test(e)?cs.parse(e):Kd.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ui.transform(e):cs.transform(e)},cA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function fA(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(im))==null?void 0:t.length)||0)+(((n=e.match(cA))==null?void 0:n.length)||0)>0}const Cb="number",kb="color",dA="var",hA="var(",L0="${}",pA=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function fa(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(pA,l=>(nt.test(l)?(r.color.push(s),i.push(kb),n.push(nt.parse(l))):l.startsWith(hA)?(r.var.push(s),i.push(dA),n.push(l)):(r.number.push(s),i.push(Cb),n.push(parseFloat(l))),++s,L0)).split(L0);return{values:n,split:a,indexes:r,types:i}}function _b(e){return fa(e).values}function Pb(e){const{split:t,types:n}=fa(e),r=t.length;return i=>{let s="";for(let o=0;o<r;o++)if(s+=t[o],i[o]!==void 0){const a=n[o];a===Cb?s+=jo(i[o]):a===kb?s+=nt.transform(i[o]):s+=i[o]}return s}}const mA=e=>typeof e=="number"?0:e;function gA(e){const t=_b(e);return Pb(e)(t.map(mA))}const Ur={test:fA,parse:_b,createTransformer:Pb,getAnimatableNone:gA},yA=new Set(["brightness","contrast","saturate","opacity"]);function vA(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(im)||[];if(!r)return e;const i=n.replace(r,"");let s=yA.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const xA=/\b([a-z-]*)\(.*?\)/gu,qd={...Ur,getAnimatableNone:e=>{const t=e.match(xA);return t?t.map(vA).join(" "):e}},wA={...Gp,color:nt,backgroundColor:nt,outlineColor:nt,fill:nt,stroke:nt,borderColor:nt,borderTopColor:nt,borderRightColor:nt,borderBottomColor:nt,borderLeftColor:nt,filter:qd,WebkitFilter:qd},Ab=e=>wA[e];function Rb(e,t){let n=Ab(e);return n!==qd&&(n=Ur),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const bA=new Set(["auto","none","0"]);function SA(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!bA.has(s)&&fa(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=Rb(n,i)}const ci=e=>e*180/Math.PI,Gd=e=>{const t=ci(Math.atan2(e[1],e[0]));return Qd(t)},TA={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Gd,rotateZ:Gd,skewX:e=>ci(Math.atan(e[1])),skewY:e=>ci(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Qd=e=>(e=e%360,e<0&&(e+=360),e),I0=Gd,$0=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),V0=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),EA={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:$0,scaleY:V0,scale:e=>($0(e)+V0(e))/2,rotateX:e=>Qd(ci(Math.atan2(e[6],e[5]))),rotateY:e=>Qd(ci(Math.atan2(-e[2],e[0]))),rotateZ:I0,rotate:I0,skewX:e=>ci(Math.atan(e[4])),skewY:e=>ci(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function B0(e){return e.includes("scale")?1:0}function Yd(e,t){if(!e||e==="none")return B0(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=EA,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=TA,i=a}if(!i)return B0(t);const s=r[t],o=i[1].split(",").map(kA);return typeof s=="function"?s(o):o[s]}const CA=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Yd(n,t)};function kA(e){return parseFloat(e.trim())}const z0=e=>e===Zs||e===W,_A=new Set(["x","y","z"]),PA=Xs.filter(e=>!_A.has(e));function AA(e){const t=[];return PA.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Hs={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Yd(t,"x"),y:(e,{transform:t})=>Yd(t,"y")};Hs.translateX=Hs.x;Hs.translateY=Hs.y;const Si=new Set;let Xd=!1,Zd=!1;function Ob(){if(Zd){const e=Array.from(Si).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=AA(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var a;(a=r.getValue(s))==null||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Zd=!1,Xd=!1,Si.forEach(e=>e.complete()),Si.clear()}function jb(){Si.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Zd=!0)})}function RA(){jb(),Ob()}class om{constructor(t,n,r,i,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Si.add(this),Xd||(Xd=!0,he.read(jb),he.resolveKeyframes(Ob))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const o=i==null?void 0:i.get(),a=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),i&&o===void 0&&i.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Si.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Si.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Nb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),OA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function jA(e){const t=OA.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function Mb(e,t,n=1){const[r,i]=jA(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return Nb(o)?parseFloat(o):o}return qp(i)?Mb(i,t,n+1):i}const Db=e=>t=>t.test(e),NA={test:e=>e==="auto",parse:e=>e},Fb=[Zs,W,jn,ur,RP,AP,NA],U0=e=>Fb.find(Db(e));class Lb extends om{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),qp(u))){const f=Mb(u,n.current);f!==void 0&&(t[l]=f),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!hb.has(r)||t.length!==2)return;const[i,s]=t,o=U0(i),a=U0(s);if(o!==a)if(z0(o)&&z0(a))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)sA(t[i])&&r.push(i);r.length&&SA(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Hs[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const s=r.length-1,o=r[s];r[s]=Hs[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const H0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ur.test(e)||e==="0")&&!e.startsWith("url("));function MA(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function DA(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],o=H0(i,t),a=H0(s,t);return!o||!a?!1:MA(e)||(n==="spring"||Ip(n))&&r}const FA=e=>e!==null;function Qu(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(FA),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const LA=40;class Ib{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=On.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>LA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&RA(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=On.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!DA(t,r,i,s))if(o)this.options.duration=0;else{l&&l(Qu(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const f=this.initPlayback(t,n);f!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...f},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const be=(e,t,n)=>e+(t-e)*n;function sf(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function IA({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,o=0;if(!t)i=s=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=sf(l,a,e+1/3),s=sf(l,a,e),o=sf(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function vu(e,t){return n=>n>0?t:e}const of=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},$A=[Kd,ui,cs],VA=e=>$A.find(t=>t.test(e));function W0(e){const t=VA(e);if(!t)return!1;let n=t.parse(e);return t===cs&&(n=IA(n)),n}const K0=(e,t)=>{const n=W0(e),r=W0(t);if(!n||!r)return vu(e,t);const i={...n};return s=>(i.red=of(n.red,r.red,s),i.green=of(n.green,r.green,s),i.blue=of(n.blue,r.blue,s),i.alpha=be(n.alpha,r.alpha,s),ui.transform(i))},BA=(e,t)=>n=>t(e(n)),Ra=(...e)=>e.reduce(BA),Jd=new Set(["none","hidden"]);function zA(e,t){return Jd.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function UA(e,t){return n=>be(e,t,n)}function am(e){return typeof e=="number"?UA:typeof e=="string"?qp(e)?vu:nt.test(e)?K0:KA:Array.isArray(e)?$b:typeof e=="object"?nt.test(e)?K0:HA:vu}function $b(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>am(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function HA(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=am(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function WA(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],o=e.indexes[s][r[s]],a=e.values[o]??0;n[i]=a,r[s]++}return n}const KA=(e,t)=>{const n=Ur.createTransformer(t),r=fa(e),i=fa(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Jd.has(e)&&!i.values.length||Jd.has(t)&&!r.values.length?zA(e,t):Ra($b(WA(r,i),i.values),n):vu(e,t)};function Vb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?be(e,t,n):am(e)(e,t)}const qA=5;function Bb(e,t,n){const r=Math.max(t-qA,0);return zw(n-e(r),t-r)}const Ce={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},af=.001;function GA({duration:e=Ce.duration,bounce:t=Ce.bounce,velocity:n=Ce.velocity,mass:r=Ce.mass}){let i,s,o=1-t;o=er(Ce.minDamping,Ce.maxDamping,o),e=er(Ce.minDuration,Ce.maxDuration,Rn(e)),o<1?(i=u=>{const f=u*o,c=f*e,d=f-n,h=eh(u,o),m=Math.exp(-c);return af-d/h*m},s=u=>{const c=u*o*e,d=c*n+n,h=Math.pow(o,2)*Math.pow(u,2)*e,m=Math.exp(-c),v=eh(Math.pow(u,2),o);return(-i(u)+af>0?-1:1)*((d-h)*m)/v}):(i=u=>{const f=Math.exp(-u*e),c=(u-n)*e+1;return-af+f*c},s=u=>{const f=Math.exp(-u*e),c=(n-u)*(e*e);return f*c});const a=5/e,l=YA(i,s,a);if(e=An(e),isNaN(l))return{stiffness:Ce.stiffness,damping:Ce.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const QA=12;function YA(e,t,n){let r=n;for(let i=1;i<QA;i++)r=r-e(r)/t(r);return r}function eh(e,t){return e*Math.sqrt(1-t*t)}const XA=["duration","bounce"],ZA=["stiffness","damping","mass"];function q0(e,t){return t.some(n=>e[n]!==void 0)}function JA(e){let t={velocity:Ce.velocity,stiffness:Ce.stiffness,damping:Ce.damping,mass:Ce.mass,isResolvedFromDuration:!1,...e};if(!q0(e,ZA)&&q0(e,XA))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*er(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Ce.mass,stiffness:i,damping:s}}else{const n=GA(e);t={...t,...n,mass:Ce.mass},t.isResolvedFromDuration=!0}return t}function xu(e=Ce.visualDuration,t=Ce.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:u,mass:f,duration:c,velocity:d,isResolvedFromDuration:h}=JA({...n,velocity:-Rn(n.velocity||0)}),m=d||0,v=u/(2*Math.sqrt(l*f)),b=o-s,p=Rn(Math.sqrt(l/f)),g=Math.abs(b)<5;r||(r=g?Ce.restSpeed.granular:Ce.restSpeed.default),i||(i=g?Ce.restDelta.granular:Ce.restDelta.default);let x;if(v<1){const S=eh(p,v);x=C=>{const k=Math.exp(-v*p*C);return o-k*((m+v*p*b)/S*Math.sin(S*C)+b*Math.cos(S*C))}}else if(v===1)x=S=>o-Math.exp(-p*S)*(b+(m+p*b)*S);else{const S=p*Math.sqrt(v*v-1);x=C=>{const k=Math.exp(-v*p*C),P=Math.min(S*C,300);return o-k*((m+v*p*b)*Math.sinh(P)+S*b*Math.cosh(P))/S}}const E={calculatedDuration:h&&c||null,next:S=>{const C=x(S);if(h)a.done=S>=c;else{let k=0;v<1&&(k=S===0?An(m):Bb(x,S,C));const P=Math.abs(k)<=r,j=Math.abs(o-C)<=i;a.done=P&&j}return a.value=a.done?o:C,a},toString:()=>{const S=Math.min(Vp(E),gu),C=Uw(k=>E.next(S*k).value,S,30);return S+"ms "+C},toTransition:()=>{}};return E}xu.applyToOptions=e=>{const t=X2(e,100,xu);return e.ease=sa()?t.ease:"easeOut",e.duration=An(t.duration),e.type="keyframes",e};function G0({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:f}){const c=e[0],d={done:!1,value:c},h=P=>a!==void 0&&P<a||l!==void 0&&P>l,m=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l;let v=n*t;const b=c+v,p=o===void 0?b:o(b);p!==b&&(v=p-c);const g=P=>-v*Math.exp(-P/r),x=P=>p+g(P),E=P=>{const j=g(P),N=x(P);d.done=Math.abs(j)<=u,d.value=d.done?p:N};let S,C;const k=P=>{h(d.value)&&(S=P,C=xu({keyframes:[d.value,m(d.value)],velocity:Bb(x,P,d.value),damping:i,stiffness:s,restDelta:u,restSpeed:f}))};return k(0),{calculatedDuration:null,next:P=>{let j=!1;return!C&&S===void 0&&(j=!0,E(P),k(P)),S!==void 0&&P>=S?C.next(P-S):(!j&&E(P),d)}}}const eR=Aa(.42,0,1,1),tR=Aa(0,0,.58,1),zb=Aa(.42,0,.58,1),nR=e=>Array.isArray(e)&&typeof e[0]!="number",Q0={linear:Zt,easeIn:eR,easeInOut:zb,easeOut:tR,circIn:rm,circInOut:Sb,circOut:bb,backIn:nm,backInOut:xb,backOut:vb,anticipate:wb},Y0=e=>{if(Lp(e)){Bd(e.length===4);const[t,n,r,i]=e;return Aa(t,n,r,i)}else if(typeof e=="string")return Bd(Q0[e]!==void 0),Q0[e];return e};function rR(e,t,n){const r=[],i=n||Vb,s=e.length-1;for(let o=0;o<s;o++){let a=i(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||Zt:t;a=Ra(l,a)}r.push(a)}return r}function iR(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(Bd(s===t.length),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=rR(t,r,i),l=a.length,u=f=>{if(o&&f<e[0])return t[0];let c=0;if(l>1)for(;c<e.length-2&&!(f<e[c+1]);c++);const d=ia(e[c],e[c+1],f);return a[c](d)};return n?f=>u(er(e[0],e[s-1],f)):u}function sR(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=ia(0,t,r);e.push(be(n,1,i))}}function oR(e){const t=[0];return sR(t,e.length-1),t}function aR(e,t){return e.map(n=>n*t)}function lR(e,t){return e.map(()=>t||zb).splice(0,e.length-1)}function wu({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=nR(r)?r.map(Y0):Y0(r),s={done:!1,value:t[0]},o=aR(n&&n.length===t.length?n:oR(t),e),a=iR(o,t,{ease:Array.isArray(i)?i:lR(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const uR=e=>{const t=({timestamp:n})=>e(n);return{start:()=>he.update(t,!0),stop:()=>zr(t),now:()=>Ge.isProcessing?Ge.timestamp:On.now()}},cR={decay:G0,inertia:G0,tween:wu,keyframes:wu,spring:xu},fR=e=>e/100;class lm extends Ib{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:i,keyframes:s}=this.options,o=(i==null?void 0:i.KeyframeResolver)||om,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new o(s,a,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,a=Ip(n)?n:cR[n]||wu;let l,u;a!==wu&&typeof t[0]!="number"&&(l=Ra(fR,Vb(t[0],t[1])),t=[0,100]);const f=a({...this.options,keyframes:t});s==="mirror"&&(u=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),f.calculatedDuration===null&&(f.calculatedDuration=Vp(f));const{calculatedDuration:c}=f,d=c+i,h=d*(r+1)-i;return{generator:f,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:c,resolvedDuration:d,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:P}=this.options;return{done:!0,value:P[P.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:f,resolvedDuration:c}=r;if(this.startTime===null)return s.next(0);const{delay:d,repeat:h,repeatType:m,repeatDelay:v,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-f/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const p=this.currentTime-d*(this.speed>=0?1:-1),g=this.speed>=0?p<0:p>f;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=f);let x=this.currentTime,E=s;if(h){const P=Math.min(this.currentTime,f)/c;let j=Math.floor(P),N=P%1;!N&&P>=1&&(N=1),N===1&&j--,j=Math.min(j,h+1),!!(j%2)&&(m==="reverse"?(N=1-N,v&&(N-=v/c)):m==="mirror"&&(E=o)),x=er(0,1,N)*c}const S=g?{done:!1,value:l[0]}:E.next(x);a&&(S.value=a(S.value));let{done:C}=S;!g&&u!==null&&(C=this.speed>=0?this.currentTime>=f:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return k&&i!==void 0&&(S.value=Qu(l,this.options,i)),b&&b(S.value),k&&this.finish(),S}get duration(){const{resolved:t}=this;return t?Rn(t.calculatedDuration):0}get time(){return Rn(this.currentTime)}set time(t){t=An(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Rn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=uR,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=this.currentTime??0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}get finished(){return this.currentFinishedPromise}}const dR=new Set(["opacity","clipPath","filter","transform"]),hR=Dp(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),bu=10,pR=2e4;function mR(e){return Ip(e.type)||e.type==="spring"||!Ww(e.ease)}function gR(e,t){const n=new lm({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let s=0;for(;!r.done&&s<pR;)r=n.sample(s),i.push(r.value),s+=bu;return{times:void 0,keyframes:i,duration:s-bu,ease:"linear"}}const Ub={anticipate:wb,backInOut:xb,circInOut:Sb};function yR(e){return e in Ub}class X0 extends Ib{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new Lb(s,(o,a)=>this.onKeyframesResolved(o,a),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:i,ease:s,type:o,motionValue:a,name:l,startTime:u}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&sa()&&yR(s)&&(s=Ub[s]),mR(this.options)){const{onComplete:c,onUpdate:d,motionValue:h,element:m,...v}=this.options,b=gR(t,v);t=b.keyframes,t.length===1&&(t[1]=t[0]),r=b.duration,i=b.times,s=b.ease,o="keyframes"}const f=Y2(a.owner.current,l,t,{...this.options,duration:r,times:i,ease:s});return f.startTime=u??this.calcStartTime(),this.pendingTimeline?(C0(f,this.pendingTimeline),this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:c}=this.options;a.set(Qu(t,this.options,n)),c&&c(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:r,times:i,type:o,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Rn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Rn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=An(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}get finished(){return this.resolved.animation.finished}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Zt;const{animation:r}=n;C0(r,t)}return Zt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:s,ease:o,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:f,onComplete:c,element:d,...h}=this.options,m=new lm({...h,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),v=An(this.time);u.setWithVelocity(m.sample(v-bu).value,m.sample(v).value,bu)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:s,damping:o,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=n.owner.getProps();return hR()&&r&&dR.has(r)&&(r!=="transform"||!u)&&!l&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}const vR={type:"spring",stiffness:500,damping:25,restSpeed:10},xR=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),wR={type:"keyframes",duration:.8},bR={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},SR=(e,{keyframes:t})=>t.length>2?wR:Vi.has(e)?e.startsWith("scale")?xR(t[1]):vR:bR;function TR({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:u,...f}){return!!Object.keys(f).length}const um=(e,t,n,r={},i,s)=>o=>{const a=$p(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-An(l);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:d=>{t.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};TR(a)||(f={...f,...SR(e,f)}),f.duration&&(f.duration=An(f.duration)),f.repeatDelay&&(f.repeatDelay=An(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let c=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(c=!0)),f.allowFlatten=!a.type&&!a.ease,c&&!s&&t.get()!==void 0){const d=Qu(f.keyframes,a);if(d!==void 0)return he.update(()=>{f.onUpdate(d),f.onComplete()}),new q2([])}return!s&&X0.supports(f)?new X0(f):new lm(f)};function ER({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Hb(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:o,...a}=t;r&&(s=r);const l=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const f in a){const c=e.getValue(f,e.latestValues[f]??null),d=a[f];if(d===void 0||u&&ER(u,f))continue;const h={delay:n,...$p(s||{},f)};let m=!1;if(window.MotionHandoffAnimation){const b=pb(e);if(b){const p=window.MotionHandoffAnimation(b,f,he);p!==null&&(h.startTime=p,m=!0)}}Wd(e,f),c.start(um(f,c,d,e.shouldReduceMotion&&hb.has(f)?{type:!1}:h,e,m));const v=c.animation;v&&l.push(v)}return o&&Promise.all(l).then(()=>{he.update(()=>{o&&eA(e,o)})}),l}function th(e,t,n={}){var l;const r=ca(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(Hb(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:f=0,staggerChildren:c,staggerDirection:d}=i;return CR(e,t,f+u,c,d,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,f]=a==="beforeChildren"?[s,o]:[o,s];return u().then(()=>f())}else return Promise.all([s(),o(n.delay)])}function CR(e,t,n=0,r=0,i=1,s){const o=[],a=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(kR).forEach((u,f)=>{u.notify("AnimationStart",t),o.push(th(u,t,{...s,delay:n+l(f)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function kR(e,t){return e.sortNodePosition(t)}function _R(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>th(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=th(e,t,n);else{const i=typeof t=="function"?ca(e,t,n.custom):t;r=Promise.all(Hb(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Wb(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const PR=Hp.length;function Kb(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Kb(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<PR;n++){const r=Hp[n],i=e.props[r];(aa(i)||i===!1)&&(t[r]=i)}return t}const AR=[...Up].reverse(),RR=Up.length;function OR(e){return t=>Promise.all(t.map(({animation:n,options:r})=>_R(e,n,r)))}function jR(e){let t=OR(e),n=Z0(),r=!0;const i=l=>(u,f)=>{var d;const c=ca(e,f,l==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);if(c){const{transition:h,transitionEnd:m,...v}=c;u={...u,...v,...m}}return u};function s(l){t=l(e)}function o(l){const{props:u}=e,f=Kb(e.parent)||{},c=[],d=new Set;let h={},m=1/0;for(let b=0;b<RR;b++){const p=AR[b],g=n[p],x=u[p]!==void 0?u[p]:f[p],E=aa(x),S=p===l?g.isActive:null;S===!1&&(m=b);let C=x===f[p]&&x!==u[p]&&E;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),g.protectedKeys={...h},!g.isActive&&S===null||!x&&!g.prevProp||qu(x)||typeof x=="boolean")continue;const k=NR(g.prevProp,x);let P=k||p===l&&g.isActive&&!C&&E||b>m&&E,j=!1;const N=Array.isArray(x)?x:[x];let I=N.reduce(i(p),{});S===!1&&(I={});const{prevResolvedValues:re={}}=g,ie={...re,...I},xe=ne=>{P=!0,d.has(ne)&&(j=!0,d.delete(ne)),g.needsAnimating[ne]=!0;const O=e.getValue(ne);O&&(O.liveStyle=!1)};for(const ne in ie){const O=I[ne],L=re[ne];if(h.hasOwnProperty(ne))continue;let B=!1;Hd(O)&&Hd(L)?B=!Wb(O,L):B=O!==L,B?O!=null?xe(ne):d.add(ne):O!==void 0&&d.has(ne)?xe(ne):g.protectedKeys[ne]=!0}g.prevProp=x,g.prevResolvedValues=I,g.isActive&&(h={...h,...I}),r&&e.blockInitialAnimation&&(P=!1),P&&(!(C&&k)||j)&&c.push(...N.map(ne=>({animation:ne,options:{type:p}})))}if(d.size){const b={};if(typeof u.initial!="boolean"){const p=ca(e,Array.isArray(u.initial)?u.initial[0]:u.initial);p&&p.transition&&(b.transition=p.transition)}d.forEach(p=>{const g=e.getBaseTarget(p),x=e.getValue(p);x&&(x.liveStyle=!0),b[p]=g??null}),c.push({animation:b})}let v=!!c.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(c):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=e.variantChildren)==null||c.forEach(d=>{var h;return(h=d.animationState)==null?void 0:h.setActive(l,u)}),n[l].isActive=u;const f=o(l);for(const d in n)n[d].protectedKeys={};return f}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Z0(),r=!0}}}function NR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Wb(t,e):!1}function Zr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Z0(){return{animate:Zr(!0),whileInView:Zr(),whileHover:Zr(),whileTap:Zr(),whileDrag:Zr(),whileFocus:Zr(),exit:Zr()}}class Gr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class MR extends Gr{constructor(t){super(t),t.animationState||(t.animationState=jR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();qu(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let DR=0;class FR extends Gr{constructor(){super(...arguments),this.id=DR++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const LR={animation:{Feature:MR},exit:{Feature:FR}};function da(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Oa(e){return{point:{x:e.pageX,y:e.pageY}}}const IR=e=>t=>zp(t)&&e(t,Oa(t));function No(e,t,n,r){return da(e,t,IR(n),r)}function qb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function $R({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function VR(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const Gb=1e-4,BR=1-Gb,zR=1+Gb,Qb=.01,UR=0-Qb,HR=0+Qb;function ct(e){return e.max-e.min}function WR(e,t,n){return Math.abs(e-t)<=n}function J0(e,t,n,r=.5){e.origin=r,e.originPoint=be(t.min,t.max,e.origin),e.scale=ct(n)/ct(t),e.translate=be(n.min,n.max,e.origin)-e.originPoint,(e.scale>=BR&&e.scale<=zR||isNaN(e.scale))&&(e.scale=1),(e.translate>=UR&&e.translate<=HR||isNaN(e.translate))&&(e.translate=0)}function Mo(e,t,n,r){J0(e.x,t.x,n.x,r?r.originX:void 0),J0(e.y,t.y,n.y,r?r.originY:void 0)}function ey(e,t,n){e.min=n.min+t.min,e.max=e.min+ct(t)}function KR(e,t,n){ey(e.x,t.x,n.x),ey(e.y,t.y,n.y)}function ty(e,t,n){e.min=t.min-n.min,e.max=e.min+ct(t)}function Do(e,t,n){ty(e.x,t.x,n.x),ty(e.y,t.y,n.y)}const ny=()=>({translate:0,scale:1,origin:0,originPoint:0}),fs=()=>({x:ny(),y:ny()}),ry=()=>({min:0,max:0}),Pe=()=>({x:ry(),y:ry()});function Ht(e){return[e("x"),e("y")]}function lf(e){return e===void 0||e===1}function nh({scale:e,scaleX:t,scaleY:n}){return!lf(e)||!lf(t)||!lf(n)}function ni(e){return nh(e)||Yb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Yb(e){return iy(e.x)||iy(e.y)}function iy(e){return e&&e!=="0%"}function Su(e,t,n){const r=e-n,i=t*r;return n+i}function sy(e,t,n,r,i){return i!==void 0&&(e=Su(e,i,r)),Su(e,n,r)+t}function rh(e,t=0,n=1,r,i){e.min=sy(e.min,t,n,r,i),e.max=sy(e.max,t,n,r,i)}function Xb(e,{x:t,y:n}){rh(e.x,t.translate,t.scale,t.originPoint),rh(e.y,n.translate,n.scale,n.originPoint)}const oy=.999999999999,ay=1.0000000000001;function qR(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let a=0;a<i;a++){s=n[a],o=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&hs(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Xb(e,o)),r&&ni(s.latestValues)&&hs(e,s.latestValues))}t.x<ay&&t.x>oy&&(t.x=1),t.y<ay&&t.y>oy&&(t.y=1)}function ds(e,t){e.min=e.min+t,e.max=e.max+t}function ly(e,t,n,r,i=.5){const s=be(e.min,e.max,i);rh(e,t,n,s,r)}function hs(e,t){ly(e.x,t.x,t.scaleX,t.scale,t.originX),ly(e.y,t.y,t.scaleY,t.scale,t.originY)}function Zb(e,t){return qb(VR(e.getBoundingClientRect(),t))}function GR(e,t,n){const r=Zb(e,n),{scroll:i}=t;return i&&(ds(r.x,i.offset.x),ds(r.y,i.offset.y)),r}const Jb=({current:e})=>e?e.ownerDocument.defaultView:null,uy=(e,t)=>Math.abs(e-t);function QR(e,t){const n=uy(e.x,t.x),r=uy(e.y,t.y);return Math.sqrt(n**2+r**2)}class eS{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const c=cf(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=QR(c.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:m}=c,{timestamp:v}=Ge;this.history.push({...m,timestamp:v});const{onStart:b,onMove:p}=this.handlers;d||(b&&b(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),p&&p(this.lastMoveEvent,c)},this.handlePointerMove=(c,d)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=uf(d,this.transformPagePoint),he.update(this.updatePoint,!0)},this.handlePointerUp=(c,d)=>{this.end();const{onEnd:h,onSessionEnd:m,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=cf(c.type==="pointercancel"?this.lastMoveEventInfo:uf(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(c,b),m&&m(c,b)},!zp(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=Oa(t),a=uf(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=Ge;this.history=[{...l,timestamp:u}];const{onSessionStart:f}=n;f&&f(t,cf(a,this.history)),this.removeListeners=Ra(No(this.contextWindow,"pointermove",this.handlePointerMove),No(this.contextWindow,"pointerup",this.handlePointerUp),No(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),zr(this.updatePoint)}}function uf(e,t){return t?{point:t(e.point)}:e}function cy(e,t){return{x:e.x-t.x,y:e.y-t.y}}function cf({point:e},t){return{point:e,delta:cy(e,tS(t)),offset:cy(e,YR(t)),velocity:XR(t,.1)}}function YR(e){return e[0]}function tS(e){return e[e.length-1]}function XR(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=tS(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>An(t)));)n--;if(!r)return{x:0,y:0};const s=Rn(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function ZR(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?be(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?be(n,e,r.max):Math.min(e,n)),e}function fy(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function JR(e,{top:t,left:n,bottom:r,right:i}){return{x:fy(e.x,n,i),y:fy(e.y,t,r)}}function dy(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function eO(e,t){return{x:dy(e.x,t.x),y:dy(e.y,t.y)}}function tO(e,t){let n=.5;const r=ct(e),i=ct(t);return i>r?n=ia(t.min,t.max-r,e.min):r>i&&(n=ia(e.min,e.max-i,t.min)),er(0,1,n)}function nO(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const ih=.35;function rO(e=ih){return e===!1?e=0:e===!0&&(e=ih),{x:hy(e,"left","right"),y:hy(e,"top","bottom")}}function hy(e,t,n){return{min:py(e,t),max:py(e,n)}}function py(e,t){return typeof e=="number"?e:e[t]||0}const iO=new WeakMap;class sO{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Pe(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=f=>{const{dragSnapToOrigin:c}=this.getProps();c?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Oa(f).point)},s=(f,c)=>{const{drag:d,dragPropagation:h,onDragStart:m}=this.getProps();if(d&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=tP(d),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ht(b=>{let p=this.getAxisMotionValue(b).get()||0;if(jn.test(p)){const{projection:g}=this.visualElement;if(g&&g.layout){const x=g.layout.layoutBox[b];x&&(p=ct(x)*(parseFloat(p)/100))}}this.originPoint[b]=p}),m&&he.postRender(()=>m(f,c)),Wd(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},o=(f,c)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:m,onDrag:v}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:b}=c;if(h&&this.currentDirection===null){this.currentDirection=oO(b),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",c.point,b),this.updateAxis("y",c.point,b),this.visualElement.render(),v&&v(f,c)},a=(f,c)=>this.stop(f,c),l=()=>Ht(f=>{var c;return this.getAnimationState(f)==="paused"&&((c=this.getAxisMotionValue(f).animation)==null?void 0:c.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new eS(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Jb(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&he.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!cl(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=ZR(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;t&&us(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=JR(r.layoutBox,t):this.constraints=!1,this.elastic=rO(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ht(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=nO(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!us(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=GR(r,i.root,this.visualElement.getTransformPagePoint());let o=eO(i.layout.layoutBox,s);if(n){const a=n($R(o));this.hasMutatedConstraints=!!a,a&&(o=qb(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Ht(f=>{if(!cl(f,n,this.currentDirection))return;let c=l&&l[f]||{};o&&(c={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,m={type:"inertia",velocity:r?t[f]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...c};return this.startAxisValueAnimation(f,m)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Wd(this.visualElement,t),r.start(um(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ht(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ht(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ht(n=>{const{drag:r}=this.getProps();if(!cl(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];s.set(t[n]-be(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!us(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ht(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=tO({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ht(o=>{if(!cl(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(be(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;iO.set(this.visualElement,this);const t=this.visualElement.current,n=No(t,"pointerdown",l=>{const{drag:u,dragListener:f=!0}=this.getProps();u&&f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();us(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),he.read(r);const o=da(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Ht(f=>{const c=this.getAxisMotionValue(f);c&&(this.originPoint[f]+=l[f].translate,c.set(c.get()+l[f].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=ih,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function cl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function oO(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class aO extends Gr{constructor(t){super(t),this.removeGroupControls=Zt,this.removeListeners=Zt,this.controls=new sO(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Zt}unmount(){this.removeGroupControls(),this.removeListeners()}}const my=e=>(t,n)=>{e&&he.postRender(()=>e(t,n))};class lO extends Gr{constructor(){super(...arguments),this.removePointerDownListener=Zt}onPointerDown(t){this.session=new eS(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Jb(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:my(t),onStart:my(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&he.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=No(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Nl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function gy(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const fo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(W.test(e))e=parseFloat(e);else return e;const n=gy(e,t.target.x),r=gy(e,t.target.y);return`${n}% ${r}%`}},uO={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Ur.parse(e);if(i.length>5)return r;const s=Ur.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const u=be(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}};class cO extends y.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;PP(fO),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Nl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,o=r.projection;return o&&(o.isPresent=s,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||he.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Bp.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function nS(e){const[t,n]=Bw(),r=y.useContext(Ap);return w.jsx(cO,{...e,layoutGroup:r,switchLayoutGroup:y.useContext(eb),isPresent:t,safeToRemove:n})}const fO={borderRadius:{...fo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:fo,borderTopRightRadius:fo,borderBottomLeftRadius:fo,borderBottomRightRadius:fo,boxShadow:uO};function dO(e,t,n){const r=it(e)?e:oa(e);return r.start(um("",r,t,n)),r.animation}function hO(e){return e instanceof SVGElement&&e.tagName!=="svg"}const pO=(e,t)=>e.depth-t.depth;class mO{constructor(){this.children=[],this.isDirty=!1}add(t){Np(this.children,t),this.isDirty=!0}remove(t){Mp(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(pO),this.isDirty=!1,this.children.forEach(t)}}function gO(e,t){const n=On.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(zr(r),e(s-t))};return he.read(r,!0),()=>zr(r)}const rS=["TopLeft","TopRight","BottomLeft","BottomRight"],yO=rS.length,yy=e=>typeof e=="string"?parseFloat(e):e,vy=e=>typeof e=="number"||W.test(e);function vO(e,t,n,r,i,s){i?(e.opacity=be(0,n.opacity??1,xO(r)),e.opacityExit=be(t.opacity??1,0,wO(r))):s&&(e.opacity=be(t.opacity??1,n.opacity??1,r));for(let o=0;o<yO;o++){const a=`border${rS[o]}Radius`;let l=xy(t,a),u=xy(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||vy(l)===vy(u)?(e[a]=Math.max(be(yy(l),yy(u),r),0),(jn.test(u)||jn.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=be(t.rotate||0,n.rotate||0,r))}function xy(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const xO=iS(0,.5,bb),wO=iS(.5,.95,Zt);function iS(e,t,n){return r=>r<e?0:r>t?1:n(ia(e,t,r))}function wy(e,t){e.min=t.min,e.max=t.max}function zt(e,t){wy(e.x,t.x),wy(e.y,t.y)}function by(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Sy(e,t,n,r,i){return e-=t,e=Su(e,1/n,r),i!==void 0&&(e=Su(e,1/i,r)),e}function bO(e,t=0,n=1,r=.5,i,s=e,o=e){if(jn.test(t)&&(t=parseFloat(t),t=be(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=be(s.min,s.max,r);e===s&&(a-=t),e.min=Sy(e.min,t,n,a,i),e.max=Sy(e.max,t,n,a,i)}function Ty(e,t,[n,r,i],s,o){bO(e,t[n],t[r],t[i],t.scale,s,o)}const SO=["x","scaleX","originX"],TO=["y","scaleY","originY"];function Ey(e,t,n,r){Ty(e.x,t,SO,n?n.x:void 0,r?r.x:void 0),Ty(e.y,t,TO,n?n.y:void 0,r?r.y:void 0)}function Cy(e){return e.translate===0&&e.scale===1}function sS(e){return Cy(e.x)&&Cy(e.y)}function ky(e,t){return e.min===t.min&&e.max===t.max}function EO(e,t){return ky(e.x,t.x)&&ky(e.y,t.y)}function _y(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function oS(e,t){return _y(e.x,t.x)&&_y(e.y,t.y)}function Py(e){return ct(e.x)/ct(e.y)}function Ay(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class CO{constructor(){this.members=[]}add(t){Np(this.members,t),t.scheduleRender()}remove(t){if(Mp(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function kO(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:f,rotateX:c,rotateY:d,skewX:h,skewY:m}=n;u&&(r=`perspective(${u}px) ${r}`),f&&(r+=`rotate(${f}deg) `),c&&(r+=`rotateX(${c}deg) `),d&&(r+=`rotateY(${d}deg) `),h&&(r+=`skewX(${h}deg) `),m&&(r+=`skewY(${m}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const ff=["","X","Y","Z"],_O={visibility:"hidden"},Ry=1e3;let PO=0;function df(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function aS(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=pb(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",he,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&aS(r)}function lS({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=PO++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(OO),this.nodes.forEach(FO),this.nodes.forEach(LO),this.nodes.forEach(jO)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new mO)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Fp),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=hO(o),this.instance=o;const{layoutId:l,layout:u,visualElement:f}=this.options;if(f&&!f.current&&f.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),e){let c;const d=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,c&&c(),c=gO(d,250),Nl.hasAnimatedSinceResize&&(Nl.hasAnimatedSinceResize=!1,this.nodes.forEach(jy))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&f&&(l||u)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||f.getDefaultTransition()||zO,{onLayoutAnimationStart:b,onLayoutAnimationComplete:p}=f.getProps(),g=!this.targetLayout||!oS(this.targetLayout,m),x=!d&&h;if(this.options.layoutRoot||this.resumeFrom||x||d&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(c,x);const E={...$p(v,"layout"),onPlay:b,onComplete:p};(f.shouldReduceMotion||this.options.layoutRoot)&&(E.delay=0,E.type=!1),this.startAnimation(E)}else d||jy(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,zr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(IO),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&aS(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f<this.path.length;f++){const c=this.path[f];c.shouldResetTransform=!0,c.updateScroll("snapshot"),c.options.layoutRoot&&c.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Oy);return}this.isUpdating||this.nodes.forEach(MO),this.isUpdating=!1,this.nodes.forEach(DO),this.nodes.forEach(AO),this.nodes.forEach(RO),this.clearAllSnapshots();const a=On.now();Ge.delta=er(0,1e3/60,a-Ge.timestamp),Ge.timestamp=a,Ge.isProcessing=!0,tf.update.process(Ge),tf.preRender.process(Ge),tf.render.process(Ge),Ge.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Bp.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(NO),this.sharedNodes.forEach($O)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,he.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){he.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ct(this.snapshot.measuredBox.x)&&!ct(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Pe(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!sS(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,f=u!==this.prevTransformTemplateValue;o&&(a||ni(this.latestValues)||f)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),UO(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return Pe();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(HO))){const{scroll:f}=this.root;f&&(ds(a.x,f.offset.x),ds(a.y,f.offset.y))}return a}removeElementScroll(o){var l;const a=Pe();if(zt(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const f=this.path[u],{scroll:c,options:d}=f;f!==this.root&&c&&d.layoutScroll&&(c.wasRoot&&zt(a,o),ds(a.x,c.offset.x),ds(a.y,c.offset.y))}return a}applyTransform(o,a=!1){const l=Pe();zt(l,o);for(let u=0;u<this.path.length;u++){const f=this.path[u];!a&&f.options.layoutScroll&&f.scroll&&f!==f.root&&hs(l,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),ni(f.latestValues)&&hs(l,f.latestValues)}return ni(this.latestValues)&&hs(l,this.latestValues),l}removeTransform(o){const a=Pe();zt(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!ni(u.latestValues))continue;nh(u.latestValues)&&u.updateSnapshot();const f=Pe(),c=u.measurePageBox();zt(f,c),Ey(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,f)}return ni(this.latestValues)&&Ey(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ge.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var d;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(d=this.parent)!=null&&d.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:c}=this.options;if(!(!this.layout||!(f||c))){if(this.resolvedRelativeTargetAt=Ge.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pe(),this.relativeTargetOrigin=Pe(),Do(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),zt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Pe(),this.targetWithTransforms=Pe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),KR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):zt(this.target,this.layout.layoutBox),Xb(this.target,this.targetDelta)):zt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pe(),this.relativeTargetOrigin=Pe(),Do(this.relativeTargetOrigin,this.target,h.target),zt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||nh(this.parent.latestValues)||Yb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var m;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Ge.timestamp&&(l=!1),l)return;const{layout:u,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||f))return;zt(this.layoutCorrected,this.layout.layoutBox);const c=this.treeScale.x,d=this.treeScale.y;qR(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Pe());const{target:h}=o;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(by(this.prevProjectionDelta.x,this.projectionDelta.x),by(this.prevProjectionDelta.y,this.projectionDelta.y)),Mo(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==c||this.treeScale.y!==d||!Ay(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ay(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=fs(),this.projectionDelta=fs(),this.projectionDeltaWithTransform=fs()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},f={...this.latestValues},c=fs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=Pe(),h=l?l.source:void 0,m=this.layout?this.layout.source:void 0,v=h!==m,b=this.getStack(),p=!b||b.members.length<=1,g=!!(v&&!p&&this.options.crossfade===!0&&!this.path.some(BO));this.animationProgress=0;let x;this.mixTargetDelta=E=>{const S=E/1e3;Ny(c.x,o.x,S),Ny(c.y,o.y,S),this.setTargetDelta(c),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Do(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),VO(this.relativeTarget,this.relativeTargetOrigin,d,S),x&&EO(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=Pe()),zt(x,this.relativeTarget)),v&&(this.animationValues=f,vO(f,u,this.latestValues,S,g,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(zr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=he.update(()=>{Nl.hasAnimatedSinceResize=!0,this.currentAnimation=dO(0,Ry,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Ry),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:f}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&uS(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Pe();const c=ct(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+c;const d=ct(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}zt(a,l),hs(a,f),Mo(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new CO),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&df("z",o,u,this.animationValues);for(let f=0;f<ff.length;f++)df(`rotate${ff[f]}`,o,u,this.animationValues),df(`skew${ff[f]}`,o,u,this.animationValues);o.render();for(const f in u)o.setStaticValue(f,u[f]),this.animationValues&&(this.animationValues[f]=u[f]);o.scheduleRender()}getProjectionStyles(o){if(!this.instance||this.isSVG)return;if(!this.isVisible)return _O;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=jl(o==null?void 0:o.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none",a;const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){const h={};return this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=jl(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!ni(this.latestValues)&&(h.transform=l?l({},""):"none",this.hasProjected=!1),h}const f=u.animationValues||u.latestValues;this.applyTransformsToTarget(),a.transform=kO(this.projectionDeltaWithTransform,this.treeScale,f),l&&(a.transform=l(f,a.transform));const{x:c,y:d}=this.projectionDelta;a.transformOrigin=`${c.origin*100}% ${d.origin*100}% 0`,u.animationValues?a.opacity=u===this?f.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:a.opacity=u===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const h in la){if(f[h]===void 0)continue;const{correct:m,applyTo:v,isCSSVariable:b}=la[h],p=a.transform==="none"?f[h]:m(f[h],u);if(v){const g=v.length;for(let x=0;x<g;x++)a[v[x]]=p}else b?this.options.visualElement.renderState.vars[h]=p:a[h]=p}return this.options.layoutId&&(a.pointerEvents=u===this?jl(o==null?void 0:o.pointerEvents)||"":"none"),a}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Oy),this.root.sharedNodes.clear()}}}function AO(e){e.updateLayout()}function RO(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,o=t.source!==e.layout.source;s==="size"?Ht(c=>{const d=o?t.measuredBox[c]:t.layoutBox[c],h=ct(d);d.min=r[c].min,d.max=d.min+h}):uS(s,t.layoutBox,r)&&Ht(c=>{const d=o?t.measuredBox[c]:t.layoutBox[c],h=ct(r[c]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+h)});const a=fs();Mo(a,r,t.layoutBox);const l=fs();o?Mo(l,e.applyTransform(i,!0),t.measuredBox):Mo(l,r,t.layoutBox);const u=!sS(a);let f=!1;if(!e.resumeFrom){const c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:d,layout:h}=c;if(d&&h){const m=Pe();Do(m,t.layoutBox,d.layoutBox);const v=Pe();Do(v,r,h.layoutBox),oS(m,v)||(f=!0),c.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=m,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:f})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function OO(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function jO(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function NO(e){e.clearSnapshot()}function Oy(e){e.clearMeasurements()}function MO(e){e.isLayoutDirty=!1}function DO(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function jy(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function FO(e){e.resolveTargetDelta()}function LO(e){e.calcProjection()}function IO(e){e.resetSkewAndRotation()}function $O(e){e.removeLeadSnapshot()}function Ny(e,t,n){e.translate=be(t.translate,0,n),e.scale=be(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function My(e,t,n,r){e.min=be(t.min,n.min,r),e.max=be(t.max,n.max,r)}function VO(e,t,n,r){My(e.x,t.x,n.x,r),My(e.y,t.y,n.y,r)}function BO(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const zO={duration:.45,ease:[.4,0,.1,1]},Dy=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Fy=Dy("applewebkit/")&&!Dy("chrome/")?Math.round:Zt;function Ly(e){e.min=Fy(e.min),e.max=Fy(e.max)}function UO(e){Ly(e.x),Ly(e.y)}function uS(e,t,n){return e==="position"||e==="preserve-aspect"&&!WR(Py(t),Py(n),.2)}function HO(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const WO=lS({attachResizeListener:(e,t)=>da(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),hf={current:void 0},cS=lS({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!hf.current){const e=new WO({});e.mount(window),e.setOptions({layoutScroll:!0}),hf.current=e}return hf.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),KO={pan:{Feature:lO},drag:{Feature:aO,ProjectionNode:cS,MeasureLayout:nS}};function Iy(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&he.postRender(()=>s(t,Oa(t)))}class qO extends Gr{mount(){const{current:t}=this.node;t&&(this.unmount=rP(t,(n,r)=>(Iy(this.node,r,"Start"),i=>Iy(this.node,i,"End"))))}unmount(){}}class GO extends Gr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ra(da(this.node.current,"focus",()=>this.onFocus()),da(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function $y(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&he.postRender(()=>s(t,Oa(t)))}class QO extends Gr{mount(){const{current:t}=this.node;t&&(this.unmount=aP(t,(n,r)=>($y(this.node,r,"Start"),(i,{success:s})=>$y(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const sh=new WeakMap,pf=new WeakMap,YO=e=>{const t=sh.get(e.target);t&&t(e)},XO=e=>{e.forEach(YO)};function ZO({root:e,...t}){const n=e||document;pf.has(n)||pf.set(n,{});const r=pf.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(XO,{root:e,...t})),r[i]}function JO(e,t,n){const r=ZO(t);return sh.set(e,n),r.observe(e),()=>{sh.delete(e),r.unobserve(e)}}const ej={some:0,all:1};class tj extends Gr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:ej[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:f,onViewportLeave:c}=this.node.getProps(),d=u?f:c;d&&d(l)};return JO(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(nj(t,n))&&this.startObserver()}unmount(){}}function nj({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const rj={inView:{Feature:tj},tap:{Feature:QO},focus:{Feature:GO},hover:{Feature:qO}},ij={layout:{ProjectionNode:cS,MeasureLayout:nS}},oh={current:null},fS={current:!1};function sj(){if(fS.current=!0,!!Op)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>oh.current=e.matches;e.addListener(t),t()}else oh.current=!1}const oj=[...Fb,nt,Ur],aj=e=>oj.find(Db(e)),lj=new WeakMap;function uj(e,t,n){for(const r in t){const i=t[r],s=n[r];if(it(i))e.addValue(r,i);else if(it(s))e.addValue(r,oa(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,oa(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Vy=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class cj{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=om,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=On.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,he.render(this.render,!1,!0))};const{latestValues:l,renderState:u,onUpdate:f}=o;this.onUpdate=f,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=Gu(n),this.isVariantNode=Zw(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in d){const m=d[h];l[h]!==void 0&&it(m)&&m.set(l[h],!1)}}mount(t){this.current=t,lj.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),fS.current||sj(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:oh.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),zr(this.notifyUpdate),zr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Vi.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&he.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Us){const n=Us[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Pe()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Vy.length;r++){const i=Vy[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,o=t[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=uj(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=oa(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Nb(r)||Tb(r))?r=parseFloat(r):!aj(r)&&Ur.test(n)&&(r=Rb(t,n)),this.setBaseTarget(t,it(r)?r.get():r)),it(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=em(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!it(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Fp),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class dS extends cj{constructor(){super(...arguments),this.KeyframeResolver=Lb}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;it(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function fj(e){return window.getComputedStyle(e)}class dj extends dS{constructor(){super(...arguments),this.type="html",this.renderInstance=ub}readValueFromInstance(t,n){if(Vi.has(n))return CA(t,n);{const r=fj(t),i=(Kp(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Zb(t,n)}build(t,n,r){Qp(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return tm(t,n,r)}}class hj extends dS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Pe,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&lb(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Vi.has(n)){const r=Ab(n);return r&&r.default||0}return n=cb.has(n)?n:Wp(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return db(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&he.postRender(this.updateDimensions)}build(t,n,r){Zp(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){fb(t,n,r,i)}mount(t){this.isSVGTag=Jp(t.tagName),super.mount(t)}}const pj=(e,t)=>Xp(e)?new hj(t):new dj(t,{allowProjection:e!==y.Fragment}),mj=ZP({...LR,...rj,...KO,...ij},pj),Re=pP(mj),gj=e=>["zink","slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"].includes(e),At=e=>{const[t,n]=e.split("-");return gj(t)?n?`var(--color-${t}-${n})`:`var(--color-${e}-500)`:`var(--color-${e})`};var dr=(e=>(e.None="none",e.Sm="sm",e.Md="md",e.Lg="lg",e.Xl="xl",e.Full="full",e))(dr||{});const hS=y.createContext({}),yj={[K.Background]:"",[K.Border]:"initial",[K.TooltipText]:At("blue-700"),[K.TooltipBackground]:At("blue-100"),[K.TooltipBorder]:At("blue-500"),[K.HeaderBackground]:At("blue-600"),[K.HeaderBorder]:"initial",[K.HeaderText]:"white",[K.FooterBackground]:"",[K.FooterBorder]:"",[K.FooterText]:"",[K.MessageAdminBackground]:"",[K.MessageAdminText]:"",[K.MessageVisitorBackground]:"",[K.MessageVisitorText]:"",[K.GreeterBackground]:"white",[K.GreeterText]:At("slate-700"),[K.GreeterBorder]:At("slate-200"),[K.GreeterTopBackground]:"linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%)",[K.GreeterTopText]:"white",[K.GreeterButtonBackground]:At("indigo-600"),[K.GreeterButtonText]:At("white"),[K.ButtonBackground]:At("indigo-600"),[K.ButtonText]:At("white"),[K.InputBackground]:At("white"),[K.InputText]:At("slate-800"),[K.InputBorder]:At("slate-200")},vj={[dr.None]:"0px",[dr.Sm]:"var(--radius-xs)",[dr.Md]:"var(--radius-sm)",[dr.Lg]:"var(--radius-md)",[dr.Xl]:"var(--radius-lg)",[dr.Full]:"calc(infinity * 1px)"},xj=e=>{const t={...yj};if(!e||!e.appearance||!e.appearance.design||!e.appearance.design.colors)return t;for(const n in e.appearance.design.colors){const r=n;e.appearance.design.colors[r]&&(t[r]=e.appearance.design.colors[r])}return t};function wj({children:e,widget:t}){const n=xj(t),r=t&&t.appearance&&t.appearance.design&&t.appearance.design.border_radius?t.appearance.design.border_radius:dr.Md,i=o=>n[o],s=()=>vj[r];return w.jsx(hS.Provider,{value:{colors:n,getColor:i,getRadius:s},children:e})}const nr=()=>y.useContext(hS);function Gn({children:e,type:t="button",variant:n="primary",kind:r="solid",size:i="md",disabled:s=!1,rounded:o=!1,className:a,textKey:l=K.ButtonText,bgKey:u=K.ButtonBackground,animations:f={},withoutTheming:c,...d}){const h=nr();return w.jsx(Re.button,{type:t,className:Ne("flex items-center justify-center focus:!ring-0 font-medium",{"rounded-full":o&&i!=="xs","rounded-lg":!o},a,S0[n]&&S0[n][r],$2[i][o?"rounded":"default"]),disabled:s,style:!c&&{color:h.getColor(l),backgroundColor:h.getColor(u),...o?{}:{borderRadius:h.getRadius()}},...f,...d,children:e})}function De(){}De.Home=function(t){return w.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:w.jsx("path",{d:"M3 13h1v7c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2v-7h1a1 1 0 00.707-1.707l-9-9a.999.999 0 00-1.414 0l-9 9A1 1 0 003 13zm7 7v-5h4v5h-4zm2-15.586l6 6V15l.001 5H16v-5c0-1.103-.897-2-2-2h-4c-1.103 0-2 .897-2 2v5H6v-9.586l6-6z"})})};De.Chat=e=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 0 1 .865-.501 48.172 48.172 0 0 0 3.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"})});De.Menu=e=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})});De.MessageTyping=({className:e="size-5",...t})=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.625 9.75a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H8.25m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H12m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0h-.375m-13.5 3.01c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.184-4.183a1.14 1.14 0 0 1 .778-.332 48.294 48.294 0 0 0 5.83-.498c1.585-.233 2.708-1.626 2.708-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"})});De.Check=function(t){return w.jsx("svg",{fill:"currentColor",viewBox:"0 0 16 16",height:"1em",width:"1em",...t,children:w.jsx("path",{d:"M12.736 3.97a.733.733 0 011.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 01-1.065.02L3.217 8.384a.757.757 0 010-1.06.733.733 0 011.047 0l3.052 3.093 5.4-6.425a.247.247 0 01.02-.022z"})})};De.Website=function(t){return w.jsxs("svg",{fill:"none",viewBox:"0 0 24 24",height:"1em",width:"1em",...t,children:[w.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14 7a1 1 0 00-1 1v8a1 1 0 001 1h4a1 1 0 001-1V8a1 1 0 00-1-1h-4zm3 2h-2v6h2V9z",clipRule:"evenodd"}),w.jsx("path",{fill:"currentColor",d:"M6 7a1 1 0 000 2h4a1 1 0 100-2H6zM6 11a1 1 0 100 2h4a1 1 0 100-2H6zM5 16a1 1 0 011-1h4a1 1 0 110 2H6a1 1 0 01-1-1z"}),w.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4 3a3 3 0 00-3 3v12a3 3 0 003 3h16a3 3 0 003-3V6a3 3 0 00-3-3H4zm16 2H4a1 1 0 00-1 1v12a1 1 0 001 1h16a1 1 0 001-1V6a1 1 0 00-1-1z",clipRule:"evenodd"})]})};De.ArrowDown=e=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3"})});De.XCircle=({className:e="e-5",...t})=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})});De.X=({className:e="e-5",...t})=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})});De.PaperAirplane=({className:e="e-5",...t})=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"})});const Mn=Object.create(null);Mn.open="0";Mn.close="1";Mn.ping="2";Mn.pong="3";Mn.message="4";Mn.upgrade="5";Mn.noop="6";const Ml=Object.create(null);Object.keys(Mn).forEach(e=>{Ml[Mn[e]]=e});const ah={type:"error",data:"parser error"},pS=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",mS=typeof ArrayBuffer=="function",gS=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,cm=({type:e,data:t},n,r)=>pS&&t instanceof Blob?n?r(t):By(t,r):mS&&(t instanceof ArrayBuffer||gS(t))?n?r(t):By(new Blob([t]),r):r(Mn[e]+(t||"")),By=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function zy(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let mf;function bj(e,t){if(pS&&e.data instanceof Blob)return e.data.arrayBuffer().then(zy).then(t);if(mS&&(e.data instanceof ArrayBuffer||gS(e.data)))return t(zy(e.data));cm(e,!1,n=>{mf||(mf=new TextEncoder),t(mf.encode(n))})}const Uy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",So=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<Uy.length;e++)So[Uy.charCodeAt(e)]=e;const Sj=e=>{let t=e.length*.75,n=e.length,r,i=0,s,o,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),f=new Uint8Array(u);for(r=0;r<n;r+=4)s=So[e.charCodeAt(r)],o=So[e.charCodeAt(r+1)],a=So[e.charCodeAt(r+2)],l=So[e.charCodeAt(r+3)],f[i++]=s<<2|o>>4,f[i++]=(o&15)<<4|a>>2,f[i++]=(a&3)<<6|l&63;return u},Tj=typeof ArrayBuffer=="function",fm=(e,t)=>{if(typeof e!="string")return{type:"message",data:yS(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Ej(e.substring(1),t)}:Ml[n]?e.length>1?{type:Ml[n],data:e.substring(1)}:{type:Ml[n]}:ah},Ej=(e,t)=>{if(Tj){const n=Sj(e);return yS(n,t)}else return{base64:!0,data:e}},yS=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},vS="",Cj=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,o)=>{cm(s,!1,a=>{r[o]=a,++i===n&&t(r.join(vS))})})},kj=(e,t)=>{const n=e.split(vS),r=[];for(let i=0;i<n.length;i++){const s=fm(n[i],t);if(r.push(s),s.type==="error")break}return r};function _j(){return new TransformStream({transform(e,t){bj(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const s=new DataView(i.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{i=new Uint8Array(9);const s=new DataView(i.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let gf;function fl(e){return e.reduce((t,n)=>t+n.length,0)}function dl(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function Pj(e,t){gf||(gf=new TextDecoder);const n=[];let r=0,i=-1,s=!1;return new TransformStream({transform(o,a){for(n.push(o);;){if(r===0){if(fl(n)<1)break;const l=dl(n,1);s=(l[0]&128)===128,i=l[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(fl(n)<2)break;const l=dl(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(fl(n)<8)break;const l=dl(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),f=u.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(ah);break}i=f*Math.pow(2,32)+u.getUint32(4),r=3}else{if(fl(n)<i)break;const l=dl(n,i);a.enqueue(fm(s?l:gf.decode(l),t)),r=0}if(i===0||i>e){a.enqueue(ah);break}}}})}const xS=4;function Me(e){if(e)return Aj(e)}function Aj(e){for(var t in Me.prototype)e[t]=Me.prototype[t];return e}Me.prototype.on=Me.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Me.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Me.prototype.off=Me.prototype.removeListener=Me.prototype.removeAllListeners=Me.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};Me.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};Me.prototype.emitReserved=Me.prototype.emit;Me.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Me.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Yu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Qt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Rj="arraybuffer";function wS(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Oj=Qt.setTimeout,jj=Qt.clearTimeout;function Xu(e,t){t.useNativeTimers?(e.setTimeoutFn=Oj.bind(Qt),e.clearTimeoutFn=jj.bind(Qt)):(e.setTimeoutFn=Qt.setTimeout.bind(Qt),e.clearTimeoutFn=Qt.clearTimeout.bind(Qt))}const Nj=1.33;function Mj(e){return typeof e=="string"?Dj(e):Math.ceil((e.byteLength||e.size)*Nj)}function Dj(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function bS(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Fj(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Lj(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let s=n[r].split("=");t[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return t}class Ij extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class dm extends Me{constructor(t){super(),this.writable=!1,Xu(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new Ij(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=fm(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=Fj(t);return n.length?"?"+n:""}}class $j extends dm{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};kj(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Cj(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=bS()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let SS=!1;try{SS=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Vj=SS;function Bj(){}class zj extends $j{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,s)=>{this.onError("xhr post error",i,s)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Nn extends Me{constructor(t,n,r){super(),this.createRequest=t,Xu(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=wS(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=Nn.requestsCount++,Nn.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Bj,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Nn.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Nn.requestsCount=0;Nn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Hy);else if(typeof addEventListener=="function"){const e="onpagehide"in Qt?"pagehide":"unload";addEventListener(e,Hy,!1)}}function Hy(){for(let e in Nn.requests)Nn.requests.hasOwnProperty(e)&&Nn.requests[e].abort()}const Uj=function(){const e=TS({xdomain:!1});return e&&e.responseType!==null}();class Hj extends zj{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=Uj&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Nn(TS,this.uri(),t)}}function TS(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Vj))return new XMLHttpRequest}catch{}if(!t)try{return new Qt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const ES=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Wj extends dm{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=ES?{}:wS(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;cm(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}i&&Yu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=bS()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const yf=Qt.WebSocket||Qt.MozWebSocket;class Kj extends Wj{createSocket(t,n,r){return ES?new yf(t,n,r):n?new yf(t,n):new yf(t)}doWrite(t,n){this.ws.send(n)}}class qj extends dm{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=Pj(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=_j();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const s=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),s())}).catch(a=>{})};s();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this._writer.write(r).then(()=>{i&&Yu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Gj={websocket:Kj,webtransport:qj,polling:Hj},Qj=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Yj=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function lh(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=Qj.exec(e||""),s={},o=14;for(;o--;)s[Yj[o]]=i[o]||"";return n!=-1&&r!=-1&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=Xj(s,s.path),s.queryKey=Zj(s,s.query),s}function Xj(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Zj(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const uh=typeof addEventListener=="function"&&typeof removeEventListener=="function",Dl=[];uh&&addEventListener("offline",()=>{Dl.forEach(e=>e())},!1);class Lr extends Me{constructor(t,n){if(super(),this.binaryType=Rj,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=lh(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=lh(n.host).host);Xu(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Lj(this.opts.query)),uh&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Dl.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=xS,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Lr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Lr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=Mj(i)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Yu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const s={type:t,data:n,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Lr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),uh&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Dl.indexOf(this._offlineEventListener);r!==-1&&Dl.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Lr.protocol=xS;class Jj extends Lr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Lr.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",c=>{if(!r)if(c.type==="pong"&&c.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Lr.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const d=new Error("probe error");d.transport=n.name,this.emitReserved("upgradeError",d)}}))};function s(){r||(r=!0,f(),n.close(),n=null)}const o=c=>{const d=new Error("probe error: "+c);d.transport=n.name,s(),this.emitReserved("upgradeError",d)};function a(){o("transport closed")}function l(){o("socket closed")}function u(c){n&&c.name!==n.name&&s()}const f=()=>{n.removeListener("open",i),n.removeListener("error",o),n.removeListener("close",a),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",o),n.once("close",a),this.once("close",l),this.once("upgrading",u),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let eN=class extends Jj{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(i=>Gj[i]).filter(i=>!!i)),super(t,r)}};function tN(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=lh(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+t,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}const nN=typeof ArrayBuffer=="function",rN=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,CS=Object.prototype.toString,iN=typeof Blob=="function"||typeof Blob<"u"&&CS.call(Blob)==="[object BlobConstructor]",sN=typeof File=="function"||typeof File<"u"&&CS.call(File)==="[object FileConstructor]";function hm(e){return nN&&(e instanceof ArrayBuffer||rN(e))||iN&&e instanceof Blob||sN&&e instanceof File}function Fl(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Fl(e[n]))return!0;return!1}if(hm(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Fl(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Fl(e[n]))return!0;return!1}function oN(e){const t=[],n=e.data,r=e;return r.data=ch(n,t),r.attachments=t.length,{packet:r,buffers:t}}function ch(e,t){if(!e)return e;if(hm(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=ch(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=ch(e[r],t));return n}return e}function aN(e,t){return e.data=fh(e.data,t),delete e.attachments,e}function fh(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=fh(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=fh(e[n],t));return e}const lN=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],uN=5;var te;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(te||(te={}));class cN{constructor(t){this.replacer=t}encode(t){return(t.type===te.EVENT||t.type===te.ACK)&&Fl(t)?this.encodeAsBinary({type:t.type===te.EVENT?te.BINARY_EVENT:te.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===te.BINARY_EVENT||t.type===te.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=oN(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function Wy(e){return Object.prototype.toString.call(e)==="[object Object]"}class pm extends Me{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===te.BINARY_EVENT;r||n.type===te.BINARY_ACK?(n.type=r?te.EVENT:te.ACK,this.reconstructor=new fN(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(hm(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(te[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===te.BINARY_EVENT||r.type===te.BINARY_ACK){const s=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const o=t.substring(s,n);if(o!=Number(o)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(o)}if(t.charAt(n+1)==="/"){const s=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(s,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const s=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}r.id=Number(t.substring(s,n+1))}if(t.charAt(++n)){const s=this.tryParse(t.substr(n));if(pm.isPayloadValid(r.type,s))r.data=s;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case te.CONNECT:return Wy(n);case te.DISCONNECT:return n===void 0;case te.CONNECT_ERROR:return typeof n=="string"||Wy(n);case te.EVENT:case te.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&lN.indexOf(n[0])===-1);case te.ACK:case te.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class fN{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=aN(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const dN=Object.freeze(Object.defineProperty({__proto__:null,Decoder:pm,Encoder:cN,get PacketType(){return te},protocol:uN},Symbol.toStringTag,{value:"Module"}));function fn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const hN=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class kS extends Me{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[fn(t,"open",this.onopen.bind(this)),fn(t,"packet",this.onpacket.bind(this)),fn(t,"error",this.onerror.bind(this)),fn(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,i,s;if(hN.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const o={type:te.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const f=this.ids++,c=n.pop();this._registerAckCallback(f,c),o.id=f}const a=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,l=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!a||(l?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const s=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},i),o=(...a)=>{this.io.clearTimeoutFn(s),n.apply(this,a)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((r,i)=>{const s=(o,a)=>o?i(o):r(a);s.withError=!0,n.push(s),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...s)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...s)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:te.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case te.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case te.EVENT:case te.BINARY_EVENT:this.onevent(t);break;case te.ACK:case te.BINARY_ACK:this.onack(t);break;case te.DISCONNECT:this.ondisconnect();break;case te.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:te.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:te.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Js(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Js.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Js.prototype.reset=function(){this.attempts=0};Js.prototype.setMin=function(e){this.ms=e};Js.prototype.setMax=function(e){this.max=e};Js.prototype.setJitter=function(e){this.jitter=e};class dh extends Me{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Xu(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Js({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||dN;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new eN(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=fn(n,"open",function(){r.onopen(),t&&t()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=fn(n,"error",s);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{i(),s(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(fn(t,"ping",this.onping.bind(this)),fn(t,"data",this.ondata.bind(this)),fn(t,"error",this.onerror.bind(this)),fn(t,"close",this.onclose.bind(this)),fn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Yu(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new kS(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const ho={};function Ll(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=tN(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=ho[i]&&s in ho[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new dh(r,t):(ho[i]||(ho[i]=new dh(r,t)),l=ho[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(Ll,{Manager:dh,Socket:kS,io:Ll,connect:Ll});const Il=e=>{const t=document.cookie.split(";").find(n=>n.includes(e));return t?t.split("=")[1]:null};var Ti=(e=>(e.CustomerToken="lc:customer:token",e.CustomerRefreshToken="lc:customer:refresh_token",e.DeviceId="lc:device:id",e))(Ti||{});const vf=(e,t)=>{localStorage.setItem(e,t)},xf=e=>localStorage.getItem(e),Ky=()=>{localStorage.removeItem("lc:customer:token"),localStorage.removeItem("lc:customer:refresh_token"),localStorage.removeItem("lc:device:id")},_S=y.createContext(null),Bi=()=>y.useContext(_S),pN=({children:e})=>{const[t,n]=y.useState(null),[r,i]=y.useState(!1),s=()=>{const c=Ll(kk,{transports:["websocket"],auth:{customer_token:xf(Ti.CustomerToken)||Il("customer_token"),device_id:xf(Ti.DeviceId)||Il("device_id"),customer_refresh_token:xf(Ti.CustomerRefreshToken)||Il("customer_refresh_token")}});c.on("error",d=>{console.error("Websocket error",d)}),c.on("connect",()=>{n(c),i(!0)})},o=()=>{t&&(t.connect(),i(!0))},a=()=>{t&&(t.disconnect(),i(!1))},l=(c,d)=>{t&&t.on(c,d)},u=(c,d)=>{t&&t.off(c,d)},f=(c,d,h)=>{t&&t.emit(c,d,h)};return w.jsx(_S.Provider,{value:{socket:t,connected:r,connect:s,reconnect:o,disconnect:a,on:l,off:u,emit:f},children:e})};var Dn=(e=>(e.ChatView="chat:user:view",e.ChatClose="chat:user:close",e.MessageList="message:list",e.MessageCreate="message:create",e.MessageTyping="message:typing",e.WidgetOpen="widget:open",e.WidgetClose="widget:close",e.PageChange="page-change",e))(Dn||{}),ut=(e=>(e.MessageAgentCreate="message:agent:create",e.MessageAgentTyping="message:agent:typing",e.Banned="banned",e.ChatUserClose="chat:user:close",e.ChatUserAssignee="chat:user:assignee",e))(ut||{});const mm=e=>{const t=Rw(),n=(r,i)=>{var o;const s=((o=RI.find(a=>a.name===r))==null?void 0:o.path)??"/";return typeof i=="object"&&s.includes(":")?Object.entries(i).reduce((a,[l,u])=>a.replace(`:${l}`,u),s):i?`${s}?${i}`:s};return{push:(r,i)=>{t(n(r,i),e)},path:n}};function mN(e){return e&&typeof e=="object"&&"customer_token"in e&&"customer_refresh_token"in e}const gN=()=>Sw({mutationFn:e=>Ca(`clients/${e.client_id}/chats`,{method:"POST",body:JSON.stringify({inputs:e.inputs,client_id:void 0,widget_id:e.widget_id,history:e.history})})}),yN=e=>Ca(`clients/${e}/chats`),hh=e=>Ca(`clients/${e}/chats`,{method:"DELETE"}),vN=(e,t)=>Ca("review",{method:"POST",body:JSON.stringify({rating:e,comment:t})}),xN=()=>Sw({mutationFn:e=>vN(e.rating,e.comment)}),PS=(e,t,n)=>{const r=typeof window<"u"?window:void 0;y.useEffect(()=>(r.addEventListener(e,t),()=>{r.removeEventListener(e,t,!1)}),[e,t,r])},gm=()=>typeof window<"u"?/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent):!1;function AS({text:e}){var i,s,o,a;const{widget:t,isHaveChat:n}=tn(),r=nr();return w.jsxs(Re.div,{initial:{opacity:0,scale:.8,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.8,y:10},transition:{type:"spring",damping:20,stiffness:300},className:Ne("absolute bottom-full mb-3 p-3 shadow-lg whitespace-nowrap","w-auto right-0"),style:{borderRadius:r.getRadius(),backgroundColor:r.getColor(K.TooltipBackground),color:r.getColor(K.TooltipText)},children:[w.jsx(Re.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.1,duration:.3},className:"text-sm font-medium",style:{color:r.getColor(K.TooltipText)},children:e||(n?(s=(i=t==null?void 0:t.appearance)==null?void 0:i.design)==null?void 0:s.tooltip_message_active:(a=(o=t==null?void 0:t.appearance)==null?void 0:o.design)==null?void 0:a.tooltip_message)||"Bizimle sohbet edin!"}),w.jsx("div",{className:Ne("absolute bottom-0 right-4 w-3 h-3 transform rotate-45 translate-y-1.5 bg-blue-100")})]})}const wN="/notify.mp3",bN=async e=>{await new Audio(e||wN).play()};function SN({fallback:e,fallbackOpen:t}){const[n]=y.useState(window.document.title),r=Bi(),{isHaveChat:i,open:s,soundPath:o}=tn(),[a,l]=y.useState(!0),[u,f]=y.useState(0),[c,d]=y.useState(null),h=()=>{bN(o)},m=(v,b)=>{if(c&&clearInterval(c),v||!i||b===0||Number.isNaN(b)){window.document.title=n,d(null);return}const p=setInterval(()=>{if(v||!i||b===0||Number.isNaN(b)){window.document.title=n,clearInterval(p),d(null);return}const g=`${b} Yeni mesajınız var! - ${n}`;window.document.title!==g?window.document.title=g:window.document.title=n},1e3);return d(p),()=>{clearInterval(p),d(null)}};return y.useEffect(()=>m(s&&a,u),[u,s,a]),y.useEffect(()=>{const v=()=>{l(document.visibilityState==="visible")};return document.addEventListener("visibilitychange",v,!1),()=>{document.removeEventListener("visibilitychange",v)}},[]),y.useEffect(()=>{if(!r||!i||s&&a)return;const v=()=>{!i||s&&a||(f(b=>b+1),h())};return r.on(ut.MessageAgentCreate,v),r.on(ut.ChatUserAssignee,h),()=>{r.off(ut.MessageAgentCreate,v),r.off(ut.ChatUserAssignee,h)}},[r,i,s,a]),s?null:!i||u===0?t?e:null:w.jsx(AS,{text:"Yeni mesajlar var!"})}function TN({children:e,defaultOpen:t,border:n}){var p,g,x,E;const r=Bi(),{open:i,setOpen:s,setIsHaveChat:o,isHaveChat:a,widget:l}=tn(),[u]=y.useState(!0),f=mm(),c=_a(),d=nr(),h=gm();y.useEffect(()=>{a&&c.pathname==="/"&&f.push("chat")},[a]);const m=()=>{s(!0),r&&r.emit(Dn.WidgetOpen,{})},v=()=>{s(!1),r&&r.emit(Dn.WidgetClose,{})},b=()=>{s(!1),o(!1),hh(l.client_id),f.push("registration")};return y.useEffect(()=>{if(t&&s(!0),!(!r||!l))return r.on(ut.Banned,b),()=>{r.off(ut.Banned,b)}},[]),w.jsx("section",{className:"relative w-full h-full",children:w.jsxs(Ni,{children:[i&&w.jsx(Re.div,{initial:{opacity:0,scale:.95,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:10},transition:{type:"spring",damping:25,stiffness:300,duration:.3},style:{width:h?"":((g=(p=l==null?void 0:l.appearance)==null?void 0:p.design)==null?void 0:g.width)||"21rem",height:h?"":((E=(x=l==null?void 0:l.appearance)==null?void 0:x.design)==null?void 0:E.height)||"30rem",left:h?"0":"",borderColor:d.getColor(K.Border),boxShadow:"0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05)"},className:Ne("fixed z-300 overflow-hidden rounded-xl",{"border border-solid dark:border-zink-500":n,"bottom-12 right-12":!h,"bottom-0 right-0":h}),children:e}),w.jsx("div",{className:"absolute bottom-0 right-0 z-400",children:w.jsxs(Ni,{children:[w.jsx(SN,{fallback:w.jsx(AS,{}),fallbackOpen:u}),!i&&w.jsxs(Gn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:m,children:[w.jsx(Re.span,{initial:{scale:.8,opacity:0},animate:{scale:[1,1.2,1],opacity:[.7,0,.7]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,repeatType:"loop"},className:Ne("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:d.getColor(K.ButtonBackground)}}),w.jsx(De.Chat,{className:"size-7"})]}),i&&!h&&w.jsx(Gn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:v,children:w.jsx(De.X,{className:"size-7"})})]})})]})})}function RS(e){const{widget:t}=tn();return w.jsx(wj,{widget:t,children:w.jsx(TN,{...e})})}function zi(e){this._maxSize=e,this.clear()}zi.prototype.clear=function(){this._size=0,this._values=Object.create(null)};zi.prototype.get=function(e){return this._values[e]};zi.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var EN=/[^.^\]^[]+|(?=\[\]|\.\.)/g,OS=/^\d+$/,CN=/^\d/,kN=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,_N=/^\s*(['"]?)(.*?)(\1)\s*$/,ym=512,qy=new zi(ym),Gy=new zi(ym),Qy=new zi(ym),Ei={Cache:zi,split:ph,normalizePath:wf,setter:function(e){var t=wf(e);return Gy.get(e)||Gy.set(e,function(r,i){for(var s=0,o=t.length,a=r;s<o-1;){var l=t[s];if(l==="__proto__"||l==="constructor"||l==="prototype")return r;a=a[t[s++]]}a[t[s]]=i})},getter:function(e,t){var n=wf(e);return Qy.get(e)||Qy.set(e,function(i){for(var s=0,o=n.length;s<o;)if(i!=null||!t)i=i[n[s++]];else return;return i})},join:function(e){return e.reduce(function(t,n){return t+(vm(n)||OS.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){PN(Array.isArray(e)?e:ph(e),t,n)}};function wf(e){return qy.get(e)||qy.set(e,ph(e).map(function(t){return t.replace(_N,"$2")}))}function ph(e){return e.match(EN)||[""]}function PN(e,t,n){var r=e.length,i,s,o,a;for(s=0;s<r;s++)i=e[s],i&&(ON(i)&&(i='"'+i+'"'),a=vm(i),o=!a&&/^\d+$/.test(i),t.call(n,i,a,o,s,e))}function vm(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function AN(e){return e.match(CN)&&!e.match(OS)}function RN(e){return kN.test(e)}function ON(e){return!vm(e)&&(AN(e)||RN(e))}const jN=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,Zu=e=>e.match(jN)||[],Ju=e=>e[0].toUpperCase()+e.slice(1),xm=(e,t)=>Zu(e).join(t).toLowerCase(),jS=e=>Zu(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),NN=e=>Ju(jS(e)),MN=e=>xm(e,"_"),DN=e=>xm(e,"-"),FN=e=>Ju(xm(e," ")),LN=e=>Zu(e).map(Ju).join(" ");var bf={words:Zu,upperFirst:Ju,camelCase:jS,pascalCase:NN,snakeCase:MN,kebabCase:DN,sentenceCase:FN,titleCase:LN},wm={exports:{}};wm.exports=function(e){return NS(IN(e),e)};wm.exports.array=NS;function NS(e,t){var n=e.length,r=new Array(n),i={},s=n,o=$N(t),a=VN(e);for(t.forEach(function(u){if(!a.has(u[0])||!a.has(u[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)i[s]||l(e[s],s,new Set);return r;function l(u,f,c){if(c.has(u)){var d;try{d=", node was:"+JSON.stringify(u)}catch{d=""}throw new Error("Cyclic dependency"+d)}if(!a.has(u))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(u));if(!i[f]){i[f]=!0;var h=o.get(u)||new Set;if(h=Array.from(h),f=h.length){c.add(u);do{var m=h[--f];l(m,a.get(m),c)}while(f);c.delete(u)}r[--n]=u}}}function IN(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}function $N(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}function VN(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}var BN=wm.exports;const zN=Ks(BN),UN=Object.prototype.toString,HN=Error.prototype.toString,WN=RegExp.prototype.toString,KN=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",qN=/^Symbol\((.*)\)(.*)$/;function GN(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function Yy(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return GN(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return KN.call(e).replace(qN,"Symbol($1)");const r=UN.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+HN.call(e)+"]":r==="RegExp"?WN.call(e):null}function Ir(e,t){let n=Yy(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let s=Yy(this[r],t);return s!==null?s:i},2)}function MS(e){return e==null?[]:[].concat(e)}let DS,FS,LS,QN=/\$\{\s*(\w+)\s*\}/g;DS=Symbol.toStringTag;class Xy{constructor(t,n,r,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[DS]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],MS(t).forEach(s=>{if(bt.isError(s)){this.errors.push(...s.errors);const o=s.inner.length?s.inner:[s];this.inner.push(...o)}else this.errors.push(s)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}FS=Symbol.hasInstance;LS=Symbol.toStringTag;class bt extends Error{static formatError(t,n){const r=n.label||n.path||"this";return n=Object.assign({},n,{path:r,originalPath:n.path}),typeof t=="string"?t.replace(QN,(i,s)=>Ir(n[s])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,i,s){const o=new Xy(t,n,r,i);if(s)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[LS]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,bt)}static[FS](t){return Xy[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let bn={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const i=r!=null&&r!==n?` (cast from the value \`${Ir(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Ir(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${Ir(n,!0)}\``+i}},gt={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},YN={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},mh={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},XN={isValue:"${path} field must be ${value}"},$l={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},ZN={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},JN={notType:e=>{const{path:t,value:n,spec:r}=e,i=r.types.length;if(Array.isArray(n)){if(n.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${n.length} for value: \`${Ir(n,!0)}\``;if(n.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${n.length} for value: \`${Ir(n,!0)}\``}return bt.formatError(bn.notType,e)}};Object.assign(Object.create(null),{mixed:bn,string:gt,number:YN,date:mh,object:$l,array:ZN,boolean:XN,tuple:JN});const bm=e=>e&&e.__isYupSchema__;class Tu{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:i,otherwise:s}=n,o=typeof r=="function"?r:(...a)=>a.every(l=>l===r);return new Tu(t,(a,l)=>{var u;let f=o(...a)?i:s;return(u=f==null?void 0:f(l))!=null?u:l})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(s=>s.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),i=this.fn(r,t,n);if(i===void 0||i===t)return t;if(!bm(i))throw new TypeError("conditions must return a schema object");return i.resolve(n)}}const hl={context:"$",value:"."};class Ui{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===hl.context,this.isValue=this.key[0]===hl.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?hl.context:this.isValue?hl.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&Ei.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let i=this.isContext?r:this.isValue?t:n;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}Ui.prototype.__isYupRef=!0;const fi=e=>e==null;function Yi(e){function t({value:n,path:r="",options:i,originalValue:s,schema:o},a,l){const{name:u,test:f,params:c,message:d,skipAbsent:h}=e;let{parent:m,context:v,abortEarly:b=o.spec.abortEarly,disableStackTrace:p=o.spec.disableStackTrace}=i;function g(I){return Ui.isRef(I)?I.getValue(n,m,v):I}function x(I={}){const re=Object.assign({value:n,originalValue:s,label:o.spec.label,path:I.path||r,spec:o.spec,disableStackTrace:I.disableStackTrace||p},c,I.params);for(const xe of Object.keys(re))re[xe]=g(re[xe]);const ie=new bt(bt.formatError(I.message||d,re),n,re.path,I.type||u,re.disableStackTrace);return ie.params=re,ie}const E=b?a:l;let S={path:r,parent:m,type:u,from:i.from,createError:x,resolve:g,options:i,originalValue:s,schema:o};const C=I=>{bt.isError(I)?E(I):I?l(null):E(x())},k=I=>{bt.isError(I)?E(I):a(I)};if(h&&fi(n))return C(!0);let j;try{var N;if(j=f.call(S,n,S),typeof((N=j)==null?void 0:N.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${S.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(j).then(C,k)}}catch(I){k(I);return}C(j)}return t.OPTIONS=e,t}function eM(e,t,n,r=n){let i,s,o;return t?(Ei.forEach(t,(a,l,u)=>{let f=l?a.slice(1,a.length-1):a;e=e.resolve({context:r,parent:i,value:n});let c=e.type==="tuple",d=u?parseInt(f,10):0;if(e.innerType||c){if(c&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(n&&d>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);i=n,n=n&&n[d],e=c?e.spec.types[d]:e.innerType}if(!u){if(!e.fields||!e.fields[f])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);i=n,n=n&&n[f],e=e.fields[f]}s=f,o=l?"["+a+"]":"."+a}),{schema:e,parent:i,parentPath:s}):{parent:i,parentPath:t,schema:e}}class Eu extends Set{describe(){const t=[];for(const n of this.values())t.push(Ui.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new Eu(this.values())}merge(t,n){const r=this.clone();return t.forEach(i=>r.add(i)),n.forEach(i=>r.delete(i)),r}}function ps(e,t=new Map){if(bm(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=ps(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,i]of e.entries())n.set(r,ps(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(ps(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=ps(i,t)}else throw Error(`Unable to clone ${e}`);return n}class Fn{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Eu,this._blacklist=new Eu,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(bn.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=ps(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const i=Object.assign({},n.spec,r.spec);return r.spec=i,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(s=>{t.tests.forEach(o=>{s.test(o.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((i,s)=>s.resolve(i,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,i,s;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(s=t.disableStackTrace)!=null?s:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),i=n.assert==="ignore-optionality",s=r._cast(t,n);if(n.assert!==!1&&!r.isType(s)){if(i&&fi(s))return s;let o=Ir(t),a=Ir(s);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
96
96
 
97
97
  attempted value: ${o}
98
- `+(a!==o?`result of cast: ${a}`:""))}return s}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((i,s)=>s.call(this,i,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,i){let{path:s,originalValue:o=t,strict:a=this.spec.strict}=n,l=t;a||(l=this._cast(l,Object.assign({assert:!1},n)));let u=[];for(let f of Object.values(this.internalTests))f&&u.push(f);this.runTests({path:s,value:l,originalValue:o,options:n,tests:u},r,f=>{if(f.length)return i(f,l);this.runTests({path:s,value:l,originalValue:o,options:n,tests:this.tests},r,i)})}runTests(t,n,r){let i=!1,{tests:s,value:o,originalValue:a,path:l,options:u}=t,f=x=>{i||(i=!0,n(x,o))},c=x=>{i||(i=!0,r(x,o))},d=s.length,h=[];if(!d)return c([]);let m={value:o,originalValue:a,path:l,options:u,schema:this};for(let x=0;x<s.length;x++){const b=s[x];b(m,f,function(g){g&&(Array.isArray(g)?h.push(...g):h.push(g)),--d<=0&&c(h)})}}asNestedTest({key:t,index:n,parent:r,parentPath:i,originalParent:s,options:o}){const a=t??n;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof a=="number";let u=r[a];const f=Object.assign({},o,{strict:!0,parent:r,value:u,originalValue:s[a],key:void 0,[l?"index":"key"]:a,path:l||a.includes(".")?`${i||""}[${l?a:`"${a}"`}]`:(i?`${i}.`:"")+t});return(c,d,h)=>this.resolve(f)._validate(u,f,d,h)}validate(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),s=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return new Promise((o,a)=>i._validate(t,n,(l,u)=>{bt.isError(l)&&(l.value=u),a(l)},(l,u)=>{l.length?a(new bt(l,u,void 0,void 0,s)):o(u)}))}validateSync(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),s,o=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return i._validate(t,Object.assign({},n,{sync:!0}),(a,l)=>{throw bt.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new bt(a,t,void 0,void 0,o);s=l}),s}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(bt.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(bt.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):hs(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=Qi({message:n,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=Qi({message:n,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=bn.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=bn.notNull){return this.nullability(!1,t)}required(t=bn.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=bn.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),i=Qi(n),s=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(o=>!(o.OPTIONS.name===n.name&&(s||o.OPTIONS.test===i.OPTIONS.test))),r.tests.push(i),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),i=OS(t).map(s=>new zi(s));return i.forEach(s=>{s.isSibling&&r.deps.push(s.key)}),r.conditions.push(typeof n=="function"?new Su(i,n):Su.fromOptions(i,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=Qi({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=bn.oneOf){let r=this.clone();return t.forEach(i=>{r._whitelist.add(i),r._blacklist.delete(i)}),r.internalTests.whiteList=Qi({message:n,name:"oneOf",skipAbsent:!0,test(i){let s=this.schema._whitelist,o=s.resolveAll(this.resolve);return o.includes(i)?!0:this.createError({params:{values:Array.from(s).join(", "),resolved:o}})}}),r}notOneOf(t,n=bn.notOneOf){let r=this.clone();return t.forEach(i=>{r._blacklist.add(i),r._whitelist.delete(i)}),r.internalTests.blacklist=Qi({message:n,name:"notOneOf",test(i){let s=this.schema._blacklist,o=s.resolveAll(this.resolve);return o.includes(i)?this.createError({params:{values:Array.from(s).join(", "),resolved:o}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:i,optional:s,nullable:o}=n.spec;return{meta:i,label:r,optional:s,nullable:o,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,u,f)=>f.findIndex(c=>c.name===l.name)===u)}}}Fn.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Fn.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:o}=YN(this,t,n,r.context);return o[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])Fn.prototype[e]=Fn.prototype.oneOf;for(const e of["not","nope"])Fn.prototype[e]=Fn.prototype.notOneOf;const XN=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function ZN(e){const t=ph(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function ph(e){var t,n;const r=XN.exec(e);return r?{year:In(r[1]),month:In(r[2],1)-1,day:In(r[3],1),hour:In(r[4]),minute:In(r[5]),second:In(r[6]),millisecond:r[7]?In(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:In(r[10]),minuteOffset:In(r[11])}:null}function In(e,t=0){return Number(e)||t}let JN=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,eM=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,tM=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,nM="^\\d{4}-\\d{2}-\\d{2}",rM="\\d{2}:\\d{2}:\\d{2}",iM="(([+-]\\d{2}(:?\\d{2})?)|Z)",sM=new RegExp(`${nM}T${rM}(\\.\\d+)?${iM}$`),oM=e=>fi(e)||e===e.trim(),aM={}.toString();function Eu(){return new DS}class DS extends Fn{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const i=t!=null&&t.toString?t.toString():t;return i===aM?t:i})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||bn.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=gt.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=gt.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=gt.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,i,s;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:i,name:s}=n:i=n),this.test({name:s||"matches",message:i||gt.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&r||o.search(t)!==-1})}email(t=gt.email){return this.matches(JN,{name:"email",message:t,excludeEmptyString:!0})}url(t=gt.url){return this.matches(eM,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=gt.uuid){return this.matches(tM,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,i;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:i=void 0}=t:n=t),this.matches(sM,{name:"datetime",message:n||gt.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||gt.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:s=>{if(!s||r)return!0;const o=ph(s);return o?!!o.z:!1}}).test({name:"datetime_precision",message:n||gt.datetime_precision,params:{precision:i},skipAbsent:!0,test:s=>{if(!s||i==null)return!0;const o=ph(s);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=gt.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:oM})}lowercase(t=gt.lowercase){return this.transform(n=>fi(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>fi(n)||n===n.toLowerCase()})}uppercase(t=gt.uppercase){return this.transform(n=>fi(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>fi(n)||n===n.toUpperCase()})}}Eu.prototype=DS.prototype;let lM=new Date(""),uM=e=>Object.prototype.toString.call(e)==="[object Date]";class Ju extends Fn{constructor(){super({type:"date",check(t){return uM(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=ZN(t),isNaN(t)?Ju.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(zi.isRef(t))r=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=i}return r}min(t,n=hh.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i>=this.resolve(r)}})}max(t,n=hh.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(i){return i<=this.resolve(r)}})}}Ju.INVALID_DATE=lM;Ju.prototype;function cM(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([o,a])=>`${o}-${a}`));function s(o,a){let l=Ti.split(o)[0];r.add(l),i.has(`${a}-${l}`)||n.push([a,l])}for(const o of Object.keys(e)){let a=e[o];r.add(o),zi.isRef(a)&&a.isSibling?s(a.path,o):xm(a)&&"deps"in a&&a.deps.forEach(l=>s(l,o))}return IN.array(Array.from(r),n).reverse()}function Qy(e,t){let n=1/0;return e.some((r,i)=>{var s;if((s=t.path)!=null&&s.includes(r))return n=i,!0}),n}function FS(e){return(t,n)=>Qy(e,t)-Qy(e,n)}const fM=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function $l(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=$l(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=$l(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map($l)}):"optional"in e?e.optional():e}const dM=(e,t)=>{const n=[...Ti.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),i=Ti.getter(Ti.join(n),!0)(e);return!!(i&&r in i)};let Yy=e=>Object.prototype.toString.call(e)==="[object Object]";function Xy(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const hM=FS([]);function wm(e){return new LS(e)}class LS extends Fn{constructor(t){super({type:"object",check(n){return Yy(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=hM,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let i=super._cast(t,n);if(i===void 0)return this.getDefault(n);if(!this._typeCheck(i))return i;let s=this.fields,o=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(i).filter(c=>!this._nodes.includes(c))),l={},u=Object.assign({},n,{parent:l,__validating:n.__validating||!1}),f=!1;for(const c of a){let d=s[c],h=c in i;if(d){let m,x=i[c];u.path=(n.path?`${n.path}.`:"")+c,d=d.resolve({value:x,context:n.context,parent:l});let b=d instanceof Fn?d.spec:void 0,p=b==null?void 0:b.strict;if(b!=null&&b.strip){f=f||c in i;continue}m=!n.__validating||!p?d.cast(i[c],u):i[c],m!==void 0&&(l[c]=m)}else h&&!o&&(l[c]=i[c]);(h!==c in l||l[c]!==i[c])&&(f=!0)}return f?l:i}_validate(t,n={},r,i){let{from:s=[],originalValue:o=t,recursive:a=this.spec.recursive}=n;n.from=[{schema:this,value:o},...s],n.__validating=!0,n.originalValue=o,super._validate(t,n,r,(l,u)=>{if(!a||!Yy(u)){i(l,u);return}o=o||u;let f=[];for(let c of this._nodes){let d=this.fields[c];!d||zi.isRef(d)||f.push(d.asNestedTest({options:n,key:c,parent:u,parentPath:n.path,originalParent:o}))}this.runTests({tests:f,value:u,originalValue:o,options:n},r,c=>{i(c.sort(this._sortErrors).concat(l),u)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[i,s]of Object.entries(this.fields)){const o=r[i];r[i]=o===void 0?s:o}return n.withMutation(i=>i.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var i;const s=this.fields[r];let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[r]})),n[r]=s&&"getDefault"in s?s.getDefault(o):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=cM(t,n),r._sortErrors=FS(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let i=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),i=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),i)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return $l(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,i])=>t.includes(r)&&t.includes(i)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let i=Ti.getter(t,!0);return this.transform(s=>{if(!s)return s;let o=s;return dM(s,t)&&(o=Object.assign({},s),r||delete o[t],o[n]=i(s)),o})}json(){return this.transform(fM)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Il.exact,test(n){if(n==null)return!0;const r=Xy(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=Il.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(i){if(i==null)return!0;const s=Xy(this.schema,i);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=Il.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const i of Object.keys(n))r[t(i)]=n[i];return r})}camelCase(){return this.transformKeys(xf.camelCase)}snakeCase(){return this.transformKeys(xf.snakeCase)}constantCase(){return this.transformKeys(t=>xf.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[s,o]of Object.entries(n.fields)){var i;let a=t;(i=a)!=null&&i.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[s]})),r.fields[s]=o.describe(a)}return r}}wm.prototype=LS.prototype;var pM=function(t){return mM(t)&&!gM(t)};function mM(e){return!!e&&typeof e=="object"}function gM(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||xM(e)}var yM=typeof Symbol=="function"&&Symbol.for,vM=yM?Symbol.for("react.element"):60103;function xM(e){return e.$$typeof===vM}function wM(e){return Array.isArray(e)?[]:{}}function Cu(e,t){return t.clone!==!1&&t.isMergeableObject(e)?da(wM(e),e,t):e}function bM(e,t,n){return e.concat(t).map(function(r){return Cu(r,n)})}function SM(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(i){r[i]=Cu(e[i],n)}),Object.keys(t).forEach(function(i){!n.isMergeableObject(t[i])||!e[i]?r[i]=Cu(t[i],n):r[i]=da(e[i],t[i],n)}),r}function da(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||bM,n.isMergeableObject=n.isMergeableObject||pM;var r=Array.isArray(t),i=Array.isArray(e),s=r===i;return s?r?n.arrayMerge(e,t,n):SM(e,t,n):Cu(t,n)}da.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return da(r,i,n)},{})};var mh=da,IS=typeof global=="object"&&global&&global.Object===Object&&global,TM=typeof self=="object"&&self&&self.Object===Object&&self,Ln=IS||TM||Function("return this")(),Hr=Ln.Symbol,$S=Object.prototype,EM=$S.hasOwnProperty,CM=$S.toString,ho=Hr?Hr.toStringTag:void 0;function kM(e){var t=EM.call(e,ho),n=e[ho];try{e[ho]=void 0;var r=!0}catch{}var i=CM.call(e);return r&&(t?e[ho]=n:delete e[ho]),i}var _M=Object.prototype,PM=_M.toString;function AM(e){return PM.call(e)}var RM="[object Null]",OM="[object Undefined]",Zy=Hr?Hr.toStringTag:void 0;function Ui(e){return e==null?e===void 0?OM:RM:Zy&&Zy in Object(e)?kM(e):AM(e)}function VS(e,t){return function(n){return e(t(n))}}var bm=VS(Object.getPrototypeOf,Object);function Hi(e){return e!=null&&typeof e=="object"}var jM="[object Object]",NM=Function.prototype,MM=Object.prototype,BS=NM.toString,DM=MM.hasOwnProperty,FM=BS.call(Object);function Jy(e){if(!Hi(e)||Ui(e)!=jM)return!1;var t=bm(e);if(t===null)return!0;var n=DM.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&BS.call(n)==FM}function LM(){this.__data__=[],this.size=0}function zS(e,t){return e===t||e!==e&&t!==t}function ec(e,t){for(var n=e.length;n--;)if(zS(e[n][0],t))return n;return-1}var IM=Array.prototype,$M=IM.splice;function VM(e){var t=this.__data__,n=ec(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():$M.call(t,n,1),--this.size,!0}function BM(e){var t=this.__data__,n=ec(t,e);return n<0?void 0:t[n][1]}function zM(e){return ec(this.__data__,e)>-1}function UM(e,t){var n=this.__data__,r=ec(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function rr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}rr.prototype.clear=LM;rr.prototype.delete=VM;rr.prototype.get=BM;rr.prototype.has=zM;rr.prototype.set=UM;function HM(){this.__data__=new rr,this.size=0}function WM(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function KM(e){return this.__data__.get(e)}function qM(e){return this.__data__.has(e)}function Oa(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var GM="[object AsyncFunction]",QM="[object Function]",YM="[object GeneratorFunction]",XM="[object Proxy]";function US(e){if(!Oa(e))return!1;var t=Ui(e);return t==QM||t==YM||t==GM||t==XM}var wf=Ln["__core-js_shared__"],ev=function(){var e=/[^.]+$/.exec(wf&&wf.keys&&wf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ZM(e){return!!ev&&ev in e}var JM=Function.prototype,e3=JM.toString;function Wi(e){if(e!=null){try{return e3.call(e)}catch{}try{return e+""}catch{}}return""}var t3=/[\\^$.*+?()[\]{}|]/g,n3=/^\[object .+?Constructor\]$/,r3=Function.prototype,i3=Object.prototype,s3=r3.toString,o3=i3.hasOwnProperty,a3=RegExp("^"+s3.call(o3).replace(t3,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function l3(e){if(!Oa(e)||ZM(e))return!1;var t=US(e)?a3:n3;return t.test(Wi(e))}function u3(e,t){return e==null?void 0:e[t]}function Ki(e,t){var n=u3(e,t);return l3(n)?n:void 0}var ha=Ki(Ln,"Map"),pa=Ki(Object,"create");function c3(){this.__data__=pa?pa(null):{},this.size=0}function f3(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var d3="__lodash_hash_undefined__",h3=Object.prototype,p3=h3.hasOwnProperty;function m3(e){var t=this.__data__;if(pa){var n=t[e];return n===d3?void 0:n}return p3.call(t,e)?t[e]:void 0}var g3=Object.prototype,y3=g3.hasOwnProperty;function v3(e){var t=this.__data__;return pa?t[e]!==void 0:y3.call(t,e)}var x3="__lodash_hash_undefined__";function w3(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=pa&&t===void 0?x3:t,this}function Ni(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ni.prototype.clear=c3;Ni.prototype.delete=f3;Ni.prototype.get=m3;Ni.prototype.has=v3;Ni.prototype.set=w3;function b3(){this.size=0,this.__data__={hash:new Ni,map:new(ha||rr),string:new Ni}}function S3(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function tc(e,t){var n=e.__data__;return S3(t)?n[typeof t=="string"?"string":"hash"]:n.map}function T3(e){var t=tc(this,e).delete(e);return this.size-=t?1:0,t}function E3(e){return tc(this,e).get(e)}function C3(e){return tc(this,e).has(e)}function k3(e,t){var n=tc(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Qr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Qr.prototype.clear=b3;Qr.prototype.delete=T3;Qr.prototype.get=E3;Qr.prototype.has=C3;Qr.prototype.set=k3;var _3=200;function P3(e,t){var n=this.__data__;if(n instanceof rr){var r=n.__data__;if(!ha||r.length<_3-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Qr(r)}return n.set(e,t),this.size=n.size,this}function Js(e){var t=this.__data__=new rr(e);this.size=t.size}Js.prototype.clear=HM;Js.prototype.delete=WM;Js.prototype.get=KM;Js.prototype.has=qM;Js.prototype.set=P3;function A3(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var tv=function(){try{var e=Ki(Object,"defineProperty");return e({},"",{}),e}catch{}}();function HS(e,t,n){t=="__proto__"&&tv?tv(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var R3=Object.prototype,O3=R3.hasOwnProperty;function WS(e,t,n){var r=e[t];(!(O3.call(e,t)&&zS(r,n))||n===void 0&&!(t in e))&&HS(e,t,n)}function nc(e,t,n,r){var i=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var a=t[s],l=void 0;l===void 0&&(l=e[a]),i?HS(n,a,l):WS(n,a,l)}return n}function j3(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var N3="[object Arguments]";function nv(e){return Hi(e)&&Ui(e)==N3}var KS=Object.prototype,M3=KS.hasOwnProperty,D3=KS.propertyIsEnumerable,F3=nv(function(){return arguments}())?nv:function(e){return Hi(e)&&M3.call(e,"callee")&&!D3.call(e,"callee")},ja=Array.isArray;function L3(){return!1}var qS=typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,rv=qS&&typeof Dt=="object"&&Dt&&!Dt.nodeType&&Dt,I3=rv&&rv.exports===qS,iv=I3?Ln.Buffer:void 0,$3=iv?iv.isBuffer:void 0,GS=$3||L3,V3=9007199254740991,B3=/^(?:0|[1-9]\d*)$/;function z3(e,t){var n=typeof e;return t=t??V3,!!t&&(n=="number"||n!="symbol"&&B3.test(e))&&e>-1&&e%1==0&&e<t}var U3=9007199254740991;function QS(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=U3}var H3="[object Arguments]",W3="[object Array]",K3="[object Boolean]",q3="[object Date]",G3="[object Error]",Q3="[object Function]",Y3="[object Map]",X3="[object Number]",Z3="[object Object]",J3="[object RegExp]",eD="[object Set]",tD="[object String]",nD="[object WeakMap]",rD="[object ArrayBuffer]",iD="[object DataView]",sD="[object Float32Array]",oD="[object Float64Array]",aD="[object Int8Array]",lD="[object Int16Array]",uD="[object Int32Array]",cD="[object Uint8Array]",fD="[object Uint8ClampedArray]",dD="[object Uint16Array]",hD="[object Uint32Array]",me={};me[sD]=me[oD]=me[aD]=me[lD]=me[uD]=me[cD]=me[fD]=me[dD]=me[hD]=!0;me[H3]=me[W3]=me[rD]=me[K3]=me[iD]=me[q3]=me[G3]=me[Q3]=me[Y3]=me[X3]=me[Z3]=me[J3]=me[eD]=me[tD]=me[nD]=!1;function pD(e){return Hi(e)&&QS(e.length)&&!!me[Ui(e)]}function Sm(e){return function(t){return e(t)}}var YS=typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,Do=YS&&typeof Dt=="object"&&Dt&&!Dt.nodeType&&Dt,mD=Do&&Do.exports===YS,bf=mD&&IS.process,Hs=function(){try{var e=Do&&Do.require&&Do.require("util").types;return e||bf&&bf.binding&&bf.binding("util")}catch{}}(),sv=Hs&&Hs.isTypedArray,gD=sv?Sm(sv):pD,yD=Object.prototype,vD=yD.hasOwnProperty;function XS(e,t){var n=ja(e),r=!n&&F3(e),i=!n&&!r&&GS(e),s=!n&&!r&&!i&&gD(e),o=n||r||i||s,a=o?j3(e.length,String):[],l=a.length;for(var u in e)(t||vD.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||z3(u,l)))&&a.push(u);return a}var xD=Object.prototype;function Tm(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||xD;return e===n}var wD=VS(Object.keys,Object),bD=Object.prototype,SD=bD.hasOwnProperty;function TD(e){if(!Tm(e))return wD(e);var t=[];for(var n in Object(e))SD.call(e,n)&&n!="constructor"&&t.push(n);return t}function ZS(e){return e!=null&&QS(e.length)&&!US(e)}function Em(e){return ZS(e)?XS(e):TD(e)}function ED(e,t){return e&&nc(t,Em(t),e)}function CD(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var kD=Object.prototype,_D=kD.hasOwnProperty;function PD(e){if(!Oa(e))return CD(e);var t=Tm(e),n=[];for(var r in e)r=="constructor"&&(t||!_D.call(e,r))||n.push(r);return n}function Cm(e){return ZS(e)?XS(e,!0):PD(e)}function AD(e,t){return e&&nc(t,Cm(t),e)}var JS=typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,ov=JS&&typeof Dt=="object"&&Dt&&!Dt.nodeType&&Dt,RD=ov&&ov.exports===JS,av=RD?Ln.Buffer:void 0,lv=av?av.allocUnsafe:void 0;function OD(e,t){if(t)return e.slice();var n=e.length,r=lv?lv(n):new e.constructor(n);return e.copy(r),r}function eT(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function jD(e,t){for(var n=-1,r=e==null?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}function tT(){return[]}var ND=Object.prototype,MD=ND.propertyIsEnumerable,uv=Object.getOwnPropertySymbols,km=uv?function(e){return e==null?[]:(e=Object(e),jD(uv(e),function(t){return MD.call(e,t)}))}:tT;function DD(e,t){return nc(e,km(e),t)}function nT(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var FD=Object.getOwnPropertySymbols,rT=FD?function(e){for(var t=[];e;)nT(t,km(e)),e=bm(e);return t}:tT;function LD(e,t){return nc(e,rT(e),t)}function iT(e,t,n){var r=t(e);return ja(e)?r:nT(r,n(e))}function ID(e){return iT(e,Em,km)}function $D(e){return iT(e,Cm,rT)}var gh=Ki(Ln,"DataView"),yh=Ki(Ln,"Promise"),vh=Ki(Ln,"Set"),xh=Ki(Ln,"WeakMap"),cv="[object Map]",VD="[object Object]",fv="[object Promise]",dv="[object Set]",hv="[object WeakMap]",pv="[object DataView]",BD=Wi(gh),zD=Wi(ha),UD=Wi(yh),HD=Wi(vh),WD=Wi(xh),zn=Ui;(gh&&zn(new gh(new ArrayBuffer(1)))!=pv||ha&&zn(new ha)!=cv||yh&&zn(yh.resolve())!=fv||vh&&zn(new vh)!=dv||xh&&zn(new xh)!=hv)&&(zn=function(e){var t=Ui(e),n=t==VD?e.constructor:void 0,r=n?Wi(n):"";if(r)switch(r){case BD:return pv;case zD:return cv;case UD:return fv;case HD:return dv;case WD:return hv}return t});var KD=Object.prototype,qD=KD.hasOwnProperty;function GD(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&qD.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var mv=Ln.Uint8Array;function _m(e){var t=new e.constructor(e.byteLength);return new mv(t).set(new mv(e)),t}function QD(e,t){var n=t?_m(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var YD=/\w*$/;function XD(e){var t=new e.constructor(e.source,YD.exec(e));return t.lastIndex=e.lastIndex,t}var gv=Hr?Hr.prototype:void 0,yv=gv?gv.valueOf:void 0;function ZD(e){return yv?Object(yv.call(e)):{}}function JD(e,t){var n=t?_m(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var eF="[object Boolean]",tF="[object Date]",nF="[object Map]",rF="[object Number]",iF="[object RegExp]",sF="[object Set]",oF="[object String]",aF="[object Symbol]",lF="[object ArrayBuffer]",uF="[object DataView]",cF="[object Float32Array]",fF="[object Float64Array]",dF="[object Int8Array]",hF="[object Int16Array]",pF="[object Int32Array]",mF="[object Uint8Array]",gF="[object Uint8ClampedArray]",yF="[object Uint16Array]",vF="[object Uint32Array]";function xF(e,t,n){var r=e.constructor;switch(t){case lF:return _m(e);case eF:case tF:return new r(+e);case uF:return QD(e,n);case cF:case fF:case dF:case hF:case pF:case mF:case gF:case yF:case vF:return JD(e,n);case nF:return new r;case rF:case oF:return new r(e);case iF:return XD(e);case sF:return new r;case aF:return ZD(e)}}var vv=Object.create,wF=function(){function e(){}return function(t){if(!Oa(t))return{};if(vv)return vv(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function bF(e){return typeof e.constructor=="function"&&!Tm(e)?wF(bm(e)):{}}var SF="[object Map]";function TF(e){return Hi(e)&&zn(e)==SF}var xv=Hs&&Hs.isMap,EF=xv?Sm(xv):TF,CF="[object Set]";function kF(e){return Hi(e)&&zn(e)==CF}var wv=Hs&&Hs.isSet,_F=wv?Sm(wv):kF,PF=1,AF=2,RF=4,sT="[object Arguments]",OF="[object Array]",jF="[object Boolean]",NF="[object Date]",MF="[object Error]",oT="[object Function]",DF="[object GeneratorFunction]",FF="[object Map]",LF="[object Number]",aT="[object Object]",IF="[object RegExp]",$F="[object Set]",VF="[object String]",BF="[object Symbol]",zF="[object WeakMap]",UF="[object ArrayBuffer]",HF="[object DataView]",WF="[object Float32Array]",KF="[object Float64Array]",qF="[object Int8Array]",GF="[object Int16Array]",QF="[object Int32Array]",YF="[object Uint8Array]",XF="[object Uint8ClampedArray]",ZF="[object Uint16Array]",JF="[object Uint32Array]",fe={};fe[sT]=fe[OF]=fe[UF]=fe[HF]=fe[jF]=fe[NF]=fe[WF]=fe[KF]=fe[qF]=fe[GF]=fe[QF]=fe[FF]=fe[LF]=fe[aT]=fe[IF]=fe[$F]=fe[VF]=fe[BF]=fe[YF]=fe[XF]=fe[ZF]=fe[JF]=!0;fe[MF]=fe[oT]=fe[zF]=!1;function Fo(e,t,n,r,i,s){var o,a=t&PF,l=t&AF,u=t&RF;if(o!==void 0)return o;if(!Oa(e))return e;var f=ja(e);if(f){if(o=GD(e),!a)return eT(e,o)}else{var c=zn(e),d=c==oT||c==DF;if(GS(e))return OD(e,a);if(c==aT||c==sT||d&&!i){if(o=l||d?{}:bF(e),!a)return l?LD(e,AD(o,e)):DD(e,ED(o,e))}else{if(!fe[c])return i?e:{};o=xF(e,c,a)}}s||(s=new Js);var h=s.get(e);if(h)return h;s.set(e,o),_F(e)?e.forEach(function(b){o.add(Fo(b,t,n,b,e,s))}):EF(e)&&e.forEach(function(b,p){o.set(p,Fo(b,t,n,p,e,s))});var m=u?l?$D:ID:l?Cm:Em,x=f?void 0:m(e);return A3(x||e,function(b,p){x&&(p=b,b=e[p]),WS(o,p,Fo(b,t,n,p,e,s))}),o}var e5=1,t5=4;function hl(e){return Fo(e,e5|t5)}var bv=Array.isArray,Sv=Object.keys,n5=Object.prototype.hasOwnProperty,r5=typeof Element<"u";function wh(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=bv(e),r=bv(t),i,s,o;if(n&&r){if(s=e.length,s!=t.length)return!1;for(i=s;i--!==0;)if(!wh(e[i],t[i]))return!1;return!0}if(n!=r)return!1;var a=e instanceof Date,l=t instanceof Date;if(a!=l)return!1;if(a&&l)return e.getTime()==t.getTime();var u=e instanceof RegExp,f=t instanceof RegExp;if(u!=f)return!1;if(u&&f)return e.toString()==t.toString();var c=Sv(e);if(s=c.length,s!==Sv(t).length)return!1;for(i=s;i--!==0;)if(!n5.call(t,c[i]))return!1;if(r5&&e instanceof Element&&t instanceof Element)return e===t;for(i=s;i--!==0;)if(o=c[i],!(o==="_owner"&&e.$$typeof)&&!wh(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}var i5=function(t,n){try{return wh(t,n)}catch(r){if(r.message&&r.message.match(/stack|recursion/i)||r.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",r.name,r.message),!1;throw r}};const ri=Ws(i5);var s5=4;function Tv(e){return Fo(e,s5)}function lT(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var o5="[object Symbol]";function Pm(e){return typeof e=="symbol"||Hi(e)&&Ui(e)==o5}var a5="Expected a function";function Am(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(a5);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=e.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(Am.Cache||Qr),n}Am.Cache=Qr;var l5=500;function u5(e){var t=Am(e,function(r){return n.size===l5&&n.clear(),r}),n=t.cache;return t}var c5=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,f5=/\\(\\)?/g,d5=u5(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(c5,function(n,r,i,s){t.push(i?s.replace(f5,"$1"):r||n)}),t}),h5=1/0;function p5(e){if(typeof e=="string"||Pm(e))return e;var t=e+"";return t=="0"&&1/e==-h5?"-0":t}var m5=1/0,Ev=Hr?Hr.prototype:void 0,Cv=Ev?Ev.toString:void 0;function uT(e){if(typeof e=="string")return e;if(ja(e))return lT(e,uT)+"";if(Pm(e))return Cv?Cv.call(e):"";var t=e+"";return t=="0"&&1/e==-m5?"-0":t}function g5(e){return e==null?"":uT(e)}function cT(e){return ja(e)?lT(e,p5):Pm(e)?[e]:eT(d5(g5(e)))}var fT={exports:{}},ue={};/** @license React v16.13.1
98
+ `+(a!==o?`result of cast: ${a}`:""))}return s}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((i,s)=>s.call(this,i,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,i){let{path:s,originalValue:o=t,strict:a=this.spec.strict}=n,l=t;a||(l=this._cast(l,Object.assign({assert:!1},n)));let u=[];for(let f of Object.values(this.internalTests))f&&u.push(f);this.runTests({path:s,value:l,originalValue:o,options:n,tests:u},r,f=>{if(f.length)return i(f,l);this.runTests({path:s,value:l,originalValue:o,options:n,tests:this.tests},r,i)})}runTests(t,n,r){let i=!1,{tests:s,value:o,originalValue:a,path:l,options:u}=t,f=v=>{i||(i=!0,n(v,o))},c=v=>{i||(i=!0,r(v,o))},d=s.length,h=[];if(!d)return c([]);let m={value:o,originalValue:a,path:l,options:u,schema:this};for(let v=0;v<s.length;v++){const b=s[v];b(m,f,function(g){g&&(Array.isArray(g)?h.push(...g):h.push(g)),--d<=0&&c(h)})}}asNestedTest({key:t,index:n,parent:r,parentPath:i,originalParent:s,options:o}){const a=t??n;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof a=="number";let u=r[a];const f=Object.assign({},o,{strict:!0,parent:r,value:u,originalValue:s[a],key:void 0,[l?"index":"key"]:a,path:l||a.includes(".")?`${i||""}[${l?a:`"${a}"`}]`:(i?`${i}.`:"")+t});return(c,d,h)=>this.resolve(f)._validate(u,f,d,h)}validate(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),s=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return new Promise((o,a)=>i._validate(t,n,(l,u)=>{bt.isError(l)&&(l.value=u),a(l)},(l,u)=>{l.length?a(new bt(l,u,void 0,void 0,s)):o(u)}))}validateSync(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),s,o=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return i._validate(t,Object.assign({},n,{sync:!0}),(a,l)=>{throw bt.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new bt(a,t,void 0,void 0,o);s=l}),s}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(bt.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(bt.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):ps(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=Yi({message:n,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=Yi({message:n,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=bn.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=bn.notNull){return this.nullability(!1,t)}required(t=bn.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=bn.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),i=Yi(n),s=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(o=>!(o.OPTIONS.name===n.name&&(s||o.OPTIONS.test===i.OPTIONS.test))),r.tests.push(i),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),i=MS(t).map(s=>new Ui(s));return i.forEach(s=>{s.isSibling&&r.deps.push(s.key)}),r.conditions.push(typeof n=="function"?new Tu(i,n):Tu.fromOptions(i,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=Yi({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=bn.oneOf){let r=this.clone();return t.forEach(i=>{r._whitelist.add(i),r._blacklist.delete(i)}),r.internalTests.whiteList=Yi({message:n,name:"oneOf",skipAbsent:!0,test(i){let s=this.schema._whitelist,o=s.resolveAll(this.resolve);return o.includes(i)?!0:this.createError({params:{values:Array.from(s).join(", "),resolved:o}})}}),r}notOneOf(t,n=bn.notOneOf){let r=this.clone();return t.forEach(i=>{r._blacklist.add(i),r._whitelist.delete(i)}),r.internalTests.blacklist=Yi({message:n,name:"notOneOf",test(i){let s=this.schema._blacklist,o=s.resolveAll(this.resolve);return o.includes(i)?this.createError({params:{values:Array.from(s).join(", "),resolved:o}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:i,optional:s,nullable:o}=n.spec;return{meta:i,label:r,optional:s,nullable:o,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,u,f)=>f.findIndex(c=>c.name===l.name)===u)}}}Fn.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Fn.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:o}=eM(this,t,n,r.context);return o[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])Fn.prototype[e]=Fn.prototype.oneOf;for(const e of["not","nope"])Fn.prototype[e]=Fn.prototype.notOneOf;const tM=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function nM(e){const t=gh(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function gh(e){var t,n;const r=tM.exec(e);return r?{year:In(r[1]),month:In(r[2],1)-1,day:In(r[3],1),hour:In(r[4]),minute:In(r[5]),second:In(r[6]),millisecond:r[7]?In(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:In(r[10]),minuteOffset:In(r[11])}:null}function In(e,t=0){return Number(e)||t}let rM=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,iM=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,sM=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,oM="^\\d{4}-\\d{2}-\\d{2}",aM="\\d{2}:\\d{2}:\\d{2}",lM="(([+-]\\d{2}(:?\\d{2})?)|Z)",uM=new RegExp(`${oM}T${aM}(\\.\\d+)?${lM}$`),cM=e=>fi(e)||e===e.trim(),fM={}.toString();function Cu(){return new IS}class IS extends Fn{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const i=t!=null&&t.toString?t.toString():t;return i===fM?t:i})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||bn.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=gt.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=gt.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=gt.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,i,s;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:i,name:s}=n:i=n),this.test({name:s||"matches",message:i||gt.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&r||o.search(t)!==-1})}email(t=gt.email){return this.matches(rM,{name:"email",message:t,excludeEmptyString:!0})}url(t=gt.url){return this.matches(iM,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=gt.uuid){return this.matches(sM,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,i;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:i=void 0}=t:n=t),this.matches(uM,{name:"datetime",message:n||gt.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||gt.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:s=>{if(!s||r)return!0;const o=gh(s);return o?!!o.z:!1}}).test({name:"datetime_precision",message:n||gt.datetime_precision,params:{precision:i},skipAbsent:!0,test:s=>{if(!s||i==null)return!0;const o=gh(s);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=gt.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:cM})}lowercase(t=gt.lowercase){return this.transform(n=>fi(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>fi(n)||n===n.toLowerCase()})}uppercase(t=gt.uppercase){return this.transform(n=>fi(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>fi(n)||n===n.toUpperCase()})}}Cu.prototype=IS.prototype;let dM=new Date(""),hM=e=>Object.prototype.toString.call(e)==="[object Date]";class ec extends Fn{constructor(){super({type:"date",check(t){return hM(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=nM(t),isNaN(t)?ec.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(Ui.isRef(t))r=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=i}return r}min(t,n=mh.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i>=this.resolve(r)}})}max(t,n=mh.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(i){return i<=this.resolve(r)}})}}ec.INVALID_DATE=dM;ec.prototype;function pM(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([o,a])=>`${o}-${a}`));function s(o,a){let l=Ei.split(o)[0];r.add(l),i.has(`${a}-${l}`)||n.push([a,l])}for(const o of Object.keys(e)){let a=e[o];r.add(o),Ui.isRef(a)&&a.isSibling?s(a.path,o):bm(a)&&"deps"in a&&a.deps.forEach(l=>s(l,o))}return zN.array(Array.from(r),n).reverse()}function Zy(e,t){let n=1/0;return e.some((r,i)=>{var s;if((s=t.path)!=null&&s.includes(r))return n=i,!0}),n}function $S(e){return(t,n)=>Zy(e,t)-Zy(e,n)}const mM=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function Vl(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=Vl(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Vl(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Vl)}):"optional"in e?e.optional():e}const gM=(e,t)=>{const n=[...Ei.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),i=Ei.getter(Ei.join(n),!0)(e);return!!(i&&r in i)};let Jy=e=>Object.prototype.toString.call(e)==="[object Object]";function ev(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const yM=$S([]);function Sm(e){return new VS(e)}class VS extends Fn{constructor(t){super({type:"object",check(n){return Jy(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=yM,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let i=super._cast(t,n);if(i===void 0)return this.getDefault(n);if(!this._typeCheck(i))return i;let s=this.fields,o=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(i).filter(c=>!this._nodes.includes(c))),l={},u=Object.assign({},n,{parent:l,__validating:n.__validating||!1}),f=!1;for(const c of a){let d=s[c],h=c in i;if(d){let m,v=i[c];u.path=(n.path?`${n.path}.`:"")+c,d=d.resolve({value:v,context:n.context,parent:l});let b=d instanceof Fn?d.spec:void 0,p=b==null?void 0:b.strict;if(b!=null&&b.strip){f=f||c in i;continue}m=!n.__validating||!p?d.cast(i[c],u):i[c],m!==void 0&&(l[c]=m)}else h&&!o&&(l[c]=i[c]);(h!==c in l||l[c]!==i[c])&&(f=!0)}return f?l:i}_validate(t,n={},r,i){let{from:s=[],originalValue:o=t,recursive:a=this.spec.recursive}=n;n.from=[{schema:this,value:o},...s],n.__validating=!0,n.originalValue=o,super._validate(t,n,r,(l,u)=>{if(!a||!Jy(u)){i(l,u);return}o=o||u;let f=[];for(let c of this._nodes){let d=this.fields[c];!d||Ui.isRef(d)||f.push(d.asNestedTest({options:n,key:c,parent:u,parentPath:n.path,originalParent:o}))}this.runTests({tests:f,value:u,originalValue:o,options:n},r,c=>{i(c.sort(this._sortErrors).concat(l),u)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[i,s]of Object.entries(this.fields)){const o=r[i];r[i]=o===void 0?s:o}return n.withMutation(i=>i.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var i;const s=this.fields[r];let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[r]})),n[r]=s&&"getDefault"in s?s.getDefault(o):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=pM(t,n),r._sortErrors=$S(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let i=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),i=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),i)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return Vl(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,i])=>t.includes(r)&&t.includes(i)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let i=Ei.getter(t,!0);return this.transform(s=>{if(!s)return s;let o=s;return gM(s,t)&&(o=Object.assign({},s),r||delete o[t],o[n]=i(s)),o})}json(){return this.transform(mM)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||$l.exact,test(n){if(n==null)return!0;const r=ev(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=$l.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(i){if(i==null)return!0;const s=ev(this.schema,i);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=$l.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const i of Object.keys(n))r[t(i)]=n[i];return r})}camelCase(){return this.transformKeys(bf.camelCase)}snakeCase(){return this.transformKeys(bf.snakeCase)}constantCase(){return this.transformKeys(t=>bf.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[s,o]of Object.entries(n.fields)){var i;let a=t;(i=a)!=null&&i.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[s]})),r.fields[s]=o.describe(a)}return r}}Sm.prototype=VS.prototype;var vM=function(t){return xM(t)&&!wM(t)};function xM(e){return!!e&&typeof e=="object"}function wM(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||TM(e)}var bM=typeof Symbol=="function"&&Symbol.for,SM=bM?Symbol.for("react.element"):60103;function TM(e){return e.$$typeof===SM}function EM(e){return Array.isArray(e)?[]:{}}function ku(e,t){return t.clone!==!1&&t.isMergeableObject(e)?ha(EM(e),e,t):e}function CM(e,t,n){return e.concat(t).map(function(r){return ku(r,n)})}function kM(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(i){r[i]=ku(e[i],n)}),Object.keys(t).forEach(function(i){!n.isMergeableObject(t[i])||!e[i]?r[i]=ku(t[i],n):r[i]=ha(e[i],t[i],n)}),r}function ha(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||CM,n.isMergeableObject=n.isMergeableObject||vM;var r=Array.isArray(t),i=Array.isArray(e),s=r===i;return s?r?n.arrayMerge(e,t,n):kM(e,t,n):ku(t,n)}ha.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return ha(r,i,n)},{})};var yh=ha,BS=typeof global=="object"&&global&&global.Object===Object&&global,_M=typeof self=="object"&&self&&self.Object===Object&&self,Ln=BS||_M||Function("return this")(),Hr=Ln.Symbol,zS=Object.prototype,PM=zS.hasOwnProperty,AM=zS.toString,po=Hr?Hr.toStringTag:void 0;function RM(e){var t=PM.call(e,po),n=e[po];try{e[po]=void 0;var r=!0}catch{}var i=AM.call(e);return r&&(t?e[po]=n:delete e[po]),i}var OM=Object.prototype,jM=OM.toString;function NM(e){return jM.call(e)}var MM="[object Null]",DM="[object Undefined]",tv=Hr?Hr.toStringTag:void 0;function Hi(e){return e==null?e===void 0?DM:MM:tv&&tv in Object(e)?RM(e):NM(e)}function US(e,t){return function(n){return e(t(n))}}var Tm=US(Object.getPrototypeOf,Object);function Wi(e){return e!=null&&typeof e=="object"}var FM="[object Object]",LM=Function.prototype,IM=Object.prototype,HS=LM.toString,$M=IM.hasOwnProperty,VM=HS.call(Object);function nv(e){if(!Wi(e)||Hi(e)!=FM)return!1;var t=Tm(e);if(t===null)return!0;var n=$M.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&HS.call(n)==VM}function BM(){this.__data__=[],this.size=0}function WS(e,t){return e===t||e!==e&&t!==t}function tc(e,t){for(var n=e.length;n--;)if(WS(e[n][0],t))return n;return-1}var zM=Array.prototype,UM=zM.splice;function HM(e){var t=this.__data__,n=tc(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():UM.call(t,n,1),--this.size,!0}function WM(e){var t=this.__data__,n=tc(t,e);return n<0?void 0:t[n][1]}function KM(e){return tc(this.__data__,e)>-1}function qM(e,t){var n=this.__data__,r=tc(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function rr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}rr.prototype.clear=BM;rr.prototype.delete=HM;rr.prototype.get=WM;rr.prototype.has=KM;rr.prototype.set=qM;function GM(){this.__data__=new rr,this.size=0}function QM(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function YM(e){return this.__data__.get(e)}function XM(e){return this.__data__.has(e)}function ja(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ZM="[object AsyncFunction]",JM="[object Function]",e3="[object GeneratorFunction]",t3="[object Proxy]";function KS(e){if(!ja(e))return!1;var t=Hi(e);return t==JM||t==e3||t==ZM||t==t3}var Sf=Ln["__core-js_shared__"],rv=function(){var e=/[^.]+$/.exec(Sf&&Sf.keys&&Sf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function n3(e){return!!rv&&rv in e}var r3=Function.prototype,i3=r3.toString;function Ki(e){if(e!=null){try{return i3.call(e)}catch{}try{return e+""}catch{}}return""}var s3=/[\\^$.*+?()[\]{}|]/g,o3=/^\[object .+?Constructor\]$/,a3=Function.prototype,l3=Object.prototype,u3=a3.toString,c3=l3.hasOwnProperty,f3=RegExp("^"+u3.call(c3).replace(s3,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d3(e){if(!ja(e)||n3(e))return!1;var t=KS(e)?f3:o3;return t.test(Ki(e))}function h3(e,t){return e==null?void 0:e[t]}function qi(e,t){var n=h3(e,t);return d3(n)?n:void 0}var pa=qi(Ln,"Map"),ma=qi(Object,"create");function p3(){this.__data__=ma?ma(null):{},this.size=0}function m3(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var g3="__lodash_hash_undefined__",y3=Object.prototype,v3=y3.hasOwnProperty;function x3(e){var t=this.__data__;if(ma){var n=t[e];return n===g3?void 0:n}return v3.call(t,e)?t[e]:void 0}var w3=Object.prototype,b3=w3.hasOwnProperty;function S3(e){var t=this.__data__;return ma?t[e]!==void 0:b3.call(t,e)}var T3="__lodash_hash_undefined__";function E3(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ma&&t===void 0?T3:t,this}function Mi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Mi.prototype.clear=p3;Mi.prototype.delete=m3;Mi.prototype.get=x3;Mi.prototype.has=S3;Mi.prototype.set=E3;function C3(){this.size=0,this.__data__={hash:new Mi,map:new(pa||rr),string:new Mi}}function k3(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function nc(e,t){var n=e.__data__;return k3(t)?n[typeof t=="string"?"string":"hash"]:n.map}function _3(e){var t=nc(this,e).delete(e);return this.size-=t?1:0,t}function P3(e){return nc(this,e).get(e)}function A3(e){return nc(this,e).has(e)}function R3(e,t){var n=nc(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Qr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Qr.prototype.clear=C3;Qr.prototype.delete=_3;Qr.prototype.get=P3;Qr.prototype.has=A3;Qr.prototype.set=R3;var O3=200;function j3(e,t){var n=this.__data__;if(n instanceof rr){var r=n.__data__;if(!pa||r.length<O3-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Qr(r)}return n.set(e,t),this.size=n.size,this}function eo(e){var t=this.__data__=new rr(e);this.size=t.size}eo.prototype.clear=GM;eo.prototype.delete=QM;eo.prototype.get=YM;eo.prototype.has=XM;eo.prototype.set=j3;function N3(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var iv=function(){try{var e=qi(Object,"defineProperty");return e({},"",{}),e}catch{}}();function qS(e,t,n){t=="__proto__"&&iv?iv(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var M3=Object.prototype,D3=M3.hasOwnProperty;function GS(e,t,n){var r=e[t];(!(D3.call(e,t)&&WS(r,n))||n===void 0&&!(t in e))&&qS(e,t,n)}function rc(e,t,n,r){var i=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var a=t[s],l=void 0;l===void 0&&(l=e[a]),i?qS(n,a,l):GS(n,a,l)}return n}function F3(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var L3="[object Arguments]";function sv(e){return Wi(e)&&Hi(e)==L3}var QS=Object.prototype,I3=QS.hasOwnProperty,$3=QS.propertyIsEnumerable,V3=sv(function(){return arguments}())?sv:function(e){return Wi(e)&&I3.call(e,"callee")&&!$3.call(e,"callee")},Na=Array.isArray;function B3(){return!1}var YS=typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,ov=YS&&typeof Dt=="object"&&Dt&&!Dt.nodeType&&Dt,z3=ov&&ov.exports===YS,av=z3?Ln.Buffer:void 0,U3=av?av.isBuffer:void 0,XS=U3||B3,H3=9007199254740991,W3=/^(?:0|[1-9]\d*)$/;function K3(e,t){var n=typeof e;return t=t??H3,!!t&&(n=="number"||n!="symbol"&&W3.test(e))&&e>-1&&e%1==0&&e<t}var q3=9007199254740991;function ZS(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=q3}var G3="[object Arguments]",Q3="[object Array]",Y3="[object Boolean]",X3="[object Date]",Z3="[object Error]",J3="[object Function]",eD="[object Map]",tD="[object Number]",nD="[object Object]",rD="[object RegExp]",iD="[object Set]",sD="[object String]",oD="[object WeakMap]",aD="[object ArrayBuffer]",lD="[object DataView]",uD="[object Float32Array]",cD="[object Float64Array]",fD="[object Int8Array]",dD="[object Int16Array]",hD="[object Int32Array]",pD="[object Uint8Array]",mD="[object Uint8ClampedArray]",gD="[object Uint16Array]",yD="[object Uint32Array]",me={};me[uD]=me[cD]=me[fD]=me[dD]=me[hD]=me[pD]=me[mD]=me[gD]=me[yD]=!0;me[G3]=me[Q3]=me[aD]=me[Y3]=me[lD]=me[X3]=me[Z3]=me[J3]=me[eD]=me[tD]=me[nD]=me[rD]=me[iD]=me[sD]=me[oD]=!1;function vD(e){return Wi(e)&&ZS(e.length)&&!!me[Hi(e)]}function Em(e){return function(t){return e(t)}}var JS=typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,Fo=JS&&typeof Dt=="object"&&Dt&&!Dt.nodeType&&Dt,xD=Fo&&Fo.exports===JS,Tf=xD&&BS.process,Ws=function(){try{var e=Fo&&Fo.require&&Fo.require("util").types;return e||Tf&&Tf.binding&&Tf.binding("util")}catch{}}(),lv=Ws&&Ws.isTypedArray,wD=lv?Em(lv):vD,bD=Object.prototype,SD=bD.hasOwnProperty;function eT(e,t){var n=Na(e),r=!n&&V3(e),i=!n&&!r&&XS(e),s=!n&&!r&&!i&&wD(e),o=n||r||i||s,a=o?F3(e.length,String):[],l=a.length;for(var u in e)(t||SD.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||K3(u,l)))&&a.push(u);return a}var TD=Object.prototype;function Cm(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||TD;return e===n}var ED=US(Object.keys,Object),CD=Object.prototype,kD=CD.hasOwnProperty;function _D(e){if(!Cm(e))return ED(e);var t=[];for(var n in Object(e))kD.call(e,n)&&n!="constructor"&&t.push(n);return t}function tT(e){return e!=null&&ZS(e.length)&&!KS(e)}function km(e){return tT(e)?eT(e):_D(e)}function PD(e,t){return e&&rc(t,km(t),e)}function AD(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var RD=Object.prototype,OD=RD.hasOwnProperty;function jD(e){if(!ja(e))return AD(e);var t=Cm(e),n=[];for(var r in e)r=="constructor"&&(t||!OD.call(e,r))||n.push(r);return n}function _m(e){return tT(e)?eT(e,!0):jD(e)}function ND(e,t){return e&&rc(t,_m(t),e)}var nT=typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,uv=nT&&typeof Dt=="object"&&Dt&&!Dt.nodeType&&Dt,MD=uv&&uv.exports===nT,cv=MD?Ln.Buffer:void 0,fv=cv?cv.allocUnsafe:void 0;function DD(e,t){if(t)return e.slice();var n=e.length,r=fv?fv(n):new e.constructor(n);return e.copy(r),r}function rT(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function FD(e,t){for(var n=-1,r=e==null?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}function iT(){return[]}var LD=Object.prototype,ID=LD.propertyIsEnumerable,dv=Object.getOwnPropertySymbols,Pm=dv?function(e){return e==null?[]:(e=Object(e),FD(dv(e),function(t){return ID.call(e,t)}))}:iT;function $D(e,t){return rc(e,Pm(e),t)}function sT(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var VD=Object.getOwnPropertySymbols,oT=VD?function(e){for(var t=[];e;)sT(t,Pm(e)),e=Tm(e);return t}:iT;function BD(e,t){return rc(e,oT(e),t)}function aT(e,t,n){var r=t(e);return Na(e)?r:sT(r,n(e))}function zD(e){return aT(e,km,Pm)}function UD(e){return aT(e,_m,oT)}var vh=qi(Ln,"DataView"),xh=qi(Ln,"Promise"),wh=qi(Ln,"Set"),bh=qi(Ln,"WeakMap"),hv="[object Map]",HD="[object Object]",pv="[object Promise]",mv="[object Set]",gv="[object WeakMap]",yv="[object DataView]",WD=Ki(vh),KD=Ki(pa),qD=Ki(xh),GD=Ki(wh),QD=Ki(bh),zn=Hi;(vh&&zn(new vh(new ArrayBuffer(1)))!=yv||pa&&zn(new pa)!=hv||xh&&zn(xh.resolve())!=pv||wh&&zn(new wh)!=mv||bh&&zn(new bh)!=gv)&&(zn=function(e){var t=Hi(e),n=t==HD?e.constructor:void 0,r=n?Ki(n):"";if(r)switch(r){case WD:return yv;case KD:return hv;case qD:return pv;case GD:return mv;case QD:return gv}return t});var YD=Object.prototype,XD=YD.hasOwnProperty;function ZD(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&XD.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var vv=Ln.Uint8Array;function Am(e){var t=new e.constructor(e.byteLength);return new vv(t).set(new vv(e)),t}function JD(e,t){var n=t?Am(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var eF=/\w*$/;function tF(e){var t=new e.constructor(e.source,eF.exec(e));return t.lastIndex=e.lastIndex,t}var xv=Hr?Hr.prototype:void 0,wv=xv?xv.valueOf:void 0;function nF(e){return wv?Object(wv.call(e)):{}}function rF(e,t){var n=t?Am(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var iF="[object Boolean]",sF="[object Date]",oF="[object Map]",aF="[object Number]",lF="[object RegExp]",uF="[object Set]",cF="[object String]",fF="[object Symbol]",dF="[object ArrayBuffer]",hF="[object DataView]",pF="[object Float32Array]",mF="[object Float64Array]",gF="[object Int8Array]",yF="[object Int16Array]",vF="[object Int32Array]",xF="[object Uint8Array]",wF="[object Uint8ClampedArray]",bF="[object Uint16Array]",SF="[object Uint32Array]";function TF(e,t,n){var r=e.constructor;switch(t){case dF:return Am(e);case iF:case sF:return new r(+e);case hF:return JD(e,n);case pF:case mF:case gF:case yF:case vF:case xF:case wF:case bF:case SF:return rF(e,n);case oF:return new r;case aF:case cF:return new r(e);case lF:return tF(e);case uF:return new r;case fF:return nF(e)}}var bv=Object.create,EF=function(){function e(){}return function(t){if(!ja(t))return{};if(bv)return bv(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function CF(e){return typeof e.constructor=="function"&&!Cm(e)?EF(Tm(e)):{}}var kF="[object Map]";function _F(e){return Wi(e)&&zn(e)==kF}var Sv=Ws&&Ws.isMap,PF=Sv?Em(Sv):_F,AF="[object Set]";function RF(e){return Wi(e)&&zn(e)==AF}var Tv=Ws&&Ws.isSet,OF=Tv?Em(Tv):RF,jF=1,NF=2,MF=4,lT="[object Arguments]",DF="[object Array]",FF="[object Boolean]",LF="[object Date]",IF="[object Error]",uT="[object Function]",$F="[object GeneratorFunction]",VF="[object Map]",BF="[object Number]",cT="[object Object]",zF="[object RegExp]",UF="[object Set]",HF="[object String]",WF="[object Symbol]",KF="[object WeakMap]",qF="[object ArrayBuffer]",GF="[object DataView]",QF="[object Float32Array]",YF="[object Float64Array]",XF="[object Int8Array]",ZF="[object Int16Array]",JF="[object Int32Array]",e5="[object Uint8Array]",t5="[object Uint8ClampedArray]",n5="[object Uint16Array]",r5="[object Uint32Array]",fe={};fe[lT]=fe[DF]=fe[qF]=fe[GF]=fe[FF]=fe[LF]=fe[QF]=fe[YF]=fe[XF]=fe[ZF]=fe[JF]=fe[VF]=fe[BF]=fe[cT]=fe[zF]=fe[UF]=fe[HF]=fe[WF]=fe[e5]=fe[t5]=fe[n5]=fe[r5]=!0;fe[IF]=fe[uT]=fe[KF]=!1;function Lo(e,t,n,r,i,s){var o,a=t&jF,l=t&NF,u=t&MF;if(o!==void 0)return o;if(!ja(e))return e;var f=Na(e);if(f){if(o=ZD(e),!a)return rT(e,o)}else{var c=zn(e),d=c==uT||c==$F;if(XS(e))return DD(e,a);if(c==cT||c==lT||d&&!i){if(o=l||d?{}:CF(e),!a)return l?BD(e,ND(o,e)):$D(e,PD(o,e))}else{if(!fe[c])return i?e:{};o=TF(e,c,a)}}s||(s=new eo);var h=s.get(e);if(h)return h;s.set(e,o),OF(e)?e.forEach(function(b){o.add(Lo(b,t,n,b,e,s))}):PF(e)&&e.forEach(function(b,p){o.set(p,Lo(b,t,n,p,e,s))});var m=u?l?UD:zD:l?_m:km,v=f?void 0:m(e);return N3(v||e,function(b,p){v&&(p=b,b=e[p]),GS(o,p,Lo(b,t,n,p,e,s))}),o}var i5=1,s5=4;function pl(e){return Lo(e,i5|s5)}var Ev=Array.isArray,Cv=Object.keys,o5=Object.prototype.hasOwnProperty,a5=typeof Element<"u";function Sh(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=Ev(e),r=Ev(t),i,s,o;if(n&&r){if(s=e.length,s!=t.length)return!1;for(i=s;i--!==0;)if(!Sh(e[i],t[i]))return!1;return!0}if(n!=r)return!1;var a=e instanceof Date,l=t instanceof Date;if(a!=l)return!1;if(a&&l)return e.getTime()==t.getTime();var u=e instanceof RegExp,f=t instanceof RegExp;if(u!=f)return!1;if(u&&f)return e.toString()==t.toString();var c=Cv(e);if(s=c.length,s!==Cv(t).length)return!1;for(i=s;i--!==0;)if(!o5.call(t,c[i]))return!1;if(a5&&e instanceof Element&&t instanceof Element)return e===t;for(i=s;i--!==0;)if(o=c[i],!(o==="_owner"&&e.$$typeof)&&!Sh(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}var l5=function(t,n){try{return Sh(t,n)}catch(r){if(r.message&&r.message.match(/stack|recursion/i)||r.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",r.name,r.message),!1;throw r}};const ri=Ks(l5);var u5=4;function kv(e){return Lo(e,u5)}function fT(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var c5="[object Symbol]";function Rm(e){return typeof e=="symbol"||Wi(e)&&Hi(e)==c5}var f5="Expected a function";function Om(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(f5);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=e.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(Om.Cache||Qr),n}Om.Cache=Qr;var d5=500;function h5(e){var t=Om(e,function(r){return n.size===d5&&n.clear(),r}),n=t.cache;return t}var p5=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,m5=/\\(\\)?/g,g5=h5(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(p5,function(n,r,i,s){t.push(i?s.replace(m5,"$1"):r||n)}),t}),y5=1/0;function v5(e){if(typeof e=="string"||Rm(e))return e;var t=e+"";return t=="0"&&1/e==-y5?"-0":t}var x5=1/0,_v=Hr?Hr.prototype:void 0,Pv=_v?_v.toString:void 0;function dT(e){if(typeof e=="string")return e;if(Na(e))return fT(e,dT)+"";if(Rm(e))return Pv?Pv.call(e):"";var t=e+"";return t=="0"&&1/e==-x5?"-0":t}function w5(e){return e==null?"":dT(e)}function hT(e){return Na(e)?fT(e,v5):Rm(e)?[e]:rT(g5(w5(e)))}var pT={exports:{}},ue={};/** @license React v16.13.1
99
99
  * react-is.production.min.js
100
100
  *
101
101
  * Copyright (c) Facebook, Inc. and its affiliates.
102
102
  *
103
103
  * This source code is licensed under the MIT license found in the
104
104
  * LICENSE file in the root directory of this source tree.
105
- */var We=typeof Symbol=="function"&&Symbol.for,Rm=We?Symbol.for("react.element"):60103,Om=We?Symbol.for("react.portal"):60106,rc=We?Symbol.for("react.fragment"):60107,ic=We?Symbol.for("react.strict_mode"):60108,sc=We?Symbol.for("react.profiler"):60114,oc=We?Symbol.for("react.provider"):60109,ac=We?Symbol.for("react.context"):60110,jm=We?Symbol.for("react.async_mode"):60111,lc=We?Symbol.for("react.concurrent_mode"):60111,uc=We?Symbol.for("react.forward_ref"):60112,cc=We?Symbol.for("react.suspense"):60113,y5=We?Symbol.for("react.suspense_list"):60120,fc=We?Symbol.for("react.memo"):60115,dc=We?Symbol.for("react.lazy"):60116,v5=We?Symbol.for("react.block"):60121,x5=We?Symbol.for("react.fundamental"):60117,w5=We?Symbol.for("react.responder"):60118,b5=We?Symbol.for("react.scope"):60119;function Vt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Rm:switch(e=e.type,e){case jm:case lc:case rc:case sc:case ic:case cc:return e;default:switch(e=e&&e.$$typeof,e){case ac:case uc:case dc:case fc:case oc:return e;default:return t}}case Om:return t}}}function dT(e){return Vt(e)===lc}ue.AsyncMode=jm;ue.ConcurrentMode=lc;ue.ContextConsumer=ac;ue.ContextProvider=oc;ue.Element=Rm;ue.ForwardRef=uc;ue.Fragment=rc;ue.Lazy=dc;ue.Memo=fc;ue.Portal=Om;ue.Profiler=sc;ue.StrictMode=ic;ue.Suspense=cc;ue.isAsyncMode=function(e){return dT(e)||Vt(e)===jm};ue.isConcurrentMode=dT;ue.isContextConsumer=function(e){return Vt(e)===ac};ue.isContextProvider=function(e){return Vt(e)===oc};ue.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Rm};ue.isForwardRef=function(e){return Vt(e)===uc};ue.isFragment=function(e){return Vt(e)===rc};ue.isLazy=function(e){return Vt(e)===dc};ue.isMemo=function(e){return Vt(e)===fc};ue.isPortal=function(e){return Vt(e)===Om};ue.isProfiler=function(e){return Vt(e)===sc};ue.isStrictMode=function(e){return Vt(e)===ic};ue.isSuspense=function(e){return Vt(e)===cc};ue.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===rc||e===lc||e===sc||e===ic||e===cc||e===y5||typeof e=="object"&&e!==null&&(e.$$typeof===dc||e.$$typeof===fc||e.$$typeof===oc||e.$$typeof===ac||e.$$typeof===uc||e.$$typeof===x5||e.$$typeof===w5||e.$$typeof===b5||e.$$typeof===v5)};ue.typeOf=Vt;fT.exports=ue;var S5=fT.exports,hT=S5,T5={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},E5={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},pT={};pT[hT.ForwardRef]=T5;pT[hT.Memo]=E5;function ze(){return ze=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ze.apply(this,arguments)}function mT(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var hc=y.createContext(void 0);hc.displayName="FormikContext";hc.Provider;hc.Consumer;function C5(){var e=y.useContext(hc);return e}var on=function(t){return typeof t=="function"},pc=function(t){return t!==null&&typeof t=="object"},k5=function(t){return String(Math.floor(Number(t)))===t},Sf=function(t){return Object.prototype.toString.call(t)==="[object String]"},Tf=function(t){return pc(t)&&on(t.then)};function Rt(e,t,n,r){r===void 0&&(r=0);for(var i=cT(t);e&&r<i.length;)e=e[i[r++]];return r!==i.length&&!e||e===void 0?n:e}function Ei(e,t,n){for(var r=Tv(e),i=r,s=0,o=cT(t);s<o.length-1;s++){var a=o[s],l=Rt(e,o.slice(0,s+1));if(l&&(pc(l)||Array.isArray(l)))i=i[a]=Tv(l);else{var u=o[s+1];i=i[a]=k5(u)&&Number(u)>=0?[]:{}}}return(s===0?e:i)[o[s]]===n?e:(n===void 0?delete i[o[s]]:i[o[s]]=n,s===0&&n===void 0&&delete r[o[s]],r)}function gT(e,t,n,r){n===void 0&&(n=new WeakMap),r===void 0&&(r={});for(var i=0,s=Object.keys(e);i<s.length;i++){var o=s[i],a=e[o];pc(a)?n.get(a)||(n.set(a,!0),r[o]=Array.isArray(a)?[]:{},gT(a,t,n,r[o])):r[o]=t}return r}function _5(e,t){switch(t.type){case"SET_VALUES":return ze({},e,{values:t.payload});case"SET_TOUCHED":return ze({},e,{touched:t.payload});case"SET_ERRORS":return ri(e.errors,t.payload)?e:ze({},e,{errors:t.payload});case"SET_STATUS":return ze({},e,{status:t.payload});case"SET_ISSUBMITTING":return ze({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return ze({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return ze({},e,{values:Ei(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return ze({},e,{touched:Ei(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return ze({},e,{errors:Ei(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return ze({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return ze({},e,{touched:gT(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":return ze({},e,{isSubmitting:!1});case"SUBMIT_SUCCESS":return ze({},e,{isSubmitting:!1});default:return e}}var Jr={},pl={};function P5(e){var t=e.validateOnChange,n=t===void 0?!0:t,r=e.validateOnBlur,i=r===void 0?!0:r,s=e.validateOnMount,o=s===void 0?!1:s,a=e.isInitialValid,l=e.enableReinitialize,u=l===void 0?!1:l,f=e.onSubmit,c=mT(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),d=ze({validateOnChange:n,validateOnBlur:i,validateOnMount:o,onSubmit:f},c),h=y.useRef(d.initialValues),m=y.useRef(d.initialErrors||Jr),x=y.useRef(d.initialTouched||pl),b=y.useRef(d.initialStatus),p=y.useRef(!1),g=y.useRef({});y.useEffect(function(){return p.current=!0,function(){p.current=!1}},[]);var v=y.useState(0),E=v[1],S=y.useRef({values:hl(d.initialValues),errors:hl(d.initialErrors)||Jr,touched:hl(d.initialTouched)||pl,status:hl(d.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),C=S.current,k=y.useCallback(function(_){var M=S.current;S.current=_5(M,_),M!==S.current&&E(function($){return $+1})},[]),P=y.useCallback(function(_,M){return new Promise(function($,z){var G=d.validate(_,M);G==null?$(Jr):Tf(G)?G.then(function(oe){$(oe||Jr)},function(oe){z(oe)}):$(G)})},[d.validate]),j=y.useCallback(function(_,M){var $=d.validationSchema,z=on($)?$(M):$,G=M&&z.validateAt?z.validateAt(M,_):R5(_,z);return new Promise(function(oe,_e){G.then(function(){oe(Jr)},function(_t){_t.name==="ValidationError"?oe(A5(_t)):_e(_t)})})},[d.validationSchema]),N=y.useCallback(function(_,M){return new Promise(function($){return $(g.current[_].validate(M))})},[]),I=y.useCallback(function(_){var M=Object.keys(g.current).filter(function(z){return on(g.current[z].validate)}),$=M.length>0?M.map(function(z){return N(z,Rt(_,z))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all($).then(function(z){return z.reduce(function(G,oe,_e){return oe==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||oe&&(G=Ei(G,M[_e],oe)),G},{})})},[N]),re=y.useCallback(function(_){return Promise.all([I(_),d.validationSchema?j(_):{},d.validate?P(_):{}]).then(function(M){var $=M[0],z=M[1],G=M[2],oe=mh.all([$,z,G],{arrayMerge:O5});return oe})},[d.validate,d.validationSchema,I,P,j]),ie=Ut(function(_){return _===void 0&&(_=C.values),k({type:"SET_ISVALIDATING",payload:!0}),re(_).then(function(M){return p.current&&(k({type:"SET_ISVALIDATING",payload:!1}),k({type:"SET_ERRORS",payload:M})),M})});y.useEffect(function(){o&&p.current===!0&&ri(h.current,d.initialValues)&&ie(h.current)},[o,ie]);var xe=y.useCallback(function(_){var M=_&&_.values?_.values:h.current,$=_&&_.errors?_.errors:m.current?m.current:d.initialErrors||{},z=_&&_.touched?_.touched:x.current?x.current:d.initialTouched||{},G=_&&_.status?_.status:b.current?b.current:d.initialStatus;h.current=M,m.current=$,x.current=z,b.current=G;var oe=function(){k({type:"RESET_FORM",payload:{isSubmitting:!!_&&!!_.isSubmitting,errors:$,touched:z,status:G,values:M,isValidating:!!_&&!!_.isValidating,submitCount:_&&_.submitCount&&typeof _.submitCount=="number"?_.submitCount:0}})};if(d.onReset){var _e=d.onReset(C.values,Ma);Tf(_e)?_e.then(oe):oe()}else oe()},[d.initialErrors,d.initialStatus,d.initialTouched,d.onReset]);y.useEffect(function(){p.current===!0&&!ri(h.current,d.initialValues)&&u&&(h.current=d.initialValues,xe(),o&&ie(h.current))},[u,d.initialValues,xe,o,ie]),y.useEffect(function(){u&&p.current===!0&&!ri(m.current,d.initialErrors)&&(m.current=d.initialErrors||Jr,k({type:"SET_ERRORS",payload:d.initialErrors||Jr}))},[u,d.initialErrors]),y.useEffect(function(){u&&p.current===!0&&!ri(x.current,d.initialTouched)&&(x.current=d.initialTouched||pl,k({type:"SET_TOUCHED",payload:d.initialTouched||pl}))},[u,d.initialTouched]),y.useEffect(function(){u&&p.current===!0&&!ri(b.current,d.initialStatus)&&(b.current=d.initialStatus,k({type:"SET_STATUS",payload:d.initialStatus}))},[u,d.initialStatus,d.initialTouched]);var Oe=Ut(function(_){if(g.current[_]&&on(g.current[_].validate)){var M=Rt(C.values,_),$=g.current[_].validate(M);return Tf($)?(k({type:"SET_ISVALIDATING",payload:!0}),$.then(function(z){return z}).then(function(z){k({type:"SET_FIELD_ERROR",payload:{field:_,value:z}}),k({type:"SET_ISVALIDATING",payload:!1})})):(k({type:"SET_FIELD_ERROR",payload:{field:_,value:$}}),Promise.resolve($))}else if(d.validationSchema)return k({type:"SET_ISVALIDATING",payload:!0}),j(C.values,_).then(function(z){return z}).then(function(z){k({type:"SET_FIELD_ERROR",payload:{field:_,value:Rt(z,_)}}),k({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),Q=y.useCallback(function(_,M){var $=M.validate;g.current[_]={validate:$}},[]),ne=y.useCallback(function(_){delete g.current[_]},[]),O=Ut(function(_,M){k({type:"SET_TOUCHED",payload:_});var $=M===void 0?i:M;return $?ie(C.values):Promise.resolve()}),L=y.useCallback(function(_){k({type:"SET_ERRORS",payload:_})},[]),B=Ut(function(_,M){var $=on(_)?_(C.values):_;k({type:"SET_VALUES",payload:$});var z=M===void 0?n:M;return z?ie($):Promise.resolve()}),V=y.useCallback(function(_,M){k({type:"SET_FIELD_ERROR",payload:{field:_,value:M}})},[]),H=Ut(function(_,M,$){k({type:"SET_FIELD_VALUE",payload:{field:_,value:M}});var z=$===void 0?n:$;return z?ie(Ei(C.values,_,M)):Promise.resolve()}),q=y.useCallback(function(_,M){var $=M,z=_,G;if(!Sf(_)){_.persist&&_.persist();var oe=_.target?_.target:_.currentTarget,_e=oe.type,_t=oe.name,yn=oe.id,qi=oe.value,sr=oe.checked,$m=oe.outerHTML,La=oe.options,Ia=oe.multiple;$=M||_t||yn,z=/number|range/.test(_e)?(G=parseFloat(qi),isNaN(G)?"":G):/checkbox/.test(_e)?N5(Rt(C.values,$),sr,qi):La&&Ia?j5(La):qi}$&&H($,z)},[H,C.values]),ce=Ut(function(_){if(Sf(_))return function(M){return q(M,_)};q(_)}),ye=Ut(function(_,M,$){M===void 0&&(M=!0),k({type:"SET_FIELD_TOUCHED",payload:{field:_,value:M}});var z=$===void 0?i:$;return z?ie(C.values):Promise.resolve()}),J=y.useCallback(function(_,M){_.persist&&_.persist();var $=_.target,z=$.name,G=$.id,oe=$.outerHTML,_e=M||z||G;ye(_e,!0)},[ye]),Ve=Ut(function(_){if(Sf(_))return function(M){return J(M,_)};J(_)}),pt=y.useCallback(function(_){on(_)?k({type:"SET_FORMIK_STATE",payload:_}):k({type:"SET_FORMIK_STATE",payload:function(){return _}})},[]),mt=y.useCallback(function(_){k({type:"SET_STATUS",payload:_})},[]),ir=y.useCallback(function(_){k({type:"SET_ISSUBMITTING",payload:_})},[]),eo=Ut(function(){return k({type:"SUBMIT_ATTEMPT"}),ie().then(function(_){var M=_ instanceof Error,$=!M&&Object.keys(_).length===0;if($){var z;try{if(z=to(),z===void 0)return}catch(G){throw G}return Promise.resolve(z).then(function(G){return p.current&&k({type:"SUBMIT_SUCCESS"}),G}).catch(function(G){if(p.current)throw k({type:"SUBMIT_FAILURE"}),G})}else if(p.current&&(k({type:"SUBMIT_FAILURE"}),M))throw _})}),Na=Ut(function(_){_&&_.preventDefault&&on(_.preventDefault)&&_.preventDefault(),_&&_.stopPropagation&&on(_.stopPropagation)&&_.stopPropagation(),eo().catch(function(M){console.warn("Warning: An unhandled error was caught from submitForm()",M)})}),Ma={resetForm:xe,validateForm:ie,validateField:Oe,setErrors:L,setFieldError:V,setFieldTouched:ye,setFieldValue:H,setStatus:mt,setSubmitting:ir,setTouched:O,setValues:B,setFormikState:pt,submitForm:eo},to=Ut(function(){return f(C.values,Ma)}),wc=Ut(function(_){_&&_.preventDefault&&on(_.preventDefault)&&_.preventDefault(),_&&_.stopPropagation&&on(_.stopPropagation)&&_.stopPropagation(),xe()}),Da=y.useCallback(function(_){return{value:Rt(C.values,_),error:Rt(C.errors,_),touched:!!Rt(C.touched,_),initialValue:Rt(h.current,_),initialTouched:!!Rt(x.current,_),initialError:Rt(m.current,_)}},[C.errors,C.touched,C.values]),Yr=y.useCallback(function(_){return{setValue:function($,z){return H(_,$,z)},setTouched:function($,z){return ye(_,$,z)},setError:function($){return V(_,$)}}},[H,ye,V]),Fa=y.useCallback(function(_){var M=pc(_),$=M?_.name:_,z=Rt(C.values,$),G={name:$,value:z,onChange:ce,onBlur:Ve};if(M){var oe=_.type,_e=_.value,_t=_.as,yn=_.multiple;oe==="checkbox"?_e===void 0?G.checked=!!z:(G.checked=!!(Array.isArray(z)&&~z.indexOf(_e)),G.value=_e):oe==="radio"?(G.checked=z===_e,G.value=_e):_t==="select"&&yn&&(G.value=G.value||[],G.multiple=!0)}return G},[Ve,ce,C.values]),kt=y.useMemo(function(){return!ri(h.current,C.values)},[h.current,C.values]),bc=y.useMemo(function(){return typeof a<"u"?kt?C.errors&&Object.keys(C.errors).length===0:a!==!1&&on(a)?a(d):a:C.errors&&Object.keys(C.errors).length===0},[a,kt,C.errors,d]),Sc=ze({},C,{initialValues:h.current,initialErrors:m.current,initialTouched:x.current,initialStatus:b.current,handleBlur:Ve,handleChange:ce,handleReset:wc,handleSubmit:Na,resetForm:xe,setErrors:L,setFormikState:pt,setFieldTouched:ye,setFieldValue:H,setFieldError:V,setStatus:mt,setSubmitting:ir,setTouched:O,setValues:B,submitForm:eo,validateForm:ie,validateField:Oe,isValid:bc,dirty:kt,unregisterField:ne,registerField:Q,getFieldProps:Fa,getFieldMeta:Da,getFieldHelpers:Yr,validateOnBlur:i,validateOnChange:n,validateOnMount:o});return Sc}function A5(e){var t={};if(e.inner){if(e.inner.length===0)return Ei(t,e.path,e.message);for(var i=e.inner,n=Array.isArray(i),r=0,i=n?i:i[Symbol.iterator]();;){var s;if(n){if(r>=i.length)break;s=i[r++]}else{if(r=i.next(),r.done)break;s=r.value}var o=s;Rt(t,o.path)||(t=Ei(t,o.path,o.message))}}return t}function R5(e,t,n,r){n===void 0&&(n=!1);var i=bh(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:i})}function bh(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);Array.isArray(e[r])===!0?t[r]=e[r].map(function(i){return Array.isArray(i)===!0||Jy(i)?bh(i):i!==""?i:void 0}):Jy(e[r])?t[r]=bh(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function O5(e,t,n){var r=e.slice();return t.forEach(function(s,o){if(typeof r[o]>"u"){var a=n.clone!==!1,l=a&&n.isMergeableObject(s);r[o]=l?mh(Array.isArray(s)?[]:{},s,n):s}else n.isMergeableObject(s)?r[o]=mh(e[o],s,n):e.indexOf(s)===-1&&r.push(s)}),r}function j5(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function N5(e,t,n){if(typeof e=="boolean")return!!t;var r=[],i=!1,s=-1;if(Array.isArray(e))r=e,s=e.indexOf(n),i=s>=0;else if(!n||n=="true"||n=="false")return!!t;return t&&n&&!i?r.concat(n):i?r.slice(0,s).concat(r.slice(s+1)):r}var M5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?y.useLayoutEffect:y.useEffect;function Ut(e){var t=y.useRef(e);return M5(function(){t.current=e}),y.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current.apply(void 0,r)},[])}var D5=y.forwardRef(function(e,t){var n=e.action,r=mT(e,["action"]),i=n??"#",s=C5(),o=s.handleReset,a=s.handleSubmit;return y.createElement("form",ze({onSubmit:a,ref:t,onReset:o,action:i},r))});D5.displayName="Form";const yT=({init:e,schema:t,action:n})=>P5({initialValues:e,validationSchema:t,validateOnBlur:!1,enableReinitialize:!0,validateOnChange:!1,validateOnMount:!1,onSubmit:r=>{n(r)}});function F5(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const L5=e=>{switch(e){case"success":return V5;case"info":return z5;case"warning":return B5;case"error":return U5;default:return null}},I5=Array(12).fill(0),$5=({visible:e,className:t})=>R.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},R.createElement("div",{className:"sonner-spinner"},I5.map((n,r)=>R.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),V5=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"})),B5=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",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"})),z5=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"})),U5=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"})),H5=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"})),W5=()=>{const[e,t]=R.useState(document.hidden);return R.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Sh=1;class K5{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,s=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Sh++,o=this.toasts.find(l=>l.id===s),a=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),o?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...t,id:s,title:r}),{...l,...t,id:s,dismissible:a,title:r}):l):this.addToast({title:r,...i,dismissible:a,id:s}),s},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0}))),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,o;const a=i.then(async u=>{if(o=["resolve",u],R.isValidElement(u))s=!1,this.create({id:r,type:"default",message:u});else if(G5(u)&&!u.ok){s=!1;const c=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,d=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,h=typeof c=="object"?c:{message:c};this.create({id:r,type:"error",description:d,...h})}else if(u instanceof Error){s=!1;const c=typeof n.error=="function"?await n.error(u):n.error,d=typeof n.description=="function"?await n.description(u):n.description,h=typeof c=="object"?c:{message:c};this.create({id:r,type:"error",description:d,...h})}else if(n.success!==void 0){s=!1;const c=typeof n.success=="function"?await n.success(u):n.success,d=typeof n.description=="function"?await n.description(u):n.description,h=typeof c=="object"?c:{message:c};this.create({id:r,type:"success",description:d,...h})}}).catch(async u=>{if(o=["reject",u],n.error!==void 0){s=!1;const f=typeof n.error=="function"?await n.error(u):n.error,c=typeof n.description=="function"?await n.description(u):n.description,d=typeof f=="object"?f:{message:f};this.create({id:r,type:"error",description:c,...d})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((u,f)=>a.then(()=>o[0]==="reject"?f(o[1]):u(o[1])).catch(f));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||Sh++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const xt=new K5,q5=(e,t)=>{const n=(t==null?void 0:t.id)||Sh++;return xt.addToast({title:e,...t,id:n}),n},G5=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Q5=q5,Y5=()=>xt.toasts,X5=()=>xt.getActiveToasts(),kv=Object.assign(Q5,{success:xt.success,info:xt.info,warning:xt.warning,error:xt.error,custom:xt.custom,message:xt.message,promise:xt.promise,dismiss:xt.dismiss,loading:xt.loading},{getHistory:Y5,getToasts:X5});F5("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}[data-sonner-toaster][data-lifted=true]{transform:translateY(-8px)}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function ml(e){return e.label!==void 0}const Z5=3,J5="24px",eL="16px",_v=4e3,tL=356,nL=14,rL=45,iL=200;function xn(...e){return e.filter(Boolean).join(" ")}function sL(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const oL=e=>{var t,n,r,i,s,o,a,l,u;const{invert:f,toast:c,unstyled:d,interacting:h,setHeights:m,visibleToasts:x,heights:b,index:p,toasts:g,expanded:v,removeToast:E,defaultRichColors:S,closeButton:C,style:k,cancelButtonStyle:P,actionButtonStyle:j,className:N="",descriptionClassName:I="",duration:re,position:ie,gap:xe,expandByDefault:Oe,classNames:Q,icons:ne,closeButtonAriaLabel:O="Close toast"}=e,[L,B]=R.useState(null),[V,H]=R.useState(null),[q,ce]=R.useState(!1),[ye,J]=R.useState(!1),[Ve,pt]=R.useState(!1),[mt,ir]=R.useState(!1),[eo,Na]=R.useState(!1),[Ma,to]=R.useState(0),[wc,Da]=R.useState(0),Yr=R.useRef(c.duration||re||_v),Fa=R.useRef(null),kt=R.useRef(null),bc=p===0,Sc=p+1<=x,_=c.type,M=c.dismissible!==!1,$=c.className||"",z=c.descriptionClassName||"",G=R.useMemo(()=>b.findIndex(Y=>Y.toastId===c.id)||0,[b,c.id]),oe=R.useMemo(()=>{var Y;return(Y=c.closeButton)!=null?Y:C},[c.closeButton,C]),_e=R.useMemo(()=>c.duration||re||_v,[c.duration,re]),_t=R.useRef(0),yn=R.useRef(0),qi=R.useRef(0),sr=R.useRef(null),[$m,La]=ie.split("-"),Ia=R.useMemo(()=>b.reduce((Y,Be,Xe)=>Xe>=G?Y:Y+Be.height,0),[b,G]),Vm=W5(),LT=c.invert||f,Tc=_==="loading";yn.current=R.useMemo(()=>G*xe+Ia,[G,Ia]),R.useEffect(()=>{Yr.current=_e},[_e]),R.useEffect(()=>{ce(!0)},[]),R.useEffect(()=>{const Y=kt.current;if(Y){const Be=Y.getBoundingClientRect().height;return Da(Be),m(Xe=>[{toastId:c.id,height:Be,position:c.position},...Xe]),()=>m(Xe=>Xe.filter(Pt=>Pt.toastId!==c.id))}},[m,c.id]),R.useLayoutEffect(()=>{if(!q)return;const Y=kt.current,Be=Y.style.height;Y.style.height="auto";const Xe=Y.getBoundingClientRect().height;Y.style.height=Be,Da(Xe),m(Pt=>Pt.find(Ke=>Ke.toastId===c.id)?Pt.map(Ke=>Ke.toastId===c.id?{...Ke,height:Xe}:Ke):[{toastId:c.id,height:Xe,position:c.position},...Pt])},[q,c.title,c.description,m,c.id]);const or=R.useCallback(()=>{J(!0),to(yn.current),m(Y=>Y.filter(Be=>Be.toastId!==c.id)),setTimeout(()=>{E(c)},iL)},[c,E,m,yn]);R.useEffect(()=>{if(c.promise&&_==="loading"||c.duration===1/0||c.type==="loading")return;let Y;return v||h||Vm?(()=>{if(qi.current<_t.current){const Pt=new Date().getTime()-_t.current;Yr.current=Yr.current-Pt}qi.current=new Date().getTime()})():(()=>{Yr.current!==1/0&&(_t.current=new Date().getTime(),Y=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),or()},Yr.current))})(),()=>clearTimeout(Y)},[v,h,c,_,Vm,or]),R.useEffect(()=>{c.delete&&or()},[or,c.delete]);function IT(){var Y;if(ne!=null&&ne.loading){var Be;return R.createElement("div",{className:xn(Q==null?void 0:Q.loader,c==null||(Be=c.classNames)==null?void 0:Be.loader,"sonner-loader"),"data-visible":_==="loading"},ne.loading)}return R.createElement($5,{className:xn(Q==null?void 0:Q.loader,c==null||(Y=c.classNames)==null?void 0:Y.loader),visible:_==="loading"})}var Bm,zm;return R.createElement("li",{tabIndex:0,ref:kt,className:xn(N,$,Q==null?void 0:Q.toast,c==null||(t=c.classNames)==null?void 0:t.toast,Q==null?void 0:Q.default,Q==null?void 0:Q[_],c==null||(n=c.classNames)==null?void 0:n[_]),"data-sonner-toast":"","data-rich-colors":(Bm=c.richColors)!=null?Bm:S,"data-styled":!(c.jsx||c.unstyled||d),"data-mounted":q,"data-promise":!!c.promise,"data-swiped":eo,"data-removed":ye,"data-visible":Sc,"data-y-position":$m,"data-x-position":La,"data-index":p,"data-front":bc,"data-swiping":Ve,"data-dismissible":M,"data-type":_,"data-invert":LT,"data-swipe-out":mt,"data-swipe-direction":V,"data-expanded":!!(v||Oe&&q),style:{"--index":p,"--toasts-before":p,"--z-index":g.length-p,"--offset":`${ye?Ma:yn.current}px`,"--initial-height":Oe?"auto":`${wc}px`,...k,...c.style},onDragEnd:()=>{pt(!1),B(null),sr.current=null},onPointerDown:Y=>{Tc||!M||(Fa.current=new Date,to(yn.current),Y.target.setPointerCapture(Y.pointerId),Y.target.tagName!=="BUTTON"&&(pt(!0),sr.current={x:Y.clientX,y:Y.clientY}))},onPointerUp:()=>{var Y,Be,Xe;if(mt||!M)return;sr.current=null;const Pt=Number(((Y=kt.current)==null?void 0:Y.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),$a=Number(((Be=kt.current)==null?void 0:Be.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ke=new Date().getTime()-((Xe=Fa.current)==null?void 0:Xe.getTime()),Bt=L==="x"?Pt:$a,Va=Math.abs(Bt)/Ke;if(Math.abs(Bt)>=rL||Va>.11){to(yn.current),c.onDismiss==null||c.onDismiss.call(c,c),H(L==="x"?Pt>0?"right":"left":$a>0?"down":"up"),or(),ir(!0);return}else{var nn,rn;(nn=kt.current)==null||nn.style.setProperty("--swipe-amount-x","0px"),(rn=kt.current)==null||rn.style.setProperty("--swipe-amount-y","0px")}Na(!1),pt(!1),B(null)},onPointerMove:Y=>{var Be,Xe,Pt;if(!sr.current||!M||((Be=window.getSelection())==null?void 0:Be.toString().length)>0)return;const Ke=Y.clientY-sr.current.y,Bt=Y.clientX-sr.current.x;var Va;const nn=(Va=e.swipeDirections)!=null?Va:sL(ie);!L&&(Math.abs(Bt)>1||Math.abs(Ke)>1)&&B(Math.abs(Bt)>Math.abs(Ke)?"x":"y");let rn={x:0,y:0};const Um=Xr=>1/(1.5+Math.abs(Xr)/20);if(L==="y"){if(nn.includes("top")||nn.includes("bottom"))if(nn.includes("top")&&Ke<0||nn.includes("bottom")&&Ke>0)rn.y=Ke;else{const Xr=Ke*Um(Ke);rn.y=Math.abs(Xr)<Math.abs(Ke)?Xr:Ke}}else if(L==="x"&&(nn.includes("left")||nn.includes("right")))if(nn.includes("left")&&Bt<0||nn.includes("right")&&Bt>0)rn.x=Bt;else{const Xr=Bt*Um(Bt);rn.x=Math.abs(Xr)<Math.abs(Bt)?Xr:Bt}(Math.abs(rn.x)>0||Math.abs(rn.y)>0)&&Na(!0),(Xe=kt.current)==null||Xe.style.setProperty("--swipe-amount-x",`${rn.x}px`),(Pt=kt.current)==null||Pt.style.setProperty("--swipe-amount-y",`${rn.y}px`)}},oe&&!c.jsx&&_!=="loading"?R.createElement("button",{"aria-label":O,"data-disabled":Tc,"data-close-button":!0,onClick:Tc||!M?()=>{}:()=>{or(),c.onDismiss==null||c.onDismiss.call(c,c)},className:xn(Q==null?void 0:Q.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(zm=ne==null?void 0:ne.close)!=null?zm:H5):null,_||c.icon||c.promise?R.createElement("div",{"data-icon":"",className:xn(Q==null?void 0:Q.icon,c==null||(i=c.classNames)==null?void 0:i.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||IT():null,c.type!=="loading"?c.icon||(ne==null?void 0:ne[_])||L5(_):null):null,R.createElement("div",{"data-content":"",className:xn(Q==null?void 0:Q.content,c==null||(s=c.classNames)==null?void 0:s.content)},R.createElement("div",{"data-title":"",className:xn(Q==null?void 0:Q.title,c==null||(o=c.classNames)==null?void 0:o.title)},c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title),c.description?R.createElement("div",{"data-description":"",className:xn(I,z,Q==null?void 0:Q.description,c==null||(a=c.classNames)==null?void 0:a.description)},typeof c.description=="function"?c.description():c.description):null),R.isValidElement(c.cancel)?c.cancel:c.cancel&&ml(c.cancel)?R.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||P,onClick:Y=>{ml(c.cancel)&&M&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,Y),or())},className:xn(Q==null?void 0:Q.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,R.isValidElement(c.action)?c.action:c.action&&ml(c.action)?R.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||j,onClick:Y=>{ml(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,Y),!Y.defaultPrevented&&or())},className:xn(Q==null?void 0:Q.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function Pv(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function aL(e,t){const n={};return[e,t].forEach((r,i)=>{const s=i===1,o=s?"--mobile-offset":"--offset",a=s?eL:J5;function l(u){["top","right","bottom","left"].forEach(f=>{n[`${o}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${o}-${u}`]=a:n[`${o}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(a)}),n}const lL=R.forwardRef(function(t,n){const{invert:r,position:i="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:a,className:l,offset:u,mobileOffset:f,theme:c="light",richColors:d,duration:h,style:m,visibleToasts:x=Z5,toastOptions:b,dir:p=Pv(),gap:g=nL,icons:v,containerAriaLabel:E="Notifications"}=t,[S,C]=R.useState([]),k=R.useMemo(()=>Array.from(new Set([i].concat(S.filter(V=>V.position).map(V=>V.position)))),[S,i]),[P,j]=R.useState([]),[N,I]=R.useState(!1),[re,ie]=R.useState(!1),[xe,Oe]=R.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Q=R.useRef(null),ne=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),O=R.useRef(null),L=R.useRef(!1),B=R.useCallback(V=>{C(H=>{var q;return(q=H.find(ce=>ce.id===V.id))!=null&&q.delete||xt.dismiss(V.id),H.filter(({id:ce})=>ce!==V.id)})},[]);return R.useEffect(()=>xt.subscribe(V=>{if(V.dismiss){const H=S.map(q=>q.id===V.id?{...q,delete:!0}:q);requestAnimationFrame(()=>{C(H)});return}setTimeout(()=>{dk.flushSync(()=>{C(H=>{const q=H.findIndex(ce=>ce.id===V.id);return q!==-1?[...H.slice(0,q),{...H[q],...V},...H.slice(q+1)]:[V,...H]})})})}),[S]),R.useEffect(()=>{if(c!=="system"){Oe(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Oe("dark"):Oe("light")),typeof window>"u")return;const V=window.matchMedia("(prefers-color-scheme: dark)");try{V.addEventListener("change",({matches:H})=>{Oe(H?"dark":"light")})}catch{V.addListener(({matches:q})=>{try{Oe(q?"dark":"light")}catch(ce){console.error(ce)}})}},[c]),R.useEffect(()=>{S.length<=1&&I(!1)},[S]),R.useEffect(()=>{const V=H=>{var q;if(s.every(J=>H[J]||H.code===J)){var ye;I(!0),(ye=Q.current)==null||ye.focus()}H.code==="Escape"&&(document.activeElement===Q.current||(q=Q.current)!=null&&q.contains(document.activeElement))&&I(!1)};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[s]),R.useEffect(()=>{if(Q.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,L.current=!1)}},[Q.current]),R.createElement("section",{ref:n,"aria-label":`${E} ${ne}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},k.map((V,H)=>{var q;const[ce,ye]=V.split("-");return S.length?R.createElement("ol",{key:V,dir:p==="auto"?Pv():p,tabIndex:-1,ref:Q,className:l,"data-sonner-toaster":!0,"data-sonner-theme":xe,"data-y-position":ce,"data-lifted":N&&S.length>1&&!o,"data-x-position":ye,style:{"--front-toast-height":`${((q=P[0])==null?void 0:q.height)||0}px`,"--width":`${tL}px`,"--gap":`${g}px`,...m,...aL(u,f)},onBlur:J=>{L.current&&!J.currentTarget.contains(J.relatedTarget)&&(L.current=!1,O.current&&(O.current.focus({preventScroll:!0}),O.current=null))},onFocus:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||L.current||(L.current=!0,O.current=J.relatedTarget)},onMouseEnter:()=>I(!0),onMouseMove:()=>I(!0),onMouseLeave:()=>{re||I(!1)},onDragEnd:()=>I(!1),onPointerDown:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||ie(!0)},onPointerUp:()=>ie(!1)},S.filter(J=>!J.position&&H===0||J.position===V).map((J,Ve)=>{var pt,mt;return R.createElement(oL,{key:J.id,icons:v,index:Ve,toast:J,defaultRichColors:d,duration:(pt=b==null?void 0:b.duration)!=null?pt:h,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:r,visibleToasts:x,closeButton:(mt=b==null?void 0:b.closeButton)!=null?mt:a,interacting:re,position:V,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:B,toasts:S.filter(ir=>ir.position==J.position),heights:P.filter(ir=>ir.position==J.position),setHeights:j,expandByDefault:o,gap:g,expanded:N,swipeDirections:t.swipeDirections})})):null}))});function uL(e){return Array.isArray(e)&&e[0].field!==void 0}const vT=(e,t)=>{var n;if(uL(e)){for(const r of e)(n=t==null?void 0:t.form)==null||n.setFieldError(r.field,r.message);return}if(e&&e.message){t!=null&&t.noToast||kv.error(e.message);return}if(e&&e.error){t!=null&&t.noToast||kv.error(e.error);return}};function cL(e,t,n){let r=n;r||(r=Object.keys(e));for(let i of r){if(Array.isArray(e[i])&&Array.isArray(t[i])){if(e[i].length!==t[i].length)return!1;for(let s=0;s<e[i].length;s++)if(e[i][s]!==t[i][s])return!1;continue}if(e[i]!==t[i])return!1}return!0}function Nm({id:e,text:t,className:n,required:r}){return t?w.jsxs("label",{htmlFor:e,className:Ne("mb-1 block text-sm font-medium text-slate-700",n),children:[t,r&&w.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}):null}const Ef={sm:"px-3 py-1 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-15"};function fL({id:e,label:t,suffix:n,prefix:r,size:i="md",type:s="text",noMargin:o=!1,required:a=!1,error:l,ariaDescribedBy:u,className:f,ariaInvalid:c,ariaLabel:d,autoFocus:h,...m}){const x=nr();return w.jsxs("div",{className:Ne({"mb-2":!o},f),children:[w.jsx(Nm,{id:e,text:t,required:a}),w.jsxs("div",{className:"flex items-center",children:[r&&w.jsx("span",{className:Ne("inline-block border border-solid border-r-0 border-slate-200 bg-slate-100 rounded-l-md",Ef[i],{"border-red-500!":!!l}),children:r}),w.jsx("input",{id:e,className:Ne("text-gray-800 border border-solid rounded-lg block text-base py-2 px-3 w-full border-slate-200 focus:outline-hidden focus:border-custom-500 disabled:bg-slate-100 disabled:border-slate-300 disabled:text-slate-500 placeholder:text-slate-400",Ef[i],{"rounded-l-none":!!r,"rounded-r-none":!!n,"border-red-500! text-red-500!":!!l}),type:s,required:a,"aria-describedby":u,"aria-invalid":c,"aria-label":d,style:{color:x.getColor(K.InputText),backgroundColor:x.getColor(K.InputBackground),borderColor:x.getColor(K.InputBorder),borderRadius:x.getRadius()},...m}),n&&w.jsx("span",{className:Ne("inline-block border border-solid border-l-0 border-slate-200 bg-slate-100 rounded-r-md",Ef[i],{"border-red-500!":!!l}),children:n})]}),!!l&&w.jsx("p",{className:"mt-1 text-xs text-red-500",children:l})]})}const dL=(e,t)=>{document.cookie=`${e}=${t}`},xT=y.createContext({}),hL=()=>`${window.location.pathname}_$$_${document.title}`,pL=()=>{const e=localStorage.getItem("page");return!e||e===""?"/":e},mL=()=>{const e=localStorage.getItem("p-history");if(!e||e==="")return[];try{return JSON.parse(e)}catch{return[]}};function gL({children:e}){const[t,n]=y.useState("/"),[r,i]=y.useState(mL());function s(){i([]),localStorage.removeItem("p-history")}const o=a=>{n(a),i(l=>[...new Set([...l,a])]),localStorage.setItem("page",a),localStorage.setItem("p-history",JSON.stringify(r))};return w.jsx(xT.Provider,{value:{page:t,setPage:o,history:r,clearHistory:s},children:e})}function Mm(){return y.useContext(xT)}function yL({label:e,id:t,value:n="",className:r,placeholder:i,children:s,required:o,error:a,...l}){return w.jsxs("div",{className:r||"",children:[e&&w.jsx(Nm,{id:t,required:o,text:e}),w.jsx("select",{id:t,"aria-placeholder":i,value:n,"aria-label":e,className:"light forelect transition-colors duration-200 border border-solid text-gray-900 text-sm rounded-md focus:ring-emerald-500 focus-visible:ring-0 focus-visible:shadow-none outline focus-visible:outline-none focus-visible:ber-emerald-500 focus:border-emerald-500 block w-full px-2 py-2 placeholder-fuchsia-600 caret-emer-500",onChange:l.onChange,required:o,...l,children:s}),!!a&&w.jsx("p",{className:"1 texm text-r500",children:a})]})}const Av={ring:{label:"",input:"relative before:content[''] before:absolute before:top-2/4 before:left-2/4 before:block before:h-12 before:w-12 before:-translate-y-2/4 before:-translate-x-2/4 before:rounded-full before:bg-blue-gray-500 before:opacity-0 before:transition-opacity hover:before:opacity-10"},hover:{label:"hover:bg-secondary transition-colors duration-200 px-2 py-1 rounded-md",input:""}},vL={blue:"checked:border-blue-500 checked:bg-blue-500 checked:before:bg-blue-500",indigo:"checked:border-indigo-500 checked:bg-indigo-500 checked:before:bg-indigo-500",green:"checked:border-green-500 checked:bg-green-500 checked:before:bg-green-500",red:"checked:border-red-500 checked:bg-red-500 checked:before:bg-red-500",orange:"checked:border-orange-500 checked:bg-orange-500 checked:before:bg-orange-500"},xL={sm:"h-4 w-4 lg:h-3 lg:w-3",md:"h-6 w-6 lg:h-5 lg:w-5",lg:"h-8 w-8 lg:h-7 lg:w-7"},wL={sm:"h-3 w-3 lg:h-2.5 lg:w-2.5",md:"h-5 w-5 lg:h-4 lg:w-4",lg:"h-7 w-7 lg:h-6 lg:w-6"};function bL({children:e,name:t,required:n,value:r,checked:i,onChange:s,onBlur:o,red:a,id:l=t,size:u="md",effect:f="ring",reversed:c=!1,variant:d="blue",...h}){return w.jsxs("div",{children:[w.jsxs("div",{className:`flex items-center justify-between ${c?"flex-row-reverse":""} ${Av[f].label}`,children:[w.jsxs("label",{className:"disable-highlight relative mr-3 flex cursor-pointer items-center rounded-full",htmlFor:l,children:[w.jsx("input",{id:l,name:t,type:"checkbox",className:`border-gray-200 peer cursor-pointer appearance-none rounded-md border border-solid bg-white transition-all ${vL[d]} ${xL[u]} ${Av[f].input}`,required:n,checked:i,value:r,onChange:m=>s==null?void 0:s(m.target.checked),onBlur:m=>o==null?void 0:o(m.target.checked),...h}),w.jsx("div",{className:"pointer-events-none absolute left-2/4 top-2/4 translate-x-2/4 translate-y-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100",children:w.jsx(De.Check,{className:wL[u]})})]}),w.jsx("label",{className:"disable-highlight mt-px flex grow cursor-pointer select-none items-center justify-between font-light text-gray-800",htmlFor:l,children:e})]}),a&&w.jsx("small",{className:"text-xs text-red-500",children:a})]})}function SL({id:e,value:t,name:n,onChange:r,children:i,disabled:s,className:o}){return w.jsxs("label",{htmlFor:e,className:Ne("relative flex cursor-pointer items-center rounded-md p-2 focus:outline-none",{"opacity-60 cursor-not-allowed":s},o),children:[w.jsx("input",{type:"radio",id:e,name:n,value:e,checked:t,onChange:a=>{r&&r(a.target.checked)},className:"peer h-4 w-4 cursor-pointer appearance-none rounded-full border-2 border-slate-300 transition-all checked:border-[5px] checked:border-indigo-600 focus:ring-0 focus:ring-offset-0",disabled:s}),w.jsx("span",{className:"ml-2 text-sm font-medium text-slate-700",children:i})]})}function TL({id:e,label:t,children:n,required:r,className:i}){return w.jsxs("fieldset",{id:e,className:i,children:[t&&w.jsxs("legend",{className:"mb-1 block text-sm font-medium text-slate-700",children:[t," ",r&&w.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),w.jsx("div",{className:"flex flex-col gap-0 mt-1",children:n})]})}const Rv=Object.assign(SL,{Group:TL});function Dm({id:e,label:t,suffix:n,prefix:r,className:i,noMargin:s,rows:o=3,type:a="text",required:l=!1,error:u,ariaInvalid:f,inputRef:c,autoFocus:d=!0,style:h,...m}){const x=nr();return w.jsxs("div",{className:Ne({"mb-2":!s},i),children:[t&&w.jsx(Nm,{id:e,text:t,required:l}),w.jsx("textarea",{className:Ne("resize-none max-h-36 text-gray-800 w-full py-2 px-3 border border-solid rounded-lg block border-slate-200 focus:outline-hidden focus:border-custom-500 disabled:bg-slate-100 disabled:border-slate-300 disabled:text-slate-500 placeholder:text-slate-400 invalid:border-red-500 invalid:text-red-500",{"border-red-500! text-red-500!":!!u}),id:e,rows:o,"aria-invalid":f,...m,ref:c,autoFocus:d,style:{...h,color:x.getColor(K.InputText),backgroundColor:x.getColor(K.InputBackground),borderColor:x.getColor(K.InputBorder),borderRadius:x.getRadius()}}),!!u&&w.jsx("p",{className:"text-red-500 mt-1 text-xs",children:u})]})}function EL({onOk:e,clientId:t,widgetId:n,appearance:r}){var h,m,x,b,p,g,v,E;const i=nr(),{defaultValues:s}=tn(),o=Mm(),a=hN(),l=(m=(h=r==null?void 0:r.body)==null?void 0:h.inputs)==null?void 0:m.reduce((S,C)=>{const k=C.remember?Ll(C.name):void 0;return S[C.name]=k||(s==null?void 0:s[C.name])||"",S},{}),u=(b=(x=r==null?void 0:r.body)==null?void 0:x.inputs)==null?void 0:b.reduce((S,C)=>(S[C.name]="",S),{}),f=wm((g=(p=r==null?void 0:r.body)==null?void 0:p.inputs)==null?void 0:g.reduce((S,C)=>(S[C.name]=C.required?Eu().required(C.label):Eu(),S),{})),c=yT({init:{...l},schema:f,action:async S=>{var P;const[C,k]=await a.mutateAsync({inputs:S,history:o.history,client_id:t,widget_id:n});if(xp(k)){o.clearHistory();for(const j of((P=r==null?void 0:r.body)==null?void 0:P.inputs)||[])j.remember&&dL(j.name,S[j.name]);e==null||e();return}vT(C,{form:c})}}),d=!cL(u,c.values);return w.jsx("section",{className:"h-full overflow-y-auto px-6 py-5 bg-white",style:{backgroundColor:i.getColor(K.GreeterBackground)},children:w.jsxs("form",{className:"grid grid-cols-1 gap-4",onSubmit:S=>{S.preventDefault(),c.handleSubmit()},children:[(E=(v=r==null?void 0:r.body)==null?void 0:v.inputs)==null?void 0:E.map(S=>{var C,k;if(["text","email","phone"].includes(S.type))return w.jsx(fL,{id:S.name,name:S.name,type:S.type,label:S.label,value:c.values[S.name],onChange:c.handleChange,onBlur:c.handleBlur,autoComplete:"off",placeholder:S.placeholder,error:c.errors[S.name],ariaInvalid:c.errors.name?!0:void 0,required:S.required,noMargin:!0},S.name);if(S.type==="select")return w.jsx(yL,{id:S.name,name:S.name,value:c.values[S.name],onChange:c.handleChange,label:S.label,required:S.required,children:(C=S.options)==null?void 0:C.map(P=>w.jsx("option",{value:P,children:P},P))},S.name);if(S.type==="checkbox")return w.jsx(bL,{id:S.name,name:S.name,value:c.values[S.name],onChange:c.handleChange,required:S.required,children:S.label},S.name);if(S.type==="radio")return w.jsx(Rv.Group,{id:S.name,label:S.label,required:S.required,children:(k=S.options)==null?void 0:k.map(P=>w.jsx(Rv,{onChange:j=>{j?c.setFieldValue(S.name,P):c.setFieldValue(S.name,"")},id:P,name:S.name,value:P===c.values[S.name],children:P},P))},S.name);if(S.type==="textarea")return w.jsx(Dm,{id:S.name,name:S.name,value:c.values[S.name],onChange:c.handleChange,placeholder:S.placeholder,error:c.errors[S.name],required:S.required,label:S.label},S.name)}),w.jsx(Gn,{textKey:K.GreeterButtonText,bgKey:K.GreeterButtonBackground,type:"submit",disabled:!d,className:"mt-3 transition-all duration-300 hover:opacity-90 transform hover:translate-y-[-1px] shadow-sm",children:"Sohbet Oluştur"})]})})}function CL({onClose:e}){return w.jsx(Gn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"md",rounded:!0,onClick:e,className:"absolute top-2 right-2",children:w.jsx(De.X,{className:"size-5"})})}function kL({image_url:e,name:t,size:n="size-9"}){return e?w.jsx("img",{src:e,alt:t,className:Ne("rounded-md",n)}):w.jsx("div",{className:"flex items-center justify-center gap-1",children:w.jsx(De.Website,{className:Ne("text-slate-500",n)})})}function _L(){const e=Mm(),t=y.useCallback(()=>{const n=window.location.pathname;n!==e.page&&e.setPage(n)},[e.page]);return CS("popstate",t),null}function PL(){const e=Vi(),t=Mm(),n=y.useCallback(()=>{const r=window.location.pathname;if(r!==t.page){if(e){e.emit(Dn.PageChange,{page:r});return}t.setPage(r)}},[e,t.page]);return CS("popstate",n),y.useEffect(()=>{if(!e)return;const r=pL(),i=hL();r!==i&&(e.emit(Dn.PageChange,{page:i}),t.setPage(i))},[e]),null}function AL({children:e}){const t=nr(),{widget:n}=tn();return n?w.jsx(ji,{children:w.jsxs(Re.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},transition:{duration:.3,ease:"easeOut"},className:"h-full w-full relative overflow-hidden",children:[w.jsx(Re.div,{initial:{opacity:.8},animate:{opacity:1},transition:{duration:.2},style:{background:t.getColor(K.GreeterTopBackground)},className:"h-44 absolute top-0 left-0 w-full rounded-t-xl flex flex-col items-center justify-center shadow-sm"}),e]})}):null}function RL(){return _L(),null}const Cf=(e,t)=>{var n;return(n=e.find(r=>r.type===t))==null?void 0:n.content};function OL(){var c,d,h,m,x,b;const e=nr(),{widget:t,setOpen:n}=tn(),[r,i]=y.useState(!0),s=hm(),o=pm();if(!t)return null;const a=()=>{n(!1)};if(y.useEffect(()=>{pN(t.client_id).then(([p,g])=>{xp(g)&&s.push("chat")}).finally(()=>{i(!1)})},[]),r)return null;const l=Cf(((d=(c=t.appearance)==null?void 0:c.head)==null?void 0:d.elements)||[],"text"),u=Cf(((m=(h=t.appearance)==null?void 0:h.head)==null?void 0:m.elements)||[],"title"),f=Cf(((b=(x=t.appearance)==null?void 0:x.head)==null?void 0:b.elements)||[],"logo");return w.jsxs(AL,{children:[w.jsxs("div",{className:"relative flex flex-col gap-3 items-center justify-center h-44",children:[o&&w.jsx(CL,{onClose:a}),f&&w.jsx(Re.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},transition:{delay:.1,duration:.2},children:w.jsx(kL,{name:t.name,image_url:f,size:"size-20"})}),u&&w.jsx(Re.div,{initial:{y:5,opacity:0},animate:{y:0,opacity:1},transition:{delay:.15,duration:.2},style:{color:e.getColor(K.GreeterTopText)},className:"text-white text-xl font-bold",children:u}),l&&w.jsx(Re.div,{initial:{y:5,opacity:0},animate:{y:0,opacity:1},transition:{delay:.2,duration:.2},style:{color:e.getColor(K.GreeterTopText)},className:"text-white text-sm opacity-90",children:l})]}),w.jsx(Re.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.25,duration:.2},className:"overflow-y-auto",style:{height:"calc(100% - 11rem)"},children:w.jsx(EL,{clientId:t.client_id,widgetId:t.link_id,appearance:t.appearance,onOk:()=>{s.push("chat")}})})]})}function jL(){return w.jsxs(w.Fragment,{children:[w.jsx(_S,{border:!0,children:w.jsx(OL,{})}),w.jsx(RL,{})]})}const NL=[{path:"/",component:jL,name:"registration"}];var ii=(e=>(e.Open="open",e.Closed="closed",e.Pending="pending",e.Deleted="deleted",e.Created="created",e))(ii||{}),wT=(e=>(e.AdminJoin="admin_join",e))(wT||{}),et=(e=>(e.Customer="customer",e.User="user",e.System="system",e.Activity="activity",e))(et||{});function ML({name:e,avatar:t,className:n="text-neutral-500"}){return w.jsxs(Re.div,{initial:{opacity:.8},animate:{opacity:1},className:"flex gap-2 items-center",children:[w.jsx("div",{className:"min-w-max",children:w.jsxs("span",{children:[t&&w.jsx("img",{className:"size-10 rounded-full border border-white/20 shadow-sm",src:t,"aria-label":e}),!t&&w.jsx("div",{className:"size-10 rounded-full bg-white/20 flex items-center justify-center text-white font-medium",children:e.charAt(0).toUpperCase()})]})}),w.jsx("div",{className:"flex flex-col",children:w.jsx("span",{className:Ne("line-clamp-1 font-medium",n),children:e})})]})}var DL=Object.defineProperty,FL=(e,t,n)=>t in e?DL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kf=(e,t,n)=>(FL(e,typeof t!="symbol"?t+"":t,n),n);let LL=class{constructor(){kf(this,"current",this.detect()),kf(this,"handoffState","pending"),kf(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Vl=new LL;function IL(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function mc(){let e=[],t={addEventListener(n,r,i,s){return n.addEventListener(r,i,s),t.add(()=>n.removeEventListener(r,i,s))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return IL(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,i){let s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:i}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){let r=mc();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let i of e.splice(r,1))i()}},dispose(){for(let n of e.splice(0))n()}};return t}function bT(){let[e]=y.useState(mc);return y.useEffect(()=>()=>e.dispose(),[e]),e}let $r=(e,t)=>{Vl.isServer?y.useEffect(e,t):y.useLayoutEffect(e,t)};function ST(e){let t=y.useRef(e);return $r(()=>{t.current=e},[e]),t}let Kn=function(e){let t=ST(e);return R.useCallback((...n)=>t.current(...n),[t])};function Th(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function gc(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,gc),r}var TT=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(TT||{}),_r=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(_r||{});function ET(){let e=VL();return y.useCallback(t=>$L({mergeRefs:e,...t}),[e])}function $L({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:s=!0,name:o,mergeRefs:a}){a=a??BL;let l=CT(t,e);if(s)return gl(l,n,r,o,a);let u=i??0;if(u&2){let{static:f=!1,...c}=l;if(f)return gl(c,n,r,o,a)}if(u&1){let{unmount:f=!0,...c}=l;return gc(f?0:1,{0(){return null},1(){return gl({...c,hidden:!0,style:{display:"none"}},n,r,o,a)}})}return gl(l,n,r,o,a)}function gl(e,t={},n,r,i){let{as:s=n,children:o,refName:a="ref",...l}=_f(e,["unmount","static"]),u=e.ref!==void 0?{[a]:e.ref}:{},f=typeof o=="function"?o(t):o;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let c={};if(t){let d=!1,h=[];for(let[m,x]of Object.entries(t))typeof x=="boolean"&&(d=!0),x===!0&&h.push(m.replace(/([A-Z])/g,b=>`-${b.toLowerCase()}`));if(d){c["data-headlessui-state"]=h.join(" ");for(let m of h)c[`data-${m}`]=""}}if(s===y.Fragment&&(Object.keys(si(l)).length>0||Object.keys(si(c)).length>0))if(!y.isValidElement(f)||Array.isArray(f)&&f.length>1){if(Object.keys(si(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(si(l)).concat(Object.keys(si(c))).map(d=>` - ${d}`).join(`
105
+ */var We=typeof Symbol=="function"&&Symbol.for,jm=We?Symbol.for("react.element"):60103,Nm=We?Symbol.for("react.portal"):60106,ic=We?Symbol.for("react.fragment"):60107,sc=We?Symbol.for("react.strict_mode"):60108,oc=We?Symbol.for("react.profiler"):60114,ac=We?Symbol.for("react.provider"):60109,lc=We?Symbol.for("react.context"):60110,Mm=We?Symbol.for("react.async_mode"):60111,uc=We?Symbol.for("react.concurrent_mode"):60111,cc=We?Symbol.for("react.forward_ref"):60112,fc=We?Symbol.for("react.suspense"):60113,b5=We?Symbol.for("react.suspense_list"):60120,dc=We?Symbol.for("react.memo"):60115,hc=We?Symbol.for("react.lazy"):60116,S5=We?Symbol.for("react.block"):60121,T5=We?Symbol.for("react.fundamental"):60117,E5=We?Symbol.for("react.responder"):60118,C5=We?Symbol.for("react.scope"):60119;function Vt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case jm:switch(e=e.type,e){case Mm:case uc:case ic:case oc:case sc:case fc:return e;default:switch(e=e&&e.$$typeof,e){case lc:case cc:case hc:case dc:case ac:return e;default:return t}}case Nm:return t}}}function mT(e){return Vt(e)===uc}ue.AsyncMode=Mm;ue.ConcurrentMode=uc;ue.ContextConsumer=lc;ue.ContextProvider=ac;ue.Element=jm;ue.ForwardRef=cc;ue.Fragment=ic;ue.Lazy=hc;ue.Memo=dc;ue.Portal=Nm;ue.Profiler=oc;ue.StrictMode=sc;ue.Suspense=fc;ue.isAsyncMode=function(e){return mT(e)||Vt(e)===Mm};ue.isConcurrentMode=mT;ue.isContextConsumer=function(e){return Vt(e)===lc};ue.isContextProvider=function(e){return Vt(e)===ac};ue.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===jm};ue.isForwardRef=function(e){return Vt(e)===cc};ue.isFragment=function(e){return Vt(e)===ic};ue.isLazy=function(e){return Vt(e)===hc};ue.isMemo=function(e){return Vt(e)===dc};ue.isPortal=function(e){return Vt(e)===Nm};ue.isProfiler=function(e){return Vt(e)===oc};ue.isStrictMode=function(e){return Vt(e)===sc};ue.isSuspense=function(e){return Vt(e)===fc};ue.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ic||e===uc||e===oc||e===sc||e===fc||e===b5||typeof e=="object"&&e!==null&&(e.$$typeof===hc||e.$$typeof===dc||e.$$typeof===ac||e.$$typeof===lc||e.$$typeof===cc||e.$$typeof===T5||e.$$typeof===E5||e.$$typeof===C5||e.$$typeof===S5)};ue.typeOf=Vt;pT.exports=ue;var k5=pT.exports,gT=k5,_5={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},P5={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},yT={};yT[gT.ForwardRef]=_5;yT[gT.Memo]=P5;function ze(){return ze=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ze.apply(this,arguments)}function vT(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var pc=y.createContext(void 0);pc.displayName="FormikContext";pc.Provider;pc.Consumer;function A5(){var e=y.useContext(pc);return e}var on=function(t){return typeof t=="function"},mc=function(t){return t!==null&&typeof t=="object"},R5=function(t){return String(Math.floor(Number(t)))===t},Ef=function(t){return Object.prototype.toString.call(t)==="[object String]"},Cf=function(t){return mc(t)&&on(t.then)};function Rt(e,t,n,r){r===void 0&&(r=0);for(var i=hT(t);e&&r<i.length;)e=e[i[r++]];return r!==i.length&&!e||e===void 0?n:e}function Ci(e,t,n){for(var r=kv(e),i=r,s=0,o=hT(t);s<o.length-1;s++){var a=o[s],l=Rt(e,o.slice(0,s+1));if(l&&(mc(l)||Array.isArray(l)))i=i[a]=kv(l);else{var u=o[s+1];i=i[a]=R5(u)&&Number(u)>=0?[]:{}}}return(s===0?e:i)[o[s]]===n?e:(n===void 0?delete i[o[s]]:i[o[s]]=n,s===0&&n===void 0&&delete r[o[s]],r)}function xT(e,t,n,r){n===void 0&&(n=new WeakMap),r===void 0&&(r={});for(var i=0,s=Object.keys(e);i<s.length;i++){var o=s[i],a=e[o];mc(a)?n.get(a)||(n.set(a,!0),r[o]=Array.isArray(a)?[]:{},xT(a,t,n,r[o])):r[o]=t}return r}function O5(e,t){switch(t.type){case"SET_VALUES":return ze({},e,{values:t.payload});case"SET_TOUCHED":return ze({},e,{touched:t.payload});case"SET_ERRORS":return ri(e.errors,t.payload)?e:ze({},e,{errors:t.payload});case"SET_STATUS":return ze({},e,{status:t.payload});case"SET_ISSUBMITTING":return ze({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return ze({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return ze({},e,{values:Ci(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return ze({},e,{touched:Ci(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return ze({},e,{errors:Ci(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return ze({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return ze({},e,{touched:xT(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":return ze({},e,{isSubmitting:!1});case"SUBMIT_SUCCESS":return ze({},e,{isSubmitting:!1});default:return e}}var Jr={},ml={};function j5(e){var t=e.validateOnChange,n=t===void 0?!0:t,r=e.validateOnBlur,i=r===void 0?!0:r,s=e.validateOnMount,o=s===void 0?!1:s,a=e.isInitialValid,l=e.enableReinitialize,u=l===void 0?!1:l,f=e.onSubmit,c=vT(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),d=ze({validateOnChange:n,validateOnBlur:i,validateOnMount:o,onSubmit:f},c),h=y.useRef(d.initialValues),m=y.useRef(d.initialErrors||Jr),v=y.useRef(d.initialTouched||ml),b=y.useRef(d.initialStatus),p=y.useRef(!1),g=y.useRef({});y.useEffect(function(){return p.current=!0,function(){p.current=!1}},[]);var x=y.useState(0),E=x[1],S=y.useRef({values:pl(d.initialValues),errors:pl(d.initialErrors)||Jr,touched:pl(d.initialTouched)||ml,status:pl(d.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),C=S.current,k=y.useCallback(function(_){var M=S.current;S.current=O5(M,_),M!==S.current&&E(function($){return $+1})},[]),P=y.useCallback(function(_,M){return new Promise(function($,z){var G=d.validate(_,M);G==null?$(Jr):Cf(G)?G.then(function(oe){$(oe||Jr)},function(oe){z(oe)}):$(G)})},[d.validate]),j=y.useCallback(function(_,M){var $=d.validationSchema,z=on($)?$(M):$,G=M&&z.validateAt?z.validateAt(M,_):M5(_,z);return new Promise(function(oe,_e){G.then(function(){oe(Jr)},function(_t){_t.name==="ValidationError"?oe(N5(_t)):_e(_t)})})},[d.validationSchema]),N=y.useCallback(function(_,M){return new Promise(function($){return $(g.current[_].validate(M))})},[]),I=y.useCallback(function(_){var M=Object.keys(g.current).filter(function(z){return on(g.current[z].validate)}),$=M.length>0?M.map(function(z){return N(z,Rt(_,z))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all($).then(function(z){return z.reduce(function(G,oe,_e){return oe==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||oe&&(G=Ci(G,M[_e],oe)),G},{})})},[N]),re=y.useCallback(function(_){return Promise.all([I(_),d.validationSchema?j(_):{},d.validate?P(_):{}]).then(function(M){var $=M[0],z=M[1],G=M[2],oe=yh.all([$,z,G],{arrayMerge:D5});return oe})},[d.validate,d.validationSchema,I,P,j]),ie=Ut(function(_){return _===void 0&&(_=C.values),k({type:"SET_ISVALIDATING",payload:!0}),re(_).then(function(M){return p.current&&(k({type:"SET_ISVALIDATING",payload:!1}),k({type:"SET_ERRORS",payload:M})),M})});y.useEffect(function(){o&&p.current===!0&&ri(h.current,d.initialValues)&&ie(h.current)},[o,ie]);var xe=y.useCallback(function(_){var M=_&&_.values?_.values:h.current,$=_&&_.errors?_.errors:m.current?m.current:d.initialErrors||{},z=_&&_.touched?_.touched:v.current?v.current:d.initialTouched||{},G=_&&_.status?_.status:b.current?b.current:d.initialStatus;h.current=M,m.current=$,v.current=z,b.current=G;var oe=function(){k({type:"RESET_FORM",payload:{isSubmitting:!!_&&!!_.isSubmitting,errors:$,touched:z,status:G,values:M,isValidating:!!_&&!!_.isValidating,submitCount:_&&_.submitCount&&typeof _.submitCount=="number"?_.submitCount:0}})};if(d.onReset){var _e=d.onReset(C.values,Da);Cf(_e)?_e.then(oe):oe()}else oe()},[d.initialErrors,d.initialStatus,d.initialTouched,d.onReset]);y.useEffect(function(){p.current===!0&&!ri(h.current,d.initialValues)&&u&&(h.current=d.initialValues,xe(),o&&ie(h.current))},[u,d.initialValues,xe,o,ie]),y.useEffect(function(){u&&p.current===!0&&!ri(m.current,d.initialErrors)&&(m.current=d.initialErrors||Jr,k({type:"SET_ERRORS",payload:d.initialErrors||Jr}))},[u,d.initialErrors]),y.useEffect(function(){u&&p.current===!0&&!ri(v.current,d.initialTouched)&&(v.current=d.initialTouched||ml,k({type:"SET_TOUCHED",payload:d.initialTouched||ml}))},[u,d.initialTouched]),y.useEffect(function(){u&&p.current===!0&&!ri(b.current,d.initialStatus)&&(b.current=d.initialStatus,k({type:"SET_STATUS",payload:d.initialStatus}))},[u,d.initialStatus,d.initialTouched]);var Oe=Ut(function(_){if(g.current[_]&&on(g.current[_].validate)){var M=Rt(C.values,_),$=g.current[_].validate(M);return Cf($)?(k({type:"SET_ISVALIDATING",payload:!0}),$.then(function(z){return z}).then(function(z){k({type:"SET_FIELD_ERROR",payload:{field:_,value:z}}),k({type:"SET_ISVALIDATING",payload:!1})})):(k({type:"SET_FIELD_ERROR",payload:{field:_,value:$}}),Promise.resolve($))}else if(d.validationSchema)return k({type:"SET_ISVALIDATING",payload:!0}),j(C.values,_).then(function(z){return z}).then(function(z){k({type:"SET_FIELD_ERROR",payload:{field:_,value:Rt(z,_)}}),k({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),Q=y.useCallback(function(_,M){var $=M.validate;g.current[_]={validate:$}},[]),ne=y.useCallback(function(_){delete g.current[_]},[]),O=Ut(function(_,M){k({type:"SET_TOUCHED",payload:_});var $=M===void 0?i:M;return $?ie(C.values):Promise.resolve()}),L=y.useCallback(function(_){k({type:"SET_ERRORS",payload:_})},[]),B=Ut(function(_,M){var $=on(_)?_(C.values):_;k({type:"SET_VALUES",payload:$});var z=M===void 0?n:M;return z?ie($):Promise.resolve()}),V=y.useCallback(function(_,M){k({type:"SET_FIELD_ERROR",payload:{field:_,value:M}})},[]),H=Ut(function(_,M,$){k({type:"SET_FIELD_VALUE",payload:{field:_,value:M}});var z=$===void 0?n:$;return z?ie(Ci(C.values,_,M)):Promise.resolve()}),q=y.useCallback(function(_,M){var $=M,z=_,G;if(!Ef(_)){_.persist&&_.persist();var oe=_.target?_.target:_.currentTarget,_e=oe.type,_t=oe.name,yn=oe.id,Gi=oe.value,sr=oe.checked,Bm=oe.outerHTML,Ia=oe.options,$a=oe.multiple;$=M||_t||yn,z=/number|range/.test(_e)?(G=parseFloat(Gi),isNaN(G)?"":G):/checkbox/.test(_e)?L5(Rt(C.values,$),sr,Gi):Ia&&$a?F5(Ia):Gi}$&&H($,z)},[H,C.values]),ce=Ut(function(_){if(Ef(_))return function(M){return q(M,_)};q(_)}),ye=Ut(function(_,M,$){M===void 0&&(M=!0),k({type:"SET_FIELD_TOUCHED",payload:{field:_,value:M}});var z=$===void 0?i:$;return z?ie(C.values):Promise.resolve()}),J=y.useCallback(function(_,M){_.persist&&_.persist();var $=_.target,z=$.name,G=$.id,oe=$.outerHTML,_e=M||z||G;ye(_e,!0)},[ye]),Ve=Ut(function(_){if(Ef(_))return function(M){return J(M,_)};J(_)}),pt=y.useCallback(function(_){on(_)?k({type:"SET_FORMIK_STATE",payload:_}):k({type:"SET_FORMIK_STATE",payload:function(){return _}})},[]),mt=y.useCallback(function(_){k({type:"SET_STATUS",payload:_})},[]),ir=y.useCallback(function(_){k({type:"SET_ISSUBMITTING",payload:_})},[]),to=Ut(function(){return k({type:"SUBMIT_ATTEMPT"}),ie().then(function(_){var M=_ instanceof Error,$=!M&&Object.keys(_).length===0;if($){var z;try{if(z=no(),z===void 0)return}catch(G){throw G}return Promise.resolve(z).then(function(G){return p.current&&k({type:"SUBMIT_SUCCESS"}),G}).catch(function(G){if(p.current)throw k({type:"SUBMIT_FAILURE"}),G})}else if(p.current&&(k({type:"SUBMIT_FAILURE"}),M))throw _})}),Ma=Ut(function(_){_&&_.preventDefault&&on(_.preventDefault)&&_.preventDefault(),_&&_.stopPropagation&&on(_.stopPropagation)&&_.stopPropagation(),to().catch(function(M){console.warn("Warning: An unhandled error was caught from submitForm()",M)})}),Da={resetForm:xe,validateForm:ie,validateField:Oe,setErrors:L,setFieldError:V,setFieldTouched:ye,setFieldValue:H,setStatus:mt,setSubmitting:ir,setTouched:O,setValues:B,setFormikState:pt,submitForm:to},no=Ut(function(){return f(C.values,Da)}),bc=Ut(function(_){_&&_.preventDefault&&on(_.preventDefault)&&_.preventDefault(),_&&_.stopPropagation&&on(_.stopPropagation)&&_.stopPropagation(),xe()}),Fa=y.useCallback(function(_){return{value:Rt(C.values,_),error:Rt(C.errors,_),touched:!!Rt(C.touched,_),initialValue:Rt(h.current,_),initialTouched:!!Rt(v.current,_),initialError:Rt(m.current,_)}},[C.errors,C.touched,C.values]),Yr=y.useCallback(function(_){return{setValue:function($,z){return H(_,$,z)},setTouched:function($,z){return ye(_,$,z)},setError:function($){return V(_,$)}}},[H,ye,V]),La=y.useCallback(function(_){var M=mc(_),$=M?_.name:_,z=Rt(C.values,$),G={name:$,value:z,onChange:ce,onBlur:Ve};if(M){var oe=_.type,_e=_.value,_t=_.as,yn=_.multiple;oe==="checkbox"?_e===void 0?G.checked=!!z:(G.checked=!!(Array.isArray(z)&&~z.indexOf(_e)),G.value=_e):oe==="radio"?(G.checked=z===_e,G.value=_e):_t==="select"&&yn&&(G.value=G.value||[],G.multiple=!0)}return G},[Ve,ce,C.values]),kt=y.useMemo(function(){return!ri(h.current,C.values)},[h.current,C.values]),Sc=y.useMemo(function(){return typeof a<"u"?kt?C.errors&&Object.keys(C.errors).length===0:a!==!1&&on(a)?a(d):a:C.errors&&Object.keys(C.errors).length===0},[a,kt,C.errors,d]),Tc=ze({},C,{initialValues:h.current,initialErrors:m.current,initialTouched:v.current,initialStatus:b.current,handleBlur:Ve,handleChange:ce,handleReset:bc,handleSubmit:Ma,resetForm:xe,setErrors:L,setFormikState:pt,setFieldTouched:ye,setFieldValue:H,setFieldError:V,setStatus:mt,setSubmitting:ir,setTouched:O,setValues:B,submitForm:to,validateForm:ie,validateField:Oe,isValid:Sc,dirty:kt,unregisterField:ne,registerField:Q,getFieldProps:La,getFieldMeta:Fa,getFieldHelpers:Yr,validateOnBlur:i,validateOnChange:n,validateOnMount:o});return Tc}function N5(e){var t={};if(e.inner){if(e.inner.length===0)return Ci(t,e.path,e.message);for(var i=e.inner,n=Array.isArray(i),r=0,i=n?i:i[Symbol.iterator]();;){var s;if(n){if(r>=i.length)break;s=i[r++]}else{if(r=i.next(),r.done)break;s=r.value}var o=s;Rt(t,o.path)||(t=Ci(t,o.path,o.message))}}return t}function M5(e,t,n,r){n===void 0&&(n=!1);var i=Th(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:i})}function Th(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);Array.isArray(e[r])===!0?t[r]=e[r].map(function(i){return Array.isArray(i)===!0||nv(i)?Th(i):i!==""?i:void 0}):nv(e[r])?t[r]=Th(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function D5(e,t,n){var r=e.slice();return t.forEach(function(s,o){if(typeof r[o]>"u"){var a=n.clone!==!1,l=a&&n.isMergeableObject(s);r[o]=l?yh(Array.isArray(s)?[]:{},s,n):s}else n.isMergeableObject(s)?r[o]=yh(e[o],s,n):e.indexOf(s)===-1&&r.push(s)}),r}function F5(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function L5(e,t,n){if(typeof e=="boolean")return!!t;var r=[],i=!1,s=-1;if(Array.isArray(e))r=e,s=e.indexOf(n),i=s>=0;else if(!n||n=="true"||n=="false")return!!t;return t&&n&&!i?r.concat(n):i?r.slice(0,s).concat(r.slice(s+1)):r}var I5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?y.useLayoutEffect:y.useEffect;function Ut(e){var t=y.useRef(e);return I5(function(){t.current=e}),y.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current.apply(void 0,r)},[])}var $5=y.forwardRef(function(e,t){var n=e.action,r=vT(e,["action"]),i=n??"#",s=A5(),o=s.handleReset,a=s.handleSubmit;return y.createElement("form",ze({onSubmit:a,ref:t,onReset:o,action:i},r))});$5.displayName="Form";const wT=({init:e,schema:t,action:n})=>j5({initialValues:e,validationSchema:t,validateOnBlur:!1,enableReinitialize:!0,validateOnChange:!1,validateOnMount:!1,onSubmit:r=>{n(r)}});function V5(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const B5=e=>{switch(e){case"success":return H5;case"info":return K5;case"warning":return W5;case"error":return q5;default:return null}},z5=Array(12).fill(0),U5=({visible:e,className:t})=>R.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},R.createElement("div",{className:"sonner-spinner"},z5.map((n,r)=>R.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),H5=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"})),W5=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",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"})),K5=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"})),q5=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"})),G5=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"})),Q5=()=>{const[e,t]=R.useState(document.hidden);return R.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Eh=1;class Y5{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,s=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Eh++,o=this.toasts.find(l=>l.id===s),a=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),o?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...t,id:s,title:r}),{...l,...t,id:s,dismissible:a,title:r}):l):this.addToast({title:r,...i,dismissible:a,id:s}),s},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0}))),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,o;const a=i.then(async u=>{if(o=["resolve",u],R.isValidElement(u))s=!1,this.create({id:r,type:"default",message:u});else if(Z5(u)&&!u.ok){s=!1;const c=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,d=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,h=typeof c=="object"?c:{message:c};this.create({id:r,type:"error",description:d,...h})}else if(u instanceof Error){s=!1;const c=typeof n.error=="function"?await n.error(u):n.error,d=typeof n.description=="function"?await n.description(u):n.description,h=typeof c=="object"?c:{message:c};this.create({id:r,type:"error",description:d,...h})}else if(n.success!==void 0){s=!1;const c=typeof n.success=="function"?await n.success(u):n.success,d=typeof n.description=="function"?await n.description(u):n.description,h=typeof c=="object"?c:{message:c};this.create({id:r,type:"success",description:d,...h})}}).catch(async u=>{if(o=["reject",u],n.error!==void 0){s=!1;const f=typeof n.error=="function"?await n.error(u):n.error,c=typeof n.description=="function"?await n.description(u):n.description,d=typeof f=="object"?f:{message:f};this.create({id:r,type:"error",description:c,...d})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((u,f)=>a.then(()=>o[0]==="reject"?f(o[1]):u(o[1])).catch(f));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||Eh++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const xt=new Y5,X5=(e,t)=>{const n=(t==null?void 0:t.id)||Eh++;return xt.addToast({title:e,...t,id:n}),n},Z5=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",J5=X5,eL=()=>xt.toasts,tL=()=>xt.getActiveToasts(),Av=Object.assign(J5,{success:xt.success,info:xt.info,warning:xt.warning,error:xt.error,custom:xt.custom,message:xt.message,promise:xt.promise,dismiss:xt.dismiss,loading:xt.loading},{getHistory:eL,getToasts:tL});V5("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}[data-sonner-toaster][data-lifted=true]{transform:translateY(-8px)}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function gl(e){return e.label!==void 0}const nL=3,rL="24px",iL="16px",Rv=4e3,sL=356,oL=14,aL=45,lL=200;function xn(...e){return e.filter(Boolean).join(" ")}function uL(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const cL=e=>{var t,n,r,i,s,o,a,l,u;const{invert:f,toast:c,unstyled:d,interacting:h,setHeights:m,visibleToasts:v,heights:b,index:p,toasts:g,expanded:x,removeToast:E,defaultRichColors:S,closeButton:C,style:k,cancelButtonStyle:P,actionButtonStyle:j,className:N="",descriptionClassName:I="",duration:re,position:ie,gap:xe,expandByDefault:Oe,classNames:Q,icons:ne,closeButtonAriaLabel:O="Close toast"}=e,[L,B]=R.useState(null),[V,H]=R.useState(null),[q,ce]=R.useState(!1),[ye,J]=R.useState(!1),[Ve,pt]=R.useState(!1),[mt,ir]=R.useState(!1),[to,Ma]=R.useState(!1),[Da,no]=R.useState(0),[bc,Fa]=R.useState(0),Yr=R.useRef(c.duration||re||Rv),La=R.useRef(null),kt=R.useRef(null),Sc=p===0,Tc=p+1<=v,_=c.type,M=c.dismissible!==!1,$=c.className||"",z=c.descriptionClassName||"",G=R.useMemo(()=>b.findIndex(Y=>Y.toastId===c.id)||0,[b,c.id]),oe=R.useMemo(()=>{var Y;return(Y=c.closeButton)!=null?Y:C},[c.closeButton,C]),_e=R.useMemo(()=>c.duration||re||Rv,[c.duration,re]),_t=R.useRef(0),yn=R.useRef(0),Gi=R.useRef(0),sr=R.useRef(null),[Bm,Ia]=ie.split("-"),$a=R.useMemo(()=>b.reduce((Y,Be,Xe)=>Xe>=G?Y:Y+Be.height,0),[b,G]),zm=Q5(),$T=c.invert||f,Ec=_==="loading";yn.current=R.useMemo(()=>G*xe+$a,[G,$a]),R.useEffect(()=>{Yr.current=_e},[_e]),R.useEffect(()=>{ce(!0)},[]),R.useEffect(()=>{const Y=kt.current;if(Y){const Be=Y.getBoundingClientRect().height;return Fa(Be),m(Xe=>[{toastId:c.id,height:Be,position:c.position},...Xe]),()=>m(Xe=>Xe.filter(Pt=>Pt.toastId!==c.id))}},[m,c.id]),R.useLayoutEffect(()=>{if(!q)return;const Y=kt.current,Be=Y.style.height;Y.style.height="auto";const Xe=Y.getBoundingClientRect().height;Y.style.height=Be,Fa(Xe),m(Pt=>Pt.find(Ke=>Ke.toastId===c.id)?Pt.map(Ke=>Ke.toastId===c.id?{...Ke,height:Xe}:Ke):[{toastId:c.id,height:Xe,position:c.position},...Pt])},[q,c.title,c.description,m,c.id]);const or=R.useCallback(()=>{J(!0),no(yn.current),m(Y=>Y.filter(Be=>Be.toastId!==c.id)),setTimeout(()=>{E(c)},lL)},[c,E,m,yn]);R.useEffect(()=>{if(c.promise&&_==="loading"||c.duration===1/0||c.type==="loading")return;let Y;return x||h||zm?(()=>{if(Gi.current<_t.current){const Pt=new Date().getTime()-_t.current;Yr.current=Yr.current-Pt}Gi.current=new Date().getTime()})():(()=>{Yr.current!==1/0&&(_t.current=new Date().getTime(),Y=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),or()},Yr.current))})(),()=>clearTimeout(Y)},[x,h,c,_,zm,or]),R.useEffect(()=>{c.delete&&or()},[or,c.delete]);function VT(){var Y;if(ne!=null&&ne.loading){var Be;return R.createElement("div",{className:xn(Q==null?void 0:Q.loader,c==null||(Be=c.classNames)==null?void 0:Be.loader,"sonner-loader"),"data-visible":_==="loading"},ne.loading)}return R.createElement(U5,{className:xn(Q==null?void 0:Q.loader,c==null||(Y=c.classNames)==null?void 0:Y.loader),visible:_==="loading"})}var Um,Hm;return R.createElement("li",{tabIndex:0,ref:kt,className:xn(N,$,Q==null?void 0:Q.toast,c==null||(t=c.classNames)==null?void 0:t.toast,Q==null?void 0:Q.default,Q==null?void 0:Q[_],c==null||(n=c.classNames)==null?void 0:n[_]),"data-sonner-toast":"","data-rich-colors":(Um=c.richColors)!=null?Um:S,"data-styled":!(c.jsx||c.unstyled||d),"data-mounted":q,"data-promise":!!c.promise,"data-swiped":to,"data-removed":ye,"data-visible":Tc,"data-y-position":Bm,"data-x-position":Ia,"data-index":p,"data-front":Sc,"data-swiping":Ve,"data-dismissible":M,"data-type":_,"data-invert":$T,"data-swipe-out":mt,"data-swipe-direction":V,"data-expanded":!!(x||Oe&&q),style:{"--index":p,"--toasts-before":p,"--z-index":g.length-p,"--offset":`${ye?Da:yn.current}px`,"--initial-height":Oe?"auto":`${bc}px`,...k,...c.style},onDragEnd:()=>{pt(!1),B(null),sr.current=null},onPointerDown:Y=>{Ec||!M||(La.current=new Date,no(yn.current),Y.target.setPointerCapture(Y.pointerId),Y.target.tagName!=="BUTTON"&&(pt(!0),sr.current={x:Y.clientX,y:Y.clientY}))},onPointerUp:()=>{var Y,Be,Xe;if(mt||!M)return;sr.current=null;const Pt=Number(((Y=kt.current)==null?void 0:Y.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Va=Number(((Be=kt.current)==null?void 0:Be.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ke=new Date().getTime()-((Xe=La.current)==null?void 0:Xe.getTime()),Bt=L==="x"?Pt:Va,Ba=Math.abs(Bt)/Ke;if(Math.abs(Bt)>=aL||Ba>.11){no(yn.current),c.onDismiss==null||c.onDismiss.call(c,c),H(L==="x"?Pt>0?"right":"left":Va>0?"down":"up"),or(),ir(!0);return}else{var nn,rn;(nn=kt.current)==null||nn.style.setProperty("--swipe-amount-x","0px"),(rn=kt.current)==null||rn.style.setProperty("--swipe-amount-y","0px")}Ma(!1),pt(!1),B(null)},onPointerMove:Y=>{var Be,Xe,Pt;if(!sr.current||!M||((Be=window.getSelection())==null?void 0:Be.toString().length)>0)return;const Ke=Y.clientY-sr.current.y,Bt=Y.clientX-sr.current.x;var Ba;const nn=(Ba=e.swipeDirections)!=null?Ba:uL(ie);!L&&(Math.abs(Bt)>1||Math.abs(Ke)>1)&&B(Math.abs(Bt)>Math.abs(Ke)?"x":"y");let rn={x:0,y:0};const Wm=Xr=>1/(1.5+Math.abs(Xr)/20);if(L==="y"){if(nn.includes("top")||nn.includes("bottom"))if(nn.includes("top")&&Ke<0||nn.includes("bottom")&&Ke>0)rn.y=Ke;else{const Xr=Ke*Wm(Ke);rn.y=Math.abs(Xr)<Math.abs(Ke)?Xr:Ke}}else if(L==="x"&&(nn.includes("left")||nn.includes("right")))if(nn.includes("left")&&Bt<0||nn.includes("right")&&Bt>0)rn.x=Bt;else{const Xr=Bt*Wm(Bt);rn.x=Math.abs(Xr)<Math.abs(Bt)?Xr:Bt}(Math.abs(rn.x)>0||Math.abs(rn.y)>0)&&Ma(!0),(Xe=kt.current)==null||Xe.style.setProperty("--swipe-amount-x",`${rn.x}px`),(Pt=kt.current)==null||Pt.style.setProperty("--swipe-amount-y",`${rn.y}px`)}},oe&&!c.jsx&&_!=="loading"?R.createElement("button",{"aria-label":O,"data-disabled":Ec,"data-close-button":!0,onClick:Ec||!M?()=>{}:()=>{or(),c.onDismiss==null||c.onDismiss.call(c,c)},className:xn(Q==null?void 0:Q.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(Hm=ne==null?void 0:ne.close)!=null?Hm:G5):null,_||c.icon||c.promise?R.createElement("div",{"data-icon":"",className:xn(Q==null?void 0:Q.icon,c==null||(i=c.classNames)==null?void 0:i.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||VT():null,c.type!=="loading"?c.icon||(ne==null?void 0:ne[_])||B5(_):null):null,R.createElement("div",{"data-content":"",className:xn(Q==null?void 0:Q.content,c==null||(s=c.classNames)==null?void 0:s.content)},R.createElement("div",{"data-title":"",className:xn(Q==null?void 0:Q.title,c==null||(o=c.classNames)==null?void 0:o.title)},c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title),c.description?R.createElement("div",{"data-description":"",className:xn(I,z,Q==null?void 0:Q.description,c==null||(a=c.classNames)==null?void 0:a.description)},typeof c.description=="function"?c.description():c.description):null),R.isValidElement(c.cancel)?c.cancel:c.cancel&&gl(c.cancel)?R.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||P,onClick:Y=>{gl(c.cancel)&&M&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,Y),or())},className:xn(Q==null?void 0:Q.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,R.isValidElement(c.action)?c.action:c.action&&gl(c.action)?R.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||j,onClick:Y=>{gl(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,Y),!Y.defaultPrevented&&or())},className:xn(Q==null?void 0:Q.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function Ov(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function fL(e,t){const n={};return[e,t].forEach((r,i)=>{const s=i===1,o=s?"--mobile-offset":"--offset",a=s?iL:rL;function l(u){["top","right","bottom","left"].forEach(f=>{n[`${o}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${o}-${u}`]=a:n[`${o}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(a)}),n}const dL=R.forwardRef(function(t,n){const{invert:r,position:i="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:a,className:l,offset:u,mobileOffset:f,theme:c="light",richColors:d,duration:h,style:m,visibleToasts:v=nL,toastOptions:b,dir:p=Ov(),gap:g=oL,icons:x,containerAriaLabel:E="Notifications"}=t,[S,C]=R.useState([]),k=R.useMemo(()=>Array.from(new Set([i].concat(S.filter(V=>V.position).map(V=>V.position)))),[S,i]),[P,j]=R.useState([]),[N,I]=R.useState(!1),[re,ie]=R.useState(!1),[xe,Oe]=R.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Q=R.useRef(null),ne=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),O=R.useRef(null),L=R.useRef(!1),B=R.useCallback(V=>{C(H=>{var q;return(q=H.find(ce=>ce.id===V.id))!=null&&q.delete||xt.dismiss(V.id),H.filter(({id:ce})=>ce!==V.id)})},[]);return R.useEffect(()=>xt.subscribe(V=>{if(V.dismiss){const H=S.map(q=>q.id===V.id?{...q,delete:!0}:q);requestAnimationFrame(()=>{C(H)});return}setTimeout(()=>{pk.flushSync(()=>{C(H=>{const q=H.findIndex(ce=>ce.id===V.id);return q!==-1?[...H.slice(0,q),{...H[q],...V},...H.slice(q+1)]:[V,...H]})})})}),[S]),R.useEffect(()=>{if(c!=="system"){Oe(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Oe("dark"):Oe("light")),typeof window>"u")return;const V=window.matchMedia("(prefers-color-scheme: dark)");try{V.addEventListener("change",({matches:H})=>{Oe(H?"dark":"light")})}catch{V.addListener(({matches:q})=>{try{Oe(q?"dark":"light")}catch(ce){console.error(ce)}})}},[c]),R.useEffect(()=>{S.length<=1&&I(!1)},[S]),R.useEffect(()=>{const V=H=>{var q;if(s.every(J=>H[J]||H.code===J)){var ye;I(!0),(ye=Q.current)==null||ye.focus()}H.code==="Escape"&&(document.activeElement===Q.current||(q=Q.current)!=null&&q.contains(document.activeElement))&&I(!1)};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[s]),R.useEffect(()=>{if(Q.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,L.current=!1)}},[Q.current]),R.createElement("section",{ref:n,"aria-label":`${E} ${ne}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},k.map((V,H)=>{var q;const[ce,ye]=V.split("-");return S.length?R.createElement("ol",{key:V,dir:p==="auto"?Ov():p,tabIndex:-1,ref:Q,className:l,"data-sonner-toaster":!0,"data-sonner-theme":xe,"data-y-position":ce,"data-lifted":N&&S.length>1&&!o,"data-x-position":ye,style:{"--front-toast-height":`${((q=P[0])==null?void 0:q.height)||0}px`,"--width":`${sL}px`,"--gap":`${g}px`,...m,...fL(u,f)},onBlur:J=>{L.current&&!J.currentTarget.contains(J.relatedTarget)&&(L.current=!1,O.current&&(O.current.focus({preventScroll:!0}),O.current=null))},onFocus:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||L.current||(L.current=!0,O.current=J.relatedTarget)},onMouseEnter:()=>I(!0),onMouseMove:()=>I(!0),onMouseLeave:()=>{re||I(!1)},onDragEnd:()=>I(!1),onPointerDown:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||ie(!0)},onPointerUp:()=>ie(!1)},S.filter(J=>!J.position&&H===0||J.position===V).map((J,Ve)=>{var pt,mt;return R.createElement(cL,{key:J.id,icons:x,index:Ve,toast:J,defaultRichColors:d,duration:(pt=b==null?void 0:b.duration)!=null?pt:h,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:r,visibleToasts:v,closeButton:(mt=b==null?void 0:b.closeButton)!=null?mt:a,interacting:re,position:V,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:B,toasts:S.filter(ir=>ir.position==J.position),heights:P.filter(ir=>ir.position==J.position),setHeights:j,expandByDefault:o,gap:g,expanded:N,swipeDirections:t.swipeDirections})})):null}))});function hL(e){return Array.isArray(e)&&e[0].field!==void 0}const bT=(e,t)=>{var n;if(hL(e)){for(const r of e)(n=t==null?void 0:t.form)==null||n.setFieldError(r.field,r.message);return}if(e&&e.message){t!=null&&t.noToast||Av.error(e.message);return}if(e&&e.error){t!=null&&t.noToast||Av.error(e.error);return}};function pL(e,t,n){let r=n;r||(r=Object.keys(e));for(let i of r){if(Array.isArray(e[i])&&Array.isArray(t[i])){if(e[i].length!==t[i].length)return!1;for(let s=0;s<e[i].length;s++)if(e[i][s]!==t[i][s])return!1;continue}if(e[i]!==t[i])return!1}return!0}function Dm({id:e,text:t,className:n,required:r}){return t?w.jsxs("label",{htmlFor:e,className:Ne("mb-1 block text-sm font-medium text-slate-700",n),children:[t,r&&w.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}):null}const kf={sm:"px-3 py-1 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-15"};function mL({id:e,label:t,suffix:n,prefix:r,size:i="md",type:s="text",noMargin:o=!1,required:a=!1,error:l,ariaDescribedBy:u,className:f,ariaInvalid:c,ariaLabel:d,autoFocus:h,...m}){const v=nr();return w.jsxs("div",{className:Ne({"mb-2":!o},f),children:[w.jsx(Dm,{id:e,text:t,required:a}),w.jsxs("div",{className:"flex items-center",children:[r&&w.jsx("span",{className:Ne("inline-block border border-solid border-r-0 border-slate-200 bg-slate-100 rounded-l-md",kf[i],{"border-red-500!":!!l}),children:r}),w.jsx("input",{id:e,className:Ne("text-gray-800 border border-solid rounded-lg block text-base py-2 px-3 w-full border-slate-200 focus:outline-hidden focus:border-custom-500 disabled:bg-slate-100 disabled:border-slate-300 disabled:text-slate-500 placeholder:text-slate-400",kf[i],{"rounded-l-none":!!r,"rounded-r-none":!!n,"border-red-500! text-red-500!":!!l}),type:s,required:a,"aria-describedby":u,"aria-invalid":c,"aria-label":d,style:{color:v.getColor(K.InputText),backgroundColor:v.getColor(K.InputBackground),borderColor:v.getColor(K.InputBorder),borderRadius:v.getRadius()},...m}),n&&w.jsx("span",{className:Ne("inline-block border border-solid border-l-0 border-slate-200 bg-slate-100 rounded-r-md",kf[i],{"border-red-500!":!!l}),children:n})]}),!!l&&w.jsx("p",{className:"mt-1 text-xs text-red-500",children:l})]})}const gL=(e,t)=>{document.cookie=`${e}=${t}`},ST=y.createContext({}),yL=()=>`${window.location.pathname}_$$_${document.title}`,vL=()=>{const e=localStorage.getItem("page");return!e||e===""?"/":e},xL=()=>{const e=localStorage.getItem("p-history");if(!e||e==="")return[];try{return JSON.parse(e)}catch{return[]}};function wL({children:e}){const[t,n]=y.useState("/"),[r,i]=y.useState(xL());function s(){i([]),localStorage.removeItem("p-history")}const o=a=>{n(a),i(l=>[...new Set([...l,a])]),localStorage.setItem("page",a),localStorage.setItem("p-history",JSON.stringify(r))};return w.jsx(ST.Provider,{value:{page:t,setPage:o,history:r,clearHistory:s},children:e})}function Fm(){return y.useContext(ST)}function bL({label:e,id:t,value:n="",className:r,placeholder:i,children:s,required:o,error:a,...l}){return w.jsxs("div",{className:r||"",children:[e&&w.jsx(Dm,{id:t,required:o,text:e}),w.jsx("select",{id:t,"aria-placeholder":i,value:n,"aria-label":e,className:"light forelect transition-colors duration-200 border border-solid text-gray-900 text-sm rounded-md focus:ring-emerald-500 focus-visible:ring-0 focus-visible:shadow-none outline focus-visible:outline-none focus-visible:ber-emerald-500 focus:border-emerald-500 block w-full px-2 py-2 placeholder-fuchsia-600 caret-emer-500",onChange:l.onChange,required:o,...l,children:s}),!!a&&w.jsx("p",{className:"1 texm text-r500",children:a})]})}const jv={ring:{label:"",input:"relative before:content[''] before:absolute before:top-2/4 before:left-2/4 before:block before:h-12 before:w-12 before:-translate-y-2/4 before:-translate-x-2/4 before:rounded-full before:bg-blue-gray-500 before:opacity-0 before:transition-opacity hover:before:opacity-10"},hover:{label:"hover:bg-secondary transition-colors duration-200 px-2 py-1 rounded-md",input:""}},SL={blue:"checked:border-blue-500 checked:bg-blue-500 checked:before:bg-blue-500",indigo:"checked:border-indigo-500 checked:bg-indigo-500 checked:before:bg-indigo-500",green:"checked:border-green-500 checked:bg-green-500 checked:before:bg-green-500",red:"checked:border-red-500 checked:bg-red-500 checked:before:bg-red-500",orange:"checked:border-orange-500 checked:bg-orange-500 checked:before:bg-orange-500"},TL={sm:"h-4 w-4 lg:h-3 lg:w-3",md:"h-6 w-6 lg:h-5 lg:w-5",lg:"h-8 w-8 lg:h-7 lg:w-7"},EL={sm:"h-3 w-3 lg:h-2.5 lg:w-2.5",md:"h-5 w-5 lg:h-4 lg:w-4",lg:"h-7 w-7 lg:h-6 lg:w-6"};function CL({children:e,name:t,required:n,value:r,checked:i,onChange:s,onBlur:o,red:a,id:l=t,size:u="md",effect:f="ring",reversed:c=!1,variant:d="blue",...h}){return w.jsxs("div",{children:[w.jsxs("div",{className:`flex items-center justify-between ${c?"flex-row-reverse":""} ${jv[f].label}`,children:[w.jsxs("label",{className:"disable-highlight relative mr-3 flex cursor-pointer items-center rounded-full",htmlFor:l,children:[w.jsx("input",{id:l,name:t,type:"checkbox",className:`border-gray-200 peer cursor-pointer appearance-none rounded-md border border-solid bg-white transition-all ${SL[d]} ${TL[u]} ${jv[f].input}`,required:n,checked:i,value:r,onChange:m=>s==null?void 0:s(m.target.checked),onBlur:m=>o==null?void 0:o(m.target.checked),...h}),w.jsx("div",{className:"pointer-events-none absolute left-2/4 top-2/4 translate-x-2/4 translate-y-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100",children:w.jsx(De.Check,{className:EL[u]})})]}),w.jsx("label",{className:"disable-highlight mt-px flex grow cursor-pointer select-none items-center justify-between font-light text-gray-800",htmlFor:l,children:e})]}),a&&w.jsx("small",{className:"text-xs text-red-500",children:a})]})}function kL({id:e,value:t,name:n,onChange:r,children:i,disabled:s,className:o}){return w.jsxs("label",{htmlFor:e,className:Ne("relative flex cursor-pointer items-center rounded-md p-2 focus:outline-none",{"opacity-60 cursor-not-allowed":s},o),children:[w.jsx("input",{type:"radio",id:e,name:n,value:e,checked:t,onChange:a=>{r&&r(a.target.checked)},className:"peer h-4 w-4 cursor-pointer appearance-none rounded-full border-2 border-slate-300 transition-all checked:border-[5px] checked:border-indigo-600 focus:ring-0 focus:ring-offset-0",disabled:s}),w.jsx("span",{className:"ml-2 text-sm font-medium text-slate-700",children:i})]})}function _L({id:e,label:t,children:n,required:r,className:i}){return w.jsxs("fieldset",{id:e,className:i,children:[t&&w.jsxs("legend",{className:"mb-1 block text-sm font-medium text-slate-700",children:[t," ",r&&w.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),w.jsx("div",{className:"flex flex-col gap-0 mt-1",children:n})]})}const Nv=Object.assign(kL,{Group:_L});function Lm({id:e,label:t,suffix:n,prefix:r,className:i,noMargin:s,rows:o=3,type:a="text",required:l=!1,error:u,ariaInvalid:f,inputRef:c,autoFocus:d=!0,style:h,...m}){const v=nr();return w.jsxs("div",{className:Ne({"mb-2":!s},i),children:[t&&w.jsx(Dm,{id:e,text:t,required:l}),w.jsx("textarea",{className:Ne("resize-none max-h-36 text-gray-800 w-full py-2 px-3 border border-solid rounded-lg block border-slate-200 focus:outline-hidden focus:border-custom-500 disabled:bg-slate-100 disabled:border-slate-300 disabled:text-slate-500 placeholder:text-slate-400 invalid:border-red-500 invalid:text-red-500",{"border-red-500! text-red-500!":!!u}),id:e,rows:o,"aria-invalid":f,...m,ref:c,autoFocus:d,style:{...h,color:v.getColor(K.InputText),backgroundColor:v.getColor(K.InputBackground),borderColor:v.getColor(K.InputBorder),borderRadius:v.getRadius()}}),!!u&&w.jsx("p",{className:"text-red-500 mt-1 text-xs",children:u})]})}function PL({onOk:e,clientId:t,widgetId:n,appearance:r}){var h,m,v,b,p,g,x,E;const i=nr(),{defaultValues:s}=tn(),o=Fm(),a=gN(),l=(m=(h=r==null?void 0:r.body)==null?void 0:h.inputs)==null?void 0:m.reduce((S,C)=>{const k=C.remember?Il(C.name):void 0;return S[C.name]=k||(s==null?void 0:s[C.name])||"",S},{}),u=(b=(v=r==null?void 0:r.body)==null?void 0:v.inputs)==null?void 0:b.reduce((S,C)=>(S[C.name]="",S),{}),f=Sm((g=(p=r==null?void 0:r.body)==null?void 0:p.inputs)==null?void 0:g.reduce((S,C)=>(S[C.name]=C.required?Cu().required(C.label):Cu(),S),{})),c=wT({init:{...l},schema:f,action:async S=>{var P;const[C,k]=await a.mutateAsync({inputs:S,history:o.history,client_id:t,widget_id:n});if(bp(k)){mN(C)&&(vf(Ti.CustomerToken,C.customer_token),vf(Ti.CustomerRefreshToken,C.customer_refresh_token),vf(Ti.DeviceId,C.device_id)),o.clearHistory();for(const j of((P=r==null?void 0:r.body)==null?void 0:P.inputs)||[])j.remember&&gL(j.name,S[j.name]);e==null||e();return}bT(C,{form:c})}}),d=!pL(u,c.values);return w.jsx("section",{className:"h-full overflow-y-auto px-6 py-5 bg-white",style:{backgroundColor:i.getColor(K.GreeterBackground)},children:w.jsxs("form",{className:"grid grid-cols-1 gap-4",onSubmit:S=>{S.preventDefault(),c.handleSubmit()},children:[(E=(x=r==null?void 0:r.body)==null?void 0:x.inputs)==null?void 0:E.map(S=>{var C,k;if(["text","email","phone"].includes(S.type))return w.jsx(mL,{id:S.name,name:S.name,type:S.type,label:S.label,value:c.values[S.name],onChange:c.handleChange,onBlur:c.handleBlur,autoComplete:"off",placeholder:S.placeholder,error:c.errors[S.name],ariaInvalid:c.errors.name?!0:void 0,required:S.required,noMargin:!0},S.name);if(S.type==="select")return w.jsx(bL,{id:S.name,name:S.name,value:c.values[S.name],onChange:c.handleChange,label:S.label,required:S.required,children:(C=S.options)==null?void 0:C.map(P=>w.jsx("option",{value:P,children:P},P))},S.name);if(S.type==="checkbox")return w.jsx(CL,{id:S.name,name:S.name,value:c.values[S.name],onChange:c.handleChange,required:S.required,children:S.label},S.name);if(S.type==="radio")return w.jsx(Nv.Group,{id:S.name,label:S.label,required:S.required,children:(k=S.options)==null?void 0:k.map(P=>w.jsx(Nv,{onChange:j=>{j?c.setFieldValue(S.name,P):c.setFieldValue(S.name,"")},id:P,name:S.name,value:P===c.values[S.name],children:P},P))},S.name);if(S.type==="textarea")return w.jsx(Lm,{id:S.name,name:S.name,value:c.values[S.name],onChange:c.handleChange,placeholder:S.placeholder,error:c.errors[S.name],required:S.required,label:S.label},S.name)}),w.jsx(Gn,{textKey:K.GreeterButtonText,bgKey:K.GreeterButtonBackground,type:"submit",disabled:!d,className:"mt-3 transition-all duration-300 hover:opacity-90 transform hover:translate-y-[-1px] shadow-sm",children:"Sohbet Oluştur"})]})})}function AL({onClose:e}){return w.jsx(Gn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"md",rounded:!0,onClick:e,className:"absolute top-2 right-2",children:w.jsx(De.X,{className:"size-5"})})}function RL({image_url:e,name:t,size:n="size-9"}){return e?w.jsx("img",{src:e,alt:t,className:Ne("rounded-md",n)}):w.jsx("div",{className:"flex items-center justify-center gap-1",children:w.jsx(De.Website,{className:Ne("text-slate-500",n)})})}function OL(){const e=Fm(),t=y.useCallback(()=>{const n=window.location.pathname;n!==e.page&&e.setPage(n)},[e.page]);return PS("popstate",t),null}function jL(){const e=Bi(),t=Fm(),n=y.useCallback(()=>{const r=window.location.pathname;if(r!==t.page){if(e){e.emit(Dn.PageChange,{page:r});return}t.setPage(r)}},[e,t.page]);return PS("popstate",n),y.useEffect(()=>{if(!e)return;const r=vL(),i=yL();r!==i&&(e.emit(Dn.PageChange,{page:i}),t.setPage(i))},[e]),null}function NL({children:e}){const t=nr(),{widget:n}=tn();return n?w.jsx(Ni,{children:w.jsxs(Re.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},transition:{duration:.3,ease:"easeOut"},className:"h-full w-full relative overflow-hidden",children:[w.jsx(Re.div,{initial:{opacity:.8},animate:{opacity:1},transition:{duration:.2},style:{background:t.getColor(K.GreeterTopBackground)},className:"h-44 absolute top-0 left-0 w-full rounded-t-xl flex flex-col items-center justify-center shadow-sm"}),e]})}):null}function ML(){return OL(),null}const _f=(e,t)=>{var n;return(n=e.find(r=>r.type===t))==null?void 0:n.content};function DL(){var c,d,h,m,v,b;const e=nr(),{widget:t,setOpen:n}=tn(),[r,i]=y.useState(!0),s=mm(),o=gm();if(!t)return null;const a=()=>{n(!1)};if(y.useEffect(()=>{yN(t.client_id).then(([p,g])=>{bp(g)&&s.push("chat")}).finally(()=>{i(!1)})},[]),r)return null;const l=_f(((d=(c=t.appearance)==null?void 0:c.head)==null?void 0:d.elements)||[],"text"),u=_f(((m=(h=t.appearance)==null?void 0:h.head)==null?void 0:m.elements)||[],"title"),f=_f(((b=(v=t.appearance)==null?void 0:v.head)==null?void 0:b.elements)||[],"logo");return w.jsxs(NL,{children:[w.jsxs("div",{className:"relative flex flex-col gap-3 items-center justify-center h-44",children:[o&&w.jsx(AL,{onClose:a}),f&&w.jsx(Re.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},transition:{delay:.1,duration:.2},children:w.jsx(RL,{name:t.name,image_url:f,size:"size-20"})}),u&&w.jsx(Re.div,{initial:{y:5,opacity:0},animate:{y:0,opacity:1},transition:{delay:.15,duration:.2},style:{color:e.getColor(K.GreeterTopText)},className:"text-white text-xl font-bold",children:u}),l&&w.jsx(Re.div,{initial:{y:5,opacity:0},animate:{y:0,opacity:1},transition:{delay:.2,duration:.2},style:{color:e.getColor(K.GreeterTopText)},className:"text-white text-sm opacity-90",children:l})]}),w.jsx(Re.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.25,duration:.2},className:"overflow-y-auto",style:{height:"calc(100% - 11rem)"},children:w.jsx(PL,{clientId:t.client_id,widgetId:t.link_id,appearance:t.appearance,onOk:()=>{s.push("chat")}})})]})}function FL(){return w.jsxs(w.Fragment,{children:[w.jsx(RS,{border:!0,children:w.jsx(DL,{})}),w.jsx(ML,{})]})}const LL=[{path:"/",component:FL,name:"registration"}];var ii=(e=>(e.Open="open",e.Closed="closed",e.Pending="pending",e.Deleted="deleted",e.Created="created",e))(ii||{}),TT=(e=>(e.AdminJoin="admin_join",e))(TT||{}),et=(e=>(e.Customer="customer",e.User="user",e.System="system",e.Activity="activity",e))(et||{});function IL({name:e,avatar:t,className:n="text-neutral-500"}){return w.jsxs(Re.div,{initial:{opacity:.8},animate:{opacity:1},className:"flex gap-2 items-center",children:[w.jsx("div",{className:"min-w-max",children:w.jsxs("span",{children:[t&&w.jsx("img",{className:"size-10 rounded-full border border-white/20 shadow-sm",src:t,"aria-label":e}),!t&&w.jsx("div",{className:"size-10 rounded-full bg-white/20 flex items-center justify-center text-white font-medium",children:e.charAt(0).toUpperCase()})]})}),w.jsx("div",{className:"flex flex-col",children:w.jsx("span",{className:Ne("line-clamp-1 font-medium",n),children:e})})]})}var $L=Object.defineProperty,VL=(e,t,n)=>t in e?$L(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pf=(e,t,n)=>(VL(e,typeof t!="symbol"?t+"":t,n),n);let BL=class{constructor(){Pf(this,"current",this.detect()),Pf(this,"handoffState","pending"),Pf(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Bl=new BL;function zL(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function gc(){let e=[],t={addEventListener(n,r,i,s){return n.addEventListener(r,i,s),t.add(()=>n.removeEventListener(r,i,s))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return zL(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,i){let s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:i}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){let r=gc();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let i of e.splice(r,1))i()}},dispose(){for(let n of e.splice(0))n()}};return t}function ET(){let[e]=y.useState(gc);return y.useEffect(()=>()=>e.dispose(),[e]),e}let $r=(e,t)=>{Bl.isServer?y.useEffect(e,t):y.useLayoutEffect(e,t)};function CT(e){let t=y.useRef(e);return $r(()=>{t.current=e},[e]),t}let Kn=function(e){let t=CT(e);return R.useCallback((...n)=>t.current(...n),[t])};function Ch(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function yc(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,yc),r}var kT=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(kT||{}),_r=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(_r||{});function _T(){let e=HL();return y.useCallback(t=>UL({mergeRefs:e,...t}),[e])}function UL({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:s=!0,name:o,mergeRefs:a}){a=a??WL;let l=PT(t,e);if(s)return yl(l,n,r,o,a);let u=i??0;if(u&2){let{static:f=!1,...c}=l;if(f)return yl(c,n,r,o,a)}if(u&1){let{unmount:f=!0,...c}=l;return yc(f?0:1,{0(){return null},1(){return yl({...c,hidden:!0,style:{display:"none"}},n,r,o,a)}})}return yl(l,n,r,o,a)}function yl(e,t={},n,r,i){let{as:s=n,children:o,refName:a="ref",...l}=Af(e,["unmount","static"]),u=e.ref!==void 0?{[a]:e.ref}:{},f=typeof o=="function"?o(t):o;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let c={};if(t){let d=!1,h=[];for(let[m,v]of Object.entries(t))typeof v=="boolean"&&(d=!0),v===!0&&h.push(m.replace(/([A-Z])/g,b=>`-${b.toLowerCase()}`));if(d){c["data-headlessui-state"]=h.join(" ");for(let m of h)c[`data-${m}`]=""}}if(s===y.Fragment&&(Object.keys(si(l)).length>0||Object.keys(si(c)).length>0))if(!y.isValidElement(f)||Array.isArray(f)&&f.length>1){if(Object.keys(si(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(si(l)).concat(Object.keys(si(c))).map(d=>` - ${d}`).join(`
106
106
  `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(d=>` - ${d}`).join(`
107
107
  `)].join(`
108
- `))}else{let d=f.props,h=d==null?void 0:d.className,m=typeof h=="function"?(...p)=>Th(h(...p),l.className):Th(h,l.className),x=m?{className:m}:{},b=CT(f.props,si(_f(l,["ref"])));for(let p in c)p in b&&delete c[p];return y.cloneElement(f,Object.assign({},b,c,u,{ref:i(zL(f),u.ref)},x))}return y.createElement(s,Object.assign({},_f(l,["ref"]),s!==y.Fragment&&u,s!==y.Fragment&&c),f)}function VL(){let e=y.useRef([]),t=y.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function BL(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function CT(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[i=>{var s;return(s=i==null?void 0:i.preventDefault)==null?void 0:s.call(i)}]);for(let r in n)Object.assign(t,{[r](i,...s){let o=n[r];for(let a of o){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;a(i,...s)}}});return t}function Fm(e){var t;return Object.assign(y.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function si(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function _f(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function zL(e){return R.version.split(".")[0]>="19"?e.props.ref:e.ref}let UL=Symbol();function kT(...e){let t=y.useRef(e);y.useEffect(()=>{t.current=e},[e]);let n=Kn(r=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(r):i.current=r)});return e.every(r=>r==null||(r==null?void 0:r[UL]))?void 0:n}function HL(e=0){let[t,n]=y.useState(e),r=y.useCallback(l=>n(l),[t]),i=y.useCallback(l=>n(u=>u|l),[t]),s=y.useCallback(l=>(t&l)===l,[t]),o=y.useCallback(l=>n(u=>u&~l),[n]),a=y.useCallback(l=>n(u=>u^l),[n]);return{flags:t,setFlag:r,addFlag:i,hasFlag:s,removeFlag:o,toggleFlag:a}}var WL={},Ov,jv;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Ov=process==null?void 0:WL)==null?void 0:Ov.NODE_ENV)==="test"&&typeof((jv=Element==null?void 0:Element.prototype)==null?void 0:jv.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
109
- `)),[]});var KL=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(KL||{});function qL(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function GL(e,t,n,r){let[i,s]=y.useState(n),{hasFlag:o,addFlag:a,removeFlag:l}=HL(e&&i?3:0),u=y.useRef(!1),f=y.useRef(!1),c=bT();return $r(()=>{var d;if(e){if(n&&s(!0),!t){n&&a(3);return}return(d=r==null?void 0:r.start)==null||d.call(r,n),QL(t,{inFlight:u,prepare(){f.current?f.current=!1:f.current=u.current,u.current=!0,!f.current&&(n?(a(3),l(4)):(a(4),l(2)))},run(){f.current?n?(l(3),a(4)):(l(4),a(3)):n?l(1):a(1)},done(){var h;f.current&&typeof t.getAnimations=="function"&&t.getAnimations().length>0||(u.current=!1,l(7),n||s(!1),(h=r==null?void 0:r.end)==null||h.call(r,n))}})}},[e,n,t,c]),e?[i,{closed:o(1),enter:o(2),leave:o(4),transition:o(2)||o(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function QL(e,{prepare:t,run:n,done:r,inFlight:i}){let s=mc();return XL(e,{prepare:t,inFlight:i}),s.nextFrame(()=>{n(),s.requestAnimationFrame(()=>{s.add(YL(e,r))})}),s.dispose}function YL(e,t){var n,r;let i=mc();if(!e)return i.dispose;let s=!1;i.add(()=>{s=!0});let o=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(a=>a instanceof CSSTransition))!=null?r:[];return o.length===0?(t(),i.dispose):(Promise.allSettled(o.map(a=>a.finished)).then(()=>{s||t()}),i.dispose)}function XL(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}let Lm=y.createContext(null);Lm.displayName="OpenClosedContext";var di=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(di||{});function _T(){return y.useContext(Lm)}function ZL({value:e,children:t}){return R.createElement(Lm.Provider,{value:e},t)}function JL(){let e=typeof document>"u";return"useSyncExternalStore"in Pf?(t=>t.useSyncExternalStore)(Pf)(()=>()=>{},()=>!1,()=>!e):!1}function PT(){let e=JL(),[t,n]=y.useState(Vl.isHandoffComplete);return t&&Vl.isHandoffComplete===!1&&n(!1),y.useEffect(()=>{t!==!0&&n(!0)},[t]),y.useEffect(()=>Vl.handoff(),[]),e?!1:t}function e4(){let e=y.useRef(!1);return $r(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function AT(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:OT)!==y.Fragment||R.Children.count(e.children)===1}let yc=y.createContext(null);yc.displayName="TransitionContext";var t4=(e=>(e.Visible="visible",e.Hidden="hidden",e))(t4||{});function n4(){let e=y.useContext(yc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function r4(){let e=y.useContext(vc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let vc=y.createContext(null);vc.displayName="NestingContext";function xc(e){return"children"in e?xc(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function RT(e,t){let n=ST(e),r=y.useRef([]),i=e4(),s=bT(),o=Kn((h,m=_r.Hidden)=>{let x=r.current.findIndex(({el:b})=>b===h);x!==-1&&(gc(m,{[_r.Unmount](){r.current.splice(x,1)},[_r.Hidden](){r.current[x].state="hidden"}}),s.microTask(()=>{var b;!xc(r)&&i.current&&((b=n.current)==null||b.call(n))}))}),a=Kn(h=>{let m=r.current.find(({el:x})=>x===h);return m?m.state!=="visible"&&(m.state="visible"):r.current.push({el:h,state:"visible"}),()=>o(h,_r.Unmount)}),l=y.useRef([]),u=y.useRef(Promise.resolve()),f=y.useRef({enter:[],leave:[]}),c=Kn((h,m,x)=>{l.current.splice(0),t&&(t.chains.current[m]=t.chains.current[m].filter(([b])=>b!==h)),t==null||t.chains.current[m].push([h,new Promise(b=>{l.current.push(b)})]),t==null||t.chains.current[m].push([h,new Promise(b=>{Promise.all(f.current[m].map(([p,g])=>g)).then(()=>b())})]),m==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>x(m)):x(m)}),d=Kn((h,m,x)=>{Promise.all(f.current[m].splice(0).map(([b,p])=>p)).then(()=>{var b;(b=l.current.shift())==null||b()}).then(()=>x(m))});return y.useMemo(()=>({children:r,register:a,unregister:o,onStart:c,onStop:d,wait:u,chains:f}),[a,o,r,c,d,f,u])}let OT=y.Fragment,jT=TT.RenderStrategy;function i4(e,t){var n,r;let{transition:i=!0,beforeEnter:s,afterEnter:o,beforeLeave:a,afterLeave:l,enter:u,enterFrom:f,enterTo:c,entered:d,leave:h,leaveFrom:m,leaveTo:x,...b}=e,[p,g]=y.useState(null),v=y.useRef(null),E=AT(e),S=kT(...E?[v,t,g]:t===null?[]:[t]),C=(n=b.unmount)==null||n?_r.Unmount:_r.Hidden,{show:k,appear:P,initial:j}=n4(),[N,I]=y.useState(k?"visible":"hidden"),re=r4(),{register:ie,unregister:xe}=re;$r(()=>ie(v),[ie,v]),$r(()=>{if(C===_r.Hidden&&v.current){if(k&&N!=="visible"){I("visible");return}return gc(N,{hidden:()=>xe(v),visible:()=>ie(v)})}},[N,v,ie,xe,k,C]);let Oe=PT();$r(()=>{if(E&&Oe&&N==="visible"&&v.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[v,N,Oe,E]);let Q=j&&!P,ne=P&&k&&j,O=y.useRef(!1),L=RT(()=>{O.current||(I("hidden"),xe(v))},re),B=Kn(Ve=>{O.current=!0;let pt=Ve?"enter":"leave";L.onStart(v,pt,mt=>{mt==="enter"?s==null||s():mt==="leave"&&(a==null||a())})}),V=Kn(Ve=>{let pt=Ve?"enter":"leave";O.current=!1,L.onStop(v,pt,mt=>{mt==="enter"?o==null||o():mt==="leave"&&(l==null||l())}),pt==="leave"&&!xc(L)&&(I("hidden"),xe(v))});y.useEffect(()=>{E&&i||(B(k),V(k))},[k,E,i]);let H=!(!i||!E||!Oe||Q),[,q]=GL(H,p,k,{start:B,end:V}),ce=si({ref:S,className:((r=Th(b.className,ne&&u,ne&&f,q.enter&&u,q.enter&&q.closed&&f,q.enter&&!q.closed&&c,q.leave&&h,q.leave&&!q.closed&&m,q.leave&&q.closed&&x,!q.transition&&k&&d))==null?void 0:r.trim())||void 0,...qL(q)}),ye=0;N==="visible"&&(ye|=di.Open),N==="hidden"&&(ye|=di.Closed),k&&N==="hidden"&&(ye|=di.Opening),!k&&N==="visible"&&(ye|=di.Closing);let J=ET();return R.createElement(vc.Provider,{value:L},R.createElement(ZL,{value:ye},J({ourProps:ce,theirProps:b,defaultTag:OT,features:jT,visible:N==="visible",name:"Transition.Child"})))}function s4(e,t){let{show:n,appear:r=!1,unmount:i=!0,...s}=e,o=y.useRef(null),a=AT(e),l=kT(...a?[o,t]:t===null?[]:[t]);PT();let u=_T();if(n===void 0&&u!==null&&(n=(u&di.Open)===di.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[f,c]=y.useState(n?"visible":"hidden"),d=RT(()=>{n||c("hidden")}),[h,m]=y.useState(!0),x=y.useRef([n]);$r(()=>{h!==!1&&x.current[x.current.length-1]!==n&&(x.current.push(n),m(!1))},[x,n]);let b=y.useMemo(()=>({show:n,appear:r,initial:h}),[n,r,h]);$r(()=>{n?c("visible"):!xc(d)&&o.current!==null&&c("hidden")},[n,d]);let p={unmount:i},g=Kn(()=>{var S;h&&m(!1),(S=e.beforeEnter)==null||S.call(e)}),v=Kn(()=>{var S;h&&m(!1),(S=e.beforeLeave)==null||S.call(e)}),E=ET();return R.createElement(vc.Provider,{value:d},R.createElement(yc.Provider,{value:b},E({ourProps:{...p,as:y.Fragment,children:R.createElement(NT,{ref:l,...p,...s,beforeEnter:g,beforeLeave:v})},theirProps:{},defaultTag:y.Fragment,features:jT,visible:f==="visible",name:"Transition"})))}function o4(e,t){let n=y.useContext(yc)!==null,r=_T()!==null;return R.createElement(R.Fragment,null,!n&&r?R.createElement(Eh,{ref:t,...e}):R.createElement(NT,{ref:t,...e}))}let Eh=Fm(s4),NT=Fm(i4),a4=Fm(o4),l4=Object.assign(Eh,{Child:a4,Root:Eh});const Im=y.createContext(void 0),Lo=({as:e="div",children:t,className:n})=>{const[r,i]=y.useState(!1),s=y.useCallback(()=>{i(a=>!a)},[]),o=y.useRef(null);return y.useEffect(()=>{const a=l=>{o.current&&!o.current.contains(l.target)&&r&&s&&s()};return document.addEventListener("click",a),()=>{document.removeEventListener("click",a)}},[r,s]),w.jsx(Im.Provider,{value:{open:r,setOpen:i,toggleOpen:s},children:w.jsx(e,{ref:o,className:`dropdown ${n}`,children:t})})},u4=({type:e,children:t,className:n,id:r,title:i})=>{const{open:s,toggleOpen:o,setOpen:a}=y.useContext(Im),l=n||"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-sm",u=n||"transition-all duration-200 ease-linear bg-white border-dashed dropdown-toggle text-custom-500 btn border-custom-500 hover:text-custom-500 hover:bg-custom-50 hover:border-custom-600 focus:text-custom-600 focus:bg-custom-50 focus:border-custom-600 active:text-custom-600 active:bg-custom-50 active:border-custom-600 dark:focus:ring-custom-400/20 dark:bg-custom-400/20 ";return w.jsx("div",{children:e==="a"?w.jsx(l2,{id:r,to:"/#",onClick:f=>{f.preventDefault(),o()},className:u+(s?" show":""),children:t}):w.jsx("button",{id:r,onClick:f=>{f.stopPropagation(),f.preventDefault(),a(!s)},type:"button",className:l,title:i,children:t})})},c4=({as:e="div",className:t,children:n,placement:r})=>{const{open:i,setOpen:s}=y.useContext(Im),o=t||"absolute z-50 py-2 mt-1 text-left list-none bg-white rounded-md shadow-md dropdown-menu min-w-max dark:bg-zink-400",[a,l]=y.useState("right-end");y.useEffect(()=>{r&&l(r)},[r]);const u=y.useRef(null),f=document.getElementsByTagName("html")[0].getAttribute("dir"),c=()=>{if(i&&a==="right-end"&&u.current){const d=u.current;d.style.position="absolute",f==="rtl"?d.style.inset="0px auto auto 0px":d.style.inset="0px 0px auto auto",d.style.margin="0px",d.style.transform="translate(0px, 54px)"}if(i&&a==="start-end"&&u.current){const d=u.current;d.style.position="absolute",d.style.inset="0px auto auto 0px",d.style.margin="0px",d.style.transform="translate(0px, 20px)"}if(i&&a==="top-end"&&u.current){const d=u.current;d.style.position="absolute",d.style.inset="auto 0px 0px auto",d.style.margin="0px",d.style.transform="translate(-58px, -30px)"}if(i&&a==="bottom-start"&&u.current){const d=u.current;d.style.position="absolute",d.style.inset="0px 0px auto auto",d.style.margin="0px",d.style.transform="translate(0px, 54px)"}if(i&&a==="bottom-end"&&u.current){const d=u.current;d.style.position="absolute",d.style.inset="0px 0px auto auto",d.style.margin="0px",d.style.transform="translate(0px, 39px)"}if(i&&a==="top-start"&&u.current){const d=u.current;d.style.position="absolute",d.style.inset="auto auto 0px 0px",d.style.margin="0px",d.style.transform="translate(0px, -95px)"}if(i&&a==="left-end"&&u.current){const d=u.current;d.style.position="absolute",d.style.inset="0px auto auto 0px",d.style.margin="0px",d.style.right="0px",d.style.transform="translate(0px, -20px)"}return{}};return w.jsx(l4,{as:R.Fragment,show:i,children:d=>w.jsx(e,{ref:u,onClick:()=>s(!1),className:`${o} ${d==="entered"?"transition-all":""}`,style:c(),children:n})})};Lo.Trigger=u4;Lo.Content=c4;const f4={red:"hover:bg-red-100 text-red-600 font-medium",default:"hover:bg-slate-100 text-slate-700 font-medium"};function d4({onChatClose:e}){const[t,n]=y.useState(!1),r=Vi(),i=()=>{r==null||r.emit(Dn.ChatClose,{}),e()};return w.jsxs(w.Fragment,{children:[w.jsx(ji,{children:t&&w.jsx(Re.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"fixed inset-0 backdrop-blur-sm bg-slate-900/40 z-50 flex items-center justify-center p-4",children:w.jsxs(Re.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},transition:{duration:.2},className:"bg-white p-5 rounded-xl shadow-lg max-w-xs w-full",children:[w.jsx("div",{className:"text-lg font-semibold text-slate-800 mb-2",children:"Sohbeti kapatmak istediğinize emin misiniz?"}),w.jsx("div",{className:"text-sm text-slate-600 mb-4",children:"Bu işlem geri alınamaz."}),w.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[w.jsx("button",{type:"button",className:"bg-slate-100 text-slate-700 px-4 py-2 rounded-lg font-medium transition-all hover:bg-slate-200",onClick:()=>n(!1),children:"Vazgeç"}),w.jsx("button",{type:"button",className:"bg-red-600 text-white px-4 py-2 rounded-lg font-medium transition-all hover:bg-red-700",onClick:i,children:"Kapat"})]})]})})}),w.jsxs(Lo,{className:"relative flex items-center h-full",children:[w.jsx(Lo.Trigger,{type:"button",className:"h-full flex items-center rounded-full p-1 hover:bg-slate-100 transition-colors",id:"dropdownMenuButton","data-bs-toggle":"dropdown",title:"Sohbet Ayarları",children:w.jsx(De.Menu,{className:"size-5 text-slate-600"})}),w.jsx(ji,{children:!t&&w.jsx(Re.div,{initial:{opacity:0,y:-10,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.95},transition:{duration:.2},className:"absolute z-[9999] right-0 top-5 min-w-[14rem]",children:w.jsxs(Lo.Content,{placement:"left-end",className:"text-left bg-white rounded-lg shadow-xl dropdown-menu w-full","aria-labelledby":"dropdownMenuButton",children:[w.jsx("h5",{className:"text-sm font-semibold text-slate-500 px-3 py-2 border-b border-slate-100",children:"Sohbet Ayarları"}),w.jsx("ul",{className:"py-2 px-2",children:w.jsx("li",{children:w.jsxs("button",{className:Ne("p-2 rounded-lg w-full flex items-center gap-2 text-sm transition-all duration-200 ease-linear dropdown-item",f4.red),onClick:s=>{s.stopPropagation(),s.preventDefault(),n(!0)},children:[w.jsx(De.X,{className:"w-4 h-4"}),w.jsx("span",{children:"Sohbeti Sonlandır"})]})})})]})})})]})]})}function h4({text:e}){const t=/(\b(?:https?:\/\/)?(?:www\.)?[a-z0-9.-]+\.[a-z]{2,}(?:\/[^\s]*)?)/gi,n=e.split(t);return w.jsx(w.Fragment,{children:n.map((r,i)=>{if(t.test(r)){const a=/^https?:\/\//i.test(r)?r:`https://${r}`;return w.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"text-blue-500! underline",children:r},i)}return w.jsx("span",{dangerouslySetInnerHTML:{__html:r}},i)})})}const p4={hidden:{opacity:0,y:8},visible:e=>({opacity:1,y:0,transition:{delay:e*.03,duration:.15,ease:"easeOut"}})},Nv=e=>e?(typeof e=="string"&&(e=new Date(e)),e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})):"";function m4({messages:e,isTyping:t}){var u,f,c,d;const n=y.useRef(null),r=y.useRef(null),[i,s]=y.useState(!0),{widget:o}=tn(),a=()=>{var h;(h=n.current)==null||h.scrollIntoView({behavior:"smooth"})},l=()=>{if(r.current){const{scrollTop:h,scrollHeight:m,clientHeight:x}=r.current,b=m-h<=x+10;s(b)}};return y.useEffect(()=>{(i||t)&&a()},[e,i,t]),w.jsxs("section",{onScroll:l,ref:r,className:"flex flex-col gap-3 w-full h-full grow pt-4 px-4 overflow-y-auto",style:{height:"calc(100vh - 142px)"},children:[((f=(u=o==null?void 0:o.appearance)==null?void 0:u.design)==null?void 0:f.greeting_message)&&w.jsx("div",{className:"flex w-full items-center justify-start",children:w.jsx("div",{className:"max-w-[85%] whitespace-pre-wrap border-0 rounded-lg px-3 py-2 bg-blue-700 text-white shadow-sm",children:(d=(c=o==null?void 0:o.appearance)==null?void 0:c.design)==null?void 0:d.greeting_message})}),w.jsx(ji,{children:e.filter(h=>!!h.content&&h.content!==`
110
- `).map((h,m)=>w.jsxs(Re.div,{custom:m,initial:"hidden",animate:"visible",variants:p4,className:Ne("flex w-full items-center break-words",{"justify-end":h.sender_type===et.Customer,"justify-start":h.sender_type===et.User,"justify-center":h.sender_type===et.System||h.sender_type===et.Activity}),children:[h.sender_type===et.System&&w.jsx("div",{className:"whitespace-pre-wrap text-slate-600 bg-slate-100 px-3 py-1.5 rounded-lg text-sm shadow-sm",children:h.content}),[et.Customer,et.User].includes(h.sender_type)&&w.jsxs(Re.div,{initial:{scale:.95},animate:{scale:1},transition:{duration:.2},className:Ne("max-w-[85%] whitespace-pre-wrap border-0 rounded-lg px-3 py-2 shadow-sm",{"bg-indigo-100 text-indigo-800":h.sender_type===et.Customer,"bg-blue-600 text-white":h.sender_type===et.User}),children:[h.sender_type===et.User?w.jsx(h4,{text:h.content}):h.content,h.created_at&&w.jsx("div",{className:Ne("text-[0.5rem] text-right",{"text-indigo-400":h.sender_type===et.Customer,"text-blue-100":h.sender_type===et.User}),children:Nv(h.created_at)})]}),h.sender_type===et.Activity&&(h.content.split("_").length===3?w.jsxs("div",{className:"whitespace-pre-wrap bg-slate-100 border-0 rounded-full px-3 py-1 text-xs text-slate-600 shadow-none",children:[h.content.split("_")[2]," odaya katıldı"]}):w.jsx("div",{className:"whitespace-pre-wrap bg-slate-100 border-0 rounded-full px-3 py-1 text-xs text-slate-600 shadow-none",children:h.content})),et.System===h.sender_type&&w.jsx("div",{className:"text-xs text-slate-400",children:h.created_at&&Nv(h.created_at)})]},h.id||m))}),t&&w.jsx("div",{className:"flex w-full items-center justify-start mt-1",children:w.jsx("div",{className:"flex items-center bg-slate-100 rounded-full px-3 py-1.5 shadow-none",children:w.jsxs("div",{className:"flex space-x-1",children:[w.jsx("div",{className:"size-2 bg-slate-400 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),w.jsx("div",{className:"size-2 bg-slate-400 rounded-full animate-bounce",style:{animationDelay:"150ms"}}),w.jsx("div",{className:"size-2 bg-slate-400 rounded-full animate-bounce",style:{animationDelay:"300ms"}})]})})}),!i&&w.jsx("div",{className:"fixed bottom-[9rem] right-12",children:w.jsx(Gn,{type:"button",variant:"primary",kind:"solid",rounded:!0,className:"size-10 flex items-center justify-center p-0! shadow-md",onClick:()=>{var h,m;(m=r.current)==null||m.scrollTo({top:(h=r.current)==null?void 0:h.scrollHeight,behavior:"smooth"})},children:w.jsx(De.ArrowDown,{className:"size-4"})})}),w.jsx("div",{ref:n})]})}function g4({onNewMessage:e}){const t=y.useRef(null),n=Vi(),[r,i]=y.useState(""),[s,o]=y.useState("3rem"),a=()=>{r.trim()&&(n==null||n.emit(Dn.MessageCreate,{content:r},u=>{i(""),e(u),t.current&&(t.current.style.height="3rem",o("3rem"))}))},l=u=>{n==null||n.emit(Dn.MessageTyping,{content:u})};return w.jsxs("form",{className:"p-3 flex items-start gap-3 bg-white rounded-b-xl",onSubmit:u=>{u.preventDefault(),a(),u.currentTarget.reset()},children:[w.jsx("div",{className:"grow relative",children:w.jsx(Dm,{id:"message",inputRef:t,className:"grow shadow-none",noMargin:!0,autoComplete:"off",style:{height:s,maxHeight:"6rem"},placeholder:"Mesajınızı yazın",onChange:u=>{if(i(u.target.value),l(u.target.value),u.target.value.length>0&&u.currentTarget.scrollHeight>u.currentTarget.clientHeight){const f=`${u.currentTarget.scrollHeight}px`;u.currentTarget.style.height=f,o(f)}else u.currentTarget.style.height="3rem",o("3rem")},onKeyDown:u=>{u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),u.stopPropagation(),u.currentTarget.value="",a())}})}),w.jsx(Re.div,{whileTap:{scale:.95},className:"flex items-center justify-center",children:w.jsx(Gn,{className:"rounded-full shadow-sm w-12 h-12 flex items-center justify-center",type:"submit",disabled:!r.trim(),children:w.jsx(De.PaperAirplane,{className:"size-6 -rotate-12"})})})]})}const MT="/favicon.png";function y4({chat:e,isTyping:t,shortcutMessages:n,messages:r,onNewMessage:i,onChatClose:s}){var f,c;const{widget:o,setOpen:a}=tn(),l=nr(),u=pm();return w.jsxs(w.Fragment,{children:[w.jsxs("header",{style:{backgroundColor:"#ffffff",color:l.getColor(K.HeaderText),borderBottom:"1px solid #f1f5f9"},className:"p-4 rounded-t-xl flex justify-between items-center z-10",children:[e!=null&&e.agent_name?w.jsx(ML,{name:e.agent_name,avatar:e.agent_avatar,className:"text-neutral-800"}):w.jsx("div",{style:{color:"#334155"},className:"font-medium",children:((c=(f=o==null?void 0:o.appearance)==null?void 0:f.design)==null?void 0:c.greeting_header)||"Bizimle Sohbet Edin"}),w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsx(d4,{onChatClose:s}),u&&w.jsx("button",{type:"button",style:{color:"#334155"},onClick:()=>a(!1),children:w.jsx(De.X,{className:"w-5 h-5 cursor-pointer"})})]})]}),w.jsx(m4,{messages:r,isTyping:t||n.length>0}),w.jsx(g4,{onNewMessage:d=>{i(d)}}),w.jsxs("a",{href:"https://alfatekyazilim.com.tr",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center text-slate-400 border-t border-slate-100 flex items-center justify-center gap-1 hover:text-slate-600 transition-colors",children:[w.jsx("span",{children:"Powered by"}),w.jsx("span",{className:"font-medium",children:"Alfatek"}),w.jsx("img",{src:MT,alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function v4({rating:e,onChange:t}){return w.jsx("div",{className:"flex items-center justify-center gap-1 my-3",children:[1,2,3,4,5].map(n=>{const r=n<=e,i=!r&&n-.5<=e;return w.jsxs("div",{className:"relative w-10 h-10",children:[w.jsx("svg",{className:"w-10 h-10 text-slate-200 fill-slate-200",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})}),i&&w.jsx("div",{className:"absolute top-0 left-0 w-5 h-10 overflow-hidden",children:w.jsx("svg",{className:"w-10 h-10 text-blue-500 fill-blue-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})})}),r&&w.jsx("svg",{className:"w-10 h-10 text-blue-500 fill-blue-500 absolute top-0 left-0",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})}),w.jsxs("div",{className:"absolute inset-0 flex",children:[w.jsx("button",{type:"button",onClick:()=>t(n-.5),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${n-.5} stars`}),w.jsx("button",{type:"button",onClick:()=>t(n),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${n} stars`})]})]},n)})})}function x4({onOk:e}){const[t,n]=y.useState(0),[r,i]=y.useState(!1),[s,o]=y.useState(10),a=gN();y.useEffect(()=>{if(r){const c=setInterval(()=>{o(d=>d<=1?(clearInterval(c),e(!0),0):d-1)},1e3);return()=>clearInterval(c)}},[r]);const l=wm({comment:Eu()}),u=yT({init:{comment:""},schema:l,action:async c=>{const[d,h]=await a.mutateAsync({rating:t,comment:c.comment});if(xp(h)){i(!0);return}vT(d,{form:u})}}),f=()=>{e(!0)};return w.jsxs("div",{className:"flex flex-col h-full",children:[w.jsx("header",{style:{backgroundColor:r?"#ffffff":"#4F46E5",color:r?"#334155":"#ffffff",borderBottom:"1px solid #f1f5f9"},className:"p-4 rounded-t-xl flex justify-between items-center z-10",children:w.jsx("div",{className:"font-medium",children:r?"Teşekkürler!":"Görüşmenizi Değerlendirin"})}),w.jsx("div",{className:"flex-1 p-6 overflow-y-auto flex flex-col",children:r?w.jsxs(Re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"flex flex-col items-center justify-center h-full text-center",children:[w.jsx("div",{className:"text-green-500 mb-4",children:w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-16 w-16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),w.jsx("h2",{className:"text-xl font-semibold mb-2 text-slate-800",children:"Değerlendirmeniz için teşekkürler!"}),w.jsx("p",{className:"text-slate-600 mb-8",children:"Geri bildiriminiz bizim için çok değerli."}),w.jsxs("p",{className:"text-slate-500 mb-4",children:["Ekran ",s," saniye içinde kapanacaktır."]}),w.jsx(Gn,{onClick:f,className:"w-full max-w-xs bg-blue-600 hover:bg-blue-700 text-white rounded-lg py-2.5 font-medium transition-colors",children:"Yeni Görüşme Başlat"})]}):w.jsxs(Re.div,{initial:{opacity:0},animate:{opacity:1},className:"flex flex-col",children:[w.jsx("div",{className:"text-center mb-6",children:w.jsx("p",{className:"text-slate-600 text-base",children:"Lütfen hizmetimizi değerlendirin. Görüşleriniz bizim için önemli."})}),w.jsxs("div",{className:"mb-6",children:[w.jsx("h3",{className:"text-center font-medium mb-2 text-slate-800 text-lg",children:"Görüşmeyi puanlayın"}),w.jsx(v4,{rating:t,onChange:n}),t>0&&w.jsxs("p",{className:"text-center text-sm text-slate-500 mt-1",children:["Puanınız:"," ",Number.isInteger(t)?t:t.toFixed(1)]})]}),w.jsxs("form",{onSubmit:u.handleSubmit,className:"space-y-5",children:[w.jsxs("div",{children:[w.jsx("label",{htmlFor:"comment",className:"block text-sm font-medium text-slate-700 mb-1",children:"Yorumunuz (İsteğe bağlı)"}),w.jsx(Dm,{id:"comment",onChange:u.handleChange,onBlur:u.handleBlur,value:u.values.comment,placeholder:"Görüşme hakkında düşüncelerinizi paylaşın...",className:"rounded-lg border-slate-200 focus:border-blue-500 focus:ring-blue-500 shadow-sm"})]}),w.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[w.jsx(Gn,{type:"submit",disabled:t<1,className:"w-full bg-blue-600 hover:bg-blue-700 text-white rounded-lg py-2.5 font-medium transition-colors disabled:bg-slate-200 disabled:text-slate-400",children:"Değerlendirmeyi Gönder"}),w.jsx(Gn,{onClick:f,className:"w-full bg-slate-100 hover:bg-slate-200 text-slate-700 rounded-lg py-2.5 font-medium transition-colors",children:"Yeni Görüşme Başlat"})]})]})]})}),w.jsxs("a",{href:"https://alfatekyazilim.com.tr",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center text-slate-400 border-t border-slate-100 flex items-center justify-center gap-1 hover:text-slate-600 transition-colors",children:[w.jsx("span",{children:"Powered by"}),w.jsx("span",{className:"font-medium",children:"Alfatek"}),w.jsx("img",{src:MT,alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function w4({children:e}){const{widget:t}=tn();return t?w.jsx("section",{className:"h-full w-full relative",children:e}):null}function b4({children:e}){const t=Vi();return y.useEffect(()=>{t&&t.connect()},[]),!t||!t.connected?null:e}function S4(){const{widget:e,setOpen:t,setIsHaveChat:n}=tn(),r=Vi(),i=hm(),[s,o]=y.useState(null),[a,l]=y.useState([]),[u,f]=y.useState(!1),[c,d]=y.useState([]),h=()=>{if(s){o({...s,status:ii.Closed});return}m()},m=b=>{b||t(!1),n(!1),o(null),l([]),d([]),fh(e.client_id).then(()=>{r==null||r.disconnect(),i.push("registration")})};y.useEffect(()=>{r==null||r.emit(Dn.ChatView,{},b=>{if(b===null){t(!1),n(!1),fh(e.client_id),l([]),d([]),i.push("registration");return}o(b),n(!0)})},[]);const x=y.useCallback(b=>{s&&![ii.Closed,ii.Deleted].includes(s.status)&&l([...a,b])},[a,s]);return y.useEffect(()=>{if(!r)return;const b=E=>{const S={content:E.content,created_at:E.created_at,files:E.files,id:E._id,sender_type:E.sender_type,answers:E.answers,reply_id:E.reply_id};if(c.length>0){d(C=>[...C,S]);return}E.is_shortcut?d([S]):x(S),f(!1)},p=E=>{o({...s,agent_name:E.name,agent_avatar:E.avatar,is_uploadable:(s==null?void 0:s.is_uploadable)??!1,status:(s==null?void 0:s.status)??ii.Open}),x({content:` _ _${E.name}`,created_at:new Date,files:[],id:Math.random().toString(),sender_type:et.Activity,activity_type:wT.AdminJoin,sender_name:E.name})},g=()=>{f(!0)},v=()=>{if(s){o({...s,status:ii.Closed});return}m()};return r.on(ut.MessageAgentCreate,b),r.on(ut.ChatUserAssignee,p),r.on(ut.MessageAgentTyping,g),r.on(ut.ChatUserClose,v),()=>{r.off(ut.MessageAgentCreate,b),r.off(ut.ChatUserAssignee,p),r.off(ut.MessageAgentTyping,g),r.off(ut.ChatUserClose,v)}},[x]),y.useEffect(()=>{!r||!s||r.emit(Dn.MessageList,{},b=>{l(b)})},[r,s]),y.useEffect(()=>{const b=setTimeout(()=>{f(!1)},2e3);return()=>clearTimeout(b)},[u]),y.useEffect(()=>{if(!e||c.length===0)return;let b=0;e.writing_timeout&&(b=[...c[0].content].length/e.writing_timeout,b<0&&(b=0));const p=setTimeout(()=>{x(c[0]),d(c.slice(1))},b*1e3);return()=>clearTimeout(p)},[c,e]),s?w.jsxs(w.Fragment,{children:[w.jsx("div",{id:"chat-alert-portal"}),w.jsx(ji,{children:w.jsx(Re.div,{initial:{opacity:0,scale:.98,y:5},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.98,y:5},transition:{type:"spring",damping:35,stiffness:400,duration:.2},className:"bg-white h-full w-full rounded-xl shadow-sm flex flex-col overflow-hidden",children:s.status===ii.Closed?w.jsx(x4,{onOk:m}):w.jsx(y4,{chat:s,isTyping:u,messages:a,shortcutMessages:c,onNewMessage:x,onChatClose:h})})})]}):null}function T4(){return PL(),null}function E4(){return w.jsxs(b4,{children:[w.jsx(_S,{defaultOpen:!0,children:w.jsx(w4,{children:w.jsx(S4,{})})}),w.jsx(T4,{})]})}const C4=[{path:"/chat",component:E4,name:"chat"}],DT=[...C4],FT=[...NL],k4=[...DT,...FT];function _4(){return w.jsx(Z_,{future:{v7_startTransition:!0},children:w.jsxs(e2,{children:[DT.map((e,t)=>w.jsx(Fd,{path:e.path,element:w.jsx(e.component,{})},t)),FT.map((e,t)=>w.jsx(Fd,{path:e.path,element:w.jsx(e.component,{})},t))]})})}function P4({link_id:e,defaultValues:t}){const{setWidget:n,widget:r,setDefaultValues:i}=tn(),{data:s,isLoading:o}=o_(e);return y.useEffect(()=>{Array.isArray(s)&&l_(s[0])&&(n(s[0]),i(t))},[s]),o||!r?null:w.jsx(gL,{children:w.jsx(dN,{children:w.jsx(_4,{})})})}const A4=new zk;function R4({container:e,link_id:t,defaultValues:n}){rw(e).render(w.jsxs(qk,{client:A4,children:[w.jsx(P4,{link_id:t,defaultValues:n}),w.jsx(lL,{richColors:!0,style:{zIndex:999999},position:"bottom-right"})]}))}window.widget=R4});export default O4();
108
+ `))}else{let d=f.props,h=d==null?void 0:d.className,m=typeof h=="function"?(...p)=>Ch(h(...p),l.className):Ch(h,l.className),v=m?{className:m}:{},b=PT(f.props,si(Af(l,["ref"])));for(let p in c)p in b&&delete c[p];return y.cloneElement(f,Object.assign({},b,c,u,{ref:i(KL(f),u.ref)},v))}return y.createElement(s,Object.assign({},Af(l,["ref"]),s!==y.Fragment&&u,s!==y.Fragment&&c),f)}function HL(){let e=y.useRef([]),t=y.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function WL(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function PT(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[i=>{var s;return(s=i==null?void 0:i.preventDefault)==null?void 0:s.call(i)}]);for(let r in n)Object.assign(t,{[r](i,...s){let o=n[r];for(let a of o){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;a(i,...s)}}});return t}function Im(e){var t;return Object.assign(y.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function si(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Af(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function KL(e){return R.version.split(".")[0]>="19"?e.props.ref:e.ref}let qL=Symbol();function AT(...e){let t=y.useRef(e);y.useEffect(()=>{t.current=e},[e]);let n=Kn(r=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(r):i.current=r)});return e.every(r=>r==null||(r==null?void 0:r[qL]))?void 0:n}function GL(e=0){let[t,n]=y.useState(e),r=y.useCallback(l=>n(l),[t]),i=y.useCallback(l=>n(u=>u|l),[t]),s=y.useCallback(l=>(t&l)===l,[t]),o=y.useCallback(l=>n(u=>u&~l),[n]),a=y.useCallback(l=>n(u=>u^l),[n]);return{flags:t,setFlag:r,addFlag:i,hasFlag:s,removeFlag:o,toggleFlag:a}}var QL={},Mv,Dv;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Mv=process==null?void 0:QL)==null?void 0:Mv.NODE_ENV)==="test"&&typeof((Dv=Element==null?void 0:Element.prototype)==null?void 0:Dv.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
109
+ `)),[]});var YL=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(YL||{});function XL(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function ZL(e,t,n,r){let[i,s]=y.useState(n),{hasFlag:o,addFlag:a,removeFlag:l}=GL(e&&i?3:0),u=y.useRef(!1),f=y.useRef(!1),c=ET();return $r(()=>{var d;if(e){if(n&&s(!0),!t){n&&a(3);return}return(d=r==null?void 0:r.start)==null||d.call(r,n),JL(t,{inFlight:u,prepare(){f.current?f.current=!1:f.current=u.current,u.current=!0,!f.current&&(n?(a(3),l(4)):(a(4),l(2)))},run(){f.current?n?(l(3),a(4)):(l(4),a(3)):n?l(1):a(1)},done(){var h;f.current&&typeof t.getAnimations=="function"&&t.getAnimations().length>0||(u.current=!1,l(7),n||s(!1),(h=r==null?void 0:r.end)==null||h.call(r,n))}})}},[e,n,t,c]),e?[i,{closed:o(1),enter:o(2),leave:o(4),transition:o(2)||o(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function JL(e,{prepare:t,run:n,done:r,inFlight:i}){let s=gc();return tI(e,{prepare:t,inFlight:i}),s.nextFrame(()=>{n(),s.requestAnimationFrame(()=>{s.add(eI(e,r))})}),s.dispose}function eI(e,t){var n,r;let i=gc();if(!e)return i.dispose;let s=!1;i.add(()=>{s=!0});let o=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(a=>a instanceof CSSTransition))!=null?r:[];return o.length===0?(t(),i.dispose):(Promise.allSettled(o.map(a=>a.finished)).then(()=>{s||t()}),i.dispose)}function tI(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}let $m=y.createContext(null);$m.displayName="OpenClosedContext";var di=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(di||{});function RT(){return y.useContext($m)}function nI({value:e,children:t}){return R.createElement($m.Provider,{value:e},t)}function rI(){let e=typeof document>"u";return"useSyncExternalStore"in Rf?(t=>t.useSyncExternalStore)(Rf)(()=>()=>{},()=>!1,()=>!e):!1}function OT(){let e=rI(),[t,n]=y.useState(Bl.isHandoffComplete);return t&&Bl.isHandoffComplete===!1&&n(!1),y.useEffect(()=>{t!==!0&&n(!0)},[t]),y.useEffect(()=>Bl.handoff(),[]),e?!1:t}function iI(){let e=y.useRef(!1);return $r(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function jT(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:MT)!==y.Fragment||R.Children.count(e.children)===1}let vc=y.createContext(null);vc.displayName="TransitionContext";var sI=(e=>(e.Visible="visible",e.Hidden="hidden",e))(sI||{});function oI(){let e=y.useContext(vc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function aI(){let e=y.useContext(xc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let xc=y.createContext(null);xc.displayName="NestingContext";function wc(e){return"children"in e?wc(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function NT(e,t){let n=CT(e),r=y.useRef([]),i=iI(),s=ET(),o=Kn((h,m=_r.Hidden)=>{let v=r.current.findIndex(({el:b})=>b===h);v!==-1&&(yc(m,{[_r.Unmount](){r.current.splice(v,1)},[_r.Hidden](){r.current[v].state="hidden"}}),s.microTask(()=>{var b;!wc(r)&&i.current&&((b=n.current)==null||b.call(n))}))}),a=Kn(h=>{let m=r.current.find(({el:v})=>v===h);return m?m.state!=="visible"&&(m.state="visible"):r.current.push({el:h,state:"visible"}),()=>o(h,_r.Unmount)}),l=y.useRef([]),u=y.useRef(Promise.resolve()),f=y.useRef({enter:[],leave:[]}),c=Kn((h,m,v)=>{l.current.splice(0),t&&(t.chains.current[m]=t.chains.current[m].filter(([b])=>b!==h)),t==null||t.chains.current[m].push([h,new Promise(b=>{l.current.push(b)})]),t==null||t.chains.current[m].push([h,new Promise(b=>{Promise.all(f.current[m].map(([p,g])=>g)).then(()=>b())})]),m==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>v(m)):v(m)}),d=Kn((h,m,v)=>{Promise.all(f.current[m].splice(0).map(([b,p])=>p)).then(()=>{var b;(b=l.current.shift())==null||b()}).then(()=>v(m))});return y.useMemo(()=>({children:r,register:a,unregister:o,onStart:c,onStop:d,wait:u,chains:f}),[a,o,r,c,d,f,u])}let MT=y.Fragment,DT=kT.RenderStrategy;function lI(e,t){var n,r;let{transition:i=!0,beforeEnter:s,afterEnter:o,beforeLeave:a,afterLeave:l,enter:u,enterFrom:f,enterTo:c,entered:d,leave:h,leaveFrom:m,leaveTo:v,...b}=e,[p,g]=y.useState(null),x=y.useRef(null),E=jT(e),S=AT(...E?[x,t,g]:t===null?[]:[t]),C=(n=b.unmount)==null||n?_r.Unmount:_r.Hidden,{show:k,appear:P,initial:j}=oI(),[N,I]=y.useState(k?"visible":"hidden"),re=aI(),{register:ie,unregister:xe}=re;$r(()=>ie(x),[ie,x]),$r(()=>{if(C===_r.Hidden&&x.current){if(k&&N!=="visible"){I("visible");return}return yc(N,{hidden:()=>xe(x),visible:()=>ie(x)})}},[N,x,ie,xe,k,C]);let Oe=OT();$r(()=>{if(E&&Oe&&N==="visible"&&x.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[x,N,Oe,E]);let Q=j&&!P,ne=P&&k&&j,O=y.useRef(!1),L=NT(()=>{O.current||(I("hidden"),xe(x))},re),B=Kn(Ve=>{O.current=!0;let pt=Ve?"enter":"leave";L.onStart(x,pt,mt=>{mt==="enter"?s==null||s():mt==="leave"&&(a==null||a())})}),V=Kn(Ve=>{let pt=Ve?"enter":"leave";O.current=!1,L.onStop(x,pt,mt=>{mt==="enter"?o==null||o():mt==="leave"&&(l==null||l())}),pt==="leave"&&!wc(L)&&(I("hidden"),xe(x))});y.useEffect(()=>{E&&i||(B(k),V(k))},[k,E,i]);let H=!(!i||!E||!Oe||Q),[,q]=ZL(H,p,k,{start:B,end:V}),ce=si({ref:S,className:((r=Ch(b.className,ne&&u,ne&&f,q.enter&&u,q.enter&&q.closed&&f,q.enter&&!q.closed&&c,q.leave&&h,q.leave&&!q.closed&&m,q.leave&&q.closed&&v,!q.transition&&k&&d))==null?void 0:r.trim())||void 0,...XL(q)}),ye=0;N==="visible"&&(ye|=di.Open),N==="hidden"&&(ye|=di.Closed),k&&N==="hidden"&&(ye|=di.Opening),!k&&N==="visible"&&(ye|=di.Closing);let J=_T();return R.createElement(xc.Provider,{value:L},R.createElement(nI,{value:ye},J({ourProps:ce,theirProps:b,defaultTag:MT,features:DT,visible:N==="visible",name:"Transition.Child"})))}function uI(e,t){let{show:n,appear:r=!1,unmount:i=!0,...s}=e,o=y.useRef(null),a=jT(e),l=AT(...a?[o,t]:t===null?[]:[t]);OT();let u=RT();if(n===void 0&&u!==null&&(n=(u&di.Open)===di.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[f,c]=y.useState(n?"visible":"hidden"),d=NT(()=>{n||c("hidden")}),[h,m]=y.useState(!0),v=y.useRef([n]);$r(()=>{h!==!1&&v.current[v.current.length-1]!==n&&(v.current.push(n),m(!1))},[v,n]);let b=y.useMemo(()=>({show:n,appear:r,initial:h}),[n,r,h]);$r(()=>{n?c("visible"):!wc(d)&&o.current!==null&&c("hidden")},[n,d]);let p={unmount:i},g=Kn(()=>{var S;h&&m(!1),(S=e.beforeEnter)==null||S.call(e)}),x=Kn(()=>{var S;h&&m(!1),(S=e.beforeLeave)==null||S.call(e)}),E=_T();return R.createElement(xc.Provider,{value:d},R.createElement(vc.Provider,{value:b},E({ourProps:{...p,as:y.Fragment,children:R.createElement(FT,{ref:l,...p,...s,beforeEnter:g,beforeLeave:x})},theirProps:{},defaultTag:y.Fragment,features:DT,visible:f==="visible",name:"Transition"})))}function cI(e,t){let n=y.useContext(vc)!==null,r=RT()!==null;return R.createElement(R.Fragment,null,!n&&r?R.createElement(kh,{ref:t,...e}):R.createElement(FT,{ref:t,...e}))}let kh=Im(uI),FT=Im(lI),fI=Im(cI),dI=Object.assign(kh,{Child:fI,Root:kh});const Vm=y.createContext(void 0),Io=({as:e="div",children:t,className:n})=>{const[r,i]=y.useState(!1),s=y.useCallback(()=>{i(a=>!a)},[]),o=y.useRef(null);return y.useEffect(()=>{const a=l=>{o.current&&!o.current.contains(l.target)&&r&&s&&s()};return document.addEventListener("click",a),()=>{document.removeEventListener("click",a)}},[r,s]),w.jsx(Vm.Provider,{value:{open:r,setOpen:i,toggleOpen:s},children:w.jsx(e,{ref:o,className:`dropdown ${n}`,children:t})})},hI=({type:e,children:t,className:n,id:r,title:i})=>{const{open:s,toggleOpen:o,setOpen:a}=y.useContext(Vm),l=n||"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-sm",u=n||"transition-all duration-200 ease-linear bg-white border-dashed dropdown-toggle text-custom-500 btn border-custom-500 hover:text-custom-500 hover:bg-custom-50 hover:border-custom-600 focus:text-custom-600 focus:bg-custom-50 focus:border-custom-600 active:text-custom-600 active:bg-custom-50 active:border-custom-600 dark:focus:ring-custom-400/20 dark:bg-custom-400/20 ";return w.jsx("div",{children:e==="a"?w.jsx(c2,{id:r,to:"/#",onClick:f=>{f.preventDefault(),o()},className:u+(s?" show":""),children:t}):w.jsx("button",{id:r,onClick:f=>{f.stopPropagation(),f.preventDefault(),a(!s)},type:"button",className:l,title:i,children:t})})},pI=({as:e="div",className:t,children:n,placement:r})=>{const{open:i,setOpen:s}=y.useContext(Vm),o=t||"absolute z-50 py-2 mt-1 text-left list-none bg-white rounded-md shadow-md dropdown-menu min-w-max dark:bg-zink-400",[a,l]=y.useState("right-end");y.useEffect(()=>{r&&l(r)},[r]);const u=y.useRef(null),f=document.getElementsByTagName("html")[0].getAttribute("dir"),c=()=>{if(i&&a==="right-end"&&u.current){const d=u.current;d.style.position="absolute",f==="rtl"?d.style.inset="0px auto auto 0px":d.style.inset="0px 0px auto auto",d.style.margin="0px",d.style.transform="translate(0px, 54px)"}if(i&&a==="start-end"&&u.current){const d=u.current;d.style.position="absolute",d.style.inset="0px auto auto 0px",d.style.margin="0px",d.style.transform="translate(0px, 20px)"}if(i&&a==="top-end"&&u.current){const d=u.current;d.style.position="absolute",d.style.inset="auto 0px 0px auto",d.style.margin="0px",d.style.transform="translate(-58px, -30px)"}if(i&&a==="bottom-start"&&u.current){const d=u.current;d.style.position="absolute",d.style.inset="0px 0px auto auto",d.style.margin="0px",d.style.transform="translate(0px, 54px)"}if(i&&a==="bottom-end"&&u.current){const d=u.current;d.style.position="absolute",d.style.inset="0px 0px auto auto",d.style.margin="0px",d.style.transform="translate(0px, 39px)"}if(i&&a==="top-start"&&u.current){const d=u.current;d.style.position="absolute",d.style.inset="auto auto 0px 0px",d.style.margin="0px",d.style.transform="translate(0px, -95px)"}if(i&&a==="left-end"&&u.current){const d=u.current;d.style.position="absolute",d.style.inset="0px auto auto 0px",d.style.margin="0px",d.style.right="0px",d.style.transform="translate(0px, -20px)"}return{}};return w.jsx(dI,{as:R.Fragment,show:i,children:d=>w.jsx(e,{ref:u,onClick:()=>s(!1),className:`${o} ${d==="entered"?"transition-all":""}`,style:c(),children:n})})};Io.Trigger=hI;Io.Content=pI;const mI={red:"hover:bg-red-100 text-red-600 font-medium",default:"hover:bg-slate-100 text-slate-700 font-medium"};function gI({onChatClose:e}){const[t,n]=y.useState(!1),r=Bi(),i=()=>{r==null||r.emit(Dn.ChatClose,{}),e()};return w.jsxs(w.Fragment,{children:[w.jsx(Ni,{children:t&&w.jsx(Re.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"fixed inset-0 backdrop-blur-sm bg-slate-900/40 z-50 flex items-center justify-center p-4",children:w.jsxs(Re.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},transition:{duration:.2},className:"bg-white p-5 rounded-xl shadow-lg max-w-xs w-full",children:[w.jsx("div",{className:"text-lg font-semibold text-slate-800 mb-2",children:"Sohbeti kapatmak istediğinize emin misiniz?"}),w.jsx("div",{className:"text-sm text-slate-600 mb-4",children:"Bu işlem geri alınamaz."}),w.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[w.jsx("button",{type:"button",className:"bg-slate-100 text-slate-700 px-4 py-2 rounded-lg font-medium transition-all hover:bg-slate-200",onClick:()=>n(!1),children:"Vazgeç"}),w.jsx("button",{type:"button",className:"bg-red-600 text-white px-4 py-2 rounded-lg font-medium transition-all hover:bg-red-700",onClick:i,children:"Kapat"})]})]})})}),w.jsxs(Io,{className:"relative flex items-center h-full",children:[w.jsx(Io.Trigger,{type:"button",className:"h-full flex items-center rounded-full p-1 hover:bg-slate-100 transition-colors",id:"dropdownMenuButton","data-bs-toggle":"dropdown",title:"Sohbet Ayarları",children:w.jsx(De.Menu,{className:"size-5 text-slate-600"})}),w.jsx(Ni,{children:!t&&w.jsx(Re.div,{initial:{opacity:0,y:-10,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.95},transition:{duration:.2},className:"absolute z-[9999] right-0 top-5 min-w-[14rem]",children:w.jsxs(Io.Content,{placement:"left-end",className:"text-left bg-white rounded-lg shadow-xl dropdown-menu w-full","aria-labelledby":"dropdownMenuButton",children:[w.jsx("h5",{className:"text-sm font-semibold text-slate-500 px-3 py-2 border-b border-slate-100",children:"Sohbet Ayarları"}),w.jsx("ul",{className:"py-2 px-2",children:w.jsx("li",{children:w.jsxs("button",{className:Ne("p-2 rounded-lg w-full flex items-center gap-2 text-sm transition-all duration-200 ease-linear dropdown-item",mI.red),onClick:s=>{s.stopPropagation(),s.preventDefault(),n(!0)},children:[w.jsx(De.X,{className:"w-4 h-4"}),w.jsx("span",{children:"Sohbeti Sonlandır"})]})})})]})})})]})]})}function yI({text:e}){const t=/(\b(?:https?:\/\/)?(?:www\.)?[a-z0-9.-]+\.[a-z]{2,}(?:\/[^\s]*)?)/gi,n=e.split(t);return w.jsx(w.Fragment,{children:n.map((r,i)=>{if(t.test(r)){const a=/^https?:\/\//i.test(r)?r:`https://${r}`;return w.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"text-blue-500! underline",children:r},i)}return w.jsx("span",{dangerouslySetInnerHTML:{__html:r}},i)})})}const vI={hidden:{opacity:0,y:8},visible:e=>({opacity:1,y:0,transition:{delay:e*.03,duration:.15,ease:"easeOut"}})},Fv=e=>e?(typeof e=="string"&&(e=new Date(e)),e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})):"";function xI({messages:e,isTyping:t}){var u,f,c,d;const n=y.useRef(null),r=y.useRef(null),[i,s]=y.useState(!0),{widget:o}=tn(),a=()=>{var h;(h=n.current)==null||h.scrollIntoView({behavior:"smooth"})},l=()=>{if(r.current){const{scrollTop:h,scrollHeight:m,clientHeight:v}=r.current,b=m-h<=v+10;s(b)}};return y.useEffect(()=>{(i||t)&&a()},[e,i,t]),w.jsxs("section",{onScroll:l,ref:r,className:"flex flex-col gap-3 w-full h-full grow pt-4 px-4 overflow-y-auto",style:{height:"calc(100vh - 142px)"},children:[((f=(u=o==null?void 0:o.appearance)==null?void 0:u.design)==null?void 0:f.greeting_message)&&w.jsx("div",{className:"flex w-full items-center justify-start",children:w.jsx("div",{className:"max-w-[85%] whitespace-pre-wrap border-0 rounded-lg px-3 py-2 bg-blue-700 text-white shadow-sm",children:(d=(c=o==null?void 0:o.appearance)==null?void 0:c.design)==null?void 0:d.greeting_message})}),w.jsx(Ni,{children:e.filter(h=>!!h.content&&h.content!==`
110
+ `).map((h,m)=>w.jsxs(Re.div,{custom:m,initial:"hidden",animate:"visible",variants:vI,className:Ne("flex w-full items-center break-words",{"justify-end":h.sender_type===et.Customer,"justify-start":h.sender_type===et.User,"justify-center":h.sender_type===et.System||h.sender_type===et.Activity}),children:[h.sender_type===et.System&&w.jsx("div",{className:"whitespace-pre-wrap text-slate-600 bg-slate-100 px-3 py-1.5 rounded-lg text-sm shadow-sm",children:h.content}),[et.Customer,et.User].includes(h.sender_type)&&w.jsxs(Re.div,{initial:{scale:.95},animate:{scale:1},transition:{duration:.2},className:Ne("max-w-[85%] whitespace-pre-wrap border-0 rounded-lg px-3 py-2 shadow-sm",{"bg-indigo-100 text-indigo-800":h.sender_type===et.Customer,"bg-blue-600 text-white":h.sender_type===et.User}),children:[h.sender_type===et.User?w.jsx(yI,{text:h.content}):h.content,h.created_at&&w.jsx("div",{className:Ne("text-[0.5rem] text-right",{"text-indigo-400":h.sender_type===et.Customer,"text-blue-100":h.sender_type===et.User}),children:Fv(h.created_at)})]}),h.sender_type===et.Activity&&(h.content.split("_").length===3?w.jsxs("div",{className:"whitespace-pre-wrap bg-slate-100 border-0 rounded-full px-3 py-1 text-xs text-slate-600 shadow-none",children:[h.content.split("_")[2]," odaya katıldı"]}):w.jsx("div",{className:"whitespace-pre-wrap bg-slate-100 border-0 rounded-full px-3 py-1 text-xs text-slate-600 shadow-none",children:h.content})),et.System===h.sender_type&&w.jsx("div",{className:"text-xs text-slate-400",children:h.created_at&&Fv(h.created_at)})]},h.id||m))}),t&&w.jsx("div",{className:"flex w-full items-center justify-start mt-1",children:w.jsx("div",{className:"flex items-center bg-slate-100 rounded-full px-3 py-1.5 shadow-none",children:w.jsxs("div",{className:"flex space-x-1",children:[w.jsx("div",{className:"size-2 bg-slate-400 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),w.jsx("div",{className:"size-2 bg-slate-400 rounded-full animate-bounce",style:{animationDelay:"150ms"}}),w.jsx("div",{className:"size-2 bg-slate-400 rounded-full animate-bounce",style:{animationDelay:"300ms"}})]})})}),!i&&w.jsx("div",{className:"fixed bottom-[9rem] right-12",children:w.jsx(Gn,{type:"button",variant:"primary",kind:"solid",rounded:!0,className:"size-10 flex items-center justify-center p-0! shadow-md",onClick:()=>{var h,m;(m=r.current)==null||m.scrollTo({top:(h=r.current)==null?void 0:h.scrollHeight,behavior:"smooth"})},children:w.jsx(De.ArrowDown,{className:"size-4"})})}),w.jsx("div",{ref:n})]})}function wI({onNewMessage:e}){const t=y.useRef(null),n=Bi(),[r,i]=y.useState(""),[s,o]=y.useState("3rem"),a=()=>{r.trim()&&(n==null||n.emit(Dn.MessageCreate,{content:r},u=>{i(""),e(u),t.current&&(t.current.style.height="3rem",o("3rem"))}))},l=u=>{n==null||n.emit(Dn.MessageTyping,{content:u})};return w.jsxs("form",{className:"p-3 flex items-start gap-3 bg-white rounded-b-xl",onSubmit:u=>{u.preventDefault(),a(),u.currentTarget.reset()},children:[w.jsx("div",{className:"grow relative",children:w.jsx(Lm,{id:"message",inputRef:t,className:"grow shadow-none",noMargin:!0,autoComplete:"off",style:{height:s,maxHeight:"6rem"},placeholder:"Mesajınızı yazın",onChange:u=>{if(i(u.target.value),l(u.target.value),u.target.value.length>0&&u.currentTarget.scrollHeight>u.currentTarget.clientHeight){const f=`${u.currentTarget.scrollHeight}px`;u.currentTarget.style.height=f,o(f)}else u.currentTarget.style.height="3rem",o("3rem")},onKeyDown:u=>{u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),u.stopPropagation(),u.currentTarget.value="",a())}})}),w.jsx(Re.div,{whileTap:{scale:.95},className:"flex items-center justify-center",children:w.jsx(Gn,{className:"rounded-full shadow-sm w-12 h-12 flex items-center justify-center",type:"submit",disabled:!r.trim(),children:w.jsx(De.PaperAirplane,{className:"size-6 -rotate-12"})})})]})}function bI({chat:e,isTyping:t,shortcutMessages:n,messages:r,onNewMessage:i,onChatClose:s}){var f,c;const{widget:o,setOpen:a}=tn(),l=nr(),u=gm();return w.jsxs(w.Fragment,{children:[w.jsxs("header",{style:{backgroundColor:"#ffffff",color:l.getColor(K.HeaderText),borderBottom:"1px solid #f1f5f9"},className:"p-4 rounded-t-xl flex justify-between items-center z-10",children:[e!=null&&e.agent_name?w.jsx(IL,{name:e.agent_name,avatar:e.agent_avatar,className:"text-neutral-800"}):w.jsx("div",{style:{color:"#334155"},className:"font-medium",children:((c=(f=o==null?void 0:o.appearance)==null?void 0:f.design)==null?void 0:c.greeting_header)||"Bizimle Sohbet Edin"}),w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsx(gI,{onChatClose:s}),u&&w.jsx("button",{type:"button",style:{color:"#334155"},onClick:()=>a(!1),children:w.jsx(De.X,{className:"w-5 h-5 cursor-pointer"})})]})]}),w.jsx(xI,{messages:r,isTyping:t||n.length>0}),w.jsx(wI,{onNewMessage:d=>{i(d)}}),w.jsxs("a",{href:"https://alfatekyazilim.com.tr",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center text-slate-400 border-t border-slate-100 flex items-center justify-center gap-1 hover:text-slate-600 transition-colors",children:[w.jsx("span",{children:"Powered by"}),w.jsx("span",{className:"font-medium",children:"Alfatek"}),w.jsx("img",{src:"https://alfatekyazilim.com.tr/images/favicon.png",alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function SI({rating:e,onChange:t}){return w.jsx("div",{className:"flex items-center justify-center gap-1 my-3",children:[1,2,3,4,5].map(n=>{const r=n<=e,i=!r&&n-.5<=e;return w.jsxs("div",{className:"relative w-10 h-10",children:[w.jsx("svg",{className:"w-10 h-10 text-slate-200 fill-slate-200",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})}),i&&w.jsx("div",{className:"absolute top-0 left-0 w-5 h-10 overflow-hidden",children:w.jsx("svg",{className:"w-10 h-10 text-blue-500 fill-blue-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})})}),r&&w.jsx("svg",{className:"w-10 h-10 text-blue-500 fill-blue-500 absolute top-0 left-0",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})}),w.jsxs("div",{className:"absolute inset-0 flex",children:[w.jsx("button",{type:"button",onClick:()=>t(n-.5),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${n-.5} stars`}),w.jsx("button",{type:"button",onClick:()=>t(n),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${n} stars`})]})]},n)})})}function TI({onOk:e}){const[t,n]=y.useState(0),[r,i]=y.useState(!1),[s,o]=y.useState(10),a=xN();y.useEffect(()=>{if(r){const c=setInterval(()=>{o(d=>d<=1?(clearInterval(c),e(!0),0):d-1)},1e3);return()=>clearInterval(c)}},[r]);const l=Sm({comment:Cu()}),u=wT({init:{comment:""},schema:l,action:async c=>{const[d,h]=await a.mutateAsync({rating:t,comment:c.comment});if(bp(h)){i(!0);return}bT(d,{form:u})}}),f=()=>{e(!0)};return w.jsxs("div",{className:"flex flex-col h-full",children:[w.jsx("header",{style:{backgroundColor:r?"#ffffff":"#4F46E5",color:r?"#334155":"#ffffff",borderBottom:"1px solid #f1f5f9"},className:"p-4 rounded-t-xl flex justify-between items-center z-10",children:w.jsx("div",{className:"font-medium",children:r?"Teşekkürler!":"Görüşmenizi Değerlendirin"})}),w.jsx("div",{className:"flex-1 p-6 overflow-y-auto flex flex-col",children:r?w.jsxs(Re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"flex flex-col items-center justify-center h-full text-center",children:[w.jsx("div",{className:"text-green-500 mb-4",children:w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-16 w-16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),w.jsx("h2",{className:"text-xl font-semibold mb-2 text-slate-800",children:"Değerlendirmeniz için teşekkürler!"}),w.jsx("p",{className:"text-slate-600 mb-8",children:"Geri bildiriminiz bizim için çok değerli."}),w.jsxs("p",{className:"text-slate-500 mb-4",children:["Ekran ",s," saniye içinde kapanacaktır."]}),w.jsx(Gn,{onClick:f,className:"w-full max-w-xs bg-blue-600 hover:bg-blue-700 text-white rounded-lg py-2.5 font-medium transition-colors",children:"Yeni Görüşme Başlat"})]}):w.jsxs(Re.div,{initial:{opacity:0},animate:{opacity:1},className:"flex flex-col",children:[w.jsx("div",{className:"text-center mb-6",children:w.jsx("p",{className:"text-slate-600 text-base",children:"Lütfen hizmetimizi değerlendirin. Görüşleriniz bizim için önemli."})}),w.jsxs("div",{className:"mb-6",children:[w.jsx("h3",{className:"text-center font-medium mb-2 text-slate-800 text-lg",children:"Görüşmeyi puanlayın"}),w.jsx(SI,{rating:t,onChange:n}),t>0&&w.jsxs("p",{className:"text-center text-sm text-slate-500 mt-1",children:["Puanınız:"," ",Number.isInteger(t)?t:t.toFixed(1)]})]}),w.jsxs("form",{onSubmit:u.handleSubmit,className:"space-y-5",children:[w.jsxs("div",{children:[w.jsx("label",{htmlFor:"comment",className:"block text-sm font-medium text-slate-700 mb-1",children:"Yorumunuz (İsteğe bağlı)"}),w.jsx(Lm,{id:"comment",onChange:u.handleChange,onBlur:u.handleBlur,value:u.values.comment,placeholder:"Görüşme hakkında düşüncelerinizi paylaşın...",className:"rounded-lg border-slate-200 focus:border-blue-500 focus:ring-blue-500 shadow-sm"})]}),w.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[w.jsx(Gn,{type:"submit",disabled:t<1,className:"w-full bg-blue-600 hover:bg-blue-700 text-white rounded-lg py-2.5 font-medium transition-colors disabled:bg-slate-200 disabled:text-slate-400",children:"Değerlendirmeyi Gönder"}),w.jsx(Gn,{onClick:f,className:"w-full bg-slate-100 hover:bg-slate-200 text-slate-700 rounded-lg py-2.5 font-medium transition-colors",children:"Yeni Görüşme Başlat"})]})]})]})}),w.jsxs("a",{href:"https://alfatekyazilim.com.tr",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center text-slate-400 border-t border-slate-100 flex items-center justify-center gap-1 hover:text-slate-600 transition-colors",children:[w.jsx("span",{children:"Powered by"}),w.jsx("span",{className:"font-medium",children:"Alfatek"}),w.jsx("img",{src:"https://alfatekyazilim.com.tr/images/favicon.png",alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function EI({children:e}){const{widget:t}=tn();return t?w.jsx("section",{className:"h-full w-full relative",children:e}):null}function CI({children:e}){const t=Bi();return y.useEffect(()=>{t&&t.connect()},[]),!t||!t.connected?null:e}function kI(){const{widget:e,setOpen:t,setIsHaveChat:n}=tn(),r=Bi(),i=mm(),[s,o]=y.useState(null),[a,l]=y.useState([]),[u,f]=y.useState(!1),[c,d]=y.useState([]),h=()=>{if(s){o({...s,status:ii.Closed});return}m()},m=b=>{b||(t(!1),Ky()),n(!1),o(null),l([]),d([]),hh(e.client_id).then(()=>{r==null||r.disconnect(),i.push("registration")})};y.useEffect(()=>{r==null||r.emit(Dn.ChatView,{},b=>{if(b===null){t(!1),n(!1),hh(e.client_id),l([]),d([]),Ky(),i.push("registration");return}o(b),n(!0)})},[]);const v=y.useCallback(b=>{s&&![ii.Closed,ii.Deleted].includes(s.status)&&l([...a,b])},[a,s]);return y.useEffect(()=>{if(!r)return;const b=E=>{const S={content:E.content,created_at:E.created_at,files:E.files,id:E._id,sender_type:E.sender_type,answers:E.answers,reply_id:E.reply_id};if(c.length>0){d(C=>[...C,S]);return}E.is_shortcut?d([S]):v(S),f(!1)},p=E=>{o({...s,agent_name:E.name,agent_avatar:E.avatar,is_uploadable:(s==null?void 0:s.is_uploadable)??!1,status:(s==null?void 0:s.status)??ii.Open}),v({content:` _ _${E.name}`,created_at:new Date,files:[],id:Math.random().toString(),sender_type:et.Activity,activity_type:TT.AdminJoin,sender_name:E.name})},g=()=>{f(!0)},x=()=>{if(s){o({...s,status:ii.Closed});return}m()};return r.on(ut.MessageAgentCreate,b),r.on(ut.ChatUserAssignee,p),r.on(ut.MessageAgentTyping,g),r.on(ut.ChatUserClose,x),()=>{r.off(ut.MessageAgentCreate,b),r.off(ut.ChatUserAssignee,p),r.off(ut.MessageAgentTyping,g),r.off(ut.ChatUserClose,x)}},[v]),y.useEffect(()=>{!r||!s||r.emit(Dn.MessageList,{},b=>{l(b)})},[r,s]),y.useEffect(()=>{const b=setTimeout(()=>{f(!1)},2e3);return()=>clearTimeout(b)},[u]),y.useEffect(()=>{if(!e||c.length===0)return;let b=0;e.writing_timeout&&(b=[...c[0].content].length/e.writing_timeout,b<0&&(b=0));const p=setTimeout(()=>{v(c[0]),d(c.slice(1))},b*1e3);return()=>clearTimeout(p)},[c,e]),s?w.jsxs(w.Fragment,{children:[w.jsx("div",{id:"chat-alert-portal"}),w.jsx(Ni,{children:w.jsx(Re.div,{initial:{opacity:0,scale:.98,y:5},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.98,y:5},transition:{type:"spring",damping:35,stiffness:400,duration:.2},className:"bg-white h-full w-full rounded-xl shadow-sm flex flex-col overflow-hidden",children:s.status===ii.Closed?w.jsx(TI,{onOk:m}):w.jsx(bI,{chat:s,isTyping:u,messages:a,shortcutMessages:c,onNewMessage:v,onChatClose:h})})})]}):null}function _I(){return jL(),null}function PI(){return w.jsxs(CI,{children:[w.jsx(RS,{defaultOpen:!0,children:w.jsx(EI,{children:w.jsx(kI,{})})}),w.jsx(_I,{})]})}const AI=[{path:"/chat",component:PI,name:"chat"}],LT=[...AI],IT=[...LL],RI=[...LT,...IT];function OI(){return w.jsx(e2,{future:{v7_startTransition:!0},children:w.jsxs(n2,{children:[LT.map((e,t)=>w.jsx(Id,{path:e.path,element:w.jsx(e.component,{})},t)),IT.map((e,t)=>w.jsx(Id,{path:e.path,element:w.jsx(e.component,{})},t))]})})}function jI({link_id:e,defaultValues:t,soundPath:n}){const{setWidget:r,widget:i,setDefaultValues:s,setSoundPath:o}=tn(),{data:a,isLoading:l}=l_(e);return y.useEffect(()=>{Array.isArray(a)&&c_(a[0])&&(r(a[0]),s(t),o(n))},[a]),l||!i?null:w.jsx(wL,{children:w.jsx(pN,{children:w.jsx(OI,{})})})}const NI=new Hk;function MI({container:e,link_id:t,defaultValues:n,soundPath:r}){ow(e).render(w.jsxs(Qk,{client:NI,children:[w.jsx(jI,{link_id:t,defaultValues:n,soundPath:r}),w.jsx(dL,{richColors:!0,style:{zIndex:999999},position:"bottom-right"})]}))}window.widget=MI});export default DI();