Firmware:
- nfc_engine: add nfc_engine_try_init() (non-fatal, sets s_pn532_ready),
nfc_engine_try_reattach() (soft re-init, skips bus re-init),
nfc_engine_is_ready() accessor
- main: replace ESP_ERROR_CHECK(nfc_engine_init) with nfc_engine_try_init;
device boots and serves web UI even with no PN532 connected
- app_net: add reconnect_task — every 5s retries nfc_engine_try_reattach()
and broadcasts {"channel":"pn532","payload":{"connected":true}} over WS
- app_net: scan_loop_task skips polling when !nfc_engine_is_ready()
- app_net/api_status: always emit pn532Connected bool; null-guard pn532 fw object
- find_sector_hit / program_classic_snapshot_locked: null-guard cJSON array items
- session_capture: abort if xSemaphoreCreateMutex() returns NULL
Web:
- NfcWsContext: track pn532Connected state from WS pn532 channel + status fetch on connect
- App.tsx: live HeaderBadge (LIVE/NO RF/WAIT) replacing static text
- Dashboard: READY/SEARCHING pill with fw version when available
- api.ts: add pn532Connected to Status type
- toast.tsx: fix ID collision (Date.now + Math.random)
- Capture: surface status fetch errors
- ReadAnalyze: add error feedback for readUl when no data returned
- WriteClone: busy state on both write buttons
- RawConsole: toast when frame returns error not response
- Emulate: validate hex before send (non-empty, even length, hex chars only)
- Brute: warn and skip invalid custom key lines
Made-with: Cursor
81 lines
337 KiB
JavaScript
81 lines
337 KiB
JavaScript
function Bg(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function Ug(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Df={exports:{}},Ii={},Ff={exports:{}},M={};/**
|
||
* @license React
|
||
* react.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var ls=Symbol.for("react.element"),zg=Symbol.for("react.portal"),$g=Symbol.for("react.fragment"),Wg=Symbol.for("react.strict_mode"),Kg=Symbol.for("react.profiler"),Hg=Symbol.for("react.provider"),Gg=Symbol.for("react.context"),Xg=Symbol.for("react.forward_ref"),Qg=Symbol.for("react.suspense"),Yg=Symbol.for("react.memo"),Zg=Symbol.for("react.lazy"),Gu=Symbol.iterator;function Jg(e){return e===null||typeof e!="object"?null:(e=Gu&&e[Gu]||e["@@iterator"],typeof e=="function"?e:null)}var Mf={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_f=Object.assign,Vf={};function tr(e,t,n){this.props=e,this.context=t,this.refs=Vf,this.updater=n||Mf}tr.prototype.isReactComponent={};tr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};tr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Of(){}Of.prototype=tr.prototype;function gl(e,t,n){this.props=e,this.context=t,this.refs=Vf,this.updater=n||Mf}var yl=gl.prototype=new Of;yl.constructor=gl;_f(yl,tr.prototype);yl.isPureReactComponent=!0;var Xu=Array.isArray,If=Object.prototype.hasOwnProperty,vl={current:null},Bf={key:!0,ref:!0,__self:!0,__source:!0};function Uf(e,t,n){var r,s={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)If.call(t,r)&&!Bf.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];s.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:ls,type:e,key:i,ref:o,props:s,_owner:vl.current}}function qg(e,t){return{$$typeof:ls,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function xl(e){return typeof e=="object"&&e!==null&&e.$$typeof===ls}function e0(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Qu=/\/+/g;function mo(e,t){return typeof e=="object"&&e!==null&&e.key!=null?e0(""+e.key):t.toString(36)}function Ks(e,t,n,r,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case ls:case zg:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+mo(o,0):r,Xu(s)?(n="",e!=null&&(n=e.replace(Qu,"$&/")+"/"),Ks(s,t,n,"",function(u){return u})):s!=null&&(xl(s)&&(s=qg(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Qu,"$&/")+"/")+e)),t.push(s)),1;if(o=0,r=r===""?".":r+":",Xu(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+mo(i,a);o+=Ks(i,t,n,l,s)}else if(l=Jg(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+mo(i,a++),o+=Ks(i,t,n,l,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Cs(e,t,n){if(e==null)return e;var r=[],s=0;return Ks(e,r,"","",function(i){return t.call(n,i,s++)}),r}function t0(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var we={current:null},Hs={transition:null},n0={ReactCurrentDispatcher:we,ReactCurrentBatchConfig:Hs,ReactCurrentOwner:vl};function zf(){throw Error("act(...) is not supported in production builds of React.")}M.Children={map:Cs,forEach:function(e,t,n){Cs(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Cs(e,function(){t++}),t},toArray:function(e){return Cs(e,function(t){return t})||[]},only:function(e){if(!xl(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};M.Component=tr;M.Fragment=$g;M.Profiler=Kg;M.PureComponent=gl;M.StrictMode=Wg;M.Suspense=Qg;M.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=n0;M.act=zf;M.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=_f({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=vl.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)If.call(t,l)&&!Bf.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:ls,type:e.type,key:s,ref:i,props:r,_owner:o}};M.createContext=function(e){return e={$$typeof:Gg,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Hg,_context:e},e.Consumer=e};M.createElement=Uf;M.createFactory=function(e){var t=Uf.bind(null,e);return t.type=e,t};M.createRef=function(){return{current:null}};M.forwardRef=function(e){return{$$typeof:Xg,render:e}};M.isValidElement=xl;M.lazy=function(e){return{$$typeof:Zg,_payload:{_status:-1,_result:e},_init:t0}};M.memo=function(e,t){return{$$typeof:Yg,type:e,compare:t===void 0?null:t}};M.startTransition=function(e){var t=Hs.transition;Hs.transition={};try{e()}finally{Hs.transition=t}};M.unstable_act=zf;M.useCallback=function(e,t){return we.current.useCallback(e,t)};M.useContext=function(e){return we.current.useContext(e)};M.useDebugValue=function(){};M.useDeferredValue=function(e){return we.current.useDeferredValue(e)};M.useEffect=function(e,t){return we.current.useEffect(e,t)};M.useId=function(){return we.current.useId()};M.useImperativeHandle=function(e,t,n){return we.current.useImperativeHandle(e,t,n)};M.useInsertionEffect=function(e,t){return we.current.useInsertionEffect(e,t)};M.useLayoutEffect=function(e,t){return we.current.useLayoutEffect(e,t)};M.useMemo=function(e,t){return we.current.useMemo(e,t)};M.useReducer=function(e,t,n){return we.current.useReducer(e,t,n)};M.useRef=function(e){return we.current.useRef(e)};M.useState=function(e){return we.current.useState(e)};M.useSyncExternalStore=function(e,t,n){return we.current.useSyncExternalStore(e,t,n)};M.useTransition=function(){return we.current.useTransition()};M.version="18.3.1";Ff.exports=M;var x=Ff.exports;const $f=Ug(x),r0=Bg({__proto__:null,default:$f},[x]);/**
|
||
* @license React
|
||
* react-jsx-runtime.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var s0=x,i0=Symbol.for("react.element"),o0=Symbol.for("react.fragment"),a0=Object.prototype.hasOwnProperty,l0=s0.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u0={key:!0,ref:!0,__self:!0,__source:!0};function Wf(e,t,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)a0.call(t,r)&&!u0.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:i0,type:e,key:i,ref:o,props:s,_owner:l0.current}}Ii.Fragment=o0;Ii.jsx=Wf;Ii.jsxs=Wf;Df.exports=Ii;var d=Df.exports,na={},Kf={exports:{}},De={},Hf={exports:{}},Gf={};/**
|
||
* @license React
|
||
* scheduler.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/(function(e){function t(j,L){var F=j.length;j.push(L);e:for(;0<F;){var Z=F-1>>>1,ie=j[Z];if(0<s(ie,L))j[Z]=L,j[F]=ie,F=Z;else break e}}function n(j){return j.length===0?null:j[0]}function r(j){if(j.length===0)return null;var L=j[0],F=j.pop();if(F!==L){j[0]=F;e:for(var Z=0,ie=j.length,Ss=ie>>>1;Z<Ss;){var Qt=2*(Z+1)-1,ho=j[Qt],Yt=Qt+1,ks=j[Yt];if(0>s(ho,F))Yt<ie&&0>s(ks,ho)?(j[Z]=ks,j[Yt]=F,Z=Yt):(j[Z]=ho,j[Qt]=F,Z=Qt);else if(Yt<ie&&0>s(ks,F))j[Z]=ks,j[Yt]=F,Z=Yt;else break e}}return L}function s(j,L){var F=j.sortIndex-L.sortIndex;return F!==0?F:j.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,f=null,p=3,g=!1,v=!1,w=!1,b=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(j){for(var L=n(u);L!==null;){if(L.callback===null)r(u);else if(L.startTime<=j)r(u),L.sortIndex=L.expirationTime,t(l,L);else break;L=n(u)}}function S(j){if(w=!1,y(j),!v)if(n(l)!==null)v=!0,bs(k);else{var L=n(u);L!==null&&ne(S,L.startTime-j)}}function k(j,L){v=!1,w&&(w=!1,h(P),P=-1),g=!0;var F=p;try{for(y(L),f=n(l);f!==null&&(!(f.expirationTime>L)||j&&!ee());){var Z=f.callback;if(typeof Z=="function"){f.callback=null,p=f.priorityLevel;var ie=Z(f.expirationTime<=L);L=e.unstable_now(),typeof ie=="function"?f.callback=ie:f===n(l)&&r(l),y(L)}else r(l);f=n(l)}if(f!==null)var Ss=!0;else{var Qt=n(u);Qt!==null&&ne(S,Qt.startTime-L),Ss=!1}return Ss}finally{f=null,p=F,g=!1}}var C=!1,E=null,P=-1,D=5,A=-1;function ee(){return!(e.unstable_now()-A<D)}function wt(){if(E!==null){var j=e.unstable_now();A=j;var L=!0;try{L=E(!0,j)}finally{L?Xt():(C=!1,E=null)}}else C=!1}var Xt;if(typeof m=="function")Xt=function(){m(wt)};else if(typeof MessageChannel<"u"){var ar=new MessageChannel,Hu=ar.port2;ar.port1.onmessage=wt,Xt=function(){Hu.postMessage(null)}}else Xt=function(){b(wt,0)};function bs(j){E=j,C||(C=!0,Xt())}function ne(j,L){P=b(function(){j(e.unstable_now())},L)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(j){j.callback=null},e.unstable_continueExecution=function(){v||g||(v=!0,bs(k))},e.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<j?Math.floor(1e3/j):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(j){switch(p){case 1:case 2:case 3:var L=3;break;default:L=p}var F=p;p=L;try{return j()}finally{p=F}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(j,L){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var F=p;p=j;try{return L()}finally{p=F}},e.unstable_scheduleCallback=function(j,L,F){var Z=e.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?Z+F:Z):F=Z,j){case 1:var ie=-1;break;case 2:ie=250;break;case 5:ie=1073741823;break;case 4:ie=1e4;break;default:ie=5e3}return ie=F+ie,j={id:c++,callback:L,priorityLevel:j,startTime:F,expirationTime:ie,sortIndex:-1},F>Z?(j.sortIndex=F,t(u,j),n(l)===null&&j===n(u)&&(w?(h(P),P=-1):w=!0,ne(S,F-Z))):(j.sortIndex=ie,t(l,j),v||g||(v=!0,bs(k))),j},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(j){var L=p;return function(){var F=p;p=L;try{return j.apply(this,arguments)}finally{p=F}}}})(Gf);Hf.exports=Gf;var c0=Hf.exports;/**
|
||
* @license React
|
||
* react-dom.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var d0=x,Re=c0;function T(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 Xf=new Set,Or={};function mn(e,t){Wn(e,t),Wn(e+"Capture",t)}function Wn(e,t){for(Or[e]=t,e=0;e<t.length;e++)Xf.add(t[e])}var pt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ra=Object.prototype.hasOwnProperty,f0=/^[: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]*$/,Yu={},Zu={};function p0(e){return ra.call(Zu,e)?!0:ra.call(Yu,e)?!1:f0.test(e)?Zu[e]=!0:(Yu[e]=!0,!1)}function h0(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function m0(e,t,n,r){if(t===null||typeof t>"u"||h0(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function be(e,t,n,r,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var de={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){de[e]=new be(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];de[t]=new be(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){de[e]=new be(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){de[e]=new be(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){de[e]=new be(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){de[e]=new be(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){de[e]=new be(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){de[e]=new be(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){de[e]=new be(e,5,!1,e.toLowerCase(),null,!1,!1)});var wl=/[\-:]([a-z])/g;function bl(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(wl,bl);de[t]=new be(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(wl,bl);de[t]=new be(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(wl,bl);de[t]=new be(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){de[e]=new be(e,1,!1,e.toLowerCase(),null,!1,!1)});de.xlinkHref=new be("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){de[e]=new be(e,1,!1,e.toLowerCase(),null,!0,!0)});function Sl(e,t,n,r){var s=de.hasOwnProperty(t)?de[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(m0(t,n,s,r)&&(n=null),r||s===null?p0(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var xt=d0.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ps=Symbol.for("react.element"),bn=Symbol.for("react.portal"),Sn=Symbol.for("react.fragment"),kl=Symbol.for("react.strict_mode"),sa=Symbol.for("react.profiler"),Qf=Symbol.for("react.provider"),Yf=Symbol.for("react.context"),Cl=Symbol.for("react.forward_ref"),ia=Symbol.for("react.suspense"),oa=Symbol.for("react.suspense_list"),Pl=Symbol.for("react.memo"),kt=Symbol.for("react.lazy"),Zf=Symbol.for("react.offscreen"),Ju=Symbol.iterator;function lr(e){return e===null||typeof e!="object"?null:(e=Ju&&e[Ju]||e["@@iterator"],typeof e=="function"?e:null)}var G=Object.assign,go;function yr(e){if(go===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);go=t&&t[1]||""}return`
|
||
`+go+e}var yo=!1;function vo(e,t){if(!e||yo)return"";yo=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var s=u.stack.split(`
|
||
`),i=r.stack.split(`
|
||
`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=`
|
||
`+s[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{yo=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?yr(e):""}function g0(e){switch(e.tag){case 5:return yr(e.type);case 16:return yr("Lazy");case 13:return yr("Suspense");case 19:return yr("SuspenseList");case 0:case 2:case 15:return e=vo(e.type,!1),e;case 11:return e=vo(e.type.render,!1),e;case 1:return e=vo(e.type,!0),e;default:return""}}function aa(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Sn:return"Fragment";case bn:return"Portal";case sa:return"Profiler";case kl:return"StrictMode";case ia:return"Suspense";case oa:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Yf:return(e.displayName||"Context")+".Consumer";case Qf:return(e._context.displayName||"Context")+".Provider";case Cl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Pl:return t=e.displayName||null,t!==null?t:aa(e.type)||"Memo";case kt:t=e._payload,e=e._init;try{return aa(e(t))}catch{}}return null}function y0(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return aa(t);case 8:return t===kl?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function It(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Jf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function v0(e){var t=Jf(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Es(e){e._valueTracker||(e._valueTracker=v0(e))}function qf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Jf(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function oi(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function la(e,t){var n=t.checked;return G({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function qu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=It(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ep(e,t){t=t.checked,t!=null&&Sl(e,"checked",t,!1)}function ua(e,t){ep(e,t);var n=It(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ca(e,t.type,n):t.hasOwnProperty("defaultValue")&&ca(e,t.type,It(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ec(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ca(e,t,n){(t!=="number"||oi(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var vr=Array.isArray;function On(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+It(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function da(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(T(91));return G({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function tc(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(T(92));if(vr(n)){if(1<n.length)throw Error(T(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:It(n)}}function tp(e,t){var n=It(t.value),r=It(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function nc(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function np(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 fa(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?np(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ts,rp=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ts=Ts||document.createElement("div"),Ts.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ts.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ir(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Pr={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},x0=["Webkit","ms","Moz","O"];Object.keys(Pr).forEach(function(e){x0.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Pr[t]=Pr[e]})});function sp(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Pr.hasOwnProperty(e)&&Pr[e]?(""+t).trim():t+"px"}function ip(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=sp(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var w0=G({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 pa(e,t){if(t){if(w0[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(T(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(T(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(T(61))}if(t.style!=null&&typeof t.style!="object")throw Error(T(62))}}function ha(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ma=null;function El(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ga=null,In=null,Bn=null;function rc(e){if(e=ds(e)){if(typeof ga!="function")throw Error(T(280));var t=e.stateNode;t&&(t=Wi(t),ga(e.stateNode,e.type,t))}}function op(e){In?Bn?Bn.push(e):Bn=[e]:In=e}function ap(){if(In){var e=In,t=Bn;if(Bn=In=null,rc(e),t)for(e=0;e<t.length;e++)rc(t[e])}}function lp(e,t){return e(t)}function up(){}var xo=!1;function cp(e,t,n){if(xo)return e(t,n);xo=!0;try{return lp(e,t,n)}finally{xo=!1,(In!==null||Bn!==null)&&(up(),ap())}}function Br(e,t){var n=e.stateNode;if(n===null)return null;var r=Wi(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(T(231,t,typeof n));return n}var ya=!1;if(pt)try{var ur={};Object.defineProperty(ur,"passive",{get:function(){ya=!0}}),window.addEventListener("test",ur,ur),window.removeEventListener("test",ur,ur)}catch{ya=!1}function b0(e,t,n,r,s,i,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Er=!1,ai=null,li=!1,va=null,S0={onError:function(e){Er=!0,ai=e}};function k0(e,t,n,r,s,i,o,a,l){Er=!1,ai=null,b0.apply(S0,arguments)}function C0(e,t,n,r,s,i,o,a,l){if(k0.apply(this,arguments),Er){if(Er){var u=ai;Er=!1,ai=null}else throw Error(T(198));li||(li=!0,va=u)}}function gn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function dp(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function sc(e){if(gn(e)!==e)throw Error(T(188))}function P0(e){var t=e.alternate;if(!t){if(t=gn(e),t===null)throw Error(T(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return sc(s),e;if(i===r)return sc(s),t;i=i.sibling}throw Error(T(188))}if(n.return!==r.return)n=s,r=i;else{for(var o=!1,a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o)throw Error(T(189))}}if(n.alternate!==r)throw Error(T(190))}if(n.tag!==3)throw Error(T(188));return n.stateNode.current===n?e:t}function fp(e){return e=P0(e),e!==null?pp(e):null}function pp(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=pp(e);if(t!==null)return t;e=e.sibling}return null}var hp=Re.unstable_scheduleCallback,ic=Re.unstable_cancelCallback,E0=Re.unstable_shouldYield,T0=Re.unstable_requestPaint,q=Re.unstable_now,j0=Re.unstable_getCurrentPriorityLevel,Tl=Re.unstable_ImmediatePriority,mp=Re.unstable_UserBlockingPriority,ui=Re.unstable_NormalPriority,N0=Re.unstable_LowPriority,gp=Re.unstable_IdlePriority,Bi=null,nt=null;function A0(e){if(nt&&typeof nt.onCommitFiberRoot=="function")try{nt.onCommitFiberRoot(Bi,e,void 0,(e.current.flags&128)===128)}catch{}}var Qe=Math.clz32?Math.clz32:D0,R0=Math.log,L0=Math.LN2;function D0(e){return e>>>=0,e===0?32:31-(R0(e)/L0|0)|0}var js=64,Ns=4194304;function xr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ci(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=xr(a):(i&=o,i!==0&&(r=xr(i)))}else o=n&~s,o!==0?r=xr(o):i!==0&&(r=xr(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Qe(t),s=1<<n,r|=e[n],t&=~s;return r}function F0(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function M0(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-Qe(i),a=1<<o,l=s[o];l===-1?(!(a&n)||a&r)&&(s[o]=F0(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function xa(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function yp(){var e=js;return js<<=1,!(js&4194240)&&(js=64),e}function wo(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function us(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Qe(t),e[t]=n}function _0(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 s=31-Qe(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function jl(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Qe(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var V=0;function vp(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var xp,Nl,wp,bp,Sp,wa=!1,As=[],At=null,Rt=null,Lt=null,Ur=new Map,zr=new Map,Pt=[],V0="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 oc(e,t){switch(e){case"focusin":case"focusout":At=null;break;case"dragenter":case"dragleave":Rt=null;break;case"mouseover":case"mouseout":Lt=null;break;case"pointerover":case"pointerout":Ur.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":zr.delete(t.pointerId)}}function cr(e,t,n,r,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=ds(t),t!==null&&Nl(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function O0(e,t,n,r,s){switch(t){case"focusin":return At=cr(At,e,t,n,r,s),!0;case"dragenter":return Rt=cr(Rt,e,t,n,r,s),!0;case"mouseover":return Lt=cr(Lt,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return Ur.set(i,cr(Ur.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,zr.set(i,cr(zr.get(i)||null,e,t,n,r,s)),!0}return!1}function kp(e){var t=nn(e.target);if(t!==null){var n=gn(t);if(n!==null){if(t=n.tag,t===13){if(t=dp(n),t!==null){e.blockedOn=t,Sp(e.priority,function(){wp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Gs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=ba(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);ma=r,n.target.dispatchEvent(r),ma=null}else return t=ds(n),t!==null&&Nl(t),e.blockedOn=n,!1;t.shift()}return!0}function ac(e,t,n){Gs(e)&&n.delete(t)}function I0(){wa=!1,At!==null&&Gs(At)&&(At=null),Rt!==null&&Gs(Rt)&&(Rt=null),Lt!==null&&Gs(Lt)&&(Lt=null),Ur.forEach(ac),zr.forEach(ac)}function dr(e,t){e.blockedOn===t&&(e.blockedOn=null,wa||(wa=!0,Re.unstable_scheduleCallback(Re.unstable_NormalPriority,I0)))}function $r(e){function t(s){return dr(s,e)}if(0<As.length){dr(As[0],e);for(var n=1;n<As.length;n++){var r=As[n];r.blockedOn===e&&(r.blockedOn=null)}}for(At!==null&&dr(At,e),Rt!==null&&dr(Rt,e),Lt!==null&&dr(Lt,e),Ur.forEach(t),zr.forEach(t),n=0;n<Pt.length;n++)r=Pt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Pt.length&&(n=Pt[0],n.blockedOn===null);)kp(n),n.blockedOn===null&&Pt.shift()}var Un=xt.ReactCurrentBatchConfig,di=!0;function B0(e,t,n,r){var s=V,i=Un.transition;Un.transition=null;try{V=1,Al(e,t,n,r)}finally{V=s,Un.transition=i}}function U0(e,t,n,r){var s=V,i=Un.transition;Un.transition=null;try{V=4,Al(e,t,n,r)}finally{V=s,Un.transition=i}}function Al(e,t,n,r){if(di){var s=ba(e,t,n,r);if(s===null)Ao(e,t,r,fi,n),oc(e,r);else if(O0(s,e,t,n,r))r.stopPropagation();else if(oc(e,r),t&4&&-1<V0.indexOf(e)){for(;s!==null;){var i=ds(s);if(i!==null&&xp(i),i=ba(e,t,n,r),i===null&&Ao(e,t,r,fi,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else Ao(e,t,r,null,n)}}var fi=null;function ba(e,t,n,r){if(fi=null,e=El(r),e=nn(e),e!==null)if(t=gn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=dp(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return fi=e,null}function Cp(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(j0()){case Tl:return 1;case mp:return 4;case ui:case N0:return 16;case gp:return 536870912;default:return 16}default:return 16}}var Tt=null,Rl=null,Xs=null;function Pp(){if(Xs)return Xs;var e,t=Rl,n=t.length,r,s="value"in Tt?Tt.value:Tt.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===s[i-r];r++);return Xs=s.slice(e,1<r?1-r:void 0)}function Qs(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Rs(){return!0}function lc(){return!1}function Fe(e){function t(n,r,s,i,o){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Rs:lc,this.isPropagationStopped=lc,this}return G(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Rs)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Rs)},persist:function(){},isPersistent:Rs}),t}var nr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ll=Fe(nr),cs=G({},nr,{view:0,detail:0}),z0=Fe(cs),bo,So,fr,Ui=G({},cs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Dl,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==fr&&(fr&&e.type==="mousemove"?(bo=e.screenX-fr.screenX,So=e.screenY-fr.screenY):So=bo=0,fr=e),bo)},movementY:function(e){return"movementY"in e?e.movementY:So}}),uc=Fe(Ui),$0=G({},Ui,{dataTransfer:0}),W0=Fe($0),K0=G({},cs,{relatedTarget:0}),ko=Fe(K0),H0=G({},nr,{animationName:0,elapsedTime:0,pseudoElement:0}),G0=Fe(H0),X0=G({},nr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Q0=Fe(X0),Y0=G({},nr,{data:0}),cc=Fe(Y0),Z0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},J0={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"},q0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ey(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=q0[e])?!!t[e]:!1}function Dl(){return ey}var ty=G({},cs,{key:function(e){if(e.key){var t=Z0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Qs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?J0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Dl,charCode:function(e){return e.type==="keypress"?Qs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Qs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ny=Fe(ty),ry=G({},Ui,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),dc=Fe(ry),sy=G({},cs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Dl}),iy=Fe(sy),oy=G({},nr,{propertyName:0,elapsedTime:0,pseudoElement:0}),ay=Fe(oy),ly=G({},Ui,{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}),uy=Fe(ly),cy=[9,13,27,32],Fl=pt&&"CompositionEvent"in window,Tr=null;pt&&"documentMode"in document&&(Tr=document.documentMode);var dy=pt&&"TextEvent"in window&&!Tr,Ep=pt&&(!Fl||Tr&&8<Tr&&11>=Tr),fc=" ",pc=!1;function Tp(e,t){switch(e){case"keyup":return cy.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var kn=!1;function fy(e,t){switch(e){case"compositionend":return jp(t);case"keypress":return t.which!==32?null:(pc=!0,fc);case"textInput":return e=t.data,e===fc&&pc?null:e;default:return null}}function py(e,t){if(kn)return e==="compositionend"||!Fl&&Tp(e,t)?(e=Pp(),Xs=Rl=Tt=null,kn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ep&&t.locale!=="ko"?null:t.data;default:return null}}var hy={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 hc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!hy[e.type]:t==="textarea"}function Np(e,t,n,r){op(r),t=pi(t,"onChange"),0<t.length&&(n=new Ll("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var jr=null,Wr=null;function my(e){Bp(e,0)}function zi(e){var t=En(e);if(qf(t))return e}function gy(e,t){if(e==="change")return t}var Ap=!1;if(pt){var Co;if(pt){var Po="oninput"in document;if(!Po){var mc=document.createElement("div");mc.setAttribute("oninput","return;"),Po=typeof mc.oninput=="function"}Co=Po}else Co=!1;Ap=Co&&(!document.documentMode||9<document.documentMode)}function gc(){jr&&(jr.detachEvent("onpropertychange",Rp),Wr=jr=null)}function Rp(e){if(e.propertyName==="value"&&zi(Wr)){var t=[];Np(t,Wr,e,El(e)),cp(my,t)}}function yy(e,t,n){e==="focusin"?(gc(),jr=t,Wr=n,jr.attachEvent("onpropertychange",Rp)):e==="focusout"&&gc()}function vy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return zi(Wr)}function xy(e,t){if(e==="click")return zi(t)}function wy(e,t){if(e==="input"||e==="change")return zi(t)}function by(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ze=typeof Object.is=="function"?Object.is:by;function Kr(e,t){if(Ze(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!ra.call(t,s)||!Ze(e[s],t[s]))return!1}return!0}function yc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function vc(e,t){var n=yc(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=yc(n)}}function Lp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Lp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dp(){for(var e=window,t=oi();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=oi(e.document)}return t}function Ml(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Sy(e){var t=Dp(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Lp(n.ownerDocument.documentElement,n)){if(r!==null&&Ml(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=vc(n,i);var o=vc(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var ky=pt&&"documentMode"in document&&11>=document.documentMode,Cn=null,Sa=null,Nr=null,ka=!1;function xc(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ka||Cn==null||Cn!==oi(r)||(r=Cn,"selectionStart"in r&&Ml(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Nr&&Kr(Nr,r)||(Nr=r,r=pi(Sa,"onSelect"),0<r.length&&(t=new Ll("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Cn)))}function Ls(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Pn={animationend:Ls("Animation","AnimationEnd"),animationiteration:Ls("Animation","AnimationIteration"),animationstart:Ls("Animation","AnimationStart"),transitionend:Ls("Transition","TransitionEnd")},Eo={},Fp={};pt&&(Fp=document.createElement("div").style,"AnimationEvent"in window||(delete Pn.animationend.animation,delete Pn.animationiteration.animation,delete Pn.animationstart.animation),"TransitionEvent"in window||delete Pn.transitionend.transition);function $i(e){if(Eo[e])return Eo[e];if(!Pn[e])return e;var t=Pn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Fp)return Eo[e]=t[n];return e}var Mp=$i("animationend"),_p=$i("animationiteration"),Vp=$i("animationstart"),Op=$i("transitionend"),Ip=new Map,wc="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 $t(e,t){Ip.set(e,t),mn(t,[e])}for(var To=0;To<wc.length;To++){var jo=wc[To],Cy=jo.toLowerCase(),Py=jo[0].toUpperCase()+jo.slice(1);$t(Cy,"on"+Py)}$t(Mp,"onAnimationEnd");$t(_p,"onAnimationIteration");$t(Vp,"onAnimationStart");$t("dblclick","onDoubleClick");$t("focusin","onFocus");$t("focusout","onBlur");$t(Op,"onTransitionEnd");Wn("onMouseEnter",["mouseout","mouseover"]);Wn("onMouseLeave",["mouseout","mouseover"]);Wn("onPointerEnter",["pointerout","pointerover"]);Wn("onPointerLeave",["pointerout","pointerover"]);mn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));mn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));mn("onBeforeInput",["compositionend","keypress","textInput","paste"]);mn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));mn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));mn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wr="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(" "),Ey=new Set("cancel close invalid load scroll toggle".split(" ").concat(wr));function bc(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,C0(r,t,void 0,e),e.currentTarget=null}function Bp(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;bc(s,a,u),i=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;bc(s,a,u),i=l}}}if(li)throw e=va,li=!1,va=null,e}function B(e,t){var n=t[ja];n===void 0&&(n=t[ja]=new Set);var r=e+"__bubble";n.has(r)||(Up(t,e,2,!1),n.add(r))}function No(e,t,n){var r=0;t&&(r|=4),Up(n,e,r,t)}var Ds="_reactListening"+Math.random().toString(36).slice(2);function Hr(e){if(!e[Ds]){e[Ds]=!0,Xf.forEach(function(n){n!=="selectionchange"&&(Ey.has(n)||No(n,!1,e),No(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ds]||(t[Ds]=!0,No("selectionchange",!1,t))}}function Up(e,t,n,r){switch(Cp(t)){case 1:var s=B0;break;case 4:s=U0;break;default:s=Al}n=s.bind(null,t,n,e),s=void 0,!ya||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Ao(e,t,n,r,s){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=nn(a),o===null)return;if(l=o.tag,l===5||l===6){r=i=o;continue e}a=a.parentNode}}r=r.return}cp(function(){var u=i,c=El(n),f=[];e:{var p=Ip.get(e);if(p!==void 0){var g=Ll,v=e;switch(e){case"keypress":if(Qs(n)===0)break e;case"keydown":case"keyup":g=ny;break;case"focusin":v="focus",g=ko;break;case"focusout":v="blur",g=ko;break;case"beforeblur":case"afterblur":g=ko;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":g=uc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=W0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=iy;break;case Mp:case _p:case Vp:g=G0;break;case Op:g=ay;break;case"scroll":g=z0;break;case"wheel":g=uy;break;case"copy":case"cut":case"paste":g=Q0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=dc}var w=(t&4)!==0,b=!w&&e==="scroll",h=w?p!==null?p+"Capture":null:p;w=[];for(var m=u,y;m!==null;){y=m;var S=y.stateNode;if(y.tag===5&&S!==null&&(y=S,h!==null&&(S=Br(m,h),S!=null&&w.push(Gr(m,S,y)))),b)break;m=m.return}0<w.length&&(p=new g(p,v,null,n,c),f.push({event:p,listeners:w}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",p&&n!==ma&&(v=n.relatedTarget||n.fromElement)&&(nn(v)||v[ht]))break e;if((g||p)&&(p=c.window===c?c:(p=c.ownerDocument)?p.defaultView||p.parentWindow:window,g?(v=n.relatedTarget||n.toElement,g=u,v=v?nn(v):null,v!==null&&(b=gn(v),v!==b||v.tag!==5&&v.tag!==6)&&(v=null)):(g=null,v=u),g!==v)){if(w=uc,S="onMouseLeave",h="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(w=dc,S="onPointerLeave",h="onPointerEnter",m="pointer"),b=g==null?p:En(g),y=v==null?p:En(v),p=new w(S,m+"leave",g,n,c),p.target=b,p.relatedTarget=y,S=null,nn(c)===u&&(w=new w(h,m+"enter",v,n,c),w.target=y,w.relatedTarget=b,S=w),b=S,g&&v)t:{for(w=g,h=v,m=0,y=w;y;y=wn(y))m++;for(y=0,S=h;S;S=wn(S))y++;for(;0<m-y;)w=wn(w),m--;for(;0<y-m;)h=wn(h),y--;for(;m--;){if(w===h||h!==null&&w===h.alternate)break t;w=wn(w),h=wn(h)}w=null}else w=null;g!==null&&Sc(f,p,g,w,!1),v!==null&&b!==null&&Sc(f,b,v,w,!0)}}e:{if(p=u?En(u):window,g=p.nodeName&&p.nodeName.toLowerCase(),g==="select"||g==="input"&&p.type==="file")var k=gy;else if(hc(p))if(Ap)k=wy;else{k=vy;var C=yy}else(g=p.nodeName)&&g.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(k=xy);if(k&&(k=k(e,u))){Np(f,k,n,c);break e}C&&C(e,p,u),e==="focusout"&&(C=p._wrapperState)&&C.controlled&&p.type==="number"&&ca(p,"number",p.value)}switch(C=u?En(u):window,e){case"focusin":(hc(C)||C.contentEditable==="true")&&(Cn=C,Sa=u,Nr=null);break;case"focusout":Nr=Sa=Cn=null;break;case"mousedown":ka=!0;break;case"contextmenu":case"mouseup":case"dragend":ka=!1,xc(f,n,c);break;case"selectionchange":if(ky)break;case"keydown":case"keyup":xc(f,n,c)}var E;if(Fl)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else kn?Tp(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(Ep&&n.locale!=="ko"&&(kn||P!=="onCompositionStart"?P==="onCompositionEnd"&&kn&&(E=Pp()):(Tt=c,Rl="value"in Tt?Tt.value:Tt.textContent,kn=!0)),C=pi(u,P),0<C.length&&(P=new cc(P,e,null,n,c),f.push({event:P,listeners:C}),E?P.data=E:(E=jp(n),E!==null&&(P.data=E)))),(E=dy?fy(e,n):py(e,n))&&(u=pi(u,"onBeforeInput"),0<u.length&&(c=new cc("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:u}),c.data=E))}Bp(f,t)})}function Gr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function pi(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Br(e,n),i!=null&&r.unshift(Gr(e,i,s)),i=Br(e,t),i!=null&&r.push(Gr(e,i,s))),e=e.return}return r}function wn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Sc(e,t,n,r,s){for(var i=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,s?(l=Br(n,i),l!=null&&o.unshift(Gr(n,l,a))):s||(l=Br(n,i),l!=null&&o.push(Gr(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ty=/\r\n?/g,jy=/\u0000|\uFFFD/g;function kc(e){return(typeof e=="string"?e:""+e).replace(Ty,`
|
||
`).replace(jy,"")}function Fs(e,t,n){if(t=kc(t),kc(e)!==t&&n)throw Error(T(425))}function hi(){}var Ca=null,Pa=null;function Ea(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ta=typeof setTimeout=="function"?setTimeout:void 0,Ny=typeof clearTimeout=="function"?clearTimeout:void 0,Cc=typeof Promise=="function"?Promise:void 0,Ay=typeof queueMicrotask=="function"?queueMicrotask:typeof Cc<"u"?function(e){return Cc.resolve(null).then(e).catch(Ry)}:Ta;function Ry(e){setTimeout(function(){throw e})}function Ro(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),$r(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);$r(t)}function Dt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Pc(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var rr=Math.random().toString(36).slice(2),tt="__reactFiber$"+rr,Xr="__reactProps$"+rr,ht="__reactContainer$"+rr,ja="__reactEvents$"+rr,Ly="__reactListeners$"+rr,Dy="__reactHandles$"+rr;function nn(e){var t=e[tt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ht]||n[tt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Pc(e);e!==null;){if(n=e[tt])return n;e=Pc(e)}return t}e=n,n=e.parentNode}return null}function ds(e){return e=e[tt]||e[ht],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function En(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(T(33))}function Wi(e){return e[Xr]||null}var Na=[],Tn=-1;function Wt(e){return{current:e}}function U(e){0>Tn||(e.current=Na[Tn],Na[Tn]=null,Tn--)}function I(e,t){Tn++,Na[Tn]=e.current,e.current=t}var Bt={},ye=Wt(Bt),Ce=Wt(!1),cn=Bt;function Kn(e,t){var n=e.type.contextTypes;if(!n)return Bt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Pe(e){return e=e.childContextTypes,e!=null}function mi(){U(Ce),U(ye)}function Ec(e,t,n){if(ye.current!==Bt)throw Error(T(168));I(ye,t),I(Ce,n)}function zp(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(T(108,y0(e)||"Unknown",s));return G({},n,r)}function gi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Bt,cn=ye.current,I(ye,e),I(Ce,Ce.current),!0}function Tc(e,t,n){var r=e.stateNode;if(!r)throw Error(T(169));n?(e=zp(e,t,cn),r.__reactInternalMemoizedMergedChildContext=e,U(Ce),U(ye),I(ye,e)):U(Ce),I(Ce,n)}var at=null,Ki=!1,Lo=!1;function $p(e){at===null?at=[e]:at.push(e)}function Fy(e){Ki=!0,$p(e)}function Kt(){if(!Lo&&at!==null){Lo=!0;var e=0,t=V;try{var n=at;for(V=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}at=null,Ki=!1}catch(s){throw at!==null&&(at=at.slice(e+1)),hp(Tl,Kt),s}finally{V=t,Lo=!1}}return null}var jn=[],Nn=0,yi=null,vi=0,Oe=[],Ie=0,dn=null,lt=1,ut="";function Jt(e,t){jn[Nn++]=vi,jn[Nn++]=yi,yi=e,vi=t}function Wp(e,t,n){Oe[Ie++]=lt,Oe[Ie++]=ut,Oe[Ie++]=dn,dn=e;var r=lt;e=ut;var s=32-Qe(r)-1;r&=~(1<<s),n+=1;var i=32-Qe(t)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,lt=1<<32-Qe(t)+s|n<<s|r,ut=i+e}else lt=1<<i|n<<s|r,ut=e}function _l(e){e.return!==null&&(Jt(e,1),Wp(e,1,0))}function Vl(e){for(;e===yi;)yi=jn[--Nn],jn[Nn]=null,vi=jn[--Nn],jn[Nn]=null;for(;e===dn;)dn=Oe[--Ie],Oe[Ie]=null,ut=Oe[--Ie],Oe[Ie]=null,lt=Oe[--Ie],Oe[Ie]=null}var Ne=null,je=null,$=!1,Xe=null;function Kp(e,t){var n=Be(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function jc(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ne=e,je=Dt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ne=e,je=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=dn!==null?{id:lt,overflow:ut}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Be(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ne=e,je=null,!0):!1;default:return!1}}function Aa(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ra(e){if($){var t=je;if(t){var n=t;if(!jc(e,t)){if(Aa(e))throw Error(T(418));t=Dt(n.nextSibling);var r=Ne;t&&jc(e,t)?Kp(r,n):(e.flags=e.flags&-4097|2,$=!1,Ne=e)}}else{if(Aa(e))throw Error(T(418));e.flags=e.flags&-4097|2,$=!1,Ne=e}}}function Nc(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ne=e}function Ms(e){if(e!==Ne)return!1;if(!$)return Nc(e),$=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ea(e.type,e.memoizedProps)),t&&(t=je)){if(Aa(e))throw Hp(),Error(T(418));for(;t;)Kp(e,t),t=Dt(t.nextSibling)}if(Nc(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(T(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){je=Dt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}je=null}}else je=Ne?Dt(e.stateNode.nextSibling):null;return!0}function Hp(){for(var e=je;e;)e=Dt(e.nextSibling)}function Hn(){je=Ne=null,$=!1}function Ol(e){Xe===null?Xe=[e]:Xe.push(e)}var My=xt.ReactCurrentBatchConfig;function pr(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(T(309));var r=n.stateNode}if(!r)throw Error(T(147,e));var s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(T(284));if(!n._owner)throw Error(T(290,e))}return e}function _s(e,t){throw e=Object.prototype.toString.call(t),Error(T(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ac(e){var t=e._init;return t(e._payload)}function Gp(e){function t(h,m){if(e){var y=h.deletions;y===null?(h.deletions=[m],h.flags|=16):y.push(m)}}function n(h,m){if(!e)return null;for(;m!==null;)t(h,m),m=m.sibling;return null}function r(h,m){for(h=new Map;m!==null;)m.key!==null?h.set(m.key,m):h.set(m.index,m),m=m.sibling;return h}function s(h,m){return h=Vt(h,m),h.index=0,h.sibling=null,h}function i(h,m,y){return h.index=y,e?(y=h.alternate,y!==null?(y=y.index,y<m?(h.flags|=2,m):y):(h.flags|=2,m)):(h.flags|=1048576,m)}function o(h){return e&&h.alternate===null&&(h.flags|=2),h}function a(h,m,y,S){return m===null||m.tag!==6?(m=Io(y,h.mode,S),m.return=h,m):(m=s(m,y),m.return=h,m)}function l(h,m,y,S){var k=y.type;return k===Sn?c(h,m,y.props.children,S,y.key):m!==null&&(m.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===kt&&Ac(k)===m.type)?(S=s(m,y.props),S.ref=pr(h,m,y),S.return=h,S):(S=ni(y.type,y.key,y.props,null,h.mode,S),S.ref=pr(h,m,y),S.return=h,S)}function u(h,m,y,S){return m===null||m.tag!==4||m.stateNode.containerInfo!==y.containerInfo||m.stateNode.implementation!==y.implementation?(m=Bo(y,h.mode,S),m.return=h,m):(m=s(m,y.children||[]),m.return=h,m)}function c(h,m,y,S,k){return m===null||m.tag!==7?(m=ln(y,h.mode,S,k),m.return=h,m):(m=s(m,y),m.return=h,m)}function f(h,m,y){if(typeof m=="string"&&m!==""||typeof m=="number")return m=Io(""+m,h.mode,y),m.return=h,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Ps:return y=ni(m.type,m.key,m.props,null,h.mode,y),y.ref=pr(h,null,m),y.return=h,y;case bn:return m=Bo(m,h.mode,y),m.return=h,m;case kt:var S=m._init;return f(h,S(m._payload),y)}if(vr(m)||lr(m))return m=ln(m,h.mode,y,null),m.return=h,m;_s(h,m)}return null}function p(h,m,y,S){var k=m!==null?m.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return k!==null?null:a(h,m,""+y,S);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Ps:return y.key===k?l(h,m,y,S):null;case bn:return y.key===k?u(h,m,y,S):null;case kt:return k=y._init,p(h,m,k(y._payload),S)}if(vr(y)||lr(y))return k!==null?null:c(h,m,y,S,null);_s(h,y)}return null}function g(h,m,y,S,k){if(typeof S=="string"&&S!==""||typeof S=="number")return h=h.get(y)||null,a(m,h,""+S,k);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Ps:return h=h.get(S.key===null?y:S.key)||null,l(m,h,S,k);case bn:return h=h.get(S.key===null?y:S.key)||null,u(m,h,S,k);case kt:var C=S._init;return g(h,m,y,C(S._payload),k)}if(vr(S)||lr(S))return h=h.get(y)||null,c(m,h,S,k,null);_s(m,S)}return null}function v(h,m,y,S){for(var k=null,C=null,E=m,P=m=0,D=null;E!==null&&P<y.length;P++){E.index>P?(D=E,E=null):D=E.sibling;var A=p(h,E,y[P],S);if(A===null){E===null&&(E=D);break}e&&E&&A.alternate===null&&t(h,E),m=i(A,m,P),C===null?k=A:C.sibling=A,C=A,E=D}if(P===y.length)return n(h,E),$&&Jt(h,P),k;if(E===null){for(;P<y.length;P++)E=f(h,y[P],S),E!==null&&(m=i(E,m,P),C===null?k=E:C.sibling=E,C=E);return $&&Jt(h,P),k}for(E=r(h,E);P<y.length;P++)D=g(E,h,P,y[P],S),D!==null&&(e&&D.alternate!==null&&E.delete(D.key===null?P:D.key),m=i(D,m,P),C===null?k=D:C.sibling=D,C=D);return e&&E.forEach(function(ee){return t(h,ee)}),$&&Jt(h,P),k}function w(h,m,y,S){var k=lr(y);if(typeof k!="function")throw Error(T(150));if(y=k.call(y),y==null)throw Error(T(151));for(var C=k=null,E=m,P=m=0,D=null,A=y.next();E!==null&&!A.done;P++,A=y.next()){E.index>P?(D=E,E=null):D=E.sibling;var ee=p(h,E,A.value,S);if(ee===null){E===null&&(E=D);break}e&&E&&ee.alternate===null&&t(h,E),m=i(ee,m,P),C===null?k=ee:C.sibling=ee,C=ee,E=D}if(A.done)return n(h,E),$&&Jt(h,P),k;if(E===null){for(;!A.done;P++,A=y.next())A=f(h,A.value,S),A!==null&&(m=i(A,m,P),C===null?k=A:C.sibling=A,C=A);return $&&Jt(h,P),k}for(E=r(h,E);!A.done;P++,A=y.next())A=g(E,h,P,A.value,S),A!==null&&(e&&A.alternate!==null&&E.delete(A.key===null?P:A.key),m=i(A,m,P),C===null?k=A:C.sibling=A,C=A);return e&&E.forEach(function(wt){return t(h,wt)}),$&&Jt(h,P),k}function b(h,m,y,S){if(typeof y=="object"&&y!==null&&y.type===Sn&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Ps:e:{for(var k=y.key,C=m;C!==null;){if(C.key===k){if(k=y.type,k===Sn){if(C.tag===7){n(h,C.sibling),m=s(C,y.props.children),m.return=h,h=m;break e}}else if(C.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===kt&&Ac(k)===C.type){n(h,C.sibling),m=s(C,y.props),m.ref=pr(h,C,y),m.return=h,h=m;break e}n(h,C);break}else t(h,C);C=C.sibling}y.type===Sn?(m=ln(y.props.children,h.mode,S,y.key),m.return=h,h=m):(S=ni(y.type,y.key,y.props,null,h.mode,S),S.ref=pr(h,m,y),S.return=h,h=S)}return o(h);case bn:e:{for(C=y.key;m!==null;){if(m.key===C)if(m.tag===4&&m.stateNode.containerInfo===y.containerInfo&&m.stateNode.implementation===y.implementation){n(h,m.sibling),m=s(m,y.children||[]),m.return=h,h=m;break e}else{n(h,m);break}else t(h,m);m=m.sibling}m=Bo(y,h.mode,S),m.return=h,h=m}return o(h);case kt:return C=y._init,b(h,m,C(y._payload),S)}if(vr(y))return v(h,m,y,S);if(lr(y))return w(h,m,y,S);_s(h,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,m!==null&&m.tag===6?(n(h,m.sibling),m=s(m,y),m.return=h,h=m):(n(h,m),m=Io(y,h.mode,S),m.return=h,h=m),o(h)):n(h,m)}return b}var Gn=Gp(!0),Xp=Gp(!1),xi=Wt(null),wi=null,An=null,Il=null;function Bl(){Il=An=wi=null}function Ul(e){var t=xi.current;U(xi),e._currentValue=t}function La(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function zn(e,t){wi=e,Il=An=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ke=!0),e.firstContext=null)}function ze(e){var t=e._currentValue;if(Il!==e)if(e={context:e,memoizedValue:t,next:null},An===null){if(wi===null)throw Error(T(308));An=e,wi.dependencies={lanes:0,firstContext:e}}else An=An.next=e;return t}var rn=null;function zl(e){rn===null?rn=[e]:rn.push(e)}function Qp(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,zl(t)):(n.next=s.next,s.next=n),t.interleaved=n,mt(e,r)}function mt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Ct=!1;function $l(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Yp(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 ct(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ft(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,_&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,mt(e,n)}return s=r.interleaved,s===null?(t.next=t,zl(r)):(t.next=s.next,s.next=t),r.interleaved=t,mt(e,n)}function Ys(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,jl(e,n)}}function Rc(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function bi(e,t,n,r){var s=e.updateQueue;Ct=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?i=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(i!==null){var f=s.baseState;o=0,c=u=l=null,a=i;do{var p=a.lane,g=a.eventTime;if((r&p)===p){c!==null&&(c=c.next={eventTime:g,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=e,w=a;switch(p=t,g=n,w.tag){case 1:if(v=w.payload,typeof v=="function"){f=v.call(g,f,p);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=w.payload,p=typeof v=="function"?v.call(g,f,p):v,p==null)break e;f=G({},f,p);break e;case 2:Ct=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,p=s.effects,p===null?s.effects=[a]:p.push(a))}else g={eventTime:g,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=g,l=f):c=c.next=g,o|=p;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;p=a,a=p.next,p.next=null,s.lastBaseUpdate=p,s.shared.pending=null}}while(!0);if(c===null&&(l=f),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=c,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);pn|=o,e.lanes=o,e.memoizedState=f}}function Lc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(T(191,s));s.call(r)}}}var fs={},rt=Wt(fs),Qr=Wt(fs),Yr=Wt(fs);function sn(e){if(e===fs)throw Error(T(174));return e}function Wl(e,t){switch(I(Yr,t),I(Qr,e),I(rt,fs),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:fa(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=fa(t,e)}U(rt),I(rt,t)}function Xn(){U(rt),U(Qr),U(Yr)}function Zp(e){sn(Yr.current);var t=sn(rt.current),n=fa(t,e.type);t!==n&&(I(Qr,e),I(rt,n))}function Kl(e){Qr.current===e&&(U(rt),U(Qr))}var W=Wt(0);function Si(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Do=[];function Hl(){for(var e=0;e<Do.length;e++)Do[e]._workInProgressVersionPrimary=null;Do.length=0}var Zs=xt.ReactCurrentDispatcher,Fo=xt.ReactCurrentBatchConfig,fn=0,H=null,re=null,oe=null,ki=!1,Ar=!1,Zr=0,_y=0;function fe(){throw Error(T(321))}function Gl(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ze(e[n],t[n]))return!1;return!0}function Xl(e,t,n,r,s,i){if(fn=i,H=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Zs.current=e===null||e.memoizedState===null?By:Uy,e=n(r,s),Ar){i=0;do{if(Ar=!1,Zr=0,25<=i)throw Error(T(301));i+=1,oe=re=null,t.updateQueue=null,Zs.current=zy,e=n(r,s)}while(Ar)}if(Zs.current=Ci,t=re!==null&&re.next!==null,fn=0,oe=re=H=null,ki=!1,t)throw Error(T(300));return e}function Ql(){var e=Zr!==0;return Zr=0,e}function et(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return oe===null?H.memoizedState=oe=e:oe=oe.next=e,oe}function $e(){if(re===null){var e=H.alternate;e=e!==null?e.memoizedState:null}else e=re.next;var t=oe===null?H.memoizedState:oe.next;if(t!==null)oe=t,re=e;else{if(e===null)throw Error(T(310));re=e,e={memoizedState:re.memoizedState,baseState:re.baseState,baseQueue:re.baseQueue,queue:re.queue,next:null},oe===null?H.memoizedState=oe=e:oe=oe.next=e}return oe}function Jr(e,t){return typeof t=="function"?t(e):t}function Mo(e){var t=$e(),n=t.queue;if(n===null)throw Error(T(311));n.lastRenderedReducer=e;var r=re,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var a=o=null,l=null,u=i;do{var c=u.lane;if((fn&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=f,o=r):l=l.next=f,H.lanes|=c,pn|=c}u=u.next}while(u!==null&&u!==i);l===null?o=r:l.next=a,Ze(r,t.memoizedState)||(ke=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,H.lanes|=i,pn|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function _o(e){var t=$e(),n=t.queue;if(n===null)throw Error(T(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);Ze(i,t.memoizedState)||(ke=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Jp(){}function qp(e,t){var n=H,r=$e(),s=t(),i=!Ze(r.memoizedState,s);if(i&&(r.memoizedState=s,ke=!0),r=r.queue,Yl(nh.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||oe!==null&&oe.memoizedState.tag&1){if(n.flags|=2048,qr(9,th.bind(null,n,r,s,t),void 0,null),ae===null)throw Error(T(349));fn&30||eh(n,t,s)}return s}function eh(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=H.updateQueue,t===null?(t={lastEffect:null,stores:null},H.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function th(e,t,n,r){t.value=n,t.getSnapshot=r,rh(t)&&sh(e)}function nh(e,t,n){return n(function(){rh(t)&&sh(e)})}function rh(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ze(e,n)}catch{return!0}}function sh(e){var t=mt(e,1);t!==null&&Ye(t,e,1,-1)}function Dc(e){var t=et();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Jr,lastRenderedState:e},t.queue=e,e=e.dispatch=Iy.bind(null,H,e),[t.memoizedState,e]}function qr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=H.updateQueue,t===null?(t={lastEffect:null,stores:null},H.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function ih(){return $e().memoizedState}function Js(e,t,n,r){var s=et();H.flags|=e,s.memoizedState=qr(1|t,n,void 0,r===void 0?null:r)}function Hi(e,t,n,r){var s=$e();r=r===void 0?null:r;var i=void 0;if(re!==null){var o=re.memoizedState;if(i=o.destroy,r!==null&&Gl(r,o.deps)){s.memoizedState=qr(t,n,i,r);return}}H.flags|=e,s.memoizedState=qr(1|t,n,i,r)}function Fc(e,t){return Js(8390656,8,e,t)}function Yl(e,t){return Hi(2048,8,e,t)}function oh(e,t){return Hi(4,2,e,t)}function ah(e,t){return Hi(4,4,e,t)}function lh(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function uh(e,t,n){return n=n!=null?n.concat([e]):null,Hi(4,4,lh.bind(null,t,e),n)}function Zl(){}function ch(e,t){var n=$e();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Gl(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function dh(e,t){var n=$e();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Gl(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function fh(e,t,n){return fn&21?(Ze(n,t)||(n=yp(),H.lanes|=n,pn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ke=!0),e.memoizedState=n)}function Vy(e,t){var n=V;V=n!==0&&4>n?n:4,e(!0);var r=Fo.transition;Fo.transition={};try{e(!1),t()}finally{V=n,Fo.transition=r}}function ph(){return $e().memoizedState}function Oy(e,t,n){var r=_t(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},hh(e))mh(t,n);else if(n=Qp(e,t,n,r),n!==null){var s=xe();Ye(n,e,r,s),gh(n,t,r)}}function Iy(e,t,n){var r=_t(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(hh(e))mh(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,Ze(a,o)){var l=t.interleaved;l===null?(s.next=s,zl(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=Qp(e,t,s,r),n!==null&&(s=xe(),Ye(n,e,r,s),gh(n,t,r))}}function hh(e){var t=e.alternate;return e===H||t!==null&&t===H}function mh(e,t){Ar=ki=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gh(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,jl(e,n)}}var Ci={readContext:ze,useCallback:fe,useContext:fe,useEffect:fe,useImperativeHandle:fe,useInsertionEffect:fe,useLayoutEffect:fe,useMemo:fe,useReducer:fe,useRef:fe,useState:fe,useDebugValue:fe,useDeferredValue:fe,useTransition:fe,useMutableSource:fe,useSyncExternalStore:fe,useId:fe,unstable_isNewReconciler:!1},By={readContext:ze,useCallback:function(e,t){return et().memoizedState=[e,t===void 0?null:t],e},useContext:ze,useEffect:Fc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Js(4194308,4,lh.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Js(4194308,4,e,t)},useInsertionEffect:function(e,t){return Js(4,2,e,t)},useMemo:function(e,t){var n=et();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=et();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Oy.bind(null,H,e),[r.memoizedState,e]},useRef:function(e){var t=et();return e={current:e},t.memoizedState=e},useState:Dc,useDebugValue:Zl,useDeferredValue:function(e){return et().memoizedState=e},useTransition:function(){var e=Dc(!1),t=e[0];return e=Vy.bind(null,e[1]),et().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=H,s=et();if($){if(n===void 0)throw Error(T(407));n=n()}else{if(n=t(),ae===null)throw Error(T(349));fn&30||eh(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,Fc(nh.bind(null,r,i,e),[e]),r.flags|=2048,qr(9,th.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=et(),t=ae.identifierPrefix;if($){var n=ut,r=lt;n=(r&~(1<<32-Qe(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Zr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=_y++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Uy={readContext:ze,useCallback:ch,useContext:ze,useEffect:Yl,useImperativeHandle:uh,useInsertionEffect:oh,useLayoutEffect:ah,useMemo:dh,useReducer:Mo,useRef:ih,useState:function(){return Mo(Jr)},useDebugValue:Zl,useDeferredValue:function(e){var t=$e();return fh(t,re.memoizedState,e)},useTransition:function(){var e=Mo(Jr)[0],t=$e().memoizedState;return[e,t]},useMutableSource:Jp,useSyncExternalStore:qp,useId:ph,unstable_isNewReconciler:!1},zy={readContext:ze,useCallback:ch,useContext:ze,useEffect:Yl,useImperativeHandle:uh,useInsertionEffect:oh,useLayoutEffect:ah,useMemo:dh,useReducer:_o,useRef:ih,useState:function(){return _o(Jr)},useDebugValue:Zl,useDeferredValue:function(e){var t=$e();return re===null?t.memoizedState=e:fh(t,re.memoizedState,e)},useTransition:function(){var e=_o(Jr)[0],t=$e().memoizedState;return[e,t]},useMutableSource:Jp,useSyncExternalStore:qp,useId:ph,unstable_isNewReconciler:!1};function He(e,t){if(e&&e.defaultProps){t=G({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Da(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:G({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Gi={isMounted:function(e){return(e=e._reactInternals)?gn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=xe(),s=_t(e),i=ct(r,s);i.payload=t,n!=null&&(i.callback=n),t=Ft(e,i,s),t!==null&&(Ye(t,e,s,r),Ys(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=xe(),s=_t(e),i=ct(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ft(e,i,s),t!==null&&(Ye(t,e,s,r),Ys(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=xe(),r=_t(e),s=ct(n,r);s.tag=2,t!=null&&(s.callback=t),t=Ft(e,s,r),t!==null&&(Ye(t,e,r,n),Ys(t,e,r))}};function Mc(e,t,n,r,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,o):t.prototype&&t.prototype.isPureReactComponent?!Kr(n,r)||!Kr(s,i):!0}function yh(e,t,n){var r=!1,s=Bt,i=t.contextType;return typeof i=="object"&&i!==null?i=ze(i):(s=Pe(t)?cn:ye.current,r=t.contextTypes,i=(r=r!=null)?Kn(e,s):Bt),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Gi,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function _c(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Gi.enqueueReplaceState(t,t.state,null)}function Fa(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},$l(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=ze(i):(i=Pe(t)?cn:ye.current,s.context=Kn(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Da(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Gi.enqueueReplaceState(s,s.state,null),bi(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Qn(e,t){try{var n="",r=t;do n+=g0(r),r=r.return;while(r);var s=n}catch(i){s=`
|
||
Error generating stack: `+i.message+`
|
||
`+i.stack}return{value:e,source:t,stack:s,digest:null}}function Vo(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ma(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var $y=typeof WeakMap=="function"?WeakMap:Map;function vh(e,t,n){n=ct(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ei||(Ei=!0,Ka=r),Ma(e,t)},n}function xh(e,t,n){n=ct(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Ma(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Ma(e,t),typeof r!="function"&&(Mt===null?Mt=new Set([this]):Mt.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Vc(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new $y;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=rv.bind(null,e,t,n),t.then(e,e))}function Oc(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Ic(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=ct(-1,1),t.tag=2,Ft(n,t,1))),n.lanes|=1),e)}var Wy=xt.ReactCurrentOwner,ke=!1;function ve(e,t,n,r){t.child=e===null?Xp(t,null,n,r):Gn(t,e.child,n,r)}function Bc(e,t,n,r,s){n=n.render;var i=t.ref;return zn(t,s),r=Xl(e,t,n,r,i,s),n=Ql(),e!==null&&!ke?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,gt(e,t,s)):($&&n&&_l(t),t.flags|=1,ve(e,t,r,s),t.child)}function Uc(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!iu(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,wh(e,t,i,r,s)):(e=ni(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:Kr,n(o,r)&&e.ref===t.ref)return gt(e,t,s)}return t.flags|=1,e=Vt(i,r),e.ref=t.ref,e.return=t,t.child=e}function wh(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(Kr(i,r)&&e.ref===t.ref)if(ke=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(ke=!0);else return t.lanes=e.lanes,gt(e,t,s)}return _a(e,t,n,r,s)}function bh(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},I(Ln,Te),Te|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,I(Ln,Te),Te|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,I(Ln,Te),Te|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,I(Ln,Te),Te|=r;return ve(e,t,s,n),t.child}function Sh(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function _a(e,t,n,r,s){var i=Pe(n)?cn:ye.current;return i=Kn(t,i),zn(t,s),n=Xl(e,t,n,r,i,s),r=Ql(),e!==null&&!ke?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,gt(e,t,s)):($&&r&&_l(t),t.flags|=1,ve(e,t,n,s),t.child)}function zc(e,t,n,r,s){if(Pe(n)){var i=!0;gi(t)}else i=!1;if(zn(t,s),t.stateNode===null)qs(e,t),yh(t,n,r),Fa(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=ze(u):(u=Pe(n)?cn:ye.current,u=Kn(t,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&_c(t,o,r,u),Ct=!1;var p=t.memoizedState;o.state=p,bi(t,r,o,s),l=t.memoizedState,a!==r||p!==l||Ce.current||Ct?(typeof c=="function"&&(Da(t,n,c,r),l=t.memoizedState),(a=Ct||Mc(t,n,a,r,p,l,u))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Yp(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:He(t.type,a),o.props=u,f=t.pendingProps,p=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=ze(l):(l=Pe(n)?cn:ye.current,l=Kn(t,l));var g=n.getDerivedStateFromProps;(c=typeof g=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==f||p!==l)&&_c(t,o,r,l),Ct=!1,p=t.memoizedState,o.state=p,bi(t,r,o,s);var v=t.memoizedState;a!==f||p!==v||Ce.current||Ct?(typeof g=="function"&&(Da(t,n,g,r),v=t.memoizedState),(u=Ct||Mc(t,n,u,r,p,v,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,v,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,v,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),o.props=r,o.state=v,o.context=l,r=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Va(e,t,n,r,i,s)}function Va(e,t,n,r,s,i){Sh(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&Tc(t,n,!1),gt(e,t,i);r=t.stateNode,Wy.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Gn(t,e.child,null,i),t.child=Gn(t,null,a,i)):ve(e,t,a,i),t.memoizedState=r.state,s&&Tc(t,n,!0),t.child}function kh(e){var t=e.stateNode;t.pendingContext?Ec(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ec(e,t.context,!1),Wl(e,t.containerInfo)}function $c(e,t,n,r,s){return Hn(),Ol(s),t.flags|=256,ve(e,t,n,r),t.child}var Oa={dehydrated:null,treeContext:null,retryLane:0};function Ia(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ch(e,t,n){var r=t.pendingProps,s=W.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),I(W,s&1),e===null)return Ra(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=Yi(o,r,0,null),e=ln(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Ia(n),t.memoizedState=Oa,e):Jl(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return Ky(e,t,o,r,a,s,n);if(i){i=r.fallback,o=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Vt(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=Vt(a,i):(i=ln(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?Ia(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=Oa,r}return i=e.child,e=i.sibling,r=Vt(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Jl(e,t){return t=Yi({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Vs(e,t,n,r){return r!==null&&Ol(r),Gn(t,e.child,null,n),e=Jl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ky(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=Vo(Error(T(422))),Vs(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=Yi({mode:"visible",children:r.children},s,0,null),i=ln(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Gn(t,e.child,null,o),t.child.memoizedState=Ia(o),t.memoizedState=Oa,i);if(!(t.mode&1))return Vs(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(T(419)),r=Vo(i,r,void 0),Vs(e,t,o,r)}if(a=(o&e.childLanes)!==0,ke||a){if(r=ae,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=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:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,mt(e,s),Ye(r,e,s,-1))}return su(),r=Vo(Error(T(421))),Vs(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=sv.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,je=Dt(s.nextSibling),Ne=t,$=!0,Xe=null,e!==null&&(Oe[Ie++]=lt,Oe[Ie++]=ut,Oe[Ie++]=dn,lt=e.id,ut=e.overflow,dn=t),t=Jl(t,r.children),t.flags|=4096,t)}function Wc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),La(e.return,t,n)}function Oo(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function Ph(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(ve(e,t,r.children,n),r=W.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Wc(e,n,t);else if(e.tag===19)Wc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(I(W,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Si(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Oo(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Si(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Oo(t,!0,n,null,i);break;case"together":Oo(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function qs(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function gt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),pn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(T(153));if(t.child!==null){for(e=t.child,n=Vt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Vt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Hy(e,t,n){switch(t.tag){case 3:kh(t),Hn();break;case 5:Zp(t);break;case 1:Pe(t.type)&&gi(t);break;case 4:Wl(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;I(xi,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(I(W,W.current&1),t.flags|=128,null):n&t.child.childLanes?Ch(e,t,n):(I(W,W.current&1),e=gt(e,t,n),e!==null?e.sibling:null);I(W,W.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Ph(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),I(W,W.current),r)break;return null;case 22:case 23:return t.lanes=0,bh(e,t,n)}return gt(e,t,n)}var Eh,Ba,Th,jh;Eh=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Ba=function(){};Th=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,sn(rt.current);var i=null;switch(n){case"input":s=la(e,s),r=la(e,r),i=[];break;case"select":s=G({},s,{value:void 0}),r=G({},r,{value:void 0}),i=[];break;case"textarea":s=da(e,s),r=da(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=hi)}pa(n,r);var o;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Or.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var l=r[u];if(a=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(i||(i=[]),i.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Or.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&B("scroll",e),i||a===l||(i=[])):(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};jh=function(e,t,n,r){n!==r&&(t.flags|=4)};function hr(e,t){if(!$)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function pe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Gy(e,t,n){var r=t.pendingProps;switch(Vl(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pe(t),null;case 1:return Pe(t.type)&&mi(),pe(t),null;case 3:return r=t.stateNode,Xn(),U(Ce),U(ye),Hl(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ms(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Xe!==null&&(Xa(Xe),Xe=null))),Ba(e,t),pe(t),null;case 5:Kl(t);var s=sn(Yr.current);if(n=t.type,e!==null&&t.stateNode!=null)Th(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(T(166));return pe(t),null}if(e=sn(rt.current),Ms(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[tt]=t,r[Xr]=i,e=(t.mode&1)!==0,n){case"dialog":B("cancel",r),B("close",r);break;case"iframe":case"object":case"embed":B("load",r);break;case"video":case"audio":for(s=0;s<wr.length;s++)B(wr[s],r);break;case"source":B("error",r);break;case"img":case"image":case"link":B("error",r),B("load",r);break;case"details":B("toggle",r);break;case"input":qu(r,i),B("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},B("invalid",r);break;case"textarea":tc(r,i),B("invalid",r)}pa(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];o==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&Fs(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&Fs(r.textContent,a,e),s=["children",""+a]):Or.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&B("scroll",r)}switch(n){case"input":Es(r),ec(r,i,!0);break;case"textarea":Es(r),nc(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=hi)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=np(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[tt]=t,e[Xr]=r,Eh(e,t,!1,!1),t.stateNode=e;e:{switch(o=ha(n,r),n){case"dialog":B("cancel",e),B("close",e),s=r;break;case"iframe":case"object":case"embed":B("load",e),s=r;break;case"video":case"audio":for(s=0;s<wr.length;s++)B(wr[s],e);s=r;break;case"source":B("error",e),s=r;break;case"img":case"image":case"link":B("error",e),B("load",e),s=r;break;case"details":B("toggle",e),s=r;break;case"input":qu(e,r),s=la(e,r),B("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=G({},r,{value:void 0}),B("invalid",e);break;case"textarea":tc(e,r),s=da(e,r),B("invalid",e);break;default:s=r}pa(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?ip(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&rp(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Ir(e,l):typeof l=="number"&&Ir(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Or.hasOwnProperty(i)?l!=null&&i==="onScroll"&&B("scroll",e):l!=null&&Sl(e,i,l,o))}switch(n){case"input":Es(e),ec(e,r,!1);break;case"textarea":Es(e),nc(e);break;case"option":r.value!=null&&e.setAttribute("value",""+It(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?On(e,!!r.multiple,i,!1):r.defaultValue!=null&&On(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=hi)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return pe(t),null;case 6:if(e&&t.stateNode!=null)jh(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(T(166));if(n=sn(Yr.current),sn(rt.current),Ms(t)){if(r=t.stateNode,n=t.memoizedProps,r[tt]=t,(i=r.nodeValue!==n)&&(e=Ne,e!==null))switch(e.tag){case 3:Fs(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Fs(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[tt]=t,t.stateNode=r}return pe(t),null;case 13:if(U(W),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if($&&je!==null&&t.mode&1&&!(t.flags&128))Hp(),Hn(),t.flags|=98560,i=!1;else if(i=Ms(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(T(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(T(317));i[tt]=t}else Hn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;pe(t),i=!1}else Xe!==null&&(Xa(Xe),Xe=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||W.current&1?se===0&&(se=3):su())),t.updateQueue!==null&&(t.flags|=4),pe(t),null);case 4:return Xn(),Ba(e,t),e===null&&Hr(t.stateNode.containerInfo),pe(t),null;case 10:return Ul(t.type._context),pe(t),null;case 17:return Pe(t.type)&&mi(),pe(t),null;case 19:if(U(W),i=t.memoizedState,i===null)return pe(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)hr(i,!1);else{if(se!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Si(e),o!==null){for(t.flags|=128,hr(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(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=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return I(W,W.current&1|2),t.child}e=e.sibling}i.tail!==null&&q()>Yn&&(t.flags|=128,r=!0,hr(i,!1),t.lanes=4194304)}else{if(!r)if(e=Si(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),hr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!$)return pe(t),null}else 2*q()-i.renderingStartTime>Yn&&n!==1073741824&&(t.flags|=128,r=!0,hr(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=q(),t.sibling=null,n=W.current,I(W,r?n&1|2:n&1),t):(pe(t),null);case 22:case 23:return ru(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Te&1073741824&&(pe(t),t.subtreeFlags&6&&(t.flags|=8192)):pe(t),null;case 24:return null;case 25:return null}throw Error(T(156,t.tag))}function Xy(e,t){switch(Vl(t),t.tag){case 1:return Pe(t.type)&&mi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xn(),U(Ce),U(ye),Hl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Kl(t),null;case 13:if(U(W),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(T(340));Hn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return U(W),null;case 4:return Xn(),null;case 10:return Ul(t.type._context),null;case 22:case 23:return ru(),null;case 24:return null;default:return null}}var Os=!1,me=!1,Qy=typeof WeakSet=="function"?WeakSet:Set,N=null;function Rn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Q(e,t,r)}else n.current=null}function Ua(e,t,n){try{n()}catch(r){Q(e,t,r)}}var Kc=!1;function Yy(e,t){if(Ca=di,e=Dp(),Ml(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,c=0,f=e,p=null;t:for(;;){for(var g;f!==n||s!==0&&f.nodeType!==3||(a=o+s),f!==i||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(g=f.firstChild)!==null;)p=f,f=g;for(;;){if(f===e)break t;if(p===n&&++u===s&&(a=o),p===i&&++c===r&&(l=o),(g=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=g}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Pa={focusedElem:e,selectionRange:n},di=!1,N=t;N!==null;)if(t=N,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,N=e;else for(;N!==null;){t=N;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var w=v.memoizedProps,b=v.memoizedState,h=t.stateNode,m=h.getSnapshotBeforeUpdate(t.elementType===t.type?w:He(t.type,w),b);h.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(T(163))}}catch(S){Q(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,N=e;break}N=t.return}return v=Kc,Kc=!1,v}function Rr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&Ua(t,n,i)}s=s.next}while(s!==r)}}function Xi(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function za(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Nh(e){var t=e.alternate;t!==null&&(e.alternate=null,Nh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[tt],delete t[Xr],delete t[ja],delete t[Ly],delete t[Dy])),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 Ah(e){return e.tag===5||e.tag===3||e.tag===4}function Hc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ah(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function $a(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=hi));else if(r!==4&&(e=e.child,e!==null))for($a(e,t,n),e=e.sibling;e!==null;)$a(e,t,n),e=e.sibling}function Wa(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Wa(e,t,n),e=e.sibling;e!==null;)Wa(e,t,n),e=e.sibling}var le=null,Ge=!1;function bt(e,t,n){for(n=n.child;n!==null;)Rh(e,t,n),n=n.sibling}function Rh(e,t,n){if(nt&&typeof nt.onCommitFiberUnmount=="function")try{nt.onCommitFiberUnmount(Bi,n)}catch{}switch(n.tag){case 5:me||Rn(n,t);case 6:var r=le,s=Ge;le=null,bt(e,t,n),le=r,Ge=s,le!==null&&(Ge?(e=le,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):le.removeChild(n.stateNode));break;case 18:le!==null&&(Ge?(e=le,n=n.stateNode,e.nodeType===8?Ro(e.parentNode,n):e.nodeType===1&&Ro(e,n),$r(e)):Ro(le,n.stateNode));break;case 4:r=le,s=Ge,le=n.stateNode.containerInfo,Ge=!0,bt(e,t,n),le=r,Ge=s;break;case 0:case 11:case 14:case 15:if(!me&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Ua(n,t,o),s=s.next}while(s!==r)}bt(e,t,n);break;case 1:if(!me&&(Rn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Q(n,t,a)}bt(e,t,n);break;case 21:bt(e,t,n);break;case 22:n.mode&1?(me=(r=me)||n.memoizedState!==null,bt(e,t,n),me=r):bt(e,t,n);break;default:bt(e,t,n)}}function Gc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Qy),t.forEach(function(r){var s=iv.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function We(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:le=a.stateNode,Ge=!1;break e;case 3:le=a.stateNode.containerInfo,Ge=!0;break e;case 4:le=a.stateNode.containerInfo,Ge=!0;break e}a=a.return}if(le===null)throw Error(T(160));Rh(i,o,s),le=null,Ge=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){Q(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Lh(t,e),t=t.sibling}function Lh(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(We(t,e),qe(e),r&4){try{Rr(3,e,e.return),Xi(3,e)}catch(w){Q(e,e.return,w)}try{Rr(5,e,e.return)}catch(w){Q(e,e.return,w)}}break;case 1:We(t,e),qe(e),r&512&&n!==null&&Rn(n,n.return);break;case 5:if(We(t,e),qe(e),r&512&&n!==null&&Rn(n,n.return),e.flags&32){var s=e.stateNode;try{Ir(s,"")}catch(w){Q(e,e.return,w)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&ep(s,i),ha(a,o);var u=ha(a,i);for(o=0;o<l.length;o+=2){var c=l[o],f=l[o+1];c==="style"?ip(s,f):c==="dangerouslySetInnerHTML"?rp(s,f):c==="children"?Ir(s,f):Sl(s,c,f,u)}switch(a){case"input":ua(s,i);break;case"textarea":tp(s,i);break;case"select":var p=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var g=i.value;g!=null?On(s,!!i.multiple,g,!1):p!==!!i.multiple&&(i.defaultValue!=null?On(s,!!i.multiple,i.defaultValue,!0):On(s,!!i.multiple,i.multiple?[]:"",!1))}s[Xr]=i}catch(w){Q(e,e.return,w)}}break;case 6:if(We(t,e),qe(e),r&4){if(e.stateNode===null)throw Error(T(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(w){Q(e,e.return,w)}}break;case 3:if(We(t,e),qe(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{$r(t.containerInfo)}catch(w){Q(e,e.return,w)}break;case 4:We(t,e),qe(e);break;case 13:We(t,e),qe(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(tu=q())),r&4&&Gc(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(me=(u=me)||c,We(t,e),me=u):We(t,e),qe(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(N=e,c=e.child;c!==null;){for(f=N=c;N!==null;){switch(p=N,g=p.child,p.tag){case 0:case 11:case 14:case 15:Rr(4,p,p.return);break;case 1:Rn(p,p.return);var v=p.stateNode;if(typeof v.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(w){Q(r,n,w)}}break;case 5:Rn(p,p.return);break;case 22:if(p.memoizedState!==null){Qc(f);continue}}g!==null?(g.return=p,N=g):Qc(f)}c=c.sibling}e:for(c=null,f=e;;){if(f.tag===5){if(c===null){c=f;try{s=f.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=f.stateNode,l=f.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=sp("display",o))}catch(w){Q(e,e.return,w)}}}else if(f.tag===6){if(c===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(w){Q(e,e.return,w)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;c===f&&(c=null),f=f.return}c===f&&(c=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:We(t,e),qe(e),r&4&&Gc(e);break;case 21:break;default:We(t,e),qe(e)}}function qe(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Ah(n)){var r=n;break e}n=n.return}throw Error(T(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Ir(s,""),r.flags&=-33);var i=Hc(e);Wa(e,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Hc(e);$a(e,a,o);break;default:throw Error(T(161))}}catch(l){Q(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Zy(e,t,n){N=e,Dh(e)}function Dh(e,t,n){for(var r=(e.mode&1)!==0;N!==null;){var s=N,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||Os;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||me;a=Os;var u=me;if(Os=o,(me=l)&&!u)for(N=s;N!==null;)o=N,l=o.child,o.tag===22&&o.memoizedState!==null?Yc(s):l!==null?(l.return=o,N=l):Yc(s);for(;i!==null;)N=i,Dh(i),i=i.sibling;N=s,Os=a,me=u}Xc(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,N=i):Xc(e)}}function Xc(e){for(;N!==null;){var t=N;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:me||Xi(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!me)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:He(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Lc(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Lc(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var f=c.dehydrated;f!==null&&$r(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(T(163))}me||t.flags&512&&za(t)}catch(p){Q(t,t.return,p)}}if(t===e){N=null;break}if(n=t.sibling,n!==null){n.return=t.return,N=n;break}N=t.return}}function Qc(e){for(;N!==null;){var t=N;if(t===e){N=null;break}var n=t.sibling;if(n!==null){n.return=t.return,N=n;break}N=t.return}}function Yc(e){for(;N!==null;){var t=N;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Xi(4,t)}catch(l){Q(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(l){Q(t,s,l)}}var i=t.return;try{za(t)}catch(l){Q(t,i,l)}break;case 5:var o=t.return;try{za(t)}catch(l){Q(t,o,l)}}}catch(l){Q(t,t.return,l)}if(t===e){N=null;break}var a=t.sibling;if(a!==null){a.return=t.return,N=a;break}N=t.return}}var Jy=Math.ceil,Pi=xt.ReactCurrentDispatcher,ql=xt.ReactCurrentOwner,Ue=xt.ReactCurrentBatchConfig,_=0,ae=null,te=null,ce=0,Te=0,Ln=Wt(0),se=0,es=null,pn=0,Qi=0,eu=0,Lr=null,Se=null,tu=0,Yn=1/0,ot=null,Ei=!1,Ka=null,Mt=null,Is=!1,jt=null,Ti=0,Dr=0,Ha=null,ei=-1,ti=0;function xe(){return _&6?q():ei!==-1?ei:ei=q()}function _t(e){return e.mode&1?_&2&&ce!==0?ce&-ce:My.transition!==null?(ti===0&&(ti=yp()),ti):(e=V,e!==0||(e=window.event,e=e===void 0?16:Cp(e.type)),e):1}function Ye(e,t,n,r){if(50<Dr)throw Dr=0,Ha=null,Error(T(185));us(e,n,r),(!(_&2)||e!==ae)&&(e===ae&&(!(_&2)&&(Qi|=n),se===4&&Et(e,ce)),Ee(e,r),n===1&&_===0&&!(t.mode&1)&&(Yn=q()+500,Ki&&Kt()))}function Ee(e,t){var n=e.callbackNode;M0(e,t);var r=ci(e,e===ae?ce:0);if(r===0)n!==null&&ic(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&ic(n),t===1)e.tag===0?Fy(Zc.bind(null,e)):$p(Zc.bind(null,e)),Ay(function(){!(_&6)&&Kt()}),n=null;else{switch(vp(r)){case 1:n=Tl;break;case 4:n=mp;break;case 16:n=ui;break;case 536870912:n=gp;break;default:n=ui}n=Uh(n,Fh.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Fh(e,t){if(ei=-1,ti=0,_&6)throw Error(T(327));var n=e.callbackNode;if($n()&&e.callbackNode!==n)return null;var r=ci(e,e===ae?ce:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=ji(e,r);else{t=r;var s=_;_|=2;var i=_h();(ae!==e||ce!==t)&&(ot=null,Yn=q()+500,an(e,t));do try{tv();break}catch(a){Mh(e,a)}while(!0);Bl(),Pi.current=i,_=s,te!==null?t=0:(ae=null,ce=0,t=se)}if(t!==0){if(t===2&&(s=xa(e),s!==0&&(r=s,t=Ga(e,s))),t===1)throw n=es,an(e,0),Et(e,r),Ee(e,q()),n;if(t===6)Et(e,r);else{if(s=e.current.alternate,!(r&30)&&!qy(s)&&(t=ji(e,r),t===2&&(i=xa(e),i!==0&&(r=i,t=Ga(e,i))),t===1))throw n=es,an(e,0),Et(e,r),Ee(e,q()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(T(345));case 2:qt(e,Se,ot);break;case 3:if(Et(e,r),(r&130023424)===r&&(t=tu+500-q(),10<t)){if(ci(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){xe(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Ta(qt.bind(null,e,Se,ot),t);break}qt(e,Se,ot);break;case 4:if(Et(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-Qe(r);i=1<<o,o=t[o],o>s&&(s=o),r&=~i}if(r=s,r=q()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Jy(r/1960))-r,10<r){e.timeoutHandle=Ta(qt.bind(null,e,Se,ot),r);break}qt(e,Se,ot);break;case 5:qt(e,Se,ot);break;default:throw Error(T(329))}}}return Ee(e,q()),e.callbackNode===n?Fh.bind(null,e):null}function Ga(e,t){var n=Lr;return e.current.memoizedState.isDehydrated&&(an(e,t).flags|=256),e=ji(e,t),e!==2&&(t=Se,Se=n,t!==null&&Xa(t)),e}function Xa(e){Se===null?Se=e:Se.push.apply(Se,e)}function qy(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!Ze(i(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Et(e,t){for(t&=~eu,t&=~Qi,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Qe(t),r=1<<n;e[n]=-1,t&=~r}}function Zc(e){if(_&6)throw Error(T(327));$n();var t=ci(e,0);if(!(t&1))return Ee(e,q()),null;var n=ji(e,t);if(e.tag!==0&&n===2){var r=xa(e);r!==0&&(t=r,n=Ga(e,r))}if(n===1)throw n=es,an(e,0),Et(e,t),Ee(e,q()),n;if(n===6)throw Error(T(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,qt(e,Se,ot),Ee(e,q()),null}function nu(e,t){var n=_;_|=1;try{return e(t)}finally{_=n,_===0&&(Yn=q()+500,Ki&&Kt())}}function hn(e){jt!==null&&jt.tag===0&&!(_&6)&&$n();var t=_;_|=1;var n=Ue.transition,r=V;try{if(Ue.transition=null,V=1,e)return e()}finally{V=r,Ue.transition=n,_=t,!(_&6)&&Kt()}}function ru(){Te=Ln.current,U(Ln)}function an(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Ny(n)),te!==null)for(n=te.return;n!==null;){var r=n;switch(Vl(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&mi();break;case 3:Xn(),U(Ce),U(ye),Hl();break;case 5:Kl(r);break;case 4:Xn();break;case 13:U(W);break;case 19:U(W);break;case 10:Ul(r.type._context);break;case 22:case 23:ru()}n=n.return}if(ae=e,te=e=Vt(e.current,null),ce=Te=t,se=0,es=null,eu=Qi=pn=0,Se=Lr=null,rn!==null){for(t=0;t<rn.length;t++)if(n=rn[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=s,r.next=o}n.pending=r}rn=null}return e}function Mh(e,t){do{var n=te;try{if(Bl(),Zs.current=Ci,ki){for(var r=H.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}ki=!1}if(fn=0,oe=re=H=null,Ar=!1,Zr=0,ql.current=null,n===null||n.return===null){se=1,es=t,te=null;break}e:{var i=e,o=n.return,a=n,l=t;if(t=ce,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,f=c.tag;if(!(c.mode&1)&&(f===0||f===11||f===15)){var p=c.alternate;p?(c.updateQueue=p.updateQueue,c.memoizedState=p.memoizedState,c.lanes=p.lanes):(c.updateQueue=null,c.memoizedState=null)}var g=Oc(o);if(g!==null){g.flags&=-257,Ic(g,o,a,i,t),g.mode&1&&Vc(i,u,t),t=g,l=u;var v=t.updateQueue;if(v===null){var w=new Set;w.add(l),t.updateQueue=w}else v.add(l);break e}else{if(!(t&1)){Vc(i,u,t),su();break e}l=Error(T(426))}}else if($&&a.mode&1){var b=Oc(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),Ic(b,o,a,i,t),Ol(Qn(l,a));break e}}i=l=Qn(l,a),se!==4&&(se=2),Lr===null?Lr=[i]:Lr.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var h=vh(i,l,t);Rc(i,h);break e;case 1:a=l;var m=i.type,y=i.stateNode;if(!(i.flags&128)&&(typeof m.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Mt===null||!Mt.has(y)))){i.flags|=65536,t&=-t,i.lanes|=t;var S=xh(i,a,t);Rc(i,S);break e}}i=i.return}while(i!==null)}Oh(n)}catch(k){t=k,te===n&&n!==null&&(te=n=n.return);continue}break}while(!0)}function _h(){var e=Pi.current;return Pi.current=Ci,e===null?Ci:e}function su(){(se===0||se===3||se===2)&&(se=4),ae===null||!(pn&268435455)&&!(Qi&268435455)||Et(ae,ce)}function ji(e,t){var n=_;_|=2;var r=_h();(ae!==e||ce!==t)&&(ot=null,an(e,t));do try{ev();break}catch(s){Mh(e,s)}while(!0);if(Bl(),_=n,Pi.current=r,te!==null)throw Error(T(261));return ae=null,ce=0,se}function ev(){for(;te!==null;)Vh(te)}function tv(){for(;te!==null&&!E0();)Vh(te)}function Vh(e){var t=Bh(e.alternate,e,Te);e.memoizedProps=e.pendingProps,t===null?Oh(e):te=t,ql.current=null}function Oh(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Xy(n,t),n!==null){n.flags&=32767,te=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{se=6,te=null;return}}else if(n=Gy(n,t,Te),n!==null){te=n;return}if(t=t.sibling,t!==null){te=t;return}te=t=e}while(t!==null);se===0&&(se=5)}function qt(e,t,n){var r=V,s=Ue.transition;try{Ue.transition=null,V=1,nv(e,t,n,r)}finally{Ue.transition=s,V=r}return null}function nv(e,t,n,r){do $n();while(jt!==null);if(_&6)throw Error(T(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(T(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(_0(e,i),e===ae&&(te=ae=null,ce=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Is||(Is=!0,Uh(ui,function(){return $n(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Ue.transition,Ue.transition=null;var o=V;V=1;var a=_;_|=4,ql.current=null,Yy(e,n),Lh(n,e),Sy(Pa),di=!!Ca,Pa=Ca=null,e.current=n,Zy(n),T0(),_=a,V=o,Ue.transition=i}else e.current=n;if(Is&&(Is=!1,jt=e,Ti=s),i=e.pendingLanes,i===0&&(Mt=null),A0(n.stateNode),Ee(e,q()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Ei)throw Ei=!1,e=Ka,Ka=null,e;return Ti&1&&e.tag!==0&&$n(),i=e.pendingLanes,i&1?e===Ha?Dr++:(Dr=0,Ha=e):Dr=0,Kt(),null}function $n(){if(jt!==null){var e=vp(Ti),t=Ue.transition,n=V;try{if(Ue.transition=null,V=16>e?16:e,jt===null)var r=!1;else{if(e=jt,jt=null,Ti=0,_&6)throw Error(T(331));var s=_;for(_|=4,N=e.current;N!==null;){var i=N,o=i.child;if(N.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(N=u;N!==null;){var c=N;switch(c.tag){case 0:case 11:case 15:Rr(8,c,i)}var f=c.child;if(f!==null)f.return=c,N=f;else for(;N!==null;){c=N;var p=c.sibling,g=c.return;if(Nh(c),c===u){N=null;break}if(p!==null){p.return=g,N=p;break}N=g}}}var v=i.alternate;if(v!==null){var w=v.child;if(w!==null){v.child=null;do{var b=w.sibling;w.sibling=null,w=b}while(w!==null)}}N=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,N=o;else e:for(;N!==null;){if(i=N,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Rr(9,i,i.return)}var h=i.sibling;if(h!==null){h.return=i.return,N=h;break e}N=i.return}}var m=e.current;for(N=m;N!==null;){o=N;var y=o.child;if(o.subtreeFlags&2064&&y!==null)y.return=o,N=y;else e:for(o=m;N!==null;){if(a=N,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Xi(9,a)}}catch(k){Q(a,a.return,k)}if(a===o){N=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,N=S;break e}N=a.return}}if(_=s,Kt(),nt&&typeof nt.onPostCommitFiberRoot=="function")try{nt.onPostCommitFiberRoot(Bi,e)}catch{}r=!0}return r}finally{V=n,Ue.transition=t}}return!1}function Jc(e,t,n){t=Qn(n,t),t=vh(e,t,1),e=Ft(e,t,1),t=xe(),e!==null&&(us(e,1,t),Ee(e,t))}function Q(e,t,n){if(e.tag===3)Jc(e,e,n);else for(;t!==null;){if(t.tag===3){Jc(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Mt===null||!Mt.has(r))){e=Qn(n,e),e=xh(t,e,1),t=Ft(t,e,1),e=xe(),t!==null&&(us(t,1,e),Ee(t,e));break}}t=t.return}}function rv(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=xe(),e.pingedLanes|=e.suspendedLanes&n,ae===e&&(ce&n)===n&&(se===4||se===3&&(ce&130023424)===ce&&500>q()-tu?an(e,0):eu|=n),Ee(e,t)}function Ih(e,t){t===0&&(e.mode&1?(t=Ns,Ns<<=1,!(Ns&130023424)&&(Ns=4194304)):t=1);var n=xe();e=mt(e,t),e!==null&&(us(e,t,n),Ee(e,n))}function sv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ih(e,n)}function iv(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(T(314))}r!==null&&r.delete(t),Ih(e,n)}var Bh;Bh=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ce.current)ke=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ke=!1,Hy(e,t,n);ke=!!(e.flags&131072)}else ke=!1,$&&t.flags&1048576&&Wp(t,vi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;qs(e,t),e=t.pendingProps;var s=Kn(t,ye.current);zn(t,n),s=Xl(null,t,r,e,s,n);var i=Ql();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Pe(r)?(i=!0,gi(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,$l(t),s.updater=Gi,t.stateNode=s,s._reactInternals=t,Fa(t,r,e,n),t=Va(null,t,r,!0,i,n)):(t.tag=0,$&&i&&_l(t),ve(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(qs(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=av(r),e=He(r,e),s){case 0:t=_a(null,t,r,e,n);break e;case 1:t=zc(null,t,r,e,n);break e;case 11:t=Bc(null,t,r,e,n);break e;case 14:t=Uc(null,t,r,He(r.type,e),n);break e}throw Error(T(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:He(r,s),_a(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:He(r,s),zc(e,t,r,s,n);case 3:e:{if(kh(t),e===null)throw Error(T(387));r=t.pendingProps,i=t.memoizedState,s=i.element,Yp(e,t),bi(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Qn(Error(T(423)),t),t=$c(e,t,r,n,s);break e}else if(r!==s){s=Qn(Error(T(424)),t),t=$c(e,t,r,n,s);break e}else for(je=Dt(t.stateNode.containerInfo.firstChild),Ne=t,$=!0,Xe=null,n=Xp(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Hn(),r===s){t=gt(e,t,n);break e}ve(e,t,r,n)}t=t.child}return t;case 5:return Zp(t),e===null&&Ra(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,Ea(r,s)?o=null:i!==null&&Ea(r,i)&&(t.flags|=32),Sh(e,t),ve(e,t,o,n),t.child;case 6:return e===null&&Ra(t),null;case 13:return Ch(e,t,n);case 4:return Wl(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Gn(t,null,r,n):ve(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:He(r,s),Bc(e,t,r,s,n);case 7:return ve(e,t,t.pendingProps,n),t.child;case 8:return ve(e,t,t.pendingProps.children,n),t.child;case 12:return ve(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,I(xi,r._currentValue),r._currentValue=o,i!==null)if(Ze(i.value,o)){if(i.children===s.children&&!Ce.current){t=gt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=ct(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),La(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(T(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),La(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}ve(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,zn(t,n),s=ze(s),r=r(s),t.flags|=1,ve(e,t,r,n),t.child;case 14:return r=t.type,s=He(r,t.pendingProps),s=He(r.type,s),Uc(e,t,r,s,n);case 15:return wh(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:He(r,s),qs(e,t),t.tag=1,Pe(r)?(e=!0,gi(t)):e=!1,zn(t,n),yh(t,r,s),Fa(t,r,s,n),Va(null,t,r,!0,e,n);case 19:return Ph(e,t,n);case 22:return bh(e,t,n)}throw Error(T(156,t.tag))};function Uh(e,t){return hp(e,t)}function ov(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 Be(e,t,n,r){return new ov(e,t,n,r)}function iu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function av(e){if(typeof e=="function")return iu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Cl)return 11;if(e===Pl)return 14}return 2}function Vt(e,t){var n=e.alternate;return n===null?(n=Be(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ni(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")iu(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Sn:return ln(n.children,s,i,t);case kl:o=8,s|=8;break;case sa:return e=Be(12,n,t,s|2),e.elementType=sa,e.lanes=i,e;case ia:return e=Be(13,n,t,s),e.elementType=ia,e.lanes=i,e;case oa:return e=Be(19,n,t,s),e.elementType=oa,e.lanes=i,e;case Zf:return Yi(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Qf:o=10;break e;case Yf:o=9;break e;case Cl:o=11;break e;case Pl:o=14;break e;case kt:o=16,r=null;break e}throw Error(T(130,e==null?e:typeof e,""))}return t=Be(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function ln(e,t,n,r){return e=Be(7,e,r,t),e.lanes=n,e}function Yi(e,t,n,r){return e=Be(22,e,r,t),e.elementType=Zf,e.lanes=n,e.stateNode={isHidden:!1},e}function Io(e,t,n){return e=Be(6,e,null,t),e.lanes=n,e}function Bo(e,t,n){return t=Be(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function lv(e,t,n,r,s){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=wo(0),this.expirationTimes=wo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wo(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function ou(e,t,n,r,s,i,o,a,l){return e=new lv(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Be(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},$l(i),e}function uv(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:bn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function zh(e){if(!e)return Bt;e=e._reactInternals;e:{if(gn(e)!==e||e.tag!==1)throw Error(T(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Pe(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(T(171))}if(e.tag===1){var n=e.type;if(Pe(n))return zp(e,n,t)}return t}function $h(e,t,n,r,s,i,o,a,l){return e=ou(n,r,!0,e,s,i,o,a,l),e.context=zh(null),n=e.current,r=xe(),s=_t(n),i=ct(r,s),i.callback=t??null,Ft(n,i,s),e.current.lanes=s,us(e,s,r),Ee(e,r),e}function Zi(e,t,n,r){var s=t.current,i=xe(),o=_t(s);return n=zh(n),t.context===null?t.context=n:t.pendingContext=n,t=ct(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Ft(s,t,o),e!==null&&(Ye(e,s,o,i),Ys(e,s,o)),o}function Ni(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function qc(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function au(e,t){qc(e,t),(e=e.alternate)&&qc(e,t)}function cv(){return null}var Wh=typeof reportError=="function"?reportError:function(e){console.error(e)};function lu(e){this._internalRoot=e}Ji.prototype.render=lu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(T(409));Zi(e,t,null,null)};Ji.prototype.unmount=lu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;hn(function(){Zi(null,e,null,null)}),t[ht]=null}};function Ji(e){this._internalRoot=e}Ji.prototype.unstable_scheduleHydration=function(e){if(e){var t=bp();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Pt.length&&t!==0&&t<Pt[n].priority;n++);Pt.splice(n,0,e),n===0&&kp(e)}};function uu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function qi(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ed(){}function dv(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var u=Ni(o);i.call(u)}}var o=$h(t,r,e,0,null,!1,!1,"",ed);return e._reactRootContainer=o,e[ht]=o.current,Hr(e.nodeType===8?e.parentNode:e),hn(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var u=Ni(l);a.call(u)}}var l=ou(e,0,!1,null,null,!1,!1,"",ed);return e._reactRootContainer=l,e[ht]=l.current,Hr(e.nodeType===8?e.parentNode:e),hn(function(){Zi(t,l,n,r)}),l}function eo(e,t,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=Ni(o);a.call(l)}}Zi(t,o,e,s)}else o=dv(n,t,e,s,r);return Ni(o)}xp=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=xr(t.pendingLanes);n!==0&&(jl(t,n|1),Ee(t,q()),!(_&6)&&(Yn=q()+500,Kt()))}break;case 13:hn(function(){var r=mt(e,1);if(r!==null){var s=xe();Ye(r,e,1,s)}}),au(e,1)}};Nl=function(e){if(e.tag===13){var t=mt(e,134217728);if(t!==null){var n=xe();Ye(t,e,134217728,n)}au(e,134217728)}};wp=function(e){if(e.tag===13){var t=_t(e),n=mt(e,t);if(n!==null){var r=xe();Ye(n,e,t,r)}au(e,t)}};bp=function(){return V};Sp=function(e,t){var n=V;try{return V=e,t()}finally{V=n}};ga=function(e,t,n){switch(t){case"input":if(ua(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=Wi(r);if(!s)throw Error(T(90));qf(r),ua(r,s)}}}break;case"textarea":tp(e,n);break;case"select":t=n.value,t!=null&&On(e,!!n.multiple,t,!1)}};lp=nu;up=hn;var fv={usingClientEntryPoint:!1,Events:[ds,En,Wi,op,ap,nu]},mr={findFiberByHostInstance:nn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},pv={bundleType:mr.bundleType,version:mr.version,rendererPackageName:mr.rendererPackageName,rendererConfig:mr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:xt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=fp(e),e===null?null:e.stateNode},findFiberByHostInstance:mr.findFiberByHostInstance||cv,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Bs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bs.isDisabled&&Bs.supportsFiber)try{Bi=Bs.inject(pv),nt=Bs}catch{}}De.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fv;De.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!uu(t))throw Error(T(200));return uv(e,t,null,n)};De.createRoot=function(e,t){if(!uu(e))throw Error(T(299));var n=!1,r="",s=Wh;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=ou(e,1,!1,null,null,n,!1,r,s),e[ht]=t.current,Hr(e.nodeType===8?e.parentNode:e),new lu(t)};De.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(T(188)):(e=Object.keys(e).join(","),Error(T(268,e)));return e=fp(t),e=e===null?null:e.stateNode,e};De.flushSync=function(e){return hn(e)};De.hydrate=function(e,t,n){if(!qi(t))throw Error(T(200));return eo(null,e,t,!0,n)};De.hydrateRoot=function(e,t,n){if(!uu(e))throw Error(T(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=Wh;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=$h(t,null,e,1,n??null,s,!1,i,o),e[ht]=t.current,Hr(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new Ji(t)};De.render=function(e,t,n){if(!qi(t))throw Error(T(200));return eo(null,e,t,!1,n)};De.unmountComponentAtNode=function(e){if(!qi(e))throw Error(T(40));return e._reactRootContainer?(hn(function(){eo(null,null,e,!1,function(){e._reactRootContainer=null,e[ht]=null})}),!0):!1};De.unstable_batchedUpdates=nu;De.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!qi(n))throw Error(T(200));if(e==null||e._reactInternals===void 0)throw Error(T(38));return eo(e,t,n,!1,r)};De.version="18.3.1-next-f1338f8080-20240426";function Kh(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Kh)}catch(e){console.error(e)}}Kh(),Kf.exports=De;var hv=Kf.exports,td=hv;na.createRoot=td.createRoot,na.hydrateRoot=td.hydrateRoot;/**
|
||
* @remix-run/router v1.23.2
|
||
*
|
||
* Copyright (c) Remix Software Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE.md file in the root directory of this source tree.
|
||
*
|
||
* @license MIT
|
||
*/function ts(){return ts=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},ts.apply(this,arguments)}var Nt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Nt||(Nt={}));const nd="popstate";function mv(e){e===void 0&&(e={});function t(s,i){let{pathname:o="/",search:a="",hash:l=""}=yn(s.location.hash.substr(1));return!o.startsWith("/")&&!o.startsWith(".")&&(o="/"+o),Qa("",{pathname:o,search:a,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(s,i){let o=s.document.querySelector("base"),a="";if(o&&o.getAttribute("href")){let l=s.location.href,u=l.indexOf("#");a=u===-1?l:l.slice(0,u)}return a+"#"+(typeof i=="string"?i:Ai(i))}function r(s,i){to(s.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(i)+")")}return yv(t,n,r,e)}function Y(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function to(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function gv(){return Math.random().toString(36).substr(2,8)}function rd(e,t){return{usr:e.state,key:e.key,idx:t}}function Qa(e,t,n,r){return n===void 0&&(n=null),ts({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?yn(t):t,{state:n,key:t&&t.key||r||gv()})}function Ai(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function yn(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function yv(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=Nt.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(ts({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function f(){a=Nt.Pop;let b=c(),h=b==null?null:b-u;u=b,l&&l({action:a,location:w.location,delta:h})}function p(b,h){a=Nt.Push;let m=Qa(w.location,b,h);n&&n(m,b),u=c()+1;let y=rd(m,u),S=w.createHref(m);try{o.pushState(y,"",S)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;s.location.assign(S)}i&&l&&l({action:a,location:w.location,delta:1})}function g(b,h){a=Nt.Replace;let m=Qa(w.location,b,h);n&&n(m,b),u=c();let y=rd(m,u),S=w.createHref(m);o.replaceState(y,"",S),i&&l&&l({action:a,location:w.location,delta:0})}function v(b){let h=s.location.origin!=="null"?s.location.origin:s.location.href,m=typeof b=="string"?b:Ai(b);return m=m.replace(/ $/,"%20"),Y(h,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,h)}let w={get action(){return a},get location(){return e(s,o)},listen(b){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(nd,f),l=b,()=>{s.removeEventListener(nd,f),l=null}},createHref(b){return t(s,b)},createURL:v,encodeLocation(b){let h=v(b);return{pathname:h.pathname,search:h.search,hash:h.hash}},push:p,replace:g,go(b){return o.go(b)}};return w}var sd;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(sd||(sd={}));function vv(e,t,n){return n===void 0&&(n="/"),xv(e,t,n)}function xv(e,t,n,r){let s=typeof t=="string"?yn(t):t,i=Zn(s.pathname||"/",n);if(i==null)return null;let o=Hh(e);wv(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=Rv(i);a=Nv(o[l],u)}return a}function Hh(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,o,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(Y(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=Ot([r,l.relativePath]),c=n.concat(l);i.children&&i.children.length>0&&(Y(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Hh(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:Tv(u,i.index),routesMeta:c})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of Gh(i.path))s(i,o,l)}),t}function Gh(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=Gh(r.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function wv(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:jv(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const bv=/^:[\w-]+$/,Sv=3,kv=2,Cv=1,Pv=10,Ev=-2,id=e=>e==="*";function Tv(e,t){let n=e.split("/"),r=n.length;return n.some(id)&&(r+=Ev),t&&(r+=kv),n.filter(s=>!id(s)).reduce((s,i)=>s+(bv.test(i)?Sv:i===""?Cv:Pv),r)}function jv(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function Nv(e,t,n){let{routesMeta:r}=e,s={},i="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],u=a===r.length-1,c=i==="/"?t:t.slice(i.length)||"/",f=Ya({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),p=l.route;if(!f)return null;Object.assign(s,f.params),o.push({params:s,pathname:Ot([i,f.pathname]),pathnameBase:_v(Ot([i,f.pathnameBase])),route:p}),f.pathnameBase!=="/"&&(i=Ot([i,f.pathnameBase]))}return o}function Ya(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Av(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((u,c,f)=>{let{paramName:p,isOptional:g}=c;if(p==="*"){let w=a[f]||"";o=i.slice(0,i.length-w.length).replace(/(.)\/+$/,"$1")}const v=a[f];return g&&!v?u[p]=void 0:u[p]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function Av(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),to(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function Rv(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return to(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Zn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const Lv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dv=e=>Lv.test(e);function Fv(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?yn(e):e,i;if(n)if(Dv(n))i=n;else{if(n.includes("//")){let o=n;n=n.replace(/\/\/+/g,"/"),to(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+n))}n.startsWith("/")?i=od(n.substring(1),"/"):i=od(n,t)}else i=t;return{pathname:i,search:Vv(r),hash:Ov(s)}}function od(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Uo(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Mv(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Xh(e,t){let n=Mv(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Qh(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=yn(e):(s=ts({},e),Y(!s.pathname||!s.pathname.includes("?"),Uo("?","pathname","search",s)),Y(!s.pathname||!s.pathname.includes("#"),Uo("#","pathname","hash",s)),Y(!s.search||!s.search.includes("#"),Uo("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let f=t.length-1;if(!r&&o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),f-=1;s.pathname=p.join("/")}a=f>=0?t[f]:"/"}let l=Fv(s,a),u=o&&o!=="/"&&o.endsWith("/"),c=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const Ot=e=>e.join("/").replace(/\/\/+/g,"/"),_v=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Vv=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Ov=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Iv(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Yh=["post","put","patch","delete"];new Set(Yh);const Bv=["get",...Yh];new Set(Bv);/**
|
||
* React Router v6.30.3
|
||
*
|
||
* Copyright (c) Remix Software Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE.md file in the root directory of this source tree.
|
||
*
|
||
* @license MIT
|
||
*/function ns(){return ns=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},ns.apply(this,arguments)}const no=x.createContext(null),Zh=x.createContext(null),Ht=x.createContext(null),ro=x.createContext(null),vn=x.createContext({outlet:null,matches:[],isDataRoute:!1}),Jh=x.createContext(null);function Uv(e,t){let{relative:n}=t===void 0?{}:t;ps()||Y(!1);let{basename:r,navigator:s}=x.useContext(Ht),{hash:i,pathname:o,search:a}=so(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:Ot([r,o])),s.createHref({pathname:l,search:a,hash:i})}function ps(){return x.useContext(ro)!=null}function hs(){return ps()||Y(!1),x.useContext(ro).location}function qh(e){x.useContext(Ht).static||x.useLayoutEffect(e)}function zv(){let{isDataRoute:e}=x.useContext(vn);return e?tx():$v()}function $v(){ps()||Y(!1);let e=x.useContext(no),{basename:t,future:n,navigator:r}=x.useContext(Ht),{matches:s}=x.useContext(vn),{pathname:i}=hs(),o=JSON.stringify(Xh(s,n.v7_relativeSplatPath)),a=x.useRef(!1);return qh(()=>{a.current=!0}),x.useCallback(function(u,c){if(c===void 0&&(c={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let f=Qh(u,JSON.parse(o),i,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Ot([t,f.pathname])),(c.replace?r.replace:r.push)(f,c.state,c)},[t,r,o,i,e])}function so(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=x.useContext(Ht),{matches:s}=x.useContext(vn),{pathname:i}=hs(),o=JSON.stringify(Xh(s,r.v7_relativeSplatPath));return x.useMemo(()=>Qh(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function Wv(e,t){return Kv(e,t)}function Kv(e,t,n,r){ps()||Y(!1);let{navigator:s}=x.useContext(Ht),{matches:i}=x.useContext(vn),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=hs(),c;if(t){var f;let b=typeof t=="string"?yn(t):t;l==="/"||(f=b.pathname)!=null&&f.startsWith(l)||Y(!1),c=b}else c=u;let p=c.pathname||"/",g=p;if(l!=="/"){let b=l.replace(/^\//,"").split("/");g="/"+p.replace(/^\//,"").split("/").slice(b.length).join("/")}let v=vv(e,{pathname:g}),w=Yv(v&&v.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:Ot([l,s.encodeLocation?s.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:Ot([l,s.encodeLocation?s.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),i,n,r);return t&&w?x.createElement(ro.Provider,{value:{location:ns({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Nt.Pop}},w):w}function Hv(){let e=ex(),t=Iv(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:s},n):null,null)}const Gv=x.createElement(Hv,null);class Xv extends x.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?x.createElement(vn.Provider,{value:this.props.routeContext},x.createElement(Jh.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Qv(e){let{routeContext:t,match:n,children:r}=e,s=x.useContext(no);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),x.createElement(vn.Provider,{value:t},r)}function Yv(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(s=n)==null?void 0:s.errors;if(a!=null){let c=o.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);c>=0||Y(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c<o.length;c++){let f=o[c];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=c),f.route.id){let{loaderData:p,errors:g}=n,v=f.route.loader&&p[f.route.id]===void 0&&(!g||g[f.route.id]===void 0);if(f.route.lazy||v){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,f,p)=>{let g,v=!1,w=null,b=null;n&&(g=a&&f.route.id?a[f.route.id]:void 0,w=f.route.errorElement||Gv,l&&(u<0&&p===0?(nx("route-fallback"),v=!0,b=null):u===p&&(v=!0,b=f.route.hydrateFallbackElement||null)));let h=t.concat(o.slice(0,p+1)),m=()=>{let y;return g?y=w:v?y=b:f.route.Component?y=x.createElement(f.route.Component,null):f.route.element?y=f.route.element:y=c,x.createElement(Qv,{match:f,routeContext:{outlet:c,matches:h,isDataRoute:n!=null},children:y})};return n&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?x.createElement(Xv,{location:n.location,revalidation:n.revalidation,component:w,error:g,children:m(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):m()},null)}var em=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(em||{}),tm=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(tm||{});function Zv(e){let t=x.useContext(no);return t||Y(!1),t}function Jv(e){let t=x.useContext(Zh);return t||Y(!1),t}function qv(e){let t=x.useContext(vn);return t||Y(!1),t}function nm(e){let t=qv(),n=t.matches[t.matches.length-1];return n.route.id||Y(!1),n.route.id}function ex(){var e;let t=x.useContext(Jh),n=Jv(),r=nm();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function tx(){let{router:e}=Zv(em.UseNavigateStable),t=nm(tm.UseNavigateStable),n=x.useRef(!1);return qh(()=>{n.current=!0}),x.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,ns({fromRouteId:t},i)))},[e,t])}const ad={};function nx(e,t,n){ad[e]||(ad[e]=!0)}function rx(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function _e(e){Y(!1)}function sx(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Nt.Pop,navigator:i,static:o=!1,future:a}=e;ps()&&Y(!1);let l=t.replace(/^\/*/,"/"),u=x.useMemo(()=>({basename:l,navigator:i,static:o,future:ns({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof r=="string"&&(r=yn(r));let{pathname:c="/",search:f="",hash:p="",state:g=null,key:v="default"}=r,w=x.useMemo(()=>{let b=Zn(c,l);return b==null?null:{location:{pathname:b,search:f,hash:p,state:g,key:v},navigationType:s}},[l,c,f,p,g,v,s]);return w==null?null:x.createElement(Ht.Provider,{value:u},x.createElement(ro.Provider,{children:n,value:w}))}function ix(e){let{children:t,location:n}=e;return Wv(Za(t),n)}new Promise(()=>{});function Za(e,t){t===void 0&&(t=[]);let n=[];return x.Children.forEach(e,(r,s)=>{if(!x.isValidElement(r))return;let i=[...t,s];if(r.type===x.Fragment){n.push.apply(n,Za(r.props.children,i));return}r.type!==_e&&Y(!1),!r.props.index||!r.props.children||Y(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Za(r.props.children,i)),n.push(o)}),n}/**
|
||
* React Router DOM v6.30.3
|
||
*
|
||
* Copyright (c) Remix Software Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE.md file in the root directory of this source tree.
|
||
*
|
||
* @license MIT
|
||
*/function Ri(){return Ri=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},Ri.apply(this,arguments)}function rm(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function ox(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ax(e,t){return e.button===0&&(!t||t==="_self")&&!ox(e)}const lx=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],ux=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],cx="6";try{window.__reactRouterVersion=cx}catch{}const dx=x.createContext({isTransitioning:!1}),fx="startTransition",ld=r0[fx];function px(e){let{basename:t,children:n,future:r,window:s}=e,i=x.useRef();i.current==null&&(i.current=mv({window:s,v5Compat:!0}));let o=i.current,[a,l]=x.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},c=x.useCallback(f=>{u&&ld?ld(()=>l(f)):l(f)},[l,u]);return x.useLayoutEffect(()=>o.listen(c),[o,c]),x.useEffect(()=>rx(r),[r]),x.createElement(sx,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const hx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",mx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,sm=x.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:u,preventScrollReset:c,viewTransition:f}=t,p=rm(t,lx),{basename:g}=x.useContext(Ht),v,w=!1;if(typeof u=="string"&&mx.test(u)&&(v=u,hx))try{let y=new URL(window.location.href),S=u.startsWith("//")?new URL(y.protocol+u):new URL(u),k=Zn(S.pathname,g);S.origin===y.origin&&k!=null?u=k+S.search+S.hash:w=!0}catch{}let b=Uv(u,{relative:s}),h=vx(u,{replace:o,state:a,target:l,preventScrollReset:c,relative:s,viewTransition:f});function m(y){r&&r(y),y.defaultPrevented||h(y)}return x.createElement("a",Ri({},p,{href:v||b,onClick:w||i?r:m,ref:n,target:l}))}),gx=x.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:s=!1,className:i="",end:o=!1,style:a,to:l,viewTransition:u,children:c}=t,f=rm(t,ux),p=so(l,{relative:f.relative}),g=hs(),v=x.useContext(Zh),{navigator:w,basename:b}=x.useContext(Ht),h=v!=null&&xx(p)&&u===!0,m=w.encodeLocation?w.encodeLocation(p).pathname:p.pathname,y=g.pathname,S=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;s||(y=y.toLowerCase(),S=S?S.toLowerCase():null,m=m.toLowerCase()),S&&b&&(S=Zn(S,b)||S);const k=m!=="/"&&m.endsWith("/")?m.length-1:m.length;let C=y===m||!o&&y.startsWith(m)&&y.charAt(k)==="/",E=S!=null&&(S===m||!o&&S.startsWith(m)&&S.charAt(m.length)==="/"),P={isActive:C,isPending:E,isTransitioning:h},D=C?r:void 0,A;typeof i=="function"?A=i(P):A=[i,C?"active":null,E?"pending":null,h?"transitioning":null].filter(Boolean).join(" ");let ee=typeof a=="function"?a(P):a;return x.createElement(sm,Ri({},f,{"aria-current":D,className:A,ref:n,style:ee,to:l,viewTransition:u}),typeof c=="function"?c(P):c)});var Ja;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ja||(Ja={}));var ud;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ud||(ud={}));function yx(e){let t=x.useContext(no);return t||Y(!1),t}function vx(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:a}=t===void 0?{}:t,l=zv(),u=hs(),c=so(e,{relative:o});return x.useCallback(f=>{if(ax(f,n)){f.preventDefault();let p=r!==void 0?r:Ai(u)===Ai(c);l(e,{replace:p,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[u,l,c,r,s,n,e,i,o,a])}function xx(e,t){t===void 0&&(t={});let n=x.useContext(dx);n==null&&Y(!1);let{basename:r}=yx(Ja.useViewTransitionState),s=so(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=Zn(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Zn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ya(s.pathname,o)!=null||Ya(s.pathname,i)!=null}const cu=x.createContext({});function du(e){const t=x.useRef(null);return t.current===null&&(t.current=e()),t.current}const io=x.createContext(null),fu=x.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class wx extends x.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function bx({children:e,isPresent:t}){const n=x.useId(),r=x.useRef(null),s=x.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=x.useContext(fu);return x.useInsertionEffect(()=>{const{width:o,height:a,top:l,left:u}=s.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return i&&(c.nonce=i),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`
|
||
[data-motion-pop-id="${n}"] {
|
||
position: absolute !important;
|
||
width: ${o}px !important;
|
||
height: ${a}px !important;
|
||
top: ${l}px !important;
|
||
left: ${u}px !important;
|
||
}
|
||
`),()=>{document.head.removeChild(c)}},[t]),d.jsx(wx,{isPresent:t,childRef:r,sizeRef:s,children:x.cloneElement(e,{ref:r})})}const Sx=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:o})=>{const a=du(kx),l=x.useId(),u=x.useCallback(f=>{a.set(f,!0);for(const p of a.values())if(!p)return;r&&r()},[a,r]),c=x.useMemo(()=>({id:l,initial:t,isPresent:n,custom:s,onExitComplete:u,register:f=>(a.set(f,!1),()=>a.delete(f))}),i?[Math.random(),u]:[n,u]);return x.useMemo(()=>{a.forEach((f,p)=>a.set(p,!1))},[n]),x.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),o==="popLayout"&&(e=d.jsx(bx,{isPresent:n,children:e})),d.jsx(io.Provider,{value:c,children:e})};function kx(){return new Map}function im(e=!0){const t=x.useContext(io);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=x.useId();x.useEffect(()=>{e&&s(i)},[e]);const o=x.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const Us=e=>e.key||"";function cd(e){const t=[];return x.Children.forEach(e,n=>{x.isValidElement(n)&&t.push(n)}),t}const pu=typeof window<"u",om=pu?x.useLayoutEffect:x.useEffect,am=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:o=!1})=>{const[a,l]=im(o),u=x.useMemo(()=>cd(e),[e]),c=o&&!a?[]:u.map(Us),f=x.useRef(!0),p=x.useRef(u),g=du(()=>new Map),[v,w]=x.useState(u),[b,h]=x.useState(u);om(()=>{f.current=!1,p.current=u;for(let S=0;S<b.length;S++){const k=Us(b[S]);c.includes(k)?g.delete(k):g.get(k)!==!0&&g.set(k,!1)}},[b,c.length,c.join("-")]);const m=[];if(u!==v){let S=[...u];for(let k=0;k<b.length;k++){const C=b[k],E=Us(C);c.includes(E)||(S.splice(k,0,C),m.push(C))}i==="wait"&&m.length&&(S=m),h(cd(S)),w(u);return}const{forceRender:y}=x.useContext(cu);return d.jsx(d.Fragment,{children:b.map(S=>{const k=Us(S),C=o&&!a?!1:u===b||c.includes(k),E=()=>{if(g.has(k))g.set(k,!0);else return;let P=!0;g.forEach(D=>{D||(P=!1)}),P&&(y==null||y(),h(p.current),o&&(l==null||l()),r&&r())};return d.jsx(Sx,{isPresent:C,initial:!f.current||n?void 0:!1,custom:C?void 0:t,presenceAffectsLayout:s,mode:i,onExitComplete:C?void 0:E,children:S},k)})})},Ae=e=>e;let lm=Ae;function hu(e){let t;return()=>(t===void 0&&(t=e()),t)}const Jn=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},dt=e=>e*1e3,ft=e=>e/1e3,Cx={useManualTiming:!1};function Px(e){let t=new Set,n=new Set,r=!1,s=!1;const i=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(u){i.has(u)&&(l.schedule(u),e()),u(o)}const l={schedule:(u,c=!1,f=!1)=>{const g=f&&r?t:n;return c&&i.add(u),g.has(u)||g.add(u),u},cancel:u=>{n.delete(u),i.delete(u)},process:u=>{if(o=u,r){s=!0;return}r=!0,[t,n]=[n,t],t.forEach(a),t.clear(),r=!1,s&&(s=!1,l.process(u))}};return l}const zs=["read","resolveKeyframes","update","preRender","render","postRender"],Ex=40;function um(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=zs.reduce((h,m)=>(h[m]=Px(i),h),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:f,postRender:p}=o,g=()=>{const h=performance.now();n=!1,s.delta=r?1e3/60:Math.max(Math.min(h-s.timestamp,Ex),1),s.timestamp=h,s.isProcessing=!0,a.process(s),l.process(s),u.process(s),c.process(s),f.process(s),p.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(g))},v=()=>{n=!0,r=!0,s.isProcessing||e(g)};return{schedule:zs.reduce((h,m)=>{const y=o[m];return h[m]=(S,k=!1,C=!1)=>(n||v(),y.schedule(S,k,C)),h},{}),cancel:h=>{for(let m=0;m<zs.length;m++)o[zs[m]].cancel(h)},state:s,steps:o}}const{schedule:z,cancel:Ut,state:ue,steps:zo}=um(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ae,!0),cm=x.createContext({strict:!1}),dd={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"]},qn={};for(const e in dd)qn[e]={isEnabled:t=>dd[e].some(n=>!!t[n])};function Tx(e){for(const t in e)qn[t]={...qn[t],...e[t]}}const jx=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Li(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||jx.has(e)}let dm=e=>!Li(e);function Nx(e){e&&(dm=t=>t.startsWith("on")?!Li(t):e(t))}try{Nx(require("@emotion/is-prop-valid").default)}catch{}function Ax(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(dm(s)||n===!0&&Li(s)||!t&&!Li(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function Rx(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,s)=>s==="create"?e:(t.has(s)||t.set(s,e(s)),t.get(s))})}const oo=x.createContext({});function rs(e){return typeof e=="string"||Array.isArray(e)}function ao(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const mu=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],gu=["initial",...mu];function lo(e){return ao(e.animate)||gu.some(t=>rs(e[t]))}function fm(e){return!!(lo(e)||e.variants)}function Lx(e,t){if(lo(e)){const{initial:n,animate:r}=e;return{initial:n===!1||rs(n)?n:void 0,animate:rs(r)?r:void 0}}return e.inherit!==!1?t:{}}function Dx(e){const{initial:t,animate:n}=Lx(e,x.useContext(oo));return x.useMemo(()=>({initial:t,animate:n}),[fd(t),fd(n)])}function fd(e){return Array.isArray(e)?e.join(" "):e}const Fx=Symbol.for("motionComponentSymbol");function Dn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Mx(e,t,n){return x.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Dn(n)&&(n.current=r))},[t])}const yu=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),_x="framerAppearId",pm="data-"+yu(_x),{schedule:vu}=um(queueMicrotask,!1),hm=x.createContext({});function Vx(e,t,n,r,s){var i,o;const{visualElement:a}=x.useContext(oo),l=x.useContext(cm),u=x.useContext(io),c=x.useContext(fu).reducedMotion,f=x.useRef(null);r=r||l.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:a,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:c}));const p=f.current,g=x.useContext(hm);p&&!p.projection&&s&&(p.type==="html"||p.type==="svg")&&Ox(f.current,n,s,g);const v=x.useRef(!1);x.useInsertionEffect(()=>{p&&v.current&&p.update(n,u)});const w=n[pm],b=x.useRef(!!w&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,w))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,w)));return om(()=>{p&&(v.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),vu.render(p.render),b.current&&p.animationState&&p.animationState.animateChanges())}),x.useEffect(()=>{p&&(!b.current&&p.animationState&&p.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var h;(h=window.MotionHandoffMarkAsComplete)===null||h===void 0||h.call(window,w)}),b.current=!1))}),p}function Ox(e,t,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:mm(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||a&&Dn(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:u})}function mm(e){if(e)return e.options.allowProjection!==!1?e.projection:mm(e.parent)}function Ix({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:s}){var i,o;e&&Tx(e);function a(u,c){let f;const p={...x.useContext(fu),...u,layoutId:Bx(u)},{isStatic:g}=p,v=Dx(u),w=r(u,g);if(!g&&pu){Ux();const b=zx(p);f=b.MeasureLayout,v.visualElement=Vx(s,w,p,t,b.ProjectionNode)}return d.jsxs(oo.Provider,{value:v,children:[f&&v.visualElement?d.jsx(f,{visualElement:v.visualElement,...p}):null,n(s,u,Mx(w,v.visualElement,c),w,g,v.visualElement)]})}a.displayName=`motion.${typeof s=="string"?s:`create(${(o=(i=s.displayName)!==null&&i!==void 0?i:s.name)!==null&&o!==void 0?o:""})`}`;const l=x.forwardRef(a);return l[Fx]=s,l}function Bx({layoutId:e}){const t=x.useContext(cu).id;return t&&e!==void 0?t+"-"+e:e}function Ux(e,t){x.useContext(cm).strict}function zx(e){const{drag:t,layout:n}=qn;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const $x=["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 xu(e){return typeof e!="string"||e.includes("-")?!1:!!($x.indexOf(e)>-1||/[A-Z]/u.test(e))}function pd(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function wu(e,t,n,r){if(typeof t=="function"){const[s,i]=pd(r);t=t(n!==void 0?n:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=pd(r);t=t(n!==void 0?n:e.custom,s,i)}return t}const qa=e=>Array.isArray(e),Wx=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Kx=e=>qa(e)?e[e.length-1]||0:e,ge=e=>!!(e&&e.getVelocity);function ri(e){const t=ge(e)?e.get():e;return Wx(t)?t.toValue():t}function Hx({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,s,i){const o={latestValues:Gx(r,s,i,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const gm=e=>(t,n)=>{const r=x.useContext(oo),s=x.useContext(io),i=()=>Hx(e,t,r,s);return n?i():du(i)};function Gx(e,t,n,r){const s={},i=r(e,{});for(const p in i)s[p]=ri(i[p]);let{initial:o,animate:a}=e;const l=lo(e),u=fm(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const f=c?a:o;if(f&&typeof f!="boolean"&&!ao(f)){const p=Array.isArray(f)?f:[f];for(let g=0;g<p.length;g++){const v=wu(e,p[g]);if(v){const{transitionEnd:w,transition:b,...h}=v;for(const m in h){let y=h[m];if(Array.isArray(y)){const S=c?y.length-1:0;y=y[S]}y!==null&&(s[m]=y)}for(const m in w)s[m]=w[m]}}}return s}const sr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],xn=new Set(sr),ym=e=>t=>typeof t=="string"&&t.startsWith(e),vm=ym("--"),Xx=ym("var(--"),bu=e=>Xx(e)?Qx.test(e.split("/*")[0].trim()):!1,Qx=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,xm=(e,t)=>t&&typeof e=="number"?t.transform(e):e,yt=(e,t,n)=>n>t?t:n<e?e:n,ir={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ss={...ir,transform:e=>yt(0,1,e)},$s={...ir,default:1},ms=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),St=ms("deg"),st=ms("%"),R=ms("px"),Yx=ms("vh"),Zx=ms("vw"),hd={...st,parse:e=>st.parse(e)/100,transform:e=>st.transform(e*100)},Jx={borderWidth:R,borderTopWidth:R,borderRightWidth:R,borderBottomWidth:R,borderLeftWidth:R,borderRadius:R,radius:R,borderTopLeftRadius:R,borderTopRightRadius:R,borderBottomRightRadius:R,borderBottomLeftRadius:R,width:R,maxWidth:R,height:R,maxHeight:R,top:R,right:R,bottom:R,left:R,padding:R,paddingTop:R,paddingRight:R,paddingBottom:R,paddingLeft:R,margin:R,marginTop:R,marginRight:R,marginBottom:R,marginLeft:R,backgroundPositionX:R,backgroundPositionY:R},qx={rotate:St,rotateX:St,rotateY:St,rotateZ:St,scale:$s,scaleX:$s,scaleY:$s,scaleZ:$s,skew:St,skewX:St,skewY:St,distance:R,translateX:R,translateY:R,translateZ:R,x:R,y:R,z:R,perspective:R,transformPerspective:R,opacity:ss,originX:hd,originY:hd,originZ:R},md={...ir,transform:Math.round},Su={...Jx,...qx,zIndex:md,size:R,fillOpacity:ss,strokeOpacity:ss,numOctaves:md},e1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},t1=sr.length;function n1(e,t,n){let r="",s=!0;for(let i=0;i<t1;i++){const o=sr[i],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=xm(a,Su[o]);if(!l){s=!1;const c=e1[o]||o;r+=`${c}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function ku(e,t,n){const{style:r,vars:s,transformOrigin:i}=e;let o=!1,a=!1;for(const l in t){const u=t[l];if(xn.has(l)){o=!0;continue}else if(vm(l)){s[l]=u;continue}else{const c=xm(u,Su[l]);l.startsWith("origin")?(a=!0,i[l]=c):r[l]=c}}if(t.transform||(o||n?r.transform=n1(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=i;r.transformOrigin=`${l} ${u} ${c}`}}const r1={offset:"stroke-dashoffset",array:"stroke-dasharray"},s1={offset:"strokeDashoffset",array:"strokeDasharray"};function i1(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?r1:s1;e[i.offset]=R.transform(-r);const o=R.transform(t),a=R.transform(n);e[i.array]=`${o} ${a}`}function gd(e,t,n){return typeof e=="string"?e:R.transform(t+n*e)}function o1(e,t,n){const r=gd(t,e.x,e.width),s=gd(n,e.y,e.height);return`${r} ${s}`}function Cu(e,{attrX:t,attrY:n,attrScale:r,originX:s,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},c,f){if(ku(e,u,f),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:g,dimensions:v}=e;p.transform&&(v&&(g.transform=p.transform),delete p.transform),v&&(s!==void 0||i!==void 0||g.transform)&&(g.transformOrigin=o1(v,s!==void 0?s:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),o!==void 0&&i1(p,o,a,l,!1)}const Pu=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),wm=()=>({...Pu(),attrs:{}}),Eu=e=>typeof e=="string"&&e.toLowerCase()==="svg";function bm(e,{style:t,vars:n},r,s){Object.assign(e.style,t,s&&s.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const Sm=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 km(e,t,n,r){bm(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(Sm.has(s)?s:yu(s),t.attrs[s])}const Di={};function a1(e){Object.assign(Di,e)}function Cm(e,{layout:t,layoutId:n}){return xn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Di[e]||e==="opacity")}function Tu(e,t,n){var r;const{style:s}=e,i={};for(const o in s)(ge(s[o])||t.style&&ge(t.style[o])||Cm(o,e)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[o]=s[o]);return i}function Pm(e,t,n){const r=Tu(e,t,n);for(const s in e)if(ge(e[s])||ge(t[s])){const i=sr.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}function l1(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const yd=["x","y","width","height","cx","cy","r"],u1={useVisualState:gm({scrapeMotionValuesFromProps:Pm,createRenderState:wm,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:s})=>{if(!n)return;let i=!!e.drag;if(!i){for(const a in s)if(xn.has(a)){i=!0;break}}if(!i)return;let o=!t;if(t)for(let a=0;a<yd.length;a++){const l=yd[a];e[l]!==t[l]&&(o=!0)}o&&z.read(()=>{l1(n,r),z.render(()=>{Cu(r,s,Eu(n.tagName),e.transformTemplate),km(n,r)})})}})},c1={useVisualState:gm({scrapeMotionValuesFromProps:Tu,createRenderState:Pu})};function Em(e,t,n){for(const r in t)!ge(t[r])&&!Cm(r,n)&&(e[r]=t[r])}function d1({transformTemplate:e},t){return x.useMemo(()=>{const n=Pu();return ku(n,t,e),Object.assign({},n.vars,n.style)},[t])}function f1(e,t){const n=e.style||{},r={};return Em(r,n,e),Object.assign(r,d1(e,t)),r}function p1(e,t){const n={},r=f1(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function h1(e,t,n,r){const s=x.useMemo(()=>{const i=wm();return Cu(i,t,Eu(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Em(i,e.style,e),s.style={...i,...s.style}}return s}function m1(e=!1){return(n,r,s,{latestValues:i},o)=>{const l=(xu(n)?h1:p1)(r,i,o,n),u=Ax(r,typeof n=="string",e),c=n!==x.Fragment?{...u,...l,ref:s}:{},{children:f}=r,p=x.useMemo(()=>ge(f)?f.get():f,[f]);return x.createElement(n,{...c,children:p})}}function g1(e,t){return function(r,{forwardMotionProps:s}={forwardMotionProps:!1}){const o={...xu(r)?u1:c1,preloadedFeatures:e,useRender:m1(s),createVisualElement:t,Component:r};return Ix(o)}}function Tm(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 uo(e,t,n){const r=e.getProps();return wu(r,t,n!==void 0?n:r.custom,e)}const y1=hu(()=>window.ScrollTimeline!==void 0);class v1{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(s=>{if(y1()&&s.attachTimeline)return s.attachTimeline(t);if(typeof n=="function")return n(s)});return()=>{r.forEach((s,i)=>{s&&s(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class x1 extends v1{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function ju(e,t){return e?e[t]||e.default||e:void 0}const el=2e4;function jm(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<el;)t+=n,r=e.next(t);return t>=el?1/0:t}function Nu(e){return typeof e=="function"}function vd(e,t){e.timeline=t,e.onfinish=null}const Au=e=>Array.isArray(e)&&typeof e[0]=="number",w1={linearEasing:void 0};function b1(e,t){const n=hu(e);return()=>{var r;return(r=w1[t])!==null&&r!==void 0?r:n()}}const Fi=b1(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Nm=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i<s;i++)r+=e(Jn(0,s-1,i))+", ";return`linear(${r.substring(0,r.length-2)})`};function Am(e){return!!(typeof e=="function"&&Fi()||!e||typeof e=="string"&&(e in tl||Fi())||Au(e)||Array.isArray(e)&&e.every(Am))}const br=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,tl={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:br([0,.65,.55,1]),circOut:br([.55,0,1,.45]),backIn:br([.31,.01,.66,-.59]),backOut:br([.33,1.53,.69,.99])};function Rm(e,t){if(e)return typeof e=="function"&&Fi()?Nm(e,t):Au(e)?br(e):Array.isArray(e)?e.map(n=>Rm(n,t)||tl.easeOut):tl[e]}const Ke={x:!1,y:!1};function Lm(){return Ke.x||Ke.y}function S1(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let s=document;const i=(r=void 0)!==null&&r!==void 0?r:s.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function Dm(e,t){const n=S1(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function xd(e){return t=>{t.pointerType==="touch"||Lm()||e(t)}}function k1(e,t,n={}){const[r,s,i]=Dm(e,n),o=xd(a=>{const{target:l}=a,u=t(a);if(typeof u!="function"||!l)return;const c=xd(f=>{u(f),l.removeEventListener("pointerleave",c)});l.addEventListener("pointerleave",c,s)});return r.forEach(a=>{a.addEventListener("pointerenter",o,s)}),i}const Fm=(e,t)=>t?e===t?!0:Fm(e,t.parentElement):!1,Ru=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,C1=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function P1(e){return C1.has(e.tagName)||e.tabIndex!==-1}const Sr=new WeakSet;function wd(e){return t=>{t.key==="Enter"&&e(t)}}function $o(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const E1=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=wd(()=>{if(Sr.has(n))return;$o(n,"down");const s=wd(()=>{$o(n,"up")}),i=()=>$o(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function bd(e){return Ru(e)&&!Lm()}function T1(e,t,n={}){const[r,s,i]=Dm(e,n),o=a=>{const l=a.currentTarget;if(!bd(a)||Sr.has(l))return;Sr.add(l);const u=t(a),c=(g,v)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",p),!(!bd(g)||!Sr.has(l))&&(Sr.delete(l),typeof u=="function"&&u(g,{success:v}))},f=g=>{c(g,n.useGlobalTarget||Fm(l,g.target))},p=g=>{c(g,!1)};window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",p,s)};return r.forEach(a=>{!P1(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0),(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),a.addEventListener("focus",u=>E1(u,s),s)}),i}function j1(e){return e==="x"||e==="y"?Ke[e]?null:(Ke[e]=!0,()=>{Ke[e]=!1}):Ke.x||Ke.y?null:(Ke.x=Ke.y=!0,()=>{Ke.x=Ke.y=!1})}const Mm=new Set(["width","height","top","left","right","bottom",...sr]);let si;function N1(){si=void 0}const it={now:()=>(si===void 0&&it.set(ue.isProcessing||Cx.useManualTiming?ue.timestamp:performance.now()),si),set:e=>{si=e,queueMicrotask(N1)}};function Lu(e,t){e.indexOf(t)===-1&&e.push(t)}function Du(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Fu{constructor(){this.subscriptions=[]}add(t){return Lu(this.subscriptions,t),()=>Du(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function _m(e,t){return t?e*(1e3/t):0}const Sd=30,A1=e=>!isNaN(parseFloat(e));class R1{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,s=!0)=>{const i=it.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=it.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=A1(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Fu);const r=this.events[t].add(n);return t==="change"?()=>{r(),z.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=it.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Sd)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Sd);return _m(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function is(e,t){return new R1(e,t)}function L1(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,is(n))}function D1(e,t){const n=uo(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const a=Kx(i[o]);L1(e,o,a)}}function F1(e){return!!(ge(e)&&e.add)}function nl(e,t){const n=e.getValue("willChange");if(F1(n))return n.add(t)}function Vm(e){return e.props[pm]}const Om=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,M1=1e-7,_1=12;function V1(e,t,n,r,s){let i,o,a=0;do o=t+(n-t)/2,i=Om(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>M1&&++a<_1);return o}function gs(e,t,n,r){if(e===t&&n===r)return Ae;const s=i=>V1(i,0,1,e,n);return i=>i===0||i===1?i:Om(s(i),t,r)}const Im=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Bm=e=>t=>1-e(1-t),Um=gs(.33,1.53,.69,.99),Mu=Bm(Um),zm=Im(Mu),$m=e=>(e*=2)<1?.5*Mu(e):.5*(2-Math.pow(2,-10*(e-1))),_u=e=>1-Math.sin(Math.acos(e)),Wm=Bm(_u),Km=Im(_u),Hm=e=>/^0[^.\s]+$/u.test(e);function O1(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Hm(e):!0}const Fr=e=>Math.round(e*1e5)/1e5,Vu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function I1(e){return e==null}const B1=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ou=(e,t)=>n=>!!(typeof n=="string"&&B1.test(n)&&n.startsWith(e)||t&&!I1(n)&&Object.prototype.hasOwnProperty.call(n,t)),Gm=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(Vu);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},U1=e=>yt(0,255,e),Wo={...ir,transform:e=>Math.round(U1(e))},on={test:Ou("rgb","red"),parse:Gm("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Wo.transform(e)+", "+Wo.transform(t)+", "+Wo.transform(n)+", "+Fr(ss.transform(r))+")"};function z1(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const rl={test:Ou("#"),parse:z1,transform:on.transform},Fn={test:Ou("hsl","hue"),parse:Gm("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+st.transform(Fr(t))+", "+st.transform(Fr(n))+", "+Fr(ss.transform(r))+")"},he={test:e=>on.test(e)||rl.test(e)||Fn.test(e),parse:e=>on.test(e)?on.parse(e):Fn.test(e)?Fn.parse(e):rl.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?on.transform(e):Fn.transform(e)},$1=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function W1(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Vu))===null||t===void 0?void 0:t.length)||0)+(((n=e.match($1))===null||n===void 0?void 0:n.length)||0)>0}const Xm="number",Qm="color",K1="var",H1="var(",kd="${}",G1=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function os(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=t.replace(G1,l=>(he.test(l)?(r.color.push(i),s.push(Qm),n.push(he.parse(l))):l.startsWith(H1)?(r.var.push(i),s.push(K1),n.push(l)):(r.number.push(i),s.push(Xm),n.push(parseFloat(l))),++i,kd)).split(kd);return{values:n,split:a,indexes:r,types:s}}function Ym(e){return os(e).values}function Zm(e){const{split:t,types:n}=os(e),r=t.length;return s=>{let i="";for(let o=0;o<r;o++)if(i+=t[o],s[o]!==void 0){const a=n[o];a===Xm?i+=Fr(s[o]):a===Qm?i+=he.transform(s[o]):i+=s[o]}return i}}const X1=e=>typeof e=="number"?0:e;function Q1(e){const t=Ym(e);return Zm(e)(t.map(X1))}const zt={test:W1,parse:Ym,createTransformer:Zm,getAnimatableNone:Q1},Y1=new Set(["brightness","contrast","saturate","opacity"]);function Z1(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Vu)||[];if(!r)return e;const s=n.replace(r,"");let i=Y1.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const J1=/\b([a-z-]*)\(.*?\)/gu,sl={...zt,getAnimatableNone:e=>{const t=e.match(J1);return t?t.map(Z1).join(" "):e}},q1={...Su,color:he,backgroundColor:he,outlineColor:he,fill:he,stroke:he,borderColor:he,borderTopColor:he,borderRightColor:he,borderBottomColor:he,borderLeftColor:he,filter:sl,WebkitFilter:sl},Iu=e=>q1[e];function Jm(e,t){let n=Iu(e);return n!==sl&&(n=zt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const ew=new Set(["auto","none","0"]);function tw(e,t,n){let r=0,s;for(;r<e.length&&!s;){const i=e[r];typeof i=="string"&&!ew.has(i)&&os(i).values.length&&(s=e[r]),r++}if(s&&n)for(const i of t)e[i]=Jm(n,s)}const Cd=e=>e===ir||e===R,Pd=(e,t)=>parseFloat(e.split(", ")[t]),Ed=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const s=r.match(/^matrix3d\((.+)\)$/u);if(s)return Pd(s[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?Pd(i[1],e):0}},nw=new Set(["x","y","z"]),rw=sr.filter(e=>!nw.has(e));function sw(e){const t=[];return rw.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const er={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:Ed(4,13),y:Ed(5,14)};er.translateX=er.x;er.translateY=er.y;const un=new Set;let il=!1,ol=!1;function qm(){if(ol){const e=Array.from(un).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=sw(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,o])=>{var a;(a=r.getValue(i))===null||a===void 0||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ol=!1,il=!1,un.forEach(e=>e.complete()),un.clear()}function eg(){un.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ol=!0)})}function iw(){eg(),qm()}class Bu{constructor(t,n,r,s,i,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(un.add(this),il||(il=!0,z.read(eg),z.resolveKeyframes(qm))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const o=s==null?void 0:s.get(),a=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),s&&o===void 0&&s.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),un.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,un.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const tg=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),ow=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function aw(e){const t=ow.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}function ng(e,t,n=1){const[r,s]=aw(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return tg(o)?parseFloat(o):o}return bu(s)?ng(s,t,n+1):s}const rg=e=>t=>t.test(e),lw={test:e=>e==="auto",parse:e=>e},sg=[ir,R,st,St,Zx,Yx,lw],Td=e=>sg.find(rg(e));class ig extends Bu{constructor(t,n,r,s,i){super(t,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),bu(u))){const c=ng(u,n.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Mm.has(r)||t.length!==2)return;const[s,i]=t,o=Td(s),a=Td(i);if(o!==a)if(Cd(o)&&Cd(a))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)O1(t[s])&&r.push(s);r.length&&tw(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=er[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:s}=this;if(!n||!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,a=s[o];s[o]=er[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,u])=>{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const jd=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(zt.test(e)||e==="0")&&!e.startsWith("url("));function uw(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function cw(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],o=jd(s,t),a=jd(i,t);return!o||!a?!1:uw(e)||(n==="spring"||Nu(n))&&r}const dw=e=>e!==null;function co(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(dw),i=t&&n!=="loop"&&t%2===1?0:s.length-1;return!i||r===void 0?s[i]:r}const fw=40;class og{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=it.now(),this.options={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>fw?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&iw(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=it.now(),this.hasAttemptedResolve=!0;const{name:r,type:s,velocity:i,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!cw(t,r,s,i))if(o)this.options.duration=0;else{l&&l(co(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const c=this.initPlayback(t,n);c!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const K=(e,t,n)=>e+(t-e)*n;function Ko(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function pw({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,o=0;if(!t)s=i=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=Ko(l,a,e+1/3),i=Ko(l,a,e),o=Ko(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function Mi(e,t){return n=>n>0?t:e}const Ho=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},hw=[rl,on,Fn],mw=e=>hw.find(t=>t.test(e));function Nd(e){const t=mw(e);if(!t)return!1;let n=t.parse(e);return t===Fn&&(n=pw(n)),n}const Ad=(e,t)=>{const n=Nd(e),r=Nd(t);if(!n||!r)return Mi(e,t);const s={...n};return i=>(s.red=Ho(n.red,r.red,i),s.green=Ho(n.green,r.green,i),s.blue=Ho(n.blue,r.blue,i),s.alpha=K(n.alpha,r.alpha,i),on.transform(s))},gw=(e,t)=>n=>t(e(n)),ys=(...e)=>e.reduce(gw),al=new Set(["none","hidden"]);function yw(e,t){return al.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function vw(e,t){return n=>K(e,t,n)}function Uu(e){return typeof e=="number"?vw:typeof e=="string"?bu(e)?Mi:he.test(e)?Ad:bw:Array.isArray(e)?ag:typeof e=="object"?he.test(e)?Ad:xw:Mi}function ag(e,t){const n=[...e],r=n.length,s=e.map((i,o)=>Uu(i)(i,t[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}}function xw(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=Uu(e[s])(e[s],t[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function ww(e,t){var n;const r=[],s={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],a=e.indexes[o][s[o]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[i]=l,s[o]++}return r}const bw=(e,t)=>{const n=zt.createTransformer(t),r=os(e),s=os(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?al.has(e)&&!s.values.length||al.has(t)&&!r.values.length?yw(e,t):ys(ag(ww(r,s),s.values),n):Mi(e,t)};function lg(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?K(e,t,n):Uu(e)(e,t)}const Sw=5;function ug(e,t,n){const r=Math.max(t-Sw,0);return _m(n-e(r),t-r)}const X={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Go=.001;function kw({duration:e=X.duration,bounce:t=X.bounce,velocity:n=X.velocity,mass:r=X.mass}){let s,i,o=1-t;o=yt(X.minDamping,X.maxDamping,o),e=yt(X.minDuration,X.maxDuration,ft(e)),o<1?(s=u=>{const c=u*o,f=c*e,p=c-n,g=ll(u,o),v=Math.exp(-f);return Go-p/g*v},i=u=>{const f=u*o*e,p=f*n+n,g=Math.pow(o,2)*Math.pow(u,2)*e,v=Math.exp(-f),w=ll(Math.pow(u,2),o);return(-s(u)+Go>0?-1:1)*((p-g)*v)/w}):(s=u=>{const c=Math.exp(-u*e),f=(u-n)*e+1;return-Go+c*f},i=u=>{const c=Math.exp(-u*e),f=(n-u)*(e*e);return c*f});const a=5/e,l=Pw(s,i,a);if(e=dt(e),isNaN(l))return{stiffness:X.stiffness,damping:X.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const Cw=12;function Pw(e,t,n){let r=n;for(let s=1;s<Cw;s++)r=r-e(r)/t(r);return r}function ll(e,t){return e*Math.sqrt(1-t*t)}const Ew=["duration","bounce"],Tw=["stiffness","damping","mass"];function Rd(e,t){return t.some(n=>e[n]!==void 0)}function jw(e){let t={velocity:X.velocity,stiffness:X.stiffness,damping:X.damping,mass:X.mass,isResolvedFromDuration:!1,...e};if(!Rd(e,Tw)&&Rd(e,Ew))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*yt(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:X.mass,stiffness:s,damping:i}}else{const n=kw(e);t={...t,...n,mass:X.mass},t.isResolvedFromDuration=!0}return t}function cg(e=X.visualDuration,t=X.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:u,mass:c,duration:f,velocity:p,isResolvedFromDuration:g}=jw({...n,velocity:-ft(n.velocity||0)}),v=p||0,w=u/(2*Math.sqrt(l*c)),b=o-i,h=ft(Math.sqrt(l/c)),m=Math.abs(b)<5;r||(r=m?X.restSpeed.granular:X.restSpeed.default),s||(s=m?X.restDelta.granular:X.restDelta.default);let y;if(w<1){const k=ll(h,w);y=C=>{const E=Math.exp(-w*h*C);return o-E*((v+w*h*b)/k*Math.sin(k*C)+b*Math.cos(k*C))}}else if(w===1)y=k=>o-Math.exp(-h*k)*(b+(v+h*b)*k);else{const k=h*Math.sqrt(w*w-1);y=C=>{const E=Math.exp(-w*h*C),P=Math.min(k*C,300);return o-E*((v+w*h*b)*Math.sinh(P)+k*b*Math.cosh(P))/k}}const S={calculatedDuration:g&&f||null,next:k=>{const C=y(k);if(g)a.done=k>=f;else{let E=0;w<1&&(E=k===0?dt(v):ug(y,k,C));const P=Math.abs(E)<=r,D=Math.abs(o-C)<=s;a.done=P&&D}return a.value=a.done?o:C,a},toString:()=>{const k=Math.min(jm(S),el),C=Nm(E=>S.next(k*E).value,k,30);return k+"ms "+C}};return S}function Ld({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const f=e[0],p={done:!1,value:f},g=P=>a!==void 0&&P<a||l!==void 0&&P>l,v=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l;let w=n*t;const b=f+w,h=o===void 0?b:o(b);h!==b&&(w=h-f);const m=P=>-w*Math.exp(-P/r),y=P=>h+m(P),S=P=>{const D=m(P),A=y(P);p.done=Math.abs(D)<=u,p.value=p.done?h:A};let k,C;const E=P=>{g(p.value)&&(k=P,C=cg({keyframes:[p.value,v(p.value)],velocity:ug(y,P,p.value),damping:s,stiffness:i,restDelta:u,restSpeed:c}))};return E(0),{calculatedDuration:null,next:P=>{let D=!1;return!C&&k===void 0&&(D=!0,S(P),E(P)),k!==void 0&&P>=k?C.next(P-k):(!D&&S(P),p)}}}const Nw=gs(.42,0,1,1),Aw=gs(0,0,.58,1),dg=gs(.42,0,.58,1),Rw=e=>Array.isArray(e)&&typeof e[0]!="number",Lw={linear:Ae,easeIn:Nw,easeInOut:dg,easeOut:Aw,circIn:_u,circInOut:Km,circOut:Wm,backIn:Mu,backInOut:zm,backOut:Um,anticipate:$m},Dd=e=>{if(Au(e)){lm(e.length===4);const[t,n,r,s]=e;return gs(t,n,r,s)}else if(typeof e=="string")return Lw[e];return e};function Dw(e,t,n){const r=[],s=n||lg,i=e.length-1;for(let o=0;o<i;o++){let a=s(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||Ae:t;a=ys(l,a)}r.push(a)}return r}function Fw(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const i=e.length;if(lm(i===t.length),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Dw(t,r,s),l=a.length,u=c=>{if(o&&c<e[0])return t[0];let f=0;if(l>1)for(;f<e.length-2&&!(c<e[f+1]);f++);const p=Jn(e[f],e[f+1],c);return a[f](p)};return n?c=>u(yt(e[0],e[i-1],c)):u}function Mw(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Jn(0,t,r);e.push(K(n,1,s))}}function _w(e){const t=[0];return Mw(t,e.length-1),t}function Vw(e,t){return e.map(n=>n*t)}function Ow(e,t){return e.map(()=>t||dg).splice(0,e.length-1)}function _i({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=Rw(r)?r.map(Dd):Dd(r),i={done:!1,value:t[0]},o=Vw(n&&n.length===t.length?n:_w(t),e),a=Fw(o,t,{ease:Array.isArray(s)?s:Ow(t,s)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const Iw=e=>{const t=({timestamp:n})=>e(n);return{start:()=>z.update(t,!0),stop:()=>Ut(t),now:()=>ue.isProcessing?ue.timestamp:it.now()}},Bw={decay:Ld,inertia:Ld,tween:_i,keyframes:_i,spring:cg},Uw=e=>e/100;class zu extends og{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:s,keyframes:i}=this.options,o=(s==null?void 0:s.KeyframeResolver)||Bu,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new o(i,a,n,r,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=this.options,a=Nu(n)?n:Bw[n]||_i;let l,u;a!==_i&&typeof t[0]!="number"&&(l=ys(Uw,lg(t[0],t[1])),t=[0,100]);const c=a({...this.options,keyframes:t});i==="mirror"&&(u=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=jm(c));const{calculatedDuration:f}=c,p=f+s,g=p*(r+1)-s;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:f,resolvedDuration:p,totalDuration:g}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:P}=this.options;return{done:!0,value:P[P.length-1]}}const{finalKeyframe:s,generator:i,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:c,resolvedDuration:f}=r;if(this.startTime===null)return i.next(0);const{delay:p,repeat:g,repeatType:v,repeatDelay:w,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const h=this.currentTime-p*(this.speed>=0?1:-1),m=this.speed>=0?h<0:h>c;this.currentTime=Math.max(h,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let y=this.currentTime,S=i;if(g){const P=Math.min(this.currentTime,c)/f;let D=Math.floor(P),A=P%1;!A&&P>=1&&(A=1),A===1&&D--,D=Math.min(D,g+1),!!(D%2)&&(v==="reverse"?(A=1-A,w&&(A-=w/f)):v==="mirror"&&(S=o)),y=yt(0,1,A)*f}const k=m?{done:!1,value:l[0]}:S.next(y);a&&(k.value=a(k.value));let{done:C}=k;!m&&u!==null&&(C=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return E&&s!==void 0&&(k.value=co(l,this.options,s)),b&&b(k.value),E&&this.finish(),k}get duration(){const{resolved:t}=this;return t?ft(t.calculatedDuration):0}get time(){return ft(this.currentTime)}set time(t){t=dt(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ft(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Iw,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=s):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const zw=new Set(["opacity","clipPath","filter","transform"]);function $w(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:a="easeInOut",times:l}={}){const u={[t]:n};l&&(u.offset=l);const c=Rm(a,s);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:s,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}const Ww=hu(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Vi=10,Kw=2e4;function Hw(e){return Nu(e.type)||e.type==="spring"||!Am(e.ease)}function Gw(e,t){const n=new zu({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const s=[];let i=0;for(;!r.done&&i<Kw;)r=n.sample(i),s.push(r.value),i+=Vi;return{times:void 0,keyframes:s,duration:i-Vi,ease:"linear"}}const fg={anticipate:$m,backInOut:zm,circInOut:Km};function Xw(e){return e in fg}class Fd extends og{constructor(t){super(t);const{name:n,motionValue:r,element:s,keyframes:i}=this.options;this.resolver=new ig(i,(o,a)=>this.onKeyframesResolved(o,a),n,r,s),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:s,ease:i,type:o,motionValue:a,name:l,startTime:u}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof i=="string"&&Fi()&&Xw(i)&&(i=fg[i]),Hw(this.options)){const{onComplete:f,onUpdate:p,motionValue:g,element:v,...w}=this.options,b=Gw(t,w);t=b.keyframes,t.length===1&&(t[1]=t[0]),r=b.duration,s=b.times,i=b.ease,o="keyframes"}const c=$w(a.owner.current,l,t,{...this.options,duration:r,times:s,ease:i});return c.startTime=u??this.calcStartTime(),this.pendingTimeline?(vd(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:f}=this.options;a.set(co(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:r,times:s,type:o,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return ft(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return ft(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=dt(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Ae;const{animation:r}=n;vd(r,t)}return Ae}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:s,type:i,ease:o,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:c,onComplete:f,element:p,...g}=this.options,v=new zu({...g,keyframes:r,duration:s,type:i,ease:o,times:a,isGenerator:!0}),w=dt(this.time);u.setWithVelocity(v.sample(w-Vi).value,v.sample(w).value,Vi)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:s,repeatType:i,damping:o,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=n.owner.getProps();return Ww()&&r&&zw.has(r)&&!l&&!u&&!s&&i!=="mirror"&&o!==0&&a!=="inertia"}}const Qw={type:"spring",stiffness:500,damping:25,restSpeed:10},Yw=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Zw={type:"keyframes",duration:.8},Jw={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},qw=(e,{keyframes:t})=>t.length>2?Zw:xn.has(e)?e.startsWith("scale")?Yw(t[1]):Qw:Jw;function eb({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const $u=(e,t,n,r={},s,i)=>o=>{const a=ju(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-dt(l);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:p=>{t.set(p),a.onUpdate&&a.onUpdate(p)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:s};eb(a)||(c={...c,...qw(e,c)}),c.duration&&(c.duration=dt(c.duration)),c.repeatDelay&&(c.repeatDelay=dt(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(f=!0)),f&&!i&&t.get()!==void 0){const p=co(c.keyframes,a);if(p!==void 0)return z.update(()=>{c.onUpdate(p),c.onComplete()}),new x1([])}return!i&&Fd.supports(c)?new Fd(c):new zu(c)};function tb({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function pg(e,t,{delay:n=0,transitionOverride:r,type:s}={}){var i;let{transition:o=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(o=r);const u=[],c=s&&e.animationState&&e.animationState.getState()[s];for(const f in l){const p=e.getValue(f,(i=e.latestValues[f])!==null&&i!==void 0?i:null),g=l[f];if(g===void 0||c&&tb(c,f))continue;const v={delay:n,...ju(o||{},f)};let w=!1;if(window.MotionHandoffAnimation){const h=Vm(e);if(h){const m=window.MotionHandoffAnimation(h,f,z);m!==null&&(v.startTime=m,w=!0)}}nl(e,f),p.start($u(f,p,g,e.shouldReduceMotion&&Mm.has(f)?{type:!1}:v,e,w));const b=p.animation;b&&u.push(b)}return a&&Promise.all(u).then(()=>{z.update(()=>{a&&D1(e,a)})}),u}function ul(e,t,n={}){var r;const s=uo(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(pg(e,s,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:f,staggerDirection:p}=i;return nb(e,t,c+u,f,p,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[u,c]=l==="beforeChildren"?[o,a]:[a,o];return u().then(()=>c())}else return Promise.all([o(),a(n.delay)])}function nb(e,t,n=0,r=0,s=1,i){const o=[],a=(e.variantChildren.size-1)*r,l=s===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(rb).forEach((u,c)=>{u.notify("AnimationStart",t),o.push(ul(u,t,{...i,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function rb(e,t){return e.sortNodePosition(t)}function sb(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>ul(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=ul(e,t,n);else{const s=typeof t=="function"?uo(e,t,n.custom):t;r=Promise.all(pg(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const ib=gu.length;function hg(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?hg(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<ib;n++){const r=gu[n],s=e.props[r];(rs(s)||s===!1)&&(t[r]=s)}return t}const ob=[...mu].reverse(),ab=mu.length;function lb(e){return t=>Promise.all(t.map(({animation:n,options:r})=>sb(e,n,r)))}function ub(e){let t=lb(e),n=Md(),r=!0;const s=l=>(u,c)=>{var f;const p=uo(e,c,l==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(p){const{transition:g,transitionEnd:v,...w}=p;u={...u,...w,...v}}return u};function i(l){t=l(e)}function o(l){const{props:u}=e,c=hg(e.parent)||{},f=[],p=new Set;let g={},v=1/0;for(let b=0;b<ab;b++){const h=ob[b],m=n[h],y=u[h]!==void 0?u[h]:c[h],S=rs(y),k=h===l?m.isActive:null;k===!1&&(v=b);let C=y===c[h]&&y!==u[h]&&S;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),m.protectedKeys={...g},!m.isActive&&k===null||!y&&!m.prevProp||ao(y)||typeof y=="boolean")continue;const E=cb(m.prevProp,y);let P=E||h===l&&m.isActive&&!C&&S||b>v&&S,D=!1;const A=Array.isArray(y)?y:[y];let ee=A.reduce(s(h),{});k===!1&&(ee={});const{prevResolvedValues:wt={}}=m,Xt={...wt,...ee},ar=ne=>{P=!0,p.has(ne)&&(D=!0,p.delete(ne)),m.needsAnimating[ne]=!0;const j=e.getValue(ne);j&&(j.liveStyle=!1)};for(const ne in Xt){const j=ee[ne],L=wt[ne];if(g.hasOwnProperty(ne))continue;let F=!1;qa(j)&&qa(L)?F=!Tm(j,L):F=j!==L,F?j!=null?ar(ne):p.add(ne):j!==void 0&&p.has(ne)?ar(ne):m.protectedKeys[ne]=!0}m.prevProp=y,m.prevResolvedValues=ee,m.isActive&&(g={...g,...ee}),r&&e.blockInitialAnimation&&(P=!1),P&&(!(C&&E)||D)&&f.push(...A.map(ne=>({animation:ne,options:{type:h}})))}if(p.size){const b={};p.forEach(h=>{const m=e.getBaseTarget(h),y=e.getValue(h);y&&(y.liveStyle=!0),b[h]=m??null}),f.push({animation:b})}let w=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(w=!1),r=!1,w?t(f):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(p=>{var g;return(g=p.animationState)===null||g===void 0?void 0:g.setActive(l,u)}),n[l].isActive=u;const f=o(l);for(const p in n)n[p].protectedKeys={};return f}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Md(),r=!0}}}function cb(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Tm(t,e):!1}function Zt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Md(){return{animate:Zt(!0),whileInView:Zt(),whileHover:Zt(),whileTap:Zt(),whileDrag:Zt(),whileFocus:Zt(),exit:Zt()}}class Gt{constructor(t){this.isMounted=!1,this.node=t}update(){}}class db extends Gt{constructor(t){super(t),t.animationState||(t.animationState=ub(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ao(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let fb=0;class pb extends Gt{constructor(){super(...arguments),this.id=fb++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const hb={animation:{Feature:db},exit:{Feature:pb}};function as(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function vs(e){return{point:{x:e.pageX,y:e.pageY}}}const mb=e=>t=>Ru(t)&&e(t,vs(t));function Mr(e,t,n,r){return as(e,t,mb(n),r)}const _d=(e,t)=>Math.abs(e-t);function gb(e,t){const n=_d(e.x,t.x),r=_d(e.y,t.y);return Math.sqrt(n**2+r**2)}class mg{constructor(t,n,{transformPagePoint:r,contextWindow:s,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Qo(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,g=gb(f.offset,{x:0,y:0})>=3;if(!p&&!g)return;const{point:v}=f,{timestamp:w}=ue;this.history.push({...v,timestamp:w});const{onStart:b,onMove:h}=this.handlers;p||(b&&b(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),h&&h(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Xo(p,this.transformPagePoint),z.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();const{onEnd:g,onSessionEnd:v,resumeAnimation:w}=this.handlers;if(this.dragSnapToOrigin&&w&&w(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Qo(f.type==="pointercancel"?this.lastMoveEventInfo:Xo(p,this.transformPagePoint),this.history);this.startEvent&&g&&g(f,b),v&&v(f,b)},!Ru(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=s||window;const o=vs(t),a=Xo(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=ue;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=n;c&&c(t,Qo(a,this.history)),this.removeListeners=ys(Mr(this.contextWindow,"pointermove",this.handlePointerMove),Mr(this.contextWindow,"pointerup",this.handlePointerUp),Mr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ut(this.updatePoint)}}function Xo(e,t){return t?{point:t(e.point)}:e}function Vd(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Qo({point:e},t){return{point:e,delta:Vd(e,gg(t)),offset:Vd(e,yb(t)),velocity:vb(t,.1)}}function yb(e){return e[0]}function gg(e){return e[e.length-1]}function vb(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=gg(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>dt(t)));)n--;if(!r)return{x:0,y:0};const i=ft(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const yg=1e-4,xb=1-yg,wb=1+yg,vg=.01,bb=0-vg,Sb=0+vg;function Le(e){return e.max-e.min}function kb(e,t,n){return Math.abs(e-t)<=n}function Od(e,t,n,r=.5){e.origin=r,e.originPoint=K(t.min,t.max,e.origin),e.scale=Le(n)/Le(t),e.translate=K(n.min,n.max,e.origin)-e.originPoint,(e.scale>=xb&&e.scale<=wb||isNaN(e.scale))&&(e.scale=1),(e.translate>=bb&&e.translate<=Sb||isNaN(e.translate))&&(e.translate=0)}function _r(e,t,n,r){Od(e.x,t.x,n.x,r?r.originX:void 0),Od(e.y,t.y,n.y,r?r.originY:void 0)}function Id(e,t,n){e.min=n.min+t.min,e.max=e.min+Le(t)}function Cb(e,t,n){Id(e.x,t.x,n.x),Id(e.y,t.y,n.y)}function Bd(e,t,n){e.min=t.min-n.min,e.max=e.min+Le(t)}function Vr(e,t,n){Bd(e.x,t.x,n.x),Bd(e.y,t.y,n.y)}function Pb(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?K(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?K(n,e,r.max):Math.min(e,n)),e}function Ud(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Eb(e,{top:t,left:n,bottom:r,right:s}){return{x:Ud(e.x,n,s),y:Ud(e.y,t,r)}}function zd(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Tb(e,t){return{x:zd(e.x,t.x),y:zd(e.y,t.y)}}function jb(e,t){let n=.5;const r=Le(e),s=Le(t);return s>r?n=Jn(t.min,t.max-r,e.min):r>s&&(n=Jn(e.min,e.max-s,t.min)),yt(0,1,n)}function Nb(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const cl=.35;function Ab(e=cl){return e===!1?e=0:e===!0&&(e=cl),{x:$d(e,"left","right"),y:$d(e,"top","bottom")}}function $d(e,t,n){return{min:Wd(e,t),max:Wd(e,n)}}function Wd(e,t){return typeof e=="number"?e:e[t]||0}const Kd=()=>({translate:0,scale:1,origin:0,originPoint:0}),Mn=()=>({x:Kd(),y:Kd()}),Hd=()=>({min:0,max:0}),J=()=>({x:Hd(),y:Hd()});function Ve(e){return[e("x"),e("y")]}function xg({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Rb({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Lb(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}}function Yo(e){return e===void 0||e===1}function dl({scale:e,scaleX:t,scaleY:n}){return!Yo(e)||!Yo(t)||!Yo(n)}function en(e){return dl(e)||wg(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function wg(e){return Gd(e.x)||Gd(e.y)}function Gd(e){return e&&e!=="0%"}function Oi(e,t,n){const r=e-n,s=t*r;return n+s}function Xd(e,t,n,r,s){return s!==void 0&&(e=Oi(e,s,r)),Oi(e,n,r)+t}function fl(e,t=0,n=1,r,s){e.min=Xd(e.min,t,n,r,s),e.max=Xd(e.max,t,n,r,s)}function bg(e,{x:t,y:n}){fl(e.x,t.translate,t.scale,t.originPoint),fl(e.y,n.translate,n.scale,n.originPoint)}const Qd=.999999999999,Yd=1.0000000000001;function Db(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let i,o;for(let a=0;a<s;a++){i=n[a],o=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Vn(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,bg(e,o)),r&&en(i.latestValues)&&Vn(e,i.latestValues))}t.x<Yd&&t.x>Qd&&(t.x=1),t.y<Yd&&t.y>Qd&&(t.y=1)}function _n(e,t){e.min=e.min+t,e.max=e.max+t}function Zd(e,t,n,r,s=.5){const i=K(e.min,e.max,s);fl(e,t,n,i,r)}function Vn(e,t){Zd(e.x,t.x,t.scaleX,t.scale,t.originX),Zd(e.y,t.y,t.scaleY,t.scale,t.originY)}function Sg(e,t){return xg(Lb(e.getBoundingClientRect(),t))}function Fb(e,t,n){const r=Sg(e,n),{scroll:s}=t;return s&&(_n(r.x,s.offset.x),_n(r.y,s.offset.y)),r}const kg=({current:e})=>e?e.ownerDocument.defaultView:null,Mb=new WeakMap;class _b{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=J(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=c=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(vs(c).point)},i=(c,f)=>{const{drag:p,dragPropagation:g,onDragStart:v}=this.getProps();if(p&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=j1(p),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ve(b=>{let h=this.getAxisMotionValue(b).get()||0;if(st.test(h)){const{projection:m}=this.visualElement;if(m&&m.layout){const y=m.layout.layoutBox[b];y&&(h=Le(y)*(parseFloat(h)/100))}}this.originPoint[b]=h}),v&&z.postRender(()=>v(c,f)),nl(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},o=(c,f)=>{const{dragPropagation:p,dragDirectionLock:g,onDirectionLock:v,onDrag:w}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:b}=f;if(g&&this.currentDirection===null){this.currentDirection=Vb(b),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",f.point,b),this.updateAxis("y",f.point,b),this.visualElement.render(),w&&w(c,f)},a=(c,f)=>this.stop(c,f),l=()=>Ve(c=>{var f;return this.getAnimationState(c)==="paused"&&((f=this.getAxisMotionValue(c).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new mg(t,{onSessionStart:s,onStart:i,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:kg(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&z.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!Ws(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=Pb(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&Dn(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=Eb(s.layoutBox,n):this.constraints=!1,this.elastic=Ab(r),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&Ve(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Nb(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Dn(t))return!1;const r=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=Fb(r,s.root,this.visualElement.getTransformPagePoint());let o=Tb(s.layout.layoutBox,i);if(n){const a=n(Rb(o));this.hasMutatedConstraints=!!a,a&&(o=xg(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Ve(c=>{if(!Ws(c,n,this.currentDirection))return;let f=l&&l[c]||{};o&&(f={min:0,max:0});const p=s?200:1e6,g=s?40:1e7,v={type:"inertia",velocity:r?t[c]:0,bounceStiffness:p,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(c,v)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return nl(this.visualElement,t),r.start($u(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ve(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ve(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ve(n=>{const{drag:r}=this.getProps();if(!Ws(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n];i.set(t[n]-K(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Dn(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Ve(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();s[o]=jb({min:l,max:l},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ve(o=>{if(!Ws(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(K(l,u,s[o]))})}addListeners(){if(!this.visualElement.current)return;Mb.set(this.visualElement,this);const t=this.visualElement.current,n=Mr(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Dn(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,i=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),z.read(r);const o=as(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Ve(c=>{const f=this.getAxisMotionValue(c);f&&(this.originPoint[c]+=l[c].translate,f.set(f.get()+l[c].translate))}),this.visualElement.render())});return()=>{o(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=cl,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function Ws(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Vb(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Ob extends Gt{constructor(t){super(t),this.removeGroupControls=Ae,this.removeListeners=Ae,this.controls=new _b(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ae}unmount(){this.removeGroupControls(),this.removeListeners()}}const Jd=e=>(t,n)=>{e&&z.postRender(()=>e(t,n))};class Ib extends Gt{constructor(){super(...arguments),this.removePointerDownListener=Ae}onPointerDown(t){this.session=new mg(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:kg(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:Jd(t),onStart:Jd(n),onMove:r,onEnd:(i,o)=>{delete this.session,s&&z.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=Mr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ii={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function qd(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const gr={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(R.test(e))e=parseFloat(e);else return e;const n=qd(e,t.target.x),r=qd(e,t.target.y);return`${n}% ${r}%`}},Bb={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=zt.parse(e);if(s.length>5)return r;const i=zt.createTransformer(e),o=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+o]/=a,s[1+o]/=l;const u=K(a,l,.5);return typeof s[2+o]=="number"&&(s[2+o]/=u),typeof s[3+o]=="number"&&(s[3+o]/=u),i(s)}};class Ub extends x.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;a1(zb),i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),ii.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,o=r.projection;return o&&(o.isPresent=i,s||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||z.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),vu.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Cg(e){const[t,n]=im(),r=x.useContext(cu);return d.jsx(Ub,{...e,layoutGroup:r,switchLayoutGroup:x.useContext(hm),isPresent:t,safeToRemove:n})}const zb={borderRadius:{...gr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:gr,borderTopRightRadius:gr,borderBottomLeftRadius:gr,borderBottomRightRadius:gr,boxShadow:Bb};function $b(e,t,n){const r=ge(e)?e:is(e);return r.start($u("",r,t,n)),r.animation}function Wb(e){return e instanceof SVGElement&&e.tagName!=="svg"}const Kb=(e,t)=>e.depth-t.depth;class Hb{constructor(){this.children=[],this.isDirty=!1}add(t){Lu(this.children,t),this.isDirty=!0}remove(t){Du(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Kb),this.isDirty=!1,this.children.forEach(t)}}function Gb(e,t){const n=it.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(Ut(r),e(i-t))};return z.read(r,!0),()=>Ut(r)}const Pg=["TopLeft","TopRight","BottomLeft","BottomRight"],Xb=Pg.length,ef=e=>typeof e=="string"?parseFloat(e):e,tf=e=>typeof e=="number"||R.test(e);function Qb(e,t,n,r,s,i){s?(e.opacity=K(0,n.opacity!==void 0?n.opacity:1,Yb(r)),e.opacityExit=K(t.opacity!==void 0?t.opacity:1,0,Zb(r))):i&&(e.opacity=K(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;o<Xb;o++){const a=`border${Pg[o]}Radius`;let l=nf(t,a),u=nf(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||tf(l)===tf(u)?(e[a]=Math.max(K(ef(l),ef(u),r),0),(st.test(u)||st.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=K(t.rotate||0,n.rotate||0,r))}function nf(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Yb=Eg(0,.5,Wm),Zb=Eg(.5,.95,Ae);function Eg(e,t,n){return r=>r<e?0:r>t?1:n(Jn(e,t,r))}function rf(e,t){e.min=t.min,e.max=t.max}function Me(e,t){rf(e.x,t.x),rf(e.y,t.y)}function sf(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function of(e,t,n,r,s){return e-=t,e=Oi(e,1/n,r),s!==void 0&&(e=Oi(e,1/s,r)),e}function Jb(e,t=0,n=1,r=.5,s,i=e,o=e){if(st.test(t)&&(t=parseFloat(t),t=K(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=K(i.min,i.max,r);e===i&&(a-=t),e.min=of(e.min,t,n,a,s),e.max=of(e.max,t,n,a,s)}function af(e,t,[n,r,s],i,o){Jb(e,t[n],t[r],t[s],t.scale,i,o)}const qb=["x","scaleX","originX"],eS=["y","scaleY","originY"];function lf(e,t,n,r){af(e.x,t,qb,n?n.x:void 0,r?r.x:void 0),af(e.y,t,eS,n?n.y:void 0,r?r.y:void 0)}function uf(e){return e.translate===0&&e.scale===1}function Tg(e){return uf(e.x)&&uf(e.y)}function cf(e,t){return e.min===t.min&&e.max===t.max}function tS(e,t){return cf(e.x,t.x)&&cf(e.y,t.y)}function df(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function jg(e,t){return df(e.x,t.x)&&df(e.y,t.y)}function ff(e){return Le(e.x)/Le(e.y)}function pf(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class nS{constructor(){this.members=[]}add(t){Lu(this.members,t),t.scheduleRender()}remove(t){if(Du(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function rS(e,t,n){let r="";const s=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:f,rotateY:p,skewX:g,skewY:v}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),f&&(r+=`rotateX(${f}deg) `),p&&(r+=`rotateY(${p}deg) `),g&&(r+=`skewX(${g}deg) `),v&&(r+=`skewY(${v}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const tn={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},kr=typeof window<"u"&&window.MotionDebug!==void 0,Zo=["","X","Y","Z"],sS={visibility:"hidden"},hf=1e3;let iS=0;function Jo(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Ng(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Vm(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",z,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Ng(r)}function Ag({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=t==null?void 0:t()){this.id=iS++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,kr&&(tn.totalNodes=tn.resolvedTargetDeltas=tn.recalculatedProjection=0),this.nodes.forEach(lS),this.nodes.forEach(pS),this.nodes.forEach(hS),this.nodes.forEach(uS),kr&&window.MotionDebug.record(tn)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Hb)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Fu),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Wb(o),this.instance=o;const{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),e){let f;const p=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=Gb(p,250),ii.hasAnimatedSinceResize&&(ii.hasAnimatedSinceResize=!1,this.nodes.forEach(gf))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:p,hasRelativeTargetChanged:g,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||c.getDefaultTransition()||xS,{onLayoutAnimationStart:b,onLayoutAnimationComplete:h}=c.getProps(),m=!this.targetLayout||!jg(this.targetLayout,v)||g,y=!p&&g;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||p&&(m||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,y);const S={...ju(w,"layout"),onPlay:b,onComplete:h};(c.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else p||gf(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ut(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(mS),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ng(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const f=this.path[c];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(mf);return}this.isUpdating||this.nodes.forEach(dS),this.isUpdating=!1,this.nodes.forEach(fS),this.nodes.forEach(oS),this.nodes.forEach(aS),this.clearAllSnapshots();const a=it.now();ue.delta=yt(0,1e3/60,a-ue.timestamp),ue.timestamp=a,ue.isProcessing=!0,zo.update.process(ue),zo.preRender.process(ue),zo.render.process(ue),ue.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,vu.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(cS),this.sharedNodes.forEach(gS)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,z.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){z.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=J(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Tg(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&(a||en(this.latestValues)||c)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),wS(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:a}=this.options;if(!a)return J();const l=a.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(bS))){const{scroll:c}=this.root;c&&(_n(l.x,c.offset.x),_n(l.y,c.offset.y))}return l}removeElementScroll(o){var a;const l=J();if(Me(l,o),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:f,options:p}=c;c!==this.root&&f&&p.layoutScroll&&(f.wasRoot&&Me(l,o),_n(l.x,f.offset.x),_n(l.y,f.offset.y))}return l}applyTransform(o,a=!1){const l=J();Me(l,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Vn(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),en(c.latestValues)&&Vn(l,c.latestValues)}return en(this.latestValues)&&Vn(l,this.latestValues),l}removeTransform(o){const a=J();Me(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!en(u.latestValues))continue;dl(u.latestValues)&&u.updateSnapshot();const c=J(),f=u.measurePageBox();Me(c,f),lf(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return en(this.latestValues)&&lf(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ue.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(o||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:p}=this.options;if(!(!this.layout||!(f||p))){if(this.resolvedRelativeTargetAt=ue.timestamp,!this.targetDelta&&!this.relativeTarget){const g=this.getClosestProjectingParent();g&&g.layout&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=J(),this.relativeTargetOrigin=J(),Vr(this.relativeTargetOrigin,this.layout.layoutBox,g.layout.layoutBox),Me(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=J(),this.targetWithTransforms=J()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Cb(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Me(this.target,this.layout.layoutBox),bg(this.target,this.targetDelta)):Me(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const g=this.getClosestProjectingParent();g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=J(),this.relativeTargetOrigin=J(),Vr(this.relativeTargetOrigin,this.target,g.target),Me(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}kr&&tn.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||dl(this.parent.latestValues)||wg(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let u=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===ue.timestamp&&(u=!1),u)return;const{layout:c,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||f))return;Me(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,g=this.treeScale.y;Db(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=J());const{target:v}=a;if(!v){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(sf(this.prevProjectionDelta.x,this.projectionDelta.x),sf(this.prevProjectionDelta.y,this.projectionDelta.y)),_r(this.projectionDelta,this.layoutCorrected,v,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==g||!pf(this.projectionDelta.x,this.prevProjectionDelta.x)||!pf(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",v)),kr&&tn.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Mn(),this.projectionDelta=Mn(),this.projectionDeltaWithTransform=Mn()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},f=Mn();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const p=J(),g=l?l.source:void 0,v=this.layout?this.layout.source:void 0,w=g!==v,b=this.getStack(),h=!b||b.members.length<=1,m=!!(w&&!h&&this.options.crossfade===!0&&!this.path.some(vS));this.animationProgress=0;let y;this.mixTargetDelta=S=>{const k=S/1e3;yf(f.x,o.x,k),yf(f.y,o.y,k),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Vr(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),yS(this.relativeTarget,this.relativeTargetOrigin,p,k),y&&tS(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=J()),Me(y,this.relativeTarget)),w&&(this.animationValues=c,Qb(c,u,this.latestValues,k,m,h)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ut(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=z.update(()=>{ii.hasAnimatedSinceResize=!0,this.currentAnimation=$b(0,hf,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(hf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&Rg(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||J();const f=Le(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+f;const p=Le(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+p}Me(a,l),Vn(a,c),_r(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new nS),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Jo("z",o,u,this.animationValues);for(let c=0;c<Zo.length;c++)Jo(`rotate${Zo[c]}`,o,u,this.animationValues),Jo(`skew${Zo[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}getProjectionStyles(o){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return sS;const u={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=ri(o==null?void 0:o.pointerEvents)||"",u.transform=c?c(this.latestValues,""):"none",u;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const w={};return this.options.layoutId&&(w.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,w.pointerEvents=ri(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!en(this.latestValues)&&(w.transform=c?c({},""):"none",this.hasProjected=!1),w}const p=f.animationValues||f.latestValues;this.applyTransformsToTarget(),u.transform=rS(this.projectionDeltaWithTransform,this.treeScale,p),c&&(u.transform=c(p,u.transform));const{x:g,y:v}=this.projectionDelta;u.transformOrigin=`${g.origin*100}% ${v.origin*100}% 0`,f.animationValues?u.opacity=f===this?(l=(a=p.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:u.opacity=f===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const w in Di){if(p[w]===void 0)continue;const{correct:b,applyTo:h}=Di[w],m=u.transform==="none"?p[w]:b(p[w],f);if(h){const y=h.length;for(let S=0;S<y;S++)u[h[S]]=m}else u[w]=m}return this.options.layoutId&&(u.pointerEvents=f===this?ri(o==null?void 0:o.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(mf),this.root.sharedNodes.clear()}}}function oS(e){e.updateLayout()}function aS(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:i}=e.options,o=n.source!==e.layout.source;i==="size"?Ve(f=>{const p=o?n.measuredBox[f]:n.layoutBox[f],g=Le(p);p.min=r[f].min,p.max=p.min+g}):Rg(i,n.layoutBox,r)&&Ve(f=>{const p=o?n.measuredBox[f]:n.layoutBox[f],g=Le(r[f]);p.max=p.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+g)});const a=Mn();_r(a,r,n.layoutBox);const l=Mn();o?_r(l,e.applyTransform(s,!0),n.measuredBox):_r(l,r,n.layoutBox);const u=!Tg(a);let c=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:p,layout:g}=f;if(p&&g){const v=J();Vr(v,n.layoutBox,p.layoutBox);const w=J();Vr(w,r,g.layoutBox),jg(v,w)||(c=!0),f.options.layoutRoot&&(e.relativeTarget=w,e.relativeTargetOrigin=v,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function lS(e){kr&&tn.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function uS(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function cS(e){e.clearSnapshot()}function mf(e){e.clearMeasurements()}function dS(e){e.isLayoutDirty=!1}function fS(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function gf(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function pS(e){e.resolveTargetDelta()}function hS(e){e.calcProjection()}function mS(e){e.resetSkewAndRotation()}function gS(e){e.removeLeadSnapshot()}function yf(e,t,n){e.translate=K(t.translate,0,n),e.scale=K(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function vf(e,t,n,r){e.min=K(t.min,n.min,r),e.max=K(t.max,n.max,r)}function yS(e,t,n,r){vf(e.x,t.x,n.x,r),vf(e.y,t.y,n.y,r)}function vS(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const xS={duration:.45,ease:[.4,0,.1,1]},xf=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),wf=xf("applewebkit/")&&!xf("chrome/")?Math.round:Ae;function bf(e){e.min=wf(e.min),e.max=wf(e.max)}function wS(e){bf(e.x),bf(e.y)}function Rg(e,t,n){return e==="position"||e==="preserve-aspect"&&!kb(ff(t),ff(n),.2)}function bS(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const SS=Ag({attachResizeListener:(e,t)=>as(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),qo={current:void 0},Lg=Ag({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!qo.current){const e=new SS({});e.mount(window),e.setOptions({layoutScroll:!0}),qo.current=e}return qo.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),kS={pan:{Feature:Ib},drag:{Feature:Ob,ProjectionNode:Lg,MeasureLayout:Cg}};function Sf(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&z.postRender(()=>i(t,vs(t)))}class CS extends Gt{mount(){const{current:t}=this.node;t&&(this.unmount=k1(t,n=>(Sf(this.node,n,"Start"),r=>Sf(this.node,r,"End"))))}unmount(){}}class PS extends Gt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ys(as(this.node.current,"focus",()=>this.onFocus()),as(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function kf(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&z.postRender(()=>i(t,vs(t)))}class ES extends Gt{mount(){const{current:t}=this.node;t&&(this.unmount=T1(t,n=>(kf(this.node,n,"Start"),(r,{success:s})=>kf(this.node,r,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const pl=new WeakMap,ea=new WeakMap,TS=e=>{const t=pl.get(e.target);t&&t(e)},jS=e=>{e.forEach(TS)};function NS({root:e,...t}){const n=e||document;ea.has(n)||ea.set(n,{});const r=ea.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(jS,{root:e,...t})),r[s]}function AS(e,t,n){const r=NS(t);return pl.set(e,n),r.observe(e),()=>{pl.delete(e),r.unobserve(e)}}const RS={some:0,all:1};class LS extends Gt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:RS[s]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:f}=this.node.getProps(),p=u?c:f;p&&p(l)};return AS(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(DS(t,n))&&this.startObserver()}unmount(){}}function DS({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const FS={inView:{Feature:LS},tap:{Feature:ES},focus:{Feature:PS},hover:{Feature:CS}},MS={layout:{ProjectionNode:Lg,MeasureLayout:Cg}},hl={current:null},Dg={current:!1};function _S(){if(Dg.current=!0,!!pu)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>hl.current=e.matches;e.addListener(t),t()}else hl.current=!1}const VS=[...sg,he,zt],OS=e=>VS.find(rg(e)),Cf=new WeakMap;function IS(e,t,n){for(const r in t){const s=t[r],i=n[r];if(ge(s))e.addValue(r,s);else if(ge(i))e.addValue(r,is(s,{owner:e}));else if(i!==s)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(r);e.addValue(r,is(o!==void 0?o:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Pf=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class BS{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:i,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Bu,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=it.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,z.render(this.render,!1,!0))};const{latestValues:l,renderState:u,onUpdate:c}=o;this.onUpdate=c,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=lo(n),this.isVariantNode=fm(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in p){const v=p[g];l[g]!==void 0&&ge(v)&&v.set(l[g],!1)}}mount(t){this.current=t,Cf.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Dg.current||_S(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:hl.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Cf.delete(this.current),this.projection&&this.projection.unmount(),Ut(this.notifyUpdate),Ut(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=xn.has(t),s=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&z.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in qn){const n=qn[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):J()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Pf.length;r++){const s=Pf[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,o=t[i];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=IS(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=is(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(tg(s)||Hm(s))?s=parseFloat(s):!OS(s)&&zt.test(n)&&(s=Jm(t,n)),this.setBaseTarget(t,ge(s)?s.get():s)),ge(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let s;if(typeof r=="string"||typeof r=="object"){const o=wu(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(s=o[t])}if(r&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!ge(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Fu),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Fg extends BS{constructor(){super(...arguments),this.KeyframeResolver=ig}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ge(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function US(e){return window.getComputedStyle(e)}class zS extends Fg{constructor(){super(...arguments),this.type="html",this.renderInstance=bm}readValueFromInstance(t,n){if(xn.has(n)){const r=Iu(n);return r&&r.default||0}else{const r=US(t),s=(vm(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Sg(t,n)}build(t,n,r){ku(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Tu(t,n,r)}}class $S extends Fg{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=J}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(xn.has(n)){const r=Iu(n);return r&&r.default||0}return n=Sm.has(n)?n:yu(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Pm(t,n,r)}build(t,n,r){Cu(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,s){km(t,n,r,s)}mount(t){this.isSVGTag=Eu(t.tagName),super.mount(t)}}const WS=(e,t)=>xu(e)?new $S(t):new zS(t,{allowProjection:e!==x.Fragment}),KS=g1({...hb,...FS,...kS,...MS},WS),O=Rx(KS);function Mg(){return(localStorage.getItem("apiBase")||"").replace(/\/+$/,"")}function xs(e){const t=Mg(),n=e.startsWith("/")?e:`/${e}`;return t?`${t}${n}`:n}async function fo(e){const t=await fetch(xs(e));if(!t.ok)throw new Error(await t.text());return t.json()}async function vt(e,t){const n=await fetch(xs(e),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw new Error(await n.text());return n.json()}const HS=()=>{const e=Mg();if(e)try{const r=new URL(e.includes("://")?e:`http://${e}`);return`${r.protocol==="https:"?"wss:":"ws:"}//${r.host}/ws`}catch{}const t=window.location;return`${t.protocol==="https:"?"wss:":"ws:"}//${t.host}/ws`};function GS(e){const[t,n]=x.useState(!1),r=x.useRef(e);return r.current=e,x.useEffect(()=>{let s=!1,i=0,o,a=null;const l=()=>{s||(a=new WebSocket(HS()),a.onopen=()=>{i=0,n(!0),a==null||a.send("ping")},a.onclose=()=>{n(!1),i+=1,o=setTimeout(l,Math.min(8e3,500+i*400))},a.onerror=()=>a==null?void 0:a.close(),a.onmessage=u=>r.current(String(u.data)))};return l(),()=>{s=!0,clearTimeout(o),a==null||a.close()}},[]),t}const _g=x.createContext(null),Wu=5e3,Ku="pn532_browser_log_v1";function XS(){try{const e=sessionStorage.getItem(Ku);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.slice(-Wu):[]}catch{return[]}}function QS(e){try{sessionStorage.setItem(Ku,JSON.stringify(e.slice(-Wu)))}catch{}}function YS(e,t,n){if(typeof e=="object"&&e&&"present"in e&&e.present===!1){t(null),n(!1);return}n(!0),typeof e=="object"&&e&&"uid"in e&&t(e)}function ZS(e){if(!e||typeof e!="object")return!1;const t=e;return t.present===!1?!1:typeof t.uid=="string"&&t.uid.length>0}function JS(e){return!e||typeof e!="object"?!1:e.event==="recorded"}function qS({children:e}){const[t,n]=x.useState(null),[r,s]=x.useState(!1),[i,o]=x.useState(!1),[a,l]=x.useState(()=>XS()),[u,c]=x.useState(0),[f,p]=x.useState("tag"),g=x.useRef(0),v=x.useCallback(k=>{const C=Date.now();k==="tag"&&C-g.current<280||(g.current=C,p(k),c(E=>E+1))},[]),w=x.useCallback(k=>{try{const C=JSON.parse(k),E=C.channel||"unknown";if(l(P=>{const D=[...P,{t:Date.now(),channel:E,payload:C.payload}].slice(-Wu);return QS(D),D}),E==="scan")YS(C.payload,n,s),ZS(C.payload)&&v("tag");else if(E==="capture"&&JS(C.payload))v("vault");else if(E==="pn532"){const P=C.payload;typeof(P==null?void 0:P.connected)=="boolean"&&o(P.connected)}}catch{}},[v]),b=GS(w);x.useEffect(()=>{b&&fo("/api/status").then(k=>{typeof k.pn532Connected=="boolean"&&o(k.pn532Connected)}).catch(()=>{})},[b]);const h=x.useCallback((k,C)=>{if(!k){n(null),s(!1);return}C&&(n(C),s(!0),v("tag"))},[v]),m=x.useCallback(()=>{l([]),sessionStorage.removeItem(Ku)},[]),y=x.useCallback(()=>{const k=new Blob([JSON.stringify(a,null,2)],{type:"application/json"}),C=URL.createObjectURL(k),E=document.createElement("a");E.href=C,E.download=`pn532-browser-log-${Date.now()}.json`,E.click(),URL.revokeObjectURL(C)},[a]),S=x.useMemo(()=>({wsOk:b,pn532Connected:i,lastTag:t,tagPresent:r,log:a,cashWave:u,cashVariant:f,clearBrowserLog:m,exportBrowserLog:y,applyScanPoll:h}),[b,i,t,r,a,u,f,m,y,h]);return d.jsx(_g.Provider,{value:S,children:e})}function or(){const e=x.useContext(_g);if(!e)throw new Error("useNfcWs outside NfcWsProvider");return e}function e2(){const{log:e,exportBrowserLog:t,clearBrowserLog:n,wsOk:r}=or();return d.jsxs("div",{className:"flash-log-bar relative z-40 mx-auto flex max-w-6xl flex-wrap items-center justify-between gap-2 overflow-hidden border-b border-bubble-accent/15 px-4 py-2.5 font-mono text-[10px] text-bubble-mint/80 sm:text-xs",children:[d.jsx("div",{className:"pointer-events-none absolute inset-0 overflow-hidden",children:d.jsx("div",{className:"absolute inset-y-0 left-0 w-1/3 bg-gradient-to-r from-bubble-accent/10 to-transparent animate-shimmerLine"})}),d.jsxs("div",{className:"relative flex min-w-0 flex-1 flex-wrap items-center gap-x-3 gap-y-1",children:[d.jsx("span",{className:"shrink-0 animate-pulse text-bubble-volt",children:"◆"}),d.jsxs("span",{className:"truncate",children:[d.jsx("span",{className:"text-bubble-accent/70",children:"BUF"})," ",d.jsx("span",{className:"text-glow-matrix font-bold text-bubble-mint",children:e.length}),d.jsx("span",{className:"text-bubble-mint/40",children:"_evt"})]}),d.jsx("span",{className:"hidden text-bubble-mint/20 sm:inline",children:"│"}),d.jsxs("span",{children:[d.jsx("span",{className:"text-bubble-accent/60",children:"WS"})," ",d.jsx("span",{className:r?"text-glow-matrix font-bold tracking-wide text-bubble-mint":"animate-pulse text-glow-rose font-semibold text-bubble-rose",children:r?"SYNC":"WAIT"})]})]}),d.jsxs("div",{className:"relative flex shrink-0 gap-2",children:[d.jsx("button",{type:"button",onClick:t,className:"btn-neon rounded-md border border-bubble-accent/50 bg-gradient-to-r from-bubble-accent/25 to-bubble-mint/15 px-3 py-1.5 text-[10px] font-bold uppercase tracking-wider text-bubble-accent sm:text-xs",children:"Exfil"}),d.jsx("button",{type:"button",onClick:n,className:"rounded-md border border-bubble-rose/40 bg-bubble-rose/10 px-3 py-1.5 text-[10px] font-bold uppercase tracking-wide text-bubble-rose transition hover:border-bubble-rose hover:bg-bubble-rose/20 sm:text-xs",children:"Purge"})]})]})}function t2(){return d.jsxs("div",{className:"pointer-events-none fixed inset-0 z-[2] overflow-hidden",children:[d.jsx("div",{className:"absolute -left-[20%] top-[10%] h-[min(70vh,520px)] w-[min(70vh,520px)] rounded-full bg-fuchsia-600/25 blur-[100px] animate-pulseGlow",style:{animationDelay:"0s"}}),d.jsx("div",{className:"absolute -right-[15%] bottom-[5%] h-[min(55vh,440px)] w-[min(55vh,440px)] rounded-full bg-cyan-400/20 blur-[90px] animate-pulseGlow",style:{animationDelay:"1.2s"}}),d.jsx("div",{className:"absolute left-[35%] top-[40%] h-[min(45vh,360px)] w-[min(45vh,360px)] -translate-x-1/2 -translate-y-1/2 rounded-full bg-emerald-400/15 blur-[80px] animate-floatSlow"}),d.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,transparent_0%,rgba(2,4,8,0.75)_100%)]"})]})}const Ef=16,n2=7;function r2(){var e;try{const t=window.AudioContext||window.webkitAudioContext;if(!t)return;const n=new t,r=n.createGain();r.gain.value=.11,r.connect(n.destination);const s=(c,f,p)=>{const g=n.createOscillator(),v=n.createGain();g.type="sine",g.frequency.setValueAtTime(c,f),v.gain.setValueAtTime(0,f),v.gain.linearRampToValueAtTime(1,f+.02),v.gain.exponentialRampToValueAtTime(.01,f+p),g.connect(v),v.connect(r),g.start(f),g.stop(f+p+.05)},i=n.currentTime;s(523.25,i,.11),s(659.25,i+.055,.13),s(783.99,i+.1,.16),s(1046.5,i+.14,.2);const o=n.createBufferSource(),a=n.createBuffer(1,n.sampleRate*.07,n.sampleRate),l=a.getChannelData(0);for(let c=0;c<l.length;c++)l[c]=(Math.random()*2-1)*Math.exp(-c/(l.length*.32));o.buffer=a;const u=n.createGain();u.gain.setValueAtTime(.055,i+.04),u.gain.exponentialRampToValueAtTime(.001,i+.12),o.connect(u),u.connect(r),o.start(i+.04),o.stop(i+.18),(e=n.resume)==null||e.call(n),setTimeout(()=>void n.close(),700)}catch{}}function s2(){const{cashWave:e,cashVariant:t,lastTag:n}=or(),[r,s]=x.useState(!1),[i,o]=x.useState(0);return x.useEffect(()=>{if(e===0)return;o(e),s(!0),r2();const a=window.setTimeout(()=>s(!1),1650);return()=>window.clearTimeout(a)},[e]),d.jsx("div",{className:"pointer-events-none fixed left-2 top-[4.25rem] z-[55] sm:left-4 sm:top-[4.5rem] md:top-[5.25rem]",children:d.jsx(am,{mode:"wait",children:r?d.jsxs(O.div,{className:"relative flex flex-col items-start",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,scale:.92,filter:"blur(4px)"},transition:{duration:.4},children:[d.jsx(O.div,{className:"absolute -left-8 -top-8 h-40 w-40 rounded-full bg-gradient-to-br from-amber-400/45 via-yellow-200/30 to-bubble-mint/35 blur-2xl",initial:{scale:.2,opacity:0},animate:{scale:[.2,1.35,1],opacity:[0,1,.7]},transition:{duration:.5,ease:[.22,1,.36,1]}}),Array.from({length:Ef}).map((a,l)=>{const u=l/Ef*Math.PI*2,c=56+l%4*10;return d.jsx(O.span,{className:"absolute left-8 top-9 h-2 w-2 rounded-full bg-gradient-to-br from-yellow-100 to-amber-500 shadow-[0_0_12px_rgba(250,204,21,1)]",initial:{x:0,y:0,opacity:0,scale:0},animate:{x:Math.cos(u)*c,y:Math.sin(u)*c,opacity:[0,1,0],scale:[0,1.3,.3]},transition:{duration:.8,delay:l*.018,ease:"easeOut"}},`s-${l}`)}),Array.from({length:n2}).map((a,l)=>d.jsx(O.span,{className:"absolute left-8 top-8 text-xl sm:text-2xl",initial:{x:0,y:0,opacity:0,rotate:-30,scale:0},animate:{x:(l%2===0?1:-1)*(36+l*12),y:-32-l*11,opacity:[0,1,0],rotate:l*35,scale:[0,1.15,.85]},transition:{duration:.9,delay:.04+l*.035,ease:[.22,1,.36,1]},children:"🪙"},`c-${l}`)),d.jsxs(O.div,{className:"relative flex h-[4.75rem] w-[4.75rem] items-center justify-center sm:h-[5.5rem] sm:w-[5.5rem]",initial:{scale:0,rotate:-40},animate:{scale:[0,1.3,.92,1.06,1],rotate:[-40,12,-6,3,0]},transition:{duration:.7,ease:[.34,1.56,.64,1]},children:[d.jsx(O.div,{className:"absolute inset-0 rounded-2xl border-2 border-yellow-200/90",animate:{boxShadow:["0 0 25px rgba(250,204,21,0.55), inset 0 0 22px rgba(254,240,138,0.2)","0 0 50px rgba(0,255,157,0.5), inset 0 0 28px rgba(0,229,255,0.15)","0 0 28px rgba(250,204,21,0.6), inset 0 0 18px rgba(254,240,138,0.25)"]},transition:{duration:1.1,repeat:2}}),d.jsxs("svg",{viewBox:"0 0 100 100",className:"relative z-[1] h-[72%] w-[72%] drop-shadow-[0_0_14px_rgba(250,204,21,0.9)]","aria-hidden":!0,children:[d.jsxs("defs",{children:[d.jsxs("linearGradient",{id:"cashGold",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d.jsx("stop",{offset:"0%",stopColor:"#fef9c3"}),d.jsx("stop",{offset:"40%",stopColor:"#facc15"}),d.jsx("stop",{offset:"100%",stopColor:"#a16207"})]}),d.jsxs("filter",{id:"cashGlow",x:"-50%",y:"-50%",width:"200%",height:"200%",children:[d.jsx("feGaussianBlur",{stdDeviation:"1.2",result:"b"}),d.jsxs("feMerge",{children:[d.jsx("feMergeNode",{in:"b"}),d.jsx("feMergeNode",{in:"SourceGraphic"})]})]})]}),d.jsx("circle",{cx:"50",cy:"50",r:"44",fill:"url(#cashGold)",filter:"url(#cashGlow)"}),d.jsx("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:"#422006",strokeOpacity:"0.28",strokeWidth:"2"}),d.jsx("text",{x:"50",y:"64",textAnchor:"middle",fill:"#713f12",fontSize:"54",fontWeight:"700",fontFamily:"Audiowide, Orbitron, system-ui, sans-serif",children:"$"})]}),d.jsx(O.div,{className:"pointer-events-none absolute inset-0 overflow-hidden rounded-2xl",initial:!1,children:d.jsx(O.div,{className:"absolute inset-y-2 w-2/5 bg-gradient-to-r from-transparent via-white/60 to-transparent skew-x-[-18deg]",initial:{left:"-40%"},animate:{left:"140%"},transition:{duration:.55,delay:.12,ease:"easeInOut"}})})]}),d.jsxs(O.div,{className:"relative -mt-0.5 max-w-[12rem] pl-0.5",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.12,type:"spring",stiffness:320,damping:22},children:[d.jsx(O.p,{className:"font-display text-[10px] tracking-[0.42em] text-yellow-100 sm:text-[11px]",animate:{textShadow:["0 0 10px rgba(250,204,21,0.95)","0 0 22px rgba(0,255,157,0.75)","0 0 12px rgba(250,204,21,0.9)"]},transition:{duration:.75,repeat:3},children:t==="vault"?"VAULT · LOCKED":"CHA-CHING · HIT"}),n!=null&&n.uid?d.jsx(O.p,{className:"mt-1 truncate font-mono text-[10px] font-bold tracking-[0.15em] text-bubble-mint sm:text-xs",initial:{opacity:0,x:-6},animate:{opacity:1,x:0},transition:{delay:.22},children:n.uid}):null]})]},i):null})})}const Vg=x.createContext(()=>{});function i2({children:e}){const[t,n]=x.useState([]),r=x.useCallback((i,o="info")=>{const a=Date.now()+Math.random();n(l=>[...l,{id:a,msg:i,kind:o}]),setTimeout(()=>n(l=>l.filter(u=>u.id!==a)),4200)},[]),s=x.useMemo(()=>r,[r]);return d.jsxs(Vg.Provider,{value:s,children:[e,d.jsx("div",{className:"pointer-events-none fixed bottom-5 right-5 z-[60] flex max-w-sm flex-col gap-3",children:d.jsx(am,{children:t.map(i=>d.jsxs(O.div,{initial:{opacity:0,x:40,rotate:-2,scale:.92},animate:{opacity:1,x:0,rotate:0,scale:1},exit:{opacity:0,x:20,scale:.9},transition:{type:"spring",stiffness:380,damping:26},className:`pointer-events-auto relative overflow-hidden border-2 px-5 py-3.5 font-mono text-xs backdrop-blur-md ${i.kind==="err"?"border-bubble-rose bg-bubble-950/95 text-bubble-rose shadow-glowRose":"border-bubble-mint bg-bubble-900/95 text-bubble-mint shadow-glow"} `,children:[d.jsx("div",{className:`pointer-events-none absolute inset-0 opacity-30 ${i.kind==="err"?"bg-gradient-to-r from-bubble-rose/20 to-transparent":"bg-gradient-to-r from-bubble-accent/20 to-bubble-mint/10"}`}),d.jsx("span",{className:"relative mr-2 font-black opacity-80",children:i.kind==="err"?"!!":"»"}),d.jsx("span",{className:"relative",children:i.msg})]},i.id))})})]})}function Je(){return x.useContext(Vg)}function o2(e){const t=e.replace(/\s/g,"");if(t.length!==32)return null;const n=new Uint8Array(16);for(let u=0;u<16;u++)n[u]=parseInt(t.slice(u*2,u*2+2),16);const r=n[6],s=n[7],i=n[8],o=r>>4&1|s>>0&2|i>>0&4,a=r>>5&1|s>>1&2|i>>1&4,l=r>>6&1|s>>2&2|i>>2&4;return{c1:o,c2:a,c3:l}}function Og(e){switch(e){case 0:return"Ultralight / NTAG / Type 2";case 8:return"MIFARE Classic 1K";case 9:return"MIFARE Mini";case 24:return"MIFARE Classic 4K";default:return`SAK 0x${e.toString(16).toUpperCase()}`}}function Ig(e){var n;const t=e.replace(/\s/g,"");return t.length%2!==0?e:((n=t.match(/.{2}/g))==null?void 0:n.join(":"))??t}function a2(e){switch(e){case 1:return"Classic-style (MIFARE)";case 2:return"Type 2 / Ultralight-style";default:return"Unknown (check SAK/ATQA)"}}function l2(e){const t=[];return e.uidLen===4?t.push("4-byte UID — single cascade level (CL1)."):e.uidLen===7?t.push("7-byte UID — double cascade (CL1 + CL2) typical for 7B tags."):e.uidLen===10&&t.push("10-byte UID — triple cascade path."),e.sak===0&&t.push("SAK 0x00 — typical Type 2 / Ultralight-style path; use page read/write."),(e.sak===8||e.sak===9||e.sak===24)&&t.push("MIFARE Classic family — authenticate per sector trailer, then block read/write."),(e.atqa===1024||e.atqa===17408)&&t.push("ATQA 0x0400/0x4400 class — common Type A / MIFARE inventory shapes."),t}function u2(e){return e.map(t=>(Number(t)&255).toString(16).toUpperCase().padStart(2,"0")).join(" ")}function c2({className:e=""}){return d.jsx("div",{className:`relative ${e}`.trim(),children:d.jsxs("svg",{viewBox:"0 0 400 220",className:"h-auto w-full max-w-md text-bubble-mint/90","aria-hidden":!0,children:[d.jsxs("defs",{children:[d.jsxs("linearGradient",{id:"g1",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d.jsx("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:"0.9"}),d.jsx("stop",{offset:"100%",stopColor:"#00e5ff",stopOpacity:"0.35"})]}),d.jsxs("filter",{id:"glow",children:[d.jsx("feGaussianBlur",{stdDeviation:"2",result:"b"}),d.jsxs("feMerge",{children:[d.jsx("feMergeNode",{in:"b"}),d.jsx("feMergeNode",{in:"SourceGraphic"})]})]})]}),[0,1,2,3].map(t=>d.jsx("ellipse",{cx:"200",cy:"110",rx:40+t*38,ry:28+t*26,fill:"none",stroke:"currentColor",strokeWidth:"0.6",strokeOpacity:.22-t*.04,className:"origin-center animate-[spin_32s_linear_infinite]",style:{transformOrigin:"200px 110px",animationDelay:`${t*2}s`}},t)),d.jsx("g",{filter:"url(#glow)",children:d.jsx("path",{d:"M200 110 L360 110 A160 80 0 0 1 200 190 Z",fill:"url(#g1)",fillOpacity:"0.12",className:"origin-center animate-[spin_6s_linear_infinite]",style:{transformOrigin:"200px 110px"}})}),d.jsx("circle",{cx:"200",cy:"110",r:"36",fill:"none",stroke:"currentColor",strokeWidth:"1.2",opacity:"0.5"}),d.jsx("circle",{cx:"200",cy:"110",r:"22",fill:"none",stroke:"#00e5ff",strokeWidth:"0.8",opacity:"0.45"}),d.jsx("circle",{cx:"200",cy:"110",r:"8",fill:"currentColor",opacity:"0.35"}),Array.from({length:12}).map((t,n)=>{const r=n/12*Math.PI*2,s=200+Math.cos(r)*118,i=110+Math.sin(r)*78;return d.jsx("rect",{x:s-1,y:i-1,width:"2",height:"2",fill:"currentColor",opacity:.15+n%3*.08,className:"animate-pulse",style:{animationDelay:`${n*.15}s`}},n)}),d.jsx("text",{x:"200",y:"205",textAnchor:"middle",className:"fill-bubble-mint/40 font-mono text-[9px] tracking-[0.35em]",children:"13.56MHZ"})]})})}function d2(){const e=Je(),{lastTag:t,applyScanPoll:n}=or(),[r,s]=x.useState(null),[i,o]=x.useState(!0),a=()=>{fo("/api/status").then(s).catch(()=>e("Status unreachable","err"))};x.useEffect(()=>{a();const c=setInterval(a,3e3);return()=>clearInterval(c)},[e]),x.useEffect(()=>{r&&typeof r.scanning=="boolean"&&o(r.scanning)},[r]);const l=async()=>{try{await vt("/api/nfc/scan",{enable:!i}),o(!i),e(i?"Continuous scan off":"Continuous scan on")}catch(c){e(String(c),"err")}},u=async()=>{try{const c=await vt("/api/nfc/poll",{});c.present&&c.tag?(n(!0,c.tag),e(`Tag ${c.tag.uid}`)):(n(!1),e("No tag"))}catch(c){e(String(c),"err")}};return d.jsxs("div",{className:"space-y-8",children:[d.jsxs(O.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.5,ease:[.22,1,.36,1]},className:"glass relative overflow-hidden p-6 md:p-10",children:[d.jsx("div",{className:"pointer-events-none absolute inset-0 bg-[conic-gradient(from_180deg_at_50%_120%,rgba(0,229,255,0.08),transparent_40%,rgba(255,42,109,0.06),transparent_70%)]"}),d.jsxs("div",{className:"relative grid gap-8 lg:grid-cols-[1fr_min(320px,40%)] lg:items-center",children:[d.jsxs("div",{children:[d.jsx("p",{className:"font-mono text-[10px] font-bold tracking-[0.4em] text-bubble-accent/80",children:"COMMAND_LAYER"}),d.jsxs("h1",{className:"font-display mt-2 text-3xl font-normal tracking-wide text-glow-matrix md:text-5xl",children:["NFC ",d.jsx("span",{className:"text-bubble-accent",children:"CONTROL"})]}),d.jsx("p",{className:"mt-3 max-w-xl text-sm leading-relaxed text-slate-400",children:"Full-time scan out of the box. Fat RF retries. Browser log + device session export — crank it from your phone."}),(r==null?void 0:r.session)&&(r.session.deepCapture||r.session.usedBytes>0)&&d.jsxs(O.div,{initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},className:"mt-5 flex flex-wrap items-center gap-3 rounded-xl border border-bubble-accent/40 bg-gradient-to-r from-bubble-accent/15 to-bubble-mint/10 px-4 py-3 text-sm shadow-glowCyan",children:[d.jsxs("span",{className:"font-mono text-bubble-mint",children:["RAM ",r.session.usedBytes,"/",r.session.maxBytes,r.session.full?" · LOCKED":""]}),d.jsx(sm,{to:"/capture",className:"btn-neon rounded-lg bg-bubble-mint/20 px-3 py-1 text-xs font-bold text-bubble-mint",children:"Read-all →"})]}),d.jsxs("div",{className:"mt-8 flex flex-wrap gap-3",children:[d.jsx(O.button,{type:"button",whileHover:{scale:1.04},whileTap:{scale:.98},onClick:u,className:"btn-neon rounded-xl bg-gradient-to-r from-bubble-accent via-cyan-400 to-bubble-mint px-6 py-3 text-sm font-black uppercase tracking-wider text-bubble-950 shadow-neonBtn",children:"Poll tag"}),d.jsx(O.button,{type:"button",whileHover:{scale:1.03},whileTap:{scale:.98},onClick:l,className:`rounded-xl border-2 px-6 py-3 text-sm font-bold uppercase tracking-wide transition ${i?"border-bubble-mint/70 bg-bubble-mint/15 text-glow-matrix text-bubble-mint shadow-glow":"border-white/20 bg-black/30 text-slate-400 hover:border-bubble-accent/50 hover:text-bubble-accent"}`,children:i?"Stop scan":"Start scan"})]})]}),d.jsx("div",{className:"relative flex justify-center lg:justify-end",children:d.jsx("div",{className:"relative w-full max-w-[280px] opacity-90 drop-shadow-[0_0_40px_rgba(0,229,255,0.35)]",children:d.jsx(c2,{})})})]})]}),d.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[d.jsxs(O.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{delay:.08},className:"glass p-6",children:[d.jsx("h2",{className:"font-display text-lg font-normal text-bubble-accent text-glow-cyan",children:"Device stack"}),r?d.jsxs("ul",{className:"mt-4 space-y-3 font-mono text-sm text-slate-300",children:[d.jsxs("li",{className:"flex justify-between border-b border-white/5 pb-2",children:[d.jsx("span",{className:"text-slate-500",children:"uptime"}),d.jsxs("span",{className:"text-bubble-mint",children:[(r.uptimeMs/1e3).toFixed(1),"s"]})]}),d.jsxs("li",{className:"flex justify-between border-b border-white/5 pb-2",children:[d.jsx("span",{className:"text-slate-500",children:"heap"}),d.jsx("span",{className:"text-white",children:r.freeHeap})]}),d.jsxs("li",{className:"flex justify-between",children:[d.jsx("span",{className:"text-slate-500",children:"PN532"}),r.pn532Connected?d.jsxs("span",{className:"flex items-center gap-2",children:[r.pn532&&d.jsxs("span",{className:"text-[10px] text-slate-500",children:["IC",r.pn532.ic," v",r.pn532.fwHi,".",r.pn532.fwLo]}),d.jsx("span",{className:"rounded px-1.5 py-0.5 bg-bubble-mint/20 text-bubble-mint font-bold text-[10px] tracking-widest",children:"READY"})]}):d.jsx("span",{className:"animate-pulse rounded px-1.5 py-0.5 bg-amber-500/20 text-amber-400 font-bold text-[10px] tracking-widest",children:"SEARCHING"})]})]}):d.jsx("p",{className:"mt-4 animate-pulse font-mono text-sm text-bubble-accent/60",children:"Pulling status…"})]}),d.jsxs(O.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{delay:.14},className:"glass p-6",children:[d.jsx("h2",{className:"font-display text-lg font-normal text-bubble-rose/90 text-glow-rose",children:"Live tag"}),t?d.jsxs("div",{className:"mt-4 space-y-4 rounded-xl border border-bubble-mint/25 bg-black/35 p-4 shadow-glow",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-[10px] font-mono uppercase tracking-widest text-bubble-mint/50",children:"UID"}),d.jsx("div",{className:"font-mono text-xl font-bold tracking-[0.15em] text-glow-matrix text-bubble-mint md:text-2xl",children:Ig(t.uid)}),d.jsxs("p",{className:"mt-1 font-mono text-[11px] text-slate-500",children:["raw ",t.uid," · ",t.uidLen," byte",t.uidLen===1?"":"s"]})]}),d.jsxs("div",{className:"grid gap-3 border-t border-white/5 pt-3 font-mono text-[11px] text-slate-300 sm:grid-cols-2",children:[d.jsxs("div",{children:[d.jsx("span",{className:"text-slate-500",children:"ATQA"})," ",d.jsxs("span",{className:"text-bubble-accent",children:["0x",(t.atqaHex??t.atqa.toString(16).toUpperCase().padStart(4,"0")).slice(-4)]}),d.jsxs("span",{className:"ml-2 text-slate-500",children:["(",t.atqa,")"]})]}),d.jsxs("div",{children:[d.jsx("span",{className:"text-slate-500",children:"SAK"})," ",d.jsxs("span",{className:"text-bubble-accent",children:["0x",(t.sakHex??t.sak.toString(16).toUpperCase().padStart(2,"0")).slice(-2)]}),d.jsxs("span",{className:"ml-1 text-slate-400",children:["— ",Og(t.sak)]})]}),d.jsxs("div",{className:"sm:col-span-2",children:[d.jsx("span",{className:"text-slate-500",children:"Guess"})," ",d.jsx("span",{className:"text-bubble-mint",children:t.typeGuess??a2(t.typeHint)}),d.jsxs("span",{className:"ml-2 text-slate-600",children:["· hint ",t.typeHint]})]})]}),t.pn532GeneralStatus&&t.pn532GeneralStatus.length>0&&d.jsxs("div",{className:"rounded-lg border border-bubble-accent/20 bg-black/40 p-3",children:[d.jsx("p",{className:"text-[10px] font-mono uppercase tracking-widest text-bubble-accent/70",children:"PN532 general status"}),d.jsx("p",{className:"mt-2 break-all font-mono text-[10px] leading-relaxed text-slate-400",children:u2(t.pn532GeneralStatus)}),d.jsx("p",{className:"mt-2 text-[10px] text-slate-600",children:"Raw bytes from the chip right after this inventory (error flags, last command, tag count — see NXP PN532 user manual)."})]}),d.jsx("ul",{className:"space-y-1 border-t border-white/5 pt-3 text-[11px] leading-relaxed text-slate-500",children:l2(t).map((c,f)=>d.jsxs("li",{className:"flex gap-2",children:[d.jsx("span",{className:"text-bubble-mint/40",children:"▸"}),d.jsx("span",{children:c})]},f))})]}):d.jsx("p",{className:"mt-6 font-mono text-sm text-bubble-mint/40",children:"Listening on the field…"})]})]})]})}function f2(){const e=Je(),[t,n]=x.useState("FFFFFFFFFFFF"),[r,s]=x.useState(!1),[i,o]=x.useState(0),[a,l]=x.useState(""),[u,c]=x.useState(""),f=async()=>{try{const v=await vt("/api/mifare/read-block",{block:i,key:t,keyB:r});v.data?(l(v.data),e("Read OK")):e(v.error||"failed","err")}catch(v){e(String(v),"err")}},p=async()=>{try{const v=await vt("/api/ul/read-page",{page:i});v.data?(l(v.data+" (UL page)"),e("UL read OK")):e(v.error??"no data returned","err")}catch(v){e(String(v),"err")}},g=u?o2(u):null;return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"glass p-6",children:[d.jsx("h1",{className:"font-display text-2xl font-bold",children:"Read / analyze"}),d.jsx("p",{className:"mt-2 text-sm text-slate-400",children:"Authenticate with a known key, dump a block, paste a sector trailer to decode access bits."}),d.jsxs("div",{className:"mt-6 grid gap-4 md:grid-cols-2",children:[d.jsxs("label",{className:"block space-y-2 text-sm",children:["Key (12 hex)",d.jsx("input",{value:t,onChange:v=>n(v.target.value),className:"w-full rounded-2xl border border-white/10 bg-black/25 px-4 py-2 font-mono text-bubble-mint outline-none ring-bubble-accent/40 focus:ring-2"})]}),d.jsxs("label",{className:"flex items-end gap-3 text-sm",children:[d.jsx("input",{type:"checkbox",checked:r,onChange:v=>s(v.target.checked)})," Key B"]}),d.jsxs("label",{className:"block space-y-2 text-sm",children:["Block / page",d.jsx("input",{type:"number",value:i,onChange:v=>o(Number(v.target.value)),className:"w-full rounded-2xl border border-white/10 bg-black/25 px-4 py-2 outline-none ring-bubble-accent/40 focus:ring-2"})]})]}),d.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[d.jsx("button",{type:"button",onClick:f,className:"rounded-2xl bg-bubble-accent/90 px-4 py-2 font-semibold text-white",children:"MIFARE read block"}),d.jsx("button",{type:"button",onClick:p,className:"rounded-2xl border border-white/15 px-4 py-2",children:"Ultralight read page"})]}),a&&d.jsx("pre",{className:"mt-4 overflow-auto rounded-2xl border border-white/10 bg-black/30 p-4 font-mono text-sm",children:a})]}),d.jsxs("div",{className:"glass p-6",children:[d.jsx("h2",{className:"font-display text-lg font-semibold",children:"Sector trailer playground"}),d.jsxs("label",{className:"mt-4 block text-sm",children:["16-byte trailer (32 hex) — bytes 6–8 are access bytes",d.jsx("textarea",{value:u,onChange:v=>c(v.target.value),rows:3,className:"mt-2 w-full rounded-2xl border border-white/10 bg-black/25 p-3 font-mono text-xs outline-none focus:ring-2 focus:ring-bubble-accent/40"})]}),g&&d.jsxs("div",{className:"mt-4 rounded-2xl border border-bubble-mint/30 bg-bubble-mint/5 p-4 text-sm",children:["Parsed C1–C3 nibble pattern: ",g.c1," ",g.c2," ",g.c3," (see NXP MIFARE docs for truth tables)"]}),d.jsxs("p",{className:"mt-4 text-xs text-slate-500",children:["SAK hints: common values for labeling only — ",Og(24)," etc."]})]})]})}const ws="Lab-only synthetic data and well-known defaults. Edit bytes freely to validate parsers, checksums, and emulate/raw paths — never treat these as real tags.",Tf=[{id:"get-fw",title:"GetFirmwareVersion (0x02)",hex:"02",detail:"Expect PN532 firmware major/minor in response payload."},{id:"get-status",title:"GetGeneralStatus (0x04)",hex:"04",detail:"Chip + RF status snapshot; useful sanity check after a stuck session."},{id:"in-list-a",title:"InListPassiveTarget — 106 kbps, 1 target",hex:"4A0100",detail:"Poll one ISO14443-A target at 106 kbps (maxTg=1, BrTy=0)."}],jf=[{id:"tg-stub",title:"TgInitAsTarget — opcode only (shell)",hex:"8C",detail:"Minimal placeholder; real target mode needs a full parameter block per NXP UM0701. Extend with NFCID, FeliCa params, etc."},{id:"tg-type-a-sketch",title:"TgInitAsTarget — Type A sketch (synthetic NFCID3T)",hex:"8C000012DEADBEEF00000000000000000000000000000000000000000000000000",detail:"Synthetic 0x8C prefix + padded fake ID — not guaranteed to satisfy any reader; use as a byte-editing template only."}],p2="DEADBEEF2208040000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFFFFFFFF078069FFFFFFFFFFFF",h2="04112233445566172233445566172233445566172233445566172233",m2="0310D1010C55046578616D706C652E636F6DFE",ml=[{id:"mifare-block0",title:"MIFARE Classic — block 0 (16 B, synthetic UID+BCC)",hex:"DEADBEEF220804000000000000000000",byteLength:16,sha256Hex:"6f13f064d70ec33b7ace5842011d66aff3852baa4ab7c0a85aa66d113c7189fe",detail:"Fake 4-byte UID (DE:AD:BE:EF wire order as stored), BCC = XOR(UID), rest filler. Pair with key FFFFFFFFFFFF on a writable tag only."},{id:"mifare-sector0",title:"MIFARE Classic — sector 0 dump (64 B)",hex:p2,byteLength:64,sha256Hex:"11095df4db11e4271f40234533db45de35c4ca69f04e231e3fa47f38181e0168",detail:"Four blocks: manufacturer/UID, empty, empty, default trailer (Key A/B FFFFFFFFFFFF, access FF078069). Edit block 1–2 payload and re-hash to validate your pipeline."},{id:"ntag-pages",title:"NTAG-style — pages 0–6 (28 B)",hex:h2,byteLength:28,sha256Hex:"8ffd95e646b2deb218dabd72e35c7a1938725e07332d8ed7df4f2a2656e590a0",detail:"Synthetic UID/internal/lock placeholders — not copied from a physical tag."},{id:"ndef-uri-tlv",title:"NDEF TLV — URI https://example.com/",hex:m2,byteLength:19,sha256Hex:"81197b6cd6e40a3f62f56f0c0f3f449c63a956919d04c5b5317895ad4328fa14",detail:"Type 2 TLV (0x03) + short NDEF Well-Known URI record; append to user memory after static pages in real layouts."}],g2=["FFFFFFFFFFFF","A0A1A2A3A4A5","D3F7D3F7D3F7","000000000000","B0B1B2B3B4B5","AABBCCDDEEFF","4D3A99C351DD","1A982C7E459A","714C5C886E97","587EE5F9350F","A0478CC39091","26940B21FFF5","E4410EF8ED2D"],y2=ml.map(e=>({name:`LAB // ${e.title}`,hex:e.hex,note:e.detail}));function po({mode:e,onApplyHex:t,onPickBinary:n,className:r=""}){const[s,i]=x.useState(0),o=()=>i(a=>a+1);return e==="raw"?d.jsx("div",{className:`flex flex-wrap items-center gap-2 ${r}`,children:d.jsxs("select",{defaultValue:"","aria-label":"Load PN532 lab command",className:"max-w-full rounded-xl border border-bubble-mint/25 bg-black/40 px-3 py-2 font-mono text-xs text-bubble-mint/90",onChange:a=>{const l=a.target.value;if(!l)return;const u=Tf.find(c=>c.id===l);u&&t(u.hex),o()},children:[d.jsx("option",{value:"",children:"Lab: PN532 command bytes…"}),Tf.map(a=>d.jsx("option",{value:a.id,children:a.title},a.id))]},s)}):e==="emulate"?d.jsx("div",{className:`flex flex-wrap items-center gap-2 ${r}`,children:d.jsxs("select",{defaultValue:"","aria-label":"Load emulate lab frame",className:"max-w-full rounded-xl border border-bubble-mint/25 bg-black/40 px-3 py-2 font-mono text-xs text-bubble-mint/90",onChange:a=>{const l=a.target.value;if(!l)return;const u=jf.find(c=>c.id===l);u&&t(u.hex),o()},children:[d.jsx("option",{value:"",children:"Lab: emulate / TgInit…"}),jf.map(a=>d.jsx("option",{value:a.id,children:a.title},a.id))]},s)}):d.jsx("div",{className:`space-y-2 ${r}`,children:d.jsxs("select",{defaultValue:"","aria-label":"Load synthetic card blob",className:"w-full max-w-full rounded-xl border border-bubble-mint/25 bg-black/40 px-3 py-2 font-mono text-xs text-bubble-mint/90",onChange:a=>{const l=a.target.value;if(!l)return;const u=ml.find(c=>c.id===l);u&&(t(u.hex),n==null||n(u)),o()},children:[d.jsx("option",{value:"",children:"Lab: synthetic card / NDEF blob…"}),ml.map(a=>d.jsxs("option",{value:a.id,children:[a.title," (",a.byteLength," B)"]},a.id))]},s)})}function v2(){const e=Je(),{lastTag:t}=or(),[n,r]=x.useState("FFFFFFFFFFFF"),[s,i]=x.useState(!1),[o,a]=x.useState(4),[l,u]=x.useState("00000000000000000000000000000000"),[c,f]=x.useState(null),[p,g]=x.useState(4),[v,w]=x.useState("00000000"),[b,h]=x.useState(!1),m=async()=>{const S=n.replace(/\s/g,""),k=l.replace(/\s/g,"");if(S.length!==12||!/^[0-9A-Fa-f]+$/.test(S)){e("Key must be exactly 12 hex digits","err");return}if(k.length!==32||!/^[0-9A-Fa-f]+$/.test(k)){e("Block data must be exactly 32 hex digits (16 bytes)","err");return}if(!Number.isInteger(o)||o<0||o>255){e("Block must be an integer 0–255","err");return}if(confirm("Write will modify tag memory. Continue?")){h(!0);try{await vt("/api/mifare/write-block",{block:o,key:S,keyB:s,data:k}),e("Write OK")}catch(C){e(String(C),"err")}finally{h(!1)}}},y=async()=>{const S=v.replace(/\s/g,"");if(S.length!==8||!/^[0-9A-Fa-f]+$/.test(S)){e("UL data must be exactly 8 hex digits (4 bytes)","err");return}if(confirm("Ultralight page write — can brick OTP/lock bytes if misused. Continue?")){h(!0);try{await vt("/api/ul/write-page",{page:p,data:S}),e("UL page write OK")}catch(k){e(String(k),"err")}finally{h(!1)}}};return d.jsxs("div",{className:"glass space-y-6 p-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"font-display text-2xl font-bold",children:"Write / clone helpers"}),d.jsx("p",{className:"mt-2 text-sm text-slate-400",children:"Block editor for MIFARE Classic. Read blocks on the Read tab, adjust hex here, then write with a key that unlocks the sector."}),t&&d.jsxs("p",{className:"mt-2 rounded-lg border border-bubble-mint/20 bg-bubble-mint/5 px-3 py-2 font-mono text-xs text-bubble-mint",children:["Field: ",d.jsx("span",{className:"text-white",children:Ig(t.uid)})," ·"," ",t.typeGuess??`hint ${t.typeHint}`]}),d.jsx("p",{className:"mt-2 text-[11px] leading-relaxed text-slate-500",children:ws}),d.jsx(po,{mode:"binary",className:"mt-3",onApplyHex:S=>{const k=S.replace(/\s/g,"");k.length<=32?u(k):(u(k.slice(0,32)),e("First 16 bytes of lab blob loaded into block editor","info"))},onPickBinary:f}),c&&d.jsxs("p",{className:"mt-2 font-mono text-[10px] text-bubble-accent/90",children:["Canonical SHA-256 (",c.byteLength," B): ",c.sha256Hex," — changes after any edit"]})]}),d.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[d.jsxs("label",{className:"text-sm",children:["Key (12 hex)",d.jsx("input",{value:n,onChange:S=>r(S.target.value),className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 px-4 py-2 font-mono"})]}),d.jsxs("label",{className:"flex items-end gap-2 text-sm",children:[d.jsx("input",{type:"checkbox",checked:s,onChange:S=>i(S.target.checked)})," Key B"]}),d.jsxs("label",{className:"text-sm",children:["Block",d.jsx("input",{type:"number",value:o,onChange:S=>a(Number(S.target.value)),className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 px-4 py-2"})]})]}),d.jsxs("label",{className:"block text-sm",children:["16 bytes (32 hex)",d.jsx("textarea",{value:l,onChange:S=>u(S.target.value),rows:4,className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 p-3 font-mono text-sm"})]}),d.jsx("button",{type:"button",onClick:m,disabled:b,className:"rounded-2xl bg-gradient-to-r from-bubble-rose to-orange-400 px-6 py-3 font-bold text-white shadow-glow disabled:opacity-50",children:b?"Writing…":"Write block"}),d.jsxs("div",{className:"border-t border-white/10 pt-8",children:[d.jsx("h2",{className:"font-display text-lg font-bold text-bubble-accent",children:"Ultralight / NTAG page write"}),d.jsx("p",{className:"mt-2 text-sm text-slate-400",children:"4 bytes per page (8 hex). Keep tag on the coil. Avoid lock / config pages unless you mean it."}),d.jsxs("div",{className:"mt-4 grid gap-4 md:grid-cols-2",children:[d.jsxs("label",{className:"text-sm",children:["Page",d.jsx("input",{type:"number",value:p,onChange:S=>g(Number(S.target.value)),className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 px-4 py-2"})]}),d.jsxs("label",{className:"text-sm",children:["Data (8 hex)",d.jsx("input",{value:v,onChange:S=>w(S.target.value),className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 px-4 py-2 font-mono"})]})]}),d.jsx("button",{type:"button",onClick:y,disabled:b,className:"mt-4 rounded-2xl border border-bubble-accent/50 bg-bubble-accent/20 px-6 py-3 font-bold text-bubble-accent disabled:opacity-50",children:b?"Writing…":"Write UL page"})]})]})}const Nf="pn532_saved_tags_v1";function x2(){const e=Je(),[t,n]=x.useState([]),[r,s]=x.useState("My tag"),[i,o]=x.useState(""),[a,l]=x.useState(null);x.useEffect(()=>{try{const g=localStorage.getItem(Nf);n(g?JSON.parse(g):[])}catch{n([])}},[]);const u=g=>{localStorage.setItem(Nf,JSON.stringify(g)),n(g)},c=()=>{if(!i.trim()){e("Paste hex first","err");return}const v={id:`${Date.now()}-${Math.random().toString(16).slice(2)}`,name:r,hex:i.replace(/\s/g,""),ts:Date.now()};u([v,...t]),e("Saved")},f=g=>u(t.filter(v=>v.id!==g)),p=()=>{const g=new Set(t.map(b=>b.name)),v=Date.now(),w=y2.filter(b=>!g.has(b.name)).map((b,h)=>({id:`lab-seed-${v}-${h}`,name:b.name,hex:b.hex,ts:v}));if(!w.length){e("Lab catalog already in library","info");return}u([...w,...t]),e(`Seeded ${w.length} lab record(s)`)};return d.jsxs("div",{className:"glass space-y-6 p-6",children:[d.jsx("h1",{className:"font-display text-2xl font-bold",children:"Saved tag library"}),d.jsx("p",{className:"text-sm text-slate-400",children:"Local browser storage — export by copy/paste."}),d.jsx("p",{className:"text-[11px] leading-relaxed text-slate-500",children:ws}),d.jsx("div",{className:"flex flex-wrap gap-2",children:d.jsx("button",{type:"button",onClick:p,className:"rounded-2xl border border-bubble-mint/30 bg-bubble-mint/10 px-4 py-2 font-mono text-xs font-semibold text-bubble-mint",children:"Seed all lab samples"})}),d.jsx(po,{mode:"binary",onApplyHex:g=>o(g.replace(/\s/g,"")),onPickBinary:l}),a&&d.jsxs("div",{className:"rounded-xl border border-bubble-accent/25 bg-black/30 p-3 font-mono text-[10px] text-bubble-accent/90",children:[d.jsx("div",{className:"text-bubble-mint/70",children:"Expected SHA-256 (canonical blob, pre-edit)"}),d.jsx("div",{className:"break-all",children:a.sha256Hex})]}),d.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[d.jsx("input",{value:r,onChange:g=>s(g.target.value),placeholder:"Label",className:"rounded-2xl border border-white/10 bg-black/25 px-4 py-2"}),d.jsx("button",{type:"button",onClick:c,className:"rounded-2xl bg-bubble-accent px-4 py-2 font-semibold",children:"Save current hex"})]}),d.jsx("textarea",{value:i,onChange:g=>o(g.target.value),placeholder:"Hex dump",rows:5,className:"w-full rounded-2xl border border-white/10 bg-black/25 p-3 font-mono text-xs"}),d.jsx("ul",{className:"space-y-3",children:t.map(g=>d.jsxs("li",{className:"rounded-2xl border border-white/10 bg-black/20 p-4",children:[d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[d.jsxs("div",{children:[d.jsx("div",{className:"font-display font-semibold",children:g.name}),d.jsx("div",{className:"text-xs text-slate-500",children:new Date(g.ts).toLocaleString()})]}),d.jsx("button",{type:"button",onClick:()=>f(g.id),className:"text-rose-300",children:"Remove"})]}),d.jsx("pre",{className:"mt-2 max-h-32 overflow-auto text-xs text-bubble-mint/90",children:g.hex}),d.jsx("button",{type:"button",onClick:()=>{navigator.clipboard.writeText(g.hex),e("Copied")},className:"mt-2 text-sm text-slate-300 underline",children:"Copy hex"})]},g.id))})]})}const w2=["FFFFFFFFFFFF","A0A1A2A3A4A5","D3F7D3F7D3F7","000000000000"],Af="pn532_key_dict_v1";function b2(){const e=Je(),[t,n]=x.useState([]),[r,s]=x.useState("");x.useEffect(()=>{const u=localStorage.getItem(Af);n(u?JSON.parse(u):[...w2])},[]);const i=u=>{localStorage.setItem(Af,JSON.stringify(u)),n(u)},o=()=>{const u=[...t];let c=0;for(const f of g2)u.includes(f)||(u.push(f),c++);if(!c){e("Lab key corpus already merged","info");return}i(u),e(`Added ${c} public lab key(s)`)},a=()=>{const u=sessionStorage.getItem("pn532_keylab_import");if(!(u!=null&&u.trim())){e("Key Lab has nothing staged","info");return}const c=u.split(/\r?\n/).map(g=>g.replace(/\s/g,"").toUpperCase()).filter(g=>g.length===12);if(!c.length){e("No valid 12-hex keys in stash","err");return}const f=[...t];let p=0;for(const g of c)f.includes(g)||(f.push(g),p++);i(f),sessionStorage.removeItem("pn532_keylab_import"),e(p?`Merged ${p} key(s) from Key Lab`:"Keys already in list")},l=()=>{const u=r.replace(/\s/g,"").toUpperCase();if(u.length!==12){e("12 hex chars required","err");return}t.includes(u)?e("Already in dictionary"):(i([u,...t]),e("Key added")),s("")};return d.jsxs("div",{className:"glass space-y-6 p-6",children:[d.jsx("h1",{className:"font-display text-2xl font-bold",children:"Key manager"}),d.jsx("p",{className:"text-sm text-slate-400",children:"Dictionary for manual trials (not a cloud rainbow table). Keys stay in your browser."}),d.jsx("p",{className:"text-[11px] leading-relaxed text-slate-500",children:ws}),d.jsxs("div",{className:"flex flex-wrap gap-2",children:[d.jsx("button",{type:"button",onClick:o,className:"btn-neon rounded-xl border border-bubble-mint/40 bg-bubble-mint/10 px-4 py-2 font-mono text-xs font-bold text-bubble-mint",children:"Merge lab corpus"}),d.jsx("button",{type:"button",onClick:a,className:"rounded-xl border border-bubble-accent/45 bg-bubble-accent/10 px-4 py-2 font-mono text-xs font-bold text-bubble-accent",children:"Import Key Lab stash"})]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("input",{value:r,onChange:u=>s(u.target.value),placeholder:"New key",className:"flex-1 rounded-2xl border border-white/10 bg-black/25 px-4 py-2 font-mono"}),d.jsx("button",{type:"button",className:"rounded-2xl bg-bubble-accent px-4 py-2 font-semibold",onClick:l,children:"Add"})]}),d.jsx("ul",{className:"space-y-2",children:t.map(u=>d.jsxs("li",{className:"flex items-center justify-between rounded-2xl border border-white/10 bg-black/20 px-4 py-2 font-mono text-sm",children:[u,d.jsx("button",{type:"button",className:"text-rose-300",onClick:()=>i(t.filter(c=>c!==u)),children:"×"})]},u))})]})}function S2(){const e=Je(),[t,n]=x.useState("4A0100"),[r,s]=x.useState([]),[i,o]=x.useState(""),a=c=>s(f=>[new Date().toLocaleTimeString()+" "+c,...f].slice(0,80)),l=async()=>{try{const c=await vt("/api/raw/pn532",{frame:t});a(`TX ${t}`),a(`RX ${c.response||c.error||"?"}`),c.response?e("Frame OK"):c.error&&e(c.error,"err")}catch(c){a(`ERR ${String(c)}`),e(String(c),"err")}},u=async()=>{try{const c=await fo("/api/pn532/general-status");o(JSON.stringify(c.raw??c,null,2)),e("Fetched PN532 status")}catch(c){e(String(c),"err")}};return d.jsxs("div",{className:"glass space-y-6 p-6",children:[d.jsx("h1",{className:"font-display text-2xl font-bold",children:"Advanced / raw PN532"}),d.jsxs("p",{className:"text-sm text-slate-400",children:["Send command bytes (without PN532 frame wrapper). Example: ",d.jsx("code",{children:"4A0100"})," lists one Type A passive target at 106 kbps."]}),d.jsx("p",{className:"text-[11px] leading-relaxed text-slate-500",children:ws}),d.jsx(po,{mode:"raw",onApplyHex:c=>n(c)}),d.jsxs("div",{className:"flex flex-wrap gap-2",children:[d.jsx("input",{value:t,onChange:c=>n(c.target.value),className:"min-w-[16rem] flex-1 rounded-2xl border border-white/10 bg-black/25 px-4 py-2 font-mono text-sm"}),d.jsx("button",{type:"button",onClick:l,className:"rounded-2xl bg-bubble-accent px-4 py-2 font-semibold",children:"Send"}),d.jsx("button",{type:"button",onClick:u,className:"rounded-2xl border border-white/15 px-4 py-2",children:"General status"})]}),d.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-sm font-semibold text-slate-300",children:"Log"}),d.jsx("pre",{className:"mt-2 max-h-80 overflow-auto rounded-2xl border border-white/10 bg-black/30 p-3 text-xs",children:r.join(`
|
||
`)})]}),d.jsxs("div",{children:[d.jsx("h2",{className:"text-sm font-semibold text-slate-300",children:"PN532 status snapshot"}),d.jsx("pre",{className:"mt-2 max-h-80 overflow-auto rounded-2xl border border-white/10 bg-black/30 p-3 text-xs",children:i||"—"})]})]})]})}function k2(){const e=Je(),[t,n]=x.useState(""),[r,s]=x.useState(!1);x.useEffect(()=>{n(localStorage.getItem("apiBase")||""),s(document.documentElement.classList.contains("light"))},[]);const i=()=>{localStorage.setItem("apiBase",t),e("Saved API base — reload for WS")},o=()=>{const a=!r;s(a),document.documentElement.classList.toggle("light",a),document.documentElement.classList.toggle("dark",!a),localStorage.setItem("theme",a?"light":"dark"),e(a?"Light":"Dark")};return d.jsxs("div",{className:"glass max-w-xl space-y-6 p-6",children:[d.jsx("h1",{className:"font-display text-2xl font-bold",children:"Settings"}),d.jsxs("label",{className:"block text-sm",children:["API base (empty = same host)",d.jsx("input",{value:t,onChange:a=>n(a.target.value),className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 px-4 py-2",placeholder:"http://192.168.4.1"})]}),d.jsx("button",{type:"button",onClick:i,className:"rounded-2xl bg-bubble-accent px-4 py-2 font-semibold",children:"Save"}),d.jsxs("div",{className:"flex items-center justify-between rounded-2xl border border-white/10 bg-black/20 px-4 py-3",children:[d.jsx("span",{className:"text-sm",children:"Theme"}),d.jsx("button",{type:"button",onClick:o,className:"rounded-full border border-white/15 px-4 py-1 text-sm",children:r?"Switch to dark":"Switch to light"})]}),d.jsxs("p",{className:"text-xs text-slate-500",children:["Firmware opens a ",d.jsx("strong",{children:"password-free"})," SoftAP named ",d.jsx("strong",{children:"PN532-Toolkit"})," (lab default). mDNS: ",d.jsx("code",{children:"pn532tool.local"})]})]})}function C2(){const e=Je(),{log:t}=or(),[n,r]=x.useState(null),s=x.useCallback(()=>{fo("/api/status").then(r).catch(()=>e("Status unreachable","err"))},[e]);x.useEffect(()=>{s();const f=setInterval(s,2e3);return()=>clearInterval(f)},[s]),x.useEffect(()=>{s()},[t.length,s]);const i=(()=>{const f=[...t].reverse().find(p=>p.channel==="capture");return f?typeof f.payload=="object"?JSON.stringify(f.payload):String(f.payload):""})(),o=n==null?void 0:n.session,a=o?Math.min(100,o.usedBytes/Math.max(1,o.maxBytes)*100):0,l=async f=>{try{await vt("/api/session/deep",{enable:f}),e(f?"Passive read-all on (live scan on by default at boot)":"Passive read-all off"),s()}catch(p){e(String(p),"err")}},u=async()=>{try{await vt("/api/session/clear",{}),e("Buffer cleared — scanning can resume"),s()}catch(f){e(String(f),"err")}},c=async()=>{try{const f=await fetch(xs("/api/session/export"));if(!f.ok)throw new Error(await f.text());const p=await f.blob(),g=URL.createObjectURL(p),v=document.createElement("a");v.href=g,v.download=`pn532-deep-capture-${Date.now()}.ndjson`,v.click(),URL.revokeObjectURL(g),e("Download started — check your Downloads folder")}catch(f){e(String(f),"err")}};return d.jsxs("div",{className:"space-y-6",children:[d.jsxs(O.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"glass relative overflow-hidden p-8",children:[d.jsx("div",{className:"pointer-events-none absolute -left-20 top-0 h-48 w-48 rounded-full bg-bubble-mint/20 blur-3xl"}),d.jsx("h1",{className:"font-display text-3xl font-bold md:text-4xl",children:"Passive read-all mode"}),d.jsx("p",{className:"mt-1 text-sm font-medium text-bubble-mint/90",children:"Same feature as “deep capture” — fully controlled from this screen."}),d.jsxs("p",{className:"mt-3 max-w-2xl text-slate-300",children:["Turn it on below and keep ",d.jsx("strong",{children:"live scan"})," running (on by default at boot). Each"," ",d.jsx("strong",{children:"new tag"})," in the field is read ",d.jsx("strong",{children:"passively"}),": no per-block clicks — the firmware pulls ",d.jsx("strong",{children:"all data it can"})," (PN532 status + Classic sector/block dump with default keys, or Ultralight/NTAG page sweep). Results queue in ",d.jsx("strong",{children:"device RAM"}),"; when full, polling pauses until you ",d.jsx("strong",{children:"download"})," and ",d.jsx("strong",{children:"clear"}),"."]})]}),d.jsxs("div",{className:"glass p-6",children:[d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"font-display text-lg font-semibold",children:"Read-all session buffer"}),d.jsxs("p",{className:"text-sm text-slate-400",children:[(o==null?void 0:o.lines)??0," full dumps · ",(o==null?void 0:o.usedBytes)??0," / ",(o==null?void 0:o.maxBytes)??"—"," bytes RAM"]})]}),d.jsxs("div",{className:"flex flex-wrap gap-2",children:[d.jsx("button",{type:"button",onClick:()=>l(!((o==null?void 0:o.deepCapture)??!1)),className:`rounded-2xl px-4 py-2 font-semibold ${o!=null&&o.deepCapture?"bg-bubble-mint/20 text-bubble-mint ring-2 ring-bubble-mint/40":"border border-white/15 bg-white/5"}`,children:o!=null&&o.deepCapture?"Passive read-all ON":"Enable passive read-all"}),d.jsx("button",{type:"button",onClick:c,className:"rounded-2xl bg-gradient-to-r from-bubble-accent to-indigo-400 px-4 py-2 font-bold text-white shadow-glow",children:"Download NDJSON"}),d.jsx("button",{type:"button",onClick:u,className:"rounded-2xl border border-white/20 px-4 py-2",children:"Clear buffer"})]})]}),d.jsx("div",{className:"mt-6 h-4 overflow-hidden rounded-full bg-black/40",children:d.jsx(O.div,{className:"h-full rounded-full bg-gradient-to-r from-bubble-accent to-bubble-mint",initial:!1,animate:{width:`${a}%`},transition:{type:"spring",stiffness:120,damping:20}})}),(o==null?void 0:o.full)&&d.jsxs("div",{className:"mt-6 rounded-2xl border-2 border-bubble-rose/50 bg-bubble-rose/10 p-4 text-center",children:[d.jsx("p",{className:"font-display text-lg font-bold text-bubble-rose",children:"Buffer full — reader paused"}),d.jsxs("p",{className:"mt-1 text-sm text-slate-300",children:["Tap ",d.jsx("strong",{children:"Download NDJSON"})," to pull every card profile to your phone, then"," ",d.jsx("strong",{children:"Clear buffer"})," to resume field scans."]})]}),(o==null?void 0:o.deepCapture)&&n&&!n.scanning&&d.jsxs("p",{className:"mt-4 rounded-2xl border border-amber-500/30 bg-amber-500/10 p-3 text-sm text-amber-100",children:["Firmware normally has ",d.jsx("strong",{children:"Live scan"})," on at boot. If you turned it off, enable it on the Dashboard."]}),i&&d.jsxs("pre",{className:"mt-4 max-h-40 overflow-auto rounded-2xl border border-white/10 bg-black/30 p-3 text-xs text-slate-300",children:["Last capture event: ",i]})]})]})}function P2(){const e=Je(),[t,n]=x.useState("classic1k"),[r,s]=x.useState(!0),[i,o]=x.useState(`FFFFFFFFFFFF
|
||
A0A1A2A3A4A5
|
||
D3F7D3F7D3F7`),[a,l]=x.useState(!1),[u,c]=x.useState(""),f=async()=>{l(!0),c("");try{const p=i.split(/\r?\n/).map(h=>h.replace(/\s/g,"").toUpperCase()).filter(h=>h.length===12&&/^[0-9A-F]+$/.test(h)),g=i.split(/\r?\n/).map(h=>h.replace(/\s/g,"")).filter(h=>h.length>0&&(h.length!==12||!/^[0-9A-Fa-f]+$/.test(h))).length;g>0&&e(`${g} line(s) not valid 12-hex keys — skipped, firmware built-ins still run`);const v={readerType:t,variations:r,keysHex:p},w=await fetch(xs("/api/mifare/dictionary-attack"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(v)}),b=await w.text();if(!w.ok)throw new Error(b);try{const h=JSON.parse(b);c(JSON.stringify(h,null,2))}catch{c(b)}e("Dictionary pass finished")}catch(p){e(String(p),"err")}finally{l(!1)}};return d.jsxs("div",{className:"glass space-y-6 p-6",children:[d.jsx("h1",{className:"font-display text-2xl font-bold",children:"Dictionary attack"}),d.jsxs("p",{className:"text-sm text-slate-400",children:["Select card family, optionally enable ",d.jsx("strong",{children:"bounded variations"})," (XOR / low-nibble tweaks per key). Firmware tries a ",d.jsx("strong",{children:"built-in community list"})," (Proxmark3 / MCT-style defaults) plus your lines below. This is ",d.jsx("strong",{children:"not"})," a full 2⁴⁸ exhaustive search — only keys you and the community already know. Hold a ",d.jsx("strong",{children:"MIFARE Classic"})," on the coil."," ",d.jsx("a",{className:"text-bubble-mint underline",href:"https://github.com/RfidResearchGroup/proxmark3/blob/master/client/dictionaries/mfc_default_keys.dic",target:"_blank",rel:"noreferrer",children:"More keys online"}),"."]}),d.jsxs("label",{className:"block text-sm",children:["Reader / map",d.jsxs("select",{value:t,onChange:p=>n(p.target.value),className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 px-4 py-2",children:[d.jsx("option",{value:"classic1k",children:"MIFARE Classic 1K (sectors 0–15)"}),d.jsx("option",{value:"classic4k",children:"MIFARE Classic 4K (sectors 0–39, proper 4/16-block geometry)"})]})]}),d.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[d.jsx("input",{type:"checkbox",checked:r,onChange:p=>s(p.target.checked)}),"Variations (extra tries per key — slower, wider net)"]}),d.jsxs("label",{className:"block text-sm",children:["Extra keys (one 12-hex key per line, merged after built-in list)",d.jsx("textarea",{value:i,onChange:p=>o(p.target.value),rows:6,className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 p-3 font-mono text-xs"})]}),d.jsx("button",{type:"button",disabled:a,onClick:f,className:"rounded-2xl bg-gradient-to-r from-bubble-rose to-orange-500 px-6 py-3 font-bold text-white disabled:opacity-50",children:a?"Running…":"Run dictionary attack"}),u&&d.jsx("pre",{className:"max-h-96 overflow-auto rounded-2xl border border-white/10 bg-black/40 p-4 text-xs text-bubble-mint",children:u})]})}function E2(){const e=Je(),[t,n]=x.useState("8C"),[r,s]=x.useState(""),[i,o]=x.useState(!1),a=async()=>{const l=t.replace(/\s/g,"");if(!l){e("Hex payload is empty","err");return}if(l.length%2!==0){e("Hex must have an even number of characters","err");return}if(!/^[0-9A-Fa-f]+$/.test(l)){e("Hex must contain only 0-9 A-F characters","err");return}o(!0),s("");try{const u=await fetch(xs("/api/nfc/emulate-raw"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({hex:l})}),c=await u.text();if(!u.ok)throw new Error(c);try{s(JSON.stringify(JSON.parse(c),null,2))}catch{s(c)}e("PN532 emulation command sent")}catch(u){e(String(u),"err")}finally{o(!1)}};return d.jsxs("div",{className:"glass space-y-6 p-6",children:[d.jsx("h1",{className:"font-display text-2xl font-bold",children:"Card emulation (PN532 target mode)"}),d.jsxs("p",{className:"text-sm text-slate-400",children:["Sends ",d.jsx("code",{className:"text-bubble-mint",children:"TgInitAsTarget"})," (0x8C) and following bytes as one PN532 payload. Real card emulation depends on UID length, timing, and reader behavior — this is an"," ",d.jsx("strong",{children:"expert / experimental"})," path. Build the byte sequence from NXP UM0701 or community examples. Wrong frames can leave the RF stack busy; power-cycle if the field acts stuck."]}),d.jsx("p",{className:"text-[11px] leading-relaxed text-slate-500",children:ws}),d.jsx(po,{mode:"emulate",onApplyHex:l=>n(l)}),d.jsxs("label",{className:"block text-sm",children:["Command + parameters (hex, no spaces required)",d.jsx("textarea",{value:t,onChange:l=>n(l.target.value),rows:4,className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 p-3 font-mono text-xs"})]}),d.jsx("button",{type:"button",disabled:i,onClick:a,className:"rounded-2xl bg-bubble-accent px-6 py-2 font-semibold text-white disabled:opacity-50",children:i?"Sending…":"Send emulate frame"}),r&&d.jsx("pre",{className:"max-h-80 overflow-auto rounded-2xl border border-white/10 bg-black/40 p-4 text-xs text-slate-200",children:r})]})}function Rf({title:e,badge:t,children:n,className:r=""}){return d.jsxs(O.div,{initial:{opacity:0,y:12},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-40px"},transition:{duration:.4,ease:[.22,1,.36,1]},className:`glass panel-edge relative overflow-hidden p-6 ${r}`.trim(),children:[d.jsx("div",{className:"pointer-events-none absolute -right-20 -top-20 h-40 w-40 rounded-full bg-bubble-accent/10 blur-3xl"}),d.jsx("div",{className:"pointer-events-none absolute -bottom-16 -left-16 h-36 w-36 rounded-full bg-bubble-rose/10 blur-3xl"}),d.jsx("div",{className:"pointer-events-none absolute inset-0 bg-gradient-to-br from-bubble-accent/[0.06] via-transparent to-bubble-mint/[0.07]"}),d.jsxs("div",{className:"relative",children:[d.jsxs("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-2",children:[d.jsx("h2",{className:"font-display text-lg font-normal tracking-wide text-bubble-mint text-glow-matrix",children:e}),t?d.jsx(O.span,{animate:{boxShadow:["0 0 12px rgba(0,229,255,0.3)","0 0 22px rgba(0,255,157,0.45)","0 0 12px rgba(0,229,255,0.3)"]},transition:{duration:2.2,repeat:1/0},className:"rounded-full border border-bubble-accent/50 bg-bubble-accent/15 px-2.5 py-0.5 font-mono text-[10px] uppercase tracking-widest text-bubble-accent",children:t}):null]}),n]})]})}function ta(e){const t=e.replace(/\s/g,"");if(t.length!==12)return null;const n=[];for(let r=0;r<12;r+=2){const s=parseInt(t.slice(r,r+2),16);if(Number.isNaN(s))return null;n.push(s)}return n}function Cr(e){return e.map(t=>t.toString(16).toUpperCase().padStart(2,"0")).join("")}function T2(e){const t=e.length,n=new Set,r=[];for(let s=0;s<1<<t;s++){const i=new Array(6).fill(0);for(let a=0;a<t;a++)if(s&1<<a)for(let l=0;l<6;l++)i[l]^=e[a][l];const o=Cr(i);n.has(o)||(n.add(o),r.push([...i]))}return r}function j2(e){const t=e.replace(/\s/g,"");if(t.length%2)return null;const n=[];for(let o=0;o<t.length;o+=2){const a=parseInt(t.slice(o,o+2),16);if(Number.isNaN(a))return null;n.push(a)}if(!n.length)return null;const r=new Map;for(const o of n)r.set(o,(r.get(o)||0)+1);let s=0;const i=n.length;for(const o of r.values()){const a=o/i;s-=a*Math.log2(a)}return s}function N2(){const e=Je(),[t,n]=x.useState("FFFFFFFFFFFF"),[r,s]=x.useState("A0A1A2A3A4A5"),[i,o]=x.useState("000000000000"),[a,l]=x.useState(!1),[u,c]=x.useState("DEADBEEF"),f=x.useMemo(()=>{const b=ta(t),h=ta(r),m=ta(i);return!b||!h?null:a&&m?[b,h,m]:[b,h]},[t,r,i,a]),p=x.useMemo(()=>f?T2(f):[],[f]),g=x.useMemo(()=>j2(u),[u]),v=()=>{const b=p.map(h=>Cr(h)).join(`
|
||
`);navigator.clipboard.writeText(b),e("Copied XOR span keys")},w=()=>{const b=p.map(h=>Cr(h)).join(`
|
||
`);sessionStorage.setItem("pn532_keylab_import",b),e("Stored for Keys page — open Keys and tap “Import Key Lab”")};return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"glass relative overflow-hidden p-8",children:[d.jsx("div",{className:"pointer-events-none absolute -right-24 top-0 h-72 w-72 rounded-full bg-bubble-accent/15 blur-3xl"}),d.jsx("h1",{className:"font-display text-3xl font-bold text-glow-matrix md:text-4xl",children:"Key Lab"}),d.jsxs("p",{className:"mt-3 max-w-3xl text-sm leading-relaxed text-slate-400",children:["XOR your base keys together in every combination → more candidates to paste into ",d.jsx("strong",{children:"Brute"})," or"," ",d.jsx("strong",{children:"Keys"}),". Entropy readout is just for fun on random hex blobs."]})]}),d.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[d.jsxs(Rf,{title:"XOR span generator",badge:"mix",children:[d.jsx("p",{className:"mb-4 text-xs leading-relaxed text-slate-500",children:"All XOR combinations of your base keys (2 bases → up to 4 keys; 3 bases → up to 8). Each result is a valid 6-byte Classic key candidate."}),d.jsxs("label",{className:"block text-xs text-slate-400",children:["Base A",d.jsx("input",{value:t,onChange:b=>n(b.target.value.toUpperCase()),className:"mt-1 w-full rounded-xl border border-white/10 bg-black/30 px-3 py-2 font-mono text-sm"})]}),d.jsxs("label",{className:"mt-3 block text-xs text-slate-400",children:["Base B",d.jsx("input",{value:r,onChange:b=>s(b.target.value.toUpperCase()),className:"mt-1 w-full rounded-xl border border-white/10 bg-black/30 px-3 py-2 font-mono text-sm"})]}),d.jsxs("label",{className:"mt-3 flex items-center gap-2 text-xs text-slate-400",children:[d.jsx("input",{type:"checkbox",checked:a,onChange:b=>l(b.target.checked)}),"Use third base"]}),a?d.jsxs("label",{className:"mt-2 block text-xs text-slate-400",children:["Base C",d.jsx("input",{value:i,onChange:b=>o(b.target.value.toUpperCase()),className:"mt-1 w-full rounded-xl border border-white/10 bg-black/30 px-3 py-2 font-mono text-sm"})]}):null,f?d.jsxs(d.Fragment,{children:[d.jsx("ul",{className:"mt-4 max-h-48 space-y-1 overflow-auto rounded-xl border border-bubble-mint/15 bg-black/35 p-3 font-mono text-xs text-bubble-mint",children:p.map(b=>d.jsx("li",{children:Cr(b)},Cr(b)))}),d.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[d.jsx("button",{type:"button",onClick:v,className:"rounded-xl bg-bubble-accent px-4 py-2 text-sm font-semibold text-bubble-950",children:"Copy all"}),d.jsx("button",{type:"button",onClick:w,className:"rounded-xl border border-bubble-mint/40 px-4 py-2 text-sm text-bubble-mint",children:"Stage for Keys"})]})]}):d.jsx("p",{className:"mt-4 text-sm text-bubble-rose",children:"Enter valid 12-hex keys."})]}),d.jsxs(Rf,{title:"Blob entropy",badge:"analysis",children:[d.jsx("p",{className:"mb-4 text-xs text-slate-500",children:"Shannon entropy per byte of your hex blob (0–8). Random uniform bytes → ~8; sparse UID-like → lower."}),d.jsx("textarea",{value:u,onChange:b=>c(b.target.value),rows:5,className:"w-full rounded-xl border border-white/10 bg-black/30 p-3 font-mono text-xs"}),d.jsx("div",{className:"mt-4 rounded-xl border border-bubble-accent/25 bg-bubble-accent/5 p-4 font-mono text-sm text-bubble-accent",children:g==null?"Invalid hex (even length, 0-9A-F)":`${g.toFixed(3)} bits / byte`})]})]})]})}function A2(){const{wsOk:e,pn532Connected:t}=or();return d.jsxs("span",{className:"hidden font-mono text-[9px] text-bubble-mint/40 md:inline lg:text-[10px]",children:[d.jsx("span",{className:e?"text-bubble-accent/90":"animate-pulse text-bubble-rose/60",children:"●"})," ","RF_STACK"," ",d.jsx("span",{className:e?t?"font-bold text-bubble-mint":"animate-pulse text-amber-400":"animate-pulse text-bubble-rose/80",children:e?t?"LIVE":"NO RF":"WAIT"}),d.jsx("span",{className:"mx-1.5 text-bubble-mint/25",children:"│"}),d.jsx("span",{className:"text-bubble-mint/50",children:"ws://stream"})]})}const R2=[["/","Dash"],["/capture","Read-all"],["/read","Read"],["/write","Write"],["/brute","Brute"],["/emulate","Emu"],["/keylab","KeyLab"],["/library","Lib"],["/keys","Keys"],["/raw","Raw"],["/settings","Set"]];function L2(){return d.jsx(i2,{children:d.jsx(qS,{children:d.jsxs("div",{className:"hack-scanlines hack-grid relative min-h-screen pb-20",children:[d.jsx(t2,{}),d.jsx(s2,{}),d.jsx(e2,{}),d.jsxs("header",{className:"relative z-40 border-b border-bubble-accent/20 bg-bubble-950/80 backdrop-blur-xl",children:[d.jsx("div",{className:"absolute inset-x-0 bottom-0 h-px bg-gradient-to-r from-transparent via-bubble-mint/60 to-transparent"}),d.jsx("div",{className:"absolute inset-x-0 top-0 h-px bg-gradient-to-r from-bubble-rose/30 via-bubble-accent/40 to-bubble-mint/30 opacity-80"}),d.jsxs("div",{className:"relative mx-auto flex max-w-6xl flex-wrap items-center justify-between gap-3 px-4 py-4",children:[d.jsxs("div",{className:"flex flex-col gap-1 sm:flex-row sm:items-center sm:gap-4",children:[d.jsxs(O.div,{className:"font-display text-lg font-normal tracking-[0.12em] sm:text-xl md:text-2xl",initial:{opacity:0,x:-12},animate:{opacity:1,x:0},transition:{type:"spring",stiffness:120,damping:18},children:[d.jsx(O.span,{className:"bg-gradient-to-r from-bubble-mint via-bubble-accent to-bubble-rose bg-clip-text text-transparent text-glow-matrix",animate:{backgroundPosition:["0% 50%","100% 50%","0% 50%"]},transition:{duration:8,repeat:1/0,ease:"linear"},style:{WebkitBackgroundClip:"text",backgroundClip:"text",backgroundImage:"linear-gradient(90deg, #00ff9d, #00e5ff, #ff2a6d, #d4ff00, #00ff9d, #00ff9d)",backgroundSize:"250% 100%"},children:"PN532"}),d.jsx("span",{className:"ml-2 text-[9px] font-mono font-normal tracking-[0.35em] text-bubble-accent/60 sm:text-[10px]",children:"MAXIMAL"})]}),d.jsx(A2,{})]}),d.jsx("nav",{className:"flex max-w-full flex-wrap justify-end gap-1 text-[10px] font-mono sm:gap-1.5 sm:text-[11px]",children:R2.map(([e,t])=>d.jsx(gx,{to:e,children:({isActive:n})=>d.jsxs(O.span,{className:`inline-block rounded-md border px-1.5 py-1 sm:px-2 sm:py-1.5 ${n?"nav-hack-active":"border-transparent text-slate-500 hover:border-bubble-accent/35 hover:text-bubble-accent hover:shadow-[0_0_18px_rgba(0,229,255,0.25)]"}`,whileHover:{scale:1.06,y:-1},whileTap:{scale:.97},transition:{type:"spring",stiffness:400,damping:22},children:[d.jsx("span",{className:"text-bubble-mint/35",children:"⟨"}),t,d.jsx("span",{className:"text-bubble-mint/35",children:"⟩"})]})},e))})]})]}),d.jsx("main",{className:"relative z-10 mx-auto max-w-6xl px-4 py-8",children:d.jsx(O.div,{initial:{opacity:0,y:14},animate:{opacity:1,y:0},transition:{duration:.45,ease:[.22,1,.36,1]},children:d.jsxs(ix,{children:[d.jsx(_e,{path:"/",element:d.jsx(d2,{})}),d.jsx(_e,{path:"/capture",element:d.jsx(C2,{})}),d.jsx(_e,{path:"/read",element:d.jsx(f2,{})}),d.jsx(_e,{path:"/write",element:d.jsx(v2,{})}),d.jsx(_e,{path:"/brute",element:d.jsx(P2,{})}),d.jsx(_e,{path:"/emulate",element:d.jsx(E2,{})}),d.jsx(_e,{path:"/keylab",element:d.jsx(N2,{})}),d.jsx(_e,{path:"/library",element:d.jsx(x2,{})}),d.jsx(_e,{path:"/keys",element:d.jsx(b2,{})}),d.jsx(_e,{path:"/raw",element:d.jsx(S2,{})}),d.jsx(_e,{path:"/settings",element:d.jsx(k2,{})})]})})})]})})})}const D2=localStorage.getItem("theme");D2==="light"&&(document.documentElement.classList.add("light"),document.documentElement.classList.remove("dark"));const Lf=document.getElementById("root");Lf&&na.createRoot(Lf).render(d.jsx($f.StrictMode,{children:d.jsx(px,{children:d.jsx(L2,{})})}));
|