@alfatech/livechat 2025.5.0-5.1 → 2025.5.0-5.2
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 +20 -20
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Vm=e=>{throw TypeError(e)};var
|
|
1
|
+
var Vm=e=>{throw TypeError(e)};var MT=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ec=(e,t,n)=>t.has(e)||Vm("Cannot "+n);var S=(e,t,n)=>(Ec(e,t,"read from private field"),n?n.call(e):t.get(e)),H=(e,t,n)=>t.has(e)?Vm("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),F=(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 $a=(e,t,n,r)=>({set _(i){F(e,t,i,n)},get _(){return S(e,t,r)}});var TI=MT((Ot,Mt)=>{function jT(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 zs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $v={exports:{}},Eu={},Vv={exports:{}},Z={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@ var Vm=e=>{throw TypeError(e)};var jT=(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 va=Symbol.for("react.element"),DT=Symbol.for("react.portal"),FT=Symbol.for("react.fragment"),NT=Symbol.for("react.strict_mode"),LT=Symbol.for("react.profiler"),IT=Symbol.for("react.provider"),$T=Symbol.for("react.context"),VT=Symbol.for("react.forward_ref"),BT=Symbol.for("react.suspense"),zT=Symbol.for("react.memo"),UT=Symbol.for("react.lazy"),Bm=Symbol.iterator;function HT(e){return e===null||typeof e!="object"?null:(e=Bm&&e[Bm]||e["@@iterator"],typeof e=="function"?e:null)}var Bv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},zv=Object.assign,Uv={};function Us(e,t,n){this.props=e,this.context=t,this.refs=Uv,this.updater=n||Bv}Us.prototype.isReactComponent={};Us.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")};Us.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Hv(){}Hv.prototype=Us.prototype;function
|
|
9
|
+
*/var va=Symbol.for("react.element"),DT=Symbol.for("react.portal"),FT=Symbol.for("react.fragment"),NT=Symbol.for("react.strict_mode"),LT=Symbol.for("react.profiler"),IT=Symbol.for("react.provider"),$T=Symbol.for("react.context"),VT=Symbol.for("react.forward_ref"),BT=Symbol.for("react.suspense"),zT=Symbol.for("react.memo"),UT=Symbol.for("react.lazy"),Bm=Symbol.iterator;function HT(e){return e===null||typeof e!="object"?null:(e=Bm&&e[Bm]||e["@@iterator"],typeof e=="function"?e:null)}var Bv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},zv=Object.assign,Uv={};function Us(e,t,n){this.props=e,this.context=t,this.refs=Uv,this.updater=n||Bv}Us.prototype.isReactComponent={};Us.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")};Us.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Hv(){}Hv.prototype=Us.prototype;function Ch(e,t,n){this.props=e,this.context=t,this.refs=Uv,this.updater=n||Bv}var kh=Ch.prototype=new Hv;kh.constructor=Ch;zv(kh,Us.prototype);kh.isPureReactComponent=!0;var zm=Array.isArray,Wv=Object.prototype.hasOwnProperty,_h={current:null},Kv={key:!0,ref:!0,__self:!0,__source:!0};function qv(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)Wv.call(t,r)&&!Kv.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),c=0;c<a;c++)l[c]=arguments[c+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:va,type:e,key:s,ref:o,props:i,_owner:_h.current}}function WT(e,t){return{$$typeof:va,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===va}function KT(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Um=/\/+/g;function Cc(e,t){return typeof e=="object"&&e!==null&&e.key!=null?KT(""+e.key):t.toString(36)}function ml(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 va:case DT:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+Cc(o,0):r,zm(i)?(n="",e!=null&&(n=e.replace(Um,"$&/")+"/"),ml(i,t,n,"",function(c){return c})):i!=null&&(Ph(i)&&(i=WT(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Um,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",zm(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+Cc(s,a);o+=ml(s,t,n,l,i)}else if(l=HT(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+Cc(s,a++),o+=ml(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 Va(e,t,n){if(e==null)return e;var r=[],i=0;return ml(e,r,"","",function(s){return t.call(n,s,i++)}),r}function qT(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 ut={current:null},gl={transition:null},QT={ReactCurrentDispatcher:ut,ReactCurrentBatchConfig:gl,ReactCurrentOwner:_h};function Qv(){throw Error("act(...) is not supported in production builds of React.")}Z.Children={map:Va,forEach:function(e,t,n){Va(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Va(e,function(){t++}),t},toArray:function(e){return Va(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=Us;Z.Fragment=FT;Z.Profiler=LT;Z.PureComponent=Ch;Z.StrictMode=NT;Z.Suspense=BT;Z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=QT;Z.act=Qv;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=zv({},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)Wv.call(t,l)&&!Kv.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 c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:va,type:e.type,key:i,ref:s,props:r,_owner:o}};Z.createContext=function(e){return e={$$typeof:$T,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:IT,_context:e},e.Consumer=e};Z.createElement=qv;Z.createFactory=function(e){var t=qv.bind(null,e);return t.type=e,t};Z.createRef=function(){return{current:null}};Z.forwardRef=function(e){return{$$typeof:VT,render:e}};Z.isValidElement=Ph;Z.lazy=function(e){return{$$typeof:UT,_payload:{_status:-1,_result:e},_init:qT}};Z.memo=function(e,t){return{$$typeof:zT,type:e,compare:t===void 0?null:t}};Z.startTransition=function(e){var t=gl.transition;gl.transition={};try{e()}finally{gl.transition=t}};Z.unstable_act=Qv;Z.useCallback=function(e,t){return ut.current.useCallback(e,t)};Z.useContext=function(e){return ut.current.useContext(e)};Z.useDebugValue=function(){};Z.useDeferredValue=function(e){return ut.current.useDeferredValue(e)};Z.useEffect=function(e,t){return ut.current.useEffect(e,t)};Z.useId=function(){return ut.current.useId()};Z.useImperativeHandle=function(e,t,n){return ut.current.useImperativeHandle(e,t,n)};Z.useInsertionEffect=function(e,t){return ut.current.useInsertionEffect(e,t)};Z.useLayoutEffect=function(e,t){return ut.current.useLayoutEffect(e,t)};Z.useMemo=function(e,t){return ut.current.useMemo(e,t)};Z.useReducer=function(e,t,n){return ut.current.useReducer(e,t,n)};Z.useRef=function(e){return ut.current.useRef(e)};Z.useState=function(e){return ut.current.useState(e)};Z.useSyncExternalStore=function(e,t,n){return ut.current.useSyncExternalStore(e,t,n)};Z.useTransition=function(){return ut.current.useTransition()};Z.version="18.3.1";Vv.exports=Z;var v=Vv.exports;const R=zs(v),_f=jT({__proto__:null,default:R},[v]);/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.production.min.js
|
|
12
12
|
*
|
|
@@ -22,7 +22,7 @@ var Vm=e=>{throw TypeError(e)};var jT=(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,W=O[V];if(0<i(W,L))O[V]=L,O[B]=W,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,W=O.length,q=W>>>1;V<q;){var ce=2*(V+1)-1,ye=O[ce],J=ce+1,Ie=O[J];if(0>i(ye,B))J<W&&0>i(Ie,ye)?(O[V]=Ie,O[J]=B,V=J):(O[V]=ye,O[ce]=B,V=ce);else if(J<W&&0>i(Ie,B))O[V]=Ie,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=[],c=[],f=1,u=null,d=3,h=!1,m=!1,x=!1,w=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 y(O){for(var L=n(c);L!==null;){if(L.callback===null)r(c);else if(L.startTime<=O)r(c),L.sortIndex=L.expirationTime,t(l,L);else break;L=n(c)}}function C(O){if(x=!1,y(O),!m)if(n(l)!==null)m=!0,G(b);else{var L=n(c);L!==null&&ne(C,L.startTime-O)}}function b(O,L){m=!1,x&&(x=!1,p(P),P=-1),h=!0;var B=d;try{for(y(L),u=n(l);u!==null&&(!(u.expirationTime>L)||O&&!I());){var V=u.callback;if(typeof V=="function"){u.callback=null,d=u.priorityLevel;var W=V(u.expirationTime<=L);L=e.unstable_now(),typeof W=="function"?u.callback=W:u===n(l)&&r(l),y(L)}else r(l);u=n(l)}if(u!==null)var q=!0;else{var ce=n(c);ce!==null&&ne(C,ce.startTime-L),q=!1}return q}finally{u=null,d=B,h=!1}}var E=!1,k=null,P=-1,
|
|
25
|
+
*/(function(e){function t(O,L){var B=O.length;O.push(L);e:for(;0<B;){var V=B-1>>>1,W=O[V];if(0<i(W,L))O[V]=L,O[B]=W,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,W=O.length,q=W>>>1;V<q;){var ce=2*(V+1)-1,ye=O[ce],J=ce+1,Ie=O[J];if(0>i(ye,B))J<W&&0>i(Ie,ye)?(O[V]=Ie,O[J]=B,V=J):(O[V]=ye,O[ce]=B,V=ce);else if(J<W&&0>i(Ie,B))O[V]=Ie,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=[],c=[],f=1,u=null,d=3,h=!1,m=!1,x=!1,w=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 y(O){for(var L=n(c);L!==null;){if(L.callback===null)r(c);else if(L.startTime<=O)r(c),L.sortIndex=L.expirationTime,t(l,L);else break;L=n(c)}}function C(O){if(x=!1,y(O),!m)if(n(l)!==null)m=!0,G(b);else{var L=n(c);L!==null&&ne(C,L.startTime-O)}}function b(O,L){m=!1,x&&(x=!1,p(P),P=-1),h=!0;var B=d;try{for(y(L),u=n(l);u!==null&&(!(u.expirationTime>L)||O&&!I());){var V=u.callback;if(typeof V=="function"){u.callback=null,d=u.priorityLevel;var W=V(u.expirationTime<=L);L=e.unstable_now(),typeof W=="function"?u.callback=W:u===n(l)&&r(l),y(L)}else r(l);u=n(l)}if(u!==null)var q=!0;else{var ce=n(c);ce!==null&&ne(C,ce.startTime-L),q=!1}return q}finally{u=null,d=B,h=!1}}var E=!1,k=null,P=-1,M=5,j=-1;function I(){return!(e.unstable_now()-j<M)}function re(){if(k!==null){var O=e.unstable_now();j=O;var L=!0;try{L=k(!0,O)}finally{L?ie():(E=!1,k=null)}}else E=!1}var ie;if(typeof g=="function")ie=function(){g(re)};else if(typeof MessageChannel<"u"){var xe=new MessageChannel,Re=xe.port2;xe.port1.onmessage=re,ie=function(){Re.postMessage(null)}}else ie=function(){w(re,0)};function G(O){k=O,E||(E=!0,ie())}function ne(O,L){P=w(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,G(b))},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"):M=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 W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=B+W,O={id:f++,callback:L,priorityLevel:O,startTime:B,expirationTime:W,sortIndex:-1},B>V?(O.sortIndex=B,t(c,O),n(l)===null&&O===n(c)&&(x?(p(P),P=-1):x=!0,ne(C,B-V))):(O.sortIndex=W,t(l,O),m||h||(m=!0,G(b))),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}}}})(Zv);Xv.exports=Zv;var tE=Xv.exports;/**
|
|
26
26
|
* @license React
|
|
27
27
|
* react-dom.production.min.js
|
|
28
28
|
*
|
|
@@ -30,14 +30,14 @@ var Vm=e=>{throw TypeError(e)};var jT=(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 nE=v,Dt=tE;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 Jv=new Set,No={};function Oi(e,t){Rs(e,t),Rs(e+"Capture",t)}function Rs(e,t){for(No[e]=t,e=0;e<t.length;e++)Jv.add(t[e])}var Qn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),
|
|
34
|
-
`+
|
|
33
|
+
*/var nE=v,Dt=tE;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 Jv=new Set,No={};function Oi(e,t){Rs(e,t),Rs(e+"Capture",t)}function Rs(e,t){for(No[e]=t,e=0;e<t.length;e++)Jv.add(t[e])}var Qn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pf=Object.prototype.hasOwnProperty,rE=/^[: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]*$/,Hm={},Wm={};function iE(e){return Pf.call(Wm,e)?!0:Pf.call(Hm,e)?!1:rE.test(e)?Wm[e]=!0:(Hm[e]=!0,!1)}function sE(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 oE(e,t,n,r){if(t===null||typeof t>"u"||sE(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 ct(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 Ge={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ge[e]=new ct(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ge[t]=new ct(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ge[e]=new ct(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ge[e]=new ct(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){Ge[e]=new ct(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ge[e]=new ct(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ge[e]=new ct(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ge[e]=new ct(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ge[e]=new ct(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);Ge[t]=new ct(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);Ge[t]=new ct(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);Ge[t]=new ct(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ge[e]=new ct(e,1,!1,e.toLowerCase(),null,!1,!1)});Ge.xlinkHref=new ct("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ge[e]=new ct(e,1,!1,e.toLowerCase(),null,!0,!0)});function Oh(e,t,n,r){var i=Ge.hasOwnProperty(t)?Ge[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(oE(t,n,i,r)&&(n=null),r||i===null?iE(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 er=nE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ba=Symbol.for("react.element"),Ki=Symbol.for("react.portal"),qi=Symbol.for("react.fragment"),Mh=Symbol.for("react.strict_mode"),Af=Symbol.for("react.profiler"),e1=Symbol.for("react.provider"),t1=Symbol.for("react.context"),jh=Symbol.for("react.forward_ref"),Rf=Symbol.for("react.suspense"),Of=Symbol.for("react.suspense_list"),Dh=Symbol.for("react.memo"),ur=Symbol.for("react.lazy"),n1=Symbol.for("react.offscreen"),Km=Symbol.iterator;function eo(e){return e===null||typeof e!="object"?null:(e=Km&&e[Km]||e["@@iterator"],typeof e=="function"?e:null)}var Te=Object.assign,kc;function fo(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(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.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{kc=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?fo(e):""}function aE(e){switch(e.tag){case 5:return fo(e.type);case 16:return fo("Lazy");case 13:return fo("Suspense");case 19:return fo("SuspenseList");case 0:case 2:case 15:return e=_c(e.type,!1),e;case 11:return e=_c(e.type.render,!1),e;case 1:return e=_c(e.type,!0),e;default:return""}}function Of(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 qi:return"Fragment";case Ki:return"Portal";case Pf:return"Profiler";case Oh:return"StrictMode";case Af:return"Suspense";case Rf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case t1:return(e.displayName||"Context")+".Consumer";case e1:return(e._context.displayName||"Context")+".Provider";case jh: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:Of(e.type)||"Memo";case ur:t=e._payload,e=e._init;try{return Of(e(t))}catch{}}return null}function lE(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 Of(t);case 8:return t===Oh?"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 $r(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function r1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function uE(e){var t=r1(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 za(e){e._valueTracker||(e._valueTracker=uE(e))}function i1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=r1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function $l(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 jf(e,t){var n=t.checked;return Te({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function qm(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=$r(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 s1(e,t){t=t.checked,t!=null&&Rh(e,"checked",t,!1)}function Mf(e,t){s1(e,t);var n=$r(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")?Df(e,t.type,n):t.hasOwnProperty("defaultValue")&&Df(e,t.type,$r(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Qm(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 Df(e,t,n){(t!=="number"||$l(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ho=Array.isArray;function cs(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=""+$r(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 Ff(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(A(91));return Te({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Gm(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(ho(n)){if(1<n.length)throw Error(A(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:$r(n)}}function o1(e,t){var n=$r(t.value),r=$r(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 Ym(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function a1(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 Nf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?a1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ua,l1=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(Ua=Ua||document.createElement("div"),Ua.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ua.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Lo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var wo={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},cE=["Webkit","ms","Moz","O"];Object.keys(wo).forEach(function(e){cE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),wo[t]=wo[e]})});function u1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||wo.hasOwnProperty(e)&&wo[e]?(""+t).trim():t+"px"}function c1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=u1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var fE=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 Lf(e,t){if(t){if(fE[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 If(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 $f=null;function Dh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Vf=null,fs=null,ds=null;function Xm(e){if(e=ba(e)){if(typeof Vf!="function")throw Error(A(280));var t=e.stateNode;t&&(t=Au(t),Vf(e.stateNode,e.type,t))}}function f1(e){fs?ds?ds.push(e):ds=[e]:fs=e}function d1(){if(fs){var e=fs,t=ds;if(ds=fs=null,Xm(e),t)for(e=0;e<t.length;e++)Xm(t[e])}}function h1(e,t){return e(t)}function p1(){}var Pc=!1;function m1(e,t,n){if(Pc)return e(t,n);Pc=!0;try{return h1(e,t,n)}finally{Pc=!1,(fs!==null||ds!==null)&&(p1(),d1())}}function Io(e,t){var n=e.stateNode;if(n===null)return null;var r=Au(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 Bf=!1;if(Qn)try{var to={};Object.defineProperty(to,"passive",{get:function(){Bf=!0}}),window.addEventListener("test",to,to),window.removeEventListener("test",to,to)}catch{Bf=!1}function dE(e,t,n,r,i,s,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(f){this.onError(f)}}var bo=!1,Vl=null,Bl=!1,zf=null,hE={onError:function(e){bo=!0,Vl=e}};function pE(e,t,n,r,i,s,o,a,l){bo=!1,Vl=null,dE.apply(hE,arguments)}function mE(e,t,n,r,i,s,o,a,l){if(pE.apply(this,arguments),bo){if(bo){var c=Vl;bo=!1,Vl=null}else throw Error(A(198));Bl||(Bl=!0,zf=c)}}function ji(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 g1(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 Zm(e){if(ji(e)!==e)throw Error(A(188))}function gE(e){var t=e.alternate;if(!t){if(t=ji(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 Zm(i),e;if(s===r)return Zm(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 y1(e){return e=gE(e),e!==null?v1(e):null}function v1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=v1(e);if(t!==null)return t;e=e.sibling}return null}var x1=Dt.unstable_scheduleCallback,Jm=Dt.unstable_cancelCallback,yE=Dt.unstable_shouldYield,vE=Dt.unstable_requestPaint,Ae=Dt.unstable_now,xE=Dt.unstable_getCurrentPriorityLevel,Fh=Dt.unstable_ImmediatePriority,w1=Dt.unstable_UserBlockingPriority,zl=Dt.unstable_NormalPriority,wE=Dt.unstable_LowPriority,b1=Dt.unstable_IdlePriority,Cu=null,Cn=null;function bE(e){if(Cn&&typeof Cn.onCommitFiberRoot=="function")try{Cn.onCommitFiberRoot(Cu,e,void 0,(e.current.flags&128)===128)}catch{}}var dn=Math.clz32?Math.clz32:EE,SE=Math.log,TE=Math.LN2;function EE(e){return e>>>=0,e===0?32:31-(SE(e)/TE|0)|0}var Ha=64,Wa=4194304;function po(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 Ul(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=po(a):(s&=o,s!==0&&(r=po(s)))}else o=n&~i,o!==0?r=po(o):s!==0&&(r=po(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-dn(t),i=1<<n,r|=e[n],t&=~i;return r}function CE(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 kE(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-dn(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=CE(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function Uf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function S1(){var e=Ha;return Ha<<=1,!(Ha&4194240)&&(Ha=64),e}function Ac(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function xa(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-dn(t),e[t]=n}function _E(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-dn(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function Nh(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-dn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var le=0;function T1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var E1,Lh,C1,k1,_1,Hf=!1,Ka=[],_r=null,Pr=null,Ar=null,$o=new Map,Vo=new Map,dr=[],PE="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 eg(e,t){switch(e){case"focusin":case"focusout":_r=null;break;case"dragenter":case"dragleave":Pr=null;break;case"mouseover":case"mouseout":Ar=null;break;case"pointerover":case"pointerout":$o.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Vo.delete(t.pointerId)}}function no(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=ba(t),t!==null&&Lh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function AE(e,t,n,r,i){switch(t){case"focusin":return _r=no(_r,e,t,n,r,i),!0;case"dragenter":return Pr=no(Pr,e,t,n,r,i),!0;case"mouseover":return Ar=no(Ar,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return $o.set(s,no($o.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Vo.set(s,no(Vo.get(s)||null,e,t,n,r,i)),!0}return!1}function P1(e){var t=ii(e.target);if(t!==null){var n=ji(t);if(n!==null){if(t=n.tag,t===13){if(t=g1(n),t!==null){e.blockedOn=t,_1(e.priority,function(){C1(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 yl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Wf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);$f=r,n.target.dispatchEvent(r),$f=null}else return t=ba(n),t!==null&&Lh(t),e.blockedOn=n,!1;t.shift()}return!0}function tg(e,t,n){yl(e)&&n.delete(t)}function RE(){Hf=!1,_r!==null&&yl(_r)&&(_r=null),Pr!==null&&yl(Pr)&&(Pr=null),Ar!==null&&yl(Ar)&&(Ar=null),$o.forEach(tg),Vo.forEach(tg)}function ro(e,t){e.blockedOn===t&&(e.blockedOn=null,Hf||(Hf=!0,Dt.unstable_scheduleCallback(Dt.unstable_NormalPriority,RE)))}function Bo(e){function t(i){return ro(i,e)}if(0<Ka.length){ro(Ka[0],e);for(var n=1;n<Ka.length;n++){var r=Ka[n];r.blockedOn===e&&(r.blockedOn=null)}}for(_r!==null&&ro(_r,e),Pr!==null&&ro(Pr,e),Ar!==null&&ro(Ar,e),$o.forEach(t),Vo.forEach(t),n=0;n<dr.length;n++)r=dr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<dr.length&&(n=dr[0],n.blockedOn===null);)P1(n),n.blockedOn===null&&dr.shift()}var hs=er.ReactCurrentBatchConfig,Hl=!0;function OE(e,t,n,r){var i=le,s=hs.transition;hs.transition=null;try{le=1,Ih(e,t,n,r)}finally{le=i,hs.transition=s}}function jE(e,t,n,r){var i=le,s=hs.transition;hs.transition=null;try{le=4,Ih(e,t,n,r)}finally{le=i,hs.transition=s}}function Ih(e,t,n,r){if(Hl){var i=Wf(e,t,n,r);if(i===null)$c(e,t,r,Wl,n),eg(e,r);else if(AE(i,e,t,n,r))r.stopPropagation();else if(eg(e,r),t&4&&-1<PE.indexOf(e)){for(;i!==null;){var s=ba(i);if(s!==null&&E1(s),s=Wf(e,t,n,r),s===null&&$c(e,t,r,Wl,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else $c(e,t,r,null,n)}}var Wl=null;function Wf(e,t,n,r){if(Wl=null,e=Dh(r),e=ii(e),e!==null)if(t=ji(e),t===null)e=null;else if(n=t.tag,n===13){if(e=g1(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 Wl=e,null}function A1(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(xE()){case Fh:return 1;case w1:return 4;case zl:case wE:return 16;case b1:return 536870912;default:return 16}default:return 16}}var Tr=null,$h=null,vl=null;function R1(){if(vl)return vl;var e,t=$h,n=t.length,r,i="value"in Tr?Tr.value:Tr.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 vl=i.slice(e,1<r?1-r:void 0)}function xl(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 ng(){return!1}function Nt(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:ng,this.isPropagationStopped=ng,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 Hs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Vh=Nt(Hs),wa=Te({},Hs,{view:0,detail:0}),ME=Nt(wa),Rc,Oc,io,ku=Te({},wa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bh,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!==io&&(io&&e.type==="mousemove"?(Rc=e.screenX-io.screenX,Oc=e.screenY-io.screenY):Oc=Rc=0,io=e),Rc)},movementY:function(e){return"movementY"in e?e.movementY:Oc}}),rg=Nt(ku),DE=Te({},ku,{dataTransfer:0}),FE=Nt(DE),NE=Te({},wa,{relatedTarget:0}),jc=Nt(NE),LE=Te({},Hs,{animationName:0,elapsedTime:0,pseudoElement:0}),IE=Nt(LE),$E=Te({},Hs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),VE=Nt($E),BE=Te({},Hs,{data:0}),ig=Nt(BE),zE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},UE={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"},HE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function WE(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=HE[e])?!!t[e]:!1}function Bh(){return WE}var KE=Te({},wa,{key:function(e){if(e.key){var t=zE[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=xl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?UE[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bh,charCode:function(e){return e.type==="keypress"?xl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?xl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),qE=Nt(KE),QE=Te({},ku,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),sg=Nt(QE),GE=Te({},wa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bh}),YE=Nt(GE),XE=Te({},Hs,{propertyName:0,elapsedTime:0,pseudoElement:0}),ZE=Nt(XE),JE=Te({},ku,{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}),eC=Nt(JE),tC=[9,13,27,32],zh=Qn&&"CompositionEvent"in window,So=null;Qn&&"documentMode"in document&&(So=document.documentMode);var nC=Qn&&"TextEvent"in window&&!So,O1=Qn&&(!zh||So&&8<So&&11>=So),og=" ",ag=!1;function j1(e,t){switch(e){case"keyup":return tC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function M1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Qi=!1;function rC(e,t){switch(e){case"compositionend":return M1(t);case"keypress":return t.which!==32?null:(ag=!0,og);case"textInput":return e=t.data,e===og&&ag?null:e;default:return null}}function iC(e,t){if(Qi)return e==="compositionend"||!zh&&j1(e,t)?(e=R1(),vl=$h=Tr=null,Qi=!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 O1&&t.locale!=="ko"?null:t.data;default:return null}}var sC={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function lg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!sC[e.type]:t==="textarea"}function D1(e,t,n,r){f1(r),t=Kl(t,"onChange"),0<t.length&&(n=new Vh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var To=null,zo=null;function oC(e){W1(e,0)}function _u(e){var t=Xi(e);if(i1(t))return e}function aC(e,t){if(e==="change")return t}var F1=!1;if(Qn){var Mc;if(Qn){var Dc="oninput"in document;if(!Dc){var ug=document.createElement("div");ug.setAttribute("oninput","return;"),Dc=typeof ug.oninput=="function"}Mc=Dc}else Mc=!1;F1=Mc&&(!document.documentMode||9<document.documentMode)}function cg(){To&&(To.detachEvent("onpropertychange",N1),zo=To=null)}function N1(e){if(e.propertyName==="value"&&_u(zo)){var t=[];D1(t,zo,e,Dh(e)),m1(oC,t)}}function lC(e,t,n){e==="focusin"?(cg(),To=t,zo=n,To.attachEvent("onpropertychange",N1)):e==="focusout"&&cg()}function uC(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return _u(zo)}function cC(e,t){if(e==="click")return _u(t)}function fC(e,t){if(e==="input"||e==="change")return _u(t)}function dC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pn=typeof Object.is=="function"?Object.is:dC;function Uo(e,t){if(pn(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(!_f.call(t,i)||!pn(e[i],t[i]))return!1}return!0}function fg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function dg(e,t){var n=fg(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=fg(n)}}function L1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?L1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function I1(){for(var e=window,t=$l();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=$l(e.document)}return t}function Uh(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 hC(e){var t=I1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&L1(n.ownerDocument.documentElement,n)){if(r!==null&&Uh(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=dg(n,s);var o=dg(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 pC=Qn&&"documentMode"in document&&11>=document.documentMode,Gi=null,Kf=null,Eo=null,qf=!1;function hg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;qf||Gi==null||Gi!==$l(r)||(r=Gi,"selectionStart"in r&&Uh(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}),Eo&&Uo(Eo,r)||(Eo=r,r=Kl(Kf,"onSelect"),0<r.length&&(t=new Vh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Gi)))}function Qa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Yi={animationend:Qa("Animation","AnimationEnd"),animationiteration:Qa("Animation","AnimationIteration"),animationstart:Qa("Animation","AnimationStart"),transitionend:Qa("Transition","TransitionEnd")},Fc={},$1={};Qn&&($1=document.createElement("div").style,"AnimationEvent"in window||(delete Yi.animationend.animation,delete Yi.animationiteration.animation,delete Yi.animationstart.animation),"TransitionEvent"in window||delete Yi.transitionend.transition);function Pu(e){if(Fc[e])return Fc[e];if(!Yi[e])return e;var t=Yi[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in $1)return Fc[e]=t[n];return e}var V1=Pu("animationend"),B1=Pu("animationiteration"),z1=Pu("animationstart"),U1=Pu("transitionend"),H1=new Map,pg="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 Hr(e,t){H1.set(e,t),Oi(t,[e])}for(var Nc=0;Nc<pg.length;Nc++){var Lc=pg[Nc],mC=Lc.toLowerCase(),gC=Lc[0].toUpperCase()+Lc.slice(1);Hr(mC,"on"+gC)}Hr(V1,"onAnimationEnd");Hr(B1,"onAnimationIteration");Hr(z1,"onAnimationStart");Hr("dblclick","onDoubleClick");Hr("focusin","onFocus");Hr("focusout","onBlur");Hr(U1,"onTransitionEnd");Rs("onMouseEnter",["mouseout","mouseover"]);Rs("onMouseLeave",["mouseout","mouseover"]);Rs("onPointerEnter",["pointerout","pointerover"]);Rs("onPointerLeave",["pointerout","pointerover"]);Oi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Oi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Oi("onBeforeInput",["compositionend","keypress","textInput","paste"]);Oi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Oi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Oi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var mo="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(" "),yC=new Set("cancel close invalid load scroll toggle".split(" ").concat(mo));function mg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,mE(r,t,void 0,e),e.currentTarget=null}function W1(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,c=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;mg(i,a,c),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;mg(i,a,c),s=l}}}if(Bl)throw e=zf,Bl=!1,zf=null,e}function pe(e,t){var n=t[Zf];n===void 0&&(n=t[Zf]=new Set);var r=e+"__bubble";n.has(r)||(K1(t,e,2,!1),n.add(r))}function Ic(e,t,n){var r=0;t&&(r|=4),K1(n,e,r,t)}var Ga="_reactListening"+Math.random().toString(36).slice(2);function Ho(e){if(!e[Ga]){e[Ga]=!0,Jv.forEach(function(n){n!=="selectionchange"&&(yC.has(n)||Ic(n,!1,e),Ic(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ga]||(t[Ga]=!0,Ic("selectionchange",!1,t))}}function K1(e,t,n,r){switch(A1(t)){case 1:var i=OE;break;case 4:i=jE;break;default:i=Ih}n=i.bind(null,t,n,e),i=void 0,!Bf||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 $c(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=ii(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}m1(function(){var c=s,f=Dh(n),u=[];e:{var d=H1.get(e);if(d!==void 0){var h=Vh,m=e;switch(e){case"keypress":if(xl(n)===0)break e;case"keydown":case"keyup":h=qE;break;case"focusin":m="focus",h=jc;break;case"focusout":m="blur",h=jc;break;case"beforeblur":case"afterblur":h=jc;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=rg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=FE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=YE;break;case V1:case B1:case z1:h=IE;break;case U1:h=ZE;break;case"scroll":h=ME;break;case"wheel":h=eC;break;case"copy":case"cut":case"paste":h=VE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=sg}var x=(t&4)!==0,w=!x&&e==="scroll",p=x?d!==null?d+"Capture":null:d;x=[];for(var g=c,y;g!==null;){y=g;var C=y.stateNode;if(y.tag===5&&C!==null&&(y=C,p!==null&&(C=Io(g,p),C!=null&&x.push(Wo(g,C,y)))),w)break;g=g.return}0<x.length&&(d=new h(d,m,null,n,f),u.push({event:d,listeners:x}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&n!==$f&&(m=n.relatedTarget||n.fromElement)&&(ii(m)||m[Gn]))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=c,m=m?ii(m):null,m!==null&&(w=ji(m),m!==w||m.tag!==5&&m.tag!==6)&&(m=null)):(h=null,m=c),h!==m)){if(x=rg,C="onMouseLeave",p="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(x=sg,C="onPointerLeave",p="onPointerEnter",g="pointer"),w=h==null?d:Xi(h),y=m==null?d:Xi(m),d=new x(C,g+"leave",h,n,f),d.target=w,d.relatedTarget=y,C=null,ii(f)===c&&(x=new x(p,g+"enter",m,n,f),x.target=y,x.relatedTarget=w,C=x),w=C,h&&m)t:{for(x=h,p=m,g=0,y=x;y;y=Hi(y))g++;for(y=0,C=p;C;C=Hi(C))y++;for(;0<g-y;)x=Hi(x),g--;for(;0<y-g;)p=Hi(p),y--;for(;g--;){if(x===p||p!==null&&x===p.alternate)break t;x=Hi(x),p=Hi(p)}x=null}else x=null;h!==null&&gg(u,d,h,x,!1),m!==null&&w!==null&&gg(u,w,m,x,!0)}}e:{if(d=c?Xi(c):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var b=aC;else if(lg(d))if(F1)b=fC;else{b=uC;var E=lC}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(b=cC);if(b&&(b=b(e,c))){D1(u,b,n,f);break e}E&&E(e,d,c),e==="focusout"&&(E=d._wrapperState)&&E.controlled&&d.type==="number"&&Df(d,"number",d.value)}switch(E=c?Xi(c):window,e){case"focusin":(lg(E)||E.contentEditable==="true")&&(Gi=E,Kf=c,Eo=null);break;case"focusout":Eo=Kf=Gi=null;break;case"mousedown":qf=!0;break;case"contextmenu":case"mouseup":case"dragend":qf=!1,hg(u,n,f);break;case"selectionchange":if(pC)break;case"keydown":case"keyup":hg(u,n,f)}var k;if(zh)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 Qi?j1(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(O1&&n.locale!=="ko"&&(Qi||P!=="onCompositionStart"?P==="onCompositionEnd"&&Qi&&(k=R1()):(Tr=f,$h="value"in Tr?Tr.value:Tr.textContent,Qi=!0)),E=Kl(c,P),0<E.length&&(P=new ig(P,e,null,n,f),u.push({event:P,listeners:E}),k?P.data=k:(k=M1(n),k!==null&&(P.data=k)))),(k=nC?rC(e,n):iC(e,n))&&(c=Kl(c,"onBeforeInput"),0<c.length&&(f=new ig("onBeforeInput","beforeinput",null,n,f),u.push({event:f,listeners:c}),f.data=k))}W1(u,t)})}function Wo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Kl(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Io(e,n),s!=null&&r.unshift(Wo(e,s,i)),s=Io(e,t),s!=null&&r.push(Wo(e,s,i))),e=e.return}return r}function Hi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function gg(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,i?(l=Io(n,s),l!=null&&o.unshift(Wo(n,l,a))):i||(l=Io(n,s),l!=null&&o.push(Wo(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var vC=/\r\n?/g,xC=/\u0000|\uFFFD/g;function yg(e){return(typeof e=="string"?e:""+e).replace(vC,`
|
|
38
|
-
`).replace(xC,"")}function Ya(e,t,n){if(t=yg(t),yg(e)!==t&&n)throw Error(A(425))}function ql(){}var Qf=null,Gf=null;function Yf(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 Xf=typeof setTimeout=="function"?setTimeout:void 0,wC=typeof clearTimeout=="function"?clearTimeout:void 0,vg=typeof Promise=="function"?Promise:void 0,bC=typeof queueMicrotask=="function"?queueMicrotask:typeof vg<"u"?function(e){return vg.resolve(null).then(e).catch(SC)}:Xf;function SC(e){setTimeout(function(){throw e})}function Vc(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),Bo(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Bo(t)}function Rr(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 xg(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 Ws=Math.random().toString(36).slice(2),En="__reactFiber$"+Ws,Ko="__reactProps$"+Ws,Gn="__reactContainer$"+Ws,Zf="__reactEvents$"+Ws,TC="__reactListeners$"+Ws,EC="__reactHandles$"+Ws;function ii(e){var t=e[En];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Gn]||n[En]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=xg(e);e!==null;){if(n=e[En])return n;e=xg(e)}return t}e=n,n=e.parentNode}return null}function ba(e){return e=e[En]||e[Gn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Xi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(A(33))}function Au(e){return e[Ko]||null}var Jf=[],Zi=-1;function Wr(e){return{current:e}}function ge(e){0>Zi||(e.current=Jf[Zi],Jf[Zi]=null,Zi--)}function de(e,t){Zi++,Jf[Zi]=e.current,e.current=t}var Vr={},rt=Wr(Vr),bt=Wr(!1),Ti=Vr;function Os(e,t){var n=e.type.contextTypes;if(!n)return Vr;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 St(e){return e=e.childContextTypes,e!=null}function Ql(){ge(bt),ge(rt)}function wg(e,t,n){if(rt.current!==Vr)throw Error(A(168));de(rt,t),de(bt,n)}function q1(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,lE(e)||"Unknown",i));return Te({},n,r)}function Gl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Vr,Ti=rt.current,de(rt,e),de(bt,bt.current),!0}function bg(e,t,n){var r=e.stateNode;if(!r)throw Error(A(169));n?(e=q1(e,t,Ti),r.__reactInternalMemoizedMergedChildContext=e,ge(bt),ge(rt),de(rt,e)):ge(bt),de(bt,n)}var Vn=null,Ru=!1,Bc=!1;function Q1(e){Vn===null?Vn=[e]:Vn.push(e)}function CC(e){Ru=!0,Q1(e)}function Kr(){if(!Bc&&Vn!==null){Bc=!0;var e=0,t=le;try{var n=Vn;for(le=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Vn=null,Ru=!1}catch(i){throw Vn!==null&&(Vn=Vn.slice(e+1)),x1(Fh,Kr),i}finally{le=t,Bc=!1}}return null}var Ji=[],es=0,Yl=null,Xl=0,Wt=[],Kt=0,Ei=null,Un=1,Hn="";function Jr(e,t){Ji[es++]=Xl,Ji[es++]=Yl,Yl=e,Xl=t}function G1(e,t,n){Wt[Kt++]=Un,Wt[Kt++]=Hn,Wt[Kt++]=Ei,Ei=e;var r=Un;e=Hn;var i=32-dn(r)-1;r&=~(1<<i),n+=1;var s=32-dn(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Un=1<<32-dn(t)+i|n<<i|r,Hn=s+e}else Un=1<<s|n<<i|r,Hn=e}function Hh(e){e.return!==null&&(Jr(e,1),G1(e,1,0))}function Wh(e){for(;e===Yl;)Yl=Ji[--es],Ji[es]=null,Xl=Ji[--es],Ji[es]=null;for(;e===Ei;)Ei=Wt[--Kt],Wt[Kt]=null,Hn=Wt[--Kt],Wt[Kt]=null,Un=Wt[--Kt],Wt[Kt]=null}var Mt=null,Rt=null,ve=!1,un=null;function Y1(e,t){var n=Qt(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 Sg(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,Mt=e,Rt=Rr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Mt=e,Rt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ei!==null?{id:Un,overflow:Hn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Qt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Mt=e,Rt=null,!0):!1;default:return!1}}function ed(e){return(e.mode&1)!==0&&(e.flags&128)===0}function td(e){if(ve){var t=Rt;if(t){var n=t;if(!Sg(e,t)){if(ed(e))throw Error(A(418));t=Rr(n.nextSibling);var r=Mt;t&&Sg(e,t)?Y1(r,n):(e.flags=e.flags&-4097|2,ve=!1,Mt=e)}}else{if(ed(e))throw Error(A(418));e.flags=e.flags&-4097|2,ve=!1,Mt=e}}}function Tg(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Mt=e}function Xa(e){if(e!==Mt)return!1;if(!ve)return Tg(e),ve=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Yf(e.type,e.memoizedProps)),t&&(t=Rt)){if(ed(e))throw X1(),Error(A(418));for(;t;)Y1(e,t),t=Rr(t.nextSibling)}if(Tg(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){Rt=Rr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Rt=null}}else Rt=Mt?Rr(e.stateNode.nextSibling):null;return!0}function X1(){for(var e=Rt;e;)e=Rr(e.nextSibling)}function js(){Rt=Mt=null,ve=!1}function Kh(e){un===null?un=[e]:un.push(e)}var kC=er.ReactCurrentBatchConfig;function so(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 Za(e,t){throw e=Object.prototype.toString.call(t),Error(A(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Eg(e){var t=e._init;return t(e._payload)}function Z1(e){function t(p,g){if(e){var y=p.deletions;y===null?(p.deletions=[g],p.flags|=16):y.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,y){return p.index=y,e?(y=p.alternate,y!==null?(y=y.index,y<g?(p.flags|=2,g):y):(p.flags|=2,g)):(p.flags|=1048576,g)}function o(p){return e&&p.alternate===null&&(p.flags|=2),p}function a(p,g,y,C){return g===null||g.tag!==6?(g=Qc(y,p.mode,C),g.return=p,g):(g=i(g,y),g.return=p,g)}function l(p,g,y,C){var b=y.type;return b===qi?f(p,g,y.props.children,C,y.key):g!==null&&(g.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===ur&&Eg(b)===g.type)?(C=i(g,y.props),C.ref=so(p,g,y),C.return=p,C):(C=kl(y.type,y.key,y.props,null,p.mode,C),C.ref=so(p,g,y),C.return=p,C)}function c(p,g,y,C){return g===null||g.tag!==4||g.stateNode.containerInfo!==y.containerInfo||g.stateNode.implementation!==y.implementation?(g=Gc(y,p.mode,C),g.return=p,g):(g=i(g,y.children||[]),g.return=p,g)}function f(p,g,y,C,b){return g===null||g.tag!==7?(g=xi(y,p.mode,C,b),g.return=p,g):(g=i(g,y),g.return=p,g)}function u(p,g,y){if(typeof g=="string"&&g!==""||typeof g=="number")return g=Qc(""+g,p.mode,y),g.return=p,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Ba:return y=kl(g.type,g.key,g.props,null,p.mode,y),y.ref=so(p,null,g),y.return=p,y;case Ki:return g=Gc(g,p.mode,y),g.return=p,g;case ur:var C=g._init;return u(p,C(g._payload),y)}if(ho(g)||eo(g))return g=xi(g,p.mode,y,null),g.return=p,g;Za(p,g)}return null}function d(p,g,y,C){var b=g!==null?g.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return b!==null?null:a(p,g,""+y,C);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Ba:return y.key===b?l(p,g,y,C):null;case Ki:return y.key===b?c(p,g,y,C):null;case ur:return b=y._init,d(p,g,b(y._payload),C)}if(ho(y)||eo(y))return b!==null?null:f(p,g,y,C,null);Za(p,y)}return null}function h(p,g,y,C,b){if(typeof C=="string"&&C!==""||typeof C=="number")return p=p.get(y)||null,a(g,p,""+C,b);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case Ba:return p=p.get(C.key===null?y:C.key)||null,l(g,p,C,b);case Ki:return p=p.get(C.key===null?y:C.key)||null,c(g,p,C,b);case ur:var E=C._init;return h(p,g,y,E(C._payload),b)}if(ho(C)||eo(C))return p=p.get(y)||null,f(g,p,C,b,null);Za(g,C)}return null}function m(p,g,y,C){for(var b=null,E=null,k=g,P=g=0,j=null;k!==null&&P<y.length;P++){k.index>P?(j=k,k=null):j=k.sibling;var M=d(p,k,y[P],C);if(M===null){k===null&&(k=j);break}e&&k&&M.alternate===null&&t(p,k),g=s(M,g,P),E===null?b=M:E.sibling=M,E=M,k=j}if(P===y.length)return n(p,k),ve&&Jr(p,P),b;if(k===null){for(;P<y.length;P++)k=u(p,y[P],C),k!==null&&(g=s(k,g,P),E===null?b=k:E.sibling=k,E=k);return ve&&Jr(p,P),b}for(k=r(p,k);P<y.length;P++)j=h(k,p,P,y[P],C),j!==null&&(e&&j.alternate!==null&&k.delete(j.key===null?P:j.key),g=s(j,g,P),E===null?b=j:E.sibling=j,E=j);return e&&k.forEach(function(I){return t(p,I)}),ve&&Jr(p,P),b}function x(p,g,y,C){var b=eo(y);if(typeof b!="function")throw Error(A(150));if(y=b.call(y),y==null)throw Error(A(151));for(var E=b=null,k=g,P=g=0,j=null,M=y.next();k!==null&&!M.done;P++,M=y.next()){k.index>P?(j=k,k=null):j=k.sibling;var I=d(p,k,M.value,C);if(I===null){k===null&&(k=j);break}e&&k&&I.alternate===null&&t(p,k),g=s(I,g,P),E===null?b=I:E.sibling=I,E=I,k=j}if(M.done)return n(p,k),ve&&Jr(p,P),b;if(k===null){for(;!M.done;P++,M=y.next())M=u(p,M.value,C),M!==null&&(g=s(M,g,P),E===null?b=M:E.sibling=M,E=M);return ve&&Jr(p,P),b}for(k=r(p,k);!M.done;P++,M=y.next())M=h(k,p,P,M.value,C),M!==null&&(e&&M.alternate!==null&&k.delete(M.key===null?P:M.key),g=s(M,g,P),E===null?b=M:E.sibling=M,E=M);return e&&k.forEach(function(re){return t(p,re)}),ve&&Jr(p,P),b}function w(p,g,y,C){if(typeof y=="object"&&y!==null&&y.type===qi&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Ba:e:{for(var b=y.key,E=g;E!==null;){if(E.key===b){if(b=y.type,b===qi){if(E.tag===7){n(p,E.sibling),g=i(E,y.props.children),g.return=p,p=g;break e}}else if(E.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===ur&&Eg(b)===E.type){n(p,E.sibling),g=i(E,y.props),g.ref=so(p,E,y),g.return=p,p=g;break e}n(p,E);break}else t(p,E);E=E.sibling}y.type===qi?(g=xi(y.props.children,p.mode,C,y.key),g.return=p,p=g):(C=kl(y.type,y.key,y.props,null,p.mode,C),C.ref=so(p,g,y),C.return=p,p=C)}return o(p);case Ki:e:{for(E=y.key;g!==null;){if(g.key===E)if(g.tag===4&&g.stateNode.containerInfo===y.containerInfo&&g.stateNode.implementation===y.implementation){n(p,g.sibling),g=i(g,y.children||[]),g.return=p,p=g;break e}else{n(p,g);break}else t(p,g);g=g.sibling}g=Gc(y,p.mode,C),g.return=p,p=g}return o(p);case ur:return E=y._init,w(p,g,E(y._payload),C)}if(ho(y))return m(p,g,y,C);if(eo(y))return x(p,g,y,C);Za(p,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,g!==null&&g.tag===6?(n(p,g.sibling),g=i(g,y),g.return=p,p=g):(n(p,g),g=Qc(y,p.mode,C),g.return=p,p=g),o(p)):n(p,g)}return w}var Ms=Z1(!0),J1=Z1(!1),Zl=Wr(null),Jl=null,ts=null,qh=null;function Qh(){qh=ts=Jl=null}function Gh(e){var t=Zl.current;ge(Zl),e._currentValue=t}function nd(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 ps(e,t){Jl=e,qh=ts=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(wt=!0),e.firstContext=null)}function Xt(e){var t=e._currentValue;if(qh!==e)if(e={context:e,memoizedValue:t,next:null},ts===null){if(Jl===null)throw Error(A(308));ts=e,Jl.dependencies={lanes:0,firstContext:e}}else ts=ts.next=e;return t}var si=null;function Yh(e){si===null?si=[e]:si.push(e)}function ex(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Yh(t)):(n.next=i.next,i.next=n),t.interleaved=n,Yn(e,r)}function Yn(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 cr=!1;function Xh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function tx(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 Kn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Or(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,Yn(e,n)}return i=r.interleaved,i===null?(t.next=t,Yh(r)):(t.next=i.next,i.next=t),r.interleaved=t,Yn(e,n)}function wl(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,Nh(e,n)}}function Cg(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 eu(e,t,n,r){var i=e.updateQueue;cr=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?s=c:o.next=c,o=l;var f=e.alternate;f!==null&&(f=f.updateQueue,a=f.lastBaseUpdate,a!==o&&(a===null?f.firstBaseUpdate=c:a.next=c,f.lastBaseUpdate=l))}if(s!==null){var u=i.baseState;o=0,f=c=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"){u=m.call(h,u,d);break e}u=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=x.payload,d=typeof m=="function"?m.call(h,u,d):m,d==null)break e;u=Te({},u,d);break e;case 2:cr=!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?(c=f=h,l=u):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=u),i.baseState=l,i.firstBaseUpdate=c,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);ki|=o,e.lanes=o,e.memoizedState=u}}function kg(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 Sa={},kn=Wr(Sa),qo=Wr(Sa),Qo=Wr(Sa);function oi(e){if(e===Sa)throw Error(A(174));return e}function Zh(e,t){switch(de(Qo,t),de(qo,e),de(kn,Sa),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Nf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Nf(t,e)}ge(kn),de(kn,t)}function Ds(){ge(kn),ge(qo),ge(Qo)}function nx(e){oi(Qo.current);var t=oi(kn.current),n=Nf(t,e.type);t!==n&&(de(qo,e),de(kn,n))}function Jh(e){qo.current===e&&(ge(kn),ge(qo))}var we=Wr(0);function tu(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 zc=[];function ep(){for(var e=0;e<zc.length;e++)zc[e]._workInProgressVersionPrimary=null;zc.length=0}var bl=er.ReactCurrentDispatcher,Uc=er.ReactCurrentBatchConfig,Ci=0,Se=null,De=null,Be=null,nu=!1,Co=!1,Go=0,_C=0;function Xe(){throw Error(A(321))}function tp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!pn(e[n],t[n]))return!1;return!0}function np(e,t,n,r,i,s){if(Ci=s,Se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,bl.current=e===null||e.memoizedState===null?OC:jC,e=n(r,i),Co){s=0;do{if(Co=!1,Go=0,25<=s)throw Error(A(301));s+=1,Be=De=null,t.updateQueue=null,bl.current=MC,e=n(r,i)}while(Co)}if(bl.current=ru,t=De!==null&&De.next!==null,Ci=0,Be=De=Se=null,nu=!1,t)throw Error(A(300));return e}function rp(){var e=Go!==0;return Go=0,e}function vn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Be===null?Se.memoizedState=Be=e:Be=Be.next=e,Be}function Zt(){if(De===null){var e=Se.alternate;e=e!==null?e.memoizedState:null}else e=De.next;var t=Be===null?Se.memoizedState:Be.next;if(t!==null)Be=t,De=e;else{if(e===null)throw Error(A(310));De=e,e={memoizedState:De.memoizedState,baseState:De.baseState,baseQueue:De.baseQueue,queue:De.queue,next:null},Be===null?Se.memoizedState=Be=e:Be=Be.next=e}return Be}function Yo(e,t){return typeof t=="function"?t(e):t}function Hc(e){var t=Zt(),n=t.queue;if(n===null)throw Error(A(311));n.lastRenderedReducer=e;var r=De,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,c=s;do{var f=c.lane;if((Ci&f)===f)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var u={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=u,o=r):l=l.next=u,Se.lanes|=f,ki|=f}c=c.next}while(c!==null&&c!==s);l===null?o=r:l.next=a,pn(r,t.memoizedState)||(wt=!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,ki|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Wc(e){var t=Zt(),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);pn(s,t.memoizedState)||(wt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function rx(){}function ix(e,t){var n=Se,r=Zt(),i=t(),s=!pn(r.memoizedState,i);if(s&&(r.memoizedState=i,wt=!0),r=r.queue,ip(ax.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Be!==null&&Be.memoizedState.tag&1){if(n.flags|=2048,Xo(9,ox.bind(null,n,r,i,t),void 0,null),Ue===null)throw Error(A(349));Ci&30||sx(n,t,i)}return i}function sx(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 ox(e,t,n,r){t.value=n,t.getSnapshot=r,lx(t)&&ux(e)}function ax(e,t,n){return n(function(){lx(t)&&ux(e)})}function lx(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!pn(e,n)}catch{return!0}}function ux(e){var t=Yn(e,1);t!==null&&hn(t,e,1,-1)}function _g(e){var t=vn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Yo,lastRenderedState:e},t.queue=e,e=e.dispatch=RC.bind(null,Se,e),[t.memoizedState,e]}function Xo(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 cx(){return Zt().memoizedState}function Sl(e,t,n,r){var i=vn();Se.flags|=e,i.memoizedState=Xo(1|t,n,void 0,r===void 0?null:r)}function Ou(e,t,n,r){var i=Zt();r=r===void 0?null:r;var s=void 0;if(De!==null){var o=De.memoizedState;if(s=o.destroy,r!==null&&tp(r,o.deps)){i.memoizedState=Xo(t,n,s,r);return}}Se.flags|=e,i.memoizedState=Xo(1|t,n,s,r)}function Pg(e,t){return Sl(8390656,8,e,t)}function ip(e,t){return Ou(2048,8,e,t)}function fx(e,t){return Ou(4,2,e,t)}function dx(e,t){return Ou(4,4,e,t)}function hx(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 px(e,t,n){return n=n!=null?n.concat([e]):null,Ou(4,4,hx.bind(null,t,e),n)}function sp(){}function mx(e,t){var n=Zt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&tp(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function gx(e,t){var n=Zt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&tp(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function yx(e,t,n){return Ci&21?(pn(n,t)||(n=S1(),Se.lanes|=n,ki|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,wt=!0),e.memoizedState=n)}function PC(e,t){var n=le;le=n!==0&&4>n?n:4,e(!0);var r=Uc.transition;Uc.transition={};try{e(!1),t()}finally{le=n,Uc.transition=r}}function vx(){return Zt().memoizedState}function AC(e,t,n){var r=Mr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},xx(e))wx(t,n);else if(n=ex(e,t,n,r),n!==null){var i=lt();hn(n,e,r,i),bx(n,t,r)}}function RC(e,t,n){var r=Mr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(xx(e))wx(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,pn(a,o)){var l=t.interleaved;l===null?(i.next=i,Yh(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=ex(e,t,i,r),n!==null&&(i=lt(),hn(n,e,r,i),bx(n,t,r))}}function xx(e){var t=e.alternate;return e===Se||t!==null&&t===Se}function wx(e,t){Co=nu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function bx(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Nh(e,n)}}var ru={readContext:Xt,useCallback:Xe,useContext:Xe,useEffect:Xe,useImperativeHandle:Xe,useInsertionEffect:Xe,useLayoutEffect:Xe,useMemo:Xe,useReducer:Xe,useRef:Xe,useState:Xe,useDebugValue:Xe,useDeferredValue:Xe,useTransition:Xe,useMutableSource:Xe,useSyncExternalStore:Xe,useId:Xe,unstable_isNewReconciler:!1},OC={readContext:Xt,useCallback:function(e,t){return vn().memoizedState=[e,t===void 0?null:t],e},useContext:Xt,useEffect:Pg,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Sl(4194308,4,hx.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Sl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Sl(4,2,e,t)},useMemo:function(e,t){var n=vn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=vn();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=AC.bind(null,Se,e),[r.memoizedState,e]},useRef:function(e){var t=vn();return e={current:e},t.memoizedState=e},useState:_g,useDebugValue:sp,useDeferredValue:function(e){return vn().memoizedState=e},useTransition:function(){var e=_g(!1),t=e[0];return e=PC.bind(null,e[1]),vn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Se,i=vn();if(ve){if(n===void 0)throw Error(A(407));n=n()}else{if(n=t(),Ue===null)throw Error(A(349));Ci&30||sx(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Pg(ax.bind(null,r,s,e),[e]),r.flags|=2048,Xo(9,ox.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=vn(),t=Ue.identifierPrefix;if(ve){var n=Hn,r=Un;n=(r&~(1<<32-dn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Go++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=_C++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},jC={readContext:Xt,useCallback:mx,useContext:Xt,useEffect:ip,useImperativeHandle:px,useInsertionEffect:fx,useLayoutEffect:dx,useMemo:gx,useReducer:Hc,useRef:cx,useState:function(){return Hc(Yo)},useDebugValue:sp,useDeferredValue:function(e){var t=Zt();return yx(t,De.memoizedState,e)},useTransition:function(){var e=Hc(Yo)[0],t=Zt().memoizedState;return[e,t]},useMutableSource:rx,useSyncExternalStore:ix,useId:vx,unstable_isNewReconciler:!1},MC={readContext:Xt,useCallback:mx,useContext:Xt,useEffect:ip,useImperativeHandle:px,useInsertionEffect:fx,useLayoutEffect:dx,useMemo:gx,useReducer:Wc,useRef:cx,useState:function(){return Wc(Yo)},useDebugValue:sp,useDeferredValue:function(e){var t=Zt();return De===null?t.memoizedState=e:yx(t,De.memoizedState,e)},useTransition:function(){var e=Wc(Yo)[0],t=Zt().memoizedState;return[e,t]},useMutableSource:rx,useSyncExternalStore:ix,useId:vx,unstable_isNewReconciler:!1};function sn(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 rd(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 ju={isMounted:function(e){return(e=e._reactInternals)?ji(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=lt(),i=Mr(e),s=Kn(r,i);s.payload=t,n!=null&&(s.callback=n),t=Or(e,s,i),t!==null&&(hn(t,e,i,r),wl(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=lt(),i=Mr(e),s=Kn(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Or(e,s,i),t!==null&&(hn(t,e,i,r),wl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=lt(),r=Mr(e),i=Kn(n,r);i.tag=2,t!=null&&(i.callback=t),t=Or(e,i,r),t!==null&&(hn(t,e,r,n),wl(t,e,r))}};function Ag(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?!Uo(n,r)||!Uo(i,s):!0}function Sx(e,t,n){var r=!1,i=Vr,s=t.contextType;return typeof s=="object"&&s!==null?s=Xt(s):(i=St(t)?Ti:rt.current,r=t.contextTypes,s=(r=r!=null)?Os(e,i):Vr),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ju,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function Rg(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&&ju.enqueueReplaceState(t,t.state,null)}function id(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Xh(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=Xt(s):(s=St(t)?Ti:rt.current,i.context=Os(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(rd(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&&ju.enqueueReplaceState(i,i.state,null),eu(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Fs(e,t){try{var n="",r=t;do n+=aE(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{_c=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?fo(e):""}function aE(e){switch(e.tag){case 5:return fo(e.type);case 16:return fo("Lazy");case 13:return fo("Suspense");case 19:return fo("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 Mf(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 qi:return"Fragment";case Ki:return"Portal";case Af:return"Profiler";case Mh:return"StrictMode";case Rf:return"Suspense";case Of:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case t1:return(e.displayName||"Context")+".Consumer";case e1:return(e._context.displayName||"Context")+".Provider";case jh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Dh:return t=e.displayName||null,t!==null?t:Mf(e.type)||"Memo";case ur:t=e._payload,e=e._init;try{return Mf(e(t))}catch{}}return null}function lE(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 Mf(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 $r(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function r1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function uE(e){var t=r1(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 za(e){e._valueTracker||(e._valueTracker=uE(e))}function i1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=r1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function $l(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 jf(e,t){var n=t.checked;return Te({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function qm(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=$r(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 s1(e,t){t=t.checked,t!=null&&Oh(e,"checked",t,!1)}function Df(e,t){s1(e,t);var n=$r(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,$r(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Qm(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"||$l(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ho=Array.isArray;function cs(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=""+$r(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 Nf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(A(91));return Te({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Gm(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(ho(n)){if(1<n.length)throw Error(A(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:$r(n)}}function o1(e,t){var n=$r(t.value),r=$r(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 Ym(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function a1(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 Lf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?a1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ua,l1=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(Ua=Ua||document.createElement("div"),Ua.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ua.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Lo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var wo={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},cE=["Webkit","ms","Moz","O"];Object.keys(wo).forEach(function(e){cE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),wo[t]=wo[e]})});function u1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||wo.hasOwnProperty(e)&&wo[e]?(""+t).trim():t+"px"}function c1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=u1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var fE=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 If(e,t){if(t){if(fE[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 $f(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 Vf=null;function Fh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Bf=null,fs=null,ds=null;function Xm(e){if(e=ba(e)){if(typeof Bf!="function")throw Error(A(280));var t=e.stateNode;t&&(t=Au(t),Bf(e.stateNode,e.type,t))}}function f1(e){fs?ds?ds.push(e):ds=[e]:fs=e}function d1(){if(fs){var e=fs,t=ds;if(ds=fs=null,Xm(e),t)for(e=0;e<t.length;e++)Xm(t[e])}}function h1(e,t){return e(t)}function p1(){}var Ac=!1;function m1(e,t,n){if(Ac)return e(t,n);Ac=!0;try{return h1(e,t,n)}finally{Ac=!1,(fs!==null||ds!==null)&&(p1(),d1())}}function Io(e,t){var n=e.stateNode;if(n===null)return null;var r=Au(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 zf=!1;if(Qn)try{var to={};Object.defineProperty(to,"passive",{get:function(){zf=!0}}),window.addEventListener("test",to,to),window.removeEventListener("test",to,to)}catch{zf=!1}function dE(e,t,n,r,i,s,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(f){this.onError(f)}}var bo=!1,Vl=null,Bl=!1,Uf=null,hE={onError:function(e){bo=!0,Vl=e}};function pE(e,t,n,r,i,s,o,a,l){bo=!1,Vl=null,dE.apply(hE,arguments)}function mE(e,t,n,r,i,s,o,a,l){if(pE.apply(this,arguments),bo){if(bo){var c=Vl;bo=!1,Vl=null}else throw Error(A(198));Bl||(Bl=!0,Uf=c)}}function Mi(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 g1(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 Zm(e){if(Mi(e)!==e)throw Error(A(188))}function gE(e){var t=e.alternate;if(!t){if(t=Mi(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 Zm(i),e;if(s===r)return Zm(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 y1(e){return e=gE(e),e!==null?v1(e):null}function v1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=v1(e);if(t!==null)return t;e=e.sibling}return null}var x1=Dt.unstable_scheduleCallback,Jm=Dt.unstable_cancelCallback,yE=Dt.unstable_shouldYield,vE=Dt.unstable_requestPaint,Ae=Dt.unstable_now,xE=Dt.unstable_getCurrentPriorityLevel,Nh=Dt.unstable_ImmediatePriority,w1=Dt.unstable_UserBlockingPriority,zl=Dt.unstable_NormalPriority,wE=Dt.unstable_LowPriority,b1=Dt.unstable_IdlePriority,Cu=null,Cn=null;function bE(e){if(Cn&&typeof Cn.onCommitFiberRoot=="function")try{Cn.onCommitFiberRoot(Cu,e,void 0,(e.current.flags&128)===128)}catch{}}var dn=Math.clz32?Math.clz32:EE,SE=Math.log,TE=Math.LN2;function EE(e){return e>>>=0,e===0?32:31-(SE(e)/TE|0)|0}var Ha=64,Wa=4194304;function po(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 Ul(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=po(a):(s&=o,s!==0&&(r=po(s)))}else o=n&~i,o!==0?r=po(o):s!==0&&(r=po(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-dn(t),i=1<<n,r|=e[n],t&=~i;return r}function CE(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 kE(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-dn(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=CE(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function Hf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function S1(){var e=Ha;return Ha<<=1,!(Ha&4194240)&&(Ha=64),e}function Rc(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function xa(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-dn(t),e[t]=n}function _E(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-dn(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-dn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var le=0;function T1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var E1,Ih,C1,k1,_1,Wf=!1,Ka=[],_r=null,Pr=null,Ar=null,$o=new Map,Vo=new Map,dr=[],PE="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 eg(e,t){switch(e){case"focusin":case"focusout":_r=null;break;case"dragenter":case"dragleave":Pr=null;break;case"mouseover":case"mouseout":Ar=null;break;case"pointerover":case"pointerout":$o.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Vo.delete(t.pointerId)}}function no(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=ba(t),t!==null&&Ih(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function AE(e,t,n,r,i){switch(t){case"focusin":return _r=no(_r,e,t,n,r,i),!0;case"dragenter":return Pr=no(Pr,e,t,n,r,i),!0;case"mouseover":return Ar=no(Ar,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return $o.set(s,no($o.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Vo.set(s,no(Vo.get(s)||null,e,t,n,r,i)),!0}return!1}function P1(e){var t=ii(e.target);if(t!==null){var n=Mi(t);if(n!==null){if(t=n.tag,t===13){if(t=g1(n),t!==null){e.blockedOn=t,_1(e.priority,function(){C1(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 yl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Kf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Vf=r,n.target.dispatchEvent(r),Vf=null}else return t=ba(n),t!==null&&Ih(t),e.blockedOn=n,!1;t.shift()}return!0}function tg(e,t,n){yl(e)&&n.delete(t)}function RE(){Wf=!1,_r!==null&&yl(_r)&&(_r=null),Pr!==null&&yl(Pr)&&(Pr=null),Ar!==null&&yl(Ar)&&(Ar=null),$o.forEach(tg),Vo.forEach(tg)}function ro(e,t){e.blockedOn===t&&(e.blockedOn=null,Wf||(Wf=!0,Dt.unstable_scheduleCallback(Dt.unstable_NormalPriority,RE)))}function Bo(e){function t(i){return ro(i,e)}if(0<Ka.length){ro(Ka[0],e);for(var n=1;n<Ka.length;n++){var r=Ka[n];r.blockedOn===e&&(r.blockedOn=null)}}for(_r!==null&&ro(_r,e),Pr!==null&&ro(Pr,e),Ar!==null&&ro(Ar,e),$o.forEach(t),Vo.forEach(t),n=0;n<dr.length;n++)r=dr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<dr.length&&(n=dr[0],n.blockedOn===null);)P1(n),n.blockedOn===null&&dr.shift()}var hs=er.ReactCurrentBatchConfig,Hl=!0;function OE(e,t,n,r){var i=le,s=hs.transition;hs.transition=null;try{le=1,$h(e,t,n,r)}finally{le=i,hs.transition=s}}function ME(e,t,n,r){var i=le,s=hs.transition;hs.transition=null;try{le=4,$h(e,t,n,r)}finally{le=i,hs.transition=s}}function $h(e,t,n,r){if(Hl){var i=Kf(e,t,n,r);if(i===null)Vc(e,t,r,Wl,n),eg(e,r);else if(AE(i,e,t,n,r))r.stopPropagation();else if(eg(e,r),t&4&&-1<PE.indexOf(e)){for(;i!==null;){var s=ba(i);if(s!==null&&E1(s),s=Kf(e,t,n,r),s===null&&Vc(e,t,r,Wl,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Vc(e,t,r,null,n)}}var Wl=null;function Kf(e,t,n,r){if(Wl=null,e=Fh(r),e=ii(e),e!==null)if(t=Mi(e),t===null)e=null;else if(n=t.tag,n===13){if(e=g1(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 Wl=e,null}function A1(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(xE()){case Nh:return 1;case w1:return 4;case zl:case wE:return 16;case b1:return 536870912;default:return 16}default:return 16}}var Tr=null,Vh=null,vl=null;function R1(){if(vl)return vl;var e,t=Vh,n=t.length,r,i="value"in Tr?Tr.value:Tr.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 vl=i.slice(e,1<r?1-r:void 0)}function xl(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 ng(){return!1}function Nt(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:ng,this.isPropagationStopped=ng,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 Hs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bh=Nt(Hs),wa=Te({},Hs,{view:0,detail:0}),jE=Nt(wa),Oc,Mc,io,ku=Te({},wa,{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!==io&&(io&&e.type==="mousemove"?(Oc=e.screenX-io.screenX,Mc=e.screenY-io.screenY):Mc=Oc=0,io=e),Oc)},movementY:function(e){return"movementY"in e?e.movementY:Mc}}),rg=Nt(ku),DE=Te({},ku,{dataTransfer:0}),FE=Nt(DE),NE=Te({},wa,{relatedTarget:0}),jc=Nt(NE),LE=Te({},Hs,{animationName:0,elapsedTime:0,pseudoElement:0}),IE=Nt(LE),$E=Te({},Hs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),VE=Nt($E),BE=Te({},Hs,{data:0}),ig=Nt(BE),zE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},UE={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"},HE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function WE(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=HE[e])?!!t[e]:!1}function zh(){return WE}var KE=Te({},wa,{key:function(e){if(e.key){var t=zE[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=xl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?UE[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"?xl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?xl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),qE=Nt(KE),QE=Te({},ku,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),sg=Nt(QE),GE=Te({},wa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zh}),YE=Nt(GE),XE=Te({},Hs,{propertyName:0,elapsedTime:0,pseudoElement:0}),ZE=Nt(XE),JE=Te({},ku,{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}),eC=Nt(JE),tC=[9,13,27,32],Uh=Qn&&"CompositionEvent"in window,So=null;Qn&&"documentMode"in document&&(So=document.documentMode);var nC=Qn&&"TextEvent"in window&&!So,O1=Qn&&(!Uh||So&&8<So&&11>=So),og=" ",ag=!1;function M1(e,t){switch(e){case"keyup":return tC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function j1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Qi=!1;function rC(e,t){switch(e){case"compositionend":return j1(t);case"keypress":return t.which!==32?null:(ag=!0,og);case"textInput":return e=t.data,e===og&&ag?null:e;default:return null}}function iC(e,t){if(Qi)return e==="compositionend"||!Uh&&M1(e,t)?(e=R1(),vl=Vh=Tr=null,Qi=!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 O1&&t.locale!=="ko"?null:t.data;default:return null}}var sC={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function lg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!sC[e.type]:t==="textarea"}function D1(e,t,n,r){f1(r),t=Kl(t,"onChange"),0<t.length&&(n=new Bh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var To=null,zo=null;function oC(e){W1(e,0)}function _u(e){var t=Xi(e);if(i1(t))return e}function aC(e,t){if(e==="change")return t}var F1=!1;if(Qn){var Dc;if(Qn){var Fc="oninput"in document;if(!Fc){var ug=document.createElement("div");ug.setAttribute("oninput","return;"),Fc=typeof ug.oninput=="function"}Dc=Fc}else Dc=!1;F1=Dc&&(!document.documentMode||9<document.documentMode)}function cg(){To&&(To.detachEvent("onpropertychange",N1),zo=To=null)}function N1(e){if(e.propertyName==="value"&&_u(zo)){var t=[];D1(t,zo,e,Fh(e)),m1(oC,t)}}function lC(e,t,n){e==="focusin"?(cg(),To=t,zo=n,To.attachEvent("onpropertychange",N1)):e==="focusout"&&cg()}function uC(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return _u(zo)}function cC(e,t){if(e==="click")return _u(t)}function fC(e,t){if(e==="input"||e==="change")return _u(t)}function dC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pn=typeof Object.is=="function"?Object.is:dC;function Uo(e,t){if(pn(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(!Pf.call(t,i)||!pn(e[i],t[i]))return!1}return!0}function fg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function dg(e,t){var n=fg(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=fg(n)}}function L1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?L1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function I1(){for(var e=window,t=$l();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=$l(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 hC(e){var t=I1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&L1(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=dg(n,s);var o=dg(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 pC=Qn&&"documentMode"in document&&11>=document.documentMode,Gi=null,qf=null,Eo=null,Qf=!1;function hg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Qf||Gi==null||Gi!==$l(r)||(r=Gi,"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}),Eo&&Uo(Eo,r)||(Eo=r,r=Kl(qf,"onSelect"),0<r.length&&(t=new Bh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Gi)))}function Qa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Yi={animationend:Qa("Animation","AnimationEnd"),animationiteration:Qa("Animation","AnimationIteration"),animationstart:Qa("Animation","AnimationStart"),transitionend:Qa("Transition","TransitionEnd")},Nc={},$1={};Qn&&($1=document.createElement("div").style,"AnimationEvent"in window||(delete Yi.animationend.animation,delete Yi.animationiteration.animation,delete Yi.animationstart.animation),"TransitionEvent"in window||delete Yi.transitionend.transition);function Pu(e){if(Nc[e])return Nc[e];if(!Yi[e])return e;var t=Yi[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in $1)return Nc[e]=t[n];return e}var V1=Pu("animationend"),B1=Pu("animationiteration"),z1=Pu("animationstart"),U1=Pu("transitionend"),H1=new Map,pg="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 Hr(e,t){H1.set(e,t),Oi(t,[e])}for(var Lc=0;Lc<pg.length;Lc++){var Ic=pg[Lc],mC=Ic.toLowerCase(),gC=Ic[0].toUpperCase()+Ic.slice(1);Hr(mC,"on"+gC)}Hr(V1,"onAnimationEnd");Hr(B1,"onAnimationIteration");Hr(z1,"onAnimationStart");Hr("dblclick","onDoubleClick");Hr("focusin","onFocus");Hr("focusout","onBlur");Hr(U1,"onTransitionEnd");Rs("onMouseEnter",["mouseout","mouseover"]);Rs("onMouseLeave",["mouseout","mouseover"]);Rs("onPointerEnter",["pointerout","pointerover"]);Rs("onPointerLeave",["pointerout","pointerover"]);Oi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Oi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Oi("onBeforeInput",["compositionend","keypress","textInput","paste"]);Oi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Oi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Oi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var mo="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(" "),yC=new Set("cancel close invalid load scroll toggle".split(" ").concat(mo));function mg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,mE(r,t,void 0,e),e.currentTarget=null}function W1(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,c=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;mg(i,a,c),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;mg(i,a,c),s=l}}}if(Bl)throw e=Uf,Bl=!1,Uf=null,e}function pe(e,t){var n=t[Jf];n===void 0&&(n=t[Jf]=new Set);var r=e+"__bubble";n.has(r)||(K1(t,e,2,!1),n.add(r))}function $c(e,t,n){var r=0;t&&(r|=4),K1(n,e,r,t)}var Ga="_reactListening"+Math.random().toString(36).slice(2);function Ho(e){if(!e[Ga]){e[Ga]=!0,Jv.forEach(function(n){n!=="selectionchange"&&(yC.has(n)||$c(n,!1,e),$c(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ga]||(t[Ga]=!0,$c("selectionchange",!1,t))}}function K1(e,t,n,r){switch(A1(t)){case 1:var i=OE;break;case 4:i=ME;break;default:i=$h}n=i.bind(null,t,n,e),i=void 0,!zf||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=ii(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}m1(function(){var c=s,f=Fh(n),u=[];e:{var d=H1.get(e);if(d!==void 0){var h=Bh,m=e;switch(e){case"keypress":if(xl(n)===0)break e;case"keydown":case"keyup":h=qE;break;case"focusin":m="focus",h=jc;break;case"focusout":m="blur",h=jc;break;case"beforeblur":case"afterblur":h=jc;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=rg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=FE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=YE;break;case V1:case B1:case z1:h=IE;break;case U1:h=ZE;break;case"scroll":h=jE;break;case"wheel":h=eC;break;case"copy":case"cut":case"paste":h=VE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=sg}var x=(t&4)!==0,w=!x&&e==="scroll",p=x?d!==null?d+"Capture":null:d;x=[];for(var g=c,y;g!==null;){y=g;var C=y.stateNode;if(y.tag===5&&C!==null&&(y=C,p!==null&&(C=Io(g,p),C!=null&&x.push(Wo(g,C,y)))),w)break;g=g.return}0<x.length&&(d=new h(d,m,null,n,f),u.push({event:d,listeners:x}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&n!==Vf&&(m=n.relatedTarget||n.fromElement)&&(ii(m)||m[Gn]))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=c,m=m?ii(m):null,m!==null&&(w=Mi(m),m!==w||m.tag!==5&&m.tag!==6)&&(m=null)):(h=null,m=c),h!==m)){if(x=rg,C="onMouseLeave",p="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(x=sg,C="onPointerLeave",p="onPointerEnter",g="pointer"),w=h==null?d:Xi(h),y=m==null?d:Xi(m),d=new x(C,g+"leave",h,n,f),d.target=w,d.relatedTarget=y,C=null,ii(f)===c&&(x=new x(p,g+"enter",m,n,f),x.target=y,x.relatedTarget=w,C=x),w=C,h&&m)t:{for(x=h,p=m,g=0,y=x;y;y=Hi(y))g++;for(y=0,C=p;C;C=Hi(C))y++;for(;0<g-y;)x=Hi(x),g--;for(;0<y-g;)p=Hi(p),y--;for(;g--;){if(x===p||p!==null&&x===p.alternate)break t;x=Hi(x),p=Hi(p)}x=null}else x=null;h!==null&&gg(u,d,h,x,!1),m!==null&&w!==null&&gg(u,w,m,x,!0)}}e:{if(d=c?Xi(c):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var b=aC;else if(lg(d))if(F1)b=fC;else{b=uC;var E=lC}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(b=cC);if(b&&(b=b(e,c))){D1(u,b,n,f);break e}E&&E(e,d,c),e==="focusout"&&(E=d._wrapperState)&&E.controlled&&d.type==="number"&&Ff(d,"number",d.value)}switch(E=c?Xi(c):window,e){case"focusin":(lg(E)||E.contentEditable==="true")&&(Gi=E,qf=c,Eo=null);break;case"focusout":Eo=qf=Gi=null;break;case"mousedown":Qf=!0;break;case"contextmenu":case"mouseup":case"dragend":Qf=!1,hg(u,n,f);break;case"selectionchange":if(pC)break;case"keydown":case"keyup":hg(u,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 Qi?M1(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(O1&&n.locale!=="ko"&&(Qi||P!=="onCompositionStart"?P==="onCompositionEnd"&&Qi&&(k=R1()):(Tr=f,Vh="value"in Tr?Tr.value:Tr.textContent,Qi=!0)),E=Kl(c,P),0<E.length&&(P=new ig(P,e,null,n,f),u.push({event:P,listeners:E}),k?P.data=k:(k=j1(n),k!==null&&(P.data=k)))),(k=nC?rC(e,n):iC(e,n))&&(c=Kl(c,"onBeforeInput"),0<c.length&&(f=new ig("onBeforeInput","beforeinput",null,n,f),u.push({event:f,listeners:c}),f.data=k))}W1(u,t)})}function Wo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Kl(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Io(e,n),s!=null&&r.unshift(Wo(e,s,i)),s=Io(e,t),s!=null&&r.push(Wo(e,s,i))),e=e.return}return r}function Hi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function gg(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,i?(l=Io(n,s),l!=null&&o.unshift(Wo(n,l,a))):i||(l=Io(n,s),l!=null&&o.push(Wo(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var vC=/\r\n?/g,xC=/\u0000|\uFFFD/g;function yg(e){return(typeof e=="string"?e:""+e).replace(vC,`
|
|
38
|
+
`).replace(xC,"")}function Ya(e,t,n){if(t=yg(t),yg(e)!==t&&n)throw Error(A(425))}function ql(){}var Gf=null,Yf=null;function Xf(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 Zf=typeof setTimeout=="function"?setTimeout:void 0,wC=typeof clearTimeout=="function"?clearTimeout:void 0,vg=typeof Promise=="function"?Promise:void 0,bC=typeof queueMicrotask=="function"?queueMicrotask:typeof vg<"u"?function(e){return vg.resolve(null).then(e).catch(SC)}:Zf;function SC(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),Bo(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Bo(t)}function Rr(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 xg(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 Ws=Math.random().toString(36).slice(2),En="__reactFiber$"+Ws,Ko="__reactProps$"+Ws,Gn="__reactContainer$"+Ws,Jf="__reactEvents$"+Ws,TC="__reactListeners$"+Ws,EC="__reactHandles$"+Ws;function ii(e){var t=e[En];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Gn]||n[En]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=xg(e);e!==null;){if(n=e[En])return n;e=xg(e)}return t}e=n,n=e.parentNode}return null}function ba(e){return e=e[En]||e[Gn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Xi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(A(33))}function Au(e){return e[Ko]||null}var ed=[],Zi=-1;function Wr(e){return{current:e}}function ge(e){0>Zi||(e.current=ed[Zi],ed[Zi]=null,Zi--)}function de(e,t){Zi++,ed[Zi]=e.current,e.current=t}var Vr={},rt=Wr(Vr),bt=Wr(!1),Ti=Vr;function Os(e,t){var n=e.type.contextTypes;if(!n)return Vr;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 St(e){return e=e.childContextTypes,e!=null}function Ql(){ge(bt),ge(rt)}function wg(e,t,n){if(rt.current!==Vr)throw Error(A(168));de(rt,t),de(bt,n)}function q1(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,lE(e)||"Unknown",i));return Te({},n,r)}function Gl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Vr,Ti=rt.current,de(rt,e),de(bt,bt.current),!0}function bg(e,t,n){var r=e.stateNode;if(!r)throw Error(A(169));n?(e=q1(e,t,Ti),r.__reactInternalMemoizedMergedChildContext=e,ge(bt),ge(rt),de(rt,e)):ge(bt),de(bt,n)}var Vn=null,Ru=!1,zc=!1;function Q1(e){Vn===null?Vn=[e]:Vn.push(e)}function CC(e){Ru=!0,Q1(e)}function Kr(){if(!zc&&Vn!==null){zc=!0;var e=0,t=le;try{var n=Vn;for(le=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Vn=null,Ru=!1}catch(i){throw Vn!==null&&(Vn=Vn.slice(e+1)),x1(Nh,Kr),i}finally{le=t,zc=!1}}return null}var Ji=[],es=0,Yl=null,Xl=0,Wt=[],Kt=0,Ei=null,Un=1,Hn="";function Jr(e,t){Ji[es++]=Xl,Ji[es++]=Yl,Yl=e,Xl=t}function G1(e,t,n){Wt[Kt++]=Un,Wt[Kt++]=Hn,Wt[Kt++]=Ei,Ei=e;var r=Un;e=Hn;var i=32-dn(r)-1;r&=~(1<<i),n+=1;var s=32-dn(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Un=1<<32-dn(t)+i|n<<i|r,Hn=s+e}else Un=1<<s|n<<i|r,Hn=e}function Wh(e){e.return!==null&&(Jr(e,1),G1(e,1,0))}function Kh(e){for(;e===Yl;)Yl=Ji[--es],Ji[es]=null,Xl=Ji[--es],Ji[es]=null;for(;e===Ei;)Ei=Wt[--Kt],Wt[Kt]=null,Hn=Wt[--Kt],Wt[Kt]=null,Un=Wt[--Kt],Wt[Kt]=null}var jt=null,Rt=null,ve=!1,un=null;function Y1(e,t){var n=Qt(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 Sg(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,jt=e,Rt=Rr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,jt=e,Rt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ei!==null?{id:Un,overflow:Hn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Qt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,jt=e,Rt=null,!0):!1;default:return!1}}function td(e){return(e.mode&1)!==0&&(e.flags&128)===0}function nd(e){if(ve){var t=Rt;if(t){var n=t;if(!Sg(e,t)){if(td(e))throw Error(A(418));t=Rr(n.nextSibling);var r=jt;t&&Sg(e,t)?Y1(r,n):(e.flags=e.flags&-4097|2,ve=!1,jt=e)}}else{if(td(e))throw Error(A(418));e.flags=e.flags&-4097|2,ve=!1,jt=e}}}function Tg(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;jt=e}function Xa(e){if(e!==jt)return!1;if(!ve)return Tg(e),ve=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Xf(e.type,e.memoizedProps)),t&&(t=Rt)){if(td(e))throw X1(),Error(A(418));for(;t;)Y1(e,t),t=Rr(t.nextSibling)}if(Tg(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){Rt=Rr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Rt=null}}else Rt=jt?Rr(e.stateNode.nextSibling):null;return!0}function X1(){for(var e=Rt;e;)e=Rr(e.nextSibling)}function Ms(){Rt=jt=null,ve=!1}function qh(e){un===null?un=[e]:un.push(e)}var kC=er.ReactCurrentBatchConfig;function so(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 Za(e,t){throw e=Object.prototype.toString.call(t),Error(A(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Eg(e){var t=e._init;return t(e._payload)}function Z1(e){function t(p,g){if(e){var y=p.deletions;y===null?(p.deletions=[g],p.flags|=16):y.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,y){return p.index=y,e?(y=p.alternate,y!==null?(y=y.index,y<g?(p.flags|=2,g):y):(p.flags|=2,g)):(p.flags|=1048576,g)}function o(p){return e&&p.alternate===null&&(p.flags|=2),p}function a(p,g,y,C){return g===null||g.tag!==6?(g=Gc(y,p.mode,C),g.return=p,g):(g=i(g,y),g.return=p,g)}function l(p,g,y,C){var b=y.type;return b===qi?f(p,g,y.props.children,C,y.key):g!==null&&(g.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===ur&&Eg(b)===g.type)?(C=i(g,y.props),C.ref=so(p,g,y),C.return=p,C):(C=kl(y.type,y.key,y.props,null,p.mode,C),C.ref=so(p,g,y),C.return=p,C)}function c(p,g,y,C){return g===null||g.tag!==4||g.stateNode.containerInfo!==y.containerInfo||g.stateNode.implementation!==y.implementation?(g=Yc(y,p.mode,C),g.return=p,g):(g=i(g,y.children||[]),g.return=p,g)}function f(p,g,y,C,b){return g===null||g.tag!==7?(g=xi(y,p.mode,C,b),g.return=p,g):(g=i(g,y),g.return=p,g)}function u(p,g,y){if(typeof g=="string"&&g!==""||typeof g=="number")return g=Gc(""+g,p.mode,y),g.return=p,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Ba:return y=kl(g.type,g.key,g.props,null,p.mode,y),y.ref=so(p,null,g),y.return=p,y;case Ki:return g=Yc(g,p.mode,y),g.return=p,g;case ur:var C=g._init;return u(p,C(g._payload),y)}if(ho(g)||eo(g))return g=xi(g,p.mode,y,null),g.return=p,g;Za(p,g)}return null}function d(p,g,y,C){var b=g!==null?g.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return b!==null?null:a(p,g,""+y,C);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Ba:return y.key===b?l(p,g,y,C):null;case Ki:return y.key===b?c(p,g,y,C):null;case ur:return b=y._init,d(p,g,b(y._payload),C)}if(ho(y)||eo(y))return b!==null?null:f(p,g,y,C,null);Za(p,y)}return null}function h(p,g,y,C,b){if(typeof C=="string"&&C!==""||typeof C=="number")return p=p.get(y)||null,a(g,p,""+C,b);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case Ba:return p=p.get(C.key===null?y:C.key)||null,l(g,p,C,b);case Ki:return p=p.get(C.key===null?y:C.key)||null,c(g,p,C,b);case ur:var E=C._init;return h(p,g,y,E(C._payload),b)}if(ho(C)||eo(C))return p=p.get(y)||null,f(g,p,C,b,null);Za(g,C)}return null}function m(p,g,y,C){for(var b=null,E=null,k=g,P=g=0,M=null;k!==null&&P<y.length;P++){k.index>P?(M=k,k=null):M=k.sibling;var j=d(p,k,y[P],C);if(j===null){k===null&&(k=M);break}e&&k&&j.alternate===null&&t(p,k),g=s(j,g,P),E===null?b=j:E.sibling=j,E=j,k=M}if(P===y.length)return n(p,k),ve&&Jr(p,P),b;if(k===null){for(;P<y.length;P++)k=u(p,y[P],C),k!==null&&(g=s(k,g,P),E===null?b=k:E.sibling=k,E=k);return ve&&Jr(p,P),b}for(k=r(p,k);P<y.length;P++)M=h(k,p,P,y[P],C),M!==null&&(e&&M.alternate!==null&&k.delete(M.key===null?P:M.key),g=s(M,g,P),E===null?b=M:E.sibling=M,E=M);return e&&k.forEach(function(I){return t(p,I)}),ve&&Jr(p,P),b}function x(p,g,y,C){var b=eo(y);if(typeof b!="function")throw Error(A(150));if(y=b.call(y),y==null)throw Error(A(151));for(var E=b=null,k=g,P=g=0,M=null,j=y.next();k!==null&&!j.done;P++,j=y.next()){k.index>P?(M=k,k=null):M=k.sibling;var I=d(p,k,j.value,C);if(I===null){k===null&&(k=M);break}e&&k&&I.alternate===null&&t(p,k),g=s(I,g,P),E===null?b=I:E.sibling=I,E=I,k=M}if(j.done)return n(p,k),ve&&Jr(p,P),b;if(k===null){for(;!j.done;P++,j=y.next())j=u(p,j.value,C),j!==null&&(g=s(j,g,P),E===null?b=j:E.sibling=j,E=j);return ve&&Jr(p,P),b}for(k=r(p,k);!j.done;P++,j=y.next())j=h(k,p,P,j.value,C),j!==null&&(e&&j.alternate!==null&&k.delete(j.key===null?P:j.key),g=s(j,g,P),E===null?b=j:E.sibling=j,E=j);return e&&k.forEach(function(re){return t(p,re)}),ve&&Jr(p,P),b}function w(p,g,y,C){if(typeof y=="object"&&y!==null&&y.type===qi&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Ba:e:{for(var b=y.key,E=g;E!==null;){if(E.key===b){if(b=y.type,b===qi){if(E.tag===7){n(p,E.sibling),g=i(E,y.props.children),g.return=p,p=g;break e}}else if(E.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===ur&&Eg(b)===E.type){n(p,E.sibling),g=i(E,y.props),g.ref=so(p,E,y),g.return=p,p=g;break e}n(p,E);break}else t(p,E);E=E.sibling}y.type===qi?(g=xi(y.props.children,p.mode,C,y.key),g.return=p,p=g):(C=kl(y.type,y.key,y.props,null,p.mode,C),C.ref=so(p,g,y),C.return=p,p=C)}return o(p);case Ki:e:{for(E=y.key;g!==null;){if(g.key===E)if(g.tag===4&&g.stateNode.containerInfo===y.containerInfo&&g.stateNode.implementation===y.implementation){n(p,g.sibling),g=i(g,y.children||[]),g.return=p,p=g;break e}else{n(p,g);break}else t(p,g);g=g.sibling}g=Yc(y,p.mode,C),g.return=p,p=g}return o(p);case ur:return E=y._init,w(p,g,E(y._payload),C)}if(ho(y))return m(p,g,y,C);if(eo(y))return x(p,g,y,C);Za(p,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,g!==null&&g.tag===6?(n(p,g.sibling),g=i(g,y),g.return=p,p=g):(n(p,g),g=Gc(y,p.mode,C),g.return=p,p=g),o(p)):n(p,g)}return w}var js=Z1(!0),J1=Z1(!1),Zl=Wr(null),Jl=null,ts=null,Qh=null;function Gh(){Qh=ts=Jl=null}function Yh(e){var t=Zl.current;ge(Zl),e._currentValue=t}function rd(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 ps(e,t){Jl=e,Qh=ts=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(wt=!0),e.firstContext=null)}function Xt(e){var t=e._currentValue;if(Qh!==e)if(e={context:e,memoizedValue:t,next:null},ts===null){if(Jl===null)throw Error(A(308));ts=e,Jl.dependencies={lanes:0,firstContext:e}}else ts=ts.next=e;return t}var si=null;function Xh(e){si===null?si=[e]:si.push(e)}function ex(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,Yn(e,r)}function Yn(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 cr=!1;function Zh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function tx(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 Kn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Or(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,Yn(e,n)}return i=r.interleaved,i===null?(t.next=t,Xh(r)):(t.next=i.next,i.next=t),r.interleaved=t,Yn(e,n)}function wl(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 Cg(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 eu(e,t,n,r){var i=e.updateQueue;cr=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?s=c:o.next=c,o=l;var f=e.alternate;f!==null&&(f=f.updateQueue,a=f.lastBaseUpdate,a!==o&&(a===null?f.firstBaseUpdate=c:a.next=c,f.lastBaseUpdate=l))}if(s!==null){var u=i.baseState;o=0,f=c=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"){u=m.call(h,u,d);break e}u=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=x.payload,d=typeof m=="function"?m.call(h,u,d):m,d==null)break e;u=Te({},u,d);break e;case 2:cr=!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?(c=f=h,l=u):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=u),i.baseState=l,i.firstBaseUpdate=c,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);ki|=o,e.lanes=o,e.memoizedState=u}}function kg(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 Sa={},kn=Wr(Sa),qo=Wr(Sa),Qo=Wr(Sa);function oi(e){if(e===Sa)throw Error(A(174));return e}function Jh(e,t){switch(de(Qo,t),de(qo,e),de(kn,Sa),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Lf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Lf(t,e)}ge(kn),de(kn,t)}function Ds(){ge(kn),ge(qo),ge(Qo)}function nx(e){oi(Qo.current);var t=oi(kn.current),n=Lf(t,e.type);t!==n&&(de(qo,e),de(kn,n))}function ep(e){qo.current===e&&(ge(kn),ge(qo))}var we=Wr(0);function tu(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 bl=er.ReactCurrentDispatcher,Hc=er.ReactCurrentBatchConfig,Ci=0,Se=null,De=null,Be=null,nu=!1,Co=!1,Go=0,_C=0;function Xe(){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(!pn(e[n],t[n]))return!1;return!0}function rp(e,t,n,r,i,s){if(Ci=s,Se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,bl.current=e===null||e.memoizedState===null?OC:MC,e=n(r,i),Co){s=0;do{if(Co=!1,Go=0,25<=s)throw Error(A(301));s+=1,Be=De=null,t.updateQueue=null,bl.current=jC,e=n(r,i)}while(Co)}if(bl.current=ru,t=De!==null&&De.next!==null,Ci=0,Be=De=Se=null,nu=!1,t)throw Error(A(300));return e}function ip(){var e=Go!==0;return Go=0,e}function vn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Be===null?Se.memoizedState=Be=e:Be=Be.next=e,Be}function Zt(){if(De===null){var e=Se.alternate;e=e!==null?e.memoizedState:null}else e=De.next;var t=Be===null?Se.memoizedState:Be.next;if(t!==null)Be=t,De=e;else{if(e===null)throw Error(A(310));De=e,e={memoizedState:De.memoizedState,baseState:De.baseState,baseQueue:De.baseQueue,queue:De.queue,next:null},Be===null?Se.memoizedState=Be=e:Be=Be.next=e}return Be}function Yo(e,t){return typeof t=="function"?t(e):t}function Wc(e){var t=Zt(),n=t.queue;if(n===null)throw Error(A(311));n.lastRenderedReducer=e;var r=De,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,c=s;do{var f=c.lane;if((Ci&f)===f)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var u={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=u,o=r):l=l.next=u,Se.lanes|=f,ki|=f}c=c.next}while(c!==null&&c!==s);l===null?o=r:l.next=a,pn(r,t.memoizedState)||(wt=!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,ki|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Kc(e){var t=Zt(),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);pn(s,t.memoizedState)||(wt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function rx(){}function ix(e,t){var n=Se,r=Zt(),i=t(),s=!pn(r.memoizedState,i);if(s&&(r.memoizedState=i,wt=!0),r=r.queue,sp(ax.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Be!==null&&Be.memoizedState.tag&1){if(n.flags|=2048,Xo(9,ox.bind(null,n,r,i,t),void 0,null),Ue===null)throw Error(A(349));Ci&30||sx(n,t,i)}return i}function sx(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 ox(e,t,n,r){t.value=n,t.getSnapshot=r,lx(t)&&ux(e)}function ax(e,t,n){return n(function(){lx(t)&&ux(e)})}function lx(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!pn(e,n)}catch{return!0}}function ux(e){var t=Yn(e,1);t!==null&&hn(t,e,1,-1)}function _g(e){var t=vn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Yo,lastRenderedState:e},t.queue=e,e=e.dispatch=RC.bind(null,Se,e),[t.memoizedState,e]}function Xo(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 cx(){return Zt().memoizedState}function Sl(e,t,n,r){var i=vn();Se.flags|=e,i.memoizedState=Xo(1|t,n,void 0,r===void 0?null:r)}function Ou(e,t,n,r){var i=Zt();r=r===void 0?null:r;var s=void 0;if(De!==null){var o=De.memoizedState;if(s=o.destroy,r!==null&&np(r,o.deps)){i.memoizedState=Xo(t,n,s,r);return}}Se.flags|=e,i.memoizedState=Xo(1|t,n,s,r)}function Pg(e,t){return Sl(8390656,8,e,t)}function sp(e,t){return Ou(2048,8,e,t)}function fx(e,t){return Ou(4,2,e,t)}function dx(e,t){return Ou(4,4,e,t)}function hx(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 px(e,t,n){return n=n!=null?n.concat([e]):null,Ou(4,4,hx.bind(null,t,e),n)}function op(){}function mx(e,t){var n=Zt();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 gx(e,t){var n=Zt();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 yx(e,t,n){return Ci&21?(pn(n,t)||(n=S1(),Se.lanes|=n,ki|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,wt=!0),e.memoizedState=n)}function PC(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 vx(){return Zt().memoizedState}function AC(e,t,n){var r=jr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},xx(e))wx(t,n);else if(n=ex(e,t,n,r),n!==null){var i=lt();hn(n,e,r,i),bx(n,t,r)}}function RC(e,t,n){var r=jr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(xx(e))wx(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,pn(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=ex(e,t,i,r),n!==null&&(i=lt(),hn(n,e,r,i),bx(n,t,r))}}function xx(e){var t=e.alternate;return e===Se||t!==null&&t===Se}function wx(e,t){Co=nu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function bx(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Lh(e,n)}}var ru={readContext:Xt,useCallback:Xe,useContext:Xe,useEffect:Xe,useImperativeHandle:Xe,useInsertionEffect:Xe,useLayoutEffect:Xe,useMemo:Xe,useReducer:Xe,useRef:Xe,useState:Xe,useDebugValue:Xe,useDeferredValue:Xe,useTransition:Xe,useMutableSource:Xe,useSyncExternalStore:Xe,useId:Xe,unstable_isNewReconciler:!1},OC={readContext:Xt,useCallback:function(e,t){return vn().memoizedState=[e,t===void 0?null:t],e},useContext:Xt,useEffect:Pg,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Sl(4194308,4,hx.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Sl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Sl(4,2,e,t)},useMemo:function(e,t){var n=vn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=vn();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=AC.bind(null,Se,e),[r.memoizedState,e]},useRef:function(e){var t=vn();return e={current:e},t.memoizedState=e},useState:_g,useDebugValue:op,useDeferredValue:function(e){return vn().memoizedState=e},useTransition:function(){var e=_g(!1),t=e[0];return e=PC.bind(null,e[1]),vn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Se,i=vn();if(ve){if(n===void 0)throw Error(A(407));n=n()}else{if(n=t(),Ue===null)throw Error(A(349));Ci&30||sx(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Pg(ax.bind(null,r,s,e),[e]),r.flags|=2048,Xo(9,ox.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=vn(),t=Ue.identifierPrefix;if(ve){var n=Hn,r=Un;n=(r&~(1<<32-dn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Go++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=_C++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},MC={readContext:Xt,useCallback:mx,useContext:Xt,useEffect:sp,useImperativeHandle:px,useInsertionEffect:fx,useLayoutEffect:dx,useMemo:gx,useReducer:Wc,useRef:cx,useState:function(){return Wc(Yo)},useDebugValue:op,useDeferredValue:function(e){var t=Zt();return yx(t,De.memoizedState,e)},useTransition:function(){var e=Wc(Yo)[0],t=Zt().memoizedState;return[e,t]},useMutableSource:rx,useSyncExternalStore:ix,useId:vx,unstable_isNewReconciler:!1},jC={readContext:Xt,useCallback:mx,useContext:Xt,useEffect:sp,useImperativeHandle:px,useInsertionEffect:fx,useLayoutEffect:dx,useMemo:gx,useReducer:Kc,useRef:cx,useState:function(){return Kc(Yo)},useDebugValue:op,useDeferredValue:function(e){var t=Zt();return De===null?t.memoizedState=e:yx(t,De.memoizedState,e)},useTransition:function(){var e=Kc(Yo)[0],t=Zt().memoizedState;return[e,t]},useMutableSource:rx,useSyncExternalStore:ix,useId:vx,unstable_isNewReconciler:!1};function sn(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 id(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)?Mi(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=lt(),i=jr(e),s=Kn(r,i);s.payload=t,n!=null&&(s.callback=n),t=Or(e,s,i),t!==null&&(hn(t,e,i,r),wl(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=lt(),i=jr(e),s=Kn(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Or(e,s,i),t!==null&&(hn(t,e,i,r),wl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=lt(),r=jr(e),i=Kn(n,r);i.tag=2,t!=null&&(i.callback=t),t=Or(e,i,r),t!==null&&(hn(t,e,r,n),wl(t,e,r))}};function Ag(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?!Uo(n,r)||!Uo(i,s):!0}function Sx(e,t,n){var r=!1,i=Vr,s=t.contextType;return typeof s=="object"&&s!==null?s=Xt(s):(i=St(t)?Ti:rt.current,r=t.contextTypes,s=(r=r!=null)?Os(e,i):Vr),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 Rg(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 sd(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=Xt(s):(s=St(t)?Ti:rt.current,i.context=Os(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(id(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),eu(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Fs(e,t){try{var n="",r=t;do n+=aE(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 Kc(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function sd(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var DC=typeof WeakMap=="function"?WeakMap:Map;function Tx(e,t,n){n=Kn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){su||(su=!0,md=r),sd(e,t)},n}function Ex(e,t,n){n=Kn(-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(){sd(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){sd(e,t),typeof r!="function"&&(jr===null?jr=new Set([this]):jr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Og(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new DC;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=QC.bind(null,e,t,n),t.then(e,e))}function jg(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 Mg(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=Kn(-1,1),t.tag=2,Or(n,t,1))),n.lanes|=1),e)}var FC=er.ReactCurrentOwner,wt=!1;function ot(e,t,n,r){t.child=e===null?J1(t,null,n,r):Ms(t,e.child,n,r)}function Dg(e,t,n,r,i){n=n.render;var s=t.ref;return ps(t,i),r=np(e,t,n,r,s,i),n=rp(),e!==null&&!wt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Xn(e,t,i)):(ve&&n&&Hh(t),t.flags|=1,ot(e,t,r,i),t.child)}function Fg(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!hp(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Cx(e,t,s,r,i)):(e=kl(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:Uo,n(o,r)&&e.ref===t.ref)return Xn(e,t,i)}return t.flags|=1,e=Dr(s,r),e.ref=t.ref,e.return=t,t.child=e}function Cx(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Uo(s,r)&&e.ref===t.ref)if(wt=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(wt=!0);else return t.lanes=e.lanes,Xn(e,t,i)}return od(e,t,n,r,i)}function kx(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(rs,At),At|=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(rs,At),At|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,de(rs,At),At|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,de(rs,At),At|=r;return ot(e,t,i,n),t.child}function _x(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function od(e,t,n,r,i){var s=St(n)?Ti:rt.current;return s=Os(t,s),ps(t,i),n=np(e,t,n,r,s,i),r=rp(),e!==null&&!wt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Xn(e,t,i)):(ve&&r&&Hh(t),t.flags|=1,ot(e,t,n,i),t.child)}function Ng(e,t,n,r,i){if(St(n)){var s=!0;Gl(t)}else s=!1;if(ps(t,i),t.stateNode===null)Tl(e,t),Sx(t,n,r),id(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=Xt(c):(c=St(n)?Ti:rt.current,c=Os(t,c));var f=n.getDerivedStateFromProps,u=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function";u||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&Rg(t,o,r,c),cr=!1;var d=t.memoizedState;o.state=d,eu(t,r,o,i),l=t.memoizedState,a!==r||d!==l||bt.current||cr?(typeof f=="function"&&(rd(t,n,f,r),l=t.memoizedState),(a=cr||Ag(t,n,a,r,d,l,c))?(u||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=c,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,tx(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:sn(t.type,a),o.props=c,u=t.pendingProps,d=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Xt(l):(l=St(n)?Ti:rt.current,l=Os(t,l));var h=n.getDerivedStateFromProps;(f=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==u||d!==l)&&Rg(t,o,r,l),cr=!1,d=t.memoizedState,o.state=d,eu(t,r,o,i);var m=t.memoizedState;a!==u||d!==m||bt.current||cr?(typeof h=="function"&&(rd(t,n,h,r),m=t.memoizedState),(c=cr||Ag(t,n,c,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=c):(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 ad(e,t,n,r,s,i)}function ad(e,t,n,r,i,s){_x(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&bg(t,n,!1),Xn(e,t,s);r=t.stateNode,FC.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Ms(t,e.child,null,s),t.child=Ms(t,null,a,s)):ot(e,t,a,s),t.memoizedState=r.state,i&&bg(t,n,!0),t.child}function Px(e){var t=e.stateNode;t.pendingContext?wg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&wg(e,t.context,!1),Zh(e,t.containerInfo)}function Lg(e,t,n,r,i){return js(),Kh(i),t.flags|=256,ot(e,t,n,r),t.child}var ld={dehydrated:null,treeContext:null,retryLane:0};function ud(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ax(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 td(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=Fu(o,r,0,null),e=xi(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=ud(n),t.memoizedState=ld,e):op(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return NC(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=xi(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?ud(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=ld,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 op(e,t){return t=Fu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ja(e,t,n,r){return r!==null&&Kh(r),Ms(t,e.child,null,n),e=op(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function NC(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=Kc(Error(A(422))),Ja(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Fu({mode:"visible",children:r.children},i,0,null),s=xi(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Ms(t,e.child,null,o),t.child.memoizedState=ud(o),t.memoizedState=ld,s);if(!(t.mode&1))return Ja(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=Kc(s,r,void 0),Ja(e,t,o,r)}if(a=(o&e.childLanes)!==0,wt||a){if(r=Ue,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,Yn(e,i),hn(r,e,i,-1))}return dp(),r=Kc(Error(A(421))),Ja(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=GC.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Rt=Rr(i.nextSibling),Mt=t,ve=!0,un=null,e!==null&&(Wt[Kt++]=Un,Wt[Kt++]=Hn,Wt[Kt++]=Ei,Un=e.id,Hn=e.overflow,Ei=t),t=op(t,r.children),t.flags|=4096,t)}function Ig(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),nd(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 Rx(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(ot(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&&Ig(e,n,t);else if(e.tag===19)Ig(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&&tu(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&&tu(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 Tl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Xn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ki|=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 LC(e,t,n){switch(t.tag){case 3:Px(t),js();break;case 5:nx(t);break;case 1:St(t.type)&&Gl(t);break;case 4:Zh(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;de(Zl,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?Ax(e,t,n):(de(we,we.current&1),e=Xn(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 Rx(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,kx(e,t,n)}return Xn(e,t,n)}var Ox,cd,jx,Mx;Ox=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}};cd=function(){};jx=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,oi(kn.current);var s=null;switch(n){case"input":i=jf(e,i),r=jf(e,r),s=[];break;case"select":i=Te({},i,{value:void 0}),r=Te({},r,{value:void 0}),s=[];break;case"textarea":i=Ff(e,i),r=Ff(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ql)}Lf(n,r);var o;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(No.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var l=r[c];if(a=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="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(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(No.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&pe("scroll",e),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};Mx=function(e,t,n,r){n!==r&&(t.flags|=4)};function oo(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 Ze(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 IC(e,t,n){var r=t.pendingProps;switch(Wh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ze(t),null;case 1:return St(t.type)&&Ql(),Ze(t),null;case 3:return r=t.stateNode,Ds(),ge(bt),ge(rt),ep(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Xa(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,un!==null&&(vd(un),un=null))),cd(e,t),Ze(t),null;case 5:Jh(t);var i=oi(Qo.current);if(n=t.type,e!==null&&t.stateNode!=null)jx(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 Ze(t),null}if(e=oi(kn.current),Xa(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[En]=t,r[Ko]=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<mo.length;i++)pe(mo[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":qm(r,s),pe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},pe("invalid",r);break;case"textarea":Gm(r,s),pe("invalid",r)}Lf(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&&Ya(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Ya(r.textContent,a,e),i=["children",""+a]):No.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&pe("scroll",r)}switch(n){case"input":za(r),Qm(r,s,!0);break;case"textarea":za(r),Ym(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=a1(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[En]=t,e[Ko]=r,Ox(e,t,!1,!1),t.stateNode=e;e:{switch(o=If(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<mo.length;i++)pe(mo[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":qm(e,r),i=jf(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":Gm(e,r),i=Ff(e,r),pe("invalid",e);break;default:i=r}Lf(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?c1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&l1(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Lo(e,l):typeof l=="number"&&Lo(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(No.hasOwnProperty(s)?l!=null&&s==="onScroll"&&pe("scroll",e):l!=null&&Rh(e,s,l,o))}switch(n){case"input":za(e),Qm(e,r,!1);break;case"textarea":za(e),Ym(e);break;case"option":r.value!=null&&e.setAttribute("value",""+$r(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?cs(e,!!r.multiple,s,!1):r.defaultValue!=null&&cs(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 Ze(t),null;case 6:if(e&&t.stateNode!=null)Mx(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(A(166));if(n=oi(Qo.current),oi(kn.current),Xa(t)){if(r=t.stateNode,n=t.memoizedProps,r[En]=t,(s=r.nodeValue!==n)&&(e=Mt,e!==null))switch(e.tag){case 3:Ya(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ya(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[En]=t,t.stateNode=r}return Ze(t),null;case 13:if(ge(we),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ve&&Rt!==null&&t.mode&1&&!(t.flags&128))X1(),js(),t.flags|=98560,s=!1;else if(s=Xa(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[En]=t}else js(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ze(t),s=!1}else un!==null&&(vd(un),un=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?Ne===0&&(Ne=3):dp())),t.updateQueue!==null&&(t.flags|=4),Ze(t),null);case 4:return Ds(),cd(e,t),e===null&&Ho(t.stateNode.containerInfo),Ze(t),null;case 10:return Gh(t.type._context),Ze(t),null;case 17:return St(t.type)&&Ql(),Ze(t),null;case 19:if(ge(we),s=t.memoizedState,s===null)return Ze(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)oo(s,!1);else{if(Ne!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=tu(e),o!==null){for(t.flags|=128,oo(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()>Ns&&(t.flags|=128,r=!0,oo(s,!1),t.lanes=4194304)}else{if(!r)if(e=tu(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),oo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!ve)return Ze(t),null}else 2*Ae()-s.renderingStartTime>Ns&&n!==1073741824&&(t.flags|=128,r=!0,oo(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):(Ze(t),null);case 22:case 23:return fp(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?At&1073741824&&(Ze(t),t.subtreeFlags&6&&(t.flags|=8192)):Ze(t),null;case 24:return null;case 25:return null}throw Error(A(156,t.tag))}function $C(e,t){switch(Wh(t),t.tag){case 1:return St(t.type)&&Ql(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ds(),ge(bt),ge(rt),ep(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Jh(t),null;case 13:if(ge(we),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(A(340));js()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ge(we),null;case 4:return Ds(),null;case 10:return Gh(t.type._context),null;case 22:case 23:return fp(),null;case 24:return null;default:return null}}var el=!1,tt=!1,VC=typeof WeakSet=="function"?WeakSet:Set,N=null;function ns(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 fd(e,t,n){try{n()}catch(r){ke(e,t,r)}}var $g=!1;function BC(e,t){if(Qf=Hl,e=I1(),Uh(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,c=0,f=0,u=e,d=null;t:for(;;){for(var h;u!==n||i!==0&&u.nodeType!==3||(a=o+i),u!==s||r!==0&&u.nodeType!==3||(l=o+r),u.nodeType===3&&(o+=u.nodeValue.length),(h=u.firstChild)!==null;)d=u,u=h;for(;;){if(u===e)break t;if(d===n&&++c===i&&(a=o),d===s&&++f===r&&(l=o),(h=u.nextSibling)!==null)break;u=d,d=u.parentNode}u=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Gf={focusedElem:e,selectionRange:n},Hl=!1,N=t;N!==null;)if(t=N,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,N=e;else for(;N!==null;){t=N;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,w=m.memoizedState,p=t.stateNode,g=p.getSnapshotBeforeUpdate(t.elementType===t.type?x:sn(t.type,x),w);p.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(A(163))}}catch(C){ke(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,N=e;break}N=t.return}return m=$g,$g=!1,m}function ko(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&&fd(t,n,s)}i=i.next}while(i!==r)}}function Mu(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 dd(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 Dx(e){var t=e.alternate;t!==null&&(e.alternate=null,Dx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[En],delete t[Ko],delete t[Zf],delete t[TC],delete t[EC])),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 Fx(e){return e.tag===5||e.tag===3||e.tag===4}function Vg(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Fx(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 hd(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(hd(e,t,n),e=e.sibling;e!==null;)hd(e,t,n),e=e.sibling}function pd(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(pd(e,t,n),e=e.sibling;e!==null;)pd(e,t,n),e=e.sibling}var Ke=null,an=!1;function or(e,t,n){for(n=n.child;n!==null;)Nx(e,t,n),n=n.sibling}function Nx(e,t,n){if(Cn&&typeof Cn.onCommitFiberUnmount=="function")try{Cn.onCommitFiberUnmount(Cu,n)}catch{}switch(n.tag){case 5:tt||ns(n,t);case 6:var r=Ke,i=an;Ke=null,or(e,t,n),Ke=r,an=i,Ke!==null&&(an?(e=Ke,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ke.removeChild(n.stateNode));break;case 18:Ke!==null&&(an?(e=Ke,n=n.stateNode,e.nodeType===8?Vc(e.parentNode,n):e.nodeType===1&&Vc(e,n),Bo(e)):Vc(Ke,n.stateNode));break;case 4:r=Ke,i=an,Ke=n.stateNode.containerInfo,an=!0,or(e,t,n),Ke=r,an=i;break;case 0:case 11:case 14:case 15:if(!tt&&(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)&&fd(n,t,o),i=i.next}while(i!==r)}or(e,t,n);break;case 1:if(!tt&&(ns(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)}or(e,t,n);break;case 21:or(e,t,n);break;case 22:n.mode&1?(tt=(r=tt)||n.memoizedState!==null,or(e,t,n),tt=r):or(e,t,n);break;default:or(e,t,n)}}function Bg(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new VC),t.forEach(function(r){var i=YC.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function tn(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:Ke=a.stateNode,an=!1;break e;case 3:Ke=a.stateNode.containerInfo,an=!0;break e;case 4:Ke=a.stateNode.containerInfo,an=!0;break e}a=a.return}if(Ke===null)throw Error(A(160));Nx(s,o,i),Ke=null,an=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){ke(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Lx(t,e),t=t.sibling}function Lx(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(tn(t,e),gn(e),r&4){try{ko(3,e,e.return),Mu(3,e)}catch(x){ke(e,e.return,x)}try{ko(5,e,e.return)}catch(x){ke(e,e.return,x)}}break;case 1:tn(t,e),gn(e),r&512&&n!==null&&ns(n,n.return);break;case 5:if(tn(t,e),gn(e),r&512&&n!==null&&ns(n,n.return),e.flags&32){var i=e.stateNode;try{Lo(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&&s1(i,s),If(a,o);var c=If(a,s);for(o=0;o<l.length;o+=2){var f=l[o],u=l[o+1];f==="style"?c1(i,u):f==="dangerouslySetInnerHTML"?l1(i,u):f==="children"?Lo(i,u):Rh(i,f,u,c)}switch(a){case"input":Mf(i,s);break;case"textarea":o1(i,s);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?cs(i,!!s.multiple,h,!1):d!==!!s.multiple&&(s.defaultValue!=null?cs(i,!!s.multiple,s.defaultValue,!0):cs(i,!!s.multiple,s.multiple?[]:"",!1))}i[Ko]=s}catch(x){ke(e,e.return,x)}}break;case 6:if(tn(t,e),gn(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(tn(t,e),gn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Bo(t.containerInfo)}catch(x){ke(e,e.return,x)}break;case 4:tn(t,e),gn(e);break;case 13:tn(t,e),gn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(up=Ae())),r&4&&Bg(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(tt=(c=tt)||f,tn(t,e),tt=c):tn(t,e),gn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!f&&e.mode&1)for(N=e,f=e.child;f!==null;){for(u=N=f;N!==null;){switch(d=N,h=d.child,d.tag){case 0:case 11:case 14:case 15:ko(4,d,d.return);break;case 1:ns(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:ns(d,d.return);break;case 22:if(d.memoizedState!==null){Ug(u);continue}}h!==null?(h.return=d,N=h):Ug(u)}f=f.sibling}e:for(f=null,u=e;;){if(u.tag===5){if(f===null){f=u;try{i=u.stateNode,c?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=u.stateNode,l=u.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=u1("display",o))}catch(x){ke(e,e.return,x)}}}else if(u.tag===6){if(f===null)try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(x){ke(e,e.return,x)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===e)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break e;for(;u.sibling===null;){if(u.return===null||u.return===e)break e;f===u&&(f=null),u=u.return}f===u&&(f=null),u.sibling.return=u.return,u=u.sibling}}break;case 19:tn(t,e),gn(e),r&4&&Bg(e);break;case 21:break;default:tn(t,e),gn(e)}}function gn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Fx(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&&(Lo(i,""),r.flags&=-33);var s=Vg(e);pd(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Vg(e);hd(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 zC(e,t,n){N=e,Ix(e)}function Ix(e,t,n){for(var r=(e.mode&1)!==0;N!==null;){var i=N,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||el;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||tt;a=el;var c=tt;if(el=o,(tt=l)&&!c)for(N=i;N!==null;)o=N,l=o.child,o.tag===22&&o.memoizedState!==null?Hg(i):l!==null?(l.return=o,N=l):Hg(i);for(;s!==null;)N=s,Ix(s),s=s.sibling;N=i,el=a,tt=c}zg(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,N=s):zg(e)}}function zg(e){for(;N!==null;){var t=N;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:tt||Mu(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!tt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:sn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&kg(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}kg(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 c=t.alternate;if(c!==null){var f=c.memoizedState;if(f!==null){var u=f.dehydrated;u!==null&&Bo(u)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(A(163))}tt||t.flags&512&&dd(t)}catch(d){ke(t,t.return,d)}}if(t===e){N=null;break}if(n=t.sibling,n!==null){n.return=t.return,N=n;break}N=t.return}}function Ug(e){for(;N!==null;){var t=N;if(t===e){N=null;break}var n=t.sibling;if(n!==null){n.return=t.return,N=n;break}N=t.return}}function Hg(e){for(;N!==null;){var t=N;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Mu(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{dd(t)}catch(l){ke(t,s,l)}break;case 5:var o=t.return;try{dd(t)}catch(l){ke(t,o,l)}}}catch(l){ke(t,t.return,l)}if(t===e){N=null;break}var a=t.sibling;if(a!==null){a.return=t.return,N=a;break}N=t.return}}var UC=Math.ceil,iu=er.ReactCurrentDispatcher,ap=er.ReactCurrentOwner,Gt=er.ReactCurrentBatchConfig,se=0,Ue=null,Oe=null,Qe=0,At=0,rs=Wr(0),Ne=0,Zo=null,ki=0,Du=0,lp=0,_o=null,vt=null,up=0,Ns=1/0,$n=null,su=!1,md=null,jr=null,tl=!1,Er=null,ou=0,Po=0,gd=null,El=-1,Cl=0;function lt(){return se&6?Ae():El!==-1?El:El=Ae()}function Mr(e){return e.mode&1?se&2&&Qe!==0?Qe&-Qe:kC.transition!==null?(Cl===0&&(Cl=S1()),Cl):(e=le,e!==0||(e=window.event,e=e===void 0?16:A1(e.type)),e):1}function hn(e,t,n,r){if(50<Po)throw Po=0,gd=null,Error(A(185));xa(e,n,r),(!(se&2)||e!==Ue)&&(e===Ue&&(!(se&2)&&(Du|=n),Ne===4&&hr(e,Qe)),Tt(e,r),n===1&&se===0&&!(t.mode&1)&&(Ns=Ae()+500,Ru&&Kr()))}function Tt(e,t){var n=e.callbackNode;kE(e,t);var r=Ul(e,e===Ue?Qe:0);if(r===0)n!==null&&Jm(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Jm(n),t===1)e.tag===0?CC(Wg.bind(null,e)):Q1(Wg.bind(null,e)),bC(function(){!(se&6)&&Kr()}),n=null;else{switch(T1(r)){case 1:n=Fh;break;case 4:n=w1;break;case 16:n=zl;break;case 536870912:n=b1;break;default:n=zl}n=Kx(n,$x.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function $x(e,t){if(El=-1,Cl=0,se&6)throw Error(A(327));var n=e.callbackNode;if(ms()&&e.callbackNode!==n)return null;var r=Ul(e,e===Ue?Qe:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=au(e,r);else{t=r;var i=se;se|=2;var s=Bx();(Ue!==e||Qe!==t)&&($n=null,Ns=Ae()+500,vi(e,t));do try{KC();break}catch(a){Vx(e,a)}while(!0);Qh(),iu.current=s,se=i,Oe!==null?t=0:(Ue=null,Qe=0,t=Ne)}if(t!==0){if(t===2&&(i=Uf(e),i!==0&&(r=i,t=yd(e,i))),t===1)throw n=Zo,vi(e,0),hr(e,r),Tt(e,Ae()),n;if(t===6)hr(e,r);else{if(i=e.current.alternate,!(r&30)&&!HC(i)&&(t=au(e,r),t===2&&(s=Uf(e),s!==0&&(r=s,t=yd(e,s))),t===1))throw n=Zo,vi(e,0),hr(e,r),Tt(e,Ae()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(A(345));case 2:ei(e,vt,$n);break;case 3:if(hr(e,r),(r&130023424)===r&&(t=up+500-Ae(),10<t)){if(Ul(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){lt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Xf(ei.bind(null,e,vt,$n),t);break}ei(e,vt,$n);break;case 4:if(hr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-dn(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*UC(r/1960))-r,10<r){e.timeoutHandle=Xf(ei.bind(null,e,vt,$n),r);break}ei(e,vt,$n);break;case 5:ei(e,vt,$n);break;default:throw Error(A(329))}}}return Tt(e,Ae()),e.callbackNode===n?$x.bind(null,e):null}function yd(e,t){var n=_o;return e.current.memoizedState.isDehydrated&&(vi(e,t).flags|=256),e=au(e,t),e!==2&&(t=vt,vt=n,t!==null&&vd(t)),e}function vd(e){vt===null?vt=e:vt.push.apply(vt,e)}function HC(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(!pn(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 hr(e,t){for(t&=~lp,t&=~Du,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-dn(t),r=1<<n;e[n]=-1,t&=~r}}function Wg(e){if(se&6)throw Error(A(327));ms();var t=Ul(e,0);if(!(t&1))return Tt(e,Ae()),null;var n=au(e,t);if(e.tag!==0&&n===2){var r=Uf(e);r!==0&&(t=r,n=yd(e,r))}if(n===1)throw n=Zo,vi(e,0),hr(e,t),Tt(e,Ae()),n;if(n===6)throw Error(A(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ei(e,vt,$n),Tt(e,Ae()),null}function cp(e,t){var n=se;se|=1;try{return e(t)}finally{se=n,se===0&&(Ns=Ae()+500,Ru&&Kr())}}function _i(e){Er!==null&&Er.tag===0&&!(se&6)&&ms();var t=se;se|=1;var n=Gt.transition,r=le;try{if(Gt.transition=null,le=1,e)return e()}finally{le=r,Gt.transition=n,se=t,!(se&6)&&Kr()}}function fp(){At=rs.current,ge(rs)}function vi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,wC(n)),Oe!==null)for(n=Oe.return;n!==null;){var r=n;switch(Wh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ql();break;case 3:Ds(),ge(bt),ge(rt),ep();break;case 5:Jh(r);break;case 4:Ds();break;case 13:ge(we);break;case 19:ge(we);break;case 10:Gh(r.type._context);break;case 22:case 23:fp()}n=n.return}if(Ue=e,Oe=e=Dr(e.current,null),Qe=At=t,Ne=0,Zo=null,lp=Du=ki=0,vt=_o=null,si!==null){for(t=0;t<si.length;t++)if(n=si[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}si=null}return e}function Vx(e,t){do{var n=Oe;try{if(Qh(),bl.current=ru,nu){for(var r=Se.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}nu=!1}if(Ci=0,Be=De=Se=null,Co=!1,Go=0,ap.current=null,n===null||n.return===null){Ne=1,Zo=t,Oe=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 c=l,f=a,u=f.tag;if(!(f.mode&1)&&(u===0||u===11||u===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=jg(o);if(h!==null){h.flags&=-257,Mg(h,o,a,s,t),h.mode&1&&Og(s,c,t),t=h,l=c;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)){Og(s,c,t),dp();break e}l=Error(A(426))}}else if(ve&&a.mode&1){var w=jg(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),Mg(w,o,a,s,t),Kh(Fs(l,a));break e}}s=l=Fs(l,a),Ne!==4&&(Ne=2),_o===null?_o=[s]:_o.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var p=Tx(s,l,t);Cg(s,p);break e;case 1:a=l;var g=s.type,y=s.stateNode;if(!(s.flags&128)&&(typeof g.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(jr===null||!jr.has(y)))){s.flags|=65536,t&=-t,s.lanes|=t;var C=Ex(s,a,t);Cg(s,C);break e}}s=s.return}while(s!==null)}Ux(n)}catch(b){t=b,Oe===n&&n!==null&&(Oe=n=n.return);continue}break}while(!0)}function Bx(){var e=iu.current;return iu.current=ru,e===null?ru:e}function dp(){(Ne===0||Ne===3||Ne===2)&&(Ne=4),Ue===null||!(ki&268435455)&&!(Du&268435455)||hr(Ue,Qe)}function au(e,t){var n=se;se|=2;var r=Bx();(Ue!==e||Qe!==t)&&($n=null,vi(e,t));do try{WC();break}catch(i){Vx(e,i)}while(!0);if(Qh(),se=n,iu.current=r,Oe!==null)throw Error(A(261));return Ue=null,Qe=0,Ne}function WC(){for(;Oe!==null;)zx(Oe)}function KC(){for(;Oe!==null&&!yE();)zx(Oe)}function zx(e){var t=Wx(e.alternate,e,At);e.memoizedProps=e.pendingProps,t===null?Ux(e):Oe=t,ap.current=null}function Ux(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=$C(n,t),n!==null){n.flags&=32767,Oe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ne=6,Oe=null;return}}else if(n=IC(n,t,At),n!==null){Oe=n;return}if(t=t.sibling,t!==null){Oe=t;return}Oe=t=e}while(t!==null);Ne===0&&(Ne=5)}function ei(e,t,n){var r=le,i=Gt.transition;try{Gt.transition=null,le=1,qC(e,t,n,r)}finally{Gt.transition=i,le=r}return null}function qC(e,t,n,r){do ms();while(Er!==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(_E(e,s),e===Ue&&(Oe=Ue=null,Qe=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||tl||(tl=!0,Kx(zl,function(){return ms(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Gt.transition,Gt.transition=null;var o=le;le=1;var a=se;se|=4,ap.current=null,BC(e,n),Lx(n,e),hC(Gf),Hl=!!Qf,Gf=Qf=null,e.current=n,zC(n),vE(),se=a,le=o,Gt.transition=s}else e.current=n;if(tl&&(tl=!1,Er=e,ou=i),s=e.pendingLanes,s===0&&(jr=null),bE(n.stateNode),Tt(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(su)throw su=!1,e=md,md=null,e;return ou&1&&e.tag!==0&&ms(),s=e.pendingLanes,s&1?e===gd?Po++:(Po=0,gd=e):Po=0,Kr(),null}function ms(){if(Er!==null){var e=T1(ou),t=Gt.transition,n=le;try{if(Gt.transition=null,le=16>e?16:e,Er===null)var r=!1;else{if(e=Er,Er=null,ou=0,se&6)throw Error(A(331));var i=se;for(se|=4,N=e.current;N!==null;){var s=N,o=s.child;if(N.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(N=c;N!==null;){var f=N;switch(f.tag){case 0:case 11:case 15:ko(8,f,s)}var u=f.child;if(u!==null)u.return=f,N=u;else for(;N!==null;){f=N;var d=f.sibling,h=f.return;if(Dx(f),f===c){N=null;break}if(d!==null){d.return=h,N=d;break}N=h}}}var m=s.alternate;if(m!==null){var x=m.child;if(x!==null){m.child=null;do{var w=x.sibling;x.sibling=null,x=w}while(x!==null)}}N=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,N=o;else e:for(;N!==null;){if(s=N,s.flags&2048)switch(s.tag){case 0:case 11:case 15:ko(9,s,s.return)}var p=s.sibling;if(p!==null){p.return=s.return,N=p;break e}N=s.return}}var g=e.current;for(N=g;N!==null;){o=N;var y=o.child;if(o.subtreeFlags&2064&&y!==null)y.return=o,N=y;else e:for(o=g;N!==null;){if(a=N,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Mu(9,a)}}catch(b){ke(a,a.return,b)}if(a===o){N=null;break e}var C=a.sibling;if(C!==null){C.return=a.return,N=C;break e}N=a.return}}if(se=i,Kr(),Cn&&typeof Cn.onPostCommitFiberRoot=="function")try{Cn.onPostCommitFiberRoot(Cu,e)}catch{}r=!0}return r}finally{le=n,Gt.transition=t}}return!1}function Kg(e,t,n){t=Fs(n,t),t=Tx(e,t,1),e=Or(e,t,1),t=lt(),e!==null&&(xa(e,1,t),Tt(e,t))}function ke(e,t,n){if(e.tag===3)Kg(e,e,n);else for(;t!==null;){if(t.tag===3){Kg(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(jr===null||!jr.has(r))){e=Fs(n,e),e=Ex(t,e,1),t=Or(t,e,1),e=lt(),t!==null&&(xa(t,1,e),Tt(t,e));break}}t=t.return}}function QC(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=lt(),e.pingedLanes|=e.suspendedLanes&n,Ue===e&&(Qe&n)===n&&(Ne===4||Ne===3&&(Qe&130023424)===Qe&&500>Ae()-up?vi(e,0):lp|=n),Tt(e,t)}function Hx(e,t){t===0&&(e.mode&1?(t=Wa,Wa<<=1,!(Wa&130023424)&&(Wa=4194304)):t=1);var n=lt();e=Yn(e,t),e!==null&&(xa(e,t,n),Tt(e,n))}function GC(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Hx(e,n)}function YC(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),Hx(e,n)}var Wx;Wx=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||bt.current)wt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return wt=!1,LC(e,t,n);wt=!!(e.flags&131072)}else wt=!1,ve&&t.flags&1048576&&G1(t,Xl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Tl(e,t),e=t.pendingProps;var i=Os(t,rt.current);ps(t,n),i=np(null,t,r,e,i,n);var s=rp();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,St(r)?(s=!0,Gl(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Xh(t),i.updater=ju,t.stateNode=i,i._reactInternals=t,id(t,r,e,n),t=ad(null,t,r,!0,s,n)):(t.tag=0,ve&&s&&Hh(t),ot(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Tl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=ZC(r),e=sn(r,e),i){case 0:t=od(null,t,r,e,n);break e;case 1:t=Ng(null,t,r,e,n);break e;case 11:t=Dg(null,t,r,e,n);break e;case 14:t=Fg(null,t,r,sn(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:sn(r,i),od(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:sn(r,i),Ng(e,t,r,i,n);case 3:e:{if(Px(t),e===null)throw Error(A(387));r=t.pendingProps,s=t.memoizedState,i=s.element,tx(e,t),eu(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=Fs(Error(A(423)),t),t=Lg(e,t,r,n,i);break e}else if(r!==i){i=Fs(Error(A(424)),t),t=Lg(e,t,r,n,i);break e}else for(Rt=Rr(t.stateNode.containerInfo.firstChild),Mt=t,ve=!0,un=null,n=J1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(js(),r===i){t=Xn(e,t,n);break e}ot(e,t,r,n)}t=t.child}return t;case 5:return nx(t),e===null&&td(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,Yf(r,i)?o=null:s!==null&&Yf(r,s)&&(t.flags|=32),_x(e,t),ot(e,t,o,n),t.child;case 6:return e===null&&td(t),null;case 13:return Ax(e,t,n);case 4:return Zh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ms(t,null,r,n):ot(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:sn(r,i),Dg(e,t,r,i,n);case 7:return ot(e,t,t.pendingProps,n),t.child;case 8:return ot(e,t,t.pendingProps.children,n),t.child;case 12:return ot(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(Zl,r._currentValue),r._currentValue=o,s!==null)if(pn(s.value,o)){if(s.children===i.children&&!bt.current){t=Xn(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=Kn(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),nd(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),nd(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}ot(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,ps(t,n),i=Xt(i),r=r(i),t.flags|=1,ot(e,t,r,n),t.child;case 14:return r=t.type,i=sn(r,t.pendingProps),i=sn(r.type,i),Fg(e,t,r,i,n);case 15:return Cx(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:sn(r,i),Tl(e,t),t.tag=1,St(r)?(e=!0,Gl(t)):e=!1,ps(t,n),Sx(t,r,i),id(t,r,i,n),ad(null,t,r,!0,e,n);case 19:return Rx(e,t,n);case 22:return kx(e,t,n)}throw Error(A(156,t.tag))};function Kx(e,t){return x1(e,t)}function XC(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 Qt(e,t,n,r){return new XC(e,t,n,r)}function hp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ZC(e){if(typeof e=="function")return hp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===jh)return 11;if(e===Mh)return 14}return 2}function Dr(e,t){var n=e.alternate;return n===null?(n=Qt(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 kl(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")hp(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case qi:return xi(n.children,i,s,t);case Oh:o=8,i|=8;break;case Pf:return e=Qt(12,n,t,i|2),e.elementType=Pf,e.lanes=s,e;case Af:return e=Qt(13,n,t,i),e.elementType=Af,e.lanes=s,e;case Rf:return e=Qt(19,n,t,i),e.elementType=Rf,e.lanes=s,e;case n1:return Fu(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case e1:o=10;break e;case t1:o=9;break e;case jh:o=11;break e;case Mh:o=14;break e;case ur:o=16,r=null;break e}throw Error(A(130,e==null?e:typeof e,""))}return t=Qt(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function xi(e,t,n,r){return e=Qt(7,e,r,t),e.lanes=n,e}function Fu(e,t,n,r){return e=Qt(22,e,r,t),e.elementType=n1,e.lanes=n,e.stateNode={isHidden:!1},e}function Qc(e,t,n){return e=Qt(6,e,null,t),e.lanes=n,e}function Gc(e,t,n){return t=Qt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function JC(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=Ac(0),this.expirationTimes=Ac(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ac(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function pp(e,t,n,r,i,s,o,a,l){return e=new JC(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Qt(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Xh(s),e}function ek(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ki,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function qx(e){if(!e)return Vr;e=e._reactInternals;e:{if(ji(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(St(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(St(n))return q1(e,n,t)}return t}function Qx(e,t,n,r,i,s,o,a,l){return e=pp(n,r,!0,e,i,s,o,a,l),e.context=qx(null),n=e.current,r=lt(),i=Mr(n),s=Kn(r,i),s.callback=t??null,Or(n,s,i),e.current.lanes=i,xa(e,i,r),Tt(e,r),e}function Nu(e,t,n,r){var i=t.current,s=lt(),o=Mr(i);return n=qx(n),t.context===null?t.context=n:t.pendingContext=n,t=Kn(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Or(i,t,o),e!==null&&(hn(e,i,o,s),wl(e,i,o)),o}function lu(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 qg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function mp(e,t){qg(e,t),(e=e.alternate)&&qg(e,t)}function tk(){return null}var Gx=typeof reportError=="function"?reportError:function(e){console.error(e)};function gp(e){this._internalRoot=e}Lu.prototype.render=gp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(A(409));Nu(e,t,null,null)};Lu.prototype.unmount=gp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;_i(function(){Nu(null,e,null,null)}),t[Gn]=null}};function Lu(e){this._internalRoot=e}Lu.prototype.unstable_scheduleHydration=function(e){if(e){var t=k1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<dr.length&&t!==0&&t<dr[n].priority;n++);dr.splice(n,0,e),n===0&&P1(e)}};function yp(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Iu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Qg(){}function nk(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var c=lu(o);s.call(c)}}var o=Qx(t,r,e,0,null,!1,!1,"",Qg);return e._reactRootContainer=o,e[Gn]=o.current,Ho(e.nodeType===8?e.parentNode:e),_i(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var c=lu(l);a.call(c)}}var l=pp(e,0,!1,null,null,!1,!1,"",Qg);return e._reactRootContainer=l,e[Gn]=l.current,Ho(e.nodeType===8?e.parentNode:e),_i(function(){Nu(t,l,n,r)}),l}function $u(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=lu(o);a.call(l)}}Nu(t,o,e,i)}else o=nk(n,t,e,i,r);return lu(o)}E1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=po(t.pendingLanes);n!==0&&(Nh(t,n|1),Tt(t,Ae()),!(se&6)&&(Ns=Ae()+500,Kr()))}break;case 13:_i(function(){var r=Yn(e,1);if(r!==null){var i=lt();hn(r,e,1,i)}}),mp(e,1)}};Lh=function(e){if(e.tag===13){var t=Yn(e,134217728);if(t!==null){var n=lt();hn(t,e,134217728,n)}mp(e,134217728)}};C1=function(e){if(e.tag===13){var t=Mr(e),n=Yn(e,t);if(n!==null){var r=lt();hn(n,e,t,r)}mp(e,t)}};k1=function(){return le};_1=function(e,t){var n=le;try{return le=e,t()}finally{le=n}};Vf=function(e,t,n){switch(t){case"input":if(Mf(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=Au(r);if(!i)throw Error(A(90));i1(r),Mf(r,i)}}}break;case"textarea":o1(e,n);break;case"select":t=n.value,t!=null&&cs(e,!!n.multiple,t,!1)}};h1=cp;p1=_i;var rk={usingClientEntryPoint:!1,Events:[ba,Xi,Au,f1,d1,cp]},ao={findFiberByHostInstance:ii,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ik={bundleType:ao.bundleType,version:ao.version,rendererPackageName:ao.rendererPackageName,rendererConfig:ao.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:er.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=y1(e),e===null?null:e.stateNode},findFiberByHostInstance:ao.findFiberByHostInstance||tk,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 nl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!nl.isDisabled&&nl.supportsFiber)try{Cu=nl.inject(ik),Cn=nl}catch{}}Ft.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=rk;Ft.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!yp(t))throw Error(A(200));return ek(e,t,null,n)};Ft.createRoot=function(e,t){if(!yp(e))throw Error(A(299));var n=!1,r="",i=Gx;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=pp(e,1,!1,null,null,n,!1,r,i),e[Gn]=t.current,Ho(e.nodeType===8?e.parentNode:e),new gp(t)};Ft.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=y1(t),e=e===null?null:e.stateNode,e};Ft.flushSync=function(e){return _i(e)};Ft.hydrate=function(e,t,n){if(!Iu(t))throw Error(A(200));return $u(null,e,t,!0,n)};Ft.hydrateRoot=function(e,t,n){if(!yp(e))throw Error(A(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=Gx;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Qx(t,null,e,1,n??null,i,!1,s,o),e[Gn]=t.current,Ho(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 Lu(t)};Ft.render=function(e,t,n){if(!Iu(t))throw Error(A(200));return $u(null,e,t,!1,n)};Ft.unmountComponentAtNode=function(e){if(!Iu(e))throw Error(A(40));return e._reactRootContainer?(_i(function(){$u(null,null,e,!1,function(){e._reactRootContainer=null,e[Gn]=null})}),!0):!1};Ft.unstable_batchedUpdates=cp;Ft.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Iu(n))throw Error(A(200));if(e==null||e._reactInternals===void 0)throw Error(A(38));return $u(e,t,n,!1,r)};Ft.version="18.3.1-next-f1338f8080-20240426";function Yx(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Yx)}catch(e){console.error(e)}}Yx(),Yv.exports=Ft;var Xx=Yv.exports;const sk=zs(Xx);var Zx,Gg=Xx;Zx=Gg.createRoot,Gg.hydrateRoot;const ok="@alfatech/livechat",ak="v2025.05.05.1",lk="module",uk="https://api-live.alfatek.dev",ck="wss://api-live.alfatek.dev",fk=["dist","README.md"],dk="dist/widget.js",hk={dev:"vite",build:"tsc -b && vite build",lint:"biome lint --write",prepare:"husky",format:"biome format --write && yarn lint"},pk={"@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"},mk={"@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"},Jx={name:ok,private:!1,version:ak,type:lk,apiURL:uk,wsURL:ck,files:fk,main:dk,scripts:hk,dependencies:pk,devDependencies:mk,"lint-staged":{"./**/*.{js,ts,tsx,json}":["npm run format"]}},gk=Jx.apiURL,yk=Jx.wsURL,vk=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],xk=(e,t)=>[{message:"message"in t?t.message:"Not Found"},404],wk={429:vk,404:xk};async function Vu(e,t={}){const n={};!(t.body instanceof FormData)&&t.body&&(n["Content-Type"]="application/json");const r=await fetch(`${gk}/${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=wk[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 ew=e=>[200,201,204].includes(e);var Ks=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(){}},Pi=typeof window>"u"||"Deno"in globalThis;function Ht(){}function bk(e,t){return typeof e=="function"?e(t):e}function xd(e){return typeof e=="number"&&e>=0&&e!==1/0}function tw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function gs(e,t){return typeof e=="function"?e(t):e}function cn(e,t){return typeof e=="function"?e(t):e}function Yg(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==vp(o,t.options))return!1}else if(!Jo(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 Xg(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Ai(t.options.mutationKey)!==Ai(s))return!1}else if(!Jo(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function vp(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ai)(e)}function Ai(e){return JSON.stringify(e,(t,n)=>wd(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Jo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Jo(e[n],t[n])):!1}function nw(e,t){if(e===t)return e;const n=Zg(e)&&Zg(t);if(n||wd(e)&&wd(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 c=0;c<o;c++){const f=n?c:s[c];(!n&&r.includes(f)||n)&&e[f]===void 0&&t[f]===void 0?(a[f]=void 0,l++):(a[f]=nw(e[f],t[f]),a[f]===e[f]&&e[f]!==void 0&&l++)}return i===o&&l===i?e:a}return t}function uu(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 Zg(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function wd(e){if(!Jg(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Jg(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Jg(e){return Object.prototype.toString.call(e)==="[object Object]"}function Sk(e){return new Promise(t=>{setTimeout(t,e)})}function bd(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?nw(e,t):t}function Tk(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Ek(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var xp=Symbol();function rw(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===xp?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var fi,pr,ys,Av,Ck=(Av=class extends Ks{constructor(){super();H(this,fi);H(this,pr);H(this,ys);F(this,ys,t=>{if(!Pi&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){S(this,pr)||this.setEventListener(S(this,ys))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,pr))==null||t.call(this),F(this,pr,void 0))}setEventListener(t){var n;F(this,ys,t),(n=S(this,pr))==null||n.call(this),F(this,pr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){S(this,fi)!==t&&(F(this,fi,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof S(this,fi)=="boolean"?S(this,fi):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},fi=new WeakMap,pr=new WeakMap,ys=new WeakMap,Av),wp=new Ck,vs,mr,xs,Rv,kk=(Rv=class extends Ks{constructor(){super();H(this,vs,!0);H(this,mr);H(this,xs);F(this,xs,t=>{if(!Pi&&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(){S(this,mr)||this.setEventListener(S(this,xs))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,mr))==null||t.call(this),F(this,mr,void 0))}setEventListener(t){var n;F(this,xs,t),(n=S(this,mr))==null||n.call(this),F(this,mr,t(this.setOnline.bind(this)))}setOnline(t){S(this,vs)!==t&&(F(this,vs,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return S(this,vs)}},vs=new WeakMap,mr=new WeakMap,xs=new WeakMap,Rv),cu=new kk;function Sd(){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 _k(e){return Math.min(1e3*2**e,3e4)}function iw(e){return(e??"online")==="online"?cu.isOnline():!0}var sw=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Yc(e){return e instanceof sw}function ow(e){let t=!1,n=0,r=!1,i;const s=Sd(),o=x=>{var w;r||(d(new sw(x)),(w=e.abort)==null||w.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>wp.isFocused()&&(e.networkMode==="always"||cu.isOnline())&&e.canRun(),f=()=>iw(e.networkMode)&&e.canRun(),u=x=>{var w;r||(r=!0,(w=e.onSuccess)==null||w.call(e,x),i==null||i(),s.resolve(x))},d=x=>{var w;r||(r=!0,(w=e.onError)==null||w.call(e,x),i==null||i(),s.reject(x))},h=()=>new Promise(x=>{var w;i=p=>{(r||c())&&x(p)},(w=e.onPause)==null||w.call(e)}).then(()=>{var x;i=void 0,r||(x=e.onContinue)==null||x.call(e)}),m=()=>{if(r)return;let x;const w=n===0?e.initialPromise:void 0;try{x=w??e.fn()}catch(p){x=Promise.reject(p)}Promise.resolve(x).then(u).catch(p=>{var E;if(r)return;const g=e.retry??(Pi?0:3),y=e.retryDelay??_k,C=typeof y=="function"?y(n,p):y,b=g===!0||typeof g=="number"&&n<g||typeof g=="function"&&g(n,p);if(t||!b){d(p);return}n++,(E=e.onFail)==null||E.call(e,n,p),Sk(C).then(()=>c()?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 Pk(){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 Fe=Pk(),di,Ov,aw=(Ov=class{constructor(){H(this,di)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),xd(this.gcTime)&&F(this,di,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Pi?1/0:5*60*1e3))}clearGcTimeout(){S(this,di)&&(clearTimeout(S(this,di)),F(this,di,void 0))}},di=new WeakMap,Ov),ws,bs,Ut,Je,pa,hi,on,In,jv,Ak=(jv=class extends aw{constructor(t){super();H(this,on);H(this,ws);H(this,bs);H(this,Ut);H(this,Je);H(this,pa);H(this,hi);F(this,hi,!1),F(this,pa,t.defaultOptions),this.setOptions(t.options),this.observers=[],F(this,Ut,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,F(this,ws,Rk(this.options)),this.state=t.state??S(this,ws),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=S(this,Je))==null?void 0:t.promise}setOptions(t){this.options={...S(this,pa),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&S(this,Ut).remove(this)}setData(t,n){const r=bd(this.state.data,t,this.options);return X(this,on,In).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,on,In).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=S(this,Je))==null?void 0:r.promise;return(i=S(this,Je))==null||i.cancel(t),n?n.then(Ht).catch(Ht):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(S(this,ws))}isActive(){return this.observers.some(t=>cn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===xp||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||!tw(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,Je))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,Je))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),S(this,Ut).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(S(this,Je)&&(S(this,hi)?S(this,Je).cancel({revert:!0}):S(this,Je).cancelRetry()),this.scheduleGc()),S(this,Ut).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||X(this,on,In).call(this,{type:"invalidate"})}fetch(t,n){var l,c,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(S(this,Je))return S(this,Je).continueRetry(),S(this,Je).promise}if(t&&this.setOptions(t),!this.options.queryFn){const u=this.observers.find(d=>d.options.queryFn);u&&this.setOptions(u.options)}const r=new AbortController,i=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(F(this,hi,!0),r.signal)})},s=()=>{const u=rw(this.options,n),d={queryKey:this.queryKey,meta:this.meta};return i(d),F(this,hi,!1),this.options.persister?this.options.persister(u,d,this):u(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),F(this,bs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=o.fetchOptions)==null?void 0:c.meta))&&X(this,on,In).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const a=u=>{var d,h,m,x;Yc(u)&&u.silent||X(this,on,In).call(this,{type:"error",error:u}),Yc(u)||((h=(d=S(this,Ut).config).onError)==null||h.call(d,u,this),(x=(m=S(this,Ut).config).onSettled)==null||x.call(m,this.state.data,u,this)),this.scheduleGc()};return F(this,Je,ow({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:u=>{var d,h,m,x;if(u===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(u)}catch(w){a(w);return}(h=(d=S(this,Ut).config).onSuccess)==null||h.call(d,u,this),(x=(m=S(this,Ut).config).onSettled)==null||x.call(m,u,this.state.error,this),this.scheduleGc()},onError:a,onFail:(u,d)=>{X(this,on,In).call(this,{type:"failed",failureCount:u,error:d})},onPause:()=>{X(this,on,In).call(this,{type:"pause"})},onContinue:()=>{X(this,on,In).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),S(this,Je).start()}},ws=new WeakMap,bs=new WeakMap,Ut=new WeakMap,Je=new WeakMap,pa=new WeakMap,hi=new WeakMap,on=new WeakSet,In=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,...lw(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 Yc(i)&&i.revert&&S(this,bs)?{...S(this,bs),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),Fe.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),S(this,Ut).notify({query:this,type:"updated",action:t})})},jv);function lw(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:iw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Rk(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 wn,Mv,Ok=(Mv=class extends Ks{constructor(t={}){super();H(this,wn);this.config=t,F(this,wn,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??vp(i,n);let o=this.get(s);return o||(o=new Ak({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){S(this,wn).has(t.queryHash)||(S(this,wn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=S(this,wn).get(t.queryHash);n&&(t.destroy(),n===t&&S(this,wn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Fe.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return S(this,wn).get(t)}getAll(){return[...S(this,wn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Yg(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Yg(t,r)):n}notify(t){Fe.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Fe.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Fe.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},wn=new WeakMap,Mv),bn,it,pi,Sn,ar,Dv,jk=(Dv=class extends aw{constructor(t){super();H(this,Sn);H(this,bn);H(this,it);H(this,pi);this.mutationId=t.mutationId,F(this,it,t.mutationCache),F(this,bn,[]),this.state=t.state||uw(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){S(this,bn).includes(t)||(S(this,bn).push(t),this.clearGcTimeout(),S(this,it).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){F(this,bn,S(this,bn).filter(n=>n!==t)),this.scheduleGc(),S(this,it).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){S(this,bn).length||(this.state.status==="pending"?this.scheduleGc():S(this,it).remove(this))}continue(){var t;return((t=S(this,pi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,c,f,u,d,h,m,x,w,p,g,y,C,b,E,k;F(this,pi,ow({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(P,j)=>{X(this,Sn,ar).call(this,{type:"failed",failureCount:P,error:j})},onPause:()=>{X(this,Sn,ar).call(this,{type:"pause"})},onContinue:()=>{X(this,Sn,ar).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>S(this,it).canRun(this)}));const n=this.state.status==="pending",r=!S(this,pi).canStart();try{if(!n){X(this,Sn,ar).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(i=S(this,it).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,Sn,ar).call(this,{type:"pending",context:j,variables:t,isPaused:r})}const P=await S(this,pi).start();return await((c=(l=S(this,it).config).onSuccess)==null?void 0:c.call(l,P,t,this.state.context,this)),await((u=(f=this.options).onSuccess)==null?void 0:u.call(f,P,t,this.state.context)),await((h=(d=S(this,it).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,Sn,ar).call(this,{type:"success",data:P}),P}catch(P){try{throw await((p=(w=S(this,it).config).onError)==null?void 0:p.call(w,P,t,this.state.context,this)),await((y=(g=this.options).onError)==null?void 0:y.call(g,P,t,this.state.context)),await((b=(C=S(this,it).config).onSettled)==null?void 0:b.call(C,void 0,P,this.state.variables,this.state.context,this)),await((k=(E=this.options).onSettled)==null?void 0:k.call(E,void 0,P,t,this.state.context)),P}finally{X(this,Sn,ar).call(this,{type:"error",error:P})}}finally{S(this,it).runNext(this)}}},bn=new WeakMap,it=new WeakMap,pi=new WeakMap,Sn=new WeakSet,ar=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),Fe.batch(()=>{S(this,bn).forEach(r=>{r.onMutationUpdate(t)}),S(this,it).notify({mutation:this,type:"updated",action:t})})},Dv);function uw(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Pt,ma,Fv,Mk=(Fv=class extends Ks{constructor(t={}){super();H(this,Pt);H(this,ma);this.config=t,F(this,Pt,new Map),F(this,ma,Date.now())}build(t,n,r){const i=new jk({mutationCache:this,mutationId:++$a(this,ma)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=rl(t),r=S(this,Pt).get(n)??[];r.push(t),S(this,Pt).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=rl(t);if(S(this,Pt).has(n)){const i=(r=S(this,Pt).get(n))==null?void 0:r.filter(s=>s!==t);i&&(i.length===0?S(this,Pt).delete(n):S(this,Pt).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=S(this,Pt).get(rl(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=S(this,Pt).get(rl(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Fe.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...S(this,Pt).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Xg(n,r))}findAll(t={}){return this.getAll().filter(n=>Xg(t,n))}notify(t){Fe.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Fe.batch(()=>Promise.all(t.map(n=>n.continue().catch(Ht))))}},Pt=new WeakMap,ma=new WeakMap,Fv);function rl(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function e0(e){return{onFetch:(t,n)=>{var f,u,d,h,m;const r=t.options,i=(d=(u=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:u.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 c=async()=>{let x=!1;const w=y=>{Object.defineProperty(y,"signal",{enumerable:!0,get:()=>(t.signal.aborted?x=!0:t.signal.addEventListener("abort",()=>{x=!0}),t.signal)})},p=rw(t.options,t.fetchOptions),g=async(y,C,b)=>{if(x)return Promise.reject();if(C==null&&y.pages.length)return Promise.resolve(y);const E={queryKey:t.queryKey,pageParam:C,direction:b?"backward":"forward",meta:t.options.meta};w(E);const k=await p(E),{maxPages:P}=t.options,j=b?Ek:Tk;return{pages:j(y.pages,k,P),pageParams:j(y.pageParams,C,P)}};if(i&&s.length){const y=i==="backward",C=y?Dk:t0,b={pages:s,pageParams:o},E=C(r,b);a=await g(b,E,y)}else{const y=e??s.length;do{const C=l===0?o[0]??r.initialPageParam:t0(r,a);if(l>0&&C==null)break;a=await g(a,C),l++}while(l<y)}return a};t.options.persister?t.fetchFn=()=>{var x,w;return(w=(x=t.options).persister)==null?void 0:w.call(x,c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function t0(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 Dk(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,gr,yr,Ss,Ts,vr,Es,Cs,Nv,Fk=(Nv=class{constructor(e={}){H(this,Ee);H(this,gr);H(this,yr);H(this,Ss);H(this,Ts);H(this,vr);H(this,Es);H(this,Cs);F(this,Ee,e.queryCache||new Ok),F(this,gr,e.mutationCache||new Mk),F(this,yr,e.defaultOptions||{}),F(this,Ss,new Map),F(this,Ts,new Map),F(this,vr,0)}mount(){$a(this,vr)._++,S(this,vr)===1&&(F(this,Es,wp.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,Ee).onFocus())})),F(this,Cs,cu.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,Ee).onOnline())})))}unmount(){var e,t;$a(this,vr)._--,S(this,vr)===0&&((e=S(this,Es))==null||e.call(this),F(this,Es,void 0),(t=S(this,Cs))==null||t.call(this),F(this,Cs,void 0))}isFetching(e){return S(this,Ee).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return S(this,gr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(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=S(this,Ee).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(gs(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return S(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=S(this,Ee).get(r.queryHash),s=i==null?void 0:i.state.data,o=bk(t,s);if(o!==void 0)return S(this,Ee).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Fe.batch(()=>S(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=S(this,Ee).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=S(this,Ee);Fe.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=S(this,Ee),r={type:"active",...e};return Fe.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Fe.batch(()=>S(this,Ee).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Ht).catch(Ht)}invalidateQueries(e,t={}){return Fe.batch(()=>{if(S(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=Fe.batch(()=>S(this,Ee).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Ht)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Ht)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=S(this,Ee).build(this,t);return n.isStaleByTime(gs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ht).catch(Ht)}fetchInfiniteQuery(e){return e.behavior=e0(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ht).catch(Ht)}ensureInfiniteQueryData(e){return e.behavior=e0(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return cu.isOnline()?S(this,gr).resumePausedMutations():Promise.resolve()}getQueryCache(){return S(this,Ee)}getMutationCache(){return S(this,gr)}getDefaultOptions(){return S(this,yr)}setDefaultOptions(e){F(this,yr,e)}setQueryDefaults(e,t){S(this,Ss).set(Ai(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...S(this,Ss).values()],n={};return t.forEach(r=>{Jo(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){S(this,Ts).set(Ai(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...S(this,Ts).values()];let n={};return t.forEach(r=>{Jo(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...S(this,yr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=vp(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===xp&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...S(this,yr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){S(this,Ee).clear(),S(this,gr).clear()}},Ee=new WeakMap,gr=new WeakMap,yr=new WeakMap,Ss=new WeakMap,Ts=new WeakMap,vr=new WeakMap,Es=new WeakMap,Cs=new WeakMap,Nv),mt,ee,ga,st,mi,ks,xr,Tn,ya,_s,Ps,gi,yi,wr,As,ae,go,Td,Ed,Cd,kd,_d,Pd,Ad,cw,Lv,Nk=(Lv=class extends Ks{constructor(t,n){super();H(this,ae);H(this,mt);H(this,ee);H(this,ga);H(this,st);H(this,mi);H(this,ks);H(this,xr);H(this,Tn);H(this,ya);H(this,_s);H(this,Ps);H(this,gi);H(this,yi);H(this,wr);H(this,As,new Set);this.options=n,F(this,mt,t),F(this,Tn,null),F(this,xr,Sd()),this.options.experimental_prefetchInRender||S(this,xr).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&&(S(this,ee).addObserver(this),n0(S(this,ee),this.options)?X(this,ae,go).call(this):this.updateResult(),X(this,ae,kd).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Rd(S(this,ee),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Rd(S(this,ee),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,X(this,ae,_d).call(this),X(this,ae,Pd).call(this),S(this,ee).removeObserver(this)}setOptions(t,n){const r=this.options,i=S(this,ee);if(this.options=S(this,mt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof cn(this.options.enabled,S(this,ee))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");X(this,ae,Ad).call(this),S(this,ee).setOptions(this.options),r._defaulted&&!uu(this.options,r)&&S(this,mt).getQueryCache().notify({type:"observerOptionsUpdated",query:S(this,ee),observer:this});const s=this.hasListeners();s&&r0(S(this,ee),i,this.options,r)&&X(this,ae,go).call(this),this.updateResult(n),s&&(S(this,ee)!==i||cn(this.options.enabled,S(this,ee))!==cn(r.enabled,S(this,ee))||gs(this.options.staleTime,S(this,ee))!==gs(r.staleTime,S(this,ee)))&&X(this,ae,Td).call(this);const o=X(this,ae,Ed).call(this);s&&(S(this,ee)!==i||cn(this.options.enabled,S(this,ee))!==cn(r.enabled,S(this,ee))||o!==S(this,wr))&&X(this,ae,Cd).call(this,o)}getOptimisticResult(t){const n=S(this,mt).getQueryCache().build(S(this,mt),t),r=this.createResult(n,t);return Ik(this,r)&&(F(this,st,r),F(this,ks,this.options),F(this,mi,S(this,ee).state)),r}getCurrentResult(){return S(this,st)}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){S(this,As).add(t)}getCurrentQuery(){return S(this,ee)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=S(this,mt).defaultQueryOptions(t),r=S(this,mt).getQueryCache().build(S(this,mt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return X(this,ae,go).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),S(this,st)))}createResult(t,n){var P;const r=S(this,ee),i=this.options,s=S(this,st),o=S(this,mi),a=S(this,ks),c=t!==r?t.state:S(this,ga),{state:f}=t;let u={...f},d=!1,h;if(n._optimisticResults){const j=this.hasListeners(),M=!j&&n0(t,n),I=j&&r0(t,r,n,i);(M||I)&&(u={...u,...lw(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:m,errorUpdatedAt:x,status:w}=u;if(n.select&&u.data!==void 0)if(s&&u.data===(o==null?void 0:o.data)&&n.select===S(this,ya))h=S(this,_s);else try{F(this,ya,n.select),h=n.select(u.data),h=bd(s==null?void 0:s.data,h,n),F(this,_s,h),F(this,Tn,null)}catch(j){F(this,Tn,j)}else h=u.data;if(n.placeholderData!==void 0&&h===void 0&&w==="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=S(this,Ps))==null?void 0:P.state.data,S(this,Ps)):n.placeholderData,n.select&&j!==void 0)try{j=n.select(j),F(this,Tn,null)}catch(M){F(this,Tn,M)}j!==void 0&&(w="success",h=bd(s==null?void 0:s.data,j,n),d=!0)}S(this,Tn)&&(m=S(this,Tn),h=S(this,_s),x=Date.now(),w="error");const p=u.fetchStatus==="fetching",g=w==="pending",y=w==="error",C=g&&p,b=h!==void 0,k={status:w,fetchStatus:u.fetchStatus,isPending:g,isSuccess:w==="success",isError:y,isInitialLoading:C,isLoading:C,data:h,dataUpdatedAt:u.dataUpdatedAt,error:m,errorUpdatedAt:x,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>c.dataUpdateCount||u.errorUpdateCount>c.errorUpdateCount,isFetching:p,isRefetching:p&&!g,isLoadingError:y&&!b,isPaused:u.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:y&&b,isStale:bp(t,n),refetch:this.refetch,promise:S(this,xr)};if(this.options.experimental_prefetchInRender){const j=re=>{k.status==="error"?re.reject(k.error):k.data!==void 0&&re.resolve(k.data)},M=()=>{const re=F(this,xr,k.promise=Sd());j(re)},I=S(this,xr);switch(I.status){case"pending":t.queryHash===r.queryHash&&j(I);break;case"fulfilled":(k.status==="error"||k.data!==I.value)&&M();break;case"rejected":(k.status!=="error"||k.error!==I.reason)&&M();break}}return k}updateResult(t){const n=S(this,st),r=this.createResult(S(this,ee),this.options);if(F(this,mi,S(this,ee).state),F(this,ks,this.options),S(this,mi).data!==void 0&&F(this,Ps,S(this,ee)),uu(r,n))return;F(this,st,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!S(this,As).size)return!0;const l=new Set(a??S(this,As));return this.options.throwOnError&&l.add("error"),Object.keys(S(this,st)).some(c=>{const f=c;return S(this,st)[f]!==n[f]&&l.has(f)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),X(this,ae,cw).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&X(this,ae,kd).call(this)}},mt=new WeakMap,ee=new WeakMap,ga=new WeakMap,st=new WeakMap,mi=new WeakMap,ks=new WeakMap,xr=new WeakMap,Tn=new WeakMap,ya=new WeakMap,_s=new WeakMap,Ps=new WeakMap,gi=new WeakMap,yi=new WeakMap,wr=new WeakMap,As=new WeakMap,ae=new WeakSet,go=function(t){X(this,ae,Ad).call(this);let n=S(this,ee).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ht)),n},Td=function(){X(this,ae,_d).call(this);const t=gs(this.options.staleTime,S(this,ee));if(Pi||S(this,st).isStale||!xd(t))return;const r=tw(S(this,st).dataUpdatedAt,t)+1;F(this,gi,setTimeout(()=>{S(this,st).isStale||this.updateResult()},r))},Ed=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(S(this,ee)):this.options.refetchInterval)??!1},Cd=function(t){X(this,ae,Pd).call(this),F(this,wr,t),!(Pi||cn(this.options.enabled,S(this,ee))===!1||!xd(S(this,wr))||S(this,wr)===0)&&F(this,yi,setInterval(()=>{(this.options.refetchIntervalInBackground||wp.isFocused())&&X(this,ae,go).call(this)},S(this,wr)))},kd=function(){X(this,ae,Td).call(this),X(this,ae,Cd).call(this,X(this,ae,Ed).call(this))},_d=function(){S(this,gi)&&(clearTimeout(S(this,gi)),F(this,gi,void 0))},Pd=function(){S(this,yi)&&(clearInterval(S(this,yi)),F(this,yi,void 0))},Ad=function(){const t=S(this,mt).getQueryCache().build(S(this,mt),this.options);if(t===S(this,ee))return;const n=S(this,ee);F(this,ee,t),F(this,ga,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},cw=function(t){Fe.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(S(this,st))}),S(this,mt).getQueryCache().notify({query:S(this,ee),type:"observerResultsUpdated"})})},Lv);function Lk(e,t){return cn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function n0(e,t){return Lk(e,t)||e.state.data!==void 0&&Rd(e,t,t.refetchOnMount)}function Rd(e,t,n){if(cn(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&bp(e,t)}return!1}function r0(e,t,n,r){return(e!==t||cn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&bp(e,n)}function bp(e,t){return cn(t.enabled,e)!==!1&&e.isStaleByTime(gs(t.staleTime,e))}function Ik(e,t){return!uu(e.getCurrentResult(),t)}var br,Sr,gt,zn,qn,_l,Od,Iv,$k=(Iv=class extends Ks{constructor(t,n){super();H(this,qn);H(this,br);H(this,Sr);H(this,gt);H(this,zn);F(this,br,t),this.setOptions(n),this.bindMethods(),X(this,qn,_l).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=S(this,br).defaultMutationOptions(t),uu(this.options,n)||S(this,br).getMutationCache().notify({type:"observerOptionsUpdated",mutation:S(this,gt),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Ai(n.mutationKey)!==Ai(this.options.mutationKey)?this.reset():((r=S(this,gt))==null?void 0:r.state.status)==="pending"&&S(this,gt).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=S(this,gt))==null||t.removeObserver(this)}onMutationUpdate(t){X(this,qn,_l).call(this),X(this,qn,Od).call(this,t)}getCurrentResult(){return S(this,Sr)}reset(){var t;(t=S(this,gt))==null||t.removeObserver(this),F(this,gt,void 0),X(this,qn,_l).call(this),X(this,qn,Od).call(this)}mutate(t,n){var r;return F(this,zn,n),(r=S(this,gt))==null||r.removeObserver(this),F(this,gt,S(this,br).getMutationCache().build(S(this,br),this.options)),S(this,gt).addObserver(this),S(this,gt).execute(t)}},br=new WeakMap,Sr=new WeakMap,gt=new WeakMap,zn=new WeakMap,qn=new WeakSet,_l=function(){var n;const t=((n=S(this,gt))==null?void 0:n.state)??uw();F(this,Sr,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Od=function(t){Fe.batch(()=>{var n,r,i,s,o,a,l,c;if(S(this,zn)&&this.hasListeners()){const f=S(this,Sr).variables,u=S(this,Sr).context;(t==null?void 0:t.type)==="success"?((r=(n=S(this,zn)).onSuccess)==null||r.call(n,t.data,f,u),(s=(i=S(this,zn)).onSettled)==null||s.call(i,t.data,null,f,u)):(t==null?void 0:t.type)==="error"&&((a=(o=S(this,zn)).onError)==null||a.call(o,t.error,f,u),(c=(l=S(this,zn)).onSettled)==null||c.call(l,void 0,t.error,f,u))}this.listeners.forEach(f=>{f(S(this,Sr))})})},Iv),fw=v.createContext(void 0),dw=e=>{const t=v.useContext(fw);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Vk=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),T.jsx(fw.Provider,{value:e,children:t})),hw=v.createContext(!1),Bk=()=>v.useContext(hw);hw.Provider;function zk(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Uk=v.createContext(zk()),Hk=()=>v.useContext(Uk);function pw(e,t){return typeof e=="function"?e(...t):!!e}function jd(){}var Wk=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Kk=e=>{v.useEffect(()=>{e.clearReset()},[e])},qk=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&pw(n,[e.error,r]),Qk=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},Gk=(e,t)=>e.isLoading&&e.isFetching&&!t,Yk=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,i0=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Xk(e,t,n){var f,u,d,h,m;const r=dw(),i=Bk(),s=Hk(),o=r.defaultQueryOptions(e);(u=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||u.call(f,o),o._optimisticResults=i?"isRestoring":"optimistic",Qk(o),Wk(o,s),Kk(s);const a=!r.getQueryCache().get(o.queryHash),[l]=v.useState(()=>new t(r,o)),c=l.getOptimisticResult(o);if(v.useSyncExternalStore(v.useCallback(x=>{const w=i?jd:l.subscribe(Fe.batchCalls(x));return l.updateResult(),w},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),v.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),Yk(o,c))throw i0(o,l,s);if(qk({result:c,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw c.error;if((h=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_afterQuery)==null||h.call(d,o,c),o.experimental_prefetchInRender&&!Pi&&Gk(c,i)){const x=a?i0(o,l,s):(m=r.getQueryCache().get(o.queryHash))==null?void 0:m.promise;x==null||x.catch(jd).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?c:l.trackResult(c)}function Zk(e,t){return Xk(e,Nk)}function Jk(e,t){const n=dw(),[r]=v.useState(()=>new $k(n,e));v.useEffect(()=>{r.setOptions(e)},[r,e]);const i=v.useSyncExternalStore(v.useCallback(o=>r.subscribe(Fe.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=v.useCallback((o,a)=>{r.mutate(o,a).catch(jd)},[r]);if(i.error&&pw(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const e_=e=>Zk({queryKey:["widgets",e],queryFn:()=>t_(e)}),t_=e=>Vu(`widgets/with-link/${e}`);var U=(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))(U||{});function n_(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 qc(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function od(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var DC=typeof WeakMap=="function"?WeakMap:Map;function Tx(e,t,n){n=Kn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){su||(su=!0,gd=r),od(e,t)},n}function Ex(e,t,n){n=Kn(-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(){od(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){od(e,t),typeof r!="function"&&(Mr===null?Mr=new Set([this]):Mr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Og(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new DC;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=QC.bind(null,e,t,n),t.then(e,e))}function Mg(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 jg(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=Kn(-1,1),t.tag=2,Or(n,t,1))),n.lanes|=1),e)}var FC=er.ReactCurrentOwner,wt=!1;function ot(e,t,n,r){t.child=e===null?J1(t,null,n,r):js(t,e.child,n,r)}function Dg(e,t,n,r,i){n=n.render;var s=t.ref;return ps(t,i),r=rp(e,t,n,r,s,i),n=ip(),e!==null&&!wt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Xn(e,t,i)):(ve&&n&&Wh(t),t.flags|=1,ot(e,t,r,i),t.child)}function Fg(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,Cx(e,t,s,r,i)):(e=kl(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:Uo,n(o,r)&&e.ref===t.ref)return Xn(e,t,i)}return t.flags|=1,e=Dr(s,r),e.ref=t.ref,e.return=t,t.child=e}function Cx(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Uo(s,r)&&e.ref===t.ref)if(wt=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(wt=!0);else return t.lanes=e.lanes,Xn(e,t,i)}return ad(e,t,n,r,i)}function kx(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(rs,At),At|=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(rs,At),At|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,de(rs,At),At|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,de(rs,At),At|=r;return ot(e,t,i,n),t.child}function _x(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ad(e,t,n,r,i){var s=St(n)?Ti:rt.current;return s=Os(t,s),ps(t,i),n=rp(e,t,n,r,s,i),r=ip(),e!==null&&!wt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Xn(e,t,i)):(ve&&r&&Wh(t),t.flags|=1,ot(e,t,n,i),t.child)}function Ng(e,t,n,r,i){if(St(n)){var s=!0;Gl(t)}else s=!1;if(ps(t,i),t.stateNode===null)Tl(e,t),Sx(t,n,r),sd(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=Xt(c):(c=St(n)?Ti:rt.current,c=Os(t,c));var f=n.getDerivedStateFromProps,u=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function";u||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&Rg(t,o,r,c),cr=!1;var d=t.memoizedState;o.state=d,eu(t,r,o,i),l=t.memoizedState,a!==r||d!==l||bt.current||cr?(typeof f=="function"&&(id(t,n,f,r),l=t.memoizedState),(a=cr||Ag(t,n,a,r,d,l,c))?(u||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=c,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,tx(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:sn(t.type,a),o.props=c,u=t.pendingProps,d=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Xt(l):(l=St(n)?Ti:rt.current,l=Os(t,l));var h=n.getDerivedStateFromProps;(f=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==u||d!==l)&&Rg(t,o,r,l),cr=!1,d=t.memoizedState,o.state=d,eu(t,r,o,i);var m=t.memoizedState;a!==u||d!==m||bt.current||cr?(typeof h=="function"&&(id(t,n,h,r),m=t.memoizedState),(c=cr||Ag(t,n,c,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=c):(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 ld(e,t,n,r,s,i)}function ld(e,t,n,r,i,s){_x(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&bg(t,n,!1),Xn(e,t,s);r=t.stateNode,FC.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=js(t,e.child,null,s),t.child=js(t,null,a,s)):ot(e,t,a,s),t.memoizedState=r.state,i&&bg(t,n,!0),t.child}function Px(e){var t=e.stateNode;t.pendingContext?wg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&wg(e,t.context,!1),Jh(e,t.containerInfo)}function Lg(e,t,n,r,i){return Ms(),qh(i),t.flags|=256,ot(e,t,n,r),t.child}var ud={dehydrated:null,treeContext:null,retryLane:0};function cd(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ax(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 nd(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=Fu(o,r,0,null),e=xi(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=cd(n),t.memoizedState=ud,e):ap(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return NC(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=xi(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?cd(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=ud,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=Fu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ja(e,t,n,r){return r!==null&&qh(r),js(t,e.child,null,n),e=ap(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function NC(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=qc(Error(A(422))),Ja(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Fu({mode:"visible",children:r.children},i,0,null),s=xi(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&js(t,e.child,null,o),t.child.memoizedState=cd(o),t.memoizedState=ud,s);if(!(t.mode&1))return Ja(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),Ja(e,t,o,r)}if(a=(o&e.childLanes)!==0,wt||a){if(r=Ue,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,Yn(e,i),hn(r,e,i,-1))}return hp(),r=qc(Error(A(421))),Ja(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=GC.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Rt=Rr(i.nextSibling),jt=t,ve=!0,un=null,e!==null&&(Wt[Kt++]=Un,Wt[Kt++]=Hn,Wt[Kt++]=Ei,Un=e.id,Hn=e.overflow,Ei=t),t=ap(t,r.children),t.flags|=4096,t)}function Ig(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),rd(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 Rx(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(ot(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&&Ig(e,n,t);else if(e.tag===19)Ig(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&&tu(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&&tu(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 Tl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Xn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ki|=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 LC(e,t,n){switch(t.tag){case 3:Px(t),Ms();break;case 5:nx(t);break;case 1:St(t.type)&&Gl(t);break;case 4:Jh(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;de(Zl,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?Ax(e,t,n):(de(we,we.current&1),e=Xn(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 Rx(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,kx(e,t,n)}return Xn(e,t,n)}var Ox,fd,Mx,jx;Ox=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}};fd=function(){};Mx=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,oi(kn.current);var s=null;switch(n){case"input":i=jf(e,i),r=jf(e,r),s=[];break;case"select":i=Te({},i,{value:void 0}),r=Te({},r,{value:void 0}),s=[];break;case"textarea":i=Nf(e,i),r=Nf(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ql)}If(n,r);var o;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(No.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var l=r[c];if(a=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="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(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(No.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&pe("scroll",e),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};jx=function(e,t,n,r){n!==r&&(t.flags|=4)};function oo(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 Ze(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 IC(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 Ze(t),null;case 1:return St(t.type)&&Ql(),Ze(t),null;case 3:return r=t.stateNode,Ds(),ge(bt),ge(rt),tp(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Xa(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,un!==null&&(xd(un),un=null))),fd(e,t),Ze(t),null;case 5:ep(t);var i=oi(Qo.current);if(n=t.type,e!==null&&t.stateNode!=null)Mx(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 Ze(t),null}if(e=oi(kn.current),Xa(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[En]=t,r[Ko]=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<mo.length;i++)pe(mo[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":qm(r,s),pe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},pe("invalid",r);break;case"textarea":Gm(r,s),pe("invalid",r)}If(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&&Ya(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Ya(r.textContent,a,e),i=["children",""+a]):No.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&pe("scroll",r)}switch(n){case"input":za(r),Qm(r,s,!0);break;case"textarea":za(r),Ym(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=a1(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[En]=t,e[Ko]=r,Ox(e,t,!1,!1),t.stateNode=e;e:{switch(o=$f(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<mo.length;i++)pe(mo[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":qm(e,r),i=jf(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":Gm(e,r),i=Nf(e,r),pe("invalid",e);break;default:i=r}If(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?c1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&l1(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Lo(e,l):typeof l=="number"&&Lo(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(No.hasOwnProperty(s)?l!=null&&s==="onScroll"&&pe("scroll",e):l!=null&&Oh(e,s,l,o))}switch(n){case"input":za(e),Qm(e,r,!1);break;case"textarea":za(e),Ym(e);break;case"option":r.value!=null&&e.setAttribute("value",""+$r(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?cs(e,!!r.multiple,s,!1):r.defaultValue!=null&&cs(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 Ze(t),null;case 6:if(e&&t.stateNode!=null)jx(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(A(166));if(n=oi(Qo.current),oi(kn.current),Xa(t)){if(r=t.stateNode,n=t.memoizedProps,r[En]=t,(s=r.nodeValue!==n)&&(e=jt,e!==null))switch(e.tag){case 3:Ya(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ya(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[En]=t,t.stateNode=r}return Ze(t),null;case 13:if(ge(we),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ve&&Rt!==null&&t.mode&1&&!(t.flags&128))X1(),Ms(),t.flags|=98560,s=!1;else if(s=Xa(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[En]=t}else Ms(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ze(t),s=!1}else un!==null&&(xd(un),un=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?Ne===0&&(Ne=3):hp())),t.updateQueue!==null&&(t.flags|=4),Ze(t),null);case 4:return Ds(),fd(e,t),e===null&&Ho(t.stateNode.containerInfo),Ze(t),null;case 10:return Yh(t.type._context),Ze(t),null;case 17:return St(t.type)&&Ql(),Ze(t),null;case 19:if(ge(we),s=t.memoizedState,s===null)return Ze(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)oo(s,!1);else{if(Ne!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=tu(e),o!==null){for(t.flags|=128,oo(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()>Ns&&(t.flags|=128,r=!0,oo(s,!1),t.lanes=4194304)}else{if(!r)if(e=tu(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),oo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!ve)return Ze(t),null}else 2*Ae()-s.renderingStartTime>Ns&&n!==1073741824&&(t.flags|=128,r=!0,oo(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):(Ze(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?At&1073741824&&(Ze(t),t.subtreeFlags&6&&(t.flags|=8192)):Ze(t),null;case 24:return null;case 25:return null}throw Error(A(156,t.tag))}function $C(e,t){switch(Kh(t),t.tag){case 1:return St(t.type)&&Ql(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ds(),ge(bt),ge(rt),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));Ms()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ge(we),null;case 4:return Ds(),null;case 10:return Yh(t.type._context),null;case 22:case 23:return dp(),null;case 24:return null;default:return null}}var el=!1,tt=!1,VC=typeof WeakSet=="function"?WeakSet:Set,N=null;function ns(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 dd(e,t,n){try{n()}catch(r){ke(e,t,r)}}var $g=!1;function BC(e,t){if(Gf=Hl,e=I1(),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,c=0,f=0,u=e,d=null;t:for(;;){for(var h;u!==n||i!==0&&u.nodeType!==3||(a=o+i),u!==s||r!==0&&u.nodeType!==3||(l=o+r),u.nodeType===3&&(o+=u.nodeValue.length),(h=u.firstChild)!==null;)d=u,u=h;for(;;){if(u===e)break t;if(d===n&&++c===i&&(a=o),d===s&&++f===r&&(l=o),(h=u.nextSibling)!==null)break;u=d,d=u.parentNode}u=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Yf={focusedElem:e,selectionRange:n},Hl=!1,N=t;N!==null;)if(t=N,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,N=e;else for(;N!==null;){t=N;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,w=m.memoizedState,p=t.stateNode,g=p.getSnapshotBeforeUpdate(t.elementType===t.type?x:sn(t.type,x),w);p.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(A(163))}}catch(C){ke(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,N=e;break}N=t.return}return m=$g,$g=!1,m}function ko(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&&dd(t,n,s)}i=i.next}while(i!==r)}}function ju(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 hd(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 Dx(e){var t=e.alternate;t!==null&&(e.alternate=null,Dx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[En],delete t[Ko],delete t[Jf],delete t[TC],delete t[EC])),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 Fx(e){return e.tag===5||e.tag===3||e.tag===4}function Vg(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Fx(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 pd(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(pd(e,t,n),e=e.sibling;e!==null;)pd(e,t,n),e=e.sibling}function md(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(md(e,t,n),e=e.sibling;e!==null;)md(e,t,n),e=e.sibling}var Ke=null,an=!1;function or(e,t,n){for(n=n.child;n!==null;)Nx(e,t,n),n=n.sibling}function Nx(e,t,n){if(Cn&&typeof Cn.onCommitFiberUnmount=="function")try{Cn.onCommitFiberUnmount(Cu,n)}catch{}switch(n.tag){case 5:tt||ns(n,t);case 6:var r=Ke,i=an;Ke=null,or(e,t,n),Ke=r,an=i,Ke!==null&&(an?(e=Ke,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ke.removeChild(n.stateNode));break;case 18:Ke!==null&&(an?(e=Ke,n=n.stateNode,e.nodeType===8?Bc(e.parentNode,n):e.nodeType===1&&Bc(e,n),Bo(e)):Bc(Ke,n.stateNode));break;case 4:r=Ke,i=an,Ke=n.stateNode.containerInfo,an=!0,or(e,t,n),Ke=r,an=i;break;case 0:case 11:case 14:case 15:if(!tt&&(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)&&dd(n,t,o),i=i.next}while(i!==r)}or(e,t,n);break;case 1:if(!tt&&(ns(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)}or(e,t,n);break;case 21:or(e,t,n);break;case 22:n.mode&1?(tt=(r=tt)||n.memoizedState!==null,or(e,t,n),tt=r):or(e,t,n);break;default:or(e,t,n)}}function Bg(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new VC),t.forEach(function(r){var i=YC.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function tn(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:Ke=a.stateNode,an=!1;break e;case 3:Ke=a.stateNode.containerInfo,an=!0;break e;case 4:Ke=a.stateNode.containerInfo,an=!0;break e}a=a.return}if(Ke===null)throw Error(A(160));Nx(s,o,i),Ke=null,an=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){ke(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Lx(t,e),t=t.sibling}function Lx(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(tn(t,e),gn(e),r&4){try{ko(3,e,e.return),ju(3,e)}catch(x){ke(e,e.return,x)}try{ko(5,e,e.return)}catch(x){ke(e,e.return,x)}}break;case 1:tn(t,e),gn(e),r&512&&n!==null&&ns(n,n.return);break;case 5:if(tn(t,e),gn(e),r&512&&n!==null&&ns(n,n.return),e.flags&32){var i=e.stateNode;try{Lo(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&&s1(i,s),$f(a,o);var c=$f(a,s);for(o=0;o<l.length;o+=2){var f=l[o],u=l[o+1];f==="style"?c1(i,u):f==="dangerouslySetInnerHTML"?l1(i,u):f==="children"?Lo(i,u):Oh(i,f,u,c)}switch(a){case"input":Df(i,s);break;case"textarea":o1(i,s);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?cs(i,!!s.multiple,h,!1):d!==!!s.multiple&&(s.defaultValue!=null?cs(i,!!s.multiple,s.defaultValue,!0):cs(i,!!s.multiple,s.multiple?[]:"",!1))}i[Ko]=s}catch(x){ke(e,e.return,x)}}break;case 6:if(tn(t,e),gn(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(tn(t,e),gn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Bo(t.containerInfo)}catch(x){ke(e,e.return,x)}break;case 4:tn(t,e),gn(e);break;case 13:tn(t,e),gn(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&&Bg(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(tt=(c=tt)||f,tn(t,e),tt=c):tn(t,e),gn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!f&&e.mode&1)for(N=e,f=e.child;f!==null;){for(u=N=f;N!==null;){switch(d=N,h=d.child,d.tag){case 0:case 11:case 14:case 15:ko(4,d,d.return);break;case 1:ns(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:ns(d,d.return);break;case 22:if(d.memoizedState!==null){Ug(u);continue}}h!==null?(h.return=d,N=h):Ug(u)}f=f.sibling}e:for(f=null,u=e;;){if(u.tag===5){if(f===null){f=u;try{i=u.stateNode,c?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=u.stateNode,l=u.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=u1("display",o))}catch(x){ke(e,e.return,x)}}}else if(u.tag===6){if(f===null)try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(x){ke(e,e.return,x)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===e)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break e;for(;u.sibling===null;){if(u.return===null||u.return===e)break e;f===u&&(f=null),u=u.return}f===u&&(f=null),u.sibling.return=u.return,u=u.sibling}}break;case 19:tn(t,e),gn(e),r&4&&Bg(e);break;case 21:break;default:tn(t,e),gn(e)}}function gn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Fx(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&&(Lo(i,""),r.flags&=-33);var s=Vg(e);md(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Vg(e);pd(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 zC(e,t,n){N=e,Ix(e)}function Ix(e,t,n){for(var r=(e.mode&1)!==0;N!==null;){var i=N,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||el;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||tt;a=el;var c=tt;if(el=o,(tt=l)&&!c)for(N=i;N!==null;)o=N,l=o.child,o.tag===22&&o.memoizedState!==null?Hg(i):l!==null?(l.return=o,N=l):Hg(i);for(;s!==null;)N=s,Ix(s),s=s.sibling;N=i,el=a,tt=c}zg(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,N=s):zg(e)}}function zg(e){for(;N!==null;){var t=N;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:tt||ju(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!tt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:sn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&kg(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}kg(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 c=t.alternate;if(c!==null){var f=c.memoizedState;if(f!==null){var u=f.dehydrated;u!==null&&Bo(u)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(A(163))}tt||t.flags&512&&hd(t)}catch(d){ke(t,t.return,d)}}if(t===e){N=null;break}if(n=t.sibling,n!==null){n.return=t.return,N=n;break}N=t.return}}function Ug(e){for(;N!==null;){var t=N;if(t===e){N=null;break}var n=t.sibling;if(n!==null){n.return=t.return,N=n;break}N=t.return}}function Hg(e){for(;N!==null;){var t=N;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ju(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{hd(t)}catch(l){ke(t,s,l)}break;case 5:var o=t.return;try{hd(t)}catch(l){ke(t,o,l)}}}catch(l){ke(t,t.return,l)}if(t===e){N=null;break}var a=t.sibling;if(a!==null){a.return=t.return,N=a;break}N=t.return}}var UC=Math.ceil,iu=er.ReactCurrentDispatcher,lp=er.ReactCurrentOwner,Gt=er.ReactCurrentBatchConfig,se=0,Ue=null,Oe=null,Qe=0,At=0,rs=Wr(0),Ne=0,Zo=null,ki=0,Du=0,up=0,_o=null,vt=null,cp=0,Ns=1/0,$n=null,su=!1,gd=null,Mr=null,tl=!1,Er=null,ou=0,Po=0,yd=null,El=-1,Cl=0;function lt(){return se&6?Ae():El!==-1?El:El=Ae()}function jr(e){return e.mode&1?se&2&&Qe!==0?Qe&-Qe:kC.transition!==null?(Cl===0&&(Cl=S1()),Cl):(e=le,e!==0||(e=window.event,e=e===void 0?16:A1(e.type)),e):1}function hn(e,t,n,r){if(50<Po)throw Po=0,yd=null,Error(A(185));xa(e,n,r),(!(se&2)||e!==Ue)&&(e===Ue&&(!(se&2)&&(Du|=n),Ne===4&&hr(e,Qe)),Tt(e,r),n===1&&se===0&&!(t.mode&1)&&(Ns=Ae()+500,Ru&&Kr()))}function Tt(e,t){var n=e.callbackNode;kE(e,t);var r=Ul(e,e===Ue?Qe:0);if(r===0)n!==null&&Jm(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Jm(n),t===1)e.tag===0?CC(Wg.bind(null,e)):Q1(Wg.bind(null,e)),bC(function(){!(se&6)&&Kr()}),n=null;else{switch(T1(r)){case 1:n=Nh;break;case 4:n=w1;break;case 16:n=zl;break;case 536870912:n=b1;break;default:n=zl}n=Kx(n,$x.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function $x(e,t){if(El=-1,Cl=0,se&6)throw Error(A(327));var n=e.callbackNode;if(ms()&&e.callbackNode!==n)return null;var r=Ul(e,e===Ue?Qe:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=au(e,r);else{t=r;var i=se;se|=2;var s=Bx();(Ue!==e||Qe!==t)&&($n=null,Ns=Ae()+500,vi(e,t));do try{KC();break}catch(a){Vx(e,a)}while(!0);Gh(),iu.current=s,se=i,Oe!==null?t=0:(Ue=null,Qe=0,t=Ne)}if(t!==0){if(t===2&&(i=Hf(e),i!==0&&(r=i,t=vd(e,i))),t===1)throw n=Zo,vi(e,0),hr(e,r),Tt(e,Ae()),n;if(t===6)hr(e,r);else{if(i=e.current.alternate,!(r&30)&&!HC(i)&&(t=au(e,r),t===2&&(s=Hf(e),s!==0&&(r=s,t=vd(e,s))),t===1))throw n=Zo,vi(e,0),hr(e,r),Tt(e,Ae()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(A(345));case 2:ei(e,vt,$n);break;case 3:if(hr(e,r),(r&130023424)===r&&(t=cp+500-Ae(),10<t)){if(Ul(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){lt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Zf(ei.bind(null,e,vt,$n),t);break}ei(e,vt,$n);break;case 4:if(hr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-dn(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*UC(r/1960))-r,10<r){e.timeoutHandle=Zf(ei.bind(null,e,vt,$n),r);break}ei(e,vt,$n);break;case 5:ei(e,vt,$n);break;default:throw Error(A(329))}}}return Tt(e,Ae()),e.callbackNode===n?$x.bind(null,e):null}function vd(e,t){var n=_o;return e.current.memoizedState.isDehydrated&&(vi(e,t).flags|=256),e=au(e,t),e!==2&&(t=vt,vt=n,t!==null&&xd(t)),e}function xd(e){vt===null?vt=e:vt.push.apply(vt,e)}function HC(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(!pn(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 hr(e,t){for(t&=~up,t&=~Du,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-dn(t),r=1<<n;e[n]=-1,t&=~r}}function Wg(e){if(se&6)throw Error(A(327));ms();var t=Ul(e,0);if(!(t&1))return Tt(e,Ae()),null;var n=au(e,t);if(e.tag!==0&&n===2){var r=Hf(e);r!==0&&(t=r,n=vd(e,r))}if(n===1)throw n=Zo,vi(e,0),hr(e,t),Tt(e,Ae()),n;if(n===6)throw Error(A(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ei(e,vt,$n),Tt(e,Ae()),null}function fp(e,t){var n=se;se|=1;try{return e(t)}finally{se=n,se===0&&(Ns=Ae()+500,Ru&&Kr())}}function _i(e){Er!==null&&Er.tag===0&&!(se&6)&&ms();var t=se;se|=1;var n=Gt.transition,r=le;try{if(Gt.transition=null,le=1,e)return e()}finally{le=r,Gt.transition=n,se=t,!(se&6)&&Kr()}}function dp(){At=rs.current,ge(rs)}function vi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,wC(n)),Oe!==null)for(n=Oe.return;n!==null;){var r=n;switch(Kh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ql();break;case 3:Ds(),ge(bt),ge(rt),tp();break;case 5:ep(r);break;case 4:Ds();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(Ue=e,Oe=e=Dr(e.current,null),Qe=At=t,Ne=0,Zo=null,up=Du=ki=0,vt=_o=null,si!==null){for(t=0;t<si.length;t++)if(n=si[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}si=null}return e}function Vx(e,t){do{var n=Oe;try{if(Gh(),bl.current=ru,nu){for(var r=Se.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}nu=!1}if(Ci=0,Be=De=Se=null,Co=!1,Go=0,lp.current=null,n===null||n.return===null){Ne=1,Zo=t,Oe=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 c=l,f=a,u=f.tag;if(!(f.mode&1)&&(u===0||u===11||u===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=Mg(o);if(h!==null){h.flags&=-257,jg(h,o,a,s,t),h.mode&1&&Og(s,c,t),t=h,l=c;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)){Og(s,c,t),hp();break e}l=Error(A(426))}}else if(ve&&a.mode&1){var w=Mg(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),jg(w,o,a,s,t),qh(Fs(l,a));break e}}s=l=Fs(l,a),Ne!==4&&(Ne=2),_o===null?_o=[s]:_o.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var p=Tx(s,l,t);Cg(s,p);break e;case 1:a=l;var g=s.type,y=s.stateNode;if(!(s.flags&128)&&(typeof g.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Mr===null||!Mr.has(y)))){s.flags|=65536,t&=-t,s.lanes|=t;var C=Ex(s,a,t);Cg(s,C);break e}}s=s.return}while(s!==null)}Ux(n)}catch(b){t=b,Oe===n&&n!==null&&(Oe=n=n.return);continue}break}while(!0)}function Bx(){var e=iu.current;return iu.current=ru,e===null?ru:e}function hp(){(Ne===0||Ne===3||Ne===2)&&(Ne=4),Ue===null||!(ki&268435455)&&!(Du&268435455)||hr(Ue,Qe)}function au(e,t){var n=se;se|=2;var r=Bx();(Ue!==e||Qe!==t)&&($n=null,vi(e,t));do try{WC();break}catch(i){Vx(e,i)}while(!0);if(Gh(),se=n,iu.current=r,Oe!==null)throw Error(A(261));return Ue=null,Qe=0,Ne}function WC(){for(;Oe!==null;)zx(Oe)}function KC(){for(;Oe!==null&&!yE();)zx(Oe)}function zx(e){var t=Wx(e.alternate,e,At);e.memoizedProps=e.pendingProps,t===null?Ux(e):Oe=t,lp.current=null}function Ux(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=$C(n,t),n!==null){n.flags&=32767,Oe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ne=6,Oe=null;return}}else if(n=IC(n,t,At),n!==null){Oe=n;return}if(t=t.sibling,t!==null){Oe=t;return}Oe=t=e}while(t!==null);Ne===0&&(Ne=5)}function ei(e,t,n){var r=le,i=Gt.transition;try{Gt.transition=null,le=1,qC(e,t,n,r)}finally{Gt.transition=i,le=r}return null}function qC(e,t,n,r){do ms();while(Er!==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(_E(e,s),e===Ue&&(Oe=Ue=null,Qe=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||tl||(tl=!0,Kx(zl,function(){return ms(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Gt.transition,Gt.transition=null;var o=le;le=1;var a=se;se|=4,lp.current=null,BC(e,n),Lx(n,e),hC(Yf),Hl=!!Gf,Yf=Gf=null,e.current=n,zC(n),vE(),se=a,le=o,Gt.transition=s}else e.current=n;if(tl&&(tl=!1,Er=e,ou=i),s=e.pendingLanes,s===0&&(Mr=null),bE(n.stateNode),Tt(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(su)throw su=!1,e=gd,gd=null,e;return ou&1&&e.tag!==0&&ms(),s=e.pendingLanes,s&1?e===yd?Po++:(Po=0,yd=e):Po=0,Kr(),null}function ms(){if(Er!==null){var e=T1(ou),t=Gt.transition,n=le;try{if(Gt.transition=null,le=16>e?16:e,Er===null)var r=!1;else{if(e=Er,Er=null,ou=0,se&6)throw Error(A(331));var i=se;for(se|=4,N=e.current;N!==null;){var s=N,o=s.child;if(N.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(N=c;N!==null;){var f=N;switch(f.tag){case 0:case 11:case 15:ko(8,f,s)}var u=f.child;if(u!==null)u.return=f,N=u;else for(;N!==null;){f=N;var d=f.sibling,h=f.return;if(Dx(f),f===c){N=null;break}if(d!==null){d.return=h,N=d;break}N=h}}}var m=s.alternate;if(m!==null){var x=m.child;if(x!==null){m.child=null;do{var w=x.sibling;x.sibling=null,x=w}while(x!==null)}}N=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,N=o;else e:for(;N!==null;){if(s=N,s.flags&2048)switch(s.tag){case 0:case 11:case 15:ko(9,s,s.return)}var p=s.sibling;if(p!==null){p.return=s.return,N=p;break e}N=s.return}}var g=e.current;for(N=g;N!==null;){o=N;var y=o.child;if(o.subtreeFlags&2064&&y!==null)y.return=o,N=y;else e:for(o=g;N!==null;){if(a=N,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:ju(9,a)}}catch(b){ke(a,a.return,b)}if(a===o){N=null;break e}var C=a.sibling;if(C!==null){C.return=a.return,N=C;break e}N=a.return}}if(se=i,Kr(),Cn&&typeof Cn.onPostCommitFiberRoot=="function")try{Cn.onPostCommitFiberRoot(Cu,e)}catch{}r=!0}return r}finally{le=n,Gt.transition=t}}return!1}function Kg(e,t,n){t=Fs(n,t),t=Tx(e,t,1),e=Or(e,t,1),t=lt(),e!==null&&(xa(e,1,t),Tt(e,t))}function ke(e,t,n){if(e.tag===3)Kg(e,e,n);else for(;t!==null;){if(t.tag===3){Kg(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Mr===null||!Mr.has(r))){e=Fs(n,e),e=Ex(t,e,1),t=Or(t,e,1),e=lt(),t!==null&&(xa(t,1,e),Tt(t,e));break}}t=t.return}}function QC(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=lt(),e.pingedLanes|=e.suspendedLanes&n,Ue===e&&(Qe&n)===n&&(Ne===4||Ne===3&&(Qe&130023424)===Qe&&500>Ae()-cp?vi(e,0):up|=n),Tt(e,t)}function Hx(e,t){t===0&&(e.mode&1?(t=Wa,Wa<<=1,!(Wa&130023424)&&(Wa=4194304)):t=1);var n=lt();e=Yn(e,t),e!==null&&(xa(e,t,n),Tt(e,n))}function GC(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Hx(e,n)}function YC(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),Hx(e,n)}var Wx;Wx=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||bt.current)wt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return wt=!1,LC(e,t,n);wt=!!(e.flags&131072)}else wt=!1,ve&&t.flags&1048576&&G1(t,Xl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Tl(e,t),e=t.pendingProps;var i=Os(t,rt.current);ps(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,St(r)?(s=!0,Gl(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,sd(t,r,e,n),t=ld(null,t,r,!0,s,n)):(t.tag=0,ve&&s&&Wh(t),ot(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Tl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=ZC(r),e=sn(r,e),i){case 0:t=ad(null,t,r,e,n);break e;case 1:t=Ng(null,t,r,e,n);break e;case 11:t=Dg(null,t,r,e,n);break e;case 14:t=Fg(null,t,r,sn(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:sn(r,i),ad(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:sn(r,i),Ng(e,t,r,i,n);case 3:e:{if(Px(t),e===null)throw Error(A(387));r=t.pendingProps,s=t.memoizedState,i=s.element,tx(e,t),eu(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=Fs(Error(A(423)),t),t=Lg(e,t,r,n,i);break e}else if(r!==i){i=Fs(Error(A(424)),t),t=Lg(e,t,r,n,i);break e}else for(Rt=Rr(t.stateNode.containerInfo.firstChild),jt=t,ve=!0,un=null,n=J1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ms(),r===i){t=Xn(e,t,n);break e}ot(e,t,r,n)}t=t.child}return t;case 5:return nx(t),e===null&&nd(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,Xf(r,i)?o=null:s!==null&&Xf(r,s)&&(t.flags|=32),_x(e,t),ot(e,t,o,n),t.child;case 6:return e===null&&nd(t),null;case 13:return Ax(e,t,n);case 4:return Jh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=js(t,null,r,n):ot(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:sn(r,i),Dg(e,t,r,i,n);case 7:return ot(e,t,t.pendingProps,n),t.child;case 8:return ot(e,t,t.pendingProps.children,n),t.child;case 12:return ot(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(Zl,r._currentValue),r._currentValue=o,s!==null)if(pn(s.value,o)){if(s.children===i.children&&!bt.current){t=Xn(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=Kn(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),rd(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),rd(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}ot(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,ps(t,n),i=Xt(i),r=r(i),t.flags|=1,ot(e,t,r,n),t.child;case 14:return r=t.type,i=sn(r,t.pendingProps),i=sn(r.type,i),Fg(e,t,r,i,n);case 15:return Cx(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:sn(r,i),Tl(e,t),t.tag=1,St(r)?(e=!0,Gl(t)):e=!1,ps(t,n),Sx(t,r,i),sd(t,r,i,n),ld(null,t,r,!0,e,n);case 19:return Rx(e,t,n);case 22:return kx(e,t,n)}throw Error(A(156,t.tag))};function Kx(e,t){return x1(e,t)}function XC(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 Qt(e,t,n,r){return new XC(e,t,n,r)}function pp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ZC(e){if(typeof e=="function")return pp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===jh)return 11;if(e===Dh)return 14}return 2}function Dr(e,t){var n=e.alternate;return n===null?(n=Qt(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 kl(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 qi:return xi(n.children,i,s,t);case Mh:o=8,i|=8;break;case Af:return e=Qt(12,n,t,i|2),e.elementType=Af,e.lanes=s,e;case Rf:return e=Qt(13,n,t,i),e.elementType=Rf,e.lanes=s,e;case Of:return e=Qt(19,n,t,i),e.elementType=Of,e.lanes=s,e;case n1:return Fu(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case e1:o=10;break e;case t1:o=9;break e;case jh:o=11;break e;case Dh:o=14;break e;case ur:o=16,r=null;break e}throw Error(A(130,e==null?e:typeof e,""))}return t=Qt(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function xi(e,t,n,r){return e=Qt(7,e,r,t),e.lanes=n,e}function Fu(e,t,n,r){return e=Qt(22,e,r,t),e.elementType=n1,e.lanes=n,e.stateNode={isHidden:!1},e}function Gc(e,t,n){return e=Qt(6,e,null,t),e.lanes=n,e}function Yc(e,t,n){return t=Qt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function JC(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 JC(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Qt(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 ek(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ki,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function qx(e){if(!e)return Vr;e=e._reactInternals;e:{if(Mi(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(St(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(St(n))return q1(e,n,t)}return t}function Qx(e,t,n,r,i,s,o,a,l){return e=mp(n,r,!0,e,i,s,o,a,l),e.context=qx(null),n=e.current,r=lt(),i=jr(n),s=Kn(r,i),s.callback=t??null,Or(n,s,i),e.current.lanes=i,xa(e,i,r),Tt(e,r),e}function Nu(e,t,n,r){var i=t.current,s=lt(),o=jr(i);return n=qx(n),t.context===null?t.context=n:t.pendingContext=n,t=Kn(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Or(i,t,o),e!==null&&(hn(e,i,o,s),wl(e,i,o)),o}function lu(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 qg(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){qg(e,t),(e=e.alternate)&&qg(e,t)}function tk(){return null}var Gx=typeof reportError=="function"?reportError:function(e){console.error(e)};function yp(e){this._internalRoot=e}Lu.prototype.render=yp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(A(409));Nu(e,t,null,null)};Lu.prototype.unmount=yp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;_i(function(){Nu(null,e,null,null)}),t[Gn]=null}};function Lu(e){this._internalRoot=e}Lu.prototype.unstable_scheduleHydration=function(e){if(e){var t=k1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<dr.length&&t!==0&&t<dr[n].priority;n++);dr.splice(n,0,e),n===0&&P1(e)}};function vp(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Iu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Qg(){}function nk(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var c=lu(o);s.call(c)}}var o=Qx(t,r,e,0,null,!1,!1,"",Qg);return e._reactRootContainer=o,e[Gn]=o.current,Ho(e.nodeType===8?e.parentNode:e),_i(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var c=lu(l);a.call(c)}}var l=mp(e,0,!1,null,null,!1,!1,"",Qg);return e._reactRootContainer=l,e[Gn]=l.current,Ho(e.nodeType===8?e.parentNode:e),_i(function(){Nu(t,l,n,r)}),l}function $u(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=lu(o);a.call(l)}}Nu(t,o,e,i)}else o=nk(n,t,e,i,r);return lu(o)}E1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=po(t.pendingLanes);n!==0&&(Lh(t,n|1),Tt(t,Ae()),!(se&6)&&(Ns=Ae()+500,Kr()))}break;case 13:_i(function(){var r=Yn(e,1);if(r!==null){var i=lt();hn(r,e,1,i)}}),gp(e,1)}};Ih=function(e){if(e.tag===13){var t=Yn(e,134217728);if(t!==null){var n=lt();hn(t,e,134217728,n)}gp(e,134217728)}};C1=function(e){if(e.tag===13){var t=jr(e),n=Yn(e,t);if(n!==null){var r=lt();hn(n,e,t,r)}gp(e,t)}};k1=function(){return le};_1=function(e,t){var n=le;try{return le=e,t()}finally{le=n}};Bf=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=Au(r);if(!i)throw Error(A(90));i1(r),Df(r,i)}}}break;case"textarea":o1(e,n);break;case"select":t=n.value,t!=null&&cs(e,!!n.multiple,t,!1)}};h1=fp;p1=_i;var rk={usingClientEntryPoint:!1,Events:[ba,Xi,Au,f1,d1,fp]},ao={findFiberByHostInstance:ii,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ik={bundleType:ao.bundleType,version:ao.version,rendererPackageName:ao.rendererPackageName,rendererConfig:ao.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:er.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=y1(e),e===null?null:e.stateNode},findFiberByHostInstance:ao.findFiberByHostInstance||tk,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 nl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!nl.isDisabled&&nl.supportsFiber)try{Cu=nl.inject(ik),Cn=nl}catch{}}Ft.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=rk;Ft.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!vp(t))throw Error(A(200));return ek(e,t,null,n)};Ft.createRoot=function(e,t){if(!vp(e))throw Error(A(299));var n=!1,r="",i=Gx;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[Gn]=t.current,Ho(e.nodeType===8?e.parentNode:e),new yp(t)};Ft.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=y1(t),e=e===null?null:e.stateNode,e};Ft.flushSync=function(e){return _i(e)};Ft.hydrate=function(e,t,n){if(!Iu(t))throw Error(A(200));return $u(null,e,t,!0,n)};Ft.hydrateRoot=function(e,t,n){if(!vp(e))throw Error(A(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=Gx;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Qx(t,null,e,1,n??null,i,!1,s,o),e[Gn]=t.current,Ho(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 Lu(t)};Ft.render=function(e,t,n){if(!Iu(t))throw Error(A(200));return $u(null,e,t,!1,n)};Ft.unmountComponentAtNode=function(e){if(!Iu(e))throw Error(A(40));return e._reactRootContainer?(_i(function(){$u(null,null,e,!1,function(){e._reactRootContainer=null,e[Gn]=null})}),!0):!1};Ft.unstable_batchedUpdates=fp;Ft.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Iu(n))throw Error(A(200));if(e==null||e._reactInternals===void 0)throw Error(A(38));return $u(e,t,n,!1,r)};Ft.version="18.3.1-next-f1338f8080-20240426";function Yx(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Yx)}catch(e){console.error(e)}}Yx(),Yv.exports=Ft;var Xx=Yv.exports;const sk=zs(Xx);var Zx,Gg=Xx;Zx=Gg.createRoot,Gg.hydrateRoot;const ok="@alfatech/livechat",ak="v2025.05.05.2",lk="module",uk="https://api-live.alfatek.dev",ck="wss://api-live.alfatek.dev",fk=["dist","README.md"],dk="dist/widget.js",hk={dev:"vite",build:"tsc -b && vite build",lint:"biome lint --write",prepare:"husky",format:"biome format --write && yarn lint"},pk={"@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"},mk={"@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"},Jx={name:ok,private:!1,version:ak,type:lk,apiURL:uk,wsURL:ck,files:fk,main:dk,scripts:hk,dependencies:pk,devDependencies:mk,"lint-staged":{"./**/*.{js,ts,tsx,json}":["npm run format"]}},gk=Jx.apiURL,yk=Jx.wsURL,vk=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],xk=(e,t)=>[{message:"message"in t?t.message:"Not Found"},404],wk={429:vk,404:xk};async function Vu(e,t={}){const n={};!(t.body instanceof FormData)&&t.body&&(n["Content-Type"]="application/json");const r=await fetch(`${gk}/${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=wk[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 ew=e=>[200,201,204].includes(e);var Ks=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(){}},Pi=typeof window>"u"||"Deno"in globalThis;function Ht(){}function bk(e,t){return typeof e=="function"?e(t):e}function wd(e){return typeof e=="number"&&e>=0&&e!==1/0}function tw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function gs(e,t){return typeof e=="function"?e(t):e}function cn(e,t){return typeof e=="function"?e(t):e}function Yg(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==xp(o,t.options))return!1}else if(!Jo(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 Xg(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Ai(t.options.mutationKey)!==Ai(s))return!1}else if(!Jo(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function xp(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ai)(e)}function Ai(e){return JSON.stringify(e,(t,n)=>bd(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Jo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Jo(e[n],t[n])):!1}function nw(e,t){if(e===t)return e;const n=Zg(e)&&Zg(t);if(n||bd(e)&&bd(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 c=0;c<o;c++){const f=n?c:s[c];(!n&&r.includes(f)||n)&&e[f]===void 0&&t[f]===void 0?(a[f]=void 0,l++):(a[f]=nw(e[f],t[f]),a[f]===e[f]&&e[f]!==void 0&&l++)}return i===o&&l===i?e:a}return t}function uu(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 Zg(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function bd(e){if(!Jg(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Jg(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Jg(e){return Object.prototype.toString.call(e)==="[object Object]"}function Sk(e){return new Promise(t=>{setTimeout(t,e)})}function Sd(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?nw(e,t):t}function Tk(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Ek(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var wp=Symbol();function rw(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===wp?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var fi,pr,ys,Av,Ck=(Av=class extends Ks{constructor(){super();H(this,fi);H(this,pr);H(this,ys);F(this,ys,t=>{if(!Pi&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){S(this,pr)||this.setEventListener(S(this,ys))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,pr))==null||t.call(this),F(this,pr,void 0))}setEventListener(t){var n;F(this,ys,t),(n=S(this,pr))==null||n.call(this),F(this,pr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){S(this,fi)!==t&&(F(this,fi,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof S(this,fi)=="boolean"?S(this,fi):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},fi=new WeakMap,pr=new WeakMap,ys=new WeakMap,Av),bp=new Ck,vs,mr,xs,Rv,kk=(Rv=class extends Ks{constructor(){super();H(this,vs,!0);H(this,mr);H(this,xs);F(this,xs,t=>{if(!Pi&&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(){S(this,mr)||this.setEventListener(S(this,xs))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,mr))==null||t.call(this),F(this,mr,void 0))}setEventListener(t){var n;F(this,xs,t),(n=S(this,mr))==null||n.call(this),F(this,mr,t(this.setOnline.bind(this)))}setOnline(t){S(this,vs)!==t&&(F(this,vs,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return S(this,vs)}},vs=new WeakMap,mr=new WeakMap,xs=new WeakMap,Rv),cu=new kk;function Td(){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 _k(e){return Math.min(1e3*2**e,3e4)}function iw(e){return(e??"online")==="online"?cu.isOnline():!0}var sw=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 sw}function ow(e){let t=!1,n=0,r=!1,i;const s=Td(),o=x=>{var w;r||(d(new sw(x)),(w=e.abort)==null||w.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>bp.isFocused()&&(e.networkMode==="always"||cu.isOnline())&&e.canRun(),f=()=>iw(e.networkMode)&&e.canRun(),u=x=>{var w;r||(r=!0,(w=e.onSuccess)==null||w.call(e,x),i==null||i(),s.resolve(x))},d=x=>{var w;r||(r=!0,(w=e.onError)==null||w.call(e,x),i==null||i(),s.reject(x))},h=()=>new Promise(x=>{var w;i=p=>{(r||c())&&x(p)},(w=e.onPause)==null||w.call(e)}).then(()=>{var x;i=void 0,r||(x=e.onContinue)==null||x.call(e)}),m=()=>{if(r)return;let x;const w=n===0?e.initialPromise:void 0;try{x=w??e.fn()}catch(p){x=Promise.reject(p)}Promise.resolve(x).then(u).catch(p=>{var E;if(r)return;const g=e.retry??(Pi?0:3),y=e.retryDelay??_k,C=typeof y=="function"?y(n,p):y,b=g===!0||typeof g=="number"&&n<g||typeof g=="function"&&g(n,p);if(t||!b){d(p);return}n++,(E=e.onFail)==null||E.call(e,n,p),Sk(C).then(()=>c()?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 Pk(){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 Fe=Pk(),di,Ov,aw=(Ov=class{constructor(){H(this,di)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),wd(this.gcTime)&&F(this,di,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Pi?1/0:5*60*1e3))}clearGcTimeout(){S(this,di)&&(clearTimeout(S(this,di)),F(this,di,void 0))}},di=new WeakMap,Ov),ws,bs,Ut,Je,pa,hi,on,In,Mv,Ak=(Mv=class extends aw{constructor(t){super();H(this,on);H(this,ws);H(this,bs);H(this,Ut);H(this,Je);H(this,pa);H(this,hi);F(this,hi,!1),F(this,pa,t.defaultOptions),this.setOptions(t.options),this.observers=[],F(this,Ut,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,F(this,ws,Rk(this.options)),this.state=t.state??S(this,ws),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=S(this,Je))==null?void 0:t.promise}setOptions(t){this.options={...S(this,pa),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&S(this,Ut).remove(this)}setData(t,n){const r=Sd(this.state.data,t,this.options);return X(this,on,In).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,on,In).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=S(this,Je))==null?void 0:r.promise;return(i=S(this,Je))==null||i.cancel(t),n?n.then(Ht).catch(Ht):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(S(this,ws))}isActive(){return this.observers.some(t=>cn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===wp||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||!tw(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,Je))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,Je))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),S(this,Ut).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(S(this,Je)&&(S(this,hi)?S(this,Je).cancel({revert:!0}):S(this,Je).cancelRetry()),this.scheduleGc()),S(this,Ut).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||X(this,on,In).call(this,{type:"invalidate"})}fetch(t,n){var l,c,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(S(this,Je))return S(this,Je).continueRetry(),S(this,Je).promise}if(t&&this.setOptions(t),!this.options.queryFn){const u=this.observers.find(d=>d.options.queryFn);u&&this.setOptions(u.options)}const r=new AbortController,i=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(F(this,hi,!0),r.signal)})},s=()=>{const u=rw(this.options,n),d={queryKey:this.queryKey,meta:this.meta};return i(d),F(this,hi,!1),this.options.persister?this.options.persister(u,d,this):u(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),F(this,bs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=o.fetchOptions)==null?void 0:c.meta))&&X(this,on,In).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const a=u=>{var d,h,m,x;Xc(u)&&u.silent||X(this,on,In).call(this,{type:"error",error:u}),Xc(u)||((h=(d=S(this,Ut).config).onError)==null||h.call(d,u,this),(x=(m=S(this,Ut).config).onSettled)==null||x.call(m,this.state.data,u,this)),this.scheduleGc()};return F(this,Je,ow({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:u=>{var d,h,m,x;if(u===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(u)}catch(w){a(w);return}(h=(d=S(this,Ut).config).onSuccess)==null||h.call(d,u,this),(x=(m=S(this,Ut).config).onSettled)==null||x.call(m,u,this.state.error,this),this.scheduleGc()},onError:a,onFail:(u,d)=>{X(this,on,In).call(this,{type:"failed",failureCount:u,error:d})},onPause:()=>{X(this,on,In).call(this,{type:"pause"})},onContinue:()=>{X(this,on,In).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),S(this,Je).start()}},ws=new WeakMap,bs=new WeakMap,Ut=new WeakMap,Je=new WeakMap,pa=new WeakMap,hi=new WeakMap,on=new WeakSet,In=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,...lw(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&&S(this,bs)?{...S(this,bs),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),Fe.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),S(this,Ut).notify({query:this,type:"updated",action:t})})},Mv);function lw(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:iw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Rk(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 wn,jv,Ok=(jv=class extends Ks{constructor(t={}){super();H(this,wn);this.config=t,F(this,wn,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??xp(i,n);let o=this.get(s);return o||(o=new Ak({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){S(this,wn).has(t.queryHash)||(S(this,wn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=S(this,wn).get(t.queryHash);n&&(t.destroy(),n===t&&S(this,wn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Fe.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return S(this,wn).get(t)}getAll(){return[...S(this,wn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Yg(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Yg(t,r)):n}notify(t){Fe.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Fe.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Fe.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},wn=new WeakMap,jv),bn,it,pi,Sn,ar,Dv,Mk=(Dv=class extends aw{constructor(t){super();H(this,Sn);H(this,bn);H(this,it);H(this,pi);this.mutationId=t.mutationId,F(this,it,t.mutationCache),F(this,bn,[]),this.state=t.state||uw(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){S(this,bn).includes(t)||(S(this,bn).push(t),this.clearGcTimeout(),S(this,it).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){F(this,bn,S(this,bn).filter(n=>n!==t)),this.scheduleGc(),S(this,it).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){S(this,bn).length||(this.state.status==="pending"?this.scheduleGc():S(this,it).remove(this))}continue(){var t;return((t=S(this,pi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,c,f,u,d,h,m,x,w,p,g,y,C,b,E,k;F(this,pi,ow({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(P,M)=>{X(this,Sn,ar).call(this,{type:"failed",failureCount:P,error:M})},onPause:()=>{X(this,Sn,ar).call(this,{type:"pause"})},onContinue:()=>{X(this,Sn,ar).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>S(this,it).canRun(this)}));const n=this.state.status==="pending",r=!S(this,pi).canStart();try{if(!n){X(this,Sn,ar).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(i=S(this,it).config).onMutate)==null?void 0:s.call(i,t,this));const M=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));M!==this.state.context&&X(this,Sn,ar).call(this,{type:"pending",context:M,variables:t,isPaused:r})}const P=await S(this,pi).start();return await((c=(l=S(this,it).config).onSuccess)==null?void 0:c.call(l,P,t,this.state.context,this)),await((u=(f=this.options).onSuccess)==null?void 0:u.call(f,P,t,this.state.context)),await((h=(d=S(this,it).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,Sn,ar).call(this,{type:"success",data:P}),P}catch(P){try{throw await((p=(w=S(this,it).config).onError)==null?void 0:p.call(w,P,t,this.state.context,this)),await((y=(g=this.options).onError)==null?void 0:y.call(g,P,t,this.state.context)),await((b=(C=S(this,it).config).onSettled)==null?void 0:b.call(C,void 0,P,this.state.variables,this.state.context,this)),await((k=(E=this.options).onSettled)==null?void 0:k.call(E,void 0,P,t,this.state.context)),P}finally{X(this,Sn,ar).call(this,{type:"error",error:P})}}finally{S(this,it).runNext(this)}}},bn=new WeakMap,it=new WeakMap,pi=new WeakMap,Sn=new WeakSet,ar=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),Fe.batch(()=>{S(this,bn).forEach(r=>{r.onMutationUpdate(t)}),S(this,it).notify({mutation:this,type:"updated",action:t})})},Dv);function uw(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Pt,ma,Fv,jk=(Fv=class extends Ks{constructor(t={}){super();H(this,Pt);H(this,ma);this.config=t,F(this,Pt,new Map),F(this,ma,Date.now())}build(t,n,r){const i=new Mk({mutationCache:this,mutationId:++$a(this,ma)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=rl(t),r=S(this,Pt).get(n)??[];r.push(t),S(this,Pt).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=rl(t);if(S(this,Pt).has(n)){const i=(r=S(this,Pt).get(n))==null?void 0:r.filter(s=>s!==t);i&&(i.length===0?S(this,Pt).delete(n):S(this,Pt).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=S(this,Pt).get(rl(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=S(this,Pt).get(rl(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Fe.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...S(this,Pt).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Xg(n,r))}findAll(t={}){return this.getAll().filter(n=>Xg(t,n))}notify(t){Fe.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Fe.batch(()=>Promise.all(t.map(n=>n.continue().catch(Ht))))}},Pt=new WeakMap,ma=new WeakMap,Fv);function rl(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function e0(e){return{onFetch:(t,n)=>{var f,u,d,h,m;const r=t.options,i=(d=(u=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:u.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 c=async()=>{let x=!1;const w=y=>{Object.defineProperty(y,"signal",{enumerable:!0,get:()=>(t.signal.aborted?x=!0:t.signal.addEventListener("abort",()=>{x=!0}),t.signal)})},p=rw(t.options,t.fetchOptions),g=async(y,C,b)=>{if(x)return Promise.reject();if(C==null&&y.pages.length)return Promise.resolve(y);const E={queryKey:t.queryKey,pageParam:C,direction:b?"backward":"forward",meta:t.options.meta};w(E);const k=await p(E),{maxPages:P}=t.options,M=b?Ek:Tk;return{pages:M(y.pages,k,P),pageParams:M(y.pageParams,C,P)}};if(i&&s.length){const y=i==="backward",C=y?Dk:t0,b={pages:s,pageParams:o},E=C(r,b);a=await g(b,E,y)}else{const y=e??s.length;do{const C=l===0?o[0]??r.initialPageParam:t0(r,a);if(l>0&&C==null)break;a=await g(a,C),l++}while(l<y)}return a};t.options.persister?t.fetchFn=()=>{var x,w;return(w=(x=t.options).persister)==null?void 0:w.call(x,c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function t0(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 Dk(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,gr,yr,Ss,Ts,vr,Es,Cs,Nv,Fk=(Nv=class{constructor(e={}){H(this,Ee);H(this,gr);H(this,yr);H(this,Ss);H(this,Ts);H(this,vr);H(this,Es);H(this,Cs);F(this,Ee,e.queryCache||new Ok),F(this,gr,e.mutationCache||new jk),F(this,yr,e.defaultOptions||{}),F(this,Ss,new Map),F(this,Ts,new Map),F(this,vr,0)}mount(){$a(this,vr)._++,S(this,vr)===1&&(F(this,Es,bp.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,Ee).onFocus())})),F(this,Cs,cu.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,Ee).onOnline())})))}unmount(){var e,t;$a(this,vr)._--,S(this,vr)===0&&((e=S(this,Es))==null||e.call(this),F(this,Es,void 0),(t=S(this,Cs))==null||t.call(this),F(this,Cs,void 0))}isFetching(e){return S(this,Ee).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return S(this,gr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(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=S(this,Ee).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(gs(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return S(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=S(this,Ee).get(r.queryHash),s=i==null?void 0:i.state.data,o=bk(t,s);if(o!==void 0)return S(this,Ee).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Fe.batch(()=>S(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=S(this,Ee).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=S(this,Ee);Fe.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=S(this,Ee),r={type:"active",...e};return Fe.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Fe.batch(()=>S(this,Ee).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Ht).catch(Ht)}invalidateQueries(e,t={}){return Fe.batch(()=>{if(S(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=Fe.batch(()=>S(this,Ee).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Ht)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Ht)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=S(this,Ee).build(this,t);return n.isStaleByTime(gs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ht).catch(Ht)}fetchInfiniteQuery(e){return e.behavior=e0(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ht).catch(Ht)}ensureInfiniteQueryData(e){return e.behavior=e0(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return cu.isOnline()?S(this,gr).resumePausedMutations():Promise.resolve()}getQueryCache(){return S(this,Ee)}getMutationCache(){return S(this,gr)}getDefaultOptions(){return S(this,yr)}setDefaultOptions(e){F(this,yr,e)}setQueryDefaults(e,t){S(this,Ss).set(Ai(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...S(this,Ss).values()],n={};return t.forEach(r=>{Jo(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){S(this,Ts).set(Ai(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...S(this,Ts).values()];let n={};return t.forEach(r=>{Jo(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...S(this,yr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=xp(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===wp&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...S(this,yr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){S(this,Ee).clear(),S(this,gr).clear()}},Ee=new WeakMap,gr=new WeakMap,yr=new WeakMap,Ss=new WeakMap,Ts=new WeakMap,vr=new WeakMap,Es=new WeakMap,Cs=new WeakMap,Nv),mt,ee,ga,st,mi,ks,xr,Tn,ya,_s,Ps,gi,yi,wr,As,ae,go,Ed,Cd,kd,_d,Pd,Ad,Rd,cw,Lv,Nk=(Lv=class extends Ks{constructor(t,n){super();H(this,ae);H(this,mt);H(this,ee);H(this,ga);H(this,st);H(this,mi);H(this,ks);H(this,xr);H(this,Tn);H(this,ya);H(this,_s);H(this,Ps);H(this,gi);H(this,yi);H(this,wr);H(this,As,new Set);this.options=n,F(this,mt,t),F(this,Tn,null),F(this,xr,Td()),this.options.experimental_prefetchInRender||S(this,xr).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&&(S(this,ee).addObserver(this),n0(S(this,ee),this.options)?X(this,ae,go).call(this):this.updateResult(),X(this,ae,_d).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Od(S(this,ee),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Od(S(this,ee),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,X(this,ae,Pd).call(this),X(this,ae,Ad).call(this),S(this,ee).removeObserver(this)}setOptions(t,n){const r=this.options,i=S(this,ee);if(this.options=S(this,mt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof cn(this.options.enabled,S(this,ee))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");X(this,ae,Rd).call(this),S(this,ee).setOptions(this.options),r._defaulted&&!uu(this.options,r)&&S(this,mt).getQueryCache().notify({type:"observerOptionsUpdated",query:S(this,ee),observer:this});const s=this.hasListeners();s&&r0(S(this,ee),i,this.options,r)&&X(this,ae,go).call(this),this.updateResult(n),s&&(S(this,ee)!==i||cn(this.options.enabled,S(this,ee))!==cn(r.enabled,S(this,ee))||gs(this.options.staleTime,S(this,ee))!==gs(r.staleTime,S(this,ee)))&&X(this,ae,Ed).call(this);const o=X(this,ae,Cd).call(this);s&&(S(this,ee)!==i||cn(this.options.enabled,S(this,ee))!==cn(r.enabled,S(this,ee))||o!==S(this,wr))&&X(this,ae,kd).call(this,o)}getOptimisticResult(t){const n=S(this,mt).getQueryCache().build(S(this,mt),t),r=this.createResult(n,t);return Ik(this,r)&&(F(this,st,r),F(this,ks,this.options),F(this,mi,S(this,ee).state)),r}getCurrentResult(){return S(this,st)}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){S(this,As).add(t)}getCurrentQuery(){return S(this,ee)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=S(this,mt).defaultQueryOptions(t),r=S(this,mt).getQueryCache().build(S(this,mt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return X(this,ae,go).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),S(this,st)))}createResult(t,n){var P;const r=S(this,ee),i=this.options,s=S(this,st),o=S(this,mi),a=S(this,ks),c=t!==r?t.state:S(this,ga),{state:f}=t;let u={...f},d=!1,h;if(n._optimisticResults){const M=this.hasListeners(),j=!M&&n0(t,n),I=M&&r0(t,r,n,i);(j||I)&&(u={...u,...lw(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:m,errorUpdatedAt:x,status:w}=u;if(n.select&&u.data!==void 0)if(s&&u.data===(o==null?void 0:o.data)&&n.select===S(this,ya))h=S(this,_s);else try{F(this,ya,n.select),h=n.select(u.data),h=Sd(s==null?void 0:s.data,h,n),F(this,_s,h),F(this,Tn,null)}catch(M){F(this,Tn,M)}else h=u.data;if(n.placeholderData!==void 0&&h===void 0&&w==="pending"){let M;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))M=s.data;else if(M=typeof n.placeholderData=="function"?n.placeholderData((P=S(this,Ps))==null?void 0:P.state.data,S(this,Ps)):n.placeholderData,n.select&&M!==void 0)try{M=n.select(M),F(this,Tn,null)}catch(j){F(this,Tn,j)}M!==void 0&&(w="success",h=Sd(s==null?void 0:s.data,M,n),d=!0)}S(this,Tn)&&(m=S(this,Tn),h=S(this,_s),x=Date.now(),w="error");const p=u.fetchStatus==="fetching",g=w==="pending",y=w==="error",C=g&&p,b=h!==void 0,k={status:w,fetchStatus:u.fetchStatus,isPending:g,isSuccess:w==="success",isError:y,isInitialLoading:C,isLoading:C,data:h,dataUpdatedAt:u.dataUpdatedAt,error:m,errorUpdatedAt:x,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>c.dataUpdateCount||u.errorUpdateCount>c.errorUpdateCount,isFetching:p,isRefetching:p&&!g,isLoadingError:y&&!b,isPaused:u.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:y&&b,isStale:Sp(t,n),refetch:this.refetch,promise:S(this,xr)};if(this.options.experimental_prefetchInRender){const M=re=>{k.status==="error"?re.reject(k.error):k.data!==void 0&&re.resolve(k.data)},j=()=>{const re=F(this,xr,k.promise=Td());M(re)},I=S(this,xr);switch(I.status){case"pending":t.queryHash===r.queryHash&&M(I);break;case"fulfilled":(k.status==="error"||k.data!==I.value)&&j();break;case"rejected":(k.status!=="error"||k.error!==I.reason)&&j();break}}return k}updateResult(t){const n=S(this,st),r=this.createResult(S(this,ee),this.options);if(F(this,mi,S(this,ee).state),F(this,ks,this.options),S(this,mi).data!==void 0&&F(this,Ps,S(this,ee)),uu(r,n))return;F(this,st,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!S(this,As).size)return!0;const l=new Set(a??S(this,As));return this.options.throwOnError&&l.add("error"),Object.keys(S(this,st)).some(c=>{const f=c;return S(this,st)[f]!==n[f]&&l.has(f)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),X(this,ae,cw).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&X(this,ae,_d).call(this)}},mt=new WeakMap,ee=new WeakMap,ga=new WeakMap,st=new WeakMap,mi=new WeakMap,ks=new WeakMap,xr=new WeakMap,Tn=new WeakMap,ya=new WeakMap,_s=new WeakMap,Ps=new WeakMap,gi=new WeakMap,yi=new WeakMap,wr=new WeakMap,As=new WeakMap,ae=new WeakSet,go=function(t){X(this,ae,Rd).call(this);let n=S(this,ee).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ht)),n},Ed=function(){X(this,ae,Pd).call(this);const t=gs(this.options.staleTime,S(this,ee));if(Pi||S(this,st).isStale||!wd(t))return;const r=tw(S(this,st).dataUpdatedAt,t)+1;F(this,gi,setTimeout(()=>{S(this,st).isStale||this.updateResult()},r))},Cd=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(S(this,ee)):this.options.refetchInterval)??!1},kd=function(t){X(this,ae,Ad).call(this),F(this,wr,t),!(Pi||cn(this.options.enabled,S(this,ee))===!1||!wd(S(this,wr))||S(this,wr)===0)&&F(this,yi,setInterval(()=>{(this.options.refetchIntervalInBackground||bp.isFocused())&&X(this,ae,go).call(this)},S(this,wr)))},_d=function(){X(this,ae,Ed).call(this),X(this,ae,kd).call(this,X(this,ae,Cd).call(this))},Pd=function(){S(this,gi)&&(clearTimeout(S(this,gi)),F(this,gi,void 0))},Ad=function(){S(this,yi)&&(clearInterval(S(this,yi)),F(this,yi,void 0))},Rd=function(){const t=S(this,mt).getQueryCache().build(S(this,mt),this.options);if(t===S(this,ee))return;const n=S(this,ee);F(this,ee,t),F(this,ga,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},cw=function(t){Fe.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(S(this,st))}),S(this,mt).getQueryCache().notify({query:S(this,ee),type:"observerResultsUpdated"})})},Lv);function Lk(e,t){return cn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function n0(e,t){return Lk(e,t)||e.state.data!==void 0&&Od(e,t,t.refetchOnMount)}function Od(e,t,n){if(cn(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Sp(e,t)}return!1}function r0(e,t,n,r){return(e!==t||cn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Sp(e,n)}function Sp(e,t){return cn(t.enabled,e)!==!1&&e.isStaleByTime(gs(t.staleTime,e))}function Ik(e,t){return!uu(e.getCurrentResult(),t)}var br,Sr,gt,zn,qn,_l,Md,Iv,$k=(Iv=class extends Ks{constructor(t,n){super();H(this,qn);H(this,br);H(this,Sr);H(this,gt);H(this,zn);F(this,br,t),this.setOptions(n),this.bindMethods(),X(this,qn,_l).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=S(this,br).defaultMutationOptions(t),uu(this.options,n)||S(this,br).getMutationCache().notify({type:"observerOptionsUpdated",mutation:S(this,gt),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Ai(n.mutationKey)!==Ai(this.options.mutationKey)?this.reset():((r=S(this,gt))==null?void 0:r.state.status)==="pending"&&S(this,gt).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=S(this,gt))==null||t.removeObserver(this)}onMutationUpdate(t){X(this,qn,_l).call(this),X(this,qn,Md).call(this,t)}getCurrentResult(){return S(this,Sr)}reset(){var t;(t=S(this,gt))==null||t.removeObserver(this),F(this,gt,void 0),X(this,qn,_l).call(this),X(this,qn,Md).call(this)}mutate(t,n){var r;return F(this,zn,n),(r=S(this,gt))==null||r.removeObserver(this),F(this,gt,S(this,br).getMutationCache().build(S(this,br),this.options)),S(this,gt).addObserver(this),S(this,gt).execute(t)}},br=new WeakMap,Sr=new WeakMap,gt=new WeakMap,zn=new WeakMap,qn=new WeakSet,_l=function(){var n;const t=((n=S(this,gt))==null?void 0:n.state)??uw();F(this,Sr,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Md=function(t){Fe.batch(()=>{var n,r,i,s,o,a,l,c;if(S(this,zn)&&this.hasListeners()){const f=S(this,Sr).variables,u=S(this,Sr).context;(t==null?void 0:t.type)==="success"?((r=(n=S(this,zn)).onSuccess)==null||r.call(n,t.data,f,u),(s=(i=S(this,zn)).onSettled)==null||s.call(i,t.data,null,f,u)):(t==null?void 0:t.type)==="error"&&((a=(o=S(this,zn)).onError)==null||a.call(o,t.error,f,u),(c=(l=S(this,zn)).onSettled)==null||c.call(l,void 0,t.error,f,u))}this.listeners.forEach(f=>{f(S(this,Sr))})})},Iv),fw=v.createContext(void 0),dw=e=>{const t=v.useContext(fw);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Vk=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),T.jsx(fw.Provider,{value:e,children:t})),hw=v.createContext(!1),Bk=()=>v.useContext(hw);hw.Provider;function zk(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Uk=v.createContext(zk()),Hk=()=>v.useContext(Uk);function pw(e,t){return typeof e=="function"?e(...t):!!e}function jd(){}var Wk=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Kk=e=>{v.useEffect(()=>{e.clearReset()},[e])},qk=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&pw(n,[e.error,r]),Qk=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},Gk=(e,t)=>e.isLoading&&e.isFetching&&!t,Yk=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,i0=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Xk(e,t,n){var f,u,d,h,m;const r=dw(),i=Bk(),s=Hk(),o=r.defaultQueryOptions(e);(u=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||u.call(f,o),o._optimisticResults=i?"isRestoring":"optimistic",Qk(o),Wk(o,s),Kk(s);const a=!r.getQueryCache().get(o.queryHash),[l]=v.useState(()=>new t(r,o)),c=l.getOptimisticResult(o);if(v.useSyncExternalStore(v.useCallback(x=>{const w=i?jd:l.subscribe(Fe.batchCalls(x));return l.updateResult(),w},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),v.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),Yk(o,c))throw i0(o,l,s);if(qk({result:c,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw c.error;if((h=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_afterQuery)==null||h.call(d,o,c),o.experimental_prefetchInRender&&!Pi&&Gk(c,i)){const x=a?i0(o,l,s):(m=r.getQueryCache().get(o.queryHash))==null?void 0:m.promise;x==null||x.catch(jd).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?c:l.trackResult(c)}function Zk(e,t){return Xk(e,Nk)}function Jk(e,t){const n=dw(),[r]=v.useState(()=>new $k(n,e));v.useEffect(()=>{r.setOptions(e)},[r,e]);const i=v.useSyncExternalStore(v.useCallback(o=>r.subscribe(Fe.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=v.useCallback((o,a)=>{r.mutate(o,a).catch(jd)},[r]);if(i.error&&pw(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const e_=e=>Zk({queryKey:["widgets",e],queryFn:()=>t_(e)}),t_=e=>Vu(`widgets/with-link/${e}`);var U=(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))(U||{});function n_(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 fu(){return fu=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},fu.apply(this,arguments)}var Cr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Cr||(Cr={}));function r_(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=Cr.Pop,a=null;function l(h){return Math.min(Math.max(h,0),i.length-1)}function c(){return i[s]}function f(h,m,x){m===void 0&&(m=null);let w=s_(i?c().pathname:"/",h,m,x);return
|
|
49
|
+
*/function fu(){return fu=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},fu.apply(this,arguments)}var Cr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Cr||(Cr={}));function r_(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=Cr.Pop,a=null;function l(h){return Math.min(Math.max(h,0),i.length-1)}function c(){return i[s]}function f(h,m,x){m===void 0&&(m=null);let w=s_(i?c().pathname:"/",h,m,x);return Tp(w.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(h)),w}function u(h){return typeof h=="string"?h:Dd(h)}return{get index(){return s},get action(){return o},get location(){return c()},createHref:u,createURL(h){return new URL(u(h),"http://localhost")},encodeLocation(h){let m=typeof h=="string"?ji(h):h;return{pathname:m.pathname||"",search:m.search||"",hash:m.hash||""}},push(h,m){o=Cr.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=Cr.Replace;let x=f(h,m);i[s]=x,r&&a&&a({action:o,location:x,delta:0})},go(h){o=Cr.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 Le(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Tp(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function i_(){return Math.random().toString(36).substr(2,8)}function s_(e,t,n,r){return n===void 0&&(n=null),fu({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ji(t):t,{state:n,key:t&&t.key||r||i_()})}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 ji(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 s0;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(s0||(s0={}));function o_(e,t,n){return n===void 0&&(n="/"),a_(e,t,n,!1)}function a_(e,t,n,r){let i=typeof t=="string"?ji(t):t,s=Ep(i.pathname||"/",n);if(s==null)return null;let o=mw(e);l_(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=x_(s);a=y_(o[l],c,r)}return a}function mw(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("/")&&(Le(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 c=Fr([r,l.relativePath]),f=n.concat(l);s.children&&s.children.length>0&&(Le(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),mw(s.children,t,f,c)),!(s.path==null&&!s.index)&&t.push({path:c,score:m_(c,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 gw(s.path))i(s,o,l)}),t}function gw(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=gw(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 l_(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:g_(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const u_=/^:[\w-]+$/,c_=3,f_=2,d_=1,h_=10,p_=-2,o0=e=>e==="*";function m_(e,t){let n=e.split("/"),r=n.length;return n.some(o0)&&(r+=p_),t&&(r+=f_),n.filter(i=>!o0(i)).reduce((i,s)=>i+(u_.test(s)?c_:s===""?d_:h_),r)}function g_(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 y_(e,t,n){let{routesMeta:r}=e,i={},s="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,f=s==="/"?t:t.slice(s.length)||"/",u=a0({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},f),d=l.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=a0({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},f)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:Fr([s,u.pathname]),pathnameBase:T_(Fr([s,u.pathnameBase])),route:d}),u.pathnameBase!=="/"&&(s=Fr([s,u.pathnameBase]))}return o}function a0(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=v_(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((c,f,u)=>{let{paramName:d,isOptional:h}=f;if(d==="*"){let x=a[u]||"";o=s.slice(0,s.length-x.length).replace(/(.)\/+$/,"$1")}const m=a[u];return h&&!m?c[d]=void 0:c[d]=(m||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:o,pattern:e}}function v_(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Tp(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 x_(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Tp(!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 Ep(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 w_(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?ji(e):e;return{pathname:n?n.startsWith("/")?n:b_(n,t):t,search:E_(r),hash:C_(i)}}function b_(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 S_(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function yw(e,t){let n=S_(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function vw(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=ji(e):(i=fu({},e),Le(!i.pathname||!i.pathname.includes("?"),Zc("?","pathname","search",i)),Le(!i.pathname||!i.pathname.includes("#"),Zc("#","pathname","hash",i)),Le(!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 u=t.length-1;if(!r&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),u-=1;i.pathname=d.join("/")}a=u>=0?t[u]:"/"}let l=w_(i,a),c=o&&o!=="/"&&o.endsWith("/"),f=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||f)&&(l.pathname+="/"),l}const Fr=e=>e.join("/").replace(/\/\/+/g,"/"),T_=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),E_=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,C_=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function k_(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const xw=["post","put","patch","delete"];new Set(xw);const __=["get",...xw];new Set(__);/**
|
|
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 ea(){return ea=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},ea.apply(this,arguments)}const
|
|
58
|
+
*/function ea(){return ea=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},ea.apply(this,arguments)}const Cp=v.createContext(null),P_=v.createContext(null),Di=v.createContext(null),Bu=v.createContext(null),Fi=v.createContext({outlet:null,matches:[],isDataRoute:!1}),ww=v.createContext(null);function A_(e,t){let{relative:n}=t===void 0?{}:t;Ta()||Le(!1);let{basename:r,navigator:i}=v.useContext(Di),{hash:s,pathname:o,search:a}=Tw(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:Fr([r,o])),i.createHref({pathname:l,search:a,hash:s})}function Ta(){return v.useContext(Bu)!=null}function Ea(){return Ta()||Le(!1),v.useContext(Bu).location}function bw(e){v.useContext(Di).static||v.useLayoutEffect(e)}function Sw(){let{isDataRoute:e}=v.useContext(Fi);return e?z_():R_()}function R_(){Ta()||Le(!1);let e=v.useContext(Cp),{basename:t,future:n,navigator:r}=v.useContext(Di),{matches:i}=v.useContext(Fi),{pathname:s}=Ea(),o=JSON.stringify(yw(i,n.v7_relativeSplatPath)),a=v.useRef(!1);return bw(()=>{a.current=!0}),v.useCallback(function(c,f){if(f===void 0&&(f={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let u=vw(c,JSON.parse(o),s,f.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:Fr([t,u.pathname])),(f.replace?r.replace:r.push)(u,f.state,f)},[t,r,o,s,e])}function Tw(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=v.useContext(Di),{matches:i}=v.useContext(Fi),{pathname:s}=Ea(),o=JSON.stringify(yw(i,r.v7_relativeSplatPath));return v.useMemo(()=>vw(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function O_(e,t){return M_(e,t)}function M_(e,t,n,r){Ta()||Le(!1);let{navigator:i}=v.useContext(Di),{matches:s}=v.useContext(Fi),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=Ea(),f;if(t){var u;let w=typeof t=="string"?ji(t):t;l==="/"||(u=w.pathname)!=null&&u.startsWith(l)||Le(!1),f=w}else f=c;let d=f.pathname||"/",h=d;if(l!=="/"){let w=l.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(w.length).join("/")}let m=o_(e,{pathname:h}),x=L_(m&&m.map(w=>Object.assign({},w,{params:Object.assign({},a,w.params),pathname:Fr([l,i.encodeLocation?i.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:Fr([l,i.encodeLocation?i.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),s,n,r);return t&&x?v.createElement(Bu.Provider,{value:{location:ea({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:Cr.Pop}},x):x}function j_(){let e=B_(),t=k_(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 v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:i},n):null,null)}const D_=v.createElement(j_,null);class F_ extends v.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?v.createElement(Fi.Provider,{value:this.props.routeContext},v.createElement(ww.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function N_(e){let{routeContext:t,match:n,children:r}=e,i=v.useContext(Cp);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(Fi.Provider,{value:t},r)}function L_(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(u=>u.route.id&&(a==null?void 0:a[u.route.id])!==void 0);f>=0||Le(!1),o=o.slice(0,Math.min(o.length,f+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f<o.length;f++){let u=o[f];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(c=f),u.route.id){let{loaderData:d,errors:h}=n,m=u.route.loader&&d[u.route.id]===void 0&&(!h||h[u.route.id]===void 0);if(u.route.lazy||m){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((f,u,d)=>{let h,m=!1,x=null,w=null;n&&(h=a&&u.route.id?a[u.route.id]:void 0,x=u.route.errorElement||D_,l&&(c<0&&d===0?(m=!0,w=null):c===d&&(m=!0,w=u.route.hydrateFallbackElement||null)));let p=t.concat(o.slice(0,d+1)),g=()=>{let y;return h?y=x:m?y=w:u.route.Component?y=v.createElement(u.route.Component,null):u.route.element?y=u.route.element:y=f,v.createElement(N_,{match:u,routeContext:{outlet:f,matches:p,isDataRoute:n!=null},children:y})};return n&&(u.route.ErrorBoundary||u.route.errorElement||d===0)?v.createElement(F_,{location:n.location,revalidation:n.revalidation,component:x,error:h,children:g(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):g()},null)}var Ew=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Ew||{}),du=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}(du||{});function I_(e){let t=v.useContext(Cp);return t||Le(!1),t}function $_(e){let t=v.useContext(P_);return t||Le(!1),t}function V_(e){let t=v.useContext(Fi);return t||Le(!1),t}function Cw(e){let t=V_(),n=t.matches[t.matches.length-1];return n.route.id||Le(!1),n.route.id}function B_(){var e;let t=v.useContext(ww),n=$_(du.UseRouteError),r=Cw(du.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function z_(){let{router:e}=I_(Ew.UseNavigateStable),t=Cw(du.UseNavigateStable),n=v.useRef(!1);return bw(()=>{n.current=!0}),v.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,ea({fromRouteId:t},s)))},[e,t])}const l0={};function U_(e,t){l0[t]||(l0[t]=!0,console.warn(t))}const u0=(e,t,n)=>U_(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function H_(e,t){e!=null&&e.v7_startTransition||u0("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&&u0("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}const W_="startTransition",c0=_f[W_];function K_(e){let{basename:t,children:n,initialEntries:r,initialIndex:i,future:s}=e,o=v.useRef();o.current==null&&(o.current=r_({initialEntries:r,initialIndex:i,v5Compat:!0}));let a=o.current,[l,c]=v.useState({action:a.action,location:a.location}),{v7_startTransition:f}=s||{},u=v.useCallback(d=>{f&&c0?c0(()=>c(d)):c(d)},[c,f]);return v.useLayoutEffect(()=>a.listen(u),[a,u]),v.useEffect(()=>H_(s),[s]),v.createElement(q_,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:s})}function Fd(e){Le(!1)}function q_(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Cr.Pop,navigator:s,static:o=!1,future:a}=e;Ta()&&Le(!1);let l=t.replace(/^\/*/,"/"),c=v.useMemo(()=>({basename:l,navigator:s,static:o,future:ea({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof r=="string"&&(r=ji(r));let{pathname:f="/",search:u="",hash:d="",state:h=null,key:m="default"}=r,x=v.useMemo(()=>{let w=Ep(f,l);return w==null?null:{location:{pathname:w,search:u,hash:d,state:h,key:m},navigationType:i}},[l,f,u,d,h,m,i]);return x==null?null:v.createElement(Di.Provider,{value:c},v.createElement(Bu.Provider,{children:n,value:x}))}function Q_(e){let{children:t,location:n}=e;return O_(Nd(t),n)}new Promise(()=>{});function Nd(e,t){t===void 0&&(t=[]);let n=[];return v.Children.forEach(e,(r,i)=>{if(!v.isValidElement(r))return;let s=[...t,i];if(r.type===v.Fragment){n.push.apply(n,Nd(r.props.children,s));return}r.type!==Fd&&Le(!1),!r.props.index||!r.props.children||Le(!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=Nd(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
|
|
67
|
+
*/function Ld(){return Ld=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},Ld.apply(this,arguments)}function G_(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 Y_(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function X_(e,t){return e.button===0&&(!t||t==="_self")&&!Y_(e)}const Z_=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],J_="6";try{window.__reactRouterVersion=J_}catch{}const e2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",t2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,n2=v.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:c,preventScrollReset:f,viewTransition:u}=t,d=G_(t,Z_),{basename:h}=v.useContext(Di),m,x=!1;if(typeof c=="string"&&t2.test(c)&&(m=c,e2))try{let y=new URL(window.location.href),C=c.startsWith("//")?new URL(y.protocol+c):new URL(c),b=Ep(C.pathname,h);C.origin===y.origin&&b!=null?c=b+C.search+C.hash:x=!0}catch{}let w=A_(c,{relative:i}),p=r2(c,{replace:o,state:a,target:l,preventScrollReset:f,relative:i,viewTransition:u});function g(y){r&&r(y),y.defaultPrevented||p(y)}return v.createElement("a",Ld({},d,{href:m||w,onClick:x||s?r:g,ref:n,target:l}))});var f0;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(f0||(f0={}));var d0;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(d0||(d0={}));function r2(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:a}=t===void 0?{}:t,l=Sw(),c=Ea(),f=Tw(e,{relative:o});return v.useCallback(u=>{if(X_(u,n)){u.preventDefault();let d=r!==void 0?r:Dd(c)===Dd(f);l(e,{replace:d,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[c,l,f,r,i,n,e,s,o,a])}const i2={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},h0=e=>{let t;const n=new Set,r=(f,u)=>{const d=typeof f=="function"?f(t):f;if(!Object.is(d,t)){const h=t;t=u??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(m=>m(t,h))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>c,subscribe:f=>(n.add(f),()=>n.delete(f)),destroy:()=>{(i2?"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()}},c=t=e(r,i,l);return l},s2=e=>e?h0(e):h0;var kw={exports:{}},_w={},Pw={exports:{}},Aw={};/**
|
|
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 Ls=v;function o2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var a2=typeof Object.is=="function"?Object.is:o2,l2=Ls.useState,u2=Ls.useEffect,c2=Ls.useLayoutEffect,f2=Ls.useDebugValue;function d2(e,t){var n=t(),r=l2({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return c2(function(){i.value=n,i.getSnapshot=t,
|
|
75
|
+
*/var Ls=v;function o2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var a2=typeof Object.is=="function"?Object.is:o2,l2=Ls.useState,u2=Ls.useEffect,c2=Ls.useLayoutEffect,f2=Ls.useDebugValue;function d2(e,t){var n=t(),r=l2({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return c2(function(){i.value=n,i.getSnapshot=t,Jc(i)&&s({inst:i})},[e,n,t]),u2(function(){return Jc(i)&&s({inst:i}),e(function(){Jc(i)&&s({inst:i})})},[e]),f2(n),n}function Jc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!a2(e,n)}catch{return!0}}function h2(e,t){return t()}var p2=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h2:d2;Aw.useSyncExternalStore=Ls.useSyncExternalStore!==void 0?Ls.useSyncExternalStore:p2;Pw.exports=Aw;var m2=Pw.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 zu=v,g2=m2;function y2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var v2=typeof Object.is=="function"?Object.is:y2,x2=g2.useSyncExternalStore,w2=zu.useRef,b2=zu.useEffect,S2=zu.useMemo,T2=zu.useDebugValue;_w.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=w2(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=S2(function(){function l(h){if(!c){if(c=!0,f=h,h=r(h),i!==void 0&&o.hasValue){var m=o.value;if(i(m,h))return u=m}return u=h}if(m=u,v2(f,h))return m;var x=r(h);return i!==void 0&&i(m,x)?m:(f=h,u=x)}var c=!1,f,u,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=x2(e,s[0],s[1]);return b2(function(){o.hasValue=!0,o.value=a},[a]),T2(a),a};kw.exports=_w;var E2=kw.exports;const C2=zs(E2),Rw={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:k2}=R,{useSyncExternalStoreWithSelector:_2}=C2;let p0=!1;const P2=e=>e;function A2(e,t=P2,n){(Rw?"production":void 0)!=="production"&&n&&!p0&&(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"),p0=!0);const r=_2(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return k2(r),r}const m0=e=>{(Rw?"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"?s2(e):e,n=(r,i)=>A2(t,r,i);return Object.assign(n,t),n},R2=e=>e?m0(e):m0,Fn=R2(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())}})),O2={primary:{solid:"text-white btn bg-blue-500 border-blue-500 hover:text-white hover:bg-blue-600 hover:border-blue-600 focus:text-white focus:bg-blue-600 focus:border-blue-600 focus:ring-3 focus:ring-blue-100 active:text-white active:bg-blue-600 active:border-blue-600 active:ring-3 active:ring-blue-100",soft:"text-blue-500 btn bg-blue-100 hover:text-white hover:bg-blue-600 focus:text-white focus:bg-blue-600 focus:ring-3 focus:ring-blue-100 active:text-white active:bg-blue-600 active:ring-3 active:ring-blue-100",dashed:"bg-white border-dashed text-blue-500 btn border-blue-500 hover:text-blue-500 hover:bg-blue-50 hover:border-blue-600 focus:text-blue-600 focus:bg-blue-50 focus:border-blue-600 active:text-blue-600 active:bg-blue-50 active:border-blue-600",outline:"bg-white text-blue-500 btn border-blue-500 hover:text-white hover:bg-blue-600 hover:border-blue-600 focus:text-white focus:bg-blue-600 focus:border-blue-600 focus:ring-3 focus:ring-blue-100 active:text-white active:bg-blue-600 active:border-blue-600 active:ring-3 active:ring-blue-100",ghost:"bg-white text-blue-500 btn hover:text-blue-500 hover:bg-blue-100 focus:text-blue-500 focus:bg-blue-100 active:text-blue-500 active:bg-blue-100"},red:{solid:"text-white btn bg-red-500 border-red-500 hover:text-white hover:bg-red-600 hover:border-red-600 focus:text-white focus:bg-red-600 focus:border-red-600 focus:ring-3 focus:ring-red-100 active:text-white active:bg-red-600 active:border-red-600 active:ring-3 active:ring-red-100",soft:"text-red-500 btn bg-red-100 hover:text-white hover:bg-red-600 focus:text-white focus:bg-red-600 focus:ring-3 focus:ring-red-100 active:text-white active:bg-red-600 active:ring-3 active:ring-red-100",dashed:"bg-white border-dashed text-red-500 btn border-red-500 hover:text-red-500 hover:bg-red-50 hover:border-red-600 focus:text-red-600 focus:bg-red-50 focus:border-red-600 active:text-red-600 active:bg-red-50 active:border-red-600",outline:"bg-white text-red-500 btn border-red-500 hover:text-white hover:bg-red-600 hover:border-red-600 focus:text-white focus:bg-red-600 focus:border-red-600 focus:ring-3 focus:ring-red-100 active:text-white active:bg-red-600 active:border-red-600 active:ring-3 active:ring-red-100",ghost:"bg-white text-red-500 btn hover:text-red-500 hover:bg-red-100 focus:text-red-500 focus:bg-red-100 active:text-red-500 active:bg-red-100"},gray:{solid:"text-gray-500 btn bg-gray-100 hover:text-gray-500 hover:bg-gray-200 focus:text-gray-500 focus:ring-3 focus:ring-gray-100 active:text-gray-500 active:bg-gray-200 active:ring-gray-100",soft:"text-gray-500 btn bg-gray-100 hover:text-gray-500 hover:bg-gray-200 focus:text-gray-500 focus:ring-3 focus:ring-gray-100 active:text-gray-500 active:bg-gray-200 active:ring-gray-100",dashed:"bg-white border-dashed text-gray-500 btn border-gray-500 hover:text-gray-500 hover:bg-gray-50 hover:border-gray-600 focus:text-gray-600 focus:border-gray-600 active:text-gray-600 active:bg-gray-50 active:border-gray-600",outline:"bg-white text-gray-500 btn border-gray-500 hover:text-gray-500 hover:bg-gray-200 hover:border-gray-600 focus:text-gray-500 focus:bg-gray-200 focus:border-gray-600 focus:ring-3 focus:ring-gray-100 active:text-gray-500 active:bg-gray-200 active:border-gray-600 active:ring-3 active:ring-gray-100",ghost:"bg-zink-700/80 shadow-xs border border-solid border-zink-500 text-white btn hover:text-white hover:bg-zink-700 active:text-gray-500 active:bg-gray-100"}},
|
|
83
|
+
*/var zu=v,g2=m2;function y2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var v2=typeof Object.is=="function"?Object.is:y2,x2=g2.useSyncExternalStore,w2=zu.useRef,b2=zu.useEffect,S2=zu.useMemo,T2=zu.useDebugValue;_w.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=w2(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=S2(function(){function l(h){if(!c){if(c=!0,f=h,h=r(h),i!==void 0&&o.hasValue){var m=o.value;if(i(m,h))return u=m}return u=h}if(m=u,v2(f,h))return m;var x=r(h);return i!==void 0&&i(m,x)?m:(f=h,u=x)}var c=!1,f,u,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=x2(e,s[0],s[1]);return b2(function(){o.hasValue=!0,o.value=a},[a]),T2(a),a};kw.exports=_w;var E2=kw.exports;const C2=zs(E2),Rw={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:k2}=R,{useSyncExternalStoreWithSelector:_2}=C2;let p0=!1;const P2=e=>e;function A2(e,t=P2,n){(Rw?"production":void 0)!=="production"&&n&&!p0&&(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"),p0=!0);const r=_2(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return k2(r),r}const m0=e=>{(Rw?"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"?s2(e):e,n=(r,i)=>A2(t,r,i);return Object.assign(n,t),n},R2=e=>e?m0(e):m0,Fn=R2(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())}})),O2={primary:{solid:"text-white btn bg-blue-500 border-blue-500 hover:text-white hover:bg-blue-600 hover:border-blue-600 focus:text-white focus:bg-blue-600 focus:border-blue-600 focus:ring-3 focus:ring-blue-100 active:text-white active:bg-blue-600 active:border-blue-600 active:ring-3 active:ring-blue-100",soft:"text-blue-500 btn bg-blue-100 hover:text-white hover:bg-blue-600 focus:text-white focus:bg-blue-600 focus:ring-3 focus:ring-blue-100 active:text-white active:bg-blue-600 active:ring-3 active:ring-blue-100",dashed:"bg-white border-dashed text-blue-500 btn border-blue-500 hover:text-blue-500 hover:bg-blue-50 hover:border-blue-600 focus:text-blue-600 focus:bg-blue-50 focus:border-blue-600 active:text-blue-600 active:bg-blue-50 active:border-blue-600",outline:"bg-white text-blue-500 btn border-blue-500 hover:text-white hover:bg-blue-600 hover:border-blue-600 focus:text-white focus:bg-blue-600 focus:border-blue-600 focus:ring-3 focus:ring-blue-100 active:text-white active:bg-blue-600 active:border-blue-600 active:ring-3 active:ring-blue-100",ghost:"bg-white text-blue-500 btn hover:text-blue-500 hover:bg-blue-100 focus:text-blue-500 focus:bg-blue-100 active:text-blue-500 active:bg-blue-100"},red:{solid:"text-white btn bg-red-500 border-red-500 hover:text-white hover:bg-red-600 hover:border-red-600 focus:text-white focus:bg-red-600 focus:border-red-600 focus:ring-3 focus:ring-red-100 active:text-white active:bg-red-600 active:border-red-600 active:ring-3 active:ring-red-100",soft:"text-red-500 btn bg-red-100 hover:text-white hover:bg-red-600 focus:text-white focus:bg-red-600 focus:ring-3 focus:ring-red-100 active:text-white active:bg-red-600 active:ring-3 active:ring-red-100",dashed:"bg-white border-dashed text-red-500 btn border-red-500 hover:text-red-500 hover:bg-red-50 hover:border-red-600 focus:text-red-600 focus:bg-red-50 focus:border-red-600 active:text-red-600 active:bg-red-50 active:border-red-600",outline:"bg-white text-red-500 btn border-red-500 hover:text-white hover:bg-red-600 hover:border-red-600 focus:text-white focus:bg-red-600 focus:border-red-600 focus:ring-3 focus:ring-red-100 active:text-white active:bg-red-600 active:border-red-600 active:ring-3 active:ring-red-100",ghost:"bg-white text-red-500 btn hover:text-red-500 hover:bg-red-100 focus:text-red-500 focus:bg-red-100 active:text-red-500 active:bg-red-100"},gray:{solid:"text-gray-500 btn bg-gray-100 hover:text-gray-500 hover:bg-gray-200 focus:text-gray-500 focus:ring-3 focus:ring-gray-100 active:text-gray-500 active:bg-gray-200 active:ring-gray-100",soft:"text-gray-500 btn bg-gray-100 hover:text-gray-500 hover:bg-gray-200 focus:text-gray-500 focus:ring-3 focus:ring-gray-100 active:text-gray-500 active:bg-gray-200 active:ring-gray-100",dashed:"bg-white border-dashed text-gray-500 btn border-gray-500 hover:text-gray-500 hover:bg-gray-50 hover:border-gray-600 focus:text-gray-600 focus:border-gray-600 active:text-gray-600 active:bg-gray-50 active:border-gray-600",outline:"bg-white text-gray-500 btn border-gray-500 hover:text-gray-500 hover:bg-gray-200 hover:border-gray-600 focus:text-gray-500 focus:bg-gray-200 focus:border-gray-600 focus:ring-3 focus:ring-gray-100 active:text-gray-500 active:bg-gray-200 active:border-gray-600 active:ring-3 active:ring-gray-100",ghost:"bg-zink-700/80 shadow-xs border border-solid border-zink-500 text-white btn hover:text-white hover:bg-zink-700 active:text-gray-500 active:bg-gray-100"}},M2={xs:{default:"py-1 text-xs px-1.5",rounded:"p-1.5 text-xs"},sm:{default:"px-2 py-1.5 text-xs",rounded:"p-2 text-xs"},md:{default:"px-2.5 py-2 text-sm",rounded:"p-2.5 text-xs"},lg:{default:"px-3 py-2.5",rounded:"p-3"},xl:{default:"px-4 py-2.5 text-15",rounded:"p-4 text-15"},"2xl":{default:"px-5 py-3 text-15",rounded:"p-5 text-15"}};var Ow={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})()})(Ow);var
|
|
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})()})(Ow);var j2=Ow.exports;const ze=zs(j2),kp=v.createContext({});function _p(e){const t=v.useRef(null);return t.current===null&&(t.current=e()),t.current}const Pp=typeof window<"u",Mw=Pp?v.useLayoutEffect:v.useEffect,Uu=v.createContext(null),Ap=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class D2 extends v.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 F2({children:e,isPresent:t,anchorX:n}){const r=v.useId(),i=v.useRef(null),s=v.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:o}=v.useContext(Ap);return v.useInsertionEffect(()=>{const{width:a,height:l,top:c,left:f,right:u}=s.current;if(t||!i.current||!a||!l)return;const d=n==="left"?`left: ${f}`:`right: ${u}`;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: ${c}px !important;
|
|
94
94
|
}
|
|
95
|
-
`),()=>{document.head.removeChild(h)}},[t]),T.jsx(D2,{isPresent:t,childRef:i,sizeRef:s,children:v.cloneElement(e,{ref:i})})}const N2=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a})=>{const l=kp(L2),c=v.useId();let f=!0,u=v.useMemo(()=>(f=!1,{id:c,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&&(u={...u}),v.useMemo(()=>{l.forEach((d,h)=>l.set(h,!1))},[n]),v.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o==="popLayout"&&(e=T.jsx(F2,{isPresent:n,anchorX:a,children:e})),T.jsx(Uu.Provider,{value:u,children:e})};function L2(){return new Map}function Mw(e=!0){const t=v.useContext(Uu);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=v.useId();v.useEffect(()=>{if(e)return i(s)},[e]);const o=v.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const il=e=>e.key||"";function g0(e){const t=[];return v.Children.forEach(e,n=>{v.isValidElement(n)&&t.push(n)}),t}const ta=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left"})=>{const[l,c]=Mw(o),f=v.useMemo(()=>g0(e),[e]),u=o&&!l?[]:f.map(il),d=v.useRef(!0),h=v.useRef(f),m=kp(()=>new Map),[x,w]=v.useState(f),[p,g]=v.useState(f);jw(()=>{d.current=!1,h.current=f;for(let b=0;b<p.length;b++){const E=il(p[b]);u.includes(E)?m.delete(E):m.get(E)!==!0&&m.set(E,!1)}},[p,u.length,u.join("-")]);const y=[];if(f!==x){let b=[...f];for(let E=0;E<p.length;E++){const k=p[E],P=il(k);u.includes(P)||(b.splice(E,0,k),y.push(k))}return s==="wait"&&y.length&&(b=y),g(g0(b)),w(f),null}const{forceRender:C}=v.useContext(Cp);return T.jsx(T.Fragment,{children:p.map(b=>{const E=il(b),k=o&&!l?!1:f===p||u.includes(E),P=()=>{if(m.has(E))m.set(E,!0);else return;let j=!0;m.forEach(M=>{M||(j=!1)}),j&&(C==null||C(),g(h.current),o&&(c==null||c()),r&&r())};return T.jsx(N2,{isPresent:k,initial:!d.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,onExitComplete:k?void 0:P,anchorX:a,children:b},E)})})};function Ap(e,t){e.indexOf(t)===-1&&e.push(t)}function Rp(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let Ld=()=>{};const Id={skipAnimations:!1,useManualTiming:!1};function Op(e){let t;return()=>(t===void 0&&(t=e()),t)}const Yt=e=>e,na=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class jp{constructor(){this.subscriptions=[]}add(t){return Ap(this.subscriptions,t),()=>Rp(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 _n=e=>e*1e3,Pn=e=>e/1e3;function Dw(e,t){return t?e*(1e3/t):0}const I2=Op(()=>window.ScrollTimeline!==void 0);class $2{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(I2()&&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 V2 extends $2{then(t,n){return this.finished.finally(t).then(()=>{})}}const y0={value:null,addProjectionMetrics:null},Mp=e=>Array.isArray(e)&&typeof e[0]=="number",B2={};function z2(e,t){const n=Op(e);return()=>B2[t]??n()}const ra=z2(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Fw=(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)})`},yo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,$d={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:yo([0,.65,.55,1]),circOut:yo([.55,0,1,.45]),backIn:yo([.31,.01,.66,-.59]),backOut:yo([.33,1.53,.69,.99])};function Nw(e,t){if(e)return typeof e=="function"&&ra()?Fw(e,t):Mp(e)?yo(e):Array.isArray(e)?e.map(n=>Nw(n,t)||$d.easeOut):$d[e]}function U2(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeInOut",times:l}={},c=void 0){const f={[t]:n};l&&(f.offset=l);const u=Nw(a,i);return Array.isArray(u)&&(f.easing=u),e.animate(f,{delay:r,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal",pseudoElement:c})}function Dp(e){return typeof e=="function"&&"applyToOptions"in e}function Fp(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const hu=2e4;function Np(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<hu;)t+=n,r=e.next(t);return t>=hu?1/0:t}function H2(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Np(r),hu);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:Pn(i)}}function Lw(e){return!!(typeof e=="function"&&ra()||!e||typeof e=="string"&&(e in $d||ra())||Mp(e)||Array.isArray(e)&&e.every(Lw))}function v0(e,t){e.timeline=t,e.onfinish=null}const sl=["read","resolveKeyframes","update","preRender","render","postRender"];function W2(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 c(u){o.has(u)&&(f.schedule(u),e()),l++,u(a)}const f={schedule:(u,d=!1,h=!1)=>{const x=h&&i?n:r;return d&&o.add(u),x.has(u)||x.add(u),u},cancel:u=>{r.delete(u),o.delete(u)},process:u=>{if(a=u,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(c),t&&y0.value&&y0.value.frameloop[t].push(l),l=0,n.clear(),i=!1,s&&(s=!1,f.process(u))}};return f}const K2=40;function Iw(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=sl.reduce((p,g)=>(p[g]=W2(s,t?g:void 0),p),{}),{read:a,resolveKeyframes:l,update:c,preRender:f,render:u,postRender:d}=o,h=()=>{const p=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(p-i.timestamp,K2),1),i.timestamp=p,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),f.process(i),u.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:sl.reduce((p,g)=>{const y=o[g];return p[g]=(C,b=!1,E=!1)=>(n||m(),y.schedule(C,b,E)),p},{}),cancel:p=>{for(let g=0;g<sl.length;g++)o[sl[g]].cancel(p)},state:i,steps:o}}const{schedule:Lp,cancel:kI}=Iw(queueMicrotask,!1),{schedule:he,cancel:Br,state:qe,steps:Jc}=Iw(typeof requestAnimationFrame<"u"?requestAnimationFrame:Yt,!0);let Pl;function q2(){Pl=void 0}const An={now:()=>(Pl===void 0&&An.set(qe.isProcessing||Id.useManualTiming?qe.timestamp:performance.now()),Pl),set:e=>{Pl=e,queueMicrotask(q2)}},rn={x:!1,y:!1};function $w(){return rn.x||rn.y}function Q2(e){return e==="x"||e==="y"?rn[e]?null:(rn[e]=!0,()=>{rn[e]=!1}):rn.x||rn.y?null:(rn.x=rn.y=!0,()=>{rn.x=rn.y=!1})}function G2(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 Vw(e,t){const n=G2(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function x0(e){return!(e.pointerType==="touch"||$w())}function Y2(e,t,n={}){const[r,i,s]=Vw(e,n),o=a=>{if(!x0(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const f=u=>{x0(u)&&(c(u),l.removeEventListener("pointerleave",f))};l.addEventListener("pointerleave",f,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const Bw=(e,t)=>t?e===t?!0:Bw(e,t.parentElement):!1,Ip=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,X2=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Z2(e){return X2.has(e.tagName)||e.tabIndex!==-1}const vo=new WeakSet;function w0(e){return t=>{t.key==="Enter"&&e(t)}}function ef(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const J2=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=w0(()=>{if(vo.has(n))return;ef(n,"down");const i=w0(()=>{ef(n,"up")}),s=()=>ef(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 b0(e){return Ip(e)&&!$w()}function eP(e,t,n={}){const[r,i,s]=Vw(e,n),o=a=>{const l=a.currentTarget;if(!b0(a)||vo.has(l))return;vo.add(l);const c=t(l,a),f=(h,m)=>{window.removeEventListener("pointerup",u),window.removeEventListener("pointercancel",d),!(!b0(h)||!vo.has(l))&&(vo.delete(l),typeof c=="function"&&c(h,{success:m}))},u=h=>{f(h,l===window||l===document||n.useGlobalTarget||Bw(l,h.target))},d=h=>{f(h,!1)};window.addEventListener("pointerup",u,i),window.addEventListener("pointercancel",d,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),a instanceof HTMLElement&&(a.addEventListener("focus",c=>J2(c,i)),!Z2(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}const S0=30,tP=e=>!isNaN(parseFloat(e));class nP{constructor(t,n={}){this.version="12.7.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=An.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=An.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=tP(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 jp);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=An.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>S0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,S0);return Dw(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 ia(e,t){return new nP(e,t)}const zw=v.createContext({strict:!1}),T0={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"]},Is={};for(const e in T0)Is[e]={isEnabled:t=>T0[e].some(n=>!!t[n])};function rP(e){for(const t in e)Is[t]={...Is[t],...e[t]}}const iP=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 pu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||iP.has(e)}let Uw=e=>!pu(e);function sP(e){e&&(Uw=t=>t.startsWith("on")?!pu(t):e(t))}try{sP(require("@emotion/is-prop-valid").default)}catch{}function oP(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Uw(i)||n===!0&&pu(i)||!t&&!pu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function aP(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 Hu=v.createContext({});function Wu(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function sa(e){return typeof e=="string"||Array.isArray(e)}const $p=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Vp=["initial",...$p];function Ku(e){return Wu(e.animate)||Vp.some(t=>sa(e[t]))}function Hw(e){return!!(Ku(e)||e.variants)}function lP(e,t){if(Ku(e)){const{initial:n,animate:r}=e;return{initial:n===!1||sa(n)?n:void 0,animate:sa(r)?r:void 0}}return e.inherit!==!1?t:{}}function uP(e){const{initial:t,animate:n}=lP(e,v.useContext(Hu));return v.useMemo(()=>({initial:t,animate:n}),[E0(t),E0(n)])}function E0(e){return Array.isArray(e)?e.join(" "):e}const cP=Symbol.for("motionComponentSymbol");function is(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function fP(e,t,n){return v.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):is(n)&&(n.current=r))},[t])}const Bp=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),dP="framerAppearId",Ww="data-"+Bp(dP),Kw=v.createContext({});function hP(e,t,n,r,i){var x,w;const{visualElement:s}=v.useContext(Hu),o=v.useContext(zw),a=v.useContext(Uu),l=v.useContext(Pp).reducedMotion,c=v.useRef(null);r=r||o.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const f=c.current,u=v.useContext(Kw);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&pP(c.current,n,i,u);const d=v.useRef(!1);v.useInsertionEffect(()=>{f&&d.current&&f.update(n,a)});const h=n[Ww],m=v.useRef(!!h&&!((x=window.MotionHandoffIsComplete)!=null&&x.call(window,h))&&((w=window.MotionHasOptimisedAnimation)==null?void 0:w.call(window,h)));return jw(()=>{f&&(d.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Lp.render(f.render),m.current&&f.animationState&&f.animationState.animateChanges())}),v.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 pP(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:qw(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&is(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:f,layoutScroll:l,layoutRoot:c})}function qw(e){if(e)return e.options.allowProjection!==!1?e.projection:qw(e.parent)}function mP({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&rP(e);function s(a,l){let c;const f={...v.useContext(Pp),...a,layoutId:gP(a)},{isStatic:u}=f,d=uP(a),h=r(a,u);if(!u&&_p){yP();const m=vP(f);c=m.MeasureLayout,d.visualElement=hP(i,h,f,t,m.ProjectionNode)}return T.jsxs(Hu.Provider,{value:d,children:[c&&d.visualElement?T.jsx(c,{visualElement:d.visualElement,...f}):null,n(i,a,fP(h,d.visualElement,l),h,u,d.visualElement)]})}s.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const o=v.forwardRef(s);return o[cP]=i,o}function gP({layoutId:e}){const t=v.useContext(Cp).id;return t&&e!==void 0?t+"-"+e:e}function yP(e,t){v.useContext(zw).strict}function vP(e){const{drag:t,layout:n}=Is;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 Qw=e=>t=>typeof t=="string"&&t.startsWith(e),zp=Qw("--"),xP=Qw("var(--"),Up=e=>xP(e)?wP.test(e.split("/*")[0].trim()):!1,wP=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,oa={};function bP(e){for(const t in e)oa[t]=e[t],zp(t)&&(oa[t].isCSSVariable=!0)}const qs=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ni=new Set(qs);function Gw(e,{layout:t,layoutId:n}){return Ni.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!oa[e]||e==="opacity")}const nt=e=>!!(e&&e.getVelocity),Yw=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Zn=(e,t,n)=>n>t?t:n<e?e:n,Qs={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},aa={...Qs,transform:e=>Zn(0,1,e)},ol={...Qs,default:1},Ca=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),lr=Ca("deg"),Rn=Ca("%"),K=Ca("px"),SP=Ca("vh"),TP=Ca("vw"),C0={...Rn,parse:e=>Rn.parse(e)/100,transform:e=>Rn.transform(e*100)},EP={borderWidth:K,borderTopWidth:K,borderRightWidth:K,borderBottomWidth:K,borderLeftWidth:K,borderRadius:K,radius:K,borderTopLeftRadius:K,borderTopRightRadius:K,borderBottomRightRadius:K,borderBottomLeftRadius:K,width:K,maxWidth:K,height:K,maxHeight:K,top:K,right:K,bottom:K,left:K,padding:K,paddingTop:K,paddingRight:K,paddingBottom:K,paddingLeft:K,margin:K,marginTop:K,marginRight:K,marginBottom:K,marginLeft:K,backgroundPositionX:K,backgroundPositionY:K},CP={rotate:lr,rotateX:lr,rotateY:lr,rotateZ:lr,scale:ol,scaleX:ol,scaleY:ol,scaleZ:ol,skew:lr,skewX:lr,skewY:lr,distance:K,translateX:K,translateY:K,translateZ:K,x:K,y:K,z:K,perspective:K,transformPerspective:K,opacity:aa,originX:C0,originY:C0,originZ:K},k0={...Qs,transform:Math.round},Hp={...EP,...CP,zIndex:k0,size:K,fillOpacity:aa,strokeOpacity:aa,numOctaves:k0},kP={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},_P=qs.length;function PP(e,t,n){let r="",i=!0;for(let s=0;s<_P;s++){const o=qs[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 c=Yw(a,Hp[o]);if(!l){i=!1;const f=kP[o]||o;r+=`${f}(${c}) `}n&&(t[o]=c)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function Wp(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let o=!1,a=!1;for(const l in t){const c=t[l];if(Ni.has(l)){o=!0;continue}else if(zp(l)){i[l]=c;continue}else{const f=Yw(c,Hp[l]);l.startsWith("origin")?(a=!0,s[l]=f):r[l]=f}}if(t.transform||(o||n?r.transform=PP(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:f=0}=s;r.transformOrigin=`${l} ${c} ${f}`}}const Kp=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Xw(e,t,n){for(const r in t)!nt(t[r])&&!Gw(r,n)&&(e[r]=t[r])}function AP({transformTemplate:e},t){return v.useMemo(()=>{const n=Kp();return Wp(n,t,e),Object.assign({},n.vars,n.style)},[t])}function RP(e,t){const n=e.style||{},r={};return Xw(r,n,e),Object.assign(r,AP(e,t)),r}function OP(e,t){const n={},r=RP(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 jP=["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:!!(jP.indexOf(e)>-1||/[A-Z]/u.test(e))}const MP={offset:"stroke-dashoffset",array:"stroke-dasharray"},DP={offset:"strokeDashoffset",array:"strokeDasharray"};function FP(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?MP:DP;e[s.offset]=K.transform(-r);const o=K.transform(t),a=K.transform(n);e[s.array]=`${o} ${a}`}function _0(e,t,n){return typeof e=="string"?e:K.transform(t+n*e)}function NP(e,t,n){const r=_0(t,e.x,e.width),i=_0(n,e.y,e.height);return`${r} ${i}`}function Qp(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},f,u){if(Wp(e,c,u),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=NP(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&&FP(d,o,a,l,!1)}const Zw=()=>({...Kp(),attrs:{}}),Gp=e=>typeof e=="string"&&e.toLowerCase()==="svg";function LP(e,t,n,r){const i=v.useMemo(()=>{const s=Zw();return Qp(s,t,Gp(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Xw(s,e.style,e),i.style={...s,...i.style}}return i}function IP(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(qp(n)?LP:OP)(r,s,o,n),c=oP(r,typeof n=="string",e),f=n!==v.Fragment?{...c,...l,ref:i}:{},{children:u}=r,d=v.useMemo(()=>nt(u)?u.get():u,[u]);return v.createElement(n,{...f,children:d})}}function P0(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Yp(e,t,n,r){if(typeof t=="function"){const[i,s]=P0(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]=P0(r);t=t(n!==void 0?n:e.custom,i,s)}return t}const Vd=e=>Array.isArray(e),$P=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),VP=e=>Vd(e)?e[e.length-1]||0:e;function Al(e){const t=nt(e)?e.get():e;return $P(t)?t.toValue():t}function BP({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,s){const o={latestValues:zP(r,i,s,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const Jw=e=>(t,n)=>{const r=v.useContext(Hu),i=v.useContext(Uu),s=()=>BP(e,t,r,i);return n?s():kp(s)};function zP(e,t,n,r){const i={},s=r(e,{});for(const d in s)i[d]=Al(s[d]);let{initial:o,animate:a}=e;const l=Ku(e),c=Hw(e);t&&c&&!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 u=f?a:o;if(u&&typeof u!="boolean"&&!Wu(u)){const d=Array.isArray(u)?u:[u];for(let h=0;h<d.length;h++){const m=Yp(e,d[h]);if(m){const{transitionEnd:x,transition:w,...p}=m;for(const g in p){let y=p[g];if(Array.isArray(y)){const C=f?y.length-1:0;y=y[C]}y!==null&&(i[g]=y)}for(const g in x)i[g]=x[g]}}}return i}function Xp(e,t,n){var s;const{style:r}=e,i={};for(const o in r)(nt(r[o])||t.style&&nt(t.style[o])||Gw(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const UP={useVisualState:Jw({scrapeMotionValuesFromProps:Xp,createRenderState:Kp})};function eb(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 tb(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 nb=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 rb(e,t,n,r){tb(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(nb.has(i)?i:Bp(i),t.attrs[i])}function ib(e,t,n){const r=Xp(e,t,n);for(const i in e)if(nt(e[i])||nt(t[i])){const s=qs.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const A0=["x","y","width","height","cx","cy","r"],HP={useVisualState:Jw({scrapeMotionValuesFromProps:ib,createRenderState:Zw,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(Ni.has(a)){s=!0;break}}if(!s)return;let o=!t;if(t)for(let a=0;a<A0.length;a++){const l=A0[a];e[l]!==t[l]&&(o=!0)}o&&he.read(()=>{eb(n,r),he.render(()=>{Qp(r,i,Gp(n.tagName),e.transformTemplate),rb(n,r)})})}})};function WP(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...qp(r)?HP:UP,preloadedFeatures:e,useRender:IP(i),createVisualElement:t,Component:r};return mP(o)}}function la(e,t,n){const r=e.getProps();return Yp(r,t,n!==void 0?n:r.custom,e)}const sb=new Set(["width","height","top","left","right","bottom",...qs]);function KP(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ia(n))}function qP(e,t){const n=la(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=VP(s[o]);KP(e,o,a)}}function QP(e){return!!(nt(e)&&e.add)}function Bd(e,t){const n=e.getValue("willChange");if(QP(n))return n.add(t);if(!n&&Id.WillChange){const r=new Id.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function ob(e){return e.props[Ww]}const ab=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,GP=1e-7,YP=12;function XP(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=ab(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>GP&&++a<YP);return o}function ka(e,t,n,r){if(e===t&&n===r)return Yt;const i=s=>XP(s,0,1,e,n);return s=>s===0||s===1?s:ab(i(s),t,r)}const lb=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ub=e=>t=>1-e(1-t),cb=ka(.33,1.53,.69,.99),Zp=ub(cb),fb=lb(Zp),db=e=>(e*=2)<1?.5*Zp(e):.5*(2-Math.pow(2,-10*(e-1))),Jp=e=>1-Math.sin(Math.acos(e)),hb=ub(Jp),pb=lb(Jp),mb=e=>/^0[^.\s]+$/u.test(e);function ZP(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||mb(e):!0}const Ao=e=>Math.round(e*1e5)/1e5,em=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function JP(e){return e==null}const eA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,tm=(e,t)=>n=>!!(typeof n=="string"&&eA.test(n)&&n.startsWith(e)||t&&!JP(n)&&Object.prototype.hasOwnProperty.call(n,t)),gb=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(em);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},tA=e=>Zn(0,255,e),tf={...Qs,transform:e=>Math.round(tA(e))},ai={test:tm("rgb","red"),parse:gb("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+tf.transform(e)+", "+tf.transform(t)+", "+tf.transform(n)+", "+Ao(aa.transform(r))+")"};function nA(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 zd={test:tm("#"),parse:nA,transform:ai.transform},ss={test:tm("hsl","hue"),parse:gb("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Rn.transform(Ao(t))+", "+Rn.transform(Ao(n))+", "+Ao(aa.transform(r))+")"},et={test:e=>ai.test(e)||zd.test(e)||ss.test(e),parse:e=>ai.test(e)?ai.parse(e):ss.test(e)?ss.parse(e):zd.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ai.transform(e):ss.transform(e)},rA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function iA(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(em))==null?void 0:t.length)||0)+(((n=e.match(rA))==null?void 0:n.length)||0)>0}const yb="number",vb="color",sA="var",oA="var(",R0="${}",aA=/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 ua(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(aA,l=>(et.test(l)?(r.color.push(s),i.push(vb),n.push(et.parse(l))):l.startsWith(oA)?(r.var.push(s),i.push(sA),n.push(l)):(r.number.push(s),i.push(yb),n.push(parseFloat(l))),++s,R0)).split(R0);return{values:n,split:a,indexes:r,types:i}}function xb(e){return ua(e).values}function wb(e){const{split:t,types:n}=ua(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===yb?s+=Ao(i[o]):a===vb?s+=et.transform(i[o]):s+=i[o]}return s}}const lA=e=>typeof e=="number"?0:e;function uA(e){const t=xb(e);return wb(e)(t.map(lA))}const zr={test:iA,parse:xb,createTransformer:wb,getAnimatableNone:uA},cA=new Set(["brightness","contrast","saturate","opacity"]);function fA(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(em)||[];if(!r)return e;const i=n.replace(r,"");let s=cA.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const dA=/\b([a-z-]*)\(.*?\)/gu,Ud={...zr,getAnimatableNone:e=>{const t=e.match(dA);return t?t.map(fA).join(" "):e}},hA={...Hp,color:et,backgroundColor:et,outlineColor:et,fill:et,stroke:et,borderColor:et,borderTopColor:et,borderRightColor:et,borderBottomColor:et,borderLeftColor:et,filter:Ud,WebkitFilter:Ud},bb=e=>hA[e];function Sb(e,t){let n=bb(e);return n!==Ud&&(n=zr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const pA=new Set(["auto","none","0"]);function mA(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!pA.has(s)&&ua(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=Sb(n,i)}const li=e=>e*180/Math.PI,Hd=e=>{const t=li(Math.atan2(e[1],e[0]));return Wd(t)},gA={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Hd,rotateZ:Hd,skewX:e=>li(Math.atan(e[1])),skewY:e=>li(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Wd=e=>(e=e%360,e<0&&(e+=360),e),O0=Hd,j0=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),M0=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),yA={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:j0,scaleY:M0,scale:e=>(j0(e)+M0(e))/2,rotateX:e=>Wd(li(Math.atan2(e[6],e[5]))),rotateY:e=>Wd(li(Math.atan2(-e[2],e[0]))),rotateZ:O0,rotate:O0,skewX:e=>li(Math.atan(e[4])),skewY:e=>li(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function D0(e){return e.includes("scale")?1:0}function Kd(e,t){if(!e||e==="none")return D0(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=yA,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=gA,i=a}if(!i)return D0(t);const s=r[t],o=i[1].split(",").map(xA);return typeof s=="function"?s(o):o[s]}const vA=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Kd(n,t)};function xA(e){return parseFloat(e.trim())}const F0=e=>e===Qs||e===K,wA=new Set(["x","y","z"]),bA=qs.filter(e=>!wA.has(e));function SA(e){const t=[];return bA.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const $s={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})=>Kd(t,"x"),y:(e,{transform:t})=>Kd(t,"y")};$s.translateX=$s.x;$s.translateY=$s.y;const wi=new Set;let qd=!1,Qd=!1;function Tb(){if(Qd){const e=Array.from(wi).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=SA(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)})}Qd=!1,qd=!1,wi.forEach(e=>e.complete()),wi.clear()}function Eb(){wi.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Qd=!0)})}function TA(){Eb(),Tb()}class nm{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?(wi.add(this),qd||(qd=!0,he.read(Eb),he.resolveKeyframes(Tb))):(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),wi.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,wi.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Cb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),EA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function CA(e){const t=EA.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function kb(e,t,n=1){const[r,i]=CA(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return Cb(o)?parseFloat(o):o}return Up(i)?kb(i,t,n+1):i}const _b=e=>t=>t.test(e),kA={test:e=>e==="auto",parse:e=>e},Pb=[Qs,K,Rn,lr,TP,SP,kA],N0=e=>Pb.find(_b(e));class Ab extends nm{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 c=t[l];if(typeof c=="string"&&(c=c.trim(),Up(c))){const f=kb(c,n.current);f!==void 0&&(t[l]=f),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!sb.has(r)||t.length!==2)return;const[i,s]=t,o=N0(i),a=N0(s);if(o!==a)if(F0(o)&&F0(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)ZP(t[i])&&r.push(i);r.length&&mA(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=$s[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]=$s[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,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const L0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(zr.test(e)||e==="0")&&!e.startsWith("url("));function _A(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 PA(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=L0(i,t),a=L0(s,t);return!o||!a?!1:_A(e)||(n==="spring"||Dp(n))&&r}const AA=e=>e!==null;function qu(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(AA),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const RA=40;class Rb{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=An.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>RA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&TA(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=An.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!PA(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 nf(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 OA({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=nf(l,a,e+1/3),s=nf(l,a,e),o=nf(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function mu(e,t){return n=>n>0?t:e}const rf=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},jA=[zd,ai,ss],MA=e=>jA.find(t=>t.test(e));function I0(e){const t=MA(e);if(!t)return!1;let n=t.parse(e);return t===ss&&(n=OA(n)),n}const $0=(e,t)=>{const n=I0(e),r=I0(t);if(!n||!r)return mu(e,t);const i={...n};return s=>(i.red=rf(n.red,r.red,s),i.green=rf(n.green,r.green,s),i.blue=rf(n.blue,r.blue,s),i.alpha=be(n.alpha,r.alpha,s),ai.transform(i))},DA=(e,t)=>n=>t(e(n)),_a=(...e)=>e.reduce(DA),Gd=new Set(["none","hidden"]);function FA(e,t){return Gd.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function NA(e,t){return n=>be(e,t,n)}function rm(e){return typeof e=="number"?NA:typeof e=="string"?Up(e)?mu:et.test(e)?$0:$A:Array.isArray(e)?Ob:typeof e=="object"?et.test(e)?$0:LA:mu}function Ob(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>rm(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function LA(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=rm(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function IA(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 $A=(e,t)=>{const n=zr.createTransformer(t),r=ua(e),i=ua(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?Gd.has(e)&&!i.values.length||Gd.has(t)&&!r.values.length?FA(e,t):_a(Ob(IA(r,i),i.values),n):mu(e,t)};function jb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?be(e,t,n):rm(e)(e,t)}const VA=5;function Mb(e,t,n){const r=Math.max(t-VA,0);return Dw(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},sf=.001;function BA({duration:e=Ce.duration,bounce:t=Ce.bounce,velocity:n=Ce.velocity,mass:r=Ce.mass}){let i,s,o=1-t;o=Zn(Ce.minDamping,Ce.maxDamping,o),e=Zn(Ce.minDuration,Ce.maxDuration,Pn(e)),o<1?(i=c=>{const f=c*o,u=f*e,d=f-n,h=Yd(c,o),m=Math.exp(-u);return sf-d/h*m},s=c=>{const u=c*o*e,d=u*n+n,h=Math.pow(o,2)*Math.pow(c,2)*e,m=Math.exp(-u),x=Yd(Math.pow(c,2),o);return(-i(c)+sf>0?-1:1)*((d-h)*m)/x}):(i=c=>{const f=Math.exp(-c*e),u=(c-n)*e+1;return-sf+f*u},s=c=>{const f=Math.exp(-c*e),u=(n-c)*(e*e);return f*u});const a=5/e,l=UA(i,s,a);if(e=_n(e),isNaN(l))return{stiffness:Ce.stiffness,damping:Ce.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const zA=12;function UA(e,t,n){let r=n;for(let i=1;i<zA;i++)r=r-e(r)/t(r);return r}function Yd(e,t){return e*Math.sqrt(1-t*t)}const HA=["duration","bounce"],WA=["stiffness","damping","mass"];function V0(e,t){return t.some(n=>e[n]!==void 0)}function KA(e){let t={velocity:Ce.velocity,stiffness:Ce.stiffness,damping:Ce.damping,mass:Ce.mass,isResolvedFromDuration:!1,...e};if(!V0(e,WA)&&V0(e,HA))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*Zn(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Ce.mass,stiffness:i,damping:s}}else{const n=BA(e);t={...t,...n,mass:Ce.mass},t.isResolvedFromDuration=!0}return t}function gu(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:c,mass:f,duration:u,velocity:d,isResolvedFromDuration:h}=KA({...n,velocity:-Pn(n.velocity||0)}),m=d||0,x=c/(2*Math.sqrt(l*f)),w=o-s,p=Pn(Math.sqrt(l/f)),g=Math.abs(w)<5;r||(r=g?Ce.restSpeed.granular:Ce.restSpeed.default),i||(i=g?Ce.restDelta.granular:Ce.restDelta.default);let y;if(x<1){const b=Yd(p,x);y=E=>{const k=Math.exp(-x*p*E);return o-k*((m+x*p*w)/b*Math.sin(b*E)+w*Math.cos(b*E))}}else if(x===1)y=b=>o-Math.exp(-p*b)*(w+(m+p*w)*b);else{const b=p*Math.sqrt(x*x-1);y=E=>{const k=Math.exp(-x*p*E),P=Math.min(b*E,300);return o-k*((m+x*p*w)*Math.sinh(P)+b*w*Math.cosh(P))/b}}const C={calculatedDuration:h&&u||null,next:b=>{const E=y(b);if(h)a.done=b>=u;else{let k=0;x<1&&(k=b===0?_n(m):Mb(y,b,E));const P=Math.abs(k)<=r,j=Math.abs(o-E)<=i;a.done=P&&j}return a.value=a.done?o:E,a},toString:()=>{const b=Math.min(Np(C),hu),E=Fw(k=>C.next(b*k).value,b,30);return b+"ms "+E},toTransition:()=>{}};return C}gu.applyToOptions=e=>{const t=H2(e,100,gu);return e.ease=ra()?t.ease:"easeOut",e.duration=_n(t.duration),e.type="keyframes",e};function B0({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:f}){const u=e[0],d={done:!1,value:u},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 w=u+x,p=o===void 0?w:o(w);p!==w&&(x=p-u);const g=P=>-x*Math.exp(-P/r),y=P=>p+g(P),C=P=>{const j=g(P),M=y(P);d.done=Math.abs(j)<=c,d.value=d.done?p:M};let b,E;const k=P=>{h(d.value)&&(b=P,E=gu({keyframes:[d.value,m(d.value)],velocity:Mb(y,P,d.value),damping:i,stiffness:s,restDelta:c,restSpeed:f}))};return k(0),{calculatedDuration:null,next:P=>{let j=!1;return!E&&b===void 0&&(j=!0,C(P),k(P)),b!==void 0&&P>=b?E.next(P-b):(!j&&C(P),d)}}}const qA=ka(.42,0,1,1),QA=ka(0,0,.58,1),Db=ka(.42,0,.58,1),GA=e=>Array.isArray(e)&&typeof e[0]!="number",z0={linear:Yt,easeIn:qA,easeInOut:Db,easeOut:QA,circIn:Jp,circInOut:pb,circOut:hb,backIn:Zp,backInOut:fb,backOut:cb,anticipate:db},U0=e=>{if(Mp(e)){Ld(e.length===4);const[t,n,r,i]=e;return ka(t,n,r,i)}else if(typeof e=="string")return Ld(z0[e]!==void 0),z0[e];return e};function YA(e,t,n){const r=[],i=n||jb,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]||Yt:t;a=_a(l,a)}r.push(a)}return r}function XA(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(Ld(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=YA(t,r,i),l=a.length,c=f=>{if(o&&f<e[0])return t[0];let u=0;if(l>1)for(;u<e.length-2&&!(f<e[u+1]);u++);const d=na(e[u],e[u+1],f);return a[u](d)};return n?f=>c(Zn(e[0],e[s-1],f)):c}function ZA(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=na(0,t,r);e.push(be(n,1,i))}}function JA(e){const t=[0];return ZA(t,e.length-1),t}function eR(e,t){return e.map(n=>n*t)}function tR(e,t){return e.map(()=>t||Db).splice(0,e.length-1)}function yu({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=GA(r)?r.map(U0):U0(r),s={done:!1,value:t[0]},o=eR(n&&n.length===t.length?n:JA(t),e),a=XA(o,t,{ease:Array.isArray(i)?i:tR(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const nR=e=>{const t=({timestamp:n})=>e(n);return{start:()=>he.update(t,!0),stop:()=>Br(t),now:()=>qe.isProcessing?qe.timestamp:An.now()}},rR={decay:B0,inertia:B0,tween:yu,keyframes:yu,spring:gu},iR=e=>e/100;class im extends Rb{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)||nm,a=(l,c)=>this.onKeyframesResolved(l,c);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=Dp(n)?n:rR[n]||yu;let l,c;a!==yu&&typeof t[0]!="number"&&(l=_a(iR,jb(t[0],t[1])),t=[0,100]);const f=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),f.calculatedDuration===null&&(f.calculatedDuration=Np(f));const{calculatedDuration:u}=f,d=u+i,h=d*(r+1)-i;return{generator:f,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:u,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:c,totalDuration:f,resolvedDuration:u}=r;if(this.startTime===null)return s.next(0);const{delay:d,repeat:h,repeatType:m,repeatDelay:x,onUpdate:w}=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 y=this.currentTime,C=s;if(h){const P=Math.min(this.currentTime,f)/u;let j=Math.floor(P),M=P%1;!M&&P>=1&&(M=1),M===1&&j--,j=Math.min(j,h+1),!!(j%2)&&(m==="reverse"?(M=1-M,x&&(M-=x/u)):m==="mirror"&&(C=o)),y=Zn(0,1,M)*u}const b=g?{done:!1,value:l[0]}:C.next(y);a&&(b.value=a(b.value));let{done:E}=b;!g&&c!==null&&(E=this.speed>=0?this.currentTime>=f:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return k&&i!==void 0&&(b.value=qu(l,this.options,i)),w&&w(b.value),k&&this.finish(),b}get duration(){const{resolved:t}=this;return t?Pn(t.calculatedDuration):0}get time(){return Pn(this.currentTime)}set time(t){t=_n(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=Pn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=nR,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 sR=new Set(["opacity","clipPath","filter","transform"]),oR=Op(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),vu=10,aR=2e4;function lR(e){return Dp(e.type)||e.type==="spring"||!Lw(e.ease)}function uR(e,t){const n=new im({...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<aR;)r=n.sample(s),i.push(r.value),s+=vu;return{times:void 0,keyframes:i,duration:s-vu,ease:"linear"}}const Fb={anticipate:db,backInOut:fb,circInOut:pb};function cR(e){return e in Fb}class H0 extends Rb{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new Ab(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:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&ra()&&cR(s)&&(s=Fb[s]),lR(this.options)){const{onComplete:u,onUpdate:d,motionValue:h,element:m,...x}=this.options,w=uR(t,x);t=w.keyframes,t.length===1&&(t[1]=t[0]),r=w.duration,i=w.times,s=w.ease,o="keyframes"}const f=U2(a.owner.current,l,t,{...this.options,duration:r,times:i,ease:s});return f.startTime=c??this.calcStartTime(),this.pendingTimeline?(v0(f,this.pendingTimeline),this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:u}=this.options;a.set(qu(t,this.options,n)),u&&u(),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 Pn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Pn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=_n(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 Yt;const{animation:r}=n;v0(r,t)}return Yt}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:c,onUpdate:f,onComplete:u,element:d,...h}=this.options,m=new im({...h,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),x=_n(this.time);c.setWithVelocity(m.sample(x-vu).value,m.sample(x).value,vu)}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:c}=n.owner.getProps();return oR()&&r&&sR.has(r)&&(r!=="transform"||!c)&&!l&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}const fR={type:"spring",stiffness:500,damping:25,restSpeed:10},dR=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),hR={type:"keyframes",duration:.8},pR={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},mR=(e,{keyframes:t})=>t.length>2?hR:Ni.has(e)?e.startsWith("scale")?dR(t[1]):fR:pR;function gR({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:c,...f}){return!!Object.keys(f).length}const sm=(e,t,n,r={},i,s)=>o=>{const a=Fp(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-_n(l);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,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};gR(a)||(f={...f,...mR(e,f)}),f.duration&&(f.duration=_n(f.duration)),f.repeatDelay&&(f.repeatDelay=_n(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let u=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(u=!0)),f.allowFlatten=!a.type&&!a.ease,u&&!s&&t.get()!==void 0){const d=qu(f.keyframes,a);if(d!==void 0)return he.update(()=>{f.onUpdate(d),f.onComplete()}),new V2([])}return!s&&H0.supports(f)?new H0(f):new im(f)};function yR({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Nb(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:o,...a}=t;r&&(s=r);const l=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const f in a){const u=e.getValue(f,e.latestValues[f]??null),d=a[f];if(d===void 0||c&&yR(c,f))continue;const h={delay:n,...Fp(s||{},f)};let m=!1;if(window.MotionHandoffAnimation){const w=ob(e);if(w){const p=window.MotionHandoffAnimation(w,f,he);p!==null&&(h.startTime=p,m=!0)}}Bd(e,f),u.start(sm(f,u,d,e.shouldReduceMotion&&sb.has(f)?{type:!1}:h,e,m));const x=u.animation;x&&l.push(x)}return o&&Promise.all(l).then(()=>{he.update(()=>{o&&qP(e,o)})}),l}function Xd(e,t,n={}){var l;const r=la(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(Nb(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:f=0,staggerChildren:u,staggerDirection:d}=i;return vR(e,t,f+c,u,d,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,f]=a==="beforeChildren"?[s,o]:[o,s];return c().then(()=>f())}else return Promise.all([s(),o(n.delay)])}function vR(e,t,n=0,r=0,i=1,s){const o=[],a=(e.variantChildren.size-1)*r,l=i===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(xR).forEach((c,f)=>{c.notify("AnimationStart",t),o.push(Xd(c,t,{...s,delay:n+l(f)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(o)}function xR(e,t){return e.sortNodePosition(t)}function wR(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Xd(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Xd(e,t,n);else{const i=typeof t=="function"?la(e,t,n.custom):t;r=Promise.all(Nb(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Lb(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 bR=Vp.length;function Ib(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Ib(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<bR;n++){const r=Vp[n],i=e.props[r];(sa(i)||i===!1)&&(t[r]=i)}return t}const SR=[...$p].reverse(),TR=$p.length;function ER(e){return t=>Promise.all(t.map(({animation:n,options:r})=>wR(e,n,r)))}function CR(e){let t=ER(e),n=W0(),r=!0;const i=l=>(c,f)=>{var d;const u=la(e,f,l==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);if(u){const{transition:h,transitionEnd:m,...x}=u;c={...c,...x,...m}}return c};function s(l){t=l(e)}function o(l){const{props:c}=e,f=Ib(e.parent)||{},u=[],d=new Set;let h={},m=1/0;for(let w=0;w<TR;w++){const p=SR[w],g=n[p],y=c[p]!==void 0?c[p]:f[p],C=sa(y),b=p===l?g.isActive:null;b===!1&&(m=w);let E=y===f[p]&&y!==c[p]&&C;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),g.protectedKeys={...h},!g.isActive&&b===null||!y&&!g.prevProp||Wu(y)||typeof y=="boolean")continue;const k=kR(g.prevProp,y);let P=k||p===l&&g.isActive&&!E&&C||w>m&&C,j=!1;const M=Array.isArray(y)?y:[y];let I=M.reduce(i(p),{});b===!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;Vd(O)&&Vd(L)?B=!Lb(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=y,g.prevResolvedValues=I,g.isActive&&(h={...h,...I}),r&&e.blockInitialAnimation&&(P=!1),P&&(!(E&&k)||j)&&u.push(...M.map(ne=>({animation:ne,options:{type:p}})))}if(d.size){const w={};if(typeof c.initial!="boolean"){const p=la(e,Array.isArray(c.initial)?c.initial[0]:c.initial);p&&p.transition&&(w.transition=p.transition)}d.forEach(p=>{const g=e.getBaseTarget(p),y=e.getValue(p);y&&(y.liveStyle=!0),w[p]=g??null}),u.push({animation:w})}let x=!!u.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(x=!1),r=!1,x?t(u):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)==null||u.forEach(d=>{var h;return(h=d.animationState)==null?void 0:h.setActive(l,c)}),n[l].isActive=c;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=W0(),r=!0}}}function kR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Lb(t,e):!1}function Xr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function W0(){return{animate:Xr(!0),whileInView:Xr(),whileHover:Xr(),whileTap:Xr(),whileDrag:Xr(),whileFocus:Xr(),exit:Xr()}}class qr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class _R extends qr{constructor(t){super(t),t.animationState||(t.animationState=CR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Wu(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 PR=0;class AR extends qr{constructor(){super(...arguments),this.id=PR++}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 RR={animation:{Feature:_R},exit:{Feature:AR}};function ca(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Pa(e){return{point:{x:e.pageX,y:e.pageY}}}const OR=e=>t=>Ip(t)&&e(t,Pa(t));function Ro(e,t,n,r){return ca(e,t,OR(n),r)}function $b({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function jR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function MR(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 Vb=1e-4,DR=1-Vb,FR=1+Vb,Bb=.01,NR=0-Bb,LR=0+Bb;function at(e){return e.max-e.min}function IR(e,t,n){return Math.abs(e-t)<=n}function K0(e,t,n,r=.5){e.origin=r,e.originPoint=be(t.min,t.max,e.origin),e.scale=at(n)/at(t),e.translate=be(n.min,n.max,e.origin)-e.originPoint,(e.scale>=DR&&e.scale<=FR||isNaN(e.scale))&&(e.scale=1),(e.translate>=NR&&e.translate<=LR||isNaN(e.translate))&&(e.translate=0)}function Oo(e,t,n,r){K0(e.x,t.x,n.x,r?r.originX:void 0),K0(e.y,t.y,n.y,r?r.originY:void 0)}function q0(e,t,n){e.min=n.min+t.min,e.max=e.min+at(t)}function $R(e,t,n){q0(e.x,t.x,n.x),q0(e.y,t.y,n.y)}function Q0(e,t,n){e.min=t.min-n.min,e.max=e.min+at(t)}function jo(e,t,n){Q0(e.x,t.x,n.x),Q0(e.y,t.y,n.y)}const G0=()=>({translate:0,scale:1,origin:0,originPoint:0}),os=()=>({x:G0(),y:G0()}),Y0=()=>({min:0,max:0}),Pe=()=>({x:Y0(),y:Y0()});function zt(e){return[e("x"),e("y")]}function of(e){return e===void 0||e===1}function Zd({scale:e,scaleX:t,scaleY:n}){return!of(e)||!of(t)||!of(n)}function ti(e){return Zd(e)||zb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function zb(e){return X0(e.x)||X0(e.y)}function X0(e){return e&&e!=="0%"}function xu(e,t,n){const r=e-n,i=t*r;return n+i}function Z0(e,t,n,r,i){return i!==void 0&&(e=xu(e,i,r)),xu(e,n,r)+t}function Jd(e,t=0,n=1,r,i){e.min=Z0(e.min,t,n,r,i),e.max=Z0(e.max,t,n,r,i)}function Ub(e,{x:t,y:n}){Jd(e.x,t.translate,t.scale,t.originPoint),Jd(e.y,n.translate,n.scale,n.originPoint)}const J0=.999999999999,ey=1.0000000000001;function VR(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&&ls(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Ub(e,o)),r&&ti(s.latestValues)&&ls(e,s.latestValues))}t.x<ey&&t.x>J0&&(t.x=1),t.y<ey&&t.y>J0&&(t.y=1)}function as(e,t){e.min=e.min+t,e.max=e.max+t}function ty(e,t,n,r,i=.5){const s=be(e.min,e.max,i);Jd(e,t,n,s,r)}function ls(e,t){ty(e.x,t.x,t.scaleX,t.scale,t.originX),ty(e.y,t.y,t.scaleY,t.scale,t.originY)}function Hb(e,t){return $b(MR(e.getBoundingClientRect(),t))}function BR(e,t,n){const r=Hb(e,n),{scroll:i}=t;return i&&(as(r.x,i.offset.x),as(r.y,i.offset.y)),r}const Wb=({current:e})=>e?e.ownerDocument.defaultView:null,ny=(e,t)=>Math.abs(e-t);function zR(e,t){const n=ny(e.x,t.x),r=ny(e.y,t.y);return Math.sqrt(n**2+r**2)}class Kb{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 u=lf(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=zR(u.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:m}=u,{timestamp:x}=qe;this.history.push({...m,timestamp:x});const{onStart:w,onMove:p}=this.handlers;d||(w&&w(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),p&&p(this.lastMoveEvent,u)},this.handlePointerMove=(u,d)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=af(d,this.transformPagePoint),he.update(this.updatePoint,!0)},this.handlePointerUp=(u,d)=>{this.end();const{onEnd:h,onSessionEnd:m,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=lf(u.type==="pointercancel"?this.lastMoveEventInfo:af(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(u,w),m&&m(u,w)},!Ip(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=Pa(t),a=af(o,this.transformPagePoint),{point:l}=a,{timestamp:c}=qe;this.history=[{...l,timestamp:c}];const{onSessionStart:f}=n;f&&f(t,lf(a,this.history)),this.removeListeners=_a(Ro(this.contextWindow,"pointermove",this.handlePointerMove),Ro(this.contextWindow,"pointerup",this.handlePointerUp),Ro(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Br(this.updatePoint)}}function af(e,t){return t?{point:t(e.point)}:e}function ry(e,t){return{x:e.x-t.x,y:e.y-t.y}}function lf({point:e},t){return{point:e,delta:ry(e,qb(t)),offset:ry(e,UR(t)),velocity:HR(t,.1)}}function UR(e){return e[0]}function qb(e){return e[e.length-1]}function HR(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=qb(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>_n(t)));)n--;if(!r)return{x:0,y:0};const s=Pn(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 WR(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 iy(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 KR(e,{top:t,left:n,bottom:r,right:i}){return{x:iy(e.x,n,i),y:iy(e.y,t,r)}}function sy(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 qR(e,t){return{x:sy(e.x,t.x),y:sy(e.y,t.y)}}function QR(e,t){let n=.5;const r=at(e),i=at(t);return i>r?n=na(t.min,t.max-r,e.min):r>i&&(n=na(e.min,e.max-i,t.min)),Zn(0,1,n)}function GR(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 eh=.35;function YR(e=eh){return e===!1?e=0:e===!0&&(e=eh),{x:oy(e,"left","right"),y:oy(e,"top","bottom")}}function oy(e,t,n){return{min:ay(e,t),max:ay(e,n)}}function ay(e,t){return typeof e=="number"?e:e[t]||0}const XR=new WeakMap;class ZR{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:u}=this.getProps();u?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Pa(f).point)},s=(f,u)=>{const{drag:d,dragPropagation:h,onDragStart:m}=this.getProps();if(d&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Q2(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),zt(w=>{let p=this.getAxisMotionValue(w).get()||0;if(Rn.test(p)){const{projection:g}=this.visualElement;if(g&&g.layout){const y=g.layout.layoutBox[w];y&&(p=at(y)*(parseFloat(p)/100))}}this.originPoint[w]=p}),m&&he.postRender(()=>m(f,u)),Bd(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},o=(f,u)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:m,onDrag:x}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:w}=u;if(h&&this.currentDirection===null){this.currentDirection=JR(w),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",u.point,w),this.updateAxis("y",u.point,w),this.visualElement.render(),x&&x(f,u)},a=(f,u)=>this.stop(f,u),l=()=>zt(f=>{var u;return this.getAnimationState(f)==="paused"&&((u=this.getAxisMotionValue(f).animation)==null?void 0:u.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Kb(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Wb(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||!al(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=WR(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&&is(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=KR(r.layoutBox,t):this.constraints=!1,this.elastic=YR(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&zt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=GR(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!is(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=BR(r,i.root,this.visualElement.getTransformPagePoint());let o=qR(i.layout.layoutBox,s);if(n){const a=n(jR(o));this.hasMutatedConstraints=!!a,a&&(o=$b(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=zt(f=>{if(!al(f,n,this.currentDirection))return;let u=l&&l[f]||{};o&&(u={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,...u};return this.startAxisValueAnimation(f,m)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Bd(this.visualElement,t),r.start(sm(t,r,0,n,this.visualElement,!1))}stopAnimation(){zt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){zt(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){zt(n=>{const{drag:r}=this.getProps();if(!al(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(!is(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};zt(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=QR({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(),zt(o=>{if(!al(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(be(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;XR.set(this.visualElement,this);const t=this.visualElement.current,n=Ro(t,"pointerdown",l=>{const{drag:c,dragListener:f=!0}=this.getProps();c&&f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();is(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=ca(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(zt(f=>{const u=this.getAxisMotionValue(f);u&&(this.originPoint[f]+=l[f].translate,u.set(u.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=eh,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function al(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function JR(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class eO extends qr{constructor(t){super(t),this.removeGroupControls=Yt,this.removeListeners=Yt,this.controls=new ZR(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Yt}unmount(){this.removeGroupControls(),this.removeListeners()}}const ly=e=>(t,n)=>{e&&he.postRender(()=>e(t,n))};class tO extends qr{constructor(){super(...arguments),this.removePointerDownListener=Yt}onPointerDown(t){this.session=new Kb(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Wb(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:ly(t),onStart:ly(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&he.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=Ro(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 Rl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function uy(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const lo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(K.test(e))e=parseFloat(e);else return e;const n=uy(e,t.target.x),r=uy(e,t.target.y);return`${n}% ${r}%`}},nO={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=zr.parse(e);if(i.length>5)return r;const s=zr.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 c=be(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),s(i)}};class rO extends v.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;bP(iO),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()})),Rl.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(),Lp.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 Qb(e){const[t,n]=Mw(),r=v.useContext(Cp);return T.jsx(rO,{...e,layoutGroup:r,switchLayoutGroup:v.useContext(Kw),isPresent:t,safeToRemove:n})}const iO={borderRadius:{...lo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:lo,borderTopRightRadius:lo,borderBottomLeftRadius:lo,borderBottomRightRadius:lo,boxShadow:nO};function sO(e,t,n){const r=nt(e)?e:ia(e);return r.start(sm("",r,t,n)),r.animation}function oO(e){return e instanceof SVGElement&&e.tagName!=="svg"}const aO=(e,t)=>e.depth-t.depth;class lO{constructor(){this.children=[],this.isDirty=!1}add(t){Ap(this.children,t),this.isDirty=!0}remove(t){Rp(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(aO),this.isDirty=!1,this.children.forEach(t)}}function uO(e,t){const n=An.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(Br(r),e(s-t))};return he.read(r,!0),()=>Br(r)}const Gb=["TopLeft","TopRight","BottomLeft","BottomRight"],cO=Gb.length,cy=e=>typeof e=="string"?parseFloat(e):e,fy=e=>typeof e=="number"||K.test(e);function fO(e,t,n,r,i,s){i?(e.opacity=be(0,n.opacity??1,dO(r)),e.opacityExit=be(t.opacity??1,0,hO(r))):s&&(e.opacity=be(t.opacity??1,n.opacity??1,r));for(let o=0;o<cO;o++){const a=`border${Gb[o]}Radius`;let l=dy(t,a),c=dy(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||fy(l)===fy(c)?(e[a]=Math.max(be(cy(l),cy(c),r),0),(Rn.test(c)||Rn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=be(t.rotate||0,n.rotate||0,r))}function dy(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const dO=Yb(0,.5,hb),hO=Yb(.5,.95,Yt);function Yb(e,t,n){return r=>r<e?0:r>t?1:n(na(e,t,r))}function hy(e,t){e.min=t.min,e.max=t.max}function $t(e,t){hy(e.x,t.x),hy(e.y,t.y)}function py(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function my(e,t,n,r,i){return e-=t,e=xu(e,1/n,r),i!==void 0&&(e=xu(e,1/i,r)),e}function pO(e,t=0,n=1,r=.5,i,s=e,o=e){if(Rn.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=my(e.min,t,n,a,i),e.max=my(e.max,t,n,a,i)}function gy(e,t,[n,r,i],s,o){pO(e,t[n],t[r],t[i],t.scale,s,o)}const mO=["x","scaleX","originX"],gO=["y","scaleY","originY"];function yy(e,t,n,r){gy(e.x,t,mO,n?n.x:void 0,r?r.x:void 0),gy(e.y,t,gO,n?n.y:void 0,r?r.y:void 0)}function vy(e){return e.translate===0&&e.scale===1}function Xb(e){return vy(e.x)&&vy(e.y)}function xy(e,t){return e.min===t.min&&e.max===t.max}function yO(e,t){return xy(e.x,t.x)&&xy(e.y,t.y)}function wy(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Zb(e,t){return wy(e.x,t.x)&&wy(e.y,t.y)}function by(e){return at(e.x)/at(e.y)}function Sy(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class vO{constructor(){this.members=[]}add(t){Ap(this.members,t),t.scheduleRender()}remove(t){if(Rp(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 xO(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:c,rotate:f,rotateX:u,rotateY:d,skewX:h,skewY:m}=n;c&&(r=`perspective(${c}px) ${r}`),f&&(r+=`rotate(${f}deg) `),u&&(r+=`rotateX(${u}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 uf=["","X","Y","Z"],wO={visibility:"hidden"},Ty=1e3;let bO=0;function cf(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Jb(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ob(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&&Jb(r)}function eS({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=bO++,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(EO),this.nodes.forEach(AO),this.nodes.forEach(RO),this.nodes.forEach(CO)},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 lO)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new jp),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=oO(o),this.instance=o;const{layoutId:l,layout:c,visualElement:f}=this.options;if(f&&!f.current&&f.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let u;const d=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,u&&u(),u=uO(d,250),Rl.hasAnimatedSinceResize&&(Rl.hasAnimatedSinceResize=!1,this.nodes.forEach(Cy))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&f&&(l||c)&&this.addEventListener("didUpdate",({delta:u,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()||FO,{onLayoutAnimationStart:w,onLayoutAnimationComplete:p}=f.getProps(),g=!this.targetLayout||!Zb(this.targetLayout,m),y=!d&&h;if(this.options.layoutRoot||this.resumeFrom||y||d&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(u,y);const C={...Fp(x,"layout"),onPlay:w,onComplete:p};(f.shouldReduceMotion||this.options.layoutRoot)&&(C.delay=0,C.type=!1),this.startAnimation(C)}else d||Cy(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,Br(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(OO),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&&Jb(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f<this.path.length;f++){const u=this.path[f];u.shouldResetTransform=!0,u.updateScroll("snapshot"),u.options.layoutRoot&&u.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ey);return}this.isUpdating||this.nodes.forEach(_O),this.isUpdating=!1,this.nodes.forEach(PO),this.nodes.forEach(SO),this.nodes.forEach(TO),this.clearAllSnapshots();const a=An.now();qe.delta=Zn(0,1e3/60,a-qe.timestamp),qe.timestamp=a,qe.isProcessing=!0,Jc.update.process(qe),Jc.preRender.process(qe),Jc.render.process(qe),qe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Lp.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(kO),this.sharedNodes.forEach(jO)}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&&!at(this.snapshot.measuredBox.x)&&!at(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&&!Xb(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,f=c!==this.prevTransformTemplateValue;o&&(a||ti(this.latestValues)||f)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),NO(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:o}=this.options;if(!o)return Pe();const a=o.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(LO))){const{scroll:f}=this.root;f&&(as(a.x,f.offset.x),as(a.y,f.offset.y))}return a}removeElementScroll(o){var l;const a=Pe();if($t(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const f=this.path[c],{scroll:u,options:d}=f;f!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&$t(a,o),as(a.x,u.offset.x),as(a.y,u.offset.y))}return a}applyTransform(o,a=!1){const l=Pe();$t(l,o);for(let c=0;c<this.path.length;c++){const f=this.path[c];!a&&f.options.layoutScroll&&f.scroll&&f!==f.root&&ls(l,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),ti(f.latestValues)&&ls(l,f.latestValues)}return ti(this.latestValues)&&ls(l,this.latestValues),l}removeTransform(o){const a=Pe();$t(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!ti(c.latestValues))continue;Zd(c.latestValues)&&c.updateSnapshot();const f=Pe(),u=c.measurePageBox();$t(f,u),yy(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,f)}return ti(this.latestValues)&&yy(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!==qe.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:u}=this.options;if(!(!this.layout||!(f||u))){if(this.resolvedRelativeTargetAt=qe.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(),jo(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),$t(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(),$R(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):$t(this.target,this.layout.layoutBox),Ub(this.target,this.targetDelta)):$t(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(),jo(this.relativeTargetOrigin,this.target,h.target),$t(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Zd(this.parent.latestValues)||zb(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===qe.timestamp&&(l=!1),l)return;const{layout:c,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||!(c||f))return;$t(this.layoutCorrected,this.layout.layoutBox);const u=this.treeScale.x,d=this.treeScale.y;VR(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():(py(this.prevProjectionDelta.x,this.projectionDelta.x),py(this.prevProjectionDelta.y,this.projectionDelta.y)),Oo(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==u||this.treeScale.y!==d||!Sy(this.projectionDelta.x,this.prevProjectionDelta.x)||!Sy(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=os(),this.projectionDelta=os(),this.projectionDeltaWithTransform=os()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},f={...this.latestValues},u=os();(!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,w=this.getStack(),p=!w||w.members.length<=1,g=!!(x&&!p&&this.options.crossfade===!0&&!this.path.some(DO));this.animationProgress=0;let y;this.mixTargetDelta=C=>{const b=C/1e3;ky(u.x,o.x,b),ky(u.y,o.y,b),this.setTargetDelta(u),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(jo(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),MO(this.relativeTarget,this.relativeTargetOrigin,d,b),y&&yO(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=Pe()),$t(y,this.relativeTarget)),x&&(this.animationValues=f,fO(f,c,this.latestValues,b,g,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=b},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&&(Br(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=he.update(()=>{Rl.hasAnimatedSinceResize=!0,this.currentAnimation=sO(0,Ty,{...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(Ty),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:f}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&tS(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Pe();const u=at(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const d=at(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}$t(a,l),ls(a,f),Oo(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new vO),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.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 c=this.getStack();c&&c.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 c={};l.z&&cf("z",o,c,this.animationValues);for(let f=0;f<uf.length;f++)cf(`rotate${uf[f]}`,o,c,this.animationValues),cf(`skew${uf[f]}`,o,c,this.animationValues);o.render();for(const f in c)o.setStaticValue(f,c[f]),this.animationValues&&(this.animationValues[f]=c[f]);o.scheduleRender()}getProjectionStyles(o){if(!this.instance||this.isSVG)return;if(!this.isVisible)return wO;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=Al(o==null?void 0:o.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none",a;const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){const h={};return this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=Al(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!ti(this.latestValues)&&(h.transform=l?l({},""):"none",this.hasProjected=!1),h}const f=c.animationValues||c.latestValues;this.applyTransformsToTarget(),a.transform=xO(this.projectionDeltaWithTransform,this.treeScale,f),l&&(a.transform=l(f,a.transform));const{x:u,y:d}=this.projectionDelta;a.transformOrigin=`${u.origin*100}% ${d.origin*100}% 0`,c.animationValues?a.opacity=c===this?f.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:a.opacity=c===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const h in oa){if(f[h]===void 0)continue;const{correct:m,applyTo:x,isCSSVariable:w}=oa[h],p=a.transform==="none"?f[h]:m(f[h],c);if(x){const g=x.length;for(let y=0;y<g;y++)a[x[y]]=p}else w?this.options.visualElement.renderState.vars[h]=p:a[h]=p}return this.options.layoutId&&(a.pointerEvents=c===this?Al(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(Ey),this.root.sharedNodes.clear()}}}function SO(e){e.updateLayout()}function TO(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"?zt(u=>{const d=o?t.measuredBox[u]:t.layoutBox[u],h=at(d);d.min=r[u].min,d.max=d.min+h}):tS(s,t.layoutBox,r)&&zt(u=>{const d=o?t.measuredBox[u]:t.layoutBox[u],h=at(r[u]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+h)});const a=os();Oo(a,r,t.layoutBox);const l=os();o?Oo(l,e.applyTransform(i,!0),t.measuredBox):Oo(l,r,t.layoutBox);const c=!Xb(a);let f=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:h}=u;if(d&&h){const m=Pe();jo(m,t.layoutBox,d.layoutBox);const x=Pe();jo(x,r,h.layoutBox),Zb(m,x)||(f=!0),u.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=m,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:f})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function EO(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 CO(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function kO(e){e.clearSnapshot()}function Ey(e){e.clearMeasurements()}function _O(e){e.isLayoutDirty=!1}function PO(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Cy(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function AO(e){e.resolveTargetDelta()}function RO(e){e.calcProjection()}function OO(e){e.resetSkewAndRotation()}function jO(e){e.removeLeadSnapshot()}function ky(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 _y(e,t,n,r){e.min=be(t.min,n.min,r),e.max=be(t.max,n.max,r)}function MO(e,t,n,r){_y(e.x,t.x,n.x,r),_y(e.y,t.y,n.y,r)}function DO(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const FO={duration:.45,ease:[.4,0,.1,1]},Py=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ay=Py("applewebkit/")&&!Py("chrome/")?Math.round:Yt;function Ry(e){e.min=Ay(e.min),e.max=Ay(e.max)}function NO(e){Ry(e.x),Ry(e.y)}function tS(e,t,n){return e==="position"||e==="preserve-aspect"&&!IR(by(t),by(n),.2)}function LO(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const IO=eS({attachResizeListener:(e,t)=>ca(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ff={current:void 0},nS=eS({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ff.current){const e=new IO({});e.mount(window),e.setOptions({layoutScroll:!0}),ff.current=e}return ff.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),$O={pan:{Feature:tO},drag:{Feature:eO,ProjectionNode:nS,MeasureLayout:Qb}};function Oy(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,Pa(t)))}class VO extends qr{mount(){const{current:t}=this.node;t&&(this.unmount=Y2(t,(n,r)=>(Oy(this.node,r,"Start"),i=>Oy(this.node,i,"End"))))}unmount(){}}class BO extends qr{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=_a(ca(this.node.current,"focus",()=>this.onFocus()),ca(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function jy(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,Pa(t)))}class zO extends qr{mount(){const{current:t}=this.node;t&&(this.unmount=eP(t,(n,r)=>(jy(this.node,r,"Start"),(i,{success:s})=>jy(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const th=new WeakMap,df=new WeakMap,UO=e=>{const t=th.get(e.target);t&&t(e)},HO=e=>{e.forEach(UO)};function WO({root:e,...t}){const n=e||document;df.has(n)||df.set(n,{});const r=df.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(HO,{root:e,...t})),r[i]}function KO(e,t,n){const r=WO(t);return th.set(e,n),r.observe(e),()=>{th.delete(e),r.unobserve(e)}}const qO={some:0,all:1};class QO extends qr{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:qO[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:f,onViewportLeave:u}=this.node.getProps(),d=c?f:u;d&&d(l)};return KO(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(GO(t,n))&&this.startObserver()}unmount(){}}function GO({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const YO={inView:{Feature:QO},tap:{Feature:zO},focus:{Feature:BO},hover:{Feature:VO}},XO={layout:{ProjectionNode:nS,MeasureLayout:Qb}},nh={current:null},rS={current:!1};function ZO(){if(rS.current=!0,!!_p)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>nh.current=e.matches;e.addListener(t),t()}else nh.current=!1}const JO=[...Pb,et,zr],ej=e=>JO.find(_b(e)),tj=new WeakMap;function nj(e,t,n){for(const r in t){const i=t[r],s=n[r];if(nt(i))e.addValue(r,i);else if(nt(s))e.addValue(r,ia(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,ia(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const My=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class rj{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=nm,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=An.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,he.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:f}=o;this.onUpdate=f,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,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=Ku(n),this.isVariantNode=Hw(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in d){const m=d[h];l[h]!==void 0&&nt(m)&&m.set(l[h],!1)}}mount(t){this.current=t,tj.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)),rS.current||ZO(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:nh.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Br(this.notifyUpdate),Br(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=Ni.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 Is){const n=Is[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<My.length;r++){const i=My[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=nj(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=ia(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"&&(Cb(r)||mb(r))?r=parseFloat(r):!ej(r)&&zr.test(n)&&(r=Sb(t,n)),this.setBaseTarget(t,nt(r)?r.get():r)),nt(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=Yp(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&&!nt(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 jp),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class iS extends rj{constructor(){super(...arguments),this.KeyframeResolver=Ab}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;nt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function ij(e){return window.getComputedStyle(e)}class sj extends iS{constructor(){super(...arguments),this.type="html",this.renderInstance=tb}readValueFromInstance(t,n){if(Ni.has(n))return vA(t,n);{const r=ij(t),i=(zp(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Hb(t,n)}build(t,n,r){Wp(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Xp(t,n,r)}}class oj extends iS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Pe,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&eb(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ni.has(n)){const r=bb(n);return r&&r.default||0}return n=nb.has(n)?n:Bp(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return ib(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&he.postRender(this.updateDimensions)}build(t,n,r){Qp(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){rb(t,n,r,i)}mount(t){this.isSVGTag=Gp(t.tagName),super.mount(t)}}const aj=(e,t)=>qp(e)?new oj(t):new sj(t,{allowProjection:e!==v.Fragment}),lj=WP({...RR,...YO,...$O,...XO},aj),Jn=aP(lj),uj=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),Vt=e=>{const[t,n]=e.split("-");return uj(t)?n?`var(--color-${t}-${n})`:`var(--color-${e}-500)`:`var(--color-${e})`};var fr=(e=>(e.None="none",e.Sm="sm",e.Md="md",e.Lg="lg",e.Xl="xl",e.Full="full",e))(fr||{});const sS=v.createContext({}),cj={[U.Background]:"",[U.Border]:"initial",[U.TooltipText]:Vt("blue-700"),[U.TooltipBackground]:Vt("blue-100"),[U.TooltipBorder]:Vt("blue-500"),[U.HeaderBackground]:Vt("zink-600"),[U.HeaderBorder]:"initial",[U.HeaderText]:"white",[U.FooterBackground]:"",[U.FooterBorder]:"",[U.FooterText]:"",[U.MessageAdminBackground]:"",[U.MessageAdminText]:"",[U.MessageVisitorBackground]:"",[U.MessageVisitorText]:"",[U.GreeterBackground]:"white",[U.GreeterText]:"",[U.GreeterBorder]:"",[U.GreeterTopBackground]:Vt("zink-600"),[U.GreeterTopText]:"white",[U.GreeterButtonBackground]:Vt("blue-500"),[U.GreeterButtonText]:Vt("white"),[U.ButtonBackground]:Vt("blue-500"),[U.ButtonText]:Vt("white"),[U.InputBackground]:Vt("white"),[U.InputText]:Vt("gray-800"),[U.InputBorder]:Vt("slate-200")},fj={[fr.None]:"0px",[fr.Sm]:"var(--radius-xs)",[fr.Md]:"var(--radius-sm)",[fr.Lg]:"var(--radius-md)",[fr.Xl]:"var(--radius-lg)",[fr.Full]:"calc(infinity * 1px)"},dj=e=>{const t={...cj};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 hj({children:e,widget:t}){const n=dj(t),r=t&&t.appearance&&t.appearance.design&&t.appearance.design.border_radius?t.appearance.design.border_radius:fr.Md,i=o=>n[o],s=()=>fj[r];return T.jsx(sS.Provider,{value:{colors:n,getColor:i,getRadius:s},children:e})}const tr=()=>v.useContext(sS);function Vs({children:e,type:t="button",variant:n="primary",kind:r="solid",size:i="md",disabled:s=!1,rounded:o=!1,className:a,textKey:l=U.ButtonText,bgKey:c=U.ButtonBackground,animations:f={},...u}){const d=tr();return T.jsx(Jn.button,{type:t,className:ze("flex items-center justify-center focus:!ring-0",{"rounded-full":o&&i!=="xs","rounded-md":!o},a,O2[n][r],j2[i][o?"rounded":"default"]),disabled:s,style:{color:d.getColor(l),backgroundColor:d.getColor(c),...o?{}:{borderRadius:d.getRadius()}},...f,...u,children:e})}function Me(){}Me.Home=function(t){return T.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:T.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"})})};Me.Chat=e=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:T.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"})});Me.Menu=e=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:T.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})});Me.MessageTyping=({className:e="size-5",...t})=>T.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:T.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"})});Me.Check=function(t){return T.jsx("svg",{fill:"currentColor",viewBox:"0 0 16 16",height:"1em",width:"1em",...t,children:T.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"})})};Me.Website=function(t){return T.jsxs("svg",{fill:"none",viewBox:"0 0 24 24",height:"1em",width:"1em",...t,children:[T.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"}),T.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"}),T.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"})]})};Me.ArrowDown=e=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:T.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3"})});Me.XCircle=({className:e="e-5",...t})=>T.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:T.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"})});Me.X=({className:e="e-5",...t})=>T.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:T.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})});const jn=Object.create(null);jn.open="0";jn.close="1";jn.ping="2";jn.pong="3";jn.message="4";jn.upgrade="5";jn.noop="6";const Ol=Object.create(null);Object.keys(jn).forEach(e=>{Ol[jn[e]]=e});const rh={type:"error",data:"parser error"},oS=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",aS=typeof ArrayBuffer=="function",lS=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,om=({type:e,data:t},n,r)=>oS&&t instanceof Blob?n?r(t):Dy(t,r):aS&&(t instanceof ArrayBuffer||lS(t))?n?r(t):Dy(new Blob([t]),r):r(jn[e]+(t||"")),Dy=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Fy(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let hf;function pj(e,t){if(oS&&e.data instanceof Blob)return e.data.arrayBuffer().then(Fy).then(t);if(aS&&(e.data instanceof ArrayBuffer||lS(e.data)))return t(Fy(e.data));om(e,!1,n=>{hf||(hf=new TextEncoder),t(hf.encode(n))})}const Ny="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xo=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<Ny.length;e++)xo[Ny.charCodeAt(e)]=e;const mj=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 c=new ArrayBuffer(t),f=new Uint8Array(c);for(r=0;r<n;r+=4)s=xo[e.charCodeAt(r)],o=xo[e.charCodeAt(r+1)],a=xo[e.charCodeAt(r+2)],l=xo[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 c},gj=typeof ArrayBuffer=="function",am=(e,t)=>{if(typeof e!="string")return{type:"message",data:uS(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:yj(e.substring(1),t)}:Ol[n]?e.length>1?{type:Ol[n],data:e.substring(1)}:{type:Ol[n]}:rh},yj=(e,t)=>{if(gj){const n=mj(e);return uS(n,t)}else return{base64:!0,data:e}},uS=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},cS="",vj=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,o)=>{om(s,!1,a=>{r[o]=a,++i===n&&t(r.join(cS))})})},xj=(e,t)=>{const n=e.split(cS),r=[];for(let i=0;i<n.length;i++){const s=am(n[i],t);if(r.push(s),s.type==="error")break}return r};function wj(){return new TransformStream({transform(e,t){pj(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 pf;function ll(e){return e.reduce((t,n)=>t+n.length,0)}function ul(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 bj(e,t){pf||(pf=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(ll(n)<1)break;const l=ul(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(ll(n)<2)break;const l=ul(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(ll(n)<8)break;const l=ul(n,8),c=new DataView(l.buffer,l.byteOffset,l.length),f=c.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(rh);break}i=f*Math.pow(2,32)+c.getUint32(4),r=3}else{if(ll(n)<i)break;const l=ul(n,i);a.enqueue(am(s?l:pf.decode(l),t)),r=0}if(i===0||i>e){a.enqueue(rh);break}}}})}const fS=4;function je(e){if(e)return Sj(e)}function Sj(e){for(var t in je.prototype)e[t]=je.prototype[t];return e}je.prototype.on=je.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};je.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};je.prototype.off=je.prototype.removeListener=je.prototype.removeAllListeners=je.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};je.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};je.prototype.emitReserved=je.prototype.emit;je.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};je.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")(),Tj="arraybuffer";function dS(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Ej=qt.setTimeout,Cj=qt.clearTimeout;function Gu(e,t){t.useNativeTimers?(e.setTimeoutFn=Ej.bind(qt),e.clearTimeoutFn=Cj.bind(qt)):(e.setTimeoutFn=qt.setTimeout.bind(qt),e.clearTimeoutFn=qt.clearTimeout.bind(qt))}const kj=1.33;function _j(e){return typeof e=="string"?Pj(e):Math.ceil((e.byteLength||e.size)*kj)}function Pj(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 hS(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Aj(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Rj(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 Oj extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class lm extends je{constructor(t){super(),this.writable=!1,Gu(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 Oj(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=am(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=Aj(t);return n.length?"?"+n:""}}class jj extends lm{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)};xj(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,vj(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]=hS()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let pS=!1;try{pS=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Mj=pS;function Dj(){}class Fj extends jj{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 On extends je{constructor(t,n,r){super(),this.createRequest=t,Gu(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=dS(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=On.requestsCount++,On.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=Dj,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete On.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()}}On.requestsCount=0;On.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Ly);else if(typeof addEventListener=="function"){const e="onpagehide"in qt?"pagehide":"unload";addEventListener(e,Ly,!1)}}function Ly(){for(let e in On.requests)On.requests.hasOwnProperty(e)&&On.requests[e].abort()}const Nj=function(){const e=mS({xdomain:!1});return e&&e.responseType!==null}();class Lj extends Fj{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=Nj&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new On(mS,this.uri(),t)}}function mS(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Mj))return new XMLHttpRequest}catch{}if(!t)try{return new qt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const gS=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Ij extends lm{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=gS?{}:dS(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;om(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]=hS()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const mf=qt.WebSocket||qt.MozWebSocket;class $j extends Ij{createSocket(t,n,r){return gS?new mf(t,n,r):n?new mf(t,n):new mf(t)}doWrite(t,n){this.ws.send(n)}}class Vj extends lm{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=bj(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=wj();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 Bj={websocket:$j,webtransport:Vj,polling:Lj},zj=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Uj=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function ih(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=zj.exec(e||""),s={},o=14;for(;o--;)s[Uj[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=Hj(s,s.path),s.queryKey=Wj(s,s.query),s}function Hj(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 Wj(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const sh=typeof addEventListener=="function"&&typeof removeEventListener=="function",jl=[];sh&&addEventListener("offline",()=>{jl.forEach(e=>e())},!1);class Nr extends je{constructor(t,n){if(super(),this.binaryType=Tj,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=ih(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=ih(n.host).host);Gu(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=Rj(this.opts.query)),sh&&(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"})},jl.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=fS,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&&Nr.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",Nr.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+=_j(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(Nr.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(),sh&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=jl.indexOf(this._offlineEventListener);r!==-1&&jl.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Nr.protocol=fS;class Kj extends Nr{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;Nr.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",u=>{if(!r)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Nr.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=u=>{const d=new Error("probe error: "+u);d.transport=n.name,s(),this.emitReserved("upgradeError",d)};function a(){o("transport closed")}function l(){o("socket closed")}function c(u){n&&u.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",c)};n.once("open",i),n.once("error",o),n.once("close",a),this.once("close",l),this.once("upgrading",c),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 qj=class extends Kj{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=>Bj[i]).filter(i=>!!i)),super(t,r)}};function Qj(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=ih(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 Gj=typeof ArrayBuffer=="function",Yj=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,yS=Object.prototype.toString,Xj=typeof Blob=="function"||typeof Blob<"u"&&yS.call(Blob)==="[object BlobConstructor]",Zj=typeof File=="function"||typeof File<"u"&&yS.call(File)==="[object FileConstructor]";function um(e){return Gj&&(e instanceof ArrayBuffer||Yj(e))||Xj&&e instanceof Blob||Zj&&e instanceof File}function Ml(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Ml(e[n]))return!0;return!1}if(um(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Ml(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Ml(e[n]))return!0;return!1}function Jj(e){const t=[],n=e.data,r=e;return r.data=oh(n,t),r.attachments=t.length,{packet:r,buffers:t}}function oh(e,t){if(!e)return e;if(um(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]=oh(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]=oh(e[r],t));return n}return e}function eM(e,t){return e.data=ah(e.data,t),delete e.attachments,e}function ah(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]=ah(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=ah(e[n],t));return e}const tM=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],nM=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 rM{constructor(t){this.replacer=t}encode(t){return(t.type===te.EVENT||t.type===te.ACK)&&Ml(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=Jj(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function Iy(e){return Object.prototype.toString.call(e)==="[object Object]"}class cm extends je{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 iM(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(um(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(cm.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 Iy(n);case te.DISCONNECT:return n===void 0;case te.CONNECT_ERROR:return typeof n=="string"||Iy(n);case te.EVENT:case te.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&tM.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 iM{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=eM(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const sM=Object.freeze(Object.defineProperty({__proto__:null,Decoder:cm,Encoder:rM,get PacketType(){return te},protocol:nM},Symbol.toStringTag,{value:"Module"}));function ln(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const oM=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class vS extends je{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=[ln(t,"open",this.onopen.bind(this)),ln(t,"packet",this.onpacket.bind(this)),ln(t,"error",this.onerror.bind(this)),ln(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(oM.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++,u=n.pop();this._registerAckCallback(f,u),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 Gs(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}Gs.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};Gs.prototype.reset=function(){this.attempts=0};Gs.prototype.setMin=function(e){this.ms=e};Gs.prototype.setMax=function(e){this.max=e};Gs.prototype.setJitter=function(e){this.jitter=e};class lh extends je{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,Gu(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 Gs({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||sM;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 qj(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=ln(n,"open",function(){r.onopen(),t&&t()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=ln(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(ln(t,"ping",this.onping.bind(this)),ln(t,"data",this.ondata.bind(this)),ln(t,"error",this.onerror.bind(this)),ln(t,"close",this.onclose.bind(this)),ln(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 vS(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 uo={};function Dl(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Qj(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=uo[i]&&s in uo[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new lh(r,t):(uo[i]||(uo[i]=new lh(r,t)),l=uo[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(Dl,{Manager:lh,Socket:vS,io:Dl,connect:Dl});const Fl=e=>{const t=document.cookie.split(";").find(n=>n.includes(e));return t?t.split("=")[1]:null},xS=v.createContext(null),Ys=()=>v.useContext(xS),aM=({children:e})=>{const[t,n]=v.useState(null),[r,i]=v.useState(!1),s=()=>{const u=Dl(yk,{transports:["websocket"],auth:{customer_token:Fl("customer_token"),device_id:Fl("device_id"),customer_refresh_token:Fl("customer_refresh_token")}});u.on("error",d=>{console.error("Websocket error",d)}),u.on("connect",()=>{n(u),i(!0)})},o=()=>{t&&(t.connect(),i(!0))},a=()=>{t&&(t.disconnect(),i(!1))},l=(u,d)=>{t&&t.on(u,d)},c=(u,d)=>{t&&t.off(u,d)},f=(u,d,h)=>{t&&t.emit(u,d,h)};return T.jsx(xS.Provider,{value:{socket:t,connected:r,connect:s,reconnect:o,disconnect:a,on:l,off:c,emit:f},children:e})};var Mn=(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))(Mn||{}),fn=(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))(fn||{});const fm=e=>{const t=Sw(),n=(r,i)=>{var o;const s=((o=vI.find(a=>a.name===r))==null?void 0:o.path)??"/";return typeof i=="object"&&s.includes(":")?Object.entries(i).reduce((a,[l,c])=>a.replace(`:${l}`,c),s):i?`${s}?${i}`:s};return{push:(r,i)=>{t(n(r,i),e)},path:n}},lM=()=>Jk({mutationFn:e=>Vu(`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})})}),uM=e=>Vu(`clients/${e}/chats`),wu=e=>Vu(`clients/${e}/chats`,{method:"DELETE"}),wS=(e,t,n)=>{const r=typeof window<"u"?window:void 0;v.useEffect(()=>(r.addEventListener(e,t),()=>{r.removeEventListener(e,t,!1)}),[e,t,r])},dm=()=>typeof window<"u"?/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent):!1;function cM(){var r,i,s,o;const{widget:e,isHaveChat:t}=Fn(),n=tr();return T.jsxs(Jn.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:ze("absolute bottom-full mb-3 p-3 shadow-lg whitespace-nowrap","w-auto right-0"),style:{borderRadius:n.getRadius(),backgroundColor:n.getColor(U.TooltipBackground),color:n.getColor(U.TooltipText)},children:[T.jsx(Jn.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.1,duration:.3},className:"text-sm font-medium",style:{color:n.getColor(U.TooltipText)},children:(t?(i=(r=e==null?void 0:e.appearance)==null?void 0:r.design)==null?void 0:i.tooltip_message_active:(o=(s=e==null?void 0:e.appearance)==null?void 0:s.design)==null?void 0:o.tooltip_message)||"Bizimle sohbet edin!"}),T.jsx("div",{className:ze("absolute bottom-0 right-4 w-3 h-3 transform rotate-45 translate-y-1.5 bg-blue-100")})]})}function fM({children:e,defaultOpen:t,border:n}){var g,y,C,b;const r=Ys(),{open:i,setOpen:s,setIsHaveChat:o,isHaveChat:a,widget:l}=Fn(),[c]=v.useState(!0),f=fm(),u=Ea(),d=tr(),h=dm();v.useEffect(()=>{a&&u.pathname==="/"&&f.push("chat")},[a]);const m=()=>{s(!0),r&&r.emit(Mn.WidgetOpen,{})},x=()=>{s(!1),r&&r.emit(Mn.WidgetClose,{})},w=()=>{s(!1),o(!1),wu(l.client_id),f.push("registration")},p=async()=>{s(!1),o(!1),await wu(l.client_id),f.push("registration")};return v.useEffect(()=>{if(t&&s(!0),!(!r||!l))return r.on(fn.Banned,w),r.on(fn.ChatUserClose,p),()=>{r.off(fn.Banned,w),r.off(fn.ChatUserClose,p)}},[]),T.jsx("section",{className:"relative w-full h-full",children:T.jsxs(ta,{children:[i&&T.jsx(Jn.div,{initial:{opacity:0,scale:.9,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.9,y:10},transition:{type:"spring",damping:25,stiffness:300},style:{width:h?"":((y=(g=l==null?void 0:l.appearance)==null?void 0:g.design)==null?void 0:y.width)||"22.5rem",height:h?"":((b=(C=l==null?void 0:l.appearance)==null?void 0:C.design)==null?void 0:b.height)||"32rem",left:h?"0":"",borderColor:d.getColor(U.Border)},className:ze("fixed z-300 rounded-md",{"border border-solid dark:border-zink-500":n,"bottom-12 right-12":!h,"bottom-0 right-0":h}),children:e}),T.jsx("div",{className:"absolute bottom-0 right-0 z-400",children:T.jsxs(ta,{children:[!i&&c&&T.jsx(cM,{}),!i&&T.jsxs(Vs,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:m,children:[T.jsx(Jn.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:ze("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:d.getColor(U.ButtonBackground)}}),T.jsx(Me.Chat,{className:"size-6"})]}),i&&!h&&T.jsx(Vs,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:x,children:T.jsx(Me.X,{className:"size-6"})})]})})]})})}function bS(e){const{widget:t}=Fn();return T.jsx(hj,{widget:t,children:T.jsx(fM,{...e})})}function Li(e){this._maxSize=e,this.clear()}Li.prototype.clear=function(){this._size=0,this._values=Object.create(null)};Li.prototype.get=function(e){return this._values[e]};Li.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var dM=/[^.^\]^[]+|(?=\[\]|\.\.)/g,SS=/^\d+$/,hM=/^\d/,pM=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,mM=/^\s*(['"]?)(.*?)(\1)\s*$/,hm=512,$y=new Li(hm),Vy=new Li(hm),By=new Li(hm),bi={Cache:Li,split:uh,normalizePath:gf,setter:function(e){var t=gf(e);return Vy.get(e)||Vy.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=gf(e);return By.get(e)||By.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+(pm(n)||SS.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){gM(Array.isArray(e)?e:uh(e),t,n)}};function gf(e){return $y.get(e)||$y.set(e,uh(e).map(function(t){return t.replace(mM,"$2")}))}function uh(e){return e.match(dM)||[""]}function gM(e,t,n){var r=e.length,i,s,o,a;for(s=0;s<r;s++)i=e[s],i&&(xM(i)&&(i='"'+i+'"'),a=pm(i),o=!a&&/^\d+$/.test(i),t.call(n,i,a,o,s,e))}function pm(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function yM(e){return e.match(hM)&&!e.match(SS)}function vM(e){return pM.test(e)}function xM(e){return!pm(e)&&(yM(e)||vM(e))}const wM=/[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,Yu=e=>e.match(wM)||[],Xu=e=>e[0].toUpperCase()+e.slice(1),mm=(e,t)=>Yu(e).join(t).toLowerCase(),TS=e=>Yu(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),bM=e=>Xu(TS(e)),SM=e=>mm(e,"_"),TM=e=>mm(e,"-"),EM=e=>Xu(mm(e," ")),CM=e=>Yu(e).map(Xu).join(" ");var yf={words:Yu,upperFirst:Xu,camelCase:TS,pascalCase:bM,snakeCase:SM,kebabCase:TM,sentenceCase:EM,titleCase:CM},gm={exports:{}};gm.exports=function(e){return ES(kM(e),e)};gm.exports.array=ES;function ES(e,t){var n=e.length,r=new Array(n),i={},s=n,o=_M(t),a=PM(e);for(t.forEach(function(c){if(!a.has(c[0])||!a.has(c[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(c,f,u){if(u.has(c)){var d;try{d=", node was:"+JSON.stringify(c)}catch{d=""}throw new Error("Cyclic dependency"+d)}if(!a.has(c))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(c));if(!i[f]){i[f]=!0;var h=o.get(c)||new Set;if(h=Array.from(h),f=h.length){u.add(c);do{var m=h[--f];l(m,a.get(m),u)}while(f);u.delete(c)}r[--n]=c}}}function kM(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 _M(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 PM(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}var AM=gm.exports;const RM=zs(AM),OM=Object.prototype.toString,jM=Error.prototype.toString,MM=RegExp.prototype.toString,DM=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",FM=/^Symbol\((.*)\)(.*)$/;function NM(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function zy(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return NM(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return DM.call(e).replace(FM,"Symbol($1)");const r=OM.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+jM.call(e)+"]":r==="RegExp"?MM.call(e):null}function Lr(e,t){let n=zy(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let s=zy(this[r],t);return s!==null?s:i},2)}function CS(e){return e==null?[]:[].concat(e)}let kS,_S,PS,LM=/\$\{\s*(\w+)\s*\}/g;kS=Symbol.toStringTag;class Uy{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[kS]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],CS(t).forEach(s=>{if(xt.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]}}_S=Symbol.hasInstance;PS=Symbol.toStringTag;class xt 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(LM,(i,s)=>Lr(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 Uy(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[PS]="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,xt)}static[_S](t){return Uy[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let xn={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 \`${Lr(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Lr(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${Lr(n,!0)}\``+i}},ht={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"},IM={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"},ch={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},$M={isValue:"${path} field must be ${value}"},Nl={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},VM={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"},BM={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: \`${Lr(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: \`${Lr(n,!0)}\``}return xt.formatError(xn.notType,e)}};Object.assign(Object.create(null),{mixed:xn,string:ht,number:IM,date:ch,object:Nl,array:VM,boolean:$M,tuple:BM});const ym=e=>e&&e.__isYupSchema__;class bu{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 bu(t,(a,l)=>{var c;let f=o(...a)?i:s;return(c=f==null?void 0:f(l))!=null?c: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(!ym(i))throw new TypeError("conditions must return a schema object");return i.resolve(n)}}const cl={context:"$",value:"."};class Ii{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]===cl.context,this.isValue=this.key[0]===cl.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?cl.context:this.isValue?cl.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&bi.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}}Ii.prototype.__isYupRef=!0;const ui=e=>e==null;function Wi(e){function t({value:n,path:r="",options:i,originalValue:s,schema:o},a,l){const{name:c,test:f,params:u,message:d,skipAbsent:h}=e;let{parent:m,context:x,abortEarly:w=o.spec.abortEarly,disableStackTrace:p=o.spec.disableStackTrace}=i;function g(I){return Ii.isRef(I)?I.getValue(n,m,x):I}function y(I={}){const re=Object.assign({value:n,originalValue:s,label:o.spec.label,path:I.path||r,spec:o.spec,disableStackTrace:I.disableStackTrace||p},u,I.params);for(const xe of Object.keys(re))re[xe]=g(re[xe]);const ie=new xt(xt.formatError(I.message||d,re),n,re.path,I.type||c,re.disableStackTrace);return ie.params=re,ie}const C=w?a:l;let b={path:r,parent:m,type:c,from:i.from,createError:y,resolve:g,options:i,originalValue:s,schema:o};const E=I=>{xt.isError(I)?C(I):I?l(null):C(y())},k=I=>{xt.isError(I)?C(I):a(I)};if(h&&ui(n))return E(!0);let j;try{var M;if(j=f.call(b,n,b),typeof((M=j)==null?void 0:M.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${b.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(j).then(E,k)}}catch(I){k(I);return}E(j)}return t.OPTIONS=e,t}function zM(e,t,n,r=n){let i,s,o;return t?(bi.forEach(t,(a,l,c)=>{let f=l?a.slice(1,a.length-1):a;e=e.resolve({context:r,parent:i,value:n});let u=e.type==="tuple",d=c?parseInt(f,10):0;if(e.innerType||u){if(u&&!c)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=u?e.spec.types[d]:e.innerType}if(!c){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 Su extends Set{describe(){const t=[];for(const n of this.values())t.push(Ii.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 Su(this.values())}merge(t,n){const r=this.clone();return t.forEach(i=>r.add(i)),n.forEach(i=>r.delete(i)),r}}function us(e,t=new Map){if(ym(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]=us(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,us(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(us(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=us(i,t)}else throw Error(`Unable to clone ${e}`);return n}class Dn{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 Su,this._blacklist=new Su,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(xn.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=us(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&&ui(s))return s;let o=Lr(t),a=Lr(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]),T.jsx(D2,{isPresent:t,childRef:i,sizeRef:s,children:v.cloneElement(e,{ref:i})})}const N2=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a})=>{const l=_p(L2),c=v.useId();let f=!0,u=v.useMemo(()=>(f=!1,{id:c,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&&(u={...u}),v.useMemo(()=>{l.forEach((d,h)=>l.set(h,!1))},[n]),v.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o==="popLayout"&&(e=T.jsx(F2,{isPresent:n,anchorX:a,children:e})),T.jsx(Uu.Provider,{value:u,children:e})};function L2(){return new Map}function jw(e=!0){const t=v.useContext(Uu);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=v.useId();v.useEffect(()=>{if(e)return i(s)},[e]);const o=v.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const il=e=>e.key||"";function g0(e){const t=[];return v.Children.forEach(e,n=>{v.isValidElement(n)&&t.push(n)}),t}const ta=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left"})=>{const[l,c]=jw(o),f=v.useMemo(()=>g0(e),[e]),u=o&&!l?[]:f.map(il),d=v.useRef(!0),h=v.useRef(f),m=_p(()=>new Map),[x,w]=v.useState(f),[p,g]=v.useState(f);Mw(()=>{d.current=!1,h.current=f;for(let b=0;b<p.length;b++){const E=il(p[b]);u.includes(E)?m.delete(E):m.get(E)!==!0&&m.set(E,!1)}},[p,u.length,u.join("-")]);const y=[];if(f!==x){let b=[...f];for(let E=0;E<p.length;E++){const k=p[E],P=il(k);u.includes(P)||(b.splice(E,0,k),y.push(k))}return s==="wait"&&y.length&&(b=y),g(g0(b)),w(f),null}const{forceRender:C}=v.useContext(kp);return T.jsx(T.Fragment,{children:p.map(b=>{const E=il(b),k=o&&!l?!1:f===p||u.includes(E),P=()=>{if(m.has(E))m.set(E,!0);else return;let M=!0;m.forEach(j=>{j||(M=!1)}),M&&(C==null||C(),g(h.current),o&&(c==null||c()),r&&r())};return T.jsx(N2,{isPresent:k,initial:!d.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,onExitComplete:k?void 0:P,anchorX:a,children:b},E)})})};function Rp(e,t){e.indexOf(t)===-1&&e.push(t)}function Op(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let Id=()=>{};const $d={skipAnimations:!1,useManualTiming:!1};function Mp(e){let t;return()=>(t===void 0&&(t=e()),t)}const Yt=e=>e,na=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class jp{constructor(){this.subscriptions=[]}add(t){return Rp(this.subscriptions,t),()=>Op(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 _n=e=>e*1e3,Pn=e=>e/1e3;function Dw(e,t){return t?e*(1e3/t):0}const I2=Mp(()=>window.ScrollTimeline!==void 0);class $2{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(I2()&&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 V2 extends $2{then(t,n){return this.finished.finally(t).then(()=>{})}}const y0={value:null,addProjectionMetrics:null},Dp=e=>Array.isArray(e)&&typeof e[0]=="number",B2={};function z2(e,t){const n=Mp(e);return()=>B2[t]??n()}const ra=z2(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Fw=(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)})`},yo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Vd={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:yo([0,.65,.55,1]),circOut:yo([.55,0,1,.45]),backIn:yo([.31,.01,.66,-.59]),backOut:yo([.33,1.53,.69,.99])};function Nw(e,t){if(e)return typeof e=="function"&&ra()?Fw(e,t):Dp(e)?yo(e):Array.isArray(e)?e.map(n=>Nw(n,t)||Vd.easeOut):Vd[e]}function U2(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeInOut",times:l}={},c=void 0){const f={[t]:n};l&&(f.offset=l);const u=Nw(a,i);return Array.isArray(u)&&(f.easing=u),e.animate(f,{delay:r,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal",pseudoElement:c})}function Fp(e){return typeof e=="function"&&"applyToOptions"in e}function Np(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const hu=2e4;function Lp(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<hu;)t+=n,r=e.next(t);return t>=hu?1/0:t}function H2(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Lp(r),hu);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:Pn(i)}}function Lw(e){return!!(typeof e=="function"&&ra()||!e||typeof e=="string"&&(e in Vd||ra())||Dp(e)||Array.isArray(e)&&e.every(Lw))}function v0(e,t){e.timeline=t,e.onfinish=null}const sl=["read","resolveKeyframes","update","preRender","render","postRender"];function W2(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 c(u){o.has(u)&&(f.schedule(u),e()),l++,u(a)}const f={schedule:(u,d=!1,h=!1)=>{const x=h&&i?n:r;return d&&o.add(u),x.has(u)||x.add(u),u},cancel:u=>{r.delete(u),o.delete(u)},process:u=>{if(a=u,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(c),t&&y0.value&&y0.value.frameloop[t].push(l),l=0,n.clear(),i=!1,s&&(s=!1,f.process(u))}};return f}const K2=40;function Iw(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=sl.reduce((p,g)=>(p[g]=W2(s,t?g:void 0),p),{}),{read:a,resolveKeyframes:l,update:c,preRender:f,render:u,postRender:d}=o,h=()=>{const p=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(p-i.timestamp,K2),1),i.timestamp=p,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),f.process(i),u.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:sl.reduce((p,g)=>{const y=o[g];return p[g]=(C,b=!1,E=!1)=>(n||m(),y.schedule(C,b,E)),p},{}),cancel:p=>{for(let g=0;g<sl.length;g++)o[sl[g]].cancel(p)},state:i,steps:o}}const{schedule:Ip,cancel:kI}=Iw(queueMicrotask,!1),{schedule:he,cancel:Br,state:qe,steps:ef}=Iw(typeof requestAnimationFrame<"u"?requestAnimationFrame:Yt,!0);let Pl;function q2(){Pl=void 0}const An={now:()=>(Pl===void 0&&An.set(qe.isProcessing||$d.useManualTiming?qe.timestamp:performance.now()),Pl),set:e=>{Pl=e,queueMicrotask(q2)}},rn={x:!1,y:!1};function $w(){return rn.x||rn.y}function Q2(e){return e==="x"||e==="y"?rn[e]?null:(rn[e]=!0,()=>{rn[e]=!1}):rn.x||rn.y?null:(rn.x=rn.y=!0,()=>{rn.x=rn.y=!1})}function G2(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 Vw(e,t){const n=G2(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function x0(e){return!(e.pointerType==="touch"||$w())}function Y2(e,t,n={}){const[r,i,s]=Vw(e,n),o=a=>{if(!x0(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const f=u=>{x0(u)&&(c(u),l.removeEventListener("pointerleave",f))};l.addEventListener("pointerleave",f,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const Bw=(e,t)=>t?e===t?!0:Bw(e,t.parentElement):!1,$p=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,X2=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Z2(e){return X2.has(e.tagName)||e.tabIndex!==-1}const vo=new WeakSet;function w0(e){return t=>{t.key==="Enter"&&e(t)}}function tf(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const J2=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=w0(()=>{if(vo.has(n))return;tf(n,"down");const i=w0(()=>{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 b0(e){return $p(e)&&!$w()}function eP(e,t,n={}){const[r,i,s]=Vw(e,n),o=a=>{const l=a.currentTarget;if(!b0(a)||vo.has(l))return;vo.add(l);const c=t(l,a),f=(h,m)=>{window.removeEventListener("pointerup",u),window.removeEventListener("pointercancel",d),!(!b0(h)||!vo.has(l))&&(vo.delete(l),typeof c=="function"&&c(h,{success:m}))},u=h=>{f(h,l===window||l===document||n.useGlobalTarget||Bw(l,h.target))},d=h=>{f(h,!1)};window.addEventListener("pointerup",u,i),window.addEventListener("pointercancel",d,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),a instanceof HTMLElement&&(a.addEventListener("focus",c=>J2(c,i)),!Z2(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}const S0=30,tP=e=>!isNaN(parseFloat(e));class nP{constructor(t,n={}){this.version="12.7.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=An.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=An.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=tP(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 jp);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=An.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>S0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,S0);return Dw(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 ia(e,t){return new nP(e,t)}const zw=v.createContext({strict:!1}),T0={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"]},Is={};for(const e in T0)Is[e]={isEnabled:t=>T0[e].some(n=>!!t[n])};function rP(e){for(const t in e)Is[t]={...Is[t],...e[t]}}const iP=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 pu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||iP.has(e)}let Uw=e=>!pu(e);function sP(e){e&&(Uw=t=>t.startsWith("on")?!pu(t):e(t))}try{sP(require("@emotion/is-prop-valid").default)}catch{}function oP(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Uw(i)||n===!0&&pu(i)||!t&&!pu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function aP(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 Hu=v.createContext({});function Wu(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function sa(e){return typeof e=="string"||Array.isArray(e)}const Vp=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Bp=["initial",...Vp];function Ku(e){return Wu(e.animate)||Bp.some(t=>sa(e[t]))}function Hw(e){return!!(Ku(e)||e.variants)}function lP(e,t){if(Ku(e)){const{initial:n,animate:r}=e;return{initial:n===!1||sa(n)?n:void 0,animate:sa(r)?r:void 0}}return e.inherit!==!1?t:{}}function uP(e){const{initial:t,animate:n}=lP(e,v.useContext(Hu));return v.useMemo(()=>({initial:t,animate:n}),[E0(t),E0(n)])}function E0(e){return Array.isArray(e)?e.join(" "):e}const cP=Symbol.for("motionComponentSymbol");function is(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function fP(e,t,n){return v.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):is(n)&&(n.current=r))},[t])}const zp=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),dP="framerAppearId",Ww="data-"+zp(dP),Kw=v.createContext({});function hP(e,t,n,r,i){var x,w;const{visualElement:s}=v.useContext(Hu),o=v.useContext(zw),a=v.useContext(Uu),l=v.useContext(Ap).reducedMotion,c=v.useRef(null);r=r||o.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const f=c.current,u=v.useContext(Kw);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&pP(c.current,n,i,u);const d=v.useRef(!1);v.useInsertionEffect(()=>{f&&d.current&&f.update(n,a)});const h=n[Ww],m=v.useRef(!!h&&!((x=window.MotionHandoffIsComplete)!=null&&x.call(window,h))&&((w=window.MotionHasOptimisedAnimation)==null?void 0:w.call(window,h)));return Mw(()=>{f&&(d.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Ip.render(f.render),m.current&&f.animationState&&f.animationState.animateChanges())}),v.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 pP(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:qw(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&is(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:f,layoutScroll:l,layoutRoot:c})}function qw(e){if(e)return e.options.allowProjection!==!1?e.projection:qw(e.parent)}function mP({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&rP(e);function s(a,l){let c;const f={...v.useContext(Ap),...a,layoutId:gP(a)},{isStatic:u}=f,d=uP(a),h=r(a,u);if(!u&&Pp){yP();const m=vP(f);c=m.MeasureLayout,d.visualElement=hP(i,h,f,t,m.ProjectionNode)}return T.jsxs(Hu.Provider,{value:d,children:[c&&d.visualElement?T.jsx(c,{visualElement:d.visualElement,...f}):null,n(i,a,fP(h,d.visualElement,l),h,u,d.visualElement)]})}s.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const o=v.forwardRef(s);return o[cP]=i,o}function gP({layoutId:e}){const t=v.useContext(kp).id;return t&&e!==void 0?t+"-"+e:e}function yP(e,t){v.useContext(zw).strict}function vP(e){const{drag:t,layout:n}=Is;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 Qw=e=>t=>typeof t=="string"&&t.startsWith(e),Up=Qw("--"),xP=Qw("var(--"),Hp=e=>xP(e)?wP.test(e.split("/*")[0].trim()):!1,wP=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,oa={};function bP(e){for(const t in e)oa[t]=e[t],Up(t)&&(oa[t].isCSSVariable=!0)}const qs=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ni=new Set(qs);function Gw(e,{layout:t,layoutId:n}){return Ni.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!oa[e]||e==="opacity")}const nt=e=>!!(e&&e.getVelocity),Yw=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Zn=(e,t,n)=>n>t?t:n<e?e:n,Qs={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},aa={...Qs,transform:e=>Zn(0,1,e)},ol={...Qs,default:1},Ca=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),lr=Ca("deg"),Rn=Ca("%"),K=Ca("px"),SP=Ca("vh"),TP=Ca("vw"),C0={...Rn,parse:e=>Rn.parse(e)/100,transform:e=>Rn.transform(e*100)},EP={borderWidth:K,borderTopWidth:K,borderRightWidth:K,borderBottomWidth:K,borderLeftWidth:K,borderRadius:K,radius:K,borderTopLeftRadius:K,borderTopRightRadius:K,borderBottomRightRadius:K,borderBottomLeftRadius:K,width:K,maxWidth:K,height:K,maxHeight:K,top:K,right:K,bottom:K,left:K,padding:K,paddingTop:K,paddingRight:K,paddingBottom:K,paddingLeft:K,margin:K,marginTop:K,marginRight:K,marginBottom:K,marginLeft:K,backgroundPositionX:K,backgroundPositionY:K},CP={rotate:lr,rotateX:lr,rotateY:lr,rotateZ:lr,scale:ol,scaleX:ol,scaleY:ol,scaleZ:ol,skew:lr,skewX:lr,skewY:lr,distance:K,translateX:K,translateY:K,translateZ:K,x:K,y:K,z:K,perspective:K,transformPerspective:K,opacity:aa,originX:C0,originY:C0,originZ:K},k0={...Qs,transform:Math.round},Wp={...EP,...CP,zIndex:k0,size:K,fillOpacity:aa,strokeOpacity:aa,numOctaves:k0},kP={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},_P=qs.length;function PP(e,t,n){let r="",i=!0;for(let s=0;s<_P;s++){const o=qs[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 c=Yw(a,Wp[o]);if(!l){i=!1;const f=kP[o]||o;r+=`${f}(${c}) `}n&&(t[o]=c)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function Kp(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let o=!1,a=!1;for(const l in t){const c=t[l];if(Ni.has(l)){o=!0;continue}else if(Up(l)){i[l]=c;continue}else{const f=Yw(c,Wp[l]);l.startsWith("origin")?(a=!0,s[l]=f):r[l]=f}}if(t.transform||(o||n?r.transform=PP(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:f=0}=s;r.transformOrigin=`${l} ${c} ${f}`}}const qp=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Xw(e,t,n){for(const r in t)!nt(t[r])&&!Gw(r,n)&&(e[r]=t[r])}function AP({transformTemplate:e},t){return v.useMemo(()=>{const n=qp();return Kp(n,t,e),Object.assign({},n.vars,n.style)},[t])}function RP(e,t){const n=e.style||{},r={};return Xw(r,n,e),Object.assign(r,AP(e,t)),r}function OP(e,t){const n={},r=RP(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 MP=["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:!!(MP.indexOf(e)>-1||/[A-Z]/u.test(e))}const jP={offset:"stroke-dashoffset",array:"stroke-dasharray"},DP={offset:"strokeDashoffset",array:"strokeDasharray"};function FP(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?jP:DP;e[s.offset]=K.transform(-r);const o=K.transform(t),a=K.transform(n);e[s.array]=`${o} ${a}`}function _0(e,t,n){return typeof e=="string"?e:K.transform(t+n*e)}function NP(e,t,n){const r=_0(t,e.x,e.width),i=_0(n,e.y,e.height);return`${r} ${i}`}function Gp(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},f,u){if(Kp(e,c,u),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=NP(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&&FP(d,o,a,l,!1)}const Zw=()=>({...qp(),attrs:{}}),Yp=e=>typeof e=="string"&&e.toLowerCase()==="svg";function LP(e,t,n,r){const i=v.useMemo(()=>{const s=Zw();return Gp(s,t,Yp(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Xw(s,e.style,e),i.style={...s,...i.style}}return i}function IP(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(Qp(n)?LP:OP)(r,s,o,n),c=oP(r,typeof n=="string",e),f=n!==v.Fragment?{...c,...l,ref:i}:{},{children:u}=r,d=v.useMemo(()=>nt(u)?u.get():u,[u]);return v.createElement(n,{...f,children:d})}}function P0(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Xp(e,t,n,r){if(typeof t=="function"){const[i,s]=P0(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]=P0(r);t=t(n!==void 0?n:e.custom,i,s)}return t}const Bd=e=>Array.isArray(e),$P=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),VP=e=>Bd(e)?e[e.length-1]||0:e;function Al(e){const t=nt(e)?e.get():e;return $P(t)?t.toValue():t}function BP({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,s){const o={latestValues:zP(r,i,s,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const Jw=e=>(t,n)=>{const r=v.useContext(Hu),i=v.useContext(Uu),s=()=>BP(e,t,r,i);return n?s():_p(s)};function zP(e,t,n,r){const i={},s=r(e,{});for(const d in s)i[d]=Al(s[d]);let{initial:o,animate:a}=e;const l=Ku(e),c=Hw(e);t&&c&&!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 u=f?a:o;if(u&&typeof u!="boolean"&&!Wu(u)){const d=Array.isArray(u)?u:[u];for(let h=0;h<d.length;h++){const m=Xp(e,d[h]);if(m){const{transitionEnd:x,transition:w,...p}=m;for(const g in p){let y=p[g];if(Array.isArray(y)){const C=f?y.length-1:0;y=y[C]}y!==null&&(i[g]=y)}for(const g in x)i[g]=x[g]}}}return i}function Zp(e,t,n){var s;const{style:r}=e,i={};for(const o in r)(nt(r[o])||t.style&&nt(t.style[o])||Gw(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const UP={useVisualState:Jw({scrapeMotionValuesFromProps:Zp,createRenderState:qp})};function eb(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 tb(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 nb=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 rb(e,t,n,r){tb(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(nb.has(i)?i:zp(i),t.attrs[i])}function ib(e,t,n){const r=Zp(e,t,n);for(const i in e)if(nt(e[i])||nt(t[i])){const s=qs.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const A0=["x","y","width","height","cx","cy","r"],HP={useVisualState:Jw({scrapeMotionValuesFromProps:ib,createRenderState:Zw,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(Ni.has(a)){s=!0;break}}if(!s)return;let o=!t;if(t)for(let a=0;a<A0.length;a++){const l=A0[a];e[l]!==t[l]&&(o=!0)}o&&he.read(()=>{eb(n,r),he.render(()=>{Gp(r,i,Yp(n.tagName),e.transformTemplate),rb(n,r)})})}})};function WP(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Qp(r)?HP:UP,preloadedFeatures:e,useRender:IP(i),createVisualElement:t,Component:r};return mP(o)}}function la(e,t,n){const r=e.getProps();return Xp(r,t,n!==void 0?n:r.custom,e)}const sb=new Set(["width","height","top","left","right","bottom",...qs]);function KP(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ia(n))}function qP(e,t){const n=la(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=VP(s[o]);KP(e,o,a)}}function QP(e){return!!(nt(e)&&e.add)}function zd(e,t){const n=e.getValue("willChange");if(QP(n))return n.add(t);if(!n&&$d.WillChange){const r=new $d.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function ob(e){return e.props[Ww]}const ab=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,GP=1e-7,YP=12;function XP(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=ab(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>GP&&++a<YP);return o}function ka(e,t,n,r){if(e===t&&n===r)return Yt;const i=s=>XP(s,0,1,e,n);return s=>s===0||s===1?s:ab(i(s),t,r)}const lb=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ub=e=>t=>1-e(1-t),cb=ka(.33,1.53,.69,.99),Jp=ub(cb),fb=lb(Jp),db=e=>(e*=2)<1?.5*Jp(e):.5*(2-Math.pow(2,-10*(e-1))),em=e=>1-Math.sin(Math.acos(e)),hb=ub(em),pb=lb(em),mb=e=>/^0[^.\s]+$/u.test(e);function ZP(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||mb(e):!0}const Ao=e=>Math.round(e*1e5)/1e5,tm=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function JP(e){return e==null}const eA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,nm=(e,t)=>n=>!!(typeof n=="string"&&eA.test(n)&&n.startsWith(e)||t&&!JP(n)&&Object.prototype.hasOwnProperty.call(n,t)),gb=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(tm);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},tA=e=>Zn(0,255,e),nf={...Qs,transform:e=>Math.round(tA(e))},ai={test:nm("rgb","red"),parse:gb("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+nf.transform(e)+", "+nf.transform(t)+", "+nf.transform(n)+", "+Ao(aa.transform(r))+")"};function nA(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 Ud={test:nm("#"),parse:nA,transform:ai.transform},ss={test:nm("hsl","hue"),parse:gb("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Rn.transform(Ao(t))+", "+Rn.transform(Ao(n))+", "+Ao(aa.transform(r))+")"},et={test:e=>ai.test(e)||Ud.test(e)||ss.test(e),parse:e=>ai.test(e)?ai.parse(e):ss.test(e)?ss.parse(e):Ud.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ai.transform(e):ss.transform(e)},rA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function iA(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(tm))==null?void 0:t.length)||0)+(((n=e.match(rA))==null?void 0:n.length)||0)>0}const yb="number",vb="color",sA="var",oA="var(",R0="${}",aA=/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 ua(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(aA,l=>(et.test(l)?(r.color.push(s),i.push(vb),n.push(et.parse(l))):l.startsWith(oA)?(r.var.push(s),i.push(sA),n.push(l)):(r.number.push(s),i.push(yb),n.push(parseFloat(l))),++s,R0)).split(R0);return{values:n,split:a,indexes:r,types:i}}function xb(e){return ua(e).values}function wb(e){const{split:t,types:n}=ua(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===yb?s+=Ao(i[o]):a===vb?s+=et.transform(i[o]):s+=i[o]}return s}}const lA=e=>typeof e=="number"?0:e;function uA(e){const t=xb(e);return wb(e)(t.map(lA))}const zr={test:iA,parse:xb,createTransformer:wb,getAnimatableNone:uA},cA=new Set(["brightness","contrast","saturate","opacity"]);function fA(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(tm)||[];if(!r)return e;const i=n.replace(r,"");let s=cA.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const dA=/\b([a-z-]*)\(.*?\)/gu,Hd={...zr,getAnimatableNone:e=>{const t=e.match(dA);return t?t.map(fA).join(" "):e}},hA={...Wp,color:et,backgroundColor:et,outlineColor:et,fill:et,stroke:et,borderColor:et,borderTopColor:et,borderRightColor:et,borderBottomColor:et,borderLeftColor:et,filter:Hd,WebkitFilter:Hd},bb=e=>hA[e];function Sb(e,t){let n=bb(e);return n!==Hd&&(n=zr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const pA=new Set(["auto","none","0"]);function mA(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!pA.has(s)&&ua(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=Sb(n,i)}const li=e=>e*180/Math.PI,Wd=e=>{const t=li(Math.atan2(e[1],e[0]));return Kd(t)},gA={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Wd,rotateZ:Wd,skewX:e=>li(Math.atan(e[1])),skewY:e=>li(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Kd=e=>(e=e%360,e<0&&(e+=360),e),O0=Wd,M0=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),j0=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),yA={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:M0,scaleY:j0,scale:e=>(M0(e)+j0(e))/2,rotateX:e=>Kd(li(Math.atan2(e[6],e[5]))),rotateY:e=>Kd(li(Math.atan2(-e[2],e[0]))),rotateZ:O0,rotate:O0,skewX:e=>li(Math.atan(e[4])),skewY:e=>li(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function D0(e){return e.includes("scale")?1:0}function qd(e,t){if(!e||e==="none")return D0(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=yA,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=gA,i=a}if(!i)return D0(t);const s=r[t],o=i[1].split(",").map(xA);return typeof s=="function"?s(o):o[s]}const vA=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return qd(n,t)};function xA(e){return parseFloat(e.trim())}const F0=e=>e===Qs||e===K,wA=new Set(["x","y","z"]),bA=qs.filter(e=>!wA.has(e));function SA(e){const t=[];return bA.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const $s={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})=>qd(t,"x"),y:(e,{transform:t})=>qd(t,"y")};$s.translateX=$s.x;$s.translateY=$s.y;const wi=new Set;let Qd=!1,Gd=!1;function Tb(){if(Gd){const e=Array.from(wi).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=SA(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)})}Gd=!1,Qd=!1,wi.forEach(e=>e.complete()),wi.clear()}function Eb(){wi.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Gd=!0)})}function TA(){Eb(),Tb()}class rm{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?(wi.add(this),Qd||(Qd=!0,he.read(Eb),he.resolveKeyframes(Tb))):(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),wi.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,wi.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Cb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),EA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function CA(e){const t=EA.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function kb(e,t,n=1){const[r,i]=CA(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return Cb(o)?parseFloat(o):o}return Hp(i)?kb(i,t,n+1):i}const _b=e=>t=>t.test(e),kA={test:e=>e==="auto",parse:e=>e},Pb=[Qs,K,Rn,lr,TP,SP,kA],N0=e=>Pb.find(_b(e));class Ab extends rm{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 c=t[l];if(typeof c=="string"&&(c=c.trim(),Hp(c))){const f=kb(c,n.current);f!==void 0&&(t[l]=f),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!sb.has(r)||t.length!==2)return;const[i,s]=t,o=N0(i),a=N0(s);if(o!==a)if(F0(o)&&F0(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)ZP(t[i])&&r.push(i);r.length&&mA(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=$s[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]=$s[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,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const L0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(zr.test(e)||e==="0")&&!e.startsWith("url("));function _A(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 PA(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=L0(i,t),a=L0(s,t);return!o||!a?!1:_A(e)||(n==="spring"||Fp(n))&&r}const AA=e=>e!==null;function qu(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(AA),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const RA=40;class Rb{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=An.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>RA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&TA(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=An.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!PA(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 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 OA({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 mu(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)},MA=[Ud,ai,ss],jA=e=>MA.find(t=>t.test(e));function I0(e){const t=jA(e);if(!t)return!1;let n=t.parse(e);return t===ss&&(n=OA(n)),n}const $0=(e,t)=>{const n=I0(e),r=I0(t);if(!n||!r)return mu(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),ai.transform(i))},DA=(e,t)=>n=>t(e(n)),_a=(...e)=>e.reduce(DA),Yd=new Set(["none","hidden"]);function FA(e,t){return Yd.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function NA(e,t){return n=>be(e,t,n)}function im(e){return typeof e=="number"?NA:typeof e=="string"?Hp(e)?mu:et.test(e)?$0:$A:Array.isArray(e)?Ob:typeof e=="object"?et.test(e)?$0:LA:mu}function Ob(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>im(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function LA(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=im(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function IA(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 $A=(e,t)=>{const n=zr.createTransformer(t),r=ua(e),i=ua(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?Yd.has(e)&&!i.values.length||Yd.has(t)&&!r.values.length?FA(e,t):_a(Ob(IA(r,i),i.values),n):mu(e,t)};function Mb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?be(e,t,n):im(e)(e,t)}const VA=5;function jb(e,t,n){const r=Math.max(t-VA,0);return Dw(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 BA({duration:e=Ce.duration,bounce:t=Ce.bounce,velocity:n=Ce.velocity,mass:r=Ce.mass}){let i,s,o=1-t;o=Zn(Ce.minDamping,Ce.maxDamping,o),e=Zn(Ce.minDuration,Ce.maxDuration,Pn(e)),o<1?(i=c=>{const f=c*o,u=f*e,d=f-n,h=Xd(c,o),m=Math.exp(-u);return of-d/h*m},s=c=>{const u=c*o*e,d=u*n+n,h=Math.pow(o,2)*Math.pow(c,2)*e,m=Math.exp(-u),x=Xd(Math.pow(c,2),o);return(-i(c)+of>0?-1:1)*((d-h)*m)/x}):(i=c=>{const f=Math.exp(-c*e),u=(c-n)*e+1;return-of+f*u},s=c=>{const f=Math.exp(-c*e),u=(n-c)*(e*e);return f*u});const a=5/e,l=UA(i,s,a);if(e=_n(e),isNaN(l))return{stiffness:Ce.stiffness,damping:Ce.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const zA=12;function UA(e,t,n){let r=n;for(let i=1;i<zA;i++)r=r-e(r)/t(r);return r}function Xd(e,t){return e*Math.sqrt(1-t*t)}const HA=["duration","bounce"],WA=["stiffness","damping","mass"];function V0(e,t){return t.some(n=>e[n]!==void 0)}function KA(e){let t={velocity:Ce.velocity,stiffness:Ce.stiffness,damping:Ce.damping,mass:Ce.mass,isResolvedFromDuration:!1,...e};if(!V0(e,WA)&&V0(e,HA))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*Zn(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Ce.mass,stiffness:i,damping:s}}else{const n=BA(e);t={...t,...n,mass:Ce.mass},t.isResolvedFromDuration=!0}return t}function gu(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:c,mass:f,duration:u,velocity:d,isResolvedFromDuration:h}=KA({...n,velocity:-Pn(n.velocity||0)}),m=d||0,x=c/(2*Math.sqrt(l*f)),w=o-s,p=Pn(Math.sqrt(l/f)),g=Math.abs(w)<5;r||(r=g?Ce.restSpeed.granular:Ce.restSpeed.default),i||(i=g?Ce.restDelta.granular:Ce.restDelta.default);let y;if(x<1){const b=Xd(p,x);y=E=>{const k=Math.exp(-x*p*E);return o-k*((m+x*p*w)/b*Math.sin(b*E)+w*Math.cos(b*E))}}else if(x===1)y=b=>o-Math.exp(-p*b)*(w+(m+p*w)*b);else{const b=p*Math.sqrt(x*x-1);y=E=>{const k=Math.exp(-x*p*E),P=Math.min(b*E,300);return o-k*((m+x*p*w)*Math.sinh(P)+b*w*Math.cosh(P))/b}}const C={calculatedDuration:h&&u||null,next:b=>{const E=y(b);if(h)a.done=b>=u;else{let k=0;x<1&&(k=b===0?_n(m):jb(y,b,E));const P=Math.abs(k)<=r,M=Math.abs(o-E)<=i;a.done=P&&M}return a.value=a.done?o:E,a},toString:()=>{const b=Math.min(Lp(C),hu),E=Fw(k=>C.next(b*k).value,b,30);return b+"ms "+E},toTransition:()=>{}};return C}gu.applyToOptions=e=>{const t=H2(e,100,gu);return e.ease=ra()?t.ease:"easeOut",e.duration=_n(t.duration),e.type="keyframes",e};function B0({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:f}){const u=e[0],d={done:!1,value:u},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 w=u+x,p=o===void 0?w:o(w);p!==w&&(x=p-u);const g=P=>-x*Math.exp(-P/r),y=P=>p+g(P),C=P=>{const M=g(P),j=y(P);d.done=Math.abs(M)<=c,d.value=d.done?p:j};let b,E;const k=P=>{h(d.value)&&(b=P,E=gu({keyframes:[d.value,m(d.value)],velocity:jb(y,P,d.value),damping:i,stiffness:s,restDelta:c,restSpeed:f}))};return k(0),{calculatedDuration:null,next:P=>{let M=!1;return!E&&b===void 0&&(M=!0,C(P),k(P)),b!==void 0&&P>=b?E.next(P-b):(!M&&C(P),d)}}}const qA=ka(.42,0,1,1),QA=ka(0,0,.58,1),Db=ka(.42,0,.58,1),GA=e=>Array.isArray(e)&&typeof e[0]!="number",z0={linear:Yt,easeIn:qA,easeInOut:Db,easeOut:QA,circIn:em,circInOut:pb,circOut:hb,backIn:Jp,backInOut:fb,backOut:cb,anticipate:db},U0=e=>{if(Dp(e)){Id(e.length===4);const[t,n,r,i]=e;return ka(t,n,r,i)}else if(typeof e=="string")return Id(z0[e]!==void 0),z0[e];return e};function YA(e,t,n){const r=[],i=n||Mb,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]||Yt:t;a=_a(l,a)}r.push(a)}return r}function XA(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(Id(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=YA(t,r,i),l=a.length,c=f=>{if(o&&f<e[0])return t[0];let u=0;if(l>1)for(;u<e.length-2&&!(f<e[u+1]);u++);const d=na(e[u],e[u+1],f);return a[u](d)};return n?f=>c(Zn(e[0],e[s-1],f)):c}function ZA(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=na(0,t,r);e.push(be(n,1,i))}}function JA(e){const t=[0];return ZA(t,e.length-1),t}function eR(e,t){return e.map(n=>n*t)}function tR(e,t){return e.map(()=>t||Db).splice(0,e.length-1)}function yu({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=GA(r)?r.map(U0):U0(r),s={done:!1,value:t[0]},o=eR(n&&n.length===t.length?n:JA(t),e),a=XA(o,t,{ease:Array.isArray(i)?i:tR(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const nR=e=>{const t=({timestamp:n})=>e(n);return{start:()=>he.update(t,!0),stop:()=>Br(t),now:()=>qe.isProcessing?qe.timestamp:An.now()}},rR={decay:B0,inertia:B0,tween:yu,keyframes:yu,spring:gu},iR=e=>e/100;class sm extends Rb{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)||rm,a=(l,c)=>this.onKeyframesResolved(l,c);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:rR[n]||yu;let l,c;a!==yu&&typeof t[0]!="number"&&(l=_a(iR,Mb(t[0],t[1])),t=[0,100]);const f=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),f.calculatedDuration===null&&(f.calculatedDuration=Lp(f));const{calculatedDuration:u}=f,d=u+i,h=d*(r+1)-i;return{generator:f,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:u,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:c,totalDuration:f,resolvedDuration:u}=r;if(this.startTime===null)return s.next(0);const{delay:d,repeat:h,repeatType:m,repeatDelay:x,onUpdate:w}=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 y=this.currentTime,C=s;if(h){const P=Math.min(this.currentTime,f)/u;let M=Math.floor(P),j=P%1;!j&&P>=1&&(j=1),j===1&&M--,M=Math.min(M,h+1),!!(M%2)&&(m==="reverse"?(j=1-j,x&&(j-=x/u)):m==="mirror"&&(C=o)),y=Zn(0,1,j)*u}const b=g?{done:!1,value:l[0]}:C.next(y);a&&(b.value=a(b.value));let{done:E}=b;!g&&c!==null&&(E=this.speed>=0?this.currentTime>=f:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return k&&i!==void 0&&(b.value=qu(l,this.options,i)),w&&w(b.value),k&&this.finish(),b}get duration(){const{resolved:t}=this;return t?Pn(t.calculatedDuration):0}get time(){return Pn(this.currentTime)}set time(t){t=_n(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=Pn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=nR,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 sR=new Set(["opacity","clipPath","filter","transform"]),oR=Mp(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),vu=10,aR=2e4;function lR(e){return Fp(e.type)||e.type==="spring"||!Lw(e.ease)}function uR(e,t){const n=new sm({...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<aR;)r=n.sample(s),i.push(r.value),s+=vu;return{times:void 0,keyframes:i,duration:s-vu,ease:"linear"}}const Fb={anticipate:db,backInOut:fb,circInOut:pb};function cR(e){return e in Fb}class H0 extends Rb{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new Ab(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:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&ra()&&cR(s)&&(s=Fb[s]),lR(this.options)){const{onComplete:u,onUpdate:d,motionValue:h,element:m,...x}=this.options,w=uR(t,x);t=w.keyframes,t.length===1&&(t[1]=t[0]),r=w.duration,i=w.times,s=w.ease,o="keyframes"}const f=U2(a.owner.current,l,t,{...this.options,duration:r,times:i,ease:s});return f.startTime=c??this.calcStartTime(),this.pendingTimeline?(v0(f,this.pendingTimeline),this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:u}=this.options;a.set(qu(t,this.options,n)),u&&u(),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 Pn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Pn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=_n(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 Yt;const{animation:r}=n;v0(r,t)}return Yt}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:c,onUpdate:f,onComplete:u,element:d,...h}=this.options,m=new sm({...h,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),x=_n(this.time);c.setWithVelocity(m.sample(x-vu).value,m.sample(x).value,vu)}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:c}=n.owner.getProps();return oR()&&r&&sR.has(r)&&(r!=="transform"||!c)&&!l&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}const fR={type:"spring",stiffness:500,damping:25,restSpeed:10},dR=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),hR={type:"keyframes",duration:.8},pR={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},mR=(e,{keyframes:t})=>t.length>2?hR:Ni.has(e)?e.startsWith("scale")?dR(t[1]):fR:pR;function gR({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:c,...f}){return!!Object.keys(f).length}const om=(e,t,n,r={},i,s)=>o=>{const a=Np(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-_n(l);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,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};gR(a)||(f={...f,...mR(e,f)}),f.duration&&(f.duration=_n(f.duration)),f.repeatDelay&&(f.repeatDelay=_n(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let u=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(u=!0)),f.allowFlatten=!a.type&&!a.ease,u&&!s&&t.get()!==void 0){const d=qu(f.keyframes,a);if(d!==void 0)return he.update(()=>{f.onUpdate(d),f.onComplete()}),new V2([])}return!s&&H0.supports(f)?new H0(f):new sm(f)};function yR({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Nb(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:o,...a}=t;r&&(s=r);const l=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const f in a){const u=e.getValue(f,e.latestValues[f]??null),d=a[f];if(d===void 0||c&&yR(c,f))continue;const h={delay:n,...Np(s||{},f)};let m=!1;if(window.MotionHandoffAnimation){const w=ob(e);if(w){const p=window.MotionHandoffAnimation(w,f,he);p!==null&&(h.startTime=p,m=!0)}}zd(e,f),u.start(om(f,u,d,e.shouldReduceMotion&&sb.has(f)?{type:!1}:h,e,m));const x=u.animation;x&&l.push(x)}return o&&Promise.all(l).then(()=>{he.update(()=>{o&&qP(e,o)})}),l}function Zd(e,t,n={}){var l;const r=la(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(Nb(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:f=0,staggerChildren:u,staggerDirection:d}=i;return vR(e,t,f+c,u,d,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,f]=a==="beforeChildren"?[s,o]:[o,s];return c().then(()=>f())}else return Promise.all([s(),o(n.delay)])}function vR(e,t,n=0,r=0,i=1,s){const o=[],a=(e.variantChildren.size-1)*r,l=i===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(xR).forEach((c,f)=>{c.notify("AnimationStart",t),o.push(Zd(c,t,{...s,delay:n+l(f)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(o)}function xR(e,t){return e.sortNodePosition(t)}function wR(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Zd(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Zd(e,t,n);else{const i=typeof t=="function"?la(e,t,n.custom):t;r=Promise.all(Nb(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Lb(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 bR=Bp.length;function Ib(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Ib(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<bR;n++){const r=Bp[n],i=e.props[r];(sa(i)||i===!1)&&(t[r]=i)}return t}const SR=[...Vp].reverse(),TR=Vp.length;function ER(e){return t=>Promise.all(t.map(({animation:n,options:r})=>wR(e,n,r)))}function CR(e){let t=ER(e),n=W0(),r=!0;const i=l=>(c,f)=>{var d;const u=la(e,f,l==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);if(u){const{transition:h,transitionEnd:m,...x}=u;c={...c,...x,...m}}return c};function s(l){t=l(e)}function o(l){const{props:c}=e,f=Ib(e.parent)||{},u=[],d=new Set;let h={},m=1/0;for(let w=0;w<TR;w++){const p=SR[w],g=n[p],y=c[p]!==void 0?c[p]:f[p],C=sa(y),b=p===l?g.isActive:null;b===!1&&(m=w);let E=y===f[p]&&y!==c[p]&&C;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),g.protectedKeys={...h},!g.isActive&&b===null||!y&&!g.prevProp||Wu(y)||typeof y=="boolean")continue;const k=kR(g.prevProp,y);let P=k||p===l&&g.isActive&&!E&&C||w>m&&C,M=!1;const j=Array.isArray(y)?y:[y];let I=j.reduce(i(p),{});b===!1&&(I={});const{prevResolvedValues:re={}}=g,ie={...re,...I},xe=ne=>{P=!0,d.has(ne)&&(M=!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;Bd(O)&&Bd(L)?B=!Lb(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=y,g.prevResolvedValues=I,g.isActive&&(h={...h,...I}),r&&e.blockInitialAnimation&&(P=!1),P&&(!(E&&k)||M)&&u.push(...j.map(ne=>({animation:ne,options:{type:p}})))}if(d.size){const w={};if(typeof c.initial!="boolean"){const p=la(e,Array.isArray(c.initial)?c.initial[0]:c.initial);p&&p.transition&&(w.transition=p.transition)}d.forEach(p=>{const g=e.getBaseTarget(p),y=e.getValue(p);y&&(y.liveStyle=!0),w[p]=g??null}),u.push({animation:w})}let x=!!u.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(x=!1),r=!1,x?t(u):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)==null||u.forEach(d=>{var h;return(h=d.animationState)==null?void 0:h.setActive(l,c)}),n[l].isActive=c;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=W0(),r=!0}}}function kR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Lb(t,e):!1}function Xr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function W0(){return{animate:Xr(!0),whileInView:Xr(),whileHover:Xr(),whileTap:Xr(),whileDrag:Xr(),whileFocus:Xr(),exit:Xr()}}class qr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class _R extends qr{constructor(t){super(t),t.animationState||(t.animationState=CR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Wu(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 PR=0;class AR extends qr{constructor(){super(...arguments),this.id=PR++}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 RR={animation:{Feature:_R},exit:{Feature:AR}};function ca(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Pa(e){return{point:{x:e.pageX,y:e.pageY}}}const OR=e=>t=>$p(t)&&e(t,Pa(t));function Ro(e,t,n,r){return ca(e,t,OR(n),r)}function $b({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function MR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function jR(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 Vb=1e-4,DR=1-Vb,FR=1+Vb,Bb=.01,NR=0-Bb,LR=0+Bb;function at(e){return e.max-e.min}function IR(e,t,n){return Math.abs(e-t)<=n}function K0(e,t,n,r=.5){e.origin=r,e.originPoint=be(t.min,t.max,e.origin),e.scale=at(n)/at(t),e.translate=be(n.min,n.max,e.origin)-e.originPoint,(e.scale>=DR&&e.scale<=FR||isNaN(e.scale))&&(e.scale=1),(e.translate>=NR&&e.translate<=LR||isNaN(e.translate))&&(e.translate=0)}function Oo(e,t,n,r){K0(e.x,t.x,n.x,r?r.originX:void 0),K0(e.y,t.y,n.y,r?r.originY:void 0)}function q0(e,t,n){e.min=n.min+t.min,e.max=e.min+at(t)}function $R(e,t,n){q0(e.x,t.x,n.x),q0(e.y,t.y,n.y)}function Q0(e,t,n){e.min=t.min-n.min,e.max=e.min+at(t)}function Mo(e,t,n){Q0(e.x,t.x,n.x),Q0(e.y,t.y,n.y)}const G0=()=>({translate:0,scale:1,origin:0,originPoint:0}),os=()=>({x:G0(),y:G0()}),Y0=()=>({min:0,max:0}),Pe=()=>({x:Y0(),y:Y0()});function zt(e){return[e("x"),e("y")]}function af(e){return e===void 0||e===1}function Jd({scale:e,scaleX:t,scaleY:n}){return!af(e)||!af(t)||!af(n)}function ti(e){return Jd(e)||zb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function zb(e){return X0(e.x)||X0(e.y)}function X0(e){return e&&e!=="0%"}function xu(e,t,n){const r=e-n,i=t*r;return n+i}function Z0(e,t,n,r,i){return i!==void 0&&(e=xu(e,i,r)),xu(e,n,r)+t}function eh(e,t=0,n=1,r,i){e.min=Z0(e.min,t,n,r,i),e.max=Z0(e.max,t,n,r,i)}function Ub(e,{x:t,y:n}){eh(e.x,t.translate,t.scale,t.originPoint),eh(e.y,n.translate,n.scale,n.originPoint)}const J0=.999999999999,ey=1.0000000000001;function VR(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&&ls(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Ub(e,o)),r&&ti(s.latestValues)&&ls(e,s.latestValues))}t.x<ey&&t.x>J0&&(t.x=1),t.y<ey&&t.y>J0&&(t.y=1)}function as(e,t){e.min=e.min+t,e.max=e.max+t}function ty(e,t,n,r,i=.5){const s=be(e.min,e.max,i);eh(e,t,n,s,r)}function ls(e,t){ty(e.x,t.x,t.scaleX,t.scale,t.originX),ty(e.y,t.y,t.scaleY,t.scale,t.originY)}function Hb(e,t){return $b(jR(e.getBoundingClientRect(),t))}function BR(e,t,n){const r=Hb(e,n),{scroll:i}=t;return i&&(as(r.x,i.offset.x),as(r.y,i.offset.y)),r}const Wb=({current:e})=>e?e.ownerDocument.defaultView:null,ny=(e,t)=>Math.abs(e-t);function zR(e,t){const n=ny(e.x,t.x),r=ny(e.y,t.y);return Math.sqrt(n**2+r**2)}class Kb{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 u=uf(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=zR(u.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:m}=u,{timestamp:x}=qe;this.history.push({...m,timestamp:x});const{onStart:w,onMove:p}=this.handlers;d||(w&&w(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),p&&p(this.lastMoveEvent,u)},this.handlePointerMove=(u,d)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=lf(d,this.transformPagePoint),he.update(this.updatePoint,!0)},this.handlePointerUp=(u,d)=>{this.end();const{onEnd:h,onSessionEnd:m,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=uf(u.type==="pointercancel"?this.lastMoveEventInfo:lf(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(u,w),m&&m(u,w)},!$p(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=Pa(t),a=lf(o,this.transformPagePoint),{point:l}=a,{timestamp:c}=qe;this.history=[{...l,timestamp:c}];const{onSessionStart:f}=n;f&&f(t,uf(a,this.history)),this.removeListeners=_a(Ro(this.contextWindow,"pointermove",this.handlePointerMove),Ro(this.contextWindow,"pointerup",this.handlePointerUp),Ro(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Br(this.updatePoint)}}function lf(e,t){return t?{point:t(e.point)}:e}function ry(e,t){return{x:e.x-t.x,y:e.y-t.y}}function uf({point:e},t){return{point:e,delta:ry(e,qb(t)),offset:ry(e,UR(t)),velocity:HR(t,.1)}}function UR(e){return e[0]}function qb(e){return e[e.length-1]}function HR(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=qb(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>_n(t)));)n--;if(!r)return{x:0,y:0};const s=Pn(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 WR(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 iy(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 KR(e,{top:t,left:n,bottom:r,right:i}){return{x:iy(e.x,n,i),y:iy(e.y,t,r)}}function sy(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 qR(e,t){return{x:sy(e.x,t.x),y:sy(e.y,t.y)}}function QR(e,t){let n=.5;const r=at(e),i=at(t);return i>r?n=na(t.min,t.max-r,e.min):r>i&&(n=na(e.min,e.max-i,t.min)),Zn(0,1,n)}function GR(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 th=.35;function YR(e=th){return e===!1?e=0:e===!0&&(e=th),{x:oy(e,"left","right"),y:oy(e,"top","bottom")}}function oy(e,t,n){return{min:ay(e,t),max:ay(e,n)}}function ay(e,t){return typeof e=="number"?e:e[t]||0}const XR=new WeakMap;class ZR{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:u}=this.getProps();u?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Pa(f).point)},s=(f,u)=>{const{drag:d,dragPropagation:h,onDragStart:m}=this.getProps();if(d&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Q2(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),zt(w=>{let p=this.getAxisMotionValue(w).get()||0;if(Rn.test(p)){const{projection:g}=this.visualElement;if(g&&g.layout){const y=g.layout.layoutBox[w];y&&(p=at(y)*(parseFloat(p)/100))}}this.originPoint[w]=p}),m&&he.postRender(()=>m(f,u)),zd(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},o=(f,u)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:m,onDrag:x}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:w}=u;if(h&&this.currentDirection===null){this.currentDirection=JR(w),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",u.point,w),this.updateAxis("y",u.point,w),this.visualElement.render(),x&&x(f,u)},a=(f,u)=>this.stop(f,u),l=()=>zt(f=>{var u;return this.getAnimationState(f)==="paused"&&((u=this.getAxisMotionValue(f).animation)==null?void 0:u.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Kb(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Wb(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||!al(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=WR(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&&is(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=KR(r.layoutBox,t):this.constraints=!1,this.elastic=YR(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&zt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=GR(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!is(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=BR(r,i.root,this.visualElement.getTransformPagePoint());let o=qR(i.layout.layoutBox,s);if(n){const a=n(MR(o));this.hasMutatedConstraints=!!a,a&&(o=$b(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=zt(f=>{if(!al(f,n,this.currentDirection))return;let u=l&&l[f]||{};o&&(u={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,...u};return this.startAxisValueAnimation(f,m)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return zd(this.visualElement,t),r.start(om(t,r,0,n,this.visualElement,!1))}stopAnimation(){zt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){zt(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){zt(n=>{const{drag:r}=this.getProps();if(!al(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(!is(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};zt(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=QR({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(),zt(o=>{if(!al(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(be(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;XR.set(this.visualElement,this);const t=this.visualElement.current,n=Ro(t,"pointerdown",l=>{const{drag:c,dragListener:f=!0}=this.getProps();c&&f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();is(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=ca(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(zt(f=>{const u=this.getAxisMotionValue(f);u&&(this.originPoint[f]+=l[f].translate,u.set(u.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=th,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function al(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function JR(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class eO extends qr{constructor(t){super(t),this.removeGroupControls=Yt,this.removeListeners=Yt,this.controls=new ZR(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Yt}unmount(){this.removeGroupControls(),this.removeListeners()}}const ly=e=>(t,n)=>{e&&he.postRender(()=>e(t,n))};class tO extends qr{constructor(){super(...arguments),this.removePointerDownListener=Yt}onPointerDown(t){this.session=new Kb(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Wb(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:ly(t),onStart:ly(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&he.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=Ro(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 Rl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function uy(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const lo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(K.test(e))e=parseFloat(e);else return e;const n=uy(e,t.target.x),r=uy(e,t.target.y);return`${n}% ${r}%`}},nO={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=zr.parse(e);if(i.length>5)return r;const s=zr.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 c=be(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),s(i)}};class rO extends v.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;bP(iO),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()})),Rl.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(),Ip.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 Qb(e){const[t,n]=jw(),r=v.useContext(kp);return T.jsx(rO,{...e,layoutGroup:r,switchLayoutGroup:v.useContext(Kw),isPresent:t,safeToRemove:n})}const iO={borderRadius:{...lo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:lo,borderTopRightRadius:lo,borderBottomLeftRadius:lo,borderBottomRightRadius:lo,boxShadow:nO};function sO(e,t,n){const r=nt(e)?e:ia(e);return r.start(om("",r,t,n)),r.animation}function oO(e){return e instanceof SVGElement&&e.tagName!=="svg"}const aO=(e,t)=>e.depth-t.depth;class lO{constructor(){this.children=[],this.isDirty=!1}add(t){Rp(this.children,t),this.isDirty=!0}remove(t){Op(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(aO),this.isDirty=!1,this.children.forEach(t)}}function uO(e,t){const n=An.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(Br(r),e(s-t))};return he.read(r,!0),()=>Br(r)}const Gb=["TopLeft","TopRight","BottomLeft","BottomRight"],cO=Gb.length,cy=e=>typeof e=="string"?parseFloat(e):e,fy=e=>typeof e=="number"||K.test(e);function fO(e,t,n,r,i,s){i?(e.opacity=be(0,n.opacity??1,dO(r)),e.opacityExit=be(t.opacity??1,0,hO(r))):s&&(e.opacity=be(t.opacity??1,n.opacity??1,r));for(let o=0;o<cO;o++){const a=`border${Gb[o]}Radius`;let l=dy(t,a),c=dy(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||fy(l)===fy(c)?(e[a]=Math.max(be(cy(l),cy(c),r),0),(Rn.test(c)||Rn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=be(t.rotate||0,n.rotate||0,r))}function dy(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const dO=Yb(0,.5,hb),hO=Yb(.5,.95,Yt);function Yb(e,t,n){return r=>r<e?0:r>t?1:n(na(e,t,r))}function hy(e,t){e.min=t.min,e.max=t.max}function $t(e,t){hy(e.x,t.x),hy(e.y,t.y)}function py(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function my(e,t,n,r,i){return e-=t,e=xu(e,1/n,r),i!==void 0&&(e=xu(e,1/i,r)),e}function pO(e,t=0,n=1,r=.5,i,s=e,o=e){if(Rn.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=my(e.min,t,n,a,i),e.max=my(e.max,t,n,a,i)}function gy(e,t,[n,r,i],s,o){pO(e,t[n],t[r],t[i],t.scale,s,o)}const mO=["x","scaleX","originX"],gO=["y","scaleY","originY"];function yy(e,t,n,r){gy(e.x,t,mO,n?n.x:void 0,r?r.x:void 0),gy(e.y,t,gO,n?n.y:void 0,r?r.y:void 0)}function vy(e){return e.translate===0&&e.scale===1}function Xb(e){return vy(e.x)&&vy(e.y)}function xy(e,t){return e.min===t.min&&e.max===t.max}function yO(e,t){return xy(e.x,t.x)&&xy(e.y,t.y)}function wy(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Zb(e,t){return wy(e.x,t.x)&&wy(e.y,t.y)}function by(e){return at(e.x)/at(e.y)}function Sy(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class vO{constructor(){this.members=[]}add(t){Rp(this.members,t),t.scheduleRender()}remove(t){if(Op(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 xO(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:c,rotate:f,rotateX:u,rotateY:d,skewX:h,skewY:m}=n;c&&(r=`perspective(${c}px) ${r}`),f&&(r+=`rotate(${f}deg) `),u&&(r+=`rotateX(${u}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"],wO={visibility:"hidden"},Ty=1e3;let bO=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 Jb(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ob(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&&Jb(r)}function eS({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=bO++,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(EO),this.nodes.forEach(AO),this.nodes.forEach(RO),this.nodes.forEach(CO)},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 lO)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new jp),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=oO(o),this.instance=o;const{layoutId:l,layout:c,visualElement:f}=this.options;if(f&&!f.current&&f.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let u;const d=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,u&&u(),u=uO(d,250),Rl.hasAnimatedSinceResize&&(Rl.hasAnimatedSinceResize=!1,this.nodes.forEach(Cy))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&f&&(l||c)&&this.addEventListener("didUpdate",({delta:u,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()||FO,{onLayoutAnimationStart:w,onLayoutAnimationComplete:p}=f.getProps(),g=!this.targetLayout||!Zb(this.targetLayout,m),y=!d&&h;if(this.options.layoutRoot||this.resumeFrom||y||d&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(u,y);const C={...Np(x,"layout"),onPlay:w,onComplete:p};(f.shouldReduceMotion||this.options.layoutRoot)&&(C.delay=0,C.type=!1),this.startAnimation(C)}else d||Cy(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,Br(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(OO),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&&Jb(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f<this.path.length;f++){const u=this.path[f];u.shouldResetTransform=!0,u.updateScroll("snapshot"),u.options.layoutRoot&&u.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ey);return}this.isUpdating||this.nodes.forEach(_O),this.isUpdating=!1,this.nodes.forEach(PO),this.nodes.forEach(SO),this.nodes.forEach(TO),this.clearAllSnapshots();const a=An.now();qe.delta=Zn(0,1e3/60,a-qe.timestamp),qe.timestamp=a,qe.isProcessing=!0,ef.update.process(qe),ef.preRender.process(qe),ef.render.process(qe),qe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ip.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(kO),this.sharedNodes.forEach(MO)}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&&!at(this.snapshot.measuredBox.x)&&!at(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&&!Xb(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,f=c!==this.prevTransformTemplateValue;o&&(a||ti(this.latestValues)||f)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),NO(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:o}=this.options;if(!o)return Pe();const a=o.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(LO))){const{scroll:f}=this.root;f&&(as(a.x,f.offset.x),as(a.y,f.offset.y))}return a}removeElementScroll(o){var l;const a=Pe();if($t(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const f=this.path[c],{scroll:u,options:d}=f;f!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&$t(a,o),as(a.x,u.offset.x),as(a.y,u.offset.y))}return a}applyTransform(o,a=!1){const l=Pe();$t(l,o);for(let c=0;c<this.path.length;c++){const f=this.path[c];!a&&f.options.layoutScroll&&f.scroll&&f!==f.root&&ls(l,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),ti(f.latestValues)&&ls(l,f.latestValues)}return ti(this.latestValues)&&ls(l,this.latestValues),l}removeTransform(o){const a=Pe();$t(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!ti(c.latestValues))continue;Jd(c.latestValues)&&c.updateSnapshot();const f=Pe(),u=c.measurePageBox();$t(f,u),yy(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,f)}return ti(this.latestValues)&&yy(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!==qe.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:u}=this.options;if(!(!this.layout||!(f||u))){if(this.resolvedRelativeTargetAt=qe.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),$t(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(),$R(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):$t(this.target,this.layout.layoutBox),Ub(this.target,this.targetDelta)):$t(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),$t(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Jd(this.parent.latestValues)||zb(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===qe.timestamp&&(l=!1),l)return;const{layout:c,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||!(c||f))return;$t(this.layoutCorrected,this.layout.layoutBox);const u=this.treeScale.x,d=this.treeScale.y;VR(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():(py(this.prevProjectionDelta.x,this.projectionDelta.x),py(this.prevProjectionDelta.y,this.projectionDelta.y)),Oo(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==u||this.treeScale.y!==d||!Sy(this.projectionDelta.x,this.prevProjectionDelta.x)||!Sy(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=os(),this.projectionDelta=os(),this.projectionDeltaWithTransform=os()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},f={...this.latestValues},u=os();(!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,w=this.getStack(),p=!w||w.members.length<=1,g=!!(x&&!p&&this.options.crossfade===!0&&!this.path.some(DO));this.animationProgress=0;let y;this.mixTargetDelta=C=>{const b=C/1e3;ky(u.x,o.x,b),ky(u.y,o.y,b),this.setTargetDelta(u),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Mo(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),jO(this.relativeTarget,this.relativeTargetOrigin,d,b),y&&yO(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=Pe()),$t(y,this.relativeTarget)),x&&(this.animationValues=f,fO(f,c,this.latestValues,b,g,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=b},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&&(Br(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=he.update(()=>{Rl.hasAnimatedSinceResize=!0,this.currentAnimation=sO(0,Ty,{...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(Ty),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:f}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&tS(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Pe();const u=at(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const d=at(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}$t(a,l),ls(a,f),Oo(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new vO),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.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 c=this.getStack();c&&c.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 c={};l.z&&ff("z",o,c,this.animationValues);for(let f=0;f<cf.length;f++)ff(`rotate${cf[f]}`,o,c,this.animationValues),ff(`skew${cf[f]}`,o,c,this.animationValues);o.render();for(const f in c)o.setStaticValue(f,c[f]),this.animationValues&&(this.animationValues[f]=c[f]);o.scheduleRender()}getProjectionStyles(o){if(!this.instance||this.isSVG)return;if(!this.isVisible)return wO;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=Al(o==null?void 0:o.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none",a;const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){const h={};return this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=Al(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!ti(this.latestValues)&&(h.transform=l?l({},""):"none",this.hasProjected=!1),h}const f=c.animationValues||c.latestValues;this.applyTransformsToTarget(),a.transform=xO(this.projectionDeltaWithTransform,this.treeScale,f),l&&(a.transform=l(f,a.transform));const{x:u,y:d}=this.projectionDelta;a.transformOrigin=`${u.origin*100}% ${d.origin*100}% 0`,c.animationValues?a.opacity=c===this?f.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:a.opacity=c===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const h in oa){if(f[h]===void 0)continue;const{correct:m,applyTo:x,isCSSVariable:w}=oa[h],p=a.transform==="none"?f[h]:m(f[h],c);if(x){const g=x.length;for(let y=0;y<g;y++)a[x[y]]=p}else w?this.options.visualElement.renderState.vars[h]=p:a[h]=p}return this.options.layoutId&&(a.pointerEvents=c===this?Al(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(Ey),this.root.sharedNodes.clear()}}}function SO(e){e.updateLayout()}function TO(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"?zt(u=>{const d=o?t.measuredBox[u]:t.layoutBox[u],h=at(d);d.min=r[u].min,d.max=d.min+h}):tS(s,t.layoutBox,r)&&zt(u=>{const d=o?t.measuredBox[u]:t.layoutBox[u],h=at(r[u]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+h)});const a=os();Oo(a,r,t.layoutBox);const l=os();o?Oo(l,e.applyTransform(i,!0),t.measuredBox):Oo(l,r,t.layoutBox);const c=!Xb(a);let f=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:h}=u;if(d&&h){const m=Pe();Mo(m,t.layoutBox,d.layoutBox);const x=Pe();Mo(x,r,h.layoutBox),Zb(m,x)||(f=!0),u.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=m,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:f})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function EO(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 CO(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function kO(e){e.clearSnapshot()}function Ey(e){e.clearMeasurements()}function _O(e){e.isLayoutDirty=!1}function PO(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Cy(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function AO(e){e.resolveTargetDelta()}function RO(e){e.calcProjection()}function OO(e){e.resetSkewAndRotation()}function MO(e){e.removeLeadSnapshot()}function ky(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 _y(e,t,n,r){e.min=be(t.min,n.min,r),e.max=be(t.max,n.max,r)}function jO(e,t,n,r){_y(e.x,t.x,n.x,r),_y(e.y,t.y,n.y,r)}function DO(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const FO={duration:.45,ease:[.4,0,.1,1]},Py=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ay=Py("applewebkit/")&&!Py("chrome/")?Math.round:Yt;function Ry(e){e.min=Ay(e.min),e.max=Ay(e.max)}function NO(e){Ry(e.x),Ry(e.y)}function tS(e,t,n){return e==="position"||e==="preserve-aspect"&&!IR(by(t),by(n),.2)}function LO(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const IO=eS({attachResizeListener:(e,t)=>ca(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),df={current:void 0},nS=eS({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!df.current){const e=new IO({});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"}),$O={pan:{Feature:tO},drag:{Feature:eO,ProjectionNode:nS,MeasureLayout:Qb}};function Oy(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,Pa(t)))}class VO extends qr{mount(){const{current:t}=this.node;t&&(this.unmount=Y2(t,(n,r)=>(Oy(this.node,r,"Start"),i=>Oy(this.node,i,"End"))))}unmount(){}}class BO extends qr{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=_a(ca(this.node.current,"focus",()=>this.onFocus()),ca(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function My(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,Pa(t)))}class zO extends qr{mount(){const{current:t}=this.node;t&&(this.unmount=eP(t,(n,r)=>(My(this.node,r,"Start"),(i,{success:s})=>My(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const nh=new WeakMap,hf=new WeakMap,UO=e=>{const t=nh.get(e.target);t&&t(e)},HO=e=>{e.forEach(UO)};function WO({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(HO,{root:e,...t})),r[i]}function KO(e,t,n){const r=WO(t);return nh.set(e,n),r.observe(e),()=>{nh.delete(e),r.unobserve(e)}}const qO={some:0,all:1};class QO extends qr{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:qO[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:f,onViewportLeave:u}=this.node.getProps(),d=c?f:u;d&&d(l)};return KO(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(GO(t,n))&&this.startObserver()}unmount(){}}function GO({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const YO={inView:{Feature:QO},tap:{Feature:zO},focus:{Feature:BO},hover:{Feature:VO}},XO={layout:{ProjectionNode:nS,MeasureLayout:Qb}},rh={current:null},rS={current:!1};function ZO(){if(rS.current=!0,!!Pp)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>rh.current=e.matches;e.addListener(t),t()}else rh.current=!1}const JO=[...Pb,et,zr],eM=e=>JO.find(_b(e)),tM=new WeakMap;function nM(e,t,n){for(const r in t){const i=t[r],s=n[r];if(nt(i))e.addValue(r,i);else if(nt(s))e.addValue(r,ia(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,ia(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const jy=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class rM{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=rm,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=An.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,he.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:f}=o;this.onUpdate=f,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,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=Ku(n),this.isVariantNode=Hw(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in d){const m=d[h];l[h]!==void 0&&nt(m)&&m.set(l[h],!1)}}mount(t){this.current=t,tM.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)),rS.current||ZO(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:rh.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Br(this.notifyUpdate),Br(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=Ni.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 Is){const n=Is[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<jy.length;r++){const i=jy[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=nM(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=ia(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"&&(Cb(r)||mb(r))?r=parseFloat(r):!eM(r)&&zr.test(n)&&(r=Sb(t,n)),this.setBaseTarget(t,nt(r)?r.get():r)),nt(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=Xp(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&&!nt(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 jp),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class iS extends rM{constructor(){super(...arguments),this.KeyframeResolver=Ab}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;nt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function iM(e){return window.getComputedStyle(e)}class sM extends iS{constructor(){super(...arguments),this.type="html",this.renderInstance=tb}readValueFromInstance(t,n){if(Ni.has(n))return vA(t,n);{const r=iM(t),i=(Up(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Hb(t,n)}build(t,n,r){Kp(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Zp(t,n,r)}}class oM extends iS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Pe,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&eb(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ni.has(n)){const r=bb(n);return r&&r.default||0}return n=nb.has(n)?n:zp(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return ib(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&he.postRender(this.updateDimensions)}build(t,n,r){Gp(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){rb(t,n,r,i)}mount(t){this.isSVGTag=Yp(t.tagName),super.mount(t)}}const aM=(e,t)=>Qp(e)?new oM(t):new sM(t,{allowProjection:e!==v.Fragment}),lM=WP({...RR,...YO,...$O,...XO},aM),Jn=aP(lM),uM=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),Vt=e=>{const[t,n]=e.split("-");return uM(t)?n?`var(--color-${t}-${n})`:`var(--color-${e}-500)`:`var(--color-${e})`};var fr=(e=>(e.None="none",e.Sm="sm",e.Md="md",e.Lg="lg",e.Xl="xl",e.Full="full",e))(fr||{});const sS=v.createContext({}),cM={[U.Background]:"",[U.Border]:"initial",[U.TooltipText]:Vt("blue-700"),[U.TooltipBackground]:Vt("blue-100"),[U.TooltipBorder]:Vt("blue-500"),[U.HeaderBackground]:Vt("zink-600"),[U.HeaderBorder]:"initial",[U.HeaderText]:"white",[U.FooterBackground]:"",[U.FooterBorder]:"",[U.FooterText]:"",[U.MessageAdminBackground]:"",[U.MessageAdminText]:"",[U.MessageVisitorBackground]:"",[U.MessageVisitorText]:"",[U.GreeterBackground]:"white",[U.GreeterText]:"",[U.GreeterBorder]:"",[U.GreeterTopBackground]:Vt("zink-600"),[U.GreeterTopText]:"white",[U.GreeterButtonBackground]:Vt("blue-500"),[U.GreeterButtonText]:Vt("white"),[U.ButtonBackground]:Vt("blue-500"),[U.ButtonText]:Vt("white"),[U.InputBackground]:Vt("white"),[U.InputText]:Vt("gray-800"),[U.InputBorder]:Vt("slate-200")},fM={[fr.None]:"0px",[fr.Sm]:"var(--radius-xs)",[fr.Md]:"var(--radius-sm)",[fr.Lg]:"var(--radius-md)",[fr.Xl]:"var(--radius-lg)",[fr.Full]:"calc(infinity * 1px)"},dM=e=>{const t={...cM};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 hM({children:e,widget:t}){const n=dM(t),r=t&&t.appearance&&t.appearance.design&&t.appearance.design.border_radius?t.appearance.design.border_radius:fr.Md,i=o=>n[o],s=()=>fM[r];return T.jsx(sS.Provider,{value:{colors:n,getColor:i,getRadius:s},children:e})}const tr=()=>v.useContext(sS);function Vs({children:e,type:t="button",variant:n="primary",kind:r="solid",size:i="md",disabled:s=!1,rounded:o=!1,className:a,textKey:l=U.ButtonText,bgKey:c=U.ButtonBackground,animations:f={},...u}){const d=tr();return T.jsx(Jn.button,{type:t,className:ze("flex items-center justify-center focus:!ring-0",{"rounded-full":o&&i!=="xs","rounded-md":!o},a,O2[n][r],M2[i][o?"rounded":"default"]),disabled:s,style:{color:d.getColor(l),backgroundColor:d.getColor(c),...o?{}:{borderRadius:d.getRadius()}},...f,...u,children:e})}function je(){}je.Home=function(t){return T.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:T.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"})})};je.Chat=e=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:T.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"})});je.Menu=e=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:T.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})});je.MessageTyping=({className:e="size-5",...t})=>T.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:T.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"})});je.Check=function(t){return T.jsx("svg",{fill:"currentColor",viewBox:"0 0 16 16",height:"1em",width:"1em",...t,children:T.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"})})};je.Website=function(t){return T.jsxs("svg",{fill:"none",viewBox:"0 0 24 24",height:"1em",width:"1em",...t,children:[T.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"}),T.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"}),T.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"})]})};je.ArrowDown=e=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:T.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3"})});je.XCircle=({className:e="e-5",...t})=>T.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:T.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"})});je.X=({className:e="e-5",...t})=>T.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:T.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})});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 Ol=Object.create(null);Object.keys(Mn).forEach(e=>{Ol[Mn[e]]=e});const ih={type:"error",data:"parser error"},oS=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",aS=typeof ArrayBuffer=="function",lS=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,am=({type:e,data:t},n,r)=>oS&&t instanceof Blob?n?r(t):Dy(t,r):aS&&(t instanceof ArrayBuffer||lS(t))?n?r(t):Dy(new Blob([t]),r):r(Mn[e]+(t||"")),Dy=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Fy(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let pf;function pM(e,t){if(oS&&e.data instanceof Blob)return e.data.arrayBuffer().then(Fy).then(t);if(aS&&(e.data instanceof ArrayBuffer||lS(e.data)))return t(Fy(e.data));am(e,!1,n=>{pf||(pf=new TextEncoder),t(pf.encode(n))})}const Ny="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xo=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<Ny.length;e++)xo[Ny.charCodeAt(e)]=e;const mM=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 c=new ArrayBuffer(t),f=new Uint8Array(c);for(r=0;r<n;r+=4)s=xo[e.charCodeAt(r)],o=xo[e.charCodeAt(r+1)],a=xo[e.charCodeAt(r+2)],l=xo[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 c},gM=typeof ArrayBuffer=="function",lm=(e,t)=>{if(typeof e!="string")return{type:"message",data:uS(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:yM(e.substring(1),t)}:Ol[n]?e.length>1?{type:Ol[n],data:e.substring(1)}:{type:Ol[n]}:ih},yM=(e,t)=>{if(gM){const n=mM(e);return uS(n,t)}else return{base64:!0,data:e}},uS=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},cS="",vM=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,o)=>{am(s,!1,a=>{r[o]=a,++i===n&&t(r.join(cS))})})},xM=(e,t)=>{const n=e.split(cS),r=[];for(let i=0;i<n.length;i++){const s=lm(n[i],t);if(r.push(s),s.type==="error")break}return r};function wM(){return new TransformStream({transform(e,t){pM(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 ll(e){return e.reduce((t,n)=>t+n.length,0)}function ul(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 bM(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(ll(n)<1)break;const l=ul(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(ll(n)<2)break;const l=ul(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(ll(n)<8)break;const l=ul(n,8),c=new DataView(l.buffer,l.byteOffset,l.length),f=c.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(ih);break}i=f*Math.pow(2,32)+c.getUint32(4),r=3}else{if(ll(n)<i)break;const l=ul(n,i);a.enqueue(lm(s?l:mf.decode(l),t)),r=0}if(i===0||i>e){a.enqueue(ih);break}}}})}const fS=4;function Me(e){if(e)return SM(e)}function SM(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")(),TM="arraybuffer";function dS(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const EM=qt.setTimeout,CM=qt.clearTimeout;function Gu(e,t){t.useNativeTimers?(e.setTimeoutFn=EM.bind(qt),e.clearTimeoutFn=CM.bind(qt)):(e.setTimeoutFn=qt.setTimeout.bind(qt),e.clearTimeoutFn=qt.clearTimeout.bind(qt))}const kM=1.33;function _M(e){return typeof e=="string"?PM(e):Math.ceil((e.byteLength||e.size)*kM)}function PM(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 hS(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function AM(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function RM(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 OM extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class um extends Me{constructor(t){super(),this.writable=!1,Gu(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 OM(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=lm(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=AM(t);return n.length?"?"+n:""}}class MM extends um{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)};xM(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,vM(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]=hS()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let pS=!1;try{pS=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const jM=pS;function DM(){}class FM extends MM{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 On extends Me{constructor(t,n,r){super(),this.createRequest=t,Gu(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=dS(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=On.requestsCount++,On.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=DM,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete On.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()}}On.requestsCount=0;On.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Ly);else if(typeof addEventListener=="function"){const e="onpagehide"in qt?"pagehide":"unload";addEventListener(e,Ly,!1)}}function Ly(){for(let e in On.requests)On.requests.hasOwnProperty(e)&&On.requests[e].abort()}const NM=function(){const e=mS({xdomain:!1});return e&&e.responseType!==null}();class LM extends FM{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=NM&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new On(mS,this.uri(),t)}}function mS(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||jM))return new XMLHttpRequest}catch{}if(!t)try{return new qt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const gS=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class IM extends um{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=gS?{}:dS(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;am(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]=hS()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const gf=qt.WebSocket||qt.MozWebSocket;class $M extends IM{createSocket(t,n,r){return gS?new gf(t,n,r):n?new gf(t,n):new gf(t)}doWrite(t,n){this.ws.send(n)}}class VM extends um{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=bM(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=wM();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 BM={websocket:$M,webtransport:VM,polling:LM},zM=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,UM=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function sh(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=zM.exec(e||""),s={},o=14;for(;o--;)s[UM[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=HM(s,s.path),s.queryKey=WM(s,s.query),s}function HM(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 WM(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const oh=typeof addEventListener=="function"&&typeof removeEventListener=="function",Ml=[];oh&&addEventListener("offline",()=>{Ml.forEach(e=>e())},!1);class Nr extends Me{constructor(t,n){if(super(),this.binaryType=TM,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=sh(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=sh(n.host).host);Gu(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=RM(this.opts.query)),oh&&(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=fS,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&&Nr.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",Nr.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+=_M(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(Nr.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(),oh&&(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}}}Nr.protocol=fS;class KM extends Nr{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;Nr.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",u=>{if(!r)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Nr.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=u=>{const d=new Error("probe error: "+u);d.transport=n.name,s(),this.emitReserved("upgradeError",d)};function a(){o("transport closed")}function l(){o("socket closed")}function c(u){n&&u.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",c)};n.once("open",i),n.once("error",o),n.once("close",a),this.once("close",l),this.once("upgrading",c),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 qM=class extends KM{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=>BM[i]).filter(i=>!!i)),super(t,r)}};function QM(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=sh(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 GM=typeof ArrayBuffer=="function",YM=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,yS=Object.prototype.toString,XM=typeof Blob=="function"||typeof Blob<"u"&&yS.call(Blob)==="[object BlobConstructor]",ZM=typeof File=="function"||typeof File<"u"&&yS.call(File)==="[object FileConstructor]";function cm(e){return GM&&(e instanceof ArrayBuffer||YM(e))||XM&&e instanceof Blob||ZM&&e instanceof File}function jl(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(jl(e[n]))return!0;return!1}if(cm(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return jl(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&jl(e[n]))return!0;return!1}function JM(e){const t=[],n=e.data,r=e;return r.data=ah(n,t),r.attachments=t.length,{packet:r,buffers:t}}function ah(e,t){if(!e)return e;if(cm(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]=ah(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]=ah(e[r],t));return n}return e}function ej(e,t){return e.data=lh(e.data,t),delete e.attachments,e}function lh(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]=lh(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=lh(e[n],t));return e}const tj=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],nj=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 rj{constructor(t){this.replacer=t}encode(t){return(t.type===te.EVENT||t.type===te.ACK)&&jl(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=JM(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function Iy(e){return Object.prototype.toString.call(e)==="[object Object]"}class fm 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 ij(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(cm(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(fm.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 Iy(n);case te.DISCONNECT:return n===void 0;case te.CONNECT_ERROR:return typeof n=="string"||Iy(n);case te.EVENT:case te.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&tj.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 ij{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=ej(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const sj=Object.freeze(Object.defineProperty({__proto__:null,Decoder:fm,Encoder:rj,get PacketType(){return te},protocol:nj},Symbol.toStringTag,{value:"Module"}));function ln(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const oj=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class vS 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=[ln(t,"open",this.onopen.bind(this)),ln(t,"packet",this.onpacket.bind(this)),ln(t,"error",this.onerror.bind(this)),ln(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(oj.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++,u=n.pop();this._registerAckCallback(f,u),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 Gs(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}Gs.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};Gs.prototype.reset=function(){this.attempts=0};Gs.prototype.setMin=function(e){this.ms=e};Gs.prototype.setMax=function(e){this.max=e};Gs.prototype.setJitter=function(e){this.jitter=e};class uh 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,Gu(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 Gs({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||sj;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 qM(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=ln(n,"open",function(){r.onopen(),t&&t()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=ln(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(ln(t,"ping",this.onping.bind(this)),ln(t,"data",this.ondata.bind(this)),ln(t,"error",this.onerror.bind(this)),ln(t,"close",this.onclose.bind(this)),ln(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 vS(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 uo={};function Dl(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=QM(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=uo[i]&&s in uo[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new uh(r,t):(uo[i]||(uo[i]=new uh(r,t)),l=uo[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(Dl,{Manager:uh,Socket:vS,io:Dl,connect:Dl});const Fl=e=>{const t=document.cookie.split(";").find(n=>n.includes(e));return t?t.split("=")[1]:null},xS=v.createContext(null),Ys=()=>v.useContext(xS),aj=({children:e})=>{const[t,n]=v.useState(null),[r,i]=v.useState(!1),s=()=>{const u=Dl(yk,{transports:["websocket"],auth:{customer_token:Fl("customer_token"),device_id:Fl("device_id"),customer_refresh_token:Fl("customer_refresh_token")}});u.on("error",d=>{console.error("Websocket error",d)}),u.on("connect",()=>{n(u),i(!0)})},o=()=>{t&&(t.connect(),i(!0))},a=()=>{t&&(t.disconnect(),i(!1))},l=(u,d)=>{t&&t.on(u,d)},c=(u,d)=>{t&&t.off(u,d)},f=(u,d,h)=>{t&&t.emit(u,d,h)};return T.jsx(xS.Provider,{value:{socket:t,connected:r,connect:s,reconnect:o,disconnect:a,on:l,off:c,emit:f},children:e})};var jn=(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))(jn||{}),fn=(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))(fn||{});const dm=e=>{const t=Sw(),n=(r,i)=>{var o;const s=((o=vI.find(a=>a.name===r))==null?void 0:o.path)??"/";return typeof i=="object"&&s.includes(":")?Object.entries(i).reduce((a,[l,c])=>a.replace(`:${l}`,c),s):i?`${s}?${i}`:s};return{push:(r,i)=>{t(n(r,i),e)},path:n}},lj=()=>Jk({mutationFn:e=>Vu(`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})})}),uj=e=>Vu(`clients/${e}/chats`),wu=e=>Vu(`clients/${e}/chats`,{method:"DELETE"}),wS=(e,t,n)=>{const r=typeof window<"u"?window:void 0;v.useEffect(()=>(r.addEventListener(e,t),()=>{r.removeEventListener(e,t,!1)}),[e,t,r])},hm=()=>typeof window<"u"?/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent):!1;function cj(){var r,i,s,o;const{widget:e,isHaveChat:t}=Fn(),n=tr();return T.jsxs(Jn.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:ze("absolute bottom-full mb-3 p-3 shadow-lg whitespace-nowrap","w-auto right-0"),style:{borderRadius:n.getRadius(),backgroundColor:n.getColor(U.TooltipBackground),color:n.getColor(U.TooltipText)},children:[T.jsx(Jn.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.1,duration:.3},className:"text-sm font-medium",style:{color:n.getColor(U.TooltipText)},children:(t?(i=(r=e==null?void 0:e.appearance)==null?void 0:r.design)==null?void 0:i.tooltip_message_active:(o=(s=e==null?void 0:e.appearance)==null?void 0:s.design)==null?void 0:o.tooltip_message)||"Bizimle sohbet edin!"}),T.jsx("div",{className:ze("absolute bottom-0 right-4 w-3 h-3 transform rotate-45 translate-y-1.5 bg-blue-100")})]})}function fj({children:e,defaultOpen:t,border:n}){var g,y,C,b;const r=Ys(),{open:i,setOpen:s,setIsHaveChat:o,isHaveChat:a,widget:l}=Fn(),[c]=v.useState(!0),f=dm(),u=Ea(),d=tr(),h=hm();v.useEffect(()=>{a&&u.pathname==="/"&&f.push("chat")},[a]);const m=()=>{s(!0),r&&r.emit(jn.WidgetOpen,{})},x=()=>{s(!1),r&&r.emit(jn.WidgetClose,{})},w=()=>{s(!1),o(!1),wu(l.client_id),f.push("registration")},p=async()=>{s(!1),o(!1),await wu(l.client_id),f.push("registration")};return v.useEffect(()=>{if(t&&s(!0),!(!r||!l))return r.on(fn.Banned,w),r.on(fn.ChatUserClose,p),()=>{r.off(fn.Banned,w),r.off(fn.ChatUserClose,p)}},[]),T.jsx("section",{className:"relative w-full h-full",children:T.jsxs(ta,{children:[i&&T.jsx(Jn.div,{initial:{opacity:0,scale:.9,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.9,y:10},transition:{type:"spring",damping:25,stiffness:300},style:{width:h?"":((y=(g=l==null?void 0:l.appearance)==null?void 0:g.design)==null?void 0:y.width)||"22.5rem",height:h?"":((b=(C=l==null?void 0:l.appearance)==null?void 0:C.design)==null?void 0:b.height)||"32rem",left:h?"0":"",borderColor:d.getColor(U.Border)},className:ze("fixed z-300 rounded-md",{"border border-solid dark:border-zink-500":n,"bottom-12 right-12":!h,"bottom-0 right-0":h}),children:e}),T.jsx("div",{className:"absolute bottom-0 right-0 z-400",children:T.jsxs(ta,{children:[!i&&c&&T.jsx(cj,{}),!i&&T.jsxs(Vs,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:m,children:[T.jsx(Jn.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:ze("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:d.getColor(U.ButtonBackground)}}),T.jsx(je.Chat,{className:"size-6"})]}),i&&!h&&T.jsx(Vs,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:x,children:T.jsx(je.X,{className:"size-6"})})]})})]})})}function bS(e){const{widget:t}=Fn();return T.jsx(hM,{widget:t,children:T.jsx(fj,{...e})})}function Li(e){this._maxSize=e,this.clear()}Li.prototype.clear=function(){this._size=0,this._values=Object.create(null)};Li.prototype.get=function(e){return this._values[e]};Li.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var dj=/[^.^\]^[]+|(?=\[\]|\.\.)/g,SS=/^\d+$/,hj=/^\d/,pj=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,mj=/^\s*(['"]?)(.*?)(\1)\s*$/,pm=512,$y=new Li(pm),Vy=new Li(pm),By=new Li(pm),bi={Cache:Li,split:ch,normalizePath:yf,setter:function(e){var t=yf(e);return Vy.get(e)||Vy.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=yf(e);return By.get(e)||By.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+(mm(n)||SS.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){gj(Array.isArray(e)?e:ch(e),t,n)}};function yf(e){return $y.get(e)||$y.set(e,ch(e).map(function(t){return t.replace(mj,"$2")}))}function ch(e){return e.match(dj)||[""]}function gj(e,t,n){var r=e.length,i,s,o,a;for(s=0;s<r;s++)i=e[s],i&&(xj(i)&&(i='"'+i+'"'),a=mm(i),o=!a&&/^\d+$/.test(i),t.call(n,i,a,o,s,e))}function mm(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function yj(e){return e.match(hj)&&!e.match(SS)}function vj(e){return pj.test(e)}function xj(e){return!mm(e)&&(yj(e)||vj(e))}const wj=/[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,Yu=e=>e.match(wj)||[],Xu=e=>e[0].toUpperCase()+e.slice(1),gm=(e,t)=>Yu(e).join(t).toLowerCase(),TS=e=>Yu(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),bj=e=>Xu(TS(e)),Sj=e=>gm(e,"_"),Tj=e=>gm(e,"-"),Ej=e=>Xu(gm(e," ")),Cj=e=>Yu(e).map(Xu).join(" ");var vf={words:Yu,upperFirst:Xu,camelCase:TS,pascalCase:bj,snakeCase:Sj,kebabCase:Tj,sentenceCase:Ej,titleCase:Cj},ym={exports:{}};ym.exports=function(e){return ES(kj(e),e)};ym.exports.array=ES;function ES(e,t){var n=e.length,r=new Array(n),i={},s=n,o=_j(t),a=Pj(e);for(t.forEach(function(c){if(!a.has(c[0])||!a.has(c[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(c,f,u){if(u.has(c)){var d;try{d=", node was:"+JSON.stringify(c)}catch{d=""}throw new Error("Cyclic dependency"+d)}if(!a.has(c))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(c));if(!i[f]){i[f]=!0;var h=o.get(c)||new Set;if(h=Array.from(h),f=h.length){u.add(c);do{var m=h[--f];l(m,a.get(m),u)}while(f);u.delete(c)}r[--n]=c}}}function kj(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 _j(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 Pj(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}var Aj=ym.exports;const Rj=zs(Aj),Oj=Object.prototype.toString,Mj=Error.prototype.toString,jj=RegExp.prototype.toString,Dj=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Fj=/^Symbol\((.*)\)(.*)$/;function Nj(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function zy(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return Nj(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return Dj.call(e).replace(Fj,"Symbol($1)");const r=Oj.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+Mj.call(e)+"]":r==="RegExp"?jj.call(e):null}function Lr(e,t){let n=zy(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let s=zy(this[r],t);return s!==null?s:i},2)}function CS(e){return e==null?[]:[].concat(e)}let kS,_S,PS,Lj=/\$\{\s*(\w+)\s*\}/g;kS=Symbol.toStringTag;class Uy{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[kS]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],CS(t).forEach(s=>{if(xt.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]}}_S=Symbol.hasInstance;PS=Symbol.toStringTag;class xt 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(Lj,(i,s)=>Lr(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 Uy(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[PS]="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,xt)}static[_S](t){return Uy[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let xn={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 \`${Lr(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Lr(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${Lr(n,!0)}\``+i}},ht={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"},Ij={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"},fh={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},$j={isValue:"${path} field must be ${value}"},Nl={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Vj={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"},Bj={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: \`${Lr(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: \`${Lr(n,!0)}\``}return xt.formatError(xn.notType,e)}};Object.assign(Object.create(null),{mixed:xn,string:ht,number:Ij,date:fh,object:Nl,array:Vj,boolean:$j,tuple:Bj});const vm=e=>e&&e.__isYupSchema__;class bu{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 bu(t,(a,l)=>{var c;let f=o(...a)?i:s;return(c=f==null?void 0:f(l))!=null?c: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(!vm(i))throw new TypeError("conditions must return a schema object");return i.resolve(n)}}const cl={context:"$",value:"."};class Ii{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]===cl.context,this.isValue=this.key[0]===cl.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?cl.context:this.isValue?cl.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&bi.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}}Ii.prototype.__isYupRef=!0;const ui=e=>e==null;function Wi(e){function t({value:n,path:r="",options:i,originalValue:s,schema:o},a,l){const{name:c,test:f,params:u,message:d,skipAbsent:h}=e;let{parent:m,context:x,abortEarly:w=o.spec.abortEarly,disableStackTrace:p=o.spec.disableStackTrace}=i;function g(I){return Ii.isRef(I)?I.getValue(n,m,x):I}function y(I={}){const re=Object.assign({value:n,originalValue:s,label:o.spec.label,path:I.path||r,spec:o.spec,disableStackTrace:I.disableStackTrace||p},u,I.params);for(const xe of Object.keys(re))re[xe]=g(re[xe]);const ie=new xt(xt.formatError(I.message||d,re),n,re.path,I.type||c,re.disableStackTrace);return ie.params=re,ie}const C=w?a:l;let b={path:r,parent:m,type:c,from:i.from,createError:y,resolve:g,options:i,originalValue:s,schema:o};const E=I=>{xt.isError(I)?C(I):I?l(null):C(y())},k=I=>{xt.isError(I)?C(I):a(I)};if(h&&ui(n))return E(!0);let M;try{var j;if(M=f.call(b,n,b),typeof((j=M)==null?void 0:j.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${b.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(M).then(E,k)}}catch(I){k(I);return}E(M)}return t.OPTIONS=e,t}function zj(e,t,n,r=n){let i,s,o;return t?(bi.forEach(t,(a,l,c)=>{let f=l?a.slice(1,a.length-1):a;e=e.resolve({context:r,parent:i,value:n});let u=e.type==="tuple",d=c?parseInt(f,10):0;if(e.innerType||u){if(u&&!c)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=u?e.spec.types[d]:e.innerType}if(!c){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 Su extends Set{describe(){const t=[];for(const n of this.values())t.push(Ii.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 Su(this.values())}merge(t,n){const r=this.clone();return t.forEach(i=>r.add(i)),n.forEach(i=>r.delete(i)),r}}function us(e,t=new Map){if(vm(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]=us(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,us(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(us(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=us(i,t)}else throw Error(`Unable to clone ${e}`);return n}class Dn{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 Su,this._blacklist=new Su,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(xn.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=us(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&&ui(s))return s;let o=Lr(t),a=Lr(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 c=[];for(let f of Object.values(this.internalTests))f&&c.push(f);this.runTests({path:s,value:l,originalValue:o,options:n,tests:c},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:c}=t,f=x=>{i||(i=!0,n(x,o))},u=x=>{i||(i=!0,r(x,o))},d=s.length,h=[];if(!d)return u([]);let m={value:o,originalValue:a,path:l,options:c,schema:this};for(let x=0;x<s.length;x++){const w=s[x];w(m,f,function(g){g&&(Array.isArray(g)?h.push(...g):h.push(g)),--d<=0&&u(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 c=r[a];const f=Object.assign({},o,{strict:!0,parent:r,value:c,originalValue:s[a],key:void 0,[l?"index":"key"]:a,path:l||a.includes(".")?`${i||""}[${l?a:`"${a}"`}]`:(i?`${i}.`:"")+t});return(u,d,h)=>this.resolve(f)._validate(c,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,c)=>{xt.isError(l)&&(l.value=c),a(l)},(l,c)=>{l.length?a(new xt(l,c,void 0,void 0,s)):o(c)}))}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 xt.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new xt(a,t,void 0,void 0,o);s=l}),s}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(xt.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(xt.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):us(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=Wi({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=Wi({message:n,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=xn.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=xn.notNull){return this.nullability(!1,t)}required(t=xn.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=xn.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),i=Wi(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=CS(t).map(s=>new Ii(s));return i.forEach(s=>{s.isSibling&&r.deps.push(s.key)}),r.conditions.push(typeof n=="function"?new bu(i,n):bu.fromOptions(i,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=Wi({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=xn.oneOf){let r=this.clone();return t.forEach(i=>{r._whitelist.add(i),r._blacklist.delete(i)}),r.internalTests.whiteList=Wi({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=xn.notOneOf){let r=this.clone();return t.forEach(i=>{r._blacklist.add(i),r._whitelist.delete(i)}),r.internalTests.blacklist=Wi({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,c,f)=>f.findIndex(u=>u.name===l.name)===c)}}}Dn.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Dn.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:o}=zM(this,t,n,r.context);return o[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])Dn.prototype[e]=Dn.prototype.oneOf;for(const e of["not","nope"])Dn.prototype[e]=Dn.prototype.notOneOf;const UM=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function HM(e){const t=fh(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 fh(e){var t,n;const r=UM.exec(e);return r?{year:Ln(r[1]),month:Ln(r[2],1)-1,day:Ln(r[3],1),hour:Ln(r[4]),minute:Ln(r[5]),second:Ln(r[6]),millisecond:r[7]?Ln(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:Ln(r[10]),minuteOffset:Ln(r[11])}:null}function Ln(e,t=0){return Number(e)||t}let WM=/^[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])?)*$/,KM=/^((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,qM=/^(?:[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,QM="^\\d{4}-\\d{2}-\\d{2}",GM="\\d{2}:\\d{2}:\\d{2}",YM="(([+-]\\d{2}(:?\\d{2})?)|Z)",XM=new RegExp(`${QM}T${GM}(\\.\\d+)?${YM}$`),ZM=e=>ui(e)||e===e.trim(),JM={}.toString();function dh(){return new AS}class AS extends Dn{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===JM?t:i})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||xn.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=ht.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=ht.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=ht.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||ht.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&r||o.search(t)!==-1})}email(t=ht.email){return this.matches(WM,{name:"email",message:t,excludeEmptyString:!0})}url(t=ht.url){return this.matches(KM,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=ht.uuid){return this.matches(qM,{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(XM,{name:"datetime",message:n||ht.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||ht.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:s=>{if(!s||r)return!0;const o=fh(s);return o?!!o.z:!1}}).test({name:"datetime_precision",message:n||ht.datetime_precision,params:{precision:i},skipAbsent:!0,test:s=>{if(!s||i==null)return!0;const o=fh(s);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=ht.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:ZM})}lowercase(t=ht.lowercase){return this.transform(n=>ui(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>ui(n)||n===n.toLowerCase()})}uppercase(t=ht.uppercase){return this.transform(n=>ui(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>ui(n)||n===n.toUpperCase()})}}dh.prototype=AS.prototype;let eD=new Date(""),tD=e=>Object.prototype.toString.call(e)==="[object Date]";class Zu extends Dn{constructor(){super({type:"date",check(t){return tD(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=HM(t),isNaN(t)?Zu.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(Ii.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=ch.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=ch.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)}})}}Zu.INVALID_DATE=eD;Zu.prototype;function nD(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([o,a])=>`${o}-${a}`));function s(o,a){let l=bi.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),Ii.isRef(a)&&a.isSibling?s(a.path,o):ym(a)&&"deps"in a&&a.deps.forEach(l=>s(l,o))}return RM.array(Array.from(r),n).reverse()}function Hy(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 RS(e){return(t,n)=>Hy(e,t)-Hy(e,n)}const rD=(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 Ll(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=Ll(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Ll(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Ll)}):"optional"in e?e.optional():e}const iD=(e,t)=>{const n=[...bi.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),i=bi.getter(bi.join(n),!0)(e);return!!(i&&r in i)};let Wy=e=>Object.prototype.toString.call(e)==="[object Object]";function Ky(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const sD=RS([]);function OS(e){return new jS(e)}class jS extends Dn{constructor(t){super({type:"object",check(n){return Wy(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=sD,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(u=>!this._nodes.includes(u))),l={},c=Object.assign({},n,{parent:l,__validating:n.__validating||!1}),f=!1;for(const u of a){let d=s[u],h=u in i;if(d){let m,x=i[u];c.path=(n.path?`${n.path}.`:"")+u,d=d.resolve({value:x,context:n.context,parent:l});let w=d instanceof Dn?d.spec:void 0,p=w==null?void 0:w.strict;if(w!=null&&w.strip){f=f||u in i;continue}m=!n.__validating||!p?d.cast(i[u],c):i[u],m!==void 0&&(l[u]=m)}else h&&!o&&(l[u]=i[u]);(h!==u in l||l[u]!==i[u])&&(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,c)=>{if(!a||!Wy(c)){i(l,c);return}o=o||c;let f=[];for(let u of this._nodes){let d=this.fields[u];!d||Ii.isRef(d)||f.push(d.asNestedTest({options:n,key:u,parent:c,parentPath:n.path,originalParent:o}))}this.runTests({tests:f,value:c,originalValue:o,options:n},r,u=>{i(u.sort(this._sortErrors).concat(l),c)})})}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=nD(t,n),r._sortErrors=RS(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 Ll(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=bi.getter(t,!0);return this.transform(s=>{if(!s)return s;let o=s;return iD(s,t)&&(o=Object.assign({},s),r||delete o[t],o[n]=i(s)),o})}json(){return this.transform(rD)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Nl.exact,test(n){if(n==null)return!0;const r=Ky(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=Nl.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=Ky(this.schema,i);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=Nl.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(yf.camelCase)}snakeCase(){return this.transformKeys(yf.snakeCase)}constantCase(){return this.transformKeys(t=>yf.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}}OS.prototype=jS.prototype;var oD=function(t){return aD(t)&&!lD(t)};function aD(e){return!!e&&typeof e=="object"}function lD(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||fD(e)}var uD=typeof Symbol=="function"&&Symbol.for,cD=uD?Symbol.for("react.element"):60103;function fD(e){return e.$$typeof===cD}function dD(e){return Array.isArray(e)?[]:{}}function Tu(e,t){return t.clone!==!1&&t.isMergeableObject(e)?fa(dD(e),e,t):e}function hD(e,t,n){return e.concat(t).map(function(r){return Tu(r,n)})}function pD(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(i){r[i]=Tu(e[i],n)}),Object.keys(t).forEach(function(i){!n.isMergeableObject(t[i])||!e[i]?r[i]=Tu(t[i],n):r[i]=fa(e[i],t[i],n)}),r}function fa(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||hD,n.isMergeableObject=n.isMergeableObject||oD;var r=Array.isArray(t),i=Array.isArray(e),s=r===i;return s?r?n.arrayMerge(e,t,n):pD(e,t,n):Tu(t,n)}fa.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return fa(r,i,n)},{})};var hh=fa,MS=typeof global=="object"&&global&&global.Object===Object&&global,mD=typeof self=="object"&&self&&self.Object===Object&&self,Nn=MS||mD||Function("return this")(),Ur=Nn.Symbol,DS=Object.prototype,gD=DS.hasOwnProperty,yD=DS.toString,co=Ur?Ur.toStringTag:void 0;function vD(e){var t=gD.call(e,co),n=e[co];try{e[co]=void 0;var r=!0}catch{}var i=yD.call(e);return r&&(t?e[co]=n:delete e[co]),i}var xD=Object.prototype,wD=xD.toString;function bD(e){return wD.call(e)}var SD="[object Null]",TD="[object Undefined]",qy=Ur?Ur.toStringTag:void 0;function $i(e){return e==null?e===void 0?TD:SD:qy&&qy in Object(e)?vD(e):bD(e)}function FS(e,t){return function(n){return e(t(n))}}var vm=FS(Object.getPrototypeOf,Object);function Vi(e){return e!=null&&typeof e=="object"}var ED="[object Object]",CD=Function.prototype,kD=Object.prototype,NS=CD.toString,_D=kD.hasOwnProperty,PD=NS.call(Object);function Qy(e){if(!Vi(e)||$i(e)!=ED)return!1;var t=vm(e);if(t===null)return!0;var n=_D.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&NS.call(n)==PD}function AD(){this.__data__=[],this.size=0}function LS(e,t){return e===t||e!==e&&t!==t}function Ju(e,t){for(var n=e.length;n--;)if(LS(e[n][0],t))return n;return-1}var RD=Array.prototype,OD=RD.splice;function jD(e){var t=this.__data__,n=Ju(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():OD.call(t,n,1),--this.size,!0}function MD(e){var t=this.__data__,n=Ju(t,e);return n<0?void 0:t[n][1]}function DD(e){return Ju(this.__data__,e)>-1}function FD(e,t){var n=this.__data__,r=Ju(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function nr(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])}}nr.prototype.clear=AD;nr.prototype.delete=jD;nr.prototype.get=MD;nr.prototype.has=DD;nr.prototype.set=FD;function ND(){this.__data__=new nr,this.size=0}function LD(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function ID(e){return this.__data__.get(e)}function $D(e){return this.__data__.has(e)}function Aa(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var VD="[object AsyncFunction]",BD="[object Function]",zD="[object GeneratorFunction]",UD="[object Proxy]";function IS(e){if(!Aa(e))return!1;var t=$i(e);return t==BD||t==zD||t==VD||t==UD}var vf=Nn["__core-js_shared__"],Gy=function(){var e=/[^.]+$/.exec(vf&&vf.keys&&vf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function HD(e){return!!Gy&&Gy in e}var WD=Function.prototype,KD=WD.toString;function Bi(e){if(e!=null){try{return KD.call(e)}catch{}try{return e+""}catch{}}return""}var qD=/[\\^$.*+?()[\]{}|]/g,QD=/^\[object .+?Constructor\]$/,GD=Function.prototype,YD=Object.prototype,XD=GD.toString,ZD=YD.hasOwnProperty,JD=RegExp("^"+XD.call(ZD).replace(qD,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function eF(e){if(!Aa(e)||HD(e))return!1;var t=IS(e)?JD:QD;return t.test(Bi(e))}function tF(e,t){return e==null?void 0:e[t]}function zi(e,t){var n=tF(e,t);return eF(n)?n:void 0}var da=zi(Nn,"Map"),ha=zi(Object,"create");function nF(){this.__data__=ha?ha(null):{},this.size=0}function rF(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var iF="__lodash_hash_undefined__",sF=Object.prototype,oF=sF.hasOwnProperty;function aF(e){var t=this.__data__;if(ha){var n=t[e];return n===iF?void 0:n}return oF.call(t,e)?t[e]:void 0}var lF=Object.prototype,uF=lF.hasOwnProperty;function cF(e){var t=this.__data__;return ha?t[e]!==void 0:uF.call(t,e)}var fF="__lodash_hash_undefined__";function dF(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ha&&t===void 0?fF:t,this}function Ri(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])}}Ri.prototype.clear=nF;Ri.prototype.delete=rF;Ri.prototype.get=aF;Ri.prototype.has=cF;Ri.prototype.set=dF;function hF(){this.size=0,this.__data__={hash:new Ri,map:new(da||nr),string:new Ri}}function pF(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ec(e,t){var n=e.__data__;return pF(t)?n[typeof t=="string"?"string":"hash"]:n.map}function mF(e){var t=ec(this,e).delete(e);return this.size-=t?1:0,t}function gF(e){return ec(this,e).get(e)}function yF(e){return ec(this,e).has(e)}function vF(e,t){var n=ec(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=hF;Qr.prototype.delete=mF;Qr.prototype.get=gF;Qr.prototype.has=yF;Qr.prototype.set=vF;var xF=200;function wF(e,t){var n=this.__data__;if(n instanceof nr){var r=n.__data__;if(!da||r.length<xF-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 Xs(e){var t=this.__data__=new nr(e);this.size=t.size}Xs.prototype.clear=ND;Xs.prototype.delete=LD;Xs.prototype.get=ID;Xs.prototype.has=$D;Xs.prototype.set=wF;function bF(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var Yy=function(){try{var e=zi(Object,"defineProperty");return e({},"",{}),e}catch{}}();function $S(e,t,n){t=="__proto__"&&Yy?Yy(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var SF=Object.prototype,TF=SF.hasOwnProperty;function VS(e,t,n){var r=e[t];(!(TF.call(e,t)&&LS(r,n))||n===void 0&&!(t in e))&&$S(e,t,n)}function tc(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?$S(n,a,l):VS(n,a,l)}return n}function EF(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var CF="[object Arguments]";function Xy(e){return Vi(e)&&$i(e)==CF}var BS=Object.prototype,kF=BS.hasOwnProperty,_F=BS.propertyIsEnumerable,PF=Xy(function(){return arguments}())?Xy:function(e){return Vi(e)&&kF.call(e,"callee")&&!_F.call(e,"callee")},Ra=Array.isArray;function AF(){return!1}var zS=typeof Ot=="object"&&Ot&&!Ot.nodeType&&Ot,Zy=zS&&typeof jt=="object"&&jt&&!jt.nodeType&&jt,RF=Zy&&Zy.exports===zS,Jy=RF?Nn.Buffer:void 0,OF=Jy?Jy.isBuffer:void 0,US=OF||AF,jF=9007199254740991,MF=/^(?:0|[1-9]\d*)$/;function DF(e,t){var n=typeof e;return t=t??jF,!!t&&(n=="number"||n!="symbol"&&MF.test(e))&&e>-1&&e%1==0&&e<t}var FF=9007199254740991;function HS(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=FF}var NF="[object Arguments]",LF="[object Array]",IF="[object Boolean]",$F="[object Date]",VF="[object Error]",BF="[object Function]",zF="[object Map]",UF="[object Number]",HF="[object Object]",WF="[object RegExp]",KF="[object Set]",qF="[object String]",QF="[object WeakMap]",GF="[object ArrayBuffer]",YF="[object DataView]",XF="[object Float32Array]",ZF="[object Float64Array]",JF="[object Int8Array]",eN="[object Int16Array]",tN="[object Int32Array]",nN="[object Uint8Array]",rN="[object Uint8ClampedArray]",iN="[object Uint16Array]",sN="[object Uint32Array]",me={};me[XF]=me[ZF]=me[JF]=me[eN]=me[tN]=me[nN]=me[rN]=me[iN]=me[sN]=!0;me[NF]=me[LF]=me[GF]=me[IF]=me[YF]=me[$F]=me[VF]=me[BF]=me[zF]=me[UF]=me[HF]=me[WF]=me[KF]=me[qF]=me[QF]=!1;function oN(e){return Vi(e)&&HS(e.length)&&!!me[$i(e)]}function xm(e){return function(t){return e(t)}}var WS=typeof Ot=="object"&&Ot&&!Ot.nodeType&&Ot,Mo=WS&&typeof jt=="object"&&jt&&!jt.nodeType&&jt,aN=Mo&&Mo.exports===WS,xf=aN&&MS.process,Bs=function(){try{var e=Mo&&Mo.require&&Mo.require("util").types;return e||xf&&xf.binding&&xf.binding("util")}catch{}}(),ev=Bs&&Bs.isTypedArray,lN=ev?xm(ev):oN,uN=Object.prototype,cN=uN.hasOwnProperty;function KS(e,t){var n=Ra(e),r=!n&&PF(e),i=!n&&!r&&US(e),s=!n&&!r&&!i&&lN(e),o=n||r||i||s,a=o?EF(e.length,String):[],l=a.length;for(var c in e)(t||cN.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||DF(c,l)))&&a.push(c);return a}var fN=Object.prototype;function wm(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||fN;return e===n}var dN=FS(Object.keys,Object),hN=Object.prototype,pN=hN.hasOwnProperty;function mN(e){if(!wm(e))return dN(e);var t=[];for(var n in Object(e))pN.call(e,n)&&n!="constructor"&&t.push(n);return t}function qS(e){return e!=null&&HS(e.length)&&!IS(e)}function bm(e){return qS(e)?KS(e):mN(e)}function gN(e,t){return e&&tc(t,bm(t),e)}function yN(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var vN=Object.prototype,xN=vN.hasOwnProperty;function wN(e){if(!Aa(e))return yN(e);var t=wm(e),n=[];for(var r in e)r=="constructor"&&(t||!xN.call(e,r))||n.push(r);return n}function Sm(e){return qS(e)?KS(e,!0):wN(e)}function bN(e,t){return e&&tc(t,Sm(t),e)}var QS=typeof Ot=="object"&&Ot&&!Ot.nodeType&&Ot,tv=QS&&typeof jt=="object"&&jt&&!jt.nodeType&&jt,SN=tv&&tv.exports===QS,nv=SN?Nn.Buffer:void 0,rv=nv?nv.allocUnsafe:void 0;function TN(e,t){if(t)return e.slice();var n=e.length,r=rv?rv(n):new e.constructor(n);return e.copy(r),r}function GS(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function EN(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 YS(){return[]}var CN=Object.prototype,kN=CN.propertyIsEnumerable,iv=Object.getOwnPropertySymbols,Tm=iv?function(e){return e==null?[]:(e=Object(e),EN(iv(e),function(t){return kN.call(e,t)}))}:YS;function _N(e,t){return tc(e,Tm(e),t)}function XS(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var PN=Object.getOwnPropertySymbols,ZS=PN?function(e){for(var t=[];e;)XS(t,Tm(e)),e=vm(e);return t}:YS;function AN(e,t){return tc(e,ZS(e),t)}function JS(e,t,n){var r=t(e);return Ra(e)?r:XS(r,n(e))}function RN(e){return JS(e,bm,Tm)}function ON(e){return JS(e,Sm,ZS)}var ph=zi(Nn,"DataView"),mh=zi(Nn,"Promise"),gh=zi(Nn,"Set"),yh=zi(Nn,"WeakMap"),sv="[object Map]",jN="[object Object]",ov="[object Promise]",av="[object Set]",lv="[object WeakMap]",uv="[object DataView]",MN=Bi(ph),DN=Bi(da),FN=Bi(mh),NN=Bi(gh),LN=Bi(yh),Bn=$i;(ph&&Bn(new ph(new ArrayBuffer(1)))!=uv||da&&Bn(new da)!=sv||mh&&Bn(mh.resolve())!=ov||gh&&Bn(new gh)!=av||yh&&Bn(new yh)!=lv)&&(Bn=function(e){var t=$i(e),n=t==jN?e.constructor:void 0,r=n?Bi(n):"";if(r)switch(r){case MN:return uv;case DN:return sv;case FN:return ov;case NN:return av;case LN:return lv}return t});var IN=Object.prototype,$N=IN.hasOwnProperty;function VN(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&$N.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var cv=Nn.Uint8Array;function Em(e){var t=new e.constructor(e.byteLength);return new cv(t).set(new cv(e)),t}function BN(e,t){var n=t?Em(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var zN=/\w*$/;function UN(e){var t=new e.constructor(e.source,zN.exec(e));return t.lastIndex=e.lastIndex,t}var fv=Ur?Ur.prototype:void 0,dv=fv?fv.valueOf:void 0;function HN(e){return dv?Object(dv.call(e)):{}}function WN(e,t){var n=t?Em(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var KN="[object Boolean]",qN="[object Date]",QN="[object Map]",GN="[object Number]",YN="[object RegExp]",XN="[object Set]",ZN="[object String]",JN="[object Symbol]",e3="[object ArrayBuffer]",t3="[object DataView]",n3="[object Float32Array]",r3="[object Float64Array]",i3="[object Int8Array]",s3="[object Int16Array]",o3="[object Int32Array]",a3="[object Uint8Array]",l3="[object Uint8ClampedArray]",u3="[object Uint16Array]",c3="[object Uint32Array]";function f3(e,t,n){var r=e.constructor;switch(t){case e3:return Em(e);case KN:case qN:return new r(+e);case t3:return BN(e,n);case n3:case r3:case i3:case s3:case o3:case a3:case l3:case u3:case c3:return WN(e,n);case QN:return new r;case GN:case ZN:return new r(e);case YN:return UN(e);case XN:return new r;case JN:return HN(e)}}var hv=Object.create,d3=function(){function e(){}return function(t){if(!Aa(t))return{};if(hv)return hv(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function h3(e){return typeof e.constructor=="function"&&!wm(e)?d3(vm(e)):{}}var p3="[object Map]";function m3(e){return Vi(e)&&Bn(e)==p3}var pv=Bs&&Bs.isMap,g3=pv?xm(pv):m3,y3="[object Set]";function v3(e){return Vi(e)&&Bn(e)==y3}var mv=Bs&&Bs.isSet,x3=mv?xm(mv):v3,w3=1,b3=2,S3=4,eT="[object Arguments]",T3="[object Array]",E3="[object Boolean]",C3="[object Date]",k3="[object Error]",tT="[object Function]",_3="[object GeneratorFunction]",P3="[object Map]",A3="[object Number]",nT="[object Object]",R3="[object RegExp]",O3="[object Set]",j3="[object String]",M3="[object Symbol]",D3="[object WeakMap]",F3="[object ArrayBuffer]",N3="[object DataView]",L3="[object Float32Array]",I3="[object Float64Array]",$3="[object Int8Array]",V3="[object Int16Array]",B3="[object Int32Array]",z3="[object Uint8Array]",U3="[object Uint8ClampedArray]",H3="[object Uint16Array]",W3="[object Uint32Array]",fe={};fe[eT]=fe[T3]=fe[F3]=fe[N3]=fe[E3]=fe[C3]=fe[L3]=fe[I3]=fe[$3]=fe[V3]=fe[B3]=fe[P3]=fe[A3]=fe[nT]=fe[R3]=fe[O3]=fe[j3]=fe[M3]=fe[z3]=fe[U3]=fe[H3]=fe[W3]=!0;fe[k3]=fe[tT]=fe[D3]=!1;function Do(e,t,n,r,i,s){var o,a=t&w3,l=t&b3,c=t&S3;if(o!==void 0)return o;if(!Aa(e))return e;var f=Ra(e);if(f){if(o=VN(e),!a)return GS(e,o)}else{var u=Bn(e),d=u==tT||u==_3;if(US(e))return TN(e,a);if(u==nT||u==eT||d&&!i){if(o=l||d?{}:h3(e),!a)return l?AN(e,bN(o,e)):_N(e,gN(o,e))}else{if(!fe[u])return i?e:{};o=f3(e,u,a)}}s||(s=new Xs);var h=s.get(e);if(h)return h;s.set(e,o),x3(e)?e.forEach(function(w){o.add(Do(w,t,n,w,e,s))}):g3(e)&&e.forEach(function(w,p){o.set(p,Do(w,t,n,p,e,s))});var m=c?l?ON:RN:l?Sm:bm,x=f?void 0:m(e);return bF(x||e,function(w,p){x&&(p=w,w=e[p]),VS(o,p,Do(w,t,n,p,e,s))}),o}var K3=1,q3=4;function fl(e){return Do(e,K3|q3)}var gv=Array.isArray,yv=Object.keys,Q3=Object.prototype.hasOwnProperty,G3=typeof Element<"u";function vh(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=gv(e),r=gv(t),i,s,o;if(n&&r){if(s=e.length,s!=t.length)return!1;for(i=s;i--!==0;)if(!vh(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 c=e instanceof RegExp,f=t instanceof RegExp;if(c!=f)return!1;if(c&&f)return e.toString()==t.toString();var u=yv(e);if(s=u.length,s!==yv(t).length)return!1;for(i=s;i--!==0;)if(!Q3.call(t,u[i]))return!1;if(G3&&e instanceof Element&&t instanceof Element)return e===t;for(i=s;i--!==0;)if(o=u[i],!(o==="_owner"&&e.$$typeof)&&!vh(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}var Y3=function(t,n){try{return vh(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 ni=zs(Y3);var X3=4;function vv(e){return Do(e,X3)}function rT(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 Z3="[object Symbol]";function Cm(e){return typeof e=="symbol"||Vi(e)&&$i(e)==Z3}var J3="Expected a function";function km(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(J3);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(km.Cache||Qr),n}km.Cache=Qr;var e5=500;function t5(e){var t=km(e,function(r){return n.size===e5&&n.clear(),r}),n=t.cache;return t}var n5=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r5=/\\(\\)?/g,i5=t5(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(n5,function(n,r,i,s){t.push(i?s.replace(r5,"$1"):r||n)}),t}),s5=1/0;function o5(e){if(typeof e=="string"||Cm(e))return e;var t=e+"";return t=="0"&&1/e==-s5?"-0":t}var a5=1/0,xv=Ur?Ur.prototype:void 0,wv=xv?xv.toString:void 0;function iT(e){if(typeof e=="string")return e;if(Ra(e))return rT(e,iT)+"";if(Cm(e))return wv?wv.call(e):"";var t=e+"";return t=="0"&&1/e==-a5?"-0":t}function l5(e){return e==null?"":iT(e)}function sT(e){return Ra(e)?rT(e,o5):Cm(e)?[e]:GS(i5(l5(e)))}var oT={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 c=[];for(let f of Object.values(this.internalTests))f&&c.push(f);this.runTests({path:s,value:l,originalValue:o,options:n,tests:c},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:c}=t,f=x=>{i||(i=!0,n(x,o))},u=x=>{i||(i=!0,r(x,o))},d=s.length,h=[];if(!d)return u([]);let m={value:o,originalValue:a,path:l,options:c,schema:this};for(let x=0;x<s.length;x++){const w=s[x];w(m,f,function(g){g&&(Array.isArray(g)?h.push(...g):h.push(g)),--d<=0&&u(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 c=r[a];const f=Object.assign({},o,{strict:!0,parent:r,value:c,originalValue:s[a],key:void 0,[l?"index":"key"]:a,path:l||a.includes(".")?`${i||""}[${l?a:`"${a}"`}]`:(i?`${i}.`:"")+t});return(u,d,h)=>this.resolve(f)._validate(c,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,c)=>{xt.isError(l)&&(l.value=c),a(l)},(l,c)=>{l.length?a(new xt(l,c,void 0,void 0,s)):o(c)}))}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 xt.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new xt(a,t,void 0,void 0,o);s=l}),s}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(xt.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(xt.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):us(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=Wi({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=Wi({message:n,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=xn.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=xn.notNull){return this.nullability(!1,t)}required(t=xn.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=xn.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),i=Wi(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=CS(t).map(s=>new Ii(s));return i.forEach(s=>{s.isSibling&&r.deps.push(s.key)}),r.conditions.push(typeof n=="function"?new bu(i,n):bu.fromOptions(i,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=Wi({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=xn.oneOf){let r=this.clone();return t.forEach(i=>{r._whitelist.add(i),r._blacklist.delete(i)}),r.internalTests.whiteList=Wi({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=xn.notOneOf){let r=this.clone();return t.forEach(i=>{r._blacklist.add(i),r._whitelist.delete(i)}),r.internalTests.blacklist=Wi({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,c,f)=>f.findIndex(u=>u.name===l.name)===c)}}}Dn.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Dn.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:o}=zj(this,t,n,r.context);return o[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])Dn.prototype[e]=Dn.prototype.oneOf;for(const e of["not","nope"])Dn.prototype[e]=Dn.prototype.notOneOf;const Uj=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Hj(e){const t=dh(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 dh(e){var t,n;const r=Uj.exec(e);return r?{year:Ln(r[1]),month:Ln(r[2],1)-1,day:Ln(r[3],1),hour:Ln(r[4]),minute:Ln(r[5]),second:Ln(r[6]),millisecond:r[7]?Ln(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:Ln(r[10]),minuteOffset:Ln(r[11])}:null}function Ln(e,t=0){return Number(e)||t}let Wj=/^[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])?)*$/,Kj=/^((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,qj=/^(?:[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,Qj="^\\d{4}-\\d{2}-\\d{2}",Gj="\\d{2}:\\d{2}:\\d{2}",Yj="(([+-]\\d{2}(:?\\d{2})?)|Z)",Xj=new RegExp(`${Qj}T${Gj}(\\.\\d+)?${Yj}$`),Zj=e=>ui(e)||e===e.trim(),Jj={}.toString();function hh(){return new AS}class AS extends Dn{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===Jj?t:i})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||xn.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=ht.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=ht.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=ht.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||ht.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&r||o.search(t)!==-1})}email(t=ht.email){return this.matches(Wj,{name:"email",message:t,excludeEmptyString:!0})}url(t=ht.url){return this.matches(Kj,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=ht.uuid){return this.matches(qj,{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(Xj,{name:"datetime",message:n||ht.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||ht.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:s=>{if(!s||r)return!0;const o=dh(s);return o?!!o.z:!1}}).test({name:"datetime_precision",message:n||ht.datetime_precision,params:{precision:i},skipAbsent:!0,test:s=>{if(!s||i==null)return!0;const o=dh(s);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=ht.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:Zj})}lowercase(t=ht.lowercase){return this.transform(n=>ui(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>ui(n)||n===n.toLowerCase()})}uppercase(t=ht.uppercase){return this.transform(n=>ui(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>ui(n)||n===n.toUpperCase()})}}hh.prototype=AS.prototype;let eD=new Date(""),tD=e=>Object.prototype.toString.call(e)==="[object Date]";class Zu extends Dn{constructor(){super({type:"date",check(t){return tD(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=Hj(t),isNaN(t)?Zu.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(Ii.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=fh.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=fh.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)}})}}Zu.INVALID_DATE=eD;Zu.prototype;function nD(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([o,a])=>`${o}-${a}`));function s(o,a){let l=bi.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),Ii.isRef(a)&&a.isSibling?s(a.path,o):vm(a)&&"deps"in a&&a.deps.forEach(l=>s(l,o))}return Rj.array(Array.from(r),n).reverse()}function Hy(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 RS(e){return(t,n)=>Hy(e,t)-Hy(e,n)}const rD=(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 Ll(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=Ll(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Ll(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Ll)}):"optional"in e?e.optional():e}const iD=(e,t)=>{const n=[...bi.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),i=bi.getter(bi.join(n),!0)(e);return!!(i&&r in i)};let Wy=e=>Object.prototype.toString.call(e)==="[object Object]";function Ky(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const sD=RS([]);function OS(e){return new MS(e)}class MS extends Dn{constructor(t){super({type:"object",check(n){return Wy(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=sD,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(u=>!this._nodes.includes(u))),l={},c=Object.assign({},n,{parent:l,__validating:n.__validating||!1}),f=!1;for(const u of a){let d=s[u],h=u in i;if(d){let m,x=i[u];c.path=(n.path?`${n.path}.`:"")+u,d=d.resolve({value:x,context:n.context,parent:l});let w=d instanceof Dn?d.spec:void 0,p=w==null?void 0:w.strict;if(w!=null&&w.strip){f=f||u in i;continue}m=!n.__validating||!p?d.cast(i[u],c):i[u],m!==void 0&&(l[u]=m)}else h&&!o&&(l[u]=i[u]);(h!==u in l||l[u]!==i[u])&&(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,c)=>{if(!a||!Wy(c)){i(l,c);return}o=o||c;let f=[];for(let u of this._nodes){let d=this.fields[u];!d||Ii.isRef(d)||f.push(d.asNestedTest({options:n,key:u,parent:c,parentPath:n.path,originalParent:o}))}this.runTests({tests:f,value:c,originalValue:o,options:n},r,u=>{i(u.sort(this._sortErrors).concat(l),c)})})}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=nD(t,n),r._sortErrors=RS(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 Ll(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=bi.getter(t,!0);return this.transform(s=>{if(!s)return s;let o=s;return iD(s,t)&&(o=Object.assign({},s),r||delete o[t],o[n]=i(s)),o})}json(){return this.transform(rD)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Nl.exact,test(n){if(n==null)return!0;const r=Ky(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=Nl.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=Ky(this.schema,i);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=Nl.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(vf.camelCase)}snakeCase(){return this.transformKeys(vf.snakeCase)}constantCase(){return this.transformKeys(t=>vf.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}}OS.prototype=MS.prototype;var oD=function(t){return aD(t)&&!lD(t)};function aD(e){return!!e&&typeof e=="object"}function lD(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||fD(e)}var uD=typeof Symbol=="function"&&Symbol.for,cD=uD?Symbol.for("react.element"):60103;function fD(e){return e.$$typeof===cD}function dD(e){return Array.isArray(e)?[]:{}}function Tu(e,t){return t.clone!==!1&&t.isMergeableObject(e)?fa(dD(e),e,t):e}function hD(e,t,n){return e.concat(t).map(function(r){return Tu(r,n)})}function pD(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(i){r[i]=Tu(e[i],n)}),Object.keys(t).forEach(function(i){!n.isMergeableObject(t[i])||!e[i]?r[i]=Tu(t[i],n):r[i]=fa(e[i],t[i],n)}),r}function fa(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||hD,n.isMergeableObject=n.isMergeableObject||oD;var r=Array.isArray(t),i=Array.isArray(e),s=r===i;return s?r?n.arrayMerge(e,t,n):pD(e,t,n):Tu(t,n)}fa.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return fa(r,i,n)},{})};var ph=fa,jS=typeof global=="object"&&global&&global.Object===Object&&global,mD=typeof self=="object"&&self&&self.Object===Object&&self,Nn=jS||mD||Function("return this")(),Ur=Nn.Symbol,DS=Object.prototype,gD=DS.hasOwnProperty,yD=DS.toString,co=Ur?Ur.toStringTag:void 0;function vD(e){var t=gD.call(e,co),n=e[co];try{e[co]=void 0;var r=!0}catch{}var i=yD.call(e);return r&&(t?e[co]=n:delete e[co]),i}var xD=Object.prototype,wD=xD.toString;function bD(e){return wD.call(e)}var SD="[object Null]",TD="[object Undefined]",qy=Ur?Ur.toStringTag:void 0;function $i(e){return e==null?e===void 0?TD:SD:qy&&qy in Object(e)?vD(e):bD(e)}function FS(e,t){return function(n){return e(t(n))}}var xm=FS(Object.getPrototypeOf,Object);function Vi(e){return e!=null&&typeof e=="object"}var ED="[object Object]",CD=Function.prototype,kD=Object.prototype,NS=CD.toString,_D=kD.hasOwnProperty,PD=NS.call(Object);function Qy(e){if(!Vi(e)||$i(e)!=ED)return!1;var t=xm(e);if(t===null)return!0;var n=_D.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&NS.call(n)==PD}function AD(){this.__data__=[],this.size=0}function LS(e,t){return e===t||e!==e&&t!==t}function Ju(e,t){for(var n=e.length;n--;)if(LS(e[n][0],t))return n;return-1}var RD=Array.prototype,OD=RD.splice;function MD(e){var t=this.__data__,n=Ju(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():OD.call(t,n,1),--this.size,!0}function jD(e){var t=this.__data__,n=Ju(t,e);return n<0?void 0:t[n][1]}function DD(e){return Ju(this.__data__,e)>-1}function FD(e,t){var n=this.__data__,r=Ju(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function nr(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])}}nr.prototype.clear=AD;nr.prototype.delete=MD;nr.prototype.get=jD;nr.prototype.has=DD;nr.prototype.set=FD;function ND(){this.__data__=new nr,this.size=0}function LD(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function ID(e){return this.__data__.get(e)}function $D(e){return this.__data__.has(e)}function Aa(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var VD="[object AsyncFunction]",BD="[object Function]",zD="[object GeneratorFunction]",UD="[object Proxy]";function IS(e){if(!Aa(e))return!1;var t=$i(e);return t==BD||t==zD||t==VD||t==UD}var xf=Nn["__core-js_shared__"],Gy=function(){var e=/[^.]+$/.exec(xf&&xf.keys&&xf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function HD(e){return!!Gy&&Gy in e}var WD=Function.prototype,KD=WD.toString;function Bi(e){if(e!=null){try{return KD.call(e)}catch{}try{return e+""}catch{}}return""}var qD=/[\\^$.*+?()[\]{}|]/g,QD=/^\[object .+?Constructor\]$/,GD=Function.prototype,YD=Object.prototype,XD=GD.toString,ZD=YD.hasOwnProperty,JD=RegExp("^"+XD.call(ZD).replace(qD,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function eF(e){if(!Aa(e)||HD(e))return!1;var t=IS(e)?JD:QD;return t.test(Bi(e))}function tF(e,t){return e==null?void 0:e[t]}function zi(e,t){var n=tF(e,t);return eF(n)?n:void 0}var da=zi(Nn,"Map"),ha=zi(Object,"create");function nF(){this.__data__=ha?ha(null):{},this.size=0}function rF(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var iF="__lodash_hash_undefined__",sF=Object.prototype,oF=sF.hasOwnProperty;function aF(e){var t=this.__data__;if(ha){var n=t[e];return n===iF?void 0:n}return oF.call(t,e)?t[e]:void 0}var lF=Object.prototype,uF=lF.hasOwnProperty;function cF(e){var t=this.__data__;return ha?t[e]!==void 0:uF.call(t,e)}var fF="__lodash_hash_undefined__";function dF(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ha&&t===void 0?fF:t,this}function Ri(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])}}Ri.prototype.clear=nF;Ri.prototype.delete=rF;Ri.prototype.get=aF;Ri.prototype.has=cF;Ri.prototype.set=dF;function hF(){this.size=0,this.__data__={hash:new Ri,map:new(da||nr),string:new Ri}}function pF(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ec(e,t){var n=e.__data__;return pF(t)?n[typeof t=="string"?"string":"hash"]:n.map}function mF(e){var t=ec(this,e).delete(e);return this.size-=t?1:0,t}function gF(e){return ec(this,e).get(e)}function yF(e){return ec(this,e).has(e)}function vF(e,t){var n=ec(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=hF;Qr.prototype.delete=mF;Qr.prototype.get=gF;Qr.prototype.has=yF;Qr.prototype.set=vF;var xF=200;function wF(e,t){var n=this.__data__;if(n instanceof nr){var r=n.__data__;if(!da||r.length<xF-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 Xs(e){var t=this.__data__=new nr(e);this.size=t.size}Xs.prototype.clear=ND;Xs.prototype.delete=LD;Xs.prototype.get=ID;Xs.prototype.has=$D;Xs.prototype.set=wF;function bF(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var Yy=function(){try{var e=zi(Object,"defineProperty");return e({},"",{}),e}catch{}}();function $S(e,t,n){t=="__proto__"&&Yy?Yy(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var SF=Object.prototype,TF=SF.hasOwnProperty;function VS(e,t,n){var r=e[t];(!(TF.call(e,t)&&LS(r,n))||n===void 0&&!(t in e))&&$S(e,t,n)}function tc(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?$S(n,a,l):VS(n,a,l)}return n}function EF(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var CF="[object Arguments]";function Xy(e){return Vi(e)&&$i(e)==CF}var BS=Object.prototype,kF=BS.hasOwnProperty,_F=BS.propertyIsEnumerable,PF=Xy(function(){return arguments}())?Xy:function(e){return Vi(e)&&kF.call(e,"callee")&&!_F.call(e,"callee")},Ra=Array.isArray;function AF(){return!1}var zS=typeof Ot=="object"&&Ot&&!Ot.nodeType&&Ot,Zy=zS&&typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,RF=Zy&&Zy.exports===zS,Jy=RF?Nn.Buffer:void 0,OF=Jy?Jy.isBuffer:void 0,US=OF||AF,MF=9007199254740991,jF=/^(?:0|[1-9]\d*)$/;function DF(e,t){var n=typeof e;return t=t??MF,!!t&&(n=="number"||n!="symbol"&&jF.test(e))&&e>-1&&e%1==0&&e<t}var FF=9007199254740991;function HS(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=FF}var NF="[object Arguments]",LF="[object Array]",IF="[object Boolean]",$F="[object Date]",VF="[object Error]",BF="[object Function]",zF="[object Map]",UF="[object Number]",HF="[object Object]",WF="[object RegExp]",KF="[object Set]",qF="[object String]",QF="[object WeakMap]",GF="[object ArrayBuffer]",YF="[object DataView]",XF="[object Float32Array]",ZF="[object Float64Array]",JF="[object Int8Array]",eN="[object Int16Array]",tN="[object Int32Array]",nN="[object Uint8Array]",rN="[object Uint8ClampedArray]",iN="[object Uint16Array]",sN="[object Uint32Array]",me={};me[XF]=me[ZF]=me[JF]=me[eN]=me[tN]=me[nN]=me[rN]=me[iN]=me[sN]=!0;me[NF]=me[LF]=me[GF]=me[IF]=me[YF]=me[$F]=me[VF]=me[BF]=me[zF]=me[UF]=me[HF]=me[WF]=me[KF]=me[qF]=me[QF]=!1;function oN(e){return Vi(e)&&HS(e.length)&&!!me[$i(e)]}function wm(e){return function(t){return e(t)}}var WS=typeof Ot=="object"&&Ot&&!Ot.nodeType&&Ot,jo=WS&&typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,aN=jo&&jo.exports===WS,wf=aN&&jS.process,Bs=function(){try{var e=jo&&jo.require&&jo.require("util").types;return e||wf&&wf.binding&&wf.binding("util")}catch{}}(),ev=Bs&&Bs.isTypedArray,lN=ev?wm(ev):oN,uN=Object.prototype,cN=uN.hasOwnProperty;function KS(e,t){var n=Ra(e),r=!n&&PF(e),i=!n&&!r&&US(e),s=!n&&!r&&!i&&lN(e),o=n||r||i||s,a=o?EF(e.length,String):[],l=a.length;for(var c in e)(t||cN.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||DF(c,l)))&&a.push(c);return a}var fN=Object.prototype;function bm(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||fN;return e===n}var dN=FS(Object.keys,Object),hN=Object.prototype,pN=hN.hasOwnProperty;function mN(e){if(!bm(e))return dN(e);var t=[];for(var n in Object(e))pN.call(e,n)&&n!="constructor"&&t.push(n);return t}function qS(e){return e!=null&&HS(e.length)&&!IS(e)}function Sm(e){return qS(e)?KS(e):mN(e)}function gN(e,t){return e&&tc(t,Sm(t),e)}function yN(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var vN=Object.prototype,xN=vN.hasOwnProperty;function wN(e){if(!Aa(e))return yN(e);var t=bm(e),n=[];for(var r in e)r=="constructor"&&(t||!xN.call(e,r))||n.push(r);return n}function Tm(e){return qS(e)?KS(e,!0):wN(e)}function bN(e,t){return e&&tc(t,Tm(t),e)}var QS=typeof Ot=="object"&&Ot&&!Ot.nodeType&&Ot,tv=QS&&typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,SN=tv&&tv.exports===QS,nv=SN?Nn.Buffer:void 0,rv=nv?nv.allocUnsafe:void 0;function TN(e,t){if(t)return e.slice();var n=e.length,r=rv?rv(n):new e.constructor(n);return e.copy(r),r}function GS(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function EN(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 YS(){return[]}var CN=Object.prototype,kN=CN.propertyIsEnumerable,iv=Object.getOwnPropertySymbols,Em=iv?function(e){return e==null?[]:(e=Object(e),EN(iv(e),function(t){return kN.call(e,t)}))}:YS;function _N(e,t){return tc(e,Em(e),t)}function XS(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var PN=Object.getOwnPropertySymbols,ZS=PN?function(e){for(var t=[];e;)XS(t,Em(e)),e=xm(e);return t}:YS;function AN(e,t){return tc(e,ZS(e),t)}function JS(e,t,n){var r=t(e);return Ra(e)?r:XS(r,n(e))}function RN(e){return JS(e,Sm,Em)}function ON(e){return JS(e,Tm,ZS)}var mh=zi(Nn,"DataView"),gh=zi(Nn,"Promise"),yh=zi(Nn,"Set"),vh=zi(Nn,"WeakMap"),sv="[object Map]",MN="[object Object]",ov="[object Promise]",av="[object Set]",lv="[object WeakMap]",uv="[object DataView]",jN=Bi(mh),DN=Bi(da),FN=Bi(gh),NN=Bi(yh),LN=Bi(vh),Bn=$i;(mh&&Bn(new mh(new ArrayBuffer(1)))!=uv||da&&Bn(new da)!=sv||gh&&Bn(gh.resolve())!=ov||yh&&Bn(new yh)!=av||vh&&Bn(new vh)!=lv)&&(Bn=function(e){var t=$i(e),n=t==MN?e.constructor:void 0,r=n?Bi(n):"";if(r)switch(r){case jN:return uv;case DN:return sv;case FN:return ov;case NN:return av;case LN:return lv}return t});var IN=Object.prototype,$N=IN.hasOwnProperty;function VN(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&$N.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var cv=Nn.Uint8Array;function Cm(e){var t=new e.constructor(e.byteLength);return new cv(t).set(new cv(e)),t}function BN(e,t){var n=t?Cm(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var zN=/\w*$/;function UN(e){var t=new e.constructor(e.source,zN.exec(e));return t.lastIndex=e.lastIndex,t}var fv=Ur?Ur.prototype:void 0,dv=fv?fv.valueOf:void 0;function HN(e){return dv?Object(dv.call(e)):{}}function WN(e,t){var n=t?Cm(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var KN="[object Boolean]",qN="[object Date]",QN="[object Map]",GN="[object Number]",YN="[object RegExp]",XN="[object Set]",ZN="[object String]",JN="[object Symbol]",e3="[object ArrayBuffer]",t3="[object DataView]",n3="[object Float32Array]",r3="[object Float64Array]",i3="[object Int8Array]",s3="[object Int16Array]",o3="[object Int32Array]",a3="[object Uint8Array]",l3="[object Uint8ClampedArray]",u3="[object Uint16Array]",c3="[object Uint32Array]";function f3(e,t,n){var r=e.constructor;switch(t){case e3:return Cm(e);case KN:case qN:return new r(+e);case t3:return BN(e,n);case n3:case r3:case i3:case s3:case o3:case a3:case l3:case u3:case c3:return WN(e,n);case QN:return new r;case GN:case ZN:return new r(e);case YN:return UN(e);case XN:return new r;case JN:return HN(e)}}var hv=Object.create,d3=function(){function e(){}return function(t){if(!Aa(t))return{};if(hv)return hv(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function h3(e){return typeof e.constructor=="function"&&!bm(e)?d3(xm(e)):{}}var p3="[object Map]";function m3(e){return Vi(e)&&Bn(e)==p3}var pv=Bs&&Bs.isMap,g3=pv?wm(pv):m3,y3="[object Set]";function v3(e){return Vi(e)&&Bn(e)==y3}var mv=Bs&&Bs.isSet,x3=mv?wm(mv):v3,w3=1,b3=2,S3=4,eT="[object Arguments]",T3="[object Array]",E3="[object Boolean]",C3="[object Date]",k3="[object Error]",tT="[object Function]",_3="[object GeneratorFunction]",P3="[object Map]",A3="[object Number]",nT="[object Object]",R3="[object RegExp]",O3="[object Set]",M3="[object String]",j3="[object Symbol]",D3="[object WeakMap]",F3="[object ArrayBuffer]",N3="[object DataView]",L3="[object Float32Array]",I3="[object Float64Array]",$3="[object Int8Array]",V3="[object Int16Array]",B3="[object Int32Array]",z3="[object Uint8Array]",U3="[object Uint8ClampedArray]",H3="[object Uint16Array]",W3="[object Uint32Array]",fe={};fe[eT]=fe[T3]=fe[F3]=fe[N3]=fe[E3]=fe[C3]=fe[L3]=fe[I3]=fe[$3]=fe[V3]=fe[B3]=fe[P3]=fe[A3]=fe[nT]=fe[R3]=fe[O3]=fe[M3]=fe[j3]=fe[z3]=fe[U3]=fe[H3]=fe[W3]=!0;fe[k3]=fe[tT]=fe[D3]=!1;function Do(e,t,n,r,i,s){var o,a=t&w3,l=t&b3,c=t&S3;if(o!==void 0)return o;if(!Aa(e))return e;var f=Ra(e);if(f){if(o=VN(e),!a)return GS(e,o)}else{var u=Bn(e),d=u==tT||u==_3;if(US(e))return TN(e,a);if(u==nT||u==eT||d&&!i){if(o=l||d?{}:h3(e),!a)return l?AN(e,bN(o,e)):_N(e,gN(o,e))}else{if(!fe[u])return i?e:{};o=f3(e,u,a)}}s||(s=new Xs);var h=s.get(e);if(h)return h;s.set(e,o),x3(e)?e.forEach(function(w){o.add(Do(w,t,n,w,e,s))}):g3(e)&&e.forEach(function(w,p){o.set(p,Do(w,t,n,p,e,s))});var m=c?l?ON:RN:l?Tm:Sm,x=f?void 0:m(e);return bF(x||e,function(w,p){x&&(p=w,w=e[p]),VS(o,p,Do(w,t,n,p,e,s))}),o}var K3=1,q3=4;function fl(e){return Do(e,K3|q3)}var gv=Array.isArray,yv=Object.keys,Q3=Object.prototype.hasOwnProperty,G3=typeof Element<"u";function xh(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=gv(e),r=gv(t),i,s,o;if(n&&r){if(s=e.length,s!=t.length)return!1;for(i=s;i--!==0;)if(!xh(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 c=e instanceof RegExp,f=t instanceof RegExp;if(c!=f)return!1;if(c&&f)return e.toString()==t.toString();var u=yv(e);if(s=u.length,s!==yv(t).length)return!1;for(i=s;i--!==0;)if(!Q3.call(t,u[i]))return!1;if(G3&&e instanceof Element&&t instanceof Element)return e===t;for(i=s;i--!==0;)if(o=u[i],!(o==="_owner"&&e.$$typeof)&&!xh(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}var Y3=function(t,n){try{return xh(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 ni=zs(Y3);var X3=4;function vv(e){return Do(e,X3)}function rT(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 Z3="[object Symbol]";function km(e){return typeof e=="symbol"||Vi(e)&&$i(e)==Z3}var J3="Expected a function";function _m(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(J3);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(_m.Cache||Qr),n}_m.Cache=Qr;var e5=500;function t5(e){var t=_m(e,function(r){return n.size===e5&&n.clear(),r}),n=t.cache;return t}var n5=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r5=/\\(\\)?/g,i5=t5(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(n5,function(n,r,i,s){t.push(i?s.replace(r5,"$1"):r||n)}),t}),s5=1/0;function o5(e){if(typeof e=="string"||km(e))return e;var t=e+"";return t=="0"&&1/e==-s5?"-0":t}var a5=1/0,xv=Ur?Ur.prototype:void 0,wv=xv?xv.toString:void 0;function iT(e){if(typeof e=="string")return e;if(Ra(e))return rT(e,iT)+"";if(km(e))return wv?wv.call(e):"";var t=e+"";return t=="0"&&1/e==-a5?"-0":t}function l5(e){return e==null?"":iT(e)}function sT(e){return Ra(e)?rT(e,o5):km(e)?[e]:GS(i5(l5(e)))}var oT={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 He=typeof Symbol=="function"&&Symbol.for,_m=He?Symbol.for("react.element"):60103,Pm=He?Symbol.for("react.portal"):60106,nc=He?Symbol.for("react.fragment"):60107,rc=He?Symbol.for("react.strict_mode"):60108,ic=He?Symbol.for("react.profiler"):60114,sc=He?Symbol.for("react.provider"):60109,oc=He?Symbol.for("react.context"):60110,Am=He?Symbol.for("react.async_mode"):60111,ac=He?Symbol.for("react.concurrent_mode"):60111,lc=He?Symbol.for("react.forward_ref"):60112,uc=He?Symbol.for("react.suspense"):60113,u5=He?Symbol.for("react.suspense_list"):60120,cc=He?Symbol.for("react.memo"):60115,fc=He?Symbol.for("react.lazy"):60116,c5=He?Symbol.for("react.block"):60121,f5=He?Symbol.for("react.fundamental"):60117,d5=He?Symbol.for("react.responder"):60118,h5=He?Symbol.for("react.scope"):60119;function Lt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case _m:switch(e=e.type,e){case Am:case ac:case nc:case ic:case rc:case uc:return e;default:switch(e=e&&e.$$typeof,e){case oc:case lc:case fc:case cc:case sc:return e;default:return t}}case Pm:return t}}}function aT(e){return Lt(e)===ac}ue.AsyncMode=Am;ue.ConcurrentMode=ac;ue.ContextConsumer=oc;ue.ContextProvider=sc;ue.Element=_m;ue.ForwardRef=lc;ue.Fragment=nc;ue.Lazy=fc;ue.Memo=cc;ue.Portal=Pm;ue.Profiler=ic;ue.StrictMode=rc;ue.Suspense=uc;ue.isAsyncMode=function(e){return aT(e)||Lt(e)===Am};ue.isConcurrentMode=aT;ue.isContextConsumer=function(e){return Lt(e)===oc};ue.isContextProvider=function(e){return Lt(e)===sc};ue.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===_m};ue.isForwardRef=function(e){return Lt(e)===lc};ue.isFragment=function(e){return Lt(e)===nc};ue.isLazy=function(e){return Lt(e)===fc};ue.isMemo=function(e){return Lt(e)===cc};ue.isPortal=function(e){return Lt(e)===Pm};ue.isProfiler=function(e){return Lt(e)===ic};ue.isStrictMode=function(e){return Lt(e)===rc};ue.isSuspense=function(e){return Lt(e)===uc};ue.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===nc||e===ac||e===ic||e===rc||e===uc||e===u5||typeof e=="object"&&e!==null&&(e.$$typeof===fc||e.$$typeof===cc||e.$$typeof===sc||e.$$typeof===oc||e.$$typeof===lc||e.$$typeof===f5||e.$$typeof===d5||e.$$typeof===h5||e.$$typeof===c5)};ue.typeOf=Lt;oT.exports=ue;var p5=oT.exports,lT=p5,m5={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},g5={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},uT={};uT[lT.ForwardRef]=m5;uT[lT.Memo]=g5;function Ve(){return Ve=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},Ve.apply(this,arguments)}function cT(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 dc=v.createContext(void 0);dc.displayName="FormikContext";dc.Provider;dc.Consumer;function y5(){var e=v.useContext(dc);return e}var nn=function(t){return typeof t=="function"},hc=function(t){return t!==null&&typeof t=="object"},v5=function(t){return String(Math.floor(Number(t)))===t},wf=function(t){return Object.prototype.toString.call(t)==="[object String]"},bf=function(t){return hc(t)&&nn(t.then)};function _t(e,t,n,r){r===void 0&&(r=0);for(var i=sT(t);e&&r<i.length;)e=e[i[r++]];return r!==i.length&&!e||e===void 0?n:e}function Si(e,t,n){for(var r=vv(e),i=r,s=0,o=sT(t);s<o.length-1;s++){var a=o[s],l=_t(e,o.slice(0,s+1));if(l&&(hc(l)||Array.isArray(l)))i=i[a]=vv(l);else{var c=o[s+1];i=i[a]=v5(c)&&Number(c)>=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 fT(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];hc(a)?n.get(a)||(n.set(a,!0),r[o]=Array.isArray(a)?[]:{},fT(a,t,n,r[o])):r[o]=t}return r}function x5(e,t){switch(t.type){case"SET_VALUES":return Ve({},e,{values:t.payload});case"SET_TOUCHED":return Ve({},e,{touched:t.payload});case"SET_ERRORS":return ni(e.errors,t.payload)?e:Ve({},e,{errors:t.payload});case"SET_STATUS":return Ve({},e,{status:t.payload});case"SET_ISSUBMITTING":return Ve({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return Ve({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return Ve({},e,{values:Si(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return Ve({},e,{touched:Si(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return Ve({},e,{errors:Si(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return Ve({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return Ve({},e,{touched:fT(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":return Ve({},e,{isSubmitting:!1});case"SUBMIT_SUCCESS":return Ve({},e,{isSubmitting:!1});default:return e}}var Zr={},dl={};function w5(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,c=l===void 0?!1:l,f=e.onSubmit,u=cT(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),d=Ve({validateOnChange:n,validateOnBlur:i,validateOnMount:o,onSubmit:f},u),h=v.useRef(d.initialValues),m=v.useRef(d.initialErrors||Zr),x=v.useRef(d.initialTouched||dl),w=v.useRef(d.initialStatus),p=v.useRef(!1),g=v.useRef({});v.useEffect(function(){return p.current=!0,function(){p.current=!1}},[]);var y=v.useState(0),C=y[1],b=v.useRef({values:fl(d.initialValues),errors:fl(d.initialErrors)||Zr,touched:fl(d.initialTouched)||dl,status:fl(d.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),E=b.current,k=v.useCallback(function(_){var D=b.current;b.current=x5(D,_),D!==b.current&&C(function($){return $+1})},[]),P=v.useCallback(function(_,D){return new Promise(function($,z){var Q=d.validate(_,D);Q==null?$(Zr):bf(Q)?Q.then(function(oe){$(oe||Zr)},function(oe){z(oe)}):$(Q)})},[d.validate]),j=v.useCallback(function(_,D){var $=d.validationSchema,z=nn($)?$(D):$,Q=D&&z.validateAt?z.validateAt(D,_):S5(_,z);return new Promise(function(oe,_e){Q.then(function(){oe(Zr)},function(Ct){Ct.name==="ValidationError"?oe(b5(Ct)):_e(Ct)})})},[d.validationSchema]),M=v.useCallback(function(_,D){return new Promise(function($){return $(g.current[_].validate(D))})},[]),I=v.useCallback(function(_){var D=Object.keys(g.current).filter(function(z){return nn(g.current[z].validate)}),$=D.length>0?D.map(function(z){return M(z,_t(_,z))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all($).then(function(z){return z.reduce(function(Q,oe,_e){return oe==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||oe&&(Q=Si(Q,D[_e],oe)),Q},{})})},[M]),re=v.useCallback(function(_){return Promise.all([I(_),d.validationSchema?j(_):{},d.validate?P(_):{}]).then(function(D){var $=D[0],z=D[1],Q=D[2],oe=hh.all([$,z,Q],{arrayMerge:T5});return oe})},[d.validate,d.validationSchema,I,P,j]),ie=Bt(function(_){return _===void 0&&(_=E.values),k({type:"SET_ISVALIDATING",payload:!0}),re(_).then(function(D){return p.current&&(k({type:"SET_ISVALIDATING",payload:!1}),k({type:"SET_ERRORS",payload:D})),D})});v.useEffect(function(){o&&p.current===!0&&ni(h.current,d.initialValues)&&ie(h.current)},[o,ie]);var xe=v.useCallback(function(_){var D=_&&_.values?_.values:h.current,$=_&&_.errors?_.errors:m.current?m.current:d.initialErrors||{},z=_&&_.touched?_.touched:x.current?x.current:d.initialTouched||{},Q=_&&_.status?_.status:w.current?w.current:d.initialStatus;h.current=D,m.current=$,x.current=z,w.current=Q;var oe=function(){k({type:"RESET_FORM",payload:{isSubmitting:!!_&&!!_.isSubmitting,errors:$,touched:z,status:Q,values:D,isValidating:!!_&&!!_.isValidating,submitCount:_&&_.submitCount&&typeof _.submitCount=="number"?_.submitCount:0}})};if(d.onReset){var _e=d.onReset(E.values,ja);bf(_e)?_e.then(oe):oe()}else oe()},[d.initialErrors,d.initialStatus,d.initialTouched,d.onReset]);v.useEffect(function(){p.current===!0&&!ni(h.current,d.initialValues)&&c&&(h.current=d.initialValues,xe(),o&&ie(h.current))},[c,d.initialValues,xe,o,ie]),v.useEffect(function(){c&&p.current===!0&&!ni(m.current,d.initialErrors)&&(m.current=d.initialErrors||Zr,k({type:"SET_ERRORS",payload:d.initialErrors||Zr}))},[c,d.initialErrors]),v.useEffect(function(){c&&p.current===!0&&!ni(x.current,d.initialTouched)&&(x.current=d.initialTouched||dl,k({type:"SET_TOUCHED",payload:d.initialTouched||dl}))},[c,d.initialTouched]),v.useEffect(function(){c&&p.current===!0&&!ni(w.current,d.initialStatus)&&(w.current=d.initialStatus,k({type:"SET_STATUS",payload:d.initialStatus}))},[c,d.initialStatus,d.initialTouched]);var Re=Bt(function(_){if(g.current[_]&&nn(g.current[_].validate)){var D=_t(E.values,_),$=g.current[_].validate(D);return bf($)?(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(E.values,_).then(function(z){return z}).then(function(z){k({type:"SET_FIELD_ERROR",payload:{field:_,value:_t(z,_)}}),k({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),G=v.useCallback(function(_,D){var $=D.validate;g.current[_]={validate:$}},[]),ne=v.useCallback(function(_){delete g.current[_]},[]),O=Bt(function(_,D){k({type:"SET_TOUCHED",payload:_});var $=D===void 0?i:D;return $?ie(E.values):Promise.resolve()}),L=v.useCallback(function(_){k({type:"SET_ERRORS",payload:_})},[]),B=Bt(function(_,D){var $=nn(_)?_(E.values):_;k({type:"SET_VALUES",payload:$});var z=D===void 0?n:D;return z?ie($):Promise.resolve()}),V=v.useCallback(function(_,D){k({type:"SET_FIELD_ERROR",payload:{field:_,value:D}})},[]),W=Bt(function(_,D,$){k({type:"SET_FIELD_VALUE",payload:{field:_,value:D}});var z=$===void 0?n:$;return z?ie(Si(E.values,_,D)):Promise.resolve()}),q=v.useCallback(function(_,D){var $=D,z=_,Q;if(!wf(_)){_.persist&&_.persist();var oe=_.target?_.target:_.currentTarget,_e=oe.type,Ct=oe.name,mn=oe.id,Ui=oe.value,ir=oe.checked,Fm=oe.outerHTML,Fa=oe.options,Na=oe.multiple;$=D||Ct||mn,z=/number|range/.test(_e)?(Q=parseFloat(Ui),isNaN(Q)?"":Q):/checkbox/.test(_e)?C5(_t(E.values,$),ir,Ui):Fa&&Na?E5(Fa):Ui}$&&W($,z)},[W,E.values]),ce=Bt(function(_){if(wf(_))return function(D){return q(D,_)};q(_)}),ye=Bt(function(_,D,$){D===void 0&&(D=!0),k({type:"SET_FIELD_TOUCHED",payload:{field:_,value:D}});var z=$===void 0?i:$;return z?ie(E.values):Promise.resolve()}),J=v.useCallback(function(_,D){_.persist&&_.persist();var $=_.target,z=$.name,Q=$.id,oe=$.outerHTML,_e=D||z||Q;ye(_e,!0)},[ye]),Ie=Bt(function(_){if(wf(_))return function(D){return J(D,_)};J(_)}),ft=v.useCallback(function(_){nn(_)?k({type:"SET_FORMIK_STATE",payload:_}):k({type:"SET_FORMIK_STATE",payload:function(){return _}})},[]),dt=v.useCallback(function(_){k({type:"SET_STATUS",payload:_})},[]),rr=v.useCallback(function(_){k({type:"SET_ISSUBMITTING",payload:_})},[]),Zs=Bt(function(){return k({type:"SUBMIT_ATTEMPT"}),ie().then(function(_){var D=_ instanceof Error,$=!D&&Object.keys(_).length===0;if($){var z;try{if(z=Js(),z===void 0)return}catch(Q){throw Q}return Promise.resolve(z).then(function(Q){return p.current&&k({type:"SUBMIT_SUCCESS"}),Q}).catch(function(Q){if(p.current)throw k({type:"SUBMIT_FAILURE"}),Q})}else if(p.current&&(k({type:"SUBMIT_FAILURE"}),D))throw _})}),Oa=Bt(function(_){_&&_.preventDefault&&nn(_.preventDefault)&&_.preventDefault(),_&&_.stopPropagation&&nn(_.stopPropagation)&&_.stopPropagation(),Zs().catch(function(D){console.warn("Warning: An unhandled error was caught from submitForm()",D)})}),ja={resetForm:xe,validateForm:ie,validateField:Re,setErrors:L,setFieldError:V,setFieldTouched:ye,setFieldValue:W,setStatus:dt,setSubmitting:rr,setTouched:O,setValues:B,setFormikState:ft,submitForm:Zs},Js=Bt(function(){return f(E.values,ja)}),xc=Bt(function(_){_&&_.preventDefault&&nn(_.preventDefault)&&_.preventDefault(),_&&_.stopPropagation&&nn(_.stopPropagation)&&_.stopPropagation(),xe()}),Ma=v.useCallback(function(_){return{value:_t(E.values,_),error:_t(E.errors,_),touched:!!_t(E.touched,_),initialValue:_t(h.current,_),initialTouched:!!_t(x.current,_),initialError:_t(m.current,_)}},[E.errors,E.touched,E.values]),Gr=v.useCallback(function(_){return{setValue:function($,z){return W(_,$,z)},setTouched:function($,z){return ye(_,$,z)},setError:function($){return V(_,$)}}},[W,ye,V]),Da=v.useCallback(function(_){var D=hc(_),$=D?_.name:_,z=_t(E.values,$),Q={name:$,value:z,onChange:ce,onBlur:Ie};if(D){var oe=_.type,_e=_.value,Ct=_.as,mn=_.multiple;oe==="checkbox"?_e===void 0?Q.checked=!!z:(Q.checked=!!(Array.isArray(z)&&~z.indexOf(_e)),Q.value=_e):oe==="radio"?(Q.checked=z===_e,Q.value=_e):Ct==="select"&&mn&&(Q.value=Q.value||[],Q.multiple=!0)}return Q},[Ie,ce,E.values]),Et=v.useMemo(function(){return!ni(h.current,E.values)},[h.current,E.values]),wc=v.useMemo(function(){return typeof a<"u"?Et?E.errors&&Object.keys(E.errors).length===0:a!==!1&&nn(a)?a(d):a:E.errors&&Object.keys(E.errors).length===0},[a,Et,E.errors,d]),bc=Ve({},E,{initialValues:h.current,initialErrors:m.current,initialTouched:x.current,initialStatus:w.current,handleBlur:Ie,handleChange:ce,handleReset:xc,handleSubmit:Oa,resetForm:xe,setErrors:L,setFormikState:ft,setFieldTouched:ye,setFieldValue:W,setFieldError:V,setStatus:dt,setSubmitting:rr,setTouched:O,setValues:B,submitForm:Zs,validateForm:ie,validateField:Re,isValid:wc,dirty:Et,unregisterField:ne,registerField:G,getFieldProps:Da,getFieldMeta:Ma,getFieldHelpers:Gr,validateOnBlur:i,validateOnChange:n,validateOnMount:o});return bc}function b5(e){var t={};if(e.inner){if(e.inner.length===0)return Si(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;_t(t,o.path)||(t=Si(t,o.path,o.message))}}return t}function S5(e,t,n,r){n===void 0&&(n=!1);var i=xh(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:i})}function xh(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||Qy(i)?xh(i):i!==""?i:void 0}):Qy(e[r])?t[r]=xh(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function T5(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?hh(Array.isArray(s)?[]:{},s,n):s}else n.isMergeableObject(s)?r[o]=hh(e[o],s,n):e.indexOf(s)===-1&&r.push(s)}),r}function E5(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function C5(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 k5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?v.useLayoutEffect:v.useEffect;function Bt(e){var t=v.useRef(e);return k5(function(){t.current=e}),v.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=v.forwardRef(function(e,t){var n=e.action,r=cT(e,["action"]),i=n??"#",s=y5(),o=s.handleReset,a=s.handleSubmit;return v.createElement("form",Ve({onSubmit:a,ref:t,onReset:o,action:i},r))});_5.displayName="Form";const P5=({init:e,schema:t,action:n})=>w5({initialValues:e,validationSchema:t,validateOnBlur:!1,enableReinitialize:!0,validateOnChange:!1,validateOnMount:!1,onSubmit:r=>{n(r)}});function A5(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 R5=e=>{switch(e){case"success":return M5;case"info":return F5;case"warning":return D5;case"error":return N5;default:return null}},O5=Array(12).fill(0),j5=({visible:e,className:t})=>R.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},R.createElement("div",{className:"sonner-spinner"},O5.map((n,r)=>R.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),M5=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"})),D5=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"})),F5=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"})),N5=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"})),L5=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"})),I5=()=>{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 wh=1;class $5{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:wh++,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 c=>{if(o=["resolve",c],R.isValidElement(c))s=!1,this.create({id:r,type:"default",message:c});else if(B5(c)&&!c.ok){s=!1;const u=typeof n.error=="function"?await n.error(`HTTP error! status: ${c.status}`):n.error,d=typeof n.description=="function"?await n.description(`HTTP error! status: ${c.status}`):n.description,h=typeof u=="object"?u:{message:u};this.create({id:r,type:"error",description:d,...h})}else if(c instanceof Error){s=!1;const u=typeof n.error=="function"?await n.error(c):n.error,d=typeof n.description=="function"?await n.description(c):n.description,h=typeof u=="object"?u:{message:u};this.create({id:r,type:"error",description:d,...h})}else if(n.success!==void 0){s=!1;const u=typeof n.success=="function"?await n.success(c):n.success,d=typeof n.description=="function"?await n.description(c):n.description,h=typeof u=="object"?u:{message:u};this.create({id:r,type:"success",description:d,...h})}}).catch(async c=>{if(o=["reject",c],n.error!==void 0){s=!1;const f=typeof n.error=="function"?await n.error(c):n.error,u=typeof n.description=="function"?await n.description(c):n.description,d=typeof f=="object"?f:{message:f};this.create({id:r,type:"error",description:u,...d})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((c,f)=>a.then(()=>o[0]==="reject"?f(o[1]):c(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)||wh++;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 yt=new $5,V5=(e,t)=>{const n=(t==null?void 0:t.id)||wh++;return yt.addToast({title:e,...t,id:n}),n},B5=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",z5=V5,U5=()=>yt.toasts,H5=()=>yt.getActiveToasts(),bv=Object.assign(z5,{success:yt.success,info:yt.info,warning:yt.warning,error:yt.error,custom:yt.custom,message:yt.message,promise:yt.promise,dismiss:yt.dismiss,loading:yt.loading},{getHistory:U5,getToasts:H5});A5("[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 hl(e){return e.label!==void 0}const W5=3,K5="24px",q5="16px",Sv=4e3,Q5=356,G5=14,Y5=45,X5=200;function yn(...e){return e.filter(Boolean).join(" ")}function Z5(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const J5=e=>{var t,n,r,i,s,o,a,l,c;const{invert:f,toast:u,unstyled:d,interacting:h,setHeights:m,visibleToasts:x,heights:w,index:p,toasts:g,expanded:y,removeToast:C,defaultRichColors:b,closeButton:E,style:k,cancelButtonStyle:P,actionButtonStyle:j,className:M="",descriptionClassName:I="",duration:re,position:ie,gap:xe,expandByDefault:Re,classNames:G,icons:ne,closeButtonAriaLabel:O="Close toast"}=e,[L,B]=R.useState(null),[V,W]=R.useState(null),[q,ce]=R.useState(!1),[ye,J]=R.useState(!1),[Ie,ft]=R.useState(!1),[dt,rr]=R.useState(!1),[Zs,Oa]=R.useState(!1),[ja,Js]=R.useState(0),[xc,Ma]=R.useState(0),Gr=R.useRef(u.duration||re||Sv),Da=R.useRef(null),Et=R.useRef(null),wc=p===0,bc=p+1<=x,_=u.type,D=u.dismissible!==!1,$=u.className||"",z=u.descriptionClassName||"",Q=R.useMemo(()=>w.findIndex(Y=>Y.toastId===u.id)||0,[w,u.id]),oe=R.useMemo(()=>{var Y;return(Y=u.closeButton)!=null?Y:E},[u.closeButton,E]),_e=R.useMemo(()=>u.duration||re||Sv,[u.duration,re]),Ct=R.useRef(0),mn=R.useRef(0),Ui=R.useRef(0),ir=R.useRef(null),[Fm,Fa]=ie.split("-"),Na=R.useMemo(()=>w.reduce((Y,$e,Ye)=>Ye>=Q?Y:Y+$e.height,0),[w,Q]),Nm=I5(),RT=u.invert||f,Sc=_==="loading";mn.current=R.useMemo(()=>Q*xe+Na,[Q,Na]),R.useEffect(()=>{Gr.current=_e},[_e]),R.useEffect(()=>{ce(!0)},[]),R.useEffect(()=>{const Y=Et.current;if(Y){const $e=Y.getBoundingClientRect().height;return Ma($e),m(Ye=>[{toastId:u.id,height:$e,position:u.position},...Ye]),()=>m(Ye=>Ye.filter(kt=>kt.toastId!==u.id))}},[m,u.id]),R.useLayoutEffect(()=>{if(!q)return;const Y=Et.current,$e=Y.style.height;Y.style.height="auto";const Ye=Y.getBoundingClientRect().height;Y.style.height=$e,Ma(Ye),m(kt=>kt.find(We=>We.toastId===u.id)?kt.map(We=>We.toastId===u.id?{...We,height:Ye}:We):[{toastId:u.id,height:Ye,position:u.position},...kt])},[q,u.title,u.description,m,u.id]);const sr=R.useCallback(()=>{J(!0),Js(mn.current),m(Y=>Y.filter($e=>$e.toastId!==u.id)),setTimeout(()=>{C(u)},X5)},[u,C,m,mn]);R.useEffect(()=>{if(u.promise&&_==="loading"||u.duration===1/0||u.type==="loading")return;let Y;return y||h||Nm?(()=>{if(Ui.current<Ct.current){const kt=new Date().getTime()-Ct.current;Gr.current=Gr.current-kt}Ui.current=new Date().getTime()})():(()=>{Gr.current!==1/0&&(Ct.current=new Date().getTime(),Y=setTimeout(()=>{u.onAutoClose==null||u.onAutoClose.call(u,u),sr()},Gr.current))})(),()=>clearTimeout(Y)},[y,h,u,_,Nm,sr]),R.useEffect(()=>{u.delete&&sr()},[sr,u.delete]);function OT(){var Y;if(ne!=null&&ne.loading){var $e;return R.createElement("div",{className:yn(G==null?void 0:G.loader,u==null||($e=u.classNames)==null?void 0:$e.loader,"sonner-loader"),"data-visible":_==="loading"},ne.loading)}return R.createElement(j5,{className:yn(G==null?void 0:G.loader,u==null||(Y=u.classNames)==null?void 0:Y.loader),visible:_==="loading"})}var Lm,Im;return R.createElement("li",{tabIndex:0,ref:Et,className:yn(M,$,G==null?void 0:G.toast,u==null||(t=u.classNames)==null?void 0:t.toast,G==null?void 0:G.default,G==null?void 0:G[_],u==null||(n=u.classNames)==null?void 0:n[_]),"data-sonner-toast":"","data-rich-colors":(Lm=u.richColors)!=null?Lm:b,"data-styled":!(u.jsx||u.unstyled||d),"data-mounted":q,"data-promise":!!u.promise,"data-swiped":Zs,"data-removed":ye,"data-visible":bc,"data-y-position":Fm,"data-x-position":Fa,"data-index":p,"data-front":wc,"data-swiping":Ie,"data-dismissible":D,"data-type":_,"data-invert":RT,"data-swipe-out":dt,"data-swipe-direction":V,"data-expanded":!!(y||Re&&q),style:{"--index":p,"--toasts-before":p,"--z-index":g.length-p,"--offset":`${ye?ja:mn.current}px`,"--initial-height":Re?"auto":`${xc}px`,...k,...u.style},onDragEnd:()=>{ft(!1),B(null),ir.current=null},onPointerDown:Y=>{Sc||!D||(Da.current=new Date,Js(mn.current),Y.target.setPointerCapture(Y.pointerId),Y.target.tagName!=="BUTTON"&&(ft(!0),ir.current={x:Y.clientX,y:Y.clientY}))},onPointerUp:()=>{var Y,$e,Ye;if(dt||!D)return;ir.current=null;const kt=Number(((Y=Et.current)==null?void 0:Y.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),La=Number((($e=Et.current)==null?void 0:$e.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),We=new Date().getTime()-((Ye=Da.current)==null?void 0:Ye.getTime()),It=L==="x"?kt:La,Ia=Math.abs(It)/We;if(Math.abs(It)>=Y5||Ia>.11){Js(mn.current),u.onDismiss==null||u.onDismiss.call(u,u),W(L==="x"?kt>0?"right":"left":La>0?"down":"up"),sr(),rr(!0);return}else{var Jt,en;(Jt=Et.current)==null||Jt.style.setProperty("--swipe-amount-x","0px"),(en=Et.current)==null||en.style.setProperty("--swipe-amount-y","0px")}Oa(!1),ft(!1),B(null)},onPointerMove:Y=>{var $e,Ye,kt;if(!ir.current||!D||(($e=window.getSelection())==null?void 0:$e.toString().length)>0)return;const We=Y.clientY-ir.current.y,It=Y.clientX-ir.current.x;var Ia;const Jt=(Ia=e.swipeDirections)!=null?Ia:Z5(ie);!L&&(Math.abs(It)>1||Math.abs(We)>1)&&B(Math.abs(It)>Math.abs(We)?"x":"y");let en={x:0,y:0};const $m=Yr=>1/(1.5+Math.abs(Yr)/20);if(L==="y"){if(Jt.includes("top")||Jt.includes("bottom"))if(Jt.includes("top")&&We<0||Jt.includes("bottom")&&We>0)en.y=We;else{const Yr=We*$m(We);en.y=Math.abs(Yr)<Math.abs(We)?Yr:We}}else if(L==="x"&&(Jt.includes("left")||Jt.includes("right")))if(Jt.includes("left")&&It<0||Jt.includes("right")&&It>0)en.x=It;else{const Yr=It*$m(It);en.x=Math.abs(Yr)<Math.abs(It)?Yr:It}(Math.abs(en.x)>0||Math.abs(en.y)>0)&&Oa(!0),(Ye=Et.current)==null||Ye.style.setProperty("--swipe-amount-x",`${en.x}px`),(kt=Et.current)==null||kt.style.setProperty("--swipe-amount-y",`${en.y}px`)}},oe&&!u.jsx&&_!=="loading"?R.createElement("button",{"aria-label":O,"data-disabled":Sc,"data-close-button":!0,onClick:Sc||!D?()=>{}:()=>{sr(),u.onDismiss==null||u.onDismiss.call(u,u)},className:yn(G==null?void 0:G.closeButton,u==null||(r=u.classNames)==null?void 0:r.closeButton)},(Im=ne==null?void 0:ne.close)!=null?Im:L5):null,_||u.icon||u.promise?R.createElement("div",{"data-icon":"",className:yn(G==null?void 0:G.icon,u==null||(i=u.classNames)==null?void 0:i.icon)},u.promise||u.type==="loading"&&!u.icon?u.icon||OT():null,u.type!=="loading"?u.icon||(ne==null?void 0:ne[_])||R5(_):null):null,R.createElement("div",{"data-content":"",className:yn(G==null?void 0:G.content,u==null||(s=u.classNames)==null?void 0:s.content)},R.createElement("div",{"data-title":"",className:yn(G==null?void 0:G.title,u==null||(o=u.classNames)==null?void 0:o.title)},u.jsx?u.jsx:typeof u.title=="function"?u.title():u.title),u.description?R.createElement("div",{"data-description":"",className:yn(I,z,G==null?void 0:G.description,u==null||(a=u.classNames)==null?void 0:a.description)},typeof u.description=="function"?u.description():u.description):null),R.isValidElement(u.cancel)?u.cancel:u.cancel&&hl(u.cancel)?R.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||P,onClick:Y=>{hl(u.cancel)&&D&&(u.cancel.onClick==null||u.cancel.onClick.call(u.cancel,Y),sr())},className:yn(G==null?void 0:G.cancelButton,u==null||(l=u.classNames)==null?void 0:l.cancelButton)},u.cancel.label):null,R.isValidElement(u.action)?u.action:u.action&&hl(u.action)?R.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||j,onClick:Y=>{hl(u.action)&&(u.action.onClick==null||u.action.onClick.call(u.action,Y),!Y.defaultPrevented&&sr())},className:yn(G==null?void 0:G.actionButton,u==null||(c=u.classNames)==null?void 0:c.actionButton)},u.action.label):null)};function Tv(){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 eL(e,t){const n={};return[e,t].forEach((r,i)=>{const s=i===1,o=s?"--mobile-offset":"--offset",a=s?q5:K5;function l(c){["top","right","bottom","left"].forEach(f=>{n[`${o}-${f}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${o}-${c}`]=a:n[`${o}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(a)}),n}const tL=R.forwardRef(function(t,n){const{invert:r,position:i="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:a,className:l,offset:c,mobileOffset:f,theme:u="light",richColors:d,duration:h,style:m,visibleToasts:x=W5,toastOptions:w,dir:p=Tv(),gap:g=G5,icons:y,containerAriaLabel:C="Notifications"}=t,[b,E]=R.useState([]),k=R.useMemo(()=>Array.from(new Set([i].concat(b.filter(V=>V.position).map(V=>V.position)))),[b,i]),[P,j]=R.useState([]),[M,I]=R.useState(!1),[re,ie]=R.useState(!1),[xe,Re]=R.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=R.useRef(null),ne=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),O=R.useRef(null),L=R.useRef(!1),B=R.useCallback(V=>{E(W=>{var q;return(q=W.find(ce=>ce.id===V.id))!=null&&q.delete||yt.dismiss(V.id),W.filter(({id:ce})=>ce!==V.id)})},[]);return R.useEffect(()=>yt.subscribe(V=>{if(V.dismiss){const W=b.map(q=>q.id===V.id?{...q,delete:!0}:q);requestAnimationFrame(()=>{E(W)});return}setTimeout(()=>{sk.flushSync(()=>{E(W=>{const q=W.findIndex(ce=>ce.id===V.id);return q!==-1?[...W.slice(0,q),{...W[q],...V},...W.slice(q+1)]:[V,...W]})})})}),[b]),R.useEffect(()=>{if(u!=="system"){Re(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Re("dark"):Re("light")),typeof window>"u")return;const V=window.matchMedia("(prefers-color-scheme: dark)");try{V.addEventListener("change",({matches:W})=>{Re(W?"dark":"light")})}catch{V.addListener(({matches:q})=>{try{Re(q?"dark":"light")}catch(ce){console.error(ce)}})}},[u]),R.useEffect(()=>{b.length<=1&&I(!1)},[b]),R.useEffect(()=>{const V=W=>{var q;if(s.every(J=>W[J]||W.code===J)){var ye;I(!0),(ye=G.current)==null||ye.focus()}W.code==="Escape"&&(document.activeElement===G.current||(q=G.current)!=null&&q.contains(document.activeElement))&&I(!1)};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[s]),R.useEffect(()=>{if(G.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,L.current=!1)}},[G.current]),R.createElement("section",{ref:n,"aria-label":`${C} ${ne}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},k.map((V,W)=>{var q;const[ce,ye]=V.split("-");return b.length?R.createElement("ol",{key:V,dir:p==="auto"?Tv():p,tabIndex:-1,ref:G,className:l,"data-sonner-toaster":!0,"data-sonner-theme":xe,"data-y-position":ce,"data-lifted":M&&b.length>1&&!o,"data-x-position":ye,style:{"--front-toast-height":`${((q=P[0])==null?void 0:q.height)||0}px`,"--width":`${Q5}px`,"--gap":`${g}px`,...m,...eL(c,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)},b.filter(J=>!J.position&&W===0||J.position===V).map((J,Ie)=>{var ft,dt;return R.createElement(J5,{key:J.id,icons:y,index:Ie,toast:J,defaultRichColors:d,duration:(ft=w==null?void 0:w.duration)!=null?ft:h,className:w==null?void 0:w.className,descriptionClassName:w==null?void 0:w.descriptionClassName,invert:r,visibleToasts:x,closeButton:(dt=w==null?void 0:w.closeButton)!=null?dt:a,interacting:re,position:V,style:w==null?void 0:w.style,unstyled:w==null?void 0:w.unstyled,classNames:w==null?void 0:w.classNames,cancelButtonStyle:w==null?void 0:w.cancelButtonStyle,actionButtonStyle:w==null?void 0:w.actionButtonStyle,closeButtonAriaLabel:w==null?void 0:w.closeButtonAriaLabel,removeToast:B,toasts:b.filter(rr=>rr.position==J.position),heights:P.filter(rr=>rr.position==J.position),setHeights:j,expandByDefault:o,gap:g,expanded:M,swipeDirections:t.swipeDirections})})):null}))});function nL(e){return Array.isArray(e)&&e[0].field!==void 0}const rL=(e,t)=>{var n;if(nL(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||bv.error(e.message);return}if(e&&e.error){t!=null&&t.noToast||bv.error(e.error);return}};function iL(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 Rm({id:e,text:t,required:n,className:r,noMargin:i}){return t?T.jsxs("label",{htmlFor:e,className:ze(r,{"mb-2":!i},"line-block text-base font-medium text-gray-600"),children:[t," ",n&&T.jsx("span",{className:"text-red-500",children:"*"})]}):null}const Sf={sm:"px-3 py-1 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-15"};function sL({id:e,label:t,suffix:n,prefix:r,size:i="md",type:s="text",noMargin:o=!1,required:a=!1,error:l,ariaDescribedBy:c,className:f,ariaInvalid:u,ariaLabel:d,autoFocus:h,...m}){const x=tr();return T.jsxs("div",{className:ze({"mb-3":!o},f),children:[T.jsx(Rm,{id:e,text:t,required:a}),T.jsxs("div",{className:"flex items-center",children:[r&&T.jsx("span",{className:ze("inline-block border border-solid border-r-0 border-slate-200 bg-slate-100 rounded-l-md",Sf[i],{"border-red-500!":!!l}),children:r}),T.jsx("input",{id:e,className:ze("text-gray-800 border border-solid rounded-md block text-base py-2 px-4 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",Sf[i],{"rounded-l-none":!!r,"rounded-r-none":!!n,"border-red-500! text-red-500!":!!l}),type:s,required:a,"aria-describedby":c,"aria-invalid":u,"aria-label":d,style:{color:x.getColor(U.InputText),backgroundColor:x.getColor(U.InputBackground),borderColor:x.getColor(U.InputBorder),borderRadius:x.getRadius()},...m}),n&&T.jsx("span",{className:ze("inline-block border border-solid border-l-0 border-slate-200 bg-slate-100 rounded-r-md",Sf[i],{"border-red-500!":!!l}),children:n})]}),!!l&&T.jsx("p",{className:"mt-1 text-sm text-red-500",children:l})]})}const oL=(e,t)=>{document.cookie=`${e}=${t}`},dT=v.createContext({}),aL=()=>`${window.location.pathname}_$$_${document.title}`,lL=()=>{const e=localStorage.getItem("page");return!e||e===""?"/":e},uL=()=>{const e=localStorage.getItem("p-history");if(!e||e==="")return[];try{return JSON.parse(e)}catch{return[]}};function cL({children:e}){const[t,n]=v.useState("/"),[r,i]=v.useState(uL());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 T.jsx(dT.Provider,{value:{page:t,setPage:o,history:r,clearHistory:s},children:e})}function Om(){return v.useContext(dT)}function fL({label:e,id:t,value:n="",className:r,placeholder:i,children:s,required:o,error:a,...l}){return T.jsxs("div",{className:r||"",children:[e&&T.jsx(Rm,{id:t,required:o,text:e}),T.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&&T.jsx("p",{className:"1 texm text-r500",children:a})]})}const Ev={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:""}},dL={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"},hL={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"},pL={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 mL({children:e,name:t,required:n,value:r,checked:i,onChange:s,onBlur:o,red:a,id:l=t,size:c="md",effect:f="ring",reversed:u=!1,variant:d="blue",...h}){return T.jsxs("div",{children:[T.jsxs("div",{className:`flex items-center justify-between ${u?"flex-row-reverse":""} ${Ev[f].label}`,children:[T.jsxs("label",{className:"disable-highlight relative mr-3 flex cursor-pointer items-center rounded-full",htmlFor:l,children:[T.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 ${dL[d]} ${hL[c]} ${Ev[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}),T.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:T.jsx(Me.Check,{className:pL[c]})})]}),T.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&&T.jsx("small",{className:"text-xs text-red-500",children:a})]})}const gL={blue:"text-blue-500 border-blue-gray-200 checked:bg-blue-500 checked:border-blue-500 checked:before:bg-blue-500 before:bg-gray-500",red:"text-red-500 border-blue-gray-200 checked:border-red-500 checked:before:bg-red-500 before:bg-blue-gray-500",emerald:"text-emerald-500 border-blue-gray-200 checked:border-emerald-500 checked:before:bg-emerald-500 before:bg-blue-gray-500",orange:"text-orange-500 border-blue-gray-200 checked:border-orange-500 checked:before:bg-orange-500 before:bg-blue-gray-500"},yL={blue:"text-white",red:"text-red-500",emerald:"text-emerald-500",orange:"text-orange-500"},Cv={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"},vL={sm:"size-3",md:"size-4",lg:"size-5"},kv={ring:{label:"",input:"relative before:content[''] before:absolute before:top-2/4 before:left-2/4 before:block before:h-9 before:w-9 before:-translate-y-2/4 before:-translate-x-2/4 before:rounded-full before:opacity-0 before:transition-opacity hover:before:opacity-10"},hover:{label:"hover:bg-secondary transition-colors duration-200",input:""}};function bh({children:e,id:t,name:n,size:r="md",variant:i="blue",effect:s="ring",value:o=!1,reverse:a=!1,onChange:l,onBlur:c,onClick:f}){return T.jsxs("label",{className:`disable-highlight flex cursor-pointer items-center rounded-md text-gray-700 ${a?"flex-row-reverse justify-between":""} ${kv[s].label} `,htmlFor:t,children:[T.jsxs("label",{className:"relative flex items-center p-2 rounded-full cursor-pointer disable-highlight",htmlFor:t,children:[T.jsx("input",{id:t,name:n,type:"radio",className:`peer disable-highlight bg-none cursor-pointer appearance-none rounded-full border border-solid bg-inherit transition-all ${gL[i]} ${Cv[r]} ${kv[s].input}`,checked:o,onChange:u=>l==null?void 0:l(u.target.checked),onBlur:u=>c==null?void 0:c(u.target.checked),onClick:()=>f==null?void 0:f(!o)}),T.jsx("div",{className:`pointer-events-none absolute flex items-center justify-center opacity-0 transition-opacity peer-checked:opacity-100 ${yL[i]} ${Cv[r]}`,children:T.jsx(Me.Check,{className:vL[r]})})]}),T.jsx("label",{className:"text-gray-800 disable-highlight flex cursor-pointer select-none items-center font-light",htmlFor:t,children:e})]})}bh.Group=function({label:t,id:n,className:r,required:i,children:s}){return T.jsxs("div",{className:r,children:[T.jsxs("label",{htmlFor:n,className:"inline-block mb-2 text-base font-medium",children:[t," ",i&&T.jsx("span",{className:"text-red-500",children:"*"})]}),T.jsx("div",{className:"col-span-12 flex flex-col justify-center",children:s})]})};function hT({id:e,label:t,suffix:n,prefix:r,className:i,noMargin:s,rows:o=3,type:a="text",required:l=!1,error:c,ariaInvalid:f,inputRef:u,autoFocus:d=!0,style:h,...m}){const x=tr();return T.jsxs("div",{className:ze({"mb-3":!s},i),children:[t&&T.jsx(Rm,{id:e,text:t,required:l}),T.jsx("textarea",{className:ze("resize-none max-h-40 text-gray-800 w-full py-2 px-4 border border-solid rounded-md 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!":!!c}),id:e,"aria-invalid":f,...m,ref:u,autoFocus:d,style:{...h,color:x.getColor(U.InputText),backgroundColor:x.getColor(U.InputBackground),borderColor:x.getColor(U.InputBorder),borderRadius:x.getRadius()}}),!!c&&T.jsx("p",{className:"text-red-500 mt-1 text-sm",children:c})]})}function xL({onOk:e,clientId:t,widgetId:n,appearance:r}){var h,m,x,w,p,g,y,C;const i=tr(),{defaultValues:s}=Fn(),o=Om(),a=lM(),l=(m=(h=r==null?void 0:r.body)==null?void 0:h.inputs)==null?void 0:m.reduce((b,E)=>{const k=Fl(E.name);return b[E.name]=k||(s==null?void 0:s[E.name])||"",b},{}),c=(w=(x=r==null?void 0:r.body)==null?void 0:x.inputs)==null?void 0:w.reduce((b,E)=>(b[E.name]="",b),{}),f=OS((g=(p=r==null?void 0:r.body)==null?void 0:p.inputs)==null?void 0:g.reduce((b,E)=>(b[E.name]=E.required?dh().required(E.label):dh(),b),{})),u=P5({init:{...l},schema:f,action:async b=>{var P;const[E,k]=await a.mutateAsync({inputs:b,history:o.history,client_id:t,widget_id:n});if(ew(k)){o.clearHistory();for(const j of((P=r==null?void 0:r.body)==null?void 0:P.inputs)||[])oL(j.name,b[j.name]);e==null||e();return}rL(E,{form:u})}}),d=!iL(c,u.values);return T.jsx("section",{className:"overflow-y-auto p-4 bg-white",style:{height:"calc(100% - 13rem)",backgroundColor:i.getColor(U.GreeterBackground)},children:T.jsxs("form",{className:"grid grid-cols-1 gap-4",onSubmit:b=>{b.preventDefault(),u.handleSubmit()},children:[(C=(y=r==null?void 0:r.body)==null?void 0:y.inputs)==null?void 0:C.map(b=>{var E,k;if(["text","email","phone"].includes(b.type))return T.jsx(sL,{id:b.name,name:b.name,type:b.type,label:b.label,value:u.values[b.name],onChange:u.handleChange,onBlur:u.handleBlur,autoComplete:"off",placeholder:b.placeholder,error:u.errors[b.name],ariaInvalid:u.errors.name?!0:void 0,required:b.required,noMargin:!0},b.name);if(b.type==="select")return T.jsx(fL,{id:b.name,name:b.name,value:u.values[b.name],onChange:u.handleChange,label:b.label,required:b.required,children:(E=b.options)==null?void 0:E.map(P=>T.jsx("option",{value:P,children:P},P))},b.name);if(b.type==="checkbox")return T.jsx(mL,{id:b.name,name:b.name,value:u.values[b.name],onChange:u.handleChange,required:b.required,children:b.label},b.name);if(b.type==="radio")return T.jsx(bh.Group,{id:b.name,label:b.label,required:b.required,children:(k=b.options)==null?void 0:k.map(P=>T.jsx(bh,{onChange:j=>{j?u.setFieldValue(b.name,P):u.setFieldValue(b.name,"")},id:P,name:b.name,value:P===u.values[b.name],children:P},P))},b.name);if(b.type==="textarea")return T.jsx(hT,{id:b.name,name:b.name,value:u.values[b.name],onChange:u.handleChange,placeholder:b.placeholder,error:u.errors[b.name],required:b.required,label:b.label},b.name)}),T.jsx(Vs,{textKey:U.GreeterButtonText,bgKey:U.GreeterButtonBackground,type:"submit",disabled:!d,children:"Sohbet Oluştur"})]})})}function wL({onClose:e}){return T.jsx(Vs,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"md",rounded:!0,variant:"gray",kind:"ghost",onClick:e,className:"absolute top-2 right-2",children:T.jsx(Me.X,{className:"size-5"})})}function bL({image_url:e,name:t,size:n="size-9"}){return e?T.jsx("img",{src:e,alt:t,className:ze("rounded-md",n)}):T.jsx("div",{className:"flex items-center justify-center gap-1",children:T.jsx(Me.Website,{className:ze("text-slate-500",n)})})}function SL(){const e=Om(),t=v.useCallback(()=>{const n=window.location.pathname;n!==e.page&&e.setPage(n)},[e.page]);return wS("popstate",t),null}function TL(){const e=Ys(),t=Om(),n=v.useCallback(()=>{const r=window.location.pathname;if(r!==t.page){if(e){e.emit(Mn.PageChange,{page:r});return}t.setPage(r)}},[e,t.page]);return wS("popstate",n),v.useEffect(()=>{if(!e)return;const r=lL(),i=aL();r!==i&&(e.emit(Mn.PageChange,{page:i}),t.setPage(i))},[e]),null}function EL({children:e}){const t=tr(),{widget:n}=Fn();return n?T.jsx(ta,{children:T.jsxs(Jn.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},transition:{duration:.3},className:"h-full w-full relative",children:[T.jsx("div",{style:{backgroundColor:t.getColor(U.GreeterTopBackground)},className:"-z-10 h-52 absolute top-0 left-0 w-full rounded-t-md flex flex-col gap-4 items-center justify-center"}),e]})}):null}function CL(){return SL(),null}const Tf=(e,t)=>{var n;return(n=e.find(r=>r.type===t))==null?void 0:n.content};function kL(){var u,d,h,m,x,w;const e=tr(),{widget:t,setOpen:n}=Fn(),[r,i]=v.useState(!0),s=fm(),o=dm();if(!t)return null;const a=()=>{n(!1)};if(v.useEffect(()=>{uM(t.client_id).then(([p,g])=>{ew(g)&&s.push("chat")}).finally(()=>{i(!1)})},[]),r)return null;const l=Tf(((d=(u=t.appearance)==null?void 0:u.head)==null?void 0:d.elements)||[],"text"),c=Tf(((m=(h=t.appearance)==null?void 0:h.head)==null?void 0:m.elements)||[],"title"),f=Tf(((w=(x=t.appearance)==null?void 0:x.head)==null?void 0:w.elements)||[],"logo");return T.jsxs(EL,{children:[T.jsxs("div",{className:"relative flex flex-col gap-3 items-center justify-center h-52",children:[o&&T.jsx(wL,{onClose:a}),f&&T.jsx(bL,{name:t.name,image_url:f,size:"size-24"}),c&&T.jsx("div",{style:{color:e.getColor(U.GreeterTopText)},className:"text-white text-lg font-bold ml-2",children:c}),l&&T.jsx("div",{style:{color:e.getColor(U.GreeterTopText)},className:"text-white text-sm",children:l})]}),T.jsx(xL,{clientId:t.client_id,widgetId:t.link_id,appearance:t.appearance,onOk:()=>{s.push("chat")}})]})}function _L(){return T.jsxs(T.Fragment,{children:[T.jsx(bS,{border:!0,children:T.jsx(kL,{})}),T.jsx(CL,{})]})}const PL=[{path:"/",component:_L,name:"registration"}];function AL({name:e,avatar:t,className:n="text-neutral-500"}){return T.jsxs("div",{className:"flex gap-2 items-center",children:[T.jsx("div",{className:"min-w-max",children:T.jsxs("span",{children:[t&&T.jsx("img",{className:"size-8 rounded-full",src:t,"aria-label":e}),!t&&T.jsx("div",{className:"size-8 rounded-full bg-neutral-200"})]})}),T.jsx("div",{className:"flex flex-col",children:T.jsx("span",{className:ze("line-clamp-1",n),children:e})})]})}var pT=(e=>(e.AdminJoin="admin_join",e))(pT||{}),pt=(e=>(e.Customer="customer",e.User="user",e.System="system",e.Activity="activity",e))(pt||{}),RL=Object.defineProperty,OL=(e,t,n)=>t in e?RL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ef=(e,t,n)=>(OL(e,typeof t!="symbol"?t+"":t,n),n);let jL=class{constructor(){Ef(this,"current",this.detect()),Ef(this,"handoffState","pending"),Ef(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"}},Il=new jL;function ML(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function pc(){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 ML(()=>{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=pc();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 mT(){let[e]=v.useState(pc);return v.useEffect(()=>()=>e.dispose(),[e]),e}let Ir=(e,t)=>{Il.isServer?v.useEffect(e,t):v.useLayoutEffect(e,t)};function gT(e){let t=v.useRef(e);return Ir(()=>{t.current=e},[e]),t}let Wn=function(e){let t=gT(e);return R.useCallback((...n)=>t.current(...n),[t])};function Sh(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function mc(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,mc),r}var yT=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(yT||{}),kr=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(kr||{});function vT(){let e=FL();return v.useCallback(t=>DL({mergeRefs:e,...t}),[e])}function DL({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:s=!0,name:o,mergeRefs:a}){a=a??NL;let l=xT(t,e);if(s)return pl(l,n,r,o,a);let c=i??0;if(c&2){let{static:f=!1,...u}=l;if(f)return pl(u,n,r,o,a)}if(c&1){let{unmount:f=!0,...u}=l;return mc(f?0:1,{0(){return null},1(){return pl({...u,hidden:!0,style:{display:"none"}},n,r,o,a)}})}return pl(l,n,r,o,a)}function pl(e,t={},n,r,i){let{as:s=n,children:o,refName:a="ref",...l}=Cf(e,["unmount","static"]),c=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 u={};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,w=>`-${w.toLowerCase()}`));if(d){u["data-headlessui-state"]=h.join(" ");for(let m of h)u[`data-${m}`]=""}}if(s===v.Fragment&&(Object.keys(ri(l)).length>0||Object.keys(ri(u)).length>0))if(!v.isValidElement(f)||Array.isArray(f)&&f.length>1){if(Object.keys(ri(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(ri(l)).concat(Object.keys(ri(u))).map(d=>` - ${d}`).join(`
|
|
105
|
+
*/var He=typeof Symbol=="function"&&Symbol.for,Pm=He?Symbol.for("react.element"):60103,Am=He?Symbol.for("react.portal"):60106,nc=He?Symbol.for("react.fragment"):60107,rc=He?Symbol.for("react.strict_mode"):60108,ic=He?Symbol.for("react.profiler"):60114,sc=He?Symbol.for("react.provider"):60109,oc=He?Symbol.for("react.context"):60110,Rm=He?Symbol.for("react.async_mode"):60111,ac=He?Symbol.for("react.concurrent_mode"):60111,lc=He?Symbol.for("react.forward_ref"):60112,uc=He?Symbol.for("react.suspense"):60113,u5=He?Symbol.for("react.suspense_list"):60120,cc=He?Symbol.for("react.memo"):60115,fc=He?Symbol.for("react.lazy"):60116,c5=He?Symbol.for("react.block"):60121,f5=He?Symbol.for("react.fundamental"):60117,d5=He?Symbol.for("react.responder"):60118,h5=He?Symbol.for("react.scope"):60119;function Lt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Pm:switch(e=e.type,e){case Rm:case ac:case nc:case ic:case rc:case uc:return e;default:switch(e=e&&e.$$typeof,e){case oc:case lc:case fc:case cc:case sc:return e;default:return t}}case Am:return t}}}function aT(e){return Lt(e)===ac}ue.AsyncMode=Rm;ue.ConcurrentMode=ac;ue.ContextConsumer=oc;ue.ContextProvider=sc;ue.Element=Pm;ue.ForwardRef=lc;ue.Fragment=nc;ue.Lazy=fc;ue.Memo=cc;ue.Portal=Am;ue.Profiler=ic;ue.StrictMode=rc;ue.Suspense=uc;ue.isAsyncMode=function(e){return aT(e)||Lt(e)===Rm};ue.isConcurrentMode=aT;ue.isContextConsumer=function(e){return Lt(e)===oc};ue.isContextProvider=function(e){return Lt(e)===sc};ue.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Pm};ue.isForwardRef=function(e){return Lt(e)===lc};ue.isFragment=function(e){return Lt(e)===nc};ue.isLazy=function(e){return Lt(e)===fc};ue.isMemo=function(e){return Lt(e)===cc};ue.isPortal=function(e){return Lt(e)===Am};ue.isProfiler=function(e){return Lt(e)===ic};ue.isStrictMode=function(e){return Lt(e)===rc};ue.isSuspense=function(e){return Lt(e)===uc};ue.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===nc||e===ac||e===ic||e===rc||e===uc||e===u5||typeof e=="object"&&e!==null&&(e.$$typeof===fc||e.$$typeof===cc||e.$$typeof===sc||e.$$typeof===oc||e.$$typeof===lc||e.$$typeof===f5||e.$$typeof===d5||e.$$typeof===h5||e.$$typeof===c5)};ue.typeOf=Lt;oT.exports=ue;var p5=oT.exports,lT=p5,m5={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},g5={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},uT={};uT[lT.ForwardRef]=m5;uT[lT.Memo]=g5;function Ve(){return Ve=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},Ve.apply(this,arguments)}function cT(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 dc=v.createContext(void 0);dc.displayName="FormikContext";dc.Provider;dc.Consumer;function y5(){var e=v.useContext(dc);return e}var nn=function(t){return typeof t=="function"},hc=function(t){return t!==null&&typeof t=="object"},v5=function(t){return String(Math.floor(Number(t)))===t},bf=function(t){return Object.prototype.toString.call(t)==="[object String]"},Sf=function(t){return hc(t)&&nn(t.then)};function _t(e,t,n,r){r===void 0&&(r=0);for(var i=sT(t);e&&r<i.length;)e=e[i[r++]];return r!==i.length&&!e||e===void 0?n:e}function Si(e,t,n){for(var r=vv(e),i=r,s=0,o=sT(t);s<o.length-1;s++){var a=o[s],l=_t(e,o.slice(0,s+1));if(l&&(hc(l)||Array.isArray(l)))i=i[a]=vv(l);else{var c=o[s+1];i=i[a]=v5(c)&&Number(c)>=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 fT(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];hc(a)?n.get(a)||(n.set(a,!0),r[o]=Array.isArray(a)?[]:{},fT(a,t,n,r[o])):r[o]=t}return r}function x5(e,t){switch(t.type){case"SET_VALUES":return Ve({},e,{values:t.payload});case"SET_TOUCHED":return Ve({},e,{touched:t.payload});case"SET_ERRORS":return ni(e.errors,t.payload)?e:Ve({},e,{errors:t.payload});case"SET_STATUS":return Ve({},e,{status:t.payload});case"SET_ISSUBMITTING":return Ve({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return Ve({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return Ve({},e,{values:Si(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return Ve({},e,{touched:Si(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return Ve({},e,{errors:Si(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return Ve({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return Ve({},e,{touched:fT(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":return Ve({},e,{isSubmitting:!1});case"SUBMIT_SUCCESS":return Ve({},e,{isSubmitting:!1});default:return e}}var Zr={},dl={};function w5(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,c=l===void 0?!1:l,f=e.onSubmit,u=cT(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),d=Ve({validateOnChange:n,validateOnBlur:i,validateOnMount:o,onSubmit:f},u),h=v.useRef(d.initialValues),m=v.useRef(d.initialErrors||Zr),x=v.useRef(d.initialTouched||dl),w=v.useRef(d.initialStatus),p=v.useRef(!1),g=v.useRef({});v.useEffect(function(){return p.current=!0,function(){p.current=!1}},[]);var y=v.useState(0),C=y[1],b=v.useRef({values:fl(d.initialValues),errors:fl(d.initialErrors)||Zr,touched:fl(d.initialTouched)||dl,status:fl(d.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),E=b.current,k=v.useCallback(function(_){var D=b.current;b.current=x5(D,_),D!==b.current&&C(function($){return $+1})},[]),P=v.useCallback(function(_,D){return new Promise(function($,z){var Q=d.validate(_,D);Q==null?$(Zr):Sf(Q)?Q.then(function(oe){$(oe||Zr)},function(oe){z(oe)}):$(Q)})},[d.validate]),M=v.useCallback(function(_,D){var $=d.validationSchema,z=nn($)?$(D):$,Q=D&&z.validateAt?z.validateAt(D,_):S5(_,z);return new Promise(function(oe,_e){Q.then(function(){oe(Zr)},function(Ct){Ct.name==="ValidationError"?oe(b5(Ct)):_e(Ct)})})},[d.validationSchema]),j=v.useCallback(function(_,D){return new Promise(function($){return $(g.current[_].validate(D))})},[]),I=v.useCallback(function(_){var D=Object.keys(g.current).filter(function(z){return nn(g.current[z].validate)}),$=D.length>0?D.map(function(z){return j(z,_t(_,z))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all($).then(function(z){return z.reduce(function(Q,oe,_e){return oe==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||oe&&(Q=Si(Q,D[_e],oe)),Q},{})})},[j]),re=v.useCallback(function(_){return Promise.all([I(_),d.validationSchema?M(_):{},d.validate?P(_):{}]).then(function(D){var $=D[0],z=D[1],Q=D[2],oe=ph.all([$,z,Q],{arrayMerge:T5});return oe})},[d.validate,d.validationSchema,I,P,M]),ie=Bt(function(_){return _===void 0&&(_=E.values),k({type:"SET_ISVALIDATING",payload:!0}),re(_).then(function(D){return p.current&&(k({type:"SET_ISVALIDATING",payload:!1}),k({type:"SET_ERRORS",payload:D})),D})});v.useEffect(function(){o&&p.current===!0&&ni(h.current,d.initialValues)&&ie(h.current)},[o,ie]);var xe=v.useCallback(function(_){var D=_&&_.values?_.values:h.current,$=_&&_.errors?_.errors:m.current?m.current:d.initialErrors||{},z=_&&_.touched?_.touched:x.current?x.current:d.initialTouched||{},Q=_&&_.status?_.status:w.current?w.current:d.initialStatus;h.current=D,m.current=$,x.current=z,w.current=Q;var oe=function(){k({type:"RESET_FORM",payload:{isSubmitting:!!_&&!!_.isSubmitting,errors:$,touched:z,status:Q,values:D,isValidating:!!_&&!!_.isValidating,submitCount:_&&_.submitCount&&typeof _.submitCount=="number"?_.submitCount:0}})};if(d.onReset){var _e=d.onReset(E.values,Ma);Sf(_e)?_e.then(oe):oe()}else oe()},[d.initialErrors,d.initialStatus,d.initialTouched,d.onReset]);v.useEffect(function(){p.current===!0&&!ni(h.current,d.initialValues)&&c&&(h.current=d.initialValues,xe(),o&&ie(h.current))},[c,d.initialValues,xe,o,ie]),v.useEffect(function(){c&&p.current===!0&&!ni(m.current,d.initialErrors)&&(m.current=d.initialErrors||Zr,k({type:"SET_ERRORS",payload:d.initialErrors||Zr}))},[c,d.initialErrors]),v.useEffect(function(){c&&p.current===!0&&!ni(x.current,d.initialTouched)&&(x.current=d.initialTouched||dl,k({type:"SET_TOUCHED",payload:d.initialTouched||dl}))},[c,d.initialTouched]),v.useEffect(function(){c&&p.current===!0&&!ni(w.current,d.initialStatus)&&(w.current=d.initialStatus,k({type:"SET_STATUS",payload:d.initialStatus}))},[c,d.initialStatus,d.initialTouched]);var Re=Bt(function(_){if(g.current[_]&&nn(g.current[_].validate)){var D=_t(E.values,_),$=g.current[_].validate(D);return Sf($)?(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}),M(E.values,_).then(function(z){return z}).then(function(z){k({type:"SET_FIELD_ERROR",payload:{field:_,value:_t(z,_)}}),k({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),G=v.useCallback(function(_,D){var $=D.validate;g.current[_]={validate:$}},[]),ne=v.useCallback(function(_){delete g.current[_]},[]),O=Bt(function(_,D){k({type:"SET_TOUCHED",payload:_});var $=D===void 0?i:D;return $?ie(E.values):Promise.resolve()}),L=v.useCallback(function(_){k({type:"SET_ERRORS",payload:_})},[]),B=Bt(function(_,D){var $=nn(_)?_(E.values):_;k({type:"SET_VALUES",payload:$});var z=D===void 0?n:D;return z?ie($):Promise.resolve()}),V=v.useCallback(function(_,D){k({type:"SET_FIELD_ERROR",payload:{field:_,value:D}})},[]),W=Bt(function(_,D,$){k({type:"SET_FIELD_VALUE",payload:{field:_,value:D}});var z=$===void 0?n:$;return z?ie(Si(E.values,_,D)):Promise.resolve()}),q=v.useCallback(function(_,D){var $=D,z=_,Q;if(!bf(_)){_.persist&&_.persist();var oe=_.target?_.target:_.currentTarget,_e=oe.type,Ct=oe.name,mn=oe.id,Ui=oe.value,ir=oe.checked,Fm=oe.outerHTML,Fa=oe.options,Na=oe.multiple;$=D||Ct||mn,z=/number|range/.test(_e)?(Q=parseFloat(Ui),isNaN(Q)?"":Q):/checkbox/.test(_e)?C5(_t(E.values,$),ir,Ui):Fa&&Na?E5(Fa):Ui}$&&W($,z)},[W,E.values]),ce=Bt(function(_){if(bf(_))return function(D){return q(D,_)};q(_)}),ye=Bt(function(_,D,$){D===void 0&&(D=!0),k({type:"SET_FIELD_TOUCHED",payload:{field:_,value:D}});var z=$===void 0?i:$;return z?ie(E.values):Promise.resolve()}),J=v.useCallback(function(_,D){_.persist&&_.persist();var $=_.target,z=$.name,Q=$.id,oe=$.outerHTML,_e=D||z||Q;ye(_e,!0)},[ye]),Ie=Bt(function(_){if(bf(_))return function(D){return J(D,_)};J(_)}),ft=v.useCallback(function(_){nn(_)?k({type:"SET_FORMIK_STATE",payload:_}):k({type:"SET_FORMIK_STATE",payload:function(){return _}})},[]),dt=v.useCallback(function(_){k({type:"SET_STATUS",payload:_})},[]),rr=v.useCallback(function(_){k({type:"SET_ISSUBMITTING",payload:_})},[]),Zs=Bt(function(){return k({type:"SUBMIT_ATTEMPT"}),ie().then(function(_){var D=_ instanceof Error,$=!D&&Object.keys(_).length===0;if($){var z;try{if(z=Js(),z===void 0)return}catch(Q){throw Q}return Promise.resolve(z).then(function(Q){return p.current&&k({type:"SUBMIT_SUCCESS"}),Q}).catch(function(Q){if(p.current)throw k({type:"SUBMIT_FAILURE"}),Q})}else if(p.current&&(k({type:"SUBMIT_FAILURE"}),D))throw _})}),Oa=Bt(function(_){_&&_.preventDefault&&nn(_.preventDefault)&&_.preventDefault(),_&&_.stopPropagation&&nn(_.stopPropagation)&&_.stopPropagation(),Zs().catch(function(D){console.warn("Warning: An unhandled error was caught from submitForm()",D)})}),Ma={resetForm:xe,validateForm:ie,validateField:Re,setErrors:L,setFieldError:V,setFieldTouched:ye,setFieldValue:W,setStatus:dt,setSubmitting:rr,setTouched:O,setValues:B,setFormikState:ft,submitForm:Zs},Js=Bt(function(){return f(E.values,Ma)}),wc=Bt(function(_){_&&_.preventDefault&&nn(_.preventDefault)&&_.preventDefault(),_&&_.stopPropagation&&nn(_.stopPropagation)&&_.stopPropagation(),xe()}),ja=v.useCallback(function(_){return{value:_t(E.values,_),error:_t(E.errors,_),touched:!!_t(E.touched,_),initialValue:_t(h.current,_),initialTouched:!!_t(x.current,_),initialError:_t(m.current,_)}},[E.errors,E.touched,E.values]),Gr=v.useCallback(function(_){return{setValue:function($,z){return W(_,$,z)},setTouched:function($,z){return ye(_,$,z)},setError:function($){return V(_,$)}}},[W,ye,V]),Da=v.useCallback(function(_){var D=hc(_),$=D?_.name:_,z=_t(E.values,$),Q={name:$,value:z,onChange:ce,onBlur:Ie};if(D){var oe=_.type,_e=_.value,Ct=_.as,mn=_.multiple;oe==="checkbox"?_e===void 0?Q.checked=!!z:(Q.checked=!!(Array.isArray(z)&&~z.indexOf(_e)),Q.value=_e):oe==="radio"?(Q.checked=z===_e,Q.value=_e):Ct==="select"&&mn&&(Q.value=Q.value||[],Q.multiple=!0)}return Q},[Ie,ce,E.values]),Et=v.useMemo(function(){return!ni(h.current,E.values)},[h.current,E.values]),bc=v.useMemo(function(){return typeof a<"u"?Et?E.errors&&Object.keys(E.errors).length===0:a!==!1&&nn(a)?a(d):a:E.errors&&Object.keys(E.errors).length===0},[a,Et,E.errors,d]),Sc=Ve({},E,{initialValues:h.current,initialErrors:m.current,initialTouched:x.current,initialStatus:w.current,handleBlur:Ie,handleChange:ce,handleReset:wc,handleSubmit:Oa,resetForm:xe,setErrors:L,setFormikState:ft,setFieldTouched:ye,setFieldValue:W,setFieldError:V,setStatus:dt,setSubmitting:rr,setTouched:O,setValues:B,submitForm:Zs,validateForm:ie,validateField:Re,isValid:bc,dirty:Et,unregisterField:ne,registerField:G,getFieldProps:Da,getFieldMeta:ja,getFieldHelpers:Gr,validateOnBlur:i,validateOnChange:n,validateOnMount:o});return Sc}function b5(e){var t={};if(e.inner){if(e.inner.length===0)return Si(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;_t(t,o.path)||(t=Si(t,o.path,o.message))}}return t}function S5(e,t,n,r){n===void 0&&(n=!1);var i=wh(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:i})}function wh(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||Qy(i)?wh(i):i!==""?i:void 0}):Qy(e[r])?t[r]=wh(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function T5(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?ph(Array.isArray(s)?[]:{},s,n):s}else n.isMergeableObject(s)?r[o]=ph(e[o],s,n):e.indexOf(s)===-1&&r.push(s)}),r}function E5(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function C5(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 k5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?v.useLayoutEffect:v.useEffect;function Bt(e){var t=v.useRef(e);return k5(function(){t.current=e}),v.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=v.forwardRef(function(e,t){var n=e.action,r=cT(e,["action"]),i=n??"#",s=y5(),o=s.handleReset,a=s.handleSubmit;return v.createElement("form",Ve({onSubmit:a,ref:t,onReset:o,action:i},r))});_5.displayName="Form";const P5=({init:e,schema:t,action:n})=>w5({initialValues:e,validationSchema:t,validateOnBlur:!1,enableReinitialize:!0,validateOnChange:!1,validateOnMount:!1,onSubmit:r=>{n(r)}});function A5(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 R5=e=>{switch(e){case"success":return j5;case"info":return F5;case"warning":return D5;case"error":return N5;default:return null}},O5=Array(12).fill(0),M5=({visible:e,className:t})=>R.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},R.createElement("div",{className:"sonner-spinner"},O5.map((n,r)=>R.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),j5=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"})),D5=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"})),F5=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"})),N5=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"})),L5=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"})),I5=()=>{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 bh=1;class $5{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:bh++,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 c=>{if(o=["resolve",c],R.isValidElement(c))s=!1,this.create({id:r,type:"default",message:c});else if(B5(c)&&!c.ok){s=!1;const u=typeof n.error=="function"?await n.error(`HTTP error! status: ${c.status}`):n.error,d=typeof n.description=="function"?await n.description(`HTTP error! status: ${c.status}`):n.description,h=typeof u=="object"?u:{message:u};this.create({id:r,type:"error",description:d,...h})}else if(c instanceof Error){s=!1;const u=typeof n.error=="function"?await n.error(c):n.error,d=typeof n.description=="function"?await n.description(c):n.description,h=typeof u=="object"?u:{message:u};this.create({id:r,type:"error",description:d,...h})}else if(n.success!==void 0){s=!1;const u=typeof n.success=="function"?await n.success(c):n.success,d=typeof n.description=="function"?await n.description(c):n.description,h=typeof u=="object"?u:{message:u};this.create({id:r,type:"success",description:d,...h})}}).catch(async c=>{if(o=["reject",c],n.error!==void 0){s=!1;const f=typeof n.error=="function"?await n.error(c):n.error,u=typeof n.description=="function"?await n.description(c):n.description,d=typeof f=="object"?f:{message:f};this.create({id:r,type:"error",description:u,...d})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((c,f)=>a.then(()=>o[0]==="reject"?f(o[1]):c(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)||bh++;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 yt=new $5,V5=(e,t)=>{const n=(t==null?void 0:t.id)||bh++;return yt.addToast({title:e,...t,id:n}),n},B5=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",z5=V5,U5=()=>yt.toasts,H5=()=>yt.getActiveToasts(),bv=Object.assign(z5,{success:yt.success,info:yt.info,warning:yt.warning,error:yt.error,custom:yt.custom,message:yt.message,promise:yt.promise,dismiss:yt.dismiss,loading:yt.loading},{getHistory:U5,getToasts:H5});A5("[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 hl(e){return e.label!==void 0}const W5=3,K5="24px",q5="16px",Sv=4e3,Q5=356,G5=14,Y5=45,X5=200;function yn(...e){return e.filter(Boolean).join(" ")}function Z5(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const J5=e=>{var t,n,r,i,s,o,a,l,c;const{invert:f,toast:u,unstyled:d,interacting:h,setHeights:m,visibleToasts:x,heights:w,index:p,toasts:g,expanded:y,removeToast:C,defaultRichColors:b,closeButton:E,style:k,cancelButtonStyle:P,actionButtonStyle:M,className:j="",descriptionClassName:I="",duration:re,position:ie,gap:xe,expandByDefault:Re,classNames:G,icons:ne,closeButtonAriaLabel:O="Close toast"}=e,[L,B]=R.useState(null),[V,W]=R.useState(null),[q,ce]=R.useState(!1),[ye,J]=R.useState(!1),[Ie,ft]=R.useState(!1),[dt,rr]=R.useState(!1),[Zs,Oa]=R.useState(!1),[Ma,Js]=R.useState(0),[wc,ja]=R.useState(0),Gr=R.useRef(u.duration||re||Sv),Da=R.useRef(null),Et=R.useRef(null),bc=p===0,Sc=p+1<=x,_=u.type,D=u.dismissible!==!1,$=u.className||"",z=u.descriptionClassName||"",Q=R.useMemo(()=>w.findIndex(Y=>Y.toastId===u.id)||0,[w,u.id]),oe=R.useMemo(()=>{var Y;return(Y=u.closeButton)!=null?Y:E},[u.closeButton,E]),_e=R.useMemo(()=>u.duration||re||Sv,[u.duration,re]),Ct=R.useRef(0),mn=R.useRef(0),Ui=R.useRef(0),ir=R.useRef(null),[Fm,Fa]=ie.split("-"),Na=R.useMemo(()=>w.reduce((Y,$e,Ye)=>Ye>=Q?Y:Y+$e.height,0),[w,Q]),Nm=I5(),RT=u.invert||f,Tc=_==="loading";mn.current=R.useMemo(()=>Q*xe+Na,[Q,Na]),R.useEffect(()=>{Gr.current=_e},[_e]),R.useEffect(()=>{ce(!0)},[]),R.useEffect(()=>{const Y=Et.current;if(Y){const $e=Y.getBoundingClientRect().height;return ja($e),m(Ye=>[{toastId:u.id,height:$e,position:u.position},...Ye]),()=>m(Ye=>Ye.filter(kt=>kt.toastId!==u.id))}},[m,u.id]),R.useLayoutEffect(()=>{if(!q)return;const Y=Et.current,$e=Y.style.height;Y.style.height="auto";const Ye=Y.getBoundingClientRect().height;Y.style.height=$e,ja(Ye),m(kt=>kt.find(We=>We.toastId===u.id)?kt.map(We=>We.toastId===u.id?{...We,height:Ye}:We):[{toastId:u.id,height:Ye,position:u.position},...kt])},[q,u.title,u.description,m,u.id]);const sr=R.useCallback(()=>{J(!0),Js(mn.current),m(Y=>Y.filter($e=>$e.toastId!==u.id)),setTimeout(()=>{C(u)},X5)},[u,C,m,mn]);R.useEffect(()=>{if(u.promise&&_==="loading"||u.duration===1/0||u.type==="loading")return;let Y;return y||h||Nm?(()=>{if(Ui.current<Ct.current){const kt=new Date().getTime()-Ct.current;Gr.current=Gr.current-kt}Ui.current=new Date().getTime()})():(()=>{Gr.current!==1/0&&(Ct.current=new Date().getTime(),Y=setTimeout(()=>{u.onAutoClose==null||u.onAutoClose.call(u,u),sr()},Gr.current))})(),()=>clearTimeout(Y)},[y,h,u,_,Nm,sr]),R.useEffect(()=>{u.delete&&sr()},[sr,u.delete]);function OT(){var Y;if(ne!=null&&ne.loading){var $e;return R.createElement("div",{className:yn(G==null?void 0:G.loader,u==null||($e=u.classNames)==null?void 0:$e.loader,"sonner-loader"),"data-visible":_==="loading"},ne.loading)}return R.createElement(M5,{className:yn(G==null?void 0:G.loader,u==null||(Y=u.classNames)==null?void 0:Y.loader),visible:_==="loading"})}var Lm,Im;return R.createElement("li",{tabIndex:0,ref:Et,className:yn(j,$,G==null?void 0:G.toast,u==null||(t=u.classNames)==null?void 0:t.toast,G==null?void 0:G.default,G==null?void 0:G[_],u==null||(n=u.classNames)==null?void 0:n[_]),"data-sonner-toast":"","data-rich-colors":(Lm=u.richColors)!=null?Lm:b,"data-styled":!(u.jsx||u.unstyled||d),"data-mounted":q,"data-promise":!!u.promise,"data-swiped":Zs,"data-removed":ye,"data-visible":Sc,"data-y-position":Fm,"data-x-position":Fa,"data-index":p,"data-front":bc,"data-swiping":Ie,"data-dismissible":D,"data-type":_,"data-invert":RT,"data-swipe-out":dt,"data-swipe-direction":V,"data-expanded":!!(y||Re&&q),style:{"--index":p,"--toasts-before":p,"--z-index":g.length-p,"--offset":`${ye?Ma:mn.current}px`,"--initial-height":Re?"auto":`${wc}px`,...k,...u.style},onDragEnd:()=>{ft(!1),B(null),ir.current=null},onPointerDown:Y=>{Tc||!D||(Da.current=new Date,Js(mn.current),Y.target.setPointerCapture(Y.pointerId),Y.target.tagName!=="BUTTON"&&(ft(!0),ir.current={x:Y.clientX,y:Y.clientY}))},onPointerUp:()=>{var Y,$e,Ye;if(dt||!D)return;ir.current=null;const kt=Number(((Y=Et.current)==null?void 0:Y.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),La=Number((($e=Et.current)==null?void 0:$e.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),We=new Date().getTime()-((Ye=Da.current)==null?void 0:Ye.getTime()),It=L==="x"?kt:La,Ia=Math.abs(It)/We;if(Math.abs(It)>=Y5||Ia>.11){Js(mn.current),u.onDismiss==null||u.onDismiss.call(u,u),W(L==="x"?kt>0?"right":"left":La>0?"down":"up"),sr(),rr(!0);return}else{var Jt,en;(Jt=Et.current)==null||Jt.style.setProperty("--swipe-amount-x","0px"),(en=Et.current)==null||en.style.setProperty("--swipe-amount-y","0px")}Oa(!1),ft(!1),B(null)},onPointerMove:Y=>{var $e,Ye,kt;if(!ir.current||!D||(($e=window.getSelection())==null?void 0:$e.toString().length)>0)return;const We=Y.clientY-ir.current.y,It=Y.clientX-ir.current.x;var Ia;const Jt=(Ia=e.swipeDirections)!=null?Ia:Z5(ie);!L&&(Math.abs(It)>1||Math.abs(We)>1)&&B(Math.abs(It)>Math.abs(We)?"x":"y");let en={x:0,y:0};const $m=Yr=>1/(1.5+Math.abs(Yr)/20);if(L==="y"){if(Jt.includes("top")||Jt.includes("bottom"))if(Jt.includes("top")&&We<0||Jt.includes("bottom")&&We>0)en.y=We;else{const Yr=We*$m(We);en.y=Math.abs(Yr)<Math.abs(We)?Yr:We}}else if(L==="x"&&(Jt.includes("left")||Jt.includes("right")))if(Jt.includes("left")&&It<0||Jt.includes("right")&&It>0)en.x=It;else{const Yr=It*$m(It);en.x=Math.abs(Yr)<Math.abs(It)?Yr:It}(Math.abs(en.x)>0||Math.abs(en.y)>0)&&Oa(!0),(Ye=Et.current)==null||Ye.style.setProperty("--swipe-amount-x",`${en.x}px`),(kt=Et.current)==null||kt.style.setProperty("--swipe-amount-y",`${en.y}px`)}},oe&&!u.jsx&&_!=="loading"?R.createElement("button",{"aria-label":O,"data-disabled":Tc,"data-close-button":!0,onClick:Tc||!D?()=>{}:()=>{sr(),u.onDismiss==null||u.onDismiss.call(u,u)},className:yn(G==null?void 0:G.closeButton,u==null||(r=u.classNames)==null?void 0:r.closeButton)},(Im=ne==null?void 0:ne.close)!=null?Im:L5):null,_||u.icon||u.promise?R.createElement("div",{"data-icon":"",className:yn(G==null?void 0:G.icon,u==null||(i=u.classNames)==null?void 0:i.icon)},u.promise||u.type==="loading"&&!u.icon?u.icon||OT():null,u.type!=="loading"?u.icon||(ne==null?void 0:ne[_])||R5(_):null):null,R.createElement("div",{"data-content":"",className:yn(G==null?void 0:G.content,u==null||(s=u.classNames)==null?void 0:s.content)},R.createElement("div",{"data-title":"",className:yn(G==null?void 0:G.title,u==null||(o=u.classNames)==null?void 0:o.title)},u.jsx?u.jsx:typeof u.title=="function"?u.title():u.title),u.description?R.createElement("div",{"data-description":"",className:yn(I,z,G==null?void 0:G.description,u==null||(a=u.classNames)==null?void 0:a.description)},typeof u.description=="function"?u.description():u.description):null),R.isValidElement(u.cancel)?u.cancel:u.cancel&&hl(u.cancel)?R.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||P,onClick:Y=>{hl(u.cancel)&&D&&(u.cancel.onClick==null||u.cancel.onClick.call(u.cancel,Y),sr())},className:yn(G==null?void 0:G.cancelButton,u==null||(l=u.classNames)==null?void 0:l.cancelButton)},u.cancel.label):null,R.isValidElement(u.action)?u.action:u.action&&hl(u.action)?R.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||M,onClick:Y=>{hl(u.action)&&(u.action.onClick==null||u.action.onClick.call(u.action,Y),!Y.defaultPrevented&&sr())},className:yn(G==null?void 0:G.actionButton,u==null||(c=u.classNames)==null?void 0:c.actionButton)},u.action.label):null)};function Tv(){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 eL(e,t){const n={};return[e,t].forEach((r,i)=>{const s=i===1,o=s?"--mobile-offset":"--offset",a=s?q5:K5;function l(c){["top","right","bottom","left"].forEach(f=>{n[`${o}-${f}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${o}-${c}`]=a:n[`${o}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(a)}),n}const tL=R.forwardRef(function(t,n){const{invert:r,position:i="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:a,className:l,offset:c,mobileOffset:f,theme:u="light",richColors:d,duration:h,style:m,visibleToasts:x=W5,toastOptions:w,dir:p=Tv(),gap:g=G5,icons:y,containerAriaLabel:C="Notifications"}=t,[b,E]=R.useState([]),k=R.useMemo(()=>Array.from(new Set([i].concat(b.filter(V=>V.position).map(V=>V.position)))),[b,i]),[P,M]=R.useState([]),[j,I]=R.useState(!1),[re,ie]=R.useState(!1),[xe,Re]=R.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=R.useRef(null),ne=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),O=R.useRef(null),L=R.useRef(!1),B=R.useCallback(V=>{E(W=>{var q;return(q=W.find(ce=>ce.id===V.id))!=null&&q.delete||yt.dismiss(V.id),W.filter(({id:ce})=>ce!==V.id)})},[]);return R.useEffect(()=>yt.subscribe(V=>{if(V.dismiss){const W=b.map(q=>q.id===V.id?{...q,delete:!0}:q);requestAnimationFrame(()=>{E(W)});return}setTimeout(()=>{sk.flushSync(()=>{E(W=>{const q=W.findIndex(ce=>ce.id===V.id);return q!==-1?[...W.slice(0,q),{...W[q],...V},...W.slice(q+1)]:[V,...W]})})})}),[b]),R.useEffect(()=>{if(u!=="system"){Re(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Re("dark"):Re("light")),typeof window>"u")return;const V=window.matchMedia("(prefers-color-scheme: dark)");try{V.addEventListener("change",({matches:W})=>{Re(W?"dark":"light")})}catch{V.addListener(({matches:q})=>{try{Re(q?"dark":"light")}catch(ce){console.error(ce)}})}},[u]),R.useEffect(()=>{b.length<=1&&I(!1)},[b]),R.useEffect(()=>{const V=W=>{var q;if(s.every(J=>W[J]||W.code===J)){var ye;I(!0),(ye=G.current)==null||ye.focus()}W.code==="Escape"&&(document.activeElement===G.current||(q=G.current)!=null&&q.contains(document.activeElement))&&I(!1)};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[s]),R.useEffect(()=>{if(G.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,L.current=!1)}},[G.current]),R.createElement("section",{ref:n,"aria-label":`${C} ${ne}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},k.map((V,W)=>{var q;const[ce,ye]=V.split("-");return b.length?R.createElement("ol",{key:V,dir:p==="auto"?Tv():p,tabIndex:-1,ref:G,className:l,"data-sonner-toaster":!0,"data-sonner-theme":xe,"data-y-position":ce,"data-lifted":j&&b.length>1&&!o,"data-x-position":ye,style:{"--front-toast-height":`${((q=P[0])==null?void 0:q.height)||0}px`,"--width":`${Q5}px`,"--gap":`${g}px`,...m,...eL(c,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)},b.filter(J=>!J.position&&W===0||J.position===V).map((J,Ie)=>{var ft,dt;return R.createElement(J5,{key:J.id,icons:y,index:Ie,toast:J,defaultRichColors:d,duration:(ft=w==null?void 0:w.duration)!=null?ft:h,className:w==null?void 0:w.className,descriptionClassName:w==null?void 0:w.descriptionClassName,invert:r,visibleToasts:x,closeButton:(dt=w==null?void 0:w.closeButton)!=null?dt:a,interacting:re,position:V,style:w==null?void 0:w.style,unstyled:w==null?void 0:w.unstyled,classNames:w==null?void 0:w.classNames,cancelButtonStyle:w==null?void 0:w.cancelButtonStyle,actionButtonStyle:w==null?void 0:w.actionButtonStyle,closeButtonAriaLabel:w==null?void 0:w.closeButtonAriaLabel,removeToast:B,toasts:b.filter(rr=>rr.position==J.position),heights:P.filter(rr=>rr.position==J.position),setHeights:M,expandByDefault:o,gap:g,expanded:j,swipeDirections:t.swipeDirections})})):null}))});function nL(e){return Array.isArray(e)&&e[0].field!==void 0}const rL=(e,t)=>{var n;if(nL(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||bv.error(e.message);return}if(e&&e.error){t!=null&&t.noToast||bv.error(e.error);return}};function iL(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 pc({id:e,text:t,required:n,className:r,noMargin:i}){return t?T.jsxs("label",{htmlFor:e,className:ze(r,{"mb-2":!i},"line-block text-base font-medium text-gray-600"),children:[t," ",n&&T.jsx("span",{className:"text-red-500",children:"*"})]}):null}const Tf={sm:"px-3 py-1 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-15"};function sL({id:e,label:t,suffix:n,prefix:r,size:i="md",type:s="text",noMargin:o=!1,required:a=!1,error:l,ariaDescribedBy:c,className:f,ariaInvalid:u,ariaLabel:d,autoFocus:h,...m}){const x=tr();return T.jsxs("div",{className:ze({"mb-3":!o},f),children:[T.jsx(pc,{id:e,text:t,required:a}),T.jsxs("div",{className:"flex items-center",children:[r&&T.jsx("span",{className:ze("inline-block border border-solid border-r-0 border-slate-200 bg-slate-100 rounded-l-md",Tf[i],{"border-red-500!":!!l}),children:r}),T.jsx("input",{id:e,className:ze("text-gray-800 border border-solid rounded-md block text-base py-2 px-4 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",Tf[i],{"rounded-l-none":!!r,"rounded-r-none":!!n,"border-red-500! text-red-500!":!!l}),type:s,required:a,"aria-describedby":c,"aria-invalid":u,"aria-label":d,style:{color:x.getColor(U.InputText),backgroundColor:x.getColor(U.InputBackground),borderColor:x.getColor(U.InputBorder),borderRadius:x.getRadius()},...m}),n&&T.jsx("span",{className:ze("inline-block border border-solid border-l-0 border-slate-200 bg-slate-100 rounded-r-md",Tf[i],{"border-red-500!":!!l}),children:n})]}),!!l&&T.jsx("p",{className:"mt-1 text-sm text-red-500",children:l})]})}const oL=(e,t)=>{document.cookie=`${e}=${t}`},dT=v.createContext({}),aL=()=>`${window.location.pathname}_$$_${document.title}`,lL=()=>{const e=localStorage.getItem("page");return!e||e===""?"/":e},uL=()=>{const e=localStorage.getItem("p-history");if(!e||e==="")return[];try{return JSON.parse(e)}catch{return[]}};function cL({children:e}){const[t,n]=v.useState("/"),[r,i]=v.useState(uL());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 T.jsx(dT.Provider,{value:{page:t,setPage:o,history:r,clearHistory:s},children:e})}function Om(){return v.useContext(dT)}function fL({label:e,id:t,value:n="",className:r,placeholder:i,children:s,required:o,error:a,...l}){return T.jsxs("div",{className:r||"",children:[e&&T.jsx(pc,{id:t,required:o,text:e}),T.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&&T.jsx("p",{className:"1 texm text-r500",children:a})]})}const Ev={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:""}},dL={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"},hL={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"},pL={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 mL({children:e,name:t,required:n,value:r,checked:i,onChange:s,onBlur:o,red:a,id:l=t,size:c="md",effect:f="ring",reversed:u=!1,variant:d="blue",...h}){return T.jsxs("div",{children:[T.jsxs("div",{className:`flex items-center justify-between ${u?"flex-row-reverse":""} ${Ev[f].label}`,children:[T.jsxs("label",{className:"disable-highlight relative mr-3 flex cursor-pointer items-center rounded-full",htmlFor:l,children:[T.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 ${dL[d]} ${hL[c]} ${Ev[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}),T.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:T.jsx(je.Check,{className:pL[c]})})]}),T.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&&T.jsx("small",{className:"text-xs text-red-500",children:a})]})}const gL={blue:"text-blue-500 border-blue-gray-200 checked:bg-blue-500 checked:border-blue-500 checked:before:bg-blue-500 before:bg-gray-500",red:"text-red-500 border-blue-gray-200 checked:border-red-500 checked:before:bg-red-500 before:bg-blue-gray-500",emerald:"text-emerald-500 border-blue-gray-200 checked:border-emerald-500 checked:before:bg-emerald-500 before:bg-blue-gray-500",orange:"text-orange-500 border-blue-gray-200 checked:border-orange-500 checked:before:bg-orange-500 before:bg-blue-gray-500"},yL={blue:"text-white",red:"text-red-500",emerald:"text-emerald-500",orange:"text-orange-500"},Cv={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"},vL={sm:"size-3",md:"size-4",lg:"size-5"},kv={ring:{label:"",input:"relative before:content[''] before:absolute before:top-2/4 before:left-2/4 before:block before:h-9 before:w-9 before:-translate-y-2/4 before:-translate-x-2/4 before:rounded-full before:opacity-0 before:transition-opacity hover:before:opacity-10"},hover:{label:"hover:bg-secondary transition-colors duration-200",input:""}};function Sh({children:e,id:t,name:n,size:r="md",variant:i="blue",effect:s="ring",value:o=!1,reverse:a=!1,onChange:l,onBlur:c,onClick:f}){return T.jsxs("label",{className:`disable-highlight flex cursor-pointer items-center rounded-md text-gray-700 ${a?"flex-row-reverse justify-between":""} ${kv[s].label} `,htmlFor:t,children:[T.jsxs("label",{className:"relative flex items-center p-2 rounded-full cursor-pointer disable-highlight",htmlFor:t,children:[T.jsx("input",{id:t,name:n,type:"radio",className:`peer disable-highlight bg-none cursor-pointer appearance-none rounded-full border border-solid bg-inherit transition-all ${gL[i]} ${Cv[r]} ${kv[s].input}`,checked:o,onChange:u=>l==null?void 0:l(u.target.checked),onBlur:u=>c==null?void 0:c(u.target.checked),onClick:()=>f==null?void 0:f(!o)}),T.jsx("div",{className:`pointer-events-none absolute flex items-center justify-center opacity-0 transition-opacity peer-checked:opacity-100 ${yL[i]} ${Cv[r]}`,children:T.jsx(je.Check,{className:vL[r]})})]}),T.jsx("label",{className:"text-gray-800 disable-highlight flex cursor-pointer select-none items-center font-light",htmlFor:t,children:e})]})}Sh.Group=function({label:t,id:n,className:r,required:i,children:s}){return T.jsxs("div",{className:r,children:[T.jsx(pc,{id:n,text:t,required:i}),T.jsx("div",{className:"col-span-12 flex flex-col justify-center",children:s})]})};function hT({id:e,label:t,suffix:n,prefix:r,className:i,noMargin:s,rows:o=3,type:a="text",required:l=!1,error:c,ariaInvalid:f,inputRef:u,autoFocus:d=!0,style:h,...m}){const x=tr();return T.jsxs("div",{className:ze({"mb-3":!s},i),children:[t&&T.jsx(pc,{id:e,text:t,required:l}),T.jsx("textarea",{className:ze("resize-none max-h-40 text-gray-800 w-full py-2 px-4 border border-solid rounded-md 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!":!!c}),id:e,"aria-invalid":f,...m,ref:u,autoFocus:d,style:{...h,color:x.getColor(U.InputText),backgroundColor:x.getColor(U.InputBackground),borderColor:x.getColor(U.InputBorder),borderRadius:x.getRadius()}}),!!c&&T.jsx("p",{className:"text-red-500 mt-1 text-sm",children:c})]})}function xL({onOk:e,clientId:t,widgetId:n,appearance:r}){var h,m,x,w,p,g,y,C;const i=tr(),{defaultValues:s}=Fn(),o=Om(),a=lj(),l=(m=(h=r==null?void 0:r.body)==null?void 0:h.inputs)==null?void 0:m.reduce((b,E)=>{const k=Fl(E.name);return b[E.name]=k||(s==null?void 0:s[E.name])||"",b},{}),c=(w=(x=r==null?void 0:r.body)==null?void 0:x.inputs)==null?void 0:w.reduce((b,E)=>(b[E.name]="",b),{}),f=OS((g=(p=r==null?void 0:r.body)==null?void 0:p.inputs)==null?void 0:g.reduce((b,E)=>(b[E.name]=E.required?hh().required(E.label):hh(),b),{})),u=P5({init:{...l},schema:f,action:async b=>{var P;const[E,k]=await a.mutateAsync({inputs:b,history:o.history,client_id:t,widget_id:n});if(ew(k)){o.clearHistory();for(const M of((P=r==null?void 0:r.body)==null?void 0:P.inputs)||[])oL(M.name,b[M.name]);e==null||e();return}rL(E,{form:u})}}),d=!iL(c,u.values);return T.jsx("section",{className:"overflow-y-auto p-4 bg-white",style:{height:"calc(100% - 13rem)",backgroundColor:i.getColor(U.GreeterBackground)},children:T.jsxs("form",{className:"grid grid-cols-1 gap-4",onSubmit:b=>{b.preventDefault(),u.handleSubmit()},children:[(C=(y=r==null?void 0:r.body)==null?void 0:y.inputs)==null?void 0:C.map(b=>{var E,k;if(["text","email","phone"].includes(b.type))return T.jsx(sL,{id:b.name,name:b.name,type:b.type,label:b.label,value:u.values[b.name],onChange:u.handleChange,onBlur:u.handleBlur,autoComplete:"off",placeholder:b.placeholder,error:u.errors[b.name],ariaInvalid:u.errors.name?!0:void 0,required:b.required,noMargin:!0},b.name);if(b.type==="select")return T.jsx(fL,{id:b.name,name:b.name,value:u.values[b.name],onChange:u.handleChange,label:b.label,required:b.required,children:(E=b.options)==null?void 0:E.map(P=>T.jsx("option",{value:P,children:P},P))},b.name);if(b.type==="checkbox")return T.jsx(mL,{id:b.name,name:b.name,value:u.values[b.name],onChange:u.handleChange,required:b.required,children:b.label},b.name);if(b.type==="radio")return T.jsx(Sh.Group,{id:b.name,label:b.label,required:b.required,children:(k=b.options)==null?void 0:k.map(P=>T.jsx(Sh,{onChange:M=>{M?u.setFieldValue(b.name,P):u.setFieldValue(b.name,"")},id:P,name:b.name,value:P===u.values[b.name],children:P},P))},b.name);if(b.type==="textarea")return T.jsx(hT,{id:b.name,name:b.name,value:u.values[b.name],onChange:u.handleChange,placeholder:b.placeholder,error:u.errors[b.name],required:b.required,label:b.label},b.name)}),T.jsx(Vs,{textKey:U.GreeterButtonText,bgKey:U.GreeterButtonBackground,type:"submit",disabled:!d,children:"Sohbet Oluştur"})]})})}function wL({onClose:e}){return T.jsx(Vs,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"md",rounded:!0,variant:"gray",kind:"ghost",onClick:e,className:"absolute top-2 right-2",children:T.jsx(je.X,{className:"size-5"})})}function bL({image_url:e,name:t,size:n="size-9"}){return e?T.jsx("img",{src:e,alt:t,className:ze("rounded-md",n)}):T.jsx("div",{className:"flex items-center justify-center gap-1",children:T.jsx(je.Website,{className:ze("text-slate-500",n)})})}function SL(){const e=Om(),t=v.useCallback(()=>{const n=window.location.pathname;n!==e.page&&e.setPage(n)},[e.page]);return wS("popstate",t),null}function TL(){const e=Ys(),t=Om(),n=v.useCallback(()=>{const r=window.location.pathname;if(r!==t.page){if(e){e.emit(jn.PageChange,{page:r});return}t.setPage(r)}},[e,t.page]);return wS("popstate",n),v.useEffect(()=>{if(!e)return;const r=lL(),i=aL();r!==i&&(e.emit(jn.PageChange,{page:i}),t.setPage(i))},[e]),null}function EL({children:e}){const t=tr(),{widget:n}=Fn();return n?T.jsx(ta,{children:T.jsxs(Jn.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},transition:{duration:.3},className:"h-full w-full relative",children:[T.jsx("div",{style:{backgroundColor:t.getColor(U.GreeterTopBackground)},className:"-z-10 h-52 absolute top-0 left-0 w-full rounded-t-md flex flex-col gap-4 items-center justify-center"}),e]})}):null}function CL(){return SL(),null}const Ef=(e,t)=>{var n;return(n=e.find(r=>r.type===t))==null?void 0:n.content};function kL(){var u,d,h,m,x,w;const e=tr(),{widget:t,setOpen:n}=Fn(),[r,i]=v.useState(!0),s=dm(),o=hm();if(!t)return null;const a=()=>{n(!1)};if(v.useEffect(()=>{uj(t.client_id).then(([p,g])=>{ew(g)&&s.push("chat")}).finally(()=>{i(!1)})},[]),r)return null;const l=Ef(((d=(u=t.appearance)==null?void 0:u.head)==null?void 0:d.elements)||[],"text"),c=Ef(((m=(h=t.appearance)==null?void 0:h.head)==null?void 0:m.elements)||[],"title"),f=Ef(((w=(x=t.appearance)==null?void 0:x.head)==null?void 0:w.elements)||[],"logo");return T.jsxs(EL,{children:[T.jsxs("div",{className:"relative flex flex-col gap-3 items-center justify-center h-52",children:[o&&T.jsx(wL,{onClose:a}),f&&T.jsx(bL,{name:t.name,image_url:f,size:"size-24"}),c&&T.jsx("div",{style:{color:e.getColor(U.GreeterTopText)},className:"text-white text-lg font-bold ml-2",children:c}),l&&T.jsx("div",{style:{color:e.getColor(U.GreeterTopText)},className:"text-white text-sm",children:l})]}),T.jsx(xL,{clientId:t.client_id,widgetId:t.link_id,appearance:t.appearance,onOk:()=>{s.push("chat")}})]})}function _L(){return T.jsxs(T.Fragment,{children:[T.jsx(bS,{border:!0,children:T.jsx(kL,{})}),T.jsx(CL,{})]})}const PL=[{path:"/",component:_L,name:"registration"}];function AL({name:e,avatar:t,className:n="text-neutral-500"}){return T.jsxs("div",{className:"flex gap-2 items-center",children:[T.jsx("div",{className:"min-w-max",children:T.jsxs("span",{children:[t&&T.jsx("img",{className:"size-8 rounded-full",src:t,"aria-label":e}),!t&&T.jsx("div",{className:"size-8 rounded-full bg-neutral-200"})]})}),T.jsx("div",{className:"flex flex-col",children:T.jsx("span",{className:ze("line-clamp-1",n),children:e})})]})}var pT=(e=>(e.AdminJoin="admin_join",e))(pT||{}),pt=(e=>(e.Customer="customer",e.User="user",e.System="system",e.Activity="activity",e))(pt||{}),RL=Object.defineProperty,OL=(e,t,n)=>t in e?RL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cf=(e,t,n)=>(OL(e,typeof t!="symbol"?t+"":t,n),n);let ML=class{constructor(){Cf(this,"current",this.detect()),Cf(this,"handoffState","pending"),Cf(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"}},Il=new ML;function jL(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 jL(()=>{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 mT(){let[e]=v.useState(mc);return v.useEffect(()=>()=>e.dispose(),[e]),e}let Ir=(e,t)=>{Il.isServer?v.useEffect(e,t):v.useLayoutEffect(e,t)};function gT(e){let t=v.useRef(e);return Ir(()=>{t.current=e},[e]),t}let Wn=function(e){let t=gT(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 yT=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(yT||{}),kr=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(kr||{});function vT(){let e=FL();return v.useCallback(t=>DL({mergeRefs:e,...t}),[e])}function DL({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:s=!0,name:o,mergeRefs:a}){a=a??NL;let l=xT(t,e);if(s)return pl(l,n,r,o,a);let c=i??0;if(c&2){let{static:f=!1,...u}=l;if(f)return pl(u,n,r,o,a)}if(c&1){let{unmount:f=!0,...u}=l;return gc(f?0:1,{0(){return null},1(){return pl({...u,hidden:!0,style:{display:"none"}},n,r,o,a)}})}return pl(l,n,r,o,a)}function pl(e,t={},n,r,i){let{as:s=n,children:o,refName:a="ref",...l}=kf(e,["unmount","static"]),c=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 u={};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,w=>`-${w.toLowerCase()}`));if(d){u["data-headlessui-state"]=h.join(" ");for(let m of h)u[`data-${m}`]=""}}if(s===v.Fragment&&(Object.keys(ri(l)).length>0||Object.keys(ri(u)).length>0))if(!v.isValidElement(f)||Array.isArray(f)&&f.length>1){if(Object.keys(ri(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(ri(l)).concat(Object.keys(ri(u))).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)=>
|
|
109
|
-
`)),[]});var BL=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(BL||{});function zL(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function UL(e,t,n,r){let[i,s]=v.useState(n),{hasFlag:o,addFlag:a,removeFlag:l}=$L(e&&i?3:0),c=v.useRef(!1),f=v.useRef(!1),u=mT();return Ir(()=>{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),HL(t,{inFlight:c,prepare(){f.current?f.current=!1:f.current=c.current,c.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||(c.current=!1,l(7),n||s(!1),(h=r==null?void 0:r.end)==null||h.call(r,n))}})}},[e,n,t,u]),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 HL(e,{prepare:t,run:n,done:r,inFlight:i}){let s=pc();return KL(e,{prepare:t,inFlight:i}),s.nextFrame(()=>{n(),s.requestAnimationFrame(()=>{s.add(WL(e,r))})}),s.dispose}function WL(e,t){var n,r;let i=pc();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 KL(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 Mm=v.createContext(null);Mm.displayName="OpenClosedContext";var ci=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ci||{});function bT(){return v.useContext(Mm)}function qL({value:e,children:t}){return R.createElement(Mm.Provider,{value:e},t)}function QL(){let e=typeof document>"u";return"useSyncExternalStore"in kf?(t=>t.useSyncExternalStore)(kf)(()=>()=>{},()=>!1,()=>!e):!1}function ST(){let e=QL(),[t,n]=v.useState(Il.isHandoffComplete);return t&&Il.isHandoffComplete===!1&&n(!1),v.useEffect(()=>{t!==!0&&n(!0)},[t]),v.useEffect(()=>Il.handoff(),[]),e?!1:t}function GL(){let e=v.useRef(!1);return Ir(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function TT(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:CT)!==v.Fragment||R.Children.count(e.children)===1}let gc=v.createContext(null);gc.displayName="TransitionContext";var YL=(e=>(e.Visible="visible",e.Hidden="hidden",e))(YL||{});function XL(){let e=v.useContext(gc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function ZL(){let e=v.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}let yc=v.createContext(null);yc.displayName="NestingContext";function vc(e){return"children"in e?vc(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function ET(e,t){let n=gT(e),r=v.useRef([]),i=GL(),s=mT(),o=Wn((h,m=kr.Hidden)=>{let x=r.current.findIndex(({el:w})=>w===h);x!==-1&&(mc(m,{[kr.Unmount](){r.current.splice(x,1)},[kr.Hidden](){r.current[x].state="hidden"}}),s.microTask(()=>{var w;!vc(r)&&i.current&&((w=n.current)==null||w.call(n))}))}),a=Wn(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,kr.Unmount)}),l=v.useRef([]),c=v.useRef(Promise.resolve()),f=v.useRef({enter:[],leave:[]}),u=Wn((h,m,x)=>{l.current.splice(0),t&&(t.chains.current[m]=t.chains.current[m].filter(([w])=>w!==h)),t==null||t.chains.current[m].push([h,new Promise(w=>{l.current.push(w)})]),t==null||t.chains.current[m].push([h,new Promise(w=>{Promise.all(f.current[m].map(([p,g])=>g)).then(()=>w())})]),m==="enter"?c.current=c.current.then(()=>t==null?void 0:t.wait.current).then(()=>x(m)):x(m)}),d=Wn((h,m,x)=>{Promise.all(f.current[m].splice(0).map(([w,p])=>p)).then(()=>{var w;(w=l.current.shift())==null||w()}).then(()=>x(m))});return v.useMemo(()=>({children:r,register:a,unregister:o,onStart:u,onStop:d,wait:c,chains:f}),[a,o,r,u,d,f,c])}let CT=v.Fragment,kT=yT.RenderStrategy;function JL(e,t){var n,r;let{transition:i=!0,beforeEnter:s,afterEnter:o,beforeLeave:a,afterLeave:l,enter:c,enterFrom:f,enterTo:u,entered:d,leave:h,leaveFrom:m,leaveTo:x,...w}=e,[p,g]=v.useState(null),y=v.useRef(null),C=TT(e),b=wT(...C?[y,t,g]:t===null?[]:[t]),E=(n=w.unmount)==null||n?kr.Unmount:kr.Hidden,{show:k,appear:P,initial:j}=XL(),[M,I]=v.useState(k?"visible":"hidden"),re=ZL(),{register:ie,unregister:xe}=re;Ir(()=>ie(y),[ie,y]),Ir(()=>{if(E===kr.Hidden&&y.current){if(k&&M!=="visible"){I("visible");return}return mc(M,{hidden:()=>xe(y),visible:()=>ie(y)})}},[M,y,ie,xe,k,E]);let Re=ST();Ir(()=>{if(C&&Re&&M==="visible"&&y.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[y,M,Re,C]);let G=j&&!P,ne=P&&k&&j,O=v.useRef(!1),L=ET(()=>{O.current||(I("hidden"),xe(y))},re),B=Wn(Ie=>{O.current=!0;let ft=Ie?"enter":"leave";L.onStart(y,ft,dt=>{dt==="enter"?s==null||s():dt==="leave"&&(a==null||a())})}),V=Wn(Ie=>{let ft=Ie?"enter":"leave";O.current=!1,L.onStop(y,ft,dt=>{dt==="enter"?o==null||o():dt==="leave"&&(l==null||l())}),ft==="leave"&&!vc(L)&&(I("hidden"),xe(y))});v.useEffect(()=>{C&&i||(B(k),V(k))},[k,C,i]);let W=!(!i||!C||!Re||G),[,q]=UL(W,p,k,{start:B,end:V}),ce=ri({ref:b,className:((r=Sh(w.className,ne&&c,ne&&f,q.enter&&c,q.enter&&q.closed&&f,q.enter&&!q.closed&&u,q.leave&&h,q.leave&&!q.closed&&m,q.leave&&q.closed&&x,!q.transition&&k&&d))==null?void 0:r.trim())||void 0,...zL(q)}),ye=0;M==="visible"&&(ye|=ci.Open),M==="hidden"&&(ye|=ci.Closed),k&&M==="hidden"&&(ye|=ci.Opening),!k&&M==="visible"&&(ye|=ci.Closing);let J=vT();return R.createElement(yc.Provider,{value:L},R.createElement(qL,{value:ye},J({ourProps:ce,theirProps:w,defaultTag:CT,features:kT,visible:M==="visible",name:"Transition.Child"})))}function eI(e,t){let{show:n,appear:r=!1,unmount:i=!0,...s}=e,o=v.useRef(null),a=TT(e),l=wT(...a?[o,t]:t===null?[]:[t]);ST();let c=bT();if(n===void 0&&c!==null&&(n=(c&ci.Open)===ci.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[f,u]=v.useState(n?"visible":"hidden"),d=ET(()=>{n||u("hidden")}),[h,m]=v.useState(!0),x=v.useRef([n]);Ir(()=>{h!==!1&&x.current[x.current.length-1]!==n&&(x.current.push(n),m(!1))},[x,n]);let w=v.useMemo(()=>({show:n,appear:r,initial:h}),[n,r,h]);Ir(()=>{n?u("visible"):!vc(d)&&o.current!==null&&u("hidden")},[n,d]);let p={unmount:i},g=Wn(()=>{var b;h&&m(!1),(b=e.beforeEnter)==null||b.call(e)}),y=Wn(()=>{var b;h&&m(!1),(b=e.beforeLeave)==null||b.call(e)}),C=vT();return R.createElement(yc.Provider,{value:d},R.createElement(gc.Provider,{value:w},C({ourProps:{...p,as:v.Fragment,children:R.createElement(_T,{ref:l,...p,...s,beforeEnter:g,beforeLeave:y})},theirProps:{},defaultTag:v.Fragment,features:kT,visible:f==="visible",name:"Transition"})))}function tI(e,t){let n=v.useContext(gc)!==null,r=bT()!==null;return R.createElement(R.Fragment,null,!n&&r?R.createElement(Th,{ref:t,...e}):R.createElement(_T,{ref:t,...e}))}let Th=jm(eI),_T=jm(JL),nI=jm(tI),rI=Object.assign(Th,{Child:nI,Root:Th});const Dm=v.createContext(void 0),Fo=({as:e="div",children:t,className:n})=>{const[r,i]=v.useState(!1),s=v.useCallback(()=>{i(a=>!a)},[]),o=v.useRef(null);return v.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]),T.jsx(Dm.Provider,{value:{open:r,setOpen:i,toggleOpen:s},children:T.jsx(e,{ref:o,className:`dropdown ${n}`,children:t})})},iI=({type:e,children:t,className:n,id:r,title:i})=>{const{open:s,toggleOpen:o,setOpen:a}=v.useContext(Dm),l=n||"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-sm",c=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 T.jsx("div",{children:e==="a"?T.jsx(n2,{id:r,to:"/#",onClick:f=>{f.preventDefault(),o()},className:c+(s?" show":""),children:t}):T.jsx("button",{id:r,onClick:f=>{f.stopPropagation(),f.preventDefault(),a(!s)},type:"button",className:l,title:i,children:t})})},sI=({as:e="div",className:t,children:n,placement:r})=>{const{open:i,setOpen:s}=v.useContext(Dm),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]=v.useState("right-end");v.useEffect(()=>{r&&l(r)},[r]);const c=v.useRef(null),f=document.getElementsByTagName("html")[0].getAttribute("dir"),u=()=>{if(i&&a==="right-end"&&c.current){const d=c.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"&&c.current){const d=c.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"&&c.current){const d=c.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"&&c.current){const d=c.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"&&c.current){const d=c.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"&&c.current){const d=c.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"&&c.current){const d=c.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 T.jsx(rI,{as:R.Fragment,show:i,children:d=>T.jsx(e,{ref:c,onClick:()=>s(!1),className:`${o} ${d==="entered"?"transition-all":""}`,style:u(),children:n})})};Fo.Trigger=iI;Fo.Content=sI;const oI={red:"hover:bg-red-500 hover:text-white text-red-500",default:"hover:bg-zink-300 text-zink-600 dark:hover:bg-zink-500 dark:text-zink-200"};function aI({onChatClose:e}){const[t,n]=v.useState(!1),r=Ys(),i=()=>{r==null||r.emit(Mn.ChatClose,{}),e()};return T.jsxs(T.Fragment,{children:[t&&T.jsx("div",{className:"absolute top-0 left-0 backdrop-blur-xs bg-slate-950/20 z-50 h-full w-full rounded-md",children:T.jsx("div",{className:"flex flex-col items-center justify-center h-full mx-5",children:T.jsxs("div",{className:"bg-white p-4 rounded-md",children:[T.jsx("div",{className:"text-lg font-semibold text-neutral-900",children:"Sohbeti kapatmak istediğinize emin misiniz?"}),T.jsxs("div",{className:"flex justify-between mt-4",children:[T.jsx("button",{type:"button",className:"bg-red-500 text-white px-4 py-2 rounded-md",onClick:i,children:"Evet"}),T.jsx("button",{type:"button",className:"bg-neutral-200 text-neutral-900 px-4 py-2 rounded-md",onClick:()=>n(!1),children:"Vazgeç"})]})]})})}),T.jsxs(Fo,{className:"relative flex items-center h-full",children:[T.jsx(Fo.Trigger,{type:"button",className:"h-full flex items-center",id:"dropdownMenuButton","data-bs-toggle":"dropdown",title:"Sohbet Ayarları",children:T.jsx(Me.Menu,{className:"size-6 text-white"})}),T.jsxs(Fo.Content,{placement:"left-end",className:"absolute z-[9999] text-left bg-white rounded-md shadow-lg right-0 top-5 dropdown-menu min-w-[14rem] dark:bg-zink-600","aria-labelledby":"dropdownMenuButton",children:[T.jsx("h5",{className:"text-base font-semibold text-slate-500 dark:text-zink-200 px-3 py-2",children:"Sohbet Ayarları"}),T.jsx("ul",{className:"border-t border-solid dark:border-zink-500 py-2 px-2",children:T.jsx("li",{children:T.jsxs("button",{className:ze("p-1 rounded-md w-full flex items-center gap-2 text-base font-medium transition-all duration-200 ease-linear dropdown-item disabled:opacity-50",oI.red),onClick:s=>{s.stopPropagation(),s.preventDefault(),n(!0)},children:[T.jsx(Me.X,{className:"w-6 h-6 cursor-pointer"}),T.jsx("span",{children:"Sohbeti Sonlandır"})]})})})]})]})]})}function lI({onNewMessage:e}){const t=v.useRef(null),n=Ys(),[r,i]=v.useState(""),s=()=>{n==null||n.emit(Mn.MessageCreate,{content:r},a=>{i(""),e(a),t.current&&(t.current.style.height="3rem")})},o=a=>{n==null||n.emit(Mn.MessageTyping,{content:a})};return T.jsxs("form",{className:"border-t border-solid p-2 flex items-center gap-2",onSubmit:a=>{a.preventDefault(),s(),a.currentTarget.reset()},children:[T.jsx("div",{className:"grow relative",children:T.jsx(hT,{id:"message",inputRef:t,className:"grow",noMargin:!0,autoComplete:"off",style:{height:"3rem"},onChange:a=>{i(a.target.value),o(a.target.value),a.target.value.length>0&&a.currentTarget.scrollHeight>a.currentTarget.clientHeight?a.currentTarget.style.height=`${a.currentTarget.scrollHeight}px`:a.currentTarget.style.height="3rem"},onKeyDown:a=>{a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),a.stopPropagation(),a.currentTarget.value="",s())},placeholder:"Mesajınızı yazın"})}),T.jsx("div",{className:"flex items-center justify-center h-full",children:T.jsx(Vs,{className:"rounded-md",type:"submit",children:"Gönder"})})]})}function uI({text:e}){const t=/(\b(?:https?:\/\/)?(?:www\.)?[a-z0-9.-]+\.[a-z]{2,}(?:\/[^\s]*)?)/gi,n=e.split(t);return T.jsx(T.Fragment,{children:n.map((r,i)=>{if(t.test(r)){const a=/^https?:\/\//i.test(r)?r:`https://${r}`;return T.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"text-blue-500! underline",children:r},i)}return T.jsx("span",{dangerouslySetInnerHTML:{__html:r}},i)})})}const cI={hidden:{opacity:0,y:20},visible:e=>({opacity:1,y:0,transition:{delay:e*.1,duration:.3,ease:"easeOut"}})};function fI({messages:e,isTyping:t}){var c,f,u,d;const n=v.useRef(null),r=v.useRef(null),[i,s]=v.useState(!0),{widget:o}=Fn(),a=()=>{var h;(h=n.current)==null||h.scrollIntoView({behavior:"smooth"})},l=()=>{if(r.current){const{scrollTop:h,scrollHeight:m,clientHeight:x}=r.current,w=m-h<=x+10;s(w)}};return v.useEffect(()=>{(i||t)&&a()},[e,i,t]),T.jsxs("section",{onScroll:l,ref:r,className:"flex flex-col gap-2 w-full h-full grow pt-4 px-4 overflow-y-auto",style:{height:"calc(100vh - 122px)"},children:[((f=(c=o==null?void 0:o.appearance)==null?void 0:c.design)==null?void 0:f.greeting_message)&&T.jsx("div",{className:"flex w-full items-center justify-start",children:T.jsx("div",{className:"max-w-[85%] whitespace-pre-wrap border border-solid rounded-md px-2 py-1 bg-zink-500 text-white",children:(d=(u=o==null?void 0:o.appearance)==null?void 0:u.design)==null?void 0:d.greeting_message})}),T.jsx(ta,{children:e.filter(h=>!!h.content&&h.content!==`
|
|
110
|
-
`).map((h,m)=>T.jsxs(Jn.div,{custom:m,initial:"hidden",animate:"visible",variants:cI,className:ze("flex w-full items-center break-words",{"justify-end":h.sender_type===pt.Customer,"justify-start":h.sender_type===pt.User,"justify-center":h.sender_type===pt.System||h.sender_type===pt.Activity}),children:[h.sender_type===pt.System&&T.jsx("div",{className:"whitespace-pre-wrap",children:h.content}),[pt.Customer,pt.User].includes(h.sender_type)&&T.jsx(Jn.div,{initial:{scale:.9},animate:{scale:1},transition:{duration:.2},className:ze("max-w-[85%] whitespace-pre-wrap border border-solid rounded-md px-2 py-1",{"bg-blue-500 text-white":h.sender_type===pt.Customer,"bg-zink-500 text-white":h.sender_type===pt.User}),children:h.sender_type===pt.User?T.jsx(uI,{text:h.content}):h.content}),h.sender_type===pt.Activity&&(h.content.split("_").length===3?T.jsxs("div",{className:"whitespace-pre-wrap border border-solid rounded-md px-2 py-1 text-xs",children:[h.content.split("_")[2]," odaya katıldı"]}):h.content),pt.System===h.sender_type&&T.jsx("div",{className:"text-xs text-neutral-400",children:h.created_at.toLocaleString()})]},h.id||m))}),t&&T.jsx("div",{className:"flex w-full items-center justify-start",children:T.jsx("div",{className:"h-full flex items-center animate-pulse",children:T.jsx(
|
|
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}:{},w=xT(f.props,ri(kf(l,["ref"])));for(let p in u)p in w&&delete u[p];return v.cloneElement(f,Object.assign({},w,u,c,{ref:i(LL(f),c.ref)},x))}return v.createElement(s,Object.assign({},kf(l,["ref"]),s!==v.Fragment&&c,s!==v.Fragment&&u),f)}function FL(){let e=v.useRef([]),t=v.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 NL(...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 xT(...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 Mm(e){var t;return Object.assign(v.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function ri(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function kf(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function LL(e){return R.version.split(".")[0]>="19"?e.props.ref:e.ref}let IL=Symbol();function wT(...e){let t=v.useRef(e);v.useEffect(()=>{t.current=e},[e]);let n=Wn(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[IL]))?void 0:n}function $L(e=0){let[t,n]=v.useState(e),r=v.useCallback(l=>n(l),[t]),i=v.useCallback(l=>n(c=>c|l),[t]),s=v.useCallback(l=>(t&l)===l,[t]),o=v.useCallback(l=>n(c=>c&~l),[n]),a=v.useCallback(l=>n(c=>c^l),[n]);return{flags:t,setFlag:r,addFlag:i,hasFlag:s,removeFlag:o,toggleFlag:a}}var VL={},_v,Pv;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((_v=process==null?void 0:VL)==null?void 0:_v.NODE_ENV)==="test"&&typeof((Pv=Element==null?void 0:Element.prototype)==null?void 0:Pv.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 BL=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(BL||{});function zL(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function UL(e,t,n,r){let[i,s]=v.useState(n),{hasFlag:o,addFlag:a,removeFlag:l}=$L(e&&i?3:0),c=v.useRef(!1),f=v.useRef(!1),u=mT();return Ir(()=>{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),HL(t,{inFlight:c,prepare(){f.current?f.current=!1:f.current=c.current,c.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||(c.current=!1,l(7),n||s(!1),(h=r==null?void 0:r.end)==null||h.call(r,n))}})}},[e,n,t,u]),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 HL(e,{prepare:t,run:n,done:r,inFlight:i}){let s=mc();return KL(e,{prepare:t,inFlight:i}),s.nextFrame(()=>{n(),s.requestAnimationFrame(()=>{s.add(WL(e,r))})}),s.dispose}function WL(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 KL(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 jm=v.createContext(null);jm.displayName="OpenClosedContext";var ci=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ci||{});function bT(){return v.useContext(jm)}function qL({value:e,children:t}){return R.createElement(jm.Provider,{value:e},t)}function QL(){let e=typeof document>"u";return"useSyncExternalStore"in _f?(t=>t.useSyncExternalStore)(_f)(()=>()=>{},()=>!1,()=>!e):!1}function ST(){let e=QL(),[t,n]=v.useState(Il.isHandoffComplete);return t&&Il.isHandoffComplete===!1&&n(!1),v.useEffect(()=>{t!==!0&&n(!0)},[t]),v.useEffect(()=>Il.handoff(),[]),e?!1:t}function GL(){let e=v.useRef(!1);return Ir(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function TT(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:CT)!==v.Fragment||R.Children.count(e.children)===1}let yc=v.createContext(null);yc.displayName="TransitionContext";var YL=(e=>(e.Visible="visible",e.Hidden="hidden",e))(YL||{});function XL(){let e=v.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 ZL(){let e=v.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=v.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 ET(e,t){let n=gT(e),r=v.useRef([]),i=GL(),s=mT(),o=Wn((h,m=kr.Hidden)=>{let x=r.current.findIndex(({el:w})=>w===h);x!==-1&&(gc(m,{[kr.Unmount](){r.current.splice(x,1)},[kr.Hidden](){r.current[x].state="hidden"}}),s.microTask(()=>{var w;!xc(r)&&i.current&&((w=n.current)==null||w.call(n))}))}),a=Wn(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,kr.Unmount)}),l=v.useRef([]),c=v.useRef(Promise.resolve()),f=v.useRef({enter:[],leave:[]}),u=Wn((h,m,x)=>{l.current.splice(0),t&&(t.chains.current[m]=t.chains.current[m].filter(([w])=>w!==h)),t==null||t.chains.current[m].push([h,new Promise(w=>{l.current.push(w)})]),t==null||t.chains.current[m].push([h,new Promise(w=>{Promise.all(f.current[m].map(([p,g])=>g)).then(()=>w())})]),m==="enter"?c.current=c.current.then(()=>t==null?void 0:t.wait.current).then(()=>x(m)):x(m)}),d=Wn((h,m,x)=>{Promise.all(f.current[m].splice(0).map(([w,p])=>p)).then(()=>{var w;(w=l.current.shift())==null||w()}).then(()=>x(m))});return v.useMemo(()=>({children:r,register:a,unregister:o,onStart:u,onStop:d,wait:c,chains:f}),[a,o,r,u,d,f,c])}let CT=v.Fragment,kT=yT.RenderStrategy;function JL(e,t){var n,r;let{transition:i=!0,beforeEnter:s,afterEnter:o,beforeLeave:a,afterLeave:l,enter:c,enterFrom:f,enterTo:u,entered:d,leave:h,leaveFrom:m,leaveTo:x,...w}=e,[p,g]=v.useState(null),y=v.useRef(null),C=TT(e),b=wT(...C?[y,t,g]:t===null?[]:[t]),E=(n=w.unmount)==null||n?kr.Unmount:kr.Hidden,{show:k,appear:P,initial:M}=XL(),[j,I]=v.useState(k?"visible":"hidden"),re=ZL(),{register:ie,unregister:xe}=re;Ir(()=>ie(y),[ie,y]),Ir(()=>{if(E===kr.Hidden&&y.current){if(k&&j!=="visible"){I("visible");return}return gc(j,{hidden:()=>xe(y),visible:()=>ie(y)})}},[j,y,ie,xe,k,E]);let Re=ST();Ir(()=>{if(C&&Re&&j==="visible"&&y.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[y,j,Re,C]);let G=M&&!P,ne=P&&k&&M,O=v.useRef(!1),L=ET(()=>{O.current||(I("hidden"),xe(y))},re),B=Wn(Ie=>{O.current=!0;let ft=Ie?"enter":"leave";L.onStart(y,ft,dt=>{dt==="enter"?s==null||s():dt==="leave"&&(a==null||a())})}),V=Wn(Ie=>{let ft=Ie?"enter":"leave";O.current=!1,L.onStop(y,ft,dt=>{dt==="enter"?o==null||o():dt==="leave"&&(l==null||l())}),ft==="leave"&&!xc(L)&&(I("hidden"),xe(y))});v.useEffect(()=>{C&&i||(B(k),V(k))},[k,C,i]);let W=!(!i||!C||!Re||G),[,q]=UL(W,p,k,{start:B,end:V}),ce=ri({ref:b,className:((r=Th(w.className,ne&&c,ne&&f,q.enter&&c,q.enter&&q.closed&&f,q.enter&&!q.closed&&u,q.leave&&h,q.leave&&!q.closed&&m,q.leave&&q.closed&&x,!q.transition&&k&&d))==null?void 0:r.trim())||void 0,...zL(q)}),ye=0;j==="visible"&&(ye|=ci.Open),j==="hidden"&&(ye|=ci.Closed),k&&j==="hidden"&&(ye|=ci.Opening),!k&&j==="visible"&&(ye|=ci.Closing);let J=vT();return R.createElement(vc.Provider,{value:L},R.createElement(qL,{value:ye},J({ourProps:ce,theirProps:w,defaultTag:CT,features:kT,visible:j==="visible",name:"Transition.Child"})))}function eI(e,t){let{show:n,appear:r=!1,unmount:i=!0,...s}=e,o=v.useRef(null),a=TT(e),l=wT(...a?[o,t]:t===null?[]:[t]);ST();let c=bT();if(n===void 0&&c!==null&&(n=(c&ci.Open)===ci.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[f,u]=v.useState(n?"visible":"hidden"),d=ET(()=>{n||u("hidden")}),[h,m]=v.useState(!0),x=v.useRef([n]);Ir(()=>{h!==!1&&x.current[x.current.length-1]!==n&&(x.current.push(n),m(!1))},[x,n]);let w=v.useMemo(()=>({show:n,appear:r,initial:h}),[n,r,h]);Ir(()=>{n?u("visible"):!xc(d)&&o.current!==null&&u("hidden")},[n,d]);let p={unmount:i},g=Wn(()=>{var b;h&&m(!1),(b=e.beforeEnter)==null||b.call(e)}),y=Wn(()=>{var b;h&&m(!1),(b=e.beforeLeave)==null||b.call(e)}),C=vT();return R.createElement(vc.Provider,{value:d},R.createElement(yc.Provider,{value:w},C({ourProps:{...p,as:v.Fragment,children:R.createElement(_T,{ref:l,...p,...s,beforeEnter:g,beforeLeave:y})},theirProps:{},defaultTag:v.Fragment,features:kT,visible:f==="visible",name:"Transition"})))}function tI(e,t){let n=v.useContext(yc)!==null,r=bT()!==null;return R.createElement(R.Fragment,null,!n&&r?R.createElement(Eh,{ref:t,...e}):R.createElement(_T,{ref:t,...e}))}let Eh=Mm(eI),_T=Mm(JL),nI=Mm(tI),rI=Object.assign(Eh,{Child:nI,Root:Eh});const Dm=v.createContext(void 0),Fo=({as:e="div",children:t,className:n})=>{const[r,i]=v.useState(!1),s=v.useCallback(()=>{i(a=>!a)},[]),o=v.useRef(null);return v.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]),T.jsx(Dm.Provider,{value:{open:r,setOpen:i,toggleOpen:s},children:T.jsx(e,{ref:o,className:`dropdown ${n}`,children:t})})},iI=({type:e,children:t,className:n,id:r,title:i})=>{const{open:s,toggleOpen:o,setOpen:a}=v.useContext(Dm),l=n||"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-sm",c=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 T.jsx("div",{children:e==="a"?T.jsx(n2,{id:r,to:"/#",onClick:f=>{f.preventDefault(),o()},className:c+(s?" show":""),children:t}):T.jsx("button",{id:r,onClick:f=>{f.stopPropagation(),f.preventDefault(),a(!s)},type:"button",className:l,title:i,children:t})})},sI=({as:e="div",className:t,children:n,placement:r})=>{const{open:i,setOpen:s}=v.useContext(Dm),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]=v.useState("right-end");v.useEffect(()=>{r&&l(r)},[r]);const c=v.useRef(null),f=document.getElementsByTagName("html")[0].getAttribute("dir"),u=()=>{if(i&&a==="right-end"&&c.current){const d=c.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"&&c.current){const d=c.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"&&c.current){const d=c.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"&&c.current){const d=c.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"&&c.current){const d=c.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"&&c.current){const d=c.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"&&c.current){const d=c.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 T.jsx(rI,{as:R.Fragment,show:i,children:d=>T.jsx(e,{ref:c,onClick:()=>s(!1),className:`${o} ${d==="entered"?"transition-all":""}`,style:u(),children:n})})};Fo.Trigger=iI;Fo.Content=sI;const oI={red:"hover:bg-red-500 hover:text-white text-red-500",default:"hover:bg-zink-300 text-zink-600 dark:hover:bg-zink-500 dark:text-zink-200"};function aI({onChatClose:e}){const[t,n]=v.useState(!1),r=Ys(),i=()=>{r==null||r.emit(jn.ChatClose,{}),e()};return T.jsxs(T.Fragment,{children:[t&&T.jsx("div",{className:"absolute top-0 left-0 backdrop-blur-xs bg-slate-950/20 z-50 h-full w-full rounded-md",children:T.jsx("div",{className:"flex flex-col items-center justify-center h-full mx-5",children:T.jsxs("div",{className:"bg-white p-4 rounded-md",children:[T.jsx("div",{className:"text-lg font-semibold text-neutral-900",children:"Sohbeti kapatmak istediğinize emin misiniz?"}),T.jsxs("div",{className:"flex justify-between mt-4",children:[T.jsx("button",{type:"button",className:"bg-red-500 text-white px-4 py-2 rounded-md",onClick:i,children:"Evet"}),T.jsx("button",{type:"button",className:"bg-neutral-200 text-neutral-900 px-4 py-2 rounded-md",onClick:()=>n(!1),children:"Vazgeç"})]})]})})}),T.jsxs(Fo,{className:"relative flex items-center h-full",children:[T.jsx(Fo.Trigger,{type:"button",className:"h-full flex items-center",id:"dropdownMenuButton","data-bs-toggle":"dropdown",title:"Sohbet Ayarları",children:T.jsx(je.Menu,{className:"size-6 text-white"})}),T.jsxs(Fo.Content,{placement:"left-end",className:"absolute z-[9999] text-left bg-white rounded-md shadow-lg right-0 top-5 dropdown-menu min-w-[14rem] dark:bg-zink-600","aria-labelledby":"dropdownMenuButton",children:[T.jsx("h5",{className:"text-base font-semibold text-slate-500 dark:text-zink-200 px-3 py-2",children:"Sohbet Ayarları"}),T.jsx("ul",{className:"border-t border-solid dark:border-zink-500 py-2 px-2",children:T.jsx("li",{children:T.jsxs("button",{className:ze("p-1 rounded-md w-full flex items-center gap-2 text-base font-medium transition-all duration-200 ease-linear dropdown-item disabled:opacity-50",oI.red),onClick:s=>{s.stopPropagation(),s.preventDefault(),n(!0)},children:[T.jsx(je.X,{className:"w-6 h-6 cursor-pointer"}),T.jsx("span",{children:"Sohbeti Sonlandır"})]})})})]})]})]})}function lI({onNewMessage:e}){const t=v.useRef(null),n=Ys(),[r,i]=v.useState(""),s=()=>{n==null||n.emit(jn.MessageCreate,{content:r},a=>{i(""),e(a),t.current&&(t.current.style.height="3rem")})},o=a=>{n==null||n.emit(jn.MessageTyping,{content:a})};return T.jsxs("form",{className:"border-t border-solid p-2 flex items-center gap-2",onSubmit:a=>{a.preventDefault(),s(),a.currentTarget.reset()},children:[T.jsx("div",{className:"grow relative",children:T.jsx(hT,{id:"message",inputRef:t,className:"grow",noMargin:!0,autoComplete:"off",style:{height:"3rem"},onChange:a=>{i(a.target.value),o(a.target.value),a.target.value.length>0&&a.currentTarget.scrollHeight>a.currentTarget.clientHeight?a.currentTarget.style.height=`${a.currentTarget.scrollHeight}px`:a.currentTarget.style.height="3rem"},onKeyDown:a=>{a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),a.stopPropagation(),a.currentTarget.value="",s())},placeholder:"Mesajınızı yazın"})}),T.jsx("div",{className:"flex items-center justify-center h-full",children:T.jsx(Vs,{className:"rounded-md",type:"submit",children:"Gönder"})})]})}function uI({text:e}){const t=/(\b(?:https?:\/\/)?(?:www\.)?[a-z0-9.-]+\.[a-z]{2,}(?:\/[^\s]*)?)/gi,n=e.split(t);return T.jsx(T.Fragment,{children:n.map((r,i)=>{if(t.test(r)){const a=/^https?:\/\//i.test(r)?r:`https://${r}`;return T.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"text-blue-500! underline",children:r},i)}return T.jsx("span",{dangerouslySetInnerHTML:{__html:r}},i)})})}const cI={hidden:{opacity:0,y:20},visible:e=>({opacity:1,y:0,transition:{delay:e*.1,duration:.3,ease:"easeOut"}})};function fI({messages:e,isTyping:t}){var c,f,u,d;const n=v.useRef(null),r=v.useRef(null),[i,s]=v.useState(!0),{widget:o}=Fn(),a=()=>{var h;(h=n.current)==null||h.scrollIntoView({behavior:"smooth"})},l=()=>{if(r.current){const{scrollTop:h,scrollHeight:m,clientHeight:x}=r.current,w=m-h<=x+10;s(w)}};return v.useEffect(()=>{(i||t)&&a()},[e,i,t]),T.jsxs("section",{onScroll:l,ref:r,className:"flex flex-col gap-2 w-full h-full grow pt-4 px-4 overflow-y-auto",style:{height:"calc(100vh - 122px)"},children:[((f=(c=o==null?void 0:o.appearance)==null?void 0:c.design)==null?void 0:f.greeting_message)&&T.jsx("div",{className:"flex w-full items-center justify-start",children:T.jsx("div",{className:"max-w-[85%] whitespace-pre-wrap border border-solid rounded-md px-2 py-1 bg-zink-500 text-white",children:(d=(u=o==null?void 0:o.appearance)==null?void 0:u.design)==null?void 0:d.greeting_message})}),T.jsx(ta,{children:e.filter(h=>!!h.content&&h.content!==`
|
|
110
|
+
`).map((h,m)=>T.jsxs(Jn.div,{custom:m,initial:"hidden",animate:"visible",variants:cI,className:ze("flex w-full items-center break-words",{"justify-end":h.sender_type===pt.Customer,"justify-start":h.sender_type===pt.User,"justify-center":h.sender_type===pt.System||h.sender_type===pt.Activity}),children:[h.sender_type===pt.System&&T.jsx("div",{className:"whitespace-pre-wrap",children:h.content}),[pt.Customer,pt.User].includes(h.sender_type)&&T.jsx(Jn.div,{initial:{scale:.9},animate:{scale:1},transition:{duration:.2},className:ze("max-w-[85%] whitespace-pre-wrap border border-solid rounded-md px-2 py-1",{"bg-blue-500 text-white":h.sender_type===pt.Customer,"bg-zink-500 text-white":h.sender_type===pt.User}),children:h.sender_type===pt.User?T.jsx(uI,{text:h.content}):h.content}),h.sender_type===pt.Activity&&(h.content.split("_").length===3?T.jsxs("div",{className:"whitespace-pre-wrap border border-solid rounded-md px-2 py-1 text-xs",children:[h.content.split("_")[2]," odaya katıldı"]}):h.content),pt.System===h.sender_type&&T.jsx("div",{className:"text-xs text-neutral-400",children:h.created_at.toLocaleString()})]},h.id||m))}),t&&T.jsx("div",{className:"flex w-full items-center justify-start",children:T.jsx("div",{className:"h-full flex items-center animate-pulse",children:T.jsx(je.MessageTyping,{})})}),!i&&T.jsx("div",{className:"fixed bottom-[7.5rem] right-16",children:T.jsx(Vs,{type:"button",className:"size-10 flex items-center justify-center p-0!",onClick:()=>{var h,m;(m=r.current)==null||m.scrollTo({top:(h=r.current)==null?void 0:h.scrollHeight,behavior:"smooth"})},children:T.jsx(je.ArrowDown,{className:"size-5"})})}),T.jsx("div",{ref:n})]})}function dI({children:e}){const{widget:t}=Fn();return t?T.jsx("section",{className:"h-full w-full relative",children:e}):null}function hI({children:e}){const t=Ys();return v.useEffect(()=>{t&&t.connect()},[]),!t||!t.connected?null:e}function pI(){var p,g;const e=tr(),{widget:t,setOpen:n,setIsHaveChat:r}=Fn(),i=Ys(),s=dm(),o=hm(),[a,l]=v.useState(null),[c,f]=v.useState([]),[u,d]=v.useState(!1),[h,m]=v.useState([]),x=()=>{n(!1),r(!1),l(null),f([]),m([]),wu(t.client_id).then(()=>{f([]),i==null||i.disconnect(),s.push("registration")})};v.useEffect(()=>{i==null||i.emit(jn.ChatView,{},y=>{if(y===null){n(!1),r(!1),wu(t.client_id),f([]),m([]),s.push("registration");return}l(y),r(!0)})},[]);const w=v.useCallback(y=>{f([...c,y])},[c]);return v.useEffect(()=>{if(!i)return;const y=E=>{const k={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(h.length>0){m(P=>[...P,k]);return}E.is_shortcut?m([k]):w(k),d(!1)},C=E=>{l({...a,agent_name:E.name,agent_avatar:E.avatar,is_uploadable:(a==null?void 0:a.is_uploadable)??!1}),w({content:` _ _${E.name}`,created_at:new Date,files:[],id:Math.random().toString(),sender_type:pt.Activity,activity_type:pT.AdminJoin,sender_name:E.name})},b=()=>{d(!0)};return i.on(fn.MessageAgentCreate,y),i.on(fn.ChatUserAssignee,C),i.on(fn.MessageAgentTyping,b),()=>{i.off(fn.MessageAgentCreate,y),i.off(fn.ChatUserAssignee,C),i.off(fn.MessageAgentTyping,b)}},[w]),v.useEffect(()=>{i&&i.emit(jn.MessageList,{},y=>{f(y)})},[]),v.useEffect(()=>{const y=setTimeout(()=>{d(!1)},2e3);return()=>clearTimeout(y)},[u]),v.useEffect(()=>{if(!t||h.length===0)return;let y=0;t.writing_timeout&&(y=[...h[0].content].length/t.writing_timeout,y<0&&(y=0));const C=setTimeout(()=>{w(h[0]),m(h.slice(1))},y*1e3);return()=>clearTimeout(C)},[h,t]),a?T.jsxs(T.Fragment,{children:[T.jsx("div",{id:"chat-alert-portal"}),T.jsx(ta,{children:T.jsxs(Jn.div,{initial:{opacity:0,scale:.9,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.9,y:10},transition:{type:"spring",damping:25,stiffness:300},className:"transition-all ease-in-out duration-300 bg-white h-full w-full rounded-lg border border-solid dark:border-zink-500 flex flex-col",children:[T.jsxs("header",{style:{borderColor:e.getColor(U.HeaderBorder),backgroundColor:e.getColor(U.HeaderBackground),color:e.getColor(U.HeaderText)},className:"border-b border-solid p-4 rounded-t-md flex justify-between items-center",children:[a!=null&&a.agent_name?T.jsx(AL,{name:a.agent_name,avatar:a.agent_avatar,className:"text-neutral-300"}):T.jsx("div",{style:{color:e.getColor(U.HeaderText)},children:((g=(p=t==null?void 0:t.appearance)==null?void 0:p.design)==null?void 0:g.greeting_header)||"Bizimle Sohbet Edin"}),T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx(aI,{onChatClose:x}),o&&T.jsx("button",{type:"button",style:{color:e.getColor(U.HeaderText)},onClick:()=>n(!1),children:T.jsx(je.X,{className:"w-6 h-6 cursor-pointer"})})]})]}),T.jsx(fI,{messages:c,isTyping:u||h.length>0}),T.jsx(lI,{onNewMessage:y=>{w(y)}})]})})]}):null}function mI(){return TL(),null}function gI(){return T.jsxs(hI,{children:[T.jsx(bS,{defaultOpen:!0,children:T.jsx(dI,{children:T.jsx(pI,{})})}),T.jsx(mI,{})]})}const yI=[{path:"/chat",component:gI,name:"chat"}],PT=[...yI],AT=[...PL],vI=[...PT,...AT];function xI(){return T.jsx(K_,{future:{v7_startTransition:!0},children:T.jsxs(Q_,{children:[PT.map((e,t)=>T.jsx(Fd,{path:e.path,element:T.jsx(e.component,{})},t)),AT.map((e,t)=>T.jsx(Fd,{path:e.path,element:T.jsx(e.component,{})},t))]})})}function wI({link_id:e,defaultValues:t}){const{setWidget:n,widget:r,setDefaultValues:i}=Fn(),{data:s,isLoading:o}=e_(e);return v.useEffect(()=>{Array.isArray(s)&&n_(s[0])&&(n(s[0]),i(t))},[s]),o||!r?null:T.jsx(cL,{children:T.jsx(aj,{children:T.jsx(xI,{})})})}const bI=new Fk;function SI({container:e,link_id:t,defaultValues:n}){Zx(e).render(T.jsxs(Vk,{client:bI,children:[T.jsx(wI,{link_id:t,defaultValues:n}),T.jsx(tL,{richColors:!0,style:{zIndex:999999},position:"bottom-right"})]}))}window.widget=SI});export default TI();
|