@sledge-app/js 2.0.71 → 2.0.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
var e,t,n,r,o,i,a=Object.defineProperty;function s(e,t){for(var n=0;n<t.length;n++){const r=t[n];if("string"!=typeof r&&!Array.isArray(r))for(const t in r)if("default"!==t&&!(t in e)){const n=Object.getOwnPropertyDescriptor(r,t);n&&Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var u={exports:{}},c={},d=Symbol.for("react.element"),f=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),g=Symbol.for("react.provider"),v=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),w=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),E=Symbol.iterator;var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,C={};function P(e,t,n){this.props=e,this.context=t,this.refs=C,this.updater=n||S}function _(){}function T(e,t,n){this.props=e,this.context=t,this.refs=C,this.updater=n||S}P.prototype.isReactComponent={},P.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)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")},P.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},_.prototype=P.prototype;var R=T.prototype=new _;R.constructor=T,k(R,P.prototype),R.isPureReactComponent=!0;var D=Array.isArray,A=Object.prototype.hasOwnProperty,M={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};function O(e,t,n){var r,o={},i=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(i=""+t.key),t)A.call(t,r)&&!L.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];o.children=l}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===o[r]&&(o[r]=s[r]);return{$$typeof:d,type:e,key:i,ref:a,props:o,_owner:M.current}}function F(e){return"object"==typeof e&&null!==e&&e.$$typeof===d}var I=/\/+/g;function N(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function z(e,t,n,r,o){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var a=!1;if(null===e)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case d:case f:a=!0}}if(a)return o=o(a=e),e=""===r?"."+N(a,0):r,D(o)?(n="",null!=e&&(n=e.replace(I,"$&/")+"/"),z(o,t,n,"",(function(e){return e}))):null!=o&&(F(o)&&(o=function(e,t){return{$$typeof:d,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,n+(!o.key||a&&a.key===o.key?"":(""+o.key).replace(I,"$&/")+"/")+e)),t.push(o)),1;if(a=0,r=""===r?".":r+":",D(e))for(var s=0;s<e.length;s++){var l=r+N(i=e[s],s);a+=z(i,t,n,l,o)}else if(l=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=E&&e[E]||e["@@iterator"])?e:null}(e),"function"==typeof l)for(e=l.call(e),s=0;!(i=e.next()).done;)a+=z(i=i.value,t,n,l=r+N(i,s++),o);else if("object"===i)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function B(e,t,n){if(null==e)return e;var r=[],o=0;return z(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function V(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var j={current:null},H={transition:null},U={ReactCurrentDispatcher:j,ReactCurrentBatchConfig:H,ReactCurrentOwner:M};c.Children={map:B,forEach:function(e,t,n){B(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return B(e,(function(){t++})),t},toArray:function(e){return B(e,(function(e){return e}))||[]},only:function(e){if(!F(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},c.Component=P,c.Fragment=p,c.Profiler=m,c.PureComponent=T,c.StrictMode=h,c.Suspense=b,c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=U,c.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=k({},e.props),o=e.key,i=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(i=t.ref,a=M.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)A.call(t,l)&&!L.hasOwnProperty(l)&&(r[l]=void 0===t[l]&&void 0!==s?s[l]:t[l])}var l=arguments.length-2;if(1===l)r.children=n;else if(1<l){s=Array(l);for(var u=0;u<l;u++)s[u]=arguments[u+2];r.children=s}return{$$typeof:d,type:e.type,key:o,ref:i,props:r,_owner:a}},c.createContext=function(e){return(e={$$typeof:v,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:g,_context:e},e.Consumer=e},c.createElement=O,c.createFactory=function(e){var t=O.bind(null,e);return t.type=e,t},c.createRef=function(){return{current:null}},c.forwardRef=function(e){return{$$typeof:y,render:e}},c.isValidElement=F,c.lazy=function(e){return{$$typeof:x,_payload:{_status:-1,_result:e},_init:V}},c.memo=function(e,t){return{$$typeof:w,type:e,compare:void 0===t?null:t}},c.startTransition=function(e){var t=H.transition;H.transition={};try{e()}finally{H.transition=t}},c.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},c.useCallback=function(e,t){return j.current.useCallback(e,t)},c.useContext=function(e){return j.current.useContext(e)},c.useDebugValue=function(){},c.useDeferredValue=function(e){return j.current.useDeferredValue(e)},c.useEffect=function(e,t){return j.current.useEffect(e,t)},c.useId=function(){return j.current.useId()},c.useImperativeHandle=function(e,t,n){return j.current.useImperativeHandle(e,t,n)},c.useInsertionEffect=function(e,t){return j.current.useInsertionEffect(e,t)},c.useLayoutEffect=function(e,t){return j.current.useLayoutEffect(e,t)},c.useMemo=function(e,t){return j.current.useMemo(e,t)},c.useReducer=function(e,t,n){return j.current.useReducer(e,t,n)},c.useRef=function(e){return j.current.useRef(e)},c.useState=function(e){return j.current.useState(e)},c.useSyncExternalStore=function(e,t,n){return j.current.useSyncExternalStore(e,t,n)},c.useTransition=function(){return j.current.useTransition()},c.version="18.2.0",u.exports=c;var W=u.exports;const $=l(W),K=s({__proto__:null,default:$},[W]),X=(null==(e="undefined"!=typeof globalThis?globalThis:void 0)?void 0:e.crypto)||(null==(t="undefined"!=typeof global?global:void 0)?void 0:t.crypto)||(null==(n="undefined"!=typeof window?window:void 0)?void 0:n.crypto)||(null==(r="undefined"!=typeof self?self:void 0)?void 0:r.crypto)||(null==(i=null==(o="undefined"!=typeof frames?frames:void 0)?void 0:o[0])?void 0:i.crypto);let Y;Y=X?e=>{const t=[];for(let n=0;n<e;n+=4)t.push(X.getRandomValues(new Uint32Array(1))[0]);return new Q(t,e)}:e=>{const t=[],n=e=>{let t=e,n=987654321;const r=4294967295;return()=>{n=36969*(65535&n)+(n>>16)&r,t=18e3*(65535&t)+(t>>16)&r;let e=(n<<16)+t&r;return e/=4294967296,e+=.5,e*(Math.random()>.5?1:-1)}};for(let r,o=0;o<e;o+=4){const e=n(4294967296*(r||Math.random()));r=987654071*e(),t.push(4294967296*e()|0)}return new Q(t,e)};class q{static create(...e){return new this(...e)}mixIn(e){return Object.assign(this,e)}clone(){const e=new this.constructor;return Object.assign(e,this),e}}class Q extends q{constructor(e=[],t=4*e.length){super();let n=e;if(n instanceof ArrayBuffer&&(n=new Uint8Array(n)),(n instanceof Int8Array||n instanceof Uint8ClampedArray||n instanceof Int16Array||n instanceof Uint16Array||n instanceof Int32Array||n instanceof Uint32Array||n instanceof Float32Array||n instanceof Float64Array)&&(n=new Uint8Array(n.buffer,n.byteOffset,n.byteLength)),n instanceof Uint8Array){const e=n.byteLength,t=[];for(let r=0;r<e;r+=1)t[r>>>2]|=n[r]<<24-r%4*8;this.words=t,this.sigBytes=e}else this.words=e,this.sigBytes=t}toString(e=Z){return e.stringify(this)}concat(e){const t=this.words,n=e.words,r=this.sigBytes,o=e.sigBytes;if(this.clamp(),r%4)for(let i=0;i<o;i+=1){const e=n[i>>>2]>>>24-i%4*8&255;t[r+i>>>2]|=e<<24-(r+i)%4*8}else for(let i=0;i<o;i+=4)t[r+i>>>2]=n[i>>>2];return this.sigBytes+=o,this}clamp(){const{words:e,sigBytes:t}=this;e[t>>>2]&=4294967295<<32-t%4*8,e.length=Math.ceil(t/4)}clone(){const e=super.clone.call(this);return e.words=this.words.slice(0),e}}var G;((e,t,n)=>{t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(Q,"symbol"!=typeof(G="random")?G+"":G,Y);const Z={stringify(e){const{words:t,sigBytes:n}=e,r=[];for(let o=0;o<n;o+=1){const e=t[o>>>2]>>>24-o%4*8&255;r.push((e>>>4).toString(16)),r.push((15&e).toString(16))}return r.join("")},parse(e){const t=e.length,n=[];for(let r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new Q(n,t/2)}},J={stringify(e){const{words:t,sigBytes:n}=e,r=[];for(let o=0;o<n;o+=1){const e=t[o>>>2]>>>24-o%4*8&255;r.push(String.fromCharCode(e))}return r.join("")},parse(e){const t=e.length,n=[];for(let r=0;r<t;r+=1)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new Q(n,t)}},ee={stringify(e){try{return decodeURIComponent(escape(J.stringify(e)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:e=>J.parse(unescape(encodeURIComponent(e)))};class te extends q{constructor(){super(),this._minBufferSize=0}reset(){this._data=new Q,this._nDataBytes=0}_append(e){let t=e;"string"==typeof t&&(t=ee.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes}_process(e){let t;const{_data:n,blockSize:r}=this,o=n.words,i=n.sigBytes;let a=i/(4*r);a=e?Math.ceil(a):Math.max((0|a)-this._minBufferSize,0);const s=a*r,l=Math.min(4*s,i);if(s){for(let e=0;e<s;e+=r)this._doProcessBlock(o,e);t=o.splice(0,s),n.sigBytes-=l}return new Q(t,l)}clone(){const e=super.clone.call(this);return e._data=this._data.clone(),e}}class ne extends te{constructor(e){super(),this.blockSize=16,this.cfg=Object.assign(new q,e),this.reset()}static _createHelper(e){return(t,n)=>new e(n).finalize(t)}static _createHmacHelper(e){return(t,n)=>new re(e,n).finalize(t)}reset(){super.reset.call(this),this._doReset()}update(e){return this._append(e),this._process(),this}finalize(e){e&&this._append(e);return this._doFinalize()}}class re extends q{constructor(e,t){super();const n=new e;this._hasher=n;let r=t;"string"==typeof r&&(r=ee.parse(r));const o=n.blockSize,i=4*o;r.sigBytes>i&&(r=n.finalize(t)),r.clamp();const a=r.clone();this._oKey=a;const s=r.clone();this._iKey=s;const l=a.words,u=s.words;for(let c=0;c<o;c+=1)l[c]^=1549556828,u[c]^=909522486;a.sigBytes=i,s.sigBytes=i,this.reset()}reset(){const e=this._hasher;e.reset(),e.update(this._iKey)}update(e){return this._hasher.update(e),this}finalize(e){const t=this._hasher,n=t.finalize(e);t.reset();return t.finalize(this._oKey.clone().concat(n))}}const oe=Q;class ie extends q{constructor(e,t){super(),this.high=e,this.low=t}}class ae extends q{constructor(e=[],t=8*e.length){super(),this.words=e,this.sigBytes=t}toX32(){const e=this.words,t=e.length,n=[];for(let r=0;r<t;r+=1){const t=e[r];n.push(t.high),n.push(t.low)}return oe.create(n,this.sigBytes)}clone(){const e=super.clone.call(this);e.words=this.words.slice(0);const{words:t}=e,n=t.length;for(let r=0;r<n;r+=1)t[r]=t[r].clone();return e}}const se=(e,t,n)=>{const r=[];let o=0;for(let i=0;i<t;i+=1)if(i%4){const t=n[e.charCodeAt(i-1)]<<i%4*2|n[e.charCodeAt(i)]>>>6-i%4*2;r[o>>>2]|=t<<24-o%4*8,o+=1}return Q.create(r,o)},le={stringify(e){const{words:t,sigBytes:n}=e,r=this._map;e.clamp();const o=[];for(let a=0;a<n;a+=3){const e=(t[a>>>2]>>>24-a%4*8&255)<<16|(t[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|t[a+2>>>2]>>>24-(a+2)%4*8&255;for(let t=0;t<4&&a+.75*t<n;t+=1)o.push(r.charAt(e>>>6*(3-t)&63))}const i=r.charAt(64);if(i)for(;o.length%4;)o.push(i);return o.join("")},parse(e){let t=e.length;const n=this._map;let r=this._reverseMap;if(!r){this._reverseMap=[],r=this._reverseMap;for(let e=0;e<n.length;e+=1)r[n.charCodeAt(e)]=e}const o=n.charAt(64);if(o){const n=e.indexOf(o);-1!==n&&(t=n)}return se(e,t,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},ue=[];for(let RO=0;RO<64;RO+=1)ue[RO]=4294967296*Math.abs(Math.sin(RO+1))|0;const ce=(e,t,n,r,o,i,a)=>{const s=e+(t&n|~t&r)+o+a;return(s<<i|s>>>32-i)+t},de=(e,t,n,r,o,i,a)=>{const s=e+(t&r|n&~r)+o+a;return(s<<i|s>>>32-i)+t},fe=(e,t,n,r,o,i,a)=>{const s=e+(t^n^r)+o+a;return(s<<i|s>>>32-i)+t},pe=(e,t,n,r,o,i,a)=>{const s=e+(n^(t|~r))+o+a;return(s<<i|s>>>32-i)+t};class he extends ne{_doReset(){this._hash=new Q([1732584193,4023233417,2562383102,271733878])}_doProcessBlock(e,t){const n=e;for(let k=0;k<16;k+=1){const r=t+k,o=e[r];n[r]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}const r=this._hash.words,o=n[t+0],i=n[t+1],a=n[t+2],s=n[t+3],l=n[t+4],u=n[t+5],c=n[t+6],d=n[t+7],f=n[t+8],p=n[t+9],h=n[t+10],m=n[t+11],g=n[t+12],v=n[t+13],y=n[t+14],b=n[t+15];let w=r[0],x=r[1],E=r[2],S=r[3];w=ce(w,x,E,S,o,7,ue[0]),S=ce(S,w,x,E,i,12,ue[1]),E=ce(E,S,w,x,a,17,ue[2]),x=ce(x,E,S,w,s,22,ue[3]),w=ce(w,x,E,S,l,7,ue[4]),S=ce(S,w,x,E,u,12,ue[5]),E=ce(E,S,w,x,c,17,ue[6]),x=ce(x,E,S,w,d,22,ue[7]),w=ce(w,x,E,S,f,7,ue[8]),S=ce(S,w,x,E,p,12,ue[9]),E=ce(E,S,w,x,h,17,ue[10]),x=ce(x,E,S,w,m,22,ue[11]),w=ce(w,x,E,S,g,7,ue[12]),S=ce(S,w,x,E,v,12,ue[13]),E=ce(E,S,w,x,y,17,ue[14]),x=ce(x,E,S,w,b,22,ue[15]),w=de(w,x,E,S,i,5,ue[16]),S=de(S,w,x,E,c,9,ue[17]),E=de(E,S,w,x,m,14,ue[18]),x=de(x,E,S,w,o,20,ue[19]),w=de(w,x,E,S,u,5,ue[20]),S=de(S,w,x,E,h,9,ue[21]),E=de(E,S,w,x,b,14,ue[22]),x=de(x,E,S,w,l,20,ue[23]),w=de(w,x,E,S,p,5,ue[24]),S=de(S,w,x,E,y,9,ue[25]),E=de(E,S,w,x,s,14,ue[26]),x=de(x,E,S,w,f,20,ue[27]),w=de(w,x,E,S,v,5,ue[28]),S=de(S,w,x,E,a,9,ue[29]),E=de(E,S,w,x,d,14,ue[30]),x=de(x,E,S,w,g,20,ue[31]),w=fe(w,x,E,S,u,4,ue[32]),S=fe(S,w,x,E,f,11,ue[33]),E=fe(E,S,w,x,m,16,ue[34]),x=fe(x,E,S,w,y,23,ue[35]),w=fe(w,x,E,S,i,4,ue[36]),S=fe(S,w,x,E,l,11,ue[37]),E=fe(E,S,w,x,d,16,ue[38]),x=fe(x,E,S,w,h,23,ue[39]),w=fe(w,x,E,S,v,4,ue[40]),S=fe(S,w,x,E,o,11,ue[41]),E=fe(E,S,w,x,s,16,ue[42]),x=fe(x,E,S,w,c,23,ue[43]),w=fe(w,x,E,S,p,4,ue[44]),S=fe(S,w,x,E,g,11,ue[45]),E=fe(E,S,w,x,b,16,ue[46]),x=fe(x,E,S,w,a,23,ue[47]),w=pe(w,x,E,S,o,6,ue[48]),S=pe(S,w,x,E,d,10,ue[49]),E=pe(E,S,w,x,y,15,ue[50]),x=pe(x,E,S,w,u,21,ue[51]),w=pe(w,x,E,S,g,6,ue[52]),S=pe(S,w,x,E,s,10,ue[53]),E=pe(E,S,w,x,h,15,ue[54]),x=pe(x,E,S,w,i,21,ue[55]),w=pe(w,x,E,S,f,6,ue[56]),S=pe(S,w,x,E,b,10,ue[57]),E=pe(E,S,w,x,c,15,ue[58]),x=pe(x,E,S,w,v,21,ue[59]),w=pe(w,x,E,S,l,6,ue[60]),S=pe(S,w,x,E,m,10,ue[61]),E=pe(E,S,w,x,a,15,ue[62]),x=pe(x,E,S,w,p,21,ue[63]),r[0]=r[0]+w|0,r[1]=r[1]+x|0,r[2]=r[2]+E|0,r[3]=r[3]+S|0}_doFinalize(){const e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32;const o=Math.floor(n/4294967296),i=n;t[15+(r+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t[14+(r+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),e.sigBytes=4*(t.length+1),this._process();const a=this._hash,s=a.words;for(let l=0;l<4;l+=1){const e=s[l];s[l]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8)}return a}clone(){const e=super.clone.call(this);return e._hash=this._hash.clone(),e}}const me=ne._createHelper(he),ge=ne._createHmacHelper(he);class ve extends q{constructor(e){super(),this.cfg=Object.assign(new q,{keySize:4,hasher:he,iterations:1},e)}compute(e,t){let n;const{cfg:r}=this,o=r.hasher.create(),i=Q.create(),a=i.words,{keySize:s,iterations:l}=r;for(;a.length<s;){n&&o.update(n),n=o.update(e).finalize(t),o.reset();for(let e=1;e<l;e+=1)n=o.finalize(n),o.reset();i.concat(n)}return i.sigBytes=4*s,i}}class ye extends te{constructor(e,t,n){super(),this.cfg=Object.assign(new q,n),this._xformMode=e,this._key=t,this.reset()}static createEncryptor(e,t){return this.create(this._ENC_XFORM_MODE,e,t)}static createDecryptor(e,t){return this.create(this._DEC_XFORM_MODE,e,t)}static _createHelper(e){const t=e=>"string"==typeof e?Re:_e;return{encrypt:(n,r,o)=>t(r).encrypt(e,n,r,o),decrypt:(n,r,o)=>t(r).decrypt(e,n,r,o)}}reset(){super.reset.call(this),this._doReset()}process(e){return this._append(e),this._process()}finalize(e){e&&this._append(e);return this._doFinalize()}}ye._ENC_XFORM_MODE=1,ye._DEC_XFORM_MODE=2,ye.keySize=4,ye.ivSize=4;class be extends ye{constructor(...e){super(...e),this.blockSize=1}_doFinalize(){return this._process(!0)}}class we extends q{constructor(e,t){super(),this._cipher=e,this._iv=t}static createEncryptor(e,t){return this.Encryptor.create(e,t)}static createDecryptor(e,t){return this.Decryptor.create(e,t)}}function xe(e,t,n){const r=e;let o;const i=this._iv;i?(o=i,this._iv=void 0):o=this._prevBlock;for(let a=0;a<n;a+=1)r[t+a]^=o[a]}class Ee extends we{}Ee.Encryptor=class extends Ee{processBlock(e,t){const n=this._cipher,{blockSize:r}=n;xe.call(this,e,t,r),n.encryptBlock(e,t),this._prevBlock=e.slice(t,t+r)}},Ee.Decryptor=class extends Ee{processBlock(e,t){const n=this._cipher,{blockSize:r}=n,o=e.slice(t,t+r);n.decryptBlock(e,t),xe.call(this,e,t,r),this._prevBlock=o}};const Se={pad(e,t){const n=4*t,r=n-e.sigBytes%n,o=r<<24|r<<16|r<<8|r,i=[];for(let s=0;s<r;s+=4)i.push(o);const a=Q.create(i,r);e.concat(a)},unpad(e){const t=e,n=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=n}};class ke extends ye{constructor(e,t,n){super(e,t,Object.assign({mode:Ee,padding:Se},n)),this.blockSize=4}reset(){let e;super.reset.call(this);const{cfg:t}=this,{iv:n,mode:r}=t;this._xformMode===this.constructor._ENC_XFORM_MODE?e=r.createEncryptor:(e=r.createDecryptor,this._minBufferSize=1),this._mode=e.call(r,this,n&&n.words),this._mode.__creator=e}_doProcessBlock(e,t){this._mode.processBlock(e,t)}_doFinalize(){let e;const{padding:t}=this.cfg;return this._xformMode===this.constructor._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e}}class Ce extends q{constructor(e){super(),this.mixIn(e)}toString(e){return(e||this.formatter).stringify(this)}}const Pe={stringify(e){let t;const{ciphertext:n,salt:r}=e;return t=r?Q.create([1398893684,1701076831]).concat(r).concat(n):n,t.toString(le)},parse(e){let t;const n=le.parse(e),r=n.words;return 1398893684===r[0]&&1701076831===r[1]&&(t=Q.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),Ce.create({ciphertext:n,salt:t})}};class _e extends q{static encrypt(e,t,n,r){const o=Object.assign(new q,this.cfg,r),i=e.createEncryptor(n,o),a=i.finalize(t),s=i.cfg;return Ce.create({ciphertext:a,key:n,iv:s.iv,algorithm:e,mode:s.mode,padding:s.padding,blockSize:i.blockSize,formatter:o.format})}static decrypt(e,t,n,r){let o=t;const i=Object.assign(new q,this.cfg,r);o=this._parse(o,i.format);return e.createDecryptor(n,i).finalize(o.ciphertext)}static _parse(e,t){return"string"==typeof e?t.parse(e,this):e}}_e.cfg=Object.assign(new q,{format:Pe});const Te={execute(e,t,n,r,o){let i,a=r;a||(a=Q.random(8)),i=o?ve.create({keySize:t+n,hasher:o}).compute(e,a):ve.create({keySize:t+n}).compute(e,a);const s=Q.create(i.words.slice(t),4*n);return i.sigBytes=4*t,Ce.create({key:i,iv:s,salt:a})}};class Re extends _e{static encrypt(e,t,n,r){const o=Object.assign(new q,this.cfg,r),i=o.kdf.execute(n,e.keySize,e.ivSize,o.salt,o.hasher);o.iv=i.iv;const a=_e.encrypt.call(this,e,t,i.key,o);return a.mixIn(i),a}static decrypt(e,t,n,r){let o=t;const i=Object.assign(new q,this.cfg,r);o=this._parse(o,i.format);const a=i.kdf.execute(n,e.keySize,e.ivSize,o.salt,i.hasher);i.iv=a.iv;return _e.decrypt.call(this,e,o,a.key,i)}}Re.cfg=Object.assign(_e.cfg,{kdf:Te});const De=e=>e<<8&4278255360|e>>>8&16711935,Ae={stringify(e){const{words:t,sigBytes:n}=e,r=[];for(let o=0;o<n;o+=2){const e=t[o>>>2]>>>16-o%4*8&65535;r.push(String.fromCharCode(e))}return r.join("")},parse(e){const t=e.length,n=[];for(let r=0;r<t;r+=1)n[r>>>1]|=e.charCodeAt(r)<<16-r%2*16;return Q.create(n,2*t)}},Me=Ae,Le={stringify(e){const{words:t,sigBytes:n}=e,r=[];for(let o=0;o<n;o+=2){const e=De(t[o>>>2]>>>16-o%4*8&65535);r.push(String.fromCharCode(e))}return r.join("")},parse(e){const t=e.length,n=[];for(let r=0;r<t;r+=1)n[r>>>1]|=De(e.charCodeAt(r)<<16-r%2*16);return Q.create(n,2*t)}},Oe={stringify(e,t=!0){const{words:n,sigBytes:r}=e,o=t?this._safeMap:this._map;e.clamp();const i=[];for(let s=0;s<r;s+=3){const e=(n[s>>>2]>>>24-s%4*8&255)<<16|(n[s+1>>>2]>>>24-(s+1)%4*8&255)<<8|n[s+2>>>2]>>>24-(s+2)%4*8&255;for(let t=0;t<4&&s+.75*t<r;t+=1)i.push(o.charAt(e>>>6*(3-t)&63))}const a=o.charAt(64);if(a)for(;i.length%4;)i.push(a);return i.join("")},parse(e,t=!0){let n=e.length;const r=t?this._safeMap:this._map;let o=this._reverseMap;if(!o){this._reverseMap=[],o=this._reverseMap;for(let e=0;e<r.length;e+=1)o[r.charCodeAt(e)]=e}const i=r.charAt(64);if(i){const t=e.indexOf(i);-1!==t&&(n=t)}return se(e,n,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safeMap:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"},Fe=[];class Ie extends ne{_doReset(){this._hash=new Q([1732584193,4023233417,2562383102,271733878,3285377520])}_doProcessBlock(e,t){const n=this._hash.words;let r=n[0],o=n[1],i=n[2],a=n[3],s=n[4];for(let l=0;l<80;l+=1){if(l<16)Fe[l]=0|e[t+l];else{const e=Fe[l-3]^Fe[l-8]^Fe[l-14]^Fe[l-16];Fe[l]=e<<1|e>>>31}let n=(r<<5|r>>>27)+s+Fe[l];n+=l<20?1518500249+(o&i|~o&a):l<40?1859775393+(o^i^a):l<60?(o&i|o&a|i&a)-1894007588:(o^i^a)-899497514,s=a,a=i,i=o<<30|o>>>2,o=r,r=n}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+i|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0}_doFinalize(){const e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash}clone(){const e=super.clone.call(this);return e._hash=this._hash.clone(),e}}const Ne=ne._createHelper(Ie),ze=ne._createHmacHelper(Ie),Be=[],Ve=[],je=e=>{const t=Math.sqrt(e);for(let n=2;n<=t;n+=1)if(!(e%n))return!1;return!0},He=e=>4294967296*(e-(0|e))|0;let Ue=2,We=0;for(;We<64;)je(Ue)&&(We<8&&(Be[We]=He(Ue**.5)),Ve[We]=He(Ue**(1/3)),We+=1),Ue+=1;const $e=[];class Ke extends ne{_doReset(){this._hash=new Q(Be.slice(0))}_doProcessBlock(e,t){const n=this._hash.words;let r=n[0],o=n[1],i=n[2],a=n[3],s=n[4],l=n[5],u=n[6],c=n[7];for(let d=0;d<64;d+=1){if(d<16)$e[d]=0|e[t+d];else{const e=$e[d-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,n=$e[d-2],r=(n<<15|n>>>17)^(n<<13|n>>>19)^n>>>10;$e[d]=t+$e[d-7]+r+$e[d-16]}const n=r&o^r&i^o&i,f=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),p=c+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&l^~s&u)+Ve[d]+$e[d];c=u,u=l,l=s,s=a+p|0,a=i,i=o,o=r,r=p+(f+n)|0}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+i|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+l|0,n[6]=n[6]+u|0,n[7]=n[7]+c|0}_doFinalize(){const e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash}clone(){const e=super.clone.call(this);return e._hash=this._hash.clone(),e}}const Xe=ne._createHelper(Ke),Ye=ne._createHmacHelper(Ke);class qe extends Ke{_doReset(){this._hash=new Q([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])}_doFinalize(){const e=super._doFinalize.call(this);return e.sigBytes-=4,e}}const Qe=Ke._createHelper(qe),Ge=Ke._createHmacHelper(qe),Ze=[new ie(1116352408,3609767458),new ie(1899447441,602891725),new ie(3049323471,3964484399),new ie(3921009573,2173295548),new ie(961987163,4081628472),new ie(1508970993,3053834265),new ie(2453635748,2937671579),new ie(2870763221,3664609560),new ie(3624381080,2734883394),new ie(310598401,1164996542),new ie(607225278,1323610764),new ie(1426881987,3590304994),new ie(1925078388,4068182383),new ie(2162078206,991336113),new ie(2614888103,633803317),new ie(3248222580,3479774868),new ie(3835390401,2666613458),new ie(4022224774,944711139),new ie(264347078,2341262773),new ie(604807628,2007800933),new ie(770255983,1495990901),new ie(1249150122,1856431235),new ie(1555081692,3175218132),new ie(1996064986,2198950837),new ie(2554220882,3999719339),new ie(2821834349,766784016),new ie(2952996808,2566594879),new ie(3210313671,3203337956),new ie(3336571891,1034457026),new ie(3584528711,2466948901),new ie(113926993,3758326383),new ie(338241895,168717936),new ie(666307205,1188179964),new ie(773529912,1546045734),new ie(1294757372,1522805485),new ie(1396182291,2643833823),new ie(1695183700,2343527390),new ie(1986661051,1014477480),new ie(2177026350,1206759142),new ie(2456956037,344077627),new ie(2730485921,1290863460),new ie(2820302411,3158454273),new ie(3259730800,3505952657),new ie(3345764771,106217008),new ie(3516065817,3606008344),new ie(3600352804,1432725776),new ie(4094571909,1467031594),new ie(275423344,851169720),new ie(430227734,3100823752),new ie(506948616,1363258195),new ie(659060556,3750685593),new ie(883997877,3785050280),new ie(958139571,3318307427),new ie(1322822218,3812723403),new ie(1537002063,2003034995),new ie(1747873779,3602036899),new ie(1955562222,1575990012),new ie(2024104815,1125592928),new ie(2227730452,2716904306),new ie(2361852424,442776044),new ie(2428436474,593698344),new ie(2756734187,3733110249),new ie(3204031479,2999351573),new ie(3329325298,3815920427),new ie(3391569614,3928383900),new ie(3515267271,566280711),new ie(3940187606,3454069534),new ie(4118630271,4000239992),new ie(116418474,1914138554),new ie(174292421,2731055270),new ie(289380356,3203993006),new ie(460393269,320620315),new ie(685471733,587496836),new ie(852142971,1086792851),new ie(1017036298,365543100),new ie(1126000580,2618297676),new ie(1288033470,3409855158),new ie(1501505948,4234509866),new ie(1607167915,987167468),new ie(1816402316,1246189591)],Je=[];for(let RO=0;RO<80;RO+=1)Je[RO]=new ie;class et extends ne{constructor(){super(),this.blockSize=32}_doReset(){this._hash=new ae([new ie(1779033703,4089235720),new ie(3144134277,2227873595),new ie(1013904242,4271175723),new ie(2773480762,1595750129),new ie(1359893119,2917565137),new ie(2600822924,725511199),new ie(528734635,4215389547),new ie(1541459225,327033209)])}_doProcessBlock(e,t){const n=this._hash.words,r=n[0],o=n[1],i=n[2],a=n[3],s=n[4],l=n[5],u=n[6],c=n[7],d=r.high;let f=r.low;const p=o.high;let h=o.low;const m=i.high;let g=i.low;const v=a.high;let y=a.low;const b=s.high;let w=s.low;const x=l.high;let E=l.low;const S=u.high;let k=u.low;const C=c.high;let P=c.low,_=d,T=f,R=p,D=h,A=m,M=g,L=v,O=y,F=b,I=w,N=x,z=E,B=S,V=k,j=C,H=P;for(let U=0;U<80;U+=1){let n,r;const o=Je[U];if(U<16)o.high=0|e[t+2*U],r=o.high,o.low=0|e[t+2*U+1],n=o.low;else{const e=Je[U-15],t=e.high,i=e.low,a=(t>>>1|i<<31)^(t>>>8|i<<24)^t>>>7,s=(i>>>1|t<<31)^(i>>>8|t<<24)^(i>>>7|t<<25),l=Je[U-2],u=l.high,c=l.low,d=(u>>>19|c<<13)^(u<<3|c>>>29)^u>>>6,f=(c>>>19|u<<13)^(c<<3|u>>>29)^(c>>>6|u<<26),p=Je[U-7],h=p.high,m=p.low,g=Je[U-16],v=g.high,y=g.low;n=s+m,r=a+h+(n>>>0<s>>>0?1:0),n+=f,r=r+d+(n>>>0<f>>>0?1:0),n+=y,r=r+v+(n>>>0<y>>>0?1:0),o.high=r,o.low=n}const i=F&N^~F&B,a=I&z^~I&V,s=_&R^_&A^R&A,l=T&D^T&M^D&M,u=(_>>>28|T<<4)^(_<<30|T>>>2)^(_<<25|T>>>7),c=(T>>>28|_<<4)^(T<<30|_>>>2)^(T<<25|_>>>7),d=(F>>>14|I<<18)^(F>>>18|I<<14)^(F<<23|I>>>9),f=(I>>>14|F<<18)^(I>>>18|F<<14)^(I<<23|F>>>9),p=Ze[U],h=p.high,m=p.low;let g=H+f,v=j+d+(g>>>0<H>>>0?1:0);g+=a,v=v+i+(g>>>0<a>>>0?1:0),g+=m,v=v+h+(g>>>0<m>>>0?1:0),g+=n,v=v+r+(g>>>0<n>>>0?1:0);const y=c+l;j=B,H=V,B=N,V=z,N=F,z=I,I=O+g|0,F=L+v+(I>>>0<O>>>0?1:0)|0,L=A,O=M,A=R,M=D,R=_,D=T,T=g+y|0,_=v+(u+s+(y>>>0<c>>>0?1:0))+(T>>>0<g>>>0?1:0)|0}r.low=f+T,f=r.low,r.high=d+_+(f>>>0<T>>>0?1:0),o.low=h+D,h=o.low,o.high=p+R+(h>>>0<D>>>0?1:0),i.low=g+M,g=i.low,i.high=m+A+(g>>>0<M>>>0?1:0),a.low=y+O,y=a.low,a.high=v+L+(y>>>0<O>>>0?1:0),s.low=w+I,w=s.low,s.high=b+F+(w>>>0<I>>>0?1:0),l.low=E+z,E=l.low,l.high=x+N+(E>>>0<z>>>0?1:0),u.low=k+V,k=u.low,u.high=S+B+(k>>>0<V>>>0?1:0),c.low=P+H,P=c.low,c.high=C+j+(P>>>0<H>>>0?1:0)}_doFinalize(){const e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(r+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process();return this._hash.toX32()}clone(){const e=super.clone.call(this);return e._hash=this._hash.clone(),e}}const tt=ne._createHelper(et),nt=ne._createHmacHelper(et);class rt extends et{_doReset(){this._hash=new ae([new ie(3418070365,3238371032),new ie(1654270250,914150663),new ie(2438529370,812702999),new ie(355462360,4144912697),new ie(1731405415,4290775857),new ie(2394180231,1750603025),new ie(3675008525,1694076839),new ie(1203062813,3204075428)])}_doFinalize(){const e=super._doFinalize.call(this);return e.sigBytes-=16,e}}const ot=et._createHelper(rt),it=et._createHmacHelper(rt),at=[],st=[],lt=[];let ut=1,ct=0;for(let RO=0;RO<24;RO+=1){at[ut+5*ct]=(RO+1)*(RO+2)/2%64;const e=(2*ut+3*ct)%5;ut=ct%5,ct=e}for(let RO=0;RO<5;RO+=1)for(let e=0;e<5;e+=1)st[RO+5*e]=e+(2*RO+3*e)%5*5;let dt=1;for(let RO=0;RO<24;RO+=1){let e=0,t=0;for(let n=0;n<7;n+=1){if(1&dt){const r=(1<<n)-1;r<32?t^=1<<r:e^=1<<r-32}128&dt?dt=dt<<1^113:dt<<=1}lt[RO]=ie.create(e,t)}const ft=[];for(let RO=0;RO<25;RO+=1)ft[RO]=ie.create();class pt extends ne{constructor(e){super(Object.assign({outputLength:512},e))}_doReset(){this._state=[];const e=this._state;for(let t=0;t<25;t+=1)e[t]=new ie;this.blockSize=(1600-2*this.cfg.outputLength)/32}_doProcessBlock(e,t){const n=this._state,r=this.blockSize/2;for(let o=0;o<r;o+=1){let r=e[t+2*o],i=e[t+2*o+1];r=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),i=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8);const a=n[o];a.high^=i,a.low^=r}for(let o=0;o<24;o+=1){for(let o=0;o<5;o+=1){let e=0,t=0;for(let i=0;i<5;i+=1){const r=n[o+5*i];e^=r.high,t^=r.low}const r=ft[o];r.high=e,r.low=t}for(let o=0;o<5;o+=1){const e=ft[(o+4)%5],t=ft[(o+1)%5],r=t.high,i=t.low,a=e.high^(r<<1|i>>>31),s=e.low^(i<<1|r>>>31);for(let l=0;l<5;l+=1){const e=n[o+5*l];e.high^=a,e.low^=s}}for(let o=1;o<25;o+=1){let e,t;const r=n[o],i=r.high,a=r.low,s=at[o];s<32?(e=i<<s|a>>>32-s,t=a<<s|i>>>32-s):(e=a<<s-32|i>>>64-s,t=i<<s-32|a>>>64-s);const l=ft[st[o]];l.high=e,l.low=t}const e=ft[0],t=n[0];e.high=t.high,e.low=t.low;for(let o=0;o<5;o+=1)for(let e=0;e<5;e+=1){const t=o+5*e,r=n[t],i=ft[t],a=ft[(o+1)%5+5*e],s=ft[(o+2)%5+5*e];r.high=i.high^~a.high&s.high,r.low=i.low^~a.low&s.low}const r=n[0],i=lt[o];r.high^=i.high,r.low^=i.low}}_doFinalize(){const e=this._data,t=e.words,n=8*e.sigBytes,r=32*this.blockSize;t[n>>>5]|=1<<24-n%32,t[(Math.ceil((n+1)/r)*r>>>5)-1]|=128,e.sigBytes=4*t.length,this._process();const o=this._state,i=this.cfg.outputLength/8,a=i/8,s=[];for(let l=0;l<a;l+=1){const e=o[l];let t=e.high,n=e.low;t=16711935&(t<<8|t>>>24)|4278255360&(t<<24|t>>>8),n=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),s.push(n),s.push(t)}return new Q(s,i)}clone(){const e=super.clone.call(this);e._state=this._state.slice(0);const t=e._state;for(let n=0;n<25;n+=1)t[n]=t[n].clone();return e}}const ht=ne._createHelper(pt),mt=ne._createHmacHelper(pt),gt=Q.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),vt=Q.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),yt=Q.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),bt=Q.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),wt=Q.create([0,1518500249,1859775393,2400959708,2840853838]),xt=Q.create([1352829926,1548603684,1836072691,2053994217,0]),Et=(e,t,n)=>e^t^n,St=(e,t,n)=>e&t|~e&n,kt=(e,t,n)=>(e|~t)^n,Ct=(e,t,n)=>e&n|t&~n,Pt=(e,t,n)=>e^(t|~n),_t=(e,t)=>e<<t|e>>>32-t;class Tt extends ne{_doReset(){this._hash=Q.create([1732584193,4023233417,2562383102,271733878,3285377520])}_doProcessBlock(e,t){const n=e;for(let x=0;x<16;x+=1){const e=t+x,r=n[e];n[e]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}const r=this._hash.words,o=wt.words,i=xt.words,a=gt.words,s=vt.words,l=yt.words,u=bt.words;let c,d=r[0],f=r[1],p=r[2],h=r[3],m=r[4],g=r[0],v=r[1],y=r[2],b=r[3],w=r[4];for(let x=0;x<80;x+=1)c=d+n[t+a[x]]|0,c+=x<16?Et(f,p,h)+o[0]:x<32?St(f,p,h)+o[1]:x<48?kt(f,p,h)+o[2]:x<64?Ct(f,p,h)+o[3]:Pt(f,p,h)+o[4],c|=0,c=_t(c,l[x]),c=c+m|0,d=m,m=h,h=_t(p,10),p=f,f=c,c=g+n[t+s[x]]|0,c+=x<16?Pt(v,y,b)+i[0]:x<32?Ct(v,y,b)+i[1]:x<48?kt(v,y,b)+i[2]:x<64?St(v,y,b)+i[3]:Et(v,y,b)+i[4],c|=0,c=_t(c,u[x]),c=c+w|0,g=w,w=b,b=_t(y,10),y=v,v=c;c=r[1]+p+b|0,r[1]=r[2]+h+w|0,r[2]=r[3]+m+g|0,r[3]=r[4]+d+v|0,r[4]=r[0]+f+y|0,r[0]=c}_doFinalize(){const e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process();const o=this._hash,i=o.words;for(let a=0;a<5;a+=1){const e=i[a];i[a]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8)}return o}clone(){const e=super.clone.call(this);return e._hash=this._hash.clone(),e}}const Rt=ne._createHelper(Tt),Dt=ne._createHmacHelper(Tt);class At extends q{constructor(e){super(),this.cfg=Object.assign(new q,{keySize:4,hasher:Ie,iterations:1},e)}compute(e,t){const{cfg:n}=this,r=re.create(n.hasher,e),o=Q.create(),i=Q.create([1]),a=o.words,s=i.words,{keySize:l,iterations:u}=n;for(;a.length<l;){const e=r.update(t).finalize(i);r.reset();const n=e.words,a=n.length;let l=e;for(let t=1;t<u;t+=1){l=r.finalize(l),r.reset();const e=l.words;for(let t=0;t<a;t+=1)n[t]^=e[t]}o.concat(e),s[0]+=1}return o.sigBytes=4*l,o}}const Mt=[],Lt=[],Ot=[],Ft=[],It=[],Nt=[],zt=[],Bt=[],Vt=[],jt=[],Ht=[];for(let RO=0;RO<256;RO+=1)Ht[RO]=RO<128?RO<<1:RO<<1^283;let Ut=0,Wt=0;for(let RO=0;RO<256;RO+=1){let e=Wt^Wt<<1^Wt<<2^Wt<<3^Wt<<4;e=e>>>8^255&e^99,Mt[Ut]=e,Lt[e]=Ut;const t=Ht[Ut],n=Ht[t],r=Ht[n];let o=257*Ht[e]^16843008*e;Ot[Ut]=o<<24|o>>>8,Ft[Ut]=o<<16|o>>>16,It[Ut]=o<<8|o>>>24,Nt[Ut]=o,o=16843009*r^65537*n^257*t^16843008*Ut,zt[e]=o<<24|o>>>8,Bt[e]=o<<16|o>>>16,Vt[e]=o<<8|o>>>24,jt[e]=o,Ut?(Ut=t^Ht[Ht[Ht[r^t]]],Wt^=Ht[Ht[Wt]]):(Wt=1,Ut=Wt)}const $t=[0,1,2,4,8,16,32,64,128,27,54];class Kt extends ke{_doReset(){let e;if(this._nRounds&&this._keyPriorReset===this._key)return;this._keyPriorReset=this._key;const t=this._keyPriorReset,n=t.words,r=t.sigBytes/4;this._nRounds=r+6;const o=4*(this._nRounds+1);this._keySchedule=[];const i=this._keySchedule;for(let s=0;s<o;s+=1)s<r?i[s]=n[s]:(e=i[s-1],s%r?r>6&&s%r==4&&(e=Mt[e>>>24]<<24|Mt[e>>>16&255]<<16|Mt[e>>>8&255]<<8|Mt[255&e]):(e=e<<8|e>>>24,e=Mt[e>>>24]<<24|Mt[e>>>16&255]<<16|Mt[e>>>8&255]<<8|Mt[255&e],e^=$t[s/r|0]<<24),i[s]=i[s-r]^e);this._invKeySchedule=[];const a=this._invKeySchedule;for(let s=0;s<o;s+=1){const t=o-s;e=s%4?i[t]:i[t-4],a[s]=s<4||t<=4?e:zt[Mt[e>>>24]]^Bt[Mt[e>>>16&255]]^Vt[Mt[e>>>8&255]]^jt[Mt[255&e]]}}encryptBlock(e,t){this._doCryptBlock(e,t,this._keySchedule,Ot,Ft,It,Nt,Mt)}decryptBlock(e,t){const n=e;let r=n[t+1];n[t+1]=n[t+3],n[t+3]=r,this._doCryptBlock(n,t,this._invKeySchedule,zt,Bt,Vt,jt,Lt),r=n[t+1],n[t+1]=n[t+3],n[t+3]=r}_doCryptBlock(e,t,n,r,o,i,a,s){const l=e,u=this._nRounds;let c=l[t]^n[0],d=l[t+1]^n[1],f=l[t+2]^n[2],p=l[t+3]^n[3],h=4;for(let b=1;b<u;b+=1){const e=r[c>>>24]^o[d>>>16&255]^i[f>>>8&255]^a[255&p]^n[h];h+=1;const t=r[d>>>24]^o[f>>>16&255]^i[p>>>8&255]^a[255&c]^n[h];h+=1;const s=r[f>>>24]^o[p>>>16&255]^i[c>>>8&255]^a[255&d]^n[h];h+=1;const l=r[p>>>24]^o[c>>>16&255]^i[d>>>8&255]^a[255&f]^n[h];h+=1,c=e,d=t,f=s,p=l}const m=(s[c>>>24]<<24|s[d>>>16&255]<<16|s[f>>>8&255]<<8|s[255&p])^n[h];h+=1;const g=(s[d>>>24]<<24|s[f>>>16&255]<<16|s[p>>>8&255]<<8|s[255&c])^n[h];h+=1;const v=(s[f>>>24]<<24|s[p>>>16&255]<<16|s[c>>>8&255]<<8|s[255&d])^n[h];h+=1;const y=(s[p>>>24]<<24|s[c>>>16&255]<<16|s[d>>>8&255]<<8|s[255&f])^n[h];h+=1,l[t]=m,l[t+1]=g,l[t+2]=v,l[t+3]=y}}Kt.keySize=8;const Xt=ke._createHelper(Kt),Yt=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],qt=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],Qt=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],Gt=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],Zt=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679];function Jt(e,t){const n=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=n,this._lBlock^=n<<e}function en(e,t){const n=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=n,this._rBlock^=n<<e}class tn extends ke{constructor(e,t,n){super(e,t,n),this.blockSize=2}_doReset(){const e=this._key.words,t=[];for(let o=0;o<56;o+=1){const n=Yt[o]-1;t[o]=e[n>>>5]>>>31-n%32&1}this._subKeys=[];const n=this._subKeys;for(let o=0;o<16;o+=1){n[o]=[];const e=n[o],r=Qt[o];for(let n=0;n<24;n+=1)e[n/6|0]|=t[(qt[n]-1+r)%28]<<31-n%6,e[4+(n/6|0)]|=t[28+(qt[n+24]-1+r)%28]<<31-n%6;e[0]=e[0]<<1|e[0]>>>31;for(let t=1;t<7;t+=1)e[t]>>>=4*(t-1)+3;e[7]=e[7]<<5|e[7]>>>27}this._invSubKeys=[];const r=this._invSubKeys;for(let o=0;o<16;o+=1)r[o]=n[15-o]}encryptBlock(e,t){this._doCryptBlock(e,t,this._subKeys)}decryptBlock(e,t){this._doCryptBlock(e,t,this._invSubKeys)}_doCryptBlock(e,t,n){const r=e;this._lBlock=e[t],this._rBlock=e[t+1],Jt.call(this,4,252645135),Jt.call(this,16,65535),en.call(this,2,858993459),en.call(this,8,16711935),Jt.call(this,1,1431655765);for(let i=0;i<16;i+=1){const e=n[i],t=this._lBlock,r=this._rBlock;let o=0;for(let n=0;n<8;n+=1)o|=Gt[n][((r^e[n])&Zt[n])>>>0];this._lBlock=r,this._rBlock=t^o}const o=this._lBlock;this._lBlock=this._rBlock,this._rBlock=o,Jt.call(this,1,1431655765),en.call(this,8,16711935),en.call(this,2,858993459),Jt.call(this,16,65535),Jt.call(this,4,252645135),r[t]=this._lBlock,r[t+1]=this._rBlock}}tn.keySize=2,tn.ivSize=2;const nn=ke._createHelper(tn);class rn extends ke{_doReset(){const e=this._key.words;if(2!==e.length&&4!==e.length&&e.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");const t=e.slice(0,2),n=e.length<4?e.slice(0,2):e.slice(2,4),r=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=tn.createEncryptor(Q.create(t)),this._des2=tn.createEncryptor(Q.create(n)),this._des3=tn.createEncryptor(Q.create(r))}encryptBlock(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)}decryptBlock(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)}}rn.keySize=6,rn.ivSize=2;const on=ke._createHelper(rn),an=[],sn=[],ln=[];function un(){const e=this._X,t=this._C;for(let n=0;n<8;n+=1)sn[n]=t[n];t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<sn[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<sn[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<sn[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<sn[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<sn[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<sn[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<sn[6]>>>0?1:0)|0,this._b=t[7]>>>0<sn[7]>>>0?1:0;for(let n=0;n<8;n+=1){const r=e[n]+t[n],o=65535&r,i=r>>>16,a=((o*o>>>17)+o*i>>>15)+i*i,s=((4294901760&r)*r|0)+((65535&r)*r|0);ln[n]=a^s}e[0]=ln[0]+(ln[7]<<16|ln[7]>>>16)+(ln[6]<<16|ln[6]>>>16)|0,e[1]=ln[1]+(ln[0]<<8|ln[0]>>>24)+ln[7]|0,e[2]=ln[2]+(ln[1]<<16|ln[1]>>>16)+(ln[0]<<16|ln[0]>>>16)|0,e[3]=ln[3]+(ln[2]<<8|ln[2]>>>24)+ln[1]|0,e[4]=ln[4]+(ln[3]<<16|ln[3]>>>16)+(ln[2]<<16|ln[2]>>>16)|0,e[5]=ln[5]+(ln[4]<<8|ln[4]>>>24)+ln[3]|0,e[6]=ln[6]+(ln[5]<<16|ln[5]>>>16)+(ln[4]<<16|ln[4]>>>16)|0,e[7]=ln[7]+(ln[6]<<8|ln[6]>>>24)+ln[5]|0}class cn extends be{constructor(...e){super(...e),this.blockSize=4,this.ivSize=2}_doReset(){const e=this._key.words,{iv:t}=this.cfg;for(let o=0;o<4;o+=1)e[o]=16711935&(e[o]<<8|e[o]>>>24)|4278255360&(e[o]<<24|e[o]>>>8);this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16];const n=this._X;this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];const r=this._C;this._b=0;for(let o=0;o<4;o+=1)un.call(this);for(let o=0;o<8;o+=1)r[o]^=n[o+4&7];if(t){const e=t.words,n=e[0],o=e[1],i=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),a=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),s=i>>>16|4294901760&a,l=a<<16|65535&i;r[0]^=i,r[1]^=s,r[2]^=a,r[3]^=l,r[4]^=i,r[5]^=s,r[6]^=a,r[7]^=l;for(let t=0;t<4;t+=1)un.call(this)}}_doProcessBlock(e,t){const n=e,r=this._X;un.call(this),an[0]=r[0]^r[5]>>>16^r[3]<<16,an[1]=r[2]^r[7]>>>16^r[5]<<16,an[2]=r[4]^r[1]>>>16^r[7]<<16,an[3]=r[6]^r[3]>>>16^r[1]<<16;for(let o=0;o<4;o+=1)an[o]=16711935&(an[o]<<8|an[o]>>>24)|4278255360&(an[o]<<24|an[o]>>>8),n[t+o]^=an[o]}}const dn=be._createHelper(cn),fn=[],pn=[],hn=[];function mn(){const e=this._X,t=this._C;for(let n=0;n<8;n+=1)pn[n]=t[n];t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<pn[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<pn[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<pn[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<pn[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<pn[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<pn[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<pn[6]>>>0?1:0)|0,this._b=t[7]>>>0<pn[7]>>>0?1:0;for(let n=0;n<8;n+=1){const r=e[n]+t[n],o=65535&r,i=r>>>16,a=((o*o>>>17)+o*i>>>15)+i*i,s=((4294901760&r)*r|0)+((65535&r)*r|0);hn[n]=a^s}e[0]=hn[0]+(hn[7]<<16|hn[7]>>>16)+(hn[6]<<16|hn[6]>>>16)|0,e[1]=hn[1]+(hn[0]<<8|hn[0]>>>24)+hn[7]|0,e[2]=hn[2]+(hn[1]<<16|hn[1]>>>16)+(hn[0]<<16|hn[0]>>>16)|0,e[3]=hn[3]+(hn[2]<<8|hn[2]>>>24)+hn[1]|0,e[4]=hn[4]+(hn[3]<<16|hn[3]>>>16)+(hn[2]<<16|hn[2]>>>16)|0,e[5]=hn[5]+(hn[4]<<8|hn[4]>>>24)+hn[3]|0,e[6]=hn[6]+(hn[5]<<16|hn[5]>>>16)+(hn[4]<<16|hn[4]>>>16)|0,e[7]=hn[7]+(hn[6]<<8|hn[6]>>>24)+hn[5]|0}class gn extends be{constructor(...e){super(...e),this.blockSize=4,this.ivSize=2}_doReset(){const e=this._key.words,{iv:t}=this.cfg;this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16];const n=this._X;this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];const r=this._C;this._b=0;for(let o=0;o<4;o+=1)mn.call(this);for(let o=0;o<8;o+=1)r[o]^=n[o+4&7];if(t){const e=t.words,n=e[0],o=e[1],i=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),a=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),s=i>>>16|4294901760&a,l=a<<16|65535&i;r[0]^=i,r[1]^=s,r[2]^=a,r[3]^=l,r[4]^=i,r[5]^=s,r[6]^=a,r[7]^=l;for(let t=0;t<4;t+=1)mn.call(this)}}_doProcessBlock(e,t){const n=e,r=this._X;mn.call(this),fn[0]=r[0]^r[5]>>>16^r[3]<<16,fn[1]=r[2]^r[7]>>>16^r[5]<<16,fn[2]=r[4]^r[1]>>>16^r[7]<<16,fn[3]=r[6]^r[3]>>>16^r[1]<<16;for(let o=0;o<4;o+=1)fn[o]=16711935&(fn[o]<<8|fn[o]>>>24)|4278255360&(fn[o]<<24|fn[o]>>>8),n[t+o]^=fn[o]}}const vn=be._createHelper(gn);function yn(){const e=this._S;let t=this._i,n=this._j,r=0;for(let o=0;o<4;o+=1){t=(t+1)%256,n=(n+e[t])%256;const i=e[t];e[t]=e[n],e[n]=i,r|=e[(e[t]+e[n])%256]<<24-8*o}return this._i=t,this._j=n,r}class bn extends be{_doReset(){const e=this._key,t=e.words,n=e.sigBytes;this._S=[];const r=this._S;for(let o=0;o<256;o+=1)r[o]=o;for(let o=0,i=0;o<256;o+=1){const e=o%n,a=t[e>>>2]>>>24-e%4*8&255;i=(i+r[o]+a)%256;const s=r[o];r[o]=r[i],r[i]=s}this._j=0,this._i=this._j}_doProcessBlock(e,t){e[t]^=yn.call(this)}}bn.keySize=8,bn.ivSize=0;const wn=be._createHelper(bn);class xn extends bn{constructor(...e){super(...e),Object.assign(this.cfg,{drop:192})}_doReset(){super._doReset.call(this);for(let e=this.cfg.drop;e>0;e-=1)yn.call(this)}}const En=be._createHelper(xn),Sn=16,kn=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],Cn=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]],Pn={pbox:[],sbox:[]};function _n(e,t){const n=t>>24&255,r=t>>16&255,o=t>>8&255,i=255&t;let a=e.sbox[0][n]+e.sbox[1][r];return a^=e.sbox[2][o],a+=e.sbox[3][i],a}function Tn(e,t,n){let r,o=t,i=n;for(let a=0;a<Sn;++a)o^=e.pbox[a],i=_n(e,o)^i,r=o,o=i,i=r;return r=o,o=i,i=r,i^=e.pbox[Sn],o^=e.pbox[Sn+1],{left:o,right:i}}class Rn extends ke{constructor(e,t,n){super(e,t,n),this.blockSize=2}_doReset(){if(this._keyPriorReset===this._key)return;const e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4;!function(e,t,n){for(let s=0;s<4;s++){e.sbox[s]=[];for(let t=0;t<256;t++)e.sbox[s][t]=Cn[s][t]}let r=0;for(let s=0;s<Sn+2;s++)e.pbox[s]=kn[s]^t[r],r++,r>=n&&(r=0);let o=0,i=0,a=0;for(let s=0;s<Sn+2;s+=2)a=Tn(e,o,i),o=a.left,i=a.right,e.pbox[s]=o,e.pbox[s+1]=i;for(let s=0;s<4;s++)for(let t=0;t<256;t+=2)a=Tn(e,o,i),o=a.left,i=a.right,e.sbox[s][t]=o,e.sbox[s][t+1]=i}(Pn,t,n)}encryptBlock(e,t){const n=Tn(Pn,e[t],e[t+1]);e[t]=n.left,e[t+1]=n.right}decryptBlock(e,t){const n=function(e,t,n){let r,o=t,i=n;for(let a=Sn+1;a>1;--a)o^=e.pbox[a],i=_n(e,o)^i,r=o,o=i,i=r;return r=o,o=i,i=r,i^=e.pbox[1],o^=e.pbox[0],{left:o,right:i}}(Pn,e[t],e[t+1]);e[t]=n.left,e[t+1]=n.right}}Rn.keySize=4,Rn.ivSize=2;const Dn=ke._createHelper(Rn);function An(e,t,n,r){const o=e;let i;const a=this._iv;a?(i=a.slice(0),this._iv=void 0):i=this._prevBlock,r.encryptBlock(i,0);for(let s=0;s<n;s+=1)o[t+s]^=i[s]}class Mn extends we{}Mn.Encryptor=class extends Mn{processBlock(e,t){const n=this._cipher,{blockSize:r}=n;An.call(this,e,t,r,n),this._prevBlock=e.slice(t,t+r)}},Mn.Decryptor=class extends Mn{processBlock(e,t){const n=this._cipher,{blockSize:r}=n,o=e.slice(t,t+r);An.call(this,e,t,r,n),this._prevBlock=o}};class Ln extends we{}Ln.Encryptor=class extends Ln{processBlock(e,t){const n=e,r=this._cipher,{blockSize:o}=r,i=this._iv;let a=this._counter;i&&(this._counter=i.slice(0),a=this._counter,this._iv=void 0);const s=a.slice(0);r.encryptBlock(s,0),a[o-1]=a[o-1]+1|0;for(let l=0;l<o;l+=1)n[t+l]^=s[l]}},Ln.Decryptor=Ln.Encryptor;const On=e=>{let t=e;if(255==(e>>24&255)){let n=e>>16&255,r=e>>8&255,o=255&e;255===n?(n=0,255===r?(r=0,255===o?o=0:o+=1):r+=1):n+=1,t=0,t+=n<<16,t+=r<<8,t+=o}else t+=1<<24;return t};class Fn extends we{}Fn.Encryptor=class extends Fn{processBlock(e,t){const n=e,r=this._cipher,{blockSize:o}=r,i=this._iv;let a=this._counter;i&&(this._counter=i.slice(0),a=this._counter,this._iv=void 0),(e=>{const t=e;t[0]=On(t[0]),0===t[0]&&(t[1]=On(t[1]))})(a);const s=a.slice(0);r.encryptBlock(s,0);for(let l=0;l<o;l+=1)n[t+l]^=s[l]}},Fn.Decryptor=Fn.Encryptor;class In extends we{}In.Encryptor=class extends In{processBlock(e,t){this._cipher.encryptBlock(e,t)}},In.Decryptor=class extends In{processBlock(e,t){this._cipher.decryptBlock(e,t)}};class Nn extends we{}Nn.Encryptor=class extends Nn{processBlock(e,t){const n=e,r=this._cipher,{blockSize:o}=r,i=this._iv;let a=this._keystream;i&&(this._keystream=i.slice(0),a=this._keystream,this._iv=void 0),r.encryptBlock(a,0);for(let s=0;s<o;s+=1)n[t+s]^=a[s]}},Nn.Decryptor=Nn.Encryptor;const zn={pad(e,t){const n=4*t,r=n-e.sigBytes%n;e.concat(Q.random(r-1)).concat(Q.create([r<<24],1))},unpad(e){const t=e,n=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=n}},Bn={pad(e,t){const n=e,r=4*t;n.clamp(),n.sigBytes+=r-(e.sigBytes%r||r)},unpad(e){const t=e,n=t.words;for(let r=t.sigBytes-1;r>=0;r-=1)if(n[r>>>2]>>>24-r%4*8&255){t.sigBytes=r+1;break}}},Vn={pad(e,t){e.concat(Q.create([2147483648],1)),Bn.pad(e,t)},unpad(e){const t=e;Bn.unpad(t),t.sigBytes-=1}},jn={stringify:e=>e.ciphertext.toString(Z),parse(e){const t=Z.parse(e);return Ce.create({ciphertext:t})}},Hn={lib:{Base:q,WordArray:Q,BufferedBlockAlgorithm:te,Hasher:ne,Cipher:ye,StreamCipher:be,BlockCipherMode:we,BlockCipher:ke,CipherParams:Ce,SerializableCipher:_e,PasswordBasedCipher:Re},x64:{Word:ie,WordArray:ae},enc:{Hex:Z,Latin1:J,Utf8:ee,Utf16:Me,Utf16BE:Ae,Utf16LE:Le,Base64:le,Base64url:Oe},algo:{HMAC:re,MD5:he,SHA1:Ie,SHA224:qe,SHA256:Ke,SHA384:rt,SHA512:et,SHA3:pt,RIPEMD160:Tt,PBKDF2:At,EvpKDF:ve,AES:Kt,DES:tn,TripleDES:rn,Rabbit:cn,RabbitLegacy:gn,RC4:bn,RC4Drop:xn,Blowfish:Rn},mode:{CBC:Ee,CFB:Mn,CTR:Ln,CTRGladman:Fn,ECB:In,OFB:Nn},pad:{Pkcs7:Se,AnsiX923:{pad(e,t){const n=e,r=n.sigBytes,o=4*t,i=o-r%o,a=r+i-1;n.clamp(),n.words[a>>>2]|=i<<24-a%4*8,n.sigBytes+=i},unpad(e){const t=e,n=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=n}},Iso10126:zn,Iso97971:Vn,NoPadding:{pad(){},unpad(){}},ZeroPadding:Bn},format:{OpenSSL:Pe,Hex:jn},kdf:{OpenSSL:Te},MD5:me,HmacMD5:ge,SHA1:Ne,HmacSHA1:ze,SHA224:Qe,HmacSHA224:Ge,SHA256:Xe,HmacSHA256:Ye,SHA384:ot,HmacSHA384:it,SHA512:tt,HmacSHA512:nt,SHA3:ht,HmacSHA3:mt,RIPEMD160:Rt,HmacRIPEMD160:Dt,PBKDF2:(e,t,n)=>At.create(n).compute(e,t),EvpKDF:(e,t,n)=>ve.create(n).compute(e,t),AES:Xt,DES:nn,TripleDES:on,Rabbit:dn,RabbitLegacy:vn,RC4:wn,RC4Drop:En,Blowfish:Dn};var Un={exports:{}},Wn={},$n=W,Kn=Symbol.for("react.element"),Xn=Symbol.for("react.fragment"),Yn=Object.prototype.hasOwnProperty,qn=$n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Qn={key:!0,ref:!0,__self:!0,__source:!0};function Gn(e,t,n){var r,o={},i=null,a=null;for(r in void 0!==n&&(i=""+n),void 0!==t.key&&(i=""+t.key),void 0!==t.ref&&(a=t.ref),t)Yn.call(t,r)&&!Qn.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:Kn,type:e,key:i,ref:a,props:o,_owner:qn.current}}Wn.Fragment=Xn,Wn.jsx=Gn,Wn.jsxs=Gn,Un.exports=Wn;var Zn=Un.exports;function Jn(){return Jn=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},Jn.apply(this,arguments)}function er(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>W.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return W.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=W.createContext(r),i=n.length;function a(t){const{scope:n,children:r,...a}=t,s=(null==n?void 0:n[e][i])||o,l=W.useMemo((()=>a),Object.values(a));return W.createElement(s.Provider,{value:l},r)}return n=[...n,r],a.displayName=t+"Provider",[a,function(n,a){const s=(null==a?void 0:a[e][i])||o,l=W.useContext(s);if(l)return l;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},tr(r,...t)]}function tr(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return W.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function nr(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function rr(...e){return W.useCallback(nr(...e),e)}function or(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}const ir=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?W.useLayoutEffect:()=>{},ar=K["useId".toString()]||(()=>{});let sr=0;function lr(e){const[t,n]=W.useState(ar());return ir((()=>{e||n((e=>null!=e?e:String(sr++)))}),[e]),e||(t?`radix-${t}`:"")}function ur(e){const t=W.useRef(e);return W.useEffect((()=>{t.current=e})),W.useMemo((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}function cr({prop:e,defaultProp:t,onChange:n=(()=>{})}){const[r,o]=function({defaultProp:e,onChange:t}){const n=W.useState(e),[r]=n,o=W.useRef(r),i=ur(t);return W.useEffect((()=>{o.current!==r&&(i(r),o.current=r)}),[r,o,i]),n}({defaultProp:t,onChange:n}),i=void 0!==e,a=i?e:r,s=ur(n),l=W.useCallback((t=>{if(i){const n="function"==typeof t?t(e):t;n!==e&&s(n)}else o(t)}),[i,e,o,s]);return[a,l]}var dr={exports:{}},fr={},pr={exports:{}},hr={};!function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<o(i,t)))break e;e[r]=t,e[n]=i,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,a=i>>>1;r<a;){var s=2*(r+1)-1,l=e[s],u=s+1,c=e[u];if(0>o(l,n))u<i&&0>o(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[s]=n,r=s);else{if(!(u<i&&0>o(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],c=1,d=null,f=3,p=!1,h=!1,m=!1,g="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,y="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var o=n(u);null!==o;){if(null===o.callback)r(u);else{if(!(o.startTime<=e))break;r(u),o.sortIndex=o.expirationTime,t(l,o)}o=n(u)}}function w(e){if(m=!1,b(e),!h)if(null!==n(l))h=!0,M(x);else{var t=n(u);null!==t&&L(w,t.startTime-e)}}function x(t,o){h=!1,m&&(m=!1,v(C),C=-1),p=!0;var i=f;try{for(b(o),d=n(l);null!==d&&(!(d.expirationTime>o)||t&&!T());){var a=d.callback;if("function"==typeof a){d.callback=null,f=d.priorityLevel;var s=a(d.expirationTime<=o);o=e.unstable_now(),"function"==typeof s?d.callback=s:d===n(l)&&r(l),b(o)}else r(l);d=n(l)}if(null!==d)var c=!0;else{var g=n(u);null!==g&&L(w,g.startTime-o),c=!1}return c}finally{d=null,f=i,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var E,S=!1,k=null,C=-1,P=5,_=-1;function T(){return!(e.unstable_now()-_<P)}function R(){if(null!==k){var t=e.unstable_now();_=t;var n=!0;try{n=k(!0,t)}finally{n?E():(S=!1,k=null)}}else S=!1}if("function"==typeof y)E=function(){y(R)};else if("undefined"!=typeof MessageChannel){var D=new MessageChannel,A=D.port2;D.port1.onmessage=R,E=function(){A.postMessage(null)}}else E=function(){g(R,0)};function M(e){k=e,S||(S=!0,E())}function L(t,n){C=g((function(){t(e.unstable_now())}),n)}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(e){e.callback=null},e.unstable_continueExecution=function(){h||p||(h=!0,M(x))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,o,i){var a=e.unstable_now();switch("object"==typeof i&&null!==i?i="number"==typeof(i=i.delay)&&0<i?a+i:a:i=a,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return r={id:c++,callback:o,priorityLevel:r,startTime:i,expirationTime:s=i+s,sortIndex:-1},i>a?(r.sortIndex=i,t(u,r),null===n(l)&&r===n(u)&&(m?(v(C),C=-1):m=!0,L(w,i-a))):(r.sortIndex=s,t(l,r),h||p||(h=!0,M(x))),r},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}}(hr),pr.exports=hr;var mr=pr.exports,gr=W,vr=mr;function yr(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 br=new Set,wr={};function xr(e,t){Er(e,t),Er(e+"Capture",t)}function Er(e,t){for(wr[e]=t,e=0;e<t.length;e++)br.add(t[e])}var Sr=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),kr=Object.prototype.hasOwnProperty,Cr=/^[: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]*$/,Pr={},_r={};function Tr(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var Rr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){Rr[e]=new Tr(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];Rr[t]=new Tr(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){Rr[e]=new Tr(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){Rr[e]=new Tr(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){Rr[e]=new Tr(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){Rr[e]=new Tr(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){Rr[e]=new Tr(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){Rr[e]=new Tr(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){Rr[e]=new Tr(e,5,!1,e.toLowerCase(),null,!1,!1)}));var Dr=/[\-:]([a-z])/g;function Ar(e){return e[1].toUpperCase()}function Mr(e,t,n,r){var o=Rr.hasOwnProperty(t)?Rr[t]:null;(null!==o?0!==o.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!kr.call(_r,e)||!kr.call(Pr,e)&&(Cr.test(e)?_r[e]=!0:(Pr[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"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(Dr,Ar);Rr[t]=new Tr(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(Dr,Ar);Rr[t]=new Tr(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(Dr,Ar);Rr[t]=new Tr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){Rr[e]=new Tr(e,1,!1,e.toLowerCase(),null,!1,!1)})),Rr.xlinkHref=new Tr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){Rr[e]=new Tr(e,1,!1,e.toLowerCase(),null,!0,!0)}));var Lr=gr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Or=Symbol.for("react.element"),Fr=Symbol.for("react.portal"),Ir=Symbol.for("react.fragment"),Nr=Symbol.for("react.strict_mode"),zr=Symbol.for("react.profiler"),Br=Symbol.for("react.provider"),Vr=Symbol.for("react.context"),jr=Symbol.for("react.forward_ref"),Hr=Symbol.for("react.suspense"),Ur=Symbol.for("react.suspense_list"),Wr=Symbol.for("react.memo"),$r=Symbol.for("react.lazy"),Kr=Symbol.for("react.offscreen"),Xr=Symbol.iterator;function Yr(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=Xr&&e[Xr]||e["@@iterator"])?e:null}var qr,Qr=Object.assign;function Gr(e){if(void 0===qr)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);qr=t&&t[1]||""}return"\n"+qr+e}var Zr=!1;function Jr(e,t){if(!e||Zr)return"";Zr=!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()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&"string"==typeof u.stack){for(var o=u.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,s=i.length-1;1<=a&&0<=s&&o[a]!==i[s];)s--;for(;1<=a&&0<=s;a--,s--)if(o[a]!==i[s]){if(1!==a||1!==s)do{if(a--,0>--s||o[a]!==i[s]){var l="\n"+o[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{Zr=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Gr(e):""}function eo(e){switch(e.tag){case 5:return Gr(e.type);case 16:return Gr("Lazy");case 13:return Gr("Suspense");case 19:return Gr("SuspenseList");case 0:case 2:case 15:return e=Jr(e.type,!1);case 11:return e=Jr(e.type.render,!1);case 1:return e=Jr(e.type,!0);default:return""}}function to(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case Ir:return"Fragment";case Fr:return"Portal";case zr:return"Profiler";case Nr:return"StrictMode";case Hr:return"Suspense";case Ur:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case Vr:return(e.displayName||"Context")+".Consumer";case Br:return(e._context.displayName||"Context")+".Provider";case jr:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case Wr:return null!==(t=e.displayName||null)?t:to(e.type)||"Memo";case $r:t=e._payload,e=e._init;try{return to(e(t))}catch(n){}}return null}function no(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=(e=t.render).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 to(t);case 8:return t===Nr?"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("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function ro(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function oo(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function io(e){e._valueTracker||(e._valueTracker=function(e){var t=oo(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function ao(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=oo(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function so(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function lo(e,t){var n=t.checked;return Qr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function uo(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=ro(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function co(e,t){null!=(t=t.checked)&&Mr(e,"checked",t,!1)}function fo(e,t){co(e,t);var n=ro(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ho(e,t.type,n):t.hasOwnProperty("defaultValue")&&ho(e,t.type,ro(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function po(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ho(e,t,n){"number"===t&&so(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var mo=Array.isArray;function go(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ro(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function vo(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(yr(91));return Qr({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function yo(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(yr(92));if(mo(n)){if(1<n.length)throw Error(yr(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:ro(n)}}function bo(e,t){var n=ro(t.value),r=ro(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function wo(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function xo(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 Eo(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?xo(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var So,ko,Co=(ko=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((So=So||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=So.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ko(e,t)}))}:ko);function Po(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var _o={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},To=["Webkit","ms","Moz","O"];function Ro(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||_o.hasOwnProperty(e)&&_o[e]?(""+t).trim():t+"px"}function Do(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=Ro(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(_o).forEach((function(e){To.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),_o[t]=_o[e]}))}));var Ao=Qr({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 Mo(e,t){if(t){if(Ao[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(yr(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(yr(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(yr(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(yr(62))}}function Lo(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;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 Oo=null;function Fo(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Io=null,No=null,zo=null;function Bo(e){if(e=Ml(e)){if("function"!=typeof Io)throw Error(yr(280));var t=e.stateNode;t&&(t=Ol(t),Io(e.stateNode,e.type,t))}}function Vo(e){No?zo?zo.push(e):zo=[e]:No=e}function jo(){if(No){var e=No,t=zo;if(zo=No=null,Bo(e),t)for(e=0;e<t.length;e++)Bo(t[e])}}function Ho(e,t){return e(t)}function Uo(){}var Wo=!1;function $o(e,t,n){if(Wo)return e(t,n);Wo=!0;try{return Ho(e,t,n)}finally{Wo=!1,(null!==No||null!==zo)&&(Uo(),jo())}}function Ko(e,t){var n=e.stateNode;if(null===n)return null;var r=Ol(n);if(null===r)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)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(yr(231,t,typeof n));return n}var Xo=!1;if(Sr)try{var Yo={};Object.defineProperty(Yo,"passive",{get:function(){Xo=!0}}),window.addEventListener("test",Yo,Yo),window.removeEventListener("test",Yo,Yo)}catch(ko){Xo=!1}function qo(e,t,n,r,o,i,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Qo=!1,Go=null,Zo=!1,Jo=null,ei={onError:function(e){Qo=!0,Go=e}};function ti(e,t,n,r,o,i,a,s,l){Qo=!1,Go=null,qo.apply(ei,arguments)}function ni(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function ri(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function oi(e){if(ni(e)!==e)throw Error(yr(188))}function ii(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=ni(e)))throw Error(yr(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return oi(o),e;if(i===r)return oi(o),t;i=i.sibling}throw Error(yr(188))}if(n.return!==r.return)n=o,r=i;else{for(var a=!1,s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}if(!a){for(s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a)throw Error(yr(189))}}if(n.alternate!==r)throw Error(yr(190))}if(3!==n.tag)throw Error(yr(188));return n.stateNode.current===n?e:t}(e))?ai(e):null}function ai(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=ai(e);if(null!==t)return t;e=e.sibling}return null}var si=vr.unstable_scheduleCallback,li=vr.unstable_cancelCallback,ui=vr.unstable_shouldYield,ci=vr.unstable_requestPaint,di=vr.unstable_now,fi=vr.unstable_getCurrentPriorityLevel,pi=vr.unstable_ImmediatePriority,hi=vr.unstable_UserBlockingPriority,mi=vr.unstable_NormalPriority,gi=vr.unstable_LowPriority,vi=vr.unstable_IdlePriority,yi=null,bi=null;var wi=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(xi(e)/Ei|0)|0},xi=Math.log,Ei=Math.LN2;var Si=64,ki=4194304;function Ci(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 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Pi(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~o;0!==s?r=Ci(s):0!==(i&=a)&&(r=Ci(i))}else 0!==(a=n&~o)?r=Ci(a):0!==i&&(r=Ci(i));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&o)&&((o=r&-r)>=(i=t&-t)||16===o&&0!=(4194240&i)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-wi(t)),r|=e[n],t&=~o;return r}function _i(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;default:return-1}}function Ti(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Ri(){var e=Si;return 0==(4194240&(Si<<=1))&&(Si=64),e}function Di(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ai(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-wi(t)]=n}function Mi(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-wi(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var Li=0;function Oi(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var Fi,Ii,Ni,zi,Bi,Vi=!1,ji=[],Hi=null,Ui=null,Wi=null,$i=new Map,Ki=new Map,Xi=[],Yi="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 qi(e,t){switch(e){case"focusin":case"focusout":Hi=null;break;case"dragenter":case"dragleave":Ui=null;break;case"mouseover":case"mouseout":Wi=null;break;case"pointerover":case"pointerout":$i.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ki.delete(t.pointerId)}}function Qi(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},null!==t&&(null!==(t=Ml(t))&&Ii(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function Gi(e){var t=Al(e.target);if(null!==t){var n=ni(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=ri(n)))return e.blockedOn=t,void Bi(e.priority,(function(){Ni(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Zi(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=ua(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=Ml(n))&&Ii(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Oo=r,n.target.dispatchEvent(r),Oo=null,t.shift()}return!0}function Ji(e,t,n){Zi(e)&&n.delete(t)}function ea(){Vi=!1,null!==Hi&&Zi(Hi)&&(Hi=null),null!==Ui&&Zi(Ui)&&(Ui=null),null!==Wi&&Zi(Wi)&&(Wi=null),$i.forEach(Ji),Ki.forEach(Ji)}function ta(e,t){e.blockedOn===t&&(e.blockedOn=null,Vi||(Vi=!0,vr.unstable_scheduleCallback(vr.unstable_NormalPriority,ea)))}function na(e){function t(t){return ta(t,e)}if(0<ji.length){ta(ji[0],e);for(var n=1;n<ji.length;n++){var r=ji[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Hi&&ta(Hi,e),null!==Ui&&ta(Ui,e),null!==Wi&&ta(Wi,e),$i.forEach(t),Ki.forEach(t),n=0;n<Xi.length;n++)(r=Xi[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Xi.length&&null===(n=Xi[0]).blockedOn;)Gi(n),null===n.blockedOn&&Xi.shift()}var ra=Lr.ReactCurrentBatchConfig,oa=!0;function ia(e,t,n,r){var o=Li,i=ra.transition;ra.transition=null;try{Li=1,sa(e,t,n,r)}finally{Li=o,ra.transition=i}}function aa(e,t,n,r){var o=Li,i=ra.transition;ra.transition=null;try{Li=4,sa(e,t,n,r)}finally{Li=o,ra.transition=i}}function sa(e,t,n,r){if(oa){var o=ua(e,t,n,r);if(null===o)rl(e,t,r,la,n),qi(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return Hi=Qi(Hi,e,t,n,r,o),!0;case"dragenter":return Ui=Qi(Ui,e,t,n,r,o),!0;case"mouseover":return Wi=Qi(Wi,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return $i.set(i,Qi($i.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Ki.set(i,Qi(Ki.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(qi(e,r),4&t&&-1<Yi.indexOf(e)){for(;null!==o;){var i=Ml(o);if(null!==i&&Fi(i),null===(i=ua(e,t,n,r))&&rl(e,t,r,la,n),i===o)break;o=i}null!==o&&r.stopPropagation()}else rl(e,t,r,null,n)}}var la=null;function ua(e,t,n,r){if(la=null,null!==(e=Al(e=Fo(r))))if(null===(t=ni(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=ri(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return la=e,null}function ca(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(fi()){case pi:return 1;case hi:return 4;case mi:case gi:return 16;case vi:return 536870912;default:return 16}default:return 16}}var da=null,fa=null,pa=null;function ha(){if(pa)return pa;var e,t,n=fa,r=n.length,o="value"in da?da.value:da.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return pa=o.slice(e,1<t?1-t:void 0)}function ma(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function ga(){return!0}function va(){return!1}function ya(e){function t(t,n,r,o,i){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(o):o[a]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?ga:va,this.isPropagationStopped=va,this}return Qr(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=ga)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=ga)},persist:function(){},isPersistent:ga}),t}var ba,wa,xa,Ea={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Sa=ya(Ea),ka=Qr({},Ea,{view:0,detail:0}),Ca=ya(ka),Pa=Qr({},ka,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:za,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==xa&&(xa&&"mousemove"===e.type?(ba=e.screenX-xa.screenX,wa=e.screenY-xa.screenY):wa=ba=0,xa=e),ba)},movementY:function(e){return"movementY"in e?e.movementY:wa}}),_a=ya(Pa),Ta=ya(Qr({},Pa,{dataTransfer:0})),Ra=ya(Qr({},ka,{relatedTarget:0})),Da=ya(Qr({},Ea,{animationName:0,elapsedTime:0,pseudoElement:0})),Aa=Qr({},Ea,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ma=ya(Aa),La=ya(Qr({},Ea,{data:0})),Oa={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Fa={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"},Ia={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Na(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Ia[e])&&!!t[e]}function za(){return Na}var Ba=Qr({},ka,{key:function(e){if(e.key){var t=Oa[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=ma(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Fa[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:za,charCode:function(e){return"keypress"===e.type?ma(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?ma(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Va=ya(Ba),ja=ya(Qr({},Pa,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Ha=ya(Qr({},ka,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:za})),Ua=ya(Qr({},Ea,{propertyName:0,elapsedTime:0,pseudoElement:0})),Wa=Qr({},Pa,{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}),$a=ya(Wa),Ka=[9,13,27,32],Xa=Sr&&"CompositionEvent"in window,Ya=null;Sr&&"documentMode"in document&&(Ya=document.documentMode);var qa=Sr&&"TextEvent"in window&&!Ya,Qa=Sr&&(!Xa||Ya&&8<Ya&&11>=Ya),Ga=String.fromCharCode(32),Za=!1;function Ja(e,t){switch(e){case"keyup":return-1!==Ka.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function es(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var ts=!1;var ns={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 rs(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!ns[e.type]:"textarea"===t}function os(e,t,n,r){Vo(r),0<(t=il(t,"onChange")).length&&(n=new Sa("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var is=null,as=null;function ss(e){Gs(e,0)}function ls(e){if(ao(Ll(e)))return e}function us(e,t){if("change"===e)return t}var cs=!1;if(Sr){var ds;if(Sr){var fs="oninput"in document;if(!fs){var ps=document.createElement("div");ps.setAttribute("oninput","return;"),fs="function"==typeof ps.oninput}ds=fs}else ds=!1;cs=ds&&(!document.documentMode||9<document.documentMode)}function hs(){is&&(is.detachEvent("onpropertychange",ms),as=is=null)}function ms(e){if("value"===e.propertyName&&ls(as)){var t=[];os(t,as,e,Fo(e)),$o(ss,t)}}function gs(e,t,n){"focusin"===e?(hs(),as=n,(is=t).attachEvent("onpropertychange",ms)):"focusout"===e&&hs()}function vs(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return ls(as)}function ys(e,t){if("click"===e)return ls(t)}function bs(e,t){if("input"===e||"change"===e)return ls(t)}var ws="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function xs(e,t){if(ws(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)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 o=n[r];if(!kr.call(t,o)||!ws(e[o],t[o]))return!1}return!0}function Es(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ss(e,t){var n,r=Es(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Es(r)}}function ks(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?ks(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function Cs(){for(var e=window,t=so();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=so((e=t.contentWindow).document)}return t}function Ps(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function _s(e){var t=Cs(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ks(n.ownerDocument.documentElement,n)){if(null!==r&&Ps(n))if(t=r.start,void 0===(e=r.end)&&(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).getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=void 0===r.end?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Ss(n,i);var a=Ss(n,r);o&&a&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Ts=Sr&&"documentMode"in document&&11>=document.documentMode,Rs=null,Ds=null,As=null,Ms=!1;function Ls(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;Ms||null==Rs||Rs!==so(r)||("selectionStart"in(r=Rs)&&Ps(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},As&&xs(As,r)||(As=r,0<(r=il(Ds,"onSelect")).length&&(t=new Sa("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Rs)))}function Os(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Fs={animationend:Os("Animation","AnimationEnd"),animationiteration:Os("Animation","AnimationIteration"),animationstart:Os("Animation","AnimationStart"),transitionend:Os("Transition","TransitionEnd")},Is={},Ns={};function zs(e){if(Is[e])return Is[e];if(!Fs[e])return e;var t,n=Fs[e];for(t in n)if(n.hasOwnProperty(t)&&t in Ns)return Is[e]=n[t];return e}Sr&&(Ns=document.createElement("div").style,"AnimationEvent"in window||(delete Fs.animationend.animation,delete Fs.animationiteration.animation,delete Fs.animationstart.animation),"TransitionEvent"in window||delete Fs.transitionend.transition);var Bs=zs("animationend"),Vs=zs("animationiteration"),js=zs("animationstart"),Hs=zs("transitionend"),Us=new Map,Ws="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 $s(e,t){Us.set(e,t),xr(t,[e])}for(var Ks=0;Ks<Ws.length;Ks++){var Xs=Ws[Ks];$s(Xs.toLowerCase(),"on"+(Xs[0].toUpperCase()+Xs.slice(1)))}$s(Bs,"onAnimationEnd"),$s(Vs,"onAnimationIteration"),$s(js,"onAnimationStart"),$s("dblclick","onDoubleClick"),$s("focusin","onFocus"),$s("focusout","onBlur"),$s(Hs,"onTransitionEnd"),Er("onMouseEnter",["mouseout","mouseover"]),Er("onMouseLeave",["mouseout","mouseover"]),Er("onPointerEnter",["pointerout","pointerover"]),Er("onPointerLeave",["pointerout","pointerover"]),xr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),xr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),xr("onBeforeInput",["compositionend","keypress","textInput","paste"]),xr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),xr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),xr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ys="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(" "),qs=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ys));function Qs(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,i,a,s,l){if(ti.apply(this,arguments),Qo){if(!Qo)throw Error(yr(198));var u=Go;Qo=!1,Go=null,Zo||(Zo=!0,Jo=u)}}(r,t,void 0,e),e.currentTarget=null}function Gs(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==i&&o.isPropagationStopped())break e;Qs(o,s,u),i=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,u=s.currentTarget,s=s.listener,l!==i&&o.isPropagationStopped())break e;Qs(o,s,u),i=l}}}if(Zo)throw e=Jo,Zo=!1,Jo=null,e}function Zs(e,t){var n=t[Tl];void 0===n&&(n=t[Tl]=new Set);var r=e+"__bubble";n.has(r)||(nl(t,e,2,!1),n.add(r))}function Js(e,t,n){var r=0;t&&(r|=4),nl(n,e,r,t)}var el="_reactListening"+Math.random().toString(36).slice(2);function tl(e){if(!e[el]){e[el]=!0,br.forEach((function(t){"selectionchange"!==t&&(qs.has(t)||Js(t,!1,e),Js(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[el]||(t[el]=!0,Js("selectionchange",!1,t))}}function nl(e,t,n,r){switch(ca(t)){case 1:var o=ia;break;case 4:o=aa;break;default:o=sa}n=o.bind(null,t,n,e),o=void 0,!Xo||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function rl(e,t,n,r,o){var i=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===o||8===s.nodeType&&s.parentNode===o)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===o||8===l.nodeType&&l.parentNode===o))return;a=a.return}for(;null!==s;){if(null===(a=Al(s)))return;if(5===(l=a.tag)||6===l){r=i=a;continue e}s=s.parentNode}}r=r.return}$o((function(){var r=i,o=Fo(n),a=[];e:{var s=Us.get(e);if(void 0!==s){var l=Sa,u=e;switch(e){case"keypress":if(0===ma(n))break e;case"keydown":case"keyup":l=Va;break;case"focusin":u="focus",l=Ra;break;case"focusout":u="blur",l=Ra;break;case"beforeblur":case"afterblur":l=Ra;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=_a;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=Ta;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Ha;break;case Bs:case Vs:case js:l=Da;break;case Hs:l=Ua;break;case"scroll":l=Ca;break;case"wheel":l=$a;break;case"copy":case"cut":case"paste":l=Ma;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=ja}var c=0!=(4&t),d=!c&&"scroll"===e,f=c?null!==s?s+"Capture":null:s;c=[];for(var p,h=r;null!==h;){var m=(p=h).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==f&&(null!=(m=Ko(h,f))&&c.push(ol(h,m,p)))),d)break;h=h.return}0<c.length&&(s=new l(s,u,null,n,o),a.push({event:s,listeners:c}))}}if(0==(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===Oo||!(u=n.relatedTarget||n.fromElement)||!Al(u)&&!u[_l])&&(l||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(u=(u=n.relatedTarget||n.toElement)?Al(u):null)&&(u!==(d=ni(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(l=null,u=r),l!==u)){if(c=_a,m="onMouseLeave",f="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(c=ja,m="onPointerLeave",f="onPointerEnter",h="pointer"),d=null==l?s:Ll(l),p=null==u?s:Ll(u),(s=new c(m,h+"leave",l,n,o)).target=d,s.relatedTarget=p,m=null,Al(o)===r&&((c=new c(f,h+"enter",u,n,o)).target=p,c.relatedTarget=d,m=c),d=m,l&&u)e:{for(f=u,h=0,p=c=l;p;p=al(p))h++;for(p=0,m=f;m;m=al(m))p++;for(;0<h-p;)c=al(c),h--;for(;0<p-h;)f=al(f),p--;for(;h--;){if(c===f||null!==f&&c===f.alternate)break e;c=al(c),f=al(f)}c=null}else c=null;null!==l&&sl(a,s,l,c,!1),null!==u&&null!==d&&sl(a,d,u,c,!0)}if("select"===(l=(s=r?Ll(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=us;else if(rs(s))if(cs)g=bs;else{g=vs;var v=gs}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=ys);switch(g&&(g=g(e,r))?os(a,g,n,o):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&ho(s,"number",s.value)),v=r?Ll(r):window,e){case"focusin":(rs(v)||"true"===v.contentEditable)&&(Rs=v,Ds=r,As=null);break;case"focusout":As=Ds=Rs=null;break;case"mousedown":Ms=!0;break;case"contextmenu":case"mouseup":case"dragend":Ms=!1,Ls(a,n,o);break;case"selectionchange":if(Ts)break;case"keydown":case"keyup":Ls(a,n,o)}var y;if(Xa)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else ts?Ja(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Qa&&"ko"!==n.locale&&(ts||"onCompositionStart"!==b?"onCompositionEnd"===b&&ts&&(y=ha()):(fa="value"in(da=o)?da.value:da.textContent,ts=!0)),0<(v=il(r,b)).length&&(b=new La(b,e,null,n,o),a.push({event:b,listeners:v}),y?b.data=y:null!==(y=es(n))&&(b.data=y))),(y=qa?function(e,t){switch(e){case"compositionend":return es(t);case"keypress":return 32!==t.which?null:(Za=!0,Ga);case"textInput":return(e=t.data)===Ga&&Za?null:e;default:return null}}(e,n):function(e,t){if(ts)return"compositionend"===e||!Xa&&Ja(e,t)?(e=ha(),pa=fa=da=null,ts=!1,e):null;switch(e){case"paste":default: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 Qa&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=il(r,"onBeforeInput")).length&&(o=new La("onBeforeInput","beforeinput",null,n,o),a.push({event:o,listeners:r}),o.data=y))}Gs(a,t)}))}function ol(e,t,n){return{instance:e,listener:t,currentTarget:n}}function il(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,null!=(i=Ko(e,n))&&r.unshift(ol(e,i,o)),null!=(i=Ko(e,t))&&r.push(ol(e,i,o))),e=e.return}return r}function al(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function sl(e,t,n,r,o){for(var i=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==u&&(s=u,o?null!=(l=Ko(n,i))&&a.unshift(ol(n,l,s)):o||null!=(l=Ko(n,i))&&a.push(ol(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var ll=/\r\n?/g,ul=/\u0000|\uFFFD/g;function cl(e){return("string"==typeof e?e:""+e).replace(ll,"\n").replace(ul,"")}function dl(e,t,n){if(t=cl(t),cl(e)!==t&&n)throw Error(yr(425))}function fl(){}var pl=null,hl=null;function ml(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var gl="function"==typeof setTimeout?setTimeout:void 0,vl="function"==typeof clearTimeout?clearTimeout:void 0,yl="function"==typeof Promise?Promise:void 0,bl="function"==typeof queueMicrotask?queueMicrotask:void 0!==yl?function(e){return yl.resolve(null).then(e).catch(wl)}:gl;function wl(e){setTimeout((function(){throw e}))}function xl(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0===r)return e.removeChild(o),void na(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);na(t)}function El(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function Sl(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var kl=Math.random().toString(36).slice(2),Cl="__reactFiber$"+kl,Pl="__reactProps$"+kl,_l="__reactContainer$"+kl,Tl="__reactEvents$"+kl,Rl="__reactListeners$"+kl,Dl="__reactHandles$"+kl;function Al(e){var t=e[Cl];if(t)return t;for(var n=e.parentNode;n;){if(t=n[_l]||n[Cl]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Sl(e);null!==e;){if(n=e[Cl])return n;e=Sl(e)}return t}n=(e=n).parentNode}return null}function Ml(e){return!(e=e[Cl]||e[_l])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Ll(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(yr(33))}function Ol(e){return e[Pl]||null}var Fl=[],Il=-1;function Nl(e){return{current:e}}function zl(e){0>Il||(e.current=Fl[Il],Fl[Il]=null,Il--)}function Bl(e,t){Il++,Fl[Il]=e.current,e.current=t}var Vl={},jl=Nl(Vl),Hl=Nl(!1),Ul=Vl;function Wl(e,t){var n=e.type.contextTypes;if(!n)return Vl;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function $l(e){return null!=(e=e.childContextTypes)}function Kl(){zl(Hl),zl(jl)}function Xl(e,t,n){if(jl.current!==Vl)throw Error(yr(168));Bl(jl,t),Bl(Hl,n)}function Yl(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(yr(108,no(e)||"Unknown",o));return Qr({},n,r)}function ql(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Vl,Ul=jl.current,Bl(jl,e),Bl(Hl,Hl.current),!0}function Ql(e,t,n){var r=e.stateNode;if(!r)throw Error(yr(169));n?(e=Yl(e,t,Ul),r.__reactInternalMemoizedMergedChildContext=e,zl(Hl),zl(jl),Bl(jl,e)):zl(Hl),Bl(Hl,n)}var Gl=null,Zl=!1,Jl=!1;function eu(e){null===Gl?Gl=[e]:Gl.push(e)}function tu(){if(!Jl&&null!==Gl){Jl=!0;var e=0,t=Li;try{var n=Gl;for(Li=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Gl=null,Zl=!1}catch(o){throw null!==Gl&&(Gl=Gl.slice(e+1)),si(pi,tu),o}finally{Li=t,Jl=!1}}return null}var nu=[],ru=0,ou=null,iu=0,au=[],su=0,lu=null,uu=1,cu="";function du(e,t){nu[ru++]=iu,nu[ru++]=ou,ou=e,iu=t}function fu(e,t,n){au[su++]=uu,au[su++]=cu,au[su++]=lu,lu=e;var r=uu;e=cu;var o=32-wi(r)-1;r&=~(1<<o),n+=1;var i=32-wi(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,uu=1<<32-wi(t)+o|n<<o|r,cu=i+e}else uu=1<<i|n<<o|r,cu=e}function pu(e){null!==e.return&&(du(e,1),fu(e,1,0))}function hu(e){for(;e===ou;)ou=nu[--ru],nu[ru]=null,iu=nu[--ru],nu[ru]=null;for(;e===lu;)lu=au[--su],au[su]=null,cu=au[--su],au[su]=null,uu=au[--su],au[su]=null}var mu=null,gu=null,vu=!1,yu=null;function bu(e,t){var n=$p(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function wu(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,mu=e,gu=El(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,mu=e,gu=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==lu?{id:uu,overflow:cu}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=$p(18,null,null,0)).stateNode=t,n.return=e,e.child=n,mu=e,gu=null,!0);default:return!1}}function xu(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function Eu(e){if(vu){var t=gu;if(t){var n=t;if(!wu(e,t)){if(xu(e))throw Error(yr(418));t=El(n.nextSibling);var r=mu;t&&wu(e,t)?bu(r,n):(e.flags=-4097&e.flags|2,vu=!1,mu=e)}}else{if(xu(e))throw Error(yr(418));e.flags=-4097&e.flags|2,vu=!1,mu=e}}}function Su(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;mu=e}function ku(e){if(e!==mu)return!1;if(!vu)return Su(e),vu=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ml(e.type,e.memoizedProps)),t&&(t=gu)){if(xu(e))throw Cu(),Error(yr(418));for(;t;)bu(e,t),t=El(t.nextSibling)}if(Su(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(yr(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){gu=El(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}gu=null}}else gu=mu?El(e.stateNode.nextSibling):null;return!0}function Cu(){for(var e=gu;e;)e=El(e.nextSibling)}function Pu(){gu=mu=null,vu=!1}function _u(e){null===yu?yu=[e]:yu.push(e)}var Tu=Lr.ReactCurrentBatchConfig;function Ru(e,t){if(e&&e.defaultProps){for(var n in t=Qr({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Du=Nl(null),Au=null,Mu=null,Lu=null;function Ou(){Lu=Mu=Au=null}function Fu(e){var t=Du.current;zl(Du),e._currentValue=t}function Iu(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Nu(e,t){Au=e,Lu=Mu=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(Md=!0),e.firstContext=null)}function zu(e){var t=e._currentValue;if(Lu!==e)if(e={context:e,memoizedValue:t,next:null},null===Mu){if(null===Au)throw Error(yr(308));Mu=e,Au.dependencies={lanes:0,firstContext:e}}else Mu=Mu.next=e;return t}var Bu=null;function Vu(e){null===Bu?Bu=[e]:Bu.push(e)}function ju(e,t,n,r){var o=t.interleaved;return null===o?(n.next=n,Vu(t)):(n.next=o.next,o.next=n),t.interleaved=n,Hu(e,r)}function Hu(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Uu=!1;function Wu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function $u(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 Ku(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Xu(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&Hf)){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Hu(e,n)}return null===(o=r.interleaved)?(t.next=t,Vu(r)):(t.next=o.next,o.next=t),r.interleaved=t,Hu(e,n)}function Yu(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Mi(e,n)}}function qu(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===i?o=i=a:i=i.next=a,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Qu(e,t,n,r){var o=e.updateQueue;Uu=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var l=s,u=l.next;l.next=null,null===a?i=u:a.next=u,a=l;var c=e.alternate;null!==c&&((s=(c=c.updateQueue).lastBaseUpdate)!==a&&(null===s?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(null!==i){var d=o.baseState;for(a=0,c=u=l=null,s=i;;){var f=s.lane,p=s.eventTime;if((r&f)===f){null!==c&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=e,m=s;switch(f=t,p=n,m.tag){case 1:if("function"==typeof(h=m.payload)){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(f="function"==typeof(h=m.payload)?h.call(p,d,f):h))break e;d=Qr({},d,f);break e;case 2:Uu=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(f=o.effects)?o.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===c?(u=c=p,l=d):c=c.next=p,a|=f;if(null===(s=s.next)){if(null===(s=o.shared.pending))break;s=(f=s).next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}if(null===c&&(l=d),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,null!==(t=o.shared.interleaved)){o=t;do{a|=o.lane,o=o.next}while(o!==t)}else null===i&&(o.shared.lanes=0);Qf|=a,e.lanes=a,e.memoizedState=d}}function Gu(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!=typeof o)throw Error(yr(191,o));o.call(r)}}}var Zu=(new gr.Component).refs;function Ju(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:Qr({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var ec={isMounted:function(e){return!!(e=e._reactInternals)&&ni(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=hp(),o=mp(e),i=Ku(r,o);i.payload=t,null!=n&&(i.callback=n),null!==(t=Xu(e,i,o))&&(gp(t,e,o,r),Yu(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=hp(),o=mp(e),i=Ku(r,o);i.tag=1,i.payload=t,null!=n&&(i.callback=n),null!==(t=Xu(e,i,o))&&(gp(t,e,o,r),Yu(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=hp(),r=mp(e),o=Ku(n,r);o.tag=2,null!=t&&(o.callback=t),null!==(t=Xu(e,o,r))&&(gp(t,e,r,n),Yu(t,e,r))}};function tc(e,t,n,r,o,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!xs(n,r)||!xs(o,i))}function nc(e,t,n){var r=!1,o=Vl,i=t.contextType;return"object"==typeof i&&null!==i?i=zu(i):(o=$l(t)?Ul:jl.current,i=(r=null!=(r=t.contextTypes))?Wl(e,o):Vl),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=ec,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function rc(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ec.enqueueReplaceState(t,t.state,null)}function oc(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=Zu,Wu(e);var i=t.contextType;"object"==typeof i&&null!==i?o.context=zu(i):(i=$l(t)?Ul:jl.current,o.context=Wl(e,i)),o.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(Ju(e,t,i,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&ec.enqueueReplaceState(o,o.state,null),Qu(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.flags|=4194308)}function ic(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(yr(309));var r=n.stateNode}if(!r)throw Error(yr(147,e));var o=r,i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=o.refs;t===Zu&&(t=o.refs={}),null===e?delete t[i]:t[i]=e})._stringRef=i,t)}if("string"!=typeof e)throw Error(yr(284));if(!n._owner)throw Error(yr(290,e))}return e}function ac(e,t){throw e=Object.prototype.toString.call(t),Error(yr(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function sc(e){return(0,e._init)(e._payload)}function lc(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Xp(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function a(t){return e&&null===t.alternate&&(t.flags|=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=Gp(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function l(e,t,n,r){var i=n.type;return i===Ir?c(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===i||"object"==typeof i&&null!==i&&i.$$typeof===$r&&sc(i)===t.type)?((r=o(t,n.props)).ref=ic(e,t,n),r.return=e,r):((r=Yp(n.type,n.key,n.props,null,e.mode,r)).ref=ic(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Zp(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function c(e,t,n,r,i){return null===t||7!==t.tag?((t=qp(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Gp(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case Or:return(n=Yp(t.type,t.key,t.props,null,e.mode,n)).ref=ic(e,null,t),n.return=e,n;case Fr:return(t=Zp(t,e.mode,n)).return=e,t;case $r:return d(e,(0,t._init)(t._payload),n)}if(mo(t)||Yr(t))return(t=qp(t,e.mode,n,null)).return=e,t;ac(e,t)}return null}function f(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==o?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case Or:return n.key===o?l(e,t,n,r):null;case Fr:return n.key===o?u(e,t,n,r):null;case $r:return f(e,t,(o=n._init)(n._payload),r)}if(mo(n)||Yr(n))return null!==o?null:c(e,t,n,r,null);ac(e,n)}return null}function p(e,t,n,r,o){if("string"==typeof r&&""!==r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case Or:return l(t,e=e.get(null===r.key?n:r.key)||null,r,o);case Fr:return u(t,e=e.get(null===r.key?n:r.key)||null,r,o);case $r:return p(e,t,n,(0,r._init)(r._payload),o)}if(mo(r)||Yr(r))return c(t,e=e.get(n)||null,r,o,null);ac(t,r)}return null}return function s(l,u,c,h){if("object"==typeof c&&null!==c&&c.type===Ir&&null===c.key&&(c=c.props.children),"object"==typeof c&&null!==c){switch(c.$$typeof){case Or:e:{for(var m=c.key,g=u;null!==g;){if(g.key===m){if((m=c.type)===Ir){if(7===g.tag){n(l,g.sibling),(u=o(g,c.props.children)).return=l,l=u;break e}}else if(g.elementType===m||"object"==typeof m&&null!==m&&m.$$typeof===$r&&sc(m)===g.type){n(l,g.sibling),(u=o(g,c.props)).ref=ic(l,g,c),u.return=l,l=u;break e}n(l,g);break}t(l,g),g=g.sibling}c.type===Ir?((u=qp(c.props.children,l.mode,h,c.key)).return=l,l=u):((h=Yp(c.type,c.key,c.props,null,l.mode,h)).ref=ic(l,u,c),h.return=l,l=h)}return a(l);case Fr:e:{for(g=c.key;null!==u;){if(u.key===g){if(4===u.tag&&u.stateNode.containerInfo===c.containerInfo&&u.stateNode.implementation===c.implementation){n(l,u.sibling),(u=o(u,c.children||[])).return=l,l=u;break e}n(l,u);break}t(l,u),u=u.sibling}(u=Zp(c,l.mode,h)).return=l,l=u}return a(l);case $r:return s(l,u,(g=c._init)(c._payload),h)}if(mo(c))return function(o,a,s,l){for(var u=null,c=null,h=a,m=a=0,g=null;null!==h&&m<s.length;m++){h.index>m?(g=h,h=null):g=h.sibling;var v=f(o,h,s[m],l);if(null===v){null===h&&(h=g);break}e&&h&&null===v.alternate&&t(o,h),a=i(v,a,m),null===c?u=v:c.sibling=v,c=v,h=g}if(m===s.length)return n(o,h),vu&&du(o,m),u;if(null===h){for(;m<s.length;m++)null!==(h=d(o,s[m],l))&&(a=i(h,a,m),null===c?u=h:c.sibling=h,c=h);return vu&&du(o,m),u}for(h=r(o,h);m<s.length;m++)null!==(g=p(h,o,m,s[m],l))&&(e&&null!==g.alternate&&h.delete(null===g.key?m:g.key),a=i(g,a,m),null===c?u=g:c.sibling=g,c=g);return e&&h.forEach((function(e){return t(o,e)})),vu&&du(o,m),u}(l,u,c,h);if(Yr(c))return function(o,a,s,l){var u=Yr(s);if("function"!=typeof u)throw Error(yr(150));if(null==(s=u.call(s)))throw Error(yr(151));for(var c=u=null,h=a,m=a=0,g=null,v=s.next();null!==h&&!v.done;m++,v=s.next()){h.index>m?(g=h,h=null):g=h.sibling;var y=f(o,h,v.value,l);if(null===y){null===h&&(h=g);break}e&&h&&null===y.alternate&&t(o,h),a=i(y,a,m),null===c?u=y:c.sibling=y,c=y,h=g}if(v.done)return n(o,h),vu&&du(o,m),u;if(null===h){for(;!v.done;m++,v=s.next())null!==(v=d(o,v.value,l))&&(a=i(v,a,m),null===c?u=v:c.sibling=v,c=v);return vu&&du(o,m),u}for(h=r(o,h);!v.done;m++,v=s.next())null!==(v=p(h,o,m,v.value,l))&&(e&&null!==v.alternate&&h.delete(null===v.key?m:v.key),a=i(v,a,m),null===c?u=v:c.sibling=v,c=v);return e&&h.forEach((function(e){return t(o,e)})),vu&&du(o,m),u}(l,u,c,h);ac(l,c)}return"string"==typeof c&&""!==c||"number"==typeof c?(c=""+c,null!==u&&6===u.tag?(n(l,u.sibling),(u=o(u,c)).return=l,l=u):(n(l,u),(u=Gp(c,l.mode,h)).return=l,l=u),a(l)):n(l,u)}}var uc=lc(!0),cc=lc(!1),dc={},fc=Nl(dc),pc=Nl(dc),hc=Nl(dc);function mc(e){if(e===dc)throw Error(yr(174));return e}function gc(e,t){switch(Bl(hc,t),Bl(pc,e),Bl(fc,dc),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Eo(null,"");break;default:t=Eo(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}zl(fc),Bl(fc,t)}function vc(){zl(fc),zl(pc),zl(hc)}function yc(e){mc(hc.current);var t=mc(fc.current),n=Eo(t,e.type);t!==n&&(Bl(pc,e),Bl(fc,n))}function bc(e){pc.current===e&&(zl(fc),zl(pc))}var wc=Nl(0);function xc(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ec=[];function Sc(){for(var e=0;e<Ec.length;e++)Ec[e]._workInProgressVersionPrimary=null;Ec.length=0}var kc=Lr.ReactCurrentDispatcher,Cc=Lr.ReactCurrentBatchConfig,Pc=0,_c=null,Tc=null,Rc=null,Dc=!1,Ac=!1,Mc=0,Lc=0;function Oc(){throw Error(yr(321))}function Fc(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ws(e[n],t[n]))return!1;return!0}function Ic(e,t,n,r,o,i){if(Pc=i,_c=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,kc.current=null===e||null===e.memoizedState?bd:wd,e=n(r,o),Ac){i=0;do{if(Ac=!1,Mc=0,25<=i)throw Error(yr(301));i+=1,Rc=Tc=null,t.updateQueue=null,kc.current=xd,e=n(r,o)}while(Ac)}if(kc.current=yd,t=null!==Tc&&null!==Tc.next,Pc=0,Rc=Tc=_c=null,Dc=!1,t)throw Error(yr(300));return e}function Nc(){var e=0!==Mc;return Mc=0,e}function zc(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Rc?_c.memoizedState=Rc=e:Rc=Rc.next=e,Rc}function Bc(){if(null===Tc){var e=_c.alternate;e=null!==e?e.memoizedState:null}else e=Tc.next;var t=null===Rc?_c.memoizedState:Rc.next;if(null!==t)Rc=t,Tc=e;else{if(null===e)throw Error(yr(310));e={memoizedState:(Tc=e).memoizedState,baseState:Tc.baseState,baseQueue:Tc.baseQueue,queue:Tc.queue,next:null},null===Rc?_c.memoizedState=Rc=e:Rc=Rc.next=e}return Rc}function Vc(e,t){return"function"==typeof t?t(e):t}function jc(e){var t=Bc(),n=t.queue;if(null===n)throw Error(yr(311));n.lastRenderedReducer=e;var r=Tc,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var a=o.next;o.next=i.next,i.next=a}r.baseQueue=o=i,n.pending=null}if(null!==o){i=o.next,r=r.baseState;var s=a=null,l=null,u=i;do{var c=u.lane;if((Pc&c)===c)null!==l&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===l?(s=l=d,a=r):l=l.next=d,_c.lanes|=c,Qf|=c}u=u.next}while(null!==u&&u!==i);null===l?a=r:l.next=s,ws(r,t.memoizedState)||(Md=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=l,n.lastRenderedState=r}if(null!==(e=n.interleaved)){o=e;do{i=o.lane,_c.lanes|=i,Qf|=i,o=o.next}while(o!==e)}else null===o&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Hc(e){var t=Bc(),n=t.queue;if(null===n)throw Error(yr(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var a=o=o.next;do{i=e(i,a.action),a=a.next}while(a!==o);ws(i,t.memoizedState)||(Md=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Uc(){}function Wc(e,t){var n=_c,r=Bc(),o=t(),i=!ws(r.memoizedState,o);if(i&&(r.memoizedState=o,Md=!0),r=r.queue,nd(Xc.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||null!==Rc&&1&Rc.memoizedState.tag){if(n.flags|=2048,Gc(9,Kc.bind(null,n,r,o,t),void 0,null),null===Uf)throw Error(yr(349));0!=(30&Pc)||$c(n,t,o)}return o}function $c(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=_c.updateQueue)?(t={lastEffect:null,stores:null},_c.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Kc(e,t,n,r){t.value=n,t.getSnapshot=r,Yc(t)&&qc(e)}function Xc(e,t,n){return n((function(){Yc(t)&&qc(e)}))}function Yc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ws(e,n)}catch(r){return!0}}function qc(e){var t=Hu(e,1);null!==t&&gp(t,e,1,-1)}function Qc(e){var t=zc();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Vc,lastRenderedState:e},t.queue=e,e=e.dispatch=hd.bind(null,_c,e),[t.memoizedState,e]}function Gc(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=_c.updateQueue)?(t={lastEffect:null,stores:null},_c.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Zc(){return Bc().memoizedState}function Jc(e,t,n,r){var o=zc();_c.flags|=e,o.memoizedState=Gc(1|t,n,void 0,void 0===r?null:r)}function ed(e,t,n,r){var o=Bc();r=void 0===r?null:r;var i=void 0;if(null!==Tc){var a=Tc.memoizedState;if(i=a.destroy,null!==r&&Fc(r,a.deps))return void(o.memoizedState=Gc(t,n,i,r))}_c.flags|=e,o.memoizedState=Gc(1|t,n,i,r)}function td(e,t){return Jc(8390656,8,e,t)}function nd(e,t){return ed(2048,8,e,t)}function rd(e,t){return ed(4,2,e,t)}function od(e,t){return ed(4,4,e,t)}function id(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function ad(e,t,n){return n=null!=n?n.concat([e]):null,ed(4,4,id.bind(null,t,e),n)}function sd(){}function ld(e,t){var n=Bc();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Fc(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ud(e,t){var n=Bc();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Fc(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function cd(e,t,n){return 0==(21&Pc)?(e.baseState&&(e.baseState=!1,Md=!0),e.memoizedState=n):(ws(n,t)||(n=Ri(),_c.lanes|=n,Qf|=n,e.baseState=!0),t)}function dd(e,t){var n=Li;Li=0!==n&&4>n?n:4,e(!0);var r=Cc.transition;Cc.transition={};try{e(!1),t()}finally{Li=n,Cc.transition=r}}function fd(){return Bc().memoizedState}function pd(e,t,n){var r=mp(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},md(e))gd(t,n);else if(null!==(n=ju(e,t,n,r))){gp(n,e,r,hp()),vd(n,t,r)}}function hd(e,t,n){var r=mp(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(md(e))gd(t,o);else{var i=e.alternate;if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=i(a,n);if(o.hasEagerState=!0,o.eagerState=s,ws(s,a)){var l=t.interleaved;return null===l?(o.next=o,Vu(t)):(o.next=l.next,l.next=o),void(t.interleaved=o)}}catch(u){}null!==(n=ju(e,t,o,r))&&(gp(n,e,r,o=hp()),vd(n,t,r))}}function md(e){var t=e.alternate;return e===_c||null!==t&&t===_c}function gd(e,t){Ac=Dc=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function vd(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Mi(e,n)}}var yd={readContext:zu,useCallback:Oc,useContext:Oc,useEffect:Oc,useImperativeHandle:Oc,useInsertionEffect:Oc,useLayoutEffect:Oc,useMemo:Oc,useReducer:Oc,useRef:Oc,useState:Oc,useDebugValue:Oc,useDeferredValue:Oc,useTransition:Oc,useMutableSource:Oc,useSyncExternalStore:Oc,useId:Oc,unstable_isNewReconciler:!1},bd={readContext:zu,useCallback:function(e,t){return zc().memoizedState=[e,void 0===t?null:t],e},useContext:zu,useEffect:td,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Jc(4194308,4,id.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Jc(4194308,4,e,t)},useInsertionEffect:function(e,t){return Jc(4,2,e,t)},useMemo:function(e,t){var n=zc();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=zc();return t=void 0!==n?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=pd.bind(null,_c,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},zc().memoizedState=e},useState:Qc,useDebugValue:sd,useDeferredValue:function(e){return zc().memoizedState=e},useTransition:function(){var e=Qc(!1),t=e[0];return e=dd.bind(null,e[1]),zc().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=_c,o=zc();if(vu){if(void 0===n)throw Error(yr(407));n=n()}else{if(n=t(),null===Uf)throw Error(yr(349));0!=(30&Pc)||$c(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,td(Xc.bind(null,r,i,e),[e]),r.flags|=2048,Gc(9,Kc.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=zc(),t=Uf.identifierPrefix;if(vu){var n=cu;t=":"+t+"R"+(n=(uu&~(1<<32-wi(uu)-1)).toString(32)+n),0<(n=Mc++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=Lc++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},wd={readContext:zu,useCallback:ld,useContext:zu,useEffect:nd,useImperativeHandle:ad,useInsertionEffect:rd,useLayoutEffect:od,useMemo:ud,useReducer:jc,useRef:Zc,useState:function(){return jc(Vc)},useDebugValue:sd,useDeferredValue:function(e){return cd(Bc(),Tc.memoizedState,e)},useTransition:function(){return[jc(Vc)[0],Bc().memoizedState]},useMutableSource:Uc,useSyncExternalStore:Wc,useId:fd,unstable_isNewReconciler:!1},xd={readContext:zu,useCallback:ld,useContext:zu,useEffect:nd,useImperativeHandle:ad,useInsertionEffect:rd,useLayoutEffect:od,useMemo:ud,useReducer:Hc,useRef:Zc,useState:function(){return Hc(Vc)},useDebugValue:sd,useDeferredValue:function(e){var t=Bc();return null===Tc?t.memoizedState=e:cd(t,Tc.memoizedState,e)},useTransition:function(){return[Hc(Vc)[0],Bc().memoizedState]},useMutableSource:Uc,useSyncExternalStore:Wc,useId:fd,unstable_isNewReconciler:!1};function Ed(e,t){try{var n="",r=t;do{n+=eo(r),r=r.return}while(r);var o=n}catch(i){o="\nError generating stack: "+i.message+"\n"+i.stack}return{value:e,source:t,stack:o,digest:null}}function Sd(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function kd(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var Cd="function"==typeof WeakMap?WeakMap:Map;function Pd(e,t,n){(n=Ku(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){op||(op=!0,ip=r),kd(0,t)},n}function _d(e,t,n){(n=Ku(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){kd(0,t)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){kd(0,t),"function"!=typeof r&&(null===ap?ap=new Set([this]):ap.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function Td(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new Cd;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=Bp.bind(null,e,t,n),t.then(e,e))}function Rd(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function Dd(e,t,n,r,o){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Ku(-1,1)).tag=2,Xu(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var Ad=Lr.ReactCurrentOwner,Md=!1;function Ld(e,t,n,r){t.child=null===e?cc(t,null,n,r):uc(t,e.child,n,r)}function Od(e,t,n,r,o){n=n.render;var i=t.ref;return Nu(t,o),r=Ic(e,t,n,r,i,o),n=Nc(),null===e||Md?(vu&&n&&pu(t),t.flags|=1,Ld(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,rf(e,t,o))}function Fd(e,t,n,r,o){if(null===e){var i=n.type;return"function"!=typeof i||Kp(i)||void 0!==i.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Yp(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,Id(e,t,i,r,o))}if(i=e.child,0==(e.lanes&o)){var a=i.memoizedProps;if((n=null!==(n=n.compare)?n:xs)(a,r)&&e.ref===t.ref)return rf(e,t,o)}return t.flags|=1,(e=Xp(i,r)).ref=t.ref,e.return=t,t.child=e}function Id(e,t,n,r,o){if(null!==e){var i=e.memoizedProps;if(xs(i,r)&&e.ref===t.ref){if(Md=!1,t.pendingProps=r=i,0==(e.lanes&o))return t.lanes=e.lanes,rf(e,t,o);0!=(131072&e.flags)&&(Md=!0)}}return Bd(e,t,n,r,o)}function Nd(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Bl(Xf,Kf),Kf|=n;else{if(0==(1073741824&n))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Bl(Xf,Kf),Kf|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==i?i.baseLanes:n,Bl(Xf,Kf),Kf|=r}else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,Bl(Xf,Kf),Kf|=r;return Ld(e,t,o,n),t.child}function zd(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Bd(e,t,n,r,o){var i=$l(n)?Ul:jl.current;return i=Wl(t,i),Nu(t,o),n=Ic(e,t,n,r,i,o),r=Nc(),null===e||Md?(vu&&r&&pu(t),t.flags|=1,Ld(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,rf(e,t,o))}function Vd(e,t,n,r,o){if($l(n)){var i=!0;ql(t)}else i=!1;if(Nu(t,o),null===t.stateNode)nf(e,t),nc(t,n,r),oc(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;"object"==typeof u&&null!==u?u=zu(u):u=Wl(t,u=$l(n)?Ul:jl.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==u)&&rc(t,a,r,u),Uu=!1;var f=t.memoizedState;a.state=f,Qu(t,r,a,o),l=t.memoizedState,s!==r||f!==l||Hl.current||Uu?("function"==typeof c&&(Ju(t,n,c,r),l=t.memoizedState),(s=Uu||tc(t,n,s,r,f,l,u))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,$u(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:Ru(t.type,s),a.props=u,d=t.pendingProps,f=a.context,"object"==typeof(l=n.contextType)&&null!==l?l=zu(l):l=Wl(t,l=$l(n)?Ul:jl.current);var p=n.getDerivedStateFromProps;(c="function"==typeof p||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||f!==l)&&rc(t,a,r,l),Uu=!1,f=t.memoizedState,a.state=f,Qu(t,r,a,o);var h=t.memoizedState;s!==d||f!==h||Hl.current||Uu?("function"==typeof p&&(Ju(t,n,p,r),h=t.memoizedState),(u=Uu||tc(t,n,u,r,f,h,l)||!1)?(c||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=l,r=u):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return jd(e,t,n,r,i,o)}function jd(e,t,n,r,o,i){zd(e,t);var a=0!=(128&t.flags);if(!r&&!a)return o&&Ql(t,n,!1),rf(e,t,i);r=t.stateNode,Ad.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=uc(t,e.child,null,i),t.child=uc(t,null,s,i)):Ld(e,t,s,i),t.memoizedState=r.state,o&&Ql(t,n,!0),t.child}function Hd(e){var t=e.stateNode;t.pendingContext?Xl(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Xl(0,t.context,!1),gc(e,t.containerInfo)}function Ud(e,t,n,r,o){return Pu(),_u(o),t.flags|=256,Ld(e,t,n,r),t.child}var Wd,$d,Kd,Xd,Yd={dehydrated:null,treeContext:null,retryLane:0};function qd(e){return{baseLanes:e,cachePool:null,transitions:null}}function Qd(e,t,n){var r,o=t.pendingProps,i=wc.current,a=!1,s=0!=(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&0!=(2&i)),r?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(i|=1),Bl(wc,1&i),null===e)return Eu(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(s=o.children,e=o.fallback,a?(o=t.mode,a=t.child,s={mode:"hidden",children:s},0==(1&o)&&null!==a?(a.childLanes=0,a.pendingProps=s):a=Qp(s,o,0,null),e=qp(e,o,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=qd(n),t.memoizedState=Yd,e):Gd(t,s));if(null!==(i=e.memoizedState)&&null!==(r=i.dehydrated))return function(e,t,n,r,o,i,a){if(n)return 256&t.flags?(t.flags&=-257,Zd(e,t,a,r=Sd(Error(yr(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=Qp({mode:"visible",children:r.children},o,0,null),(i=qp(i,o,a,null)).flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,0!=(1&t.mode)&&uc(t,e.child,null,a),t.child.memoizedState=qd(a),t.memoizedState=Yd,i);if(0==(1&t.mode))return Zd(e,t,a,null);if("$!"===o.data){if(r=o.nextSibling&&o.nextSibling.dataset)var s=r.dgst;return r=s,Zd(e,t,a,r=Sd(i=Error(yr(419)),r,void 0))}if(s=0!=(a&e.childLanes),Md||s){if(null!==(r=Uf)){switch(a&-a){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!=(o&(r.suspendedLanes|a))?0:o)&&o!==i.retryLane&&(i.retryLane=o,Hu(e,o),gp(r,e,o,-1))}return Rp(),Zd(e,t,a,r=Sd(Error(yr(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=jp.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,gu=El(o.nextSibling),mu=t,vu=!0,yu=null,null!==e&&(au[su++]=uu,au[su++]=cu,au[su++]=lu,uu=e.id,cu=e.overflow,lu=t),t=Gd(t,r.children),t.flags|=4096,t)}(e,t,s,o,r,i,n);if(a){a=o.fallback,s=t.mode,r=(i=e.child).sibling;var l={mode:"hidden",children:o.children};return 0==(1&s)&&t.child!==i?((o=t.child).childLanes=0,o.pendingProps=l,t.deletions=null):(o=Xp(i,l)).subtreeFlags=14680064&i.subtreeFlags,null!==r?a=Xp(r,a):(a=qp(a,s,n,null)).flags|=2,a.return=t,o.return=t,o.sibling=a,t.child=o,o=a,a=t.child,s=null===(s=e.child.memoizedState)?qd(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},a.memoizedState=s,a.childLanes=e.childLanes&~n,t.memoizedState=Yd,o}return e=(a=e.child).sibling,o=Xp(a,{mode:"visible",children:o.children}),0==(1&t.mode)&&(o.lanes=n),o.return=t,o.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function Gd(e,t){return(t=Qp({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Zd(e,t,n,r){return null!==r&&_u(r),uc(t,e.child,null,n),(e=Gd(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Jd(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Iu(e.return,t,n)}function ef(e,t,n,r,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function tf(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Ld(e,t,r.children,n),0!=(2&(r=wc.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Jd(e,n,t);else if(19===e.tag)Jd(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Bl(wc,r),0==(1&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===xc(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),ef(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===xc(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}ef(t,!0,n,null,i);break;case"together":ef(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function nf(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function rf(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Qf|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(yr(153));if(null!==t.child){for(n=Xp(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Xp(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function of(e,t){if(!vu)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function af(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=14680064&o.subtreeFlags,r|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function sf(e,t,n){var r=t.pendingProps;switch(hu(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return af(t),null;case 1:case 17:return $l(t.type)&&Kl(),af(t),null;case 3:return r=t.stateNode,vc(),zl(Hl),zl(jl),Sc(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(ku(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==yu&&(wp(yu),yu=null))),$d(e,t),af(t),null;case 5:bc(t);var o=mc(hc.current);if(n=t.type,null!==e&&null!=t.stateNode)Kd(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(yr(166));return af(t),null}if(e=mc(fc.current),ku(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Cl]=t,r[Pl]=i,e=0!=(1&t.mode),n){case"dialog":Zs("cancel",r),Zs("close",r);break;case"iframe":case"object":case"embed":Zs("load",r);break;case"video":case"audio":for(o=0;o<Ys.length;o++)Zs(Ys[o],r);break;case"source":Zs("error",r);break;case"img":case"image":case"link":Zs("error",r),Zs("load",r);break;case"details":Zs("toggle",r);break;case"input":uo(r,i),Zs("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Zs("invalid",r);break;case"textarea":yo(r,i),Zs("invalid",r)}for(var a in Mo(n,i),o=null,i)if(i.hasOwnProperty(a)){var s=i[a];"children"===a?"string"==typeof s?r.textContent!==s&&(!0!==i.suppressHydrationWarning&&dl(r.textContent,s,e),o=["children",s]):"number"==typeof s&&r.textContent!==""+s&&(!0!==i.suppressHydrationWarning&&dl(r.textContent,s,e),o=["children",""+s]):wr.hasOwnProperty(a)&&null!=s&&"onScroll"===a&&Zs("scroll",r)}switch(n){case"input":io(r),po(r,i,!0);break;case"textarea":io(r),wo(r);break;case"select":case"option":break;default:"function"==typeof i.onClick&&(r.onclick=fl)}r=o,t.updateQueue=r,null!==r&&(t.flags|=4)}else{a=9===o.nodeType?o:o.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=xo(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=a.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),"select"===n&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Cl]=t,e[Pl]=r,Wd(e,t,!1,!1),t.stateNode=e;e:{switch(a=Lo(n,r),n){case"dialog":Zs("cancel",e),Zs("close",e),o=r;break;case"iframe":case"object":case"embed":Zs("load",e),o=r;break;case"video":case"audio":for(o=0;o<Ys.length;o++)Zs(Ys[o],e);o=r;break;case"source":Zs("error",e),o=r;break;case"img":case"image":case"link":Zs("error",e),Zs("load",e),o=r;break;case"details":Zs("toggle",e),o=r;break;case"input":uo(e,r),o=lo(e,r),Zs("invalid",e);break;case"option":default:o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Qr({},r,{value:void 0}),Zs("invalid",e);break;case"textarea":yo(e,r),o=vo(e,r),Zs("invalid",e)}for(i in Mo(n,o),s=o)if(s.hasOwnProperty(i)){var l=s[i];"style"===i?Do(e,l):"dangerouslySetInnerHTML"===i?null!=(l=l?l.__html:void 0)&&Co(e,l):"children"===i?"string"==typeof l?("textarea"!==n||""!==l)&&Po(e,l):"number"==typeof l&&Po(e,""+l):"suppressContentEditableWarning"!==i&&"suppressHydrationWarning"!==i&&"autoFocus"!==i&&(wr.hasOwnProperty(i)?null!=l&&"onScroll"===i&&Zs("scroll",e):null!=l&&Mr(e,i,l,a))}switch(n){case"input":io(e),po(e,r,!1);break;case"textarea":io(e),wo(e);break;case"option":null!=r.value&&e.setAttribute("value",""+ro(r.value));break;case"select":e.multiple=!!r.multiple,null!=(i=r.value)?go(e,!!r.multiple,i,!1):null!=r.defaultValue&&go(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof o.onClick&&(e.onclick=fl)}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)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return af(t),null;case 6:if(e&&null!=t.stateNode)Xd(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(yr(166));if(n=mc(hc.current),mc(fc.current),ku(t)){if(r=t.stateNode,n=t.memoizedProps,r[Cl]=t,(i=r.nodeValue!==n)&&null!==(e=mu))switch(e.tag){case 3:dl(r.nodeValue,n,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&dl(r.nodeValue,n,0!=(1&e.mode))}i&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Cl]=t,t.stateNode=r}return af(t),null;case 13:if(zl(wc),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(vu&&null!==gu&&0!=(1&t.mode)&&0==(128&t.flags))Cu(),Pu(),t.flags|=98560,i=!1;else if(i=ku(t),null!==r&&null!==r.dehydrated){if(null===e){if(!i)throw Error(yr(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(yr(317));i[Cl]=t}else Pu(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;af(t),i=!1}else null!==yu&&(wp(yu),yu=null),i=!0;if(!i)return 65536&t.flags?t:null}return 0!=(128&t.flags)?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&wc.current)?0===Yf&&(Yf=3):Rp())),null!==t.updateQueue&&(t.flags|=4),af(t),null);case 4:return vc(),$d(e,t),null===e&&tl(t.stateNode.containerInfo),af(t),null;case 10:return Fu(t.type._context),af(t),null;case 19:if(zl(wc),null===(i=t.memoizedState))return af(t),null;if(r=0!=(128&t.flags),null===(a=i.rendering))if(r)of(i,!1);else{if(0!==Yf||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(a=xc(e))){for(t.flags|=128,of(i,!1),null!==(r=a.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(i=n).flags&=14680066,null===(a=i.alternate)?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Bl(wc,1&wc.current|2),t.child}e=e.sibling}null!==i.tail&&di()>np&&(t.flags|=128,r=!0,of(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=xc(a))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),of(i,!0),null===i.tail&&"hidden"===i.tailMode&&!a.alternate&&!vu)return af(t),null}else 2*di()-i.renderingStartTime>np&&1073741824!==n&&(t.flags|=128,r=!0,of(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(null!==(n=i.last)?n.sibling=a:t.child=a,i.last=a)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=di(),t.sibling=null,n=wc.current,Bl(wc,r?1&n|2:1&n),t):(af(t),null);case 22:case 23:return Cp(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&Kf)&&(af(t),6&t.subtreeFlags&&(t.flags|=8192)):af(t),null;case 24:case 25:return null}throw Error(yr(156,t.tag))}function lf(e,t){switch(hu(t),t.tag){case 1:return $l(t.type)&&Kl(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return vc(),zl(Hl),zl(jl),Sc(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return bc(t),null;case 13:if(zl(wc),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(yr(340));Pu()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return zl(wc),null;case 4:return vc(),null;case 10:return Fu(t.type._context),null;case 22:case 23:return Cp(),null;default:return null}}Wd=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},$d=function(){},Kd=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,mc(fc.current);var i,a=null;switch(n){case"input":o=lo(e,o),r=lo(e,r),a=[];break;case"select":o=Qr({},o,{value:void 0}),r=Qr({},r,{value:void 0}),a=[];break;case"textarea":o=vo(e,o),r=vo(e,r),a=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=fl)}for(u in Mo(n,r),n=null,o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&null!=o[u])if("style"===u){var s=o[u];for(i in s)s.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(wr.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in r){var l=r[u];if(s=null!=o?o[u]:void 0,r.hasOwnProperty(u)&&l!==s&&(null!=l||null!=s))if("style"===u)if(s){for(i in s)!s.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in l)l.hasOwnProperty(i)&&s[i]!==l[i]&&(n||(n={}),n[i]=l[i])}else n||(a||(a=[]),a.push(u,n)),n=l;else"dangerouslySetInnerHTML"===u?(l=l?l.__html:void 0,s=s?s.__html:void 0,null!=l&&s!==l&&(a=a||[]).push(u,l)):"children"===u?"string"!=typeof l&&"number"!=typeof l||(a=a||[]).push(u,""+l):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(wr.hasOwnProperty(u)?(null!=l&&"onScroll"===u&&Zs("scroll",e),a||s===l||(a=[])):(a=a||[]).push(u,l))}n&&(a=a||[]).push("style",n);var u=a;(t.updateQueue=u)&&(t.flags|=4)}},Xd=function(e,t,n,r){n!==r&&(t.flags|=4)};var uf=!1,cf=!1,df="function"==typeof WeakSet?WeakSet:Set,ff=null;function pf(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(r){zp(e,t,r)}else n.current=null}function hf(e,t,n){try{n()}catch(r){zp(e,t,r)}}var mf=!1;function gf(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,void 0!==i&&hf(t,n,i)}o=o.next}while(o!==r)}}function vf(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect: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 yf(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function bf(e){var t=e.alternate;null!==t&&(e.alternate=null,bf(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[Cl],delete t[Pl],delete t[Tl],delete t[Rl],delete t[Dl])),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 wf(e){return 5===e.tag||3===e.tag||4===e.tag}function xf(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||wf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function Ef(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=fl));else if(4!==r&&null!==(e=e.child))for(Ef(e,t,n),e=e.sibling;null!==e;)Ef(e,t,n),e=e.sibling}function Sf(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(Sf(e,t,n),e=e.sibling;null!==e;)Sf(e,t,n),e=e.sibling}var kf=null,Cf=!1;function Pf(e,t,n){for(n=n.child;null!==n;)_f(e,t,n),n=n.sibling}function _f(e,t,n){if(bi&&"function"==typeof bi.onCommitFiberUnmount)try{bi.onCommitFiberUnmount(yi,n)}catch(s){}switch(n.tag){case 5:cf||pf(n,t);case 6:var r=kf,o=Cf;kf=null,Pf(e,t,n),Cf=o,null!==(kf=r)&&(Cf?(e=kf,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):kf.removeChild(n.stateNode));break;case 18:null!==kf&&(Cf?(e=kf,n=n.stateNode,8===e.nodeType?xl(e.parentNode,n):1===e.nodeType&&xl(e,n),na(e)):xl(kf,n.stateNode));break;case 4:r=kf,o=Cf,kf=n.stateNode.containerInfo,Cf=!0,Pf(e,t,n),kf=r,Cf=o;break;case 0:case 11:case 14:case 15:if(!cf&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,void 0!==a&&(0!=(2&i)||0!=(4&i))&&hf(n,t,a),o=o.next}while(o!==r)}Pf(e,t,n);break;case 1:if(!cf&&(pf(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){zp(n,t,s)}Pf(e,t,n);break;case 21:Pf(e,t,n);break;case 22:1&n.mode?(cf=(r=cf)||null!==n.memoizedState,Pf(e,t,n),cf=r):Pf(e,t,n);break;default:Pf(e,t,n)}}function Tf(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new df),t.forEach((function(t){var r=Hp.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Rf(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,a=t,s=a;e:for(;null!==s;){switch(s.tag){case 5:kf=s.stateNode,Cf=!1;break e;case 3:case 4:kf=s.stateNode.containerInfo,Cf=!0;break e}s=s.return}if(null===kf)throw Error(yr(160));_f(i,a,o),kf=null,Cf=!1;var l=o.alternate;null!==l&&(l.return=null),o.return=null}catch(u){zp(o,t,u)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)Df(t,e),t=t.sibling}function Df(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Rf(t,e),Af(e),4&r){try{gf(3,e,e.return),vf(3,e)}catch(m){zp(e,e.return,m)}try{gf(5,e,e.return)}catch(m){zp(e,e.return,m)}}break;case 1:Rf(t,e),Af(e),512&r&&null!==n&&pf(n,n.return);break;case 5:if(Rf(t,e),Af(e),512&r&&null!==n&&pf(n,n.return),32&e.flags){var o=e.stateNode;try{Po(o,"")}catch(m){zp(e,e.return,m)}}if(4&r&&null!=(o=e.stateNode)){var i=e.memoizedProps,a=null!==n?n.memoizedProps:i,s=e.type,l=e.updateQueue;if(e.updateQueue=null,null!==l)try{"input"===s&&"radio"===i.type&&null!=i.name&&co(o,i),Lo(s,a);var u=Lo(s,i);for(a=0;a<l.length;a+=2){var c=l[a],d=l[a+1];"style"===c?Do(o,d):"dangerouslySetInnerHTML"===c?Co(o,d):"children"===c?Po(o,d):Mr(o,c,d,u)}switch(s){case"input":fo(o,i);break;case"textarea":bo(o,i);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var p=i.value;null!=p?go(o,!!i.multiple,p,!1):f!==!!i.multiple&&(null!=i.defaultValue?go(o,!!i.multiple,i.defaultValue,!0):go(o,!!i.multiple,i.multiple?[]:"",!1))}o[Pl]=i}catch(m){zp(e,e.return,m)}}break;case 6:if(Rf(t,e),Af(e),4&r){if(null===e.stateNode)throw Error(yr(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(m){zp(e,e.return,m)}}break;case 3:if(Rf(t,e),Af(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{na(t.containerInfo)}catch(m){zp(e,e.return,m)}break;case 4:default:Rf(t,e),Af(e);break;case 13:Rf(t,e),Af(e),8192&(o=e.child).flags&&(i=null!==o.memoizedState,o.stateNode.isHidden=i,!i||null!==o.alternate&&null!==o.alternate.memoizedState||(tp=di())),4&r&&Tf(e);break;case 22:if(c=null!==n&&null!==n.memoizedState,1&e.mode?(cf=(u=cf)||c,Rf(t,e),cf=u):Rf(t,e),Af(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!c&&0!=(1&e.mode))for(ff=e,c=e.child;null!==c;){for(d=ff=c;null!==ff;){switch(p=(f=ff).child,f.tag){case 0:case 11:case 14:case 15:gf(4,f,f.return);break;case 1:pf(f,f.return);var h=f.stateNode;if("function"==typeof h.componentWillUnmount){r=f,n=f.return;try{t=r,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(m){zp(r,n,m)}}break;case 5:pf(f,f.return);break;case 22:if(null!==f.memoizedState){Ff(d);continue}}null!==p?(p.return=f,ff=p):Ff(d)}c=c.sibling}e:for(c=null,d=e;;){if(5===d.tag){if(null===c){c=d;try{o=d.stateNode,u?"function"==typeof(i=o.style).setProperty?i.setProperty("display","none","important"):i.display="none":(s=d.stateNode,a=null!=(l=d.memoizedProps.style)&&l.hasOwnProperty("display")?l.display:null,s.style.display=Ro("display",a))}catch(m){zp(e,e.return,m)}}}else if(6===d.tag){if(null===c)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){zp(e,e.return,m)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Rf(t,e),Af(e),4&r&&Tf(e);case 21:}}function Af(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(wf(n)){var r=n;break e}n=n.return}throw Error(yr(160))}switch(r.tag){case 5:var o=r.stateNode;32&r.flags&&(Po(o,""),r.flags&=-33),Sf(e,xf(e),o);break;case 3:case 4:var i=r.stateNode.containerInfo;Ef(e,xf(e),i);break;default:throw Error(yr(161))}}catch(a){zp(e,e.return,a)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Mf(e,t,n){ff=e,Lf(e)}function Lf(e,t,n){for(var r=0!=(1&e.mode);null!==ff;){var o=ff,i=o.child;if(22===o.tag&&r){var a=null!==o.memoizedState||uf;if(!a){var s=o.alternate,l=null!==s&&null!==s.memoizedState||cf;s=uf;var u=cf;if(uf=a,(cf=l)&&!u)for(ff=o;null!==ff;)l=(a=ff).child,22===a.tag&&null!==a.memoizedState?If(o):null!==l?(l.return=a,ff=l):If(o);for(;null!==i;)ff=i,Lf(i),i=i.sibling;ff=o,uf=s,cf=u}Of(e)}else 0!=(8772&o.subtreeFlags)&&null!==i?(i.return=o,ff=i):Of(e)}}function Of(e){for(;null!==ff;){var t=ff;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:cf||vf(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!cf)if(null===n)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Ru(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;null!==i&&Gu(t,i,r);break;case 3:var a=t.updateQueue;if(null!==a){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Gu(t,a,n)}break;case 5:var s=t.stateNode;if(null===n&&4&t.flags){n=s;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:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var c=u.memoizedState;if(null!==c){var d=c.dehydrated;null!==d&&na(d)}}}break;default:throw Error(yr(163))}cf||512&t.flags&&yf(t)}catch(f){zp(t,t.return,f)}}if(t===e){ff=null;break}if(null!==(n=t.sibling)){n.return=t.return,ff=n;break}ff=t.return}}function Ff(e){for(;null!==ff;){var t=ff;if(t===e){ff=null;break}var n=t.sibling;if(null!==n){n.return=t.return,ff=n;break}ff=t.return}}function If(e){for(;null!==ff;){var t=ff;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{vf(4,t)}catch(l){zp(t,n,l)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(l){zp(t,o,l)}}var i=t.return;try{yf(t)}catch(l){zp(t,i,l)}break;case 5:var a=t.return;try{yf(t)}catch(l){zp(t,a,l)}}}catch(l){zp(t,t.return,l)}if(t===e){ff=null;break}var s=t.sibling;if(null!==s){s.return=t.return,ff=s;break}ff=t.return}}var Nf,zf=Math.ceil,Bf=Lr.ReactCurrentDispatcher,Vf=Lr.ReactCurrentOwner,jf=Lr.ReactCurrentBatchConfig,Hf=0,Uf=null,Wf=null,$f=0,Kf=0,Xf=Nl(0),Yf=0,qf=null,Qf=0,Gf=0,Zf=0,Jf=null,ep=null,tp=0,np=1/0,rp=null,op=!1,ip=null,ap=null,sp=!1,lp=null,up=0,cp=0,dp=null,fp=-1,pp=0;function hp(){return 0!=(6&Hf)?di():-1!==fp?fp:fp=di()}function mp(e){return 0==(1&e.mode)?1:0!=(2&Hf)&&0!==$f?$f&-$f:null!==Tu.transition?(0===pp&&(pp=Ri()),pp):0!==(e=Li)?e:e=void 0===(e=window.event)?16:ca(e.type)}function gp(e,t,n,r){if(50<cp)throw cp=0,dp=null,Error(yr(185));Ai(e,n,r),0!=(2&Hf)&&e===Uf||(e===Uf&&(0==(2&Hf)&&(Gf|=n),4===Yf&&xp(e,$f)),vp(e,r),1===n&&0===Hf&&0==(1&t.mode)&&(np=di()+500,Zl&&tu()))}function vp(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-wi(i),s=1<<a,l=o[a];-1===l?0!=(s&n)&&0==(s&r)||(o[a]=_i(s,t)):l<=t&&(e.expiredLanes|=s),i&=~s}}(e,t);var r=Pi(e,e===Uf?$f:0);if(0===r)null!==n&&li(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&li(n),1===t)0===e.tag?function(e){Zl=!0,eu(e)}(Ep.bind(null,e)):eu(Ep.bind(null,e)),bl((function(){0==(6&Hf)&&tu()})),n=null;else{switch(Oi(r)){case 1:n=pi;break;case 4:n=hi;break;case 16:default:n=mi;break;case 536870912:n=vi}n=Up(n,yp.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function yp(e,t){if(fp=-1,pp=0,0!=(6&Hf))throw Error(yr(327));var n=e.callbackNode;if(Ip()&&e.callbackNode!==n)return null;var r=Pi(e,e===Uf?$f:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=Dp(e,r);else{t=r;var o=Hf;Hf|=2;var i=Tp();for(Uf===e&&$f===t||(rp=null,np=di()+500,Pp(e,t));;)try{Mp();break}catch(s){_p(e,s)}Ou(),Bf.current=i,Hf=o,null!==Wf?t=0:(Uf=null,$f=0,t=Yf)}if(0!==t){if(2===t&&(0!==(o=Ti(e))&&(r=o,t=bp(e,o))),1===t)throw n=qf,Pp(e,0),xp(e,r),vp(e,di()),n;if(6===t)xp(e,r);else{if(o=e.current.alternate,0==(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!ws(i(),o))return!1}catch(a){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)&&(2===(t=Dp(e,r))&&(0!==(i=Ti(e))&&(r=i,t=bp(e,i))),1===t))throw n=qf,Pp(e,0),xp(e,r),vp(e,di()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(yr(345));case 2:case 5:Fp(e,ep,rp);break;case 3:if(xp(e,r),(130023424&r)===r&&10<(t=tp+500-di())){if(0!==Pi(e,0))break;if(((o=e.suspendedLanes)&r)!==r){hp(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=gl(Fp.bind(null,e,ep,rp),t);break}Fp(e,ep,rp);break;case 4:if(xp(e,r),(4194240&r)===r)break;for(t=e.eventTimes,o=-1;0<r;){var a=31-wi(r);i=1<<a,(a=t[a])>o&&(o=a),r&=~i}if(r=o,10<(r=(120>(r=di()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*zf(r/1960))-r)){e.timeoutHandle=gl(Fp.bind(null,e,ep,rp),r);break}Fp(e,ep,rp);break;default:throw Error(yr(329))}}}return vp(e,di()),e.callbackNode===n?yp.bind(null,e):null}function bp(e,t){var n=Jf;return e.current.memoizedState.isDehydrated&&(Pp(e,t).flags|=256),2!==(e=Dp(e,t))&&(t=ep,ep=n,null!==t&&wp(t)),e}function wp(e){null===ep?ep=e:ep.push.apply(ep,e)}function xp(e,t){for(t&=~Zf,t&=~Gf,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-wi(t),r=1<<n;e[n]=-1,t&=~r}}function Ep(e){if(0!=(6&Hf))throw Error(yr(327));Ip();var t=Pi(e,0);if(0==(1&t))return vp(e,di()),null;var n=Dp(e,t);if(0!==e.tag&&2===n){var r=Ti(e);0!==r&&(t=r,n=bp(e,r))}if(1===n)throw n=qf,Pp(e,0),xp(e,t),vp(e,di()),n;if(6===n)throw Error(yr(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Fp(e,ep,rp),vp(e,di()),null}function Sp(e,t){var n=Hf;Hf|=1;try{return e(t)}finally{0===(Hf=n)&&(np=di()+500,Zl&&tu())}}function kp(e){null!==lp&&0===lp.tag&&0==(6&Hf)&&Ip();var t=Hf;Hf|=1;var n=jf.transition,r=Li;try{if(jf.transition=null,Li=1,e)return e()}finally{Li=r,jf.transition=n,0==(6&(Hf=t))&&tu()}}function Cp(){Kf=Xf.current,zl(Xf)}function Pp(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,vl(n)),null!==Wf)for(n=Wf.return;null!==n;){var r=n;switch(hu(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Kl();break;case 3:vc(),zl(Hl),zl(jl),Sc();break;case 5:bc(r);break;case 4:vc();break;case 13:case 19:zl(wc);break;case 10:Fu(r.type._context);break;case 22:case 23:Cp()}n=n.return}if(Uf=e,Wf=e=Xp(e.current,null),$f=Kf=t,Yf=0,qf=null,Zf=Gf=Qf=0,ep=Jf=null,null!==Bu){for(t=0;t<Bu.length;t++)if(null!==(r=(n=Bu[t]).interleaved)){n.interleaved=null;var o=r.next,i=n.pending;if(null!==i){var a=i.next;i.next=o,r.next=a}n.pending=r}Bu=null}return e}function _p(e,t){for(;;){var n=Wf;try{if(Ou(),kc.current=yd,Dc){for(var r=_c.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}Dc=!1}if(Pc=0,Rc=Tc=_c=null,Ac=!1,Mc=0,Vf.current=null,null===n||null===n.return){Yf=1,qf=t,Wf=null;break}e:{var i=e,a=n.return,s=n,l=t;if(t=$f,s.flags|=32768,null!==l&&"object"==typeof l&&"function"==typeof l.then){var u=l,c=s,d=c.tag;if(0==(1&c.mode)&&(0===d||11===d||15===d)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=Rd(a);if(null!==p){p.flags&=-257,Dd(p,a,s,0,t),1&p.mode&&Td(i,u,t),l=u;var h=(t=p).updateQueue;if(null===h){var m=new Set;m.add(l),t.updateQueue=m}else h.add(l);break e}if(0==(1&t)){Td(i,u,t),Rp();break e}l=Error(yr(426))}else if(vu&&1&s.mode){var g=Rd(a);if(null!==g){0==(65536&g.flags)&&(g.flags|=256),Dd(g,a,s,0,t),_u(Ed(l,s));break e}}i=l=Ed(l,s),4!==Yf&&(Yf=2),null===Jf?Jf=[i]:Jf.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t,qu(i,Pd(0,l,t));break e;case 1:s=l;var v=i.type,y=i.stateNode;if(0==(128&i.flags)&&("function"==typeof v.getDerivedStateFromError||null!==y&&"function"==typeof y.componentDidCatch&&(null===ap||!ap.has(y)))){i.flags|=65536,t&=-t,i.lanes|=t,qu(i,_d(i,s,t));break e}}i=i.return}while(null!==i)}Op(n)}catch(b){t=b,Wf===n&&null!==n&&(Wf=n=n.return);continue}break}}function Tp(){var e=Bf.current;return Bf.current=yd,null===e?yd:e}function Rp(){0!==Yf&&3!==Yf&&2!==Yf||(Yf=4),null===Uf||0==(268435455&Qf)&&0==(268435455&Gf)||xp(Uf,$f)}function Dp(e,t){var n=Hf;Hf|=2;var r=Tp();for(Uf===e&&$f===t||(rp=null,Pp(e,t));;)try{Ap();break}catch(o){_p(e,o)}if(Ou(),Hf=n,Bf.current=r,null!==Wf)throw Error(yr(261));return Uf=null,$f=0,Yf}function Ap(){for(;null!==Wf;)Lp(Wf)}function Mp(){for(;null!==Wf&&!ui();)Lp(Wf)}function Lp(e){var t=Nf(e.alternate,e,Kf);e.memoizedProps=e.pendingProps,null===t?Op(e):Wf=t,Vf.current=null}function Op(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=sf(n,t,Kf)))return void(Wf=n)}else{if(null!==(n=lf(n,t)))return n.flags&=32767,void(Wf=n);if(null===e)return Yf=6,void(Wf=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Wf=t);Wf=t=e}while(null!==t);0===Yf&&(Yf=5)}function Fp(e,t,n){var r=Li,o=jf.transition;try{jf.transition=null,Li=1,function(e,t,n,r){do{Ip()}while(null!==lp);if(0!=(6&Hf))throw Error(yr(327));n=e.finishedWork;var o=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(yr(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(function(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 o=31-wi(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}(e,i),e===Uf&&(Wf=Uf=null,$f=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||sp||(sp=!0,Up(mi,(function(){return Ip(),null}))),i=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||i){i=jf.transition,jf.transition=null;var a=Li;Li=1;var s=Hf;Hf|=4,Vf.current=null,function(e,t){if(pl=oa,Ps(e=Cs())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch(w){n=null;break e}var a=0,s=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||0!==o&&3!==d.nodeType||(s=a+o),d!==i||0!==r&&3!==d.nodeType||(l=a+r),3===d.nodeType&&(a+=d.nodeValue.length),null!==(p=d.firstChild);)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===o&&(s=a),f===i&&++c===r&&(l=a),null!==(p=d.nextSibling))break;f=(d=f).parentNode}d=p}n=-1===s||-1===l?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(hl={focusedElem:e,selectionRange:n},oa=!1,ff=t;null!==ff;)if(e=(t=ff).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,ff=e;else for(;null!==ff;){t=ff;try{var h=t.alternate;if(0!=(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==h){var m=h.memoizedProps,g=h.memoizedState,v=t.stateNode,y=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:Ru(t.type,m),g);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(yr(163))}}catch(w){zp(t,t.return,w)}if(null!==(e=t.sibling)){e.return=t.return,ff=e;break}ff=t.return}h=mf,mf=!1}(e,n),Df(n,e),_s(hl),oa=!!pl,hl=pl=null,e.current=n,Mf(n),ci(),Hf=s,Li=a,jf.transition=i}else e.current=n;if(sp&&(sp=!1,lp=e,up=o),i=e.pendingLanes,0===i&&(ap=null),function(e){if(bi&&"function"==typeof bi.onCommitFiberRoot)try{bi.onCommitFiberRoot(yi,e,void 0,128==(128&e.current.flags))}catch(t){}}(n.stateNode),vp(e,di()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(op)throw op=!1,e=ip,ip=null,e;0!=(1&up)&&0!==e.tag&&Ip(),i=e.pendingLanes,0!=(1&i)?e===dp?cp++:(cp=0,dp=e):cp=0,tu()}(e,t,n,r)}finally{jf.transition=o,Li=r}return null}function Ip(){if(null!==lp){var e=Oi(up),t=jf.transition,n=Li;try{if(jf.transition=null,Li=16>e?16:e,null===lp)var r=!1;else{if(e=lp,lp=null,up=0,0!=(6&Hf))throw Error(yr(331));var o=Hf;for(Hf|=4,ff=e.current;null!==ff;){var i=ff,a=i.child;if(0!=(16&ff.flags)){var s=i.deletions;if(null!==s){for(var l=0;l<s.length;l++){var u=s[l];for(ff=u;null!==ff;){var c=ff;switch(c.tag){case 0:case 11:case 15:gf(8,c,i)}var d=c.child;if(null!==d)d.return=c,ff=d;else for(;null!==ff;){var f=(c=ff).sibling,p=c.return;if(bf(c),c===u){ff=null;break}if(null!==f){f.return=p,ff=f;break}ff=p}}}var h=i.alternate;if(null!==h){var m=h.child;if(null!==m){h.child=null;do{var g=m.sibling;m.sibling=null,m=g}while(null!==m)}}ff=i}}if(0!=(2064&i.subtreeFlags)&&null!==a)a.return=i,ff=a;else e:for(;null!==ff;){if(0!=(2048&(i=ff).flags))switch(i.tag){case 0:case 11:case 15:gf(9,i,i.return)}var v=i.sibling;if(null!==v){v.return=i.return,ff=v;break e}ff=i.return}}var y=e.current;for(ff=y;null!==ff;){var b=(a=ff).child;if(0!=(2064&a.subtreeFlags)&&null!==b)b.return=a,ff=b;else e:for(a=y;null!==ff;){if(0!=(2048&(s=ff).flags))try{switch(s.tag){case 0:case 11:case 15:vf(9,s)}}catch(x){zp(s,s.return,x)}if(s===a){ff=null;break e}var w=s.sibling;if(null!==w){w.return=s.return,ff=w;break e}ff=s.return}}if(Hf=o,tu(),bi&&"function"==typeof bi.onPostCommitFiberRoot)try{bi.onPostCommitFiberRoot(yi,e)}catch(x){}r=!0}return r}finally{Li=n,jf.transition=t}}return!1}function Np(e,t,n){e=Xu(e,t=Pd(0,t=Ed(n,t),1),1),t=hp(),null!==e&&(Ai(e,1,t),vp(e,t))}function zp(e,t,n){if(3===e.tag)Np(e,e,n);else for(;null!==t;){if(3===t.tag){Np(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===ap||!ap.has(r))){t=Xu(t,e=_d(t,e=Ed(n,e),1),1),e=hp(),null!==t&&(Ai(t,1,e),vp(t,e));break}}t=t.return}}function Bp(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=hp(),e.pingedLanes|=e.suspendedLanes&n,Uf===e&&($f&n)===n&&(4===Yf||3===Yf&&(130023424&$f)===$f&&500>di()-tp?Pp(e,0):Zf|=n),vp(e,t)}function Vp(e,t){0===t&&(0==(1&e.mode)?t=1:(t=ki,0==(130023424&(ki<<=1))&&(ki=4194304)));var n=hp();null!==(e=Hu(e,t))&&(Ai(e,t,n),vp(e,n))}function jp(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Vp(e,n)}function Hp(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(yr(314))}null!==r&&r.delete(t),Vp(e,n)}function Up(e,t){return si(e,t)}function Wp(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 $p(e,t,n,r){return new Wp(e,t,n,r)}function Kp(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Xp(e,t){var n=e.alternate;return null===n?((n=$p(e.tag,t,e.key,e.mode)).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=14680064&e.flags,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=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Yp(e,t,n,r,o,i){var a=2;if(r=e,"function"==typeof e)Kp(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case Ir:return qp(n.children,o,i,t);case Nr:a=8,o|=8;break;case zr:return(e=$p(12,n,t,2|o)).elementType=zr,e.lanes=i,e;case Hr:return(e=$p(13,n,t,o)).elementType=Hr,e.lanes=i,e;case Ur:return(e=$p(19,n,t,o)).elementType=Ur,e.lanes=i,e;case Kr:return Qp(n,o,i,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case Br:a=10;break e;case Vr:a=9;break e;case jr:a=11;break e;case Wr:a=14;break e;case $r:a=16,r=null;break e}throw Error(yr(130,null==e?e:typeof e,""))}return(t=$p(a,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function qp(e,t,n,r){return(e=$p(7,e,r,t)).lanes=n,e}function Qp(e,t,n,r){return(e=$p(22,e,r,t)).elementType=Kr,e.lanes=n,e.stateNode={isHidden:!1},e}function Gp(e,t,n){return(e=$p(6,e,null,t)).lanes=n,e}function Zp(e,t,n){return(t=$p(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Jp(e,t,n,r,o){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=Di(0),this.expirationTimes=Di(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Di(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function eh(e,t,n,r,o,i,a,s,l){return e=new Jp(e,t,n,s,l),1===t?(t=1,!0===i&&(t|=8)):t=0,i=$p(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Wu(i),e}function th(e){if(!e)return Vl;e:{if(ni(e=e._reactInternals)!==e||1!==e.tag)throw Error(yr(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if($l(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(yr(171))}if(1===e.tag){var n=e.type;if($l(n))return Yl(e,n,t)}return t}function nh(e,t,n,r,o,i,a,s,l){return(e=eh(n,r,!0,e,0,i,0,s,l)).context=th(null),n=e.current,(i=Ku(r=hp(),o=mp(n))).callback=null!=t?t:null,Xu(n,i,o),e.current.lanes=o,Ai(e,o,r),vp(e,r),e}function rh(e,t,n,r){var o=t.current,i=hp(),a=mp(o);return n=th(n),null===t.context?t.context=n:t.pendingContext=n,(t=Ku(i,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Xu(o,t,a))&&(gp(e,o,a,i),Yu(e,o,a)),a}function oh(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function ih(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function ah(e,t){ih(e,t),(e=e.alternate)&&ih(e,t)}Nf=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Hl.current)Md=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return Md=!1,function(e,t,n){switch(t.tag){case 3:Hd(t),Pu();break;case 5:yc(t);break;case 1:$l(t.type)&&ql(t);break;case 4:gc(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Bl(Du,r._currentValue),r._currentValue=o;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Bl(wc,1&wc.current),t.flags|=128,null):0!=(n&t.child.childLanes)?Qd(e,t,n):(Bl(wc,1&wc.current),null!==(e=rf(e,t,n))?e.sibling:null);Bl(wc,1&wc.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return tf(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),Bl(wc,wc.current),r)break;return null;case 22:case 23:return t.lanes=0,Nd(e,t,n)}return rf(e,t,n)}(e,t,n);Md=0!=(131072&e.flags)}else Md=!1,vu&&0!=(1048576&t.flags)&&fu(t,iu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;nf(e,t),e=t.pendingProps;var o=Wl(t,jl.current);Nu(t,n),o=Ic(null,t,r,e,o,n);var i=Nc();return t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,$l(r)?(i=!0,ql(t)):i=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,Wu(t),o.updater=ec,t.stateNode=o,o._reactInternals=t,oc(t,r,e,n),t=jd(null,t,r,!0,i,n)):(t.tag=0,vu&&i&&pu(t),Ld(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(nf(e,t),e=t.pendingProps,r=(o=r._init)(r._payload),t.type=r,o=t.tag=function(e){if("function"==typeof e)return Kp(e)?1:0;if(null!=e){if((e=e.$$typeof)===jr)return 11;if(e===Wr)return 14}return 2}(r),e=Ru(r,e),o){case 0:t=Bd(null,t,r,e,n);break e;case 1:t=Vd(null,t,r,e,n);break e;case 11:t=Od(null,t,r,e,n);break e;case 14:t=Fd(null,t,r,Ru(r.type,e),n);break e}throw Error(yr(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,Bd(e,t,r,o=t.elementType===r?o:Ru(r,o),n);case 1:return r=t.type,o=t.pendingProps,Vd(e,t,r,o=t.elementType===r?o:Ru(r,o),n);case 3:e:{if(Hd(t),null===e)throw Error(yr(387));r=t.pendingProps,o=(i=t.memoizedState).element,$u(e,t),Qu(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated){if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,256&t.flags){t=Ud(e,t,r,n,o=Ed(Error(yr(423)),t));break e}if(r!==o){t=Ud(e,t,r,n,o=Ed(Error(yr(424)),t));break e}for(gu=El(t.stateNode.containerInfo.firstChild),mu=t,vu=!0,yu=null,n=cc(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(Pu(),r===o){t=rf(e,t,n);break e}Ld(e,t,r,n)}t=t.child}return t;case 5:return yc(t),null===e&&Eu(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,a=o.children,ml(r,o)?a=null:null!==i&&ml(r,i)&&(t.flags|=32),zd(e,t),Ld(e,t,a,n),t.child;case 6:return null===e&&Eu(t),null;case 13:return Qd(e,t,n);case 4:return gc(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=uc(t,null,r,n):Ld(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,Od(e,t,r,o=t.elementType===r?o:Ru(r,o),n);case 7:return Ld(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ld(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,Bl(Du,r._currentValue),r._currentValue=a,null!==i)if(ws(i.value,a)){if(i.children===o.children&&!Hl.current){t=rf(e,t,n);break e}}else for(null!==(i=t.child)&&(i.return=t);null!==i;){var s=i.dependencies;if(null!==s){a=i.child;for(var l=s.firstContext;null!==l;){if(l.context===r){if(1===i.tag){(l=Ku(-1,n&-n)).tag=2;var u=i.updateQueue;if(null!==u){var c=(u=u.shared).pending;null===c?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,null!==(l=i.alternate)&&(l.lanes|=n),Iu(i.return,n,t),s.lanes|=n;break}l=l.next}}else if(10===i.tag)a=i.type===t.type?null:i.child;else if(18===i.tag){if(null===(a=i.return))throw Error(yr(341));a.lanes|=n,null!==(s=a.alternate)&&(s.lanes|=n),Iu(a,n,t),a=i.sibling}else a=i.child;if(null!==a)a.return=i;else for(a=i;null!==a;){if(a===t){a=null;break}if(null!==(i=a.sibling)){i.return=a.return,a=i;break}a=a.return}i=a}Ld(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Nu(t,n),r=r(o=zu(o)),t.flags|=1,Ld(e,t,r,n),t.child;case 14:return o=Ru(r=t.type,t.pendingProps),Fd(e,t,r,o=Ru(r.type,o),n);case 15:return Id(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ru(r,o),nf(e,t),t.tag=1,$l(r)?(e=!0,ql(t)):e=!1,Nu(t,n),nc(t,r,o),oc(t,r,o,n),jd(null,t,r,!0,e,n);case 19:return tf(e,t,n);case 22:return Nd(e,t,n)}throw Error(yr(156,t.tag))};var sh="function"==typeof reportError?reportError:function(e){console.error(e)};function lh(e){this._internalRoot=e}function uh(e){this._internalRoot=e}function ch(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function dh(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function fh(){}function ph(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i;if("function"==typeof o){var s=o;o=function(){var e=oh(a);s.call(e)}}rh(t,a,e,o)}else a=function(e,t,n,r,o){if(o){if("function"==typeof r){var i=r;r=function(){var e=oh(a);i.call(e)}}var a=nh(t,r,e,0,null,!1,0,"",fh);return e._reactRootContainer=a,e[_l]=a.current,tl(8===e.nodeType?e.parentNode:e),kp(),a}for(;o=e.lastChild;)e.removeChild(o);if("function"==typeof r){var s=r;r=function(){var e=oh(l);s.call(e)}}var l=eh(e,0,!1,null,0,!1,0,"",fh);return e._reactRootContainer=l,e[_l]=l.current,tl(8===e.nodeType?e.parentNode:e),kp((function(){rh(t,l,n,r)})),l}(n,t,e,o,r);return oh(a)}uh.prototype.render=lh.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(yr(409));rh(e,t,null,null)},uh.prototype.unmount=lh.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;kp((function(){rh(null,e,null,null)})),t[_l]=null}},uh.prototype.unstable_scheduleHydration=function(e){if(e){var t=zi();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Xi.length&&0!==t&&t<Xi[n].priority;n++);Xi.splice(n,0,e),0===n&&Gi(e)}},Fi=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ci(t.pendingLanes);0!==n&&(Mi(t,1|n),vp(t,di()),0==(6&Hf)&&(np=di()+500,tu()))}break;case 13:kp((function(){var t=Hu(e,1);if(null!==t){var n=hp();gp(t,e,1,n)}})),ah(e,1)}},Ii=function(e){if(13===e.tag){var t=Hu(e,134217728);if(null!==t)gp(t,e,134217728,hp());ah(e,134217728)}},Ni=function(e){if(13===e.tag){var t=mp(e),n=Hu(e,t);if(null!==n)gp(n,e,t,hp());ah(e,t)}},zi=function(){return Li},Bi=function(e,t){var n=Li;try{return Li=e,t()}finally{Li=n}},Io=function(e,t,n){switch(t){case"input":if(fo(e,n),t=n.name,"radio"===n.type&&null!=t){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 o=Ol(r);if(!o)throw Error(yr(90));ao(r),fo(r,o)}}}break;case"textarea":bo(e,n);break;case"select":null!=(t=n.value)&&go(e,!!n.multiple,t,!1)}},Ho=Sp,Uo=kp;var hh={usingClientEntryPoint:!1,Events:[Ml,Ll,Ol,Vo,jo,Sp]},mh={findFiberByHostInstance:Al,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},gh={bundleType:mh.bundleType,version:mh.version,rendererPackageName:mh.rendererPackageName,rendererConfig:mh.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Lr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=ii(e))?null:e.stateNode},findFiberByHostInstance:mh.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var vh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vh.isDisabled&&vh.supportsFiber)try{yi=vh.inject(gh),bi=vh}catch(ko){}}fr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=hh,fr.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ch(t))throw Error(yr(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Fr,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},fr.createRoot=function(e,t){if(!ch(e))throw Error(yr(299));var n=!1,r="",o=sh;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=eh(e,1,!1,null,0,n,0,r,o),e[_l]=t.current,tl(8===e.nodeType?e.parentNode:e),new lh(t)},fr.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(yr(188));throw e=Object.keys(e).join(","),Error(yr(268,e))}return e=null===(e=ii(t))?null:e.stateNode},fr.flushSync=function(e){return kp(e)},fr.hydrate=function(e,t,n){if(!dh(t))throw Error(yr(200));return ph(null,e,t,!0,n)},fr.hydrateRoot=function(e,t,n){if(!ch(e))throw Error(yr(405));var r=null!=n&&n.hydratedSources||null,o=!1,i="",a=sh;if(null!=n&&(!0===n.unstable_strictMode&&(o=!0),void 0!==n.identifierPrefix&&(i=n.identifierPrefix),void 0!==n.onRecoverableError&&(a=n.onRecoverableError)),t=nh(t,null,e,1,null!=n?n:null,o,0,i,a),e[_l]=t.current,tl(e),r)for(e=0;e<r.length;e++)o=(o=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new uh(t)},fr.render=function(e,t,n){if(!dh(t))throw Error(yr(200));return ph(null,e,t,!1,n)},fr.unmountComponentAtNode=function(e){if(!dh(e))throw Error(yr(40));return!!e._reactRootContainer&&(kp((function(){ph(null,null,e,!1,(function(){e._reactRootContainer=null,e[_l]=null}))})),!0)},fr.unstable_batchedUpdates=Sp,fr.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!dh(n))throw Error(yr(200));if(null==e||void 0===e._reactInternals)throw Error(yr(38));return ph(e,t,n,!1,r)},fr.version="18.2.0-next-9e3b772b8-20220608",function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),dr.exports=fr;var yh=dr.exports;const bh=l(yh),wh=W.forwardRef(((e,t)=>{const{children:n,...r}=e,o=W.Children.toArray(n),i=o.find(Sh);if(i){const e=i.props.children,n=o.map((t=>t===i?W.Children.count(e)>1?W.Children.only(null):W.isValidElement(e)?e.props.children:null:t));return W.createElement(xh,Jn({},r,{ref:t}),W.isValidElement(e)?W.cloneElement(e,void 0,n):null)}return W.createElement(xh,Jn({},r,{ref:t}),n)}));wh.displayName="Slot";const xh=W.forwardRef(((e,t)=>{const{children:n,...r}=e;return W.isValidElement(n)?W.cloneElement(n,{...kh(r,n.props),ref:nr(t,n.ref)}):W.Children.count(n)>1?W.Children.only(null):null}));xh.displayName="SlotClone";const Eh=({children:e})=>W.createElement(W.Fragment,null,e);function Sh(e){return W.isValidElement(e)&&e.type===Eh}function kh(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const Ch=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const n=W.forwardRef(((e,n)=>{const{asChild:r,...o}=e,i=r?wh:t;return W.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),W.createElement(i,Jn({},o,{ref:n}))}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function Ph(e,t){e&&yh.flushSync((()=>e.dispatchEvent(t)))}const _h="dismissableLayer.update",Th="dismissableLayer.pointerDownOutside",Rh="dismissableLayer.focusOutside";let Dh;const Ah=W.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Mh=W.forwardRef(((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,c=W.useContext(Ah),[d,f]=W.useState(null),p=null!==(n=null==d?void 0:d.ownerDocument)&&void 0!==n?n:null===globalThis||void 0===globalThis?void 0:globalThis.document,[,h]=W.useState({}),m=rr(t,(e=>f(e))),g=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(v),b=d?g.indexOf(d):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,x=b>=y,E=function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=ur(e),r=W.useRef(!1),o=W.useRef((()=>{}));return W.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){Oh(Th,n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}r.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));x&&!n&&(null==i||i(e),null==s||s(e),e.defaultPrevented||null==l||l())}),p),S=function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=ur(e),r=W.useRef(!1);return W.useEffect((()=>{const e=e=>{if(e.target&&!r.current){Oh(Rh,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==a||a(e),null==s||s(e),e.defaultPrevented||null==l||l())}),p);return function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=ur(e);W.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)}),[n,t])}((e=>{b===c.layers.size-1&&(null==o||o(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))}),p),W.useEffect((()=>{if(d)return r&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(Dh=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),Lh(),()=>{r&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=Dh)}}),[d,p,r,c]),W.useEffect((()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),Lh())}),[d,c]),W.useEffect((()=>{const e=()=>h({});return document.addEventListener(_h,e),()=>document.removeEventListener(_h,e)}),[]),W.createElement(Ch.div,Jn({},u,{ref:m,style:{pointerEvents:w?x?"auto":"none":void 0,...e.style},onFocusCapture:or(e.onFocusCapture,S.onFocusCapture),onBlurCapture:or(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:or(e.onPointerDownCapture,E.onPointerDownCapture)}))}));function Lh(){const e=new CustomEvent(_h);document.dispatchEvent(e)}function Oh(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Ph(o,i):o.dispatchEvent(i)}const Fh=Mh,Ih=W.forwardRef(((e,t)=>{const n=W.useContext(Ah),r=W.useRef(null),o=rr(t,r);return W.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),W.createElement(Ch.div,Jn({},e,{ref:o}))})),Nh="focusScope.autoFocusOnMount",zh="focusScope.autoFocusOnUnmount",Bh={bubbles:!1,cancelable:!0},Vh=W.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=W.useState(null),u=ur(o),c=ur(i),d=W.useRef(null),f=rr(t,(e=>l(e))),p=W.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;W.useEffect((()=>{if(r){let e=function(e){if(p.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:Wh(d.current,{select:!0})},t=function(e){!p.paused&&s&&(s.contains(e.relatedTarget)||Wh(d.current,{select:!0}))};return document.addEventListener("focusin",e),document.addEventListener("focusout",t),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t)}}}),[r,s,p.paused]),W.useEffect((()=>{if(s){$h.add(p);const t=document.activeElement;if(!s.contains(t)){const n=new CustomEvent(Nh,Bh);s.addEventListener(Nh,u),s.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Wh(r,{select:t}),document.activeElement!==n)return}((e=jh(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&Wh(s))}return()=>{s.removeEventListener(Nh,u),setTimeout((()=>{const e=new CustomEvent(zh,Bh);s.addEventListener(zh,c),s.dispatchEvent(e),e.defaultPrevented||Wh(null!=t?t:document.body,{select:!0}),s.removeEventListener(zh,c),$h.remove(p)}),0)}}var e}),[s,u,c,p]);const h=W.useCallback((e=>{if(!n&&!r)return;if(p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,i]=function(e){const t=jh(e),n=Hh(t,e),r=Hh(t.reverse(),e);return[n,r]}(t);r&&i?e.shiftKey||o!==i?e.shiftKey&&o===r&&(e.preventDefault(),n&&Wh(i,{select:!0})):(e.preventDefault(),n&&Wh(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,p.paused]);return W.createElement(Ch.div,Jn({tabIndex:-1},a,{ref:f,onKeyDown:h}))}));function jh(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Hh(e,t){for(const n of e)if(!Uh(n,{upTo:t}))return n}function Uh(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Wh(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}const $h=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=Kh(e,t),e.unshift(t)},remove(t){var n;e=Kh(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function Kh(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}const Xh=W.forwardRef(((e,t)=>{var n;const{container:r=(null===globalThis||void 0===globalThis||null===(n=globalThis.document)||void 0===n?void 0:n.body),...o}=e;return r?bh.createPortal(W.createElement(Ch.div,Jn({},o,{ref:t})),r):null}));const Yh=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=W.useState(),r=W.useRef({}),o=W.useRef(e),i=W.useRef("none"),a=e?"mounted":"unmounted",[s,l]=function(e,t){return W.useReducer(((e,n)=>{const r=t[e][n];return null!=r?r:e}),e)}(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return W.useEffect((()=>{const e=qh(r.current);i.current="mounted"===s?e:"none"}),[s]),ir((()=>{const t=r.current,n=o.current;if(n!==e){const r=i.current,a=qh(t);if(e)l("MOUNT");else if("none"===a||"none"===(null==t?void 0:t.display))l("UNMOUNT");else{l(n&&r!==a?"ANIMATION_OUT":"UNMOUNT")}o.current=e}}),[e,l]),ir((()=>{if(t){const e=e=>{const n=qh(r.current).includes(e.animationName);e.target===t&&n&&yh.flushSync((()=>l("ANIMATION_END")))},n=e=>{e.target===t&&(i.current=qh(r.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}l("ANIMATION_END")}),[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:W.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}(t),o="function"==typeof n?n({present:r.isPresent}):W.Children.only(n),i=rr(r.ref,o.ref);return"function"==typeof n||r.isPresent?W.cloneElement(o,{ref:i}):null};function qh(e){return(null==e?void 0:e.animationName)||"none"}Yh.displayName="Presence";let Qh=0;function Gh(){W.useEffect((()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:Zh()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:Zh()),Qh++,()=>{1===Qh&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Qh--}}),[])}function Zh(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Jh=function(){return Jh=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Jh.apply(this,arguments)};function em(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}"function"==typeof SuppressedError&&SuppressedError;var tm="right-scroll-bar-position",nm="width-before-scroll-bar";function rm(e,t){return n=t||null,r=function(t){return e.forEach((function(e){return function(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}(e,t)}))},o=W.useState((function(){return{value:n,callback:r,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}}))[0],o.callback=r,o.facade;var n,r,o}function om(e){return e}var im=function(e){var t=e.sideCar,n=em(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return W.createElement(r,Jh({},n))};im.isSideCarExport=!0;var am=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=om);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var i=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=Jh({async:!0,ssr:!1},e),t}(),sm=function(){},lm=W.forwardRef((function(e,t){var n=W.useRef(null),r=W.useState({onScrollCapture:sm,onWheelCapture:sm,onTouchMoveCapture:sm}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noIsolation,h=e.inert,m=e.allowPinchZoom,g=e.as,v=void 0===g?"div":g,y=em(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),b=f,w=rm([n,t]),x=Jh(Jh({},y),o);return W.createElement(W.Fragment,null,c&&W.createElement(b,{sideCar:am,removeScrollBar:u,shards:d,noIsolation:p,inert:h,setCallbacks:i,allowPinchZoom:!!m,lockRef:n}),a?W.cloneElement(W.Children.only(s),Jh(Jh({},x),{ref:w})):W.createElement(v,Jh({},x,{className:l,ref:w}),s))}));lm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},lm.classNames={fullWidth:nm,zeroRight:tm};function um(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var cm=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=um())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){!--e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},dm=function(){var e,t=(e=cm(),function(t,n){W.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},fm={left:0,top:0,right:0,gap:0},pm=function(e){return parseInt(e||"",10)||0},hm=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return fm;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[pm(n),pm(r),pm(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},mm=dm(),gm=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(tm," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(nm," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(tm," .").concat(tm," {\n right: 0 ").concat(r,";\n }\n \n .").concat(nm," .").concat(nm," {\n margin-right: 0 ").concat(r,";\n }\n \n body {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},vm=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r,i=W.useMemo((function(){return hm(o)}),[o]);return W.createElement(mm,{styles:gm(i,!t,o,n?"":"!important")})},ym=!1;if("undefined"!=typeof window)try{var bm=Object.defineProperty({},"passive",{get:function(){return ym=!0,!0}});window.addEventListener("test",bm,bm),window.removeEventListener("test",bm,bm)}catch(_O){ym=!1}var wm=!!ym&&{passive:!1},xm=function(e,t){var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},Em=function(e,t){var n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),Sm(e,n)){var r=km(e,n);if(r[1]>r[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Sm=function(e,t){return"v"===e?function(e){return xm(e,"overflowY")}(t):function(e){return xm(e,"overflowX")}(t)},km=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},Cm=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Pm=function(e){return[e.deltaX,e.deltaY]},_m=function(e){return e&&"current"in e?e.current:e},Tm=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Rm=0,Dm=[];const Am=(Mm=function(e){var t=W.useRef([]),n=W.useRef([0,0]),r=W.useRef(),o=W.useState(Rm++)[0],i=W.useState((function(){return dm()}))[0],a=W.useRef(e);W.useEffect((function(){a.current=e}),[e]),W.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(_m),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[e.inert,e.lockRef.current,e.shards]);var s=W.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!a.current.allowPinchZoom;var o,i=Cm(e),s=n.current,l="deltaX"in e?e.deltaX:s[0]-i[0],u="deltaY"in e?e.deltaY:s[1]-i[1],c=e.target,d=Math.abs(l)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=Em(d,c);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=Em(d,c)),!f)return!1;if(!r.current&&"changedTouches"in e&&(l||u)&&(r.current=o),!o)return!0;var p=r.current||o;return function(e,t,n,r,o){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,l=t.contains(s),u=!1,c=a>0,d=0,f=0;do{var p=km(e,s),h=p[0],m=p[1]-p[2]-i*h;(h||m)&&Sm(e,s)&&(d+=m,f+=h),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(c&&(o&&0===d||!o&&a>d)||!c&&(o&&0===f||!o&&-a>f))&&(u=!0),u}(p,t,e,"h"===p?l:u,!0)}),[]),l=W.useCallback((function(e){var n=e;if(Dm.length&&Dm[Dm.length-1]===i){var r="deltaY"in n?Pm(n):Cm(n),o=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&(t=e.delta,o=r,t[0]===o[0]&&t[1]===o[1]);var t,o}))[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var l=(a.current.shards||[]).map(_m).filter(Boolean).filter((function(e){return e.contains(n.target)}));(l.length>0?s(n,l[0]):!a.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),u=W.useCallback((function(e,n,r,o){var i={name:e,delta:n,target:r,should:o};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),c=W.useCallback((function(e){n.current=Cm(e),r.current=void 0}),[]),d=W.useCallback((function(t){u(t.type,Pm(t),t.target,s(t,e.lockRef.current))}),[]),f=W.useCallback((function(t){u(t.type,Cm(t),t.target,s(t,e.lockRef.current))}),[]);W.useEffect((function(){return Dm.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,wm),document.addEventListener("touchmove",l,wm),document.addEventListener("touchstart",c,wm),function(){Dm=Dm.filter((function(e){return e!==i})),document.removeEventListener("wheel",l,wm),document.removeEventListener("touchmove",l,wm),document.removeEventListener("touchstart",c,wm)}}),[]);var p=e.removeScrollBar,h=e.inert;return W.createElement(W.Fragment,null,h?W.createElement(i,{styles:Tm(o)}):null,p?W.createElement(vm,{gapMode:"margin"}):null)},am.useMedium(Mm),im);var Mm,Lm=W.forwardRef((function(e,t){return W.createElement(lm,Jh({},e,{ref:t,sideCar:Am}))}));Lm.classNames=lm.classNames;const Om=Lm;var Fm=new WeakMap,Im=new WeakMap,Nm={},zm=0,Bm=function(e){return e&&(e.host||Bm(e.parentNode))},Vm=function(e,t,n,r){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=Bm(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);Nm[n]||(Nm[n]=new WeakMap);var i=Nm[n],a=[],s=new Set,l=new Set(o),u=function(e){e&&!s.has(e)&&(s.add(e),u(e.parentNode))};o.forEach(u);var c=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(s.has(e))c(e);else{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(Fm.get(e)||0)+1,u=(i.get(e)||0)+1;Fm.set(e,l),i.set(e,u),a.push(e),1===l&&o&&Im.set(e,!0),1===u&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}}))};return c(t),s.clear(),zm++,function(){a.forEach((function(e){var t=Fm.get(e)-1,o=i.get(e)-1;Fm.set(e,t),i.set(e,o),t||(Im.has(e)||e.removeAttribute(r),Im.delete(e)),o||e.removeAttribute(n)})),--zm||(Fm=new WeakMap,Fm=new WeakMap,Im=new WeakMap,Nm={})}},jm=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Vm(r,o,n,"aria-hidden")):function(){return null}};const Hm="Dialog",[Um,Wm]=er(Hm),[$m,Km]=Um(Hm),Xm="DialogPortal",[Ym,qm]=Um(Xm,{forceMount:void 0}),Qm="DialogOverlay",Gm=W.forwardRef(((e,t)=>{const n=qm(Qm,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Km(Qm,e.__scopeDialog);return i.modal?W.createElement(Yh,{present:r||i.open},W.createElement(Zm,Jn({},o,{ref:t}))):null})),Zm=W.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Km(Qm,n);return W.createElement(Om,{as:wh,allowPinchZoom:!0,shards:[o.contentRef]},W.createElement(Ch.div,Jn({"data-state":lg(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))})),Jm="DialogContent",eg=W.forwardRef(((e,t)=>{const n=qm(Jm,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Km(Jm,e.__scopeDialog);return W.createElement(Yh,{present:r||i.open},i.modal?W.createElement(tg,Jn({},o,{ref:t})):W.createElement(ng,Jn({},o,{ref:t})))})),tg=W.forwardRef(((e,t)=>{const n=Km(Jm,e.__scopeDialog),r=W.useRef(null),o=rr(t,n.contentRef,r);return W.useEffect((()=>{const e=r.current;if(e)return jm(e)}),[]),W.createElement(rg,Jn({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:or(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null===(t=n.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:or(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:or(e.onFocusOutside,(e=>e.preventDefault()))}))})),ng=W.forwardRef(((e,t)=>{const n=Km(Jm,e.__scopeDialog),r=W.useRef(!1);return W.createElement(rg,Jn({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var o,i;(null===(o=e.onCloseAutoFocus)||void 0===o||o.call(e,t),t.defaultPrevented)||(r.current||null===(i=n.triggerRef.current)||void 0===i||i.focus(),t.preventDefault());r.current=!1},onInteractOutside:t=>{var o,i;null===(o=e.onInteractOutside)||void 0===o||o.call(e,t),t.defaultPrevented||(r.current=!0);const a=t.target;(null===(i=n.triggerRef.current)||void 0===i?void 0:i.contains(a))&&t.preventDefault()}}))})),rg=W.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=Km(Jm,n),l=rr(t,W.useRef(null));return Gh(),W.createElement(W.Fragment,null,W.createElement(Vh,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},W.createElement(Mh,Jn({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":lg(s.open)},a,{ref:l,onDismiss:()=>s.onOpenChange(!1)}))),!1)})),og="DialogTitle",ig=W.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Km(og,n);return W.createElement(Ch.h2,Jn({id:o.titleId},r,{ref:t}))})),ag=W.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Km("DialogDescription",n);return W.createElement(Ch.p,Jn({id:o.descriptionId},r,{ref:t}))})),sg=W.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Km("DialogClose",n);return W.createElement(Ch.button,Jn({type:"button"},r,{ref:t,onClick:or(e.onClick,(()=>o.onOpenChange(!1)))}))}));function lg(e){return e?"open":"closed"}const[ug,cg]=function(e,t){const n=W.createContext(t);function r(e){const{children:t,...r}=e,o=W.useMemo((()=>r),Object.values(r));return W.createElement(n.Provider,{value:o},t)}return r.displayName=e+"Provider",[r,function(r){const o=W.useContext(n);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}("DialogTitleWarning",{contentName:Jm,titleName:og,docsSlug:"dialog"}),dg=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=W.useRef(null),l=W.useRef(null),[u=!1,c]=cr({prop:r,defaultProp:o,onChange:i});return W.createElement($m,{scope:t,triggerRef:s,contentRef:l,contentId:lr(),titleId:lr(),descriptionId:lr(),open:u,onOpenChange:c,onOpenToggle:W.useCallback((()=>c((e=>!e))),[c]),modal:a},n)},fg=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=Km(Xm,t);return W.createElement(Ym,{scope:t,forceMount:n},W.Children.map(r,(e=>W.createElement(Yh,{present:n||i.open},W.createElement(Xh,{asChild:!0,container:o},e)))))},pg=Gm,hg=eg,mg=ig,gg=ag,vg=sg,[yg,bg]=er("AlertDialog",[Wm]),wg=Wm(),xg=W.forwardRef(((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=wg(n);return W.createElement(pg,Jn({},o,r,{ref:t}))})),Eg="AlertDialogContent",[Sg,kg]=yg(Eg),Cg=W.forwardRef(((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,i=wg(n),a=rr(t,W.useRef(null)),s=W.useRef(null);return W.createElement(ug,{contentName:Eg,titleName:Pg,docsSlug:"alert-dialog"},W.createElement(Sg,{scope:n,cancelRef:s},W.createElement(hg,Jn({role:"alertdialog"},i,o,{ref:a,onOpenAutoFocus:or(o.onOpenAutoFocus,(e=>{var t;e.preventDefault(),null===(t=s.current)||void 0===t||t.focus({preventScroll:!0})})),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault()}),W.createElement(Eh,null,r),!1)))})),Pg="AlertDialogTitle",_g=W.forwardRef(((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=wg(n);return W.createElement(mg,Jn({},o,r,{ref:t}))})),Tg=W.forwardRef(((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=wg(n);return W.createElement(gg,Jn({},o,r,{ref:t}))})),Rg=e=>{const{__scopeAlertDialog:t,...n}=e,r=wg(t);return W.createElement(dg,Jn({},r,n,{modal:!0}))},Dg=e=>{const{__scopeAlertDialog:t,...n}=e,r=wg(t);return W.createElement(fg,Jn({},r,n))},Ag=xg,Mg=Cg,Lg=W.forwardRef(((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=wg(n);return W.createElement(vg,Jn({},o,r,{ref:t}))})),Og=W.forwardRef(((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=kg("AlertDialogCancel",n),i=wg(n),a=rr(t,o);return W.createElement(vg,Jn({},i,r,{ref:a}))})),Fg=_g,Ig=Tg;var Ng={},zg=yh;function Bg(e){const t=e+"CollectionProvider",[n,r]=er(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=e+"CollectionSlot",s=e+"CollectionItemSlot",l="data-radix-collection-item";return[{Provider:e=>{const{scope:t,children:n}=e,r=$.useRef(null),i=$.useRef(new Map).current;return $.createElement(o,{scope:t,itemMap:i,collectionRef:r},n)},Slot:$.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=rr(t,i(a,n).collectionRef);return $.createElement(wh,{ref:o},r)})),ItemSlot:$.forwardRef(((e,t)=>{const{scope:n,children:r,...o}=e,a=$.useRef(null),u=rr(t,a),c=i(s,n);return $.useEffect((()=>(c.itemMap.set(a,{ref:a,...o}),()=>{c.itemMap.delete(a)}))),$.createElement(wh,{[l]:"",ref:u},r)}))},function(t){const n=i(e+"CollectionConsumer",t),r=$.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${l}]`)),r=Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)));return r}),[n.collectionRef,n.itemMap]);return r},r]}Ng.createRoot=zg.createRoot,Ng.hydrateRoot=zg.hydrateRoot;const Vg=W.forwardRef(((e,t)=>W.createElement(Ch.span,Jn({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})))),jg="ToastProvider",[Hg,Ug,Wg]=Bg("Toast"),[$g,Kg]=er("Toast",[Wg]),[Xg,Yg]=$g(jg),qg=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=W.useState(null),[u,c]=W.useState(0),d=W.useRef(!1),f=W.useRef(!1);return W.createElement(Hg.Provider,{scope:t},W.createElement(Xg,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:u,viewport:s,onViewportChange:l,onToastAdd:W.useCallback((()=>c((e=>e+1))),[]),onToastRemove:W.useCallback((()=>c((e=>e-1))),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f},a))};qg.propTypes={label(e){if(e.label&&"string"==typeof e.label&&!e.label.trim()){return new Error(`Invalid prop \`label\` supplied to \`${jg}\`. Expected non-empty \`string\`.`)}return null}};const Qg=["F8"],Gg="toast.viewportPause",Zg="toast.viewportResume",Jg=W.forwardRef(((e,t)=>{const{__scopeToast:n,hotkey:r=Qg,label:o="Notifications ({hotkey})",...i}=e,a=Yg("ToastViewport",n),s=Ug(n),l=W.useRef(null),u=W.useRef(null),c=W.useRef(null),d=W.useRef(null),f=rr(t,d,a.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=a.toastCount>0;W.useEffect((()=>{const e=e=>{var t;const n=r.every((t=>e[t]||e.code===t));n&&(null===(t=d.current)||void 0===t||t.focus())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[r]),W.useEffect((()=>{const e=l.current,t=d.current;if(h&&e&&t){const n=()=>{if(!a.isClosePausedRef.current){const e=new CustomEvent(Gg);t.dispatchEvent(e),a.isClosePausedRef.current=!0}},r=()=>{if(a.isClosePausedRef.current){const e=new CustomEvent(Zg);t.dispatchEvent(e),a.isClosePausedRef.current=!1}},o=t=>{!e.contains(t.relatedTarget)&&r()},i=()=>{e.contains(document.activeElement)||r()};return e.addEventListener("focusin",n),e.addEventListener("focusout",o),e.addEventListener("pointermove",n),e.addEventListener("pointerleave",i),window.addEventListener("blur",n),window.addEventListener("focus",r),()=>{e.removeEventListener("focusin",n),e.removeEventListener("focusout",o),e.removeEventListener("pointermove",n),e.removeEventListener("pointerleave",i),window.removeEventListener("blur",n),window.removeEventListener("focus",r)}}}),[h,a.isClosePausedRef]);const m=W.useCallback((({tabbingDirection:e})=>{const t=s().map((t=>{const n=t.ref.current,r=[n,...mv(n)];return"forwards"===e?r:r.reverse()}));return("forwards"===e?t.reverse():t).flat()}),[s]);return W.useEffect((()=>{const e=d.current;if(e){const t=t=>{const n=t.altKey||t.ctrlKey||t.metaKey;if("Tab"===t.key&&!n){const n=document.activeElement,a=t.shiftKey;var r;if(t.target===e&&a)return void(null===(r=u.current)||void 0===r||r.focus());const s=m({tabbingDirection:a?"backwards":"forwards"}),l=s.findIndex((e=>e===n));var o,i;if(gv(s.slice(l+1)))t.preventDefault();else a?null===(o=u.current)||void 0===o||o.focus():null===(i=c.current)||void 0===i||i.focus()}};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)}}),[s,m]),W.createElement(Ih,{ref:l,role:"region","aria-label":o.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:h?void 0:"none"}},h&&W.createElement(ev,{ref:u,onFocusFromOutsideViewport:()=>{gv(m({tabbingDirection:"forwards"}))}}),W.createElement(Hg.Slot,{scope:n},W.createElement(Ch.ol,Jn({tabIndex:-1},i,{ref:f}))),h&&W.createElement(ev,{ref:c,onFocusFromOutsideViewport:()=>{gv(m({tabbingDirection:"backwards"}))}}))})),ev=W.forwardRef(((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=Yg("ToastFocusProxy",n);return W.createElement(Vg,Jn({"aria-hidden":!0,tabIndex:0},o,{ref:t,style:{position:"fixed"},onFocus:e=>{var t;const n=e.relatedTarget;!(null!==(t=i.viewport)&&void 0!==t&&t.contains(n))&&r()}}))})),tv="Toast",nv=W.forwardRef(((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,l]=cr({prop:r,defaultProp:o,onChange:i});return W.createElement(Yh,{present:n||s},W.createElement(iv,Jn({open:s},a,{ref:t,onClose:()=>l(!1),onPause:ur(e.onPause),onResume:ur(e.onResume),onSwipeStart:or(e.onSwipeStart,(e=>{e.currentTarget.setAttribute("data-swipe","start")})),onSwipeMove:or(e.onSwipeMove,(e=>{const{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","move"),e.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${t}px`),e.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${n}px`)})),onSwipeCancel:or(e.onSwipeCancel,(e=>{e.currentTarget.setAttribute("data-swipe","cancel"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")})),onSwipeEnd:or(e.onSwipeEnd,(e=>{const{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","end"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${t}px`),e.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${n}px`),l(!1)}))})))})),[rv,ov]=$g(tv,{onClose(){}}),iv=W.forwardRef(((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:p,...h}=e,m=Yg(tv,n),[g,v]=W.useState(null),y=rr(t,(e=>v(e))),b=W.useRef(null),w=W.useRef(null),x=o||m.duration,E=W.useRef(0),S=W.useRef(x),k=W.useRef(0),{onToastAdd:C,onToastRemove:P}=m,_=ur((()=>{var e;(null==g?void 0:g.contains(document.activeElement))&&(null===(e=m.viewport)||void 0===e||e.focus()),a()})),T=W.useCallback((e=>{e&&e!==1/0&&(window.clearTimeout(k.current),E.current=(new Date).getTime(),k.current=window.setTimeout(_,e))}),[_]);W.useEffect((()=>{const e=m.viewport;if(e){const t=()=>{T(S.current),null==u||u()},n=()=>{const e=(new Date).getTime()-E.current;S.current=S.current-e,window.clearTimeout(k.current),null==l||l()};return e.addEventListener(Gg,n),e.addEventListener(Zg,t),()=>{e.removeEventListener(Gg,n),e.removeEventListener(Zg,t)}}}),[m.viewport,x,l,u,T]),W.useEffect((()=>{i&&!m.isClosePausedRef.current&&T(x)}),[i,x,m.isClosePausedRef,T]),W.useEffect((()=>(C(),()=>P())),[C,P]);const R=W.useMemo((()=>g?fv(g):null),[g]);return m.viewport?W.createElement(W.Fragment,null,R&&W.createElement(av,{__scopeToast:n,role:"status","aria-live":"foreground"===r?"assertive":"polite","aria-atomic":!0},R),W.createElement(rv,{scope:n,onClose:_},yh.createPortal(W.createElement(Hg.ItemSlot,{scope:n},W.createElement(Fh,{asChild:!0,onEscapeKeyDown:or(s,(()=>{m.isFocusedToastEscapeKeyDownRef.current||_(),m.isFocusedToastEscapeKeyDownRef.current=!1}))},W.createElement(Ch.li,Jn({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection},h,{ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:or(e.onKeyDown,(e=>{"Escape"===e.key&&(null==s||s(e.nativeEvent),e.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,_()))})),onPointerDown:or(e.onPointerDown,(e=>{0===e.button&&(b.current={x:e.clientX,y:e.clientY})})),onPointerMove:or(e.onPointerMove,(e=>{if(!b.current)return;const t=e.clientX-b.current.x,n=e.clientY-b.current.y,r=Boolean(w.current),o=["left","right"].includes(m.swipeDirection),i=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,a=o?i(0,t):0,s=o?0:i(0,n),l="touch"===e.pointerType?10:2,u={x:a,y:s},f={originalEvent:e,delta:u};r?(w.current=u,pv("toast.swipeMove",d,f,{discrete:!1})):hv(u,m.swipeDirection,l)?(w.current=u,pv("toast.swipeStart",c,f,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>l||Math.abs(n)>l)&&(b.current=null)})),onPointerUp:or(e.onPointerUp,(e=>{const t=w.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),w.current=null,b.current=null,t){const n=e.currentTarget,r={originalEvent:e,delta:t};hv(t,m.swipeDirection,m.swipeThreshold)?pv("toast.swipeEnd",p,r,{discrete:!0}):pv("toast.swipeCancel",f,r,{discrete:!0}),n.addEventListener("click",(e=>e.preventDefault()),{once:!0})}}))})))),m.viewport))):null}));iv.propTypes={type(e){if(e.type&&!["foreground","background"].includes(e.type)){return new Error(`Invalid prop \`type\` supplied to \`${tv}\`. Expected \`foreground | background\`.`)}return null}};const av=e=>{const{__scopeToast:t,children:n,...r}=e,o=Yg(tv,t),[i,a]=W.useState(!1),[s,l]=W.useState(!1);return function(e=(()=>{})){const t=ur(e);ir((()=>{let e=0,n=0;return e=window.requestAnimationFrame((()=>n=window.requestAnimationFrame(t))),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}}),[t])}((()=>a(!0))),W.useEffect((()=>{const e=window.setTimeout((()=>l(!0)),1e3);return()=>window.clearTimeout(e)}),[]),s?null:W.createElement(Xh,{asChild:!0},W.createElement(Vg,r,i&&W.createElement(W.Fragment,null,o.label," ",n)))},sv=W.forwardRef(((e,t)=>{const{__scopeToast:n,...r}=e;return W.createElement(Ch.div,Jn({},r,{ref:t}))})),lv=W.forwardRef(((e,t)=>{const{__scopeToast:n,...r}=e;return W.createElement(Ch.div,Jn({},r,{ref:t}))})),uv=W.forwardRef(((e,t)=>{const{altText:n,...r}=e;return n?W.createElement(dv,{altText:n,asChild:!0},W.createElement(cv,Jn({},r,{ref:t}))):null}));uv.propTypes={altText:e=>e.altText?null:new Error("Missing prop `altText` expected on `ToastAction`")};const cv=W.forwardRef(((e,t)=>{const{__scopeToast:n,...r}=e,o=ov("ToastClose",n);return W.createElement(dv,{asChild:!0},W.createElement(Ch.button,Jn({type:"button"},r,{ref:t,onClick:or(e.onClick,o.onClose)})))})),dv=W.forwardRef(((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return W.createElement(Ch.div,Jn({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0},o,{ref:t}))}));function fv(e){const t=[];return Array.from(e.childNodes).forEach((e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),function(e){return e.nodeType===e.ELEMENT_NODE}(e)){const n=e.ariaHidden||e.hidden||"none"===e.style.display,r=""===e.dataset.radixToastAnnounceExclude;if(!n)if(r){const n=e.dataset.radixToastAnnounceAlt;n&&t.push(n)}else t.push(...fv(e))}})),t}function pv(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Ph(o,i):o.dispatchEvent(i)}const hv=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return"left"===t||"right"===t?i&&r>n:!i&&o>n};function mv(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function gv(e){const t=document.activeElement;return e.some((e=>e===t||(e.focus(),document.activeElement!==t)))}const vv=qg,yv=Jg,bv=nv,wv=sv,xv=lv,Ev=uv;function Sv(e){return e.split("-")[0]}function kv(e){return e.split("-")[1]}function Cv(e){return["top","bottom"].includes(Sv(e))?"x":"y"}function Pv(e){return"y"===e?"height":"width"}function _v(e,t,n){let{reference:r,floating:o}=e;const i=r.x+r.width/2-o.width/2,a=r.y+r.height/2-o.height/2,s=Cv(t),l=Pv(s),u=r[l]/2-o[l]/2,c="x"===s;let d;switch(Sv(t)){case"top":d={x:i,y:r.y-o.height};break;case"bottom":d={x:i,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:a};break;case"left":d={x:r.x-o.width,y:a};break;default:d={x:r.x,y:r.y}}switch(kv(t)){case"start":d[s]-=u*(n&&c?-1:1);break;case"end":d[s]+=u*(n&&c?-1:1)}return d}function Tv(e){return"number"!=typeof e?(t=e,{top:0,right:0,bottom:0,left:0,...t}):{top:e,right:e,bottom:e,left:e};var t}function Rv(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function Dv(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=t,h=Tv(p),m=s[f?"floating"===d?"reference":"floating":d],g=Rv(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),v=Rv(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===d?{...a.floating,x:r,y:o}:a.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),strategy:l}):a[d]);return{top:g.top-v.top+h.top,bottom:v.bottom-g.bottom+h.bottom,left:g.left-v.left+h.left,right:v.right-g.right+h.right}}const Av=Math.min,Mv=Math.max;function Lv(e,t,n){return Mv(e,Av(t,n))}const Ov=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=null!=e?e:{},{x:o,y:i,placement:a,rects:s,platform:l}=t;if(null==n)return{};const u=Tv(r),c={x:o,y:i},d=Cv(a),f=kv(a),p=Pv(d),h=await l.getDimensions(n),m="y"===d?"top":"left",g="y"===d?"bottom":"right",v=s.reference[p]+s.reference[d]-c[d]-s.floating[p],y=c[d]-s.reference[d],b=await(null==l.getOffsetParent?void 0:l.getOffsetParent(n));let w=b?"y"===d?b.clientHeight||0:b.clientWidth||0:0;0===w&&(w=s.floating[p]);const x=v/2-y/2,E=u[m],S=w-h[p]-u[g],k=w/2-h[p]/2+x,C=Lv(E,k,S),P=("start"===f?u[m]:u[g])>0&&k!==C&&s.reference[p]<=s.floating[p];return{[d]:c[d]-(P?k<E?E-k:S-k:0),data:{[d]:C,centerOffset:k-C}}}}),Fv={left:"right",right:"left",bottom:"top",top:"bottom"};function Iv(e){return e.replace(/left|right|bottom|top/g,(e=>Fv[e]))}const Nv={start:"end",end:"start"};function zv(e){return e.replace(/start|end/g,(e=>Nv[e]))}const Bv=["top","right","bottom","left"];Bv.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);const Vv=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:c=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",flipAlignment:p=!0,...h}=e,m=Sv(r),g=[a,...d||(m!==a&&p?function(e){const t=Iv(e);return[zv(e),t,zv(t)]}(a):[Iv(a)])],v=await Dv(t,h),y=[];let b=(null==(n=o.flip)?void 0:n.overflows)||[];if(u&&y.push(v[m]),c){const{main:e,cross:t}=function(e,t,n){void 0===n&&(n=!1);const r=kv(e),o=Cv(e),i=Pv(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Iv(a)),{main:a,cross:Iv(a)}}(r,i,await(null==s.isRTL?void 0:s.isRTL(l.floating)));y.push(v[e],v[t])}if(b=[...b,{placement:r,overflows:y}],!y.every((e=>e<=0))){var w,x;const e=(null!=(w=null==(x=o.flip)?void 0:x.index)?w:0)+1,t=g[e];if(t)return{data:{index:e,overflows:b},reset:{placement:t}};let n="bottom";switch(f){case"bestFit":{var E;const e=null==(E=b.map((e=>[e,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:E[0].placement;e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}};function jv(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Hv(e){return Bv.some((t=>e[t]>=0))}const Uv=function(e){let{strategy:t="referenceHidden",...n}=void 0===e?{}:e;return{name:"hide",async fn(e){const{rects:r}=e;switch(t){case"referenceHidden":{const t=jv(await Dv(e,{...n,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:Hv(t)}}}case"escaped":{const t=jv(await Dv(e,{...n,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:Hv(t)}}}default:return{}}}}};function Wv(e){return"x"===e?"y":"x"}const $v=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=e,u={x:n,y:r},c=await Dv(t,l),d=Cv(Sv(o)),f=Wv(d);let p=u[d],h=u[f];if(i){const e="y"===d?"bottom":"right";p=Lv(p+c["y"===d?"top":"left"],p,p-c[e])}if(a){const e="y"===f?"bottom":"right";h=Lv(h+c["y"===f?"top":"left"],h,h-c[e])}const m=s.fn({...t,[d]:p,[f]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}};function Kv(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Xv(e){if(null==e)return window;if(!Kv(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Yv(e){return Xv(e).getComputedStyle(e)}function qv(e){return Kv(e)?"":e?(e.nodeName||"").toLowerCase():""}function Qv(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function Gv(e){return e instanceof Xv(e).HTMLElement}function Zv(e){return e instanceof Xv(e).Element}function Jv(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Xv(e).ShadowRoot||e instanceof ShadowRoot)}function ey(e){const{overflow:t,overflowX:n,overflowY:r}=Yv(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function ty(e){return["table","td","th"].includes(qv(e))}function ny(e){const t=/firefox/i.test(Qv()),n=Yv(e);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter}function ry(){return!/^((?!chrome|android).)*safari/i.test(Qv())}const oy=Math.min,iy=Math.max,ay=Math.round;function sy(e,t,n){var r,o,i,a;void 0===t&&(t=!1),void 0===n&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Gv(e)&&(l=e.offsetWidth>0&&ay(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&ay(s.height)/e.offsetHeight||1);const c=Zv(e)?Xv(e):window,d=!ry()&&n,f=(s.left+(d&&null!=(r=null==(o=c.visualViewport)?void 0:o.offsetLeft)?r:0))/l,p=(s.top+(d&&null!=(i=null==(a=c.visualViewport)?void 0:a.offsetTop)?i:0))/u,h=s.width/l,m=s.height/u;return{width:h,height:m,top:p,right:f+h,bottom:p+m,left:f,x:f,y:p}}function ly(e){return(t=e,(t instanceof Xv(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function uy(e){return Zv(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function cy(e){return sy(ly(e)).left+uy(e).scrollLeft}function dy(e,t,n){const r=Gv(t),o=ly(t),i=sy(e,r&&function(e){const t=sy(e);return ay(t.width)!==e.offsetWidth||ay(t.height)!==e.offsetHeight}(t),"fixed"===n);let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==qv(t)||ey(o))&&(a=uy(t)),Gv(t)){const e=sy(t,!0);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=cy(o));return{x:i.left+a.scrollLeft-s.x,y:i.top+a.scrollTop-s.y,width:i.width,height:i.height}}function fy(e){return"html"===qv(e)?e:e.assignedSlot||e.parentNode||(Jv(e)?e.host:null)||ly(e)}function py(e){return Gv(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function hy(e){const t=Xv(e);let n=py(e);for(;n&&ty(n)&&"static"===getComputedStyle(n).position;)n=py(n);return n&&("html"===qv(n)||"body"===qv(n)&&"static"===getComputedStyle(n).position&&!ny(n))?t:n||function(e){let t=fy(e);for(Jv(t)&&(t=t.host);Gv(t)&&!["html","body"].includes(qv(t));){if(ny(t))return t;t=t.parentNode}return null}(e)||t}function my(e){if(Gv(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=sy(e);return{width:t.width,height:t.height}}function gy(e){const t=fy(e);return["html","body","#document"].includes(qv(t))?e.ownerDocument.body:Gv(t)&&ey(t)?t:gy(t)}function vy(e,t){var n;void 0===t&&(t=[]);const r=gy(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=Xv(r),a=o?[i].concat(i.visualViewport||[],ey(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(vy(a))}function yy(e,t,n){return"viewport"===t?Rv(function(e,t){const n=Xv(e),r=ly(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=ry();(e||!e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,n)):Zv(t)?function(e,t){const n=sy(e,!1,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft;return{top:r,left:o,x:o,y:r,right:o+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):Rv(function(e){var t;const n=ly(e),r=uy(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=iy(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=iy(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let s=-r.scrollLeft+cy(e);const l=-r.scrollTop;return"rtl"===Yv(o||n).direction&&(s+=iy(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(ly(e)))}function by(e){const t=vy(e),n=["absolute","fixed"].includes(Yv(e).position)&&Gv(e)?hy(e):e;return Zv(n)?t.filter((e=>Zv(e)&&function(e,t){const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Jv(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(e,n)&&"body"!==qv(e))):[]}const wy={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?by(t):[].concat(n),r],a=i[0],s=i.reduce(((e,n)=>{const r=yy(t,n,o);return e.top=iy(r.top,e.top),e.right=oy(r.right,e.right),e.bottom=oy(r.bottom,e.bottom),e.left=iy(r.left,e.left),e}),yy(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Gv(n),i=ly(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==qv(n)||ey(i))&&(a=uy(n)),Gv(n))){const e=sy(n,!0);s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}},isElement:Zv,getDimensions:my,getOffsetParent:hy,getDocumentElement:ly,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:dy(t,hy(n),r),floating:{...my(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===Yv(e).direction};function xy(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=o&&!s,u=i&&!s,c=l||u?[...Zv(e)?vy(e):[],...vy(t)]:[];c.forEach((e=>{l&&e.addEventListener("scroll",n,{passive:!0}),u&&e.addEventListener("resize",n)}));let d,f=null;if(a){let r=!0;f=new ResizeObserver((()=>{r||n(),r=!1})),Zv(e)&&!s&&f.observe(e),f.observe(t)}let p=s?sy(e):null;return s&&function t(){const r=sy(e);!p||r.x===p.x&&r.y===p.y&&r.width===p.width&&r.height===p.height||n(),p=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{l&&e.removeEventListener("scroll",n),u&&e.removeEventListener("resize",n)})),null==(e=f)||e.disconnect(),f=null,s&&cancelAnimationFrame(d)}}const Ey=(e,t,n)=>(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=await(null==a.isRTL?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:c}=_v(l,r,s),d=r,f={},p=0;for(let h=0;h<i.length;h++){const{name:n,fn:m}=i[h],{x:g,y:v,data:y,reset:b}=await m({x:u,y:c,initialPlacement:r,placement:d,strategy:o,middlewareData:f,rects:l,platform:a,elements:{reference:e,floating:t}});u=null!=g?g:u,c=null!=v?v:c,f={...f,[n]:{...f[n],...y}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(l=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:c}=_v(l,d,s))),h=-1)}return{x:u,y:c,placement:d,strategy:o,middlewareData:f}})(e,t,{platform:wy,...n});var Sy="undefined"!=typeof document?W.useLayoutEffect:W.useEffect;function ky(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;0!=r--;)if(!ky(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!ky(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Cy(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:o}=void 0===e?{}:e;const i=W.useRef(null),a=W.useRef(null),s=function(e){const t=W.useRef(e);return Sy((()=>{t.current=e})),t}(o),l=W.useRef(null),[u,c]=W.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[d,f]=W.useState(t);ky(null==d?void 0:d.map((e=>{let{options:t}=e;return t})),null==t?void 0:t.map((e=>{let{options:t}=e;return t})))||f(t);const p=W.useCallback((()=>{i.current&&a.current&&Ey(i.current,a.current,{middleware:d,placement:n,strategy:r}).then((e=>{h.current&&yh.flushSync((()=>{c(e)}))}))}),[d,n,r]);Sy((()=>{h.current&&p()}),[p]);const h=W.useRef(!1);Sy((()=>(h.current=!0,()=>{h.current=!1})),[]);const m=W.useCallback((()=>{if("function"==typeof l.current&&(l.current(),l.current=null),i.current&&a.current)if(s.current){const e=s.current(i.current,a.current,p);l.current=e}else p()}),[p,s]),g=W.useCallback((e=>{i.current=e,m()}),[m]),v=W.useCallback((e=>{a.current=e,m()}),[m]),y=W.useMemo((()=>({reference:i,floating:a})),[]);return W.useMemo((()=>({...u,update:p,refs:y,reference:g,floating:v})),[u,p,y,g,v])}const Py=e=>{const{element:t,padding:n}=e;return{name:"arrow",options:e,fn:e=>function(e){return Object.prototype.hasOwnProperty.call(e,"current")}(t)?null!=t.current?Ov({element:t.current,padding:n}).fn(e):{}:t?Ov({element:t,padding:n}).fn(e):{}}},_y=W.forwardRef(((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return W.createElement(Ch.svg,Jn({},i,{ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:W.createElement("polygon",{points:"0,0 30,0 15,10"}))}));function Ty(e){const[t,n]=W.useState(void 0);return ir((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}const Ry="Popper",[Dy,Ay]=er(Ry),[My,Ly]=Dy(Ry),Oy=W.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Ly("PopperAnchor",n),a=W.useRef(null),s=rr(t,a);return W.useEffect((()=>{i.onAnchorChange((null==r?void 0:r.current)||a.current)})),r?null:W.createElement(Ch.div,Jn({},o,{ref:s}))})),Fy="PopperContent",[Iy,Ny]=Dy(Fy),[zy,By]=Dy(Fy,{hasParent:!1,positionUpdateFns:new Set}),Vy=W.forwardRef(((e,t)=>{var n,r,o,i,a,s,l,u;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:p="center",alignOffset:h=0,arrowPadding:m=0,collisionBoundary:g=[],collisionPadding:v=0,sticky:y="partial",hideWhenDetached:b=!1,avoidCollisions:w=!0,onPlaced:x,...E}=e,S=Ly(Fy,c),[k,C]=W.useState(null),P=rr(t,(e=>C(e))),[_,T]=W.useState(null),R=Ty(_),D=null!==(n=null==R?void 0:R.width)&&void 0!==n?n:0,A=null!==(r=null==R?void 0:R.height)&&void 0!==r?r:0,M=d+("center"!==p?"-"+p:""),L="number"==typeof v?v:{top:0,right:0,bottom:0,left:0,...v},O=Array.isArray(g)?g:[g],F=O.length>0,I={padding:L,boundary:O.filter(Uy),altBoundary:F},{reference:N,floating:z,strategy:B,x:V,y:j,placement:H,middlewareData:U,update:$}=Cy({strategy:"fixed",placement:M,whileElementsMounted:xy,middleware:[Wy(),(Y={mainAxis:f+A,alignmentAxis:h},void 0===Y&&(Y=0),{name:"offset",options:Y,async fn(e){const{x:t,y:n}=e,r=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=Sv(n),s=kv(n),l="x"===Cv(n),u=["left","top"].includes(a)?-1:1,c=i&&l?-1:1,d="function"==typeof t?t(e):t;let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof h&&(p="end"===s?-1*h:h),l?{x:p*c,y:f*u}:{x:f*u,y:p*c}}(e,Y);return{x:t+r.x,y:n+r.y,data:r}}}),w?$v({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?(void 0===X&&(X={}),{options:X,fn(e){const{x:t,y:n,placement:r,rects:o,middlewareData:i}=e,{offset:a=0,mainAxis:s=!0,crossAxis:l=!0}=X,u={x:t,y:n},c=Cv(r),d=Wv(c);let f=u[c],p=u[d];const h="function"==typeof a?a({...o,placement:r}):a,m="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(s){const e="y"===c?"height":"width",t=o.reference[c]-o.floating[e]+m.mainAxis,n=o.reference[c]+o.reference[e]-m.mainAxis;f<t?f=t:f>n&&(f=n)}if(l){var g,v,y,b;const e="y"===c?"width":"height",t=["top","left"].includes(Sv(r)),n=o.reference[d]-o.floating[e]+(t&&null!=(g=null==(v=i.offset)?void 0:v[d])?g:0)+(t?0:m.crossAxis),a=o.reference[d]+o.reference[e]+(t?0:null!=(y=null==(b=i.offset)?void 0:b[d])?y:0)-(t?m.crossAxis:0);p<n?p=n:p>a&&(p=a)}return{[c]:f,[d]:p}}}):void 0,...I}):void 0,_?Py({element:_,padding:m}):void 0,w?Vv({...I}):void 0,(K={...I,apply:({elements:e,availableWidth:t,availableHeight:n})=>{e.floating.style.setProperty("--radix-popper-available-width",`${t}px`),e.floating.style.setProperty("--radix-popper-available-height",`${n}px`)}},void 0===K&&(K={}),{name:"size",options:K,async fn(e){const{placement:t,rects:n,platform:r,elements:o}=e,{apply:i,...a}=K,s=await Dv(e,a),l=Sv(t),u=kv(t);let c,d;"top"===l||"bottom"===l?(c=l,d=u===(await(null==r.isRTL?void 0:r.isRTL(o.floating))?"start":"end")?"left":"right"):(d=l,c="end"===u?"top":"bottom");const f=Mv(s.left,0),p=Mv(s.right,0),h=Mv(s.top,0),m=Mv(s.bottom,0),g={availableHeight:n.floating.height-(["left","right"].includes(t)?2*(0!==h||0!==m?h+m:Mv(s.top,s.bottom)):s[c]),availableWidth:n.floating.width-(["top","bottom"].includes(t)?2*(0!==f||0!==p?f+p:Mv(s.left,s.right)):s[d])},v=await r.getDimensions(o.floating);null==i||i({...e,...g});const y=await r.getDimensions(o.floating);return v.width!==y.width||v.height!==y.height?{reset:{rects:!0}}:{}}}),$y({arrowWidth:D,arrowHeight:A}),b?Uv({strategy:"referenceHidden"}):void 0].filter(Hy)});var K,X,Y;ir((()=>{N(S.anchor)}),[N,S.anchor]);const q=null!==V&&null!==j,[Q,G]=Ky(H),Z=ur(x);ir((()=>{q&&(null==Z||Z())}),[q,Z]);const J=null===(o=U.arrow)||void 0===o?void 0:o.x,ee=null===(i=U.arrow)||void 0===i?void 0:i.y,te=0!==(null===(a=U.arrow)||void 0===a?void 0:a.centerOffset),[ne,re]=W.useState();ir((()=>{k&&re(window.getComputedStyle(k).zIndex)}),[k]);const{hasParent:oe,positionUpdateFns:ie}=By(Fy,c),ae=!oe;W.useLayoutEffect((()=>{if(!ae)return ie.add($),()=>{ie.delete($)}}),[ae,ie,$]),ir((()=>{ae&&q&&Array.from(ie).reverse().forEach((e=>requestAnimationFrame(e)))}),[ae,q,ie]);const se={"data-side":Q,"data-align":G,...E,ref:P,style:{...E.style,animation:q?void 0:"none",opacity:null!==(s=U.hide)&&void 0!==s&&s.referenceHidden?0:void 0}};return W.createElement("div",{ref:z,"data-radix-popper-content-wrapper":"",style:{position:B,left:0,top:0,transform:q?`translate3d(${Math.round(V)}px, ${Math.round(j)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[null===(l=U.transformOrigin)||void 0===l?void 0:l.x,null===(u=U.transformOrigin)||void 0===u?void 0:u.y].join(" ")},dir:e.dir},W.createElement(Iy,{scope:c,placedSide:Q,onArrowChange:T,arrowX:J,arrowY:ee,shouldHideArrow:te},ae?W.createElement(zy,{scope:c,hasParent:!0,positionUpdateFns:ie},W.createElement(Ch.div,se)):W.createElement(Ch.div,se)))})),jy={top:"bottom",right:"left",bottom:"top",left:"right"};function Hy(e){return void 0!==e}function Uy(e){return null!==e}const Wy=()=>({name:"anchorCssProperties",fn(e){const{rects:t,elements:n}=e,{width:r,height:o}=t.reference;return n.floating.style.setProperty("--radix-popper-anchor-width",`${r}px`),n.floating.style.setProperty("--radix-popper-anchor-height",`${o}px`),{}}}),$y=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:s,rects:l,middlewareData:u}=t,c=0!==(null===(n=u.arrow)||void 0===n?void 0:n.centerOffset),d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,h]=Ky(s),m={start:"0%",center:"50%",end:"100%"}[h],g=(null!==(r=null===(o=u.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,v=(null!==(i=null===(a=u.arrow)||void 0===a?void 0:a.y)&&void 0!==i?i:0)+f/2;let y="",b="";return"bottom"===p?(y=c?m:`${g}px`,b=-f+"px"):"top"===p?(y=c?m:`${g}px`,b=`${l.floating.height+f}px`):"right"===p?(y=-f+"px",b=c?m:`${v}px`):"left"===p&&(y=`${l.floating.width+f}px`,b=c?m:`${v}px`),{data:{x:y,y:b}}}});function Ky(e){const[t,n="center"]=e.split("-");return[t,n]}const Xy=e=>{const{__scopePopper:t,children:n}=e,[r,o]=W.useState(null);return W.createElement(My,{scope:t,anchor:r,onAnchorChange:o},n)},Yy=Oy,qy=Vy,Qy=W.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,o=Ny("PopperArrow",n),i=jy[o.placedSide];return W.createElement("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0}},W.createElement(_y,Jn({},r,{ref:t,style:{...r.style,display:"block"}})))})),Gy="Popover",[Zy,Jy]=er(Gy,[Ay]),eb=Ay(),[tb,nb]=Zy(Gy),rb=W.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=nb("PopoverTrigger",n),i=eb(n),a=rr(t,o.triggerRef),s=W.createElement(Ch.button,Jn({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":fb(o.open)},r,{ref:a,onClick:or(e.onClick,o.onOpenToggle)}));return o.hasCustomAnchor?s:W.createElement(Yy,Jn({asChild:!0},i),s)})),ob="PopoverPortal",[ib,ab]=Zy(ob,{forceMount:void 0}),sb="PopoverContent",lb=W.forwardRef(((e,t)=>{const n=ab(sb,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=nb(sb,e.__scopePopover);return W.createElement(Yh,{present:r||i.open},i.modal?W.createElement(ub,Jn({},o,{ref:t})):W.createElement(cb,Jn({},o,{ref:t})))})),ub=W.forwardRef(((e,t)=>{const n=nb(sb,e.__scopePopover),r=W.useRef(null),o=rr(t,r),i=W.useRef(!1);return W.useEffect((()=>{const e=r.current;if(e)return jm(e)}),[]),W.createElement(Om,{as:wh,allowPinchZoom:!0},W.createElement(db,Jn({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:or(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),i.current||null===(t=n.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:or(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;i.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:or(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})))})),cb=W.forwardRef(((e,t)=>{const n=nb(sb,e.__scopePopover),r=W.useRef(!1);return W.createElement(db,Jn({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var o,i;(null===(o=e.onCloseAutoFocus)||void 0===o||o.call(e,t),t.defaultPrevented)||(r.current||null===(i=n.triggerRef.current)||void 0===i||i.focus(),t.preventDefault());r.current=!1},onInteractOutside:t=>{var o,i;null===(o=e.onInteractOutside)||void 0===o||o.call(e,t),t.defaultPrevented||(r.current=!0);const a=t.target;(null===(i=n.triggerRef.current)||void 0===i?void 0:i.contains(a))&&t.preventDefault()}}))})),db=W.forwardRef(((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:c,...d}=e,f=nb(sb,n),p=eb(n);return Gh(),W.createElement(Vh,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},W.createElement(Mh,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:c,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1)},W.createElement(qy,Jn({"data-state":fb(f.open),role:"dialog",id:f.contentId},p,d,{ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}))))}));function fb(e){return e?"open":"closed"}const pb=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!1}=e,s=eb(t),l=W.useRef(null),[u,c]=W.useState(!1),[d=!1,f]=cr({prop:r,defaultProp:o,onChange:i});return W.createElement(Xy,s,W.createElement(tb,{scope:t,contentId:lr(),triggerRef:l,open:d,onOpenChange:f,onOpenToggle:W.useCallback((()=>f((e=>!e))),[f]),hasCustomAnchor:u,onCustomAnchorAdd:W.useCallback((()=>c(!0)),[]),onCustomAnchorRemove:W.useCallback((()=>c(!1)),[]),modal:a},n))},hb=rb,mb=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=nb(ob,t);return W.createElement(ib,{scope:t,forceMount:n},W.createElement(Yh,{present:n||i.open},W.createElement(Xh,{asChild:!0,container:o},r)))},gb=lb,vb=W.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=nb("PopoverClose",n);return W.createElement(Ch.button,Jn({type:"button"},r,{ref:t,onClick:or(e.onClick,(()=>o.onOpenChange(!1)))}))})),yb=W.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=eb(n);return W.createElement(Qy,Jn({},o,r,{ref:t}))})),bb="Progress",wb=100,[xb,Eb]=er(bb),[Sb,kb]=xb(bb),Cb=W.forwardRef(((e,t)=>{const{__scopeProgress:n,value:r,max:o,getValueLabel:i=Pb,...a}=e,s=Rb(o)?o:wb,l=Db(r,s)?r:null,u=Tb(l)?i(l,s):void 0;return W.createElement(Sb,{scope:n,value:l,max:s},W.createElement(Ch.div,Jn({"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":Tb(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":_b(l,s),"data-value":null!=l?l:void 0,"data-max":s},a,{ref:t})))}));Cb.propTypes={max(e,t,n){const r=e[t],o=String(r);return r&&!Rb(r)?new Error(function(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`100\`.`}(o,n)):null},value(e,t,n){const r=e[t],o=String(r),i=Rb(e.max)?e.max:wb;return null==r||Db(r,i)?null:new Error(function(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:\n - a positive number\n - less than the value passed to \`max\` (or 100 if no \`max\` prop is set)\n - \`null\` if the progress is indeterminate.\n\nDefaulting to \`null\`.`}(o,n))}};function Pb(e,t){return`${Math.round(e/t*100)}%`}function _b(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function Tb(e){return"number"==typeof e}function Rb(e){return Tb(e)&&!isNaN(e)&&e>0}function Db(e,t){return Tb(e)&&!isNaN(e)&&e<=t&&e>=0}const Ab=Cb,Mb=W.forwardRef(((e,t)=>{var n;const{__scopeProgress:r,...o}=e,i=kb("ProgressIndicator",r);return W.createElement(Ch.div,Jn({"data-state":_b(i.value,i.max),"data-value":null!==(n=i.value)&&void 0!==n?n:void 0,"data-max":i.max},o,{ref:t}))}));function Lb(e){const t=W.useRef({value:e,previous:e});return W.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}const Ob="Checkbox",[Fb,Ib]=er(Ob),[Nb,zb]=Fb(Ob),Bb=W.forwardRef(((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:l="on",onCheckedChange:u,...c}=e,[d,f]=W.useState(null),p=rr(t,(e=>f(e))),h=W.useRef(!1),m=!d||Boolean(d.closest("form")),[g=!1,v]=cr({prop:o,defaultProp:i,onChange:u}),y=W.useRef(g);return W.useEffect((()=>{const e=null==d?void 0:d.form;if(e){const t=()=>v(y.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[d,v]),W.createElement(Nb,{scope:n,state:g,disabled:s},W.createElement(Ch.button,Jn({type:"button",role:"checkbox","aria-checked":jb(g)?"mixed":g,"aria-required":a,"data-state":Hb(g),"data-disabled":s?"":void 0,disabled:s,value:l},c,{ref:p,onKeyDown:or(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:or(e.onClick,(e=>{v((e=>!!jb(e)||!e)),m&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))})),m&&W.createElement(Vb,{control:d,bubbles:!h.current,name:r,value:l,checked:g,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))})),Vb=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=W.useRef(null),a=Lb(n),s=Ty(t);return W.useEffect((()=>{const e=i.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(a!==n&&o){const t=new Event("click",{bubbles:r});e.indeterminate=jb(n),o.call(e,!jb(n)&&n),e.dispatchEvent(t)}}),[a,n,r]),W.createElement("input",Jn({type:"checkbox","aria-hidden":!0,defaultChecked:!jb(n)&&n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function jb(e){return"indeterminate"===e}function Hb(e){return jb(e)?"indeterminate":e?"checked":"unchecked"}const Ub=Bb,Wb=W.forwardRef(((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=zb("CheckboxIndicator",n);return W.createElement(Yh,{present:r||jb(i.state)||!0===i.state},W.createElement(Ch.span,Jn({"data-state":Hb(i.state),"data-disabled":i.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))}));function $b(e,[t,n]){return Math.min(n,Math.max(t,e))}const Kb=W.createContext(void 0);function Xb(e){const t=W.useContext(Kb);return e||t||"ltr"}const Yb=["PageUp","PageDown"],qb=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Qb={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Gb="Slider",[Zb,Jb,ew]=Bg(Gb),[tw,nw]=er(Gb,[ew]),[rw,ow]=tw(Gb),iw=W.forwardRef(((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:s=!1,minStepsBetweenThumbs:l=0,defaultValue:u=[r],value:c,onValueChange:d=(()=>{}),onValueCommit:f=(()=>{}),inverted:p=!1,...h}=e,[m,g]=W.useState(null),v=rr(t,(e=>g(e))),y=W.useRef(new Set),b=W.useRef(0),w="horizontal"===a,x=!m||Boolean(m.closest("form")),E=w?lw:uw,[S=[],k]=cr({prop:c,defaultProp:u,onChange:e=>{var t;null===(t=[...y.current][b.current])||void 0===t||t.focus(),d(e)}}),C=W.useRef(S);function P(e,t,{commit:n}={commit:!1}){const a=function(e){return(String(e).split(".")[1]||"").length}(i),s=function(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}(Math.round((e-r)/i)*i+r,a),u=$b(s,[r,o]);k(((e=[])=>{const r=function(e=[],t,n){const r=[...e];return r[n]=t,r.sort(((e,t)=>e-t))}(e,u,t);if(function(e,t){if(t>0){const n=function(e){return e.slice(0,-1).map(((t,n)=>e[n+1]-t))}(e);return Math.min(...n)>=t}return!0}(r,l*i)){b.current=r.indexOf(u);const t=String(r)!==String(e);return t&&n&&f(r),t?r:e}return e}))}return W.createElement(rw,{scope:e.__scopeSlider,disabled:s,min:r,max:o,valueIndexToChangeRef:b,thumbs:y.current,values:S,orientation:a},W.createElement(Zb.Provider,{scope:e.__scopeSlider},W.createElement(Zb.Slot,{scope:e.__scopeSlider},W.createElement(E,Jn({"aria-disabled":s,"data-disabled":s?"":void 0},h,{ref:v,onPointerDown:or(h.onPointerDown,(()=>{s||(C.current=S)})),min:r,max:o,inverted:p,onSlideStart:s?void 0:function(e){const t=function(e,t){if(1===e.length)return 0;const n=e.map((e=>Math.abs(e-t))),r=Math.min(...n);return n.indexOf(r)}(S,e);P(e,t)},onSlideMove:s?void 0:function(e){P(e,b.current)},onSlideEnd:s?void 0:function(){const e=C.current[b.current];S[b.current]!==e&&f(S)},onHomeKeyDown:()=>!s&&P(r,0,{commit:!0}),onEndKeyDown:()=>!s&&P(o,S.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!s){const n=Yb.includes(e.key)||e.shiftKey&&qb.includes(e.key)?10:1,r=b.current;P(S[r]+i*n*t,r,{commit:!0})}}})))),x&&S.map(((e,t)=>W.createElement(vw,{key:t,name:n?n+(S.length>1?"[]":""):void 0,value:e}))))})),[aw,sw]=tw(Gb,{startEdge:"left",endEdge:"right",size:"width",direction:1}),lw=W.forwardRef(((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:u,...c}=e,[d,f]=W.useState(null),p=rr(t,(e=>f(e))),h=W.useRef(),m=Xb(o),g="ltr"===m,v=g&&!i||!g&&i;function y(e){const t=h.current||d.getBoundingClientRect(),o=bw([0,t.width],v?[n,r]:[r,n]);return h.current=t,o(e-t.left)}return W.createElement(aw,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width"},W.createElement(cw,Jn({dir:m,"data-orientation":"horizontal"},c,{ref:p,style:{...c.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{const t=y(e.clientX);null==a||a(t)},onSlideMove:e=>{const t=y(e.clientX);null==s||s(t)},onSlideEnd:()=>{h.current=void 0,null==l||l()},onStepKeyDown:e=>{const t=Qb[v?"from-left":"from-right"].includes(e.key);null==u||u({event:e,direction:t?-1:1})}})))})),uw=W.forwardRef(((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:l,...u}=e,c=W.useRef(null),d=rr(t,c),f=W.useRef(),p=!o;function h(e){const t=f.current||c.current.getBoundingClientRect(),o=bw([0,t.height],p?[r,n]:[n,r]);return f.current=t,o(e-t.top)}return W.createElement(aw,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1},W.createElement(cw,Jn({"data-orientation":"vertical"},u,{ref:d,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{const t=h(e.clientY);null==i||i(t)},onSlideMove:e=>{const t=h(e.clientY);null==a||a(t)},onSlideEnd:()=>{f.current=void 0,null==s||s()},onStepKeyDown:e=>{const t=Qb[p?"from-bottom":"from-top"].includes(e.key);null==l||l({event:e,direction:t?-1:1})}})))})),cw=W.forwardRef(((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...u}=e,c=ow(Gb,n);return W.createElement(Ch.span,Jn({},u,{ref:t,onKeyDown:or(e.onKeyDown,(e=>{"Home"===e.key?(a(e),e.preventDefault()):"End"===e.key?(s(e),e.preventDefault()):Yb.concat(qb).includes(e.key)&&(l(e),e.preventDefault())})),onPointerDown:or(e.onPointerDown,(e=>{const t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),c.thumbs.has(t)?t.focus():r(e)})),onPointerMove:or(e.onPointerMove,(e=>{e.target.hasPointerCapture(e.pointerId)&&o(e)})),onPointerUp:or(e.onPointerUp,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),i(e))}))}))})),dw=W.forwardRef(((e,t)=>{const{__scopeSlider:n,...r}=e,o=ow("SliderTrack",n);return W.createElement(Ch.span,Jn({"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation},r,{ref:t}))})),fw="SliderRange",pw=W.forwardRef(((e,t)=>{const{__scopeSlider:n,...r}=e,o=ow(fw,n),i=sw(fw,n),a=rr(t,W.useRef(null)),s=o.values.length,l=o.values.map((e=>yw(e,o.min,o.max))),u=s>1?Math.min(...l):0,c=100-Math.max(...l);return W.createElement(Ch.span,Jn({"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0},r,{ref:a,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:c+"%"}}))})),hw="SliderThumb",mw=W.forwardRef(((e,t)=>{const n=Jb(e.__scopeSlider),[r,o]=W.useState(null),i=rr(t,(e=>o(e))),a=W.useMemo((()=>r?n().findIndex((e=>e.ref.current===r)):-1),[n,r]);return W.createElement(gw,Jn({},e,{ref:i,index:a}))})),gw=W.forwardRef(((e,t)=>{const{__scopeSlider:n,index:r,...o}=e,i=ow(hw,n),a=sw(hw,n),[s,l]=W.useState(null),u=rr(t,(e=>l(e))),c=Ty(s),d=i.values[r],f=void 0===d?0:yw(d,i.min,i.max),p=function(e,t){return t>2?`Value ${e+1} of ${t}`:2===t?["Minimum","Maximum"][e]:void 0}(r,i.values.length),h=null==c?void 0:c[a.size],m=h?function(e,t,n){const r=e/2,o=bw([0,50],[0,r]);return(r-o(t)*n)*n}(h,f,a.direction):0;return W.useEffect((()=>{if(s)return i.thumbs.add(s),()=>{i.thumbs.delete(s)}}),[s,i.thumbs]),W.createElement("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${f}% + ${m}px)`}},W.createElement(Zb.ItemSlot,{scope:e.__scopeSlider},W.createElement(Ch.span,Jn({role:"slider","aria-label":e["aria-label"]||p,"aria-valuemin":i.min,"aria-valuenow":d,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,tabIndex:i.disabled?void 0:0},o,{ref:u,style:void 0===d?{display:"none"}:e.style,onFocus:or(e.onFocus,(()=>{i.valueIndexToChangeRef.current=r}))}))))})),vw=e=>{const{value:t,...n}=e,r=W.useRef(null),o=Lb(t);return W.useEffect((()=>{const e=r.current,n=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(n,"value").set;if(o!==t&&i){const n=new Event("input",{bubbles:!0});i.call(e,t),e.dispatchEvent(n)}}),[o,t]),W.createElement("input",Jn({style:{display:"none"}},n,{ref:r,defaultValue:t}))};function yw(e,t,n){return 100/(n-t)*(e-t)}function bw(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}const ww=iw,xw=dw,Ew=pw,Sw=mw,[kw,Cw]=er("Form"),Pw="Form",[_w,Tw]=kw(Pw),[Rw,Dw]=kw(Pw),Aw=W.forwardRef(((e,t)=>{const{__scopeForm:n,onClearServerErrors:r=(()=>{}),...o}=e,i=rr(t,W.useRef(null)),[a,s]=W.useState({}),l=W.useCallback((e=>a[e]),[a]),u=W.useCallback(((e,t)=>s((n=>{var r;return{...n,[e]:{...null!==(r=n[e])&&void 0!==r?r:{},...t}}}))),[]),c=W.useCallback((e=>{s((t=>({...t,[e]:void 0}))),v((t=>({...t,[e]:{}})))}),[]),[d,f]=W.useState({}),p=W.useCallback((e=>{var t;return null!==(t=d[e])&&void 0!==t?t:[]}),[d]),h=W.useCallback(((e,t)=>{f((n=>{var r;return{...n,[e]:[...null!==(r=n[e])&&void 0!==r?r:[],t]}}))}),[]),m=W.useCallback(((e,t)=>{f((n=>{var r;return{...n,[e]:(null!==(r=n[e])&&void 0!==r?r:[]).filter((e=>e.id!==t))}}))}),[]),[g,v]=W.useState({}),y=W.useCallback((e=>{var t;return null!==(t=g[e])&&void 0!==t?t:{}}),[g]),b=W.useCallback(((e,t)=>{v((n=>{var r;return{...n,[e]:{...null!==(r=n[e])&&void 0!==r?r:{},...t}}}))}),[]),[w,x]=W.useState({}),E=W.useCallback(((e,t)=>{x((n=>{const r=new Set(n[e]).add(t);return{...n,[e]:r}}))}),[]),S=W.useCallback(((e,t)=>{x((n=>{const r=new Set(n[e]);return r.delete(t),{...n,[e]:r}}))}),[]),k=W.useCallback((e=>{var t;return Array.from(null!==(t=w[e])&&void 0!==t?t:[]).join(" ")||void 0}),[w]);return W.createElement(_w,{scope:n,getFieldValidity:l,onFieldValidityChange:u,getFieldCustomMatcherEntries:p,onFieldCustomMatcherEntryAdd:h,onFieldCustomMatcherEntryRemove:m,getFieldCustomErrors:y,onFieldCustomErrorsChange:b,onFieldValiditionClear:c},W.createElement(Rw,{scope:n,onFieldMessageIdAdd:E,onFieldMessageIdRemove:S,getFieldDescription:k},W.createElement(Ch.form,Jn({},o,{ref:i,onInvalid:or(e.onInvalid,(e=>{const t=Yw(e.currentTarget);t===e.target&&t.focus(),e.preventDefault()})),onSubmit:or(e.onSubmit,r,{checkForDefaultPrevented:!1}),onReset:or(e.onReset,r)}))))})),Mw="FormField",[Lw,Ow]=kw(Mw),Fw=W.forwardRef(((e,t)=>{const{__scopeForm:n,name:r,serverInvalid:o=!1,...i}=e,a=Tw(Mw,n).getFieldValidity(r),s=lr();return W.createElement(Lw,{scope:n,id:s,name:r,serverInvalid:o},W.createElement(Ch.div,Jn({"data-valid":Qw(a,o),"data-invalid":Gw(a,o)},i,{ref:t})))})),Iw="FormControl",Nw=W.forwardRef(((e,t)=>{const{__scopeForm:n,...r}=e,o=Tw(Iw,n),i=Ow(Iw,n),a=Dw(Iw,n),s=W.useRef(null),l=rr(t,s),u=r.name||i.name,c=r.id||i.id,d=o.getFieldCustomMatcherEntries(u),{onFieldValidityChange:f,onFieldCustomErrorsChange:p,onFieldValiditionClear:h}=o,m=W.useCallback((async e=>{if(qw(e.validity)){const t=$w(e.validity);return void f(u,t)}const t=e.form?new FormData(e.form):new FormData,n=[e.value,t],r=[],o=[];d.forEach((e=>{var t,i;i=n,"AsyncFunction"===(t=e).match.constructor.name||function(e,t){return e(...t)instanceof Promise}(t.match,i)?o.push(e):function(e){return"Function"===e.match.constructor.name}(e)&&r.push(e)}));const i=r.map((({id:e,match:t})=>[e,t(...n)])),a=Object.fromEntries(i),s=Object.values(a).some(Boolean),l=s;e.setCustomValidity(l?zw:"");const c=$w(e.validity);if(f(u,c),p(u,a),!s&&o.length>0){const t=o.map((({id:e,match:t})=>t(...n).then((t=>[e,t])))),r=await Promise.all(t),i=Object.fromEntries(r),a=Object.values(i).some(Boolean);e.setCustomValidity(a?zw:"");const s=$w(e.validity);f(u,s),p(u,i)}}),[d,u,p,f]);W.useEffect((()=>{const e=s.current;if(e){const t=()=>m(e);return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}}),[m]);const g=W.useCallback((()=>{const e=s.current;e&&(e.setCustomValidity(""),h(u))}),[u,h]);W.useEffect((()=>{var e;const t=null===(e=s.current)||void 0===e?void 0:e.form;if(t)return t.addEventListener("reset",g),()=>t.removeEventListener("reset",g)}),[g]),W.useEffect((()=>{const e=s.current,t=null==e?void 0:e.closest("form");if(t&&i.serverInvalid){const n=Yw(t);n===e&&n.focus()}}),[i.serverInvalid]);const v=o.getFieldValidity(u);return W.createElement(Ch.input,Jn({"data-valid":Qw(v,i.serverInvalid),"data-invalid":Gw(v,i.serverInvalid),"aria-invalid":!!i.serverInvalid||void 0,"aria-describedby":a.getFieldDescription(u),title:""},r,{ref:l,id:c,name:u,onInvalid:or(e.onInvalid,(e=>{const t=e.currentTarget;m(t)})),onChange:or(e.onChange,(e=>{g()}))}))})),zw="This value is not valid",Bw={badInput:zw,patternMismatch:"This value does not match the required pattern",rangeOverflow:"This value is too large",rangeUnderflow:"This value is too small",stepMismatch:"This value does not match the required step",tooLong:"This value is too long",tooShort:"This value is too short",typeMismatch:"This value does not match the required type",valid:void 0,valueMissing:"This value is missing"},Vw="FormMessage",jw=W.forwardRef(((e,t)=>{const{match:n,name:r,...o}=e,i=Ow(Vw,e.__scopeForm),a=null!=r?r:i.name;return void 0===n?W.createElement(Ww,Jn({},o,{ref:t,name:a}),e.children||zw):"function"==typeof n?W.createElement(Uw,Jn({match:n},o,{ref:t,name:a})):W.createElement(Hw,Jn({match:n},o,{ref:t,name:a}))})),Hw=W.forwardRef(((e,t)=>{const{match:n,forceMatch:r=!1,name:o,children:i,...a}=e,s=Tw(Vw,a.__scopeForm).getFieldValidity(o);return r||(null==s?void 0:s[n])?W.createElement(Ww,Jn({ref:t},a,{name:o}),null!=i?i:Bw[n]):null})),Uw=W.forwardRef(((e,t)=>{const{match:n,forceMatch:r=!1,name:o,id:i,children:a,...s}=e,l=Tw(Vw,s.__scopeForm),u=rr(t,W.useRef(null)),c=lr(),d=null!=i?i:c,f=W.useMemo((()=>({id:d,match:n})),[d,n]),{onFieldCustomMatcherEntryAdd:p,onFieldCustomMatcherEntryRemove:h}=l;W.useEffect((()=>(p(o,f),()=>h(o,f.id))),[f,o,p,h]);const m=l.getFieldValidity(o),g=l.getFieldCustomErrors(o)[d];return r||m&&!qw(m)&&g?W.createElement(Ww,Jn({id:d,ref:u},s,{name:o}),null!=a?a:zw):null})),Ww=W.forwardRef(((e,t)=>{const{__scopeForm:n,id:r,name:o,...i}=e,a=Dw(Vw,n),s=lr(),l=null!=r?r:s,{onFieldMessageIdAdd:u,onFieldMessageIdRemove:c}=a;return W.useEffect((()=>(u(o,l),()=>c(o,l))),[o,l,u,c]),W.createElement(Ch.span,Jn({id:l},i,{ref:t}))}));function $w(e){const t={};for(const n in e)t[n]=e[n];return t}function Kw(e){return e instanceof HTMLElement}function Xw(e){return"validity"in e&&(!1===e.validity.valid||"true"===e.getAttribute("aria-invalid"))}function Yw(e){const t=e.elements,[n]=Array.from(t).filter(Kw).filter(Xw);return n}function qw(e){let t=!1;for(const n in e){if("valid"!==n&&"customError"!==n&&e[n]){t=!0;break}}return t}function Qw(e,t){if(!0===(null==e?void 0:e.valid)&&!t)return!0}function Gw(e,t){if(!1===(null==e?void 0:e.valid)||t)return!0}const Zw=Aw,Jw=Fw,ex=Nw,tx=jw,nx=W.forwardRef(((e,t)=>{const{__scopeForm:n,...r}=e;return W.createElement(Ch.button,Jn({type:"submit"},r,{ref:t}))}));function rx(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function ox(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function ix(...e){return W.useCallback(ox(...e),e)}function ax(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>W.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return W.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=W.createContext(r),i=n.length;function a(t){const{scope:n,children:r,...a}=t,s=(null==n?void 0:n[e][i])||o,l=W.useMemo((()=>a),Object.values(a));return W.createElement(s.Provider,{value:l},r)}return n=[...n,r],a.displayName=t+"Provider",[a,function(n,a){const s=(null==a?void 0:a[e][i])||o,l=W.useContext(s);if(l)return l;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},sx(r,...t)]}function sx(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return W.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}const lx=W.forwardRef(((e,t)=>{const{children:n,...r}=e,o=W.Children.toArray(n),i=o.find(dx);if(i){const e=i.props.children,n=o.map((t=>t===i?W.Children.count(e)>1?W.Children.only(null):W.isValidElement(e)?e.props.children:null:t));return W.createElement(ux,Jn({},r,{ref:t}),W.isValidElement(e)?W.cloneElement(e,void 0,n):null)}return W.createElement(ux,Jn({},r,{ref:t}),n)}));lx.displayName="Slot";const ux=W.forwardRef(((e,t)=>{const{children:n,...r}=e;return W.isValidElement(n)?W.cloneElement(n,{...fx(r,n.props),ref:t?ox(t,n.ref):n.ref}):W.Children.count(n)>1?W.Children.only(null):null}));ux.displayName="SlotClone";const cx=({children:e})=>W.createElement(W.Fragment,null,e);function dx(e){return W.isValidElement(e)&&e.type===cx}function fx(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const px=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const n=W.forwardRef(((e,n)=>{const{asChild:r,...o}=e,i=r?lx:t;return W.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),W.createElement(i,Jn({},o,{ref:n}))}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function hx(e){const t=e+"CollectionProvider",[n,r]=ax(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=e+"CollectionSlot",s=e+"CollectionItemSlot",l="data-radix-collection-item";return[{Provider:e=>{const{scope:t,children:n}=e,r=$.useRef(null),i=$.useRef(new Map).current;return $.createElement(o,{scope:t,itemMap:i,collectionRef:r},n)},Slot:$.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=ix(t,i(a,n).collectionRef);return $.createElement(lx,{ref:o},r)})),ItemSlot:$.forwardRef(((e,t)=>{const{scope:n,children:r,...o}=e,a=$.useRef(null),u=ix(t,a),c=i(s,n);return $.useEffect((()=>(c.itemMap.set(a,{ref:a,...o}),()=>{c.itemMap.delete(a)}))),$.createElement(lx,{[l]:"",ref:u},r)}))},function(t){const n=i(e+"CollectionConsumer",t),r=$.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${l}]`)),r=Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)));return r}),[n.collectionRef,n.itemMap]);return r},r]}const mx=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?W.useLayoutEffect:()=>{},gx=K["useId".toString()]||(()=>{});let vx=0;function yx(e){const[t,n]=W.useState(gx());return mx((()=>{e||n((e=>null!=e?e:String(vx++)))}),[e]),e||(t?`radix-${t}`:"")}function bx(e){const t=W.useRef(e);return W.useEffect((()=>{t.current=e})),W.useMemo((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}function wx({prop:e,defaultProp:t,onChange:n=(()=>{})}){const[r,o]=function({defaultProp:e,onChange:t}){const n=W.useState(e),[r]=n,o=W.useRef(r),i=bx(t);return W.useEffect((()=>{o.current!==r&&(i(r),o.current=r)}),[r,o,i]),n}({defaultProp:t,onChange:n}),i=void 0!==e,a=i?e:r,s=bx(n),l=W.useCallback((t=>{if(i){const n="function"==typeof t?t(e):t;n!==e&&s(n)}else o(t)}),[i,e,o,s]);return[a,l]}const xx=W.createContext(void 0);function Ex(e){const t=W.useContext(xx);return e||t||"ltr"}const Sx="rovingFocusGroup.onEntryFocus",kx={bubbles:!1,cancelable:!0},Cx="RovingFocusGroup",[Px,_x,Tx]=hx(Cx),[Rx,Dx]=ax(Cx,[Tx]),[Ax,Mx]=Rx(Cx),Lx=W.forwardRef(((e,t)=>W.createElement(Px.Provider,{scope:e.__scopeRovingFocusGroup},W.createElement(Px.Slot,{scope:e.__scopeRovingFocusGroup},W.createElement(Ox,Jn({},e,{ref:t})))))),Ox=W.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...c}=e,d=W.useRef(null),f=ix(t,d),p=Ex(i),[h=null,m]=wx({prop:a,defaultProp:s,onChange:l}),[g,v]=W.useState(!1),y=bx(u),b=_x(n),w=W.useRef(!1),[x,E]=W.useState(0);return W.useEffect((()=>{const e=d.current;if(e)return e.addEventListener(Sx,y),()=>e.removeEventListener(Sx,y)}),[y]),W.createElement(Ax,{scope:n,orientation:r,dir:p,loop:o,currentTabStopId:h,onItemFocus:W.useCallback((e=>m(e)),[m]),onItemShiftTab:W.useCallback((()=>v(!0)),[]),onFocusableItemAdd:W.useCallback((()=>E((e=>e+1))),[]),onFocusableItemRemove:W.useCallback((()=>E((e=>e-1))),[])},W.createElement(px.div,Jn({tabIndex:g||0===x?-1:0,"data-orientation":r},c,{ref:f,style:{outline:"none",...e.style},onMouseDown:rx(e.onMouseDown,(()=>{w.current=!0})),onFocus:rx(e.onFocus,(e=>{const t=!w.current;if(e.target===e.currentTarget&&t&&!g){const t=new CustomEvent(Sx,kx);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=b().filter((e=>e.focusable));Nx([e.find((e=>e.active)),e.find((e=>e.id===h)),...e].filter(Boolean).map((e=>e.ref.current)))}}w.current=!1})),onBlur:rx(e.onBlur,(()=>v(!1)))})))})),Fx=W.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,s=yx(),l=i||s,u=Mx("RovingFocusGroupItem",n),c=u.currentTabStopId===l,d=_x(n),{onFocusableItemAdd:f,onFocusableItemRemove:p}=u;return W.useEffect((()=>{if(r)return f(),()=>p()}),[r,f,p]),W.createElement(Px.ItemSlot,{scope:n,id:l,focusable:r,active:o},W.createElement(px.span,Jn({tabIndex:c?0:-1,"data-orientation":u.orientation},a,{ref:t,onMouseDown:rx(e.onMouseDown,(e=>{r?u.onItemFocus(l):e.preventDefault()})),onFocus:rx(e.onFocus,(()=>u.onItemFocus(l))),onKeyDown:rx(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:Ix[r]}(e,u.orientation,u.dir);if(void 0!==t){e.preventDefault();let o=d().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const i=o.indexOf(e.currentTarget);o=u.loop?(r=i+1,(n=o).map(((e,t)=>n[(r+t)%n.length]))):o.slice(i+1)}setTimeout((()=>Nx(o)))}var n,r}))})))})),Ix={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Nx(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}const zx=Lx,Bx=Fx;function Vx(e){const[t,n]=W.useState(void 0);return mx((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}function jx(e){const t=W.useRef({value:e,previous:e});return W.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}const Hx=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=W.useState(),r=W.useRef({}),o=W.useRef(e),i=W.useRef("none"),a=e?"mounted":"unmounted",[s,l]=function(e,t){return W.useReducer(((e,n)=>{const r=t[e][n];return null!=r?r:e}),e)}(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return W.useEffect((()=>{const e=Ux(r.current);i.current="mounted"===s?e:"none"}),[s]),mx((()=>{const t=r.current,n=o.current;if(n!==e){const r=i.current,a=Ux(t);if(e)l("MOUNT");else if("none"===a||"none"===(null==t?void 0:t.display))l("UNMOUNT");else{l(n&&r!==a?"ANIMATION_OUT":"UNMOUNT")}o.current=e}}),[e,l]),mx((()=>{if(t){const e=e=>{const n=Ux(r.current).includes(e.animationName);e.target===t&&n&&yh.flushSync((()=>l("ANIMATION_END")))},n=e=>{e.target===t&&(i.current=Ux(r.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}l("ANIMATION_END")}),[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:W.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}(t),o="function"==typeof n?n({present:r.isPresent}):W.Children.only(n),i=ix(r.ref,o.ref);return"function"==typeof n||r.isPresent?W.cloneElement(o,{ref:i}):null};function Ux(e){return(null==e?void 0:e.animationName)||"none"}Hx.displayName="Presence";const Wx="Radio",[$x,Kx]=ax(Wx),[Xx,Yx]=$x(Wx),qx=W.forwardRef(((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:a,value:s="on",onCheck:l,...u}=e,[c,d]=W.useState(null),f=ix(t,(e=>d(e))),p=W.useRef(!1),h=!c||Boolean(c.closest("form"));return W.createElement(Xx,{scope:n,checked:o,disabled:a},W.createElement(px.button,Jn({type:"button",role:"radio","aria-checked":o,"data-state":Zx(o),"data-disabled":a?"":void 0,disabled:a,value:s},u,{ref:f,onClick:rx(e.onClick,(e=>{o||null==l||l(),h&&(p.current=e.isPropagationStopped(),p.current||e.stopPropagation())}))})),h&&W.createElement(Gx,{control:c,bubbles:!p.current,name:r,value:s,checked:o,required:i,disabled:a,style:{transform:"translateX(-100%)"}}))})),Qx=W.forwardRef(((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=Yx("RadioIndicator",n);return W.createElement(Hx,{present:r||i.checked},W.createElement(px.span,Jn({"data-state":Zx(i.checked),"data-disabled":i.disabled?"":void 0},o,{ref:t})))})),Gx=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=W.useRef(null),a=jx(n),s=Vx(t);return W.useEffect((()=>{const e=i.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(a!==n&&o){const t=new Event("click",{bubbles:r});o.call(e,n),e.dispatchEvent(t)}}),[a,n,r]),W.createElement("input",Jn({type:"radio","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Zx(e){return e?"checked":"unchecked"}const Jx=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],eE="RadioGroup",[tE,nE]=ax(eE,[Dx,Kx]),rE=Dx(),oE=Kx(),[iE,aE]=tE(eE),sE=W.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:a=!1,disabled:s=!1,orientation:l,dir:u,loop:c=!0,onValueChange:d,...f}=e,p=rE(n),h=Ex(u),[m,g]=wx({prop:i,defaultProp:o,onChange:d});return W.createElement(iE,{scope:n,name:r,required:a,disabled:s,value:m,onValueChange:g},W.createElement(zx,Jn({asChild:!0},p,{orientation:l,dir:h,loop:c}),W.createElement(px.div,Jn({role:"radiogroup","aria-required":a,"aria-orientation":l,"data-disabled":s?"":void 0,dir:h},f,{ref:t}))))})),lE=sE,uE=W.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=aE("RadioGroupItem",n),a=i.disabled||r,s=rE(n),l=oE(n),u=W.useRef(null),c=ix(t,u),d=i.value===o.value,f=W.useRef(!1);return W.useEffect((()=>{const e=e=>{Jx.includes(e.key)&&(f.current=!0)},t=()=>f.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),W.createElement(Bx,Jn({asChild:!0},s,{focusable:!a,active:d}),W.createElement(qx,Jn({disabled:a,required:i.required,checked:d},l,o,{name:i.name,ref:c,onCheck:()=>i.onValueChange(o.value),onKeyDown:rx((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:rx(o.onFocus,(()=>{var e;f.current&&(null===(e=u.current)||void 0===e||e.click())}))})))})),cE=W.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=oE(n);return W.createElement(Qx,Jn({},o,r,{ref:t}))}));function dE(e,[t,n]){return Math.min(n,Math.max(t,e))}const fE="dismissableLayer.update",pE="dismissableLayer.pointerDownOutside",hE="dismissableLayer.focusOutside";let mE;const gE=W.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),vE=W.forwardRef(((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,c=W.useContext(gE),[d,f]=W.useState(null),p=null!==(n=null==d?void 0:d.ownerDocument)&&void 0!==n?n:null===globalThis||void 0===globalThis?void 0:globalThis.document,[,h]=W.useState({}),m=ix(t,(e=>f(e))),g=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(v),b=d?g.indexOf(d):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,x=b>=y,E=function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=bx(e),r=W.useRef(!1),o=W.useRef((()=>{}));return W.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){bE(pE,n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}r.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));x&&!n&&(null==i||i(e),null==s||s(e),e.defaultPrevented||null==l||l())}),p),S=function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=bx(e),r=W.useRef(!1);return W.useEffect((()=>{const e=e=>{if(e.target&&!r.current){bE(hE,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==a||a(e),null==s||s(e),e.defaultPrevented||null==l||l())}),p);return function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=bx(e);W.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)}),[n,t])}((e=>{b===c.layers.size-1&&(null==o||o(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))}),p),W.useEffect((()=>{if(d)return r&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(mE=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),yE(),()=>{r&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=mE)}}),[d,p,r,c]),W.useEffect((()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),yE())}),[d,c]),W.useEffect((()=>{const e=()=>h({});return document.addEventListener(fE,e),()=>document.removeEventListener(fE,e)}),[]),W.createElement(px.div,Jn({},u,{ref:m,style:{pointerEvents:w?x?"auto":"none":void 0,...e.style},onFocusCapture:rx(e.onFocusCapture,S.onFocusCapture),onBlurCapture:rx(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:rx(e.onPointerDownCapture,E.onPointerDownCapture)}))}));function yE(){const e=new CustomEvent(fE);document.dispatchEvent(e)}function bE(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?function(e,t){e&&yh.flushSync((()=>e.dispatchEvent(t)))}(o,i):o.dispatchEvent(i)}let wE=0;function xE(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const EE="focusScope.autoFocusOnMount",SE="focusScope.autoFocusOnUnmount",kE={bubbles:!1,cancelable:!0},CE=W.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=W.useState(null),u=bx(o),c=bx(i),d=W.useRef(null),f=ix(t,(e=>l(e))),p=W.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;W.useEffect((()=>{if(r){let e=function(e){if(p.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:RE(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||RE(d.current,{select:!0}))},n=function(e){const t=document.activeElement;for(const n of e)n.removedNodes.length>0&&(null!=s&&s.contains(t)||RE(s))};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[r,s,p.paused]),W.useEffect((()=>{if(s){DE.add(p);const t=document.activeElement;if(!s.contains(t)){const n=new CustomEvent(EE,kE);s.addEventListener(EE,u),s.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(RE(r,{select:t}),document.activeElement!==n)return}((e=PE(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&RE(s))}return()=>{s.removeEventListener(EE,u),setTimeout((()=>{const e=new CustomEvent(SE,kE);s.addEventListener(SE,c),s.dispatchEvent(e),e.defaultPrevented||RE(null!=t?t:document.body,{select:!0}),s.removeEventListener(SE,c),DE.remove(p)}),0)}}var e}),[s,u,c,p]);const h=W.useCallback((e=>{if(!n&&!r)return;if(p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,i]=function(e){const t=PE(e),n=_E(t,e),r=_E(t.reverse(),e);return[n,r]}(t);r&&i?e.shiftKey||o!==i?e.shiftKey&&o===r&&(e.preventDefault(),n&&RE(i,{select:!0})):(e.preventDefault(),n&&RE(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,p.paused]);return W.createElement(px.div,Jn({tabIndex:-1},a,{ref:f,onKeyDown:h}))}));function PE(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function _E(e,t){for(const n of e)if(!TE(n,{upTo:t}))return n}function TE(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function RE(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}const DE=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=AE(e,t),e.unshift(t)},remove(t){var n;e=AE(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function AE(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}function ME(e){return e.split("-")[1]}function LE(e){return"y"===e?"height":"width"}function OE(e){return e.split("-")[0]}function FE(e){return["top","bottom"].includes(OE(e))?"x":"y"}function IE(e,t,n){let{reference:r,floating:o}=e;const i=r.x+r.width/2-o.width/2,a=r.y+r.height/2-o.height/2,s=FE(t),l=LE(s),u=r[l]/2-o[l]/2,c="x"===s;let d;switch(OE(t)){case"top":d={x:i,y:r.y-o.height};break;case"bottom":d={x:i,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:a};break;case"left":d={x:r.x-o.width,y:a};break;default:d={x:r.x,y:r.y}}switch(ME(t)){case"start":d[s]-=u*(n&&c?-1:1);break;case"end":d[s]+=u*(n&&c?-1:1)}return d}function NE(e,t){return"function"==typeof e?e(t):e}function zE(e){return"number"!=typeof e?(t=e,{top:0,right:0,bottom:0,left:0,...t}):{top:e,right:e,bottom:e,left:e};var t}function BE(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function VE(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=NE(t,e),h=zE(p),m=s[f?"floating"===d?"reference":"floating":d],g=BE(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),v="floating"===d?{...a.floating,x:r,y:o}:a.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),b=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},w=BE(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:y,strategy:l}):v);return{top:(g.top-w.top+h.top)/b.y,bottom:(w.bottom-g.bottom+h.bottom)/b.y,left:(g.left-w.left+h.left)/b.x,right:(w.right-g.right+h.right)/b.x}}const jE=Math.min,HE=Math.max;function UE(e,t,n){return HE(e,jE(t,n))}const WE=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s}=t,{element:l,padding:u=0}=NE(e,t)||{};if(null==l)return{};const c=zE(u),d={x:n,y:r},f=FE(o),p=LE(f),h=await a.getDimensions(l),m="y"===f,g=m?"top":"left",v=m?"bottom":"right",y=m?"clientHeight":"clientWidth",b=i.reference[p]+i.reference[f]-d[f]-i.floating[p],w=d[f]-i.reference[f],x=await(null==a.getOffsetParent?void 0:a.getOffsetParent(l));let E=x?x[y]:0;E&&await(null==a.isElement?void 0:a.isElement(x))||(E=s.floating[y]||i.floating[p]);const S=b/2-w/2,k=E/2-h[p]/2-1,C=jE(c[g],k),P=jE(c[v],k),_=C,T=E-h[p]-P,R=E/2-h[p]/2+S,D=UE(_,R,T),A=null!=ME(o)&&R!=D&&i.reference[p]/2-(R<_?C:P)-h[p]/2<0?R<_?_-R:T-R:0;return{[f]:d[f]-A,data:{[f]:D,centerOffset:R-D+A}}}}),$E=["top","right","bottom","left"];$E.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);const KE={left:"right",right:"left",bottom:"top",top:"bottom"};function XE(e){return e.replace(/left|right|bottom|top/g,(e=>KE[e]))}const YE={start:"end",end:"start"};function qE(e){return e.replace(/start|end/g,(e=>YE[e]))}const QE=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:c=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:h=!0,...m}=NE(e,t),g=OE(r),v=OE(a)===a,y=await(null==s.isRTL?void 0:s.isRTL(l.floating)),b=d||(v||!h?[XE(a)]:function(e){const t=XE(e);return[qE(e),t,qE(t)]}(a));d||"none"===p||b.push(...function(e,t,n,r){const o=ME(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}(OE(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(qE)))),i}(a,h,p,y));const w=[a,...b],x=await VE(t,m),E=[];let S=(null==(n=o.flip)?void 0:n.overflows)||[];if(u&&E.push(x[g]),c){const{main:e,cross:t}=function(e,t,n){void 0===n&&(n=!1);const r=ME(e),o=FE(e),i=LE(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=XE(a)),{main:a,cross:XE(a)}}(r,i,y);E.push(x[e],x[t])}if(S=[...S,{placement:r,overflows:E}],!E.every((e=>e<=0))){var k,C;const e=((null==(k=o.flip)?void 0:k.index)||0)+1,t=w[e];if(t)return{data:{index:e,overflows:S},reset:{placement:t}};let n=null==(C=S.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:C.placement;if(!n)switch(f){case"bestFit":{var P;const e=null==(P=S.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:P[0];e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}};function GE(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ZE(e){return $E.some((t=>e[t]>=0))}const JE=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=NE(e,t);switch(r){case"referenceHidden":{const e=GE(await VE(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:ZE(e)}}}case"escaped":{const e=GE(await VE(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:ZE(e)}}}default:return{}}}}};function eS(e){return"x"===e?"y":"x"}const tS=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=NE(e,t),u={x:n,y:r},c=await VE(t,l),d=FE(OE(o)),f=eS(d);let p=u[d],h=u[f];if(i){const e="y"===d?"bottom":"right";p=UE(p+c["y"===d?"top":"left"],p,p-c[e])}if(a){const e="y"===f?"bottom":"right";h=UE(h+c["y"===f?"top":"left"],h,h-c[e])}const m=s.fn({...t,[d]:p,[f]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},nS=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=(()=>{}),...s}=NE(e,t),l=await VE(t,s),u=OE(n),c=ME(n),d="x"===FE(n),{width:f,height:p}=r.floating;let h,m;"top"===u||"bottom"===u?(h=u,m=c===(await(null==o.isRTL?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=u,h="end"===c?"top":"bottom");const g=p-l[h],v=f-l[m],y=!t.middlewareData.shift;let b=g,w=v;if(d){const e=f-l.left-l.right;w=c||y?jE(v,e):e}else{const e=p-l.top-l.bottom;b=c||y?jE(g,e):e}if(y&&!c){const e=HE(l.left,0),t=HE(l.right,0),n=HE(l.top,0),r=HE(l.bottom,0);d?w=f-2*(0!==e||0!==t?e+t:HE(l.left,l.right)):b=p-2*(0!==n||0!==r?n+r:HE(l.top,l.bottom))}await a({...t,availableWidth:w,availableHeight:b});const x=await o.getDimensions(i.floating);return f!==x.width||p!==x.height?{reset:{rects:!0}}:{}}}};function rS(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function oS(e){return rS(e).getComputedStyle(e)}function iS(e){return e instanceof rS(e).Node}function aS(e){return iS(e)?(e.nodeName||"").toLowerCase():"#document"}function sS(e){return e instanceof HTMLElement||e instanceof rS(e).HTMLElement}function lS(e){return"undefined"!=typeof ShadowRoot&&(e instanceof rS(e).ShadowRoot||e instanceof ShadowRoot)}function uS(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=oS(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function cS(e){return["table","td","th"].includes(aS(e))}function dS(e){const t=fS(),n=oS(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function fS(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function pS(e){return["html","body","#document"].includes(aS(e))}const hS=Math.min,mS=Math.max,gS=Math.round,vS=Math.floor,yS=e=>({x:e,y:e});function bS(e){const t=oS(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=sS(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=gS(n)!==i||gS(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function wS(e){return e instanceof Element||e instanceof rS(e).Element}function xS(e){return wS(e)?e:e.contextElement}function ES(e){const t=xS(e);if(!sS(t))return yS(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=bS(t);let a=(i?gS(n.width):n.width)/r,s=(i?gS(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const SS=yS(0);function kS(e){const t=rS(e);return fS()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:SS}function CS(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=xS(e);let a=yS(1);t&&(r?wS(r)&&(a=ES(r)):a=ES(e));const s=(l=i,void 0===(u=n)&&(u=!1),!(c=r)||u&&c!==rS(l)||!u?yS(0):kS(i));var l,u,c;let d=(o.left+s.x)/a.x,f=(o.top+s.y)/a.y,p=o.width/a.x,h=o.height/a.y;if(i){const e=rS(i),t=r&&wS(r)?rS(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=ES(n),t=n.getBoundingClientRect(),r=getComputedStyle(n),o=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;d*=e.x,f*=e.y,p*=e.x,h*=e.y,d+=o,f+=i,n=rS(n).frameElement}}return BE({width:p,height:h,x:d,y:f})}function PS(e){return wS(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function _S(e){var t;return null==(t=(iS(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function TS(e){return CS(_S(e)).left+PS(e).scrollLeft}function RS(e){if("html"===aS(e))return e;const t=e.assignedSlot||e.parentNode||lS(e)&&e.host||_S(e);return lS(t)?t.host:t}function DS(e){const t=RS(e);return pS(t)?e.ownerDocument?e.ownerDocument.body:e.body:sS(t)&&uS(t)?t:DS(t)}function AS(e,t){var n;void 0===t&&(t=[]);const r=DS(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=rS(r);return o?t.concat(i,i.visualViewport||[],uS(r)?r:[]):t.concat(r,AS(r))}function MS(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=rS(e),r=_S(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=fS();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=_S(e),n=PS(e),r=e.ownerDocument.body,o=mS(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=mS(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+TS(e);const s=-n.scrollTop;return"rtl"===oS(r).direction&&(a+=mS(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(_S(e));else if(wS(t))r=function(e,t){const n=CS(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=sS(e)?ES(e):yS(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=kS(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return BE(r)}function LS(e,t){const n=RS(e);return!(n===t||!wS(n)||pS(n))&&("fixed"===oS(n).position||LS(n,t))}function OS(e,t,n){const r=sS(t),o=_S(t),i="fixed"===n,a=CS(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=yS(0);if(r||!r&&!i)if(("body"!==aS(t)||uS(o))&&(s=PS(t)),sS(t)){const e=CS(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=TS(o));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function FS(e,t){return sS(e)&&"fixed"!==oS(e).position?t?t(e):e.offsetParent:null}function IS(e,t){const n=rS(e);if(!sS(e))return n;let r=FS(e,t);for(;r&&cS(r)&&"static"===oS(r).position;)r=FS(r,t);return r&&("html"===aS(r)||"body"===aS(r)&&"static"===oS(r).position&&!dS(r))?n:r||function(e){let t=RS(e);for(;sS(t)&&!pS(t);){if(dS(t))return t;t=RS(t)}return null}(e)||n}const NS={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=sS(n),i=_S(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0},s=yS(1);const l=yS(0);if((o||!o&&"fixed"!==r)&&(("body"!==aS(n)||uS(i))&&(a=PS(n)),sS(n))){const e=CS(n);s=ES(n),l.x=e.x+n.clientLeft,l.y=e.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+l.x,y:t.y*s.y-a.scrollTop*s.y+l.y}},getDocumentElement:_S,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=AS(e).filter((e=>wS(e)&&"body"!==aS(e))),o=null;const i="fixed"===oS(e).position;let a=i?RS(e):e;for(;wS(a)&&!pS(a);){const t=oS(a),n=dS(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||uS(a)&&!n&&LS(e,a))?r=r.filter((e=>e!==a)):o=t,a=RS(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=i[0],s=i.reduce(((e,n)=>{const r=MS(t,n,o);return e.top=mS(r.top,e.top),e.right=hS(r.right,e.right),e.bottom=hS(r.bottom,e.bottom),e.left=mS(r.left,e.left),e}),MS(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:IS,getElementRects:async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||IS,i=this.getDimensions;return{reference:OS(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return bS(e)},getScale:ES,isElement:wS,isRTL:function(e){return"rtl"===getComputedStyle(e).direction}};function zS(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,u=xS(e),c=o||i?[...u?AS(u):[],...AS(t)]:[];c.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=u&&s?function(e,t){let n,r=null;const o=_S(e);function i(){clearTimeout(n),r&&r.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const{left:u,top:c,width:d,height:f}=e.getBoundingClientRect();if(s||t(),!d||!f)return;const p={rootMargin:-vS(c)+"px "+-vS(o.clientWidth-(u+d))+"px "+-vS(o.clientHeight-(c+f))+"px "+-vS(u)+"px",threshold:mS(0,hS(1,l))||1};let h=!0;function m(e){const t=e[0].intersectionRatio;if(t!==l){if(!h)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),100)}h=!1}try{r=new IntersectionObserver(m,{...p,root:o.ownerDocument})}catch(g){r=new IntersectionObserver(m,p)}r.observe(e)}(!0),i}(u,n):null;let f,p=-1,h=null;a&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{h&&h.observe(t)}))),n()})),u&&!l&&h.observe(u),h.observe(t));let m=l?CS(e):null;return l&&function t(){const r=CS(e);!m||r.x===m.x&&r.y===m.y&&r.width===m.width&&r.height===m.height||n(),m=r,f=requestAnimationFrame(t)}(),n(),()=>{c.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),d&&d(),h&&h.disconnect(),h=null,l&&cancelAnimationFrame(f)}}const BS=(e,t,n)=>{const r=new Map,o={platform:NS,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=IE(u,r,l),f=r,p={},h=0;for(let m=0;m<s.length;m++){const{name:n,fn:i}=s[m],{x:g,y:v,data:y,reset:b}=await i({x:c,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:u,platform:a,elements:{reference:e,floating:t}});c=null!=g?g:c,d=null!=v?v:d,p={...p,[n]:{...p[n],...y}},b&&h<=50&&(h++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(u=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:c,y:d}=IE(u,f,l))),m=-1)}return{x:c,y:d,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})},VS=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&function(e){return{}.hasOwnProperty.call(e,"current")}(n)?null!=n.current?WE({element:n.current,padding:r}).fn(t):{}:n?WE({element:n,padding:r}).fn(t):{}}});var jS="undefined"!=typeof document?W.useLayoutEffect:W.useEffect;function HS(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;0!=r--;)if(!HS(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!HS(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function US(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function WS(e,t){const n=US(e);return Math.round(t*n)/n}function $S(e){const t=W.useRef(e);return jS((()=>{t.current=e})),t}const KS=W.forwardRef(((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return W.createElement(px.svg,Jn({},i,{ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:W.createElement("polygon",{points:"0,0 30,0 15,10"}))})),XS="Popper",[YS,qS]=ax(XS),[QS,GS]=YS(XS),ZS=W.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=GS("PopperAnchor",n),a=W.useRef(null),s=ix(t,a);return W.useEffect((()=>{i.onAnchorChange((null==r?void 0:r.current)||a.current)})),r?null:W.createElement(px.div,Jn({},o,{ref:s}))})),JS="PopperContent",[ek,tk]=YS(JS),nk=W.forwardRef(((e,t)=>{var n,r,o,i,a,s,l,u;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:p="center",alignOffset:h=0,arrowPadding:m=0,collisionBoundary:g=[],collisionPadding:v=0,sticky:y="partial",hideWhenDetached:b=!1,avoidCollisions:w=!0,onPlaced:x,...E}=e,S=GS(JS,c),[k,C]=W.useState(null),P=ix(t,(e=>C(e))),[_,T]=W.useState(null),R=Vx(_),D=null!==(n=null==R?void 0:R.width)&&void 0!==n?n:0,A=null!==(r=null==R?void 0:R.height)&&void 0!==r?r:0,M=d+("center"!==p?"-"+p:""),L="number"==typeof v?v:{top:0,right:0,bottom:0,left:0,...v},O=Array.isArray(g)?g:[g],F=O.length>0,I={padding:L,boundary:O.filter(ok),altBoundary:F},{refs:N,floatingStyles:z,placement:B,isPositioned:V,middlewareData:j}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[c,d]=W.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=W.useState(r);HS(f,r)||p(r);const[h,m]=W.useState(null),[g,v]=W.useState(null),y=W.useCallback((e=>{e!=E.current&&(E.current=e,m(e))}),[m]),b=W.useCallback((e=>{e!==S.current&&(S.current=e,v(e))}),[v]),w=i||h,x=a||g,E=W.useRef(null),S=W.useRef(null),k=W.useRef(c),C=$S(l),P=$S(o),_=W.useCallback((()=>{if(!E.current||!S.current)return;const e={placement:t,strategy:n,middleware:f};P.current&&(e.platform=P.current),BS(E.current,S.current,e).then((e=>{const t={...e,isPositioned:!0};T.current&&!HS(k.current,t)&&(k.current=t,yh.flushSync((()=>{d(t)})))}))}),[f,t,n,P]);jS((()=>{!1===u&&k.current.isPositioned&&(k.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[u]);const T=W.useRef(!1);jS((()=>(T.current=!0,()=>{T.current=!1})),[]),jS((()=>{if(w&&(E.current=w),x&&(S.current=x),w&&x){if(C.current)return C.current(w,x,_);_()}}),[w,x,_,C]);const R=W.useMemo((()=>({reference:E,floating:S,setReference:y,setFloating:b})),[y,b]),D=W.useMemo((()=>({reference:w,floating:x})),[w,x]),A=W.useMemo((()=>{const e={position:n,left:0,top:0};if(!D.floating)return e;const t=WS(D.floating,c.x),r=WS(D.floating,c.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...US(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,D.floating,c.x,c.y]);return W.useMemo((()=>({...c,update:_,refs:R,elements:D,floatingStyles:A})),[c,_,R,D,A])}({strategy:"fixed",placement:M,whileElementsMounted:zS,elements:{reference:S.anchor},middleware:[(U={mainAxis:f+A,alignmentAxis:h},void 0===U&&(U=0),{name:"offset",options:U,async fn(e){const{x:t,y:n}=e,r=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=OE(n),s=ME(n),l="x"===FE(n),u=["left","top"].includes(a)?-1:1,c=i&&l?-1:1,d=NE(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof h&&(p="end"===s?-1*h:h),l?{x:p*c,y:f*u}:{x:f*u,y:p*c}}(e,U);return{x:t+r.x,y:n+r.y,data:r}}}),w&&tS({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?(void 0===H&&(H={}),{options:H,fn(e){const{x:t,y:n,placement:r,rects:o,middlewareData:i}=e,{offset:a=0,mainAxis:s=!0,crossAxis:l=!0}=NE(H,e),u={x:t,y:n},c=FE(r),d=eS(c);let f=u[c],p=u[d];const h=NE(a,e),m="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(s){const e="y"===c?"height":"width",t=o.reference[c]-o.floating[e]+m.mainAxis,n=o.reference[c]+o.reference[e]-m.mainAxis;f<t?f=t:f>n&&(f=n)}if(l){var g,v;const e="y"===c?"width":"height",t=["top","left"].includes(OE(r)),n=o.reference[d]-o.floating[e]+(t&&(null==(g=i.offset)?void 0:g[d])||0)+(t?0:m.crossAxis),a=o.reference[d]+o.reference[e]+(t?0:(null==(v=i.offset)?void 0:v[d])||0)-(t?m.crossAxis:0);p<n?p=n:p>a&&(p=a)}return{[c]:f,[d]:p}}}):void 0,...I}),w&&QE({...I}),nS({...I,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${n}px`),a.setProperty("--radix-popper-available-height",`${r}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),_&&VS({element:_,padding:m}),ik({arrowWidth:D,arrowHeight:A}),b&&JE({strategy:"referenceHidden"})]});var H,U;const[$,K]=ak(B),X=bx(x);mx((()=>{V&&(null==X||X())}),[V,X]);const Y=null===(o=j.arrow)||void 0===o?void 0:o.x,q=null===(i=j.arrow)||void 0===i?void 0:i.y,Q=0!==(null===(a=j.arrow)||void 0===a?void 0:a.centerOffset),[G,Z]=W.useState();return mx((()=>{k&&Z(window.getComputedStyle(k).zIndex)}),[k]),W.createElement("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{...z,transform:V?z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:G,"--radix-popper-transform-origin":[null===(s=j.transformOrigin)||void 0===s?void 0:s.x,null===(l=j.transformOrigin)||void 0===l?void 0:l.y].join(" ")},dir:e.dir},W.createElement(ek,{scope:c,placedSide:$,onArrowChange:T,arrowX:Y,arrowY:q,shouldHideArrow:Q},W.createElement(px.div,Jn({"data-side":$,"data-align":K},E,{ref:P,style:{...E.style,animation:V?void 0:"none",opacity:null!==(u=j.hide)&&void 0!==u&&u.referenceHidden?0:void 0}}))))})),rk={top:"bottom",right:"left",bottom:"top",left:"right"};function ok(e){return null!==e}const ik=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:s,rects:l,middlewareData:u}=t,c=0!==(null===(n=u.arrow)||void 0===n?void 0:n.centerOffset),d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,h]=ak(s),m={start:"0%",center:"50%",end:"100%"}[h],g=(null!==(r=null===(o=u.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,v=(null!==(i=null===(a=u.arrow)||void 0===a?void 0:a.y)&&void 0!==i?i:0)+f/2;let y="",b="";return"bottom"===p?(y=c?m:`${g}px`,b=-f+"px"):"top"===p?(y=c?m:`${g}px`,b=`${l.floating.height+f}px`):"right"===p?(y=-f+"px",b=c?m:`${v}px`):"left"===p&&(y=`${l.floating.width+f}px`,b=c?m:`${v}px`),{data:{x:y,y:b}}}});function ak(e){const[t,n="center"]=e.split("-");return[t,n]}const sk=e=>{const{__scopePopper:t,children:n}=e,[r,o]=W.useState(null);return W.createElement(QS,{scope:t,anchor:r,onAnchorChange:o},n)},lk=ZS,uk=nk,ck=W.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,o=tk("PopperArrow",n),i=rk[o.placedSide];return W.createElement("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0}},W.createElement(KS,Jn({},r,{ref:t,style:{...r.style,display:"block"}})))})),dk=W.forwardRef(((e,t)=>{var n;const{container:r=(null===globalThis||void 0===globalThis||null===(n=globalThis.document)||void 0===n?void 0:n.body),...o}=e;return r?bh.createPortal(W.createElement(px.div,Jn({},o,{ref:t})),r):null})),fk=W.forwardRef(((e,t)=>W.createElement(px.span,Jn({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})))),pk=fk,hk=[" ","Enter","ArrowUp","ArrowDown"],mk=[" ","Enter"],gk="Select",[vk,yk,bk]=hx(gk),[wk,xk]=ax(gk,[bk,qS]),Ek=qS(),[Sk,kk]=wk(gk),[Ck,Pk]=wk(gk),_k=W.forwardRef(((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=Ek(n),a=kk("SelectTrigger",n),s=a.disabled||r,l=ix(t,a.onTriggerChange),u=yk(n),[c,d,f]=tC((e=>{const t=u().filter((e=>!e.disabled)),n=t.find((e=>e.value===a.value)),r=nC(t,e,n);void 0!==r&&a.onValueChange(r.value)})),p=()=>{s||(a.onOpenChange(!0),f())};return W.createElement(lk,Jn({asChild:!0},i),W.createElement(px.button,Jn({type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":void 0===a.value?"":void 0},o,{ref:l,onClick:rx(o.onClick,(e=>{e.currentTarget.focus()})),onPointerDown:rx(o.onPointerDown,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&(p(),a.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)},e.preventDefault())})),onKeyDown:rx(o.onKeyDown,(e=>{const t=""!==c.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||d(e.key),t&&" "===e.key||hk.includes(e.key)&&(p(),e.preventDefault())}))})))})),Tk=W.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:a,...s}=e,l=kk("SelectValue",n),{onValueNodeHasChildrenChange:u}=l,c=void 0!==i,d=ix(t,l.onValueNodeChange);return mx((()=>{u(c)}),[u,c]),W.createElement(px.span,Jn({},s,{ref:d,style:{pointerEvents:"none"}}),void 0===l.value&&void 0!==a?a:i)})),Rk=W.forwardRef(((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return W.createElement(px.span,Jn({"aria-hidden":!0},o,{ref:t}),r||"▼")})),Dk="SelectContent",Ak=W.forwardRef(((e,t)=>{const n=kk(Dk,e.__scopeSelect),[r,o]=W.useState();if(mx((()=>{o(new DocumentFragment)}),[]),!n.open){const t=r;return t?yh.createPortal(W.createElement(Lk,{scope:e.__scopeSelect},W.createElement(vk.Slot,{scope:e.__scopeSelect},W.createElement("div",null,e.children))),t):null}return W.createElement(Fk,Jn({},e,{ref:t}))})),Mk=10,[Lk,Ok]=wk(Dk),Fk=W.forwardRef(((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:a,side:s,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:g,...v}=e,y=kk(Dk,n),[b,w]=W.useState(null),[x,E]=W.useState(null),S=ix(t,(e=>w(e))),[k,C]=W.useState(null),[P,_]=W.useState(null),T=yk(n),[R,D]=W.useState(!1),A=W.useRef(!1);W.useEffect((()=>{if(b)return jm(b)}),[b]),W.useEffect((()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:xE()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:xE()),wE++,()=>{1===wE&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),wE--}}),[]);const M=W.useCallback((e=>{const[t,...n]=T().map((e=>e.ref.current)),[r]=n.slice(-1),o=document.activeElement;for(const i of e){if(i===o)return;if(null==i||i.scrollIntoView({block:"nearest"}),i===t&&x&&(x.scrollTop=0),i===r&&x&&(x.scrollTop=x.scrollHeight),null==i||i.focus(),document.activeElement!==o)return}}),[T,x]),L=W.useCallback((()=>M([k,b])),[M,k,b]);W.useEffect((()=>{R&&L()}),[R,L]);const{onOpenChange:O,triggerPointerDownPosRef:F}=y;W.useEffect((()=>{if(b){let e={x:0,y:0};const t=t=>{var n,r,o,i;e={x:Math.abs(Math.round(t.pageX)-(null!==(n=null===(r=F.current)||void 0===r?void 0:r.x)&&void 0!==n?n:0)),y:Math.abs(Math.round(t.pageY)-(null!==(o=null===(i=F.current)||void 0===i?void 0:i.y)&&void 0!==o?o:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():b.contains(n.target)||O(!1),document.removeEventListener("pointermove",t),F.current=null};return null!==F.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[b,O,F]),W.useEffect((()=>{const e=()=>O(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[O]);const[I,N]=tC((e=>{const t=T().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=nC(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),z=W.useCallback(((e,t,n)=>{const r=!A.current&&!n;(void 0!==y.value&&y.value===t||r)&&(C(e),r&&(A.current=!0))}),[y.value]),B=W.useCallback((()=>null==b?void 0:b.focus()),[b]),V=W.useCallback(((e,t,n)=>{const r=!A.current&&!n;(void 0!==y.value&&y.value===t||r)&&_(e)}),[y.value]),j="popper"===r?Nk:Ik,H=j===Nk?{side:s,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:g}:{};return W.createElement(Lk,{scope:n,content:b,viewport:x,onViewportChange:E,itemRefCallback:z,selectedItem:k,onItemLeave:B,itemTextRefCallback:V,focusSelectedItem:L,selectedItemText:P,position:r,isPositioned:R,searchRef:I},W.createElement(Om,{as:lx,allowPinchZoom:!0},W.createElement(CE,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:rx(o,(e=>{var t;null===(t=y.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()}))},W.createElement(vE,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1)},W.createElement(j,Jn({role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:e=>e.preventDefault()},v,H,{onPlaced:()=>D(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:rx(v.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||N(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=T().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout((()=>M(t))),e.preventDefault()}}))}))))))})),Ik=W.forwardRef(((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=kk(Dk,n),a=Ok(Dk,n),[s,l]=W.useState(null),[u,c]=W.useState(null),d=ix(t,(e=>c(e))),f=yk(n),p=W.useRef(!1),h=W.useRef(!0),{viewport:m,selectedItem:g,selectedItemText:v,focusSelectedItem:y}=a,b=W.useCallback((()=>{if(i.trigger&&i.valueNode&&s&&u&&m&&g&&v){const e=i.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=i.valueNode.getBoundingClientRect(),o=v.getBoundingClientRect();if("rtl"!==i.dir){const r=o.left-t.left,i=n.left-r,a=e.left-i,l=e.width+a,u=Math.max(l,t.width),c=window.innerWidth-Mk,d=dE(i,[Mk,c-u]);s.style.minWidth=l+"px",s.style.left=d+"px"}else{const r=t.right-o.right,i=window.innerWidth-n.right-r,a=window.innerWidth-e.right-i,l=e.width+a,u=Math.max(l,t.width),c=window.innerWidth-Mk,d=dE(i,[Mk,c-u]);s.style.minWidth=l+"px",s.style.right=d+"px"}const a=f(),l=window.innerHeight-2*Mk,c=m.scrollHeight,d=window.getComputedStyle(u),h=parseInt(d.borderTopWidth,10),y=parseInt(d.paddingTop,10),b=parseInt(d.borderBottomWidth,10),w=h+y+c+parseInt(d.paddingBottom,10)+b,x=Math.min(5*g.offsetHeight,w),E=window.getComputedStyle(m),S=parseInt(E.paddingTop,10),k=parseInt(E.paddingBottom,10),C=e.top+e.height/2-Mk,P=l-C,_=g.offsetHeight/2,T=h+y+(g.offsetTop+_),R=w-T;if(T<=C){const e=g===a[a.length-1].ref.current;s.style.bottom="0px";const t=u.clientHeight-m.offsetTop-m.offsetHeight,n=T+Math.max(P,_+(e?k:0)+t+b);s.style.height=n+"px"}else{const e=g===a[0].ref.current;s.style.top="0px";const t=Math.max(C,h+m.offsetTop+(e?S:0)+_)+R;s.style.height=t+"px",m.scrollTop=T-C+m.offsetTop}s.style.margin=`${Mk}px 0`,s.style.minHeight=x+"px",s.style.maxHeight=l+"px",null==r||r(),requestAnimationFrame((()=>p.current=!0))}}),[f,i.trigger,i.valueNode,s,u,m,g,v,i.dir,r]);mx((()=>b()),[b]);const[w,x]=W.useState();mx((()=>{u&&x(window.getComputedStyle(u).zIndex)}),[u]);const E=W.useCallback((e=>{e&&!0===h.current&&(b(),null==y||y(),h.current=!1)}),[b,y]);return W.createElement(zk,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:E},W.createElement("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w}},W.createElement(px.div,Jn({},o,{ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))})),Nk=W.forwardRef(((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Mk,...i}=e,a=Ek(n);return W.createElement(uk,Jn({},a,i,{ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))})),[zk,Bk]=wk(Dk,{}),Vk="SelectViewport",jk=W.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ok(Vk,n),i=Bk(Vk,n),a=ix(t,o.onViewportChange),s=W.useRef(0);return W.createElement(W.Fragment,null,W.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),W.createElement(vk.Slot,{scope:n},W.createElement(px.div,Jn({"data-radix-select-viewport":"",role:"presentation"},r,{ref:a,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:rx(r.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=i;if(null!=r&&r.current&&n){const e=Math.abs(s.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*Mk,o=parseFloat(n.style.minHeight),i=parseFloat(n.style.height),a=Math.max(o,i);if(a<r){const o=a+e,i=Math.min(r,o),s=o-i;n.style.height=i+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}s.current=t.scrollTop}))}))))}));wk("SelectGroup");const Hk="SelectItem",[Uk,Wk]=wk(Hk),$k=W.forwardRef(((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...a}=e,s=kk(Hk,n),l=Ok(Hk,n),u=s.value===r,[c,d]=W.useState(null!=i?i:""),[f,p]=W.useState(!1),h=ix(t,(e=>{var t;return null===(t=l.itemRefCallback)||void 0===t?void 0:t.call(l,e,r,o)})),m=yx(),g=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};return W.createElement(Uk,{scope:n,value:r,disabled:o,textId:m,isSelected:u,onItemTextChange:W.useCallback((e=>{d((t=>{var n;return t||(null!==(n=null==e?void 0:e.textContent)&&void 0!==n?n:"").trim()}))}),[])},W.createElement(vk.ItemSlot,{scope:n,value:r,disabled:o,textValue:c},W.createElement(px.div,Jn({role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},a,{ref:h,onFocus:rx(a.onFocus,(()=>p(!0))),onBlur:rx(a.onBlur,(()=>p(!1))),onPointerUp:rx(a.onPointerUp,g),onPointerMove:rx(a.onPointerMove,(e=>{var t;o?null===(t=l.onItemLeave)||void 0===t||t.call(l):e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:rx(a.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null===(t=l.onItemLeave)||void 0===t||t.call(l))})),onKeyDown:rx(a.onKeyDown,(e=>{var t;""!==(null===(t=l.searchRef)||void 0===t?void 0:t.current)&&" "===e.key||(mk.includes(e.key)&&g()," "===e.key&&e.preventDefault())}))}))))})),Kk="SelectItemText",Xk=W.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,a=kk(Kk,n),s=Ok(Kk,n),l=Wk(Kk,n),u=Pk(Kk,n),[c,d]=W.useState(null),f=ix(t,(e=>d(e)),l.onItemTextChange,(e=>{var t;return null===(t=s.itemTextRefCallback)||void 0===t?void 0:t.call(s,e,l.value,l.disabled)})),p=null==c?void 0:c.textContent,h=W.useMemo((()=>W.createElement("option",{key:l.value,value:l.value,disabled:l.disabled},p)),[l.disabled,l.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:g}=u;return mx((()=>(m(h),()=>g(h))),[m,g,h]),W.createElement(W.Fragment,null,W.createElement(px.span,Jn({id:l.textId},i,{ref:f})),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?yh.createPortal(i.children,a.valueNode):null)})),Yk=W.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return Wk("SelectItemIndicator",n).isSelected?W.createElement(px.span,Jn({"aria-hidden":!0},r,{ref:t})):null})),qk="SelectScrollUpButton",Qk=W.forwardRef(((e,t)=>{const n=Ok(qk,e.__scopeSelect),r=Bk(qk,e.__scopeSelect),[o,i]=W.useState(!1),a=ix(t,r.onScrollButtonChange);return mx((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;i(e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),o?W.createElement(Jk,Jn({},e,{ref:a,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}})):null})),Gk="SelectScrollDownButton",Zk=W.forwardRef(((e,t)=>{const n=Ok(Gk,e.__scopeSelect),r=Bk(Gk,e.__scopeSelect),[o,i]=W.useState(!1),a=ix(t,r.onScrollButtonChange);return mx((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;i(n)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),o?W.createElement(Jk,Jn({},e,{ref:a,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}})):null})),Jk=W.forwardRef(((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=Ok("SelectScrollButton",n),a=W.useRef(null),s=yk(n),l=W.useCallback((()=>{null!==a.current&&(window.clearInterval(a.current),a.current=null)}),[]);return W.useEffect((()=>()=>l()),[l]),mx((()=>{var e;const t=s().find((e=>e.ref.current===document.activeElement));null==t||null===(e=t.ref.current)||void 0===e||e.scrollIntoView({block:"nearest"})}),[s]),W.createElement(px.div,Jn({"aria-hidden":!0},o,{ref:t,style:{flexShrink:0,...o.style},onPointerDown:rx(o.onPointerDown,(()=>{null===a.current&&(a.current=window.setInterval(r,50))})),onPointerMove:rx(o.onPointerMove,(()=>{var e;null===(e=i.onItemLeave)||void 0===e||e.call(i),null===a.current&&(a.current=window.setInterval(r,50))})),onPointerLeave:rx(o.onPointerLeave,(()=>{l()}))}))})),eC=W.forwardRef(((e,t)=>{const{value:n,...r}=e,o=W.useRef(null),i=ix(t,o),a=jx(n);return W.useEffect((()=>{const e=o.current,t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(a!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[a,n]),W.createElement(fk,{asChild:!0},W.createElement("select",Jn({},r,{ref:i,defaultValue:n})))}));function tC(e){const t=bx(e),n=W.useRef(""),r=W.useRef(0),o=W.useCallback((e=>{const o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout((()=>e("")),1e3))}(o)}),[t]),i=W.useCallback((()=>{n.current="",window.clearTimeout(r.current)}),[]);return W.useEffect((()=>()=>window.clearTimeout(r.current)),[]),[n,o,i]}function nC(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let i=(a=e,s=Math.max(o,0),a.map(((e,t)=>a[(s+t)%a.length])));var a,s;1===r.length&&(i=i.filter((e=>e!==n)));const l=i.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return l!==n?l:void 0}eC.displayName="BubbleSelect";const rC=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:a,defaultValue:s,onValueChange:l,dir:u,name:c,autoComplete:d,disabled:f,required:p}=e,h=Ek(t),[m,g]=W.useState(null),[v,y]=W.useState(null),[b,w]=W.useState(!1),x=Ex(u),[E=!1,S]=wx({prop:r,defaultProp:o,onChange:i}),[k,C]=wx({prop:a,defaultProp:s,onChange:l}),P=W.useRef(null),_=!m||Boolean(m.closest("form")),[T,R]=W.useState(new Set),D=Array.from(T).map((e=>e.props.value)).join(";");return W.createElement(sk,h,W.createElement(Sk,{required:p,scope:t,trigger:m,onTriggerChange:g,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:w,contentId:yx(),value:k,onValueChange:C,open:E,onOpenChange:S,dir:x,triggerPointerDownPosRef:P,disabled:f},W.createElement(vk.Provider,{scope:t},W.createElement(Ck,{scope:e.__scopeSelect,onNativeOptionAdd:W.useCallback((e=>{R((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:W.useCallback((e=>{R((t=>{const n=new Set(t);return n.delete(e),n}))}),[])},n)),_?W.createElement(eC,{key:D,"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:d,value:k,onChange:e=>C(e.target.value),disabled:f},void 0===k?W.createElement("option",{value:""}):null,Array.from(T)):null))},oC=_k,iC=Tk,aC=Rk,sC=e=>W.createElement(dk,Jn({asChild:!0},e)),lC=Ak,uC=jk,cC=$k,dC=Xk,fC=Yk,pC=Qk,hC=Zk,mC=W.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),gC=W.createContext({}),vC=W.createContext(null),yC="undefined"!=typeof document,bC=yC?W.useLayoutEffect:W.useEffect,wC=W.createContext({strict:!1});function xC(e){return"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function EC(e){return"string"==typeof e||Array.isArray(e)}function SC(e){return"object"==typeof e&&"function"==typeof e.start}const kC=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],CC=["initial",...kC];function PC(e){return SC(e.animate)||CC.some((t=>EC(e[t])))}function _C(e){return Boolean(PC(e)||e.variants)}function TC(e){const{initial:t,animate:n}=function(e,t){if(PC(e)){const{initial:t,animate:n}=e;return{initial:!1===t||EC(t)?t:void 0,animate:EC(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,W.useContext(gC));return W.useMemo((()=>({initial:t,animate:n})),[RC(t),RC(n)])}function RC(e){return Array.isArray(e)?e.join(" "):e}const DC={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"]},AC={};for(const RO in DC)AC[RO]={isEnabled:e=>DC[RO].some((t=>!!e[t]))};function MC(e){const t=W.useRef(null);return null===t.current&&(t.current=e()),t.current}const LC={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let OC=1;const FC=W.createContext({}),IC=W.createContext({}),NC=Symbol.for("motionComponentSymbol");function zC({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&function(e){for(const t in e)AC[t]={...AC[t],...e[t]}}(e);const i=W.forwardRef((function(i,a){let s;const l={...W.useContext(mC),...i,layoutId:BC(i)},{isStatic:u}=l,c=TC(i),d=u?void 0:MC((()=>{if(LC.hasEverUpdated)return OC++})),f=r(i,u);if(!u&&yC){c.visualElement=function(e,t,n,r){const{visualElement:o}=W.useContext(gC),i=W.useContext(wC),a=W.useContext(vC),s=W.useContext(mC).reducedMotion,l=W.useRef();r=r||i.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:o,props:n,presenceContext:a,blockInitialAnimation:!!a&&!1===a.initial,reducedMotionConfig:s}));const u=l.current;return W.useInsertionEffect((()=>{u&&u.update(n,a)})),bC((()=>{u&&u.render()})),W.useEffect((()=>{u&&u.updateFeatures()})),(window.HandoffAppearAnimations?bC:W.useEffect)((()=>{u&&u.animationState&&u.animationState.animateChanges()})),u}(o,f,l,t);const n=W.useContext(IC),r=W.useContext(wC).strict;c.visualElement&&(s=c.visualElement.loadFeatures(l,r,e,d,n))}return W.createElement(gC.Provider,{value:c},s&&c.visualElement?W.createElement(s,{visualElement:c.visualElement,...l}):null,n(o,i,d,function(e,t,n){return W.useCallback((r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):xC(n)&&(n.current=r))}),[t])}(f,c.visualElement,a),f,u,c.visualElement))}));return i[NC]=o,i}function BC({layoutId:e}){const t=W.useContext(FC).id;return t&&void 0!==e?t+"-"+e:e}function VC(e){function t(t,n={}){return zC(e(t,n))}if("undefined"==typeof Proxy)return t;const n=new Map;return new Proxy(t,{get:(e,r)=>(n.has(r)||n.set(r,t(r)),n.get(r))})}const jC=["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 HC(e){return"string"==typeof e&&!e.includes("-")&&!!(jC.indexOf(e)>-1||/[A-Z]/.test(e))}const UC={};const WC=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],$C=new Set(WC);function KC(e,{layout:t,layoutId:n}){return $C.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!UC[e]||"opacity"===e)}const XC=e=>Boolean(e&&e.getVelocity),YC={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},qC=WC.length;const QC=e=>t=>"string"==typeof t&&t.startsWith(e),GC=QC("--"),ZC=QC("var(--"),JC=(e,t)=>t&&"number"==typeof e?t.transform(e):e,eP=(e,t,n)=>Math.min(Math.max(n,e),t),tP={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},nP={...tP,transform:e=>eP(0,1,e)},rP={...tP,default:1},oP=e=>Math.round(1e5*e)/1e5,iP=/(-)?([\d]*\.?[\d])+/g,aP=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,sP=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function lP(e){return"string"==typeof e}const uP=e=>({test:t=>lP(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),cP=uP("deg"),dP=uP("%"),fP=uP("px"),pP=uP("vh"),hP=uP("vw"),mP={...dP,parse:e=>dP.parse(e)/100,transform:e=>dP.transform(100*e)},gP={...tP,transform:Math.round},vP={borderWidth:fP,borderTopWidth:fP,borderRightWidth:fP,borderBottomWidth:fP,borderLeftWidth:fP,borderRadius:fP,radius:fP,borderTopLeftRadius:fP,borderTopRightRadius:fP,borderBottomRightRadius:fP,borderBottomLeftRadius:fP,width:fP,maxWidth:fP,height:fP,maxHeight:fP,size:fP,top:fP,right:fP,bottom:fP,left:fP,padding:fP,paddingTop:fP,paddingRight:fP,paddingBottom:fP,paddingLeft:fP,margin:fP,marginTop:fP,marginRight:fP,marginBottom:fP,marginLeft:fP,rotate:cP,rotateX:cP,rotateY:cP,rotateZ:cP,scale:rP,scaleX:rP,scaleY:rP,scaleZ:rP,skew:cP,skewX:cP,skewY:cP,distance:fP,translateX:fP,translateY:fP,translateZ:fP,x:fP,y:fP,z:fP,perspective:fP,transformPerspective:fP,opacity:nP,originX:mP,originY:mP,originZ:fP,zIndex:gP,fillOpacity:nP,strokeOpacity:nP,numOctaves:gP};function yP(e,t,n,r){const{style:o,vars:i,transform:a,transformOrigin:s}=e;let l=!1,u=!1,c=!0;for(const d in t){const e=t[d];if(GC(d)){i[d]=e;continue}const n=vP[d],r=JC(e,n);if($C.has(d)){if(l=!0,a[d]=r,!c)continue;e!==(n.default||0)&&(c=!1)}else d.startsWith("origin")?(u=!0,s[d]=r):o[d]=r}if(t.transform||(l||r?o.transform=function(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,o){let i="";for(let a=0;a<qC;a++){const t=WC[a];void 0!==e[t]&&(i+=`${YC[t]||t}(${e[t]}) `)}return t&&!e.z&&(i+="translateZ(0)"),i=i.trim(),o?i=o(e,r?"":i):n&&r&&(i="none"),i}(e.transform,n,c,r):o.transform&&(o.transform="none")),u){const{originX:e="50%",originY:t="50%",originZ:n=0}=s;o.transformOrigin=`${e} ${t} ${n}`}}const bP=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function wP(e,t,n){for(const r in t)XC(t[r])||KC(r,n)||(e[r]=t[r])}function xP(e,t,n){const r={};return wP(r,e.style||{},e),Object.assign(r,function({transformTemplate:e},t,n){return W.useMemo((()=>{const r=bP();return yP(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)}),[t])}(e,t,n)),e.transformValues?e.transformValues(r):r}function EP(e,t,n){const r={},o=xP(e,t,n);return e.drag&&!1!==e.dragListener&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}const SP=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function kP(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||SP.has(e)}let CP=e=>!kP(e);try{(PP=require("@emotion/is-prop-valid").default)&&(CP=e=>e.startsWith("on")?!kP(e):PP(e))}catch(TO){}var PP;function _P(e,t,n){return"string"==typeof e?e:fP.transform(t+n*e)}const TP={offset:"stroke-dashoffset",array:"stroke-dasharray"},RP={offset:"strokeDashoffset",array:"strokeDasharray"};function DP(e,{attrX:t,attrY:n,originX:r,originY:o,pathLength:i,pathSpacing:a=1,pathOffset:s=0,...l},u,c,d){if(yP(e,l,u,d),c)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:h}=e;f.transform&&(h&&(p.transform=f.transform),delete f.transform),h&&(void 0!==r||void 0!==o||p.transform)&&(p.transformOrigin=function(e,t,n){return`${_P(t,e.x,e.width)} ${_P(n,e.y,e.height)}`}(h,void 0!==r?r:.5,void 0!==o?o:.5)),void 0!==t&&(f.x=t),void 0!==n&&(f.y=n),void 0!==i&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?TP:RP;e[i.offset]=fP.transform(-r);const a=fP.transform(t),s=fP.transform(n);e[i.array]=`${a} ${s}`}(f,i,a,s,!1)}const AP=()=>({...bP(),attrs:{}}),MP=e=>"string"==typeof e&&"svg"===e.toLowerCase();function LP(e,t,n,r){const o=W.useMemo((()=>{const n=AP();return DP(n,t,{enableHardwareAcceleration:!1},MP(r),e.transformTemplate),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};wP(t,e.style,e),o.style={...t,...o.style}}return o}function OP(e=!1){return(t,n,r,o,{latestValues:i},a)=>{const s=(HC(t)?LP:EP)(n,i,a,t),l=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||(CP(o)||!0===n&&kP(o)||!t&&!kP(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(n,"string"==typeof t,e),u={...l,...s,ref:o},{children:c}=n,d=W.useMemo((()=>XC(c)?c.get():c),[c]);return r&&(u["data-projection-id"]=r),W.createElement(t,{...u,children:d})}}const FP=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function IP(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const NP=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 zP(e,t,n,r){IP(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(NP.has(o)?o:FP(o),t.attrs[o])}function BP(e,t){const{style:n}=e,r={};for(const o in n)(XC(n[o])||t.style&&XC(t.style[o])||KC(o,e))&&(r[o]=n[o]);return r}function VP(e,t){const n=BP(e,t);for(const r in e)if(XC(e[r])||XC(t[r])){n["x"===r||"y"===r?"attr"+r.toUpperCase():r]=e[r]}return n}function jP(e,t,n,r={},o={}){return"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,o)),"string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,o)),t}const HP=e=>Array.isArray(e),UP=e=>Boolean(e&&"object"==typeof e&&e.mix&&e.toValue),WP=e=>HP(e)?e[e.length-1]||0:e;function $P(e){const t=XC(e)?e.get():e;return UP(t)?t.toValue():t}const KP=e=>(t,n)=>{const r=W.useContext(gC),o=W.useContext(vC),i=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,i){const a={latestValues:XP(r,o,i,e),renderState:t()};return n&&(a.mount=e=>n(r,e,a)),a}(e,t,r,o);return n?i():MC(i)};function XP(e,t,n,r){const o={},i=r(e,{});for(const f in i)o[f]=$P(i[f]);let{initial:a,animate:s}=e;const l=PC(e),u=_C(e);t&&u&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===s&&(s=t.animate));let c=!!n&&!1===n.initial;c=c||!1===a;const d=c?s:a;if(d&&"boolean"!=typeof d&&!SC(d)){(Array.isArray(d)?d:[d]).forEach((t=>{const n=jP(e,t);if(!n)return;const{transitionEnd:r,transition:i,...a}=n;for(const e in a){let t=a[e];if(Array.isArray(t)){t=t[c?t.length-1:0]}null!==t&&(o[e]=t)}for(const e in r)o[e]=r[e]}))}return o}const YP={useVisualState:KP({scrapeMotionValuesFromProps:VP,createRenderState:AP,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(o){n.dimensions={x:0,y:0,width:0,height:0}}DP(n,r,{enableHardwareAcceleration:!1},MP(t.tagName),e.transformTemplate),zP(t,n)}})},qP={useVisualState:KP({scrapeMotionValuesFromProps:BP,createRenderState:bP})};function QP(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const GP=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function ZP(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const JP=e=>t=>GP(t)&&e(t,ZP(t));function e_(e,t,n,r){return QP(e,t,JP(n),r)}const t_=(e,t)=>n=>t(e(n)),n_=(...e)=>e.reduce(t_);function r_(e){let t=null;return()=>{const n=()=>{t=null};return null===t&&(t=e,n)}}const o_=r_("dragHorizontal"),i_=r_("dragVertical");function a_(e){let t=!1;if("y"===e)t=i_();else if("x"===e)t=o_();else{const e=o_(),n=i_();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function s_(){const e=a_(!0);return!e||(e(),!1)}class l_{constructor(e){this.isMounted=!1,this.node=e}update(){}}const u_={delta:0,timestamp:0,isProcessing:!1};let c_=!0,d_=!1;const f_=["read","update","preRender","render","postRender"],p_=f_.reduce(((e,t)=>(e[t]=function(e){let t=[],n=[],r=0,o=!1,i=!1;const a=new WeakSet,s={schedule:(e,i=!1,s=!1)=>{const l=s&&o,u=l?t:n;return i&&a.add(e),-1===u.indexOf(e)&&(u.push(e),l&&o&&(r=t.length)),e},cancel:e=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1),a.delete(e)},process:l=>{if(o)i=!0;else{if(o=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let n=0;n<r;n++){const r=t[n];r(l),a.has(r)&&(s.schedule(r),e())}o=!1,i&&(i=!1,s.process(l))}}};return s}((()=>d_=!0)),e)),{}),h_=f_.reduce(((e,t)=>{const n=p_[t];return e[t]=(e,t=!1,r=!1)=>(d_||b_(),n.schedule(e,t,r)),e}),{}),m_=f_.reduce(((e,t)=>(e[t]=p_[t].cancel,e)),{}),g_=f_.reduce(((e,t)=>(e[t]=()=>p_[t].process(u_),e)),{}),v_=e=>p_[e].process(u_),y_=e=>{d_=!1,u_.delta=c_?1e3/60:Math.max(Math.min(e-u_.timestamp,40),1),u_.timestamp=e,u_.isProcessing=!0,f_.forEach(v_),u_.isProcessing=!1,d_&&(c_=!1,requestAnimationFrame(y_))},b_=()=>{d_=!0,c_=!0,u_.isProcessing||requestAnimationFrame(y_)};function w_(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End");return e_(e.current,n,((n,o)=>{if("touch"===n.type||s_())return;const i=e.getProps();e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",t),i[r]&&h_.update((()=>i[r](n,o)))}),{passive:!e.getProps()[r]})}const x_=(e,t)=>!!t&&(e===t||x_(e,t.parentElement)),E_=e=>e;function S_(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,ZP(n))}const k_=new WeakMap,C_=new WeakMap,P_=e=>{const t=k_.get(e.target);t&&t(e)},__=e=>{e.forEach(P_)};function T_(e,t,n){const r=function({root:e,...t}){const n=e||document;C_.has(n)||C_.set(n,{});const r=C_.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(__,{root:e,...t})),r[o]}(t);return k_.set(e,n),r.observe(e),()=>{k_.delete(e),r.unobserve(e)}}const R_={some:0,all:1};const D_={inView:{Feature:class extends l_{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:o}=e,i={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:R_[r]};return T_(this.node.current,i,(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,o&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),i=t?n:r;i&&i(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends l_{constructor(){super(...arguments),this.removeStartListeners=E_,this.removeEndListeners=E_,this.removeAccessibleListeners=E_,this.startPointerPress=(e,t)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),r=e_(window,"pointerup",((e,t)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:r}=this.node.getProps();h_.update((()=>{x_(this.node.current,e.target)?n&&n(e,t):r&&r(e,t)}))}),{passive:!(n.onTap||n.onPointerUp)}),o=e_(window,"pointercancel",((e,t)=>this.cancelPress(e,t)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=n_(r,o),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=QP(this.node.current,"keydown",(e=>{if("Enter"!==e.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=QP(this.node.current,"keyup",(e=>{"Enter"===e.key&&this.checkPressEnd()&&S_("up",((e,t)=>{const{onTap:n}=this.node.getProps();n&&h_.update((()=>n(e,t)))}))})),S_("down",((e,t)=>{this.startPress(e,t)}))})),t=QP(this.node.current,"blur",(()=>{this.isPressing&&S_("cancel",((e,t)=>this.cancelPress(e,t)))}));this.removeAccessibleListeners=n_(e,t)}}startPress(e,t){this.isPressing=!0;const{onTapStart:n,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&h_.update((()=>n(e,t)))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!s_()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&h_.update((()=>n(e,t)))}mount(){const e=this.node.getProps(),t=e_(this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=QP(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=n_(t,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends l_{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&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=n_(QP(this.node.current,"focus",(()=>this.onFocus())),QP(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends l_{mount(){this.unmount=n_(w_(this.node,!0),w_(this.node,!1))}unmount(){}}}};function A_(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}function M_(e,t,n){const r=e.getProps();return jP(r,t,void 0!==n?n:r.custom,function(e){const t={};return e.values.forEach(((e,n)=>t[n]=e.get())),t}(e),function(e){const t={};return e.values.forEach(((e,n)=>t[n]=e.getVelocity())),t}(e))}const L_="data-"+FP("framerAppearId");let O_=E_,F_=E_;const I_=e=>1e3*e,N_=e=>e/1e3,z_=!1,B_=e=>Array.isArray(e)&&"number"==typeof e[0];function V_(e){return Boolean(!e||"string"==typeof e&&H_[e]||B_(e)||Array.isArray(e)&&e.every(V_))}const j_=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,H_={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:j_([0,.65,.55,1]),circOut:j_([.55,0,1,.45]),backIn:j_([.31,.01,.66,-.59]),backOut:j_([.33,1.53,.69,.99])};function U_(e){if(e)return B_(e)?j_(e):Array.isArray(e)?e.map(U_):H_[e]}const W_={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},$_={},K_={};for(const RO in W_)K_[RO]=()=>(void 0===$_[RO]&&($_[RO]=W_[RO]()),$_[RO]);const X_=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Y_=1e-7,q_=12;function Q_(e,t,n,r){if(e===t&&n===r)return E_;const o=t=>function(e,t,n,r,o){let i,a,s=0;do{a=t+(n-t)/2,i=X_(a,r,o)-e,i>0?n=a:t=a}while(Math.abs(i)>Y_&&++s<q_);return a}(t,0,1,e,n);return e=>0===e||1===e?e:X_(o(e),t,r)}const G_=Q_(.42,0,1,1),Z_=Q_(0,0,.58,1),J_=Q_(.42,0,.58,1),eT=e=>Array.isArray(e)&&"number"!=typeof e[0],tT=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,nT=e=>t=>1-e(1-t),rT=e=>1-Math.sin(Math.acos(e)),oT=nT(rT),iT=tT(oT),aT=Q_(.33,1.53,.69,.99),sT=nT(aT),lT=tT(sT),uT={linear:E_,easeIn:G_,easeInOut:J_,easeOut:Z_,circIn:rT,circInOut:iT,circOut:oT,backIn:sT,backInOut:lT,backOut:aT,anticipate:e=>(e*=2)<1?.5*sT(e):.5*(2-Math.pow(2,-10*(e-1)))},cT=e=>{if(Array.isArray(e)){F_(4===e.length);const[t,n,r,o]=e;return Q_(t,n,r,o)}return"string"==typeof e?uT[e]:e},dT=(e,t)=>n=>Boolean(lP(n)&&sP.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),fT=(e,t,n)=>r=>{if(!lP(r))return r;const[o,i,a,s]=r.match(iP);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},pT={...tP,transform:e=>Math.round((e=>eP(0,255,e))(e))},hT={test:dT("rgb","red"),parse:fT("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+pT.transform(e)+", "+pT.transform(t)+", "+pT.transform(n)+", "+oP(nP.transform(r))+")"};const mT={test:dT("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:hT.transform},gT={test:dT("hsl","hue"),parse:fT("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+dP.transform(oP(t))+", "+dP.transform(oP(n))+", "+oP(nP.transform(r))+")"},vT={test:e=>hT.test(e)||mT.test(e)||gT.test(e),parse:e=>hT.test(e)?hT.parse(e):gT.test(e)?gT.parse(e):mT.parse(e),transform:e=>lP(e)?e:e.hasOwnProperty("red")?hT.transform(e):gT.transform(e)},yT=(e,t,n)=>-n*e+n*t+e;function bT(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}const wT=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},xT=[mT,hT,gT];function ET(e){const t=(n=e,xT.find((e=>e.test(n))));var n;let r=t.parse(e);return t===gT&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,i=0,a=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;o=bT(s,r,e+1/3),i=bT(s,r,e),a=bT(s,r,e-1/3)}else o=i=a=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:r}}(r)),r}const ST=(e,t)=>{const n=ET(e),r=ET(t),o={...n};return e=>(o.red=wT(n.red,r.red,e),o.green=wT(n.green,r.green,e),o.blue=wT(n.blue,r.blue,e),o.alpha=yT(n.alpha,r.alpha,e),hT.transform(o))},kT="${c}",CT="${n}";function PT(e){"number"==typeof e&&(e=`${e}`);const t=[];let n=0,r=0;const o=e.match(aP);o&&(n=o.length,e=e.replace(aP,kT),t.push(...o.map(vT.parse)));const i=e.match(iP);return i&&(r=i.length,e=e.replace(iP,CT),t.push(...i.map(tP.parse))),{values:t,numColors:n,numNumbers:r,tokenised:e}}function _T(e){return PT(e).values}function TT(e){const{values:t,numColors:n,tokenised:r}=PT(e),o=t.length;return e=>{let t=r;for(let r=0;r<o;r++)t=t.replace(r<n?kT:CT,r<n?vT.transform(e[r]):oP(e[r]));return t}}const RT=e=>"number"==typeof e?0:e;const DT={test:function(e){var t,n;return isNaN(e)&&lP(e)&&((null===(t=e.match(iP))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(aP))||void 0===n?void 0:n.length)||0)>0},parse:_T,createTransformer:TT,getAnimatableNone:function(e){const t=_T(e);return TT(e)(t.map(RT))}};function AT(e,t){return"number"==typeof e?n=>yT(e,t,n):vT.test(e)?ST(e,t):OT(e,t)}const MT=(e,t)=>{const n=[...e],r=n.length,o=e.map(((e,n)=>AT(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}},LT=(e,t)=>{const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=AT(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}},OT=(e,t)=>{const n=DT.createTransformer(t),r=PT(e),o=PT(t);return r.numColors===o.numColors&&r.numNumbers>=o.numNumbers?n_(MT(r.values,o.values),n):n=>`${n>0?t:e}`},FT=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},IT=(e,t)=>n=>yT(e,t,n);function NT(e,t,n){const r=[],o=n||("number"==typeof(i=e[0])?IT:"string"==typeof i?vT.test(i)?ST:OT:Array.isArray(i)?MT:"object"==typeof i?LT:IT);var i;const a=e.length-1;for(let s=0;s<a;s++){let n=o(e[s],e[s+1]);if(t){const e=Array.isArray(t)?t[s]||E_:t;n=n_(e,n)}r.push(n)}return r}function zT(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(F_(i===t.length),1===i)return()=>t[0];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=NT(t,r,o),s=a.length,l=t=>{let n=0;if(s>1)for(;n<e.length-2&&!(t<e[n+1]);n++);const r=FT(e[n],e[n+1],t);return a[n](r)};return n?t=>l(eP(e[0],e[i-1],t)):l}function BT(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=FT(0,t,r);e.push(yT(n,1,o))}}(t,e.length-1),t}function VT({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=eT(r)?r.map(cT):cT(r),i={done:!1,value:t[0]},a=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:BT(t),e),s=zT(a,t,{ease:Array.isArray(o)?o:(l=t,u=o,l.map((()=>u||J_)).splice(0,l.length-1))});var l,u;return{calculatedDuration:e,next:t=>(i.value=s(t),i.done=t>=e,i)}}function jT(e,t){return t?e*(1e3/t):0}const HT=5;function UT(e,t,n){const r=Math.max(t-HT,0);return jT(n-e(r),t-r)}const WT=.001,$T=.01,KT=10,XT=.05,YT=1;function qT({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i;O_(e<=I_(KT));let a=1-t;a=eP(XT,YT,a),e=eP($T,KT,N_(e)),a<1?(o=t=>{const r=t*a,o=r*e,i=r-n,s=GT(t,a),l=Math.exp(-o);return WT-i/s*l},i=t=>{const r=t*a*e,i=r*n+n,s=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-r),u=GT(Math.pow(t,2),a);return(-o(t)+WT>0?-1:1)*((i-s)*l)/u}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-WT,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let o=1;o<QT;o++)r-=e(r)/t(r);return r}(o,i,5/e);if(e=I_(e),isNaN(s))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}const QT=12;function GT(e,t){return e*Math.sqrt(1-t*t)}const ZT=["duration","bounce"],JT=["stiffness","damping","mass"];function eR(e,t){return t.some((t=>void 0!==e[t]))}function tR({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],a={done:!1,value:o},{stiffness:s,damping:l,mass:u,velocity:c,duration:d,isResolvedFromDuration:f}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!eR(e,JT)&&eR(e,ZT)){const n=qT(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}(r),p=c?-N_(c):0,h=l/(2*Math.sqrt(s*u)),m=i-o,g=N_(Math.sqrt(s/u)),v=Math.abs(m)<5;let y;if(n||(n=v?.01:2),t||(t=v?.005:.5),h<1){const e=GT(g,h);y=t=>{const n=Math.exp(-h*g*t);return i-n*((p+h*g*m)/e*Math.sin(e*t)+m*Math.cos(e*t))}}else if(1===h)y=e=>i-Math.exp(-g*e)*(m+(p+g*m)*e);else{const e=g*Math.sqrt(h*h-1);y=t=>{const n=Math.exp(-h*g*t),r=Math.min(e*t,300);return i-n*((p+h*g*m)*Math.sinh(r)+e*m*Math.cosh(r))/e}}return{calculatedDuration:f&&d||null,next:e=>{const r=y(e);if(f)a.done=e>=d;else{let o=p;0!==e&&(o=h<1?UT(y,e,r):0);const s=Math.abs(o)<=n,l=Math.abs(i-r)<=t;a.done=s&&l}return a.value=a.done?i:r,a}}}function nR({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},p=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let h=n*t;const m=d+h,g=void 0===a?m:a(m);g!==m&&(h=g-d);const v=e=>-h*Math.exp(-e/r),y=e=>g+v(e),b=e=>{const t=v(e),n=y(e);f.done=Math.abs(t)<=u,f.value=f.done?g:n};let w,x;const E=e=>{var t;(t=f.value,void 0!==s&&t<s||void 0!==l&&t>l)&&(w=e,x=tR({keyframes:[f.value,p(f.value)],velocity:UT(y,e,f.value),damping:o,stiffness:i,restDelta:u,restSpeed:c}))};return E(0),{calculatedDuration:null,next:e=>{let t=!1;return x||void 0!==w||(t=!0,b(e),E(e)),void 0!==w&&e>w?x.next(e-w):(!t&&b(e),f)}}}const rR=e=>{const t=({timestamp:t})=>e(t);return{start:()=>h_.update(t,!0),stop:()=>m_.update(t),now:()=>u_.isProcessing?u_.timestamp:performance.now()}},oR={decay:nR,inertia:nR,tween:VT,keyframes:VT,spring:tR},iR=2e4;function aR(e){let t=0;let n=e.next(t);for(;!n.done&&t<iR;)t+=50,n=e.next(t);return t>=iR?1/0:t}function sR({autoplay:e=!0,delay:t=0,driver:n=rR,keyframes:r,type:o="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:s="loop",onPlay:l,onStop:u,onComplete:c,onUpdate:d,...f}){let p,h,m=1,g=!1;const v=()=>{p&&p(),h=new Promise((e=>{p=e}))};let y;v();const b=oR[o]||VT;let w;b!==VT&&"number"!=typeof r[0]&&(w=zT([0,100],r,{clamp:!1}),r=[0,100]);const x=b({...f,keyframes:r});let E;"mirror"===s&&(E=b({...f,keyframes:[...r].reverse(),velocity:-(f.velocity||0)}));let S="idle",k=null,C=null,P=null;null===x.calculatedDuration&&i&&(x.calculatedDuration=aR(x));const{calculatedDuration:_}=x;let T=1/0,R=1/0;null!==_&&(T=_+a,R=T*(i+1)-a);let D=0;const A=e=>{if(null===C)return;m>0&&(C=Math.min(C,e)),D=null!==k?k:(e-C)*m;const n=D-t,o=n<0;D=Math.max(n,0),"finished"===S&&null===k&&(D=R);let l=D,u=x;if(i){const e=D/T;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,i+1);const r=Boolean(t%2);r&&("reverse"===s?(n=1-n,a&&(n-=a/T)):"mirror"===s&&(u=E));let o=eP(0,1,n);D>R&&(o="reverse"===s&&r?1:0),l=o*T}const c=o?{done:!1,value:r[0]}:u.next(l);w&&(c.value=w(c.value));let{done:f}=c;o||null===_||(f=D>=R);const p=null===k&&("finished"===S||"running"===S&&f||m<0&&D<=0);return d&&d(c.value),p&&O(),c},M=()=>{y&&y.stop(),y=void 0},L=()=>{S="idle",M(),v(),C=P=null},O=()=>{S="finished",c&&c(),M(),v()},F=()=>{if(g)return;y||(y=n(A));const e=y.now();l&&l(),S="running",null!==k?C=e-k:C||(C=e),P=C,k=null,y.start()};e&&F();const I={then:(e,t)=>h.then(e,t),get time(){return N_(D)},set time(e){e=I_(e),D=e,null===k&&y&&0!==m?C=y.now()-e/m:k=e},get duration(){const e=null===x.calculatedDuration?aR(x):x.calculatedDuration;return N_(e)},get speed(){return m},set speed(e){e!==m&&y&&(m=e,I.time=N_(D))},get state(){return S},play:F,pause:()=>{S="paused",k=D},stop:()=>{g=!0,"idle"!==S&&(S="idle",u&&u(),L())},cancel:()=>{null!==P&&A(P),L()},complete:()=>{S="finished"},sample:e=>(C=0,A(e))};return I}const lR=new Set(["opacity","clipPath","filter","transform","backgroundColor"]);function uR(e,t,{onUpdate:n,onComplete:r,...o}){if(!(K_.waapi()&&lR.has(t)&&!o.repeatDelay&&"mirror"!==o.repeatType&&0!==o.damping&&"inertia"!==o.type))return!1;let i,a,s=!1;const l=()=>{a=new Promise((e=>{i=e}))};l();let{keyframes:u,duration:c=300,ease:d}=o;if(((e,t)=>"spring"===t.type||"backgroundColor"===e||!V_(t.ease))(t,o)){const e=sR({...o,repeat:0,delay:0});let t={done:!1,value:u[0]};const n=[];let r=0;for(;!t.done&&r<2e4;)t=e.sample(r),n.push(t.value),r+=10;u=n,c=r-10,d="linear"}const f=function(e,t,n,{delay:r=0,duration:o,repeat:i=0,repeatType:a="loop",ease:s,times:l}={}){const u={[t]:n};l&&(u.offset=l);const c=U_(s);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:o,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:i+1,direction:"reverse"===a?"alternate":"normal"})}(e.owner.current,t,u,{...o,duration:c,ease:d}),p=()=>{h_.update((()=>f.cancel())),i(),l()};return f.onfinish=()=>{e.set(function(e,{repeat:t,repeatType:n="loop"}){return e[t&&"loop"!==n&&t%2==1?0:e.length-1]}(u,o)),r&&r(),p()},{then:(e,t)=>a.then(e,t),get time(){return N_(f.currentTime||0)},set time(e){f.currentTime=I_(e)},get speed(){return f.playbackRate},set speed(e){f.playbackRate=e},get duration(){return N_(c)},play:()=>{s||f.play()},pause:()=>f.pause(),stop:()=>{if(s=!0,"idle"===f.playState)return;const{currentTime:t}=f;if(t){const n=sR({...o,autoplay:!1});e.setWithVelocity(n.sample(t-10).value,n.sample(t).value,10)}p()},complete:()=>f.finish(),cancel:p}}const cR={type:"spring",stiffness:500,damping:25,restSpeed:10},dR={type:"keyframes",duration:.8},fR={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},pR=(e,{keyframes:t})=>t.length>2?dR:$C.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:cR:fR,hR=(e,t)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!DT.test(t)||t.startsWith("url("))),mR=new Set(["brightness","contrast","saturate","opacity"]);function gR(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(iP)||[];if(!r)return e;const o=n.replace(r,"");let i=mR.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const vR=/([a-z-]*)\(.*?\)/g,yR={...DT,getAnimatableNone:e=>{const t=e.match(vR);return t?t.map(gR).join(" "):e}},bR={...vP,color:vT,backgroundColor:vT,outlineColor:vT,fill:vT,stroke:vT,borderColor:vT,borderTopColor:vT,borderRightColor:vT,borderBottomColor:vT,borderLeftColor:vT,filter:yR,WebkitFilter:yR},wR=e=>bR[e];function xR(e,t){let n=wR(e);return n!==yR&&(n=DT),n.getAnimatableNone?n.getAnimatableNone(t):void 0}function ER(e){return 0===e||"string"==typeof e&&0===parseFloat(e)&&-1===e.indexOf(" ")}function SR(e){return"number"==typeof e?0:xR("",e)}function kR(e,t){return e[t]||e.default||e}const CR=(e,t,n,r={})=>o=>{const i=kR(r,e)||{},a=i.delay||r.delay||0;let{elapsed:s=0}=r;s-=I_(a);const l=function(e,t,n,r){const o=hR(t,n);let i=void 0!==r.from?r.from:e.get();if("none"===i&&o&&"string"==typeof n?i=xR(t,n):ER(i)&&"string"==typeof n?i=SR(n):!Array.isArray(n)&&ER(n)&&"string"==typeof i&&(n=SR(i)),Array.isArray(n)){for(let e=0;e<n.length;e++)null===n[e]&&(n[e]=0===e?i:n[e-1]);return n}return[i,n]}(t,e,n,i),u=l[0],c=l[l.length-1],d=hR(e,u),f=hR(e,c);let p={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...i,delay:-s,onUpdate:e=>{t.set(e),i.onUpdate&&i.onUpdate(e)},onComplete:()=>{o(),i.onComplete&&i.onComplete()}};if(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:s,from:l,elapsed:u,...c}){return!!Object.keys(c).length}(i)||(p={...p,...pR(e,p)}),p.duration&&(p.duration=I_(p.duration)),p.repeatDelay&&(p.repeatDelay=I_(p.repeatDelay)),!d||!f||z_||!1===i.type)return function({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const o=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:E_,pause:E_,stop:E_,then:e=>(e(),Promise.resolve()),cancel:E_,complete:E_});return t?sR({keyframes:[0,1],duration:0,delay:t,onComplete:o}):o()}(p);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const n=uR(t,e,p);if(n)return n}return sR(p)};function PR(e){return Boolean(XC(e)&&e.add)}const _R=e=>/^0[^.\s]+$/.test(e);function TR(e,t){-1===e.indexOf(t)&&e.push(t)}function RR(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class DR{constructor(){this.subscriptions=[]}add(e){return TR(this.subscriptions,e),()=>RR(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class AR{constructor(e,t={}){this.version="10.10.0",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(e,t=!0)=>{this.prev=this.current,this.current=e;const{delta:n,timestamp:r}=u_;this.lastUpdated!==r&&(this.timeDelta=n,this.lastUpdated=r,h_.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>h_.postRender(this.velocityCheck),this.velocityCheck=({timestamp:e})=>{e!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=(e=>!isNaN(parseFloat(e)))(this.current),this.owner=t.owner}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new DR);const n=this.events[e].add(t);return"change"===e?()=>{n(),h_.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=e,this.timeDelta=n}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?jT(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),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 MR(e,t){return new AR(e,t)}const LR=e=>t=>t.test(e),OR=[tP,fP,dP,cP,hP,pP,{test:e=>"auto"===e,parse:e=>e}],FR=e=>OR.find(LR(e)),IR=[...OR,vT,DT],NR=e=>IR.find(LR(e));function zR(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,MR(n))}function BR(e,t){if(!t)return;return(t[e]||t.default||t).from}function VR({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function jR(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:a,...s}=e.makeTargetAnimatable(t);const l=e.getValue("willChange");r&&(i=r);const u=[],c=o&&e.animationState&&e.animationState.getState()[o];for(const d in s){const t=e.getValue(d),r=s[d];if(!t||void 0===r||c&&VR(c,d))continue;const o={delay:n,elapsed:0,...i};if(window.HandoffAppearAnimations&&!t.hasAnimated){const n=e.getProps()[L_];n&&(o.elapsed=window.HandoffAppearAnimations(n,d,t,h_))}t.start(CR(d,t,r,e.shouldReduceMotion&&$C.has(d)?{type:!1}:o));const a=t.animation;PR(l)&&(l.add(d),a.then((()=>l.remove(d)))),u.push(a)}return a&&Promise.all(u).then((()=>{a&&function(e,t){const n=M_(e,t);let{transitionEnd:r={},transition:o={},...i}=n?e.makeTargetAnimatable(n,!1):{};i={...i,...r};for(const a in i)zR(e,a,WP(i[a]))}(e,a)})),u}function HR(e,t,n={}){const r=M_(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(jR(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:i=0,staggerChildren:a,staggerDirection:s}=o;return function(e,t,n=0,r=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*r,l=1===o?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort(UR).forEach(((e,r)=>{e.notify("AnimationStart",t),a.push(HR(e,t,{...i,delay:n+l(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(a)}(e,t,i+r,a,s,n)}:()=>Promise.resolve(),{when:s}=o;if(s){const[e,t]="beforeChildren"===s?[i,a]:[a,i];return e().then((()=>t()))}return Promise.all([i(),a(n.delay)])}function UR(e,t){return e.sortNodePosition(t)}const WR=[...kC].reverse(),$R=kC.length;function KR(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map((t=>HR(e,t,n)));r=Promise.all(o)}else if("string"==typeof t)r=HR(e,t,n);else{const o="function"==typeof t?M_(e,t,n.custom):t;r=Promise.all(jR(e,o,n))}return r.then((()=>e.notify("AnimationComplete",t)))}(e,t,n))))}function XR(e){let t=KR(e);const n={animate:qR(!0),whileInView:qR(),whileHover:qR(),whileTap:qR(),whileDrag:qR(),whileFocus:qR(),exit:qR()};let r=!0;const o=(t,n)=>{const r=M_(e,n);if(r){const{transition:e,transitionEnd:n,...o}=r;t={...t,...o,...n}}return t};function i(i,a){const s=e.getProps(),l=e.getVariantContext(!0)||{},u=[],c=new Set;let d={},f=1/0;for(let t=0;t<$R;t++){const p=WR[t],h=n[p],m=void 0!==s[p]?s[p]:l[p],g=EC(m),v=p===a?h.isActive:null;!1===v&&(f=t);let y=m===l[p]&&m!==s[p]&&g;if(y&&r&&e.manuallyAnimateOnMount&&(y=!1),h.protectedKeys={...d},!h.isActive&&null===v||!m&&!h.prevProp||SC(m)||"boolean"==typeof m)continue;const b=YR(h.prevProp,m);let w=b||p===a&&h.isActive&&!y&&g||t>f&&g;const x=Array.isArray(m)?m:[m];let E=x.reduce(o,{});!1===v&&(E={});const{prevResolvedValues:S={}}=h,k={...S,...E},C=e=>{w=!0,c.delete(e),h.needsAnimating[e]=!0};for(const e in k){const t=E[e],n=S[e];d.hasOwnProperty(e)||(t!==n?HP(t)&&HP(n)?!A_(t,n)||b?C(e):h.protectedKeys[e]=!0:void 0!==t?C(e):c.add(e):void 0!==t&&c.has(e)?C(e):h.protectedKeys[e]=!0)}h.prevProp=m,h.prevResolvedValues=E,h.isActive&&(d={...d,...E}),r&&e.blockInitialAnimation&&(w=!1),w&&!y&&u.push(...x.map((e=>({animation:e,options:{type:p,...i}}))))}if(c.size){const t={};c.forEach((n=>{const r=e.getBaseTarget(n);void 0!==r&&(t[n]=r)})),u.push({animation:t})}let p=Boolean(u.length);return r&&!1===s.initial&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,p?t(u):Promise.resolve()}return{animateChanges:i,setActive:function(t,r,o){var a;if(n[t].isActive===r)return Promise.resolve();null===(a=e.variantChildren)||void 0===a||a.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const s=i(o,t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n}}function YR(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!A_(t,e)}function qR(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let QR=0;const GR={animation:{Feature:class extends l_{constructor(e){super(e),e.animationState||(e.animationState=XR(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),SC(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends l_{constructor(){super(...arguments),this.id=QR++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t,custom:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const o=this.node.animationState.setActive("exit",!e,{custom:null!=n?n:this.node.getProps().custom});t&&!e&&o.then((()=>t(this.id)))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}},ZR=(e,t)=>Math.abs(e-t);class JR{constructor(e,t,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=nD(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=ZR(e.x,t.x),r=ZR(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=u_;this.history.push({...r,timestamp:o});const{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=eD(t,this.transformPagePoint),h_.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{if(this.end(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const{onEnd:n,onSessionEnd:r}=this.handlers,o=nD("pointercancel"===e.type?this.lastMoveEventInfo:eD(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!GP(e))return;this.handlers=t,this.transformPagePoint=n;const r=eD(ZP(e),this.transformPagePoint),{point:o}=r,{timestamp:i}=u_;this.history=[{...o,timestamp:i}];const{onSessionStart:a}=t;a&&a(e,nD(r,this.history)),this.removeListeners=n_(e_(window,"pointermove",this.handlePointerMove),e_(window,"pointerup",this.handlePointerUp),e_(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),m_.update(this.updatePoint)}}function eD(e,t){return t?{point:t(e.point)}:e}function tD(e,t){return{x:e.x-t.x,y:e.y-t.y}}function nD({point:e},t){return{point:e,delta:tD(e,oD(t)),offset:tD(e,rD(t)),velocity:iD(t,.1)}}function rD(e){return e[0]}function oD(e){return e[e.length-1]}function iD(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=oD(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>I_(t)));)n--;if(!r)return{x:0,y:0};const i=N_(o.timestamp-r.timestamp);if(0===i)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function aD(e){return e.max-e.min}function sD(e,t=0,n=.01){return Math.abs(e-t)<=n}function lD(e,t,n,r=.5){e.origin=r,e.originPoint=yT(t.min,t.max,e.origin),e.scale=aD(n)/aD(t),(sD(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=yT(n.min,n.max,e.origin)-e.originPoint,(sD(e.translate)||isNaN(e.translate))&&(e.translate=0)}function uD(e,t,n,r){lD(e.x,t.x,n.x,r?r.originX:void 0),lD(e.y,t.y,n.y,r?r.originY:void 0)}function cD(e,t,n){e.min=n.min+t.min,e.max=e.min+aD(t)}function dD(e,t,n){e.min=t.min-n.min,e.max=e.min+aD(t)}function fD(e,t,n){dD(e.x,t.x,n.x),dD(e.y,t.y,n.y)}function pD(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function hD(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}}const mD=.35;function gD(e,t,n){return{min:vD(e,t),max:vD(e,n)}}function vD(e,t){return"number"==typeof e?e:e[t]||0}const yD=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),bD=()=>({x:{min:0,max:0},y:{min:0,max:0}});function wD(e){return[e("x"),e("y")]}function xD({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function ED(e){return void 0===e||1===e}function SD({scale:e,scaleX:t,scaleY:n}){return!ED(e)||!ED(t)||!ED(n)}function kD(e){return SD(e)||CD(e)||e.z||e.rotate||e.rotateX||e.rotateY}function CD(e){return PD(e.x)||PD(e.y)}function PD(e){return e&&"0%"!==e}function _D(e,t,n){return n+t*(e-n)}function TD(e,t,n,r,o){return void 0!==o&&(e=_D(e,o,r)),_D(e,n,r)+t}function RD(e,t=0,n=1,r,o){e.min=TD(e.min,t,n,r,o),e.max=TD(e.max,t,n,r,o)}function DD(e,{x:t,y:n}){RD(e.x,t.translate,t.scale,t.originPoint),RD(e.y,n.translate,n.scale,n.originPoint)}function AD(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function MD(e,t){e.min=e.min+t,e.max=e.max+t}function LD(e,t,[n,r,o]){const i=void 0!==t[o]?t[o]:.5,a=yT(e.min,e.max,i);RD(e,t[n],t[r],a,t.scale)}const OD=["x","scaleX","originX"],FD=["y","scaleY","originY"];function ID(e,t){LD(e.x,t,OD),LD(e.y,t,FD)}function ND(e,t){return xD(function(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}}(e.getBoundingClientRect(),t))}const zD=new WeakMap;class BD{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=bD(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;this.panSession=new JR(e,{onSessionStart:e=>{this.stopAnimation(),t&&this.snapToCursor(ZP(e,"page").point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:o}=this.getProps();if(n&&!r&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=a_(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),wD((e=>{let t=this.getAxisMotionValue(e).get()||0;if(dP.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=aD(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t})),o&&h_.update((()=>o(e,t)));const{animationState:i}=this.visualElement;i&&i.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:i}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:a}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(a),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),i&&i(e,t)},onSessionEnd:(e,t)=>this.stop(e,t)},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:o}=this.getProps();o&&h_.update((()=>o(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!VD(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?yT(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?yT(n,e,r.max):Math.min(e,n)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),{layout:n}=this.visualElement.projection||{},r=this.constraints;e&&xC(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:pD(e.x,n,o),y:pD(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=mD){return!1===e?e=0:!0===e&&(e=mD),{x:gD(e,"left","right"),y:gD(e,"top","bottom")}}(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&wD((e=>{this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!xC(e))return!1;const n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=function(e,t,n){const r=ND(e,n),{scroll:o}=t;return o&&(MD(r.x,o.offset.x),MD(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:hD(e.x,t.x),y:hD(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=xD(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},l=wD((a=>{if(!VD(a,t,this.currentDirection))return;let l=s&&s[a]||{};i&&(l={min:0,max:0});const u=r?200:1e6,c=r?40:1e7,d={type:"inertia",velocity:n?e[a]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(a,d)}));return Promise.all(l).then(a)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return n.start(CR(e,n,0,t))}stopAnimation(){wD((e=>this.getAxisMotionValue(e).stop()))}getAxisMotionValue(e){const t="_drag"+e.toUpperCase(),n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){wD((t=>{const{drag:n}=this.getProps();if(!VD(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:i}=r.layout.layoutBox[t];o.set(e[t]-yT(n,i,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!xC(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};wD((e=>{const t=this.getAxisMotionValue(e);if(t){const n=t.get();r[e]=function(e,t){let n=.5;const r=aD(e),o=aD(t);return o>r?n=FT(t.min,t.max-r,e.min):r>o&&(n=FT(e.min,e.max-o,t.min)),eP(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),wD((t=>{if(!VD(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];n.set(yT(o,i,r[t]))}))}addListeners(){if(!this.visualElement.current)return;zD.set(this.visualElement,this);const e=e_(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();xC(e)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),t();const o=QP(window,"resize",(()=>this.scalePositionWithinConstraints())),i=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(wD((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{o(),e(),r(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=mD,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function VD(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const jD=e=>(t,n)=>{e&&h_.update((()=>e(t,n)))};function HD(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const UD={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!fP.test(e))return e;e=parseFloat(e)}return`${HD(e,t.target.x)}% ${HD(e,t.target.y)}%`}},WD=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function $D(e,t,n=1){const[r,o]=function(e){const t=WD.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);return i?i.trim():ZC(o)?$D(o,t,n+1):o}const KD="_$css",XD={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=e.includes("var("),i=[];o&&(e=e.replace(WD,(e=>(i.push(e),KD))));const a=DT.parse(e);if(a.length>5)return r;const s=DT.createTransformer(e),l="number"!=typeof a[0]?1:0,u=n.x.scale*t.x,c=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=c;const d=yT(u,c,.5);"number"==typeof a[2+l]&&(a[2+l]/=d),"number"==typeof a[3+l]&&(a[3+l]/=d);let f=s(a);if(o){let e=0;f=f.replace(KD,(()=>{const t=i[e];return e++,t}))}return f}};class YD extends $.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;var i;i=QD,Object.assign(UC,i),o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",(()=>{this.safeToRemove()})),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),LC.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,i=n.projection;return i?(i.isPresent=o,r||e.layoutDependency!==t||void 0===t?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||h_.postRender((()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function qD(e){const[t,n]=function(){const e=W.useContext(vC);if(null===e)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=W.useId();return W.useEffect((()=>r(o)),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}(),r=W.useContext(FC);return $.createElement(YD,{...e,layoutGroup:r,switchLayoutGroup:W.useContext(IC),isPresent:t,safeToRemove:n})}const QD={borderRadius:{...UD,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:UD,borderTopRightRadius:UD,borderBottomLeftRadius:UD,borderBottomRightRadius:UD,boxShadow:XD},GD=["TopLeft","TopRight","BottomLeft","BottomRight"],ZD=GD.length,JD=e=>"string"==typeof e?parseFloat(e):e,eA=e=>"number"==typeof e||fP.test(e);function tA(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const nA=oA(0,.5,oT),rA=oA(.5,.95,E_);function oA(e,t,n){return r=>r<e?0:r>t?1:n(FT(e,t,r))}function iA(e,t){e.min=t.min,e.max=t.max}function aA(e,t){iA(e.x,t.x),iA(e.y,t.y)}function sA(e,t,n,r,o){return e=_D(e-=t,1/n,r),void 0!==o&&(e=_D(e,1/o,r)),e}function lA(e,t,[n,r,o],i,a){!function(e,t=0,n=1,r=.5,o,i=e,a=e){dP.test(t)&&(t=parseFloat(t),t=yT(a.min,a.max,t/100)-a.min);if("number"!=typeof t)return;let s=yT(i.min,i.max,r);e===i&&(s-=t),e.min=sA(e.min,t,n,s,o),e.max=sA(e.max,t,n,s,o)}(e,t[n],t[r],t[o],t.scale,i,a)}const uA=["x","scaleX","originX"],cA=["y","scaleY","originY"];function dA(e,t,n,r){lA(e.x,t,uA,n?n.x:void 0,r?r.x:void 0),lA(e.y,t,cA,n?n.y:void 0,r?r.y:void 0)}function fA(e){return 0===e.translate&&1===e.scale}function pA(e){return fA(e.x)&&fA(e.y)}function hA(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function mA(e){return aD(e.x)/aD(e.y)}class gA{constructor(){this.members=[]}add(e){TR(this.members,e),e.scheduleRender()}remove(e){if(RR(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let r=t;r>=0;r--){const e=this.members[r];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function vA(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y;if((o||i)&&(r=`translate3d(${o}px, ${i}px, 0) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:e,rotateX:t,rotateY:o}=n;e&&(r+=`rotate(${e}deg) `),t&&(r+=`rotateX(${t}deg) `),o&&(r+=`rotateY(${o}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return 1===a&&1===s||(r+=`scale(${a}, ${s})`),r||"none"}const yA=(e,t)=>e.depth-t.depth;class bA{constructor(){this.children=[],this.isDirty=!1}add(e){TR(this.children,e),this.isDirty=!0}remove(e){RR(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(yA),this.isDirty=!1,this.children.forEach(e)}}const wA=["","X","Y","Z"];let xA=0;const EA={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function SA({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e,n={},r=(null==t?void 0:t())){this.id=xA++,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.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{var e;EA.totalNodes=EA.resolvedTargetDeltas=EA.recalculatedProjection=0,this.nodes.forEach(PA),this.nodes.forEach(MA),this.nodes.forEach(LA),this.nodes.forEach(_A),e=EA,window.MotionDebug&&window.MotionDebug.record(e)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=e,this.latestValues=n,this.root=r?r.root||r:this,this.path=r?[...r.path,r]:[],this.parent=r,this.depth=r?r.depth+1:0,e&&this.root.registerPotentialNode(e,this);for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new bA)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new DR),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}registerPotentialNode(e,t){this.potentialNodes.set(e,t)}mount(t,n=!1){if(this.instance)return;var r;this.isSVG=(r=t)instanceof SVGElement&&"svg"!==r.tagName,this.instance=t;const{layoutId:o,layout:i,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.elementId&&this.root.potentialNodes.delete(this.elementId),n&&(i||o)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=performance.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(m_.read(r),e(i-t))};return h_.read(r,!0),()=>m_.read(r)}(r,250),LC.hasAnimatedSinceResize&&(LC.hasAnimatedSinceResize=!1,this.nodes.forEach(AA))}))}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&a&&(o||i)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||a.getDefaultTransition()||BA,{onLayoutAnimationStart:i,onLayoutAnimationComplete:s}=a.getProps(),l=!this.targetLayout||!hA(this.targetLayout,r)||n,u=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||u||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,u);const t={...kR(o,"layout"),onPlay:i,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||0!==this.animationProgress||AA(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,m_.preRender(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(OA),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let o=0;o<this.path.length;o++){const e=this.path[o];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}didUpdate(){if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(RA);this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(VA),this.potentialNodes.clear()),this.nodes.forEach(DA),this.nodes.forEach(kA),this.nodes.forEach(CA),this.clearAllSnapshots(),g_.update(),g_.preRender(),g_.render())}clearAllSnapshots(){this.nodes.forEach(TA),this.sharedNodes.forEach(FA)}scheduleUpdateProjection(){h_.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){h_.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++){this.path[n].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=bD(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&(this.scroll={animationId:this.root.animationId,phase:e,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform,t=this.projectionDelta&&!pA(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,i=r!==this.prevTransformTemplateValue;e&&(t||kD(this.latestValues)||i)&&(o(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),jA((r=n).x),jA(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return bD();const t=e.measureViewportBox(),{scroll:n}=this.root;return n&&(MD(t.x,n.offset.x),MD(t.y,n.offset.y)),t}removeElementScroll(e){const t=bD();aA(t,e);for(let n=0;n<this.path.length;n++){const r=this.path[n],{scroll:o,options:i}=r;if(r!==this.root&&o&&i.layoutScroll){if(o.isRoot){aA(t,e);const{scroll:n}=this.root;n&&(MD(t.x,-n.offset.x),MD(t.y,-n.offset.y))}MD(t.x,o.offset.x),MD(t.y,o.offset.y)}}return t}applyTransform(e,t=!1){const n=bD();aA(n,e);for(let r=0;r<this.path.length;r++){const e=this.path[r];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&ID(n,{x:-e.scroll.offset.x,y:-e.scroll.offset.y}),kD(e.latestValues)&&ID(n,e.latestValues)}return kD(this.latestValues)&&ID(n,this.latestValues),n}removeTransform(e){const t=bD();aA(t,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];if(!e.instance)continue;if(!kD(e.latestValues))continue;SD(e.latestValues)&&e.updateSnapshot();const r=bD();aA(r,e.measurePageBox()),dA(t,e.latestValues,e.snapshot?e.snapshot.layoutBox:void 0,r)}return kD(this.latestValues)&&dA(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}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}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget))return;const{layout:o,layoutId:i}=this.options;if(this.layout&&(o||i)){if(this.resolvedRelativeTargetAt=u_.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout?(this.relativeParent=e,this.relativeTarget=bD(),this.relativeTargetOrigin=bD(),fD(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),aA(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var a,s,l;if(this.target||(this.target=bD(),this.targetWithTransforms=bD()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.relativeParent.resolvedRelativeTargetAt!==u_.timestamp&&this.relativeParent.resolveTargetDelta(!0),a=this.target,s=this.relativeTarget,l=this.relativeParent.target,cD(a.x,s.x,l.x),cD(a.y,s.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):aA(this.target,this.layout.layoutBox),DD(this.target,this.targetDelta)):aA(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target?(this.relativeParent=e,this.relativeTarget=bD(),this.relativeTargetOrigin=bD(),fD(this.relativeTargetOrigin,this.target,e.target),aA(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}EA.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!SD(this.parent.latestValues)&&!CD(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===u_.timestamp&&(r=!1),r)return;const{layout:o,layoutId:i}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!o&&!i)return;aA(this.layoutCorrected,this.layout.layoutBox),function(e,t,n,r=!1){const o=n.length;if(!o)return;let i,a;t.x=t.y=1;for(let s=0;s<o;s++){i=n[s],a=i.projectionDelta;const o=i.instance;o&&o.style&&"contents"===o.style.display||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&ID(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,DD(e,a)),r&&kD(i.latestValues)&&ID(e,i.latestValues))}t.x=AD(t.x),t.y=AD(t.y)}(this.layoutCorrected,this.treeScale,this.path,n);const{target:a}=t;if(!a)return;this.projectionDelta||(this.projectionDelta=yD(),this.projectionDeltaWithTransform=yD());const s=this.treeScale.x,l=this.treeScale.y,u=this.projectionTransform;uD(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.projectionTransform=vA(this.projectionDelta,this.treeScale),this.projectionTransform===u&&this.treeScale.x===s&&this.treeScale.y===l||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a)),EA.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},o={...this.latestValues},i=yD();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const a=bD(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,c=Boolean(s&&!u&&!0===this.options.crossfade&&!this.path.some(zA));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,f,p,h;IA(i.x,e.x,n),IA(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(fD(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),l=this.relativeTarget,f=this.relativeTargetOrigin,p=a,h=n,NA(l.x,f.x,p.x,h),NA(l.y,f.y,p.y,h),d&&hA(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d=bD()),aA(d,this.relativeTarget)),s&&(this.animationValues=o,function(e,t,n,r,o,i){o?(e.opacity=yT(0,void 0!==n.opacity?n.opacity:1,nA(r)),e.opacityExit=yT(void 0!==t.opacity?t.opacity:1,0,rA(r))):i&&(e.opacity=yT(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let a=0;a<ZD;a++){const o=`border${GD[a]}Radius`;let i=tA(t,o),s=tA(n,o);void 0===i&&void 0===s||(i||(i=0),s||(s=0),0===i||0===s||eA(i)===eA(s)?(e[o]=Math.max(yT(JD(i),JD(s),r),0),(dP.test(s)||dP.test(i))&&(e[o]+="%")):e[o]=s)}(t.rotate||n.rotate)&&(e.rotate=yT(t.rotate||0,n.rotate||0,r))}(o,r,this.latestValues,n,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(m_.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=h_.update((()=>{LC.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=XC(e)?e:MR(e);return r.start(CR("",r,t,n)),r.animation}(0,1e3,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.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 e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&HA(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||bD();const t=aD(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=aD(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}aA(t,n),ID(t,o),uD(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new gA);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(t=!0),!t)return;const r={};for(let o=0;o<wA.length;o++){const t="rotate"+wA[o];n[t]&&(r[t]=n[t],e.setStaticValue(t,0))}e.render();for(const o in r)e.setStaticValue(o,r[o]);e.scheduleRender()}getProjectionStyles(e={}){var t,n;const r={};if(!this.instance||this.isSVG)return r;if(!this.isVisible)return{visibility:"hidden"};r.visibility="";const o=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=$P(e.pointerEvents)||"",r.transform=o?o(this.latestValues,""):"none",r;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=$P(e.pointerEvents)||""),this.hasProjected&&!kD(this.latestValues)&&(t.transform=o?o({},""):"none",this.hasProjected=!1),t}const a=i.animationValues||i.latestValues;this.applyTransformsToTarget(),r.transform=vA(this.projectionDeltaWithTransform,this.treeScale,a),o&&(r.transform=o(a,r.transform));const{x:s,y:l}=this.projectionDelta;r.transformOrigin=`${100*s.origin}% ${100*l.origin}% 0`,i.animationValues?r.opacity=i===this?null!==(n=null!==(t=a.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:r.opacity=i===this?void 0!==a.opacity?a.opacity:"":void 0!==a.opacityExit?a.opacityExit:0;for(const u in UC){if(void 0===a[u])continue;const{correct:e,applyTo:t}=UC[u],n="none"===r.transform?a[u]:e(a[u],i);if(t){const e=t.length;for(let o=0;o<e;o++)r[t[o]]=n}else r[u]=n}return this.options.layoutId&&(r.pointerEvents=i===this?$P(e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(RA),this.root.sharedNodes.clear()}}}function kA(e){e.updateLayout()}function CA(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:o}=e.options,i=n.source!==e.layout.source;"size"===o?wD((e=>{const r=i?n.measuredBox[e]:n.layoutBox[e],o=aD(r);r.min=t[e].min,r.max=r.min+o})):HA(o,n.layoutBox,t)&&wD((r=>{const o=i?n.measuredBox[r]:n.layoutBox[r],a=aD(t[r]);o.max=o.min+a,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+a)}));const a=yD();uD(a,t,n.layoutBox);const s=yD();i?uD(s,e.applyTransform(r,!0),n.measuredBox):uD(s,t,n.layoutBox);const l=!pA(a);let u=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:i}=r;if(o&&i){const a=bD();fD(a,n.layoutBox,o.layoutBox);const s=bD();fD(s,t,i.layoutBox),hA(a,s)||(u=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=a,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function PA(e){EA.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function _A(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function TA(e){e.clearSnapshot()}function RA(e){e.clearMeasurements()}function DA(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function AA(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function MA(e){e.resolveTargetDelta()}function LA(e){e.calcProjection()}function OA(e){e.resetRotation()}function FA(e){e.removeLeadSnapshot()}function IA(e,t,n){e.translate=yT(t.translate,0,n),e.scale=yT(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function NA(e,t,n,r){e.min=yT(t.min,n.min,r),e.max=yT(t.max,n.max,r)}function zA(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const BA={duration:.45,ease:[.4,0,.1,1]};function VA(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const r=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);r&&e.mount(r,!0)}function jA(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function HA(e,t,n){return"position"===e||"preserve-aspect"===e&&!sD(mA(t),mA(n),.2)}const UA=SA({attachResizeListener:(e,t)=>QP(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),WA={current:void 0},$A=SA({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!WA.current){const e=new UA(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),WA.current=e}return WA.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),KA={pan:{Feature:class extends l_{constructor(){super(...arguments),this.removePointerDownListener=E_}onPointerDown(e){this.session=new JR(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:jD(e),onStart:jD(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&h_.update((()=>r(e,t)))}}}mount(){this.removePointerDownListener=e_(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends l_{constructor(e){super(e),this.removeGroupControls=E_,this.removeListeners=E_,this.controls=new BD(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||E_}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:$A,MeasureLayout:qD}},XA=new Set(["width","height","top","left","right","bottom","x","y"]),YA=e=>XA.has(e),qA=e=>e===tP||e===fP,QA=(e,t)=>parseFloat(e.split(", ")[t]),GA=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/);if(o)return QA(o[1],t);{const t=r.match(/^matrix\((.+)\)$/);return t?QA(t[1],e):0}},ZA=new Set(["x","y","z"]),JA=WC.filter((e=>!ZA.has(e)));const eM={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:GA(4,13),y:GA(5,14)},tM=(e,t,n={},r={})=>{t={...t},r={...r};const o=Object.keys(t).filter(YA);let i=[],a=!1;const s=[];if(o.forEach((o=>{const l=e.getValue(o);if(!e.hasValue(o))return;let u=n[o],c=FR(u);const d=t[o];let f;if(HP(d)){const e=d.length,t=null===d[0]?1:0;u=d[t],c=FR(u);for(let n=t;n<e;n++)f?F_(FR(d[n])===f):f=FR(d[n])}else f=FR(d);if(c!==f)if(qA(c)&&qA(f)){const e=l.get();"string"==typeof e&&l.set(parseFloat(e)),"string"==typeof d?t[o]=parseFloat(d):Array.isArray(d)&&f===fP&&(t[o]=d.map(parseFloat))}else(null==c?void 0:c.transform)&&(null==f?void 0:f.transform)&&(0===u||0===d)?0===u?l.set(f.transform(u)):t[o]=c.transform(d):(a||(i=function(e){const t=[];return JA.forEach((n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t.length&&e.render(),t}(e),a=!0),s.push(o),r[o]=void 0!==r[o]?r[o]:t[o],l.jump(d))})),s.length){const n=s.indexOf("height")>=0?window.pageYOffset:null,o=((e,t,n)=>{const r=t.measureViewportBox(),o=t.current,i=getComputedStyle(o),{display:a}=i,s={};"none"===a&&t.setStaticValue("display",e.display||"block"),n.forEach((e=>{s[e]=eM[e](r,i)})),t.render();const l=t.measureViewportBox();return n.forEach((n=>{const r=t.getValue(n);r&&r.jump(s[n]),e[n]=eM[n](l,i)})),e})(t,e,s);return i.length&&i.forEach((([t,n])=>{e.getValue(t).set(n)})),e.render(),yC&&null!==n&&window.scrollTo({top:n}),{target:o,transitionEnd:r}}return{target:t,transitionEnd:r}};function nM(e,t,n,r){return(e=>Object.keys(e).some(YA))(t)?tM(e,t,n,r):{target:t,transitionEnd:r}}const rM=(e,t,n,r)=>{const o=function(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach((e=>{const t=e.get();if(!ZC(t))return;const n=$D(t,r);n&&e.set(n)}));for(const o in t){const e=t[o];if(!ZC(e))continue;const i=$D(e,r);i&&(t[o]=i,n||(n={}),void 0===n[o]&&(n[o]=e))}return{target:t,transitionEnd:n}}(e,t,r);return nM(e,t=o.target,n,r=o.transitionEnd)},oM={current:null},iM={current:!1};const aM=new WeakMap,sM=Object.keys(AC),lM=sM.length,uM=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],cM=CC.length;class dM{constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,visualState:o},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,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.scheduleRender=()=>h_.render(this.render,!1,!0);const{latestValues:a,renderState:s}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=s,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=i,this.isControllingVariants=PC(t),this.isVariantNode=_C(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(t,{});for(const c in u){const e=u[c];void 0!==a[c]&&XC(e)&&(e.set(a[c],!1),PR(l)&&l.add(c))}}scrapeMotionValuesFromProps(e,t){return{}}mount(e){this.current=e,aM.set(e,this),this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),iM.current||function(){if(iM.current=!0,yC)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>oM.current=e.matches;e.addListener(t),t()}else oM.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||oM.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){aM.delete(this.current),this.projection&&this.projection.unmount(),m_.update(this.notifyUpdate),m_.render(this.render),this.valueSubscriptions.forEach((e=>e())),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,t){const n=$C.has(e),r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&h_.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)})),o=t.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,(()=>{r(),o()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}loadFeatures({children:e,...t},n,r,o,i){let a,s;for(let l=0;l<lM;l++){const e=sM[l],{isEnabled:n,Feature:r,ProjectionNode:o,MeasureLayout:i}=AC[e];o&&(a=o),n(t)&&(!this.features[e]&&r&&(this.features[e]=new r(this)),i&&(s=i))}if(!this.projection&&a){this.projection=new a(o,this.latestValues,this.parent&&this.parent.projection);const{layoutId:e,layout:n,drag:r,dragConstraints:s,layoutScroll:l,layoutRoot:u}=t;this.projection.setOptions({layoutId:e,layout:n,alwaysMeasureLayout:Boolean(r)||s&&xC(s),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:i,layoutScroll:l,layoutRoot:u})}return s}updateFeatures(){for(const e in this.features){const t=this.features[e];t.isMounted?t.update(this.props,this.prevProps):(t.mount(),t.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):bD()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}makeTargetAnimatable(e,t=!0){return this.makeTargetAnimatableFromInstance(e,this.props,t)}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<uM.length;n++){const t=uM[n];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const r=e["on"+t];r&&(this.propEventSubscriptions[t]=this.on(t,r))}this.prevMotionValues=function(e,t,n){const{willChange:r}=t;for(const o in t){const i=t[o],a=n[o];if(XC(i))e.addValue(o,i),PR(r)&&r.add(o);else if(XC(a))e.addValue(o,MR(i,{owner:e})),PR(r)&&r.remove(o);else if(a!==i)if(e.hasValue(o)){const t=e.getValue(o);!t.hasAnimated&&t.set(i)}else{const t=e.getStaticValue(o);e.addValue(o,MR(void 0!==t?t:i,{owner:e}))}}for(const o in n)void 0===t[o]&&e.removeValue(o);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const e=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(e.initial=this.props.initial),e}const t={};for(let n=0;n<cM;n++){const e=CC[n],r=this.props[e];(EC(r)||!1===r)&&(t[e]=r)}return t}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){t!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,t)),this.values.set(e,t),this.latestValues[e]=t.get()}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=MR(t,{owner:this}),this.addValue(e,n)),n}readValue(e){return void 0===this.latestValues[e]&&this.current?this.readValueFromInstance(this.current,e,this.options):this.latestValues[e]}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props,r="string"==typeof n||"object"==typeof n?null===(t=jP(this.props,n))||void 0===t?void 0:t[e]:void 0;if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||XC(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new DR),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class fM extends dM{sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:t,...n},{transformValues:r},o){let i=function(e,t,n){const r={};for(const o in e){const e=BR(o,t);if(void 0!==e)r[o]=e;else{const e=n.getValue(o);e&&(r[o]=e.get())}}return r}(n,e||{},this);if(r&&(t&&(t=r(t)),n&&(n=r(n)),i&&(i=r(i))),o){!function(e,t,n){var r,o;const i=Object.keys(t).filter((t=>!e.hasValue(t))),a=i.length;if(a)for(let s=0;s<a;s++){const a=i[s],l=t[a];let u=null;Array.isArray(l)&&(u=l[0]),null===u&&(u=null!==(o=null!==(r=n[a])&&void 0!==r?r:e.readValue(a))&&void 0!==o?o:t[a]),null!=u&&("string"==typeof u&&(/^\-?\d*\.?\d+$/.test(u)||_R(u))?u=parseFloat(u):!NR(u)&&DT.test(l)&&(u=xR(a,l)),e.addValue(a,MR(u,{owner:e})),void 0===n[a]&&(n[a]=u),null!==u&&e.setBaseTarget(a,u))}}(this,n,i);const e=rM(this,n,i,t);t=e.transitionEnd,n=e.target}return{transition:e,transitionEnd:t,...n}}}class pM extends fM{readValueFromInstance(e,t){if($C.has(t)){const e=wR(t);return e&&e.default||0}{const r=(n=e,window.getComputedStyle(n)),o=(GC(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return ND(e,t)}build(e,t,n,r){yP(e,t,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,t){return BP(e,t)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;XC(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}renderInstance(e,t,n,r){IP(e,t,n,r)}}class hM extends fM{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if($C.has(t)){const e=wR(t);return e&&e.default||0}return t=NP.has(t)?t:FP(t),e.getAttribute(t)}measureInstanceViewportBox(){return bD()}scrapeMotionValuesFromProps(e,t){return VP(e,t)}build(e,t,n,r){DP(e,t,n,this.isSVGTag,r.transformTemplate)}renderInstance(e,t,n,r){zP(e,t,0,r)}mount(e){this.isSVGTag=MP(e.tagName),super.mount(e)}}const mM=(e,t)=>HC(e)?new hM(t,{enableHardwareAcceleration:!1}):new pM(t,{enableHardwareAcceleration:!0}),gM={...GR,...D_,...KA,...{layout:{ProjectionNode:$A,MeasureLayout:qD}}},vM=VC(((e,t)=>function(e,{forwardMotionProps:t=!1},n,r){return{...HC(e)?YP:qP,preloadedFeatures:n,useRender:OP(t),createVisualElement:r,Component:e}}(e,t,gM,mM)));function yM(){return yM=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},yM.apply(this,arguments)}function bM(e,t){return(bM=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var wM=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,bM(t,n);var o=r.prototype;return o.getColumns=function(){var e=this.props,t=e.children,n=e.columnsCount,r=Array.from({length:n},(function(){return[]}));return $.Children.forEach(t,(function(e,t){e&&$.isValidElement(e)&&r[t%n].push(e)})),r},o.renderColumns=function(){var e=this.props.gutter;return this.getColumns().map((function(t,n){return $.createElement("div",{key:n,style:{display:"flex",flexDirection:"column",justifyContent:"flex-start",alignContent:"stretch",flex:1,width:0,gap:e}},t.map((function(e){return e})))}))},o.render=function(){var e=this.props,t=e.gutter,n=e.className,r=e.style;return $.createElement("div",{style:yM({display:"flex",flexDirection:"row",justifyContent:"center",alignContent:"stretch",boxSizing:"border-box",width:"100%",gap:t},r),className:n},this.renderColumns())},r}($.Component);wM.propTypes={},wM.defaultProps={columnsCount:3,gutter:"0",className:null,style:{}};var xM="undefined"!=typeof window?W.useLayoutEffect:W.useEffect,EM=function(){var e=function(){var e=W.useState(!1),t=e[0],n=e[1];return xM((function(){n(!0)}),[]),t}(),t=W.useState(0),n=t[0],r=t[1],o=W.useCallback((function(){e&&r(window.innerWidth)}),[e]);return xM((function(){if(e)return window.addEventListener("resize",o),o(),function(){return window.removeEventListener("resize",o)}}),[e,o]),n},SM=function(e){var t=e.columnsCountBreakPoints,n=void 0===t?{350:1,750:2,900:3}:t,r=e.children,o=e.className,i=void 0===o?null:o,a=e.style,s=void 0===a?null:a,l=EM(),u=W.useMemo((function(){var e=Object.keys(n).sort((function(e,t){return e-t})),t=e.length>0?n[e[0]]:1;return e.forEach((function(e){e<l&&(t=n[e])})),t}),[l,n]);return $.createElement("div",{className:i,style:s},$.Children.map(r,(function(e,t){return $.cloneElement(e,{key:t,columnsCount:u})})))};SM.propTypes={};const[kM,CM]=ax("Tooltip",[qS]),PM=qS(),_M=700,TM="tooltip.open",[RM,DM]=kM("TooltipProvider"),AM="Tooltip",[MM,LM]=kM(AM),OM="TooltipTrigger",FM=W.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=LM(OM,n),i=DM(OM,n),a=PM(n),s=ix(t,W.useRef(null),o.onTriggerChange),l=W.useRef(!1),u=W.useRef(!1),c=W.useCallback((()=>l.current=!1),[]);return W.useEffect((()=>()=>document.removeEventListener("pointerup",c)),[c]),W.createElement(lk,Jn({asChild:!0},a),W.createElement(px.button,Jn({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:s,onPointerMove:rx(e.onPointerMove,(e=>{"touch"!==e.pointerType&&(u.current||i.isPointerInTransitRef.current||(o.onTriggerEnter(),u.current=!0))})),onPointerLeave:rx(e.onPointerLeave,(()=>{o.onTriggerLeave(),u.current=!1})),onPointerDown:rx(e.onPointerDown,(()=>{l.current=!0,document.addEventListener("pointerup",c,{once:!0})})),onFocus:rx(e.onFocus,(()=>{l.current||o.onOpen()})),onBlur:rx(e.onBlur,o.onClose),onClick:rx(e.onClick,o.onClose)})))})),IM="TooltipPortal",[NM,zM]=kM(IM,{forceMount:void 0}),BM="TooltipContent",VM=W.forwardRef(((e,t)=>{const n=zM(BM,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=LM(BM,e.__scopeTooltip);return W.createElement(Hx,{present:r||a.open},a.disableHoverableContent?W.createElement(WM,Jn({side:o},i,{ref:t})):W.createElement(jM,Jn({side:o},i,{ref:t})))})),jM=W.forwardRef(((e,t)=>{const n=LM(BM,e.__scopeTooltip),r=DM(BM,e.__scopeTooltip),o=W.useRef(null),i=ix(t,o),[a,s]=W.useState(null),{trigger:l,onClose:u}=n,c=o.current,{onPointerInTransitChange:d}=r,f=W.useCallback((()=>{s(null),d(!1)}),[d]),p=W.useCallback(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=function(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(r,n.getBoundingClientRect())),i=function(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),function(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const n=e[r];for(;t.length>=2;){const e=t[t.length-1],r=t[t.length-2];if(!((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x)))break;t.pop()}t.push(n)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const t=e[r];for(;n.length>=2;){const e=n[n.length-1],r=n[n.length-2];if(!((e.x-r.x)*(t.y-r.y)>=(e.y-r.y)*(t.x-r.x)))break;n.pop()}n.push(t)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...o,...function(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}(t.getBoundingClientRect())]);s(i),d(!0)}),[d]);return W.useEffect((()=>()=>f()),[f]),W.useEffect((()=>{if(l&&c){const e=e=>p(e,c),t=e=>p(e,l);return l.addEventListener("pointerleave",e),c.addEventListener("pointerleave",t),()=>{l.removeEventListener("pointerleave",e),c.removeEventListener("pointerleave",t)}}}),[l,c,p,f]),W.useEffect((()=>{if(a){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=(null==l?void 0:l.contains(t))||(null==c?void 0:c.contains(t)),o=!function(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const e=t[i].x,s=t[i].y,l=t[a].x,u=t[a].y;s>r!=u>r&&n<(l-e)*(r-s)/(u-s)+e&&(o=!o)}return o}(n,a);r?f():o&&(f(),u())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[l,c,a,u,f]),W.createElement(WM,Jn({},e,{ref:i}))})),[HM,UM]=kM(AM,{isInside:!1}),WM=W.forwardRef(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,l=LM(BM,n),u=PM(n),{onClose:c}=l;return W.useEffect((()=>(document.addEventListener(TM,c),()=>document.removeEventListener(TM,c))),[c]),W.useEffect((()=>{if(l.trigger){const e=e=>{const t=e.target;null!=t&&t.contains(l.trigger)&&c()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[l.trigger,c]),W.createElement(vE,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:e=>e.preventDefault(),onDismiss:c},W.createElement(uk,Jn({"data-state":l.stateAttribute},u,s,{ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),W.createElement(cx,null,r),W.createElement(HM,{scope:n,isInside:!0},W.createElement(pk,{id:l.contentId,role:"tooltip"},o||r))))}));const $M=e=>{const{__scopeTooltip:t,delayDuration:n=_M,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,[a,s]=W.useState(!0),l=W.useRef(!1),u=W.useRef(0);return W.useEffect((()=>{const e=u.current;return()=>window.clearTimeout(e)}),[]),W.createElement(RM,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:W.useCallback((()=>{window.clearTimeout(u.current),s(!1)}),[]),onClose:W.useCallback((()=>{window.clearTimeout(u.current),u.current=window.setTimeout((()=>s(!0)),r)}),[r]),isPointerInTransitRef:l,onPointerInTransitChange:W.useCallback((e=>{l.current=e}),[]),disableHoverableContent:o},i)},KM=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,l=DM(AM,e.__scopeTooltip),u=PM(t),[c,d]=W.useState(null),f=yx(),p=W.useRef(0),h=null!=a?a:l.disableHoverableContent,m=null!=s?s:l.delayDuration,g=W.useRef(!1),[v=!1,y]=wx({prop:r,defaultProp:o,onChange:e=>{e?(l.onOpen(),document.dispatchEvent(new CustomEvent(TM))):l.onClose(),null==i||i(e)}}),b=W.useMemo((()=>v?g.current?"delayed-open":"instant-open":"closed"),[v]),w=W.useCallback((()=>{window.clearTimeout(p.current),g.current=!1,y(!0)}),[y]),x=W.useCallback((()=>{window.clearTimeout(p.current),y(!1)}),[y]),E=W.useCallback((()=>{window.clearTimeout(p.current),p.current=window.setTimeout((()=>{g.current=!0,y(!0)}),m)}),[m,y]);return W.useEffect((()=>()=>window.clearTimeout(p.current)),[]),W.createElement(sk,u,W.createElement(MM,{scope:t,contentId:f,open:v,stateAttribute:b,trigger:c,onTriggerChange:d,onTriggerEnter:W.useCallback((()=>{l.isOpenDelayed?E():w()}),[l.isOpenDelayed,E,w]),onTriggerLeave:W.useCallback((()=>{h?x():window.clearTimeout(p.current)}),[x,h]),onOpen:w,onClose:x,disableHoverableContent:h},n))},XM=FM,YM=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=LM(IM,t);return W.createElement(NM,{scope:t,forceMount:n},W.createElement(Hx,{present:n||i.open},W.createElement(dk,{asChild:!0,container:o},r)))},qM=VM,QM=W.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=PM(n);return UM("TooltipArrow",n).isInside?null:W.createElement(ck,Jn({},o,r,{ref:t}))}));const GM="ScrollArea",[ZM,JM]=er(GM),[eL,tL]=ZM(GM),nL=W.forwardRef(((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:i=600,...a}=e,[s,l]=W.useState(null),[u,c]=W.useState(null),[d,f]=W.useState(null),[p,h]=W.useState(null),[m,g]=W.useState(null),[v,y]=W.useState(0),[b,w]=W.useState(0),[x,E]=W.useState(!1),[S,k]=W.useState(!1),C=rr(t,(e=>l(e))),P=Xb(o);return W.createElement(eL,{scope:n,type:r,dir:P,scrollHideDelay:i,scrollArea:s,viewport:u,onViewportChange:c,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:h,scrollbarXEnabled:x,onScrollbarXEnabledChange:E,scrollbarY:m,onScrollbarYChange:g,scrollbarYEnabled:S,onScrollbarYEnabledChange:k,onCornerWidthChange:y,onCornerHeightChange:w},W.createElement(Ch.div,Jn({dir:P},a,{ref:C,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":b+"px",...e.style}})))})),rL=W.forwardRef(((e,t)=>{const{__scopeScrollArea:n,children:r,...o}=e,i=tL("ScrollAreaViewport",n),a=rr(t,W.useRef(null),i.onViewportChange);return W.createElement(W.Fragment,null,W.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),W.createElement(Ch.div,Jn({"data-radix-scroll-area-viewport":""},o,{ref:a,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style}}),W.createElement("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"}},r)))})),oL="ScrollAreaScrollbar",iL=W.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=tL(oL,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=o,s="horizontal"===e.orientation;return W.useEffect((()=>(s?i(!0):a(!0),()=>{s?i(!1):a(!1)})),[s,i,a]),"hover"===o.type?W.createElement(aL,Jn({},r,{ref:t,forceMount:n})):"scroll"===o.type?W.createElement(sL,Jn({},r,{ref:t,forceMount:n})):"auto"===o.type?W.createElement(lL,Jn({},r,{ref:t,forceMount:n})):"always"===o.type?W.createElement(uL,Jn({},r,{ref:t})):null})),aL=W.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=tL(oL,e.__scopeScrollArea),[i,a]=W.useState(!1);return W.useEffect((()=>{const e=o.scrollArea;let t=0;if(e){const n=()=>{window.clearTimeout(t),a(!0)},r=()=>{t=window.setTimeout((()=>a(!1)),o.scrollHideDelay)};return e.addEventListener("pointerenter",n),e.addEventListener("pointerleave",r),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",n),e.removeEventListener("pointerleave",r)}}}),[o.scrollArea,o.scrollHideDelay]),W.createElement(Yh,{present:n||i},W.createElement(lL,Jn({"data-state":i?"visible":"hidden"},r,{ref:t})))})),sL=W.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=tL(oL,e.__scopeScrollArea),i="horizontal"===e.orientation,a=CL((()=>l("SCROLL_END")),100),[s,l]=(u="hidden",c={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},W.useReducer(((e,t)=>{const n=c[e][t];return null!=n?n:e}),u));var u,c;return W.useEffect((()=>{if("idle"===s){const e=window.setTimeout((()=>l("HIDE")),o.scrollHideDelay);return()=>window.clearTimeout(e)}}),[s,o.scrollHideDelay,l]),W.useEffect((()=>{const e=o.viewport,t=i?"scrollLeft":"scrollTop";if(e){let n=e[t];const r=()=>{const r=e[t];n!==r&&(l("SCROLL"),a()),n=r};return e.addEventListener("scroll",r),()=>e.removeEventListener("scroll",r)}}),[o.viewport,i,l,a]),W.createElement(Yh,{present:n||"hidden"!==s},W.createElement(uL,Jn({"data-state":"hidden"===s?"hidden":"visible"},r,{ref:t,onPointerEnter:or(e.onPointerEnter,(()=>l("POINTER_ENTER"))),onPointerLeave:or(e.onPointerLeave,(()=>l("POINTER_LEAVE")))})))})),lL=W.forwardRef(((e,t)=>{const n=tL(oL,e.__scopeScrollArea),{forceMount:r,...o}=e,[i,a]=W.useState(!1),s="horizontal"===e.orientation,l=CL((()=>{if(n.viewport){const e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;a(s?e:t)}}),10);return PL(n.viewport,l),PL(n.content,l),W.createElement(Yh,{present:r||i},W.createElement(uL,Jn({"data-state":i?"visible":"hidden"},o,{ref:t})))})),uL=W.forwardRef(((e,t)=>{const{orientation:n="vertical",...r}=e,o=tL(oL,e.__scopeScrollArea),i=W.useRef(null),a=W.useRef(0),[s,l]=W.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=bL(s.viewport,s.content),c={...r,sizes:s,onSizesChange:l,hasThumb:Boolean(u>0&&u<1),onThumbChange:e=>i.current=e,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:e=>a.current=e};function d(e,t){return function(e,t,n,r="ltr"){const o=wL(n),i=o/2,a=t||i,s=o-a,l=n.scrollbar.paddingStart+a,u=n.scrollbar.size-n.scrollbar.paddingEnd-s,c=n.content-n.viewport,d="ltr"===r?[0,c]:[-1*c,0];return EL([l,u],d)(e)}(e,a.current,s,t)}return"horizontal"===n?W.createElement(cL,Jn({},c,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const e=xL(o.viewport.scrollLeft,s,o.dir);i.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{o.viewport&&(o.viewport.scrollLeft=e)},onDragScroll:e=>{o.viewport&&(o.viewport.scrollLeft=d(e,o.dir))}})):"vertical"===n?W.createElement(dL,Jn({},c,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const e=xL(o.viewport.scrollTop,s);i.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{o.viewport&&(o.viewport.scrollTop=e)},onDragScroll:e=>{o.viewport&&(o.viewport.scrollTop=d(e))}})):null})),cL=W.forwardRef(((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=tL(oL,e.__scopeScrollArea),[a,s]=W.useState(),l=W.useRef(null),u=rr(t,l,i.onScrollbarXChange);return W.useEffect((()=>{l.current&&s(getComputedStyle(l.current))}),[l]),W.createElement(hL,Jn({"data-orientation":"horizontal"},o,{ref:u,sizes:n,style:{bottom:0,left:"rtl"===i.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===i.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":wL(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(i.viewport){const r=i.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),SL(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&i.viewport&&a&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:yL(a.paddingLeft),paddingEnd:yL(a.paddingRight)}})}}))})),dL=W.forwardRef(((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=tL(oL,e.__scopeScrollArea),[a,s]=W.useState(),l=W.useRef(null),u=rr(t,l,i.onScrollbarYChange);return W.useEffect((()=>{l.current&&s(getComputedStyle(l.current))}),[l]),W.createElement(hL,Jn({"data-orientation":"vertical"},o,{ref:u,sizes:n,style:{top:0,right:"ltr"===i.dir?0:void 0,left:"rtl"===i.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":wL(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(i.viewport){const r=i.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),SL(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&i.viewport&&a&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:yL(a.paddingTop),paddingEnd:yL(a.paddingBottom)}})}}))})),[fL,pL]=ZM(oL),hL=W.forwardRef(((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:i,onThumbPointerUp:a,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:c,onResize:d,...f}=e,p=tL(oL,n),[h,m]=W.useState(null),g=rr(t,(e=>m(e))),v=W.useRef(null),y=W.useRef(""),b=p.viewport,w=r.content-r.viewport,x=ur(c),E=ur(l),S=CL(d,10);function k(e){if(v.current){const t=e.clientX-v.current.left,n=e.clientY-v.current.top;u({x:t,y:n})}}return W.useEffect((()=>{const e=e=>{const t=e.target;(null==h?void 0:h.contains(t))&&x(e,w)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})}),[b,h,w,x]),W.useEffect(E,[r,E]),PL(h,S),PL(p.content,S),W.createElement(fL,{scope:n,scrollbar:h,hasThumb:o,onThumbChange:ur(i),onThumbPointerUp:ur(a),onThumbPositionChange:E,onThumbPointerDown:ur(s)},W.createElement(Ch.div,Jn({},f,{ref:g,style:{position:"absolute",...f.style},onPointerDown:or(e.onPointerDown,(e=>{if(0===e.button){e.target.setPointerCapture(e.pointerId),v.current=h.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",k(e)}})),onPointerMove:or(e.onPointerMove,k),onPointerUp:or(e.onPointerUp,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=y.current,v.current=null}))})))})),mL="ScrollAreaThumb",gL=W.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=pL(mL,e.__scopeScrollArea);return W.createElement(Yh,{present:n||o.hasThumb},W.createElement(vL,Jn({ref:t},r)))})),vL=W.forwardRef(((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,i=tL(mL,n),a=pL(mL,n),{onThumbPositionChange:s}=a,l=rr(t,(e=>a.onThumbChange(e))),u=W.useRef(),c=CL((()=>{u.current&&(u.current(),u.current=void 0)}),100);return W.useEffect((()=>{const e=i.viewport;if(e){const t=()=>{if(c(),!u.current){const t=kL(e,s);u.current=t,s()}};return s(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}}),[i.viewport,c,s]),W.createElement(Ch.div,Jn({"data-state":a.hasThumb?"visible":"hidden"},o,{ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:or(e.onPointerDownCapture,(e=>{const t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;a.onThumbPointerDown({x:n,y:r})})),onPointerUp:or(e.onPointerUp,a.onThumbPointerUp)}))}));function yL(e){return e?parseInt(e,10):0}function bL(e,t){const n=e/t;return isNaN(n)?0:n}function wL(e){const t=bL(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function xL(e,t,n="ltr"){const r=wL(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,a=t.content-t.viewport,s=i-r,l=$b(e,"ltr"===n?[0,a]:[-1*a,0]);return EL([0,a],[0,s])(l)}function EL(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function SL(e,t){return e>0&&e<t}const kL=(e,t=(()=>{}))=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},a=n.left!==i.left,s=n.top!==i.top;(a||s)&&t(),n=i,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function CL(e,t){const n=ur(e),r=W.useRef(0);return W.useEffect((()=>()=>window.clearTimeout(r.current)),[]),W.useCallback((()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)}),[n,t])}function PL(e,t){const n=ur(t);ir((()=>{let t=0;if(e){const r=new ResizeObserver((()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)}));return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}}),[e,n])}const _L=nL,TL=rL,RL=iL,DL=gL;function AL(e){return function(e){return"[object Object]"===Object.prototype.toString.call(e)}(e)||Array.isArray(e)}function ML(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;return JSON.stringify(Object.keys(e.breakpoints||{}))===JSON.stringify(Object.keys(t.breakpoints||{}))&&n.every((n=>{const r=e[n],o=t[n];return"function"==typeof r?`${r}`==`${o}`:AL(r)&&AL(o)?ML(r,o):r===o}))}function LL(e){return e.concat().sort(((e,t)=>e.name>t.name?1:-1)).map((e=>e.options))}function OL(e){return"number"==typeof e}function FL(e){return"string"==typeof e}function IL(e){return"boolean"==typeof e}function NL(e){return"[object Object]"===Object.prototype.toString.call(e)}function zL(e){return Math.abs(e)}function BL(e){return Math.sign(e)}function VL(e,t){return zL(e-t)}function jL(e){return $L(e).map(Number)}function HL(e){return e[UL(e)]}function UL(e){return Math.max(0,e.length-1)}function WL(e,t=0){return Array.from(Array(e),((e,n)=>t+n))}function $L(e){return Object.keys(e)}function KL(e,t){return[e,t].reduce(((e,t)=>($L(t).forEach((n=>{const r=e[n],o=t[n],i=NL(r)&&NL(o);e[n]=i?KL(r,o):o})),e)),{})}function XL(e,t){return void 0!==t.MouseEvent&&e instanceof t.MouseEvent}function YL(e,t){const n={start:function(){return 0},center:function(e){return r(e)/2},end:r};function r(e){return t-e}return{measure:function(r){return OL(e)?t*Number(e):n[e](r)}}}function qL(e,t){const n=zL(e-t);function r(t){return t<e}function o(e){return e>t}function i(e){return r(e)||o(e)}return{length:n,max:t,min:e,constrain:function(n){return i(n)?r(n)?e:t:n},reachedAny:i,reachedMax:o,reachedMin:r,removeOffset:function(e){return n?e-n*Math.ceil((e-t)/n):e}}}function QL(e,t,n){const{constrain:r}=qL(0,e),o=e+1;let i=a(t);function a(e){return n?zL((o+e)%o):r(e)}function s(){return i}function l(){return QL(e,s(),n)}const u={get:s,set:function(e){return i=a(e),u},add:function(e){return l().set(s()+e)},clone:l};return u}function GL(){let e=[];const t={add:function(n,r,o,i={passive:!0}){let a;if("addEventListener"in n)n.addEventListener(r,o,i),a=()=>n.removeEventListener(r,o,i);else{const e=n;e.addListener(o),a=()=>e.removeListener(o)}return e.push(a),t},clear:function(){e=e.filter((e=>e()))}};return t}function ZL(e,t,n,r,o,i,a,s,l,u,c,d,f,p,h,m,g,v,y,b){const{cross:w}=e,x=["INPUT","SELECT","TEXTAREA"],E={passive:!1},S=GL(),k=GL(),C=qL(50,225).constrain(h.measure(20)),P={mouse:300,touch:400},_={mouse:500,touch:600},T=m?43:25;let R=!1,D=0,A=0,M=!1,L=!1,O=!1,F=!1;function I(e){const n=a.readPoint(e),r=a.readPoint(e,w),o=VL(n,D),s=VL(r,A);if(!L&&!F){if(!e.cancelable)return N(e);if(L=o>s,!L)return N(e)}const u=a.pointerMove(e);o>g&&(O=!0),c.useFriction(.3).useDuration(1),l.start(),i.add(t.apply(u)),e.preventDefault()}function N(e){const n=d.byDistance(0,!1).index!==f.get(),r=a.pointerUp(e)*(m?_:P)[F?"mouse":"touch"],o=function(e,t){const n=f.add(-1*BL(e)),r=d.byDistance(e,!m).distance;return m||zL(e)<C?r:v&&t?.5*r:d.byIndex(n.get(),0).distance}(t.apply(r),n),i=function(e,t){if(0===e||0===t)return 0;if(zL(e)<=zL(t))return 0;const n=VL(zL(e),zL(t));return zL(n/e)}(r,o),s=T-10*i,l=y+i/50;L=!1,M=!1,k.clear(),c.useDuration(s).useFriction(l),u.distance(o,!m),F=!1,p.emit("pointerUp")}function z(e){O&&(e.stopPropagation(),e.preventDefault())}return{init:function(e){if(!b)return;function t(t){(IL(b)||b(e,t))&&function(e){const t=XL(e,o);if(F=t,t&&0!==e.button)return;if(function(e){const t=e.nodeName||"";return x.includes(t)}(e.target))return;O=m&&t&&!e.buttons&&R,R=VL(i.get(),s.get())>=2,M=!0,a.pointerDown(e),c.useFriction(0).useDuration(0),i.set(s),function(){const e=F?r:n;k.add(e,"touchmove",I,E).add(e,"touchend",N).add(e,"mousemove",I,E).add(e,"mouseup",N)}(),D=a.readPoint(e),A=a.readPoint(e,w),p.emit("pointerDown")}(t)}const l=n;S.add(l,"dragstart",(e=>e.preventDefault()),E).add(l,"touchmove",(()=>{}),E).add(l,"touchend",(()=>{})).add(l,"touchstart",t).add(l,"mousedown",t).add(l,"touchcancel",N).add(l,"contextmenu",N).add(l,"click",z,!0)},pointerDown:function(){return M},destroy:function(){S.clear(),k.clear()}}}function JL(e,t){let n,r;function o(e){return e.timeStamp}function i(n,r){const o="client"+("x"===(r||e.scroll)?"X":"Y");return(XL(n,t)?n:n.touches[0])[o]}return{pointerDown:function(e){return n=e,r=e,i(e)},pointerMove:function(e){const t=i(e)-i(r),a=o(e)-o(n)>170;return r=e,a&&(n=e),t},pointerUp:function(e){if(!n||!r)return 0;const t=i(r)-i(n),a=o(e)-o(n),s=o(e)-o(r)>170,l=t/a;return a&&!s&&zL(l)>.1?l:0},readPoint:i}}function eO(e,t,n,r,o,i){let a,s,l=[],u=!1;function c(e){return o.measureSize(e.getBoundingClientRect())}return{init:function(o){if(!i)return;s=c(e),l=r.map(c),a=new ResizeObserver((a=>{u||(IL(i)||i(o,a))&&function(i){for(const a of i){const i=a.target===e,u=r.indexOf(a.target),d=i?s:l[u];if(zL(c(i?e:r[u])-d)>=.2){n.requestAnimationFrame((()=>{o.reInit(),t.emit("resize")}));break}}}(a)})),[e].concat(r).forEach((e=>a.observe(e)))},destroy:function(){a&&a.disconnect(),u=!0}}}function tO(e,t,n,r,o){const i=o.measure(10),a=o.measure(50),s=qL(.1,.99);let l=!1;return{constrain:function(o){if(l||!e.reachedAny(n.get())||!e.reachedAny(t.get()))return;const u=e.reachedMin(t.get())?"min":"max",c=zL(e[u]-t.get()),d=n.get()-t.get(),f=s.constrain(c/a);n.subtract(d*f),!o&&zL(d)<i&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())},toggleActive:function(e){l=!e}}}function nO(e,t,n,r){const o=t.min+.1,i=t.max+.1,{reachedMin:a,reachedMax:s}=qL(o,i);return{loop:function(t){if(!function(e){return 1===e?s(n.get()):-1===e&&a(n.get())}(t))return;const o=e*(-1*t);r.forEach((e=>e.add(o)))}}}function rO(e,t,n,r,o){const{reachedAny:i,removeOffset:a,constrain:s}=r;function l(e){return e.concat().sort(((e,t)=>zL(e)-zL(t)))[0]}function u(t,r){const o=[t,t+n,t-n];if(!e)return o[0];if(!r)return l(o);const i=o.filter((e=>BL(e)===r));return i.length?l(i):HL(o)-n}return{byDistance:function(n,r){const l=o.get()+n,{index:c,distance:d}=function(n){const r=e?a(n):s(n),o=t.map((e=>e-r)).map((e=>u(e,0))).map(((e,t)=>({diff:e,index:t}))).sort(((e,t)=>zL(e.diff)-zL(t.diff))),{index:i}=o[0];return{index:i,distance:r}}(l),f=!e&&i(l);return!r||f?{index:c,distance:n}:{index:c,distance:n+u(t[c]-d,0)}},byIndex:function(e,n){return{index:e,distance:u(t[e]-o.get(),n)}},shortcut:u}}function oO(e){let t=e;function n(e){return OL(e)?e:e.get()}return{get:function(){return t},set:function(e){t=n(e)},add:function(e){t+=n(e)},subtract:function(e){t-=n(e)}}}function iO(e,t,n){const r="x"===e.scroll?function(e){return`translate3d(${e}px,0px,0px)`}:function(e){return`translate3d(0px,${e}px,0px)`},o=n.style;let i=!1;return{clear:function(){i||(o.transform="",n.getAttribute("style")||n.removeAttribute("style"))},to:function(e){i||(o.transform=r(t.apply(e)))},toggleActive:function(e){i=!e}}}function aO(e,t,n,r,o,i,a,s,l,u){const c=.5,d=jL(i),f=jL(i).reverse(),p=function(){const e=s[0]-1;return g(m(f,e),r,!1)}().concat(function(){const e=n-s[0]-1;return g(m(d,e),-r,!0)}());function h(e,t){return e.reduce(((e,t)=>e-i[t]),t)}function m(e,t){return e.reduce(((e,n)=>h(e,t)>0?e.concat([n]):e),[])}function g(i,s,d){const f=function(e){return a.map(((t,r)=>({start:t-o[r]+c+e,end:t+n-c+e})))}(s);return i.map((n=>{const o=d?0:-r,i=d?r:0,a=d?"end":"start",s=f[n][a];return{index:n,slideLocation:oO(-1),translate:iO(e,t,u[n]),target:()=>l.get()>s?o:i}}))}return{canLoop:function(){return p.every((({index:e})=>h(d.filter((t=>t!==e)),n)<=.1))},clear:function(){p.forEach((e=>e.translate.clear()))},loop:function(){p.forEach((e=>{const{target:t,translate:n,slideLocation:r}=e,o=t();o!==r.get()&&(n.to(o),r.set(o))}))},loopPoints:p}}function sO(e,t,n){let r,o=!1;return{init:function(i){n&&(r=new MutationObserver((e=>{o||(IL(n)||n(i,e))&&function(e){for(const n of e)if("childList"===n.type){i.reInit(),t.emit("slidesChanged");break}}(e)})),r.observe(e,{childList:!0}))},destroy:function(){r&&r.disconnect(),o=!0}}}function lO(e,t,n,r){const o={};let i,a=null,s=null,l=!1;return{init:function(){i=new IntersectionObserver((e=>{l||(e.forEach((e=>{const n=t.indexOf(e.target);o[n]=e})),a=null,s=null,n.emit("slidesInView"))}),{root:e.parentElement,threshold:r}),t.forEach((e=>i.observe(e)))},destroy:function(){i&&i.disconnect(),l=!0},get:function(e=!0){if(e&&a)return a;if(!e&&s)return s;const t=function(e){return $L(o).reduce(((t,n)=>{const r=parseInt(n),{isIntersecting:i}=o[r];return(e&&i||!e&&!i)&&t.push(r),t}),[])}(e);return e&&(a=t),e||(s=t),t}}}function uO(e,t,n,r,o,i,a,s,l){const{startEdge:u,endEdge:c}=e,d=OL(r);return{groupSlides:function(e){return d?function(e,t){return jL(e).filter((e=>e%t==0)).map((n=>e.slice(n,n+t)))}(e,r):function(e){return e.length?jL(e).reduce(((r,d)=>{const f=HL(r)||0,p=0===f,h=d===UL(e),m=i[u]-a[f][u],g=i[u]-a[d][c],v=!o&&p?t.apply(s):0;return zL(g-(!o&&h?t.apply(l):0)-(m+v))>n&&r.push(d),h&&r.push(e.length),r}),[]).map(((t,n,r)=>{const o=Math.max(r[n-1]||0);return e.slice(o,t)})):[]}(e)}}}function cO(e,t,n,r,o,i,a,s){const{align:l,axis:u,direction:c,startIndex:d,loop:f,duration:p,dragFree:h,dragThreshold:m,inViewThreshold:g,slidesToScroll:v,skipSnaps:y,containScroll:b,watchResize:w,watchSlides:x,watchDrag:E}=i,S=t.getBoundingClientRect(),k=n.map((e=>e.getBoundingClientRect())),C=function(e){const t="rtl"===e?-1:1;return{apply:function(e){return e*t}}}(c),P=function(e,t){const n="y"===e?"y":"x";return{scroll:n,cross:"y"===e?"x":"y",startEdge:"y"===n?"top":"rtl"===t?"right":"left",endEdge:"y"===n?"bottom":"rtl"===t?"left":"right",measureSize:function(e){const{width:t,height:r}=e;return"x"===n?t:r}}}(u,c),_=P.measureSize(S),T=function(e){return{measure:function(t){return e*(t/100)}}}(_),R=YL(l,_),D=!f&&!!b,A=f||!!b,{slideSizes:M,slideSizesWithGaps:L,startGap:O,endGap:F}=function(e,t,n,r,o,i){const{measureSize:a,startEdge:s,endEdge:l}=e,u=n[0]&&o,c=function(){if(!u)return 0;const e=n[0];return zL(t[s]-e[s])}(),d=function(){if(!u)return 0;const e=i.getComputedStyle(HL(r));return parseFloat(e.getPropertyValue(`margin-${l}`))}(),f=n.map(a),p=n.map(((e,t,n)=>{const r=!t,o=t===UL(n);return r?f[t]+c:o?f[t]+d:n[t+1][s]-e[s]})).map(zL);return{slideSizes:f,slideSizesWithGaps:p,startGap:c,endGap:d}}(P,S,k,n,A,o),I=uO(P,C,_,v,f,S,k,O,F),{snaps:N,snapsAligned:z}=function(e,t,n,r,o){const{startEdge:i,endEdge:a}=e,{groupSlides:s}=o,l=s(r).map((e=>HL(e)[a]-e[0][i])).map(zL).map(t.measure),u=r.map((e=>n[i]-e[i])).map((e=>-zL(e))),c=s(u).map((e=>e[0])).map(((e,t)=>e+l[t]));return{snaps:u,snapsAligned:c}}(P,R,S,k,I),B=-HL(N)+HL(L),{snapsContained:V,scrollContainLimit:j}=function(e,t,n,r){const o=qL(-t+e,0),i=n.map(o.constrain).map((e=>parseFloat(e.toFixed(3)))),a=function(){const e=i[0],t=HL(i);return qL(i.lastIndexOf(e),i.indexOf(t)+1)}();return{snapsContained:function(){if(t<=e)return[o.max];if("keepSnaps"===r)return i;const{min:n,max:s}=a;return i.slice(n,s)}(),scrollContainLimit:a}}(_,B,z,b),H=D?V:z,{limit:U}=function(e,t,n){const r=t[0];return{limit:qL(n?r-e:HL(t),r)}}(B,H,f),W=QL(UL(H),d,f),$=W.clone(),K=jL(n),X={start:()=>s.start(ae),stop:()=>s.stop(ae),update:()=>(({dragHandler:e,scrollBody:t,scrollBounds:n,eventHandler:r,animation:o,options:{loop:i}})=>{const a=e.pointerDown();i||n.constrain(a);const s=t.seek().settled();s&&!a&&(o.stop(),r.emit("settle")),s||r.emit("scroll")})(ae),render:e=>(({scrollBody:e,translate:t,location:n,offsetLocation:r,scrollLooper:o,slideLooper:i,options:{loop:a}},s)=>{const l=e.velocity();r.set(n.get()-l+l*s),a&&(o.loop(e.direction()),i.loop()),t.to(r.get())})(ae,e)},Y=H[W.get()],q=oO(Y),Q=oO(Y),G=oO(Y),Z=function(e,t,n,r){let o=!0,i=0,a=0,s=n,l=r,u=e.get(),c=0;function d(e){return s=e,p}function f(e){return l=e,p}const p={direction:function(){return a},duration:function(){return s},velocity:function(){return i},seek:function(){const n=t.get()-e.get();let r=0;return s?(i+=n/s,i*=l,u+=i,e.add(i),r=u-c):(i=0,e.set(t),r=n),a=BL(r),c=u,o=zL(n)<.001,p},settled:function(){return o},useBaseFriction:function(){return f(r)},useBaseDuration:function(){return d(n)},useFriction:f,useDuration:d};return p}(q,G,p,.68),J=rO(f,H,B,U,G),ee=function(e,t,n,r,o,i,a){function s(r){const s=r.distance,l=r.index!==t.get();i.add(s),s&&(o.duration()?e.start():(e.update(),e.render(1),e.update())),l&&(n.set(t.get()),t.set(r.index),a.emit("select"))}return{distance:function(e,t){s(r.byDistance(e,t))},index:function(e,n){const o=t.clone().set(e);s(r.byIndex(o.get(),n))}}}(X,W,$,J,Z,G,a),te=function(e){const{max:t,length:n}=e;return{get:function(e){return n?(e-t)/-n:0}}}(U),ne=GL(),re=lO(t,n,a,g),{slideRegistry:oe}=function(e,t,n,r,o,i){const{groupSlides:a}=o,{min:s,max:l}=r;return{slideRegistry:function(){const r=a(i);return!n||t<=e?r:r.slice(s,l).map(((e,t,n)=>{const r=!t,o=!r&&t===UL(n);return r?WL(HL(n[0])+1):o?WL(UL(i)-HL(n)[0]+1,HL(n)[0]):e}))}()}}(_,B,D,j,I,K),ie=function(e,t,n,r,o,i){let a=0;function s(e){"Tab"===e.code&&(a=(new Date).getTime())}function l(s){i.add(s,"focus",(()=>{if((new Date).getTime()-a>10)return;e.scrollLeft=0;const i=t.indexOf(s),l=n.findIndex((e=>e.includes(i)));OL(l)&&(o.useDuration(0),r.index(l,0))}),{passive:!0,capture:!0})}return{init:function(){i.add(document,"keydown",s,!1),t.forEach(l)}}}(e,n,oe,ee,Z,ne),ae={ownerDocument:r,ownerWindow:o,eventHandler:a,containerRect:S,slideRects:k,animation:X,axis:P,direction:C,dragHandler:ZL(P,C,e,r,o,G,JL(P,o),q,X,ee,Z,J,W,a,T,h,m,y,.68,E),eventStore:ne,percentOfView:T,index:W,indexPrevious:$,limit:U,location:q,offsetLocation:Q,options:i,resizeHandler:eO(t,a,o,n,P,w),scrollBody:Z,scrollBounds:tO(U,q,G,Z,T),scrollLooper:nO(B,U,Q,[q,Q,G]),scrollProgress:te,scrollSnapList:H.map(te.get),scrollSnaps:H,scrollTarget:J,scrollTo:ee,slideLooper:aO(P,C,_,B,M,L,N,H,Q,n),slideFocus:ie,slidesHandler:sO(t,a,x),slidesInView:re,slideIndexes:K,slideRegistry:oe,slidesToScroll:I,target:G,translate:iO(P,C,t)};return ae}const dO={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0};function fO(e){function t(e,t){return KL(e,t||{})}const n={mergeOptions:t,optionsAtMedia:function(n){const r=n.breakpoints||{},o=$L(r).filter((t=>e.matchMedia(t).matches)).map((e=>r[e])).reduce(((e,n)=>t(e,n)),{});return t(n,o)},optionsMediaQueries:function(t){return t.map((e=>$L(e.breakpoints||{}))).reduce(((e,t)=>e.concat(t)),[]).map(e.matchMedia)}};return n}function pO(e,t,n){const r=e.ownerDocument,o=r.defaultView,i=fO(o),a=function(e){let t=[];const n={init:function(n,r){return t=r.filter((({options:t})=>!1!==e.optionsAtMedia(t).active)),t.forEach((t=>t.init(n,e))),r.reduce(((e,t)=>Object.assign(e,{[t.name]:t})),{})},destroy:function(){t=t.filter((e=>e.destroy()))}};return n}(i),s=GL(),l=GL(),u=function(){const e={};let t;function n(t){return e[t]||[]}const r={init:function(e){t=e},emit:function(e){return n(e).forEach((n=>n(t,e))),r},off:function(t,o){return e[t]=n(t).filter((e=>e!==o)),r},on:function(t,o){return e[t]=n(t).concat([o]),r}};return r}(),{animationRealms:c}=pO,{mergeOptions:d,optionsAtMedia:f,optionsMediaQueries:p}=i,{on:h,off:m,emit:g}=u,v=T;let y,b,w,x,E=!1,S=d(dO,pO.globalOptions),k=d(S),C=[];function P(t,n){const i=cO(e,w,x,r,o,t,u,n);if(t.loop&&!i.slideLooper.canLoop()){return P(Object.assign({},t,{loop:!1}),n)}return i}function _(t,n){if(E)return;const i=c.find((e=>e.window===o)),u=i||function(e){const t=1e3/60;let n=[],r=null,o=0,i=0;function a(s){r||(r=s);const l=s-r;for(r=s,o+=l;o>=t;)n.forEach((({animation:e})=>e.update())),o-=t;const u=zL(o/t);n.forEach((({animation:e})=>e.render(u))),i&&e.requestAnimationFrame(a)}return{start:function(t){n.includes(t)||n.push(t),i||(i=e.requestAnimationFrame(a))},stop:function(t){n=n.filter((e=>e!==t)),n.length||(e.cancelAnimationFrame(i),r=null,o=0,i=0)},reset:function(){r=null,o=0},window:e}}(o);i||c.push(u),S=d(S,t),k=f(S),C=n||C,function(){const{container:t,slides:n}=k,r=FL(t)?e.querySelector(t):t;w=r||e.children[0];const o=FL(n)?w.querySelectorAll(n):n;x=[].slice.call(o||w.children)}(),y=P(k,u),p([S,...C.map((({options:e})=>e))]).forEach((e=>s.add(e,"change",T))),k.active&&(y.translate.to(y.location.get()),y.slidesInView.init(),y.slideFocus.init(),y.eventHandler.init(M),y.resizeHandler.init(M),y.slidesHandler.init(M),l.add(r,"visibilitychange",(()=>{r.hidden&&u.reset()})),y.options.loop&&y.slideLooper.loop(),w.offsetParent&&x.length&&y.dragHandler.init(M),b=a.init(M,C))}function T(e,t){const n=A();R(),_(d({startIndex:n},e),t),u.emit("reInit")}function R(){y.dragHandler.destroy(),y.animation.stop(),y.eventStore.clear(),y.translate.clear(),y.slideLooper.clear(),y.resizeHandler.destroy(),y.slidesHandler.destroy(),a.destroy(),s.clear(),l.clear()}function D(e,t,n){k.active&&!E&&(y.scrollBody.useBaseFriction().useDuration(t?0:k.duration),y.scrollTo.index(e,n||0))}function A(){return y.index.get()}const M={canScrollNext:function(){return y.index.add(1).get()!==A()},canScrollPrev:function(){return y.index.add(-1).get()!==A()},containerNode:function(){return w},internalEngine:function(){return y},destroy:function(){E||(E=!0,s.clear(),R(),u.emit("destroy"))},off:m,on:h,emit:g,plugins:function(){return b},previousScrollSnap:function(){return y.indexPrevious.get()},reInit:v,rootNode:function(){return e},scrollNext:function(e){D(y.index.add(1).get(),!0===e,-1)},scrollPrev:function(e){D(y.index.add(-1).get(),!0===e,1)},scrollProgress:function(){return y.scrollProgress.get(y.location.get())},scrollSnapList:function(){return y.scrollSnapList},scrollTo:D,selectedScrollSnap:A,slideNodes:function(){return x},slidesInView:function(){return y.slidesInView.get()},slidesNotInView:function(){return y.slidesInView.get(!1)}};return _(t,n),setTimeout((()=>u.emit("init")),0),M}function hO(e={},t=[]){const n=W.useRef(e),r=W.useRef(t),[o,i]=W.useState(),[a,s]=W.useState(),l=W.useCallback((()=>{o&&o.reInit(n.current,r.current)}),[o]);return W.useEffect((()=>{if("undefined"!=typeof window&&window.document&&window.document.createElement&&a){pO.globalOptions=hO.globalOptions;const e=pO(a,n.current,r.current);return i(e),()=>e.destroy()}i(void 0)}),[a,i]),W.useEffect((()=>{ML(n.current,e)||(n.current=e,l())}),[e,l]),W.useEffect((()=>{(function(e,t){if(e.length!==t.length)return!1;const n=LL(e),r=LL(t);return n.every(((e,t)=>ML(e,r[t])))})(r.current,t)||(r.current=t,l())}),[t,l]),[s,o]}function mO(e,t,n){let r,o=n.initialDeps??[];return()=>{var i,a,s,l;let u;n.key&&(null==(i=n.debug)?void 0:i.call(n))&&(u=Date.now());const c=e();if(!(c.length!==o.length||c.some(((e,t)=>o[t]!==e))))return r;let d;if(o=c,n.key&&(null==(a=n.debug)?void 0:a.call(n))&&(d=Date.now()),r=t(...c),n.key&&(null==(s=n.debug)?void 0:s.call(n))){const e=Math.round(100*(Date.now()-u))/100,t=Math.round(100*(Date.now()-d))/100,r=t/16,o=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${o(t,5)} /${o(e,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,null==n?void 0:n.key)}return null==(l=null==n?void 0:n.onChange)||l.call(n,r),r}}function gO(e,t){if(void 0===e)throw new Error("Unexpected undefined"+(t?`: ${t}`:""));return e}pO.animationRealms=[],pO.globalOptions=void 0,hO.globalOptions=void 0;const vO=e=>e,yO=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let o=t;o<=n;o++)r.push(o);return r},bO=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e=>{const{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(r(n.getBoundingClientRect()),"undefined"==typeof ResizeObserver)return()=>{};const o=new ResizeObserver((e=>{const t=e[0];if(null==t?void 0:t.borderBoxSize){const e=t.borderBoxSize[0];if(e)return void r({width:e.inlineSize,height:e.blockSize})}r(n.getBoundingClientRect())}));return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},wO=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=()=>{t(n[e.options.horizontal?"scrollLeft":"scrollTop"])};return r(),n.addEventListener("scroll",r,{passive:!0}),()=>{n.removeEventListener("scroll",r)}},xO=(e,t,n)=>{if(null==t?void 0:t.borderBoxSize){const e=t.borderBoxSize[0];if(e){return Math.round(e[n.options.horizontal?"inlineSize":"blockSize"])}}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])},EO=(e,{adjustments:t=0,behavior:n},r)=>{var o,i;const a=e+t;null==(i=null==(o=r.scrollElement)?void 0:o.scrollTo)||i.call(o,{[r.options.horizontal?"left":"top"]:a,behavior:n})};class SO{constructor(e){this.unsubs=[],this.scrollElement=null,this.isScrolling=!1,this.isScrollingTimeoutId=null,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollDirection=null,this.scrollAdjustments=0,this.measureElementCache=new Map,this.observer=(()=>{let e=null;const t=()=>e||("undefined"!=typeof ResizeObserver?e=new ResizeObserver((e=>{e.forEach((e=>{this._measureElement(e.target,e)}))})):null);return{disconnect:()=>{var e;return null==(e=t())?void 0:e.disconnect()},observe:e=>{var n;return null==(n=t())?void 0:n.observe(e,{box:"border-box"})},unobserve:e=>{var n;return null==(n=t())?void 0:n.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach((([t,n])=>{void 0===n&&delete e[t]})),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:vO,rangeExtractor:yO,onChange:()=>{},measureElement:xO,initialRect:{width:0,height:0},scrollMargin:0,scrollingDelay:150,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,...e}},this.notify=e=>{var t,n;null==(n=(t=this.options).onChange)||n.call(t,this,e)},this.maybeNotify=mO((()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null])),(e=>{this.notify(e)}),{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach((e=>e())),this.unsubs=[],this.scrollElement=null},this._didMount=()=>(this.measureElementCache.forEach(this.observer.observe),()=>{this.observer.disconnect(),this.cleanup()}),this._willUpdate=()=>{const e=this.options.getScrollElement();this.scrollElement!==e&&(this.cleanup(),this.scrollElement=e,this._scrollToOffset(this.scrollOffset,{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,(e=>{this.scrollRect=e,this.maybeNotify()}))),this.unsubs.push(this.options.observeElementOffset(this,(e=>{this.scrollAdjustments=0,this.scrollOffset!==e&&(null!==this.isScrollingTimeoutId&&(clearTimeout(this.isScrollingTimeoutId),this.isScrollingTimeoutId=null),this.isScrolling=!0,this.scrollDirection=this.scrollOffset<e?"forward":"backward",this.scrollOffset=e,this.maybeNotify(),this.isScrollingTimeoutId=setTimeout((()=>{this.isScrollingTimeoutId=null,this.isScrolling=!1,this.scrollDirection=null,this.maybeNotify()}),this.options.scrollingDelay))}))))},this.getSize=()=>this.scrollRect[this.options.horizontal?"width":"height"],this.memoOptions=mO((()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey]),((e,t,n,r)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:r})),{key:!1}),this.getFurthestMeasurement=(e,t)=>{const n=new Map,r=new Map;for(let o=t-1;o>=0;o--){const t=e[o];if(n.has(t.lane))continue;const i=r.get(t.lane);if(null==i||t.end>i.end?r.set(t.lane,t):t.end<i.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort(((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end))[0]:void 0},this.getMeasurements=mO((()=>[this.memoOptions(),this.itemSizeCache]),(({count:e,paddingStart:t,scrollMargin:n,getItemKey:r},o)=>{const i=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const a=this.measurementsCache.slice(0,i);for(let s=i;s<e;s++){const e=r(s),i=1===this.options.lanes?a[s-1]:this.getFurthestMeasurement(a,s),l=i?i.end:t+n,u=o.get(e),c="number"==typeof u?u:this.options.estimateSize(s),d=l+c,f=i?i.lane:s%this.options.lanes;a[s]={index:s,start:l,size:c,end:d,key:e,lane:f}}return this.measurementsCache=a,a}),{key:!1,debug:()=>this.options.debug}),this.calculateRange=mO((()=>[this.getMeasurements(),this.getSize(),this.scrollOffset]),((e,t,n)=>this.range=e.length>0&&t>0?function({measurements:e,outerSize:t,scrollOffset:n}){const r=e.length-1,o=t=>e[t].start,i=kO(0,r,o,n);let a=i;for(;a<r&&e[a].end<n+t;)a++;return{startIndex:i,endIndex:a}}({measurements:e,outerSize:t,scrollOffset:n}):null),{key:!1,debug:()=>this.options.debug}),this.getIndexes=mO((()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count]),((e,t,n,r)=>null===t?[]:e({...t,overscan:n,count:r})),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{const t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{const n=this.measurementsCache[this.indexFromElement(e)];if(!n||!e.isConnected)return void this.measureElementCache.forEach(((t,n)=>{t===e&&(this.observer.unobserve(e),this.measureElementCache.delete(n))}));const r=this.measureElementCache.get(n.key);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.measureElementCache.set(n.key,e));const o=this.options.measureElement(e,t,this);this.resizeItem(n,o)},this.resizeItem=(e,t)=>{const n=t-(this.itemSizeCache.get(e.key)??e.size);0!==n&&(e.start<this.scrollOffset+this.scrollAdjustments&&this._scrollToOffset(this.scrollOffset,{adjustments:this.scrollAdjustments+=n,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(e.index),this.itemSizeCache=new Map(this.itemSizeCache.set(e.key,t)),this.notify(!1))},this.measureElement=e=>{e&&this._measureElement(e,void 0)},this.getVirtualItems=mO((()=>[this.getIndexes(),this.getMeasurements()]),((e,t)=>{const n=[];for(let r=0,o=e.length;r<o;r++){const o=t[e[r]];n.push(o)}return n}),{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const t=this.getMeasurements();return gO(t[kO(0,t.length-1,(e=>gO(t[e]).start),e)])},this.getOffsetForAlignment=(e,t)=>{const n=this.getSize();"auto"===t&&(t=e<=this.scrollOffset?"start":e>=this.scrollOffset+n?"end":"start"),"start"===t||("end"===t?e-=n:"center"===t&&(e-=n/2));const r=this.options.horizontal?"scrollWidth":"scrollHeight",o=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[r]:this.scrollElement[r]:0)-this.getSize();return Math.max(Math.min(o,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const n=gO(this.getMeasurements()[e]);if("auto"===t)if(n.end>=this.scrollOffset+this.getSize()-this.options.scrollPaddingEnd)t="end";else{if(!(n.start<=this.scrollOffset+this.options.scrollPaddingStart))return[this.scrollOffset,t];t="start"}const r="end"===t?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(r,t),t]},this.isDynamicMode=()=>this.measureElementCache.size>0,this.cancelScrollToIndex=()=>{null!==this.scrollToIndexTimeoutId&&(clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(e,{align:t="start",behavior:n}={})=>{this.cancelScrollToIndex(),"smooth"===n&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:n})},this.scrollToIndex=(e,{align:t="auto",behavior:n}={})=>{e=Math.max(0,Math.min(e,this.options.count-1)),this.cancelScrollToIndex(),"smooth"===n&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const[r,o]=this.getOffsetForIndex(e,t);this._scrollToOffset(r,{adjustments:void 0,behavior:n}),"smooth"!==n&&this.isDynamicMode()&&(this.scrollToIndexTimeoutId=setTimeout((()=>{this.scrollToIndexTimeoutId=null;if(this.measureElementCache.has(this.options.getItemKey(e))){const[t]=this.getOffsetForIndex(e,o);((e,t)=>Math.abs(e-t)<1)(t,this.scrollOffset)||this.scrollToIndex(e,{align:o,behavior:n})}else this.scrollToIndex(e,{align:o,behavior:n})})))},this.scrollBy=(e,{behavior:t}={})=>{this.cancelScrollToIndex(),"smooth"===t&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.scrollOffset+e,{adjustments:void 0,behavior:t})},this.getTotalSize=()=>{var e;const t=this.getMeasurements();let n;return n=0===t.length?this.options.paddingStart:1===this.options.lanes?(null==(e=t[t.length-1])?void 0:e.end)??0:Math.max(...t.slice(-this.options.lanes).map((e=>e.end))),n-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e),this.scrollRect=this.options.initialRect,this.scrollOffset=this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach((e=>{this.itemSizeCache.set(e.key,e.size)})),this.maybeNotify()}}const kO=(e,t,n,r)=>{for(;e<=t;){const o=(e+t)/2|0,i=n(o);if(i<r)e=o+1;else{if(!(i>r))return o;t=o-1}}return e>0?e-1:0};const CO="undefined"!=typeof document?W.useLayoutEffect:W.useEffect;function PO(e){return function(e){const t=W.useReducer((()=>({})),{})[1],n={...e,onChange:(n,r)=>{var o;r?yh.flushSync(t):t(),null==(o=e.onChange)||o.call(e,n,r)}},[r]=W.useState((()=>new SO(n)));return r.setOptions(n),W.useEffect((()=>r._didMount()),[]),CO((()=>r._willUpdate())),r}({observeElementRect:bO,observeElementOffset:wO,scrollToFn:EO,...e})}export{Rg as $,vb as A,yb as B,Hn as C,Ab as D,Mb as E,Ub as F,Wb as G,Zw as H,ww as I,xw as J,Ew as K,Sw as L,lE as M,uE as N,cE as O,cC as P,dC as Q,$ as R,fC as S,rC as T,oC as U,iC as V,aC as W,sC as X,lC as Y,pC as Z,uC as _,Dg as a,hC as a0,vM as a1,SM as a2,wM as a3,nx as a4,Jw as a5,ex as a6,tx as a7,$M as a8,KM as a9,XM as aa,YM as ab,qM as ac,QM as ad,_L as ae,TL as af,RL as ag,DL as ah,hO as ai,yh as aj,PO as ak,Ag as b,Mg as c,Fg as d,Ig as e,Og as f,Lg as g,Ng as h,dg as i,Zn as j,fg as k,pg as l,hg as m,mg as n,gg as o,vv as p,bv as q,W as r,wv as s,xv as t,Ev as u,yv as v,pb as w,hb as x,mb as y,gb as z};
|
|
1
|
+
var e,t,n,r,o,i,a=Object.defineProperty;function s(e,t){for(var n=0;n<t.length;n++){const r=t[n];if("string"!=typeof r&&!Array.isArray(r))for(const t in r)if("default"!==t&&!(t in e)){const n=Object.getOwnPropertyDescriptor(r,t);n&&Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var u={exports:{}},c={},d=Symbol.for("react.element"),f=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),g=Symbol.for("react.provider"),v=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),w=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),E=Symbol.iterator;var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,C={};function P(e,t,n){this.props=e,this.context=t,this.refs=C,this.updater=n||S}function _(){}function T(e,t,n){this.props=e,this.context=t,this.refs=C,this.updater=n||S}P.prototype.isReactComponent={},P.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)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")},P.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},_.prototype=P.prototype;var R=T.prototype=new _;R.constructor=T,k(R,P.prototype),R.isPureReactComponent=!0;var D=Array.isArray,A=Object.prototype.hasOwnProperty,M={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};function O(e,t,n){var r,o={},i=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(i=""+t.key),t)A.call(t,r)&&!L.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];o.children=l}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===o[r]&&(o[r]=s[r]);return{$$typeof:d,type:e,key:i,ref:a,props:o,_owner:M.current}}function F(e){return"object"==typeof e&&null!==e&&e.$$typeof===d}var I=/\/+/g;function N(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function z(e,t,n,r,o){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var a=!1;if(null===e)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case d:case f:a=!0}}if(a)return o=o(a=e),e=""===r?"."+N(a,0):r,D(o)?(n="",null!=e&&(n=e.replace(I,"$&/")+"/"),z(o,t,n,"",(function(e){return e}))):null!=o&&(F(o)&&(o=function(e,t){return{$$typeof:d,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,n+(!o.key||a&&a.key===o.key?"":(""+o.key).replace(I,"$&/")+"/")+e)),t.push(o)),1;if(a=0,r=""===r?".":r+":",D(e))for(var s=0;s<e.length;s++){var l=r+N(i=e[s],s);a+=z(i,t,n,l,o)}else if(l=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=E&&e[E]||e["@@iterator"])?e:null}(e),"function"==typeof l)for(e=l.call(e),s=0;!(i=e.next()).done;)a+=z(i=i.value,t,n,l=r+N(i,s++),o);else if("object"===i)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function B(e,t,n){if(null==e)return e;var r=[],o=0;return z(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function V(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var j={current:null},H={transition:null},U={ReactCurrentDispatcher:j,ReactCurrentBatchConfig:H,ReactCurrentOwner:M};c.Children={map:B,forEach:function(e,t,n){B(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return B(e,(function(){t++})),t},toArray:function(e){return B(e,(function(e){return e}))||[]},only:function(e){if(!F(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},c.Component=P,c.Fragment=p,c.Profiler=m,c.PureComponent=T,c.StrictMode=h,c.Suspense=b,c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=U,c.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=k({},e.props),o=e.key,i=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(i=t.ref,a=M.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)A.call(t,l)&&!L.hasOwnProperty(l)&&(r[l]=void 0===t[l]&&void 0!==s?s[l]:t[l])}var l=arguments.length-2;if(1===l)r.children=n;else if(1<l){s=Array(l);for(var u=0;u<l;u++)s[u]=arguments[u+2];r.children=s}return{$$typeof:d,type:e.type,key:o,ref:i,props:r,_owner:a}},c.createContext=function(e){return(e={$$typeof:v,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:g,_context:e},e.Consumer=e},c.createElement=O,c.createFactory=function(e){var t=O.bind(null,e);return t.type=e,t},c.createRef=function(){return{current:null}},c.forwardRef=function(e){return{$$typeof:y,render:e}},c.isValidElement=F,c.lazy=function(e){return{$$typeof:x,_payload:{_status:-1,_result:e},_init:V}},c.memo=function(e,t){return{$$typeof:w,type:e,compare:void 0===t?null:t}},c.startTransition=function(e){var t=H.transition;H.transition={};try{e()}finally{H.transition=t}},c.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},c.useCallback=function(e,t){return j.current.useCallback(e,t)},c.useContext=function(e){return j.current.useContext(e)},c.useDebugValue=function(){},c.useDeferredValue=function(e){return j.current.useDeferredValue(e)},c.useEffect=function(e,t){return j.current.useEffect(e,t)},c.useId=function(){return j.current.useId()},c.useImperativeHandle=function(e,t,n){return j.current.useImperativeHandle(e,t,n)},c.useInsertionEffect=function(e,t){return j.current.useInsertionEffect(e,t)},c.useLayoutEffect=function(e,t){return j.current.useLayoutEffect(e,t)},c.useMemo=function(e,t){return j.current.useMemo(e,t)},c.useReducer=function(e,t,n){return j.current.useReducer(e,t,n)},c.useRef=function(e){return j.current.useRef(e)},c.useState=function(e){return j.current.useState(e)},c.useSyncExternalStore=function(e,t,n){return j.current.useSyncExternalStore(e,t,n)},c.useTransition=function(){return j.current.useTransition()},c.version="18.2.0",u.exports=c;var W=u.exports;const $=l(W),K=s({__proto__:null,default:$},[W]),X=(null==(e="undefined"!=typeof globalThis?globalThis:void 0)?void 0:e.crypto)||(null==(t="undefined"!=typeof global?global:void 0)?void 0:t.crypto)||(null==(n="undefined"!=typeof window?window:void 0)?void 0:n.crypto)||(null==(r="undefined"!=typeof self?self:void 0)?void 0:r.crypto)||(null==(i=null==(o="undefined"!=typeof frames?frames:void 0)?void 0:o[0])?void 0:i.crypto);let Y;Y=X?e=>{const t=[];for(let n=0;n<e;n+=4)t.push(X.getRandomValues(new Uint32Array(1))[0]);return new Q(t,e)}:e=>{const t=[],n=e=>{let t=e,n=987654321;const r=4294967295;return()=>{n=36969*(65535&n)+(n>>16)&r,t=18e3*(65535&t)+(t>>16)&r;let e=(n<<16)+t&r;return e/=4294967296,e+=.5,e*(Math.random()>.5?1:-1)}};for(let r,o=0;o<e;o+=4){const e=n(4294967296*(r||Math.random()));r=987654071*e(),t.push(4294967296*e()|0)}return new Q(t,e)};class q{static create(...e){return new this(...e)}mixIn(e){return Object.assign(this,e)}clone(){const e=new this.constructor;return Object.assign(e,this),e}}class Q extends q{constructor(e=[],t=4*e.length){super();let n=e;if(n instanceof ArrayBuffer&&(n=new Uint8Array(n)),(n instanceof Int8Array||n instanceof Uint8ClampedArray||n instanceof Int16Array||n instanceof Uint16Array||n instanceof Int32Array||n instanceof Uint32Array||n instanceof Float32Array||n instanceof Float64Array)&&(n=new Uint8Array(n.buffer,n.byteOffset,n.byteLength)),n instanceof Uint8Array){const e=n.byteLength,t=[];for(let r=0;r<e;r+=1)t[r>>>2]|=n[r]<<24-r%4*8;this.words=t,this.sigBytes=e}else this.words=e,this.sigBytes=t}toString(e=Z){return e.stringify(this)}concat(e){const t=this.words,n=e.words,r=this.sigBytes,o=e.sigBytes;if(this.clamp(),r%4)for(let i=0;i<o;i+=1){const e=n[i>>>2]>>>24-i%4*8&255;t[r+i>>>2]|=e<<24-(r+i)%4*8}else for(let i=0;i<o;i+=4)t[r+i>>>2]=n[i>>>2];return this.sigBytes+=o,this}clamp(){const{words:e,sigBytes:t}=this;e[t>>>2]&=4294967295<<32-t%4*8,e.length=Math.ceil(t/4)}clone(){const e=super.clone.call(this);return e.words=this.words.slice(0),e}}var G;((e,t,n)=>{t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(Q,"symbol"!=typeof(G="random")?G+"":G,Y);const Z={stringify(e){const{words:t,sigBytes:n}=e,r=[];for(let o=0;o<n;o+=1){const e=t[o>>>2]>>>24-o%4*8&255;r.push((e>>>4).toString(16)),r.push((15&e).toString(16))}return r.join("")},parse(e){const t=e.length,n=[];for(let r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new Q(n,t/2)}},J={stringify(e){const{words:t,sigBytes:n}=e,r=[];for(let o=0;o<n;o+=1){const e=t[o>>>2]>>>24-o%4*8&255;r.push(String.fromCharCode(e))}return r.join("")},parse(e){const t=e.length,n=[];for(let r=0;r<t;r+=1)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new Q(n,t)}},ee={stringify(e){try{return decodeURIComponent(escape(J.stringify(e)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:e=>J.parse(unescape(encodeURIComponent(e)))};class te extends q{constructor(){super(),this._minBufferSize=0}reset(){this._data=new Q,this._nDataBytes=0}_append(e){let t=e;"string"==typeof t&&(t=ee.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes}_process(e){let t;const{_data:n,blockSize:r}=this,o=n.words,i=n.sigBytes;let a=i/(4*r);a=e?Math.ceil(a):Math.max((0|a)-this._minBufferSize,0);const s=a*r,l=Math.min(4*s,i);if(s){for(let e=0;e<s;e+=r)this._doProcessBlock(o,e);t=o.splice(0,s),n.sigBytes-=l}return new Q(t,l)}clone(){const e=super.clone.call(this);return e._data=this._data.clone(),e}}class ne extends te{constructor(e){super(),this.blockSize=16,this.cfg=Object.assign(new q,e),this.reset()}static _createHelper(e){return(t,n)=>new e(n).finalize(t)}static _createHmacHelper(e){return(t,n)=>new re(e,n).finalize(t)}reset(){super.reset.call(this),this._doReset()}update(e){return this._append(e),this._process(),this}finalize(e){e&&this._append(e);return this._doFinalize()}}class re extends q{constructor(e,t){super();const n=new e;this._hasher=n;let r=t;"string"==typeof r&&(r=ee.parse(r));const o=n.blockSize,i=4*o;r.sigBytes>i&&(r=n.finalize(t)),r.clamp();const a=r.clone();this._oKey=a;const s=r.clone();this._iKey=s;const l=a.words,u=s.words;for(let c=0;c<o;c+=1)l[c]^=1549556828,u[c]^=909522486;a.sigBytes=i,s.sigBytes=i,this.reset()}reset(){const e=this._hasher;e.reset(),e.update(this._iKey)}update(e){return this._hasher.update(e),this}finalize(e){const t=this._hasher,n=t.finalize(e);t.reset();return t.finalize(this._oKey.clone().concat(n))}}const oe=Q;class ie extends q{constructor(e,t){super(),this.high=e,this.low=t}}class ae extends q{constructor(e=[],t=8*e.length){super(),this.words=e,this.sigBytes=t}toX32(){const e=this.words,t=e.length,n=[];for(let r=0;r<t;r+=1){const t=e[r];n.push(t.high),n.push(t.low)}return oe.create(n,this.sigBytes)}clone(){const e=super.clone.call(this);e.words=this.words.slice(0);const{words:t}=e,n=t.length;for(let r=0;r<n;r+=1)t[r]=t[r].clone();return e}}const se=(e,t,n)=>{const r=[];let o=0;for(let i=0;i<t;i+=1)if(i%4){const t=n[e.charCodeAt(i-1)]<<i%4*2|n[e.charCodeAt(i)]>>>6-i%4*2;r[o>>>2]|=t<<24-o%4*8,o+=1}return Q.create(r,o)},le={stringify(e){const{words:t,sigBytes:n}=e,r=this._map;e.clamp();const o=[];for(let a=0;a<n;a+=3){const e=(t[a>>>2]>>>24-a%4*8&255)<<16|(t[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|t[a+2>>>2]>>>24-(a+2)%4*8&255;for(let t=0;t<4&&a+.75*t<n;t+=1)o.push(r.charAt(e>>>6*(3-t)&63))}const i=r.charAt(64);if(i)for(;o.length%4;)o.push(i);return o.join("")},parse(e){let t=e.length;const n=this._map;let r=this._reverseMap;if(!r){this._reverseMap=[],r=this._reverseMap;for(let e=0;e<n.length;e+=1)r[n.charCodeAt(e)]=e}const o=n.charAt(64);if(o){const n=e.indexOf(o);-1!==n&&(t=n)}return se(e,t,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},ue=[];for(let RO=0;RO<64;RO+=1)ue[RO]=4294967296*Math.abs(Math.sin(RO+1))|0;const ce=(e,t,n,r,o,i,a)=>{const s=e+(t&n|~t&r)+o+a;return(s<<i|s>>>32-i)+t},de=(e,t,n,r,o,i,a)=>{const s=e+(t&r|n&~r)+o+a;return(s<<i|s>>>32-i)+t},fe=(e,t,n,r,o,i,a)=>{const s=e+(t^n^r)+o+a;return(s<<i|s>>>32-i)+t},pe=(e,t,n,r,o,i,a)=>{const s=e+(n^(t|~r))+o+a;return(s<<i|s>>>32-i)+t};class he extends ne{_doReset(){this._hash=new Q([1732584193,4023233417,2562383102,271733878])}_doProcessBlock(e,t){const n=e;for(let k=0;k<16;k+=1){const r=t+k,o=e[r];n[r]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}const r=this._hash.words,o=n[t+0],i=n[t+1],a=n[t+2],s=n[t+3],l=n[t+4],u=n[t+5],c=n[t+6],d=n[t+7],f=n[t+8],p=n[t+9],h=n[t+10],m=n[t+11],g=n[t+12],v=n[t+13],y=n[t+14],b=n[t+15];let w=r[0],x=r[1],E=r[2],S=r[3];w=ce(w,x,E,S,o,7,ue[0]),S=ce(S,w,x,E,i,12,ue[1]),E=ce(E,S,w,x,a,17,ue[2]),x=ce(x,E,S,w,s,22,ue[3]),w=ce(w,x,E,S,l,7,ue[4]),S=ce(S,w,x,E,u,12,ue[5]),E=ce(E,S,w,x,c,17,ue[6]),x=ce(x,E,S,w,d,22,ue[7]),w=ce(w,x,E,S,f,7,ue[8]),S=ce(S,w,x,E,p,12,ue[9]),E=ce(E,S,w,x,h,17,ue[10]),x=ce(x,E,S,w,m,22,ue[11]),w=ce(w,x,E,S,g,7,ue[12]),S=ce(S,w,x,E,v,12,ue[13]),E=ce(E,S,w,x,y,17,ue[14]),x=ce(x,E,S,w,b,22,ue[15]),w=de(w,x,E,S,i,5,ue[16]),S=de(S,w,x,E,c,9,ue[17]),E=de(E,S,w,x,m,14,ue[18]),x=de(x,E,S,w,o,20,ue[19]),w=de(w,x,E,S,u,5,ue[20]),S=de(S,w,x,E,h,9,ue[21]),E=de(E,S,w,x,b,14,ue[22]),x=de(x,E,S,w,l,20,ue[23]),w=de(w,x,E,S,p,5,ue[24]),S=de(S,w,x,E,y,9,ue[25]),E=de(E,S,w,x,s,14,ue[26]),x=de(x,E,S,w,f,20,ue[27]),w=de(w,x,E,S,v,5,ue[28]),S=de(S,w,x,E,a,9,ue[29]),E=de(E,S,w,x,d,14,ue[30]),x=de(x,E,S,w,g,20,ue[31]),w=fe(w,x,E,S,u,4,ue[32]),S=fe(S,w,x,E,f,11,ue[33]),E=fe(E,S,w,x,m,16,ue[34]),x=fe(x,E,S,w,y,23,ue[35]),w=fe(w,x,E,S,i,4,ue[36]),S=fe(S,w,x,E,l,11,ue[37]),E=fe(E,S,w,x,d,16,ue[38]),x=fe(x,E,S,w,h,23,ue[39]),w=fe(w,x,E,S,v,4,ue[40]),S=fe(S,w,x,E,o,11,ue[41]),E=fe(E,S,w,x,s,16,ue[42]),x=fe(x,E,S,w,c,23,ue[43]),w=fe(w,x,E,S,p,4,ue[44]),S=fe(S,w,x,E,g,11,ue[45]),E=fe(E,S,w,x,b,16,ue[46]),x=fe(x,E,S,w,a,23,ue[47]),w=pe(w,x,E,S,o,6,ue[48]),S=pe(S,w,x,E,d,10,ue[49]),E=pe(E,S,w,x,y,15,ue[50]),x=pe(x,E,S,w,u,21,ue[51]),w=pe(w,x,E,S,g,6,ue[52]),S=pe(S,w,x,E,s,10,ue[53]),E=pe(E,S,w,x,h,15,ue[54]),x=pe(x,E,S,w,i,21,ue[55]),w=pe(w,x,E,S,f,6,ue[56]),S=pe(S,w,x,E,b,10,ue[57]),E=pe(E,S,w,x,c,15,ue[58]),x=pe(x,E,S,w,v,21,ue[59]),w=pe(w,x,E,S,l,6,ue[60]),S=pe(S,w,x,E,m,10,ue[61]),E=pe(E,S,w,x,a,15,ue[62]),x=pe(x,E,S,w,p,21,ue[63]),r[0]=r[0]+w|0,r[1]=r[1]+x|0,r[2]=r[2]+E|0,r[3]=r[3]+S|0}_doFinalize(){const e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32;const o=Math.floor(n/4294967296),i=n;t[15+(r+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t[14+(r+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),e.sigBytes=4*(t.length+1),this._process();const a=this._hash,s=a.words;for(let l=0;l<4;l+=1){const e=s[l];s[l]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8)}return a}clone(){const e=super.clone.call(this);return e._hash=this._hash.clone(),e}}const me=ne._createHelper(he),ge=ne._createHmacHelper(he);class ve extends q{constructor(e){super(),this.cfg=Object.assign(new q,{keySize:4,hasher:he,iterations:1},e)}compute(e,t){let n;const{cfg:r}=this,o=r.hasher.create(),i=Q.create(),a=i.words,{keySize:s,iterations:l}=r;for(;a.length<s;){n&&o.update(n),n=o.update(e).finalize(t),o.reset();for(let e=1;e<l;e+=1)n=o.finalize(n),o.reset();i.concat(n)}return i.sigBytes=4*s,i}}class ye extends te{constructor(e,t,n){super(),this.cfg=Object.assign(new q,n),this._xformMode=e,this._key=t,this.reset()}static createEncryptor(e,t){return this.create(this._ENC_XFORM_MODE,e,t)}static createDecryptor(e,t){return this.create(this._DEC_XFORM_MODE,e,t)}static _createHelper(e){const t=e=>"string"==typeof e?Re:_e;return{encrypt:(n,r,o)=>t(r).encrypt(e,n,r,o),decrypt:(n,r,o)=>t(r).decrypt(e,n,r,o)}}reset(){super.reset.call(this),this._doReset()}process(e){return this._append(e),this._process()}finalize(e){e&&this._append(e);return this._doFinalize()}}ye._ENC_XFORM_MODE=1,ye._DEC_XFORM_MODE=2,ye.keySize=4,ye.ivSize=4;class be extends ye{constructor(...e){super(...e),this.blockSize=1}_doFinalize(){return this._process(!0)}}class we extends q{constructor(e,t){super(),this._cipher=e,this._iv=t}static createEncryptor(e,t){return this.Encryptor.create(e,t)}static createDecryptor(e,t){return this.Decryptor.create(e,t)}}function xe(e,t,n){const r=e;let o;const i=this._iv;i?(o=i,this._iv=void 0):o=this._prevBlock;for(let a=0;a<n;a+=1)r[t+a]^=o[a]}class Ee extends we{}Ee.Encryptor=class extends Ee{processBlock(e,t){const n=this._cipher,{blockSize:r}=n;xe.call(this,e,t,r),n.encryptBlock(e,t),this._prevBlock=e.slice(t,t+r)}},Ee.Decryptor=class extends Ee{processBlock(e,t){const n=this._cipher,{blockSize:r}=n,o=e.slice(t,t+r);n.decryptBlock(e,t),xe.call(this,e,t,r),this._prevBlock=o}};const Se={pad(e,t){const n=4*t,r=n-e.sigBytes%n,o=r<<24|r<<16|r<<8|r,i=[];for(let s=0;s<r;s+=4)i.push(o);const a=Q.create(i,r);e.concat(a)},unpad(e){const t=e,n=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=n}};class ke extends ye{constructor(e,t,n){super(e,t,Object.assign({mode:Ee,padding:Se},n)),this.blockSize=4}reset(){let e;super.reset.call(this);const{cfg:t}=this,{iv:n,mode:r}=t;this._xformMode===this.constructor._ENC_XFORM_MODE?e=r.createEncryptor:(e=r.createDecryptor,this._minBufferSize=1),this._mode=e.call(r,this,n&&n.words),this._mode.__creator=e}_doProcessBlock(e,t){this._mode.processBlock(e,t)}_doFinalize(){let e;const{padding:t}=this.cfg;return this._xformMode===this.constructor._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e}}class Ce extends q{constructor(e){super(),this.mixIn(e)}toString(e){return(e||this.formatter).stringify(this)}}const Pe={stringify(e){let t;const{ciphertext:n,salt:r}=e;return t=r?Q.create([1398893684,1701076831]).concat(r).concat(n):n,t.toString(le)},parse(e){let t;const n=le.parse(e),r=n.words;return 1398893684===r[0]&&1701076831===r[1]&&(t=Q.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),Ce.create({ciphertext:n,salt:t})}};class _e extends q{static encrypt(e,t,n,r){const o=Object.assign(new q,this.cfg,r),i=e.createEncryptor(n,o),a=i.finalize(t),s=i.cfg;return Ce.create({ciphertext:a,key:n,iv:s.iv,algorithm:e,mode:s.mode,padding:s.padding,blockSize:i.blockSize,formatter:o.format})}static decrypt(e,t,n,r){let o=t;const i=Object.assign(new q,this.cfg,r);o=this._parse(o,i.format);return e.createDecryptor(n,i).finalize(o.ciphertext)}static _parse(e,t){return"string"==typeof e?t.parse(e,this):e}}_e.cfg=Object.assign(new q,{format:Pe});const Te={execute(e,t,n,r,o){let i,a=r;a||(a=Q.random(8)),i=o?ve.create({keySize:t+n,hasher:o}).compute(e,a):ve.create({keySize:t+n}).compute(e,a);const s=Q.create(i.words.slice(t),4*n);return i.sigBytes=4*t,Ce.create({key:i,iv:s,salt:a})}};class Re extends _e{static encrypt(e,t,n,r){const o=Object.assign(new q,this.cfg,r),i=o.kdf.execute(n,e.keySize,e.ivSize,o.salt,o.hasher);o.iv=i.iv;const a=_e.encrypt.call(this,e,t,i.key,o);return a.mixIn(i),a}static decrypt(e,t,n,r){let o=t;const i=Object.assign(new q,this.cfg,r);o=this._parse(o,i.format);const a=i.kdf.execute(n,e.keySize,e.ivSize,o.salt,i.hasher);i.iv=a.iv;return _e.decrypt.call(this,e,o,a.key,i)}}Re.cfg=Object.assign(_e.cfg,{kdf:Te});const De=e=>e<<8&4278255360|e>>>8&16711935,Ae={stringify(e){const{words:t,sigBytes:n}=e,r=[];for(let o=0;o<n;o+=2){const e=t[o>>>2]>>>16-o%4*8&65535;r.push(String.fromCharCode(e))}return r.join("")},parse(e){const t=e.length,n=[];for(let r=0;r<t;r+=1)n[r>>>1]|=e.charCodeAt(r)<<16-r%2*16;return Q.create(n,2*t)}},Me=Ae,Le={stringify(e){const{words:t,sigBytes:n}=e,r=[];for(let o=0;o<n;o+=2){const e=De(t[o>>>2]>>>16-o%4*8&65535);r.push(String.fromCharCode(e))}return r.join("")},parse(e){const t=e.length,n=[];for(let r=0;r<t;r+=1)n[r>>>1]|=De(e.charCodeAt(r)<<16-r%2*16);return Q.create(n,2*t)}},Oe={stringify(e,t=!0){const{words:n,sigBytes:r}=e,o=t?this._safeMap:this._map;e.clamp();const i=[];for(let s=0;s<r;s+=3){const e=(n[s>>>2]>>>24-s%4*8&255)<<16|(n[s+1>>>2]>>>24-(s+1)%4*8&255)<<8|n[s+2>>>2]>>>24-(s+2)%4*8&255;for(let t=0;t<4&&s+.75*t<r;t+=1)i.push(o.charAt(e>>>6*(3-t)&63))}const a=o.charAt(64);if(a)for(;i.length%4;)i.push(a);return i.join("")},parse(e,t=!0){let n=e.length;const r=t?this._safeMap:this._map;let o=this._reverseMap;if(!o){this._reverseMap=[],o=this._reverseMap;for(let e=0;e<r.length;e+=1)o[r.charCodeAt(e)]=e}const i=r.charAt(64);if(i){const t=e.indexOf(i);-1!==t&&(n=t)}return se(e,n,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safeMap:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"},Fe=[];class Ie extends ne{_doReset(){this._hash=new Q([1732584193,4023233417,2562383102,271733878,3285377520])}_doProcessBlock(e,t){const n=this._hash.words;let r=n[0],o=n[1],i=n[2],a=n[3],s=n[4];for(let l=0;l<80;l+=1){if(l<16)Fe[l]=0|e[t+l];else{const e=Fe[l-3]^Fe[l-8]^Fe[l-14]^Fe[l-16];Fe[l]=e<<1|e>>>31}let n=(r<<5|r>>>27)+s+Fe[l];n+=l<20?1518500249+(o&i|~o&a):l<40?1859775393+(o^i^a):l<60?(o&i|o&a|i&a)-1894007588:(o^i^a)-899497514,s=a,a=i,i=o<<30|o>>>2,o=r,r=n}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+i|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0}_doFinalize(){const e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash}clone(){const e=super.clone.call(this);return e._hash=this._hash.clone(),e}}const Ne=ne._createHelper(Ie),ze=ne._createHmacHelper(Ie),Be=[],Ve=[],je=e=>{const t=Math.sqrt(e);for(let n=2;n<=t;n+=1)if(!(e%n))return!1;return!0},He=e=>4294967296*(e-(0|e))|0;let Ue=2,We=0;for(;We<64;)je(Ue)&&(We<8&&(Be[We]=He(Ue**.5)),Ve[We]=He(Ue**(1/3)),We+=1),Ue+=1;const $e=[];class Ke extends ne{_doReset(){this._hash=new Q(Be.slice(0))}_doProcessBlock(e,t){const n=this._hash.words;let r=n[0],o=n[1],i=n[2],a=n[3],s=n[4],l=n[5],u=n[6],c=n[7];for(let d=0;d<64;d+=1){if(d<16)$e[d]=0|e[t+d];else{const e=$e[d-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,n=$e[d-2],r=(n<<15|n>>>17)^(n<<13|n>>>19)^n>>>10;$e[d]=t+$e[d-7]+r+$e[d-16]}const n=r&o^r&i^o&i,f=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),p=c+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&l^~s&u)+Ve[d]+$e[d];c=u,u=l,l=s,s=a+p|0,a=i,i=o,o=r,r=p+(f+n)|0}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+i|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+l|0,n[6]=n[6]+u|0,n[7]=n[7]+c|0}_doFinalize(){const e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash}clone(){const e=super.clone.call(this);return e._hash=this._hash.clone(),e}}const Xe=ne._createHelper(Ke),Ye=ne._createHmacHelper(Ke);class qe extends Ke{_doReset(){this._hash=new Q([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])}_doFinalize(){const e=super._doFinalize.call(this);return e.sigBytes-=4,e}}const Qe=Ke._createHelper(qe),Ge=Ke._createHmacHelper(qe),Ze=[new ie(1116352408,3609767458),new ie(1899447441,602891725),new ie(3049323471,3964484399),new ie(3921009573,2173295548),new ie(961987163,4081628472),new ie(1508970993,3053834265),new ie(2453635748,2937671579),new ie(2870763221,3664609560),new ie(3624381080,2734883394),new ie(310598401,1164996542),new ie(607225278,1323610764),new ie(1426881987,3590304994),new ie(1925078388,4068182383),new ie(2162078206,991336113),new ie(2614888103,633803317),new ie(3248222580,3479774868),new ie(3835390401,2666613458),new ie(4022224774,944711139),new ie(264347078,2341262773),new ie(604807628,2007800933),new ie(770255983,1495990901),new ie(1249150122,1856431235),new ie(1555081692,3175218132),new ie(1996064986,2198950837),new ie(2554220882,3999719339),new ie(2821834349,766784016),new ie(2952996808,2566594879),new ie(3210313671,3203337956),new ie(3336571891,1034457026),new ie(3584528711,2466948901),new ie(113926993,3758326383),new ie(338241895,168717936),new ie(666307205,1188179964),new ie(773529912,1546045734),new ie(1294757372,1522805485),new ie(1396182291,2643833823),new ie(1695183700,2343527390),new ie(1986661051,1014477480),new ie(2177026350,1206759142),new ie(2456956037,344077627),new ie(2730485921,1290863460),new ie(2820302411,3158454273),new ie(3259730800,3505952657),new ie(3345764771,106217008),new ie(3516065817,3606008344),new ie(3600352804,1432725776),new ie(4094571909,1467031594),new ie(275423344,851169720),new ie(430227734,3100823752),new ie(506948616,1363258195),new ie(659060556,3750685593),new ie(883997877,3785050280),new ie(958139571,3318307427),new ie(1322822218,3812723403),new ie(1537002063,2003034995),new ie(1747873779,3602036899),new ie(1955562222,1575990012),new ie(2024104815,1125592928),new ie(2227730452,2716904306),new ie(2361852424,442776044),new ie(2428436474,593698344),new ie(2756734187,3733110249),new ie(3204031479,2999351573),new ie(3329325298,3815920427),new ie(3391569614,3928383900),new ie(3515267271,566280711),new ie(3940187606,3454069534),new ie(4118630271,4000239992),new ie(116418474,1914138554),new ie(174292421,2731055270),new ie(289380356,3203993006),new ie(460393269,320620315),new ie(685471733,587496836),new ie(852142971,1086792851),new ie(1017036298,365543100),new ie(1126000580,2618297676),new ie(1288033470,3409855158),new ie(1501505948,4234509866),new ie(1607167915,987167468),new ie(1816402316,1246189591)],Je=[];for(let RO=0;RO<80;RO+=1)Je[RO]=new ie;class et extends ne{constructor(){super(),this.blockSize=32}_doReset(){this._hash=new ae([new ie(1779033703,4089235720),new ie(3144134277,2227873595),new ie(1013904242,4271175723),new ie(2773480762,1595750129),new ie(1359893119,2917565137),new ie(2600822924,725511199),new ie(528734635,4215389547),new ie(1541459225,327033209)])}_doProcessBlock(e,t){const n=this._hash.words,r=n[0],o=n[1],i=n[2],a=n[3],s=n[4],l=n[5],u=n[6],c=n[7],d=r.high;let f=r.low;const p=o.high;let h=o.low;const m=i.high;let g=i.low;const v=a.high;let y=a.low;const b=s.high;let w=s.low;const x=l.high;let E=l.low;const S=u.high;let k=u.low;const C=c.high;let P=c.low,_=d,T=f,R=p,D=h,A=m,M=g,L=v,O=y,F=b,I=w,N=x,z=E,B=S,V=k,j=C,H=P;for(let U=0;U<80;U+=1){let n,r;const o=Je[U];if(U<16)o.high=0|e[t+2*U],r=o.high,o.low=0|e[t+2*U+1],n=o.low;else{const e=Je[U-15],t=e.high,i=e.low,a=(t>>>1|i<<31)^(t>>>8|i<<24)^t>>>7,s=(i>>>1|t<<31)^(i>>>8|t<<24)^(i>>>7|t<<25),l=Je[U-2],u=l.high,c=l.low,d=(u>>>19|c<<13)^(u<<3|c>>>29)^u>>>6,f=(c>>>19|u<<13)^(c<<3|u>>>29)^(c>>>6|u<<26),p=Je[U-7],h=p.high,m=p.low,g=Je[U-16],v=g.high,y=g.low;n=s+m,r=a+h+(n>>>0<s>>>0?1:0),n+=f,r=r+d+(n>>>0<f>>>0?1:0),n+=y,r=r+v+(n>>>0<y>>>0?1:0),o.high=r,o.low=n}const i=F&N^~F&B,a=I&z^~I&V,s=_&R^_&A^R&A,l=T&D^T&M^D&M,u=(_>>>28|T<<4)^(_<<30|T>>>2)^(_<<25|T>>>7),c=(T>>>28|_<<4)^(T<<30|_>>>2)^(T<<25|_>>>7),d=(F>>>14|I<<18)^(F>>>18|I<<14)^(F<<23|I>>>9),f=(I>>>14|F<<18)^(I>>>18|F<<14)^(I<<23|F>>>9),p=Ze[U],h=p.high,m=p.low;let g=H+f,v=j+d+(g>>>0<H>>>0?1:0);g+=a,v=v+i+(g>>>0<a>>>0?1:0),g+=m,v=v+h+(g>>>0<m>>>0?1:0),g+=n,v=v+r+(g>>>0<n>>>0?1:0);const y=c+l;j=B,H=V,B=N,V=z,N=F,z=I,I=O+g|0,F=L+v+(I>>>0<O>>>0?1:0)|0,L=A,O=M,A=R,M=D,R=_,D=T,T=g+y|0,_=v+(u+s+(y>>>0<c>>>0?1:0))+(T>>>0<g>>>0?1:0)|0}r.low=f+T,f=r.low,r.high=d+_+(f>>>0<T>>>0?1:0),o.low=h+D,h=o.low,o.high=p+R+(h>>>0<D>>>0?1:0),i.low=g+M,g=i.low,i.high=m+A+(g>>>0<M>>>0?1:0),a.low=y+O,y=a.low,a.high=v+L+(y>>>0<O>>>0?1:0),s.low=w+I,w=s.low,s.high=b+F+(w>>>0<I>>>0?1:0),l.low=E+z,E=l.low,l.high=x+N+(E>>>0<z>>>0?1:0),u.low=k+V,k=u.low,u.high=S+B+(k>>>0<V>>>0?1:0),c.low=P+H,P=c.low,c.high=C+j+(P>>>0<H>>>0?1:0)}_doFinalize(){const e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(r+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process();return this._hash.toX32()}clone(){const e=super.clone.call(this);return e._hash=this._hash.clone(),e}}const tt=ne._createHelper(et),nt=ne._createHmacHelper(et);class rt extends et{_doReset(){this._hash=new ae([new ie(3418070365,3238371032),new ie(1654270250,914150663),new ie(2438529370,812702999),new ie(355462360,4144912697),new ie(1731405415,4290775857),new ie(2394180231,1750603025),new ie(3675008525,1694076839),new ie(1203062813,3204075428)])}_doFinalize(){const e=super._doFinalize.call(this);return e.sigBytes-=16,e}}const ot=et._createHelper(rt),it=et._createHmacHelper(rt),at=[],st=[],lt=[];let ut=1,ct=0;for(let RO=0;RO<24;RO+=1){at[ut+5*ct]=(RO+1)*(RO+2)/2%64;const e=(2*ut+3*ct)%5;ut=ct%5,ct=e}for(let RO=0;RO<5;RO+=1)for(let e=0;e<5;e+=1)st[RO+5*e]=e+(2*RO+3*e)%5*5;let dt=1;for(let RO=0;RO<24;RO+=1){let e=0,t=0;for(let n=0;n<7;n+=1){if(1&dt){const r=(1<<n)-1;r<32?t^=1<<r:e^=1<<r-32}128&dt?dt=dt<<1^113:dt<<=1}lt[RO]=ie.create(e,t)}const ft=[];for(let RO=0;RO<25;RO+=1)ft[RO]=ie.create();class pt extends ne{constructor(e){super(Object.assign({outputLength:512},e))}_doReset(){this._state=[];const e=this._state;for(let t=0;t<25;t+=1)e[t]=new ie;this.blockSize=(1600-2*this.cfg.outputLength)/32}_doProcessBlock(e,t){const n=this._state,r=this.blockSize/2;for(let o=0;o<r;o+=1){let r=e[t+2*o],i=e[t+2*o+1];r=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),i=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8);const a=n[o];a.high^=i,a.low^=r}for(let o=0;o<24;o+=1){for(let o=0;o<5;o+=1){let e=0,t=0;for(let i=0;i<5;i+=1){const r=n[o+5*i];e^=r.high,t^=r.low}const r=ft[o];r.high=e,r.low=t}for(let o=0;o<5;o+=1){const e=ft[(o+4)%5],t=ft[(o+1)%5],r=t.high,i=t.low,a=e.high^(r<<1|i>>>31),s=e.low^(i<<1|r>>>31);for(let l=0;l<5;l+=1){const e=n[o+5*l];e.high^=a,e.low^=s}}for(let o=1;o<25;o+=1){let e,t;const r=n[o],i=r.high,a=r.low,s=at[o];s<32?(e=i<<s|a>>>32-s,t=a<<s|i>>>32-s):(e=a<<s-32|i>>>64-s,t=i<<s-32|a>>>64-s);const l=ft[st[o]];l.high=e,l.low=t}const e=ft[0],t=n[0];e.high=t.high,e.low=t.low;for(let o=0;o<5;o+=1)for(let e=0;e<5;e+=1){const t=o+5*e,r=n[t],i=ft[t],a=ft[(o+1)%5+5*e],s=ft[(o+2)%5+5*e];r.high=i.high^~a.high&s.high,r.low=i.low^~a.low&s.low}const r=n[0],i=lt[o];r.high^=i.high,r.low^=i.low}}_doFinalize(){const e=this._data,t=e.words,n=8*e.sigBytes,r=32*this.blockSize;t[n>>>5]|=1<<24-n%32,t[(Math.ceil((n+1)/r)*r>>>5)-1]|=128,e.sigBytes=4*t.length,this._process();const o=this._state,i=this.cfg.outputLength/8,a=i/8,s=[];for(let l=0;l<a;l+=1){const e=o[l];let t=e.high,n=e.low;t=16711935&(t<<8|t>>>24)|4278255360&(t<<24|t>>>8),n=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),s.push(n),s.push(t)}return new Q(s,i)}clone(){const e=super.clone.call(this);e._state=this._state.slice(0);const t=e._state;for(let n=0;n<25;n+=1)t[n]=t[n].clone();return e}}const ht=ne._createHelper(pt),mt=ne._createHmacHelper(pt),gt=Q.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),vt=Q.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),yt=Q.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),bt=Q.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),wt=Q.create([0,1518500249,1859775393,2400959708,2840853838]),xt=Q.create([1352829926,1548603684,1836072691,2053994217,0]),Et=(e,t,n)=>e^t^n,St=(e,t,n)=>e&t|~e&n,kt=(e,t,n)=>(e|~t)^n,Ct=(e,t,n)=>e&n|t&~n,Pt=(e,t,n)=>e^(t|~n),_t=(e,t)=>e<<t|e>>>32-t;class Tt extends ne{_doReset(){this._hash=Q.create([1732584193,4023233417,2562383102,271733878,3285377520])}_doProcessBlock(e,t){const n=e;for(let x=0;x<16;x+=1){const e=t+x,r=n[e];n[e]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}const r=this._hash.words,o=wt.words,i=xt.words,a=gt.words,s=vt.words,l=yt.words,u=bt.words;let c,d=r[0],f=r[1],p=r[2],h=r[3],m=r[4],g=r[0],v=r[1],y=r[2],b=r[3],w=r[4];for(let x=0;x<80;x+=1)c=d+n[t+a[x]]|0,c+=x<16?Et(f,p,h)+o[0]:x<32?St(f,p,h)+o[1]:x<48?kt(f,p,h)+o[2]:x<64?Ct(f,p,h)+o[3]:Pt(f,p,h)+o[4],c|=0,c=_t(c,l[x]),c=c+m|0,d=m,m=h,h=_t(p,10),p=f,f=c,c=g+n[t+s[x]]|0,c+=x<16?Pt(v,y,b)+i[0]:x<32?Ct(v,y,b)+i[1]:x<48?kt(v,y,b)+i[2]:x<64?St(v,y,b)+i[3]:Et(v,y,b)+i[4],c|=0,c=_t(c,u[x]),c=c+w|0,g=w,w=b,b=_t(y,10),y=v,v=c;c=r[1]+p+b|0,r[1]=r[2]+h+w|0,r[2]=r[3]+m+g|0,r[3]=r[4]+d+v|0,r[4]=r[0]+f+y|0,r[0]=c}_doFinalize(){const e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process();const o=this._hash,i=o.words;for(let a=0;a<5;a+=1){const e=i[a];i[a]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8)}return o}clone(){const e=super.clone.call(this);return e._hash=this._hash.clone(),e}}const Rt=ne._createHelper(Tt),Dt=ne._createHmacHelper(Tt);class At extends q{constructor(e){super(),this.cfg=Object.assign(new q,{keySize:4,hasher:Ie,iterations:1},e)}compute(e,t){const{cfg:n}=this,r=re.create(n.hasher,e),o=Q.create(),i=Q.create([1]),a=o.words,s=i.words,{keySize:l,iterations:u}=n;for(;a.length<l;){const e=r.update(t).finalize(i);r.reset();const n=e.words,a=n.length;let l=e;for(let t=1;t<u;t+=1){l=r.finalize(l),r.reset();const e=l.words;for(let t=0;t<a;t+=1)n[t]^=e[t]}o.concat(e),s[0]+=1}return o.sigBytes=4*l,o}}const Mt=[],Lt=[],Ot=[],Ft=[],It=[],Nt=[],zt=[],Bt=[],Vt=[],jt=[],Ht=[];for(let RO=0;RO<256;RO+=1)Ht[RO]=RO<128?RO<<1:RO<<1^283;let Ut=0,Wt=0;for(let RO=0;RO<256;RO+=1){let e=Wt^Wt<<1^Wt<<2^Wt<<3^Wt<<4;e=e>>>8^255&e^99,Mt[Ut]=e,Lt[e]=Ut;const t=Ht[Ut],n=Ht[t],r=Ht[n];let o=257*Ht[e]^16843008*e;Ot[Ut]=o<<24|o>>>8,Ft[Ut]=o<<16|o>>>16,It[Ut]=o<<8|o>>>24,Nt[Ut]=o,o=16843009*r^65537*n^257*t^16843008*Ut,zt[e]=o<<24|o>>>8,Bt[e]=o<<16|o>>>16,Vt[e]=o<<8|o>>>24,jt[e]=o,Ut?(Ut=t^Ht[Ht[Ht[r^t]]],Wt^=Ht[Ht[Wt]]):(Wt=1,Ut=Wt)}const $t=[0,1,2,4,8,16,32,64,128,27,54];class Kt extends ke{_doReset(){let e;if(this._nRounds&&this._keyPriorReset===this._key)return;this._keyPriorReset=this._key;const t=this._keyPriorReset,n=t.words,r=t.sigBytes/4;this._nRounds=r+6;const o=4*(this._nRounds+1);this._keySchedule=[];const i=this._keySchedule;for(let s=0;s<o;s+=1)s<r?i[s]=n[s]:(e=i[s-1],s%r?r>6&&s%r==4&&(e=Mt[e>>>24]<<24|Mt[e>>>16&255]<<16|Mt[e>>>8&255]<<8|Mt[255&e]):(e=e<<8|e>>>24,e=Mt[e>>>24]<<24|Mt[e>>>16&255]<<16|Mt[e>>>8&255]<<8|Mt[255&e],e^=$t[s/r|0]<<24),i[s]=i[s-r]^e);this._invKeySchedule=[];const a=this._invKeySchedule;for(let s=0;s<o;s+=1){const t=o-s;e=s%4?i[t]:i[t-4],a[s]=s<4||t<=4?e:zt[Mt[e>>>24]]^Bt[Mt[e>>>16&255]]^Vt[Mt[e>>>8&255]]^jt[Mt[255&e]]}}encryptBlock(e,t){this._doCryptBlock(e,t,this._keySchedule,Ot,Ft,It,Nt,Mt)}decryptBlock(e,t){const n=e;let r=n[t+1];n[t+1]=n[t+3],n[t+3]=r,this._doCryptBlock(n,t,this._invKeySchedule,zt,Bt,Vt,jt,Lt),r=n[t+1],n[t+1]=n[t+3],n[t+3]=r}_doCryptBlock(e,t,n,r,o,i,a,s){const l=e,u=this._nRounds;let c=l[t]^n[0],d=l[t+1]^n[1],f=l[t+2]^n[2],p=l[t+3]^n[3],h=4;for(let b=1;b<u;b+=1){const e=r[c>>>24]^o[d>>>16&255]^i[f>>>8&255]^a[255&p]^n[h];h+=1;const t=r[d>>>24]^o[f>>>16&255]^i[p>>>8&255]^a[255&c]^n[h];h+=1;const s=r[f>>>24]^o[p>>>16&255]^i[c>>>8&255]^a[255&d]^n[h];h+=1;const l=r[p>>>24]^o[c>>>16&255]^i[d>>>8&255]^a[255&f]^n[h];h+=1,c=e,d=t,f=s,p=l}const m=(s[c>>>24]<<24|s[d>>>16&255]<<16|s[f>>>8&255]<<8|s[255&p])^n[h];h+=1;const g=(s[d>>>24]<<24|s[f>>>16&255]<<16|s[p>>>8&255]<<8|s[255&c])^n[h];h+=1;const v=(s[f>>>24]<<24|s[p>>>16&255]<<16|s[c>>>8&255]<<8|s[255&d])^n[h];h+=1;const y=(s[p>>>24]<<24|s[c>>>16&255]<<16|s[d>>>8&255]<<8|s[255&f])^n[h];h+=1,l[t]=m,l[t+1]=g,l[t+2]=v,l[t+3]=y}}Kt.keySize=8;const Xt=ke._createHelper(Kt),Yt=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],qt=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],Qt=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],Gt=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],Zt=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679];function Jt(e,t){const n=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=n,this._lBlock^=n<<e}function en(e,t){const n=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=n,this._rBlock^=n<<e}class tn extends ke{constructor(e,t,n){super(e,t,n),this.blockSize=2}_doReset(){const e=this._key.words,t=[];for(let o=0;o<56;o+=1){const n=Yt[o]-1;t[o]=e[n>>>5]>>>31-n%32&1}this._subKeys=[];const n=this._subKeys;for(let o=0;o<16;o+=1){n[o]=[];const e=n[o],r=Qt[o];for(let n=0;n<24;n+=1)e[n/6|0]|=t[(qt[n]-1+r)%28]<<31-n%6,e[4+(n/6|0)]|=t[28+(qt[n+24]-1+r)%28]<<31-n%6;e[0]=e[0]<<1|e[0]>>>31;for(let t=1;t<7;t+=1)e[t]>>>=4*(t-1)+3;e[7]=e[7]<<5|e[7]>>>27}this._invSubKeys=[];const r=this._invSubKeys;for(let o=0;o<16;o+=1)r[o]=n[15-o]}encryptBlock(e,t){this._doCryptBlock(e,t,this._subKeys)}decryptBlock(e,t){this._doCryptBlock(e,t,this._invSubKeys)}_doCryptBlock(e,t,n){const r=e;this._lBlock=e[t],this._rBlock=e[t+1],Jt.call(this,4,252645135),Jt.call(this,16,65535),en.call(this,2,858993459),en.call(this,8,16711935),Jt.call(this,1,1431655765);for(let i=0;i<16;i+=1){const e=n[i],t=this._lBlock,r=this._rBlock;let o=0;for(let n=0;n<8;n+=1)o|=Gt[n][((r^e[n])&Zt[n])>>>0];this._lBlock=r,this._rBlock=t^o}const o=this._lBlock;this._lBlock=this._rBlock,this._rBlock=o,Jt.call(this,1,1431655765),en.call(this,8,16711935),en.call(this,2,858993459),Jt.call(this,16,65535),Jt.call(this,4,252645135),r[t]=this._lBlock,r[t+1]=this._rBlock}}tn.keySize=2,tn.ivSize=2;const nn=ke._createHelper(tn);class rn extends ke{_doReset(){const e=this._key.words;if(2!==e.length&&4!==e.length&&e.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");const t=e.slice(0,2),n=e.length<4?e.slice(0,2):e.slice(2,4),r=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=tn.createEncryptor(Q.create(t)),this._des2=tn.createEncryptor(Q.create(n)),this._des3=tn.createEncryptor(Q.create(r))}encryptBlock(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)}decryptBlock(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)}}rn.keySize=6,rn.ivSize=2;const on=ke._createHelper(rn),an=[],sn=[],ln=[];function un(){const e=this._X,t=this._C;for(let n=0;n<8;n+=1)sn[n]=t[n];t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<sn[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<sn[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<sn[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<sn[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<sn[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<sn[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<sn[6]>>>0?1:0)|0,this._b=t[7]>>>0<sn[7]>>>0?1:0;for(let n=0;n<8;n+=1){const r=e[n]+t[n],o=65535&r,i=r>>>16,a=((o*o>>>17)+o*i>>>15)+i*i,s=((4294901760&r)*r|0)+((65535&r)*r|0);ln[n]=a^s}e[0]=ln[0]+(ln[7]<<16|ln[7]>>>16)+(ln[6]<<16|ln[6]>>>16)|0,e[1]=ln[1]+(ln[0]<<8|ln[0]>>>24)+ln[7]|0,e[2]=ln[2]+(ln[1]<<16|ln[1]>>>16)+(ln[0]<<16|ln[0]>>>16)|0,e[3]=ln[3]+(ln[2]<<8|ln[2]>>>24)+ln[1]|0,e[4]=ln[4]+(ln[3]<<16|ln[3]>>>16)+(ln[2]<<16|ln[2]>>>16)|0,e[5]=ln[5]+(ln[4]<<8|ln[4]>>>24)+ln[3]|0,e[6]=ln[6]+(ln[5]<<16|ln[5]>>>16)+(ln[4]<<16|ln[4]>>>16)|0,e[7]=ln[7]+(ln[6]<<8|ln[6]>>>24)+ln[5]|0}class cn extends be{constructor(...e){super(...e),this.blockSize=4,this.ivSize=2}_doReset(){const e=this._key.words,{iv:t}=this.cfg;for(let o=0;o<4;o+=1)e[o]=16711935&(e[o]<<8|e[o]>>>24)|4278255360&(e[o]<<24|e[o]>>>8);this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16];const n=this._X;this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];const r=this._C;this._b=0;for(let o=0;o<4;o+=1)un.call(this);for(let o=0;o<8;o+=1)r[o]^=n[o+4&7];if(t){const e=t.words,n=e[0],o=e[1],i=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),a=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),s=i>>>16|4294901760&a,l=a<<16|65535&i;r[0]^=i,r[1]^=s,r[2]^=a,r[3]^=l,r[4]^=i,r[5]^=s,r[6]^=a,r[7]^=l;for(let t=0;t<4;t+=1)un.call(this)}}_doProcessBlock(e,t){const n=e,r=this._X;un.call(this),an[0]=r[0]^r[5]>>>16^r[3]<<16,an[1]=r[2]^r[7]>>>16^r[5]<<16,an[2]=r[4]^r[1]>>>16^r[7]<<16,an[3]=r[6]^r[3]>>>16^r[1]<<16;for(let o=0;o<4;o+=1)an[o]=16711935&(an[o]<<8|an[o]>>>24)|4278255360&(an[o]<<24|an[o]>>>8),n[t+o]^=an[o]}}const dn=be._createHelper(cn),fn=[],pn=[],hn=[];function mn(){const e=this._X,t=this._C;for(let n=0;n<8;n+=1)pn[n]=t[n];t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<pn[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<pn[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<pn[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<pn[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<pn[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<pn[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<pn[6]>>>0?1:0)|0,this._b=t[7]>>>0<pn[7]>>>0?1:0;for(let n=0;n<8;n+=1){const r=e[n]+t[n],o=65535&r,i=r>>>16,a=((o*o>>>17)+o*i>>>15)+i*i,s=((4294901760&r)*r|0)+((65535&r)*r|0);hn[n]=a^s}e[0]=hn[0]+(hn[7]<<16|hn[7]>>>16)+(hn[6]<<16|hn[6]>>>16)|0,e[1]=hn[1]+(hn[0]<<8|hn[0]>>>24)+hn[7]|0,e[2]=hn[2]+(hn[1]<<16|hn[1]>>>16)+(hn[0]<<16|hn[0]>>>16)|0,e[3]=hn[3]+(hn[2]<<8|hn[2]>>>24)+hn[1]|0,e[4]=hn[4]+(hn[3]<<16|hn[3]>>>16)+(hn[2]<<16|hn[2]>>>16)|0,e[5]=hn[5]+(hn[4]<<8|hn[4]>>>24)+hn[3]|0,e[6]=hn[6]+(hn[5]<<16|hn[5]>>>16)+(hn[4]<<16|hn[4]>>>16)|0,e[7]=hn[7]+(hn[6]<<8|hn[6]>>>24)+hn[5]|0}class gn extends be{constructor(...e){super(...e),this.blockSize=4,this.ivSize=2}_doReset(){const e=this._key.words,{iv:t}=this.cfg;this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16];const n=this._X;this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];const r=this._C;this._b=0;for(let o=0;o<4;o+=1)mn.call(this);for(let o=0;o<8;o+=1)r[o]^=n[o+4&7];if(t){const e=t.words,n=e[0],o=e[1],i=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),a=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),s=i>>>16|4294901760&a,l=a<<16|65535&i;r[0]^=i,r[1]^=s,r[2]^=a,r[3]^=l,r[4]^=i,r[5]^=s,r[6]^=a,r[7]^=l;for(let t=0;t<4;t+=1)mn.call(this)}}_doProcessBlock(e,t){const n=e,r=this._X;mn.call(this),fn[0]=r[0]^r[5]>>>16^r[3]<<16,fn[1]=r[2]^r[7]>>>16^r[5]<<16,fn[2]=r[4]^r[1]>>>16^r[7]<<16,fn[3]=r[6]^r[3]>>>16^r[1]<<16;for(let o=0;o<4;o+=1)fn[o]=16711935&(fn[o]<<8|fn[o]>>>24)|4278255360&(fn[o]<<24|fn[o]>>>8),n[t+o]^=fn[o]}}const vn=be._createHelper(gn);function yn(){const e=this._S;let t=this._i,n=this._j,r=0;for(let o=0;o<4;o+=1){t=(t+1)%256,n=(n+e[t])%256;const i=e[t];e[t]=e[n],e[n]=i,r|=e[(e[t]+e[n])%256]<<24-8*o}return this._i=t,this._j=n,r}class bn extends be{_doReset(){const e=this._key,t=e.words,n=e.sigBytes;this._S=[];const r=this._S;for(let o=0;o<256;o+=1)r[o]=o;for(let o=0,i=0;o<256;o+=1){const e=o%n,a=t[e>>>2]>>>24-e%4*8&255;i=(i+r[o]+a)%256;const s=r[o];r[o]=r[i],r[i]=s}this._j=0,this._i=this._j}_doProcessBlock(e,t){e[t]^=yn.call(this)}}bn.keySize=8,bn.ivSize=0;const wn=be._createHelper(bn);class xn extends bn{constructor(...e){super(...e),Object.assign(this.cfg,{drop:192})}_doReset(){super._doReset.call(this);for(let e=this.cfg.drop;e>0;e-=1)yn.call(this)}}const En=be._createHelper(xn),Sn=16,kn=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],Cn=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]],Pn={pbox:[],sbox:[]};function _n(e,t){const n=t>>24&255,r=t>>16&255,o=t>>8&255,i=255&t;let a=e.sbox[0][n]+e.sbox[1][r];return a^=e.sbox[2][o],a+=e.sbox[3][i],a}function Tn(e,t,n){let r,o=t,i=n;for(let a=0;a<Sn;++a)o^=e.pbox[a],i=_n(e,o)^i,r=o,o=i,i=r;return r=o,o=i,i=r,i^=e.pbox[Sn],o^=e.pbox[Sn+1],{left:o,right:i}}class Rn extends ke{constructor(e,t,n){super(e,t,n),this.blockSize=2}_doReset(){if(this._keyPriorReset===this._key)return;const e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4;!function(e,t,n){for(let s=0;s<4;s++){e.sbox[s]=[];for(let t=0;t<256;t++)e.sbox[s][t]=Cn[s][t]}let r=0;for(let s=0;s<Sn+2;s++)e.pbox[s]=kn[s]^t[r],r++,r>=n&&(r=0);let o=0,i=0,a=0;for(let s=0;s<Sn+2;s+=2)a=Tn(e,o,i),o=a.left,i=a.right,e.pbox[s]=o,e.pbox[s+1]=i;for(let s=0;s<4;s++)for(let t=0;t<256;t+=2)a=Tn(e,o,i),o=a.left,i=a.right,e.sbox[s][t]=o,e.sbox[s][t+1]=i}(Pn,t,n)}encryptBlock(e,t){const n=Tn(Pn,e[t],e[t+1]);e[t]=n.left,e[t+1]=n.right}decryptBlock(e,t){const n=function(e,t,n){let r,o=t,i=n;for(let a=Sn+1;a>1;--a)o^=e.pbox[a],i=_n(e,o)^i,r=o,o=i,i=r;return r=o,o=i,i=r,i^=e.pbox[1],o^=e.pbox[0],{left:o,right:i}}(Pn,e[t],e[t+1]);e[t]=n.left,e[t+1]=n.right}}Rn.keySize=4,Rn.ivSize=2;const Dn=ke._createHelper(Rn);function An(e,t,n,r){const o=e;let i;const a=this._iv;a?(i=a.slice(0),this._iv=void 0):i=this._prevBlock,r.encryptBlock(i,0);for(let s=0;s<n;s+=1)o[t+s]^=i[s]}class Mn extends we{}Mn.Encryptor=class extends Mn{processBlock(e,t){const n=this._cipher,{blockSize:r}=n;An.call(this,e,t,r,n),this._prevBlock=e.slice(t,t+r)}},Mn.Decryptor=class extends Mn{processBlock(e,t){const n=this._cipher,{blockSize:r}=n,o=e.slice(t,t+r);An.call(this,e,t,r,n),this._prevBlock=o}};class Ln extends we{}Ln.Encryptor=class extends Ln{processBlock(e,t){const n=e,r=this._cipher,{blockSize:o}=r,i=this._iv;let a=this._counter;i&&(this._counter=i.slice(0),a=this._counter,this._iv=void 0);const s=a.slice(0);r.encryptBlock(s,0),a[o-1]=a[o-1]+1|0;for(let l=0;l<o;l+=1)n[t+l]^=s[l]}},Ln.Decryptor=Ln.Encryptor;const On=e=>{let t=e;if(255==(e>>24&255)){let n=e>>16&255,r=e>>8&255,o=255&e;255===n?(n=0,255===r?(r=0,255===o?o=0:o+=1):r+=1):n+=1,t=0,t+=n<<16,t+=r<<8,t+=o}else t+=1<<24;return t};class Fn extends we{}Fn.Encryptor=class extends Fn{processBlock(e,t){const n=e,r=this._cipher,{blockSize:o}=r,i=this._iv;let a=this._counter;i&&(this._counter=i.slice(0),a=this._counter,this._iv=void 0),(e=>{const t=e;t[0]=On(t[0]),0===t[0]&&(t[1]=On(t[1]))})(a);const s=a.slice(0);r.encryptBlock(s,0);for(let l=0;l<o;l+=1)n[t+l]^=s[l]}},Fn.Decryptor=Fn.Encryptor;class In extends we{}In.Encryptor=class extends In{processBlock(e,t){this._cipher.encryptBlock(e,t)}},In.Decryptor=class extends In{processBlock(e,t){this._cipher.decryptBlock(e,t)}};class Nn extends we{}Nn.Encryptor=class extends Nn{processBlock(e,t){const n=e,r=this._cipher,{blockSize:o}=r,i=this._iv;let a=this._keystream;i&&(this._keystream=i.slice(0),a=this._keystream,this._iv=void 0),r.encryptBlock(a,0);for(let s=0;s<o;s+=1)n[t+s]^=a[s]}},Nn.Decryptor=Nn.Encryptor;const zn={pad(e,t){const n=4*t,r=n-e.sigBytes%n;e.concat(Q.random(r-1)).concat(Q.create([r<<24],1))},unpad(e){const t=e,n=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=n}},Bn={pad(e,t){const n=e,r=4*t;n.clamp(),n.sigBytes+=r-(e.sigBytes%r||r)},unpad(e){const t=e,n=t.words;for(let r=t.sigBytes-1;r>=0;r-=1)if(n[r>>>2]>>>24-r%4*8&255){t.sigBytes=r+1;break}}},Vn={pad(e,t){e.concat(Q.create([2147483648],1)),Bn.pad(e,t)},unpad(e){const t=e;Bn.unpad(t),t.sigBytes-=1}},jn={stringify:e=>e.ciphertext.toString(Z),parse(e){const t=Z.parse(e);return Ce.create({ciphertext:t})}},Hn={lib:{Base:q,WordArray:Q,BufferedBlockAlgorithm:te,Hasher:ne,Cipher:ye,StreamCipher:be,BlockCipherMode:we,BlockCipher:ke,CipherParams:Ce,SerializableCipher:_e,PasswordBasedCipher:Re},x64:{Word:ie,WordArray:ae},enc:{Hex:Z,Latin1:J,Utf8:ee,Utf16:Me,Utf16BE:Ae,Utf16LE:Le,Base64:le,Base64url:Oe},algo:{HMAC:re,MD5:he,SHA1:Ie,SHA224:qe,SHA256:Ke,SHA384:rt,SHA512:et,SHA3:pt,RIPEMD160:Tt,PBKDF2:At,EvpKDF:ve,AES:Kt,DES:tn,TripleDES:rn,Rabbit:cn,RabbitLegacy:gn,RC4:bn,RC4Drop:xn,Blowfish:Rn},mode:{CBC:Ee,CFB:Mn,CTR:Ln,CTRGladman:Fn,ECB:In,OFB:Nn},pad:{Pkcs7:Se,AnsiX923:{pad(e,t){const n=e,r=n.sigBytes,o=4*t,i=o-r%o,a=r+i-1;n.clamp(),n.words[a>>>2]|=i<<24-a%4*8,n.sigBytes+=i},unpad(e){const t=e,n=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=n}},Iso10126:zn,Iso97971:Vn,NoPadding:{pad(){},unpad(){}},ZeroPadding:Bn},format:{OpenSSL:Pe,Hex:jn},kdf:{OpenSSL:Te},MD5:me,HmacMD5:ge,SHA1:Ne,HmacSHA1:ze,SHA224:Qe,HmacSHA224:Ge,SHA256:Xe,HmacSHA256:Ye,SHA384:ot,HmacSHA384:it,SHA512:tt,HmacSHA512:nt,SHA3:ht,HmacSHA3:mt,RIPEMD160:Rt,HmacRIPEMD160:Dt,PBKDF2:(e,t,n)=>At.create(n).compute(e,t),EvpKDF:(e,t,n)=>ve.create(n).compute(e,t),AES:Xt,DES:nn,TripleDES:on,Rabbit:dn,RabbitLegacy:vn,RC4:wn,RC4Drop:En,Blowfish:Dn};var Un={exports:{}},Wn={},$n=W,Kn=Symbol.for("react.element"),Xn=Symbol.for("react.fragment"),Yn=Object.prototype.hasOwnProperty,qn=$n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Qn={key:!0,ref:!0,__self:!0,__source:!0};function Gn(e,t,n){var r,o={},i=null,a=null;for(r in void 0!==n&&(i=""+n),void 0!==t.key&&(i=""+t.key),void 0!==t.ref&&(a=t.ref),t)Yn.call(t,r)&&!Qn.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:Kn,type:e,key:i,ref:a,props:o,_owner:qn.current}}Wn.Fragment=Xn,Wn.jsx=Gn,Wn.jsxs=Gn,Un.exports=Wn;var Zn=Un.exports;function Jn(){return Jn=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},Jn.apply(this,arguments)}function er(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>W.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return W.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=W.createContext(r),i=n.length;function a(t){const{scope:n,children:r,...a}=t,s=(null==n?void 0:n[e][i])||o,l=W.useMemo((()=>a),Object.values(a));return W.createElement(s.Provider,{value:l},r)}return n=[...n,r],a.displayName=t+"Provider",[a,function(n,a){const s=(null==a?void 0:a[e][i])||o,l=W.useContext(s);if(l)return l;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},tr(r,...t)]}function tr(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return W.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function nr(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function rr(...e){return W.useCallback(nr(...e),e)}function or(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}const ir=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?W.useLayoutEffect:()=>{},ar=K["useId".toString()]||(()=>{});let sr=0;function lr(e){const[t,n]=W.useState(ar());return ir((()=>{e||n((e=>null!=e?e:String(sr++)))}),[e]),e||(t?`radix-${t}`:"")}function ur(e){const t=W.useRef(e);return W.useEffect((()=>{t.current=e})),W.useMemo((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}function cr({prop:e,defaultProp:t,onChange:n=(()=>{})}){const[r,o]=function({defaultProp:e,onChange:t}){const n=W.useState(e),[r]=n,o=W.useRef(r),i=ur(t);return W.useEffect((()=>{o.current!==r&&(i(r),o.current=r)}),[r,o,i]),n}({defaultProp:t,onChange:n}),i=void 0!==e,a=i?e:r,s=ur(n),l=W.useCallback((t=>{if(i){const n="function"==typeof t?t(e):t;n!==e&&s(n)}else o(t)}),[i,e,o,s]);return[a,l]}var dr={exports:{}},fr={},pr={exports:{}},hr={};!function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<o(i,t)))break e;e[r]=t,e[n]=i,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,a=i>>>1;r<a;){var s=2*(r+1)-1,l=e[s],u=s+1,c=e[u];if(0>o(l,n))u<i&&0>o(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[s]=n,r=s);else{if(!(u<i&&0>o(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],c=1,d=null,f=3,p=!1,h=!1,m=!1,g="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,y="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var o=n(u);null!==o;){if(null===o.callback)r(u);else{if(!(o.startTime<=e))break;r(u),o.sortIndex=o.expirationTime,t(l,o)}o=n(u)}}function w(e){if(m=!1,b(e),!h)if(null!==n(l))h=!0,M(x);else{var t=n(u);null!==t&&L(w,t.startTime-e)}}function x(t,o){h=!1,m&&(m=!1,v(C),C=-1),p=!0;var i=f;try{for(b(o),d=n(l);null!==d&&(!(d.expirationTime>o)||t&&!T());){var a=d.callback;if("function"==typeof a){d.callback=null,f=d.priorityLevel;var s=a(d.expirationTime<=o);o=e.unstable_now(),"function"==typeof s?d.callback=s:d===n(l)&&r(l),b(o)}else r(l);d=n(l)}if(null!==d)var c=!0;else{var g=n(u);null!==g&&L(w,g.startTime-o),c=!1}return c}finally{d=null,f=i,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var E,S=!1,k=null,C=-1,P=5,_=-1;function T(){return!(e.unstable_now()-_<P)}function R(){if(null!==k){var t=e.unstable_now();_=t;var n=!0;try{n=k(!0,t)}finally{n?E():(S=!1,k=null)}}else S=!1}if("function"==typeof y)E=function(){y(R)};else if("undefined"!=typeof MessageChannel){var D=new MessageChannel,A=D.port2;D.port1.onmessage=R,E=function(){A.postMessage(null)}}else E=function(){g(R,0)};function M(e){k=e,S||(S=!0,E())}function L(t,n){C=g((function(){t(e.unstable_now())}),n)}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(e){e.callback=null},e.unstable_continueExecution=function(){h||p||(h=!0,M(x))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,o,i){var a=e.unstable_now();switch("object"==typeof i&&null!==i?i="number"==typeof(i=i.delay)&&0<i?a+i:a:i=a,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return r={id:c++,callback:o,priorityLevel:r,startTime:i,expirationTime:s=i+s,sortIndex:-1},i>a?(r.sortIndex=i,t(u,r),null===n(l)&&r===n(u)&&(m?(v(C),C=-1):m=!0,L(w,i-a))):(r.sortIndex=s,t(l,r),h||p||(h=!0,M(x))),r},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}}(hr),pr.exports=hr;var mr=pr.exports,gr=W,vr=mr;function yr(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 br=new Set,wr={};function xr(e,t){Er(e,t),Er(e+"Capture",t)}function Er(e,t){for(wr[e]=t,e=0;e<t.length;e++)br.add(t[e])}var Sr=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),kr=Object.prototype.hasOwnProperty,Cr=/^[: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]*$/,Pr={},_r={};function Tr(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var Rr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){Rr[e]=new Tr(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];Rr[t]=new Tr(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){Rr[e]=new Tr(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){Rr[e]=new Tr(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){Rr[e]=new Tr(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){Rr[e]=new Tr(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){Rr[e]=new Tr(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){Rr[e]=new Tr(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){Rr[e]=new Tr(e,5,!1,e.toLowerCase(),null,!1,!1)}));var Dr=/[\-:]([a-z])/g;function Ar(e){return e[1].toUpperCase()}function Mr(e,t,n,r){var o=Rr.hasOwnProperty(t)?Rr[t]:null;(null!==o?0!==o.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!kr.call(_r,e)||!kr.call(Pr,e)&&(Cr.test(e)?_r[e]=!0:(Pr[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"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(Dr,Ar);Rr[t]=new Tr(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(Dr,Ar);Rr[t]=new Tr(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(Dr,Ar);Rr[t]=new Tr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){Rr[e]=new Tr(e,1,!1,e.toLowerCase(),null,!1,!1)})),Rr.xlinkHref=new Tr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){Rr[e]=new Tr(e,1,!1,e.toLowerCase(),null,!0,!0)}));var Lr=gr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Or=Symbol.for("react.element"),Fr=Symbol.for("react.portal"),Ir=Symbol.for("react.fragment"),Nr=Symbol.for("react.strict_mode"),zr=Symbol.for("react.profiler"),Br=Symbol.for("react.provider"),Vr=Symbol.for("react.context"),jr=Symbol.for("react.forward_ref"),Hr=Symbol.for("react.suspense"),Ur=Symbol.for("react.suspense_list"),Wr=Symbol.for("react.memo"),$r=Symbol.for("react.lazy"),Kr=Symbol.for("react.offscreen"),Xr=Symbol.iterator;function Yr(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=Xr&&e[Xr]||e["@@iterator"])?e:null}var qr,Qr=Object.assign;function Gr(e){if(void 0===qr)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);qr=t&&t[1]||""}return"\n"+qr+e}var Zr=!1;function Jr(e,t){if(!e||Zr)return"";Zr=!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()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&"string"==typeof u.stack){for(var o=u.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,s=i.length-1;1<=a&&0<=s&&o[a]!==i[s];)s--;for(;1<=a&&0<=s;a--,s--)if(o[a]!==i[s]){if(1!==a||1!==s)do{if(a--,0>--s||o[a]!==i[s]){var l="\n"+o[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{Zr=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Gr(e):""}function eo(e){switch(e.tag){case 5:return Gr(e.type);case 16:return Gr("Lazy");case 13:return Gr("Suspense");case 19:return Gr("SuspenseList");case 0:case 2:case 15:return e=Jr(e.type,!1);case 11:return e=Jr(e.type.render,!1);case 1:return e=Jr(e.type,!0);default:return""}}function to(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case Ir:return"Fragment";case Fr:return"Portal";case zr:return"Profiler";case Nr:return"StrictMode";case Hr:return"Suspense";case Ur:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case Vr:return(e.displayName||"Context")+".Consumer";case Br:return(e._context.displayName||"Context")+".Provider";case jr:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case Wr:return null!==(t=e.displayName||null)?t:to(e.type)||"Memo";case $r:t=e._payload,e=e._init;try{return to(e(t))}catch(n){}}return null}function no(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=(e=t.render).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 to(t);case 8:return t===Nr?"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("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function ro(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function oo(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function io(e){e._valueTracker||(e._valueTracker=function(e){var t=oo(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function ao(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=oo(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function so(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function lo(e,t){var n=t.checked;return Qr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function uo(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=ro(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function co(e,t){null!=(t=t.checked)&&Mr(e,"checked",t,!1)}function fo(e,t){co(e,t);var n=ro(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ho(e,t.type,n):t.hasOwnProperty("defaultValue")&&ho(e,t.type,ro(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function po(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ho(e,t,n){"number"===t&&so(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var mo=Array.isArray;function go(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ro(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function vo(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(yr(91));return Qr({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function yo(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(yr(92));if(mo(n)){if(1<n.length)throw Error(yr(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:ro(n)}}function bo(e,t){var n=ro(t.value),r=ro(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function wo(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function xo(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 Eo(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?xo(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var So,ko,Co=(ko=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((So=So||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=So.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ko(e,t)}))}:ko);function Po(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var _o={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},To=["Webkit","ms","Moz","O"];function Ro(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||_o.hasOwnProperty(e)&&_o[e]?(""+t).trim():t+"px"}function Do(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=Ro(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(_o).forEach((function(e){To.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),_o[t]=_o[e]}))}));var Ao=Qr({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 Mo(e,t){if(t){if(Ao[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(yr(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(yr(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(yr(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(yr(62))}}function Lo(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;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 Oo=null;function Fo(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Io=null,No=null,zo=null;function Bo(e){if(e=Ml(e)){if("function"!=typeof Io)throw Error(yr(280));var t=e.stateNode;t&&(t=Ol(t),Io(e.stateNode,e.type,t))}}function Vo(e){No?zo?zo.push(e):zo=[e]:No=e}function jo(){if(No){var e=No,t=zo;if(zo=No=null,Bo(e),t)for(e=0;e<t.length;e++)Bo(t[e])}}function Ho(e,t){return e(t)}function Uo(){}var Wo=!1;function $o(e,t,n){if(Wo)return e(t,n);Wo=!0;try{return Ho(e,t,n)}finally{Wo=!1,(null!==No||null!==zo)&&(Uo(),jo())}}function Ko(e,t){var n=e.stateNode;if(null===n)return null;var r=Ol(n);if(null===r)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)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(yr(231,t,typeof n));return n}var Xo=!1;if(Sr)try{var Yo={};Object.defineProperty(Yo,"passive",{get:function(){Xo=!0}}),window.addEventListener("test",Yo,Yo),window.removeEventListener("test",Yo,Yo)}catch(ko){Xo=!1}function qo(e,t,n,r,o,i,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Qo=!1,Go=null,Zo=!1,Jo=null,ei={onError:function(e){Qo=!0,Go=e}};function ti(e,t,n,r,o,i,a,s,l){Qo=!1,Go=null,qo.apply(ei,arguments)}function ni(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function ri(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function oi(e){if(ni(e)!==e)throw Error(yr(188))}function ii(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=ni(e)))throw Error(yr(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return oi(o),e;if(i===r)return oi(o),t;i=i.sibling}throw Error(yr(188))}if(n.return!==r.return)n=o,r=i;else{for(var a=!1,s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}if(!a){for(s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a)throw Error(yr(189))}}if(n.alternate!==r)throw Error(yr(190))}if(3!==n.tag)throw Error(yr(188));return n.stateNode.current===n?e:t}(e))?ai(e):null}function ai(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=ai(e);if(null!==t)return t;e=e.sibling}return null}var si=vr.unstable_scheduleCallback,li=vr.unstable_cancelCallback,ui=vr.unstable_shouldYield,ci=vr.unstable_requestPaint,di=vr.unstable_now,fi=vr.unstable_getCurrentPriorityLevel,pi=vr.unstable_ImmediatePriority,hi=vr.unstable_UserBlockingPriority,mi=vr.unstable_NormalPriority,gi=vr.unstable_LowPriority,vi=vr.unstable_IdlePriority,yi=null,bi=null;var wi=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(xi(e)/Ei|0)|0},xi=Math.log,Ei=Math.LN2;var Si=64,ki=4194304;function Ci(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 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Pi(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~o;0!==s?r=Ci(s):0!==(i&=a)&&(r=Ci(i))}else 0!==(a=n&~o)?r=Ci(a):0!==i&&(r=Ci(i));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&o)&&((o=r&-r)>=(i=t&-t)||16===o&&0!=(4194240&i)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-wi(t)),r|=e[n],t&=~o;return r}function _i(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;default:return-1}}function Ti(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Ri(){var e=Si;return 0==(4194240&(Si<<=1))&&(Si=64),e}function Di(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ai(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-wi(t)]=n}function Mi(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-wi(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var Li=0;function Oi(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var Fi,Ii,Ni,zi,Bi,Vi=!1,ji=[],Hi=null,Ui=null,Wi=null,$i=new Map,Ki=new Map,Xi=[],Yi="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 qi(e,t){switch(e){case"focusin":case"focusout":Hi=null;break;case"dragenter":case"dragleave":Ui=null;break;case"mouseover":case"mouseout":Wi=null;break;case"pointerover":case"pointerout":$i.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ki.delete(t.pointerId)}}function Qi(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},null!==t&&(null!==(t=Ml(t))&&Ii(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function Gi(e){var t=Al(e.target);if(null!==t){var n=ni(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=ri(n)))return e.blockedOn=t,void Bi(e.priority,(function(){Ni(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Zi(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=ua(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=Ml(n))&&Ii(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Oo=r,n.target.dispatchEvent(r),Oo=null,t.shift()}return!0}function Ji(e,t,n){Zi(e)&&n.delete(t)}function ea(){Vi=!1,null!==Hi&&Zi(Hi)&&(Hi=null),null!==Ui&&Zi(Ui)&&(Ui=null),null!==Wi&&Zi(Wi)&&(Wi=null),$i.forEach(Ji),Ki.forEach(Ji)}function ta(e,t){e.blockedOn===t&&(e.blockedOn=null,Vi||(Vi=!0,vr.unstable_scheduleCallback(vr.unstable_NormalPriority,ea)))}function na(e){function t(t){return ta(t,e)}if(0<ji.length){ta(ji[0],e);for(var n=1;n<ji.length;n++){var r=ji[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Hi&&ta(Hi,e),null!==Ui&&ta(Ui,e),null!==Wi&&ta(Wi,e),$i.forEach(t),Ki.forEach(t),n=0;n<Xi.length;n++)(r=Xi[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Xi.length&&null===(n=Xi[0]).blockedOn;)Gi(n),null===n.blockedOn&&Xi.shift()}var ra=Lr.ReactCurrentBatchConfig,oa=!0;function ia(e,t,n,r){var o=Li,i=ra.transition;ra.transition=null;try{Li=1,sa(e,t,n,r)}finally{Li=o,ra.transition=i}}function aa(e,t,n,r){var o=Li,i=ra.transition;ra.transition=null;try{Li=4,sa(e,t,n,r)}finally{Li=o,ra.transition=i}}function sa(e,t,n,r){if(oa){var o=ua(e,t,n,r);if(null===o)rl(e,t,r,la,n),qi(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return Hi=Qi(Hi,e,t,n,r,o),!0;case"dragenter":return Ui=Qi(Ui,e,t,n,r,o),!0;case"mouseover":return Wi=Qi(Wi,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return $i.set(i,Qi($i.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Ki.set(i,Qi(Ki.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(qi(e,r),4&t&&-1<Yi.indexOf(e)){for(;null!==o;){var i=Ml(o);if(null!==i&&Fi(i),null===(i=ua(e,t,n,r))&&rl(e,t,r,la,n),i===o)break;o=i}null!==o&&r.stopPropagation()}else rl(e,t,r,null,n)}}var la=null;function ua(e,t,n,r){if(la=null,null!==(e=Al(e=Fo(r))))if(null===(t=ni(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=ri(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return la=e,null}function ca(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(fi()){case pi:return 1;case hi:return 4;case mi:case gi:return 16;case vi:return 536870912;default:return 16}default:return 16}}var da=null,fa=null,pa=null;function ha(){if(pa)return pa;var e,t,n=fa,r=n.length,o="value"in da?da.value:da.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return pa=o.slice(e,1<t?1-t:void 0)}function ma(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function ga(){return!0}function va(){return!1}function ya(e){function t(t,n,r,o,i){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(o):o[a]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?ga:va,this.isPropagationStopped=va,this}return Qr(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=ga)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=ga)},persist:function(){},isPersistent:ga}),t}var ba,wa,xa,Ea={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Sa=ya(Ea),ka=Qr({},Ea,{view:0,detail:0}),Ca=ya(ka),Pa=Qr({},ka,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:za,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==xa&&(xa&&"mousemove"===e.type?(ba=e.screenX-xa.screenX,wa=e.screenY-xa.screenY):wa=ba=0,xa=e),ba)},movementY:function(e){return"movementY"in e?e.movementY:wa}}),_a=ya(Pa),Ta=ya(Qr({},Pa,{dataTransfer:0})),Ra=ya(Qr({},ka,{relatedTarget:0})),Da=ya(Qr({},Ea,{animationName:0,elapsedTime:0,pseudoElement:0})),Aa=Qr({},Ea,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ma=ya(Aa),La=ya(Qr({},Ea,{data:0})),Oa={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Fa={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"},Ia={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Na(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Ia[e])&&!!t[e]}function za(){return Na}var Ba=Qr({},ka,{key:function(e){if(e.key){var t=Oa[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=ma(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Fa[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:za,charCode:function(e){return"keypress"===e.type?ma(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?ma(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Va=ya(Ba),ja=ya(Qr({},Pa,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Ha=ya(Qr({},ka,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:za})),Ua=ya(Qr({},Ea,{propertyName:0,elapsedTime:0,pseudoElement:0})),Wa=Qr({},Pa,{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}),$a=ya(Wa),Ka=[9,13,27,32],Xa=Sr&&"CompositionEvent"in window,Ya=null;Sr&&"documentMode"in document&&(Ya=document.documentMode);var qa=Sr&&"TextEvent"in window&&!Ya,Qa=Sr&&(!Xa||Ya&&8<Ya&&11>=Ya),Ga=String.fromCharCode(32),Za=!1;function Ja(e,t){switch(e){case"keyup":return-1!==Ka.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function es(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var ts=!1;var ns={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 rs(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!ns[e.type]:"textarea"===t}function os(e,t,n,r){Vo(r),0<(t=il(t,"onChange")).length&&(n=new Sa("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var is=null,as=null;function ss(e){Gs(e,0)}function ls(e){if(ao(Ll(e)))return e}function us(e,t){if("change"===e)return t}var cs=!1;if(Sr){var ds;if(Sr){var fs="oninput"in document;if(!fs){var ps=document.createElement("div");ps.setAttribute("oninput","return;"),fs="function"==typeof ps.oninput}ds=fs}else ds=!1;cs=ds&&(!document.documentMode||9<document.documentMode)}function hs(){is&&(is.detachEvent("onpropertychange",ms),as=is=null)}function ms(e){if("value"===e.propertyName&&ls(as)){var t=[];os(t,as,e,Fo(e)),$o(ss,t)}}function gs(e,t,n){"focusin"===e?(hs(),as=n,(is=t).attachEvent("onpropertychange",ms)):"focusout"===e&&hs()}function vs(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return ls(as)}function ys(e,t){if("click"===e)return ls(t)}function bs(e,t){if("input"===e||"change"===e)return ls(t)}var ws="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function xs(e,t){if(ws(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)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 o=n[r];if(!kr.call(t,o)||!ws(e[o],t[o]))return!1}return!0}function Es(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ss(e,t){var n,r=Es(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Es(r)}}function ks(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?ks(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function Cs(){for(var e=window,t=so();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=so((e=t.contentWindow).document)}return t}function Ps(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function _s(e){var t=Cs(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ks(n.ownerDocument.documentElement,n)){if(null!==r&&Ps(n))if(t=r.start,void 0===(e=r.end)&&(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).getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=void 0===r.end?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Ss(n,i);var a=Ss(n,r);o&&a&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Ts=Sr&&"documentMode"in document&&11>=document.documentMode,Rs=null,Ds=null,As=null,Ms=!1;function Ls(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;Ms||null==Rs||Rs!==so(r)||("selectionStart"in(r=Rs)&&Ps(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},As&&xs(As,r)||(As=r,0<(r=il(Ds,"onSelect")).length&&(t=new Sa("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Rs)))}function Os(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Fs={animationend:Os("Animation","AnimationEnd"),animationiteration:Os("Animation","AnimationIteration"),animationstart:Os("Animation","AnimationStart"),transitionend:Os("Transition","TransitionEnd")},Is={},Ns={};function zs(e){if(Is[e])return Is[e];if(!Fs[e])return e;var t,n=Fs[e];for(t in n)if(n.hasOwnProperty(t)&&t in Ns)return Is[e]=n[t];return e}Sr&&(Ns=document.createElement("div").style,"AnimationEvent"in window||(delete Fs.animationend.animation,delete Fs.animationiteration.animation,delete Fs.animationstart.animation),"TransitionEvent"in window||delete Fs.transitionend.transition);var Bs=zs("animationend"),Vs=zs("animationiteration"),js=zs("animationstart"),Hs=zs("transitionend"),Us=new Map,Ws="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 $s(e,t){Us.set(e,t),xr(t,[e])}for(var Ks=0;Ks<Ws.length;Ks++){var Xs=Ws[Ks];$s(Xs.toLowerCase(),"on"+(Xs[0].toUpperCase()+Xs.slice(1)))}$s(Bs,"onAnimationEnd"),$s(Vs,"onAnimationIteration"),$s(js,"onAnimationStart"),$s("dblclick","onDoubleClick"),$s("focusin","onFocus"),$s("focusout","onBlur"),$s(Hs,"onTransitionEnd"),Er("onMouseEnter",["mouseout","mouseover"]),Er("onMouseLeave",["mouseout","mouseover"]),Er("onPointerEnter",["pointerout","pointerover"]),Er("onPointerLeave",["pointerout","pointerover"]),xr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),xr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),xr("onBeforeInput",["compositionend","keypress","textInput","paste"]),xr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),xr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),xr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ys="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(" "),qs=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ys));function Qs(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,i,a,s,l){if(ti.apply(this,arguments),Qo){if(!Qo)throw Error(yr(198));var u=Go;Qo=!1,Go=null,Zo||(Zo=!0,Jo=u)}}(r,t,void 0,e),e.currentTarget=null}function Gs(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==i&&o.isPropagationStopped())break e;Qs(o,s,u),i=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,u=s.currentTarget,s=s.listener,l!==i&&o.isPropagationStopped())break e;Qs(o,s,u),i=l}}}if(Zo)throw e=Jo,Zo=!1,Jo=null,e}function Zs(e,t){var n=t[Tl];void 0===n&&(n=t[Tl]=new Set);var r=e+"__bubble";n.has(r)||(nl(t,e,2,!1),n.add(r))}function Js(e,t,n){var r=0;t&&(r|=4),nl(n,e,r,t)}var el="_reactListening"+Math.random().toString(36).slice(2);function tl(e){if(!e[el]){e[el]=!0,br.forEach((function(t){"selectionchange"!==t&&(qs.has(t)||Js(t,!1,e),Js(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[el]||(t[el]=!0,Js("selectionchange",!1,t))}}function nl(e,t,n,r){switch(ca(t)){case 1:var o=ia;break;case 4:o=aa;break;default:o=sa}n=o.bind(null,t,n,e),o=void 0,!Xo||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function rl(e,t,n,r,o){var i=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===o||8===s.nodeType&&s.parentNode===o)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===o||8===l.nodeType&&l.parentNode===o))return;a=a.return}for(;null!==s;){if(null===(a=Al(s)))return;if(5===(l=a.tag)||6===l){r=i=a;continue e}s=s.parentNode}}r=r.return}$o((function(){var r=i,o=Fo(n),a=[];e:{var s=Us.get(e);if(void 0!==s){var l=Sa,u=e;switch(e){case"keypress":if(0===ma(n))break e;case"keydown":case"keyup":l=Va;break;case"focusin":u="focus",l=Ra;break;case"focusout":u="blur",l=Ra;break;case"beforeblur":case"afterblur":l=Ra;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=_a;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=Ta;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Ha;break;case Bs:case Vs:case js:l=Da;break;case Hs:l=Ua;break;case"scroll":l=Ca;break;case"wheel":l=$a;break;case"copy":case"cut":case"paste":l=Ma;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=ja}var c=0!=(4&t),d=!c&&"scroll"===e,f=c?null!==s?s+"Capture":null:s;c=[];for(var p,h=r;null!==h;){var m=(p=h).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==f&&(null!=(m=Ko(h,f))&&c.push(ol(h,m,p)))),d)break;h=h.return}0<c.length&&(s=new l(s,u,null,n,o),a.push({event:s,listeners:c}))}}if(0==(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===Oo||!(u=n.relatedTarget||n.fromElement)||!Al(u)&&!u[_l])&&(l||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(u=(u=n.relatedTarget||n.toElement)?Al(u):null)&&(u!==(d=ni(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(l=null,u=r),l!==u)){if(c=_a,m="onMouseLeave",f="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(c=ja,m="onPointerLeave",f="onPointerEnter",h="pointer"),d=null==l?s:Ll(l),p=null==u?s:Ll(u),(s=new c(m,h+"leave",l,n,o)).target=d,s.relatedTarget=p,m=null,Al(o)===r&&((c=new c(f,h+"enter",u,n,o)).target=p,c.relatedTarget=d,m=c),d=m,l&&u)e:{for(f=u,h=0,p=c=l;p;p=al(p))h++;for(p=0,m=f;m;m=al(m))p++;for(;0<h-p;)c=al(c),h--;for(;0<p-h;)f=al(f),p--;for(;h--;){if(c===f||null!==f&&c===f.alternate)break e;c=al(c),f=al(f)}c=null}else c=null;null!==l&&sl(a,s,l,c,!1),null!==u&&null!==d&&sl(a,d,u,c,!0)}if("select"===(l=(s=r?Ll(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=us;else if(rs(s))if(cs)g=bs;else{g=vs;var v=gs}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=ys);switch(g&&(g=g(e,r))?os(a,g,n,o):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&ho(s,"number",s.value)),v=r?Ll(r):window,e){case"focusin":(rs(v)||"true"===v.contentEditable)&&(Rs=v,Ds=r,As=null);break;case"focusout":As=Ds=Rs=null;break;case"mousedown":Ms=!0;break;case"contextmenu":case"mouseup":case"dragend":Ms=!1,Ls(a,n,o);break;case"selectionchange":if(Ts)break;case"keydown":case"keyup":Ls(a,n,o)}var y;if(Xa)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else ts?Ja(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Qa&&"ko"!==n.locale&&(ts||"onCompositionStart"!==b?"onCompositionEnd"===b&&ts&&(y=ha()):(fa="value"in(da=o)?da.value:da.textContent,ts=!0)),0<(v=il(r,b)).length&&(b=new La(b,e,null,n,o),a.push({event:b,listeners:v}),y?b.data=y:null!==(y=es(n))&&(b.data=y))),(y=qa?function(e,t){switch(e){case"compositionend":return es(t);case"keypress":return 32!==t.which?null:(Za=!0,Ga);case"textInput":return(e=t.data)===Ga&&Za?null:e;default:return null}}(e,n):function(e,t){if(ts)return"compositionend"===e||!Xa&&Ja(e,t)?(e=ha(),pa=fa=da=null,ts=!1,e):null;switch(e){case"paste":default: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 Qa&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=il(r,"onBeforeInput")).length&&(o=new La("onBeforeInput","beforeinput",null,n,o),a.push({event:o,listeners:r}),o.data=y))}Gs(a,t)}))}function ol(e,t,n){return{instance:e,listener:t,currentTarget:n}}function il(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,null!=(i=Ko(e,n))&&r.unshift(ol(e,i,o)),null!=(i=Ko(e,t))&&r.push(ol(e,i,o))),e=e.return}return r}function al(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function sl(e,t,n,r,o){for(var i=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==u&&(s=u,o?null!=(l=Ko(n,i))&&a.unshift(ol(n,l,s)):o||null!=(l=Ko(n,i))&&a.push(ol(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var ll=/\r\n?/g,ul=/\u0000|\uFFFD/g;function cl(e){return("string"==typeof e?e:""+e).replace(ll,"\n").replace(ul,"")}function dl(e,t,n){if(t=cl(t),cl(e)!==t&&n)throw Error(yr(425))}function fl(){}var pl=null,hl=null;function ml(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var gl="function"==typeof setTimeout?setTimeout:void 0,vl="function"==typeof clearTimeout?clearTimeout:void 0,yl="function"==typeof Promise?Promise:void 0,bl="function"==typeof queueMicrotask?queueMicrotask:void 0!==yl?function(e){return yl.resolve(null).then(e).catch(wl)}:gl;function wl(e){setTimeout((function(){throw e}))}function xl(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0===r)return e.removeChild(o),void na(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);na(t)}function El(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function Sl(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var kl=Math.random().toString(36).slice(2),Cl="__reactFiber$"+kl,Pl="__reactProps$"+kl,_l="__reactContainer$"+kl,Tl="__reactEvents$"+kl,Rl="__reactListeners$"+kl,Dl="__reactHandles$"+kl;function Al(e){var t=e[Cl];if(t)return t;for(var n=e.parentNode;n;){if(t=n[_l]||n[Cl]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Sl(e);null!==e;){if(n=e[Cl])return n;e=Sl(e)}return t}n=(e=n).parentNode}return null}function Ml(e){return!(e=e[Cl]||e[_l])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Ll(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(yr(33))}function Ol(e){return e[Pl]||null}var Fl=[],Il=-1;function Nl(e){return{current:e}}function zl(e){0>Il||(e.current=Fl[Il],Fl[Il]=null,Il--)}function Bl(e,t){Il++,Fl[Il]=e.current,e.current=t}var Vl={},jl=Nl(Vl),Hl=Nl(!1),Ul=Vl;function Wl(e,t){var n=e.type.contextTypes;if(!n)return Vl;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function $l(e){return null!=(e=e.childContextTypes)}function Kl(){zl(Hl),zl(jl)}function Xl(e,t,n){if(jl.current!==Vl)throw Error(yr(168));Bl(jl,t),Bl(Hl,n)}function Yl(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(yr(108,no(e)||"Unknown",o));return Qr({},n,r)}function ql(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Vl,Ul=jl.current,Bl(jl,e),Bl(Hl,Hl.current),!0}function Ql(e,t,n){var r=e.stateNode;if(!r)throw Error(yr(169));n?(e=Yl(e,t,Ul),r.__reactInternalMemoizedMergedChildContext=e,zl(Hl),zl(jl),Bl(jl,e)):zl(Hl),Bl(Hl,n)}var Gl=null,Zl=!1,Jl=!1;function eu(e){null===Gl?Gl=[e]:Gl.push(e)}function tu(){if(!Jl&&null!==Gl){Jl=!0;var e=0,t=Li;try{var n=Gl;for(Li=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Gl=null,Zl=!1}catch(o){throw null!==Gl&&(Gl=Gl.slice(e+1)),si(pi,tu),o}finally{Li=t,Jl=!1}}return null}var nu=[],ru=0,ou=null,iu=0,au=[],su=0,lu=null,uu=1,cu="";function du(e,t){nu[ru++]=iu,nu[ru++]=ou,ou=e,iu=t}function fu(e,t,n){au[su++]=uu,au[su++]=cu,au[su++]=lu,lu=e;var r=uu;e=cu;var o=32-wi(r)-1;r&=~(1<<o),n+=1;var i=32-wi(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,uu=1<<32-wi(t)+o|n<<o|r,cu=i+e}else uu=1<<i|n<<o|r,cu=e}function pu(e){null!==e.return&&(du(e,1),fu(e,1,0))}function hu(e){for(;e===ou;)ou=nu[--ru],nu[ru]=null,iu=nu[--ru],nu[ru]=null;for(;e===lu;)lu=au[--su],au[su]=null,cu=au[--su],au[su]=null,uu=au[--su],au[su]=null}var mu=null,gu=null,vu=!1,yu=null;function bu(e,t){var n=$p(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function wu(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,mu=e,gu=El(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,mu=e,gu=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==lu?{id:uu,overflow:cu}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=$p(18,null,null,0)).stateNode=t,n.return=e,e.child=n,mu=e,gu=null,!0);default:return!1}}function xu(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function Eu(e){if(vu){var t=gu;if(t){var n=t;if(!wu(e,t)){if(xu(e))throw Error(yr(418));t=El(n.nextSibling);var r=mu;t&&wu(e,t)?bu(r,n):(e.flags=-4097&e.flags|2,vu=!1,mu=e)}}else{if(xu(e))throw Error(yr(418));e.flags=-4097&e.flags|2,vu=!1,mu=e}}}function Su(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;mu=e}function ku(e){if(e!==mu)return!1;if(!vu)return Su(e),vu=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ml(e.type,e.memoizedProps)),t&&(t=gu)){if(xu(e))throw Cu(),Error(yr(418));for(;t;)bu(e,t),t=El(t.nextSibling)}if(Su(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(yr(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){gu=El(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}gu=null}}else gu=mu?El(e.stateNode.nextSibling):null;return!0}function Cu(){for(var e=gu;e;)e=El(e.nextSibling)}function Pu(){gu=mu=null,vu=!1}function _u(e){null===yu?yu=[e]:yu.push(e)}var Tu=Lr.ReactCurrentBatchConfig;function Ru(e,t){if(e&&e.defaultProps){for(var n in t=Qr({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Du=Nl(null),Au=null,Mu=null,Lu=null;function Ou(){Lu=Mu=Au=null}function Fu(e){var t=Du.current;zl(Du),e._currentValue=t}function Iu(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Nu(e,t){Au=e,Lu=Mu=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(Md=!0),e.firstContext=null)}function zu(e){var t=e._currentValue;if(Lu!==e)if(e={context:e,memoizedValue:t,next:null},null===Mu){if(null===Au)throw Error(yr(308));Mu=e,Au.dependencies={lanes:0,firstContext:e}}else Mu=Mu.next=e;return t}var Bu=null;function Vu(e){null===Bu?Bu=[e]:Bu.push(e)}function ju(e,t,n,r){var o=t.interleaved;return null===o?(n.next=n,Vu(t)):(n.next=o.next,o.next=n),t.interleaved=n,Hu(e,r)}function Hu(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Uu=!1;function Wu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function $u(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 Ku(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Xu(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&Hf)){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Hu(e,n)}return null===(o=r.interleaved)?(t.next=t,Vu(r)):(t.next=o.next,o.next=t),r.interleaved=t,Hu(e,n)}function Yu(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Mi(e,n)}}function qu(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===i?o=i=a:i=i.next=a,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Qu(e,t,n,r){var o=e.updateQueue;Uu=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var l=s,u=l.next;l.next=null,null===a?i=u:a.next=u,a=l;var c=e.alternate;null!==c&&((s=(c=c.updateQueue).lastBaseUpdate)!==a&&(null===s?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(null!==i){var d=o.baseState;for(a=0,c=u=l=null,s=i;;){var f=s.lane,p=s.eventTime;if((r&f)===f){null!==c&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=e,m=s;switch(f=t,p=n,m.tag){case 1:if("function"==typeof(h=m.payload)){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(f="function"==typeof(h=m.payload)?h.call(p,d,f):h))break e;d=Qr({},d,f);break e;case 2:Uu=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(f=o.effects)?o.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===c?(u=c=p,l=d):c=c.next=p,a|=f;if(null===(s=s.next)){if(null===(s=o.shared.pending))break;s=(f=s).next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}if(null===c&&(l=d),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,null!==(t=o.shared.interleaved)){o=t;do{a|=o.lane,o=o.next}while(o!==t)}else null===i&&(o.shared.lanes=0);Qf|=a,e.lanes=a,e.memoizedState=d}}function Gu(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!=typeof o)throw Error(yr(191,o));o.call(r)}}}var Zu=(new gr.Component).refs;function Ju(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:Qr({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var ec={isMounted:function(e){return!!(e=e._reactInternals)&&ni(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=hp(),o=mp(e),i=Ku(r,o);i.payload=t,null!=n&&(i.callback=n),null!==(t=Xu(e,i,o))&&(gp(t,e,o,r),Yu(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=hp(),o=mp(e),i=Ku(r,o);i.tag=1,i.payload=t,null!=n&&(i.callback=n),null!==(t=Xu(e,i,o))&&(gp(t,e,o,r),Yu(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=hp(),r=mp(e),o=Ku(n,r);o.tag=2,null!=t&&(o.callback=t),null!==(t=Xu(e,o,r))&&(gp(t,e,r,n),Yu(t,e,r))}};function tc(e,t,n,r,o,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!xs(n,r)||!xs(o,i))}function nc(e,t,n){var r=!1,o=Vl,i=t.contextType;return"object"==typeof i&&null!==i?i=zu(i):(o=$l(t)?Ul:jl.current,i=(r=null!=(r=t.contextTypes))?Wl(e,o):Vl),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=ec,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function rc(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ec.enqueueReplaceState(t,t.state,null)}function oc(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=Zu,Wu(e);var i=t.contextType;"object"==typeof i&&null!==i?o.context=zu(i):(i=$l(t)?Ul:jl.current,o.context=Wl(e,i)),o.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(Ju(e,t,i,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&ec.enqueueReplaceState(o,o.state,null),Qu(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.flags|=4194308)}function ic(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(yr(309));var r=n.stateNode}if(!r)throw Error(yr(147,e));var o=r,i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=o.refs;t===Zu&&(t=o.refs={}),null===e?delete t[i]:t[i]=e})._stringRef=i,t)}if("string"!=typeof e)throw Error(yr(284));if(!n._owner)throw Error(yr(290,e))}return e}function ac(e,t){throw e=Object.prototype.toString.call(t),Error(yr(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function sc(e){return(0,e._init)(e._payload)}function lc(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Xp(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function a(t){return e&&null===t.alternate&&(t.flags|=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=Gp(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function l(e,t,n,r){var i=n.type;return i===Ir?c(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===i||"object"==typeof i&&null!==i&&i.$$typeof===$r&&sc(i)===t.type)?((r=o(t,n.props)).ref=ic(e,t,n),r.return=e,r):((r=Yp(n.type,n.key,n.props,null,e.mode,r)).ref=ic(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Zp(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function c(e,t,n,r,i){return null===t||7!==t.tag?((t=qp(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Gp(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case Or:return(n=Yp(t.type,t.key,t.props,null,e.mode,n)).ref=ic(e,null,t),n.return=e,n;case Fr:return(t=Zp(t,e.mode,n)).return=e,t;case $r:return d(e,(0,t._init)(t._payload),n)}if(mo(t)||Yr(t))return(t=qp(t,e.mode,n,null)).return=e,t;ac(e,t)}return null}function f(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==o?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case Or:return n.key===o?l(e,t,n,r):null;case Fr:return n.key===o?u(e,t,n,r):null;case $r:return f(e,t,(o=n._init)(n._payload),r)}if(mo(n)||Yr(n))return null!==o?null:c(e,t,n,r,null);ac(e,n)}return null}function p(e,t,n,r,o){if("string"==typeof r&&""!==r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case Or:return l(t,e=e.get(null===r.key?n:r.key)||null,r,o);case Fr:return u(t,e=e.get(null===r.key?n:r.key)||null,r,o);case $r:return p(e,t,n,(0,r._init)(r._payload),o)}if(mo(r)||Yr(r))return c(t,e=e.get(n)||null,r,o,null);ac(t,r)}return null}return function s(l,u,c,h){if("object"==typeof c&&null!==c&&c.type===Ir&&null===c.key&&(c=c.props.children),"object"==typeof c&&null!==c){switch(c.$$typeof){case Or:e:{for(var m=c.key,g=u;null!==g;){if(g.key===m){if((m=c.type)===Ir){if(7===g.tag){n(l,g.sibling),(u=o(g,c.props.children)).return=l,l=u;break e}}else if(g.elementType===m||"object"==typeof m&&null!==m&&m.$$typeof===$r&&sc(m)===g.type){n(l,g.sibling),(u=o(g,c.props)).ref=ic(l,g,c),u.return=l,l=u;break e}n(l,g);break}t(l,g),g=g.sibling}c.type===Ir?((u=qp(c.props.children,l.mode,h,c.key)).return=l,l=u):((h=Yp(c.type,c.key,c.props,null,l.mode,h)).ref=ic(l,u,c),h.return=l,l=h)}return a(l);case Fr:e:{for(g=c.key;null!==u;){if(u.key===g){if(4===u.tag&&u.stateNode.containerInfo===c.containerInfo&&u.stateNode.implementation===c.implementation){n(l,u.sibling),(u=o(u,c.children||[])).return=l,l=u;break e}n(l,u);break}t(l,u),u=u.sibling}(u=Zp(c,l.mode,h)).return=l,l=u}return a(l);case $r:return s(l,u,(g=c._init)(c._payload),h)}if(mo(c))return function(o,a,s,l){for(var u=null,c=null,h=a,m=a=0,g=null;null!==h&&m<s.length;m++){h.index>m?(g=h,h=null):g=h.sibling;var v=f(o,h,s[m],l);if(null===v){null===h&&(h=g);break}e&&h&&null===v.alternate&&t(o,h),a=i(v,a,m),null===c?u=v:c.sibling=v,c=v,h=g}if(m===s.length)return n(o,h),vu&&du(o,m),u;if(null===h){for(;m<s.length;m++)null!==(h=d(o,s[m],l))&&(a=i(h,a,m),null===c?u=h:c.sibling=h,c=h);return vu&&du(o,m),u}for(h=r(o,h);m<s.length;m++)null!==(g=p(h,o,m,s[m],l))&&(e&&null!==g.alternate&&h.delete(null===g.key?m:g.key),a=i(g,a,m),null===c?u=g:c.sibling=g,c=g);return e&&h.forEach((function(e){return t(o,e)})),vu&&du(o,m),u}(l,u,c,h);if(Yr(c))return function(o,a,s,l){var u=Yr(s);if("function"!=typeof u)throw Error(yr(150));if(null==(s=u.call(s)))throw Error(yr(151));for(var c=u=null,h=a,m=a=0,g=null,v=s.next();null!==h&&!v.done;m++,v=s.next()){h.index>m?(g=h,h=null):g=h.sibling;var y=f(o,h,v.value,l);if(null===y){null===h&&(h=g);break}e&&h&&null===y.alternate&&t(o,h),a=i(y,a,m),null===c?u=y:c.sibling=y,c=y,h=g}if(v.done)return n(o,h),vu&&du(o,m),u;if(null===h){for(;!v.done;m++,v=s.next())null!==(v=d(o,v.value,l))&&(a=i(v,a,m),null===c?u=v:c.sibling=v,c=v);return vu&&du(o,m),u}for(h=r(o,h);!v.done;m++,v=s.next())null!==(v=p(h,o,m,v.value,l))&&(e&&null!==v.alternate&&h.delete(null===v.key?m:v.key),a=i(v,a,m),null===c?u=v:c.sibling=v,c=v);return e&&h.forEach((function(e){return t(o,e)})),vu&&du(o,m),u}(l,u,c,h);ac(l,c)}return"string"==typeof c&&""!==c||"number"==typeof c?(c=""+c,null!==u&&6===u.tag?(n(l,u.sibling),(u=o(u,c)).return=l,l=u):(n(l,u),(u=Gp(c,l.mode,h)).return=l,l=u),a(l)):n(l,u)}}var uc=lc(!0),cc=lc(!1),dc={},fc=Nl(dc),pc=Nl(dc),hc=Nl(dc);function mc(e){if(e===dc)throw Error(yr(174));return e}function gc(e,t){switch(Bl(hc,t),Bl(pc,e),Bl(fc,dc),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Eo(null,"");break;default:t=Eo(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}zl(fc),Bl(fc,t)}function vc(){zl(fc),zl(pc),zl(hc)}function yc(e){mc(hc.current);var t=mc(fc.current),n=Eo(t,e.type);t!==n&&(Bl(pc,e),Bl(fc,n))}function bc(e){pc.current===e&&(zl(fc),zl(pc))}var wc=Nl(0);function xc(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ec=[];function Sc(){for(var e=0;e<Ec.length;e++)Ec[e]._workInProgressVersionPrimary=null;Ec.length=0}var kc=Lr.ReactCurrentDispatcher,Cc=Lr.ReactCurrentBatchConfig,Pc=0,_c=null,Tc=null,Rc=null,Dc=!1,Ac=!1,Mc=0,Lc=0;function Oc(){throw Error(yr(321))}function Fc(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ws(e[n],t[n]))return!1;return!0}function Ic(e,t,n,r,o,i){if(Pc=i,_c=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,kc.current=null===e||null===e.memoizedState?bd:wd,e=n(r,o),Ac){i=0;do{if(Ac=!1,Mc=0,25<=i)throw Error(yr(301));i+=1,Rc=Tc=null,t.updateQueue=null,kc.current=xd,e=n(r,o)}while(Ac)}if(kc.current=yd,t=null!==Tc&&null!==Tc.next,Pc=0,Rc=Tc=_c=null,Dc=!1,t)throw Error(yr(300));return e}function Nc(){var e=0!==Mc;return Mc=0,e}function zc(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Rc?_c.memoizedState=Rc=e:Rc=Rc.next=e,Rc}function Bc(){if(null===Tc){var e=_c.alternate;e=null!==e?e.memoizedState:null}else e=Tc.next;var t=null===Rc?_c.memoizedState:Rc.next;if(null!==t)Rc=t,Tc=e;else{if(null===e)throw Error(yr(310));e={memoizedState:(Tc=e).memoizedState,baseState:Tc.baseState,baseQueue:Tc.baseQueue,queue:Tc.queue,next:null},null===Rc?_c.memoizedState=Rc=e:Rc=Rc.next=e}return Rc}function Vc(e,t){return"function"==typeof t?t(e):t}function jc(e){var t=Bc(),n=t.queue;if(null===n)throw Error(yr(311));n.lastRenderedReducer=e;var r=Tc,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var a=o.next;o.next=i.next,i.next=a}r.baseQueue=o=i,n.pending=null}if(null!==o){i=o.next,r=r.baseState;var s=a=null,l=null,u=i;do{var c=u.lane;if((Pc&c)===c)null!==l&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===l?(s=l=d,a=r):l=l.next=d,_c.lanes|=c,Qf|=c}u=u.next}while(null!==u&&u!==i);null===l?a=r:l.next=s,ws(r,t.memoizedState)||(Md=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=l,n.lastRenderedState=r}if(null!==(e=n.interleaved)){o=e;do{i=o.lane,_c.lanes|=i,Qf|=i,o=o.next}while(o!==e)}else null===o&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Hc(e){var t=Bc(),n=t.queue;if(null===n)throw Error(yr(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var a=o=o.next;do{i=e(i,a.action),a=a.next}while(a!==o);ws(i,t.memoizedState)||(Md=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Uc(){}function Wc(e,t){var n=_c,r=Bc(),o=t(),i=!ws(r.memoizedState,o);if(i&&(r.memoizedState=o,Md=!0),r=r.queue,nd(Xc.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||null!==Rc&&1&Rc.memoizedState.tag){if(n.flags|=2048,Gc(9,Kc.bind(null,n,r,o,t),void 0,null),null===Uf)throw Error(yr(349));0!=(30&Pc)||$c(n,t,o)}return o}function $c(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=_c.updateQueue)?(t={lastEffect:null,stores:null},_c.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Kc(e,t,n,r){t.value=n,t.getSnapshot=r,Yc(t)&&qc(e)}function Xc(e,t,n){return n((function(){Yc(t)&&qc(e)}))}function Yc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ws(e,n)}catch(r){return!0}}function qc(e){var t=Hu(e,1);null!==t&&gp(t,e,1,-1)}function Qc(e){var t=zc();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Vc,lastRenderedState:e},t.queue=e,e=e.dispatch=hd.bind(null,_c,e),[t.memoizedState,e]}function Gc(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=_c.updateQueue)?(t={lastEffect:null,stores:null},_c.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Zc(){return Bc().memoizedState}function Jc(e,t,n,r){var o=zc();_c.flags|=e,o.memoizedState=Gc(1|t,n,void 0,void 0===r?null:r)}function ed(e,t,n,r){var o=Bc();r=void 0===r?null:r;var i=void 0;if(null!==Tc){var a=Tc.memoizedState;if(i=a.destroy,null!==r&&Fc(r,a.deps))return void(o.memoizedState=Gc(t,n,i,r))}_c.flags|=e,o.memoizedState=Gc(1|t,n,i,r)}function td(e,t){return Jc(8390656,8,e,t)}function nd(e,t){return ed(2048,8,e,t)}function rd(e,t){return ed(4,2,e,t)}function od(e,t){return ed(4,4,e,t)}function id(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function ad(e,t,n){return n=null!=n?n.concat([e]):null,ed(4,4,id.bind(null,t,e),n)}function sd(){}function ld(e,t){var n=Bc();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Fc(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ud(e,t){var n=Bc();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Fc(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function cd(e,t,n){return 0==(21&Pc)?(e.baseState&&(e.baseState=!1,Md=!0),e.memoizedState=n):(ws(n,t)||(n=Ri(),_c.lanes|=n,Qf|=n,e.baseState=!0),t)}function dd(e,t){var n=Li;Li=0!==n&&4>n?n:4,e(!0);var r=Cc.transition;Cc.transition={};try{e(!1),t()}finally{Li=n,Cc.transition=r}}function fd(){return Bc().memoizedState}function pd(e,t,n){var r=mp(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},md(e))gd(t,n);else if(null!==(n=ju(e,t,n,r))){gp(n,e,r,hp()),vd(n,t,r)}}function hd(e,t,n){var r=mp(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(md(e))gd(t,o);else{var i=e.alternate;if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=i(a,n);if(o.hasEagerState=!0,o.eagerState=s,ws(s,a)){var l=t.interleaved;return null===l?(o.next=o,Vu(t)):(o.next=l.next,l.next=o),void(t.interleaved=o)}}catch(u){}null!==(n=ju(e,t,o,r))&&(gp(n,e,r,o=hp()),vd(n,t,r))}}function md(e){var t=e.alternate;return e===_c||null!==t&&t===_c}function gd(e,t){Ac=Dc=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function vd(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Mi(e,n)}}var yd={readContext:zu,useCallback:Oc,useContext:Oc,useEffect:Oc,useImperativeHandle:Oc,useInsertionEffect:Oc,useLayoutEffect:Oc,useMemo:Oc,useReducer:Oc,useRef:Oc,useState:Oc,useDebugValue:Oc,useDeferredValue:Oc,useTransition:Oc,useMutableSource:Oc,useSyncExternalStore:Oc,useId:Oc,unstable_isNewReconciler:!1},bd={readContext:zu,useCallback:function(e,t){return zc().memoizedState=[e,void 0===t?null:t],e},useContext:zu,useEffect:td,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Jc(4194308,4,id.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Jc(4194308,4,e,t)},useInsertionEffect:function(e,t){return Jc(4,2,e,t)},useMemo:function(e,t){var n=zc();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=zc();return t=void 0!==n?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=pd.bind(null,_c,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},zc().memoizedState=e},useState:Qc,useDebugValue:sd,useDeferredValue:function(e){return zc().memoizedState=e},useTransition:function(){var e=Qc(!1),t=e[0];return e=dd.bind(null,e[1]),zc().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=_c,o=zc();if(vu){if(void 0===n)throw Error(yr(407));n=n()}else{if(n=t(),null===Uf)throw Error(yr(349));0!=(30&Pc)||$c(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,td(Xc.bind(null,r,i,e),[e]),r.flags|=2048,Gc(9,Kc.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=zc(),t=Uf.identifierPrefix;if(vu){var n=cu;t=":"+t+"R"+(n=(uu&~(1<<32-wi(uu)-1)).toString(32)+n),0<(n=Mc++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=Lc++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},wd={readContext:zu,useCallback:ld,useContext:zu,useEffect:nd,useImperativeHandle:ad,useInsertionEffect:rd,useLayoutEffect:od,useMemo:ud,useReducer:jc,useRef:Zc,useState:function(){return jc(Vc)},useDebugValue:sd,useDeferredValue:function(e){return cd(Bc(),Tc.memoizedState,e)},useTransition:function(){return[jc(Vc)[0],Bc().memoizedState]},useMutableSource:Uc,useSyncExternalStore:Wc,useId:fd,unstable_isNewReconciler:!1},xd={readContext:zu,useCallback:ld,useContext:zu,useEffect:nd,useImperativeHandle:ad,useInsertionEffect:rd,useLayoutEffect:od,useMemo:ud,useReducer:Hc,useRef:Zc,useState:function(){return Hc(Vc)},useDebugValue:sd,useDeferredValue:function(e){var t=Bc();return null===Tc?t.memoizedState=e:cd(t,Tc.memoizedState,e)},useTransition:function(){return[Hc(Vc)[0],Bc().memoizedState]},useMutableSource:Uc,useSyncExternalStore:Wc,useId:fd,unstable_isNewReconciler:!1};function Ed(e,t){try{var n="",r=t;do{n+=eo(r),r=r.return}while(r);var o=n}catch(i){o="\nError generating stack: "+i.message+"\n"+i.stack}return{value:e,source:t,stack:o,digest:null}}function Sd(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function kd(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var Cd="function"==typeof WeakMap?WeakMap:Map;function Pd(e,t,n){(n=Ku(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){op||(op=!0,ip=r),kd(0,t)},n}function _d(e,t,n){(n=Ku(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){kd(0,t)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){kd(0,t),"function"!=typeof r&&(null===ap?ap=new Set([this]):ap.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function Td(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new Cd;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=Bp.bind(null,e,t,n),t.then(e,e))}function Rd(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function Dd(e,t,n,r,o){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Ku(-1,1)).tag=2,Xu(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var Ad=Lr.ReactCurrentOwner,Md=!1;function Ld(e,t,n,r){t.child=null===e?cc(t,null,n,r):uc(t,e.child,n,r)}function Od(e,t,n,r,o){n=n.render;var i=t.ref;return Nu(t,o),r=Ic(e,t,n,r,i,o),n=Nc(),null===e||Md?(vu&&n&&pu(t),t.flags|=1,Ld(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,rf(e,t,o))}function Fd(e,t,n,r,o){if(null===e){var i=n.type;return"function"!=typeof i||Kp(i)||void 0!==i.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Yp(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,Id(e,t,i,r,o))}if(i=e.child,0==(e.lanes&o)){var a=i.memoizedProps;if((n=null!==(n=n.compare)?n:xs)(a,r)&&e.ref===t.ref)return rf(e,t,o)}return t.flags|=1,(e=Xp(i,r)).ref=t.ref,e.return=t,t.child=e}function Id(e,t,n,r,o){if(null!==e){var i=e.memoizedProps;if(xs(i,r)&&e.ref===t.ref){if(Md=!1,t.pendingProps=r=i,0==(e.lanes&o))return t.lanes=e.lanes,rf(e,t,o);0!=(131072&e.flags)&&(Md=!0)}}return Bd(e,t,n,r,o)}function Nd(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Bl(Xf,Kf),Kf|=n;else{if(0==(1073741824&n))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Bl(Xf,Kf),Kf|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==i?i.baseLanes:n,Bl(Xf,Kf),Kf|=r}else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,Bl(Xf,Kf),Kf|=r;return Ld(e,t,o,n),t.child}function zd(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Bd(e,t,n,r,o){var i=$l(n)?Ul:jl.current;return i=Wl(t,i),Nu(t,o),n=Ic(e,t,n,r,i,o),r=Nc(),null===e||Md?(vu&&r&&pu(t),t.flags|=1,Ld(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,rf(e,t,o))}function Vd(e,t,n,r,o){if($l(n)){var i=!0;ql(t)}else i=!1;if(Nu(t,o),null===t.stateNode)nf(e,t),nc(t,n,r),oc(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;"object"==typeof u&&null!==u?u=zu(u):u=Wl(t,u=$l(n)?Ul:jl.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==u)&&rc(t,a,r,u),Uu=!1;var f=t.memoizedState;a.state=f,Qu(t,r,a,o),l=t.memoizedState,s!==r||f!==l||Hl.current||Uu?("function"==typeof c&&(Ju(t,n,c,r),l=t.memoizedState),(s=Uu||tc(t,n,s,r,f,l,u))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,$u(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:Ru(t.type,s),a.props=u,d=t.pendingProps,f=a.context,"object"==typeof(l=n.contextType)&&null!==l?l=zu(l):l=Wl(t,l=$l(n)?Ul:jl.current);var p=n.getDerivedStateFromProps;(c="function"==typeof p||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||f!==l)&&rc(t,a,r,l),Uu=!1,f=t.memoizedState,a.state=f,Qu(t,r,a,o);var h=t.memoizedState;s!==d||f!==h||Hl.current||Uu?("function"==typeof p&&(Ju(t,n,p,r),h=t.memoizedState),(u=Uu||tc(t,n,u,r,f,h,l)||!1)?(c||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=l,r=u):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return jd(e,t,n,r,i,o)}function jd(e,t,n,r,o,i){zd(e,t);var a=0!=(128&t.flags);if(!r&&!a)return o&&Ql(t,n,!1),rf(e,t,i);r=t.stateNode,Ad.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=uc(t,e.child,null,i),t.child=uc(t,null,s,i)):Ld(e,t,s,i),t.memoizedState=r.state,o&&Ql(t,n,!0),t.child}function Hd(e){var t=e.stateNode;t.pendingContext?Xl(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Xl(0,t.context,!1),gc(e,t.containerInfo)}function Ud(e,t,n,r,o){return Pu(),_u(o),t.flags|=256,Ld(e,t,n,r),t.child}var Wd,$d,Kd,Xd,Yd={dehydrated:null,treeContext:null,retryLane:0};function qd(e){return{baseLanes:e,cachePool:null,transitions:null}}function Qd(e,t,n){var r,o=t.pendingProps,i=wc.current,a=!1,s=0!=(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&0!=(2&i)),r?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(i|=1),Bl(wc,1&i),null===e)return Eu(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(s=o.children,e=o.fallback,a?(o=t.mode,a=t.child,s={mode:"hidden",children:s},0==(1&o)&&null!==a?(a.childLanes=0,a.pendingProps=s):a=Qp(s,o,0,null),e=qp(e,o,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=qd(n),t.memoizedState=Yd,e):Gd(t,s));if(null!==(i=e.memoizedState)&&null!==(r=i.dehydrated))return function(e,t,n,r,o,i,a){if(n)return 256&t.flags?(t.flags&=-257,Zd(e,t,a,r=Sd(Error(yr(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=Qp({mode:"visible",children:r.children},o,0,null),(i=qp(i,o,a,null)).flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,0!=(1&t.mode)&&uc(t,e.child,null,a),t.child.memoizedState=qd(a),t.memoizedState=Yd,i);if(0==(1&t.mode))return Zd(e,t,a,null);if("$!"===o.data){if(r=o.nextSibling&&o.nextSibling.dataset)var s=r.dgst;return r=s,Zd(e,t,a,r=Sd(i=Error(yr(419)),r,void 0))}if(s=0!=(a&e.childLanes),Md||s){if(null!==(r=Uf)){switch(a&-a){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!=(o&(r.suspendedLanes|a))?0:o)&&o!==i.retryLane&&(i.retryLane=o,Hu(e,o),gp(r,e,o,-1))}return Rp(),Zd(e,t,a,r=Sd(Error(yr(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=jp.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,gu=El(o.nextSibling),mu=t,vu=!0,yu=null,null!==e&&(au[su++]=uu,au[su++]=cu,au[su++]=lu,uu=e.id,cu=e.overflow,lu=t),t=Gd(t,r.children),t.flags|=4096,t)}(e,t,s,o,r,i,n);if(a){a=o.fallback,s=t.mode,r=(i=e.child).sibling;var l={mode:"hidden",children:o.children};return 0==(1&s)&&t.child!==i?((o=t.child).childLanes=0,o.pendingProps=l,t.deletions=null):(o=Xp(i,l)).subtreeFlags=14680064&i.subtreeFlags,null!==r?a=Xp(r,a):(a=qp(a,s,n,null)).flags|=2,a.return=t,o.return=t,o.sibling=a,t.child=o,o=a,a=t.child,s=null===(s=e.child.memoizedState)?qd(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},a.memoizedState=s,a.childLanes=e.childLanes&~n,t.memoizedState=Yd,o}return e=(a=e.child).sibling,o=Xp(a,{mode:"visible",children:o.children}),0==(1&t.mode)&&(o.lanes=n),o.return=t,o.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function Gd(e,t){return(t=Qp({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Zd(e,t,n,r){return null!==r&&_u(r),uc(t,e.child,null,n),(e=Gd(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Jd(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Iu(e.return,t,n)}function ef(e,t,n,r,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function tf(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Ld(e,t,r.children,n),0!=(2&(r=wc.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Jd(e,n,t);else if(19===e.tag)Jd(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Bl(wc,r),0==(1&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===xc(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),ef(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===xc(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}ef(t,!0,n,null,i);break;case"together":ef(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function nf(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function rf(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Qf|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(yr(153));if(null!==t.child){for(n=Xp(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Xp(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function of(e,t){if(!vu)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function af(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=14680064&o.subtreeFlags,r|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function sf(e,t,n){var r=t.pendingProps;switch(hu(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return af(t),null;case 1:case 17:return $l(t.type)&&Kl(),af(t),null;case 3:return r=t.stateNode,vc(),zl(Hl),zl(jl),Sc(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(ku(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==yu&&(wp(yu),yu=null))),$d(e,t),af(t),null;case 5:bc(t);var o=mc(hc.current);if(n=t.type,null!==e&&null!=t.stateNode)Kd(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(yr(166));return af(t),null}if(e=mc(fc.current),ku(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Cl]=t,r[Pl]=i,e=0!=(1&t.mode),n){case"dialog":Zs("cancel",r),Zs("close",r);break;case"iframe":case"object":case"embed":Zs("load",r);break;case"video":case"audio":for(o=0;o<Ys.length;o++)Zs(Ys[o],r);break;case"source":Zs("error",r);break;case"img":case"image":case"link":Zs("error",r),Zs("load",r);break;case"details":Zs("toggle",r);break;case"input":uo(r,i),Zs("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Zs("invalid",r);break;case"textarea":yo(r,i),Zs("invalid",r)}for(var a in Mo(n,i),o=null,i)if(i.hasOwnProperty(a)){var s=i[a];"children"===a?"string"==typeof s?r.textContent!==s&&(!0!==i.suppressHydrationWarning&&dl(r.textContent,s,e),o=["children",s]):"number"==typeof s&&r.textContent!==""+s&&(!0!==i.suppressHydrationWarning&&dl(r.textContent,s,e),o=["children",""+s]):wr.hasOwnProperty(a)&&null!=s&&"onScroll"===a&&Zs("scroll",r)}switch(n){case"input":io(r),po(r,i,!0);break;case"textarea":io(r),wo(r);break;case"select":case"option":break;default:"function"==typeof i.onClick&&(r.onclick=fl)}r=o,t.updateQueue=r,null!==r&&(t.flags|=4)}else{a=9===o.nodeType?o:o.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=xo(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=a.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),"select"===n&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Cl]=t,e[Pl]=r,Wd(e,t,!1,!1),t.stateNode=e;e:{switch(a=Lo(n,r),n){case"dialog":Zs("cancel",e),Zs("close",e),o=r;break;case"iframe":case"object":case"embed":Zs("load",e),o=r;break;case"video":case"audio":for(o=0;o<Ys.length;o++)Zs(Ys[o],e);o=r;break;case"source":Zs("error",e),o=r;break;case"img":case"image":case"link":Zs("error",e),Zs("load",e),o=r;break;case"details":Zs("toggle",e),o=r;break;case"input":uo(e,r),o=lo(e,r),Zs("invalid",e);break;case"option":default:o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Qr({},r,{value:void 0}),Zs("invalid",e);break;case"textarea":yo(e,r),o=vo(e,r),Zs("invalid",e)}for(i in Mo(n,o),s=o)if(s.hasOwnProperty(i)){var l=s[i];"style"===i?Do(e,l):"dangerouslySetInnerHTML"===i?null!=(l=l?l.__html:void 0)&&Co(e,l):"children"===i?"string"==typeof l?("textarea"!==n||""!==l)&&Po(e,l):"number"==typeof l&&Po(e,""+l):"suppressContentEditableWarning"!==i&&"suppressHydrationWarning"!==i&&"autoFocus"!==i&&(wr.hasOwnProperty(i)?null!=l&&"onScroll"===i&&Zs("scroll",e):null!=l&&Mr(e,i,l,a))}switch(n){case"input":io(e),po(e,r,!1);break;case"textarea":io(e),wo(e);break;case"option":null!=r.value&&e.setAttribute("value",""+ro(r.value));break;case"select":e.multiple=!!r.multiple,null!=(i=r.value)?go(e,!!r.multiple,i,!1):null!=r.defaultValue&&go(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof o.onClick&&(e.onclick=fl)}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)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return af(t),null;case 6:if(e&&null!=t.stateNode)Xd(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(yr(166));if(n=mc(hc.current),mc(fc.current),ku(t)){if(r=t.stateNode,n=t.memoizedProps,r[Cl]=t,(i=r.nodeValue!==n)&&null!==(e=mu))switch(e.tag){case 3:dl(r.nodeValue,n,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&dl(r.nodeValue,n,0!=(1&e.mode))}i&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Cl]=t,t.stateNode=r}return af(t),null;case 13:if(zl(wc),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(vu&&null!==gu&&0!=(1&t.mode)&&0==(128&t.flags))Cu(),Pu(),t.flags|=98560,i=!1;else if(i=ku(t),null!==r&&null!==r.dehydrated){if(null===e){if(!i)throw Error(yr(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(yr(317));i[Cl]=t}else Pu(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;af(t),i=!1}else null!==yu&&(wp(yu),yu=null),i=!0;if(!i)return 65536&t.flags?t:null}return 0!=(128&t.flags)?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&wc.current)?0===Yf&&(Yf=3):Rp())),null!==t.updateQueue&&(t.flags|=4),af(t),null);case 4:return vc(),$d(e,t),null===e&&tl(t.stateNode.containerInfo),af(t),null;case 10:return Fu(t.type._context),af(t),null;case 19:if(zl(wc),null===(i=t.memoizedState))return af(t),null;if(r=0!=(128&t.flags),null===(a=i.rendering))if(r)of(i,!1);else{if(0!==Yf||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(a=xc(e))){for(t.flags|=128,of(i,!1),null!==(r=a.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(i=n).flags&=14680066,null===(a=i.alternate)?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Bl(wc,1&wc.current|2),t.child}e=e.sibling}null!==i.tail&&di()>np&&(t.flags|=128,r=!0,of(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=xc(a))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),of(i,!0),null===i.tail&&"hidden"===i.tailMode&&!a.alternate&&!vu)return af(t),null}else 2*di()-i.renderingStartTime>np&&1073741824!==n&&(t.flags|=128,r=!0,of(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(null!==(n=i.last)?n.sibling=a:t.child=a,i.last=a)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=di(),t.sibling=null,n=wc.current,Bl(wc,r?1&n|2:1&n),t):(af(t),null);case 22:case 23:return Cp(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&Kf)&&(af(t),6&t.subtreeFlags&&(t.flags|=8192)):af(t),null;case 24:case 25:return null}throw Error(yr(156,t.tag))}function lf(e,t){switch(hu(t),t.tag){case 1:return $l(t.type)&&Kl(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return vc(),zl(Hl),zl(jl),Sc(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return bc(t),null;case 13:if(zl(wc),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(yr(340));Pu()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return zl(wc),null;case 4:return vc(),null;case 10:return Fu(t.type._context),null;case 22:case 23:return Cp(),null;default:return null}}Wd=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},$d=function(){},Kd=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,mc(fc.current);var i,a=null;switch(n){case"input":o=lo(e,o),r=lo(e,r),a=[];break;case"select":o=Qr({},o,{value:void 0}),r=Qr({},r,{value:void 0}),a=[];break;case"textarea":o=vo(e,o),r=vo(e,r),a=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=fl)}for(u in Mo(n,r),n=null,o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&null!=o[u])if("style"===u){var s=o[u];for(i in s)s.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(wr.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in r){var l=r[u];if(s=null!=o?o[u]:void 0,r.hasOwnProperty(u)&&l!==s&&(null!=l||null!=s))if("style"===u)if(s){for(i in s)!s.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in l)l.hasOwnProperty(i)&&s[i]!==l[i]&&(n||(n={}),n[i]=l[i])}else n||(a||(a=[]),a.push(u,n)),n=l;else"dangerouslySetInnerHTML"===u?(l=l?l.__html:void 0,s=s?s.__html:void 0,null!=l&&s!==l&&(a=a||[]).push(u,l)):"children"===u?"string"!=typeof l&&"number"!=typeof l||(a=a||[]).push(u,""+l):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(wr.hasOwnProperty(u)?(null!=l&&"onScroll"===u&&Zs("scroll",e),a||s===l||(a=[])):(a=a||[]).push(u,l))}n&&(a=a||[]).push("style",n);var u=a;(t.updateQueue=u)&&(t.flags|=4)}},Xd=function(e,t,n,r){n!==r&&(t.flags|=4)};var uf=!1,cf=!1,df="function"==typeof WeakSet?WeakSet:Set,ff=null;function pf(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(r){zp(e,t,r)}else n.current=null}function hf(e,t,n){try{n()}catch(r){zp(e,t,r)}}var mf=!1;function gf(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,void 0!==i&&hf(t,n,i)}o=o.next}while(o!==r)}}function vf(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect: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 yf(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function bf(e){var t=e.alternate;null!==t&&(e.alternate=null,bf(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[Cl],delete t[Pl],delete t[Tl],delete t[Rl],delete t[Dl])),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 wf(e){return 5===e.tag||3===e.tag||4===e.tag}function xf(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||wf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function Ef(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=fl));else if(4!==r&&null!==(e=e.child))for(Ef(e,t,n),e=e.sibling;null!==e;)Ef(e,t,n),e=e.sibling}function Sf(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(Sf(e,t,n),e=e.sibling;null!==e;)Sf(e,t,n),e=e.sibling}var kf=null,Cf=!1;function Pf(e,t,n){for(n=n.child;null!==n;)_f(e,t,n),n=n.sibling}function _f(e,t,n){if(bi&&"function"==typeof bi.onCommitFiberUnmount)try{bi.onCommitFiberUnmount(yi,n)}catch(s){}switch(n.tag){case 5:cf||pf(n,t);case 6:var r=kf,o=Cf;kf=null,Pf(e,t,n),Cf=o,null!==(kf=r)&&(Cf?(e=kf,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):kf.removeChild(n.stateNode));break;case 18:null!==kf&&(Cf?(e=kf,n=n.stateNode,8===e.nodeType?xl(e.parentNode,n):1===e.nodeType&&xl(e,n),na(e)):xl(kf,n.stateNode));break;case 4:r=kf,o=Cf,kf=n.stateNode.containerInfo,Cf=!0,Pf(e,t,n),kf=r,Cf=o;break;case 0:case 11:case 14:case 15:if(!cf&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,void 0!==a&&(0!=(2&i)||0!=(4&i))&&hf(n,t,a),o=o.next}while(o!==r)}Pf(e,t,n);break;case 1:if(!cf&&(pf(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){zp(n,t,s)}Pf(e,t,n);break;case 21:Pf(e,t,n);break;case 22:1&n.mode?(cf=(r=cf)||null!==n.memoizedState,Pf(e,t,n),cf=r):Pf(e,t,n);break;default:Pf(e,t,n)}}function Tf(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new df),t.forEach((function(t){var r=Hp.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Rf(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,a=t,s=a;e:for(;null!==s;){switch(s.tag){case 5:kf=s.stateNode,Cf=!1;break e;case 3:case 4:kf=s.stateNode.containerInfo,Cf=!0;break e}s=s.return}if(null===kf)throw Error(yr(160));_f(i,a,o),kf=null,Cf=!1;var l=o.alternate;null!==l&&(l.return=null),o.return=null}catch(u){zp(o,t,u)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)Df(t,e),t=t.sibling}function Df(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Rf(t,e),Af(e),4&r){try{gf(3,e,e.return),vf(3,e)}catch(m){zp(e,e.return,m)}try{gf(5,e,e.return)}catch(m){zp(e,e.return,m)}}break;case 1:Rf(t,e),Af(e),512&r&&null!==n&&pf(n,n.return);break;case 5:if(Rf(t,e),Af(e),512&r&&null!==n&&pf(n,n.return),32&e.flags){var o=e.stateNode;try{Po(o,"")}catch(m){zp(e,e.return,m)}}if(4&r&&null!=(o=e.stateNode)){var i=e.memoizedProps,a=null!==n?n.memoizedProps:i,s=e.type,l=e.updateQueue;if(e.updateQueue=null,null!==l)try{"input"===s&&"radio"===i.type&&null!=i.name&&co(o,i),Lo(s,a);var u=Lo(s,i);for(a=0;a<l.length;a+=2){var c=l[a],d=l[a+1];"style"===c?Do(o,d):"dangerouslySetInnerHTML"===c?Co(o,d):"children"===c?Po(o,d):Mr(o,c,d,u)}switch(s){case"input":fo(o,i);break;case"textarea":bo(o,i);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var p=i.value;null!=p?go(o,!!i.multiple,p,!1):f!==!!i.multiple&&(null!=i.defaultValue?go(o,!!i.multiple,i.defaultValue,!0):go(o,!!i.multiple,i.multiple?[]:"",!1))}o[Pl]=i}catch(m){zp(e,e.return,m)}}break;case 6:if(Rf(t,e),Af(e),4&r){if(null===e.stateNode)throw Error(yr(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(m){zp(e,e.return,m)}}break;case 3:if(Rf(t,e),Af(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{na(t.containerInfo)}catch(m){zp(e,e.return,m)}break;case 4:default:Rf(t,e),Af(e);break;case 13:Rf(t,e),Af(e),8192&(o=e.child).flags&&(i=null!==o.memoizedState,o.stateNode.isHidden=i,!i||null!==o.alternate&&null!==o.alternate.memoizedState||(tp=di())),4&r&&Tf(e);break;case 22:if(c=null!==n&&null!==n.memoizedState,1&e.mode?(cf=(u=cf)||c,Rf(t,e),cf=u):Rf(t,e),Af(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!c&&0!=(1&e.mode))for(ff=e,c=e.child;null!==c;){for(d=ff=c;null!==ff;){switch(p=(f=ff).child,f.tag){case 0:case 11:case 14:case 15:gf(4,f,f.return);break;case 1:pf(f,f.return);var h=f.stateNode;if("function"==typeof h.componentWillUnmount){r=f,n=f.return;try{t=r,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(m){zp(r,n,m)}}break;case 5:pf(f,f.return);break;case 22:if(null!==f.memoizedState){Ff(d);continue}}null!==p?(p.return=f,ff=p):Ff(d)}c=c.sibling}e:for(c=null,d=e;;){if(5===d.tag){if(null===c){c=d;try{o=d.stateNode,u?"function"==typeof(i=o.style).setProperty?i.setProperty("display","none","important"):i.display="none":(s=d.stateNode,a=null!=(l=d.memoizedProps.style)&&l.hasOwnProperty("display")?l.display:null,s.style.display=Ro("display",a))}catch(m){zp(e,e.return,m)}}}else if(6===d.tag){if(null===c)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){zp(e,e.return,m)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Rf(t,e),Af(e),4&r&&Tf(e);case 21:}}function Af(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(wf(n)){var r=n;break e}n=n.return}throw Error(yr(160))}switch(r.tag){case 5:var o=r.stateNode;32&r.flags&&(Po(o,""),r.flags&=-33),Sf(e,xf(e),o);break;case 3:case 4:var i=r.stateNode.containerInfo;Ef(e,xf(e),i);break;default:throw Error(yr(161))}}catch(a){zp(e,e.return,a)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Mf(e,t,n){ff=e,Lf(e)}function Lf(e,t,n){for(var r=0!=(1&e.mode);null!==ff;){var o=ff,i=o.child;if(22===o.tag&&r){var a=null!==o.memoizedState||uf;if(!a){var s=o.alternate,l=null!==s&&null!==s.memoizedState||cf;s=uf;var u=cf;if(uf=a,(cf=l)&&!u)for(ff=o;null!==ff;)l=(a=ff).child,22===a.tag&&null!==a.memoizedState?If(o):null!==l?(l.return=a,ff=l):If(o);for(;null!==i;)ff=i,Lf(i),i=i.sibling;ff=o,uf=s,cf=u}Of(e)}else 0!=(8772&o.subtreeFlags)&&null!==i?(i.return=o,ff=i):Of(e)}}function Of(e){for(;null!==ff;){var t=ff;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:cf||vf(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!cf)if(null===n)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Ru(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;null!==i&&Gu(t,i,r);break;case 3:var a=t.updateQueue;if(null!==a){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Gu(t,a,n)}break;case 5:var s=t.stateNode;if(null===n&&4&t.flags){n=s;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:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var c=u.memoizedState;if(null!==c){var d=c.dehydrated;null!==d&&na(d)}}}break;default:throw Error(yr(163))}cf||512&t.flags&&yf(t)}catch(f){zp(t,t.return,f)}}if(t===e){ff=null;break}if(null!==(n=t.sibling)){n.return=t.return,ff=n;break}ff=t.return}}function Ff(e){for(;null!==ff;){var t=ff;if(t===e){ff=null;break}var n=t.sibling;if(null!==n){n.return=t.return,ff=n;break}ff=t.return}}function If(e){for(;null!==ff;){var t=ff;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{vf(4,t)}catch(l){zp(t,n,l)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(l){zp(t,o,l)}}var i=t.return;try{yf(t)}catch(l){zp(t,i,l)}break;case 5:var a=t.return;try{yf(t)}catch(l){zp(t,a,l)}}}catch(l){zp(t,t.return,l)}if(t===e){ff=null;break}var s=t.sibling;if(null!==s){s.return=t.return,ff=s;break}ff=t.return}}var Nf,zf=Math.ceil,Bf=Lr.ReactCurrentDispatcher,Vf=Lr.ReactCurrentOwner,jf=Lr.ReactCurrentBatchConfig,Hf=0,Uf=null,Wf=null,$f=0,Kf=0,Xf=Nl(0),Yf=0,qf=null,Qf=0,Gf=0,Zf=0,Jf=null,ep=null,tp=0,np=1/0,rp=null,op=!1,ip=null,ap=null,sp=!1,lp=null,up=0,cp=0,dp=null,fp=-1,pp=0;function hp(){return 0!=(6&Hf)?di():-1!==fp?fp:fp=di()}function mp(e){return 0==(1&e.mode)?1:0!=(2&Hf)&&0!==$f?$f&-$f:null!==Tu.transition?(0===pp&&(pp=Ri()),pp):0!==(e=Li)?e:e=void 0===(e=window.event)?16:ca(e.type)}function gp(e,t,n,r){if(50<cp)throw cp=0,dp=null,Error(yr(185));Ai(e,n,r),0!=(2&Hf)&&e===Uf||(e===Uf&&(0==(2&Hf)&&(Gf|=n),4===Yf&&xp(e,$f)),vp(e,r),1===n&&0===Hf&&0==(1&t.mode)&&(np=di()+500,Zl&&tu()))}function vp(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-wi(i),s=1<<a,l=o[a];-1===l?0!=(s&n)&&0==(s&r)||(o[a]=_i(s,t)):l<=t&&(e.expiredLanes|=s),i&=~s}}(e,t);var r=Pi(e,e===Uf?$f:0);if(0===r)null!==n&&li(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&li(n),1===t)0===e.tag?function(e){Zl=!0,eu(e)}(Ep.bind(null,e)):eu(Ep.bind(null,e)),bl((function(){0==(6&Hf)&&tu()})),n=null;else{switch(Oi(r)){case 1:n=pi;break;case 4:n=hi;break;case 16:default:n=mi;break;case 536870912:n=vi}n=Up(n,yp.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function yp(e,t){if(fp=-1,pp=0,0!=(6&Hf))throw Error(yr(327));var n=e.callbackNode;if(Ip()&&e.callbackNode!==n)return null;var r=Pi(e,e===Uf?$f:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=Dp(e,r);else{t=r;var o=Hf;Hf|=2;var i=Tp();for(Uf===e&&$f===t||(rp=null,np=di()+500,Pp(e,t));;)try{Mp();break}catch(s){_p(e,s)}Ou(),Bf.current=i,Hf=o,null!==Wf?t=0:(Uf=null,$f=0,t=Yf)}if(0!==t){if(2===t&&(0!==(o=Ti(e))&&(r=o,t=bp(e,o))),1===t)throw n=qf,Pp(e,0),xp(e,r),vp(e,di()),n;if(6===t)xp(e,r);else{if(o=e.current.alternate,0==(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!ws(i(),o))return!1}catch(a){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)&&(2===(t=Dp(e,r))&&(0!==(i=Ti(e))&&(r=i,t=bp(e,i))),1===t))throw n=qf,Pp(e,0),xp(e,r),vp(e,di()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(yr(345));case 2:case 5:Fp(e,ep,rp);break;case 3:if(xp(e,r),(130023424&r)===r&&10<(t=tp+500-di())){if(0!==Pi(e,0))break;if(((o=e.suspendedLanes)&r)!==r){hp(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=gl(Fp.bind(null,e,ep,rp),t);break}Fp(e,ep,rp);break;case 4:if(xp(e,r),(4194240&r)===r)break;for(t=e.eventTimes,o=-1;0<r;){var a=31-wi(r);i=1<<a,(a=t[a])>o&&(o=a),r&=~i}if(r=o,10<(r=(120>(r=di()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*zf(r/1960))-r)){e.timeoutHandle=gl(Fp.bind(null,e,ep,rp),r);break}Fp(e,ep,rp);break;default:throw Error(yr(329))}}}return vp(e,di()),e.callbackNode===n?yp.bind(null,e):null}function bp(e,t){var n=Jf;return e.current.memoizedState.isDehydrated&&(Pp(e,t).flags|=256),2!==(e=Dp(e,t))&&(t=ep,ep=n,null!==t&&wp(t)),e}function wp(e){null===ep?ep=e:ep.push.apply(ep,e)}function xp(e,t){for(t&=~Zf,t&=~Gf,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-wi(t),r=1<<n;e[n]=-1,t&=~r}}function Ep(e){if(0!=(6&Hf))throw Error(yr(327));Ip();var t=Pi(e,0);if(0==(1&t))return vp(e,di()),null;var n=Dp(e,t);if(0!==e.tag&&2===n){var r=Ti(e);0!==r&&(t=r,n=bp(e,r))}if(1===n)throw n=qf,Pp(e,0),xp(e,t),vp(e,di()),n;if(6===n)throw Error(yr(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Fp(e,ep,rp),vp(e,di()),null}function Sp(e,t){var n=Hf;Hf|=1;try{return e(t)}finally{0===(Hf=n)&&(np=di()+500,Zl&&tu())}}function kp(e){null!==lp&&0===lp.tag&&0==(6&Hf)&&Ip();var t=Hf;Hf|=1;var n=jf.transition,r=Li;try{if(jf.transition=null,Li=1,e)return e()}finally{Li=r,jf.transition=n,0==(6&(Hf=t))&&tu()}}function Cp(){Kf=Xf.current,zl(Xf)}function Pp(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,vl(n)),null!==Wf)for(n=Wf.return;null!==n;){var r=n;switch(hu(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Kl();break;case 3:vc(),zl(Hl),zl(jl),Sc();break;case 5:bc(r);break;case 4:vc();break;case 13:case 19:zl(wc);break;case 10:Fu(r.type._context);break;case 22:case 23:Cp()}n=n.return}if(Uf=e,Wf=e=Xp(e.current,null),$f=Kf=t,Yf=0,qf=null,Zf=Gf=Qf=0,ep=Jf=null,null!==Bu){for(t=0;t<Bu.length;t++)if(null!==(r=(n=Bu[t]).interleaved)){n.interleaved=null;var o=r.next,i=n.pending;if(null!==i){var a=i.next;i.next=o,r.next=a}n.pending=r}Bu=null}return e}function _p(e,t){for(;;){var n=Wf;try{if(Ou(),kc.current=yd,Dc){for(var r=_c.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}Dc=!1}if(Pc=0,Rc=Tc=_c=null,Ac=!1,Mc=0,Vf.current=null,null===n||null===n.return){Yf=1,qf=t,Wf=null;break}e:{var i=e,a=n.return,s=n,l=t;if(t=$f,s.flags|=32768,null!==l&&"object"==typeof l&&"function"==typeof l.then){var u=l,c=s,d=c.tag;if(0==(1&c.mode)&&(0===d||11===d||15===d)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=Rd(a);if(null!==p){p.flags&=-257,Dd(p,a,s,0,t),1&p.mode&&Td(i,u,t),l=u;var h=(t=p).updateQueue;if(null===h){var m=new Set;m.add(l),t.updateQueue=m}else h.add(l);break e}if(0==(1&t)){Td(i,u,t),Rp();break e}l=Error(yr(426))}else if(vu&&1&s.mode){var g=Rd(a);if(null!==g){0==(65536&g.flags)&&(g.flags|=256),Dd(g,a,s,0,t),_u(Ed(l,s));break e}}i=l=Ed(l,s),4!==Yf&&(Yf=2),null===Jf?Jf=[i]:Jf.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t,qu(i,Pd(0,l,t));break e;case 1:s=l;var v=i.type,y=i.stateNode;if(0==(128&i.flags)&&("function"==typeof v.getDerivedStateFromError||null!==y&&"function"==typeof y.componentDidCatch&&(null===ap||!ap.has(y)))){i.flags|=65536,t&=-t,i.lanes|=t,qu(i,_d(i,s,t));break e}}i=i.return}while(null!==i)}Op(n)}catch(b){t=b,Wf===n&&null!==n&&(Wf=n=n.return);continue}break}}function Tp(){var e=Bf.current;return Bf.current=yd,null===e?yd:e}function Rp(){0!==Yf&&3!==Yf&&2!==Yf||(Yf=4),null===Uf||0==(268435455&Qf)&&0==(268435455&Gf)||xp(Uf,$f)}function Dp(e,t){var n=Hf;Hf|=2;var r=Tp();for(Uf===e&&$f===t||(rp=null,Pp(e,t));;)try{Ap();break}catch(o){_p(e,o)}if(Ou(),Hf=n,Bf.current=r,null!==Wf)throw Error(yr(261));return Uf=null,$f=0,Yf}function Ap(){for(;null!==Wf;)Lp(Wf)}function Mp(){for(;null!==Wf&&!ui();)Lp(Wf)}function Lp(e){var t=Nf(e.alternate,e,Kf);e.memoizedProps=e.pendingProps,null===t?Op(e):Wf=t,Vf.current=null}function Op(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=sf(n,t,Kf)))return void(Wf=n)}else{if(null!==(n=lf(n,t)))return n.flags&=32767,void(Wf=n);if(null===e)return Yf=6,void(Wf=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Wf=t);Wf=t=e}while(null!==t);0===Yf&&(Yf=5)}function Fp(e,t,n){var r=Li,o=jf.transition;try{jf.transition=null,Li=1,function(e,t,n,r){do{Ip()}while(null!==lp);if(0!=(6&Hf))throw Error(yr(327));n=e.finishedWork;var o=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(yr(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(function(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 o=31-wi(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}(e,i),e===Uf&&(Wf=Uf=null,$f=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||sp||(sp=!0,Up(mi,(function(){return Ip(),null}))),i=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||i){i=jf.transition,jf.transition=null;var a=Li;Li=1;var s=Hf;Hf|=4,Vf.current=null,function(e,t){if(pl=oa,Ps(e=Cs())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch(w){n=null;break e}var a=0,s=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||0!==o&&3!==d.nodeType||(s=a+o),d!==i||0!==r&&3!==d.nodeType||(l=a+r),3===d.nodeType&&(a+=d.nodeValue.length),null!==(p=d.firstChild);)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===o&&(s=a),f===i&&++c===r&&(l=a),null!==(p=d.nextSibling))break;f=(d=f).parentNode}d=p}n=-1===s||-1===l?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(hl={focusedElem:e,selectionRange:n},oa=!1,ff=t;null!==ff;)if(e=(t=ff).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,ff=e;else for(;null!==ff;){t=ff;try{var h=t.alternate;if(0!=(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==h){var m=h.memoizedProps,g=h.memoizedState,v=t.stateNode,y=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:Ru(t.type,m),g);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(yr(163))}}catch(w){zp(t,t.return,w)}if(null!==(e=t.sibling)){e.return=t.return,ff=e;break}ff=t.return}h=mf,mf=!1}(e,n),Df(n,e),_s(hl),oa=!!pl,hl=pl=null,e.current=n,Mf(n),ci(),Hf=s,Li=a,jf.transition=i}else e.current=n;if(sp&&(sp=!1,lp=e,up=o),i=e.pendingLanes,0===i&&(ap=null),function(e){if(bi&&"function"==typeof bi.onCommitFiberRoot)try{bi.onCommitFiberRoot(yi,e,void 0,128==(128&e.current.flags))}catch(t){}}(n.stateNode),vp(e,di()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(op)throw op=!1,e=ip,ip=null,e;0!=(1&up)&&0!==e.tag&&Ip(),i=e.pendingLanes,0!=(1&i)?e===dp?cp++:(cp=0,dp=e):cp=0,tu()}(e,t,n,r)}finally{jf.transition=o,Li=r}return null}function Ip(){if(null!==lp){var e=Oi(up),t=jf.transition,n=Li;try{if(jf.transition=null,Li=16>e?16:e,null===lp)var r=!1;else{if(e=lp,lp=null,up=0,0!=(6&Hf))throw Error(yr(331));var o=Hf;for(Hf|=4,ff=e.current;null!==ff;){var i=ff,a=i.child;if(0!=(16&ff.flags)){var s=i.deletions;if(null!==s){for(var l=0;l<s.length;l++){var u=s[l];for(ff=u;null!==ff;){var c=ff;switch(c.tag){case 0:case 11:case 15:gf(8,c,i)}var d=c.child;if(null!==d)d.return=c,ff=d;else for(;null!==ff;){var f=(c=ff).sibling,p=c.return;if(bf(c),c===u){ff=null;break}if(null!==f){f.return=p,ff=f;break}ff=p}}}var h=i.alternate;if(null!==h){var m=h.child;if(null!==m){h.child=null;do{var g=m.sibling;m.sibling=null,m=g}while(null!==m)}}ff=i}}if(0!=(2064&i.subtreeFlags)&&null!==a)a.return=i,ff=a;else e:for(;null!==ff;){if(0!=(2048&(i=ff).flags))switch(i.tag){case 0:case 11:case 15:gf(9,i,i.return)}var v=i.sibling;if(null!==v){v.return=i.return,ff=v;break e}ff=i.return}}var y=e.current;for(ff=y;null!==ff;){var b=(a=ff).child;if(0!=(2064&a.subtreeFlags)&&null!==b)b.return=a,ff=b;else e:for(a=y;null!==ff;){if(0!=(2048&(s=ff).flags))try{switch(s.tag){case 0:case 11:case 15:vf(9,s)}}catch(x){zp(s,s.return,x)}if(s===a){ff=null;break e}var w=s.sibling;if(null!==w){w.return=s.return,ff=w;break e}ff=s.return}}if(Hf=o,tu(),bi&&"function"==typeof bi.onPostCommitFiberRoot)try{bi.onPostCommitFiberRoot(yi,e)}catch(x){}r=!0}return r}finally{Li=n,jf.transition=t}}return!1}function Np(e,t,n){e=Xu(e,t=Pd(0,t=Ed(n,t),1),1),t=hp(),null!==e&&(Ai(e,1,t),vp(e,t))}function zp(e,t,n){if(3===e.tag)Np(e,e,n);else for(;null!==t;){if(3===t.tag){Np(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===ap||!ap.has(r))){t=Xu(t,e=_d(t,e=Ed(n,e),1),1),e=hp(),null!==t&&(Ai(t,1,e),vp(t,e));break}}t=t.return}}function Bp(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=hp(),e.pingedLanes|=e.suspendedLanes&n,Uf===e&&($f&n)===n&&(4===Yf||3===Yf&&(130023424&$f)===$f&&500>di()-tp?Pp(e,0):Zf|=n),vp(e,t)}function Vp(e,t){0===t&&(0==(1&e.mode)?t=1:(t=ki,0==(130023424&(ki<<=1))&&(ki=4194304)));var n=hp();null!==(e=Hu(e,t))&&(Ai(e,t,n),vp(e,n))}function jp(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Vp(e,n)}function Hp(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(yr(314))}null!==r&&r.delete(t),Vp(e,n)}function Up(e,t){return si(e,t)}function Wp(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 $p(e,t,n,r){return new Wp(e,t,n,r)}function Kp(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Xp(e,t){var n=e.alternate;return null===n?((n=$p(e.tag,t,e.key,e.mode)).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=14680064&e.flags,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=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Yp(e,t,n,r,o,i){var a=2;if(r=e,"function"==typeof e)Kp(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case Ir:return qp(n.children,o,i,t);case Nr:a=8,o|=8;break;case zr:return(e=$p(12,n,t,2|o)).elementType=zr,e.lanes=i,e;case Hr:return(e=$p(13,n,t,o)).elementType=Hr,e.lanes=i,e;case Ur:return(e=$p(19,n,t,o)).elementType=Ur,e.lanes=i,e;case Kr:return Qp(n,o,i,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case Br:a=10;break e;case Vr:a=9;break e;case jr:a=11;break e;case Wr:a=14;break e;case $r:a=16,r=null;break e}throw Error(yr(130,null==e?e:typeof e,""))}return(t=$p(a,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function qp(e,t,n,r){return(e=$p(7,e,r,t)).lanes=n,e}function Qp(e,t,n,r){return(e=$p(22,e,r,t)).elementType=Kr,e.lanes=n,e.stateNode={isHidden:!1},e}function Gp(e,t,n){return(e=$p(6,e,null,t)).lanes=n,e}function Zp(e,t,n){return(t=$p(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Jp(e,t,n,r,o){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=Di(0),this.expirationTimes=Di(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Di(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function eh(e,t,n,r,o,i,a,s,l){return e=new Jp(e,t,n,s,l),1===t?(t=1,!0===i&&(t|=8)):t=0,i=$p(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Wu(i),e}function th(e){if(!e)return Vl;e:{if(ni(e=e._reactInternals)!==e||1!==e.tag)throw Error(yr(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if($l(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(yr(171))}if(1===e.tag){var n=e.type;if($l(n))return Yl(e,n,t)}return t}function nh(e,t,n,r,o,i,a,s,l){return(e=eh(n,r,!0,e,0,i,0,s,l)).context=th(null),n=e.current,(i=Ku(r=hp(),o=mp(n))).callback=null!=t?t:null,Xu(n,i,o),e.current.lanes=o,Ai(e,o,r),vp(e,r),e}function rh(e,t,n,r){var o=t.current,i=hp(),a=mp(o);return n=th(n),null===t.context?t.context=n:t.pendingContext=n,(t=Ku(i,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Xu(o,t,a))&&(gp(e,o,a,i),Yu(e,o,a)),a}function oh(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function ih(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function ah(e,t){ih(e,t),(e=e.alternate)&&ih(e,t)}Nf=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Hl.current)Md=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return Md=!1,function(e,t,n){switch(t.tag){case 3:Hd(t),Pu();break;case 5:yc(t);break;case 1:$l(t.type)&&ql(t);break;case 4:gc(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Bl(Du,r._currentValue),r._currentValue=o;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Bl(wc,1&wc.current),t.flags|=128,null):0!=(n&t.child.childLanes)?Qd(e,t,n):(Bl(wc,1&wc.current),null!==(e=rf(e,t,n))?e.sibling:null);Bl(wc,1&wc.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return tf(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),Bl(wc,wc.current),r)break;return null;case 22:case 23:return t.lanes=0,Nd(e,t,n)}return rf(e,t,n)}(e,t,n);Md=0!=(131072&e.flags)}else Md=!1,vu&&0!=(1048576&t.flags)&&fu(t,iu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;nf(e,t),e=t.pendingProps;var o=Wl(t,jl.current);Nu(t,n),o=Ic(null,t,r,e,o,n);var i=Nc();return t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,$l(r)?(i=!0,ql(t)):i=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,Wu(t),o.updater=ec,t.stateNode=o,o._reactInternals=t,oc(t,r,e,n),t=jd(null,t,r,!0,i,n)):(t.tag=0,vu&&i&&pu(t),Ld(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(nf(e,t),e=t.pendingProps,r=(o=r._init)(r._payload),t.type=r,o=t.tag=function(e){if("function"==typeof e)return Kp(e)?1:0;if(null!=e){if((e=e.$$typeof)===jr)return 11;if(e===Wr)return 14}return 2}(r),e=Ru(r,e),o){case 0:t=Bd(null,t,r,e,n);break e;case 1:t=Vd(null,t,r,e,n);break e;case 11:t=Od(null,t,r,e,n);break e;case 14:t=Fd(null,t,r,Ru(r.type,e),n);break e}throw Error(yr(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,Bd(e,t,r,o=t.elementType===r?o:Ru(r,o),n);case 1:return r=t.type,o=t.pendingProps,Vd(e,t,r,o=t.elementType===r?o:Ru(r,o),n);case 3:e:{if(Hd(t),null===e)throw Error(yr(387));r=t.pendingProps,o=(i=t.memoizedState).element,$u(e,t),Qu(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated){if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,256&t.flags){t=Ud(e,t,r,n,o=Ed(Error(yr(423)),t));break e}if(r!==o){t=Ud(e,t,r,n,o=Ed(Error(yr(424)),t));break e}for(gu=El(t.stateNode.containerInfo.firstChild),mu=t,vu=!0,yu=null,n=cc(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(Pu(),r===o){t=rf(e,t,n);break e}Ld(e,t,r,n)}t=t.child}return t;case 5:return yc(t),null===e&&Eu(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,a=o.children,ml(r,o)?a=null:null!==i&&ml(r,i)&&(t.flags|=32),zd(e,t),Ld(e,t,a,n),t.child;case 6:return null===e&&Eu(t),null;case 13:return Qd(e,t,n);case 4:return gc(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=uc(t,null,r,n):Ld(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,Od(e,t,r,o=t.elementType===r?o:Ru(r,o),n);case 7:return Ld(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ld(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,Bl(Du,r._currentValue),r._currentValue=a,null!==i)if(ws(i.value,a)){if(i.children===o.children&&!Hl.current){t=rf(e,t,n);break e}}else for(null!==(i=t.child)&&(i.return=t);null!==i;){var s=i.dependencies;if(null!==s){a=i.child;for(var l=s.firstContext;null!==l;){if(l.context===r){if(1===i.tag){(l=Ku(-1,n&-n)).tag=2;var u=i.updateQueue;if(null!==u){var c=(u=u.shared).pending;null===c?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,null!==(l=i.alternate)&&(l.lanes|=n),Iu(i.return,n,t),s.lanes|=n;break}l=l.next}}else if(10===i.tag)a=i.type===t.type?null:i.child;else if(18===i.tag){if(null===(a=i.return))throw Error(yr(341));a.lanes|=n,null!==(s=a.alternate)&&(s.lanes|=n),Iu(a,n,t),a=i.sibling}else a=i.child;if(null!==a)a.return=i;else for(a=i;null!==a;){if(a===t){a=null;break}if(null!==(i=a.sibling)){i.return=a.return,a=i;break}a=a.return}i=a}Ld(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Nu(t,n),r=r(o=zu(o)),t.flags|=1,Ld(e,t,r,n),t.child;case 14:return o=Ru(r=t.type,t.pendingProps),Fd(e,t,r,o=Ru(r.type,o),n);case 15:return Id(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ru(r,o),nf(e,t),t.tag=1,$l(r)?(e=!0,ql(t)):e=!1,Nu(t,n),nc(t,r,o),oc(t,r,o,n),jd(null,t,r,!0,e,n);case 19:return tf(e,t,n);case 22:return Nd(e,t,n)}throw Error(yr(156,t.tag))};var sh="function"==typeof reportError?reportError:function(e){console.error(e)};function lh(e){this._internalRoot=e}function uh(e){this._internalRoot=e}function ch(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function dh(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function fh(){}function ph(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i;if("function"==typeof o){var s=o;o=function(){var e=oh(a);s.call(e)}}rh(t,a,e,o)}else a=function(e,t,n,r,o){if(o){if("function"==typeof r){var i=r;r=function(){var e=oh(a);i.call(e)}}var a=nh(t,r,e,0,null,!1,0,"",fh);return e._reactRootContainer=a,e[_l]=a.current,tl(8===e.nodeType?e.parentNode:e),kp(),a}for(;o=e.lastChild;)e.removeChild(o);if("function"==typeof r){var s=r;r=function(){var e=oh(l);s.call(e)}}var l=eh(e,0,!1,null,0,!1,0,"",fh);return e._reactRootContainer=l,e[_l]=l.current,tl(8===e.nodeType?e.parentNode:e),kp((function(){rh(t,l,n,r)})),l}(n,t,e,o,r);return oh(a)}uh.prototype.render=lh.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(yr(409));rh(e,t,null,null)},uh.prototype.unmount=lh.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;kp((function(){rh(null,e,null,null)})),t[_l]=null}},uh.prototype.unstable_scheduleHydration=function(e){if(e){var t=zi();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Xi.length&&0!==t&&t<Xi[n].priority;n++);Xi.splice(n,0,e),0===n&&Gi(e)}},Fi=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ci(t.pendingLanes);0!==n&&(Mi(t,1|n),vp(t,di()),0==(6&Hf)&&(np=di()+500,tu()))}break;case 13:kp((function(){var t=Hu(e,1);if(null!==t){var n=hp();gp(t,e,1,n)}})),ah(e,1)}},Ii=function(e){if(13===e.tag){var t=Hu(e,134217728);if(null!==t)gp(t,e,134217728,hp());ah(e,134217728)}},Ni=function(e){if(13===e.tag){var t=mp(e),n=Hu(e,t);if(null!==n)gp(n,e,t,hp());ah(e,t)}},zi=function(){return Li},Bi=function(e,t){var n=Li;try{return Li=e,t()}finally{Li=n}},Io=function(e,t,n){switch(t){case"input":if(fo(e,n),t=n.name,"radio"===n.type&&null!=t){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 o=Ol(r);if(!o)throw Error(yr(90));ao(r),fo(r,o)}}}break;case"textarea":bo(e,n);break;case"select":null!=(t=n.value)&&go(e,!!n.multiple,t,!1)}},Ho=Sp,Uo=kp;var hh={usingClientEntryPoint:!1,Events:[Ml,Ll,Ol,Vo,jo,Sp]},mh={findFiberByHostInstance:Al,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},gh={bundleType:mh.bundleType,version:mh.version,rendererPackageName:mh.rendererPackageName,rendererConfig:mh.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Lr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=ii(e))?null:e.stateNode},findFiberByHostInstance:mh.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var vh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vh.isDisabled&&vh.supportsFiber)try{yi=vh.inject(gh),bi=vh}catch(ko){}}fr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=hh,fr.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ch(t))throw Error(yr(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Fr,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},fr.createRoot=function(e,t){if(!ch(e))throw Error(yr(299));var n=!1,r="",o=sh;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=eh(e,1,!1,null,0,n,0,r,o),e[_l]=t.current,tl(8===e.nodeType?e.parentNode:e),new lh(t)},fr.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(yr(188));throw e=Object.keys(e).join(","),Error(yr(268,e))}return e=null===(e=ii(t))?null:e.stateNode},fr.flushSync=function(e){return kp(e)},fr.hydrate=function(e,t,n){if(!dh(t))throw Error(yr(200));return ph(null,e,t,!0,n)},fr.hydrateRoot=function(e,t,n){if(!ch(e))throw Error(yr(405));var r=null!=n&&n.hydratedSources||null,o=!1,i="",a=sh;if(null!=n&&(!0===n.unstable_strictMode&&(o=!0),void 0!==n.identifierPrefix&&(i=n.identifierPrefix),void 0!==n.onRecoverableError&&(a=n.onRecoverableError)),t=nh(t,null,e,1,null!=n?n:null,o,0,i,a),e[_l]=t.current,tl(e),r)for(e=0;e<r.length;e++)o=(o=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new uh(t)},fr.render=function(e,t,n){if(!dh(t))throw Error(yr(200));return ph(null,e,t,!1,n)},fr.unmountComponentAtNode=function(e){if(!dh(e))throw Error(yr(40));return!!e._reactRootContainer&&(kp((function(){ph(null,null,e,!1,(function(){e._reactRootContainer=null,e[_l]=null}))})),!0)},fr.unstable_batchedUpdates=Sp,fr.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!dh(n))throw Error(yr(200));if(null==e||void 0===e._reactInternals)throw Error(yr(38));return ph(e,t,n,!1,r)},fr.version="18.2.0-next-9e3b772b8-20220608",function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),dr.exports=fr;var yh=dr.exports;const bh=l(yh),wh=W.forwardRef(((e,t)=>{const{children:n,...r}=e,o=W.Children.toArray(n),i=o.find(Sh);if(i){const e=i.props.children,n=o.map((t=>t===i?W.Children.count(e)>1?W.Children.only(null):W.isValidElement(e)?e.props.children:null:t));return W.createElement(xh,Jn({},r,{ref:t}),W.isValidElement(e)?W.cloneElement(e,void 0,n):null)}return W.createElement(xh,Jn({},r,{ref:t}),n)}));wh.displayName="Slot";const xh=W.forwardRef(((e,t)=>{const{children:n,...r}=e;return W.isValidElement(n)?W.cloneElement(n,{...kh(r,n.props),ref:nr(t,n.ref)}):W.Children.count(n)>1?W.Children.only(null):null}));xh.displayName="SlotClone";const Eh=({children:e})=>W.createElement(W.Fragment,null,e);function Sh(e){return W.isValidElement(e)&&e.type===Eh}function kh(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const Ch=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const n=W.forwardRef(((e,n)=>{const{asChild:r,...o}=e,i=r?wh:t;return W.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),W.createElement(i,Jn({},o,{ref:n}))}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function Ph(e,t){e&&yh.flushSync((()=>e.dispatchEvent(t)))}const _h="dismissableLayer.update",Th="dismissableLayer.pointerDownOutside",Rh="dismissableLayer.focusOutside";let Dh;const Ah=W.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Mh=W.forwardRef(((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,c=W.useContext(Ah),[d,f]=W.useState(null),p=null!==(n=null==d?void 0:d.ownerDocument)&&void 0!==n?n:null===globalThis||void 0===globalThis?void 0:globalThis.document,[,h]=W.useState({}),m=rr(t,(e=>f(e))),g=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(v),b=d?g.indexOf(d):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,x=b>=y,E=function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=ur(e),r=W.useRef(!1),o=W.useRef((()=>{}));return W.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){Oh(Th,n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}r.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));x&&!n&&(null==i||i(e),null==s||s(e),e.defaultPrevented||null==l||l())}),p),S=function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=ur(e),r=W.useRef(!1);return W.useEffect((()=>{const e=e=>{if(e.target&&!r.current){Oh(Rh,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==a||a(e),null==s||s(e),e.defaultPrevented||null==l||l())}),p);return function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=ur(e);W.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)}),[n,t])}((e=>{b===c.layers.size-1&&(null==o||o(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))}),p),W.useEffect((()=>{if(d)return r&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(Dh=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),Lh(),()=>{r&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=Dh)}}),[d,p,r,c]),W.useEffect((()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),Lh())}),[d,c]),W.useEffect((()=>{const e=()=>h({});return document.addEventListener(_h,e),()=>document.removeEventListener(_h,e)}),[]),W.createElement(Ch.div,Jn({},u,{ref:m,style:{pointerEvents:w?x?"auto":"none":void 0,...e.style},onFocusCapture:or(e.onFocusCapture,S.onFocusCapture),onBlurCapture:or(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:or(e.onPointerDownCapture,E.onPointerDownCapture)}))}));function Lh(){const e=new CustomEvent(_h);document.dispatchEvent(e)}function Oh(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Ph(o,i):o.dispatchEvent(i)}const Fh=Mh,Ih=W.forwardRef(((e,t)=>{const n=W.useContext(Ah),r=W.useRef(null),o=rr(t,r);return W.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),W.createElement(Ch.div,Jn({},e,{ref:o}))})),Nh="focusScope.autoFocusOnMount",zh="focusScope.autoFocusOnUnmount",Bh={bubbles:!1,cancelable:!0},Vh=W.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=W.useState(null),u=ur(o),c=ur(i),d=W.useRef(null),f=rr(t,(e=>l(e))),p=W.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;W.useEffect((()=>{if(r){let e=function(e){if(p.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:Wh(d.current,{select:!0})},t=function(e){!p.paused&&s&&(s.contains(e.relatedTarget)||Wh(d.current,{select:!0}))};return document.addEventListener("focusin",e),document.addEventListener("focusout",t),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t)}}}),[r,s,p.paused]),W.useEffect((()=>{if(s){$h.add(p);const t=document.activeElement;if(!s.contains(t)){const n=new CustomEvent(Nh,Bh);s.addEventListener(Nh,u),s.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Wh(r,{select:t}),document.activeElement!==n)return}((e=jh(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&Wh(s))}return()=>{s.removeEventListener(Nh,u),setTimeout((()=>{const e=new CustomEvent(zh,Bh);s.addEventListener(zh,c),s.dispatchEvent(e),e.defaultPrevented||Wh(null!=t?t:document.body,{select:!0}),s.removeEventListener(zh,c),$h.remove(p)}),0)}}var e}),[s,u,c,p]);const h=W.useCallback((e=>{if(!n&&!r)return;if(p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,i]=function(e){const t=jh(e),n=Hh(t,e),r=Hh(t.reverse(),e);return[n,r]}(t);r&&i?e.shiftKey||o!==i?e.shiftKey&&o===r&&(e.preventDefault(),n&&Wh(i,{select:!0})):(e.preventDefault(),n&&Wh(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,p.paused]);return W.createElement(Ch.div,Jn({tabIndex:-1},a,{ref:f,onKeyDown:h}))}));function jh(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Hh(e,t){for(const n of e)if(!Uh(n,{upTo:t}))return n}function Uh(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Wh(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}const $h=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=Kh(e,t),e.unshift(t)},remove(t){var n;e=Kh(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function Kh(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}const Xh=W.forwardRef(((e,t)=>{var n;const{container:r=(null===globalThis||void 0===globalThis||null===(n=globalThis.document)||void 0===n?void 0:n.body),...o}=e;return r?bh.createPortal(W.createElement(Ch.div,Jn({},o,{ref:t})),r):null}));const Yh=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=W.useState(),r=W.useRef({}),o=W.useRef(e),i=W.useRef("none"),a=e?"mounted":"unmounted",[s,l]=function(e,t){return W.useReducer(((e,n)=>{const r=t[e][n];return null!=r?r:e}),e)}(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return W.useEffect((()=>{const e=qh(r.current);i.current="mounted"===s?e:"none"}),[s]),ir((()=>{const t=r.current,n=o.current;if(n!==e){const r=i.current,a=qh(t);if(e)l("MOUNT");else if("none"===a||"none"===(null==t?void 0:t.display))l("UNMOUNT");else{l(n&&r!==a?"ANIMATION_OUT":"UNMOUNT")}o.current=e}}),[e,l]),ir((()=>{if(t){const e=e=>{const n=qh(r.current).includes(e.animationName);e.target===t&&n&&yh.flushSync((()=>l("ANIMATION_END")))},n=e=>{e.target===t&&(i.current=qh(r.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}l("ANIMATION_END")}),[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:W.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}(t),o="function"==typeof n?n({present:r.isPresent}):W.Children.only(n),i=rr(r.ref,o.ref);return"function"==typeof n||r.isPresent?W.cloneElement(o,{ref:i}):null};function qh(e){return(null==e?void 0:e.animationName)||"none"}Yh.displayName="Presence";let Qh=0;function Gh(){W.useEffect((()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:Zh()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:Zh()),Qh++,()=>{1===Qh&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Qh--}}),[])}function Zh(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Jh=function(){return Jh=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Jh.apply(this,arguments)};function em(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}"function"==typeof SuppressedError&&SuppressedError;var tm="right-scroll-bar-position",nm="width-before-scroll-bar";function rm(e,t){return n=t||null,r=function(t){return e.forEach((function(e){return function(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}(e,t)}))},o=W.useState((function(){return{value:n,callback:r,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}}))[0],o.callback=r,o.facade;var n,r,o}function om(e){return e}var im=function(e){var t=e.sideCar,n=em(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return W.createElement(r,Jh({},n))};im.isSideCarExport=!0;var am=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=om);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var i=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=Jh({async:!0,ssr:!1},e),t}(),sm=function(){},lm=W.forwardRef((function(e,t){var n=W.useRef(null),r=W.useState({onScrollCapture:sm,onWheelCapture:sm,onTouchMoveCapture:sm}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noIsolation,h=e.inert,m=e.allowPinchZoom,g=e.as,v=void 0===g?"div":g,y=em(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),b=f,w=rm([n,t]),x=Jh(Jh({},y),o);return W.createElement(W.Fragment,null,c&&W.createElement(b,{sideCar:am,removeScrollBar:u,shards:d,noIsolation:p,inert:h,setCallbacks:i,allowPinchZoom:!!m,lockRef:n}),a?W.cloneElement(W.Children.only(s),Jh(Jh({},x),{ref:w})):W.createElement(v,Jh({},x,{className:l,ref:w}),s))}));lm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},lm.classNames={fullWidth:nm,zeroRight:tm};function um(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var cm=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=um())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){!--e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},dm=function(){var e,t=(e=cm(),function(t,n){W.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},fm={left:0,top:0,right:0,gap:0},pm=function(e){return parseInt(e||"",10)||0},hm=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return fm;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[pm(n),pm(r),pm(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},mm=dm(),gm=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(tm," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(nm," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(tm," .").concat(tm," {\n right: 0 ").concat(r,";\n }\n \n .").concat(nm," .").concat(nm," {\n margin-right: 0 ").concat(r,";\n }\n \n body {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},vm=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r,i=W.useMemo((function(){return hm(o)}),[o]);return W.createElement(mm,{styles:gm(i,!t,o,n?"":"!important")})},ym=!1;if("undefined"!=typeof window)try{var bm=Object.defineProperty({},"passive",{get:function(){return ym=!0,!0}});window.addEventListener("test",bm,bm),window.removeEventListener("test",bm,bm)}catch(_O){ym=!1}var wm=!!ym&&{passive:!1},xm=function(e,t){var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},Em=function(e,t){var n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),Sm(e,n)){var r=km(e,n);if(r[1]>r[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Sm=function(e,t){return"v"===e?function(e){return xm(e,"overflowY")}(t):function(e){return xm(e,"overflowX")}(t)},km=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},Cm=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Pm=function(e){return[e.deltaX,e.deltaY]},_m=function(e){return e&&"current"in e?e.current:e},Tm=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Rm=0,Dm=[];const Am=(Mm=function(e){var t=W.useRef([]),n=W.useRef([0,0]),r=W.useRef(),o=W.useState(Rm++)[0],i=W.useState((function(){return dm()}))[0],a=W.useRef(e);W.useEffect((function(){a.current=e}),[e]),W.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(_m),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[e.inert,e.lockRef.current,e.shards]);var s=W.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!a.current.allowPinchZoom;var o,i=Cm(e),s=n.current,l="deltaX"in e?e.deltaX:s[0]-i[0],u="deltaY"in e?e.deltaY:s[1]-i[1],c=e.target,d=Math.abs(l)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=Em(d,c);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=Em(d,c)),!f)return!1;if(!r.current&&"changedTouches"in e&&(l||u)&&(r.current=o),!o)return!0;var p=r.current||o;return function(e,t,n,r,o){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,l=t.contains(s),u=!1,c=a>0,d=0,f=0;do{var p=km(e,s),h=p[0],m=p[1]-p[2]-i*h;(h||m)&&Sm(e,s)&&(d+=m,f+=h),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(c&&(o&&0===d||!o&&a>d)||!c&&(o&&0===f||!o&&-a>f))&&(u=!0),u}(p,t,e,"h"===p?l:u,!0)}),[]),l=W.useCallback((function(e){var n=e;if(Dm.length&&Dm[Dm.length-1]===i){var r="deltaY"in n?Pm(n):Cm(n),o=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&(t=e.delta,o=r,t[0]===o[0]&&t[1]===o[1]);var t,o}))[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var l=(a.current.shards||[]).map(_m).filter(Boolean).filter((function(e){return e.contains(n.target)}));(l.length>0?s(n,l[0]):!a.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),u=W.useCallback((function(e,n,r,o){var i={name:e,delta:n,target:r,should:o};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),c=W.useCallback((function(e){n.current=Cm(e),r.current=void 0}),[]),d=W.useCallback((function(t){u(t.type,Pm(t),t.target,s(t,e.lockRef.current))}),[]),f=W.useCallback((function(t){u(t.type,Cm(t),t.target,s(t,e.lockRef.current))}),[]);W.useEffect((function(){return Dm.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,wm),document.addEventListener("touchmove",l,wm),document.addEventListener("touchstart",c,wm),function(){Dm=Dm.filter((function(e){return e!==i})),document.removeEventListener("wheel",l,wm),document.removeEventListener("touchmove",l,wm),document.removeEventListener("touchstart",c,wm)}}),[]);var p=e.removeScrollBar,h=e.inert;return W.createElement(W.Fragment,null,h?W.createElement(i,{styles:Tm(o)}):null,p?W.createElement(vm,{gapMode:"margin"}):null)},am.useMedium(Mm),im);var Mm,Lm=W.forwardRef((function(e,t){return W.createElement(lm,Jh({},e,{ref:t,sideCar:Am}))}));Lm.classNames=lm.classNames;const Om=Lm;var Fm=new WeakMap,Im=new WeakMap,Nm={},zm=0,Bm=function(e){return e&&(e.host||Bm(e.parentNode))},Vm=function(e,t,n,r){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=Bm(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);Nm[n]||(Nm[n]=new WeakMap);var i=Nm[n],a=[],s=new Set,l=new Set(o),u=function(e){e&&!s.has(e)&&(s.add(e),u(e.parentNode))};o.forEach(u);var c=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(s.has(e))c(e);else{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(Fm.get(e)||0)+1,u=(i.get(e)||0)+1;Fm.set(e,l),i.set(e,u),a.push(e),1===l&&o&&Im.set(e,!0),1===u&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}}))};return c(t),s.clear(),zm++,function(){a.forEach((function(e){var t=Fm.get(e)-1,o=i.get(e)-1;Fm.set(e,t),i.set(e,o),t||(Im.has(e)||e.removeAttribute(r),Im.delete(e)),o||e.removeAttribute(n)})),--zm||(Fm=new WeakMap,Fm=new WeakMap,Im=new WeakMap,Nm={})}},jm=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Vm(r,o,n,"aria-hidden")):function(){return null}};const Hm="Dialog",[Um,Wm]=er(Hm),[$m,Km]=Um(Hm),Xm="DialogPortal",[Ym,qm]=Um(Xm,{forceMount:void 0}),Qm="DialogOverlay",Gm=W.forwardRef(((e,t)=>{const n=qm(Qm,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Km(Qm,e.__scopeDialog);return i.modal?W.createElement(Yh,{present:r||i.open},W.createElement(Zm,Jn({},o,{ref:t}))):null})),Zm=W.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Km(Qm,n);return W.createElement(Om,{as:wh,allowPinchZoom:!0,shards:[o.contentRef]},W.createElement(Ch.div,Jn({"data-state":lg(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))})),Jm="DialogContent",eg=W.forwardRef(((e,t)=>{const n=qm(Jm,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Km(Jm,e.__scopeDialog);return W.createElement(Yh,{present:r||i.open},i.modal?W.createElement(tg,Jn({},o,{ref:t})):W.createElement(ng,Jn({},o,{ref:t})))})),tg=W.forwardRef(((e,t)=>{const n=Km(Jm,e.__scopeDialog),r=W.useRef(null),o=rr(t,n.contentRef,r);return W.useEffect((()=>{const e=r.current;if(e)return jm(e)}),[]),W.createElement(rg,Jn({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:or(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null===(t=n.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:or(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:or(e.onFocusOutside,(e=>e.preventDefault()))}))})),ng=W.forwardRef(((e,t)=>{const n=Km(Jm,e.__scopeDialog),r=W.useRef(!1);return W.createElement(rg,Jn({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var o,i;(null===(o=e.onCloseAutoFocus)||void 0===o||o.call(e,t),t.defaultPrevented)||(r.current||null===(i=n.triggerRef.current)||void 0===i||i.focus(),t.preventDefault());r.current=!1},onInteractOutside:t=>{var o,i;null===(o=e.onInteractOutside)||void 0===o||o.call(e,t),t.defaultPrevented||(r.current=!0);const a=t.target;(null===(i=n.triggerRef.current)||void 0===i?void 0:i.contains(a))&&t.preventDefault()}}))})),rg=W.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=Km(Jm,n),l=rr(t,W.useRef(null));return Gh(),W.createElement(W.Fragment,null,W.createElement(Vh,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},W.createElement(Mh,Jn({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":lg(s.open)},a,{ref:l,onDismiss:()=>s.onOpenChange(!1)}))),!1)})),og="DialogTitle",ig=W.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Km(og,n);return W.createElement(Ch.h2,Jn({id:o.titleId},r,{ref:t}))})),ag=W.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Km("DialogDescription",n);return W.createElement(Ch.p,Jn({id:o.descriptionId},r,{ref:t}))})),sg=W.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Km("DialogClose",n);return W.createElement(Ch.button,Jn({type:"button"},r,{ref:t,onClick:or(e.onClick,(()=>o.onOpenChange(!1)))}))}));function lg(e){return e?"open":"closed"}const[ug,cg]=function(e,t){const n=W.createContext(t);function r(e){const{children:t,...r}=e,o=W.useMemo((()=>r),Object.values(r));return W.createElement(n.Provider,{value:o},t)}return r.displayName=e+"Provider",[r,function(r){const o=W.useContext(n);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}("DialogTitleWarning",{contentName:Jm,titleName:og,docsSlug:"dialog"}),dg=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=W.useRef(null),l=W.useRef(null),[u=!1,c]=cr({prop:r,defaultProp:o,onChange:i});return W.createElement($m,{scope:t,triggerRef:s,contentRef:l,contentId:lr(),titleId:lr(),descriptionId:lr(),open:u,onOpenChange:c,onOpenToggle:W.useCallback((()=>c((e=>!e))),[c]),modal:a},n)},fg=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=Km(Xm,t);return W.createElement(Ym,{scope:t,forceMount:n},W.Children.map(r,(e=>W.createElement(Yh,{present:n||i.open},W.createElement(Xh,{asChild:!0,container:o},e)))))},pg=Gm,hg=eg,mg=ig,gg=ag,vg=sg,[yg,bg]=er("AlertDialog",[Wm]),wg=Wm(),xg=W.forwardRef(((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=wg(n);return W.createElement(pg,Jn({},o,r,{ref:t}))})),Eg="AlertDialogContent",[Sg,kg]=yg(Eg),Cg=W.forwardRef(((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,i=wg(n),a=rr(t,W.useRef(null)),s=W.useRef(null);return W.createElement(ug,{contentName:Eg,titleName:Pg,docsSlug:"alert-dialog"},W.createElement(Sg,{scope:n,cancelRef:s},W.createElement(hg,Jn({role:"alertdialog"},i,o,{ref:a,onOpenAutoFocus:or(o.onOpenAutoFocus,(e=>{var t;e.preventDefault(),null===(t=s.current)||void 0===t||t.focus({preventScroll:!0})})),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault()}),W.createElement(Eh,null,r),!1)))})),Pg="AlertDialogTitle",_g=W.forwardRef(((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=wg(n);return W.createElement(mg,Jn({},o,r,{ref:t}))})),Tg=W.forwardRef(((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=wg(n);return W.createElement(gg,Jn({},o,r,{ref:t}))})),Rg=e=>{const{__scopeAlertDialog:t,...n}=e,r=wg(t);return W.createElement(dg,Jn({},r,n,{modal:!0}))},Dg=e=>{const{__scopeAlertDialog:t,...n}=e,r=wg(t);return W.createElement(fg,Jn({},r,n))},Ag=xg,Mg=Cg,Lg=W.forwardRef(((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=wg(n);return W.createElement(vg,Jn({},o,r,{ref:t}))})),Og=W.forwardRef(((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=kg("AlertDialogCancel",n),i=wg(n),a=rr(t,o);return W.createElement(vg,Jn({},i,r,{ref:a}))})),Fg=_g,Ig=Tg;var Ng={},zg=yh;function Bg(e){const t=e+"CollectionProvider",[n,r]=er(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=e+"CollectionSlot",s=e+"CollectionItemSlot",l="data-radix-collection-item";return[{Provider:e=>{const{scope:t,children:n}=e,r=$.useRef(null),i=$.useRef(new Map).current;return $.createElement(o,{scope:t,itemMap:i,collectionRef:r},n)},Slot:$.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=rr(t,i(a,n).collectionRef);return $.createElement(wh,{ref:o},r)})),ItemSlot:$.forwardRef(((e,t)=>{const{scope:n,children:r,...o}=e,a=$.useRef(null),u=rr(t,a),c=i(s,n);return $.useEffect((()=>(c.itemMap.set(a,{ref:a,...o}),()=>{c.itemMap.delete(a)}))),$.createElement(wh,{[l]:"",ref:u},r)}))},function(t){const n=i(e+"CollectionConsumer",t),r=$.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${l}]`)),r=Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)));return r}),[n.collectionRef,n.itemMap]);return r},r]}Ng.createRoot=zg.createRoot,Ng.hydrateRoot=zg.hydrateRoot;const Vg=W.forwardRef(((e,t)=>W.createElement(Ch.span,Jn({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})))),jg="ToastProvider",[Hg,Ug,Wg]=Bg("Toast"),[$g,Kg]=er("Toast",[Wg]),[Xg,Yg]=$g(jg),qg=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=W.useState(null),[u,c]=W.useState(0),d=W.useRef(!1),f=W.useRef(!1);return W.createElement(Hg.Provider,{scope:t},W.createElement(Xg,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:u,viewport:s,onViewportChange:l,onToastAdd:W.useCallback((()=>c((e=>e+1))),[]),onToastRemove:W.useCallback((()=>c((e=>e-1))),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f},a))};qg.propTypes={label(e){if(e.label&&"string"==typeof e.label&&!e.label.trim()){return new Error(`Invalid prop \`label\` supplied to \`${jg}\`. Expected non-empty \`string\`.`)}return null}};const Qg=["F8"],Gg="toast.viewportPause",Zg="toast.viewportResume",Jg=W.forwardRef(((e,t)=>{const{__scopeToast:n,hotkey:r=Qg,label:o="Notifications ({hotkey})",...i}=e,a=Yg("ToastViewport",n),s=Ug(n),l=W.useRef(null),u=W.useRef(null),c=W.useRef(null),d=W.useRef(null),f=rr(t,d,a.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=a.toastCount>0;W.useEffect((()=>{const e=e=>{var t;const n=r.every((t=>e[t]||e.code===t));n&&(null===(t=d.current)||void 0===t||t.focus())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[r]),W.useEffect((()=>{const e=l.current,t=d.current;if(h&&e&&t){const n=()=>{if(!a.isClosePausedRef.current){const e=new CustomEvent(Gg);t.dispatchEvent(e),a.isClosePausedRef.current=!0}},r=()=>{if(a.isClosePausedRef.current){const e=new CustomEvent(Zg);t.dispatchEvent(e),a.isClosePausedRef.current=!1}},o=t=>{!e.contains(t.relatedTarget)&&r()},i=()=>{e.contains(document.activeElement)||r()};return e.addEventListener("focusin",n),e.addEventListener("focusout",o),e.addEventListener("pointermove",n),e.addEventListener("pointerleave",i),window.addEventListener("blur",n),window.addEventListener("focus",r),()=>{e.removeEventListener("focusin",n),e.removeEventListener("focusout",o),e.removeEventListener("pointermove",n),e.removeEventListener("pointerleave",i),window.removeEventListener("blur",n),window.removeEventListener("focus",r)}}}),[h,a.isClosePausedRef]);const m=W.useCallback((({tabbingDirection:e})=>{const t=s().map((t=>{const n=t.ref.current,r=[n,...mv(n)];return"forwards"===e?r:r.reverse()}));return("forwards"===e?t.reverse():t).flat()}),[s]);return W.useEffect((()=>{const e=d.current;if(e){const t=t=>{const n=t.altKey||t.ctrlKey||t.metaKey;if("Tab"===t.key&&!n){const n=document.activeElement,a=t.shiftKey;var r;if(t.target===e&&a)return void(null===(r=u.current)||void 0===r||r.focus());const s=m({tabbingDirection:a?"backwards":"forwards"}),l=s.findIndex((e=>e===n));var o,i;if(gv(s.slice(l+1)))t.preventDefault();else a?null===(o=u.current)||void 0===o||o.focus():null===(i=c.current)||void 0===i||i.focus()}};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)}}),[s,m]),W.createElement(Ih,{ref:l,role:"region","aria-label":o.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:h?void 0:"none"}},h&&W.createElement(ev,{ref:u,onFocusFromOutsideViewport:()=>{gv(m({tabbingDirection:"forwards"}))}}),W.createElement(Hg.Slot,{scope:n},W.createElement(Ch.ol,Jn({tabIndex:-1},i,{ref:f}))),h&&W.createElement(ev,{ref:c,onFocusFromOutsideViewport:()=>{gv(m({tabbingDirection:"backwards"}))}}))})),ev=W.forwardRef(((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=Yg("ToastFocusProxy",n);return W.createElement(Vg,Jn({"aria-hidden":!0,tabIndex:0},o,{ref:t,style:{position:"fixed"},onFocus:e=>{var t;const n=e.relatedTarget;!(null!==(t=i.viewport)&&void 0!==t&&t.contains(n))&&r()}}))})),tv="Toast",nv=W.forwardRef(((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,l]=cr({prop:r,defaultProp:o,onChange:i});return W.createElement(Yh,{present:n||s},W.createElement(iv,Jn({open:s},a,{ref:t,onClose:()=>l(!1),onPause:ur(e.onPause),onResume:ur(e.onResume),onSwipeStart:or(e.onSwipeStart,(e=>{e.currentTarget.setAttribute("data-swipe","start")})),onSwipeMove:or(e.onSwipeMove,(e=>{const{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","move"),e.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${t}px`),e.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${n}px`)})),onSwipeCancel:or(e.onSwipeCancel,(e=>{e.currentTarget.setAttribute("data-swipe","cancel"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")})),onSwipeEnd:or(e.onSwipeEnd,(e=>{const{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","end"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${t}px`),e.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${n}px`),l(!1)}))})))})),[rv,ov]=$g(tv,{onClose(){}}),iv=W.forwardRef(((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:p,...h}=e,m=Yg(tv,n),[g,v]=W.useState(null),y=rr(t,(e=>v(e))),b=W.useRef(null),w=W.useRef(null),x=o||m.duration,E=W.useRef(0),S=W.useRef(x),k=W.useRef(0),{onToastAdd:C,onToastRemove:P}=m,_=ur((()=>{var e;(null==g?void 0:g.contains(document.activeElement))&&(null===(e=m.viewport)||void 0===e||e.focus()),a()})),T=W.useCallback((e=>{e&&e!==1/0&&(window.clearTimeout(k.current),E.current=(new Date).getTime(),k.current=window.setTimeout(_,e))}),[_]);W.useEffect((()=>{const e=m.viewport;if(e){const t=()=>{T(S.current),null==u||u()},n=()=>{const e=(new Date).getTime()-E.current;S.current=S.current-e,window.clearTimeout(k.current),null==l||l()};return e.addEventListener(Gg,n),e.addEventListener(Zg,t),()=>{e.removeEventListener(Gg,n),e.removeEventListener(Zg,t)}}}),[m.viewport,x,l,u,T]),W.useEffect((()=>{i&&!m.isClosePausedRef.current&&T(x)}),[i,x,m.isClosePausedRef,T]),W.useEffect((()=>(C(),()=>P())),[C,P]);const R=W.useMemo((()=>g?fv(g):null),[g]);return m.viewport?W.createElement(W.Fragment,null,R&&W.createElement(av,{__scopeToast:n,role:"status","aria-live":"foreground"===r?"assertive":"polite","aria-atomic":!0},R),W.createElement(rv,{scope:n,onClose:_},yh.createPortal(W.createElement(Hg.ItemSlot,{scope:n},W.createElement(Fh,{asChild:!0,onEscapeKeyDown:or(s,(()=>{m.isFocusedToastEscapeKeyDownRef.current||_(),m.isFocusedToastEscapeKeyDownRef.current=!1}))},W.createElement(Ch.li,Jn({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection},h,{ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:or(e.onKeyDown,(e=>{"Escape"===e.key&&(null==s||s(e.nativeEvent),e.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,_()))})),onPointerDown:or(e.onPointerDown,(e=>{0===e.button&&(b.current={x:e.clientX,y:e.clientY})})),onPointerMove:or(e.onPointerMove,(e=>{if(!b.current)return;const t=e.clientX-b.current.x,n=e.clientY-b.current.y,r=Boolean(w.current),o=["left","right"].includes(m.swipeDirection),i=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,a=o?i(0,t):0,s=o?0:i(0,n),l="touch"===e.pointerType?10:2,u={x:a,y:s},f={originalEvent:e,delta:u};r?(w.current=u,pv("toast.swipeMove",d,f,{discrete:!1})):hv(u,m.swipeDirection,l)?(w.current=u,pv("toast.swipeStart",c,f,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>l||Math.abs(n)>l)&&(b.current=null)})),onPointerUp:or(e.onPointerUp,(e=>{const t=w.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),w.current=null,b.current=null,t){const n=e.currentTarget,r={originalEvent:e,delta:t};hv(t,m.swipeDirection,m.swipeThreshold)?pv("toast.swipeEnd",p,r,{discrete:!0}):pv("toast.swipeCancel",f,r,{discrete:!0}),n.addEventListener("click",(e=>e.preventDefault()),{once:!0})}}))})))),m.viewport))):null}));iv.propTypes={type(e){if(e.type&&!["foreground","background"].includes(e.type)){return new Error(`Invalid prop \`type\` supplied to \`${tv}\`. Expected \`foreground | background\`.`)}return null}};const av=e=>{const{__scopeToast:t,children:n,...r}=e,o=Yg(tv,t),[i,a]=W.useState(!1),[s,l]=W.useState(!1);return function(e=(()=>{})){const t=ur(e);ir((()=>{let e=0,n=0;return e=window.requestAnimationFrame((()=>n=window.requestAnimationFrame(t))),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}}),[t])}((()=>a(!0))),W.useEffect((()=>{const e=window.setTimeout((()=>l(!0)),1e3);return()=>window.clearTimeout(e)}),[]),s?null:W.createElement(Xh,{asChild:!0},W.createElement(Vg,r,i&&W.createElement(W.Fragment,null,o.label," ",n)))},sv=W.forwardRef(((e,t)=>{const{__scopeToast:n,...r}=e;return W.createElement(Ch.div,Jn({},r,{ref:t}))})),lv=W.forwardRef(((e,t)=>{const{__scopeToast:n,...r}=e;return W.createElement(Ch.div,Jn({},r,{ref:t}))})),uv=W.forwardRef(((e,t)=>{const{altText:n,...r}=e;return n?W.createElement(dv,{altText:n,asChild:!0},W.createElement(cv,Jn({},r,{ref:t}))):null}));uv.propTypes={altText:e=>e.altText?null:new Error("Missing prop `altText` expected on `ToastAction`")};const cv=W.forwardRef(((e,t)=>{const{__scopeToast:n,...r}=e,o=ov("ToastClose",n);return W.createElement(dv,{asChild:!0},W.createElement(Ch.button,Jn({type:"button"},r,{ref:t,onClick:or(e.onClick,o.onClose)})))})),dv=W.forwardRef(((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return W.createElement(Ch.div,Jn({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0},o,{ref:t}))}));function fv(e){const t=[];return Array.from(e.childNodes).forEach((e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),function(e){return e.nodeType===e.ELEMENT_NODE}(e)){const n=e.ariaHidden||e.hidden||"none"===e.style.display,r=""===e.dataset.radixToastAnnounceExclude;if(!n)if(r){const n=e.dataset.radixToastAnnounceAlt;n&&t.push(n)}else t.push(...fv(e))}})),t}function pv(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Ph(o,i):o.dispatchEvent(i)}const hv=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return"left"===t||"right"===t?i&&r>n:!i&&o>n};function mv(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function gv(e){const t=document.activeElement;return e.some((e=>e===t||(e.focus(),document.activeElement!==t)))}const vv=qg,yv=Jg,bv=nv,wv=sv,xv=lv,Ev=uv;function Sv(e){return e.split("-")[0]}function kv(e){return e.split("-")[1]}function Cv(e){return["top","bottom"].includes(Sv(e))?"x":"y"}function Pv(e){return"y"===e?"height":"width"}function _v(e,t,n){let{reference:r,floating:o}=e;const i=r.x+r.width/2-o.width/2,a=r.y+r.height/2-o.height/2,s=Cv(t),l=Pv(s),u=r[l]/2-o[l]/2,c="x"===s;let d;switch(Sv(t)){case"top":d={x:i,y:r.y-o.height};break;case"bottom":d={x:i,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:a};break;case"left":d={x:r.x-o.width,y:a};break;default:d={x:r.x,y:r.y}}switch(kv(t)){case"start":d[s]-=u*(n&&c?-1:1);break;case"end":d[s]+=u*(n&&c?-1:1)}return d}function Tv(e){return"number"!=typeof e?(t=e,{top:0,right:0,bottom:0,left:0,...t}):{top:e,right:e,bottom:e,left:e};var t}function Rv(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function Dv(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=t,h=Tv(p),m=s[f?"floating"===d?"reference":"floating":d],g=Rv(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),v=Rv(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===d?{...a.floating,x:r,y:o}:a.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),strategy:l}):a[d]);return{top:g.top-v.top+h.top,bottom:v.bottom-g.bottom+h.bottom,left:g.left-v.left+h.left,right:v.right-g.right+h.right}}const Av=Math.min,Mv=Math.max;function Lv(e,t,n){return Mv(e,Av(t,n))}const Ov=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=null!=e?e:{},{x:o,y:i,placement:a,rects:s,platform:l}=t;if(null==n)return{};const u=Tv(r),c={x:o,y:i},d=Cv(a),f=kv(a),p=Pv(d),h=await l.getDimensions(n),m="y"===d?"top":"left",g="y"===d?"bottom":"right",v=s.reference[p]+s.reference[d]-c[d]-s.floating[p],y=c[d]-s.reference[d],b=await(null==l.getOffsetParent?void 0:l.getOffsetParent(n));let w=b?"y"===d?b.clientHeight||0:b.clientWidth||0:0;0===w&&(w=s.floating[p]);const x=v/2-y/2,E=u[m],S=w-h[p]-u[g],k=w/2-h[p]/2+x,C=Lv(E,k,S),P=("start"===f?u[m]:u[g])>0&&k!==C&&s.reference[p]<=s.floating[p];return{[d]:c[d]-(P?k<E?E-k:S-k:0),data:{[d]:C,centerOffset:k-C}}}}),Fv={left:"right",right:"left",bottom:"top",top:"bottom"};function Iv(e){return e.replace(/left|right|bottom|top/g,(e=>Fv[e]))}const Nv={start:"end",end:"start"};function zv(e){return e.replace(/start|end/g,(e=>Nv[e]))}const Bv=["top","right","bottom","left"];Bv.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);const Vv=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:c=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",flipAlignment:p=!0,...h}=e,m=Sv(r),g=[a,...d||(m!==a&&p?function(e){const t=Iv(e);return[zv(e),t,zv(t)]}(a):[Iv(a)])],v=await Dv(t,h),y=[];let b=(null==(n=o.flip)?void 0:n.overflows)||[];if(u&&y.push(v[m]),c){const{main:e,cross:t}=function(e,t,n){void 0===n&&(n=!1);const r=kv(e),o=Cv(e),i=Pv(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Iv(a)),{main:a,cross:Iv(a)}}(r,i,await(null==s.isRTL?void 0:s.isRTL(l.floating)));y.push(v[e],v[t])}if(b=[...b,{placement:r,overflows:y}],!y.every((e=>e<=0))){var w,x;const e=(null!=(w=null==(x=o.flip)?void 0:x.index)?w:0)+1,t=g[e];if(t)return{data:{index:e,overflows:b},reset:{placement:t}};let n="bottom";switch(f){case"bestFit":{var E;const e=null==(E=b.map((e=>[e,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:E[0].placement;e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}};function jv(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Hv(e){return Bv.some((t=>e[t]>=0))}const Uv=function(e){let{strategy:t="referenceHidden",...n}=void 0===e?{}:e;return{name:"hide",async fn(e){const{rects:r}=e;switch(t){case"referenceHidden":{const t=jv(await Dv(e,{...n,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:Hv(t)}}}case"escaped":{const t=jv(await Dv(e,{...n,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:Hv(t)}}}default:return{}}}}};function Wv(e){return"x"===e?"y":"x"}const $v=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=e,u={x:n,y:r},c=await Dv(t,l),d=Cv(Sv(o)),f=Wv(d);let p=u[d],h=u[f];if(i){const e="y"===d?"bottom":"right";p=Lv(p+c["y"===d?"top":"left"],p,p-c[e])}if(a){const e="y"===f?"bottom":"right";h=Lv(h+c["y"===f?"top":"left"],h,h-c[e])}const m=s.fn({...t,[d]:p,[f]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}};function Kv(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Xv(e){if(null==e)return window;if(!Kv(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Yv(e){return Xv(e).getComputedStyle(e)}function qv(e){return Kv(e)?"":e?(e.nodeName||"").toLowerCase():""}function Qv(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function Gv(e){return e instanceof Xv(e).HTMLElement}function Zv(e){return e instanceof Xv(e).Element}function Jv(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Xv(e).ShadowRoot||e instanceof ShadowRoot)}function ey(e){const{overflow:t,overflowX:n,overflowY:r}=Yv(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function ty(e){return["table","td","th"].includes(qv(e))}function ny(e){const t=/firefox/i.test(Qv()),n=Yv(e);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter}function ry(){return!/^((?!chrome|android).)*safari/i.test(Qv())}const oy=Math.min,iy=Math.max,ay=Math.round;function sy(e,t,n){var r,o,i,a;void 0===t&&(t=!1),void 0===n&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Gv(e)&&(l=e.offsetWidth>0&&ay(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&ay(s.height)/e.offsetHeight||1);const c=Zv(e)?Xv(e):window,d=!ry()&&n,f=(s.left+(d&&null!=(r=null==(o=c.visualViewport)?void 0:o.offsetLeft)?r:0))/l,p=(s.top+(d&&null!=(i=null==(a=c.visualViewport)?void 0:a.offsetTop)?i:0))/u,h=s.width/l,m=s.height/u;return{width:h,height:m,top:p,right:f+h,bottom:p+m,left:f,x:f,y:p}}function ly(e){return(t=e,(t instanceof Xv(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function uy(e){return Zv(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function cy(e){return sy(ly(e)).left+uy(e).scrollLeft}function dy(e,t,n){const r=Gv(t),o=ly(t),i=sy(e,r&&function(e){const t=sy(e);return ay(t.width)!==e.offsetWidth||ay(t.height)!==e.offsetHeight}(t),"fixed"===n);let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==qv(t)||ey(o))&&(a=uy(t)),Gv(t)){const e=sy(t,!0);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=cy(o));return{x:i.left+a.scrollLeft-s.x,y:i.top+a.scrollTop-s.y,width:i.width,height:i.height}}function fy(e){return"html"===qv(e)?e:e.assignedSlot||e.parentNode||(Jv(e)?e.host:null)||ly(e)}function py(e){return Gv(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function hy(e){const t=Xv(e);let n=py(e);for(;n&&ty(n)&&"static"===getComputedStyle(n).position;)n=py(n);return n&&("html"===qv(n)||"body"===qv(n)&&"static"===getComputedStyle(n).position&&!ny(n))?t:n||function(e){let t=fy(e);for(Jv(t)&&(t=t.host);Gv(t)&&!["html","body"].includes(qv(t));){if(ny(t))return t;t=t.parentNode}return null}(e)||t}function my(e){if(Gv(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=sy(e);return{width:t.width,height:t.height}}function gy(e){const t=fy(e);return["html","body","#document"].includes(qv(t))?e.ownerDocument.body:Gv(t)&&ey(t)?t:gy(t)}function vy(e,t){var n;void 0===t&&(t=[]);const r=gy(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=Xv(r),a=o?[i].concat(i.visualViewport||[],ey(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(vy(a))}function yy(e,t,n){return"viewport"===t?Rv(function(e,t){const n=Xv(e),r=ly(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=ry();(e||!e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,n)):Zv(t)?function(e,t){const n=sy(e,!1,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft;return{top:r,left:o,x:o,y:r,right:o+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):Rv(function(e){var t;const n=ly(e),r=uy(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=iy(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=iy(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let s=-r.scrollLeft+cy(e);const l=-r.scrollTop;return"rtl"===Yv(o||n).direction&&(s+=iy(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(ly(e)))}function by(e){const t=vy(e),n=["absolute","fixed"].includes(Yv(e).position)&&Gv(e)?hy(e):e;return Zv(n)?t.filter((e=>Zv(e)&&function(e,t){const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Jv(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(e,n)&&"body"!==qv(e))):[]}const wy={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?by(t):[].concat(n),r],a=i[0],s=i.reduce(((e,n)=>{const r=yy(t,n,o);return e.top=iy(r.top,e.top),e.right=oy(r.right,e.right),e.bottom=oy(r.bottom,e.bottom),e.left=iy(r.left,e.left),e}),yy(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Gv(n),i=ly(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==qv(n)||ey(i))&&(a=uy(n)),Gv(n))){const e=sy(n,!0);s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}},isElement:Zv,getDimensions:my,getOffsetParent:hy,getDocumentElement:ly,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:dy(t,hy(n),r),floating:{...my(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===Yv(e).direction};function xy(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=o&&!s,u=i&&!s,c=l||u?[...Zv(e)?vy(e):[],...vy(t)]:[];c.forEach((e=>{l&&e.addEventListener("scroll",n,{passive:!0}),u&&e.addEventListener("resize",n)}));let d,f=null;if(a){let r=!0;f=new ResizeObserver((()=>{r||n(),r=!1})),Zv(e)&&!s&&f.observe(e),f.observe(t)}let p=s?sy(e):null;return s&&function t(){const r=sy(e);!p||r.x===p.x&&r.y===p.y&&r.width===p.width&&r.height===p.height||n(),p=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{l&&e.removeEventListener("scroll",n),u&&e.removeEventListener("resize",n)})),null==(e=f)||e.disconnect(),f=null,s&&cancelAnimationFrame(d)}}const Ey=(e,t,n)=>(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=await(null==a.isRTL?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:c}=_v(l,r,s),d=r,f={},p=0;for(let h=0;h<i.length;h++){const{name:n,fn:m}=i[h],{x:g,y:v,data:y,reset:b}=await m({x:u,y:c,initialPlacement:r,placement:d,strategy:o,middlewareData:f,rects:l,platform:a,elements:{reference:e,floating:t}});u=null!=g?g:u,c=null!=v?v:c,f={...f,[n]:{...f[n],...y}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(l=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:c}=_v(l,d,s))),h=-1)}return{x:u,y:c,placement:d,strategy:o,middlewareData:f}})(e,t,{platform:wy,...n});var Sy="undefined"!=typeof document?W.useLayoutEffect:W.useEffect;function ky(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;0!=r--;)if(!ky(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!ky(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Cy(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:o}=void 0===e?{}:e;const i=W.useRef(null),a=W.useRef(null),s=function(e){const t=W.useRef(e);return Sy((()=>{t.current=e})),t}(o),l=W.useRef(null),[u,c]=W.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[d,f]=W.useState(t);ky(null==d?void 0:d.map((e=>{let{options:t}=e;return t})),null==t?void 0:t.map((e=>{let{options:t}=e;return t})))||f(t);const p=W.useCallback((()=>{i.current&&a.current&&Ey(i.current,a.current,{middleware:d,placement:n,strategy:r}).then((e=>{h.current&&yh.flushSync((()=>{c(e)}))}))}),[d,n,r]);Sy((()=>{h.current&&p()}),[p]);const h=W.useRef(!1);Sy((()=>(h.current=!0,()=>{h.current=!1})),[]);const m=W.useCallback((()=>{if("function"==typeof l.current&&(l.current(),l.current=null),i.current&&a.current)if(s.current){const e=s.current(i.current,a.current,p);l.current=e}else p()}),[p,s]),g=W.useCallback((e=>{i.current=e,m()}),[m]),v=W.useCallback((e=>{a.current=e,m()}),[m]),y=W.useMemo((()=>({reference:i,floating:a})),[]);return W.useMemo((()=>({...u,update:p,refs:y,reference:g,floating:v})),[u,p,y,g,v])}const Py=e=>{const{element:t,padding:n}=e;return{name:"arrow",options:e,fn:e=>function(e){return Object.prototype.hasOwnProperty.call(e,"current")}(t)?null!=t.current?Ov({element:t.current,padding:n}).fn(e):{}:t?Ov({element:t,padding:n}).fn(e):{}}},_y=W.forwardRef(((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return W.createElement(Ch.svg,Jn({},i,{ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:W.createElement("polygon",{points:"0,0 30,0 15,10"}))}));function Ty(e){const[t,n]=W.useState(void 0);return ir((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}const Ry="Popper",[Dy,Ay]=er(Ry),[My,Ly]=Dy(Ry),Oy=W.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Ly("PopperAnchor",n),a=W.useRef(null),s=rr(t,a);return W.useEffect((()=>{i.onAnchorChange((null==r?void 0:r.current)||a.current)})),r?null:W.createElement(Ch.div,Jn({},o,{ref:s}))})),Fy="PopperContent",[Iy,Ny]=Dy(Fy),[zy,By]=Dy(Fy,{hasParent:!1,positionUpdateFns:new Set}),Vy=W.forwardRef(((e,t)=>{var n,r,o,i,a,s,l,u;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:p="center",alignOffset:h=0,arrowPadding:m=0,collisionBoundary:g=[],collisionPadding:v=0,sticky:y="partial",hideWhenDetached:b=!1,avoidCollisions:w=!0,onPlaced:x,...E}=e,S=Ly(Fy,c),[k,C]=W.useState(null),P=rr(t,(e=>C(e))),[_,T]=W.useState(null),R=Ty(_),D=null!==(n=null==R?void 0:R.width)&&void 0!==n?n:0,A=null!==(r=null==R?void 0:R.height)&&void 0!==r?r:0,M=d+("center"!==p?"-"+p:""),L="number"==typeof v?v:{top:0,right:0,bottom:0,left:0,...v},O=Array.isArray(g)?g:[g],F=O.length>0,I={padding:L,boundary:O.filter(Uy),altBoundary:F},{reference:N,floating:z,strategy:B,x:V,y:j,placement:H,middlewareData:U,update:$}=Cy({strategy:"fixed",placement:M,whileElementsMounted:xy,middleware:[Wy(),(Y={mainAxis:f+A,alignmentAxis:h},void 0===Y&&(Y=0),{name:"offset",options:Y,async fn(e){const{x:t,y:n}=e,r=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=Sv(n),s=kv(n),l="x"===Cv(n),u=["left","top"].includes(a)?-1:1,c=i&&l?-1:1,d="function"==typeof t?t(e):t;let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof h&&(p="end"===s?-1*h:h),l?{x:p*c,y:f*u}:{x:f*u,y:p*c}}(e,Y);return{x:t+r.x,y:n+r.y,data:r}}}),w?$v({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?(void 0===X&&(X={}),{options:X,fn(e){const{x:t,y:n,placement:r,rects:o,middlewareData:i}=e,{offset:a=0,mainAxis:s=!0,crossAxis:l=!0}=X,u={x:t,y:n},c=Cv(r),d=Wv(c);let f=u[c],p=u[d];const h="function"==typeof a?a({...o,placement:r}):a,m="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(s){const e="y"===c?"height":"width",t=o.reference[c]-o.floating[e]+m.mainAxis,n=o.reference[c]+o.reference[e]-m.mainAxis;f<t?f=t:f>n&&(f=n)}if(l){var g,v,y,b;const e="y"===c?"width":"height",t=["top","left"].includes(Sv(r)),n=o.reference[d]-o.floating[e]+(t&&null!=(g=null==(v=i.offset)?void 0:v[d])?g:0)+(t?0:m.crossAxis),a=o.reference[d]+o.reference[e]+(t?0:null!=(y=null==(b=i.offset)?void 0:b[d])?y:0)-(t?m.crossAxis:0);p<n?p=n:p>a&&(p=a)}return{[c]:f,[d]:p}}}):void 0,...I}):void 0,_?Py({element:_,padding:m}):void 0,w?Vv({...I}):void 0,(K={...I,apply:({elements:e,availableWidth:t,availableHeight:n})=>{e.floating.style.setProperty("--radix-popper-available-width",`${t}px`),e.floating.style.setProperty("--radix-popper-available-height",`${n}px`)}},void 0===K&&(K={}),{name:"size",options:K,async fn(e){const{placement:t,rects:n,platform:r,elements:o}=e,{apply:i,...a}=K,s=await Dv(e,a),l=Sv(t),u=kv(t);let c,d;"top"===l||"bottom"===l?(c=l,d=u===(await(null==r.isRTL?void 0:r.isRTL(o.floating))?"start":"end")?"left":"right"):(d=l,c="end"===u?"top":"bottom");const f=Mv(s.left,0),p=Mv(s.right,0),h=Mv(s.top,0),m=Mv(s.bottom,0),g={availableHeight:n.floating.height-(["left","right"].includes(t)?2*(0!==h||0!==m?h+m:Mv(s.top,s.bottom)):s[c]),availableWidth:n.floating.width-(["top","bottom"].includes(t)?2*(0!==f||0!==p?f+p:Mv(s.left,s.right)):s[d])},v=await r.getDimensions(o.floating);null==i||i({...e,...g});const y=await r.getDimensions(o.floating);return v.width!==y.width||v.height!==y.height?{reset:{rects:!0}}:{}}}),$y({arrowWidth:D,arrowHeight:A}),b?Uv({strategy:"referenceHidden"}):void 0].filter(Hy)});var K,X,Y;ir((()=>{N(S.anchor)}),[N,S.anchor]);const q=null!==V&&null!==j,[Q,G]=Ky(H),Z=ur(x);ir((()=>{q&&(null==Z||Z())}),[q,Z]);const J=null===(o=U.arrow)||void 0===o?void 0:o.x,ee=null===(i=U.arrow)||void 0===i?void 0:i.y,te=0!==(null===(a=U.arrow)||void 0===a?void 0:a.centerOffset),[ne,re]=W.useState();ir((()=>{k&&re(window.getComputedStyle(k).zIndex)}),[k]);const{hasParent:oe,positionUpdateFns:ie}=By(Fy,c),ae=!oe;W.useLayoutEffect((()=>{if(!ae)return ie.add($),()=>{ie.delete($)}}),[ae,ie,$]),ir((()=>{ae&&q&&Array.from(ie).reverse().forEach((e=>requestAnimationFrame(e)))}),[ae,q,ie]);const se={"data-side":Q,"data-align":G,...E,ref:P,style:{...E.style,animation:q?void 0:"none",opacity:null!==(s=U.hide)&&void 0!==s&&s.referenceHidden?0:void 0}};return W.createElement("div",{ref:z,"data-radix-popper-content-wrapper":"",style:{position:B,left:0,top:0,transform:q?`translate3d(${Math.round(V)}px, ${Math.round(j)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[null===(l=U.transformOrigin)||void 0===l?void 0:l.x,null===(u=U.transformOrigin)||void 0===u?void 0:u.y].join(" ")},dir:e.dir},W.createElement(Iy,{scope:c,placedSide:Q,onArrowChange:T,arrowX:J,arrowY:ee,shouldHideArrow:te},ae?W.createElement(zy,{scope:c,hasParent:!0,positionUpdateFns:ie},W.createElement(Ch.div,se)):W.createElement(Ch.div,se)))})),jy={top:"bottom",right:"left",bottom:"top",left:"right"};function Hy(e){return void 0!==e}function Uy(e){return null!==e}const Wy=()=>({name:"anchorCssProperties",fn(e){const{rects:t,elements:n}=e,{width:r,height:o}=t.reference;return n.floating.style.setProperty("--radix-popper-anchor-width",`${r}px`),n.floating.style.setProperty("--radix-popper-anchor-height",`${o}px`),{}}}),$y=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:s,rects:l,middlewareData:u}=t,c=0!==(null===(n=u.arrow)||void 0===n?void 0:n.centerOffset),d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,h]=Ky(s),m={start:"0%",center:"50%",end:"100%"}[h],g=(null!==(r=null===(o=u.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,v=(null!==(i=null===(a=u.arrow)||void 0===a?void 0:a.y)&&void 0!==i?i:0)+f/2;let y="",b="";return"bottom"===p?(y=c?m:`${g}px`,b=-f+"px"):"top"===p?(y=c?m:`${g}px`,b=`${l.floating.height+f}px`):"right"===p?(y=-f+"px",b=c?m:`${v}px`):"left"===p&&(y=`${l.floating.width+f}px`,b=c?m:`${v}px`),{data:{x:y,y:b}}}});function Ky(e){const[t,n="center"]=e.split("-");return[t,n]}const Xy=e=>{const{__scopePopper:t,children:n}=e,[r,o]=W.useState(null);return W.createElement(My,{scope:t,anchor:r,onAnchorChange:o},n)},Yy=Oy,qy=Vy,Qy=W.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,o=Ny("PopperArrow",n),i=jy[o.placedSide];return W.createElement("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0}},W.createElement(_y,Jn({},r,{ref:t,style:{...r.style,display:"block"}})))})),Gy="Popover",[Zy,Jy]=er(Gy,[Ay]),eb=Ay(),[tb,nb]=Zy(Gy),rb=W.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=nb("PopoverTrigger",n),i=eb(n),a=rr(t,o.triggerRef),s=W.createElement(Ch.button,Jn({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":fb(o.open)},r,{ref:a,onClick:or(e.onClick,o.onOpenToggle)}));return o.hasCustomAnchor?s:W.createElement(Yy,Jn({asChild:!0},i),s)})),ob="PopoverPortal",[ib,ab]=Zy(ob,{forceMount:void 0}),sb="PopoverContent",lb=W.forwardRef(((e,t)=>{const n=ab(sb,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=nb(sb,e.__scopePopover);return W.createElement(Yh,{present:r||i.open},i.modal?W.createElement(ub,Jn({},o,{ref:t})):W.createElement(cb,Jn({},o,{ref:t})))})),ub=W.forwardRef(((e,t)=>{const n=nb(sb,e.__scopePopover),r=W.useRef(null),o=rr(t,r),i=W.useRef(!1);return W.useEffect((()=>{const e=r.current;if(e)return jm(e)}),[]),W.createElement(Om,{as:wh,allowPinchZoom:!0},W.createElement(db,Jn({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:or(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),i.current||null===(t=n.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:or(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;i.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:or(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})))})),cb=W.forwardRef(((e,t)=>{const n=nb(sb,e.__scopePopover),r=W.useRef(!1);return W.createElement(db,Jn({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var o,i;(null===(o=e.onCloseAutoFocus)||void 0===o||o.call(e,t),t.defaultPrevented)||(r.current||null===(i=n.triggerRef.current)||void 0===i||i.focus(),t.preventDefault());r.current=!1},onInteractOutside:t=>{var o,i;null===(o=e.onInteractOutside)||void 0===o||o.call(e,t),t.defaultPrevented||(r.current=!0);const a=t.target;(null===(i=n.triggerRef.current)||void 0===i?void 0:i.contains(a))&&t.preventDefault()}}))})),db=W.forwardRef(((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:c,...d}=e,f=nb(sb,n),p=eb(n);return Gh(),W.createElement(Vh,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},W.createElement(Mh,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:c,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1)},W.createElement(qy,Jn({"data-state":fb(f.open),role:"dialog",id:f.contentId},p,d,{ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}))))}));function fb(e){return e?"open":"closed"}const pb=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!1}=e,s=eb(t),l=W.useRef(null),[u,c]=W.useState(!1),[d=!1,f]=cr({prop:r,defaultProp:o,onChange:i});return W.createElement(Xy,s,W.createElement(tb,{scope:t,contentId:lr(),triggerRef:l,open:d,onOpenChange:f,onOpenToggle:W.useCallback((()=>f((e=>!e))),[f]),hasCustomAnchor:u,onCustomAnchorAdd:W.useCallback((()=>c(!0)),[]),onCustomAnchorRemove:W.useCallback((()=>c(!1)),[]),modal:a},n))},hb=rb,mb=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=nb(ob,t);return W.createElement(ib,{scope:t,forceMount:n},W.createElement(Yh,{present:n||i.open},W.createElement(Xh,{asChild:!0,container:o},r)))},gb=lb,vb=W.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=nb("PopoverClose",n);return W.createElement(Ch.button,Jn({type:"button"},r,{ref:t,onClick:or(e.onClick,(()=>o.onOpenChange(!1)))}))})),yb=W.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=eb(n);return W.createElement(Qy,Jn({},o,r,{ref:t}))})),bb="Progress",wb=100,[xb,Eb]=er(bb),[Sb,kb]=xb(bb),Cb=W.forwardRef(((e,t)=>{const{__scopeProgress:n,value:r,max:o,getValueLabel:i=Pb,...a}=e,s=Rb(o)?o:wb,l=Db(r,s)?r:null,u=Tb(l)?i(l,s):void 0;return W.createElement(Sb,{scope:n,value:l,max:s},W.createElement(Ch.div,Jn({"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":Tb(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":_b(l,s),"data-value":null!=l?l:void 0,"data-max":s},a,{ref:t})))}));Cb.propTypes={max(e,t,n){const r=e[t],o=String(r);return r&&!Rb(r)?new Error(function(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`100\`.`}(o,n)):null},value(e,t,n){const r=e[t],o=String(r),i=Rb(e.max)?e.max:wb;return null==r||Db(r,i)?null:new Error(function(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:\n - a positive number\n - less than the value passed to \`max\` (or 100 if no \`max\` prop is set)\n - \`null\` if the progress is indeterminate.\n\nDefaulting to \`null\`.`}(o,n))}};function Pb(e,t){return`${Math.round(e/t*100)}%`}function _b(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function Tb(e){return"number"==typeof e}function Rb(e){return Tb(e)&&!isNaN(e)&&e>0}function Db(e,t){return Tb(e)&&!isNaN(e)&&e<=t&&e>=0}const Ab=Cb,Mb=W.forwardRef(((e,t)=>{var n;const{__scopeProgress:r,...o}=e,i=kb("ProgressIndicator",r);return W.createElement(Ch.div,Jn({"data-state":_b(i.value,i.max),"data-value":null!==(n=i.value)&&void 0!==n?n:void 0,"data-max":i.max},o,{ref:t}))}));function Lb(e){const t=W.useRef({value:e,previous:e});return W.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}const Ob="Checkbox",[Fb,Ib]=er(Ob),[Nb,zb]=Fb(Ob),Bb=W.forwardRef(((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:l="on",onCheckedChange:u,...c}=e,[d,f]=W.useState(null),p=rr(t,(e=>f(e))),h=W.useRef(!1),m=!d||Boolean(d.closest("form")),[g=!1,v]=cr({prop:o,defaultProp:i,onChange:u}),y=W.useRef(g);return W.useEffect((()=>{const e=null==d?void 0:d.form;if(e){const t=()=>v(y.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[d,v]),W.createElement(Nb,{scope:n,state:g,disabled:s},W.createElement(Ch.button,Jn({type:"button",role:"checkbox","aria-checked":jb(g)?"mixed":g,"aria-required":a,"data-state":Hb(g),"data-disabled":s?"":void 0,disabled:s,value:l},c,{ref:p,onKeyDown:or(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:or(e.onClick,(e=>{v((e=>!!jb(e)||!e)),m&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))})),m&&W.createElement(Vb,{control:d,bubbles:!h.current,name:r,value:l,checked:g,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))})),Vb=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=W.useRef(null),a=Lb(n),s=Ty(t);return W.useEffect((()=>{const e=i.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(a!==n&&o){const t=new Event("click",{bubbles:r});e.indeterminate=jb(n),o.call(e,!jb(n)&&n),e.dispatchEvent(t)}}),[a,n,r]),W.createElement("input",Jn({type:"checkbox","aria-hidden":!0,defaultChecked:!jb(n)&&n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function jb(e){return"indeterminate"===e}function Hb(e){return jb(e)?"indeterminate":e?"checked":"unchecked"}const Ub=Bb,Wb=W.forwardRef(((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=zb("CheckboxIndicator",n);return W.createElement(Yh,{present:r||jb(i.state)||!0===i.state},W.createElement(Ch.span,Jn({"data-state":Hb(i.state),"data-disabled":i.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))}));function $b(e,[t,n]){return Math.min(n,Math.max(t,e))}const Kb=W.createContext(void 0);function Xb(e){const t=W.useContext(Kb);return e||t||"ltr"}const Yb=["PageUp","PageDown"],qb=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Qb={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Gb="Slider",[Zb,Jb,ew]=Bg(Gb),[tw,nw]=er(Gb,[ew]),[rw,ow]=tw(Gb),iw=W.forwardRef(((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:s=!1,minStepsBetweenThumbs:l=0,defaultValue:u=[r],value:c,onValueChange:d=(()=>{}),onValueCommit:f=(()=>{}),inverted:p=!1,...h}=e,[m,g]=W.useState(null),v=rr(t,(e=>g(e))),y=W.useRef(new Set),b=W.useRef(0),w="horizontal"===a,x=!m||Boolean(m.closest("form")),E=w?lw:uw,[S=[],k]=cr({prop:c,defaultProp:u,onChange:e=>{var t;null===(t=[...y.current][b.current])||void 0===t||t.focus(),d(e)}}),C=W.useRef(S);function P(e,t,{commit:n}={commit:!1}){const a=function(e){return(String(e).split(".")[1]||"").length}(i),s=function(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}(Math.round((e-r)/i)*i+r,a),u=$b(s,[r,o]);k(((e=[])=>{const r=function(e=[],t,n){const r=[...e];return r[n]=t,r.sort(((e,t)=>e-t))}(e,u,t);if(function(e,t){if(t>0){const n=function(e){return e.slice(0,-1).map(((t,n)=>e[n+1]-t))}(e);return Math.min(...n)>=t}return!0}(r,l*i)){b.current=r.indexOf(u);const t=String(r)!==String(e);return t&&n&&f(r),t?r:e}return e}))}return W.createElement(rw,{scope:e.__scopeSlider,disabled:s,min:r,max:o,valueIndexToChangeRef:b,thumbs:y.current,values:S,orientation:a},W.createElement(Zb.Provider,{scope:e.__scopeSlider},W.createElement(Zb.Slot,{scope:e.__scopeSlider},W.createElement(E,Jn({"aria-disabled":s,"data-disabled":s?"":void 0},h,{ref:v,onPointerDown:or(h.onPointerDown,(()=>{s||(C.current=S)})),min:r,max:o,inverted:p,onSlideStart:s?void 0:function(e){const t=function(e,t){if(1===e.length)return 0;const n=e.map((e=>Math.abs(e-t))),r=Math.min(...n);return n.indexOf(r)}(S,e);P(e,t)},onSlideMove:s?void 0:function(e){P(e,b.current)},onSlideEnd:s?void 0:function(){const e=C.current[b.current];S[b.current]!==e&&f(S)},onHomeKeyDown:()=>!s&&P(r,0,{commit:!0}),onEndKeyDown:()=>!s&&P(o,S.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!s){const n=Yb.includes(e.key)||e.shiftKey&&qb.includes(e.key)?10:1,r=b.current;P(S[r]+i*n*t,r,{commit:!0})}}})))),x&&S.map(((e,t)=>W.createElement(vw,{key:t,name:n?n+(S.length>1?"[]":""):void 0,value:e}))))})),[aw,sw]=tw(Gb,{startEdge:"left",endEdge:"right",size:"width",direction:1}),lw=W.forwardRef(((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:u,...c}=e,[d,f]=W.useState(null),p=rr(t,(e=>f(e))),h=W.useRef(),m=Xb(o),g="ltr"===m,v=g&&!i||!g&&i;function y(e){const t=h.current||d.getBoundingClientRect(),o=bw([0,t.width],v?[n,r]:[r,n]);return h.current=t,o(e-t.left)}return W.createElement(aw,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width"},W.createElement(cw,Jn({dir:m,"data-orientation":"horizontal"},c,{ref:p,style:{...c.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{const t=y(e.clientX);null==a||a(t)},onSlideMove:e=>{const t=y(e.clientX);null==s||s(t)},onSlideEnd:()=>{h.current=void 0,null==l||l()},onStepKeyDown:e=>{const t=Qb[v?"from-left":"from-right"].includes(e.key);null==u||u({event:e,direction:t?-1:1})}})))})),uw=W.forwardRef(((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:l,...u}=e,c=W.useRef(null),d=rr(t,c),f=W.useRef(),p=!o;function h(e){const t=f.current||c.current.getBoundingClientRect(),o=bw([0,t.height],p?[r,n]:[n,r]);return f.current=t,o(e-t.top)}return W.createElement(aw,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1},W.createElement(cw,Jn({"data-orientation":"vertical"},u,{ref:d,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{const t=h(e.clientY);null==i||i(t)},onSlideMove:e=>{const t=h(e.clientY);null==a||a(t)},onSlideEnd:()=>{f.current=void 0,null==s||s()},onStepKeyDown:e=>{const t=Qb[p?"from-bottom":"from-top"].includes(e.key);null==l||l({event:e,direction:t?-1:1})}})))})),cw=W.forwardRef(((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...u}=e,c=ow(Gb,n);return W.createElement(Ch.span,Jn({},u,{ref:t,onKeyDown:or(e.onKeyDown,(e=>{"Home"===e.key?(a(e),e.preventDefault()):"End"===e.key?(s(e),e.preventDefault()):Yb.concat(qb).includes(e.key)&&(l(e),e.preventDefault())})),onPointerDown:or(e.onPointerDown,(e=>{const t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),c.thumbs.has(t)?t.focus():r(e)})),onPointerMove:or(e.onPointerMove,(e=>{e.target.hasPointerCapture(e.pointerId)&&o(e)})),onPointerUp:or(e.onPointerUp,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),i(e))}))}))})),dw=W.forwardRef(((e,t)=>{const{__scopeSlider:n,...r}=e,o=ow("SliderTrack",n);return W.createElement(Ch.span,Jn({"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation},r,{ref:t}))})),fw="SliderRange",pw=W.forwardRef(((e,t)=>{const{__scopeSlider:n,...r}=e,o=ow(fw,n),i=sw(fw,n),a=rr(t,W.useRef(null)),s=o.values.length,l=o.values.map((e=>yw(e,o.min,o.max))),u=s>1?Math.min(...l):0,c=100-Math.max(...l);return W.createElement(Ch.span,Jn({"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0},r,{ref:a,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:c+"%"}}))})),hw="SliderThumb",mw=W.forwardRef(((e,t)=>{const n=Jb(e.__scopeSlider),[r,o]=W.useState(null),i=rr(t,(e=>o(e))),a=W.useMemo((()=>r?n().findIndex((e=>e.ref.current===r)):-1),[n,r]);return W.createElement(gw,Jn({},e,{ref:i,index:a}))})),gw=W.forwardRef(((e,t)=>{const{__scopeSlider:n,index:r,...o}=e,i=ow(hw,n),a=sw(hw,n),[s,l]=W.useState(null),u=rr(t,(e=>l(e))),c=Ty(s),d=i.values[r],f=void 0===d?0:yw(d,i.min,i.max),p=function(e,t){return t>2?`Value ${e+1} of ${t}`:2===t?["Minimum","Maximum"][e]:void 0}(r,i.values.length),h=null==c?void 0:c[a.size],m=h?function(e,t,n){const r=e/2,o=bw([0,50],[0,r]);return(r-o(t)*n)*n}(h,f,a.direction):0;return W.useEffect((()=>{if(s)return i.thumbs.add(s),()=>{i.thumbs.delete(s)}}),[s,i.thumbs]),W.createElement("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${f}% + ${m}px)`}},W.createElement(Zb.ItemSlot,{scope:e.__scopeSlider},W.createElement(Ch.span,Jn({role:"slider","aria-label":e["aria-label"]||p,"aria-valuemin":i.min,"aria-valuenow":d,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,tabIndex:i.disabled?void 0:0},o,{ref:u,style:void 0===d?{display:"none"}:e.style,onFocus:or(e.onFocus,(()=>{i.valueIndexToChangeRef.current=r}))}))))})),vw=e=>{const{value:t,...n}=e,r=W.useRef(null),o=Lb(t);return W.useEffect((()=>{const e=r.current,n=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(n,"value").set;if(o!==t&&i){const n=new Event("input",{bubbles:!0});i.call(e,t),e.dispatchEvent(n)}}),[o,t]),W.createElement("input",Jn({style:{display:"none"}},n,{ref:r,defaultValue:t}))};function yw(e,t,n){return 100/(n-t)*(e-t)}function bw(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}const ww=iw,xw=dw,Ew=pw,Sw=mw,[kw,Cw]=er("Form"),Pw="Form",[_w,Tw]=kw(Pw),[Rw,Dw]=kw(Pw),Aw=W.forwardRef(((e,t)=>{const{__scopeForm:n,onClearServerErrors:r=(()=>{}),...o}=e,i=rr(t,W.useRef(null)),[a,s]=W.useState({}),l=W.useCallback((e=>a[e]),[a]),u=W.useCallback(((e,t)=>s((n=>{var r;return{...n,[e]:{...null!==(r=n[e])&&void 0!==r?r:{},...t}}}))),[]),c=W.useCallback((e=>{s((t=>({...t,[e]:void 0}))),v((t=>({...t,[e]:{}})))}),[]),[d,f]=W.useState({}),p=W.useCallback((e=>{var t;return null!==(t=d[e])&&void 0!==t?t:[]}),[d]),h=W.useCallback(((e,t)=>{f((n=>{var r;return{...n,[e]:[...null!==(r=n[e])&&void 0!==r?r:[],t]}}))}),[]),m=W.useCallback(((e,t)=>{f((n=>{var r;return{...n,[e]:(null!==(r=n[e])&&void 0!==r?r:[]).filter((e=>e.id!==t))}}))}),[]),[g,v]=W.useState({}),y=W.useCallback((e=>{var t;return null!==(t=g[e])&&void 0!==t?t:{}}),[g]),b=W.useCallback(((e,t)=>{v((n=>{var r;return{...n,[e]:{...null!==(r=n[e])&&void 0!==r?r:{},...t}}}))}),[]),[w,x]=W.useState({}),E=W.useCallback(((e,t)=>{x((n=>{const r=new Set(n[e]).add(t);return{...n,[e]:r}}))}),[]),S=W.useCallback(((e,t)=>{x((n=>{const r=new Set(n[e]);return r.delete(t),{...n,[e]:r}}))}),[]),k=W.useCallback((e=>{var t;return Array.from(null!==(t=w[e])&&void 0!==t?t:[]).join(" ")||void 0}),[w]);return W.createElement(_w,{scope:n,getFieldValidity:l,onFieldValidityChange:u,getFieldCustomMatcherEntries:p,onFieldCustomMatcherEntryAdd:h,onFieldCustomMatcherEntryRemove:m,getFieldCustomErrors:y,onFieldCustomErrorsChange:b,onFieldValiditionClear:c},W.createElement(Rw,{scope:n,onFieldMessageIdAdd:E,onFieldMessageIdRemove:S,getFieldDescription:k},W.createElement(Ch.form,Jn({},o,{ref:i,onInvalid:or(e.onInvalid,(e=>{const t=Yw(e.currentTarget);t===e.target&&t.focus(),e.preventDefault()})),onSubmit:or(e.onSubmit,r,{checkForDefaultPrevented:!1}),onReset:or(e.onReset,r)}))))})),Mw="FormField",[Lw,Ow]=kw(Mw),Fw=W.forwardRef(((e,t)=>{const{__scopeForm:n,name:r,serverInvalid:o=!1,...i}=e,a=Tw(Mw,n).getFieldValidity(r),s=lr();return W.createElement(Lw,{scope:n,id:s,name:r,serverInvalid:o},W.createElement(Ch.div,Jn({"data-valid":Qw(a,o),"data-invalid":Gw(a,o)},i,{ref:t})))})),Iw="FormControl",Nw=W.forwardRef(((e,t)=>{const{__scopeForm:n,...r}=e,o=Tw(Iw,n),i=Ow(Iw,n),a=Dw(Iw,n),s=W.useRef(null),l=rr(t,s),u=r.name||i.name,c=r.id||i.id,d=o.getFieldCustomMatcherEntries(u),{onFieldValidityChange:f,onFieldCustomErrorsChange:p,onFieldValiditionClear:h}=o,m=W.useCallback((async e=>{if(qw(e.validity)){const t=$w(e.validity);return void f(u,t)}const t=e.form?new FormData(e.form):new FormData,n=[e.value,t],r=[],o=[];d.forEach((e=>{var t,i;i=n,"AsyncFunction"===(t=e).match.constructor.name||function(e,t){return e(...t)instanceof Promise}(t.match,i)?o.push(e):function(e){return"Function"===e.match.constructor.name}(e)&&r.push(e)}));const i=r.map((({id:e,match:t})=>[e,t(...n)])),a=Object.fromEntries(i),s=Object.values(a).some(Boolean),l=s;e.setCustomValidity(l?zw:"");const c=$w(e.validity);if(f(u,c),p(u,a),!s&&o.length>0){const t=o.map((({id:e,match:t})=>t(...n).then((t=>[e,t])))),r=await Promise.all(t),i=Object.fromEntries(r),a=Object.values(i).some(Boolean);e.setCustomValidity(a?zw:"");const s=$w(e.validity);f(u,s),p(u,i)}}),[d,u,p,f]);W.useEffect((()=>{const e=s.current;if(e){const t=()=>m(e);return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}}),[m]);const g=W.useCallback((()=>{const e=s.current;e&&(e.setCustomValidity(""),h(u))}),[u,h]);W.useEffect((()=>{var e;const t=null===(e=s.current)||void 0===e?void 0:e.form;if(t)return t.addEventListener("reset",g),()=>t.removeEventListener("reset",g)}),[g]),W.useEffect((()=>{const e=s.current,t=null==e?void 0:e.closest("form");if(t&&i.serverInvalid){const n=Yw(t);n===e&&n.focus()}}),[i.serverInvalid]);const v=o.getFieldValidity(u);return W.createElement(Ch.input,Jn({"data-valid":Qw(v,i.serverInvalid),"data-invalid":Gw(v,i.serverInvalid),"aria-invalid":!!i.serverInvalid||void 0,"aria-describedby":a.getFieldDescription(u),title:""},r,{ref:l,id:c,name:u,onInvalid:or(e.onInvalid,(e=>{const t=e.currentTarget;m(t)})),onChange:or(e.onChange,(e=>{g()}))}))})),zw="This value is not valid",Bw={badInput:zw,patternMismatch:"This value does not match the required pattern",rangeOverflow:"This value is too large",rangeUnderflow:"This value is too small",stepMismatch:"This value does not match the required step",tooLong:"This value is too long",tooShort:"This value is too short",typeMismatch:"This value does not match the required type",valid:void 0,valueMissing:"This value is missing"},Vw="FormMessage",jw=W.forwardRef(((e,t)=>{const{match:n,name:r,...o}=e,i=Ow(Vw,e.__scopeForm),a=null!=r?r:i.name;return void 0===n?W.createElement(Ww,Jn({},o,{ref:t,name:a}),e.children||zw):"function"==typeof n?W.createElement(Uw,Jn({match:n},o,{ref:t,name:a})):W.createElement(Hw,Jn({match:n},o,{ref:t,name:a}))})),Hw=W.forwardRef(((e,t)=>{const{match:n,forceMatch:r=!1,name:o,children:i,...a}=e,s=Tw(Vw,a.__scopeForm).getFieldValidity(o);return r||(null==s?void 0:s[n])?W.createElement(Ww,Jn({ref:t},a,{name:o}),null!=i?i:Bw[n]):null})),Uw=W.forwardRef(((e,t)=>{const{match:n,forceMatch:r=!1,name:o,id:i,children:a,...s}=e,l=Tw(Vw,s.__scopeForm),u=rr(t,W.useRef(null)),c=lr(),d=null!=i?i:c,f=W.useMemo((()=>({id:d,match:n})),[d,n]),{onFieldCustomMatcherEntryAdd:p,onFieldCustomMatcherEntryRemove:h}=l;W.useEffect((()=>(p(o,f),()=>h(o,f.id))),[f,o,p,h]);const m=l.getFieldValidity(o),g=l.getFieldCustomErrors(o)[d];return r||m&&!qw(m)&&g?W.createElement(Ww,Jn({id:d,ref:u},s,{name:o}),null!=a?a:zw):null})),Ww=W.forwardRef(((e,t)=>{const{__scopeForm:n,id:r,name:o,...i}=e,a=Dw(Vw,n),s=lr(),l=null!=r?r:s,{onFieldMessageIdAdd:u,onFieldMessageIdRemove:c}=a;return W.useEffect((()=>(u(o,l),()=>c(o,l))),[o,l,u,c]),W.createElement(Ch.span,Jn({id:l},i,{ref:t}))}));function $w(e){const t={};for(const n in e)t[n]=e[n];return t}function Kw(e){return e instanceof HTMLElement}function Xw(e){return"validity"in e&&(!1===e.validity.valid||"true"===e.getAttribute("aria-invalid"))}function Yw(e){const t=e.elements,[n]=Array.from(t).filter(Kw).filter(Xw);return n}function qw(e){let t=!1;for(const n in e){if("valid"!==n&&"customError"!==n&&e[n]){t=!0;break}}return t}function Qw(e,t){if(!0===(null==e?void 0:e.valid)&&!t)return!0}function Gw(e,t){if(!1===(null==e?void 0:e.valid)||t)return!0}const Zw=Aw,Jw=Fw,ex=Nw,tx=jw,nx=W.forwardRef(((e,t)=>{const{__scopeForm:n,...r}=e;return W.createElement(Ch.button,Jn({type:"submit"},r,{ref:t}))})),rx=W.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),ox=W.createContext({}),ix=W.createContext(null),ax="undefined"!=typeof document,sx=ax?W.useLayoutEffect:W.useEffect,lx=W.createContext({strict:!1});function ux(e){return"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function cx(e){return"string"==typeof e||Array.isArray(e)}function dx(e){return"object"==typeof e&&"function"==typeof e.start}const fx=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],px=["initial",...fx];function hx(e){return dx(e.animate)||px.some((t=>cx(e[t])))}function mx(e){return Boolean(hx(e)||e.variants)}function gx(e){const{initial:t,animate:n}=function(e,t){if(hx(e)){const{initial:t,animate:n}=e;return{initial:!1===t||cx(t)?t:void 0,animate:cx(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,W.useContext(ox));return W.useMemo((()=>({initial:t,animate:n})),[vx(t),vx(n)])}function vx(e){return Array.isArray(e)?e.join(" "):e}const yx={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"]},bx={};for(const RO in yx)bx[RO]={isEnabled:e=>yx[RO].some((t=>!!e[t]))};function wx(e){const t=W.useRef(null);return null===t.current&&(t.current=e()),t.current}const xx={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Ex=1;const Sx=W.createContext({}),kx=W.createContext({}),Cx=Symbol.for("motionComponentSymbol");function Px({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&function(e){for(const t in e)bx[t]={...bx[t],...e[t]}}(e);const i=W.forwardRef((function(i,a){let s;const l={...W.useContext(rx),...i,layoutId:_x(i)},{isStatic:u}=l,c=gx(i),d=u?void 0:wx((()=>{if(xx.hasEverUpdated)return Ex++})),f=r(i,u);if(!u&&ax){c.visualElement=function(e,t,n,r){const{visualElement:o}=W.useContext(ox),i=W.useContext(lx),a=W.useContext(ix),s=W.useContext(rx).reducedMotion,l=W.useRef();r=r||i.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:o,props:n,presenceContext:a,blockInitialAnimation:!!a&&!1===a.initial,reducedMotionConfig:s}));const u=l.current;return W.useInsertionEffect((()=>{u&&u.update(n,a)})),sx((()=>{u&&u.render()})),W.useEffect((()=>{u&&u.updateFeatures()})),(window.HandoffAppearAnimations?sx:W.useEffect)((()=>{u&&u.animationState&&u.animationState.animateChanges()})),u}(o,f,l,t);const n=W.useContext(kx),r=W.useContext(lx).strict;c.visualElement&&(s=c.visualElement.loadFeatures(l,r,e,d,n))}return W.createElement(ox.Provider,{value:c},s&&c.visualElement?W.createElement(s,{visualElement:c.visualElement,...l}):null,n(o,i,d,function(e,t,n){return W.useCallback((r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):ux(n)&&(n.current=r))}),[t])}(f,c.visualElement,a),f,u,c.visualElement))}));return i[Cx]=o,i}function _x({layoutId:e}){const t=W.useContext(Sx).id;return t&&void 0!==e?t+"-"+e:e}function Tx(e){function t(t,n={}){return Px(e(t,n))}if("undefined"==typeof Proxy)return t;const n=new Map;return new Proxy(t,{get:(e,r)=>(n.has(r)||n.set(r,t(r)),n.get(r))})}const Rx=["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 Dx(e){return"string"==typeof e&&!e.includes("-")&&!!(Rx.indexOf(e)>-1||/[A-Z]/.test(e))}const Ax={};const Mx=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Lx=new Set(Mx);function Ox(e,{layout:t,layoutId:n}){return Lx.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Ax[e]||"opacity"===e)}const Fx=e=>Boolean(e&&e.getVelocity),Ix={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Nx=Mx.length;const zx=e=>t=>"string"==typeof t&&t.startsWith(e),Bx=zx("--"),Vx=zx("var(--"),jx=(e,t)=>t&&"number"==typeof e?t.transform(e):e,Hx=(e,t,n)=>Math.min(Math.max(n,e),t),Ux={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Wx={...Ux,transform:e=>Hx(0,1,e)},$x={...Ux,default:1},Kx=e=>Math.round(1e5*e)/1e5,Xx=/(-)?([\d]*\.?[\d])+/g,Yx=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,qx=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Qx(e){return"string"==typeof e}const Gx=e=>({test:t=>Qx(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),Zx=Gx("deg"),Jx=Gx("%"),eE=Gx("px"),tE=Gx("vh"),nE=Gx("vw"),rE={...Jx,parse:e=>Jx.parse(e)/100,transform:e=>Jx.transform(100*e)},oE={...Ux,transform:Math.round},iE={borderWidth:eE,borderTopWidth:eE,borderRightWidth:eE,borderBottomWidth:eE,borderLeftWidth:eE,borderRadius:eE,radius:eE,borderTopLeftRadius:eE,borderTopRightRadius:eE,borderBottomRightRadius:eE,borderBottomLeftRadius:eE,width:eE,maxWidth:eE,height:eE,maxHeight:eE,size:eE,top:eE,right:eE,bottom:eE,left:eE,padding:eE,paddingTop:eE,paddingRight:eE,paddingBottom:eE,paddingLeft:eE,margin:eE,marginTop:eE,marginRight:eE,marginBottom:eE,marginLeft:eE,rotate:Zx,rotateX:Zx,rotateY:Zx,rotateZ:Zx,scale:$x,scaleX:$x,scaleY:$x,scaleZ:$x,skew:Zx,skewX:Zx,skewY:Zx,distance:eE,translateX:eE,translateY:eE,translateZ:eE,x:eE,y:eE,z:eE,perspective:eE,transformPerspective:eE,opacity:Wx,originX:rE,originY:rE,originZ:eE,zIndex:oE,fillOpacity:Wx,strokeOpacity:Wx,numOctaves:oE};function aE(e,t,n,r){const{style:o,vars:i,transform:a,transformOrigin:s}=e;let l=!1,u=!1,c=!0;for(const d in t){const e=t[d];if(Bx(d)){i[d]=e;continue}const n=iE[d],r=jx(e,n);if(Lx.has(d)){if(l=!0,a[d]=r,!c)continue;e!==(n.default||0)&&(c=!1)}else d.startsWith("origin")?(u=!0,s[d]=r):o[d]=r}if(t.transform||(l||r?o.transform=function(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,o){let i="";for(let a=0;a<Nx;a++){const t=Mx[a];void 0!==e[t]&&(i+=`${Ix[t]||t}(${e[t]}) `)}return t&&!e.z&&(i+="translateZ(0)"),i=i.trim(),o?i=o(e,r?"":i):n&&r&&(i="none"),i}(e.transform,n,c,r):o.transform&&(o.transform="none")),u){const{originX:e="50%",originY:t="50%",originZ:n=0}=s;o.transformOrigin=`${e} ${t} ${n}`}}const sE=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function lE(e,t,n){for(const r in t)Fx(t[r])||Ox(r,n)||(e[r]=t[r])}function uE(e,t,n){const r={};return lE(r,e.style||{},e),Object.assign(r,function({transformTemplate:e},t,n){return W.useMemo((()=>{const r=sE();return aE(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)}),[t])}(e,t,n)),e.transformValues?e.transformValues(r):r}function cE(e,t,n){const r={},o=uE(e,t,n);return e.drag&&!1!==e.dragListener&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}const dE=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function fE(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||dE.has(e)}let pE=e=>!fE(e);try{(hE=require("@emotion/is-prop-valid").default)&&(pE=e=>e.startsWith("on")?!fE(e):hE(e))}catch(TO){}var hE;function mE(e,t,n){return"string"==typeof e?e:eE.transform(t+n*e)}const gE={offset:"stroke-dashoffset",array:"stroke-dasharray"},vE={offset:"strokeDashoffset",array:"strokeDasharray"};function yE(e,{attrX:t,attrY:n,originX:r,originY:o,pathLength:i,pathSpacing:a=1,pathOffset:s=0,...l},u,c,d){if(aE(e,l,u,d),c)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:h}=e;f.transform&&(h&&(p.transform=f.transform),delete f.transform),h&&(void 0!==r||void 0!==o||p.transform)&&(p.transformOrigin=function(e,t,n){return`${mE(t,e.x,e.width)} ${mE(n,e.y,e.height)}`}(h,void 0!==r?r:.5,void 0!==o?o:.5)),void 0!==t&&(f.x=t),void 0!==n&&(f.y=n),void 0!==i&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?gE:vE;e[i.offset]=eE.transform(-r);const a=eE.transform(t),s=eE.transform(n);e[i.array]=`${a} ${s}`}(f,i,a,s,!1)}const bE=()=>({...sE(),attrs:{}}),wE=e=>"string"==typeof e&&"svg"===e.toLowerCase();function xE(e,t,n,r){const o=W.useMemo((()=>{const n=bE();return yE(n,t,{enableHardwareAcceleration:!1},wE(r),e.transformTemplate),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};lE(t,e.style,e),o.style={...t,...o.style}}return o}function EE(e=!1){return(t,n,r,o,{latestValues:i},a)=>{const s=(Dx(t)?xE:cE)(n,i,a,t),l=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||(pE(o)||!0===n&&fE(o)||!t&&!fE(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(n,"string"==typeof t,e),u={...l,...s,ref:o},{children:c}=n,d=W.useMemo((()=>Fx(c)?c.get():c),[c]);return r&&(u["data-projection-id"]=r),W.createElement(t,{...u,children:d})}}const SE=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function kE(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const CE=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 PE(e,t,n,r){kE(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(CE.has(o)?o:SE(o),t.attrs[o])}function _E(e,t){const{style:n}=e,r={};for(const o in n)(Fx(n[o])||t.style&&Fx(t.style[o])||Ox(o,e))&&(r[o]=n[o]);return r}function TE(e,t){const n=_E(e,t);for(const r in e)if(Fx(e[r])||Fx(t[r])){n["x"===r||"y"===r?"attr"+r.toUpperCase():r]=e[r]}return n}function RE(e,t,n,r={},o={}){return"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,o)),"string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,o)),t}const DE=e=>Array.isArray(e),AE=e=>Boolean(e&&"object"==typeof e&&e.mix&&e.toValue),ME=e=>DE(e)?e[e.length-1]||0:e;function LE(e){const t=Fx(e)?e.get():e;return AE(t)?t.toValue():t}const OE=e=>(t,n)=>{const r=W.useContext(ox),o=W.useContext(ix),i=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,i){const a={latestValues:FE(r,o,i,e),renderState:t()};return n&&(a.mount=e=>n(r,e,a)),a}(e,t,r,o);return n?i():wx(i)};function FE(e,t,n,r){const o={},i=r(e,{});for(const f in i)o[f]=LE(i[f]);let{initial:a,animate:s}=e;const l=hx(e),u=mx(e);t&&u&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===s&&(s=t.animate));let c=!!n&&!1===n.initial;c=c||!1===a;const d=c?s:a;if(d&&"boolean"!=typeof d&&!dx(d)){(Array.isArray(d)?d:[d]).forEach((t=>{const n=RE(e,t);if(!n)return;const{transitionEnd:r,transition:i,...a}=n;for(const e in a){let t=a[e];if(Array.isArray(t)){t=t[c?t.length-1:0]}null!==t&&(o[e]=t)}for(const e in r)o[e]=r[e]}))}return o}const IE={useVisualState:OE({scrapeMotionValuesFromProps:TE,createRenderState:bE,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(o){n.dimensions={x:0,y:0,width:0,height:0}}yE(n,r,{enableHardwareAcceleration:!1},wE(t.tagName),e.transformTemplate),PE(t,n)}})},NE={useVisualState:OE({scrapeMotionValuesFromProps:_E,createRenderState:sE})};function zE(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const BE=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function VE(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const jE=e=>t=>BE(t)&&e(t,VE(t));function HE(e,t,n,r){return zE(e,t,jE(n),r)}const UE=(e,t)=>n=>t(e(n)),WE=(...e)=>e.reduce(UE);function $E(e){let t=null;return()=>{const n=()=>{t=null};return null===t&&(t=e,n)}}const KE=$E("dragHorizontal"),XE=$E("dragVertical");function YE(e){let t=!1;if("y"===e)t=XE();else if("x"===e)t=KE();else{const e=KE(),n=XE();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function qE(){const e=YE(!0);return!e||(e(),!1)}class QE{constructor(e){this.isMounted=!1,this.node=e}update(){}}const GE={delta:0,timestamp:0,isProcessing:!1};let ZE=!0,JE=!1;const eS=["read","update","preRender","render","postRender"],tS=eS.reduce(((e,t)=>(e[t]=function(e){let t=[],n=[],r=0,o=!1,i=!1;const a=new WeakSet,s={schedule:(e,i=!1,s=!1)=>{const l=s&&o,u=l?t:n;return i&&a.add(e),-1===u.indexOf(e)&&(u.push(e),l&&o&&(r=t.length)),e},cancel:e=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1),a.delete(e)},process:l=>{if(o)i=!0;else{if(o=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let n=0;n<r;n++){const r=t[n];r(l),a.has(r)&&(s.schedule(r),e())}o=!1,i&&(i=!1,s.process(l))}}};return s}((()=>JE=!0)),e)),{}),nS=eS.reduce(((e,t)=>{const n=tS[t];return e[t]=(e,t=!1,r=!1)=>(JE||sS(),n.schedule(e,t,r)),e}),{}),rS=eS.reduce(((e,t)=>(e[t]=tS[t].cancel,e)),{}),oS=eS.reduce(((e,t)=>(e[t]=()=>tS[t].process(GE),e)),{}),iS=e=>tS[e].process(GE),aS=e=>{JE=!1,GE.delta=ZE?1e3/60:Math.max(Math.min(e-GE.timestamp,40),1),GE.timestamp=e,GE.isProcessing=!0,eS.forEach(iS),GE.isProcessing=!1,JE&&(ZE=!1,requestAnimationFrame(aS))},sS=()=>{JE=!0,ZE=!0,GE.isProcessing||requestAnimationFrame(aS)};function lS(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End");return HE(e.current,n,((n,o)=>{if("touch"===n.type||qE())return;const i=e.getProps();e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",t),i[r]&&nS.update((()=>i[r](n,o)))}),{passive:!e.getProps()[r]})}const uS=(e,t)=>!!t&&(e===t||uS(e,t.parentElement)),cS=e=>e;function dS(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,VE(n))}const fS=new WeakMap,pS=new WeakMap,hS=e=>{const t=fS.get(e.target);t&&t(e)},mS=e=>{e.forEach(hS)};function gS(e,t,n){const r=function({root:e,...t}){const n=e||document;pS.has(n)||pS.set(n,{});const r=pS.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(mS,{root:e,...t})),r[o]}(t);return fS.set(e,n),r.observe(e),()=>{fS.delete(e),r.unobserve(e)}}const vS={some:0,all:1};const yS={inView:{Feature:class extends QE{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:o}=e,i={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:vS[r]};return gS(this.node.current,i,(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,o&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),i=t?n:r;i&&i(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends QE{constructor(){super(...arguments),this.removeStartListeners=cS,this.removeEndListeners=cS,this.removeAccessibleListeners=cS,this.startPointerPress=(e,t)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),r=HE(window,"pointerup",((e,t)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:r}=this.node.getProps();nS.update((()=>{uS(this.node.current,e.target)?n&&n(e,t):r&&r(e,t)}))}),{passive:!(n.onTap||n.onPointerUp)}),o=HE(window,"pointercancel",((e,t)=>this.cancelPress(e,t)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=WE(r,o),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=zE(this.node.current,"keydown",(e=>{if("Enter"!==e.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=zE(this.node.current,"keyup",(e=>{"Enter"===e.key&&this.checkPressEnd()&&dS("up",((e,t)=>{const{onTap:n}=this.node.getProps();n&&nS.update((()=>n(e,t)))}))})),dS("down",((e,t)=>{this.startPress(e,t)}))})),t=zE(this.node.current,"blur",(()=>{this.isPressing&&dS("cancel",((e,t)=>this.cancelPress(e,t)))}));this.removeAccessibleListeners=WE(e,t)}}startPress(e,t){this.isPressing=!0;const{onTapStart:n,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&nS.update((()=>n(e,t)))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!qE()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&nS.update((()=>n(e,t)))}mount(){const e=this.node.getProps(),t=HE(this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=zE(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=WE(t,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends QE{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&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=WE(zE(this.node.current,"focus",(()=>this.onFocus())),zE(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends QE{mount(){this.unmount=WE(lS(this.node,!0),lS(this.node,!1))}unmount(){}}}};function bS(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}function wS(e,t,n){const r=e.getProps();return RE(r,t,void 0!==n?n:r.custom,function(e){const t={};return e.values.forEach(((e,n)=>t[n]=e.get())),t}(e),function(e){const t={};return e.values.forEach(((e,n)=>t[n]=e.getVelocity())),t}(e))}const xS="data-"+SE("framerAppearId");let ES=cS,SS=cS;const kS=e=>1e3*e,CS=e=>e/1e3,PS=!1,_S=e=>Array.isArray(e)&&"number"==typeof e[0];function TS(e){return Boolean(!e||"string"==typeof e&&DS[e]||_S(e)||Array.isArray(e)&&e.every(TS))}const RS=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,DS={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:RS([0,.65,.55,1]),circOut:RS([.55,0,1,.45]),backIn:RS([.31,.01,.66,-.59]),backOut:RS([.33,1.53,.69,.99])};function AS(e){if(e)return _S(e)?RS(e):Array.isArray(e)?e.map(AS):DS[e]}const MS={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},LS={},OS={};for(const RO in MS)OS[RO]=()=>(void 0===LS[RO]&&(LS[RO]=MS[RO]()),LS[RO]);const FS=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,IS=1e-7,NS=12;function zS(e,t,n,r){if(e===t&&n===r)return cS;const o=t=>function(e,t,n,r,o){let i,a,s=0;do{a=t+(n-t)/2,i=FS(a,r,o)-e,i>0?n=a:t=a}while(Math.abs(i)>IS&&++s<NS);return a}(t,0,1,e,n);return e=>0===e||1===e?e:FS(o(e),t,r)}const BS=zS(.42,0,1,1),VS=zS(0,0,.58,1),jS=zS(.42,0,.58,1),HS=e=>Array.isArray(e)&&"number"!=typeof e[0],US=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,WS=e=>t=>1-e(1-t),$S=e=>1-Math.sin(Math.acos(e)),KS=WS($S),XS=US(KS),YS=zS(.33,1.53,.69,.99),qS=WS(YS),QS=US(qS),GS={linear:cS,easeIn:BS,easeInOut:jS,easeOut:VS,circIn:$S,circInOut:XS,circOut:KS,backIn:qS,backInOut:QS,backOut:YS,anticipate:e=>(e*=2)<1?.5*qS(e):.5*(2-Math.pow(2,-10*(e-1)))},ZS=e=>{if(Array.isArray(e)){SS(4===e.length);const[t,n,r,o]=e;return zS(t,n,r,o)}return"string"==typeof e?GS[e]:e},JS=(e,t)=>n=>Boolean(Qx(n)&&qx.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),ek=(e,t,n)=>r=>{if(!Qx(r))return r;const[o,i,a,s]=r.match(Xx);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},tk={...Ux,transform:e=>Math.round((e=>Hx(0,255,e))(e))},nk={test:JS("rgb","red"),parse:ek("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+tk.transform(e)+", "+tk.transform(t)+", "+tk.transform(n)+", "+Kx(Wx.transform(r))+")"};const rk={test:JS("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:nk.transform},ok={test:JS("hsl","hue"),parse:ek("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Jx.transform(Kx(t))+", "+Jx.transform(Kx(n))+", "+Kx(Wx.transform(r))+")"},ik={test:e=>nk.test(e)||rk.test(e)||ok.test(e),parse:e=>nk.test(e)?nk.parse(e):ok.test(e)?ok.parse(e):rk.parse(e),transform:e=>Qx(e)?e:e.hasOwnProperty("red")?nk.transform(e):ok.transform(e)},ak=(e,t,n)=>-n*e+n*t+e;function sk(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}const lk=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},uk=[rk,nk,ok];function ck(e){const t=(n=e,uk.find((e=>e.test(n))));var n;let r=t.parse(e);return t===ok&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,i=0,a=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;o=sk(s,r,e+1/3),i=sk(s,r,e),a=sk(s,r,e-1/3)}else o=i=a=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:r}}(r)),r}const dk=(e,t)=>{const n=ck(e),r=ck(t),o={...n};return e=>(o.red=lk(n.red,r.red,e),o.green=lk(n.green,r.green,e),o.blue=lk(n.blue,r.blue,e),o.alpha=ak(n.alpha,r.alpha,e),nk.transform(o))},fk="${c}",pk="${n}";function hk(e){"number"==typeof e&&(e=`${e}`);const t=[];let n=0,r=0;const o=e.match(Yx);o&&(n=o.length,e=e.replace(Yx,fk),t.push(...o.map(ik.parse)));const i=e.match(Xx);return i&&(r=i.length,e=e.replace(Xx,pk),t.push(...i.map(Ux.parse))),{values:t,numColors:n,numNumbers:r,tokenised:e}}function mk(e){return hk(e).values}function gk(e){const{values:t,numColors:n,tokenised:r}=hk(e),o=t.length;return e=>{let t=r;for(let r=0;r<o;r++)t=t.replace(r<n?fk:pk,r<n?ik.transform(e[r]):Kx(e[r]));return t}}const vk=e=>"number"==typeof e?0:e;const yk={test:function(e){var t,n;return isNaN(e)&&Qx(e)&&((null===(t=e.match(Xx))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(Yx))||void 0===n?void 0:n.length)||0)>0},parse:mk,createTransformer:gk,getAnimatableNone:function(e){const t=mk(e);return gk(e)(t.map(vk))}};function bk(e,t){return"number"==typeof e?n=>ak(e,t,n):ik.test(e)?dk(e,t):Ek(e,t)}const wk=(e,t)=>{const n=[...e],r=n.length,o=e.map(((e,n)=>bk(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}},xk=(e,t)=>{const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=bk(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}},Ek=(e,t)=>{const n=yk.createTransformer(t),r=hk(e),o=hk(t);return r.numColors===o.numColors&&r.numNumbers>=o.numNumbers?WE(wk(r.values,o.values),n):n=>`${n>0?t:e}`},Sk=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},kk=(e,t)=>n=>ak(e,t,n);function Ck(e,t,n){const r=[],o=n||("number"==typeof(i=e[0])?kk:"string"==typeof i?ik.test(i)?dk:Ek:Array.isArray(i)?wk:"object"==typeof i?xk:kk);var i;const a=e.length-1;for(let s=0;s<a;s++){let n=o(e[s],e[s+1]);if(t){const e=Array.isArray(t)?t[s]||cS:t;n=WE(e,n)}r.push(n)}return r}function Pk(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(SS(i===t.length),1===i)return()=>t[0];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Ck(t,r,o),s=a.length,l=t=>{let n=0;if(s>1)for(;n<e.length-2&&!(t<e[n+1]);n++);const r=Sk(e[n],e[n+1],t);return a[n](r)};return n?t=>l(Hx(e[0],e[i-1],t)):l}function _k(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Sk(0,t,r);e.push(ak(n,1,o))}}(t,e.length-1),t}function Tk({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=HS(r)?r.map(ZS):ZS(r),i={done:!1,value:t[0]},a=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:_k(t),e),s=Pk(a,t,{ease:Array.isArray(o)?o:(l=t,u=o,l.map((()=>u||jS)).splice(0,l.length-1))});var l,u;return{calculatedDuration:e,next:t=>(i.value=s(t),i.done=t>=e,i)}}function Rk(e,t){return t?e*(1e3/t):0}const Dk=5;function Ak(e,t,n){const r=Math.max(t-Dk,0);return Rk(n-e(r),t-r)}const Mk=.001,Lk=.01,Ok=10,Fk=.05,Ik=1;function Nk({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i;ES(e<=kS(Ok));let a=1-t;a=Hx(Fk,Ik,a),e=Hx(Lk,Ok,CS(e)),a<1?(o=t=>{const r=t*a,o=r*e,i=r-n,s=Bk(t,a),l=Math.exp(-o);return Mk-i/s*l},i=t=>{const r=t*a*e,i=r*n+n,s=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-r),u=Bk(Math.pow(t,2),a);return(-o(t)+Mk>0?-1:1)*((i-s)*l)/u}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-Mk,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let o=1;o<zk;o++)r-=e(r)/t(r);return r}(o,i,5/e);if(e=kS(e),isNaN(s))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}const zk=12;function Bk(e,t){return e*Math.sqrt(1-t*t)}const Vk=["duration","bounce"],jk=["stiffness","damping","mass"];function Hk(e,t){return t.some((t=>void 0!==e[t]))}function Uk({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],a={done:!1,value:o},{stiffness:s,damping:l,mass:u,velocity:c,duration:d,isResolvedFromDuration:f}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Hk(e,jk)&&Hk(e,Vk)){const n=Nk(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}(r),p=c?-CS(c):0,h=l/(2*Math.sqrt(s*u)),m=i-o,g=CS(Math.sqrt(s/u)),v=Math.abs(m)<5;let y;if(n||(n=v?.01:2),t||(t=v?.005:.5),h<1){const e=Bk(g,h);y=t=>{const n=Math.exp(-h*g*t);return i-n*((p+h*g*m)/e*Math.sin(e*t)+m*Math.cos(e*t))}}else if(1===h)y=e=>i-Math.exp(-g*e)*(m+(p+g*m)*e);else{const e=g*Math.sqrt(h*h-1);y=t=>{const n=Math.exp(-h*g*t),r=Math.min(e*t,300);return i-n*((p+h*g*m)*Math.sinh(r)+e*m*Math.cosh(r))/e}}return{calculatedDuration:f&&d||null,next:e=>{const r=y(e);if(f)a.done=e>=d;else{let o=p;0!==e&&(o=h<1?Ak(y,e,r):0);const s=Math.abs(o)<=n,l=Math.abs(i-r)<=t;a.done=s&&l}return a.value=a.done?i:r,a}}}function Wk({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},p=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let h=n*t;const m=d+h,g=void 0===a?m:a(m);g!==m&&(h=g-d);const v=e=>-h*Math.exp(-e/r),y=e=>g+v(e),b=e=>{const t=v(e),n=y(e);f.done=Math.abs(t)<=u,f.value=f.done?g:n};let w,x;const E=e=>{var t;(t=f.value,void 0!==s&&t<s||void 0!==l&&t>l)&&(w=e,x=Uk({keyframes:[f.value,p(f.value)],velocity:Ak(y,e,f.value),damping:o,stiffness:i,restDelta:u,restSpeed:c}))};return E(0),{calculatedDuration:null,next:e=>{let t=!1;return x||void 0!==w||(t=!0,b(e),E(e)),void 0!==w&&e>w?x.next(e-w):(!t&&b(e),f)}}}const $k=e=>{const t=({timestamp:t})=>e(t);return{start:()=>nS.update(t,!0),stop:()=>rS.update(t),now:()=>GE.isProcessing?GE.timestamp:performance.now()}},Kk={decay:Wk,inertia:Wk,tween:Tk,keyframes:Tk,spring:Uk},Xk=2e4;function Yk(e){let t=0;let n=e.next(t);for(;!n.done&&t<Xk;)t+=50,n=e.next(t);return t>=Xk?1/0:t}function qk({autoplay:e=!0,delay:t=0,driver:n=$k,keyframes:r,type:o="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:s="loop",onPlay:l,onStop:u,onComplete:c,onUpdate:d,...f}){let p,h,m=1,g=!1;const v=()=>{p&&p(),h=new Promise((e=>{p=e}))};let y;v();const b=Kk[o]||Tk;let w;b!==Tk&&"number"!=typeof r[0]&&(w=Pk([0,100],r,{clamp:!1}),r=[0,100]);const x=b({...f,keyframes:r});let E;"mirror"===s&&(E=b({...f,keyframes:[...r].reverse(),velocity:-(f.velocity||0)}));let S="idle",k=null,C=null,P=null;null===x.calculatedDuration&&i&&(x.calculatedDuration=Yk(x));const{calculatedDuration:_}=x;let T=1/0,R=1/0;null!==_&&(T=_+a,R=T*(i+1)-a);let D=0;const A=e=>{if(null===C)return;m>0&&(C=Math.min(C,e)),D=null!==k?k:(e-C)*m;const n=D-t,o=n<0;D=Math.max(n,0),"finished"===S&&null===k&&(D=R);let l=D,u=x;if(i){const e=D/T;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,i+1);const r=Boolean(t%2);r&&("reverse"===s?(n=1-n,a&&(n-=a/T)):"mirror"===s&&(u=E));let o=Hx(0,1,n);D>R&&(o="reverse"===s&&r?1:0),l=o*T}const c=o?{done:!1,value:r[0]}:u.next(l);w&&(c.value=w(c.value));let{done:f}=c;o||null===_||(f=D>=R);const p=null===k&&("finished"===S||"running"===S&&f||m<0&&D<=0);return d&&d(c.value),p&&O(),c},M=()=>{y&&y.stop(),y=void 0},L=()=>{S="idle",M(),v(),C=P=null},O=()=>{S="finished",c&&c(),M(),v()},F=()=>{if(g)return;y||(y=n(A));const e=y.now();l&&l(),S="running",null!==k?C=e-k:C||(C=e),P=C,k=null,y.start()};e&&F();const I={then:(e,t)=>h.then(e,t),get time(){return CS(D)},set time(e){e=kS(e),D=e,null===k&&y&&0!==m?C=y.now()-e/m:k=e},get duration(){const e=null===x.calculatedDuration?Yk(x):x.calculatedDuration;return CS(e)},get speed(){return m},set speed(e){e!==m&&y&&(m=e,I.time=CS(D))},get state(){return S},play:F,pause:()=>{S="paused",k=D},stop:()=>{g=!0,"idle"!==S&&(S="idle",u&&u(),L())},cancel:()=>{null!==P&&A(P),L()},complete:()=>{S="finished"},sample:e=>(C=0,A(e))};return I}const Qk=new Set(["opacity","clipPath","filter","transform","backgroundColor"]);function Gk(e,t,{onUpdate:n,onComplete:r,...o}){if(!(OS.waapi()&&Qk.has(t)&&!o.repeatDelay&&"mirror"!==o.repeatType&&0!==o.damping&&"inertia"!==o.type))return!1;let i,a,s=!1;const l=()=>{a=new Promise((e=>{i=e}))};l();let{keyframes:u,duration:c=300,ease:d}=o;if(((e,t)=>"spring"===t.type||"backgroundColor"===e||!TS(t.ease))(t,o)){const e=qk({...o,repeat:0,delay:0});let t={done:!1,value:u[0]};const n=[];let r=0;for(;!t.done&&r<2e4;)t=e.sample(r),n.push(t.value),r+=10;u=n,c=r-10,d="linear"}const f=function(e,t,n,{delay:r=0,duration:o,repeat:i=0,repeatType:a="loop",ease:s,times:l}={}){const u={[t]:n};l&&(u.offset=l);const c=AS(s);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:o,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:i+1,direction:"reverse"===a?"alternate":"normal"})}(e.owner.current,t,u,{...o,duration:c,ease:d}),p=()=>{nS.update((()=>f.cancel())),i(),l()};return f.onfinish=()=>{e.set(function(e,{repeat:t,repeatType:n="loop"}){return e[t&&"loop"!==n&&t%2==1?0:e.length-1]}(u,o)),r&&r(),p()},{then:(e,t)=>a.then(e,t),get time(){return CS(f.currentTime||0)},set time(e){f.currentTime=kS(e)},get speed(){return f.playbackRate},set speed(e){f.playbackRate=e},get duration(){return CS(c)},play:()=>{s||f.play()},pause:()=>f.pause(),stop:()=>{if(s=!0,"idle"===f.playState)return;const{currentTime:t}=f;if(t){const n=qk({...o,autoplay:!1});e.setWithVelocity(n.sample(t-10).value,n.sample(t).value,10)}p()},complete:()=>f.finish(),cancel:p}}const Zk={type:"spring",stiffness:500,damping:25,restSpeed:10},Jk={type:"keyframes",duration:.8},eC={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},tC=(e,{keyframes:t})=>t.length>2?Jk:Lx.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:Zk:eC,nC=(e,t)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!yk.test(t)||t.startsWith("url("))),rC=new Set(["brightness","contrast","saturate","opacity"]);function oC(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(Xx)||[];if(!r)return e;const o=n.replace(r,"");let i=rC.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const iC=/([a-z-]*)\(.*?\)/g,aC={...yk,getAnimatableNone:e=>{const t=e.match(iC);return t?t.map(oC).join(" "):e}},sC={...iE,color:ik,backgroundColor:ik,outlineColor:ik,fill:ik,stroke:ik,borderColor:ik,borderTopColor:ik,borderRightColor:ik,borderBottomColor:ik,borderLeftColor:ik,filter:aC,WebkitFilter:aC},lC=e=>sC[e];function uC(e,t){let n=lC(e);return n!==aC&&(n=yk),n.getAnimatableNone?n.getAnimatableNone(t):void 0}function cC(e){return 0===e||"string"==typeof e&&0===parseFloat(e)&&-1===e.indexOf(" ")}function dC(e){return"number"==typeof e?0:uC("",e)}function fC(e,t){return e[t]||e.default||e}const pC=(e,t,n,r={})=>o=>{const i=fC(r,e)||{},a=i.delay||r.delay||0;let{elapsed:s=0}=r;s-=kS(a);const l=function(e,t,n,r){const o=nC(t,n);let i=void 0!==r.from?r.from:e.get();if("none"===i&&o&&"string"==typeof n?i=uC(t,n):cC(i)&&"string"==typeof n?i=dC(n):!Array.isArray(n)&&cC(n)&&"string"==typeof i&&(n=dC(i)),Array.isArray(n)){for(let e=0;e<n.length;e++)null===n[e]&&(n[e]=0===e?i:n[e-1]);return n}return[i,n]}(t,e,n,i),u=l[0],c=l[l.length-1],d=nC(e,u),f=nC(e,c);let p={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...i,delay:-s,onUpdate:e=>{t.set(e),i.onUpdate&&i.onUpdate(e)},onComplete:()=>{o(),i.onComplete&&i.onComplete()}};if(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:s,from:l,elapsed:u,...c}){return!!Object.keys(c).length}(i)||(p={...p,...tC(e,p)}),p.duration&&(p.duration=kS(p.duration)),p.repeatDelay&&(p.repeatDelay=kS(p.repeatDelay)),!d||!f||PS||!1===i.type)return function({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const o=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:cS,pause:cS,stop:cS,then:e=>(e(),Promise.resolve()),cancel:cS,complete:cS});return t?qk({keyframes:[0,1],duration:0,delay:t,onComplete:o}):o()}(p);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const n=Gk(t,e,p);if(n)return n}return qk(p)};function hC(e){return Boolean(Fx(e)&&e.add)}const mC=e=>/^0[^.\s]+$/.test(e);function gC(e,t){-1===e.indexOf(t)&&e.push(t)}function vC(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class yC{constructor(){this.subscriptions=[]}add(e){return gC(this.subscriptions,e),()=>vC(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class bC{constructor(e,t={}){this.version="10.10.0",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(e,t=!0)=>{this.prev=this.current,this.current=e;const{delta:n,timestamp:r}=GE;this.lastUpdated!==r&&(this.timeDelta=n,this.lastUpdated=r,nS.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>nS.postRender(this.velocityCheck),this.velocityCheck=({timestamp:e})=>{e!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=(e=>!isNaN(parseFloat(e)))(this.current),this.owner=t.owner}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new yC);const n=this.events[e].add(t);return"change"===e?()=>{n(),nS.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=e,this.timeDelta=n}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Rk(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),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 wC(e,t){return new bC(e,t)}const xC=e=>t=>t.test(e),EC=[Ux,eE,Jx,Zx,nE,tE,{test:e=>"auto"===e,parse:e=>e}],SC=e=>EC.find(xC(e)),kC=[...EC,ik,yk],CC=e=>kC.find(xC(e));function PC(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,wC(n))}function _C(e,t){if(!t)return;return(t[e]||t.default||t).from}function TC({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function RC(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:a,...s}=e.makeTargetAnimatable(t);const l=e.getValue("willChange");r&&(i=r);const u=[],c=o&&e.animationState&&e.animationState.getState()[o];for(const d in s){const t=e.getValue(d),r=s[d];if(!t||void 0===r||c&&TC(c,d))continue;const o={delay:n,elapsed:0,...i};if(window.HandoffAppearAnimations&&!t.hasAnimated){const n=e.getProps()[xS];n&&(o.elapsed=window.HandoffAppearAnimations(n,d,t,nS))}t.start(pC(d,t,r,e.shouldReduceMotion&&Lx.has(d)?{type:!1}:o));const a=t.animation;hC(l)&&(l.add(d),a.then((()=>l.remove(d)))),u.push(a)}return a&&Promise.all(u).then((()=>{a&&function(e,t){const n=wS(e,t);let{transitionEnd:r={},transition:o={},...i}=n?e.makeTargetAnimatable(n,!1):{};i={...i,...r};for(const a in i)PC(e,a,ME(i[a]))}(e,a)})),u}function DC(e,t,n={}){const r=wS(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(RC(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:i=0,staggerChildren:a,staggerDirection:s}=o;return function(e,t,n=0,r=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*r,l=1===o?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort(AC).forEach(((e,r)=>{e.notify("AnimationStart",t),a.push(DC(e,t,{...i,delay:n+l(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(a)}(e,t,i+r,a,s,n)}:()=>Promise.resolve(),{when:s}=o;if(s){const[e,t]="beforeChildren"===s?[i,a]:[a,i];return e().then((()=>t()))}return Promise.all([i(),a(n.delay)])}function AC(e,t){return e.sortNodePosition(t)}const MC=[...fx].reverse(),LC=fx.length;function OC(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map((t=>DC(e,t,n)));r=Promise.all(o)}else if("string"==typeof t)r=DC(e,t,n);else{const o="function"==typeof t?wS(e,t,n.custom):t;r=Promise.all(RC(e,o,n))}return r.then((()=>e.notify("AnimationComplete",t)))}(e,t,n))))}function FC(e){let t=OC(e);const n={animate:NC(!0),whileInView:NC(),whileHover:NC(),whileTap:NC(),whileDrag:NC(),whileFocus:NC(),exit:NC()};let r=!0;const o=(t,n)=>{const r=wS(e,n);if(r){const{transition:e,transitionEnd:n,...o}=r;t={...t,...o,...n}}return t};function i(i,a){const s=e.getProps(),l=e.getVariantContext(!0)||{},u=[],c=new Set;let d={},f=1/0;for(let t=0;t<LC;t++){const p=MC[t],h=n[p],m=void 0!==s[p]?s[p]:l[p],g=cx(m),v=p===a?h.isActive:null;!1===v&&(f=t);let y=m===l[p]&&m!==s[p]&&g;if(y&&r&&e.manuallyAnimateOnMount&&(y=!1),h.protectedKeys={...d},!h.isActive&&null===v||!m&&!h.prevProp||dx(m)||"boolean"==typeof m)continue;const b=IC(h.prevProp,m);let w=b||p===a&&h.isActive&&!y&&g||t>f&&g;const x=Array.isArray(m)?m:[m];let E=x.reduce(o,{});!1===v&&(E={});const{prevResolvedValues:S={}}=h,k={...S,...E},C=e=>{w=!0,c.delete(e),h.needsAnimating[e]=!0};for(const e in k){const t=E[e],n=S[e];d.hasOwnProperty(e)||(t!==n?DE(t)&&DE(n)?!bS(t,n)||b?C(e):h.protectedKeys[e]=!0:void 0!==t?C(e):c.add(e):void 0!==t&&c.has(e)?C(e):h.protectedKeys[e]=!0)}h.prevProp=m,h.prevResolvedValues=E,h.isActive&&(d={...d,...E}),r&&e.blockInitialAnimation&&(w=!1),w&&!y&&u.push(...x.map((e=>({animation:e,options:{type:p,...i}}))))}if(c.size){const t={};c.forEach((n=>{const r=e.getBaseTarget(n);void 0!==r&&(t[n]=r)})),u.push({animation:t})}let p=Boolean(u.length);return r&&!1===s.initial&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,p?t(u):Promise.resolve()}return{animateChanges:i,setActive:function(t,r,o){var a;if(n[t].isActive===r)return Promise.resolve();null===(a=e.variantChildren)||void 0===a||a.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const s=i(o,t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n}}function IC(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!bS(t,e)}function NC(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let zC=0;const BC={animation:{Feature:class extends QE{constructor(e){super(e),e.animationState||(e.animationState=FC(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),dx(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends QE{constructor(){super(...arguments),this.id=zC++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t,custom:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const o=this.node.animationState.setActive("exit",!e,{custom:null!=n?n:this.node.getProps().custom});t&&!e&&o.then((()=>t(this.id)))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}},VC=(e,t)=>Math.abs(e-t);class jC{constructor(e,t,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=WC(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=VC(e.x,t.x),r=VC(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=GE;this.history.push({...r,timestamp:o});const{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=HC(t,this.transformPagePoint),nS.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{if(this.end(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const{onEnd:n,onSessionEnd:r}=this.handlers,o=WC("pointercancel"===e.type?this.lastMoveEventInfo:HC(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!BE(e))return;this.handlers=t,this.transformPagePoint=n;const r=HC(VE(e),this.transformPagePoint),{point:o}=r,{timestamp:i}=GE;this.history=[{...o,timestamp:i}];const{onSessionStart:a}=t;a&&a(e,WC(r,this.history)),this.removeListeners=WE(HE(window,"pointermove",this.handlePointerMove),HE(window,"pointerup",this.handlePointerUp),HE(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),rS.update(this.updatePoint)}}function HC(e,t){return t?{point:t(e.point)}:e}function UC(e,t){return{x:e.x-t.x,y:e.y-t.y}}function WC({point:e},t){return{point:e,delta:UC(e,KC(t)),offset:UC(e,$C(t)),velocity:XC(t,.1)}}function $C(e){return e[0]}function KC(e){return e[e.length-1]}function XC(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=KC(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>kS(t)));)n--;if(!r)return{x:0,y:0};const i=CS(o.timestamp-r.timestamp);if(0===i)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function YC(e){return e.max-e.min}function qC(e,t=0,n=.01){return Math.abs(e-t)<=n}function QC(e,t,n,r=.5){e.origin=r,e.originPoint=ak(t.min,t.max,e.origin),e.scale=YC(n)/YC(t),(qC(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=ak(n.min,n.max,e.origin)-e.originPoint,(qC(e.translate)||isNaN(e.translate))&&(e.translate=0)}function GC(e,t,n,r){QC(e.x,t.x,n.x,r?r.originX:void 0),QC(e.y,t.y,n.y,r?r.originY:void 0)}function ZC(e,t,n){e.min=n.min+t.min,e.max=e.min+YC(t)}function JC(e,t,n){e.min=t.min-n.min,e.max=e.min+YC(t)}function eP(e,t,n){JC(e.x,t.x,n.x),JC(e.y,t.y,n.y)}function tP(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function nP(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}}const rP=.35;function oP(e,t,n){return{min:iP(e,t),max:iP(e,n)}}function iP(e,t){return"number"==typeof e?e:e[t]||0}const aP=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),sP=()=>({x:{min:0,max:0},y:{min:0,max:0}});function lP(e){return[e("x"),e("y")]}function uP({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function cP(e){return void 0===e||1===e}function dP({scale:e,scaleX:t,scaleY:n}){return!cP(e)||!cP(t)||!cP(n)}function fP(e){return dP(e)||pP(e)||e.z||e.rotate||e.rotateX||e.rotateY}function pP(e){return hP(e.x)||hP(e.y)}function hP(e){return e&&"0%"!==e}function mP(e,t,n){return n+t*(e-n)}function gP(e,t,n,r,o){return void 0!==o&&(e=mP(e,o,r)),mP(e,n,r)+t}function vP(e,t=0,n=1,r,o){e.min=gP(e.min,t,n,r,o),e.max=gP(e.max,t,n,r,o)}function yP(e,{x:t,y:n}){vP(e.x,t.translate,t.scale,t.originPoint),vP(e.y,n.translate,n.scale,n.originPoint)}function bP(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function wP(e,t){e.min=e.min+t,e.max=e.max+t}function xP(e,t,[n,r,o]){const i=void 0!==t[o]?t[o]:.5,a=ak(e.min,e.max,i);vP(e,t[n],t[r],a,t.scale)}const EP=["x","scaleX","originX"],SP=["y","scaleY","originY"];function kP(e,t){xP(e.x,t,EP),xP(e.y,t,SP)}function CP(e,t){return uP(function(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}}(e.getBoundingClientRect(),t))}const PP=new WeakMap;class _P{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=sP(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;this.panSession=new jC(e,{onSessionStart:e=>{this.stopAnimation(),t&&this.snapToCursor(VE(e,"page").point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:o}=this.getProps();if(n&&!r&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=YE(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),lP((e=>{let t=this.getAxisMotionValue(e).get()||0;if(Jx.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=YC(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t})),o&&nS.update((()=>o(e,t)));const{animationState:i}=this.visualElement;i&&i.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:i}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:a}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(a),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),i&&i(e,t)},onSessionEnd:(e,t)=>this.stop(e,t)},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:o}=this.getProps();o&&nS.update((()=>o(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!TP(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?ak(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?ak(n,e,r.max):Math.min(e,n)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),{layout:n}=this.visualElement.projection||{},r=this.constraints;e&&ux(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:tP(e.x,n,o),y:tP(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=rP){return!1===e?e=0:!0===e&&(e=rP),{x:oP(e,"left","right"),y:oP(e,"top","bottom")}}(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&lP((e=>{this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!ux(e))return!1;const n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=function(e,t,n){const r=CP(e,n),{scroll:o}=t;return o&&(wP(r.x,o.offset.x),wP(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:nP(e.x,t.x),y:nP(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=uP(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},l=lP((a=>{if(!TP(a,t,this.currentDirection))return;let l=s&&s[a]||{};i&&(l={min:0,max:0});const u=r?200:1e6,c=r?40:1e7,d={type:"inertia",velocity:n?e[a]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(a,d)}));return Promise.all(l).then(a)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return n.start(pC(e,n,0,t))}stopAnimation(){lP((e=>this.getAxisMotionValue(e).stop()))}getAxisMotionValue(e){const t="_drag"+e.toUpperCase(),n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){lP((t=>{const{drag:n}=this.getProps();if(!TP(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:i}=r.layout.layoutBox[t];o.set(e[t]-ak(n,i,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!ux(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};lP((e=>{const t=this.getAxisMotionValue(e);if(t){const n=t.get();r[e]=function(e,t){let n=.5;const r=YC(e),o=YC(t);return o>r?n=Sk(t.min,t.max-r,e.min):r>o&&(n=Sk(e.min,e.max-o,t.min)),Hx(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),lP((t=>{if(!TP(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];n.set(ak(o,i,r[t]))}))}addListeners(){if(!this.visualElement.current)return;PP.set(this.visualElement,this);const e=HE(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();ux(e)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),t();const o=zE(window,"resize",(()=>this.scalePositionWithinConstraints())),i=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(lP((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{o(),e(),r(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=rP,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function TP(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const RP=e=>(t,n)=>{e&&nS.update((()=>e(t,n)))};function DP(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const AP={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!eE.test(e))return e;e=parseFloat(e)}return`${DP(e,t.target.x)}% ${DP(e,t.target.y)}%`}},MP=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function LP(e,t,n=1){const[r,o]=function(e){const t=MP.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);return i?i.trim():Vx(o)?LP(o,t,n+1):o}const OP="_$css",FP={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=e.includes("var("),i=[];o&&(e=e.replace(MP,(e=>(i.push(e),OP))));const a=yk.parse(e);if(a.length>5)return r;const s=yk.createTransformer(e),l="number"!=typeof a[0]?1:0,u=n.x.scale*t.x,c=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=c;const d=ak(u,c,.5);"number"==typeof a[2+l]&&(a[2+l]/=d),"number"==typeof a[3+l]&&(a[3+l]/=d);let f=s(a);if(o){let e=0;f=f.replace(OP,(()=>{const t=i[e];return e++,t}))}return f}};class IP extends $.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;var i;i=zP,Object.assign(Ax,i),o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",(()=>{this.safeToRemove()})),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),xx.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,i=n.projection;return i?(i.isPresent=o,r||e.layoutDependency!==t||void 0===t?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||nS.postRender((()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function NP(e){const[t,n]=function(){const e=W.useContext(ix);if(null===e)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=W.useId();return W.useEffect((()=>r(o)),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}(),r=W.useContext(Sx);return $.createElement(IP,{...e,layoutGroup:r,switchLayoutGroup:W.useContext(kx),isPresent:t,safeToRemove:n})}const zP={borderRadius:{...AP,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:AP,borderTopRightRadius:AP,borderBottomLeftRadius:AP,borderBottomRightRadius:AP,boxShadow:FP},BP=["TopLeft","TopRight","BottomLeft","BottomRight"],VP=BP.length,jP=e=>"string"==typeof e?parseFloat(e):e,HP=e=>"number"==typeof e||eE.test(e);function UP(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const WP=KP(0,.5,KS),$P=KP(.5,.95,cS);function KP(e,t,n){return r=>r<e?0:r>t?1:n(Sk(e,t,r))}function XP(e,t){e.min=t.min,e.max=t.max}function YP(e,t){XP(e.x,t.x),XP(e.y,t.y)}function qP(e,t,n,r,o){return e=mP(e-=t,1/n,r),void 0!==o&&(e=mP(e,1/o,r)),e}function QP(e,t,[n,r,o],i,a){!function(e,t=0,n=1,r=.5,o,i=e,a=e){Jx.test(t)&&(t=parseFloat(t),t=ak(a.min,a.max,t/100)-a.min);if("number"!=typeof t)return;let s=ak(i.min,i.max,r);e===i&&(s-=t),e.min=qP(e.min,t,n,s,o),e.max=qP(e.max,t,n,s,o)}(e,t[n],t[r],t[o],t.scale,i,a)}const GP=["x","scaleX","originX"],ZP=["y","scaleY","originY"];function JP(e,t,n,r){QP(e.x,t,GP,n?n.x:void 0,r?r.x:void 0),QP(e.y,t,ZP,n?n.y:void 0,r?r.y:void 0)}function e_(e){return 0===e.translate&&1===e.scale}function t_(e){return e_(e.x)&&e_(e.y)}function n_(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function r_(e){return YC(e.x)/YC(e.y)}class o_{constructor(){this.members=[]}add(e){gC(this.members,e),e.scheduleRender()}remove(e){if(vC(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let r=t;r>=0;r--){const e=this.members[r];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function i_(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y;if((o||i)&&(r=`translate3d(${o}px, ${i}px, 0) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:e,rotateX:t,rotateY:o}=n;e&&(r+=`rotate(${e}deg) `),t&&(r+=`rotateX(${t}deg) `),o&&(r+=`rotateY(${o}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return 1===a&&1===s||(r+=`scale(${a}, ${s})`),r||"none"}const a_=(e,t)=>e.depth-t.depth;class s_{constructor(){this.children=[],this.isDirty=!1}add(e){gC(this.children,e),this.isDirty=!0}remove(e){vC(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(a_),this.isDirty=!1,this.children.forEach(e)}}const l_=["","X","Y","Z"];let u_=0;const c_={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function d_({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e,n={},r=(null==t?void 0:t())){this.id=u_++,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.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{var e;c_.totalNodes=c_.resolvedTargetDeltas=c_.recalculatedProjection=0,this.nodes.forEach(h_),this.nodes.forEach(w_),this.nodes.forEach(x_),this.nodes.forEach(m_),e=c_,window.MotionDebug&&window.MotionDebug.record(e)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=e,this.latestValues=n,this.root=r?r.root||r:this,this.path=r?[...r.path,r]:[],this.parent=r,this.depth=r?r.depth+1:0,e&&this.root.registerPotentialNode(e,this);for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new s_)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new yC),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}registerPotentialNode(e,t){this.potentialNodes.set(e,t)}mount(t,n=!1){if(this.instance)return;var r;this.isSVG=(r=t)instanceof SVGElement&&"svg"!==r.tagName,this.instance=t;const{layoutId:o,layout:i,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.elementId&&this.root.potentialNodes.delete(this.elementId),n&&(i||o)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=performance.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(rS.read(r),e(i-t))};return nS.read(r,!0),()=>rS.read(r)}(r,250),xx.hasAnimatedSinceResize&&(xx.hasAnimatedSinceResize=!1,this.nodes.forEach(b_))}))}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&a&&(o||i)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||a.getDefaultTransition()||__,{onLayoutAnimationStart:i,onLayoutAnimationComplete:s}=a.getProps(),l=!this.targetLayout||!n_(this.targetLayout,r)||n,u=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||u||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,u);const t={...fC(o,"layout"),onPlay:i,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||0!==this.animationProgress||b_(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,rS.preRender(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(E_),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let o=0;o<this.path.length;o++){const e=this.path[o];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}didUpdate(){if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(v_);this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(T_),this.potentialNodes.clear()),this.nodes.forEach(y_),this.nodes.forEach(f_),this.nodes.forEach(p_),this.clearAllSnapshots(),oS.update(),oS.preRender(),oS.render())}clearAllSnapshots(){this.nodes.forEach(g_),this.sharedNodes.forEach(S_)}scheduleUpdateProjection(){nS.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){nS.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++){this.path[n].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=sP(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&(this.scroll={animationId:this.root.animationId,phase:e,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform,t=this.projectionDelta&&!t_(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,i=r!==this.prevTransformTemplateValue;e&&(t||fP(this.latestValues)||i)&&(o(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),R_((r=n).x),R_(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return sP();const t=e.measureViewportBox(),{scroll:n}=this.root;return n&&(wP(t.x,n.offset.x),wP(t.y,n.offset.y)),t}removeElementScroll(e){const t=sP();YP(t,e);for(let n=0;n<this.path.length;n++){const r=this.path[n],{scroll:o,options:i}=r;if(r!==this.root&&o&&i.layoutScroll){if(o.isRoot){YP(t,e);const{scroll:n}=this.root;n&&(wP(t.x,-n.offset.x),wP(t.y,-n.offset.y))}wP(t.x,o.offset.x),wP(t.y,o.offset.y)}}return t}applyTransform(e,t=!1){const n=sP();YP(n,e);for(let r=0;r<this.path.length;r++){const e=this.path[r];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&kP(n,{x:-e.scroll.offset.x,y:-e.scroll.offset.y}),fP(e.latestValues)&&kP(n,e.latestValues)}return fP(this.latestValues)&&kP(n,this.latestValues),n}removeTransform(e){const t=sP();YP(t,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];if(!e.instance)continue;if(!fP(e.latestValues))continue;dP(e.latestValues)&&e.updateSnapshot();const r=sP();YP(r,e.measurePageBox()),JP(t,e.latestValues,e.snapshot?e.snapshot.layoutBox:void 0,r)}return fP(this.latestValues)&&JP(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}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}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget))return;const{layout:o,layoutId:i}=this.options;if(this.layout&&(o||i)){if(this.resolvedRelativeTargetAt=GE.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout?(this.relativeParent=e,this.relativeTarget=sP(),this.relativeTargetOrigin=sP(),eP(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),YP(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var a,s,l;if(this.target||(this.target=sP(),this.targetWithTransforms=sP()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.relativeParent.resolvedRelativeTargetAt!==GE.timestamp&&this.relativeParent.resolveTargetDelta(!0),a=this.target,s=this.relativeTarget,l=this.relativeParent.target,ZC(a.x,s.x,l.x),ZC(a.y,s.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):YP(this.target,this.layout.layoutBox),yP(this.target,this.targetDelta)):YP(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target?(this.relativeParent=e,this.relativeTarget=sP(),this.relativeTargetOrigin=sP(),eP(this.relativeTargetOrigin,this.target,e.target),YP(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}c_.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!dP(this.parent.latestValues)&&!pP(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===GE.timestamp&&(r=!1),r)return;const{layout:o,layoutId:i}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!o&&!i)return;YP(this.layoutCorrected,this.layout.layoutBox),function(e,t,n,r=!1){const o=n.length;if(!o)return;let i,a;t.x=t.y=1;for(let s=0;s<o;s++){i=n[s],a=i.projectionDelta;const o=i.instance;o&&o.style&&"contents"===o.style.display||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&kP(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,yP(e,a)),r&&fP(i.latestValues)&&kP(e,i.latestValues))}t.x=bP(t.x),t.y=bP(t.y)}(this.layoutCorrected,this.treeScale,this.path,n);const{target:a}=t;if(!a)return;this.projectionDelta||(this.projectionDelta=aP(),this.projectionDeltaWithTransform=aP());const s=this.treeScale.x,l=this.treeScale.y,u=this.projectionTransform;GC(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.projectionTransform=i_(this.projectionDelta,this.treeScale),this.projectionTransform===u&&this.treeScale.x===s&&this.treeScale.y===l||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a)),c_.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},o={...this.latestValues},i=aP();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const a=sP(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,c=Boolean(s&&!u&&!0===this.options.crossfade&&!this.path.some(P_));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,f,p,h;k_(i.x,e.x,n),k_(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(eP(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),l=this.relativeTarget,f=this.relativeTargetOrigin,p=a,h=n,C_(l.x,f.x,p.x,h),C_(l.y,f.y,p.y,h),d&&n_(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d=sP()),YP(d,this.relativeTarget)),s&&(this.animationValues=o,function(e,t,n,r,o,i){o?(e.opacity=ak(0,void 0!==n.opacity?n.opacity:1,WP(r)),e.opacityExit=ak(void 0!==t.opacity?t.opacity:1,0,$P(r))):i&&(e.opacity=ak(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let a=0;a<VP;a++){const o=`border${BP[a]}Radius`;let i=UP(t,o),s=UP(n,o);void 0===i&&void 0===s||(i||(i=0),s||(s=0),0===i||0===s||HP(i)===HP(s)?(e[o]=Math.max(ak(jP(i),jP(s),r),0),(Jx.test(s)||Jx.test(i))&&(e[o]+="%")):e[o]=s)}(t.rotate||n.rotate)&&(e.rotate=ak(t.rotate||0,n.rotate||0,r))}(o,r,this.latestValues,n,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(rS.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=nS.update((()=>{xx.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=Fx(e)?e:wC(e);return r.start(pC("",r,t,n)),r.animation}(0,1e3,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.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 e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&D_(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||sP();const t=YC(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=YC(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}YP(t,n),kP(t,o),GC(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new o_);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(t=!0),!t)return;const r={};for(let o=0;o<l_.length;o++){const t="rotate"+l_[o];n[t]&&(r[t]=n[t],e.setStaticValue(t,0))}e.render();for(const o in r)e.setStaticValue(o,r[o]);e.scheduleRender()}getProjectionStyles(e={}){var t,n;const r={};if(!this.instance||this.isSVG)return r;if(!this.isVisible)return{visibility:"hidden"};r.visibility="";const o=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=LE(e.pointerEvents)||"",r.transform=o?o(this.latestValues,""):"none",r;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=LE(e.pointerEvents)||""),this.hasProjected&&!fP(this.latestValues)&&(t.transform=o?o({},""):"none",this.hasProjected=!1),t}const a=i.animationValues||i.latestValues;this.applyTransformsToTarget(),r.transform=i_(this.projectionDeltaWithTransform,this.treeScale,a),o&&(r.transform=o(a,r.transform));const{x:s,y:l}=this.projectionDelta;r.transformOrigin=`${100*s.origin}% ${100*l.origin}% 0`,i.animationValues?r.opacity=i===this?null!==(n=null!==(t=a.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:r.opacity=i===this?void 0!==a.opacity?a.opacity:"":void 0!==a.opacityExit?a.opacityExit:0;for(const u in Ax){if(void 0===a[u])continue;const{correct:e,applyTo:t}=Ax[u],n="none"===r.transform?a[u]:e(a[u],i);if(t){const e=t.length;for(let o=0;o<e;o++)r[t[o]]=n}else r[u]=n}return this.options.layoutId&&(r.pointerEvents=i===this?LE(e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(v_),this.root.sharedNodes.clear()}}}function f_(e){e.updateLayout()}function p_(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:o}=e.options,i=n.source!==e.layout.source;"size"===o?lP((e=>{const r=i?n.measuredBox[e]:n.layoutBox[e],o=YC(r);r.min=t[e].min,r.max=r.min+o})):D_(o,n.layoutBox,t)&&lP((r=>{const o=i?n.measuredBox[r]:n.layoutBox[r],a=YC(t[r]);o.max=o.min+a,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+a)}));const a=aP();GC(a,t,n.layoutBox);const s=aP();i?GC(s,e.applyTransform(r,!0),n.measuredBox):GC(s,t,n.layoutBox);const l=!t_(a);let u=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:i}=r;if(o&&i){const a=sP();eP(a,n.layoutBox,o.layoutBox);const s=sP();eP(s,t,i.layoutBox),n_(a,s)||(u=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=a,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function h_(e){c_.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function m_(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function g_(e){e.clearSnapshot()}function v_(e){e.clearMeasurements()}function y_(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function b_(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function w_(e){e.resolveTargetDelta()}function x_(e){e.calcProjection()}function E_(e){e.resetRotation()}function S_(e){e.removeLeadSnapshot()}function k_(e,t,n){e.translate=ak(t.translate,0,n),e.scale=ak(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function C_(e,t,n,r){e.min=ak(t.min,n.min,r),e.max=ak(t.max,n.max,r)}function P_(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const __={duration:.45,ease:[.4,0,.1,1]};function T_(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const r=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);r&&e.mount(r,!0)}function R_(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function D_(e,t,n){return"position"===e||"preserve-aspect"===e&&!qC(r_(t),r_(n),.2)}const A_=d_({attachResizeListener:(e,t)=>zE(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),M_={current:void 0},L_=d_({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!M_.current){const e=new A_(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),M_.current=e}return M_.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),O_={pan:{Feature:class extends QE{constructor(){super(...arguments),this.removePointerDownListener=cS}onPointerDown(e){this.session=new jC(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:RP(e),onStart:RP(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&nS.update((()=>r(e,t)))}}}mount(){this.removePointerDownListener=HE(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends QE{constructor(e){super(e),this.removeGroupControls=cS,this.removeListeners=cS,this.controls=new _P(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||cS}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:L_,MeasureLayout:NP}},F_=new Set(["width","height","top","left","right","bottom","x","y"]),I_=e=>F_.has(e),N_=e=>e===Ux||e===eE,z_=(e,t)=>parseFloat(e.split(", ")[t]),B_=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/);if(o)return z_(o[1],t);{const t=r.match(/^matrix\((.+)\)$/);return t?z_(t[1],e):0}},V_=new Set(["x","y","z"]),j_=Mx.filter((e=>!V_.has(e)));const H_={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:B_(4,13),y:B_(5,14)},U_=(e,t,n={},r={})=>{t={...t},r={...r};const o=Object.keys(t).filter(I_);let i=[],a=!1;const s=[];if(o.forEach((o=>{const l=e.getValue(o);if(!e.hasValue(o))return;let u=n[o],c=SC(u);const d=t[o];let f;if(DE(d)){const e=d.length,t=null===d[0]?1:0;u=d[t],c=SC(u);for(let n=t;n<e;n++)f?SS(SC(d[n])===f):f=SC(d[n])}else f=SC(d);if(c!==f)if(N_(c)&&N_(f)){const e=l.get();"string"==typeof e&&l.set(parseFloat(e)),"string"==typeof d?t[o]=parseFloat(d):Array.isArray(d)&&f===eE&&(t[o]=d.map(parseFloat))}else(null==c?void 0:c.transform)&&(null==f?void 0:f.transform)&&(0===u||0===d)?0===u?l.set(f.transform(u)):t[o]=c.transform(d):(a||(i=function(e){const t=[];return j_.forEach((n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t.length&&e.render(),t}(e),a=!0),s.push(o),r[o]=void 0!==r[o]?r[o]:t[o],l.jump(d))})),s.length){const n=s.indexOf("height")>=0?window.pageYOffset:null,o=((e,t,n)=>{const r=t.measureViewportBox(),o=t.current,i=getComputedStyle(o),{display:a}=i,s={};"none"===a&&t.setStaticValue("display",e.display||"block"),n.forEach((e=>{s[e]=H_[e](r,i)})),t.render();const l=t.measureViewportBox();return n.forEach((n=>{const r=t.getValue(n);r&&r.jump(s[n]),e[n]=H_[n](l,i)})),e})(t,e,s);return i.length&&i.forEach((([t,n])=>{e.getValue(t).set(n)})),e.render(),ax&&null!==n&&window.scrollTo({top:n}),{target:o,transitionEnd:r}}return{target:t,transitionEnd:r}};function W_(e,t,n,r){return(e=>Object.keys(e).some(I_))(t)?U_(e,t,n,r):{target:t,transitionEnd:r}}const $_=(e,t,n,r)=>{const o=function(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach((e=>{const t=e.get();if(!Vx(t))return;const n=LP(t,r);n&&e.set(n)}));for(const o in t){const e=t[o];if(!Vx(e))continue;const i=LP(e,r);i&&(t[o]=i,n||(n={}),void 0===n[o]&&(n[o]=e))}return{target:t,transitionEnd:n}}(e,t,r);return W_(e,t=o.target,n,r=o.transitionEnd)},K_={current:null},X_={current:!1};const Y_=new WeakMap,q_=Object.keys(bx),Q_=q_.length,G_=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Z_=px.length;class J_{constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,visualState:o},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,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.scheduleRender=()=>nS.render(this.render,!1,!0);const{latestValues:a,renderState:s}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=s,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=i,this.isControllingVariants=hx(t),this.isVariantNode=mx(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(t,{});for(const c in u){const e=u[c];void 0!==a[c]&&Fx(e)&&(e.set(a[c],!1),hC(l)&&l.add(c))}}scrapeMotionValuesFromProps(e,t){return{}}mount(e){this.current=e,Y_.set(e,this),this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),X_.current||function(){if(X_.current=!0,ax)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>K_.current=e.matches;e.addListener(t),t()}else K_.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||K_.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Y_.delete(this.current),this.projection&&this.projection.unmount(),rS.update(this.notifyUpdate),rS.render(this.render),this.valueSubscriptions.forEach((e=>e())),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,t){const n=Lx.has(e),r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&nS.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)})),o=t.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,(()=>{r(),o()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}loadFeatures({children:e,...t},n,r,o,i){let a,s;for(let l=0;l<Q_;l++){const e=q_[l],{isEnabled:n,Feature:r,ProjectionNode:o,MeasureLayout:i}=bx[e];o&&(a=o),n(t)&&(!this.features[e]&&r&&(this.features[e]=new r(this)),i&&(s=i))}if(!this.projection&&a){this.projection=new a(o,this.latestValues,this.parent&&this.parent.projection);const{layoutId:e,layout:n,drag:r,dragConstraints:s,layoutScroll:l,layoutRoot:u}=t;this.projection.setOptions({layoutId:e,layout:n,alwaysMeasureLayout:Boolean(r)||s&&ux(s),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:i,layoutScroll:l,layoutRoot:u})}return s}updateFeatures(){for(const e in this.features){const t=this.features[e];t.isMounted?t.update(this.props,this.prevProps):(t.mount(),t.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):sP()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}makeTargetAnimatable(e,t=!0){return this.makeTargetAnimatableFromInstance(e,this.props,t)}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<G_.length;n++){const t=G_[n];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const r=e["on"+t];r&&(this.propEventSubscriptions[t]=this.on(t,r))}this.prevMotionValues=function(e,t,n){const{willChange:r}=t;for(const o in t){const i=t[o],a=n[o];if(Fx(i))e.addValue(o,i),hC(r)&&r.add(o);else if(Fx(a))e.addValue(o,wC(i,{owner:e})),hC(r)&&r.remove(o);else if(a!==i)if(e.hasValue(o)){const t=e.getValue(o);!t.hasAnimated&&t.set(i)}else{const t=e.getStaticValue(o);e.addValue(o,wC(void 0!==t?t:i,{owner:e}))}}for(const o in n)void 0===t[o]&&e.removeValue(o);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const e=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(e.initial=this.props.initial),e}const t={};for(let n=0;n<Z_;n++){const e=px[n],r=this.props[e];(cx(r)||!1===r)&&(t[e]=r)}return t}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){t!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,t)),this.values.set(e,t),this.latestValues[e]=t.get()}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=wC(t,{owner:this}),this.addValue(e,n)),n}readValue(e){return void 0===this.latestValues[e]&&this.current?this.readValueFromInstance(this.current,e,this.options):this.latestValues[e]}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props,r="string"==typeof n||"object"==typeof n?null===(t=RE(this.props,n))||void 0===t?void 0:t[e]:void 0;if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||Fx(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new yC),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class eT extends J_{sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:t,...n},{transformValues:r},o){let i=function(e,t,n){const r={};for(const o in e){const e=_C(o,t);if(void 0!==e)r[o]=e;else{const e=n.getValue(o);e&&(r[o]=e.get())}}return r}(n,e||{},this);if(r&&(t&&(t=r(t)),n&&(n=r(n)),i&&(i=r(i))),o){!function(e,t,n){var r,o;const i=Object.keys(t).filter((t=>!e.hasValue(t))),a=i.length;if(a)for(let s=0;s<a;s++){const a=i[s],l=t[a];let u=null;Array.isArray(l)&&(u=l[0]),null===u&&(u=null!==(o=null!==(r=n[a])&&void 0!==r?r:e.readValue(a))&&void 0!==o?o:t[a]),null!=u&&("string"==typeof u&&(/^\-?\d*\.?\d+$/.test(u)||mC(u))?u=parseFloat(u):!CC(u)&&yk.test(l)&&(u=uC(a,l)),e.addValue(a,wC(u,{owner:e})),void 0===n[a]&&(n[a]=u),null!==u&&e.setBaseTarget(a,u))}}(this,n,i);const e=$_(this,n,i,t);t=e.transitionEnd,n=e.target}return{transition:e,transitionEnd:t,...n}}}class tT extends eT{readValueFromInstance(e,t){if(Lx.has(t)){const e=lC(t);return e&&e.default||0}{const r=(n=e,window.getComputedStyle(n)),o=(Bx(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return CP(e,t)}build(e,t,n,r){aE(e,t,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,t){return _E(e,t)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Fx(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}renderInstance(e,t,n,r){kE(e,t,n,r)}}class nT extends eT{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Lx.has(t)){const e=lC(t);return e&&e.default||0}return t=CE.has(t)?t:SE(t),e.getAttribute(t)}measureInstanceViewportBox(){return sP()}scrapeMotionValuesFromProps(e,t){return TE(e,t)}build(e,t,n,r){yE(e,t,n,this.isSVGTag,r.transformTemplate)}renderInstance(e,t,n,r){PE(e,t,0,r)}mount(e){this.isSVGTag=wE(e.tagName),super.mount(e)}}const rT=(e,t)=>Dx(e)?new nT(t,{enableHardwareAcceleration:!1}):new tT(t,{enableHardwareAcceleration:!0}),oT={...BC,...yS,...O_,...{layout:{ProjectionNode:L_,MeasureLayout:NP}}},iT=Tx(((e,t)=>function(e,{forwardMotionProps:t=!1},n,r){return{...Dx(e)?IE:NE,preloadedFeatures:n,useRender:EE(t),createVisualElement:r,Component:e}}(e,t,oT,rT)));function aT(){return aT=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},aT.apply(this,arguments)}function sT(e,t){return(sT=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var lT=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,sT(t,n);var o=r.prototype;return o.getColumns=function(){var e=this.props,t=e.children,n=e.columnsCount,r=Array.from({length:n},(function(){return[]}));return $.Children.forEach(t,(function(e,t){e&&$.isValidElement(e)&&r[t%n].push(e)})),r},o.renderColumns=function(){var e=this.props.gutter;return this.getColumns().map((function(t,n){return $.createElement("div",{key:n,style:{display:"flex",flexDirection:"column",justifyContent:"flex-start",alignContent:"stretch",flex:1,width:0,gap:e}},t.map((function(e){return e})))}))},o.render=function(){var e=this.props,t=e.gutter,n=e.className,r=e.style;return $.createElement("div",{style:aT({display:"flex",flexDirection:"row",justifyContent:"center",alignContent:"stretch",boxSizing:"border-box",width:"100%",gap:t},r),className:n},this.renderColumns())},r}($.Component);lT.propTypes={},lT.defaultProps={columnsCount:3,gutter:"0",className:null,style:{}};var uT="undefined"!=typeof window?W.useLayoutEffect:W.useEffect,cT=function(){var e=function(){var e=W.useState(!1),t=e[0],n=e[1];return uT((function(){n(!0)}),[]),t}(),t=W.useState(0),n=t[0],r=t[1],o=W.useCallback((function(){e&&r(window.innerWidth)}),[e]);return uT((function(){if(e)return window.addEventListener("resize",o),o(),function(){return window.removeEventListener("resize",o)}}),[e,o]),n},dT=function(e){var t=e.columnsCountBreakPoints,n=void 0===t?{350:1,750:2,900:3}:t,r=e.children,o=e.className,i=void 0===o?null:o,a=e.style,s=void 0===a?null:a,l=cT(),u=W.useMemo((function(){var e=Object.keys(n).sort((function(e,t){return e-t})),t=e.length>0?n[e[0]]:1;return e.forEach((function(e){e<l&&(t=n[e])})),t}),[l,n]);return $.createElement("div",{className:i,style:s},$.Children.map(r,(function(e,t){return $.cloneElement(e,{key:t,columnsCount:u})})))};function fT(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function pT(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function hT(...e){return W.useCallback(pT(...e),e)}function mT(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>W.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return W.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=W.createContext(r),i=n.length;function a(t){const{scope:n,children:r,...a}=t,s=(null==n?void 0:n[e][i])||o,l=W.useMemo((()=>a),Object.values(a));return W.createElement(s.Provider,{value:l},r)}return n=[...n,r],a.displayName=t+"Provider",[a,function(n,a){const s=(null==a?void 0:a[e][i])||o,l=W.useContext(s);if(l)return l;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},gT(r,...t)]}function gT(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return W.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}dT.propTypes={};const vT=W.forwardRef(((e,t)=>{const{children:n,...r}=e,o=W.Children.toArray(n),i=o.find(wT);if(i){const e=i.props.children,n=o.map((t=>t===i?W.Children.count(e)>1?W.Children.only(null):W.isValidElement(e)?e.props.children:null:t));return W.createElement(yT,Jn({},r,{ref:t}),W.isValidElement(e)?W.cloneElement(e,void 0,n):null)}return W.createElement(yT,Jn({},r,{ref:t}),n)}));vT.displayName="Slot";const yT=W.forwardRef(((e,t)=>{const{children:n,...r}=e;return W.isValidElement(n)?W.cloneElement(n,{...xT(r,n.props),ref:t?pT(t,n.ref):n.ref}):W.Children.count(n)>1?W.Children.only(null):null}));yT.displayName="SlotClone";const bT=({children:e})=>W.createElement(W.Fragment,null,e);function wT(e){return W.isValidElement(e)&&e.type===bT}function xT(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const ET=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const n=W.forwardRef(((e,n)=>{const{asChild:r,...o}=e,i=r?vT:t;return W.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),W.createElement(i,Jn({},o,{ref:n}))}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function ST(e){const t=e+"CollectionProvider",[n,r]=mT(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=e+"CollectionSlot",s=e+"CollectionItemSlot",l="data-radix-collection-item";return[{Provider:e=>{const{scope:t,children:n}=e,r=$.useRef(null),i=$.useRef(new Map).current;return $.createElement(o,{scope:t,itemMap:i,collectionRef:r},n)},Slot:$.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=hT(t,i(a,n).collectionRef);return $.createElement(vT,{ref:o},r)})),ItemSlot:$.forwardRef(((e,t)=>{const{scope:n,children:r,...o}=e,a=$.useRef(null),u=hT(t,a),c=i(s,n);return $.useEffect((()=>(c.itemMap.set(a,{ref:a,...o}),()=>{c.itemMap.delete(a)}))),$.createElement(vT,{[l]:"",ref:u},r)}))},function(t){const n=i(e+"CollectionConsumer",t),r=$.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${l}]`)),r=Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)));return r}),[n.collectionRef,n.itemMap]);return r},r]}const kT=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?W.useLayoutEffect:()=>{},CT=K["useId".toString()]||(()=>{});let PT=0;function _T(e){const[t,n]=W.useState(CT());return kT((()=>{e||n((e=>null!=e?e:String(PT++)))}),[e]),e||(t?`radix-${t}`:"")}function TT(e){const t=W.useRef(e);return W.useEffect((()=>{t.current=e})),W.useMemo((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}function RT({prop:e,defaultProp:t,onChange:n=(()=>{})}){const[r,o]=function({defaultProp:e,onChange:t}){const n=W.useState(e),[r]=n,o=W.useRef(r),i=TT(t);return W.useEffect((()=>{o.current!==r&&(i(r),o.current=r)}),[r,o,i]),n}({defaultProp:t,onChange:n}),i=void 0!==e,a=i?e:r,s=TT(n),l=W.useCallback((t=>{if(i){const n="function"==typeof t?t(e):t;n!==e&&s(n)}else o(t)}),[i,e,o,s]);return[a,l]}const DT=W.createContext(void 0);function AT(e){const t=W.useContext(DT);return e||t||"ltr"}const MT="rovingFocusGroup.onEntryFocus",LT={bubbles:!1,cancelable:!0},OT="RovingFocusGroup",[FT,IT,NT]=ST(OT),[zT,BT]=mT(OT,[NT]),[VT,jT]=zT(OT),HT=W.forwardRef(((e,t)=>W.createElement(FT.Provider,{scope:e.__scopeRovingFocusGroup},W.createElement(FT.Slot,{scope:e.__scopeRovingFocusGroup},W.createElement(UT,Jn({},e,{ref:t})))))),UT=W.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...c}=e,d=W.useRef(null),f=hT(t,d),p=AT(i),[h=null,m]=RT({prop:a,defaultProp:s,onChange:l}),[g,v]=W.useState(!1),y=TT(u),b=IT(n),w=W.useRef(!1),[x,E]=W.useState(0);return W.useEffect((()=>{const e=d.current;if(e)return e.addEventListener(MT,y),()=>e.removeEventListener(MT,y)}),[y]),W.createElement(VT,{scope:n,orientation:r,dir:p,loop:o,currentTabStopId:h,onItemFocus:W.useCallback((e=>m(e)),[m]),onItemShiftTab:W.useCallback((()=>v(!0)),[]),onFocusableItemAdd:W.useCallback((()=>E((e=>e+1))),[]),onFocusableItemRemove:W.useCallback((()=>E((e=>e-1))),[])},W.createElement(ET.div,Jn({tabIndex:g||0===x?-1:0,"data-orientation":r},c,{ref:f,style:{outline:"none",...e.style},onMouseDown:fT(e.onMouseDown,(()=>{w.current=!0})),onFocus:fT(e.onFocus,(e=>{const t=!w.current;if(e.target===e.currentTarget&&t&&!g){const t=new CustomEvent(MT,LT);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=b().filter((e=>e.focusable));KT([e.find((e=>e.active)),e.find((e=>e.id===h)),...e].filter(Boolean).map((e=>e.ref.current)))}}w.current=!1})),onBlur:fT(e.onBlur,(()=>v(!1)))})))})),WT=W.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,s=_T(),l=i||s,u=jT("RovingFocusGroupItem",n),c=u.currentTabStopId===l,d=IT(n),{onFocusableItemAdd:f,onFocusableItemRemove:p}=u;return W.useEffect((()=>{if(r)return f(),()=>p()}),[r,f,p]),W.createElement(FT.ItemSlot,{scope:n,id:l,focusable:r,active:o},W.createElement(ET.span,Jn({tabIndex:c?0:-1,"data-orientation":u.orientation},a,{ref:t,onMouseDown:fT(e.onMouseDown,(e=>{r?u.onItemFocus(l):e.preventDefault()})),onFocus:fT(e.onFocus,(()=>u.onItemFocus(l))),onKeyDown:fT(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:$T[r]}(e,u.orientation,u.dir);if(void 0!==t){e.preventDefault();let o=d().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const i=o.indexOf(e.currentTarget);o=u.loop?(r=i+1,(n=o).map(((e,t)=>n[(r+t)%n.length]))):o.slice(i+1)}setTimeout((()=>KT(o)))}var n,r}))})))})),$T={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function KT(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}const XT=HT,YT=WT;function qT(e){const[t,n]=W.useState(void 0);return kT((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}function QT(e){const t=W.useRef({value:e,previous:e});return W.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}const GT=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=W.useState(),r=W.useRef({}),o=W.useRef(e),i=W.useRef("none"),a=e?"mounted":"unmounted",[s,l]=function(e,t){return W.useReducer(((e,n)=>{const r=t[e][n];return null!=r?r:e}),e)}(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return W.useEffect((()=>{const e=ZT(r.current);i.current="mounted"===s?e:"none"}),[s]),kT((()=>{const t=r.current,n=o.current;if(n!==e){const r=i.current,a=ZT(t);if(e)l("MOUNT");else if("none"===a||"none"===(null==t?void 0:t.display))l("UNMOUNT");else{l(n&&r!==a?"ANIMATION_OUT":"UNMOUNT")}o.current=e}}),[e,l]),kT((()=>{if(t){const e=e=>{const n=ZT(r.current).includes(e.animationName);e.target===t&&n&&yh.flushSync((()=>l("ANIMATION_END")))},n=e=>{e.target===t&&(i.current=ZT(r.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}l("ANIMATION_END")}),[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:W.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}(t),o="function"==typeof n?n({present:r.isPresent}):W.Children.only(n),i=hT(r.ref,o.ref);return"function"==typeof n||r.isPresent?W.cloneElement(o,{ref:i}):null};function ZT(e){return(null==e?void 0:e.animationName)||"none"}GT.displayName="Presence";const JT="Radio",[eR,tR]=mT(JT),[nR,rR]=eR(JT),oR=W.forwardRef(((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:a,value:s="on",onCheck:l,...u}=e,[c,d]=W.useState(null),f=hT(t,(e=>d(e))),p=W.useRef(!1),h=!c||Boolean(c.closest("form"));return W.createElement(nR,{scope:n,checked:o,disabled:a},W.createElement(ET.button,Jn({type:"button",role:"radio","aria-checked":o,"data-state":sR(o),"data-disabled":a?"":void 0,disabled:a,value:s},u,{ref:f,onClick:fT(e.onClick,(e=>{o||null==l||l(),h&&(p.current=e.isPropagationStopped(),p.current||e.stopPropagation())}))})),h&&W.createElement(aR,{control:c,bubbles:!p.current,name:r,value:s,checked:o,required:i,disabled:a,style:{transform:"translateX(-100%)"}}))})),iR=W.forwardRef(((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=rR("RadioIndicator",n);return W.createElement(GT,{present:r||i.checked},W.createElement(ET.span,Jn({"data-state":sR(i.checked),"data-disabled":i.disabled?"":void 0},o,{ref:t})))})),aR=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=W.useRef(null),a=QT(n),s=qT(t);return W.useEffect((()=>{const e=i.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(a!==n&&o){const t=new Event("click",{bubbles:r});o.call(e,n),e.dispatchEvent(t)}}),[a,n,r]),W.createElement("input",Jn({type:"radio","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function sR(e){return e?"checked":"unchecked"}const lR=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],uR="RadioGroup",[cR,dR]=mT(uR,[BT,tR]),fR=BT(),pR=tR(),[hR,mR]=cR(uR),gR=W.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:a=!1,disabled:s=!1,orientation:l,dir:u,loop:c=!0,onValueChange:d,...f}=e,p=fR(n),h=AT(u),[m,g]=RT({prop:i,defaultProp:o,onChange:d});return W.createElement(hR,{scope:n,name:r,required:a,disabled:s,value:m,onValueChange:g},W.createElement(XT,Jn({asChild:!0},p,{orientation:l,dir:h,loop:c}),W.createElement(ET.div,Jn({role:"radiogroup","aria-required":a,"aria-orientation":l,"data-disabled":s?"":void 0,dir:h},f,{ref:t}))))})),vR=gR,yR=W.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=mR("RadioGroupItem",n),a=i.disabled||r,s=fR(n),l=pR(n),u=W.useRef(null),c=hT(t,u),d=i.value===o.value,f=W.useRef(!1);return W.useEffect((()=>{const e=e=>{lR.includes(e.key)&&(f.current=!0)},t=()=>f.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),W.createElement(YT,Jn({asChild:!0},s,{focusable:!a,active:d}),W.createElement(oR,Jn({disabled:a,required:i.required,checked:d},l,o,{name:i.name,ref:c,onCheck:()=>i.onValueChange(o.value),onKeyDown:fT((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:fT(o.onFocus,(()=>{var e;f.current&&(null===(e=u.current)||void 0===e||e.click())}))})))})),bR=W.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=pR(n);return W.createElement(iR,Jn({},o,r,{ref:t}))}));function wR(e,[t,n]){return Math.min(n,Math.max(t,e))}const xR="dismissableLayer.update",ER="dismissableLayer.pointerDownOutside",SR="dismissableLayer.focusOutside";let kR;const CR=W.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),PR=W.forwardRef(((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,c=W.useContext(CR),[d,f]=W.useState(null),p=null!==(n=null==d?void 0:d.ownerDocument)&&void 0!==n?n:null===globalThis||void 0===globalThis?void 0:globalThis.document,[,h]=W.useState({}),m=hT(t,(e=>f(e))),g=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(v),b=d?g.indexOf(d):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,x=b>=y,E=function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=TT(e),r=W.useRef(!1),o=W.useRef((()=>{}));return W.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){TR(ER,n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}r.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));x&&!n&&(null==i||i(e),null==s||s(e),e.defaultPrevented||null==l||l())}),p),S=function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=TT(e),r=W.useRef(!1);return W.useEffect((()=>{const e=e=>{if(e.target&&!r.current){TR(SR,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==a||a(e),null==s||s(e),e.defaultPrevented||null==l||l())}),p);return function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=TT(e);W.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)}),[n,t])}((e=>{b===c.layers.size-1&&(null==o||o(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))}),p),W.useEffect((()=>{if(d)return r&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(kR=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),_R(),()=>{r&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=kR)}}),[d,p,r,c]),W.useEffect((()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),_R())}),[d,c]),W.useEffect((()=>{const e=()=>h({});return document.addEventListener(xR,e),()=>document.removeEventListener(xR,e)}),[]),W.createElement(ET.div,Jn({},u,{ref:m,style:{pointerEvents:w?x?"auto":"none":void 0,...e.style},onFocusCapture:fT(e.onFocusCapture,S.onFocusCapture),onBlurCapture:fT(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:fT(e.onPointerDownCapture,E.onPointerDownCapture)}))}));function _R(){const e=new CustomEvent(xR);document.dispatchEvent(e)}function TR(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?function(e,t){e&&yh.flushSync((()=>e.dispatchEvent(t)))}(o,i):o.dispatchEvent(i)}let RR=0;function DR(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const AR="focusScope.autoFocusOnMount",MR="focusScope.autoFocusOnUnmount",LR={bubbles:!1,cancelable:!0},OR=W.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=W.useState(null),u=TT(o),c=TT(i),d=W.useRef(null),f=hT(t,(e=>l(e))),p=W.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;W.useEffect((()=>{if(r){let e=function(e){if(p.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:zR(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||zR(d.current,{select:!0}))},n=function(e){const t=document.activeElement;for(const n of e)n.removedNodes.length>0&&(null!=s&&s.contains(t)||zR(s))};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[r,s,p.paused]),W.useEffect((()=>{if(s){BR.add(p);const t=document.activeElement;if(!s.contains(t)){const n=new CustomEvent(AR,LR);s.addEventListener(AR,u),s.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(zR(r,{select:t}),document.activeElement!==n)return}((e=FR(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&zR(s))}return()=>{s.removeEventListener(AR,u),setTimeout((()=>{const e=new CustomEvent(MR,LR);s.addEventListener(MR,c),s.dispatchEvent(e),e.defaultPrevented||zR(null!=t?t:document.body,{select:!0}),s.removeEventListener(MR,c),BR.remove(p)}),0)}}var e}),[s,u,c,p]);const h=W.useCallback((e=>{if(!n&&!r)return;if(p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,i]=function(e){const t=FR(e),n=IR(t,e),r=IR(t.reverse(),e);return[n,r]}(t);r&&i?e.shiftKey||o!==i?e.shiftKey&&o===r&&(e.preventDefault(),n&&zR(i,{select:!0})):(e.preventDefault(),n&&zR(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,p.paused]);return W.createElement(ET.div,Jn({tabIndex:-1},a,{ref:f,onKeyDown:h}))}));function FR(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function IR(e,t){for(const n of e)if(!NR(n,{upTo:t}))return n}function NR(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function zR(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}const BR=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=VR(e,t),e.unshift(t)},remove(t){var n;e=VR(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function VR(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}function jR(e){return e.split("-")[1]}function HR(e){return"y"===e?"height":"width"}function UR(e){return e.split("-")[0]}function WR(e){return["top","bottom"].includes(UR(e))?"x":"y"}function $R(e,t,n){let{reference:r,floating:o}=e;const i=r.x+r.width/2-o.width/2,a=r.y+r.height/2-o.height/2,s=WR(t),l=HR(s),u=r[l]/2-o[l]/2,c="x"===s;let d;switch(UR(t)){case"top":d={x:i,y:r.y-o.height};break;case"bottom":d={x:i,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:a};break;case"left":d={x:r.x-o.width,y:a};break;default:d={x:r.x,y:r.y}}switch(jR(t)){case"start":d[s]-=u*(n&&c?-1:1);break;case"end":d[s]+=u*(n&&c?-1:1)}return d}function KR(e,t){return"function"==typeof e?e(t):e}function XR(e){return"number"!=typeof e?(t=e,{top:0,right:0,bottom:0,left:0,...t}):{top:e,right:e,bottom:e,left:e};var t}function YR(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function qR(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=KR(t,e),h=XR(p),m=s[f?"floating"===d?"reference":"floating":d],g=YR(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),v="floating"===d?{...a.floating,x:r,y:o}:a.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),b=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},w=YR(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:y,strategy:l}):v);return{top:(g.top-w.top+h.top)/b.y,bottom:(w.bottom-g.bottom+h.bottom)/b.y,left:(g.left-w.left+h.left)/b.x,right:(w.right-g.right+h.right)/b.x}}const QR=Math.min,GR=Math.max;function ZR(e,t,n){return GR(e,QR(t,n))}const JR=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s}=t,{element:l,padding:u=0}=KR(e,t)||{};if(null==l)return{};const c=XR(u),d={x:n,y:r},f=WR(o),p=HR(f),h=await a.getDimensions(l),m="y"===f,g=m?"top":"left",v=m?"bottom":"right",y=m?"clientHeight":"clientWidth",b=i.reference[p]+i.reference[f]-d[f]-i.floating[p],w=d[f]-i.reference[f],x=await(null==a.getOffsetParent?void 0:a.getOffsetParent(l));let E=x?x[y]:0;E&&await(null==a.isElement?void 0:a.isElement(x))||(E=s.floating[y]||i.floating[p]);const S=b/2-w/2,k=E/2-h[p]/2-1,C=QR(c[g],k),P=QR(c[v],k),_=C,T=E-h[p]-P,R=E/2-h[p]/2+S,D=ZR(_,R,T),A=null!=jR(o)&&R!=D&&i.reference[p]/2-(R<_?C:P)-h[p]/2<0?R<_?_-R:T-R:0;return{[f]:d[f]-A,data:{[f]:D,centerOffset:R-D+A}}}}),eD=["top","right","bottom","left"];eD.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);const tD={left:"right",right:"left",bottom:"top",top:"bottom"};function nD(e){return e.replace(/left|right|bottom|top/g,(e=>tD[e]))}const rD={start:"end",end:"start"};function oD(e){return e.replace(/start|end/g,(e=>rD[e]))}const iD=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:c=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:h=!0,...m}=KR(e,t),g=UR(r),v=UR(a)===a,y=await(null==s.isRTL?void 0:s.isRTL(l.floating)),b=d||(v||!h?[nD(a)]:function(e){const t=nD(e);return[oD(e),t,oD(t)]}(a));d||"none"===p||b.push(...function(e,t,n,r){const o=jR(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}(UR(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(oD)))),i}(a,h,p,y));const w=[a,...b],x=await qR(t,m),E=[];let S=(null==(n=o.flip)?void 0:n.overflows)||[];if(u&&E.push(x[g]),c){const{main:e,cross:t}=function(e,t,n){void 0===n&&(n=!1);const r=jR(e),o=WR(e),i=HR(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=nD(a)),{main:a,cross:nD(a)}}(r,i,y);E.push(x[e],x[t])}if(S=[...S,{placement:r,overflows:E}],!E.every((e=>e<=0))){var k,C;const e=((null==(k=o.flip)?void 0:k.index)||0)+1,t=w[e];if(t)return{data:{index:e,overflows:S},reset:{placement:t}};let n=null==(C=S.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:C.placement;if(!n)switch(f){case"bestFit":{var P;const e=null==(P=S.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:P[0];e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}};function aD(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function sD(e){return eD.some((t=>e[t]>=0))}const lD=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=KR(e,t);switch(r){case"referenceHidden":{const e=aD(await qR(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:sD(e)}}}case"escaped":{const e=aD(await qR(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:sD(e)}}}default:return{}}}}};function uD(e){return"x"===e?"y":"x"}const cD=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=KR(e,t),u={x:n,y:r},c=await qR(t,l),d=WR(UR(o)),f=uD(d);let p=u[d],h=u[f];if(i){const e="y"===d?"bottom":"right";p=ZR(p+c["y"===d?"top":"left"],p,p-c[e])}if(a){const e="y"===f?"bottom":"right";h=ZR(h+c["y"===f?"top":"left"],h,h-c[e])}const m=s.fn({...t,[d]:p,[f]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},dD=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=(()=>{}),...s}=KR(e,t),l=await qR(t,s),u=UR(n),c=jR(n),d="x"===WR(n),{width:f,height:p}=r.floating;let h,m;"top"===u||"bottom"===u?(h=u,m=c===(await(null==o.isRTL?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=u,h="end"===c?"top":"bottom");const g=p-l[h],v=f-l[m],y=!t.middlewareData.shift;let b=g,w=v;if(d){const e=f-l.left-l.right;w=c||y?QR(v,e):e}else{const e=p-l.top-l.bottom;b=c||y?QR(g,e):e}if(y&&!c){const e=GR(l.left,0),t=GR(l.right,0),n=GR(l.top,0),r=GR(l.bottom,0);d?w=f-2*(0!==e||0!==t?e+t:GR(l.left,l.right)):b=p-2*(0!==n||0!==r?n+r:GR(l.top,l.bottom))}await a({...t,availableWidth:w,availableHeight:b});const x=await o.getDimensions(i.floating);return f!==x.width||p!==x.height?{reset:{rects:!0}}:{}}}};function fD(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function pD(e){return fD(e).getComputedStyle(e)}function hD(e){return e instanceof fD(e).Node}function mD(e){return hD(e)?(e.nodeName||"").toLowerCase():"#document"}function gD(e){return e instanceof HTMLElement||e instanceof fD(e).HTMLElement}function vD(e){return"undefined"!=typeof ShadowRoot&&(e instanceof fD(e).ShadowRoot||e instanceof ShadowRoot)}function yD(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=pD(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function bD(e){return["table","td","th"].includes(mD(e))}function wD(e){const t=xD(),n=pD(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function xD(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function ED(e){return["html","body","#document"].includes(mD(e))}const SD=Math.min,kD=Math.max,CD=Math.round,PD=Math.floor,_D=e=>({x:e,y:e});function TD(e){const t=pD(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=gD(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=CD(n)!==i||CD(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function RD(e){return e instanceof Element||e instanceof fD(e).Element}function DD(e){return RD(e)?e:e.contextElement}function AD(e){const t=DD(e);if(!gD(t))return _D(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=TD(t);let a=(i?CD(n.width):n.width)/r,s=(i?CD(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const MD=_D(0);function LD(e){const t=fD(e);return xD()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:MD}function OD(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=DD(e);let a=_D(1);t&&(r?RD(r)&&(a=AD(r)):a=AD(e));const s=(l=i,void 0===(u=n)&&(u=!1),!(c=r)||u&&c!==fD(l)||!u?_D(0):LD(i));var l,u,c;let d=(o.left+s.x)/a.x,f=(o.top+s.y)/a.y,p=o.width/a.x,h=o.height/a.y;if(i){const e=fD(i),t=r&&RD(r)?fD(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=AD(n),t=n.getBoundingClientRect(),r=getComputedStyle(n),o=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;d*=e.x,f*=e.y,p*=e.x,h*=e.y,d+=o,f+=i,n=fD(n).frameElement}}return YR({width:p,height:h,x:d,y:f})}function FD(e){return RD(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ID(e){var t;return null==(t=(hD(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function ND(e){return OD(ID(e)).left+FD(e).scrollLeft}function zD(e){if("html"===mD(e))return e;const t=e.assignedSlot||e.parentNode||vD(e)&&e.host||ID(e);return vD(t)?t.host:t}function BD(e){const t=zD(e);return ED(t)?e.ownerDocument?e.ownerDocument.body:e.body:gD(t)&&yD(t)?t:BD(t)}function VD(e,t){var n;void 0===t&&(t=[]);const r=BD(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=fD(r);return o?t.concat(i,i.visualViewport||[],yD(r)?r:[]):t.concat(r,VD(r))}function jD(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=fD(e),r=ID(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=xD();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=ID(e),n=FD(e),r=e.ownerDocument.body,o=kD(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=kD(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+ND(e);const s=-n.scrollTop;return"rtl"===pD(r).direction&&(a+=kD(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(ID(e));else if(RD(t))r=function(e,t){const n=OD(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=gD(e)?AD(e):_D(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=LD(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return YR(r)}function HD(e,t){const n=zD(e);return!(n===t||!RD(n)||ED(n))&&("fixed"===pD(n).position||HD(n,t))}function UD(e,t,n){const r=gD(t),o=ID(t),i="fixed"===n,a=OD(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=_D(0);if(r||!r&&!i)if(("body"!==mD(t)||yD(o))&&(s=FD(t)),gD(t)){const e=OD(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=ND(o));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function WD(e,t){return gD(e)&&"fixed"!==pD(e).position?t?t(e):e.offsetParent:null}function $D(e,t){const n=fD(e);if(!gD(e))return n;let r=WD(e,t);for(;r&&bD(r)&&"static"===pD(r).position;)r=WD(r,t);return r&&("html"===mD(r)||"body"===mD(r)&&"static"===pD(r).position&&!wD(r))?n:r||function(e){let t=zD(e);for(;gD(t)&&!ED(t);){if(wD(t))return t;t=zD(t)}return null}(e)||n}const KD={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=gD(n),i=ID(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0},s=_D(1);const l=_D(0);if((o||!o&&"fixed"!==r)&&(("body"!==mD(n)||yD(i))&&(a=FD(n)),gD(n))){const e=OD(n);s=AD(n),l.x=e.x+n.clientLeft,l.y=e.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+l.x,y:t.y*s.y-a.scrollTop*s.y+l.y}},getDocumentElement:ID,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=VD(e).filter((e=>RD(e)&&"body"!==mD(e))),o=null;const i="fixed"===pD(e).position;let a=i?zD(e):e;for(;RD(a)&&!ED(a);){const t=pD(a),n=wD(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||yD(a)&&!n&&HD(e,a))?r=r.filter((e=>e!==a)):o=t,a=zD(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=i[0],s=i.reduce(((e,n)=>{const r=jD(t,n,o);return e.top=kD(r.top,e.top),e.right=SD(r.right,e.right),e.bottom=SD(r.bottom,e.bottom),e.left=kD(r.left,e.left),e}),jD(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:$D,getElementRects:async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||$D,i=this.getDimensions;return{reference:UD(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return TD(e)},getScale:AD,isElement:RD,isRTL:function(e){return"rtl"===getComputedStyle(e).direction}};function XD(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,u=DD(e),c=o||i?[...u?VD(u):[],...VD(t)]:[];c.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=u&&s?function(e,t){let n,r=null;const o=ID(e);function i(){clearTimeout(n),r&&r.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const{left:u,top:c,width:d,height:f}=e.getBoundingClientRect();if(s||t(),!d||!f)return;const p={rootMargin:-PD(c)+"px "+-PD(o.clientWidth-(u+d))+"px "+-PD(o.clientHeight-(c+f))+"px "+-PD(u)+"px",threshold:kD(0,SD(1,l))||1};let h=!0;function m(e){const t=e[0].intersectionRatio;if(t!==l){if(!h)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),100)}h=!1}try{r=new IntersectionObserver(m,{...p,root:o.ownerDocument})}catch(g){r=new IntersectionObserver(m,p)}r.observe(e)}(!0),i}(u,n):null;let f,p=-1,h=null;a&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{h&&h.observe(t)}))),n()})),u&&!l&&h.observe(u),h.observe(t));let m=l?OD(e):null;return l&&function t(){const r=OD(e);!m||r.x===m.x&&r.y===m.y&&r.width===m.width&&r.height===m.height||n(),m=r,f=requestAnimationFrame(t)}(),n(),()=>{c.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),d&&d(),h&&h.disconnect(),h=null,l&&cancelAnimationFrame(f)}}const YD=(e,t,n)=>{const r=new Map,o={platform:KD,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=$R(u,r,l),f=r,p={},h=0;for(let m=0;m<s.length;m++){const{name:n,fn:i}=s[m],{x:g,y:v,data:y,reset:b}=await i({x:c,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:u,platform:a,elements:{reference:e,floating:t}});c=null!=g?g:c,d=null!=v?v:d,p={...p,[n]:{...p[n],...y}},b&&h<=50&&(h++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(u=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:c,y:d}=$R(u,f,l))),m=-1)}return{x:c,y:d,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})},qD=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&function(e){return{}.hasOwnProperty.call(e,"current")}(n)?null!=n.current?JR({element:n.current,padding:r}).fn(t):{}:n?JR({element:n,padding:r}).fn(t):{}}});var QD="undefined"!=typeof document?W.useLayoutEffect:W.useEffect;function GD(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;0!=r--;)if(!GD(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!GD(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function ZD(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function JD(e,t){const n=ZD(e);return Math.round(t*n)/n}function eA(e){const t=W.useRef(e);return QD((()=>{t.current=e})),t}const tA=W.forwardRef(((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return W.createElement(ET.svg,Jn({},i,{ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:W.createElement("polygon",{points:"0,0 30,0 15,10"}))})),nA="Popper",[rA,oA]=mT(nA),[iA,aA]=rA(nA),sA=W.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=aA("PopperAnchor",n),a=W.useRef(null),s=hT(t,a);return W.useEffect((()=>{i.onAnchorChange((null==r?void 0:r.current)||a.current)})),r?null:W.createElement(ET.div,Jn({},o,{ref:s}))})),lA="PopperContent",[uA,cA]=rA(lA),dA=W.forwardRef(((e,t)=>{var n,r,o,i,a,s,l,u;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:p="center",alignOffset:h=0,arrowPadding:m=0,collisionBoundary:g=[],collisionPadding:v=0,sticky:y="partial",hideWhenDetached:b=!1,avoidCollisions:w=!0,onPlaced:x,...E}=e,S=aA(lA,c),[k,C]=W.useState(null),P=hT(t,(e=>C(e))),[_,T]=W.useState(null),R=qT(_),D=null!==(n=null==R?void 0:R.width)&&void 0!==n?n:0,A=null!==(r=null==R?void 0:R.height)&&void 0!==r?r:0,M=d+("center"!==p?"-"+p:""),L="number"==typeof v?v:{top:0,right:0,bottom:0,left:0,...v},O=Array.isArray(g)?g:[g],F=O.length>0,I={padding:L,boundary:O.filter(pA),altBoundary:F},{refs:N,floatingStyles:z,placement:B,isPositioned:V,middlewareData:j}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[c,d]=W.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=W.useState(r);GD(f,r)||p(r);const[h,m]=W.useState(null),[g,v]=W.useState(null),y=W.useCallback((e=>{e!=E.current&&(E.current=e,m(e))}),[m]),b=W.useCallback((e=>{e!==S.current&&(S.current=e,v(e))}),[v]),w=i||h,x=a||g,E=W.useRef(null),S=W.useRef(null),k=W.useRef(c),C=eA(l),P=eA(o),_=W.useCallback((()=>{if(!E.current||!S.current)return;const e={placement:t,strategy:n,middleware:f};P.current&&(e.platform=P.current),YD(E.current,S.current,e).then((e=>{const t={...e,isPositioned:!0};T.current&&!GD(k.current,t)&&(k.current=t,yh.flushSync((()=>{d(t)})))}))}),[f,t,n,P]);QD((()=>{!1===u&&k.current.isPositioned&&(k.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[u]);const T=W.useRef(!1);QD((()=>(T.current=!0,()=>{T.current=!1})),[]),QD((()=>{if(w&&(E.current=w),x&&(S.current=x),w&&x){if(C.current)return C.current(w,x,_);_()}}),[w,x,_,C]);const R=W.useMemo((()=>({reference:E,floating:S,setReference:y,setFloating:b})),[y,b]),D=W.useMemo((()=>({reference:w,floating:x})),[w,x]),A=W.useMemo((()=>{const e={position:n,left:0,top:0};if(!D.floating)return e;const t=JD(D.floating,c.x),r=JD(D.floating,c.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...ZD(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,D.floating,c.x,c.y]);return W.useMemo((()=>({...c,update:_,refs:R,elements:D,floatingStyles:A})),[c,_,R,D,A])}({strategy:"fixed",placement:M,whileElementsMounted:XD,elements:{reference:S.anchor},middleware:[(U={mainAxis:f+A,alignmentAxis:h},void 0===U&&(U=0),{name:"offset",options:U,async fn(e){const{x:t,y:n}=e,r=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=UR(n),s=jR(n),l="x"===WR(n),u=["left","top"].includes(a)?-1:1,c=i&&l?-1:1,d=KR(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof h&&(p="end"===s?-1*h:h),l?{x:p*c,y:f*u}:{x:f*u,y:p*c}}(e,U);return{x:t+r.x,y:n+r.y,data:r}}}),w&&cD({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?(void 0===H&&(H={}),{options:H,fn(e){const{x:t,y:n,placement:r,rects:o,middlewareData:i}=e,{offset:a=0,mainAxis:s=!0,crossAxis:l=!0}=KR(H,e),u={x:t,y:n},c=WR(r),d=uD(c);let f=u[c],p=u[d];const h=KR(a,e),m="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(s){const e="y"===c?"height":"width",t=o.reference[c]-o.floating[e]+m.mainAxis,n=o.reference[c]+o.reference[e]-m.mainAxis;f<t?f=t:f>n&&(f=n)}if(l){var g,v;const e="y"===c?"width":"height",t=["top","left"].includes(UR(r)),n=o.reference[d]-o.floating[e]+(t&&(null==(g=i.offset)?void 0:g[d])||0)+(t?0:m.crossAxis),a=o.reference[d]+o.reference[e]+(t?0:(null==(v=i.offset)?void 0:v[d])||0)-(t?m.crossAxis:0);p<n?p=n:p>a&&(p=a)}return{[c]:f,[d]:p}}}):void 0,...I}),w&&iD({...I}),dD({...I,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${n}px`),a.setProperty("--radix-popper-available-height",`${r}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),_&&qD({element:_,padding:m}),hA({arrowWidth:D,arrowHeight:A}),b&&lD({strategy:"referenceHidden"})]});var H,U;const[$,K]=mA(B),X=TT(x);kT((()=>{V&&(null==X||X())}),[V,X]);const Y=null===(o=j.arrow)||void 0===o?void 0:o.x,q=null===(i=j.arrow)||void 0===i?void 0:i.y,Q=0!==(null===(a=j.arrow)||void 0===a?void 0:a.centerOffset),[G,Z]=W.useState();return kT((()=>{k&&Z(window.getComputedStyle(k).zIndex)}),[k]),W.createElement("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{...z,transform:V?z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:G,"--radix-popper-transform-origin":[null===(s=j.transformOrigin)||void 0===s?void 0:s.x,null===(l=j.transformOrigin)||void 0===l?void 0:l.y].join(" ")},dir:e.dir},W.createElement(uA,{scope:c,placedSide:$,onArrowChange:T,arrowX:Y,arrowY:q,shouldHideArrow:Q},W.createElement(ET.div,Jn({"data-side":$,"data-align":K},E,{ref:P,style:{...E.style,animation:V?void 0:"none",opacity:null!==(u=j.hide)&&void 0!==u&&u.referenceHidden?0:void 0}}))))})),fA={top:"bottom",right:"left",bottom:"top",left:"right"};function pA(e){return null!==e}const hA=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:s,rects:l,middlewareData:u}=t,c=0!==(null===(n=u.arrow)||void 0===n?void 0:n.centerOffset),d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,h]=mA(s),m={start:"0%",center:"50%",end:"100%"}[h],g=(null!==(r=null===(o=u.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,v=(null!==(i=null===(a=u.arrow)||void 0===a?void 0:a.y)&&void 0!==i?i:0)+f/2;let y="",b="";return"bottom"===p?(y=c?m:`${g}px`,b=-f+"px"):"top"===p?(y=c?m:`${g}px`,b=`${l.floating.height+f}px`):"right"===p?(y=-f+"px",b=c?m:`${v}px`):"left"===p&&(y=`${l.floating.width+f}px`,b=c?m:`${v}px`),{data:{x:y,y:b}}}});function mA(e){const[t,n="center"]=e.split("-");return[t,n]}const gA=e=>{const{__scopePopper:t,children:n}=e,[r,o]=W.useState(null);return W.createElement(iA,{scope:t,anchor:r,onAnchorChange:o},n)},vA=sA,yA=dA,bA=W.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,o=cA("PopperArrow",n),i=fA[o.placedSide];return W.createElement("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0}},W.createElement(tA,Jn({},r,{ref:t,style:{...r.style,display:"block"}})))})),wA=W.forwardRef(((e,t)=>{var n;const{container:r=(null===globalThis||void 0===globalThis||null===(n=globalThis.document)||void 0===n?void 0:n.body),...o}=e;return r?bh.createPortal(W.createElement(ET.div,Jn({},o,{ref:t})),r):null})),xA=W.forwardRef(((e,t)=>W.createElement(ET.span,Jn({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})))),EA=xA,SA=[" ","Enter","ArrowUp","ArrowDown"],kA=[" ","Enter"],CA="Select",[PA,_A,TA]=ST(CA),[RA,DA]=mT(CA,[TA,oA]),AA=oA(),[MA,LA]=RA(CA),[OA,FA]=RA(CA),IA=W.forwardRef(((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=AA(n),a=LA("SelectTrigger",n),s=a.disabled||r,l=hT(t,a.onTriggerChange),u=_A(n),[c,d,f]=cM((e=>{const t=u().filter((e=>!e.disabled)),n=t.find((e=>e.value===a.value)),r=dM(t,e,n);void 0!==r&&a.onValueChange(r.value)})),p=()=>{s||(a.onOpenChange(!0),f())};return W.createElement(vA,Jn({asChild:!0},i),W.createElement(ET.button,Jn({type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":void 0===a.value?"":void 0},o,{ref:l,onClick:fT(o.onClick,(e=>{e.currentTarget.focus()})),onPointerDown:fT(o.onPointerDown,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&(p(),a.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)},e.preventDefault())})),onKeyDown:fT(o.onKeyDown,(e=>{const t=""!==c.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||d(e.key),t&&" "===e.key||SA.includes(e.key)&&(p(),e.preventDefault())}))})))})),NA=W.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:a,...s}=e,l=LA("SelectValue",n),{onValueNodeHasChildrenChange:u}=l,c=void 0!==i,d=hT(t,l.onValueNodeChange);return kT((()=>{u(c)}),[u,c]),W.createElement(ET.span,Jn({},s,{ref:d,style:{pointerEvents:"none"}}),void 0===l.value&&void 0!==a?a:i)})),zA=W.forwardRef(((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return W.createElement(ET.span,Jn({"aria-hidden":!0},o,{ref:t}),r||"▼")})),BA="SelectContent",VA=W.forwardRef(((e,t)=>{const n=LA(BA,e.__scopeSelect),[r,o]=W.useState();if(kT((()=>{o(new DocumentFragment)}),[]),!n.open){const t=r;return t?yh.createPortal(W.createElement(HA,{scope:e.__scopeSelect},W.createElement(PA.Slot,{scope:e.__scopeSelect},W.createElement("div",null,e.children))),t):null}return W.createElement(WA,Jn({},e,{ref:t}))})),jA=10,[HA,UA]=RA(BA),WA=W.forwardRef(((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:a,side:s,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:g,...v}=e,y=LA(BA,n),[b,w]=W.useState(null),[x,E]=W.useState(null),S=hT(t,(e=>w(e))),[k,C]=W.useState(null),[P,_]=W.useState(null),T=_A(n),[R,D]=W.useState(!1),A=W.useRef(!1);W.useEffect((()=>{if(b)return jm(b)}),[b]),W.useEffect((()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:DR()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:DR()),RR++,()=>{1===RR&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),RR--}}),[]);const M=W.useCallback((e=>{const[t,...n]=T().map((e=>e.ref.current)),[r]=n.slice(-1),o=document.activeElement;for(const i of e){if(i===o)return;if(null==i||i.scrollIntoView({block:"nearest"}),i===t&&x&&(x.scrollTop=0),i===r&&x&&(x.scrollTop=x.scrollHeight),null==i||i.focus(),document.activeElement!==o)return}}),[T,x]),L=W.useCallback((()=>M([k,b])),[M,k,b]);W.useEffect((()=>{R&&L()}),[R,L]);const{onOpenChange:O,triggerPointerDownPosRef:F}=y;W.useEffect((()=>{if(b){let e={x:0,y:0};const t=t=>{var n,r,o,i;e={x:Math.abs(Math.round(t.pageX)-(null!==(n=null===(r=F.current)||void 0===r?void 0:r.x)&&void 0!==n?n:0)),y:Math.abs(Math.round(t.pageY)-(null!==(o=null===(i=F.current)||void 0===i?void 0:i.y)&&void 0!==o?o:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():b.contains(n.target)||O(!1),document.removeEventListener("pointermove",t),F.current=null};return null!==F.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[b,O,F]),W.useEffect((()=>{const e=()=>O(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[O]);const[I,N]=cM((e=>{const t=T().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=dM(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),z=W.useCallback(((e,t,n)=>{const r=!A.current&&!n;(void 0!==y.value&&y.value===t||r)&&(C(e),r&&(A.current=!0))}),[y.value]),B=W.useCallback((()=>null==b?void 0:b.focus()),[b]),V=W.useCallback(((e,t,n)=>{const r=!A.current&&!n;(void 0!==y.value&&y.value===t||r)&&_(e)}),[y.value]),j="popper"===r?KA:$A,H=j===KA?{side:s,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:g}:{};return W.createElement(HA,{scope:n,content:b,viewport:x,onViewportChange:E,itemRefCallback:z,selectedItem:k,onItemLeave:B,itemTextRefCallback:V,focusSelectedItem:L,selectedItemText:P,position:r,isPositioned:R,searchRef:I},W.createElement(Om,{as:vT,allowPinchZoom:!0},W.createElement(OR,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:fT(o,(e=>{var t;null===(t=y.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()}))},W.createElement(PR,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1)},W.createElement(j,Jn({role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:e=>e.preventDefault()},v,H,{onPlaced:()=>D(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:fT(v.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||N(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=T().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout((()=>M(t))),e.preventDefault()}}))}))))))})),$A=W.forwardRef(((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=LA(BA,n),a=UA(BA,n),[s,l]=W.useState(null),[u,c]=W.useState(null),d=hT(t,(e=>c(e))),f=_A(n),p=W.useRef(!1),h=W.useRef(!0),{viewport:m,selectedItem:g,selectedItemText:v,focusSelectedItem:y}=a,b=W.useCallback((()=>{if(i.trigger&&i.valueNode&&s&&u&&m&&g&&v){const e=i.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=i.valueNode.getBoundingClientRect(),o=v.getBoundingClientRect();if("rtl"!==i.dir){const r=o.left-t.left,i=n.left-r,a=e.left-i,l=e.width+a,u=Math.max(l,t.width),c=window.innerWidth-jA,d=wR(i,[jA,c-u]);s.style.minWidth=l+"px",s.style.left=d+"px"}else{const r=t.right-o.right,i=window.innerWidth-n.right-r,a=window.innerWidth-e.right-i,l=e.width+a,u=Math.max(l,t.width),c=window.innerWidth-jA,d=wR(i,[jA,c-u]);s.style.minWidth=l+"px",s.style.right=d+"px"}const a=f(),l=window.innerHeight-2*jA,c=m.scrollHeight,d=window.getComputedStyle(u),h=parseInt(d.borderTopWidth,10),y=parseInt(d.paddingTop,10),b=parseInt(d.borderBottomWidth,10),w=h+y+c+parseInt(d.paddingBottom,10)+b,x=Math.min(5*g.offsetHeight,w),E=window.getComputedStyle(m),S=parseInt(E.paddingTop,10),k=parseInt(E.paddingBottom,10),C=e.top+e.height/2-jA,P=l-C,_=g.offsetHeight/2,T=h+y+(g.offsetTop+_),R=w-T;if(T<=C){const e=g===a[a.length-1].ref.current;s.style.bottom="0px";const t=u.clientHeight-m.offsetTop-m.offsetHeight,n=T+Math.max(P,_+(e?k:0)+t+b);s.style.height=n+"px"}else{const e=g===a[0].ref.current;s.style.top="0px";const t=Math.max(C,h+m.offsetTop+(e?S:0)+_)+R;s.style.height=t+"px",m.scrollTop=T-C+m.offsetTop}s.style.margin=`${jA}px 0`,s.style.minHeight=x+"px",s.style.maxHeight=l+"px",null==r||r(),requestAnimationFrame((()=>p.current=!0))}}),[f,i.trigger,i.valueNode,s,u,m,g,v,i.dir,r]);kT((()=>b()),[b]);const[w,x]=W.useState();kT((()=>{u&&x(window.getComputedStyle(u).zIndex)}),[u]);const E=W.useCallback((e=>{e&&!0===h.current&&(b(),null==y||y(),h.current=!1)}),[b,y]);return W.createElement(XA,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:E},W.createElement("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w}},W.createElement(ET.div,Jn({},o,{ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))})),KA=W.forwardRef(((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=jA,...i}=e,a=AA(n);return W.createElement(yA,Jn({},a,i,{ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))})),[XA,YA]=RA(BA,{}),qA="SelectViewport",QA=W.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,o=UA(qA,n),i=YA(qA,n),a=hT(t,o.onViewportChange),s=W.useRef(0);return W.createElement(W.Fragment,null,W.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),W.createElement(PA.Slot,{scope:n},W.createElement(ET.div,Jn({"data-radix-select-viewport":"",role:"presentation"},r,{ref:a,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:fT(r.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=i;if(null!=r&&r.current&&n){const e=Math.abs(s.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*jA,o=parseFloat(n.style.minHeight),i=parseFloat(n.style.height),a=Math.max(o,i);if(a<r){const o=a+e,i=Math.min(r,o),s=o-i;n.style.height=i+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}s.current=t.scrollTop}))}))))}));RA("SelectGroup");const GA="SelectItem",[ZA,JA]=RA(GA),eM=W.forwardRef(((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...a}=e,s=LA(GA,n),l=UA(GA,n),u=s.value===r,[c,d]=W.useState(null!=i?i:""),[f,p]=W.useState(!1),h=hT(t,(e=>{var t;return null===(t=l.itemRefCallback)||void 0===t?void 0:t.call(l,e,r,o)})),m=_T(),g=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};return W.createElement(ZA,{scope:n,value:r,disabled:o,textId:m,isSelected:u,onItemTextChange:W.useCallback((e=>{d((t=>{var n;return t||(null!==(n=null==e?void 0:e.textContent)&&void 0!==n?n:"").trim()}))}),[])},W.createElement(PA.ItemSlot,{scope:n,value:r,disabled:o,textValue:c},W.createElement(ET.div,Jn({role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},a,{ref:h,onFocus:fT(a.onFocus,(()=>p(!0))),onBlur:fT(a.onBlur,(()=>p(!1))),onPointerUp:fT(a.onPointerUp,g),onPointerMove:fT(a.onPointerMove,(e=>{var t;o?null===(t=l.onItemLeave)||void 0===t||t.call(l):e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:fT(a.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null===(t=l.onItemLeave)||void 0===t||t.call(l))})),onKeyDown:fT(a.onKeyDown,(e=>{var t;""!==(null===(t=l.searchRef)||void 0===t?void 0:t.current)&&" "===e.key||(kA.includes(e.key)&&g()," "===e.key&&e.preventDefault())}))}))))})),tM="SelectItemText",nM=W.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,a=LA(tM,n),s=UA(tM,n),l=JA(tM,n),u=FA(tM,n),[c,d]=W.useState(null),f=hT(t,(e=>d(e)),l.onItemTextChange,(e=>{var t;return null===(t=s.itemTextRefCallback)||void 0===t?void 0:t.call(s,e,l.value,l.disabled)})),p=null==c?void 0:c.textContent,h=W.useMemo((()=>W.createElement("option",{key:l.value,value:l.value,disabled:l.disabled},p)),[l.disabled,l.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:g}=u;return kT((()=>(m(h),()=>g(h))),[m,g,h]),W.createElement(W.Fragment,null,W.createElement(ET.span,Jn({id:l.textId},i,{ref:f})),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?yh.createPortal(i.children,a.valueNode):null)})),rM=W.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return JA("SelectItemIndicator",n).isSelected?W.createElement(ET.span,Jn({"aria-hidden":!0},r,{ref:t})):null})),oM="SelectScrollUpButton",iM=W.forwardRef(((e,t)=>{const n=UA(oM,e.__scopeSelect),r=YA(oM,e.__scopeSelect),[o,i]=W.useState(!1),a=hT(t,r.onScrollButtonChange);return kT((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;i(e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),o?W.createElement(lM,Jn({},e,{ref:a,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}})):null})),aM="SelectScrollDownButton",sM=W.forwardRef(((e,t)=>{const n=UA(aM,e.__scopeSelect),r=YA(aM,e.__scopeSelect),[o,i]=W.useState(!1),a=hT(t,r.onScrollButtonChange);return kT((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;i(n)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),o?W.createElement(lM,Jn({},e,{ref:a,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}})):null})),lM=W.forwardRef(((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=UA("SelectScrollButton",n),a=W.useRef(null),s=_A(n),l=W.useCallback((()=>{null!==a.current&&(window.clearInterval(a.current),a.current=null)}),[]);return W.useEffect((()=>()=>l()),[l]),kT((()=>{var e;const t=s().find((e=>e.ref.current===document.activeElement));null==t||null===(e=t.ref.current)||void 0===e||e.scrollIntoView({block:"nearest"})}),[s]),W.createElement(ET.div,Jn({"aria-hidden":!0},o,{ref:t,style:{flexShrink:0,...o.style},onPointerDown:fT(o.onPointerDown,(()=>{null===a.current&&(a.current=window.setInterval(r,50))})),onPointerMove:fT(o.onPointerMove,(()=>{var e;null===(e=i.onItemLeave)||void 0===e||e.call(i),null===a.current&&(a.current=window.setInterval(r,50))})),onPointerLeave:fT(o.onPointerLeave,(()=>{l()}))}))})),uM=W.forwardRef(((e,t)=>{const{value:n,...r}=e,o=W.useRef(null),i=hT(t,o),a=QT(n);return W.useEffect((()=>{const e=o.current,t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(a!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[a,n]),W.createElement(xA,{asChild:!0},W.createElement("select",Jn({},r,{ref:i,defaultValue:n})))}));function cM(e){const t=TT(e),n=W.useRef(""),r=W.useRef(0),o=W.useCallback((e=>{const o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout((()=>e("")),1e3))}(o)}),[t]),i=W.useCallback((()=>{n.current="",window.clearTimeout(r.current)}),[]);return W.useEffect((()=>()=>window.clearTimeout(r.current)),[]),[n,o,i]}function dM(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let i=(a=e,s=Math.max(o,0),a.map(((e,t)=>a[(s+t)%a.length])));var a,s;1===r.length&&(i=i.filter((e=>e!==n)));const l=i.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return l!==n?l:void 0}uM.displayName="BubbleSelect";const fM=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:a,defaultValue:s,onValueChange:l,dir:u,name:c,autoComplete:d,disabled:f,required:p}=e,h=AA(t),[m,g]=W.useState(null),[v,y]=W.useState(null),[b,w]=W.useState(!1),x=AT(u),[E=!1,S]=RT({prop:r,defaultProp:o,onChange:i}),[k,C]=RT({prop:a,defaultProp:s,onChange:l}),P=W.useRef(null),_=!m||Boolean(m.closest("form")),[T,R]=W.useState(new Set),D=Array.from(T).map((e=>e.props.value)).join(";");return W.createElement(gA,h,W.createElement(MA,{required:p,scope:t,trigger:m,onTriggerChange:g,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:w,contentId:_T(),value:k,onValueChange:C,open:E,onOpenChange:S,dir:x,triggerPointerDownPosRef:P,disabled:f},W.createElement(PA.Provider,{scope:t},W.createElement(OA,{scope:e.__scopeSelect,onNativeOptionAdd:W.useCallback((e=>{R((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:W.useCallback((e=>{R((t=>{const n=new Set(t);return n.delete(e),n}))}),[])},n)),_?W.createElement(uM,{key:D,"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:d,value:k,onChange:e=>C(e.target.value),disabled:f},void 0===k?W.createElement("option",{value:""}):null,Array.from(T)):null))},pM=IA,hM=NA,mM=zA,gM=e=>W.createElement(wA,Jn({asChild:!0},e)),vM=VA,yM=QA,bM=eM,wM=nM,xM=rM,EM=iM,SM=sM,[kM,CM]=mT("Tooltip",[oA]),PM=oA(),_M=700,TM="tooltip.open",[RM,DM]=kM("TooltipProvider"),AM="Tooltip",[MM,LM]=kM(AM),OM="TooltipTrigger",FM=W.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=LM(OM,n),i=DM(OM,n),a=PM(n),s=hT(t,W.useRef(null),o.onTriggerChange),l=W.useRef(!1),u=W.useRef(!1),c=W.useCallback((()=>l.current=!1),[]);return W.useEffect((()=>()=>document.removeEventListener("pointerup",c)),[c]),W.createElement(vA,Jn({asChild:!0},a),W.createElement(ET.button,Jn({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:s,onPointerMove:fT(e.onPointerMove,(e=>{"touch"!==e.pointerType&&(u.current||i.isPointerInTransitRef.current||(o.onTriggerEnter(),u.current=!0))})),onPointerLeave:fT(e.onPointerLeave,(()=>{o.onTriggerLeave(),u.current=!1})),onPointerDown:fT(e.onPointerDown,(()=>{l.current=!0,document.addEventListener("pointerup",c,{once:!0})})),onFocus:fT(e.onFocus,(()=>{l.current||o.onOpen()})),onBlur:fT(e.onBlur,o.onClose),onClick:fT(e.onClick,o.onClose)})))})),IM="TooltipPortal",[NM,zM]=kM(IM,{forceMount:void 0}),BM="TooltipContent",VM=W.forwardRef(((e,t)=>{const n=zM(BM,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=LM(BM,e.__scopeTooltip);return W.createElement(GT,{present:r||a.open},a.disableHoverableContent?W.createElement(WM,Jn({side:o},i,{ref:t})):W.createElement(jM,Jn({side:o},i,{ref:t})))})),jM=W.forwardRef(((e,t)=>{const n=LM(BM,e.__scopeTooltip),r=DM(BM,e.__scopeTooltip),o=W.useRef(null),i=hT(t,o),[a,s]=W.useState(null),{trigger:l,onClose:u}=n,c=o.current,{onPointerInTransitChange:d}=r,f=W.useCallback((()=>{s(null),d(!1)}),[d]),p=W.useCallback(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=function(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(r,n.getBoundingClientRect())),i=function(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),function(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const n=e[r];for(;t.length>=2;){const e=t[t.length-1],r=t[t.length-2];if(!((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x)))break;t.pop()}t.push(n)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const t=e[r];for(;n.length>=2;){const e=n[n.length-1],r=n[n.length-2];if(!((e.x-r.x)*(t.y-r.y)>=(e.y-r.y)*(t.x-r.x)))break;n.pop()}n.push(t)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...o,...function(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}(t.getBoundingClientRect())]);s(i),d(!0)}),[d]);return W.useEffect((()=>()=>f()),[f]),W.useEffect((()=>{if(l&&c){const e=e=>p(e,c),t=e=>p(e,l);return l.addEventListener("pointerleave",e),c.addEventListener("pointerleave",t),()=>{l.removeEventListener("pointerleave",e),c.removeEventListener("pointerleave",t)}}}),[l,c,p,f]),W.useEffect((()=>{if(a){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=(null==l?void 0:l.contains(t))||(null==c?void 0:c.contains(t)),o=!function(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const e=t[i].x,s=t[i].y,l=t[a].x,u=t[a].y;s>r!=u>r&&n<(l-e)*(r-s)/(u-s)+e&&(o=!o)}return o}(n,a);r?f():o&&(f(),u())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[l,c,a,u,f]),W.createElement(WM,Jn({},e,{ref:i}))})),[HM,UM]=kM(AM,{isInside:!1}),WM=W.forwardRef(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,l=LM(BM,n),u=PM(n),{onClose:c}=l;return W.useEffect((()=>(document.addEventListener(TM,c),()=>document.removeEventListener(TM,c))),[c]),W.useEffect((()=>{if(l.trigger){const e=e=>{const t=e.target;null!=t&&t.contains(l.trigger)&&c()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[l.trigger,c]),W.createElement(PR,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:e=>e.preventDefault(),onDismiss:c},W.createElement(yA,Jn({"data-state":l.stateAttribute},u,s,{ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),W.createElement(bT,null,r),W.createElement(HM,{scope:n,isInside:!0},W.createElement(EA,{id:l.contentId,role:"tooltip"},o||r))))}));const $M=e=>{const{__scopeTooltip:t,delayDuration:n=_M,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,[a,s]=W.useState(!0),l=W.useRef(!1),u=W.useRef(0);return W.useEffect((()=>{const e=u.current;return()=>window.clearTimeout(e)}),[]),W.createElement(RM,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:W.useCallback((()=>{window.clearTimeout(u.current),s(!1)}),[]),onClose:W.useCallback((()=>{window.clearTimeout(u.current),u.current=window.setTimeout((()=>s(!0)),r)}),[r]),isPointerInTransitRef:l,onPointerInTransitChange:W.useCallback((e=>{l.current=e}),[]),disableHoverableContent:o},i)},KM=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,l=DM(AM,e.__scopeTooltip),u=PM(t),[c,d]=W.useState(null),f=_T(),p=W.useRef(0),h=null!=a?a:l.disableHoverableContent,m=null!=s?s:l.delayDuration,g=W.useRef(!1),[v=!1,y]=RT({prop:r,defaultProp:o,onChange:e=>{e?(l.onOpen(),document.dispatchEvent(new CustomEvent(TM))):l.onClose(),null==i||i(e)}}),b=W.useMemo((()=>v?g.current?"delayed-open":"instant-open":"closed"),[v]),w=W.useCallback((()=>{window.clearTimeout(p.current),g.current=!1,y(!0)}),[y]),x=W.useCallback((()=>{window.clearTimeout(p.current),y(!1)}),[y]),E=W.useCallback((()=>{window.clearTimeout(p.current),p.current=window.setTimeout((()=>{g.current=!0,y(!0)}),m)}),[m,y]);return W.useEffect((()=>()=>window.clearTimeout(p.current)),[]),W.createElement(gA,u,W.createElement(MM,{scope:t,contentId:f,open:v,stateAttribute:b,trigger:c,onTriggerChange:d,onTriggerEnter:W.useCallback((()=>{l.isOpenDelayed?E():w()}),[l.isOpenDelayed,E,w]),onTriggerLeave:W.useCallback((()=>{h?x():window.clearTimeout(p.current)}),[x,h]),onOpen:w,onClose:x,disableHoverableContent:h},n))},XM=FM,YM=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=LM(IM,t);return W.createElement(NM,{scope:t,forceMount:n},W.createElement(GT,{present:n||i.open},W.createElement(wA,{asChild:!0,container:o},r)))},qM=VM,QM=W.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=PM(n);return UM("TooltipArrow",n).isInside?null:W.createElement(bA,Jn({},o,r,{ref:t}))}));const GM="ScrollArea",[ZM,JM]=er(GM),[eL,tL]=ZM(GM),nL=W.forwardRef(((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:i=600,...a}=e,[s,l]=W.useState(null),[u,c]=W.useState(null),[d,f]=W.useState(null),[p,h]=W.useState(null),[m,g]=W.useState(null),[v,y]=W.useState(0),[b,w]=W.useState(0),[x,E]=W.useState(!1),[S,k]=W.useState(!1),C=rr(t,(e=>l(e))),P=Xb(o);return W.createElement(eL,{scope:n,type:r,dir:P,scrollHideDelay:i,scrollArea:s,viewport:u,onViewportChange:c,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:h,scrollbarXEnabled:x,onScrollbarXEnabledChange:E,scrollbarY:m,onScrollbarYChange:g,scrollbarYEnabled:S,onScrollbarYEnabledChange:k,onCornerWidthChange:y,onCornerHeightChange:w},W.createElement(Ch.div,Jn({dir:P},a,{ref:C,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":b+"px",...e.style}})))})),rL=W.forwardRef(((e,t)=>{const{__scopeScrollArea:n,children:r,...o}=e,i=tL("ScrollAreaViewport",n),a=rr(t,W.useRef(null),i.onViewportChange);return W.createElement(W.Fragment,null,W.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),W.createElement(Ch.div,Jn({"data-radix-scroll-area-viewport":""},o,{ref:a,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style}}),W.createElement("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"}},r)))})),oL="ScrollAreaScrollbar",iL=W.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=tL(oL,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=o,s="horizontal"===e.orientation;return W.useEffect((()=>(s?i(!0):a(!0),()=>{s?i(!1):a(!1)})),[s,i,a]),"hover"===o.type?W.createElement(aL,Jn({},r,{ref:t,forceMount:n})):"scroll"===o.type?W.createElement(sL,Jn({},r,{ref:t,forceMount:n})):"auto"===o.type?W.createElement(lL,Jn({},r,{ref:t,forceMount:n})):"always"===o.type?W.createElement(uL,Jn({},r,{ref:t})):null})),aL=W.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=tL(oL,e.__scopeScrollArea),[i,a]=W.useState(!1);return W.useEffect((()=>{const e=o.scrollArea;let t=0;if(e){const n=()=>{window.clearTimeout(t),a(!0)},r=()=>{t=window.setTimeout((()=>a(!1)),o.scrollHideDelay)};return e.addEventListener("pointerenter",n),e.addEventListener("pointerleave",r),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",n),e.removeEventListener("pointerleave",r)}}}),[o.scrollArea,o.scrollHideDelay]),W.createElement(Yh,{present:n||i},W.createElement(lL,Jn({"data-state":i?"visible":"hidden"},r,{ref:t})))})),sL=W.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=tL(oL,e.__scopeScrollArea),i="horizontal"===e.orientation,a=CL((()=>l("SCROLL_END")),100),[s,l]=(u="hidden",c={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},W.useReducer(((e,t)=>{const n=c[e][t];return null!=n?n:e}),u));var u,c;return W.useEffect((()=>{if("idle"===s){const e=window.setTimeout((()=>l("HIDE")),o.scrollHideDelay);return()=>window.clearTimeout(e)}}),[s,o.scrollHideDelay,l]),W.useEffect((()=>{const e=o.viewport,t=i?"scrollLeft":"scrollTop";if(e){let n=e[t];const r=()=>{const r=e[t];n!==r&&(l("SCROLL"),a()),n=r};return e.addEventListener("scroll",r),()=>e.removeEventListener("scroll",r)}}),[o.viewport,i,l,a]),W.createElement(Yh,{present:n||"hidden"!==s},W.createElement(uL,Jn({"data-state":"hidden"===s?"hidden":"visible"},r,{ref:t,onPointerEnter:or(e.onPointerEnter,(()=>l("POINTER_ENTER"))),onPointerLeave:or(e.onPointerLeave,(()=>l("POINTER_LEAVE")))})))})),lL=W.forwardRef(((e,t)=>{const n=tL(oL,e.__scopeScrollArea),{forceMount:r,...o}=e,[i,a]=W.useState(!1),s="horizontal"===e.orientation,l=CL((()=>{if(n.viewport){const e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;a(s?e:t)}}),10);return PL(n.viewport,l),PL(n.content,l),W.createElement(Yh,{present:r||i},W.createElement(uL,Jn({"data-state":i?"visible":"hidden"},o,{ref:t})))})),uL=W.forwardRef(((e,t)=>{const{orientation:n="vertical",...r}=e,o=tL(oL,e.__scopeScrollArea),i=W.useRef(null),a=W.useRef(0),[s,l]=W.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=bL(s.viewport,s.content),c={...r,sizes:s,onSizesChange:l,hasThumb:Boolean(u>0&&u<1),onThumbChange:e=>i.current=e,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:e=>a.current=e};function d(e,t){return function(e,t,n,r="ltr"){const o=wL(n),i=o/2,a=t||i,s=o-a,l=n.scrollbar.paddingStart+a,u=n.scrollbar.size-n.scrollbar.paddingEnd-s,c=n.content-n.viewport,d="ltr"===r?[0,c]:[-1*c,0];return EL([l,u],d)(e)}(e,a.current,s,t)}return"horizontal"===n?W.createElement(cL,Jn({},c,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const e=xL(o.viewport.scrollLeft,s,o.dir);i.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{o.viewport&&(o.viewport.scrollLeft=e)},onDragScroll:e=>{o.viewport&&(o.viewport.scrollLeft=d(e,o.dir))}})):"vertical"===n?W.createElement(dL,Jn({},c,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const e=xL(o.viewport.scrollTop,s);i.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{o.viewport&&(o.viewport.scrollTop=e)},onDragScroll:e=>{o.viewport&&(o.viewport.scrollTop=d(e))}})):null})),cL=W.forwardRef(((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=tL(oL,e.__scopeScrollArea),[a,s]=W.useState(),l=W.useRef(null),u=rr(t,l,i.onScrollbarXChange);return W.useEffect((()=>{l.current&&s(getComputedStyle(l.current))}),[l]),W.createElement(hL,Jn({"data-orientation":"horizontal"},o,{ref:u,sizes:n,style:{bottom:0,left:"rtl"===i.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===i.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":wL(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(i.viewport){const r=i.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),SL(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&i.viewport&&a&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:yL(a.paddingLeft),paddingEnd:yL(a.paddingRight)}})}}))})),dL=W.forwardRef(((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=tL(oL,e.__scopeScrollArea),[a,s]=W.useState(),l=W.useRef(null),u=rr(t,l,i.onScrollbarYChange);return W.useEffect((()=>{l.current&&s(getComputedStyle(l.current))}),[l]),W.createElement(hL,Jn({"data-orientation":"vertical"},o,{ref:u,sizes:n,style:{top:0,right:"ltr"===i.dir?0:void 0,left:"rtl"===i.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":wL(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(i.viewport){const r=i.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),SL(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&i.viewport&&a&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:yL(a.paddingTop),paddingEnd:yL(a.paddingBottom)}})}}))})),[fL,pL]=ZM(oL),hL=W.forwardRef(((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:i,onThumbPointerUp:a,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:c,onResize:d,...f}=e,p=tL(oL,n),[h,m]=W.useState(null),g=rr(t,(e=>m(e))),v=W.useRef(null),y=W.useRef(""),b=p.viewport,w=r.content-r.viewport,x=ur(c),E=ur(l),S=CL(d,10);function k(e){if(v.current){const t=e.clientX-v.current.left,n=e.clientY-v.current.top;u({x:t,y:n})}}return W.useEffect((()=>{const e=e=>{const t=e.target;(null==h?void 0:h.contains(t))&&x(e,w)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})}),[b,h,w,x]),W.useEffect(E,[r,E]),PL(h,S),PL(p.content,S),W.createElement(fL,{scope:n,scrollbar:h,hasThumb:o,onThumbChange:ur(i),onThumbPointerUp:ur(a),onThumbPositionChange:E,onThumbPointerDown:ur(s)},W.createElement(Ch.div,Jn({},f,{ref:g,style:{position:"absolute",...f.style},onPointerDown:or(e.onPointerDown,(e=>{if(0===e.button){e.target.setPointerCapture(e.pointerId),v.current=h.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",k(e)}})),onPointerMove:or(e.onPointerMove,k),onPointerUp:or(e.onPointerUp,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=y.current,v.current=null}))})))})),mL="ScrollAreaThumb",gL=W.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=pL(mL,e.__scopeScrollArea);return W.createElement(Yh,{present:n||o.hasThumb},W.createElement(vL,Jn({ref:t},r)))})),vL=W.forwardRef(((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,i=tL(mL,n),a=pL(mL,n),{onThumbPositionChange:s}=a,l=rr(t,(e=>a.onThumbChange(e))),u=W.useRef(),c=CL((()=>{u.current&&(u.current(),u.current=void 0)}),100);return W.useEffect((()=>{const e=i.viewport;if(e){const t=()=>{if(c(),!u.current){const t=kL(e,s);u.current=t,s()}};return s(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}}),[i.viewport,c,s]),W.createElement(Ch.div,Jn({"data-state":a.hasThumb?"visible":"hidden"},o,{ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:or(e.onPointerDownCapture,(e=>{const t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;a.onThumbPointerDown({x:n,y:r})})),onPointerUp:or(e.onPointerUp,a.onThumbPointerUp)}))}));function yL(e){return e?parseInt(e,10):0}function bL(e,t){const n=e/t;return isNaN(n)?0:n}function wL(e){const t=bL(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function xL(e,t,n="ltr"){const r=wL(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,a=t.content-t.viewport,s=i-r,l=$b(e,"ltr"===n?[0,a]:[-1*a,0]);return EL([0,a],[0,s])(l)}function EL(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function SL(e,t){return e>0&&e<t}const kL=(e,t=(()=>{}))=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},a=n.left!==i.left,s=n.top!==i.top;(a||s)&&t(),n=i,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function CL(e,t){const n=ur(e),r=W.useRef(0);return W.useEffect((()=>()=>window.clearTimeout(r.current)),[]),W.useCallback((()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)}),[n,t])}function PL(e,t){const n=ur(t);ir((()=>{let t=0;if(e){const r=new ResizeObserver((()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)}));return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}}),[e,n])}const _L=nL,TL=rL,RL=iL,DL=gL;function AL(e){return function(e){return"[object Object]"===Object.prototype.toString.call(e)}(e)||Array.isArray(e)}function ML(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;return JSON.stringify(Object.keys(e.breakpoints||{}))===JSON.stringify(Object.keys(t.breakpoints||{}))&&n.every((n=>{const r=e[n],o=t[n];return"function"==typeof r?`${r}`==`${o}`:AL(r)&&AL(o)?ML(r,o):r===o}))}function LL(e){return e.concat().sort(((e,t)=>e.name>t.name?1:-1)).map((e=>e.options))}function OL(e){return"number"==typeof e}function FL(e){return"string"==typeof e}function IL(e){return"boolean"==typeof e}function NL(e){return"[object Object]"===Object.prototype.toString.call(e)}function zL(e){return Math.abs(e)}function BL(e){return Math.sign(e)}function VL(e,t){return zL(e-t)}function jL(e){return $L(e).map(Number)}function HL(e){return e[UL(e)]}function UL(e){return Math.max(0,e.length-1)}function WL(e,t=0){return Array.from(Array(e),((e,n)=>t+n))}function $L(e){return Object.keys(e)}function KL(e,t){return[e,t].reduce(((e,t)=>($L(t).forEach((n=>{const r=e[n],o=t[n],i=NL(r)&&NL(o);e[n]=i?KL(r,o):o})),e)),{})}function XL(e,t){return void 0!==t.MouseEvent&&e instanceof t.MouseEvent}function YL(e,t){const n={start:function(){return 0},center:function(e){return r(e)/2},end:r};function r(e){return t-e}return{measure:function(r){return OL(e)?t*Number(e):n[e](r)}}}function qL(e,t){const n=zL(e-t);function r(t){return t<e}function o(e){return e>t}function i(e){return r(e)||o(e)}return{length:n,max:t,min:e,constrain:function(n){return i(n)?r(n)?e:t:n},reachedAny:i,reachedMax:o,reachedMin:r,removeOffset:function(e){return n?e-n*Math.ceil((e-t)/n):e}}}function QL(e,t,n){const{constrain:r}=qL(0,e),o=e+1;let i=a(t);function a(e){return n?zL((o+e)%o):r(e)}function s(){return i}function l(){return QL(e,s(),n)}const u={get:s,set:function(e){return i=a(e),u},add:function(e){return l().set(s()+e)},clone:l};return u}function GL(){let e=[];const t={add:function(n,r,o,i={passive:!0}){let a;if("addEventListener"in n)n.addEventListener(r,o,i),a=()=>n.removeEventListener(r,o,i);else{const e=n;e.addListener(o),a=()=>e.removeListener(o)}return e.push(a),t},clear:function(){e=e.filter((e=>e()))}};return t}function ZL(e,t,n,r,o,i,a,s,l,u,c,d,f,p,h,m,g,v,y,b){const{cross:w}=e,x=["INPUT","SELECT","TEXTAREA"],E={passive:!1},S=GL(),k=GL(),C=qL(50,225).constrain(h.measure(20)),P={mouse:300,touch:400},_={mouse:500,touch:600},T=m?43:25;let R=!1,D=0,A=0,M=!1,L=!1,O=!1,F=!1;function I(e){const n=a.readPoint(e),r=a.readPoint(e,w),o=VL(n,D),s=VL(r,A);if(!L&&!F){if(!e.cancelable)return N(e);if(L=o>s,!L)return N(e)}const u=a.pointerMove(e);o>g&&(O=!0),c.useFriction(.3).useDuration(1),l.start(),i.add(t.apply(u)),e.preventDefault()}function N(e){const n=d.byDistance(0,!1).index!==f.get(),r=a.pointerUp(e)*(m?_:P)[F?"mouse":"touch"],o=function(e,t){const n=f.add(-1*BL(e)),r=d.byDistance(e,!m).distance;return m||zL(e)<C?r:v&&t?.5*r:d.byIndex(n.get(),0).distance}(t.apply(r),n),i=function(e,t){if(0===e||0===t)return 0;if(zL(e)<=zL(t))return 0;const n=VL(zL(e),zL(t));return zL(n/e)}(r,o),s=T-10*i,l=y+i/50;L=!1,M=!1,k.clear(),c.useDuration(s).useFriction(l),u.distance(o,!m),F=!1,p.emit("pointerUp")}function z(e){O&&(e.stopPropagation(),e.preventDefault())}return{init:function(e){if(!b)return;function t(t){(IL(b)||b(e,t))&&function(e){const t=XL(e,o);if(F=t,t&&0!==e.button)return;if(function(e){const t=e.nodeName||"";return x.includes(t)}(e.target))return;O=m&&t&&!e.buttons&&R,R=VL(i.get(),s.get())>=2,M=!0,a.pointerDown(e),c.useFriction(0).useDuration(0),i.set(s),function(){const e=F?r:n;k.add(e,"touchmove",I,E).add(e,"touchend",N).add(e,"mousemove",I,E).add(e,"mouseup",N)}(),D=a.readPoint(e),A=a.readPoint(e,w),p.emit("pointerDown")}(t)}const l=n;S.add(l,"dragstart",(e=>e.preventDefault()),E).add(l,"touchmove",(()=>{}),E).add(l,"touchend",(()=>{})).add(l,"touchstart",t).add(l,"mousedown",t).add(l,"touchcancel",N).add(l,"contextmenu",N).add(l,"click",z,!0)},pointerDown:function(){return M},destroy:function(){S.clear(),k.clear()}}}function JL(e,t){let n,r;function o(e){return e.timeStamp}function i(n,r){const o="client"+("x"===(r||e.scroll)?"X":"Y");return(XL(n,t)?n:n.touches[0])[o]}return{pointerDown:function(e){return n=e,r=e,i(e)},pointerMove:function(e){const t=i(e)-i(r),a=o(e)-o(n)>170;return r=e,a&&(n=e),t},pointerUp:function(e){if(!n||!r)return 0;const t=i(r)-i(n),a=o(e)-o(n),s=o(e)-o(r)>170,l=t/a;return a&&!s&&zL(l)>.1?l:0},readPoint:i}}function eO(e,t,n,r,o,i){let a,s,l=[],u=!1;function c(e){return o.measureSize(e.getBoundingClientRect())}return{init:function(o){if(!i)return;s=c(e),l=r.map(c),a=new ResizeObserver((a=>{u||(IL(i)||i(o,a))&&function(i){for(const a of i){const i=a.target===e,u=r.indexOf(a.target),d=i?s:l[u];if(zL(c(i?e:r[u])-d)>=.2){n.requestAnimationFrame((()=>{o.reInit(),t.emit("resize")}));break}}}(a)})),[e].concat(r).forEach((e=>a.observe(e)))},destroy:function(){a&&a.disconnect(),u=!0}}}function tO(e,t,n,r,o){const i=o.measure(10),a=o.measure(50),s=qL(.1,.99);let l=!1;return{constrain:function(o){if(l||!e.reachedAny(n.get())||!e.reachedAny(t.get()))return;const u=e.reachedMin(t.get())?"min":"max",c=zL(e[u]-t.get()),d=n.get()-t.get(),f=s.constrain(c/a);n.subtract(d*f),!o&&zL(d)<i&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())},toggleActive:function(e){l=!e}}}function nO(e,t,n,r){const o=t.min+.1,i=t.max+.1,{reachedMin:a,reachedMax:s}=qL(o,i);return{loop:function(t){if(!function(e){return 1===e?s(n.get()):-1===e&&a(n.get())}(t))return;const o=e*(-1*t);r.forEach((e=>e.add(o)))}}}function rO(e,t,n,r,o){const{reachedAny:i,removeOffset:a,constrain:s}=r;function l(e){return e.concat().sort(((e,t)=>zL(e)-zL(t)))[0]}function u(t,r){const o=[t,t+n,t-n];if(!e)return o[0];if(!r)return l(o);const i=o.filter((e=>BL(e)===r));return i.length?l(i):HL(o)-n}return{byDistance:function(n,r){const l=o.get()+n,{index:c,distance:d}=function(n){const r=e?a(n):s(n),o=t.map((e=>e-r)).map((e=>u(e,0))).map(((e,t)=>({diff:e,index:t}))).sort(((e,t)=>zL(e.diff)-zL(t.diff))),{index:i}=o[0];return{index:i,distance:r}}(l),f=!e&&i(l);return!r||f?{index:c,distance:n}:{index:c,distance:n+u(t[c]-d,0)}},byIndex:function(e,n){return{index:e,distance:u(t[e]-o.get(),n)}},shortcut:u}}function oO(e){let t=e;function n(e){return OL(e)?e:e.get()}return{get:function(){return t},set:function(e){t=n(e)},add:function(e){t+=n(e)},subtract:function(e){t-=n(e)}}}function iO(e,t,n){const r="x"===e.scroll?function(e){return`translate3d(${e}px,0px,0px)`}:function(e){return`translate3d(0px,${e}px,0px)`},o=n.style;let i=!1;return{clear:function(){i||(o.transform="",n.getAttribute("style")||n.removeAttribute("style"))},to:function(e){i||(o.transform=r(t.apply(e)))},toggleActive:function(e){i=!e}}}function aO(e,t,n,r,o,i,a,s,l,u){const c=.5,d=jL(i),f=jL(i).reverse(),p=function(){const e=s[0]-1;return g(m(f,e),r,!1)}().concat(function(){const e=n-s[0]-1;return g(m(d,e),-r,!0)}());function h(e,t){return e.reduce(((e,t)=>e-i[t]),t)}function m(e,t){return e.reduce(((e,n)=>h(e,t)>0?e.concat([n]):e),[])}function g(i,s,d){const f=function(e){return a.map(((t,r)=>({start:t-o[r]+c+e,end:t+n-c+e})))}(s);return i.map((n=>{const o=d?0:-r,i=d?r:0,a=d?"end":"start",s=f[n][a];return{index:n,slideLocation:oO(-1),translate:iO(e,t,u[n]),target:()=>l.get()>s?o:i}}))}return{canLoop:function(){return p.every((({index:e})=>h(d.filter((t=>t!==e)),n)<=.1))},clear:function(){p.forEach((e=>e.translate.clear()))},loop:function(){p.forEach((e=>{const{target:t,translate:n,slideLocation:r}=e,o=t();o!==r.get()&&(n.to(o),r.set(o))}))},loopPoints:p}}function sO(e,t,n){let r,o=!1;return{init:function(i){n&&(r=new MutationObserver((e=>{o||(IL(n)||n(i,e))&&function(e){for(const n of e)if("childList"===n.type){i.reInit(),t.emit("slidesChanged");break}}(e)})),r.observe(e,{childList:!0}))},destroy:function(){r&&r.disconnect(),o=!0}}}function lO(e,t,n,r){const o={};let i,a=null,s=null,l=!1;return{init:function(){i=new IntersectionObserver((e=>{l||(e.forEach((e=>{const n=t.indexOf(e.target);o[n]=e})),a=null,s=null,n.emit("slidesInView"))}),{root:e.parentElement,threshold:r}),t.forEach((e=>i.observe(e)))},destroy:function(){i&&i.disconnect(),l=!0},get:function(e=!0){if(e&&a)return a;if(!e&&s)return s;const t=function(e){return $L(o).reduce(((t,n)=>{const r=parseInt(n),{isIntersecting:i}=o[r];return(e&&i||!e&&!i)&&t.push(r),t}),[])}(e);return e&&(a=t),e||(s=t),t}}}function uO(e,t,n,r,o,i,a,s,l){const{startEdge:u,endEdge:c}=e,d=OL(r);return{groupSlides:function(e){return d?function(e,t){return jL(e).filter((e=>e%t==0)).map((n=>e.slice(n,n+t)))}(e,r):function(e){return e.length?jL(e).reduce(((r,d)=>{const f=HL(r)||0,p=0===f,h=d===UL(e),m=i[u]-a[f][u],g=i[u]-a[d][c],v=!o&&p?t.apply(s):0;return zL(g-(!o&&h?t.apply(l):0)-(m+v))>n&&r.push(d),h&&r.push(e.length),r}),[]).map(((t,n,r)=>{const o=Math.max(r[n-1]||0);return e.slice(o,t)})):[]}(e)}}}function cO(e,t,n,r,o,i,a,s){const{align:l,axis:u,direction:c,startIndex:d,loop:f,duration:p,dragFree:h,dragThreshold:m,inViewThreshold:g,slidesToScroll:v,skipSnaps:y,containScroll:b,watchResize:w,watchSlides:x,watchDrag:E}=i,S=t.getBoundingClientRect(),k=n.map((e=>e.getBoundingClientRect())),C=function(e){const t="rtl"===e?-1:1;return{apply:function(e){return e*t}}}(c),P=function(e,t){const n="y"===e?"y":"x";return{scroll:n,cross:"y"===e?"x":"y",startEdge:"y"===n?"top":"rtl"===t?"right":"left",endEdge:"y"===n?"bottom":"rtl"===t?"left":"right",measureSize:function(e){const{width:t,height:r}=e;return"x"===n?t:r}}}(u,c),_=P.measureSize(S),T=function(e){return{measure:function(t){return e*(t/100)}}}(_),R=YL(l,_),D=!f&&!!b,A=f||!!b,{slideSizes:M,slideSizesWithGaps:L,startGap:O,endGap:F}=function(e,t,n,r,o,i){const{measureSize:a,startEdge:s,endEdge:l}=e,u=n[0]&&o,c=function(){if(!u)return 0;const e=n[0];return zL(t[s]-e[s])}(),d=function(){if(!u)return 0;const e=i.getComputedStyle(HL(r));return parseFloat(e.getPropertyValue(`margin-${l}`))}(),f=n.map(a),p=n.map(((e,t,n)=>{const r=!t,o=t===UL(n);return r?f[t]+c:o?f[t]+d:n[t+1][s]-e[s]})).map(zL);return{slideSizes:f,slideSizesWithGaps:p,startGap:c,endGap:d}}(P,S,k,n,A,o),I=uO(P,C,_,v,f,S,k,O,F),{snaps:N,snapsAligned:z}=function(e,t,n,r,o){const{startEdge:i,endEdge:a}=e,{groupSlides:s}=o,l=s(r).map((e=>HL(e)[a]-e[0][i])).map(zL).map(t.measure),u=r.map((e=>n[i]-e[i])).map((e=>-zL(e))),c=s(u).map((e=>e[0])).map(((e,t)=>e+l[t]));return{snaps:u,snapsAligned:c}}(P,R,S,k,I),B=-HL(N)+HL(L),{snapsContained:V,scrollContainLimit:j}=function(e,t,n,r){const o=qL(-t+e,0),i=n.map(o.constrain).map((e=>parseFloat(e.toFixed(3)))),a=function(){const e=i[0],t=HL(i);return qL(i.lastIndexOf(e),i.indexOf(t)+1)}();return{snapsContained:function(){if(t<=e)return[o.max];if("keepSnaps"===r)return i;const{min:n,max:s}=a;return i.slice(n,s)}(),scrollContainLimit:a}}(_,B,z,b),H=D?V:z,{limit:U}=function(e,t,n){const r=t[0];return{limit:qL(n?r-e:HL(t),r)}}(B,H,f),W=QL(UL(H),d,f),$=W.clone(),K=jL(n),X={start:()=>s.start(ae),stop:()=>s.stop(ae),update:()=>(({dragHandler:e,scrollBody:t,scrollBounds:n,eventHandler:r,animation:o,options:{loop:i}})=>{const a=e.pointerDown();i||n.constrain(a);const s=t.seek().settled();s&&!a&&(o.stop(),r.emit("settle")),s||r.emit("scroll")})(ae),render:e=>(({scrollBody:e,translate:t,location:n,offsetLocation:r,scrollLooper:o,slideLooper:i,options:{loop:a}},s)=>{const l=e.velocity();r.set(n.get()-l+l*s),a&&(o.loop(e.direction()),i.loop()),t.to(r.get())})(ae,e)},Y=H[W.get()],q=oO(Y),Q=oO(Y),G=oO(Y),Z=function(e,t,n,r){let o=!0,i=0,a=0,s=n,l=r,u=e.get(),c=0;function d(e){return s=e,p}function f(e){return l=e,p}const p={direction:function(){return a},duration:function(){return s},velocity:function(){return i},seek:function(){const n=t.get()-e.get();let r=0;return s?(i+=n/s,i*=l,u+=i,e.add(i),r=u-c):(i=0,e.set(t),r=n),a=BL(r),c=u,o=zL(n)<.001,p},settled:function(){return o},useBaseFriction:function(){return f(r)},useBaseDuration:function(){return d(n)},useFriction:f,useDuration:d};return p}(q,G,p,.68),J=rO(f,H,B,U,G),ee=function(e,t,n,r,o,i,a){function s(r){const s=r.distance,l=r.index!==t.get();i.add(s),s&&(o.duration()?e.start():(e.update(),e.render(1),e.update())),l&&(n.set(t.get()),t.set(r.index),a.emit("select"))}return{distance:function(e,t){s(r.byDistance(e,t))},index:function(e,n){const o=t.clone().set(e);s(r.byIndex(o.get(),n))}}}(X,W,$,J,Z,G,a),te=function(e){const{max:t,length:n}=e;return{get:function(e){return n?(e-t)/-n:0}}}(U),ne=GL(),re=lO(t,n,a,g),{slideRegistry:oe}=function(e,t,n,r,o,i){const{groupSlides:a}=o,{min:s,max:l}=r;return{slideRegistry:function(){const r=a(i);return!n||t<=e?r:r.slice(s,l).map(((e,t,n)=>{const r=!t,o=!r&&t===UL(n);return r?WL(HL(n[0])+1):o?WL(UL(i)-HL(n)[0]+1,HL(n)[0]):e}))}()}}(_,B,D,j,I,K),ie=function(e,t,n,r,o,i){let a=0;function s(e){"Tab"===e.code&&(a=(new Date).getTime())}function l(s){i.add(s,"focus",(()=>{if((new Date).getTime()-a>10)return;e.scrollLeft=0;const i=t.indexOf(s),l=n.findIndex((e=>e.includes(i)));OL(l)&&(o.useDuration(0),r.index(l,0))}),{passive:!0,capture:!0})}return{init:function(){i.add(document,"keydown",s,!1),t.forEach(l)}}}(e,n,oe,ee,Z,ne),ae={ownerDocument:r,ownerWindow:o,eventHandler:a,containerRect:S,slideRects:k,animation:X,axis:P,direction:C,dragHandler:ZL(P,C,e,r,o,G,JL(P,o),q,X,ee,Z,J,W,a,T,h,m,y,.68,E),eventStore:ne,percentOfView:T,index:W,indexPrevious:$,limit:U,location:q,offsetLocation:Q,options:i,resizeHandler:eO(t,a,o,n,P,w),scrollBody:Z,scrollBounds:tO(U,q,G,Z,T),scrollLooper:nO(B,U,Q,[q,Q,G]),scrollProgress:te,scrollSnapList:H.map(te.get),scrollSnaps:H,scrollTarget:J,scrollTo:ee,slideLooper:aO(P,C,_,B,M,L,N,H,Q,n),slideFocus:ie,slidesHandler:sO(t,a,x),slidesInView:re,slideIndexes:K,slideRegistry:oe,slidesToScroll:I,target:G,translate:iO(P,C,t)};return ae}const dO={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0};function fO(e){function t(e,t){return KL(e,t||{})}const n={mergeOptions:t,optionsAtMedia:function(n){const r=n.breakpoints||{},o=$L(r).filter((t=>e.matchMedia(t).matches)).map((e=>r[e])).reduce(((e,n)=>t(e,n)),{});return t(n,o)},optionsMediaQueries:function(t){return t.map((e=>$L(e.breakpoints||{}))).reduce(((e,t)=>e.concat(t)),[]).map(e.matchMedia)}};return n}function pO(e,t,n){const r=e.ownerDocument,o=r.defaultView,i=fO(o),a=function(e){let t=[];const n={init:function(n,r){return t=r.filter((({options:t})=>!1!==e.optionsAtMedia(t).active)),t.forEach((t=>t.init(n,e))),r.reduce(((e,t)=>Object.assign(e,{[t.name]:t})),{})},destroy:function(){t=t.filter((e=>e.destroy()))}};return n}(i),s=GL(),l=GL(),u=function(){const e={};let t;function n(t){return e[t]||[]}const r={init:function(e){t=e},emit:function(e){return n(e).forEach((n=>n(t,e))),r},off:function(t,o){return e[t]=n(t).filter((e=>e!==o)),r},on:function(t,o){return e[t]=n(t).concat([o]),r}};return r}(),{animationRealms:c}=pO,{mergeOptions:d,optionsAtMedia:f,optionsMediaQueries:p}=i,{on:h,off:m,emit:g}=u,v=T;let y,b,w,x,E=!1,S=d(dO,pO.globalOptions),k=d(S),C=[];function P(t,n){const i=cO(e,w,x,r,o,t,u,n);if(t.loop&&!i.slideLooper.canLoop()){return P(Object.assign({},t,{loop:!1}),n)}return i}function _(t,n){if(E)return;const i=c.find((e=>e.window===o)),u=i||function(e){const t=1e3/60;let n=[],r=null,o=0,i=0;function a(s){r||(r=s);const l=s-r;for(r=s,o+=l;o>=t;)n.forEach((({animation:e})=>e.update())),o-=t;const u=zL(o/t);n.forEach((({animation:e})=>e.render(u))),i&&e.requestAnimationFrame(a)}return{start:function(t){n.includes(t)||n.push(t),i||(i=e.requestAnimationFrame(a))},stop:function(t){n=n.filter((e=>e!==t)),n.length||(e.cancelAnimationFrame(i),r=null,o=0,i=0)},reset:function(){r=null,o=0},window:e}}(o);i||c.push(u),S=d(S,t),k=f(S),C=n||C,function(){const{container:t,slides:n}=k,r=FL(t)?e.querySelector(t):t;w=r||e.children[0];const o=FL(n)?w.querySelectorAll(n):n;x=[].slice.call(o||w.children)}(),y=P(k,u),p([S,...C.map((({options:e})=>e))]).forEach((e=>s.add(e,"change",T))),k.active&&(y.translate.to(y.location.get()),y.slidesInView.init(),y.slideFocus.init(),y.eventHandler.init(M),y.resizeHandler.init(M),y.slidesHandler.init(M),l.add(r,"visibilitychange",(()=>{r.hidden&&u.reset()})),y.options.loop&&y.slideLooper.loop(),w.offsetParent&&x.length&&y.dragHandler.init(M),b=a.init(M,C))}function T(e,t){const n=A();R(),_(d({startIndex:n},e),t),u.emit("reInit")}function R(){y.dragHandler.destroy(),y.animation.stop(),y.eventStore.clear(),y.translate.clear(),y.slideLooper.clear(),y.resizeHandler.destroy(),y.slidesHandler.destroy(),a.destroy(),s.clear(),l.clear()}function D(e,t,n){k.active&&!E&&(y.scrollBody.useBaseFriction().useDuration(t?0:k.duration),y.scrollTo.index(e,n||0))}function A(){return y.index.get()}const M={canScrollNext:function(){return y.index.add(1).get()!==A()},canScrollPrev:function(){return y.index.add(-1).get()!==A()},containerNode:function(){return w},internalEngine:function(){return y},destroy:function(){E||(E=!0,s.clear(),R(),u.emit("destroy"))},off:m,on:h,emit:g,plugins:function(){return b},previousScrollSnap:function(){return y.indexPrevious.get()},reInit:v,rootNode:function(){return e},scrollNext:function(e){D(y.index.add(1).get(),!0===e,-1)},scrollPrev:function(e){D(y.index.add(-1).get(),!0===e,1)},scrollProgress:function(){return y.scrollProgress.get(y.location.get())},scrollSnapList:function(){return y.scrollSnapList},scrollTo:D,selectedScrollSnap:A,slideNodes:function(){return x},slidesInView:function(){return y.slidesInView.get()},slidesNotInView:function(){return y.slidesInView.get(!1)}};return _(t,n),setTimeout((()=>u.emit("init")),0),M}function hO(e={},t=[]){const n=W.useRef(e),r=W.useRef(t),[o,i]=W.useState(),[a,s]=W.useState(),l=W.useCallback((()=>{o&&o.reInit(n.current,r.current)}),[o]);return W.useEffect((()=>{if("undefined"!=typeof window&&window.document&&window.document.createElement&&a){pO.globalOptions=hO.globalOptions;const e=pO(a,n.current,r.current);return i(e),()=>e.destroy()}i(void 0)}),[a,i]),W.useEffect((()=>{ML(n.current,e)||(n.current=e,l())}),[e,l]),W.useEffect((()=>{(function(e,t){if(e.length!==t.length)return!1;const n=LL(e),r=LL(t);return n.every(((e,t)=>ML(e,r[t])))})(r.current,t)||(r.current=t,l())}),[t,l]),[s,o]}function mO(e,t,n){let r,o=n.initialDeps??[];return()=>{var i,a,s,l;let u;n.key&&(null==(i=n.debug)?void 0:i.call(n))&&(u=Date.now());const c=e();if(!(c.length!==o.length||c.some(((e,t)=>o[t]!==e))))return r;let d;if(o=c,n.key&&(null==(a=n.debug)?void 0:a.call(n))&&(d=Date.now()),r=t(...c),n.key&&(null==(s=n.debug)?void 0:s.call(n))){const e=Math.round(100*(Date.now()-u))/100,t=Math.round(100*(Date.now()-d))/100,r=t/16,o=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${o(t,5)} /${o(e,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,null==n?void 0:n.key)}return null==(l=null==n?void 0:n.onChange)||l.call(n,r),r}}function gO(e,t){if(void 0===e)throw new Error("Unexpected undefined"+(t?`: ${t}`:""));return e}pO.animationRealms=[],pO.globalOptions=void 0,hO.globalOptions=void 0;const vO=e=>e,yO=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let o=t;o<=n;o++)r.push(o);return r},bO=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e=>{const{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(r(n.getBoundingClientRect()),"undefined"==typeof ResizeObserver)return()=>{};const o=new ResizeObserver((e=>{const t=e[0];if(null==t?void 0:t.borderBoxSize){const e=t.borderBoxSize[0];if(e)return void r({width:e.inlineSize,height:e.blockSize})}r(n.getBoundingClientRect())}));return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},wO=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=()=>{t(n[e.options.horizontal?"scrollLeft":"scrollTop"])};return r(),n.addEventListener("scroll",r,{passive:!0}),()=>{n.removeEventListener("scroll",r)}},xO=(e,t,n)=>{if(null==t?void 0:t.borderBoxSize){const e=t.borderBoxSize[0];if(e){return Math.round(e[n.options.horizontal?"inlineSize":"blockSize"])}}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])},EO=(e,{adjustments:t=0,behavior:n},r)=>{var o,i;const a=e+t;null==(i=null==(o=r.scrollElement)?void 0:o.scrollTo)||i.call(o,{[r.options.horizontal?"left":"top"]:a,behavior:n})};class SO{constructor(e){this.unsubs=[],this.scrollElement=null,this.isScrolling=!1,this.isScrollingTimeoutId=null,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollDirection=null,this.scrollAdjustments=0,this.measureElementCache=new Map,this.observer=(()=>{let e=null;const t=()=>e||("undefined"!=typeof ResizeObserver?e=new ResizeObserver((e=>{e.forEach((e=>{this._measureElement(e.target,e)}))})):null);return{disconnect:()=>{var e;return null==(e=t())?void 0:e.disconnect()},observe:e=>{var n;return null==(n=t())?void 0:n.observe(e,{box:"border-box"})},unobserve:e=>{var n;return null==(n=t())?void 0:n.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach((([t,n])=>{void 0===n&&delete e[t]})),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:vO,rangeExtractor:yO,onChange:()=>{},measureElement:xO,initialRect:{width:0,height:0},scrollMargin:0,scrollingDelay:150,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,...e}},this.notify=e=>{var t,n;null==(n=(t=this.options).onChange)||n.call(t,this,e)},this.maybeNotify=mO((()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null])),(e=>{this.notify(e)}),{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach((e=>e())),this.unsubs=[],this.scrollElement=null},this._didMount=()=>(this.measureElementCache.forEach(this.observer.observe),()=>{this.observer.disconnect(),this.cleanup()}),this._willUpdate=()=>{const e=this.options.getScrollElement();this.scrollElement!==e&&(this.cleanup(),this.scrollElement=e,this._scrollToOffset(this.scrollOffset,{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,(e=>{this.scrollRect=e,this.maybeNotify()}))),this.unsubs.push(this.options.observeElementOffset(this,(e=>{this.scrollAdjustments=0,this.scrollOffset!==e&&(null!==this.isScrollingTimeoutId&&(clearTimeout(this.isScrollingTimeoutId),this.isScrollingTimeoutId=null),this.isScrolling=!0,this.scrollDirection=this.scrollOffset<e?"forward":"backward",this.scrollOffset=e,this.maybeNotify(),this.isScrollingTimeoutId=setTimeout((()=>{this.isScrollingTimeoutId=null,this.isScrolling=!1,this.scrollDirection=null,this.maybeNotify()}),this.options.scrollingDelay))}))))},this.getSize=()=>this.scrollRect[this.options.horizontal?"width":"height"],this.memoOptions=mO((()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey]),((e,t,n,r)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:r})),{key:!1}),this.getFurthestMeasurement=(e,t)=>{const n=new Map,r=new Map;for(let o=t-1;o>=0;o--){const t=e[o];if(n.has(t.lane))continue;const i=r.get(t.lane);if(null==i||t.end>i.end?r.set(t.lane,t):t.end<i.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort(((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end))[0]:void 0},this.getMeasurements=mO((()=>[this.memoOptions(),this.itemSizeCache]),(({count:e,paddingStart:t,scrollMargin:n,getItemKey:r},o)=>{const i=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const a=this.measurementsCache.slice(0,i);for(let s=i;s<e;s++){const e=r(s),i=1===this.options.lanes?a[s-1]:this.getFurthestMeasurement(a,s),l=i?i.end:t+n,u=o.get(e),c="number"==typeof u?u:this.options.estimateSize(s),d=l+c,f=i?i.lane:s%this.options.lanes;a[s]={index:s,start:l,size:c,end:d,key:e,lane:f}}return this.measurementsCache=a,a}),{key:!1,debug:()=>this.options.debug}),this.calculateRange=mO((()=>[this.getMeasurements(),this.getSize(),this.scrollOffset]),((e,t,n)=>this.range=e.length>0&&t>0?function({measurements:e,outerSize:t,scrollOffset:n}){const r=e.length-1,o=t=>e[t].start,i=kO(0,r,o,n);let a=i;for(;a<r&&e[a].end<n+t;)a++;return{startIndex:i,endIndex:a}}({measurements:e,outerSize:t,scrollOffset:n}):null),{key:!1,debug:()=>this.options.debug}),this.getIndexes=mO((()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count]),((e,t,n,r)=>null===t?[]:e({...t,overscan:n,count:r})),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{const t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{const n=this.measurementsCache[this.indexFromElement(e)];if(!n||!e.isConnected)return void this.measureElementCache.forEach(((t,n)=>{t===e&&(this.observer.unobserve(e),this.measureElementCache.delete(n))}));const r=this.measureElementCache.get(n.key);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.measureElementCache.set(n.key,e));const o=this.options.measureElement(e,t,this);this.resizeItem(n,o)},this.resizeItem=(e,t)=>{const n=t-(this.itemSizeCache.get(e.key)??e.size);0!==n&&(e.start<this.scrollOffset+this.scrollAdjustments&&this._scrollToOffset(this.scrollOffset,{adjustments:this.scrollAdjustments+=n,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(e.index),this.itemSizeCache=new Map(this.itemSizeCache.set(e.key,t)),this.notify(!1))},this.measureElement=e=>{e&&this._measureElement(e,void 0)},this.getVirtualItems=mO((()=>[this.getIndexes(),this.getMeasurements()]),((e,t)=>{const n=[];for(let r=0,o=e.length;r<o;r++){const o=t[e[r]];n.push(o)}return n}),{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const t=this.getMeasurements();return gO(t[kO(0,t.length-1,(e=>gO(t[e]).start),e)])},this.getOffsetForAlignment=(e,t)=>{const n=this.getSize();"auto"===t&&(t=e<=this.scrollOffset?"start":e>=this.scrollOffset+n?"end":"start"),"start"===t||("end"===t?e-=n:"center"===t&&(e-=n/2));const r=this.options.horizontal?"scrollWidth":"scrollHeight",o=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[r]:this.scrollElement[r]:0)-this.getSize();return Math.max(Math.min(o,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const n=gO(this.getMeasurements()[e]);if("auto"===t)if(n.end>=this.scrollOffset+this.getSize()-this.options.scrollPaddingEnd)t="end";else{if(!(n.start<=this.scrollOffset+this.options.scrollPaddingStart))return[this.scrollOffset,t];t="start"}const r="end"===t?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(r,t),t]},this.isDynamicMode=()=>this.measureElementCache.size>0,this.cancelScrollToIndex=()=>{null!==this.scrollToIndexTimeoutId&&(clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(e,{align:t="start",behavior:n}={})=>{this.cancelScrollToIndex(),"smooth"===n&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:n})},this.scrollToIndex=(e,{align:t="auto",behavior:n}={})=>{e=Math.max(0,Math.min(e,this.options.count-1)),this.cancelScrollToIndex(),"smooth"===n&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const[r,o]=this.getOffsetForIndex(e,t);this._scrollToOffset(r,{adjustments:void 0,behavior:n}),"smooth"!==n&&this.isDynamicMode()&&(this.scrollToIndexTimeoutId=setTimeout((()=>{this.scrollToIndexTimeoutId=null;if(this.measureElementCache.has(this.options.getItemKey(e))){const[t]=this.getOffsetForIndex(e,o);((e,t)=>Math.abs(e-t)<1)(t,this.scrollOffset)||this.scrollToIndex(e,{align:o,behavior:n})}else this.scrollToIndex(e,{align:o,behavior:n})})))},this.scrollBy=(e,{behavior:t}={})=>{this.cancelScrollToIndex(),"smooth"===t&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.scrollOffset+e,{adjustments:void 0,behavior:t})},this.getTotalSize=()=>{var e;const t=this.getMeasurements();let n;return n=0===t.length?this.options.paddingStart:1===this.options.lanes?(null==(e=t[t.length-1])?void 0:e.end)??0:Math.max(...t.slice(-this.options.lanes).map((e=>e.end))),n-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e),this.scrollRect=this.options.initialRect,this.scrollOffset=this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach((e=>{this.itemSizeCache.set(e.key,e.size)})),this.maybeNotify()}}const kO=(e,t,n,r)=>{for(;e<=t;){const o=(e+t)/2|0,i=n(o);if(i<r)e=o+1;else{if(!(i>r))return o;t=o-1}}return e>0?e-1:0};const CO="undefined"!=typeof document?W.useLayoutEffect:W.useEffect;function PO(e){return function(e){const t=W.useReducer((()=>({})),{})[1],n={...e,onChange:(n,r)=>{var o;r?yh.flushSync(t):t(),null==(o=e.onChange)||o.call(e,n,r)}},[r]=W.useState((()=>new SO(n)));return r.setOptions(n),W.useEffect((()=>r._didMount()),[]),CO((()=>r._willUpdate())),r}({observeElementRect:bO,observeElementOffset:wO,scrollToFn:EO,...e})}export{Rg as $,vb as A,yb as B,Hn as C,Ab as D,Mb as E,Ub as F,Wb as G,iT as H,lT as I,Zw as J,nx as K,ww as L,dT as M,xw as N,Ew as O,Sw as P,vR as Q,$ as R,yR as S,bR as T,bM as U,wM as V,xM as W,fM as X,pM as Y,hM as Z,mM as _,Dg as a,gM as a0,vM as a1,EM as a2,yM as a3,SM as a4,Jw as a5,ex as a6,tx as a7,$M as a8,KM as a9,XM as aa,YM as ab,qM as ac,QM as ad,_L as ae,TL as af,RL as ag,DL as ah,hO as ai,yh as aj,PO as ak,Ag as b,Mg as c,Fg as d,Ig as e,Og as f,Lg as g,Ng as h,dg as i,Zn as j,fg as k,pg as l,hg as m,mg as n,gg as o,vv as p,bv as q,W as r,wv as s,xv as t,Ev as u,yv as v,pb as w,hb as x,mb as y,gb as z};
|