469 lines
417 KiB
JavaScript
469 lines
417 KiB
JavaScript
function Dg(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function ql(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gh={exports:{}},uo={},yh={exports:{}},$={};/**
|
|
* @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 _i=Symbol.for("react.element"),Rg=Symbol.for("react.portal"),Vg=Symbol.for("react.fragment"),Fg=Symbol.for("react.strict_mode"),zg=Symbol.for("react.profiler"),Og=Symbol.for("react.provider"),Ig=Symbol.for("react.context"),$g=Symbol.for("react.forward_ref"),Bg=Symbol.for("react.suspense"),Ug=Symbol.for("react.memo"),Wg=Symbol.for("react.lazy"),vc=Symbol.iterator;function Hg(e){return e===null||typeof e!="object"?null:(e=vc&&e[vc]||e["@@iterator"],typeof e=="function"?e:null)}var vh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},xh=Object.assign,wh={};function Cr(e,t,n){this.props=e,this.context=t,this.refs=wh,this.updater=n||vh}Cr.prototype.isReactComponent={};Cr.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")};Cr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Sh(){}Sh.prototype=Cr.prototype;function Gl(e,t,n){this.props=e,this.context=t,this.refs=wh,this.updater=n||vh}var Yl=Gl.prototype=new Sh;Yl.constructor=Gl;xh(Yl,Cr.prototype);Yl.isPureReactComponent=!0;var xc=Array.isArray,kh=Object.prototype.hasOwnProperty,Kl={current:null},bh={key:!0,ref:!0,__self:!0,__source:!0};function Ph(e,t,n){var r,i={},s=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)kh.call(t,r)&&!bh.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];i.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:_i,type:e,key:s,ref:o,props:i,_owner:Kl.current}}function qg(e,t){return{$$typeof:_i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ql(e){return typeof e=="object"&&e!==null&&e.$$typeof===_i}function Gg(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var wc=/\/+/g;function Oo(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Gg(""+e.key):t.toString(36)}function ds(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case _i:case Rg:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+Oo(o,0):r,xc(i)?(n="",e!=null&&(n=e.replace(wc,"$&/")+"/"),ds(i,t,n,"",function(c){return c})):i!=null&&(Ql(i)&&(i=qg(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(wc,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",xc(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+Oo(s,a);o+=ds(s,t,n,l,i)}else if(l=Hg(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+Oo(s,a++),o+=ds(s,t,n,l,i);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Ui(e,t,n){if(e==null)return e;var r=[],i=0;return ds(e,r,"","",function(s){return t.call(n,s,i++)}),r}function Yg(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 je={current:null},fs={transition:null},Kg={ReactCurrentDispatcher:je,ReactCurrentBatchConfig:fs,ReactCurrentOwner:Kl};function Ch(){throw Error("act(...) is not supported in production builds of React.")}$.Children={map:Ui,forEach:function(e,t,n){Ui(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ui(e,function(){t++}),t},toArray:function(e){return Ui(e,function(t){return t})||[]},only:function(e){if(!Ql(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};$.Component=Cr;$.Fragment=Vg;$.Profiler=zg;$.PureComponent=Gl;$.StrictMode=Fg;$.Suspense=Bg;$.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Kg;$.act=Ch;$.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=xh({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=Kl.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)kh.call(t,l)&&!bh.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:_i,type:e.type,key:i,ref:s,props:r,_owner:o}};$.createContext=function(e){return e={$$typeof:Ig,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Og,_context:e},e.Consumer=e};$.createElement=Ph;$.createFactory=function(e){var t=Ph.bind(null,e);return t.type=e,t};$.createRef=function(){return{current:null}};$.forwardRef=function(e){return{$$typeof:$g,render:e}};$.isValidElement=Ql;$.lazy=function(e){return{$$typeof:Wg,_payload:{_status:-1,_result:e},_init:Yg}};$.memo=function(e,t){return{$$typeof:Ug,type:e,compare:t===void 0?null:t}};$.startTransition=function(e){var t=fs.transition;fs.transition={};try{e()}finally{fs.transition=t}};$.unstable_act=Ch;$.useCallback=function(e,t){return je.current.useCallback(e,t)};$.useContext=function(e){return je.current.useContext(e)};$.useDebugValue=function(){};$.useDeferredValue=function(e){return je.current.useDeferredValue(e)};$.useEffect=function(e,t){return je.current.useEffect(e,t)};$.useId=function(){return je.current.useId()};$.useImperativeHandle=function(e,t,n){return je.current.useImperativeHandle(e,t,n)};$.useInsertionEffect=function(e,t){return je.current.useInsertionEffect(e,t)};$.useLayoutEffect=function(e,t){return je.current.useLayoutEffect(e,t)};$.useMemo=function(e,t){return je.current.useMemo(e,t)};$.useReducer=function(e,t,n){return je.current.useReducer(e,t,n)};$.useRef=function(e){return je.current.useRef(e)};$.useState=function(e){return je.current.useState(e)};$.useSyncExternalStore=function(e,t,n){return je.current.useSyncExternalStore(e,t,n)};$.useTransition=function(){return je.current.useTransition()};$.version="18.3.1";yh.exports=$;var b=yh.exports;const Ai=ql(b),Qg=Dg({__proto__:null,default:Ai},[b]);/**
|
|
* @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 Xg=b,Zg=Symbol.for("react.element"),Jg=Symbol.for("react.fragment"),ey=Object.prototype.hasOwnProperty,ty=Xg.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ny={key:!0,ref:!0,__self:!0,__source:!0};function Eh(e,t,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)ey.call(t,r)&&!ny.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Zg,type:e,key:s,ref:o,props:i,_owner:ty.current}}uo.Fragment=Jg;uo.jsx=Eh;uo.jsxs=Eh;gh.exports=uo;var g=gh.exports,_a={},Th={exports:{}},We={},jh={exports:{}},Mh={};/**
|
|
* @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,R){var z=j.length;j.push(R);e:for(;0<z;){var D=z-1>>>1,Z=j[D];if(0<i(Z,R))j[D]=R,j[z]=Z,z=D;else break e}}function n(j){return j.length===0?null:j[0]}function r(j){if(j.length===0)return null;var R=j[0],z=j.pop();if(z!==R){j[0]=z;e:for(var D=0,Z=j.length,wn=Z>>>1;D<wn;){var ut=2*(D+1)-1,Wn=j[ut],ze=ut+1,Sn=j[ze];if(0>i(Wn,z))ze<Z&&0>i(Sn,Wn)?(j[D]=Sn,j[ze]=z,D=ze):(j[D]=Wn,j[ut]=z,D=ut);else if(ze<Z&&0>i(Sn,z))j[D]=Sn,j[ze]=z,D=ze;else break e}}return R}function i(j,R){var z=j.sortIndex-R.sortIndex;return z!==0?z:j.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],c=[],d=1,f=null,u=3,h=!1,p=!1,m=!1,w=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(j){for(var R=n(c);R!==null;){if(R.callback===null)r(c);else if(R.startTime<=j)r(c),R.sortIndex=R.expirationTime,t(l,R);else break;R=n(c)}}function S(j){if(m=!1,x(j),!p)if(n(l)!==null)p=!0,H(k);else{var R=n(c);R!==null&&Pe(S,R.startTime-j)}}function k(j,R){p=!1,m&&(m=!1,y(E),E=-1),h=!0;var z=u;try{for(x(R),f=n(l);f!==null&&(!(f.expirationTime>R)||j&&!I());){var D=f.callback;if(typeof D=="function"){f.callback=null,u=f.priorityLevel;var Z=D(f.expirationTime<=R);R=e.unstable_now(),typeof Z=="function"?f.callback=Z:f===n(l)&&r(l),x(R)}else r(l);f=n(l)}if(f!==null)var wn=!0;else{var ut=n(c);ut!==null&&Pe(S,ut.startTime-R),wn=!1}return wn}finally{f=null,u=z,h=!1}}var P=!1,C=null,E=-1,N=5,M=-1;function I(){return!(e.unstable_now()-M<N)}function A(){if(C!==null){var j=e.unstable_now();M=j;var R=!0;try{R=C(!0,j)}finally{R?B():(P=!1,C=null)}}else P=!1}var B;if(typeof v=="function")B=function(){v(A)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,me=L.port2;L.port1.onmessage=A,B=function(){me.postMessage(null)}}else B=function(){w(A,0)};function H(j){C=j,P||(P=!0,B())}function Pe(j,R){E=w(function(){j(e.unstable_now())},R)}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(){p||h||(p=!0,H(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"):N=0<j?Math.floor(1e3/j):5},e.unstable_getCurrentPriorityLevel=function(){return u},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(j){switch(u){case 1:case 2:case 3:var R=3;break;default:R=u}var z=u;u=R;try{return j()}finally{u=z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(j,R){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var z=u;u=j;try{return R()}finally{u=z}},e.unstable_scheduleCallback=function(j,R,z){var D=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?D+z:D):z=D,j){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=z+Z,j={id:d++,callback:R,priorityLevel:j,startTime:z,expirationTime:Z,sortIndex:-1},z>D?(j.sortIndex=z,t(c,j),n(l)===null&&j===n(c)&&(m?(y(E),E=-1):m=!0,Pe(S,z-D))):(j.sortIndex=Z,t(l,j),p||h||(p=!0,H(k))),j},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(j){var R=u;return function(){var z=u;u=R;try{return j.apply(this,arguments)}finally{u=z}}}})(Mh);jh.exports=Mh;var ry=jh.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 iy=b,Be=ry;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 Nh=new Set,li={};function In(e,t){mr(e,t),mr(e+"Capture",t)}function mr(e,t){for(li[e]=t,e=0;e<t.length;e++)Nh.add(t[e])}var Mt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Aa=Object.prototype.hasOwnProperty,sy=/^[: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]*$/,Sc={},kc={};function oy(e){return Aa.call(kc,e)?!0:Aa.call(Sc,e)?!1:sy.test(e)?kc[e]=!0:(Sc[e]=!0,!1)}function ay(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 ly(e,t,n,r){if(t===null||typeof t>"u"||ay(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 Me(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var ve={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ve[e]=new Me(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ve[t]=new Me(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ve[e]=new Me(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ve[e]=new Me(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){ve[e]=new Me(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ve[e]=new Me(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ve[e]=new Me(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ve[e]=new Me(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ve[e]=new Me(e,5,!1,e.toLowerCase(),null,!1,!1)});var Xl=/[\-:]([a-z])/g;function Zl(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(Xl,Zl);ve[t]=new Me(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(Xl,Zl);ve[t]=new Me(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(Xl,Zl);ve[t]=new Me(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ve[e]=new Me(e,1,!1,e.toLowerCase(),null,!1,!1)});ve.xlinkHref=new Me("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ve[e]=new Me(e,1,!1,e.toLowerCase(),null,!0,!0)});function Jl(e,t,n,r){var i=ve.hasOwnProperty(t)?ve[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(ly(t,n,i,r)&&(n=null),r||i===null?oy(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Rt=iy.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Wi=Symbol.for("react.element"),qn=Symbol.for("react.portal"),Gn=Symbol.for("react.fragment"),eu=Symbol.for("react.strict_mode"),La=Symbol.for("react.profiler"),_h=Symbol.for("react.provider"),Ah=Symbol.for("react.context"),tu=Symbol.for("react.forward_ref"),Da=Symbol.for("react.suspense"),Ra=Symbol.for("react.suspense_list"),nu=Symbol.for("react.memo"),$t=Symbol.for("react.lazy"),Lh=Symbol.for("react.offscreen"),bc=Symbol.iterator;function _r(e){return e===null||typeof e!="object"?null:(e=bc&&e[bc]||e["@@iterator"],typeof e=="function"?e:null)}var re=Object.assign,Io;function Ur(e){if(Io===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Io=t&&t[1]||""}return`
|
|
`+Io+e}var $o=!1;function Bo(e,t){if(!e||$o)return"";$o=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.stack.split(`
|
|
`),s=r.stack.split(`
|
|
`),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var l=`
|
|
`+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{$o=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ur(e):""}function uy(e){switch(e.tag){case 5:return Ur(e.type);case 16:return Ur("Lazy");case 13:return Ur("Suspense");case 19:return Ur("SuspenseList");case 0:case 2:case 15:return e=Bo(e.type,!1),e;case 11:return e=Bo(e.type.render,!1),e;case 1:return e=Bo(e.type,!0),e;default:return""}}function Va(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 Gn:return"Fragment";case qn:return"Portal";case La:return"Profiler";case eu:return"StrictMode";case Da:return"Suspense";case Ra:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ah:return(e.displayName||"Context")+".Consumer";case _h:return(e._context.displayName||"Context")+".Provider";case tu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case nu:return t=e.displayName||null,t!==null?t:Va(e.type)||"Memo";case $t:t=e._payload,e=e._init;try{return Va(e(t))}catch{}}return null}function cy(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 Va(t);case 8:return t===eu?"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 ln(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Dh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function dy(e){var t=Dh(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Hi(e){e._valueTracker||(e._valueTracker=dy(e))}function Rh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Dh(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ts(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 Fa(e,t){var n=t.checked;return re({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Pc(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ln(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 Vh(e,t){t=t.checked,t!=null&&Jl(e,"checked",t,!1)}function za(e,t){Vh(e,t);var n=ln(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")?Oa(e,t.type,n):t.hasOwnProperty("defaultValue")&&Oa(e,t.type,ln(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Cc(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 Oa(e,t,n){(t!=="number"||Ts(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Wr=Array.isArray;function lr(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ln(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Ia(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(T(91));return re({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ec(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(Wr(n)){if(1<n.length)throw Error(T(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ln(n)}}function Fh(e,t){var n=ln(t.value),r=ln(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 Tc(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function zh(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 $a(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?zh(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var qi,Oh=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(qi=qi||document.createElement("div"),qi.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=qi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ui(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Yr={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},fy=["Webkit","ms","Moz","O"];Object.keys(Yr).forEach(function(e){fy.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Yr[t]=Yr[e]})});function Ih(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Yr.hasOwnProperty(e)&&Yr[e]?(""+t).trim():t+"px"}function $h(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Ih(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var hy=re({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 Ba(e,t){if(t){if(hy[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 Ua(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 Wa=null;function ru(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ha=null,ur=null,cr=null;function jc(e){if(e=Ri(e)){if(typeof Ha!="function")throw Error(T(280));var t=e.stateNode;t&&(t=mo(t),Ha(e.stateNode,e.type,t))}}function Bh(e){ur?cr?cr.push(e):cr=[e]:ur=e}function Uh(){if(ur){var e=ur,t=cr;if(cr=ur=null,jc(e),t)for(e=0;e<t.length;e++)jc(t[e])}}function Wh(e,t){return e(t)}function Hh(){}var Uo=!1;function qh(e,t,n){if(Uo)return e(t,n);Uo=!0;try{return Wh(e,t,n)}finally{Uo=!1,(ur!==null||cr!==null)&&(Hh(),Uh())}}function ci(e,t){var n=e.stateNode;if(n===null)return null;var r=mo(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 qa=!1;if(Mt)try{var Ar={};Object.defineProperty(Ar,"passive",{get:function(){qa=!0}}),window.addEventListener("test",Ar,Ar),window.removeEventListener("test",Ar,Ar)}catch{qa=!1}function py(e,t,n,r,i,s,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(d){this.onError(d)}}var Kr=!1,js=null,Ms=!1,Ga=null,my={onError:function(e){Kr=!0,js=e}};function gy(e,t,n,r,i,s,o,a,l){Kr=!1,js=null,py.apply(my,arguments)}function yy(e,t,n,r,i,s,o,a,l){if(gy.apply(this,arguments),Kr){if(Kr){var c=js;Kr=!1,js=null}else throw Error(T(198));Ms||(Ms=!0,Ga=c)}}function $n(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 Gh(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 Mc(e){if($n(e)!==e)throw Error(T(188))}function vy(e){var t=e.alternate;if(!t){if(t=$n(e),t===null)throw Error(T(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return Mc(i),e;if(s===r)return Mc(i),t;s=s.sibling}throw Error(T(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o)throw Error(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 Yh(e){return e=vy(e),e!==null?Kh(e):null}function Kh(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Kh(e);if(t!==null)return t;e=e.sibling}return null}var Qh=Be.unstable_scheduleCallback,Nc=Be.unstable_cancelCallback,xy=Be.unstable_shouldYield,wy=Be.unstable_requestPaint,se=Be.unstable_now,Sy=Be.unstable_getCurrentPriorityLevel,iu=Be.unstable_ImmediatePriority,Xh=Be.unstable_UserBlockingPriority,Ns=Be.unstable_NormalPriority,ky=Be.unstable_LowPriority,Zh=Be.unstable_IdlePriority,co=null,pt=null;function by(e){if(pt&&typeof pt.onCommitFiberRoot=="function")try{pt.onCommitFiberRoot(co,e,void 0,(e.current.flags&128)===128)}catch{}}var ot=Math.clz32?Math.clz32:Ey,Py=Math.log,Cy=Math.LN2;function Ey(e){return e>>>=0,e===0?32:31-(Py(e)/Cy|0)|0}var Gi=64,Yi=4194304;function Hr(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 _s(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=Hr(a):(s&=o,s!==0&&(r=Hr(s)))}else o=n&~i,o!==0?r=Hr(o):s!==0&&(r=Hr(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-ot(t),i=1<<n,r|=e[n],t&=~i;return r}function Ty(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 jy(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-ot(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=Ty(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function Ya(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Jh(){var e=Gi;return Gi<<=1,!(Gi&4194240)&&(Gi=64),e}function Wo(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Li(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ot(t),e[t]=n}function My(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-ot(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function su(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ot(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var W=0;function ep(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var tp,ou,np,rp,ip,Ka=!1,Ki=[],Qt=null,Xt=null,Zt=null,di=new Map,fi=new Map,Wt=[],Ny="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 _c(e,t){switch(e){case"focusin":case"focusout":Qt=null;break;case"dragenter":case"dragleave":Xt=null;break;case"mouseover":case"mouseout":Zt=null;break;case"pointerover":case"pointerout":di.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":fi.delete(t.pointerId)}}function Lr(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=Ri(t),t!==null&&ou(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function _y(e,t,n,r,i){switch(t){case"focusin":return Qt=Lr(Qt,e,t,n,r,i),!0;case"dragenter":return Xt=Lr(Xt,e,t,n,r,i),!0;case"mouseover":return Zt=Lr(Zt,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return di.set(s,Lr(di.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,fi.set(s,Lr(fi.get(s)||null,e,t,n,r,i)),!0}return!1}function sp(e){var t=jn(e.target);if(t!==null){var n=$n(t);if(n!==null){if(t=n.tag,t===13){if(t=Gh(n),t!==null){e.blockedOn=t,ip(e.priority,function(){np(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 hs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Qa(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Wa=r,n.target.dispatchEvent(r),Wa=null}else return t=Ri(n),t!==null&&ou(t),e.blockedOn=n,!1;t.shift()}return!0}function Ac(e,t,n){hs(e)&&n.delete(t)}function Ay(){Ka=!1,Qt!==null&&hs(Qt)&&(Qt=null),Xt!==null&&hs(Xt)&&(Xt=null),Zt!==null&&hs(Zt)&&(Zt=null),di.forEach(Ac),fi.forEach(Ac)}function Dr(e,t){e.blockedOn===t&&(e.blockedOn=null,Ka||(Ka=!0,Be.unstable_scheduleCallback(Be.unstable_NormalPriority,Ay)))}function hi(e){function t(i){return Dr(i,e)}if(0<Ki.length){Dr(Ki[0],e);for(var n=1;n<Ki.length;n++){var r=Ki[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Qt!==null&&Dr(Qt,e),Xt!==null&&Dr(Xt,e),Zt!==null&&Dr(Zt,e),di.forEach(t),fi.forEach(t),n=0;n<Wt.length;n++)r=Wt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Wt.length&&(n=Wt[0],n.blockedOn===null);)sp(n),n.blockedOn===null&&Wt.shift()}var dr=Rt.ReactCurrentBatchConfig,As=!0;function Ly(e,t,n,r){var i=W,s=dr.transition;dr.transition=null;try{W=1,au(e,t,n,r)}finally{W=i,dr.transition=s}}function Dy(e,t,n,r){var i=W,s=dr.transition;dr.transition=null;try{W=4,au(e,t,n,r)}finally{W=i,dr.transition=s}}function au(e,t,n,r){if(As){var i=Qa(e,t,n,r);if(i===null)ea(e,t,r,Ls,n),_c(e,r);else if(_y(i,e,t,n,r))r.stopPropagation();else if(_c(e,r),t&4&&-1<Ny.indexOf(e)){for(;i!==null;){var s=Ri(i);if(s!==null&&tp(s),s=Qa(e,t,n,r),s===null&&ea(e,t,r,Ls,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else ea(e,t,r,null,n)}}var Ls=null;function Qa(e,t,n,r){if(Ls=null,e=ru(r),e=jn(e),e!==null)if(t=$n(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Gh(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 Ls=e,null}function op(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(Sy()){case iu:return 1;case Xh:return 4;case Ns:case ky:return 16;case Zh:return 536870912;default:return 16}default:return 16}}var Gt=null,lu=null,ps=null;function ap(){if(ps)return ps;var e,t=lu,n=t.length,r,i="value"in Gt?Gt.value:Gt.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[s-r];r++);return ps=i.slice(e,1<r?1-r:void 0)}function ms(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 Qi(){return!0}function Lc(){return!1}function He(e){function t(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Qi:Lc,this.isPropagationStopped=Lc,this}return re(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=Qi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Qi)},persist:function(){},isPersistent:Qi}),t}var Er={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},uu=He(Er),Di=re({},Er,{view:0,detail:0}),Ry=He(Di),Ho,qo,Rr,fo=re({},Di,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:cu,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!==Rr&&(Rr&&e.type==="mousemove"?(Ho=e.screenX-Rr.screenX,qo=e.screenY-Rr.screenY):qo=Ho=0,Rr=e),Ho)},movementY:function(e){return"movementY"in e?e.movementY:qo}}),Dc=He(fo),Vy=re({},fo,{dataTransfer:0}),Fy=He(Vy),zy=re({},Di,{relatedTarget:0}),Go=He(zy),Oy=re({},Er,{animationName:0,elapsedTime:0,pseudoElement:0}),Iy=He(Oy),$y=re({},Er,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),By=He($y),Uy=re({},Er,{data:0}),Rc=He(Uy),Wy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Hy={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"},qy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Gy(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=qy[e])?!!t[e]:!1}function cu(){return Gy}var Yy=re({},Di,{key:function(e){if(e.key){var t=Wy[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ms(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Hy[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:cu,charCode:function(e){return e.type==="keypress"?ms(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ms(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ky=He(Yy),Qy=re({},fo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Vc=He(Qy),Xy=re({},Di,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:cu}),Zy=He(Xy),Jy=re({},Er,{propertyName:0,elapsedTime:0,pseudoElement:0}),e1=He(Jy),t1=re({},fo,{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}),n1=He(t1),r1=[9,13,27,32],du=Mt&&"CompositionEvent"in window,Qr=null;Mt&&"documentMode"in document&&(Qr=document.documentMode);var i1=Mt&&"TextEvent"in window&&!Qr,lp=Mt&&(!du||Qr&&8<Qr&&11>=Qr),Fc=" ",zc=!1;function up(e,t){switch(e){case"keyup":return r1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function cp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Yn=!1;function s1(e,t){switch(e){case"compositionend":return cp(t);case"keypress":return t.which!==32?null:(zc=!0,Fc);case"textInput":return e=t.data,e===Fc&&zc?null:e;default:return null}}function o1(e,t){if(Yn)return e==="compositionend"||!du&&up(e,t)?(e=ap(),ps=lu=Gt=null,Yn=!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 lp&&t.locale!=="ko"?null:t.data;default:return null}}var a1={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 Oc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!a1[e.type]:t==="textarea"}function dp(e,t,n,r){Bh(r),t=Ds(t,"onChange"),0<t.length&&(n=new uu("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Xr=null,pi=null;function l1(e){kp(e,0)}function ho(e){var t=Xn(e);if(Rh(t))return e}function u1(e,t){if(e==="change")return t}var fp=!1;if(Mt){var Yo;if(Mt){var Ko="oninput"in document;if(!Ko){var Ic=document.createElement("div");Ic.setAttribute("oninput","return;"),Ko=typeof Ic.oninput=="function"}Yo=Ko}else Yo=!1;fp=Yo&&(!document.documentMode||9<document.documentMode)}function $c(){Xr&&(Xr.detachEvent("onpropertychange",hp),pi=Xr=null)}function hp(e){if(e.propertyName==="value"&&ho(pi)){var t=[];dp(t,pi,e,ru(e)),qh(l1,t)}}function c1(e,t,n){e==="focusin"?($c(),Xr=t,pi=n,Xr.attachEvent("onpropertychange",hp)):e==="focusout"&&$c()}function d1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ho(pi)}function f1(e,t){if(e==="click")return ho(t)}function h1(e,t){if(e==="input"||e==="change")return ho(t)}function p1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var lt=typeof Object.is=="function"?Object.is:p1;function mi(e,t){if(lt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Aa.call(t,i)||!lt(e[i],t[i]))return!1}return!0}function Bc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Uc(e,t){var n=Bc(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=Bc(n)}}function pp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?pp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function mp(){for(var e=window,t=Ts();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ts(e.document)}return t}function fu(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 m1(e){var t=mp(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&pp(n.ownerDocument.documentElement,n)){if(r!==null&&fu(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=Uc(n,s);var o=Uc(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var g1=Mt&&"documentMode"in document&&11>=document.documentMode,Kn=null,Xa=null,Zr=null,Za=!1;function Wc(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Za||Kn==null||Kn!==Ts(r)||(r=Kn,"selectionStart"in r&&fu(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}),Zr&&mi(Zr,r)||(Zr=r,r=Ds(Xa,"onSelect"),0<r.length&&(t=new uu("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Kn)))}function Xi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Qn={animationend:Xi("Animation","AnimationEnd"),animationiteration:Xi("Animation","AnimationIteration"),animationstart:Xi("Animation","AnimationStart"),transitionend:Xi("Transition","TransitionEnd")},Qo={},gp={};Mt&&(gp=document.createElement("div").style,"AnimationEvent"in window||(delete Qn.animationend.animation,delete Qn.animationiteration.animation,delete Qn.animationstart.animation),"TransitionEvent"in window||delete Qn.transitionend.transition);function po(e){if(Qo[e])return Qo[e];if(!Qn[e])return e;var t=Qn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in gp)return Qo[e]=t[n];return e}var yp=po("animationend"),vp=po("animationiteration"),xp=po("animationstart"),wp=po("transitionend"),Sp=new Map,Hc="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 fn(e,t){Sp.set(e,t),In(t,[e])}for(var Xo=0;Xo<Hc.length;Xo++){var Zo=Hc[Xo],y1=Zo.toLowerCase(),v1=Zo[0].toUpperCase()+Zo.slice(1);fn(y1,"on"+v1)}fn(yp,"onAnimationEnd");fn(vp,"onAnimationIteration");fn(xp,"onAnimationStart");fn("dblclick","onDoubleClick");fn("focusin","onFocus");fn("focusout","onBlur");fn(wp,"onTransitionEnd");mr("onMouseEnter",["mouseout","mouseover"]);mr("onMouseLeave",["mouseout","mouseover"]);mr("onPointerEnter",["pointerout","pointerover"]);mr("onPointerLeave",["pointerout","pointerover"]);In("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));In("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));In("onBeforeInput",["compositionend","keypress","textInput","paste"]);In("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));In("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));In("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qr="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(" "),x1=new Set("cancel close invalid load scroll toggle".split(" ").concat(qr));function qc(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,yy(r,t,void 0,e),e.currentTarget=null}function kp(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;qc(i,a,c),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;qc(i,a,c),s=l}}}if(Ms)throw e=Ga,Ms=!1,Ga=null,e}function Y(e,t){var n=t[rl];n===void 0&&(n=t[rl]=new Set);var r=e+"__bubble";n.has(r)||(bp(t,e,2,!1),n.add(r))}function Jo(e,t,n){var r=0;t&&(r|=4),bp(n,e,r,t)}var Zi="_reactListening"+Math.random().toString(36).slice(2);function gi(e){if(!e[Zi]){e[Zi]=!0,Nh.forEach(function(n){n!=="selectionchange"&&(x1.has(n)||Jo(n,!1,e),Jo(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Zi]||(t[Zi]=!0,Jo("selectionchange",!1,t))}}function bp(e,t,n,r){switch(op(t)){case 1:var i=Ly;break;case 4:i=Dy;break;default:i=au}n=i.bind(null,t,n,e),i=void 0,!qa||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function ea(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;a!==null;){if(o=jn(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}qh(function(){var c=s,d=ru(n),f=[];e:{var u=Sp.get(e);if(u!==void 0){var h=uu,p=e;switch(e){case"keypress":if(ms(n)===0)break e;case"keydown":case"keyup":h=Ky;break;case"focusin":p="focus",h=Go;break;case"focusout":p="blur",h=Go;break;case"beforeblur":case"afterblur":h=Go;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=Dc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=Fy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=Zy;break;case yp:case vp:case xp:h=Iy;break;case wp:h=e1;break;case"scroll":h=Ry;break;case"wheel":h=n1;break;case"copy":case"cut":case"paste":h=By;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Vc}var m=(t&4)!==0,w=!m&&e==="scroll",y=m?u!==null?u+"Capture":null:u;m=[];for(var v=c,x;v!==null;){x=v;var S=x.stateNode;if(x.tag===5&&S!==null&&(x=S,y!==null&&(S=ci(v,y),S!=null&&m.push(yi(v,S,x)))),w)break;v=v.return}0<m.length&&(u=new h(u,p,null,n,d),f.push({event:u,listeners:m}))}}if(!(t&7)){e:{if(u=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",u&&n!==Wa&&(p=n.relatedTarget||n.fromElement)&&(jn(p)||p[Nt]))break e;if((h||u)&&(u=d.window===d?d:(u=d.ownerDocument)?u.defaultView||u.parentWindow:window,h?(p=n.relatedTarget||n.toElement,h=c,p=p?jn(p):null,p!==null&&(w=$n(p),p!==w||p.tag!==5&&p.tag!==6)&&(p=null)):(h=null,p=c),h!==p)){if(m=Dc,S="onMouseLeave",y="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(m=Vc,S="onPointerLeave",y="onPointerEnter",v="pointer"),w=h==null?u:Xn(h),x=p==null?u:Xn(p),u=new m(S,v+"leave",h,n,d),u.target=w,u.relatedTarget=x,S=null,jn(d)===c&&(m=new m(y,v+"enter",p,n,d),m.target=x,m.relatedTarget=w,S=m),w=S,h&&p)t:{for(m=h,y=p,v=0,x=m;x;x=Hn(x))v++;for(x=0,S=y;S;S=Hn(S))x++;for(;0<v-x;)m=Hn(m),v--;for(;0<x-v;)y=Hn(y),x--;for(;v--;){if(m===y||y!==null&&m===y.alternate)break t;m=Hn(m),y=Hn(y)}m=null}else m=null;h!==null&&Gc(f,u,h,m,!1),p!==null&&w!==null&&Gc(f,w,p,m,!0)}}e:{if(u=c?Xn(c):window,h=u.nodeName&&u.nodeName.toLowerCase(),h==="select"||h==="input"&&u.type==="file")var k=u1;else if(Oc(u))if(fp)k=h1;else{k=d1;var P=c1}else(h=u.nodeName)&&h.toLowerCase()==="input"&&(u.type==="checkbox"||u.type==="radio")&&(k=f1);if(k&&(k=k(e,c))){dp(f,k,n,d);break e}P&&P(e,u,c),e==="focusout"&&(P=u._wrapperState)&&P.controlled&&u.type==="number"&&Oa(u,"number",u.value)}switch(P=c?Xn(c):window,e){case"focusin":(Oc(P)||P.contentEditable==="true")&&(Kn=P,Xa=c,Zr=null);break;case"focusout":Zr=Xa=Kn=null;break;case"mousedown":Za=!0;break;case"contextmenu":case"mouseup":case"dragend":Za=!1,Wc(f,n,d);break;case"selectionchange":if(g1)break;case"keydown":case"keyup":Wc(f,n,d)}var C;if(du)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else Yn?up(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(lp&&n.locale!=="ko"&&(Yn||E!=="onCompositionStart"?E==="onCompositionEnd"&&Yn&&(C=ap()):(Gt=d,lu="value"in Gt?Gt.value:Gt.textContent,Yn=!0)),P=Ds(c,E),0<P.length&&(E=new Rc(E,e,null,n,d),f.push({event:E,listeners:P}),C?E.data=C:(C=cp(n),C!==null&&(E.data=C)))),(C=i1?s1(e,n):o1(e,n))&&(c=Ds(c,"onBeforeInput"),0<c.length&&(d=new Rc("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:c}),d.data=C))}kp(f,t)})}function yi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ds(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=ci(e,n),s!=null&&r.unshift(yi(e,s,i)),s=ci(e,t),s!=null&&r.push(yi(e,s,i))),e=e.return}return r}function Hn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Gc(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,i?(l=ci(n,s),l!=null&&o.unshift(yi(n,l,a))):i||(l=ci(n,s),l!=null&&o.push(yi(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var w1=/\r\n?/g,S1=/\u0000|\uFFFD/g;function Yc(e){return(typeof e=="string"?e:""+e).replace(w1,`
|
|
`).replace(S1,"")}function Ji(e,t,n){if(t=Yc(t),Yc(e)!==t&&n)throw Error(T(425))}function Rs(){}var Ja=null,el=null;function tl(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 nl=typeof setTimeout=="function"?setTimeout:void 0,k1=typeof clearTimeout=="function"?clearTimeout:void 0,Kc=typeof Promise=="function"?Promise:void 0,b1=typeof queueMicrotask=="function"?queueMicrotask:typeof Kc<"u"?function(e){return Kc.resolve(null).then(e).catch(P1)}:nl;function P1(e){setTimeout(function(){throw e})}function ta(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),hi(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);hi(t)}function Jt(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 Qc(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 Tr=Math.random().toString(36).slice(2),ft="__reactFiber$"+Tr,vi="__reactProps$"+Tr,Nt="__reactContainer$"+Tr,rl="__reactEvents$"+Tr,C1="__reactListeners$"+Tr,E1="__reactHandles$"+Tr;function jn(e){var t=e[ft];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Nt]||n[ft]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Qc(e);e!==null;){if(n=e[ft])return n;e=Qc(e)}return t}e=n,n=e.parentNode}return null}function Ri(e){return e=e[ft]||e[Nt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Xn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(T(33))}function mo(e){return e[vi]||null}var il=[],Zn=-1;function hn(e){return{current:e}}function K(e){0>Zn||(e.current=il[Zn],il[Zn]=null,Zn--)}function q(e,t){Zn++,il[Zn]=e.current,e.current=t}var un={},be=hn(un),Le=hn(!1),Rn=un;function gr(e,t){var n=e.type.contextTypes;if(!n)return un;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function De(e){return e=e.childContextTypes,e!=null}function Vs(){K(Le),K(be)}function Xc(e,t,n){if(be.current!==un)throw Error(T(168));q(be,t),q(Le,n)}function Pp(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(T(108,cy(e)||"Unknown",i));return re({},n,r)}function Fs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||un,Rn=be.current,q(be,e),q(Le,Le.current),!0}function Zc(e,t,n){var r=e.stateNode;if(!r)throw Error(T(169));n?(e=Pp(e,t,Rn),r.__reactInternalMemoizedMergedChildContext=e,K(Le),K(be),q(be,e)):K(Le),q(Le,n)}var wt=null,go=!1,na=!1;function Cp(e){wt===null?wt=[e]:wt.push(e)}function T1(e){go=!0,Cp(e)}function pn(){if(!na&&wt!==null){na=!0;var e=0,t=W;try{var n=wt;for(W=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}wt=null,go=!1}catch(i){throw wt!==null&&(wt=wt.slice(e+1)),Qh(iu,pn),i}finally{W=t,na=!1}}return null}var Jn=[],er=0,zs=null,Os=0,Ye=[],Ke=0,Vn=null,St=1,kt="";function Pn(e,t){Jn[er++]=Os,Jn[er++]=zs,zs=e,Os=t}function Ep(e,t,n){Ye[Ke++]=St,Ye[Ke++]=kt,Ye[Ke++]=Vn,Vn=e;var r=St;e=kt;var i=32-ot(r)-1;r&=~(1<<i),n+=1;var s=32-ot(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,St=1<<32-ot(t)+i|n<<i|r,kt=s+e}else St=1<<s|n<<i|r,kt=e}function hu(e){e.return!==null&&(Pn(e,1),Ep(e,1,0))}function pu(e){for(;e===zs;)zs=Jn[--er],Jn[er]=null,Os=Jn[--er],Jn[er]=null;for(;e===Vn;)Vn=Ye[--Ke],Ye[Ke]=null,kt=Ye[--Ke],Ye[Ke]=null,St=Ye[--Ke],Ye[Ke]=null}var $e=null,Ie=null,J=!1,it=null;function Tp(e,t){var n=Qe(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,$e=e,Ie=Jt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,$e=e,Ie=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Vn!==null?{id:St,overflow:kt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Qe(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,$e=e,Ie=null,!0):!1;default:return!1}}function sl(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ol(e){if(J){var t=Ie;if(t){var n=t;if(!Jc(e,t)){if(sl(e))throw Error(T(418));t=Jt(n.nextSibling);var r=$e;t&&Jc(e,t)?Tp(r,n):(e.flags=e.flags&-4097|2,J=!1,$e=e)}}else{if(sl(e))throw Error(T(418));e.flags=e.flags&-4097|2,J=!1,$e=e}}}function ed(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;$e=e}function es(e){if(e!==$e)return!1;if(!J)return ed(e),J=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!tl(e.type,e.memoizedProps)),t&&(t=Ie)){if(sl(e))throw jp(),Error(T(418));for(;t;)Tp(e,t),t=Jt(t.nextSibling)}if(ed(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){Ie=Jt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ie=null}}else Ie=$e?Jt(e.stateNode.nextSibling):null;return!0}function jp(){for(var e=Ie;e;)e=Jt(e.nextSibling)}function yr(){Ie=$e=null,J=!1}function mu(e){it===null?it=[e]:it.push(e)}var j1=Rt.ReactCurrentBatchConfig;function Vr(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 i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},t._stringRef=s,t)}if(typeof e!="string")throw Error(T(284));if(!n._owner)throw Error(T(290,e))}return e}function ts(e,t){throw e=Object.prototype.toString.call(t),Error(T(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function td(e){var t=e._init;return t(e._payload)}function Mp(e){function t(y,v){if(e){var x=y.deletions;x===null?(y.deletions=[v],y.flags|=16):x.push(v)}}function n(y,v){if(!e)return null;for(;v!==null;)t(y,v),v=v.sibling;return null}function r(y,v){for(y=new Map;v!==null;)v.key!==null?y.set(v.key,v):y.set(v.index,v),v=v.sibling;return y}function i(y,v){return y=rn(y,v),y.index=0,y.sibling=null,y}function s(y,v,x){return y.index=x,e?(x=y.alternate,x!==null?(x=x.index,x<v?(y.flags|=2,v):x):(y.flags|=2,v)):(y.flags|=1048576,v)}function o(y){return e&&y.alternate===null&&(y.flags|=2),y}function a(y,v,x,S){return v===null||v.tag!==6?(v=ua(x,y.mode,S),v.return=y,v):(v=i(v,x),v.return=y,v)}function l(y,v,x,S){var k=x.type;return k===Gn?d(y,v,x.props.children,S,x.key):v!==null&&(v.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===$t&&td(k)===v.type)?(S=i(v,x.props),S.ref=Vr(y,v,x),S.return=y,S):(S=ks(x.type,x.key,x.props,null,y.mode,S),S.ref=Vr(y,v,x),S.return=y,S)}function c(y,v,x,S){return v===null||v.tag!==4||v.stateNode.containerInfo!==x.containerInfo||v.stateNode.implementation!==x.implementation?(v=ca(x,y.mode,S),v.return=y,v):(v=i(v,x.children||[]),v.return=y,v)}function d(y,v,x,S,k){return v===null||v.tag!==7?(v=Ln(x,y.mode,S,k),v.return=y,v):(v=i(v,x),v.return=y,v)}function f(y,v,x){if(typeof v=="string"&&v!==""||typeof v=="number")return v=ua(""+v,y.mode,x),v.return=y,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Wi:return x=ks(v.type,v.key,v.props,null,y.mode,x),x.ref=Vr(y,null,v),x.return=y,x;case qn:return v=ca(v,y.mode,x),v.return=y,v;case $t:var S=v._init;return f(y,S(v._payload),x)}if(Wr(v)||_r(v))return v=Ln(v,y.mode,x,null),v.return=y,v;ts(y,v)}return null}function u(y,v,x,S){var k=v!==null?v.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return k!==null?null:a(y,v,""+x,S);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Wi:return x.key===k?l(y,v,x,S):null;case qn:return x.key===k?c(y,v,x,S):null;case $t:return k=x._init,u(y,v,k(x._payload),S)}if(Wr(x)||_r(x))return k!==null?null:d(y,v,x,S,null);ts(y,x)}return null}function h(y,v,x,S,k){if(typeof S=="string"&&S!==""||typeof S=="number")return y=y.get(x)||null,a(v,y,""+S,k);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Wi:return y=y.get(S.key===null?x:S.key)||null,l(v,y,S,k);case qn:return y=y.get(S.key===null?x:S.key)||null,c(v,y,S,k);case $t:var P=S._init;return h(y,v,x,P(S._payload),k)}if(Wr(S)||_r(S))return y=y.get(x)||null,d(v,y,S,k,null);ts(v,S)}return null}function p(y,v,x,S){for(var k=null,P=null,C=v,E=v=0,N=null;C!==null&&E<x.length;E++){C.index>E?(N=C,C=null):N=C.sibling;var M=u(y,C,x[E],S);if(M===null){C===null&&(C=N);break}e&&C&&M.alternate===null&&t(y,C),v=s(M,v,E),P===null?k=M:P.sibling=M,P=M,C=N}if(E===x.length)return n(y,C),J&&Pn(y,E),k;if(C===null){for(;E<x.length;E++)C=f(y,x[E],S),C!==null&&(v=s(C,v,E),P===null?k=C:P.sibling=C,P=C);return J&&Pn(y,E),k}for(C=r(y,C);E<x.length;E++)N=h(C,y,E,x[E],S),N!==null&&(e&&N.alternate!==null&&C.delete(N.key===null?E:N.key),v=s(N,v,E),P===null?k=N:P.sibling=N,P=N);return e&&C.forEach(function(I){return t(y,I)}),J&&Pn(y,E),k}function m(y,v,x,S){var k=_r(x);if(typeof k!="function")throw Error(T(150));if(x=k.call(x),x==null)throw Error(T(151));for(var P=k=null,C=v,E=v=0,N=null,M=x.next();C!==null&&!M.done;E++,M=x.next()){C.index>E?(N=C,C=null):N=C.sibling;var I=u(y,C,M.value,S);if(I===null){C===null&&(C=N);break}e&&C&&I.alternate===null&&t(y,C),v=s(I,v,E),P===null?k=I:P.sibling=I,P=I,C=N}if(M.done)return n(y,C),J&&Pn(y,E),k;if(C===null){for(;!M.done;E++,M=x.next())M=f(y,M.value,S),M!==null&&(v=s(M,v,E),P===null?k=M:P.sibling=M,P=M);return J&&Pn(y,E),k}for(C=r(y,C);!M.done;E++,M=x.next())M=h(C,y,E,M.value,S),M!==null&&(e&&M.alternate!==null&&C.delete(M.key===null?E:M.key),v=s(M,v,E),P===null?k=M:P.sibling=M,P=M);return e&&C.forEach(function(A){return t(y,A)}),J&&Pn(y,E),k}function w(y,v,x,S){if(typeof x=="object"&&x!==null&&x.type===Gn&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Wi:e:{for(var k=x.key,P=v;P!==null;){if(P.key===k){if(k=x.type,k===Gn){if(P.tag===7){n(y,P.sibling),v=i(P,x.props.children),v.return=y,y=v;break e}}else if(P.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===$t&&td(k)===P.type){n(y,P.sibling),v=i(P,x.props),v.ref=Vr(y,P,x),v.return=y,y=v;break e}n(y,P);break}else t(y,P);P=P.sibling}x.type===Gn?(v=Ln(x.props.children,y.mode,S,x.key),v.return=y,y=v):(S=ks(x.type,x.key,x.props,null,y.mode,S),S.ref=Vr(y,v,x),S.return=y,y=S)}return o(y);case qn:e:{for(P=x.key;v!==null;){if(v.key===P)if(v.tag===4&&v.stateNode.containerInfo===x.containerInfo&&v.stateNode.implementation===x.implementation){n(y,v.sibling),v=i(v,x.children||[]),v.return=y,y=v;break e}else{n(y,v);break}else t(y,v);v=v.sibling}v=ca(x,y.mode,S),v.return=y,y=v}return o(y);case $t:return P=x._init,w(y,v,P(x._payload),S)}if(Wr(x))return p(y,v,x,S);if(_r(x))return m(y,v,x,S);ts(y,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,v!==null&&v.tag===6?(n(y,v.sibling),v=i(v,x),v.return=y,y=v):(n(y,v),v=ua(x,y.mode,S),v.return=y,y=v),o(y)):n(y,v)}return w}var vr=Mp(!0),Np=Mp(!1),Is=hn(null),$s=null,tr=null,gu=null;function yu(){gu=tr=$s=null}function vu(e){var t=Is.current;K(Is),e._currentValue=t}function al(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 fr(e,t){$s=e,gu=tr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ae=!0),e.firstContext=null)}function Je(e){var t=e._currentValue;if(gu!==e)if(e={context:e,memoizedValue:t,next:null},tr===null){if($s===null)throw Error(T(308));tr=e,$s.dependencies={lanes:0,firstContext:e}}else tr=tr.next=e;return t}var Mn=null;function xu(e){Mn===null?Mn=[e]:Mn.push(e)}function _p(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,xu(t)):(n.next=i.next,i.next=n),t.interleaved=n,_t(e,r)}function _t(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 Bt=!1;function wu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ap(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 Pt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function en(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,U&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,_t(e,n)}return i=r.interleaved,i===null?(t.next=t,xu(r)):(t.next=i.next,i.next=t),r.interleaved=t,_t(e,n)}function gs(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,su(e,n)}}function nd(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Bs(e,t,n,r){var i=e.updateQueue;Bt=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?s=c:o.next=c,o=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=c:a.next=c,d.lastBaseUpdate=l))}if(s!==null){var f=i.baseState;o=0,d=c=l=null,a=s;do{var u=a.lane,h=a.eventTime;if((r&u)===u){d!==null&&(d=d.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,m=a;switch(u=t,h=n,m.tag){case 1:if(p=m.payload,typeof p=="function"){f=p.call(h,f,u);break e}f=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=m.payload,u=typeof p=="function"?p.call(h,f,u):p,u==null)break e;f=re({},f,u);break e;case 2:Bt=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,u=i.effects,u===null?i.effects=[a]:u.push(a))}else h={eventTime:h,lane:u,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(c=d=h,l=f):d=d.next=h,o|=u;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;u=a,a=u.next,u.next=null,i.lastBaseUpdate=u,i.shared.pending=null}}while(!0);if(d===null&&(l=f),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);zn|=o,e.lanes=o,e.memoizedState=f}}function rd(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(T(191,i));i.call(r)}}}var Vi={},mt=hn(Vi),xi=hn(Vi),wi=hn(Vi);function Nn(e){if(e===Vi)throw Error(T(174));return e}function Su(e,t){switch(q(wi,t),q(xi,e),q(mt,Vi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:$a(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=$a(t,e)}K(mt),q(mt,t)}function xr(){K(mt),K(xi),K(wi)}function Lp(e){Nn(wi.current);var t=Nn(mt.current),n=$a(t,e.type);t!==n&&(q(xi,e),q(mt,n))}function ku(e){xi.current===e&&(K(mt),K(xi))}var ee=hn(0);function Us(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 ra=[];function bu(){for(var e=0;e<ra.length;e++)ra[e]._workInProgressVersionPrimary=null;ra.length=0}var ys=Rt.ReactCurrentDispatcher,ia=Rt.ReactCurrentBatchConfig,Fn=0,ne=null,ce=null,he=null,Ws=!1,Jr=!1,Si=0,M1=0;function xe(){throw Error(T(321))}function Pu(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!lt(e[n],t[n]))return!1;return!0}function Cu(e,t,n,r,i,s){if(Fn=s,ne=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ys.current=e===null||e.memoizedState===null?L1:D1,e=n(r,i),Jr){s=0;do{if(Jr=!1,Si=0,25<=s)throw Error(T(301));s+=1,he=ce=null,t.updateQueue=null,ys.current=R1,e=n(r,i)}while(Jr)}if(ys.current=Hs,t=ce!==null&&ce.next!==null,Fn=0,he=ce=ne=null,Ws=!1,t)throw Error(T(300));return e}function Eu(){var e=Si!==0;return Si=0,e}function dt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return he===null?ne.memoizedState=he=e:he=he.next=e,he}function et(){if(ce===null){var e=ne.alternate;e=e!==null?e.memoizedState:null}else e=ce.next;var t=he===null?ne.memoizedState:he.next;if(t!==null)he=t,ce=e;else{if(e===null)throw Error(T(310));ce=e,e={memoizedState:ce.memoizedState,baseState:ce.baseState,baseQueue:ce.baseQueue,queue:ce.queue,next:null},he===null?ne.memoizedState=he=e:he=he.next=e}return he}function ki(e,t){return typeof t=="function"?t(e):t}function sa(e){var t=et(),n=t.queue;if(n===null)throw Error(T(311));n.lastRenderedReducer=e;var r=ce,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,c=s;do{var d=c.lane;if((Fn&d)===d)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var f={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=f,o=r):l=l.next=f,ne.lanes|=d,zn|=d}c=c.next}while(c!==null&&c!==s);l===null?o=r:l.next=a,lt(r,t.memoizedState)||(Ae=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,ne.lanes|=s,zn|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function oa(e){var t=et(),n=t.queue;if(n===null)throw Error(T(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=e(s,o.action),o=o.next;while(o!==i);lt(s,t.memoizedState)||(Ae=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Dp(){}function Rp(e,t){var n=ne,r=et(),i=t(),s=!lt(r.memoizedState,i);if(s&&(r.memoizedState=i,Ae=!0),r=r.queue,Tu(zp.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||he!==null&&he.memoizedState.tag&1){if(n.flags|=2048,bi(9,Fp.bind(null,n,r,i,t),void 0,null),pe===null)throw Error(T(349));Fn&30||Vp(n,t,i)}return i}function Vp(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ne.updateQueue,t===null?(t={lastEffect:null,stores:null},ne.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Fp(e,t,n,r){t.value=n,t.getSnapshot=r,Op(t)&&Ip(e)}function zp(e,t,n){return n(function(){Op(t)&&Ip(e)})}function Op(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!lt(e,n)}catch{return!0}}function Ip(e){var t=_t(e,1);t!==null&&at(t,e,1,-1)}function id(e){var t=dt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ki,lastRenderedState:e},t.queue=e,e=e.dispatch=A1.bind(null,ne,e),[t.memoizedState,e]}function bi(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ne.updateQueue,t===null?(t={lastEffect:null,stores:null},ne.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 $p(){return et().memoizedState}function vs(e,t,n,r){var i=dt();ne.flags|=e,i.memoizedState=bi(1|t,n,void 0,r===void 0?null:r)}function yo(e,t,n,r){var i=et();r=r===void 0?null:r;var s=void 0;if(ce!==null){var o=ce.memoizedState;if(s=o.destroy,r!==null&&Pu(r,o.deps)){i.memoizedState=bi(t,n,s,r);return}}ne.flags|=e,i.memoizedState=bi(1|t,n,s,r)}function sd(e,t){return vs(8390656,8,e,t)}function Tu(e,t){return yo(2048,8,e,t)}function Bp(e,t){return yo(4,2,e,t)}function Up(e,t){return yo(4,4,e,t)}function Wp(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 Hp(e,t,n){return n=n!=null?n.concat([e]):null,yo(4,4,Wp.bind(null,t,e),n)}function ju(){}function qp(e,t){var n=et();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Pu(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Gp(e,t){var n=et();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Pu(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Yp(e,t,n){return Fn&21?(lt(n,t)||(n=Jh(),ne.lanes|=n,zn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ae=!0),e.memoizedState=n)}function N1(e,t){var n=W;W=n!==0&&4>n?n:4,e(!0);var r=ia.transition;ia.transition={};try{e(!1),t()}finally{W=n,ia.transition=r}}function Kp(){return et().memoizedState}function _1(e,t,n){var r=nn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Qp(e))Xp(t,n);else if(n=_p(e,t,n,r),n!==null){var i=Te();at(n,e,r,i),Zp(n,t,r)}}function A1(e,t,n){var r=nn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Qp(e))Xp(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,lt(a,o)){var l=t.interleaved;l===null?(i.next=i,xu(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=_p(e,t,i,r),n!==null&&(i=Te(),at(n,e,r,i),Zp(n,t,r))}}function Qp(e){var t=e.alternate;return e===ne||t!==null&&t===ne}function Xp(e,t){Jr=Ws=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Zp(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,su(e,n)}}var Hs={readContext:Je,useCallback:xe,useContext:xe,useEffect:xe,useImperativeHandle:xe,useInsertionEffect:xe,useLayoutEffect:xe,useMemo:xe,useReducer:xe,useRef:xe,useState:xe,useDebugValue:xe,useDeferredValue:xe,useTransition:xe,useMutableSource:xe,useSyncExternalStore:xe,useId:xe,unstable_isNewReconciler:!1},L1={readContext:Je,useCallback:function(e,t){return dt().memoizedState=[e,t===void 0?null:t],e},useContext:Je,useEffect:sd,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,vs(4194308,4,Wp.bind(null,t,e),n)},useLayoutEffect:function(e,t){return vs(4194308,4,e,t)},useInsertionEffect:function(e,t){return vs(4,2,e,t)},useMemo:function(e,t){var n=dt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=dt();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=_1.bind(null,ne,e),[r.memoizedState,e]},useRef:function(e){var t=dt();return e={current:e},t.memoizedState=e},useState:id,useDebugValue:ju,useDeferredValue:function(e){return dt().memoizedState=e},useTransition:function(){var e=id(!1),t=e[0];return e=N1.bind(null,e[1]),dt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ne,i=dt();if(J){if(n===void 0)throw Error(T(407));n=n()}else{if(n=t(),pe===null)throw Error(T(349));Fn&30||Vp(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,sd(zp.bind(null,r,s,e),[e]),r.flags|=2048,bi(9,Fp.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=dt(),t=pe.identifierPrefix;if(J){var n=kt,r=St;n=(r&~(1<<32-ot(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Si++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=M1++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},D1={readContext:Je,useCallback:qp,useContext:Je,useEffect:Tu,useImperativeHandle:Hp,useInsertionEffect:Bp,useLayoutEffect:Up,useMemo:Gp,useReducer:sa,useRef:$p,useState:function(){return sa(ki)},useDebugValue:ju,useDeferredValue:function(e){var t=et();return Yp(t,ce.memoizedState,e)},useTransition:function(){var e=sa(ki)[0],t=et().memoizedState;return[e,t]},useMutableSource:Dp,useSyncExternalStore:Rp,useId:Kp,unstable_isNewReconciler:!1},R1={readContext:Je,useCallback:qp,useContext:Je,useEffect:Tu,useImperativeHandle:Hp,useInsertionEffect:Bp,useLayoutEffect:Up,useMemo:Gp,useReducer:oa,useRef:$p,useState:function(){return oa(ki)},useDebugValue:ju,useDeferredValue:function(e){var t=et();return ce===null?t.memoizedState=e:Yp(t,ce.memoizedState,e)},useTransition:function(){var e=oa(ki)[0],t=et().memoizedState;return[e,t]},useMutableSource:Dp,useSyncExternalStore:Rp,useId:Kp,unstable_isNewReconciler:!1};function nt(e,t){if(e&&e.defaultProps){t=re({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ll(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:re({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var vo={isMounted:function(e){return(e=e._reactInternals)?$n(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Te(),i=nn(e),s=Pt(r,i);s.payload=t,n!=null&&(s.callback=n),t=en(e,s,i),t!==null&&(at(t,e,i,r),gs(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Te(),i=nn(e),s=Pt(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=en(e,s,i),t!==null&&(at(t,e,i,r),gs(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Te(),r=nn(e),i=Pt(n,r);i.tag=2,t!=null&&(i.callback=t),t=en(e,i,r),t!==null&&(at(t,e,r,n),gs(t,e,r))}};function od(e,t,n,r,i,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,o):t.prototype&&t.prototype.isPureReactComponent?!mi(n,r)||!mi(i,s):!0}function Jp(e,t,n){var r=!1,i=un,s=t.contextType;return typeof s=="object"&&s!==null?s=Je(s):(i=De(t)?Rn:be.current,r=t.contextTypes,s=(r=r!=null)?gr(e,i):un),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=vo,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function ad(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&&vo.enqueueReplaceState(t,t.state,null)}function ul(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},wu(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=Je(s):(s=De(t)?Rn:be.current,i.context=gr(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(ll(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&vo.enqueueReplaceState(i,i.state,null),Bs(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function wr(e,t){try{var n="",r=t;do n+=uy(r),r=r.return;while(r);var i=n}catch(s){i=`
|
|
Error generating stack: `+s.message+`
|
|
`+s.stack}return{value:e,source:t,stack:i,digest:null}}function aa(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function cl(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var V1=typeof WeakMap=="function"?WeakMap:Map;function em(e,t,n){n=Pt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Gs||(Gs=!0,wl=r),cl(e,t)},n}function tm(e,t,n){n=Pt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){cl(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){cl(e,t),typeof r!="function"&&(tn===null?tn=new Set([this]):tn.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function ld(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new V1;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Q1.bind(null,e,t,n),t.then(e,e))}function ud(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 cd(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Pt(-1,1),t.tag=2,en(n,t,1))),n.lanes|=1),e)}var F1=Rt.ReactCurrentOwner,Ae=!1;function Ee(e,t,n,r){t.child=e===null?Np(t,null,n,r):vr(t,e.child,n,r)}function dd(e,t,n,r,i){n=n.render;var s=t.ref;return fr(t,i),r=Cu(e,t,n,r,s,i),n=Eu(),e!==null&&!Ae?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,At(e,t,i)):(J&&n&&hu(t),t.flags|=1,Ee(e,t,r,i),t.child)}function fd(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!Vu(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,nm(e,t,s,r,i)):(e=ks(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:mi,n(o,r)&&e.ref===t.ref)return At(e,t,i)}return t.flags|=1,e=rn(s,r),e.ref=t.ref,e.return=t,t.child=e}function nm(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(mi(s,r)&&e.ref===t.ref)if(Ae=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(Ae=!0);else return t.lanes=e.lanes,At(e,t,i)}return dl(e,t,n,r,i)}function rm(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},q(rr,Oe),Oe|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,q(rr,Oe),Oe|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,q(rr,Oe),Oe|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,q(rr,Oe),Oe|=r;return Ee(e,t,i,n),t.child}function im(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function dl(e,t,n,r,i){var s=De(n)?Rn:be.current;return s=gr(t,s),fr(t,i),n=Cu(e,t,n,r,s,i),r=Eu(),e!==null&&!Ae?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,At(e,t,i)):(J&&r&&hu(t),t.flags|=1,Ee(e,t,n,i),t.child)}function hd(e,t,n,r,i){if(De(n)){var s=!0;Fs(t)}else s=!1;if(fr(t,i),t.stateNode===null)xs(e,t),Jp(t,n,r),ul(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=Je(c):(c=De(n)?Rn:be.current,c=gr(t,c));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&ad(t,o,r,c),Bt=!1;var u=t.memoizedState;o.state=u,Bs(t,r,o,i),l=t.memoizedState,a!==r||u!==l||Le.current||Bt?(typeof d=="function"&&(ll(t,n,d,r),l=t.memoizedState),(a=Bt||od(t,n,a,r,u,l,c))?(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=c,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Ap(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:nt(t.type,a),o.props=c,f=t.pendingProps,u=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Je(l):(l=De(n)?Rn:be.current,l=gr(t,l));var h=n.getDerivedStateFromProps;(d=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==f||u!==l)&&ad(t,o,r,l),Bt=!1,u=t.memoizedState,o.state=u,Bs(t,r,o,i);var p=t.memoizedState;a!==f||u!==p||Le.current||Bt?(typeof h=="function"&&(ll(t,n,h,r),p=t.memoizedState),(c=Bt||od(t,n,c,r,u,p,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,p,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,p,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&u===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&u===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),o.props=r,o.state=p,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&u===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&u===e.memoizedState||(t.flags|=1024),r=!1)}return fl(e,t,n,r,s,i)}function fl(e,t,n,r,i,s){im(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&Zc(t,n,!1),At(e,t,s);r=t.stateNode,F1.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=vr(t,e.child,null,s),t.child=vr(t,null,a,s)):Ee(e,t,a,s),t.memoizedState=r.state,i&&Zc(t,n,!0),t.child}function sm(e){var t=e.stateNode;t.pendingContext?Xc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Xc(e,t.context,!1),Su(e,t.containerInfo)}function pd(e,t,n,r,i){return yr(),mu(i),t.flags|=256,Ee(e,t,n,r),t.child}var hl={dehydrated:null,treeContext:null,retryLane:0};function pl(e){return{baseLanes:e,cachePool:null,transitions:null}}function om(e,t,n){var r=t.pendingProps,i=ee.current,s=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),q(ee,i&1),e===null)return ol(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,s?(r=t.mode,s=t.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=So(o,r,0,null),e=Ln(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=pl(n),t.memoizedState=hl,e):Mu(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return z1(e,t,o,r,a,i,n);if(s){s=r.fallback,o=t.mode,i=e.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=rn(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=rn(a,s):(s=Ln(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?pl(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=hl,r}return s=e.child,e=s.sibling,r=rn(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Mu(e,t){return t=So({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ns(e,t,n,r){return r!==null&&mu(r),vr(t,e.child,null,n),e=Mu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function z1(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=aa(Error(T(422))),ns(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=So({mode:"visible",children:r.children},i,0,null),s=Ln(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&vr(t,e.child,null,o),t.child.memoizedState=pl(o),t.memoizedState=hl,s);if(!(t.mode&1))return ns(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(T(419)),r=aa(s,r,void 0),ns(e,t,o,r)}if(a=(o&e.childLanes)!==0,Ae||a){if(r=pe,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,_t(e,i),at(r,e,i,-1))}return Ru(),r=aa(Error(T(421))),ns(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=X1.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Ie=Jt(i.nextSibling),$e=t,J=!0,it=null,e!==null&&(Ye[Ke++]=St,Ye[Ke++]=kt,Ye[Ke++]=Vn,St=e.id,kt=e.overflow,Vn=t),t=Mu(t,r.children),t.flags|=4096,t)}function md(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),al(e.return,t,n)}function la(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function am(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(Ee(e,t,r.children,n),r=ee.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&&md(e,n,t);else if(e.tag===19)md(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(q(ee,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Us(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),la(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Us(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}la(t,!0,n,null,s);break;case"together":la(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function xs(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function At(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),zn|=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=rn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=rn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function O1(e,t,n){switch(t.tag){case 3:sm(t),yr();break;case 5:Lp(t);break;case 1:De(t.type)&&Fs(t);break;case 4:Su(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;q(Is,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(q(ee,ee.current&1),t.flags|=128,null):n&t.child.childLanes?om(e,t,n):(q(ee,ee.current&1),e=At(e,t,n),e!==null?e.sibling:null);q(ee,ee.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return am(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),q(ee,ee.current),r)break;return null;case 22:case 23:return t.lanes=0,rm(e,t,n)}return At(e,t,n)}var lm,ml,um,cm;lm=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}};ml=function(){};um=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Nn(mt.current);var s=null;switch(n){case"input":i=Fa(e,i),r=Fa(e,r),s=[];break;case"select":i=re({},i,{value:void 0}),r=re({},r,{value:void 0}),s=[];break;case"textarea":i=Ia(e,i),r=Ia(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Rs)}Ba(n,r);var o;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(li.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var l=r[c];if(a=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(li.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Y("scroll",e),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};cm=function(e,t,n,r){n!==r&&(t.flags|=4)};function Fr(e,t){if(!J)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 we(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function I1(e,t,n){var r=t.pendingProps;switch(pu(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return we(t),null;case 1:return De(t.type)&&Vs(),we(t),null;case 3:return r=t.stateNode,xr(),K(Le),K(be),bu(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(es(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,it!==null&&(bl(it),it=null))),ml(e,t),we(t),null;case 5:ku(t);var i=Nn(wi.current);if(n=t.type,e!==null&&t.stateNode!=null)um(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(T(166));return we(t),null}if(e=Nn(mt.current),es(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[ft]=t,r[vi]=s,e=(t.mode&1)!==0,n){case"dialog":Y("cancel",r),Y("close",r);break;case"iframe":case"object":case"embed":Y("load",r);break;case"video":case"audio":for(i=0;i<qr.length;i++)Y(qr[i],r);break;case"source":Y("error",r);break;case"img":case"image":case"link":Y("error",r),Y("load",r);break;case"details":Y("toggle",r);break;case"input":Pc(r,s),Y("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Y("invalid",r);break;case"textarea":Ec(r,s),Y("invalid",r)}Ba(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&Ji(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Ji(r.textContent,a,e),i=["children",""+a]):li.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&Y("scroll",r)}switch(n){case"input":Hi(r),Cc(r,s,!0);break;case"textarea":Hi(r),Tc(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Rs)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=zh(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[ft]=t,e[vi]=r,lm(e,t,!1,!1),t.stateNode=e;e:{switch(o=Ua(n,r),n){case"dialog":Y("cancel",e),Y("close",e),i=r;break;case"iframe":case"object":case"embed":Y("load",e),i=r;break;case"video":case"audio":for(i=0;i<qr.length;i++)Y(qr[i],e);i=r;break;case"source":Y("error",e),i=r;break;case"img":case"image":case"link":Y("error",e),Y("load",e),i=r;break;case"details":Y("toggle",e),i=r;break;case"input":Pc(e,r),i=Fa(e,r),Y("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=re({},r,{value:void 0}),Y("invalid",e);break;case"textarea":Ec(e,r),i=Ia(e,r),Y("invalid",e);break;default:i=r}Ba(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?$h(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Oh(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&ui(e,l):typeof l=="number"&&ui(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(li.hasOwnProperty(s)?l!=null&&s==="onScroll"&&Y("scroll",e):l!=null&&Jl(e,s,l,o))}switch(n){case"input":Hi(e),Cc(e,r,!1);break;case"textarea":Hi(e),Tc(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ln(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?lr(e,!!r.multiple,s,!1):r.defaultValue!=null&&lr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Rs)}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 we(t),null;case 6:if(e&&t.stateNode!=null)cm(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(T(166));if(n=Nn(wi.current),Nn(mt.current),es(t)){if(r=t.stateNode,n=t.memoizedProps,r[ft]=t,(s=r.nodeValue!==n)&&(e=$e,e!==null))switch(e.tag){case 3:Ji(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ji(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[ft]=t,t.stateNode=r}return we(t),null;case 13:if(K(ee),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(J&&Ie!==null&&t.mode&1&&!(t.flags&128))jp(),yr(),t.flags|=98560,s=!1;else if(s=es(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(T(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(T(317));s[ft]=t}else yr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;we(t),s=!1}else it!==null&&(bl(it),it=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||ee.current&1?fe===0&&(fe=3):Ru())),t.updateQueue!==null&&(t.flags|=4),we(t),null);case 4:return xr(),ml(e,t),e===null&&gi(t.stateNode.containerInfo),we(t),null;case 10:return vu(t.type._context),we(t),null;case 17:return De(t.type)&&Vs(),we(t),null;case 19:if(K(ee),s=t.memoizedState,s===null)return we(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)Fr(s,!1);else{if(fe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Us(e),o!==null){for(t.flags|=128,Fr(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return q(ee,ee.current&1|2),t.child}e=e.sibling}s.tail!==null&&se()>Sr&&(t.flags|=128,r=!0,Fr(s,!1),t.lanes=4194304)}else{if(!r)if(e=Us(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Fr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!J)return we(t),null}else 2*se()-s.renderingStartTime>Sr&&n!==1073741824&&(t.flags|=128,r=!0,Fr(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=se(),t.sibling=null,n=ee.current,q(ee,r?n&1|2:n&1),t):(we(t),null);case 22:case 23:return Du(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Oe&1073741824&&(we(t),t.subtreeFlags&6&&(t.flags|=8192)):we(t),null;case 24:return null;case 25:return null}throw Error(T(156,t.tag))}function $1(e,t){switch(pu(t),t.tag){case 1:return De(t.type)&&Vs(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xr(),K(Le),K(be),bu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ku(t),null;case 13:if(K(ee),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(T(340));yr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return K(ee),null;case 4:return xr(),null;case 10:return vu(t.type._context),null;case 22:case 23:return Du(),null;case 24:return null;default:return null}}var rs=!1,ke=!1,B1=typeof WeakSet=="function"?WeakSet:Set,_=null;function nr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ie(e,t,r)}else n.current=null}function gl(e,t,n){try{n()}catch(r){ie(e,t,r)}}var gd=!1;function U1(e,t){if(Ja=As,e=mp(),fu(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,d=0,f=e,u=null;t:for(;;){for(var h;f!==n||i!==0&&f.nodeType!==3||(a=o+i),f!==s||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(h=f.firstChild)!==null;)u=f,f=h;for(;;){if(f===e)break t;if(u===n&&++c===i&&(a=o),u===s&&++d===r&&(l=o),(h=f.nextSibling)!==null)break;f=u,u=f.parentNode}f=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(el={focusedElem:e,selectionRange:n},As=!1,_=t;_!==null;)if(t=_,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,_=e;else for(;_!==null;){t=_;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var m=p.memoizedProps,w=p.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:nt(t.type,m),w);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(T(163))}}catch(S){ie(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,_=e;break}_=t.return}return p=gd,gd=!1,p}function ei(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&gl(t,n,s)}i=i.next}while(i!==r)}}function xo(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 yl(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 dm(e){var t=e.alternate;t!==null&&(e.alternate=null,dm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ft],delete t[vi],delete t[rl],delete t[C1],delete t[E1])),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 fm(e){return e.tag===5||e.tag===3||e.tag===4}function yd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||fm(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 vl(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=Rs));else if(r!==4&&(e=e.child,e!==null))for(vl(e,t,n),e=e.sibling;e!==null;)vl(e,t,n),e=e.sibling}function xl(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(xl(e,t,n),e=e.sibling;e!==null;)xl(e,t,n),e=e.sibling}var ge=null,rt=!1;function Vt(e,t,n){for(n=n.child;n!==null;)hm(e,t,n),n=n.sibling}function hm(e,t,n){if(pt&&typeof pt.onCommitFiberUnmount=="function")try{pt.onCommitFiberUnmount(co,n)}catch{}switch(n.tag){case 5:ke||nr(n,t);case 6:var r=ge,i=rt;ge=null,Vt(e,t,n),ge=r,rt=i,ge!==null&&(rt?(e=ge,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ge.removeChild(n.stateNode));break;case 18:ge!==null&&(rt?(e=ge,n=n.stateNode,e.nodeType===8?ta(e.parentNode,n):e.nodeType===1&&ta(e,n),hi(e)):ta(ge,n.stateNode));break;case 4:r=ge,i=rt,ge=n.stateNode.containerInfo,rt=!0,Vt(e,t,n),ge=r,rt=i;break;case 0:case 11:case 14:case 15:if(!ke&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&gl(n,t,o),i=i.next}while(i!==r)}Vt(e,t,n);break;case 1:if(!ke&&(nr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ie(n,t,a)}Vt(e,t,n);break;case 21:Vt(e,t,n);break;case 22:n.mode&1?(ke=(r=ke)||n.memoizedState!==null,Vt(e,t,n),ke=r):Vt(e,t,n);break;default:Vt(e,t,n)}}function vd(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new B1),t.forEach(function(r){var i=Z1.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function tt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:ge=a.stateNode,rt=!1;break e;case 3:ge=a.stateNode.containerInfo,rt=!0;break e;case 4:ge=a.stateNode.containerInfo,rt=!0;break e}a=a.return}if(ge===null)throw Error(T(160));hm(s,o,i),ge=null,rt=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){ie(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)pm(t,e),t=t.sibling}function pm(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(tt(t,e),ct(e),r&4){try{ei(3,e,e.return),xo(3,e)}catch(m){ie(e,e.return,m)}try{ei(5,e,e.return)}catch(m){ie(e,e.return,m)}}break;case 1:tt(t,e),ct(e),r&512&&n!==null&&nr(n,n.return);break;case 5:if(tt(t,e),ct(e),r&512&&n!==null&&nr(n,n.return),e.flags&32){var i=e.stateNode;try{ui(i,"")}catch(m){ie(e,e.return,m)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,o=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&Vh(i,s),Ua(a,o);var c=Ua(a,s);for(o=0;o<l.length;o+=2){var d=l[o],f=l[o+1];d==="style"?$h(i,f):d==="dangerouslySetInnerHTML"?Oh(i,f):d==="children"?ui(i,f):Jl(i,d,f,c)}switch(a){case"input":za(i,s);break;case"textarea":Fh(i,s);break;case"select":var u=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?lr(i,!!s.multiple,h,!1):u!==!!s.multiple&&(s.defaultValue!=null?lr(i,!!s.multiple,s.defaultValue,!0):lr(i,!!s.multiple,s.multiple?[]:"",!1))}i[vi]=s}catch(m){ie(e,e.return,m)}}break;case 6:if(tt(t,e),ct(e),r&4){if(e.stateNode===null)throw Error(T(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(m){ie(e,e.return,m)}}break;case 3:if(tt(t,e),ct(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{hi(t.containerInfo)}catch(m){ie(e,e.return,m)}break;case 4:tt(t,e),ct(e);break;case 13:tt(t,e),ct(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Au=se())),r&4&&vd(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(ke=(c=ke)||d,tt(t,e),ke=c):tt(t,e),ct(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(_=e,d=e.child;d!==null;){for(f=_=d;_!==null;){switch(u=_,h=u.child,u.tag){case 0:case 11:case 14:case 15:ei(4,u,u.return);break;case 1:nr(u,u.return);var p=u.stateNode;if(typeof p.componentWillUnmount=="function"){r=u,n=u.return;try{t=r,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(m){ie(r,n,m)}}break;case 5:nr(u,u.return);break;case 22:if(u.memoizedState!==null){wd(f);continue}}h!==null?(h.return=u,_=h):wd(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{i=f.stateNode,c?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=f.stateNode,l=f.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Ih("display",o))}catch(m){ie(e,e.return,m)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(m){ie(e,e.return,m)}}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;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:tt(t,e),ct(e),r&4&&vd(e);break;case 21:break;default:tt(t,e),ct(e)}}function ct(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(fm(n)){var r=n;break e}n=n.return}throw Error(T(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(ui(i,""),r.flags&=-33);var s=yd(e);xl(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=yd(e);vl(e,a,o);break;default:throw Error(T(161))}}catch(l){ie(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function W1(e,t,n){_=e,mm(e)}function mm(e,t,n){for(var r=(e.mode&1)!==0;_!==null;){var i=_,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||rs;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||ke;a=rs;var c=ke;if(rs=o,(ke=l)&&!c)for(_=i;_!==null;)o=_,l=o.child,o.tag===22&&o.memoizedState!==null?Sd(i):l!==null?(l.return=o,_=l):Sd(i);for(;s!==null;)_=s,mm(s),s=s.sibling;_=i,rs=a,ke=c}xd(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,_=s):xd(e)}}function xd(e){for(;_!==null;){var t=_;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ke||xo(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!ke)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:nt(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&rd(t,s,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}rd(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&hi(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(T(163))}ke||t.flags&512&&yl(t)}catch(u){ie(t,t.return,u)}}if(t===e){_=null;break}if(n=t.sibling,n!==null){n.return=t.return,_=n;break}_=t.return}}function wd(e){for(;_!==null;){var t=_;if(t===e){_=null;break}var n=t.sibling;if(n!==null){n.return=t.return,_=n;break}_=t.return}}function Sd(e){for(;_!==null;){var t=_;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{xo(4,t)}catch(l){ie(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){ie(t,i,l)}}var s=t.return;try{yl(t)}catch(l){ie(t,s,l)}break;case 5:var o=t.return;try{yl(t)}catch(l){ie(t,o,l)}}}catch(l){ie(t,t.return,l)}if(t===e){_=null;break}var a=t.sibling;if(a!==null){a.return=t.return,_=a;break}_=t.return}}var H1=Math.ceil,qs=Rt.ReactCurrentDispatcher,Nu=Rt.ReactCurrentOwner,Ze=Rt.ReactCurrentBatchConfig,U=0,pe=null,ue=null,ye=0,Oe=0,rr=hn(0),fe=0,Pi=null,zn=0,wo=0,_u=0,ti=null,_e=null,Au=0,Sr=1/0,xt=null,Gs=!1,wl=null,tn=null,is=!1,Yt=null,Ys=0,ni=0,Sl=null,ws=-1,Ss=0;function Te(){return U&6?se():ws!==-1?ws:ws=se()}function nn(e){return e.mode&1?U&2&&ye!==0?ye&-ye:j1.transition!==null?(Ss===0&&(Ss=Jh()),Ss):(e=W,e!==0||(e=window.event,e=e===void 0?16:op(e.type)),e):1}function at(e,t,n,r){if(50<ni)throw ni=0,Sl=null,Error(T(185));Li(e,n,r),(!(U&2)||e!==pe)&&(e===pe&&(!(U&2)&&(wo|=n),fe===4&&Ht(e,ye)),Re(e,r),n===1&&U===0&&!(t.mode&1)&&(Sr=se()+500,go&&pn()))}function Re(e,t){var n=e.callbackNode;jy(e,t);var r=_s(e,e===pe?ye:0);if(r===0)n!==null&&Nc(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Nc(n),t===1)e.tag===0?T1(kd.bind(null,e)):Cp(kd.bind(null,e)),b1(function(){!(U&6)&&pn()}),n=null;else{switch(ep(r)){case 1:n=iu;break;case 4:n=Xh;break;case 16:n=Ns;break;case 536870912:n=Zh;break;default:n=Ns}n=bm(n,gm.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function gm(e,t){if(ws=-1,Ss=0,U&6)throw Error(T(327));var n=e.callbackNode;if(hr()&&e.callbackNode!==n)return null;var r=_s(e,e===pe?ye:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Ks(e,r);else{t=r;var i=U;U|=2;var s=vm();(pe!==e||ye!==t)&&(xt=null,Sr=se()+500,An(e,t));do try{Y1();break}catch(a){ym(e,a)}while(!0);yu(),qs.current=s,U=i,ue!==null?t=0:(pe=null,ye=0,t=fe)}if(t!==0){if(t===2&&(i=Ya(e),i!==0&&(r=i,t=kl(e,i))),t===1)throw n=Pi,An(e,0),Ht(e,r),Re(e,se()),n;if(t===6)Ht(e,r);else{if(i=e.current.alternate,!(r&30)&&!q1(i)&&(t=Ks(e,r),t===2&&(s=Ya(e),s!==0&&(r=s,t=kl(e,s))),t===1))throw n=Pi,An(e,0),Ht(e,r),Re(e,se()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(T(345));case 2:Cn(e,_e,xt);break;case 3:if(Ht(e,r),(r&130023424)===r&&(t=Au+500-se(),10<t)){if(_s(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Te(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=nl(Cn.bind(null,e,_e,xt),t);break}Cn(e,_e,xt);break;case 4:if(Ht(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-ot(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=se()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*H1(r/1960))-r,10<r){e.timeoutHandle=nl(Cn.bind(null,e,_e,xt),r);break}Cn(e,_e,xt);break;case 5:Cn(e,_e,xt);break;default:throw Error(T(329))}}}return Re(e,se()),e.callbackNode===n?gm.bind(null,e):null}function kl(e,t){var n=ti;return e.current.memoizedState.isDehydrated&&(An(e,t).flags|=256),e=Ks(e,t),e!==2&&(t=_e,_e=n,t!==null&&bl(t)),e}function bl(e){_e===null?_e=e:_e.push.apply(_e,e)}function q1(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!lt(s(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ht(e,t){for(t&=~_u,t&=~wo,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ot(t),r=1<<n;e[n]=-1,t&=~r}}function kd(e){if(U&6)throw Error(T(327));hr();var t=_s(e,0);if(!(t&1))return Re(e,se()),null;var n=Ks(e,t);if(e.tag!==0&&n===2){var r=Ya(e);r!==0&&(t=r,n=kl(e,r))}if(n===1)throw n=Pi,An(e,0),Ht(e,t),Re(e,se()),n;if(n===6)throw Error(T(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Cn(e,_e,xt),Re(e,se()),null}function Lu(e,t){var n=U;U|=1;try{return e(t)}finally{U=n,U===0&&(Sr=se()+500,go&&pn())}}function On(e){Yt!==null&&Yt.tag===0&&!(U&6)&&hr();var t=U;U|=1;var n=Ze.transition,r=W;try{if(Ze.transition=null,W=1,e)return e()}finally{W=r,Ze.transition=n,U=t,!(U&6)&&pn()}}function Du(){Oe=rr.current,K(rr)}function An(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,k1(n)),ue!==null)for(n=ue.return;n!==null;){var r=n;switch(pu(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Vs();break;case 3:xr(),K(Le),K(be),bu();break;case 5:ku(r);break;case 4:xr();break;case 13:K(ee);break;case 19:K(ee);break;case 10:vu(r.type._context);break;case 22:case 23:Du()}n=n.return}if(pe=e,ue=e=rn(e.current,null),ye=Oe=t,fe=0,Pi=null,_u=wo=zn=0,_e=ti=null,Mn!==null){for(t=0;t<Mn.length;t++)if(n=Mn[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}Mn=null}return e}function ym(e,t){do{var n=ue;try{if(yu(),ys.current=Hs,Ws){for(var r=ne.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Ws=!1}if(Fn=0,he=ce=ne=null,Jr=!1,Si=0,Nu.current=null,n===null||n.return===null){fe=1,Pi=t,ue=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=ye,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,d=a,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var u=d.alternate;u?(d.updateQueue=u.updateQueue,d.memoizedState=u.memoizedState,d.lanes=u.lanes):(d.updateQueue=null,d.memoizedState=null)}var h=ud(o);if(h!==null){h.flags&=-257,cd(h,o,a,s,t),h.mode&1&&ld(s,c,t),t=h,l=c;var p=t.updateQueue;if(p===null){var m=new Set;m.add(l),t.updateQueue=m}else p.add(l);break e}else{if(!(t&1)){ld(s,c,t),Ru();break e}l=Error(T(426))}}else if(J&&a.mode&1){var w=ud(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),cd(w,o,a,s,t),mu(wr(l,a));break e}}s=l=wr(l,a),fe!==4&&(fe=2),ti===null?ti=[s]:ti.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var y=em(s,l,t);nd(s,y);break e;case 1:a=l;var v=s.type,x=s.stateNode;if(!(s.flags&128)&&(typeof v.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(tn===null||!tn.has(x)))){s.flags|=65536,t&=-t,s.lanes|=t;var S=tm(s,a,t);nd(s,S);break e}}s=s.return}while(s!==null)}wm(n)}catch(k){t=k,ue===n&&n!==null&&(ue=n=n.return);continue}break}while(!0)}function vm(){var e=qs.current;return qs.current=Hs,e===null?Hs:e}function Ru(){(fe===0||fe===3||fe===2)&&(fe=4),pe===null||!(zn&268435455)&&!(wo&268435455)||Ht(pe,ye)}function Ks(e,t){var n=U;U|=2;var r=vm();(pe!==e||ye!==t)&&(xt=null,An(e,t));do try{G1();break}catch(i){ym(e,i)}while(!0);if(yu(),U=n,qs.current=r,ue!==null)throw Error(T(261));return pe=null,ye=0,fe}function G1(){for(;ue!==null;)xm(ue)}function Y1(){for(;ue!==null&&!xy();)xm(ue)}function xm(e){var t=km(e.alternate,e,Oe);e.memoizedProps=e.pendingProps,t===null?wm(e):ue=t,Nu.current=null}function wm(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=$1(n,t),n!==null){n.flags&=32767,ue=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{fe=6,ue=null;return}}else if(n=I1(n,t,Oe),n!==null){ue=n;return}if(t=t.sibling,t!==null){ue=t;return}ue=t=e}while(t!==null);fe===0&&(fe=5)}function Cn(e,t,n){var r=W,i=Ze.transition;try{Ze.transition=null,W=1,K1(e,t,n,r)}finally{Ze.transition=i,W=r}return null}function K1(e,t,n,r){do hr();while(Yt!==null);if(U&6)throw Error(T(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(T(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(My(e,s),e===pe&&(ue=pe=null,ye=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||is||(is=!0,bm(Ns,function(){return hr(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Ze.transition,Ze.transition=null;var o=W;W=1;var a=U;U|=4,Nu.current=null,U1(e,n),pm(n,e),m1(el),As=!!Ja,el=Ja=null,e.current=n,W1(n),wy(),U=a,W=o,Ze.transition=s}else e.current=n;if(is&&(is=!1,Yt=e,Ys=i),s=e.pendingLanes,s===0&&(tn=null),by(n.stateNode),Re(e,se()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Gs)throw Gs=!1,e=wl,wl=null,e;return Ys&1&&e.tag!==0&&hr(),s=e.pendingLanes,s&1?e===Sl?ni++:(ni=0,Sl=e):ni=0,pn(),null}function hr(){if(Yt!==null){var e=ep(Ys),t=Ze.transition,n=W;try{if(Ze.transition=null,W=16>e?16:e,Yt===null)var r=!1;else{if(e=Yt,Yt=null,Ys=0,U&6)throw Error(T(331));var i=U;for(U|=4,_=e.current;_!==null;){var s=_,o=s.child;if(_.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(_=c;_!==null;){var d=_;switch(d.tag){case 0:case 11:case 15:ei(8,d,s)}var f=d.child;if(f!==null)f.return=d,_=f;else for(;_!==null;){d=_;var u=d.sibling,h=d.return;if(dm(d),d===c){_=null;break}if(u!==null){u.return=h,_=u;break}_=h}}}var p=s.alternate;if(p!==null){var m=p.child;if(m!==null){p.child=null;do{var w=m.sibling;m.sibling=null,m=w}while(m!==null)}}_=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,_=o;else e:for(;_!==null;){if(s=_,s.flags&2048)switch(s.tag){case 0:case 11:case 15:ei(9,s,s.return)}var y=s.sibling;if(y!==null){y.return=s.return,_=y;break e}_=s.return}}var v=e.current;for(_=v;_!==null;){o=_;var x=o.child;if(o.subtreeFlags&2064&&x!==null)x.return=o,_=x;else e:for(o=v;_!==null;){if(a=_,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:xo(9,a)}}catch(k){ie(a,a.return,k)}if(a===o){_=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,_=S;break e}_=a.return}}if(U=i,pn(),pt&&typeof pt.onPostCommitFiberRoot=="function")try{pt.onPostCommitFiberRoot(co,e)}catch{}r=!0}return r}finally{W=n,Ze.transition=t}}return!1}function bd(e,t,n){t=wr(n,t),t=em(e,t,1),e=en(e,t,1),t=Te(),e!==null&&(Li(e,1,t),Re(e,t))}function ie(e,t,n){if(e.tag===3)bd(e,e,n);else for(;t!==null;){if(t.tag===3){bd(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(tn===null||!tn.has(r))){e=wr(n,e),e=tm(t,e,1),t=en(t,e,1),e=Te(),t!==null&&(Li(t,1,e),Re(t,e));break}}t=t.return}}function Q1(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Te(),e.pingedLanes|=e.suspendedLanes&n,pe===e&&(ye&n)===n&&(fe===4||fe===3&&(ye&130023424)===ye&&500>se()-Au?An(e,0):_u|=n),Re(e,t)}function Sm(e,t){t===0&&(e.mode&1?(t=Yi,Yi<<=1,!(Yi&130023424)&&(Yi=4194304)):t=1);var n=Te();e=_t(e,t),e!==null&&(Li(e,t,n),Re(e,n))}function X1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Sm(e,n)}function Z1(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(T(314))}r!==null&&r.delete(t),Sm(e,n)}var km;km=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Le.current)Ae=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ae=!1,O1(e,t,n);Ae=!!(e.flags&131072)}else Ae=!1,J&&t.flags&1048576&&Ep(t,Os,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;xs(e,t),e=t.pendingProps;var i=gr(t,be.current);fr(t,n),i=Cu(null,t,r,e,i,n);var s=Eu();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,De(r)?(s=!0,Fs(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,wu(t),i.updater=vo,t.stateNode=i,i._reactInternals=t,ul(t,r,e,n),t=fl(null,t,r,!0,s,n)):(t.tag=0,J&&s&&hu(t),Ee(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(xs(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=ev(r),e=nt(r,e),i){case 0:t=dl(null,t,r,e,n);break e;case 1:t=hd(null,t,r,e,n);break e;case 11:t=dd(null,t,r,e,n);break e;case 14:t=fd(null,t,r,nt(r.type,e),n);break e}throw Error(T(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:nt(r,i),dl(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:nt(r,i),hd(e,t,r,i,n);case 3:e:{if(sm(t),e===null)throw Error(T(387));r=t.pendingProps,s=t.memoizedState,i=s.element,Ap(e,t),Bs(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=wr(Error(T(423)),t),t=pd(e,t,r,n,i);break e}else if(r!==i){i=wr(Error(T(424)),t),t=pd(e,t,r,n,i);break e}else for(Ie=Jt(t.stateNode.containerInfo.firstChild),$e=t,J=!0,it=null,n=Np(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(yr(),r===i){t=At(e,t,n);break e}Ee(e,t,r,n)}t=t.child}return t;case 5:return Lp(t),e===null&&ol(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,tl(r,i)?o=null:s!==null&&tl(r,s)&&(t.flags|=32),im(e,t),Ee(e,t,o,n),t.child;case 6:return e===null&&ol(t),null;case 13:return om(e,t,n);case 4:return Su(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=vr(t,null,r,n):Ee(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:nt(r,i),dd(e,t,r,i,n);case 7:return Ee(e,t,t.pendingProps,n),t.child;case 8:return Ee(e,t,t.pendingProps.children,n),t.child;case 12:return Ee(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,q(Is,r._currentValue),r._currentValue=o,s!==null)if(lt(s.value,o)){if(s.children===i.children&&!Le.current){t=At(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=Pt(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),al(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(T(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),al(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Ee(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,fr(t,n),i=Je(i),r=r(i),t.flags|=1,Ee(e,t,r,n),t.child;case 14:return r=t.type,i=nt(r,t.pendingProps),i=nt(r.type,i),fd(e,t,r,i,n);case 15:return nm(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:nt(r,i),xs(e,t),t.tag=1,De(r)?(e=!0,Fs(t)):e=!1,fr(t,n),Jp(t,r,i),ul(t,r,i,n),fl(null,t,r,!0,e,n);case 19:return am(e,t,n);case 22:return rm(e,t,n)}throw Error(T(156,t.tag))};function bm(e,t){return Qh(e,t)}function J1(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 Qe(e,t,n,r){return new J1(e,t,n,r)}function Vu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ev(e){if(typeof e=="function")return Vu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===tu)return 11;if(e===nu)return 14}return 2}function rn(e,t){var n=e.alternate;return n===null?(n=Qe(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 ks(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")Vu(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Gn:return Ln(n.children,i,s,t);case eu:o=8,i|=8;break;case La:return e=Qe(12,n,t,i|2),e.elementType=La,e.lanes=s,e;case Da:return e=Qe(13,n,t,i),e.elementType=Da,e.lanes=s,e;case Ra:return e=Qe(19,n,t,i),e.elementType=Ra,e.lanes=s,e;case Lh:return So(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _h:o=10;break e;case Ah:o=9;break e;case tu:o=11;break e;case nu:o=14;break e;case $t:o=16,r=null;break e}throw Error(T(130,e==null?e:typeof e,""))}return t=Qe(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Ln(e,t,n,r){return e=Qe(7,e,r,t),e.lanes=n,e}function So(e,t,n,r){return e=Qe(22,e,r,t),e.elementType=Lh,e.lanes=n,e.stateNode={isHidden:!1},e}function ua(e,t,n){return e=Qe(6,e,null,t),e.lanes=n,e}function ca(e,t,n){return t=Qe(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function tv(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=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=i,this.mutableSourceEagerHydrationData=null}function Fu(e,t,n,r,i,s,o,a,l){return e=new tv(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Qe(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},wu(s),e}function nv(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:qn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Pm(e){if(!e)return un;e=e._reactInternals;e:{if($n(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(De(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(De(n))return Pp(e,n,t)}return t}function Cm(e,t,n,r,i,s,o,a,l){return e=Fu(n,r,!0,e,i,s,o,a,l),e.context=Pm(null),n=e.current,r=Te(),i=nn(n),s=Pt(r,i),s.callback=t??null,en(n,s,i),e.current.lanes=i,Li(e,i,r),Re(e,r),e}function ko(e,t,n,r){var i=t.current,s=Te(),o=nn(i);return n=Pm(n),t.context===null?t.context=n:t.pendingContext=n,t=Pt(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=en(i,t,o),e!==null&&(at(e,i,o,s),gs(e,i,o)),o}function Qs(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 Pd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function zu(e,t){Pd(e,t),(e=e.alternate)&&Pd(e,t)}function rv(){return null}var Em=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ou(e){this._internalRoot=e}bo.prototype.render=Ou.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(T(409));ko(e,t,null,null)};bo.prototype.unmount=Ou.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;On(function(){ko(null,e,null,null)}),t[Nt]=null}};function bo(e){this._internalRoot=e}bo.prototype.unstable_scheduleHydration=function(e){if(e){var t=rp();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Wt.length&&t!==0&&t<Wt[n].priority;n++);Wt.splice(n,0,e),n===0&&sp(e)}};function Iu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Po(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Cd(){}function iv(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var c=Qs(o);s.call(c)}}var o=Cm(t,r,e,0,null,!1,!1,"",Cd);return e._reactRootContainer=o,e[Nt]=o.current,gi(e.nodeType===8?e.parentNode:e),On(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var c=Qs(l);a.call(c)}}var l=Fu(e,0,!1,null,null,!1,!1,"",Cd);return e._reactRootContainer=l,e[Nt]=l.current,gi(e.nodeType===8?e.parentNode:e),On(function(){ko(t,l,n,r)}),l}function Co(e,t,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var l=Qs(o);a.call(l)}}ko(t,o,e,i)}else o=iv(n,t,e,i,r);return Qs(o)}tp=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Hr(t.pendingLanes);n!==0&&(su(t,n|1),Re(t,se()),!(U&6)&&(Sr=se()+500,pn()))}break;case 13:On(function(){var r=_t(e,1);if(r!==null){var i=Te();at(r,e,1,i)}}),zu(e,1)}};ou=function(e){if(e.tag===13){var t=_t(e,134217728);if(t!==null){var n=Te();at(t,e,134217728,n)}zu(e,134217728)}};np=function(e){if(e.tag===13){var t=nn(e),n=_t(e,t);if(n!==null){var r=Te();at(n,e,t,r)}zu(e,t)}};rp=function(){return W};ip=function(e,t){var n=W;try{return W=e,t()}finally{W=n}};Ha=function(e,t,n){switch(t){case"input":if(za(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=mo(r);if(!i)throw Error(T(90));Rh(r),za(r,i)}}}break;case"textarea":Fh(e,n);break;case"select":t=n.value,t!=null&&lr(e,!!n.multiple,t,!1)}};Wh=Lu;Hh=On;var sv={usingClientEntryPoint:!1,Events:[Ri,Xn,mo,Bh,Uh,Lu]},zr={findFiberByHostInstance:jn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ov={bundleType:zr.bundleType,version:zr.version,rendererPackageName:zr.rendererPackageName,rendererConfig:zr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Rt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Yh(e),e===null?null:e.stateNode},findFiberByHostInstance:zr.findFiberByHostInstance||rv,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 ss=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ss.isDisabled&&ss.supportsFiber)try{co=ss.inject(ov),pt=ss}catch{}}We.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=sv;We.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Iu(t))throw Error(T(200));return nv(e,t,null,n)};We.createRoot=function(e,t){if(!Iu(e))throw Error(T(299));var n=!1,r="",i=Em;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Fu(e,1,!1,null,null,n,!1,r,i),e[Nt]=t.current,gi(e.nodeType===8?e.parentNode:e),new Ou(t)};We.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=Yh(t),e=e===null?null:e.stateNode,e};We.flushSync=function(e){return On(e)};We.hydrate=function(e,t,n){if(!Po(t))throw Error(T(200));return Co(null,e,t,!0,n)};We.hydrateRoot=function(e,t,n){if(!Iu(e))throw Error(T(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=Em;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Cm(t,null,e,1,n??null,i,!1,s,o),e[Nt]=t.current,gi(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new bo(t)};We.render=function(e,t,n){if(!Po(t))throw Error(T(200));return Co(null,e,t,!1,n)};We.unmountComponentAtNode=function(e){if(!Po(e))throw Error(T(40));return e._reactRootContainer?(On(function(){Co(null,null,e,!1,function(){e._reactRootContainer=null,e[Nt]=null})}),!0):!1};We.unstable_batchedUpdates=Lu;We.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Po(n))throw Error(T(200));if(e==null||e._reactInternals===void 0)throw Error(T(38));return Co(e,t,n,!1,r)};We.version="18.3.1-next-f1338f8080-20240426";function Tm(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Tm)}catch(e){console.error(e)}}Tm(),Th.exports=We;var av=Th.exports,Ed=av;_a.createRoot=Ed.createRoot,_a.hydrateRoot=Ed.hydrateRoot;/**
|
|
* @remix-run/router v1.23.0
|
|
*
|
|
* 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 Ci(){return Ci=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},Ci.apply(this,arguments)}var Kt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Kt||(Kt={}));const Td="popstate";function lv(e){e===void 0&&(e={});function t(r,i){let{pathname:s,search:o,hash:a}=r.location;return Pl("",{pathname:s,search:o,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Xs(i)}return cv(t,n,null,e)}function ae(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function jm(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function uv(){return Math.random().toString(36).substr(2,8)}function jd(e,t){return{usr:e.state,key:e.key,idx:t}}function Pl(e,t,n,r){return n===void 0&&(n=null),Ci({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?jr(t):t,{state:n,key:t&&t.key||r||uv()})}function Xs(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 jr(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 cv(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,a=Kt.Pop,l=null,c=d();c==null&&(c=0,o.replaceState(Ci({},o.state,{idx:c}),""));function d(){return(o.state||{idx:null}).idx}function f(){a=Kt.Pop;let w=d(),y=w==null?null:w-c;c=w,l&&l({action:a,location:m.location,delta:y})}function u(w,y){a=Kt.Push;let v=Pl(m.location,w,y);c=d()+1;let x=jd(v,c),S=m.createHref(v);try{o.pushState(x,"",S)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;i.location.assign(S)}s&&l&&l({action:a,location:m.location,delta:1})}function h(w,y){a=Kt.Replace;let v=Pl(m.location,w,y);c=d();let x=jd(v,c),S=m.createHref(v);o.replaceState(x,"",S),s&&l&&l({action:a,location:m.location,delta:0})}function p(w){let y=i.location.origin!=="null"?i.location.origin:i.location.href,v=typeof w=="string"?w:Xs(w);return v=v.replace(/ $/,"%20"),ae(y,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,y)}let m={get action(){return a},get location(){return e(i,o)},listen(w){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Td,f),l=w,()=>{i.removeEventListener(Td,f),l=null}},createHref(w){return t(i,w)},createURL:p,encodeLocation(w){let y=p(w);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:u,replace:h,go(w){return o.go(w)}};return m}var Md;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Md||(Md={}));function dv(e,t,n){return n===void 0&&(n="/"),fv(e,t,n)}function fv(e,t,n,r){let i=typeof t=="string"?jr(t):t,s=$u(i.pathname||"/",n);if(s==null)return null;let o=Mm(e);hv(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=Cv(s);a=kv(o[l],c)}return a}function Mm(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(s,o,a)=>{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(ae(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=sn([r,l.relativePath]),d=n.concat(l);s.children&&s.children.length>0&&(ae(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Mm(s.children,t,d,c)),!(s.path==null&&!s.index)&&t.push({path:c,score:wv(c,s.index),routesMeta:d})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of Nm(s.path))i(s,o,l)}),t}function Nm(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=Nm(r.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function hv(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Sv(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const pv=/^:[\w-]+$/,mv=3,gv=2,yv=1,vv=10,xv=-2,Nd=e=>e==="*";function wv(e,t){let n=e.split("/"),r=n.length;return n.some(Nd)&&(r+=xv),t&&(r+=gv),n.filter(i=>!Nd(i)).reduce((i,s)=>i+(pv.test(s)?mv:s===""?yv:vv),r)}function Sv(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function kv(e,t,n){let{routesMeta:r}=e,i={},s="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,d=s==="/"?t:t.slice(s.length)||"/",f=bv({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},d),u=l.route;if(!f)return null;Object.assign(i,f.params),o.push({params:i,pathname:sn([s,f.pathname]),pathnameBase:Mv(sn([s,f.pathnameBase])),route:u}),f.pathnameBase!=="/"&&(s=sn([s,f.pathnameBase]))}return o}function bv(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Pv(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((c,d,f)=>{let{paramName:u,isOptional:h}=d;if(u==="*"){let m=a[f]||"";o=s.slice(0,s.length-m.length).replace(/(.)\/+$/,"$1")}const p=a[f];return h&&!p?c[u]=void 0:c[u]=(p||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:o,pattern:e}}function Pv(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),jm(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function Cv(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return jm(!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 $u(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Ev(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?jr(e):e;return{pathname:n?n.startsWith("/")?n:Tv(n,t):t,search:Nv(r),hash:_v(i)}}function Tv(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function da(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 jv(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Bu(e,t){let n=jv(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Uu(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=jr(e):(i=Ci({},e),ae(!i.pathname||!i.pathname.includes("?"),da("?","pathname","search",i)),ae(!i.pathname||!i.pathname.includes("#"),da("#","pathname","hash",i)),ae(!i.search||!i.search.includes("#"),da("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let f=t.length-1;if(!r&&o.startsWith("..")){let u=o.split("/");for(;u[0]==="..";)u.shift(),f-=1;i.pathname=u.join("/")}a=f>=0?t[f]:"/"}let l=Ev(i,a),c=o&&o!=="/"&&o.endsWith("/"),d=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const sn=e=>e.join("/").replace(/\/\/+/g,"/"),Mv=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Nv=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,_v=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Av(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const _m=["post","put","patch","delete"];new Set(_m);const Lv=["get",..._m];new Set(Lv);/**
|
|
* React Router v6.30.1
|
|
*
|
|
* 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 Ei(){return Ei=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},Ei.apply(this,arguments)}const Wu=b.createContext(null),Dv=b.createContext(null),mn=b.createContext(null),Eo=b.createContext(null),gn=b.createContext({outlet:null,matches:[],isDataRoute:!1}),Am=b.createContext(null);function Rv(e,t){let{relative:n}=t===void 0?{}:t;Mr()||ae(!1);let{basename:r,navigator:i}=b.useContext(mn),{hash:s,pathname:o,search:a}=Dm(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:sn([r,o])),i.createHref({pathname:l,search:a,hash:s})}function Mr(){return b.useContext(Eo)!=null}function yn(){return Mr()||ae(!1),b.useContext(Eo).location}function Lm(e){b.useContext(mn).static||b.useLayoutEffect(e)}function To(){let{isDataRoute:e}=b.useContext(gn);return e?Yv():Vv()}function Vv(){Mr()||ae(!1);let e=b.useContext(Wu),{basename:t,future:n,navigator:r}=b.useContext(mn),{matches:i}=b.useContext(gn),{pathname:s}=yn(),o=JSON.stringify(Bu(i,n.v7_relativeSplatPath)),a=b.useRef(!1);return Lm(()=>{a.current=!0}),b.useCallback(function(c,d){if(d===void 0&&(d={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let f=Uu(c,JSON.parse(o),s,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:sn([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,o,s,e])}function Dm(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=b.useContext(mn),{matches:i}=b.useContext(gn),{pathname:s}=yn(),o=JSON.stringify(Bu(i,r.v7_relativeSplatPath));return b.useMemo(()=>Uu(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function Fv(e,t){return zv(e,t)}function zv(e,t,n,r){Mr()||ae(!1);let{navigator:i}=b.useContext(mn),{matches:s}=b.useContext(gn),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=yn(),d;if(t){var f;let w=typeof t=="string"?jr(t):t;l==="/"||(f=w.pathname)!=null&&f.startsWith(l)||ae(!1),d=w}else d=c;let u=d.pathname||"/",h=u;if(l!=="/"){let w=l.replace(/^\//,"").split("/");h="/"+u.replace(/^\//,"").split("/").slice(w.length).join("/")}let p=dv(e,{pathname:h}),m=Uv(p&&p.map(w=>Object.assign({},w,{params:Object.assign({},a,w.params),pathname:sn([l,i.encodeLocation?i.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:sn([l,i.encodeLocation?i.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),s,n,r);return t&&m?b.createElement(Eo.Provider,{value:{location:Ei({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Kt.Pop}},m):m}function Ov(){let e=Gv(),t=Av(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),n?b.createElement("pre",{style:i},n):null,null)}const Iv=b.createElement(Ov,null);class $v extends b.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?b.createElement(gn.Provider,{value:this.props.routeContext},b.createElement(Am.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Bv(e){let{routeContext:t,match:n,children:r}=e,i=b.useContext(Wu);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),b.createElement(gn.Provider,{value:t},r)}function Uv(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if(!n)return null;if(n.errors)e=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let d=o.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);d>=0||ae(!1),o=o.slice(0,Math.min(o.length,d+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<o.length;d++){let f=o[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(c=d),f.route.id){let{loaderData:u,errors:h}=n,p=f.route.loader&&u[f.route.id]===void 0&&(!h||h[f.route.id]===void 0);if(f.route.lazy||p){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((d,f,u)=>{let h,p=!1,m=null,w=null;n&&(h=a&&f.route.id?a[f.route.id]:void 0,m=f.route.errorElement||Iv,l&&(c<0&&u===0?(Kv("route-fallback"),p=!0,w=null):c===u&&(p=!0,w=f.route.hydrateFallbackElement||null)));let y=t.concat(o.slice(0,u+1)),v=()=>{let x;return h?x=m:p?x=w:f.route.Component?x=b.createElement(f.route.Component,null):f.route.element?x=f.route.element:x=d,b.createElement(Bv,{match:f,routeContext:{outlet:d,matches:y,isDataRoute:n!=null},children:x})};return n&&(f.route.ErrorBoundary||f.route.errorElement||u===0)?b.createElement($v,{location:n.location,revalidation:n.revalidation,component:m,error:h,children:v(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):v()},null)}var Rm=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Rm||{}),Vm=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}(Vm||{});function Wv(e){let t=b.useContext(Wu);return t||ae(!1),t}function Hv(e){let t=b.useContext(Dv);return t||ae(!1),t}function qv(e){let t=b.useContext(gn);return t||ae(!1),t}function Fm(e){let t=qv(),n=t.matches[t.matches.length-1];return n.route.id||ae(!1),n.route.id}function Gv(){var e;let t=b.useContext(Am),n=Hv(),r=Fm();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Yv(){let{router:e}=Wv(Rm.UseNavigateStable),t=Fm(Vm.UseNavigateStable),n=b.useRef(!1);return Lm(()=>{n.current=!0}),b.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Ei({fromRouteId:t},s)))},[e,t])}const _d={};function Kv(e,t,n){_d[e]||(_d[e]=!0)}function Qv(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Xv(e){let{to:t,replace:n,state:r,relative:i}=e;Mr()||ae(!1);let{future:s,static:o}=b.useContext(mn),{matches:a}=b.useContext(gn),{pathname:l}=yn(),c=To(),d=Uu(t,Bu(a,s.v7_relativeSplatPath),l,i==="path"),f=JSON.stringify(d);return b.useEffect(()=>c(JSON.parse(f),{replace:n,state:r,relative:i}),[c,f,i,n,r]),null}function Ot(e){ae(!1)}function Zv(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Kt.Pop,navigator:s,static:o=!1,future:a}=e;Mr()&&ae(!1);let l=t.replace(/^\/*/,"/"),c=b.useMemo(()=>({basename:l,navigator:s,static:o,future:Ei({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof r=="string"&&(r=jr(r));let{pathname:d="/",search:f="",hash:u="",state:h=null,key:p="default"}=r,m=b.useMemo(()=>{let w=$u(d,l);return w==null?null:{location:{pathname:w,search:f,hash:u,state:h,key:p},navigationType:i}},[l,d,f,u,h,p,i]);return m==null?null:b.createElement(mn.Provider,{value:c},b.createElement(Eo.Provider,{children:n,value:m}))}function Jv(e){let{children:t,location:n}=e;return Fv(Cl(t),n)}new Promise(()=>{});function Cl(e,t){t===void 0&&(t=[]);let n=[];return b.Children.forEach(e,(r,i)=>{if(!b.isValidElement(r))return;let s=[...t,i];if(r.type===b.Fragment){n.push.apply(n,Cl(r.props.children,s));return}r.type!==Ot&&ae(!1),!r.props.index||!r.props.children||ae(!1);let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Cl(r.props.children,s)),n.push(o)}),n}/**
|
|
* React Router DOM v6.30.1
|
|
*
|
|
* 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 El(){return El=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},El.apply(this,arguments)}function ex(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function tx(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function nx(e,t){return e.button===0&&(!t||t==="_self")&&!tx(e)}function Tl(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function rx(e,t){let n=Tl(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(s=>{n.append(i,s)})}),n}const ix=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],sx="6";try{window.__reactRouterVersion=sx}catch{}const ox="startTransition",Ad=Qg[ox];function ax(e){let{basename:t,children:n,future:r,window:i}=e,s=b.useRef();s.current==null&&(s.current=lv({window:i,v5Compat:!0}));let o=s.current,[a,l]=b.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},d=b.useCallback(f=>{c&&Ad?Ad(()=>l(f)):l(f)},[l,c]);return b.useLayoutEffect(()=>o.listen(d),[o,d]),b.useEffect(()=>Qv(r),[r]),b.createElement(Zv,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const lx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ux=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,bs=b.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:c,preventScrollReset:d,viewTransition:f}=t,u=ex(t,ix),{basename:h}=b.useContext(mn),p,m=!1;if(typeof c=="string"&&ux.test(c)&&(p=c,lx))try{let x=new URL(window.location.href),S=c.startsWith("//")?new URL(x.protocol+c):new URL(c),k=$u(S.pathname,h);S.origin===x.origin&&k!=null?c=k+S.search+S.hash:m=!0}catch{}let w=Rv(c,{relative:i}),y=cx(c,{replace:o,state:a,target:l,preventScrollReset:d,relative:i,viewTransition:f});function v(x){r&&r(x),x.defaultPrevented||y(x)}return b.createElement("a",El({},u,{href:p||w,onClick:m||s?r:v,ref:n,target:l}))});var Ld;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ld||(Ld={}));var Dd;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Dd||(Dd={}));function cx(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:a}=t===void 0?{}:t,l=To(),c=yn(),d=Dm(e,{relative:o});return b.useCallback(f=>{if(nx(f,n)){f.preventDefault();let u=r!==void 0?r:Xs(c)===Xs(d);l(e,{replace:u,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[c,l,d,r,i,n,e,s,o,a])}function dx(e){let t=b.useRef(Tl(e)),n=b.useRef(!1),r=yn(),i=b.useMemo(()=>rx(r.search,n.current?null:t.current),[r.search]),s=To(),o=b.useCallback((a,l)=>{const c=Tl(typeof a=="function"?a(i):a);n.current=!0,s("?"+c,l)},[s,i]);return[i,o]}let fx={data:""},hx=e=>{if(typeof window=="object"){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||fx},px=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,mx=/\/\*[^]*?\*\/| +/g,Rd=/\n+/g,qt=(e,t)=>{let n="",r="",i="";for(let s in e){let o=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+o+";":r+=s[1]=="f"?qt(o,s):s+"{"+qt(o,s[1]=="k"?"":t)+"}":typeof o=="object"?r+=qt(o,t?t.replace(/([^,])+/g,a=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,a):a?a+" "+l:l)):s):o!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=qt.p?qt.p(s,o):s+":"+o+";")}return n+(t&&i?t+"{"+i+"}":i)+r},yt={},zm=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+zm(e[n]);return t}return e},gx=(e,t,n,r,i)=>{let s=zm(e),o=yt[s]||(yt[s]=(l=>{let c=0,d=11;for(;c<l.length;)d=101*d+l.charCodeAt(c++)>>>0;return"go"+d})(s));if(!yt[o]){let l=s!==e?e:(c=>{let d,f,u=[{}];for(;d=px.exec(c.replace(mx,""));)d[4]?u.shift():d[3]?(f=d[3].replace(Rd," ").trim(),u.unshift(u[0][f]=u[0][f]||{})):u[0][d[1]]=d[2].replace(Rd," ").trim();return u[0]})(e);yt[o]=qt(i?{["@keyframes "+o]:l}:l,n?"":"."+o)}let a=n&&yt.g?yt.g:null;return n&&(yt.g=yt[o]),((l,c,d,f)=>{f?c.data=c.data.replace(f,l):c.data.indexOf(l)===-1&&(c.data=d?l+c.data:c.data+l)})(yt[o],t,r,a),o},yx=(e,t,n)=>e.reduce((r,i,s)=>{let o=t[s];if(o&&o.call){let a=o(n),l=a&&a.props&&a.props.className||/^go/.test(a)&&a;o=l?"."+l:a&&typeof a=="object"?a.props?"":qt(a,""):a===!1?"":a}return r+i+(o??"")},"");function jo(e){let t=this||{},n=e.call?e(t.p):e;return gx(n.unshift?n.raw?yx(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,hx(t.target),t.g,t.o,t.k)}let Om,jl,Ml;jo.bind({g:1});let Lt=jo.bind({k:1});function vx(e,t,n,r){qt.p=t,Om=e,jl=n,Ml=r}function vn(e,t){let n=this||{};return function(){let r=arguments;function i(s,o){let a=Object.assign({},s),l=a.className||i.className;n.p=Object.assign({theme:jl&&jl()},a),n.o=/ *go\d+/.test(l),a.className=jo.apply(n,r)+(l?" "+l:"");let c=e;return e[0]&&(c=a.as||e,delete a.as),Ml&&c[0]&&Ml(a),Om(c,a)}return i}}var xx=e=>typeof e=="function",Zs=(e,t)=>xx(e)?e(t):e,wx=(()=>{let e=0;return()=>(++e).toString()})(),Im=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),Sx=20,Hu="default",$m=(e,t)=>{let{toastLimit:n}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,n)};case 1:return{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case 2:let{toast:r}=t;return $m(e,{type:e.toasts.find(o=>o.id===r.id)?1:0,toast:r});case 3:let{toastId:i}=t;return{...e,toasts:e.toasts.map(o=>o.id===i||i===void 0?{...o,dismissed:!0,visible:!1}:o)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let s=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+s}))}}},Ps=[],Bm={toasts:[],pausedAt:void 0,settings:{toastLimit:Sx}},ht={},Um=(e,t=Hu)=>{ht[t]=$m(ht[t]||Bm,e),Ps.forEach(([n,r])=>{n===t&&r(ht[t])})},Wm=e=>Object.keys(ht).forEach(t=>Um(e,t)),kx=e=>Object.keys(ht).find(t=>ht[t].toasts.some(n=>n.id===e)),Mo=(e=Hu)=>t=>{Um(t,e)},bx={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Px=(e={},t=Hu)=>{let[n,r]=b.useState(ht[t]||Bm),i=b.useRef(ht[t]);b.useEffect(()=>(i.current!==ht[t]&&r(ht[t]),Ps.push([t,r]),()=>{let o=Ps.findIndex(([a])=>a===t);o>-1&&Ps.splice(o,1)}),[t]);let s=n.toasts.map(o=>{var a,l,c;return{...e,...e[o.type],...o,removeDelay:o.removeDelay||((a=e[o.type])==null?void 0:a.removeDelay)||(e==null?void 0:e.removeDelay),duration:o.duration||((l=e[o.type])==null?void 0:l.duration)||(e==null?void 0:e.duration)||bx[o.type],style:{...e.style,...(c=e[o.type])==null?void 0:c.style,...o.style}}});return{...n,toasts:s}},Cx=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||wx()}),Fi=e=>(t,n)=>{let r=Cx(t,e,n);return Mo(r.toasterId||kx(r.id))({type:2,toast:r}),r.id},de=(e,t)=>Fi("blank")(e,t);de.error=Fi("error");de.success=Fi("success");de.loading=Fi("loading");de.custom=Fi("custom");de.dismiss=(e,t)=>{let n={type:3,toastId:e};t?Mo(t)(n):Wm(n)};de.dismissAll=e=>de.dismiss(void 0,e);de.remove=(e,t)=>{let n={type:4,toastId:e};t?Mo(t)(n):Wm(n)};de.removeAll=e=>de.remove(void 0,e);de.promise=(e,t,n)=>{let r=de.loading(t.loading,{...n,...n==null?void 0:n.loading});return typeof e=="function"&&(e=e()),e.then(i=>{let s=t.success?Zs(t.success,i):void 0;return s?de.success(s,{id:r,...n,...n==null?void 0:n.success}):de.dismiss(r),i}).catch(i=>{let s=t.error?Zs(t.error,i):void 0;s?de.error(s,{id:r,...n,...n==null?void 0:n.error}):de.dismiss(r)}),e};var Ex=1e3,Tx=(e,t="default")=>{let{toasts:n,pausedAt:r}=Px(e,t),i=b.useRef(new Map).current,s=b.useCallback((f,u=Ex)=>{if(i.has(f))return;let h=setTimeout(()=>{i.delete(f),o({type:4,toastId:f})},u);i.set(f,h)},[]);b.useEffect(()=>{if(r)return;let f=Date.now(),u=n.map(h=>{if(h.duration===1/0)return;let p=(h.duration||0)+h.pauseDuration-(f-h.createdAt);if(p<0){h.visible&&de.dismiss(h.id);return}return setTimeout(()=>de.dismiss(h.id,t),p)});return()=>{u.forEach(h=>h&&clearTimeout(h))}},[n,r,t]);let o=b.useCallback(Mo(t),[t]),a=b.useCallback(()=>{o({type:5,time:Date.now()})},[o]),l=b.useCallback((f,u)=>{o({type:1,toast:{id:f,height:u}})},[o]),c=b.useCallback(()=>{r&&o({type:6,time:Date.now()})},[r,o]),d=b.useCallback((f,u)=>{let{reverseOrder:h=!1,gutter:p=8,defaultPosition:m}=u||{},w=n.filter(x=>(x.position||m)===(f.position||m)&&x.height),y=w.findIndex(x=>x.id===f.id),v=w.filter((x,S)=>S<y&&x.visible).length;return w.filter(x=>x.visible).slice(...h?[v+1]:[0,v]).reduce((x,S)=>x+(S.height||0)+p,0)},[n]);return b.useEffect(()=>{n.forEach(f=>{if(f.dismissed)s(f.id,f.removeDelay);else{let u=i.get(f.id);u&&(clearTimeout(u),i.delete(f.id))}})},[n,s]),{toasts:n,handlers:{updateHeight:l,startPause:a,endPause:c,calculateOffset:d}}},jx=Lt`
|
|
from {
|
|
transform: scale(0) rotate(45deg);
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
transform: scale(1) rotate(45deg);
|
|
opacity: 1;
|
|
}`,Mx=Lt`
|
|
from {
|
|
transform: scale(0);
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
transform: scale(1);
|
|
opacity: 1;
|
|
}`,Nx=Lt`
|
|
from {
|
|
transform: scale(0) rotate(90deg);
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
transform: scale(1) rotate(90deg);
|
|
opacity: 1;
|
|
}`,_x=vn("div")`
|
|
width: 20px;
|
|
opacity: 0;
|
|
height: 20px;
|
|
border-radius: 10px;
|
|
background: ${e=>e.primary||"#ff4b4b"};
|
|
position: relative;
|
|
transform: rotate(45deg);
|
|
|
|
animation: ${jx} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
forwards;
|
|
animation-delay: 100ms;
|
|
|
|
&:after,
|
|
&:before {
|
|
content: '';
|
|
animation: ${Mx} 0.15s ease-out forwards;
|
|
animation-delay: 150ms;
|
|
position: absolute;
|
|
border-radius: 3px;
|
|
opacity: 0;
|
|
background: ${e=>e.secondary||"#fff"};
|
|
bottom: 9px;
|
|
left: 4px;
|
|
height: 2px;
|
|
width: 12px;
|
|
}
|
|
|
|
&:before {
|
|
animation: ${Nx} 0.15s ease-out forwards;
|
|
animation-delay: 180ms;
|
|
transform: rotate(90deg);
|
|
}
|
|
`,Ax=Lt`
|
|
from {
|
|
transform: rotate(0deg);
|
|
}
|
|
to {
|
|
transform: rotate(360deg);
|
|
}
|
|
`,Lx=vn("div")`
|
|
width: 12px;
|
|
height: 12px;
|
|
box-sizing: border-box;
|
|
border: 2px solid;
|
|
border-radius: 100%;
|
|
border-color: ${e=>e.secondary||"#e0e0e0"};
|
|
border-right-color: ${e=>e.primary||"#616161"};
|
|
animation: ${Ax} 1s linear infinite;
|
|
`,Dx=Lt`
|
|
from {
|
|
transform: scale(0) rotate(45deg);
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
transform: scale(1) rotate(45deg);
|
|
opacity: 1;
|
|
}`,Rx=Lt`
|
|
0% {
|
|
height: 0;
|
|
width: 0;
|
|
opacity: 0;
|
|
}
|
|
40% {
|
|
height: 0;
|
|
width: 6px;
|
|
opacity: 1;
|
|
}
|
|
100% {
|
|
opacity: 1;
|
|
height: 10px;
|
|
}`,Vx=vn("div")`
|
|
width: 20px;
|
|
opacity: 0;
|
|
height: 20px;
|
|
border-radius: 10px;
|
|
background: ${e=>e.primary||"#61d345"};
|
|
position: relative;
|
|
transform: rotate(45deg);
|
|
|
|
animation: ${Dx} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
forwards;
|
|
animation-delay: 100ms;
|
|
&:after {
|
|
content: '';
|
|
box-sizing: border-box;
|
|
animation: ${Rx} 0.2s ease-out forwards;
|
|
opacity: 0;
|
|
animation-delay: 200ms;
|
|
position: absolute;
|
|
border-right: 2px solid;
|
|
border-bottom: 2px solid;
|
|
border-color: ${e=>e.secondary||"#fff"};
|
|
bottom: 6px;
|
|
left: 6px;
|
|
height: 10px;
|
|
width: 6px;
|
|
}
|
|
`,Fx=vn("div")`
|
|
position: absolute;
|
|
`,zx=vn("div")`
|
|
position: relative;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
min-width: 20px;
|
|
min-height: 20px;
|
|
`,Ox=Lt`
|
|
from {
|
|
transform: scale(0.6);
|
|
opacity: 0.4;
|
|
}
|
|
to {
|
|
transform: scale(1);
|
|
opacity: 1;
|
|
}`,Ix=vn("div")`
|
|
position: relative;
|
|
transform: scale(0.6);
|
|
opacity: 0.4;
|
|
min-width: 20px;
|
|
animation: ${Ox} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
forwards;
|
|
`,$x=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?b.createElement(Ix,null,t):t:n==="blank"?null:b.createElement(zx,null,b.createElement(Lx,{...r}),n!=="loading"&&b.createElement(Fx,null,n==="error"?b.createElement(_x,{...r}):b.createElement(Vx,{...r})))},Bx=e=>`
|
|
0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
|
|
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
|
|
`,Ux=e=>`
|
|
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
|
|
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
|
|
`,Wx="0%{opacity:0;} 100%{opacity:1;}",Hx="0%{opacity:1;} 100%{opacity:0;}",qx=vn("div")`
|
|
display: flex;
|
|
align-items: center;
|
|
background: #fff;
|
|
color: #363636;
|
|
line-height: 1.3;
|
|
will-change: transform;
|
|
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
|
|
max-width: 350px;
|
|
pointer-events: auto;
|
|
padding: 8px 10px;
|
|
border-radius: 8px;
|
|
`,Gx=vn("div")`
|
|
display: flex;
|
|
justify-content: center;
|
|
margin: 4px 10px;
|
|
color: inherit;
|
|
flex: 1 1 auto;
|
|
white-space: pre-line;
|
|
`,Yx=(e,t)=>{let n=e.includes("top")?1:-1,[r,i]=Im()?[Wx,Hx]:[Bx(n),Ux(n)];return{animation:t?`${Lt(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Lt(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},Kx=b.memo(({toast:e,position:t,style:n,children:r})=>{let i=e.height?Yx(e.position||t||"top-center",e.visible):{opacity:0},s=b.createElement($x,{toast:e}),o=b.createElement(Gx,{...e.ariaProps},Zs(e.message,e));return b.createElement(qx,{className:e.className,style:{...i,...n,...e.style}},typeof r=="function"?r({icon:s,message:o}):b.createElement(b.Fragment,null,s,o))});vx(b.createElement);var Qx=({id:e,className:t,style:n,onHeightUpdate:r,children:i})=>{let s=b.useCallback(o=>{if(o){let a=()=>{let l=o.getBoundingClientRect().height;r(e,l)};a(),new MutationObserver(a).observe(o,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return b.createElement("div",{ref:s,className:t,style:n},i)},Xx=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},i=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Im()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...i}},Zx=jo`
|
|
z-index: 9999;
|
|
> * {
|
|
pointer-events: auto;
|
|
}
|
|
`,os=16,Jx=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:i,toasterId:s,containerStyle:o,containerClassName:a})=>{let{toasts:l,handlers:c}=Tx(n,s);return b.createElement("div",{"data-rht-toaster":s||"",style:{position:"fixed",zIndex:9999,top:os,left:os,right:os,bottom:os,pointerEvents:"none",...o},className:a,onMouseEnter:c.startPause,onMouseLeave:c.endPause},l.map(d=>{let f=d.position||t,u=c.calculateOffset(d,{reverseOrder:e,gutter:r,defaultPosition:t}),h=Xx(f,u);return b.createElement(Qx,{id:d.id,key:d.id,onHeightUpdate:c.updateHeight,className:d.visible?Zx:"",style:h},d.type==="custom"?Zs(d.message,d):i?i(d):b.createElement(Kx,{toast:d,position:f}))}))},Ne=de;const Hm=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),No=b.createContext({}),qu=b.createContext(null),_o=typeof document<"u",e2=_o?b.useLayoutEffect:b.useEffect,qm=b.createContext({strict:!1}),Gu=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),t2="framerAppearId",Gm="data-"+Gu(t2);function n2(e,t,n,r){const{visualElement:i}=b.useContext(No),s=b.useContext(qm),o=b.useContext(qu),a=b.useContext(Hm).reducedMotion,l=b.useRef();r=r||s.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const c=l.current;b.useInsertionEffect(()=>{c&&c.update(n,o)});const d=b.useRef(!!(n[Gm]&&!window.HandoffComplete));return e2(()=>{c&&(c.render(),d.current&&c.animationState&&c.animationState.animateChanges())}),b.useEffect(()=>{c&&(c.updateFeatures(),!d.current&&c.animationState&&c.animationState.animateChanges(),d.current&&(d.current=!1,window.HandoffComplete=!0))}),c}function ir(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function r2(e,t,n){return b.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):ir(n)&&(n.current=r))},[t])}function Ti(e){return typeof e=="string"||Array.isArray(e)}function Ao(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Yu=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ku=["initial",...Yu];function Lo(e){return Ao(e.animate)||Ku.some(t=>Ti(e[t]))}function Ym(e){return!!(Lo(e)||e.variants)}function i2(e,t){if(Lo(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ti(n)?n:void 0,animate:Ti(r)?r:void 0}}return e.inherit!==!1?t:{}}function s2(e){const{initial:t,animate:n}=i2(e,b.useContext(No));return b.useMemo(()=>({initial:t,animate:n}),[Vd(t),Vd(n)])}function Vd(e){return Array.isArray(e)?e.join(" "):e}const Fd={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"]},ji={};for(const e in Fd)ji[e]={isEnabled:t=>Fd[e].some(n=>!!t[n])};function o2(e){for(const t in e)ji[t]={...ji[t],...e[t]}}const Km=b.createContext({}),Qm=b.createContext({}),a2=Symbol.for("motionComponentSymbol");function l2({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&o2(e);function s(a,l){let c;const d={...b.useContext(Hm),...a,layoutId:u2(a)},{isStatic:f}=d,u=s2(a),h=r(a,f);if(!f&&_o){u.visualElement=n2(i,h,d,t);const p=b.useContext(Qm),m=b.useContext(qm).strict;u.visualElement&&(c=u.visualElement.loadFeatures(d,m,e,p))}return b.createElement(No.Provider,{value:u},c&&u.visualElement?b.createElement(c,{visualElement:u.visualElement,...d}):null,n(i,a,r2(h,u.visualElement,l),h,f,u.visualElement))}const o=b.forwardRef(s);return o[a2]=i,o}function u2({layoutId:e}){const t=b.useContext(Km).id;return t&&e!==void 0?t+"-"+e:e}function c2(e){function t(r,i={}){return l2(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const d2=["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 Qu(e){return typeof e!="string"||e.includes("-")?!1:!!(d2.indexOf(e)>-1||/[A-Z]/.test(e))}const Js={};function f2(e){Object.assign(Js,e)}const zi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Bn=new Set(zi);function Xm(e,{layout:t,layoutId:n}){return Bn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Js[e]||e==="opacity")}const Ve=e=>!!(e&&e.getVelocity),h2={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},p2=zi.length;function m2(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let s="";for(let o=0;o<p2;o++){const a=zi[o];if(e[a]!==void 0){const l=h2[a]||a;s+=`${l}(${e[a]}) `}}return t&&!e.z&&(s+="translateZ(0)"),s=s.trim(),i?s=i(e,r?"":s):n&&r&&(s="none"),s}const Zm=e=>t=>typeof t=="string"&&t.startsWith(e),Jm=Zm("--"),Nl=Zm("var(--"),g2=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,y2=(e,t)=>t&&typeof e=="number"?t.transform(e):e,cn=(e,t,n)=>Math.min(Math.max(n,e),t),Un={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ri={...Un,transform:e=>cn(0,1,e)},as={...Un,default:1},ii=e=>Math.round(e*1e5)/1e5,Do=/(-)?([\d]*\.?[\d])+/g,e0=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,v2=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Oi(e){return typeof e=="string"}const Ii=e=>({test:t=>Oi(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),It=Ii("deg"),gt=Ii("%"),F=Ii("px"),x2=Ii("vh"),w2=Ii("vw"),zd={...gt,parse:e=>gt.parse(e)/100,transform:e=>gt.transform(e*100)},Od={...Un,transform:Math.round},t0={borderWidth:F,borderTopWidth:F,borderRightWidth:F,borderBottomWidth:F,borderLeftWidth:F,borderRadius:F,radius:F,borderTopLeftRadius:F,borderTopRightRadius:F,borderBottomRightRadius:F,borderBottomLeftRadius:F,width:F,maxWidth:F,height:F,maxHeight:F,size:F,top:F,right:F,bottom:F,left:F,padding:F,paddingTop:F,paddingRight:F,paddingBottom:F,paddingLeft:F,margin:F,marginTop:F,marginRight:F,marginBottom:F,marginLeft:F,rotate:It,rotateX:It,rotateY:It,rotateZ:It,scale:as,scaleX:as,scaleY:as,scaleZ:as,skew:It,skewX:It,skewY:It,distance:F,translateX:F,translateY:F,translateZ:F,x:F,y:F,z:F,perspective:F,transformPerspective:F,opacity:ri,originX:zd,originY:zd,originZ:F,zIndex:Od,fillOpacity:ri,strokeOpacity:ri,numOctaves:Od};function Xu(e,t,n,r){const{style:i,vars:s,transform:o,transformOrigin:a}=e;let l=!1,c=!1,d=!0;for(const f in t){const u=t[f];if(Jm(f)){s[f]=u;continue}const h=t0[f],p=y2(u,h);if(Bn.has(f)){if(l=!0,o[f]=p,!d)continue;u!==(h.default||0)&&(d=!1)}else f.startsWith("origin")?(c=!0,a[f]=p):i[f]=p}if(t.transform||(l||r?i.transform=m2(e.transform,n,d,r):i.transform&&(i.transform="none")),c){const{originX:f="50%",originY:u="50%",originZ:h=0}=a;i.transformOrigin=`${f} ${u} ${h}`}}const Zu=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function n0(e,t,n){for(const r in t)!Ve(t[r])&&!Xm(r,n)&&(e[r]=t[r])}function S2({transformTemplate:e},t,n){return b.useMemo(()=>{const r=Zu();return Xu(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function k2(e,t,n){const r=e.style||{},i={};return n0(i,r,e),Object.assign(i,S2(e,t,n)),e.transformValues?e.transformValues(i):i}function b2(e,t,n){const r={},i=k2(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const P2=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function eo(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||P2.has(e)}let r0=e=>!eo(e);function C2(e){e&&(r0=t=>t.startsWith("on")?!eo(t):e(t))}try{C2(require("@emotion/is-prop-valid").default)}catch{}function E2(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(r0(i)||n===!0&&eo(i)||!t&&!eo(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function Id(e,t,n){return typeof e=="string"?e:F.transform(t+n*e)}function T2(e,t,n){const r=Id(t,e.x,e.width),i=Id(n,e.y,e.height);return`${r} ${i}`}const j2={offset:"stroke-dashoffset",array:"stroke-dasharray"},M2={offset:"strokeDashoffset",array:"strokeDasharray"};function N2(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?j2:M2;e[s.offset]=F.transform(-r);const o=F.transform(t),a=F.transform(n);e[s.array]=`${o} ${a}`}function Ju(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},d,f,u){if(Xu(e,c,d,u),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:m}=e;h.transform&&(m&&(p.transform=h.transform),delete h.transform),m&&(i!==void 0||s!==void 0||p.transform)&&(p.transformOrigin=T2(m,i!==void 0?i:.5,s!==void 0?s:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),o!==void 0&&N2(h,o,a,l,!1)}const i0=()=>({...Zu(),attrs:{}}),ec=e=>typeof e=="string"&&e.toLowerCase()==="svg";function _2(e,t,n,r){const i=b.useMemo(()=>{const s=i0();return Ju(s,t,{enableHardwareAcceleration:!1},ec(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};n0(s,e.style,e),i.style={...s,...i.style}}return i}function A2(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(Qu(n)?_2:b2)(r,s,o,n),d={...E2(r,typeof n=="string",e),...l,ref:i},{children:f}=r,u=b.useMemo(()=>Ve(f)?f.get():f,[f]);return b.createElement(n,{...d,children:u})}}function s0(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const o0=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 a0(e,t,n,r){s0(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(o0.has(i)?i:Gu(i),t.attrs[i])}function tc(e,t){const{style:n}=e,r={};for(const i in n)(Ve(n[i])||t.style&&Ve(t.style[i])||Xm(i,e))&&(r[i]=n[i]);return r}function l0(e,t){const n=tc(e,t);for(const r in e)if(Ve(e[r])||Ve(t[r])){const i=zi.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}function nc(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}function L2(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const to=e=>Array.isArray(e),D2=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),R2=e=>to(e)?e[e.length-1]||0:e;function Cs(e){const t=Ve(e)?e.get():e;return D2(t)?t.toValue():t}function V2({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,s){const o={latestValues:F2(r,i,s,e),renderState:t()};return n&&(o.mount=a=>n(r,a,o)),o}const u0=e=>(t,n)=>{const r=b.useContext(No),i=b.useContext(qu),s=()=>V2(e,t,r,i);return n?s():L2(s)};function F2(e,t,n,r){const i={},s=r(e,{});for(const u in s)i[u]=Cs(s[u]);let{initial:o,animate:a}=e;const l=Lo(e),c=Ym(e);t&&c&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const f=d?a:o;return f&&typeof f!="boolean"&&!Ao(f)&&(Array.isArray(f)?f:[f]).forEach(h=>{const p=nc(e,h);if(!p)return;const{transitionEnd:m,transition:w,...y}=p;for(const v in y){let x=y[v];if(Array.isArray(x)){const S=d?x.length-1:0;x=x[S]}x!==null&&(i[v]=x)}for(const v in m)i[v]=m[v]}),i}const oe=e=>e;class $d{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function z2(e){let t=new $d,n=new $d,r=0,i=!1,s=!1;const o=new WeakSet,a={schedule:(l,c=!1,d=!1)=>{const f=d&&i,u=f?t:n;return c&&o.add(l),u.add(l)&&f&&i&&(r=t.order.length),l},cancel:l=>{n.remove(l),o.delete(l)},process:l=>{if(i){s=!0;return}if(i=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let c=0;c<r;c++){const d=t.order[c];d(l),o.has(d)&&(a.schedule(d),e())}i=!1,s&&(s=!1,a.process(l))}};return a}const ls=["prepare","read","update","preRender","render","postRender"],O2=40;function I2(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=ls.reduce((f,u)=>(f[u]=z2(()=>n=!0),f),{}),o=f=>s[f].process(i),a=()=>{const f=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(f-i.timestamp,O2),1),i.timestamp=f,i.isProcessing=!0,ls.forEach(o),i.isProcessing=!1,n&&t&&(r=!1,e(a))},l=()=>{n=!0,r=!0,i.isProcessing||e(a)};return{schedule:ls.reduce((f,u)=>{const h=s[u];return f[u]=(p,m=!1,w=!1)=>(n||l(),h.schedule(p,m,w)),f},{}),cancel:f=>ls.forEach(u=>s[u].cancel(f)),state:i,steps:s}}const{schedule:Q,cancel:Dt,state:Se,steps:fa}=I2(typeof requestAnimationFrame<"u"?requestAnimationFrame:oe,!0),$2={useVisualState:u0({scrapeMotionValuesFromProps:l0,createRenderState:i0,onMount:(e,t,{renderState:n,latestValues:r})=>{Q.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Q.render(()=>{Ju(n,r,{enableHardwareAcceleration:!1},ec(t.tagName),e.transformTemplate),a0(t,n)})}})},B2={useVisualState:u0({scrapeMotionValuesFromProps:tc,createRenderState:Zu})};function U2(e,{forwardMotionProps:t=!1},n,r){return{...Qu(e)?$2:B2,preloadedFeatures:n,useRender:A2(t),createVisualElement:r,Component:e}}function bt(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const c0=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Ro(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const W2=e=>t=>c0(t)&&e(t,Ro(t));function Ct(e,t,n,r){return bt(e,t,W2(n),r)}const H2=(e,t)=>n=>t(e(n)),on=(...e)=>e.reduce(H2);function d0(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Bd=d0("dragHorizontal"),Ud=d0("dragVertical");function f0(e){let t=!1;if(e==="y")t=Ud();else if(e==="x")t=Bd();else{const n=Bd(),r=Ud();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function h0(){const e=f0(!0);return e?(e(),!1):!0}class xn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Wd(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(s,o)=>{if(s.pointerType==="touch"||h0())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t),a[r]&&Q.update(()=>a[r](s,o))};return Ct(e.current,n,i,{passive:!e.getProps()[r]})}class q2 extends xn{mount(){this.unmount=on(Wd(this.node,!0),Wd(this.node,!1))}unmount(){}}class G2 extends xn{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=on(bt(this.node.current,"focus",()=>this.onFocus()),bt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const p0=(e,t)=>t?e===t?!0:p0(e,t.parentElement):!1;function ha(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Ro(n))}class Y2 extends xn{constructor(){super(...arguments),this.removeStartListeners=oe,this.removeEndListeners=oe,this.removeAccessibleListeners=oe,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),s=Ct(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:d,globalTapTarget:f}=this.node.getProps();Q.update(()=>{!f&&!p0(this.node.current,a.target)?d&&d(a,l):c&&c(a,l)})},{passive:!(r.onTap||r.onPointerUp)}),o=Ct(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=on(s,o),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=s=>{if(s.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||ha("up",(l,c)=>{const{onTap:d}=this.node.getProps();d&&Q.update(()=>d(l,c))})};this.removeEndListeners(),this.removeEndListeners=bt(this.node.current,"keyup",o),ha("down",(a,l)=>{this.startPress(a,l)})},n=bt(this.node.current,"keydown",t),r=()=>{this.isPressing&&ha("cancel",(s,o)=>this.cancelPress(s,o))},i=bt(this.node.current,"blur",r);this.removeAccessibleListeners=on(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Q.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!h0()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Q.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Ct(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=bt(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=on(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const _l=new WeakMap,pa=new WeakMap,K2=e=>{const t=_l.get(e.target);t&&t(e)},Q2=e=>{e.forEach(K2)};function X2({root:e,...t}){const n=e||document;pa.has(n)||pa.set(n,{});const r=pa.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Q2,{root:e,...t})),r[i]}function Z2(e,t,n){const r=X2(t);return _l.set(e,n),r.observe(e),()=>{_l.delete(e),r.unobserve(e)}}const J2={some:0,all:1};class ew extends xn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:J2[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),u=c?d:f;u&&u(l)};return Z2(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(tw(t,n))&&this.startObserver()}unmount(){}}function tw({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const nw={inView:{Feature:ew},tap:{Feature:Y2},focus:{Feature:G2},hover:{Feature:q2}};function m0(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 rw(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function iw(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function Vo(e,t,n){const r=e.getProps();return nc(r,t,n!==void 0?n:r.custom,rw(e),iw(e))}let rc=oe;const Dn=e=>e*1e3,Et=e=>e/1e3,sw={current:!1},g0=e=>Array.isArray(e)&&typeof e[0]=="number";function y0(e){return!!(!e||typeof e=="string"&&v0[e]||g0(e)||Array.isArray(e)&&e.every(y0))}const Gr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,v0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Gr([0,.65,.55,1]),circOut:Gr([.55,0,1,.45]),backIn:Gr([.31,.01,.66,-.59]),backOut:Gr([.33,1.53,.69,.99])};function x0(e){if(e)return g0(e)?Gr(e):Array.isArray(e)?e.map(x0):v0[e]}function ow(e,t,n,{delay:r=0,duration:i,repeat:s=0,repeatType:o="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const d=x0(a);return Array.isArray(d)&&(c.easing=d),e.animate(c,{delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}function aw(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const w0=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,lw=1e-7,uw=12;function cw(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=w0(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>lw&&++a<uw);return o}function $i(e,t,n,r){if(e===t&&n===r)return oe;const i=s=>cw(s,0,1,e,n);return s=>s===0||s===1?s:w0(i(s),t,r)}const dw=$i(.42,0,1,1),fw=$i(0,0,.58,1),S0=$i(.42,0,.58,1),hw=e=>Array.isArray(e)&&typeof e[0]!="number",k0=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,b0=e=>t=>1-e(1-t),ic=e=>1-Math.sin(Math.acos(e)),P0=b0(ic),pw=k0(ic),C0=$i(.33,1.53,.69,.99),sc=b0(C0),mw=k0(sc),gw=e=>(e*=2)<1?.5*sc(e):.5*(2-Math.pow(2,-10*(e-1))),yw={linear:oe,easeIn:dw,easeInOut:S0,easeOut:fw,circIn:ic,circInOut:pw,circOut:P0,backIn:sc,backInOut:mw,backOut:C0,anticipate:gw},Hd=e=>{if(Array.isArray(e)){rc(e.length===4);const[t,n,r,i]=e;return $i(t,n,r,i)}else if(typeof e=="string")return yw[e];return e},oc=(e,t)=>n=>!!(Oi(n)&&v2.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),E0=(e,t,n)=>r=>{if(!Oi(r))return r;const[i,s,o,a]=r.match(Do);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},vw=e=>cn(0,255,e),ma={...Un,transform:e=>Math.round(vw(e))},_n={test:oc("rgb","red"),parse:E0("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ma.transform(e)+", "+ma.transform(t)+", "+ma.transform(n)+", "+ii(ri.transform(r))+")"};function xw(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Al={test:oc("#"),parse:xw,transform:_n.transform},sr={test:oc("hsl","hue"),parse:E0("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+gt.transform(ii(t))+", "+gt.transform(ii(n))+", "+ii(ri.transform(r))+")"},Ce={test:e=>_n.test(e)||Al.test(e)||sr.test(e),parse:e=>_n.test(e)?_n.parse(e):sr.test(e)?sr.parse(e):Al.parse(e),transform:e=>Oi(e)?e:e.hasOwnProperty("red")?_n.transform(e):sr.transform(e)},te=(e,t,n)=>-n*e+n*t+e;function ga(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 ww({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,o=0;if(!t)i=s=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=ga(l,a,e+1/3),s=ga(l,a,e),o=ga(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}const ya=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},Sw=[Al,_n,sr],kw=e=>Sw.find(t=>t.test(e));function qd(e){const t=kw(e);let n=t.parse(e);return t===sr&&(n=ww(n)),n}const T0=(e,t)=>{const n=qd(e),r=qd(t),i={...n};return s=>(i.red=ya(n.red,r.red,s),i.green=ya(n.green,r.green,s),i.blue=ya(n.blue,r.blue,s),i.alpha=te(n.alpha,r.alpha,s),_n.transform(i))};function bw(e){var t,n;return isNaN(e)&&Oi(e)&&(((t=e.match(Do))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(e0))===null||n===void 0?void 0:n.length)||0)>0}const j0={regex:g2,countKey:"Vars",token:"${v}",parse:oe},M0={regex:e0,countKey:"Colors",token:"${c}",parse:Ce.parse},N0={regex:Do,countKey:"Numbers",token:"${n}",parse:Un.parse};function va(e,{regex:t,countKey:n,token:r,parse:i}){const s=e.tokenised.match(t);s&&(e["num"+n]=s.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...s.map(i)))}function no(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&va(n,j0),va(n,M0),va(n,N0),n}function _0(e){return no(e).values}function A0(e){const{values:t,numColors:n,numVars:r,tokenised:i}=no(e),s=t.length;return o=>{let a=i;for(let l=0;l<s;l++)l<r?a=a.replace(j0.token,o[l]):l<r+n?a=a.replace(M0.token,Ce.transform(o[l])):a=a.replace(N0.token,ii(o[l]));return a}}const Pw=e=>typeof e=="number"?0:e;function Cw(e){const t=_0(e);return A0(e)(t.map(Pw))}const dn={test:bw,parse:_0,createTransformer:A0,getAnimatableNone:Cw},L0=(e,t)=>n=>`${n>0?t:e}`;function D0(e,t){return typeof e=="number"?n=>te(e,t,n):Ce.test(e)?T0(e,t):e.startsWith("var(")?L0(e,t):V0(e,t)}const R0=(e,t)=>{const n=[...e],r=n.length,i=e.map((s,o)=>D0(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}},Ew=(e,t)=>{const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=D0(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}},V0=(e,t)=>{const n=dn.createTransformer(t),r=no(e),i=no(t);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?on(R0(r.values,i.values),n):L0(e,t)},Mi=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Gd=(e,t)=>n=>te(e,t,n);function Tw(e){return typeof e=="number"?Gd:typeof e=="string"?Ce.test(e)?T0:V0:Array.isArray(e)?R0:typeof e=="object"?Ew:Gd}function jw(e,t,n){const r=[],i=n||Tw(e[0]),s=e.length-1;for(let o=0;o<s;o++){let a=i(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||oe:t;a=on(l,a)}r.push(a)}return r}function F0(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(rc(s===t.length),s===1)return()=>t[0];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=jw(t,r,i),a=o.length,l=c=>{let d=0;if(a>1)for(;d<e.length-2&&!(c<e[d+1]);d++);const f=Mi(e[d],e[d+1],c);return o[d](f)};return n?c=>l(cn(e[0],e[s-1],c)):l}function Mw(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Mi(0,t,r);e.push(te(n,1,i))}}function Nw(e){const t=[0];return Mw(t,e.length-1),t}function _w(e,t){return e.map(n=>n*t)}function Aw(e,t){return e.map(()=>t||S0).splice(0,e.length-1)}function ro({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=hw(r)?r.map(Hd):Hd(r),s={done:!1,value:t[0]},o=_w(n&&n.length===t.length?n:Nw(t),e),a=F0(o,t,{ease:Array.isArray(i)?i:Aw(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}function z0(e,t){return t?e*(1e3/t):0}const Lw=5;function O0(e,t,n){const r=Math.max(t-Lw,0);return z0(n-e(r),t-r)}const xa=.001,Dw=.01,Rw=10,Vw=.05,Fw=1;function zw({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,s,o=1-t;o=cn(Vw,Fw,o),e=cn(Dw,Rw,Et(e)),o<1?(i=c=>{const d=c*o,f=d*e,u=d-n,h=Ll(c,o),p=Math.exp(-f);return xa-u/h*p},s=c=>{const f=c*o*e,u=f*n+n,h=Math.pow(o,2)*Math.pow(c,2)*e,p=Math.exp(-f),m=Ll(Math.pow(c,2),o);return(-i(c)+xa>0?-1:1)*((u-h)*p)/m}):(i=c=>{const d=Math.exp(-c*e),f=(c-n)*e+1;return-xa+d*f},s=c=>{const d=Math.exp(-c*e),f=(n-c)*(e*e);return d*f});const a=5/e,l=Iw(i,s,a);if(e=Dn(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const Ow=12;function Iw(e,t,n){let r=n;for(let i=1;i<Ow;i++)r=r-e(r)/t(r);return r}function Ll(e,t){return e*Math.sqrt(1-t*t)}const $w=["duration","bounce"],Bw=["stiffness","damping","mass"];function Yd(e,t){return t.some(n=>e[n]!==void 0)}function Uw(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Yd(e,Bw)&&Yd(e,$w)){const n=zw(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function I0({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],s=e[e.length-1],o={done:!1,value:i},{stiffness:a,damping:l,mass:c,duration:d,velocity:f,isResolvedFromDuration:u}=Uw({...r,velocity:-Et(r.velocity||0)}),h=f||0,p=l/(2*Math.sqrt(a*c)),m=s-i,w=Et(Math.sqrt(a/c)),y=Math.abs(m)<5;n||(n=y?.01:2),t||(t=y?.005:.5);let v;if(p<1){const x=Ll(w,p);v=S=>{const k=Math.exp(-p*w*S);return s-k*((h+p*w*m)/x*Math.sin(x*S)+m*Math.cos(x*S))}}else if(p===1)v=x=>s-Math.exp(-w*x)*(m+(h+w*m)*x);else{const x=w*Math.sqrt(p*p-1);v=S=>{const k=Math.exp(-p*w*S),P=Math.min(x*S,300);return s-k*((h+p*w*m)*Math.sinh(P)+x*m*Math.cosh(P))/x}}return{calculatedDuration:u&&d||null,next:x=>{const S=v(x);if(u)o.done=x>=d;else{let k=h;x!==0&&(p<1?k=O0(v,x,S):k=0);const P=Math.abs(k)<=n,C=Math.abs(s-S)<=t;o.done=P&&C}return o.value=o.done?s:S,o}}}function Kd({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:d}){const f=e[0],u={done:!1,value:f},h=E=>a!==void 0&&E<a||l!==void 0&&E>l,p=E=>a===void 0?l:l===void 0||Math.abs(a-E)<Math.abs(l-E)?a:l;let m=n*t;const w=f+m,y=o===void 0?w:o(w);y!==w&&(m=y-f);const v=E=>-m*Math.exp(-E/r),x=E=>y+v(E),S=E=>{const N=v(E),M=x(E);u.done=Math.abs(N)<=c,u.value=u.done?y:M};let k,P;const C=E=>{h(u.value)&&(k=E,P=I0({keyframes:[u.value,p(u.value)],velocity:O0(x,E,u.value),damping:i,stiffness:s,restDelta:c,restSpeed:d}))};return C(0),{calculatedDuration:null,next:E=>{let N=!1;return!P&&k===void 0&&(N=!0,S(E),C(E)),k!==void 0&&E>k?P.next(E-k):(!N&&S(E),u)}}}const Ww=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Q.update(t,!0),stop:()=>Dt(t),now:()=>Se.isProcessing?Se.timestamp:performance.now()}},Qd=2e4;function Xd(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Qd;)t+=n,r=e.next(t);return t>=Qd?1/0:t}const Hw={decay:Kd,inertia:Kd,tween:ro,keyframes:ro,spring:I0};function io({autoplay:e=!0,delay:t=0,driver:n=Ww,keyframes:r,type:i="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:a="loop",onPlay:l,onStop:c,onComplete:d,onUpdate:f,...u}){let h=1,p=!1,m,w;const y=()=>{w=new Promise(D=>{m=D})};y();let v;const x=Hw[i]||ro;let S;x!==ro&&typeof r[0]!="number"&&(S=F0([0,100],r,{clamp:!1}),r=[0,100]);const k=x({...u,keyframes:r});let P;a==="mirror"&&(P=x({...u,keyframes:[...r].reverse(),velocity:-(u.velocity||0)}));let C="idle",E=null,N=null,M=null;k.calculatedDuration===null&&s&&(k.calculatedDuration=Xd(k));const{calculatedDuration:I}=k;let A=1/0,B=1/0;I!==null&&(A=I+o,B=A*(s+1)-o);let L=0;const me=D=>{if(N===null)return;h>0&&(N=Math.min(N,D)),h<0&&(N=Math.min(D-B/h,N)),E!==null?L=E:L=Math.round(D-N)*h;const Z=L-t*(h>=0?1:-1),wn=h>=0?Z<0:Z>B;L=Math.max(Z,0),C==="finished"&&E===null&&(L=B);let ut=L,Wn=k;if(s){const zo=Math.min(L,B)/A;let Bi=Math.floor(zo),kn=zo%1;!kn&&zo>=1&&(kn=1),kn===1&&Bi--,Bi=Math.min(Bi,s+1),!!(Bi%2)&&(a==="reverse"?(kn=1-kn,o&&(kn-=o/A)):a==="mirror"&&(Wn=P)),ut=cn(0,1,kn)*A}const ze=wn?{done:!1,value:r[0]}:Wn.next(ut);S&&(ze.value=S(ze.value));let{done:Sn}=ze;!wn&&I!==null&&(Sn=h>=0?L>=B:L<=0);const Lg=E===null&&(C==="finished"||C==="running"&&Sn);return f&&f(ze.value),Lg&&j(),ze},H=()=>{v&&v.stop(),v=void 0},Pe=()=>{C="idle",H(),m(),y(),N=M=null},j=()=>{C="finished",d&&d(),H(),m()},R=()=>{if(p)return;v||(v=n(me));const D=v.now();l&&l(),E!==null?N=D-E:(!N||C==="finished")&&(N=D),C==="finished"&&y(),M=N,E=null,C="running",v.start()};e&&R();const z={then(D,Z){return w.then(D,Z)},get time(){return Et(L)},set time(D){D=Dn(D),L=D,E!==null||!v||h===0?E=D:N=v.now()-D/h},get duration(){const D=k.calculatedDuration===null?Xd(k):k.calculatedDuration;return Et(D)},get speed(){return h},set speed(D){D===h||!v||(h=D,z.time=Et(L))},get state(){return C},play:R,pause:()=>{C="paused",E=L},stop:()=>{p=!0,C!=="idle"&&(C="idle",c&&c(),Pe())},cancel:()=>{M!==null&&me(M),Pe()},complete:()=>{C="finished"},sample:D=>(N=0,me(D))};return z}function qw(e){let t;return()=>(t===void 0&&(t=e()),t)}const Gw=qw(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Yw=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),us=10,Kw=2e4,Qw=(e,t)=>t.type==="spring"||e==="backgroundColor"||!y0(t.ease);function Xw(e,t,{onUpdate:n,onComplete:r,...i}){if(!(Gw()&&Yw.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let o=!1,a,l,c=!1;const d=()=>{l=new Promise(x=>{a=x})};d();let{keyframes:f,duration:u=300,ease:h,times:p}=i;if(Qw(t,i)){const x=io({...i,repeat:0,delay:0});let S={done:!1,value:f[0]};const k=[];let P=0;for(;!S.done&&P<Kw;)S=x.sample(P),k.push(S.value),P+=us;p=void 0,f=k,u=P-us,h="linear"}const m=ow(e.owner.current,t,f,{...i,duration:u,ease:h,times:p}),w=()=>{c=!1,m.cancel()},y=()=>{c=!0,Q.update(w),a(),d()};return m.onfinish=()=>{c||(e.set(aw(f,i)),r&&r(),y())},{then(x,S){return l.then(x,S)},attachTimeline(x){return m.timeline=x,m.onfinish=null,oe},get time(){return Et(m.currentTime||0)},set time(x){m.currentTime=Dn(x)},get speed(){return m.playbackRate},set speed(x){m.playbackRate=x},get duration(){return Et(u)},play:()=>{o||(m.play(),Dt(w))},pause:()=>m.pause(),stop:()=>{if(o=!0,m.playState==="idle")return;const{currentTime:x}=m;if(x){const S=io({...i,autoplay:!1});e.setWithVelocity(S.sample(x-us).value,S.sample(x).value,us)}y()},complete:()=>{c||m.finish()},cancel:y}}function Zw({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const i=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:oe,pause:oe,stop:oe,then:s=>(s(),Promise.resolve()),cancel:oe,complete:oe});return t?io({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const Jw={type:"spring",stiffness:500,damping:25,restSpeed:10},e4=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),t4={type:"keyframes",duration:.8},n4={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},r4=(e,{keyframes:t})=>t.length>2?t4:Bn.has(e)?e.startsWith("scale")?e4(t[1]):Jw:n4,Dl=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(dn.test(t)||t==="0")&&!t.startsWith("url(")),i4=new Set(["brightness","contrast","saturate","opacity"]);function s4(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Do)||[];if(!r)return e;const i=n.replace(r,"");let s=i4.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const o4=/([a-z-]*)\(.*?\)/g,Rl={...dn,getAnimatableNone:e=>{const t=e.match(o4);return t?t.map(s4).join(" "):e}},a4={...t0,color:Ce,backgroundColor:Ce,outlineColor:Ce,fill:Ce,stroke:Ce,borderColor:Ce,borderTopColor:Ce,borderRightColor:Ce,borderBottomColor:Ce,borderLeftColor:Ce,filter:Rl,WebkitFilter:Rl},ac=e=>a4[e];function $0(e,t){let n=ac(e);return n!==Rl&&(n=dn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const B0=e=>/^0[^.\s]+$/.test(e);function l4(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||B0(e)}function u4(e,t,n,r){const i=Dl(t,n);let s;Array.isArray(n)?s=[...n]:s=[null,n];const o=r.from!==void 0?r.from:e.get();let a;const l=[];for(let c=0;c<s.length;c++)s[c]===null&&(s[c]=c===0?o:s[c-1]),l4(s[c])&&l.push(c),typeof s[c]=="string"&&s[c]!=="none"&&s[c]!=="0"&&(a=s[c]);if(i&&l.length&&a)for(let c=0;c<l.length;c++){const d=l[c];s[d]=$0(t,a)}return s}function c4({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:c,...d}){return!!Object.keys(d).length}function lc(e,t){return e[t]||e.default||e}const d4={skipAnimations:!1},uc=(e,t,n,r={})=>i=>{const s=lc(r,e)||{},o=s.delay||r.delay||0;let{elapsed:a=0}=r;a=a-Dn(o);const l=u4(t,e,n,s),c=l[0],d=l[l.length-1],f=Dl(e,c),u=Dl(e,d);let h={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...s,delay:-a,onUpdate:p=>{t.set(p),s.onUpdate&&s.onUpdate(p)},onComplete:()=>{i(),s.onComplete&&s.onComplete()}};if(c4(s)||(h={...h,...r4(e,h)}),h.duration&&(h.duration=Dn(h.duration)),h.repeatDelay&&(h.repeatDelay=Dn(h.repeatDelay)),!f||!u||sw.current||s.type===!1||d4.skipAnimations)return Zw(h);if(!r.isHandoff&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const p=Xw(t,e,h);if(p)return p}return io(h)};function so(e){return!!(Ve(e)&&e.add)}const U0=e=>/^\-?\d*\.?\d+$/.test(e);function cc(e,t){e.indexOf(t)===-1&&e.push(t)}function dc(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class fc{constructor(){this.subscriptions=[]}add(t){return cc(this.subscriptions,t),()=>dc(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;s<i;s++){const o=this.subscriptions[s];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const f4=e=>!isNaN(parseFloat(e));class h4{constructor(t,n={}){this.version="10.18.0",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{this.prev=this.current,this.current=r;const{delta:s,timestamp:o}=Se;this.lastUpdated!==o&&(this.timeDelta=s,this.lastUpdated=o,Q.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Q.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=f4(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new fc);const r=this.events[t].add(n);return t==="change"?()=>{r(),Q.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=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?z0(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}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 kr(e,t){return new h4(e,t)}const W0=e=>t=>t.test(e),p4={test:e=>e==="auto",parse:e=>e},H0=[Un,F,gt,It,w2,x2,p4],Or=e=>H0.find(W0(e)),m4=[...H0,Ce,dn],g4=e=>m4.find(W0(e));function y4(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,kr(n))}function v4(e,t){const n=Vo(e,t);let{transitionEnd:r={},transition:i={},...s}=n?e.makeTargetAnimatable(n,!1):{};s={...s,...r};for(const o in s){const a=R2(s[o]);y4(e,o,a)}}function x4(e,t,n){var r,i;const s=Object.keys(t).filter(a=>!e.hasValue(a)),o=s.length;if(o)for(let a=0;a<o;a++){const l=s[a],c=t[l];let d=null;Array.isArray(c)&&(d=c[0]),d===null&&(d=(i=(r=n[l])!==null&&r!==void 0?r:e.readValue(l))!==null&&i!==void 0?i:t[l]),d!=null&&(typeof d=="string"&&(U0(d)||B0(d))?d=parseFloat(d):!g4(d)&&dn.test(c)&&(d=$0(l,c)),e.addValue(l,kr(d,{owner:e})),n[l]===void 0&&(n[l]=d),d!==null&&e.setBaseTarget(l,d))}}function w4(e,t){return t?(t[e]||t.default||t).from:void 0}function S4(e,t,n){const r={};for(const i in e){const s=w4(i,t);if(s!==void 0)r[i]=s;else{const o=n.getValue(i);o&&(r[i]=o.get())}}return r}function k4({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function b4(e,t){const n=e.get();if(Array.isArray(t)){for(let r=0;r<t.length;r++)if(t[r]!==n)return!0}else return n!==t}function q0(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:o,...a}=e.makeTargetAnimatable(t);const l=e.getValue("willChange");r&&(s=r);const c=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const f in a){const u=e.getValue(f),h=a[f];if(!u||h===void 0||d&&k4(d,f))continue;const p={delay:n,elapsed:0,...lc(s||{},f)};if(window.HandoffAppearAnimations){const y=e.getProps()[Gm];if(y){const v=window.HandoffAppearAnimations(y,f,u,Q);v!==null&&(p.elapsed=v,p.isHandoff=!0)}}let m=!p.isHandoff&&!b4(u,h);if(p.type==="spring"&&(u.getVelocity()||p.velocity)&&(m=!1),u.animation&&(m=!1),m)continue;u.start(uc(f,u,h,e.shouldReduceMotion&&Bn.has(f)?{type:!1}:p));const w=u.animation;so(l)&&(l.add(f),w.then(()=>l.remove(f))),c.push(w)}return o&&Promise.all(c).then(()=>{o&&v4(e,o)}),c}function Vl(e,t,n={}){const r=Vo(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(q0(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=i;return P4(e,t,c+l,d,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,c]=a==="beforeChildren"?[s,o]:[o,s];return l().then(()=>c())}else return Promise.all([s(),o(n.delay)])}function P4(e,t,n=0,r=0,i=1,s){const o=[],a=(e.variantChildren.size-1)*r,l=i===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(C4).forEach((c,d)=>{c.notify("AnimationStart",t),o.push(Vl(c,t,{...s,delay:n+l(d)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(o)}function C4(e,t){return e.sortNodePosition(t)}function E4(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Vl(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Vl(e,t,n);else{const i=typeof t=="function"?Vo(e,t,n.custom):t;r=Promise.all(q0(e,i,n))}return r.then(()=>e.notify("AnimationComplete",t))}const T4=[...Yu].reverse(),j4=Yu.length;function M4(e){return t=>Promise.all(t.map(({animation:n,options:r})=>E4(e,n,r)))}function N4(e){let t=M4(e);const n=A4();let r=!0;const i=(l,c)=>{const d=Vo(e,c);if(d){const{transition:f,transitionEnd:u,...h}=d;l={...l,...h,...u}}return l};function s(l){t=l(e)}function o(l,c){const d=e.getProps(),f=e.getVariantContext(!0)||{},u=[],h=new Set;let p={},m=1/0;for(let y=0;y<j4;y++){const v=T4[y],x=n[v],S=d[v]!==void 0?d[v]:f[v],k=Ti(S),P=v===c?x.isActive:null;P===!1&&(m=y);let C=S===f[v]&&S!==d[v]&&k;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),x.protectedKeys={...p},!x.isActive&&P===null||!S&&!x.prevProp||Ao(S)||typeof S=="boolean")continue;let N=_4(x.prevProp,S)||v===c&&x.isActive&&!C&&k||y>m&&k,M=!1;const I=Array.isArray(S)?S:[S];let A=I.reduce(i,{});P===!1&&(A={});const{prevResolvedValues:B={}}=x,L={...B,...A},me=H=>{N=!0,h.has(H)&&(M=!0,h.delete(H)),x.needsAnimating[H]=!0};for(const H in L){const Pe=A[H],j=B[H];if(p.hasOwnProperty(H))continue;let R=!1;to(Pe)&&to(j)?R=!m0(Pe,j):R=Pe!==j,R?Pe!==void 0?me(H):h.add(H):Pe!==void 0&&h.has(H)?me(H):x.protectedKeys[H]=!0}x.prevProp=S,x.prevResolvedValues=A,x.isActive&&(p={...p,...A}),r&&e.blockInitialAnimation&&(N=!1),N&&(!C||M)&&u.push(...I.map(H=>({animation:H,options:{type:v,...l}})))}if(h.size){const y={};h.forEach(v=>{const x=e.getBaseTarget(v);x!==void 0&&(y[v]=x)}),u.push({animation:y})}let w=!!u.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(w=!1),r=!1,w?t(u):Promise.resolve()}function a(l,c,d){var f;if(n[l].isActive===c)return Promise.resolve();(f=e.variantChildren)===null||f===void 0||f.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(l,c)}),n[l].isActive=c;const u=o(d,l);for(const h in n)n[h].protectedKeys={};return u}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n}}function _4(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!m0(t,e):!1}function bn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function A4(){return{animate:bn(!0),whileInView:bn(),whileHover:bn(),whileTap:bn(),whileDrag:bn(),whileFocus:bn(),exit:bn()}}class L4 extends xn{constructor(t){super(t),t.animationState||(t.animationState=N4(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),Ao(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let D4=0;class R4 extends xn{constructor(){super(...arguments),this.id=D4++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const s=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&s.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const V4={animation:{Feature:L4},exit:{Feature:R4}},Zd=(e,t)=>Math.abs(e-t);function F4(e,t){const n=Zd(e.x,t.x),r=Zd(e.y,t.y);return Math.sqrt(n**2+r**2)}class G0{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Sa(this.lastMoveEventInfo,this.history),u=this.startEvent!==null,h=F4(f.offset,{x:0,y:0})>=3;if(!u&&!h)return;const{point:p}=f,{timestamp:m}=Se;this.history.push({...p,timestamp:m});const{onStart:w,onMove:y}=this.handlers;u||(w&&w(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,f)},this.handlePointerMove=(f,u)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=wa(u,this.transformPagePoint),Q.update(this.updatePoint,!0)},this.handlePointerUp=(f,u)=>{this.end();const{onEnd:h,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=Sa(f.type==="pointercancel"?this.lastMoveEventInfo:wa(u,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,w),p&&p(f,w)},!c0(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=Ro(t),a=wa(o,this.transformPagePoint),{point:l}=a,{timestamp:c}=Se;this.history=[{...l,timestamp:c}];const{onSessionStart:d}=n;d&&d(t,Sa(a,this.history)),this.removeListeners=on(Ct(this.contextWindow,"pointermove",this.handlePointerMove),Ct(this.contextWindow,"pointerup",this.handlePointerUp),Ct(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Dt(this.updatePoint)}}function wa(e,t){return t?{point:t(e.point)}:e}function Jd(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Sa({point:e},t){return{point:e,delta:Jd(e,Y0(t)),offset:Jd(e,z4(t)),velocity:O4(t,.1)}}function z4(e){return e[0]}function Y0(e){return e[e.length-1]}function O4(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Y0(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Dn(t)));)n--;if(!r)return{x:0,y:0};const s=Et(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Ue(e){return e.max-e.min}function Fl(e,t=0,n=.01){return Math.abs(e-t)<=n}function ef(e,t,n,r=.5){e.origin=r,e.originPoint=te(t.min,t.max,e.origin),e.scale=Ue(n)/Ue(t),(Fl(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=te(n.min,n.max,e.origin)-e.originPoint,(Fl(e.translate)||isNaN(e.translate))&&(e.translate=0)}function si(e,t,n,r){ef(e.x,t.x,n.x,r?r.originX:void 0),ef(e.y,t.y,n.y,r?r.originY:void 0)}function tf(e,t,n){e.min=n.min+t.min,e.max=e.min+Ue(t)}function I4(e,t,n){tf(e.x,t.x,n.x),tf(e.y,t.y,n.y)}function nf(e,t,n){e.min=t.min-n.min,e.max=e.min+Ue(t)}function oi(e,t,n){nf(e.x,t.x,n.x),nf(e.y,t.y,n.y)}function $4(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?te(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?te(n,e,r.max):Math.min(e,n)),e}function rf(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 B4(e,{top:t,left:n,bottom:r,right:i}){return{x:rf(e.x,n,i),y:rf(e.y,t,r)}}function sf(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 U4(e,t){return{x:sf(e.x,t.x),y:sf(e.y,t.y)}}function W4(e,t){let n=.5;const r=Ue(e),i=Ue(t);return i>r?n=Mi(t.min,t.max-r,e.min):r>i&&(n=Mi(e.min,e.max-i,t.min)),cn(0,1,n)}function H4(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 zl=.35;function q4(e=zl){return e===!1?e=0:e===!0&&(e=zl),{x:of(e,"left","right"),y:of(e,"top","bottom")}}function of(e,t,n){return{min:af(e,t),max:af(e,n)}}function af(e,t){return typeof e=="number"?e:e[t]||0}const lf=()=>({translate:0,scale:1,origin:0,originPoint:0}),or=()=>({x:lf(),y:lf()}),uf=()=>({min:0,max:0}),le=()=>({x:uf(),y:uf()});function Ge(e){return[e("x"),e("y")]}function K0({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function G4({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Y4(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 ka(e){return e===void 0||e===1}function Ol({scale:e,scaleX:t,scaleY:n}){return!ka(e)||!ka(t)||!ka(n)}function En(e){return Ol(e)||Q0(e)||e.z||e.rotate||e.rotateX||e.rotateY}function Q0(e){return cf(e.x)||cf(e.y)}function cf(e){return e&&e!=="0%"}function oo(e,t,n){const r=e-n,i=t*r;return n+i}function df(e,t,n,r,i){return i!==void 0&&(e=oo(e,i,r)),oo(e,n,r)+t}function Il(e,t=0,n=1,r,i){e.min=df(e.min,t,n,r,i),e.max=df(e.max,t,n,r,i)}function X0(e,{x:t,y:n}){Il(e.x,t.translate,t.scale,t.originPoint),Il(e.y,n.translate,n.scale,n.originPoint)}function K4(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let a=0;a<i;a++){s=n[a],o=s.projectionDelta;const l=s.instance;l&&l.style&&l.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&ar(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,X0(e,o)),r&&En(s.latestValues)&&ar(e,s.latestValues))}t.x=ff(t.x),t.y=ff(t.y)}function ff(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function Ut(e,t){e.min=e.min+t,e.max=e.max+t}function hf(e,t,[n,r,i]){const s=t[i]!==void 0?t[i]:.5,o=te(e.min,e.max,s);Il(e,t[n],t[r],o,t.scale)}const Q4=["x","scaleX","originX"],X4=["y","scaleY","originY"];function ar(e,t){hf(e.x,t,Q4),hf(e.y,t,X4)}function Z0(e,t){return K0(Y4(e.getBoundingClientRect(),t))}function Z4(e,t,n){const r=Z0(e,n),{scroll:i}=t;return i&&(Ut(r.x,i.offset.x),Ut(r.y,i.offset.y)),r}const J0=({current:e})=>e?e.ownerDocument.defaultView:null,J4=new WeakMap;class e3{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=le(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ro(d,"page").point)},s=(d,f)=>{const{drag:u,dragPropagation:h,onDragStart:p}=this.getProps();if(u&&!h&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=f0(u),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ge(w=>{let y=this.getAxisMotionValue(w).get()||0;if(gt.test(y)){const{projection:v}=this.visualElement;if(v&&v.layout){const x=v.layout.layoutBox[w];x&&(y=Ue(x)*(parseFloat(y)/100))}}this.originPoint[w]=y}),p&&Q.update(()=>p(d,f),!1,!0);const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},o=(d,f)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:w}=f;if(h&&this.currentDirection===null){this.currentDirection=t3(w),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,w),this.updateAxis("y",f.point,w),this.visualElement.render(),m&&m(d,f)},a=(d,f)=>this.stop(d,f),l=()=>Ge(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new G0(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:J0(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&Q.update(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!cs(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=$4(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&ir(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=B4(i.layoutBox,n):this.constraints=!1,this.elastic=q4(r),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Ge(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=H4(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ir(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=Z4(r,i.root,this.visualElement.getTransformPagePoint());let o=U4(i.layout.layoutBox,s);if(n){const a=n(G4(o));this.hasMutatedConstraints=!!a,a&&(o=K0(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Ge(d=>{if(!cs(d,n,this.currentDirection))return;let f=l&&l[d]||{};o&&(f={min:0,max:0});const u=i?200:1e6,h=i?40:1e7,p={type:"inertia",velocity:r?t[d]:0,bounceStiffness:u,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(d,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(uc(t,r,0,n))}stopAnimation(){Ge(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ge(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(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ge(n=>{const{drag:r}=this.getProps();if(!cs(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];s.set(t[n]-te(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ir(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ge(o=>{const a=this.getAxisMotionValue(o);if(a){const l=a.get();i[o]=W4({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ge(o=>{if(!cs(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(te(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;J4.set(this.visualElement,this);const t=this.visualElement.current,n=Ct(t,"pointerdown",l=>{const{drag:c,dragListener:d=!0}=this.getProps();c&&d&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();ir(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const o=bt(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Ge(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=l[d].translate,f.set(f.get()+l[d].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=zl,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function cs(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function t3(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class n3 extends xn{constructor(t){super(t),this.removeGroupControls=oe,this.removeListeners=oe,this.controls=new e3(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||oe}unmount(){this.removeGroupControls(),this.removeListeners()}}const pf=e=>(t,n)=>{e&&Q.update(()=>e(t,n))};class r3 extends xn{constructor(){super(...arguments),this.removePointerDownListener=oe}onPointerDown(t){this.session=new G0(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:J0(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:pf(t),onStart:pf(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&Q.update(()=>i(s,o))}}}mount(){this.removePointerDownListener=Ct(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function i3(){const e=b.useContext(qu);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=b.useId();return b.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}const Es={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function mf(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ir={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(F.test(e))e=parseFloat(e);else return e;const n=mf(e,t.target.x),r=mf(e,t.target.y);return`${n}% ${r}%`}},s3={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=dn.parse(e);if(i.length>5)return r;const s=dn.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const c=te(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),s(i)}};class o3 extends Ai.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;f2(a3),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Es.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,o=r.projection;return o&&(o.isPresent=s,i||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||Q.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function eg(e){const[t,n]=i3(),r=b.useContext(Km);return Ai.createElement(o3,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(Qm),isPresent:t,safeToRemove:n})}const a3={borderRadius:{...Ir,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ir,borderTopRightRadius:Ir,borderBottomLeftRadius:Ir,borderBottomRightRadius:Ir,boxShadow:s3},tg=["TopLeft","TopRight","BottomLeft","BottomRight"],l3=tg.length,gf=e=>typeof e=="string"?parseFloat(e):e,yf=e=>typeof e=="number"||F.test(e);function u3(e,t,n,r,i,s){i?(e.opacity=te(0,n.opacity!==void 0?n.opacity:1,c3(r)),e.opacityExit=te(t.opacity!==void 0?t.opacity:1,0,d3(r))):s&&(e.opacity=te(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;o<l3;o++){const a=`border${tg[o]}Radius`;let l=vf(t,a),c=vf(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||yf(l)===yf(c)?(e[a]=Math.max(te(gf(l),gf(c),r),0),(gt.test(c)||gt.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=te(t.rotate||0,n.rotate||0,r))}function vf(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const c3=ng(0,.5,P0),d3=ng(.5,.95,oe);function ng(e,t,n){return r=>r<e?0:r>t?1:n(Mi(e,t,r))}function xf(e,t){e.min=t.min,e.max=t.max}function qe(e,t){xf(e.x,t.x),xf(e.y,t.y)}function wf(e,t,n,r,i){return e-=t,e=oo(e,1/n,r),i!==void 0&&(e=oo(e,1/i,r)),e}function f3(e,t=0,n=1,r=.5,i,s=e,o=e){if(gt.test(t)&&(t=parseFloat(t),t=te(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=te(s.min,s.max,r);e===s&&(a-=t),e.min=wf(e.min,t,n,a,i),e.max=wf(e.max,t,n,a,i)}function Sf(e,t,[n,r,i],s,o){f3(e,t[n],t[r],t[i],t.scale,s,o)}const h3=["x","scaleX","originX"],p3=["y","scaleY","originY"];function kf(e,t,n,r){Sf(e.x,t,h3,n?n.x:void 0,r?r.x:void 0),Sf(e.y,t,p3,n?n.y:void 0,r?r.y:void 0)}function bf(e){return e.translate===0&&e.scale===1}function rg(e){return bf(e.x)&&bf(e.y)}function m3(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function ig(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function Pf(e){return Ue(e.x)/Ue(e.y)}class g3{constructor(){this.members=[]}add(t){cc(this.members,t),t.scheduleRender()}remove(t){if(dc(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Cf(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y;if((i||s)&&(r=`translate3d(${i}px, ${s}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:c,rotateY:d}=n;l&&(r+=`rotate(${l}deg) `),c&&(r+=`rotateX(${c}deg) `),d&&(r+=`rotateY(${d}deg) `)}const o=e.x.scale*t.x,a=e.y.scale*t.y;return(o!==1||a!==1)&&(r+=`scale(${o}, ${a})`),r||"none"}const y3=(e,t)=>e.depth-t.depth;class v3{constructor(){this.children=[],this.isDirty=!1}add(t){cc(this.children,t),this.isDirty=!0}remove(t){dc(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(y3),this.isDirty=!1,this.children.forEach(t)}}function x3(e,t){const n=performance.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(Dt(r),e(s-t))};return Q.read(r,!0),()=>Dt(r)}function w3(e){window.MotionDebug&&window.MotionDebug.record(e)}function S3(e){return e instanceof SVGElement&&e.tagName!=="svg"}function k3(e,t,n){const r=Ve(e)?e:kr(e);return r.start(uc("",r,t,n)),r.animation}const Ef=["","X","Y","Z"],b3={visibility:"hidden"},Tf=1e3;let P3=0;const Tn={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function sg({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=P3++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Tn.totalNodes=Tn.resolvedTargetDeltas=Tn.recalculatedProjection=0,this.nodes.forEach(T3),this.nodes.forEach(A3),this.nodes.forEach(L3),this.nodes.forEach(j3),w3(Tn)},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 v3)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new fc),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=S3(o),this.instance=o;const{layoutId:l,layout:c,visualElement:d}=this.options;if(d&&!d.current&&d.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let f;const u=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=x3(u,250),Es.hasAnimatedSinceResize&&(Es.hasAnimatedSinceResize=!1,this.nodes.forEach(Mf))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:u,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||d.getDefaultTransition()||z3,{onLayoutAnimationStart:w,onLayoutAnimationComplete:y}=d.getProps(),v=!this.targetLayout||!ig(this.targetLayout,p)||h,x=!u&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||x||u&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,x);const S={...lc(m,"layout"),onPlay:w,onComplete:y};(d.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else u||Mf(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}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,Dt(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(D3),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(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];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 c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(jf);return}this.isUpdating||this.nodes.forEach(N3),this.isUpdating=!1,this.nodes.forEach(_3),this.nodes.forEach(C3),this.nodes.forEach(E3),this.clearAllSnapshots();const a=performance.now();Se.delta=cn(0,1e3/60,a-Se.timestamp),Se.timestamp=a,Se.isProcessing=!0,fa.update.process(Se),fa.preRender.process(Se),fa.render.process(Se),Se.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(M3),this.sharedNodes.forEach(R3)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Q.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Q.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=le(),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);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:o,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform,a=this.projectionDelta&&!rg(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,d=c!==this.prevTransformTemplateValue;o&&(a||En(this.latestValues)||d)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),O3(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return le();const a=o.measureViewportBox(),{scroll:l}=this.root;return l&&(Ut(a.x,l.offset.x),Ut(a.y,l.offset.y)),a}removeElementScroll(o){const a=le();qe(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:d,options:f}=c;if(c!==this.root&&d&&f.layoutScroll){if(d.isRoot){qe(a,o);const{scroll:u}=this.root;u&&(Ut(a.x,-u.offset.x),Ut(a.y,-u.offset.y))}Ut(a.x,d.offset.x),Ut(a.y,d.offset.y)}}return a}applyTransform(o,a=!1){const l=le();qe(l,o);for(let c=0;c<this.path.length;c++){const d=this.path[c];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&ar(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),En(d.latestValues)&&ar(l,d.latestValues)}return En(this.latestValues)&&ar(l,this.latestValues),l}removeTransform(o){const a=le();qe(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!En(c.latestValues))continue;Ol(c.latestValues)&&c.updateSnapshot();const d=le(),f=c.measurePageBox();qe(d,f),kf(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,d)}return En(this.latestValues)&&kf(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!==Se.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 c=!!this.resumingFrom||this!==l;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:f,layoutId:u}=this.options;if(!(!this.layout||!(f||u))){if(this.resolvedRelativeTargetAt=Se.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=le(),this.relativeTargetOrigin=le(),oi(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),qe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=le(),this.targetWithTransforms=le()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),I4(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):qe(this.target,this.layout.layoutBox),X0(this.target,this.targetDelta)):qe(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=le(),this.relativeTargetOrigin=le(),oi(this.relativeTargetOrigin,this.target,h.target),qe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Tn.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Ol(this.parent.latestValues)||Q0(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 c=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Se.timestamp&&(c=!1),c)return;const{layout:d,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||!(d||f))return;qe(this.layoutCorrected,this.layout.layoutBox);const u=this.treeScale.x,h=this.treeScale.y;K4(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox);const{target:p}=a;if(!p){this.projectionTransform&&(this.projectionDelta=or(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=or(),this.projectionDeltaWithTransform=or());const m=this.projectionTransform;si(this.projectionDelta,this.layoutCorrected,p,this.latestValues),this.projectionTransform=Cf(this.projectionDelta,this.treeScale),(this.projectionTransform!==m||this.treeScale.x!==u||this.treeScale.y!==h)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),Tn.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},d={...this.latestValues},f=or();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const u=le(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=h!==p,w=this.getStack(),y=!w||w.members.length<=1,v=!!(m&&!y&&this.options.crossfade===!0&&!this.path.some(F3));this.animationProgress=0;let x;this.mixTargetDelta=S=>{const k=S/1e3;Nf(f.x,o.x,k),Nf(f.y,o.y,k),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(oi(u,this.layout.layoutBox,this.relativeParent.layout.layoutBox),V3(this.relativeTarget,this.relativeTargetOrigin,u,k),x&&m3(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=le()),qe(x,this.relativeTarget)),m&&(this.animationValues=d,u3(d,c,this.latestValues,k,v,y)),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&&(Dt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Q.update(()=>{Es.hasAnimatedSinceResize=!0,this.currentAnimation=k3(0,Tf,{...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(Tf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:d}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&og(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||le();const f=Ue(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+f;const u=Ue(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+u}qe(a,l),ar(a,d),si(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new g3),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var 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 c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const c={};for(let d=0;d<Ef.length;d++){const f="rotate"+Ef[d];l[f]&&(c[f]=l[f],o.setStaticValue(f,0))}o.render();for(const d in c)o.setStaticValue(d,c[d]);o.scheduleRender()}getProjectionStyles(o){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return b3;const c={visibility:""},d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Cs(o==null?void 0:o.pointerEvents)||"",c.transform=d?d(this.latestValues,""):"none",c;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=Cs(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!En(this.latestValues)&&(m.transform=d?d({},""):"none",this.hasProjected=!1),m}const u=f.animationValues||f.latestValues;this.applyTransformsToTarget(),c.transform=Cf(this.projectionDeltaWithTransform,this.treeScale,u),d&&(c.transform=d(u,c.transform));const{x:h,y:p}=this.projectionDelta;c.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,f.animationValues?c.opacity=f===this?(l=(a=u.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:c.opacity=f===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const m in Js){if(u[m]===void 0)continue;const{correct:w,applyTo:y}=Js[m],v=c.transform==="none"?u[m]:w(u[m],f);if(y){const x=y.length;for(let S=0;S<x;S++)c[y[S]]=v}else c[m]=v}return this.options.layoutId&&(c.pointerEvents=f===this?Cs(o==null?void 0:o.pointerEvents)||"":"none"),c}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(jf),this.root.sharedNodes.clear()}}}function C3(e){e.updateLayout()}function E3(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:i}=e.layout,{animationType:s}=e.options,o=n.source!==e.layout.source;s==="size"?Ge(f=>{const u=o?n.measuredBox[f]:n.layoutBox[f],h=Ue(u);u.min=r[f].min,u.max=u.min+h}):og(s,n.layoutBox,r)&&Ge(f=>{const u=o?n.measuredBox[f]:n.layoutBox[f],h=Ue(r[f]);u.max=u.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+h)});const a=or();si(a,r,n.layoutBox);const l=or();o?si(l,e.applyTransform(i,!0),n.measuredBox):si(l,r,n.layoutBox);const c=!rg(a);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:u,layout:h}=f;if(u&&h){const p=le();oi(p,n.layoutBox,u.layoutBox);const m=le();oi(m,r,h.layoutBox),ig(p,m)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function T3(e){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 j3(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function M3(e){e.clearSnapshot()}function jf(e){e.clearMeasurements()}function N3(e){e.isLayoutDirty=!1}function _3(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Mf(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function A3(e){e.resolveTargetDelta()}function L3(e){e.calcProjection()}function D3(e){e.resetRotation()}function R3(e){e.removeLeadSnapshot()}function Nf(e,t,n){e.translate=te(t.translate,0,n),e.scale=te(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function _f(e,t,n,r){e.min=te(t.min,n.min,r),e.max=te(t.max,n.max,r)}function V3(e,t,n,r){_f(e.x,t.x,n.x,r),_f(e.y,t.y,n.y,r)}function F3(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const z3={duration:.45,ease:[.4,0,.1,1]},Af=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),Lf=Af("applewebkit/")&&!Af("chrome/")?Math.round:oe;function Df(e){e.min=Lf(e.min),e.max=Lf(e.max)}function O3(e){Df(e.x),Df(e.y)}function og(e,t,n){return e==="position"||e==="preserve-aspect"&&!Fl(Pf(t),Pf(n),.2)}const I3=sg({attachResizeListener:(e,t)=>bt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ba={current:void 0},ag=sg({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ba.current){const e=new I3({});e.mount(window),e.setOptions({layoutScroll:!0}),ba.current=e}return ba.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),$3={pan:{Feature:r3},drag:{Feature:n3,ProjectionNode:ag,MeasureLayout:eg}},B3=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function U3(e){const t=B3.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function $l(e,t,n=1){const[r,i]=U3(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return U0(o)?parseFloat(o):o}else return Nl(i)?$l(i,t,n+1):i}function W3(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const s=i.get();if(!Nl(s))return;const o=$l(s,r);o&&i.set(o)});for(const i in t){const s=t[i];if(!Nl(s))continue;const o=$l(s,r);o&&(t[i]=o,n||(n={}),n[i]===void 0&&(n[i]=s))}return{target:t,transitionEnd:n}}const H3=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),lg=e=>H3.has(e),q3=e=>Object.keys(e).some(lg),Rf=e=>e===Un||e===F,Vf=(e,t)=>parseFloat(e.split(", ")[t]),Ff=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return Vf(i[1],t);{const s=r.match(/^matrix\((.+)\)$/);return s?Vf(s[1],e):0}},G3=new Set(["x","y","z"]),Y3=zi.filter(e=>!G3.has(e));function K3(e){const t=[];return Y3.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const br={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:Ff(4,13),y:Ff(5,14)};br.translateX=br.x;br.translateY=br.y;const Q3=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,s=getComputedStyle(i),{display:o}=s,a={};o==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(c=>{a[c]=br[c](r,s)}),t.render();const l=t.measureViewportBox();return n.forEach(c=>{const d=t.getValue(c);d&&d.jump(a[c]),e[c]=br[c](l,s)}),e},X3=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(lg);let s=[],o=!1;const a=[];if(i.forEach(l=>{const c=e.getValue(l);if(!e.hasValue(l))return;let d=n[l],f=Or(d);const u=t[l];let h;if(to(u)){const p=u.length,m=u[0]===null?1:0;d=u[m],f=Or(d);for(let w=m;w<p&&u[w]!==null;w++)h?rc(Or(u[w])===h):h=Or(u[w])}else h=Or(u);if(f!==h)if(Rf(f)&&Rf(h)){const p=c.get();typeof p=="string"&&c.set(parseFloat(p)),typeof u=="string"?t[l]=parseFloat(u):Array.isArray(u)&&h===F&&(t[l]=u.map(parseFloat))}else f!=null&&f.transform&&(h!=null&&h.transform)&&(d===0||u===0)?d===0?c.set(h.transform(d)):t[l]=f.transform(u):(o||(s=K3(e),o=!0),a.push(l),r[l]=r[l]!==void 0?r[l]:t[l],c.jump(u))}),a.length){const l=a.indexOf("height")>=0?window.pageYOffset:null,c=Q3(t,e,a);return s.length&&s.forEach(([d,f])=>{e.getValue(d).set(f)}),e.render(),_o&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Z3(e,t,n,r){return q3(t)?X3(e,t,n,r):{target:t,transitionEnd:r}}const J3=(e,t,n,r)=>{const i=W3(e,t,r);return t=i.target,r=i.transitionEnd,Z3(e,t,n,r)},Bl={current:null},ug={current:!1};function eS(){if(ug.current=!0,!!_o)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Bl.current=e.matches;e.addListener(t),t()}else Bl.current=!1}function tS(e,t,n){const{willChange:r}=t;for(const i in t){const s=t[i],o=n[i];if(Ve(s))e.addValue(i,s),so(r)&&r.add(i);else if(Ve(o))e.addValue(i,kr(s,{owner:e})),so(r)&&r.remove(i);else if(o!==s)if(e.hasValue(i)){const a=e.getValue(i);!a.hasAnimated&&a.set(s)}else{const a=e.getStaticValue(i);e.addValue(i,kr(a!==void 0?a:s,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const zf=new WeakMap,cg=Object.keys(ji),nS=cg.length,Of=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],rS=Ku.length;class iS{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Q.render(this.render,!1,!0);const{latestValues:a,renderState:l}=s;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.isControllingVariants=Lo(n),this.isVariantNode=Ym(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{});for(const f in d){const u=d[f];a[f]!==void 0&&Ve(u)&&(u.set(a[f],!1),so(c)&&c.add(f))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,zf.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)),ug.current||eS(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Bl.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){zf.delete(this.current),this.projection&&this.projection.unmount(),Dt(this.notifyUpdate),Dt(this.render),this.valueSubscriptions.forEach(t=>t()),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)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=Bn.has(t),i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Q.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),s()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,s){let o,a;for(let l=0;l<nS;l++){const c=cg[l],{isEnabled:d,Feature:f,ProjectionNode:u,MeasureLayout:h}=ji[c];u&&(o=u),d(n)&&(!this.features[c]&&f&&(this.features[c]=new f(this)),h&&(a=h))}if((this.type==="html"||this.type==="svg")&&!this.projection&&o){this.projection=new o(this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:c,drag:d,dragConstraints:f,layoutScroll:u,layoutRoot:h}=n;this.projection.setOptions({layoutId:l,layout:c,alwaysMeasureLayout:!!d||f&&ir(f),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof c=="string"?c:"both",initialPromotionConfig:s,layoutScroll:u,layoutRoot:h})}return a}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):le()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,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<Of.length;r++){const i=Of[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s=t["on"+i];s&&(this.propEventSubscriptions[i]=this.on(i,s))}this.prevMotionValues=tS(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}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}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<rS;r++){const i=Ku[r],s=this.props[i];(Ti(s)||s===!1)&&(n[i]=s)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(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=kr(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=nc(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Ve(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new fc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class dg extends iS{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]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},s){let o=S4(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),o&&(o=i(o))),s){x4(this,r,o);const a=J3(this,r,o,n);n=a.transitionEnd,r=a.target}return{transition:t,transitionEnd:n,...r}}}function sS(e){return window.getComputedStyle(e)}class oS extends dg{constructor(){super(...arguments),this.type="html"}readValueFromInstance(t,n){if(Bn.has(n)){const r=ac(n);return r&&r.default||0}else{const r=sS(t),i=(Jm(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Z0(t,n)}build(t,n,r,i){Xu(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n){return tc(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ve(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){s0(t,n,r,i)}}class aS extends dg{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Bn.has(n)){const r=ac(n);return r&&r.default||0}return n=o0.has(n)?n:Gu(n),t.getAttribute(n)}measureInstanceViewportBox(){return le()}scrapeMotionValuesFromProps(t,n){return l0(t,n)}build(t,n,r,i){Ju(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){a0(t,n,r,i)}mount(t){this.isSVGTag=ec(t.tagName),super.mount(t)}}const lS=(e,t)=>Qu(e)?new aS(t,{enableHardwareAcceleration:!1}):new oS(t,{enableHardwareAcceleration:!0}),uS={layout:{ProjectionNode:ag,MeasureLayout:eg}},cS={...V4,...nw,...$3,...uS},V=c2((e,t)=>U2(e,t,cS,lS)),dS={},If=e=>{let t;const n=new Set,r=(d,f)=>{const u=typeof d=="function"?d(t):d;if(!Object.is(u,t)){const h=t;t=f??(typeof u!="object"||u===null)?u:Object.assign({},t,u),n.forEach(p=>p(t,h))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>c,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(dS?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},c=t=e(r,i,l);return l},fS=e=>e?If(e):If;var fg={exports:{}},hg={},pg={exports:{}},mg={};/**
|
|
* @license React
|
|
* use-sync-external-store-shim.production.js
|
|
*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/var Pr=b;function hS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pS=typeof Object.is=="function"?Object.is:hS,mS=Pr.useState,gS=Pr.useEffect,yS=Pr.useLayoutEffect,vS=Pr.useDebugValue;function xS(e,t){var n=t(),r=mS({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return yS(function(){i.value=n,i.getSnapshot=t,Pa(i)&&s({inst:i})},[e,n,t]),gS(function(){return Pa(i)&&s({inst:i}),e(function(){Pa(i)&&s({inst:i})})},[e]),vS(n),n}function Pa(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!pS(e,n)}catch{return!0}}function wS(e,t){return t()}var SS=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?wS:xS;mg.useSyncExternalStore=Pr.useSyncExternalStore!==void 0?Pr.useSyncExternalStore:SS;pg.exports=mg;var kS=pg.exports;/**
|
|
* @license React
|
|
* use-sync-external-store-shim/with-selector.production.js
|
|
*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/var Fo=b,bS=kS;function PS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var CS=typeof Object.is=="function"?Object.is:PS,ES=bS.useSyncExternalStore,TS=Fo.useRef,jS=Fo.useEffect,MS=Fo.useMemo,NS=Fo.useDebugValue;hg.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=TS(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=MS(function(){function l(h){if(!c){if(c=!0,d=h,h=r(h),i!==void 0&&o.hasValue){var p=o.value;if(i(p,h))return f=p}return f=h}if(p=f,CS(d,h))return p;var m=r(h);return i!==void 0&&i(p,m)?(d=h,p):(d=h,f=m)}var c=!1,d,f,u=n===void 0?null:n;return[function(){return l(t())},u===null?void 0:function(){return l(u())}]},[t,n,r,i]);var a=ES(e,s[0],s[1]);return jS(function(){o.hasValue=!0,o.value=a},[a]),NS(a),a};fg.exports=hg;var _S=fg.exports;const AS=ql(_S),gg={},{useDebugValue:LS}=Ai,{useSyncExternalStoreWithSelector:DS}=AS;let $f=!1;const RS=e=>e;function VS(e,t=RS,n){(gg?"production":void 0)!=="production"&&n&&!$f&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),$f=!0);const r=DS(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return LS(r),r}const Bf=e=>{(gg?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?fS(e):e,n=(r,i)=>VS(t,r,i);return Object.assign(n,t),n},FS=e=>e?Bf(e):Bf,Uf={currentUser:null,partnerUser:null,isLoading:!1,error:null,currentTrack:null,isPlaying:!1},Tt=FS((e,t)=>({...Uf,mixedPlaylists:[],memoryLane:[],setCurrentUser:n=>e({currentUser:n}),setPartnerUser:n=>e({partnerUser:n}),logout:()=>e({currentUser:null,partnerUser:null,currentTrack:null,isPlaying:!1,mixedPlaylists:[],memoryLane:[],error:null}),setLoading:n=>e({isLoading:n}),setError:n=>e({error:n}),setCurrentTrack:n=>e({currentTrack:n}),setIsPlaying:n=>e({isPlaying:n}),addMixedPlaylist:n=>e(r=>({mixedPlaylists:[...r.mixedPlaylists,n]})),removeMixedPlaylist:n=>e(r=>({mixedPlaylists:r.mixedPlaylists.filter(i=>i.id!==n)})),addMemoryLaneItem:n=>e(r=>({memoryLane:[...r.memoryLane,n].sort((i,s)=>new Date(s.date).getTime()-new Date(i.date).getTime())})),removeMemoryLaneItem:n=>e(r=>({memoryLane:r.memoryLane.filter(i=>i.id!==n)})),clearAllData:()=>e({...Uf,mixedPlaylists:[],memoryLane:[]})}));function ai(e){let t=e[0],n=e[1],r=e[2];return Math.sqrt(t*t+n*n+r*r)}function Ul(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function zS(e,t,n,r){return e[0]=t,e[1]=n,e[2]=r,e}function Wf(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}function Hf(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}function OS(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e}function IS(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e}function Ca(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function $S(e,t){let n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(n*n+r*r+i*i)}function BS(e,t){let n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return n*n+r*r+i*i}function qf(e){let t=e[0],n=e[1],r=e[2];return t*t+n*n+r*r}function US(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function WS(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function Wl(e,t){let n=t[0],r=t[1],i=t[2],s=n*n+r*r+i*i;return s>0&&(s=1/Math.sqrt(s)),e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s,e}function yg(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Gf(e,t,n){let r=t[0],i=t[1],s=t[2],o=n[0],a=n[1],l=n[2];return e[0]=i*l-s*a,e[1]=s*o-r*l,e[2]=r*a-i*o,e}function HS(e,t,n,r){let i=t[0],s=t[1],o=t[2];return e[0]=i+r*(n[0]-i),e[1]=s+r*(n[1]-s),e[2]=o+r*(n[2]-o),e}function qS(e,t,n,r,i){const s=Math.exp(-r*i);let o=t[0],a=t[1],l=t[2];return e[0]=n[0]+(o-n[0])*s,e[1]=n[1]+(a-n[1])*s,e[2]=n[2]+(l-n[2])*s,e}function GS(e,t,n){let r=t[0],i=t[1],s=t[2],o=n[3]*r+n[7]*i+n[11]*s+n[15];return o=o||1,e[0]=(n[0]*r+n[4]*i+n[8]*s+n[12])/o,e[1]=(n[1]*r+n[5]*i+n[9]*s+n[13])/o,e[2]=(n[2]*r+n[6]*i+n[10]*s+n[14])/o,e}function YS(e,t,n){let r=t[0],i=t[1],s=t[2],o=n[3]*r+n[7]*i+n[11]*s+n[15];return o=o||1,e[0]=(n[0]*r+n[4]*i+n[8]*s)/o,e[1]=(n[1]*r+n[5]*i+n[9]*s)/o,e[2]=(n[2]*r+n[6]*i+n[10]*s)/o,e}function KS(e,t,n){let r=t[0],i=t[1],s=t[2];return e[0]=r*n[0]+i*n[3]+s*n[6],e[1]=r*n[1]+i*n[4]+s*n[7],e[2]=r*n[2]+i*n[5]+s*n[8],e}function QS(e,t,n){let r=t[0],i=t[1],s=t[2],o=n[0],a=n[1],l=n[2],c=n[3],d=a*s-l*i,f=l*r-o*s,u=o*i-a*r,h=a*u-l*f,p=l*d-o*u,m=o*f-a*d,w=c*2;return d*=w,f*=w,u*=w,h*=2,p*=2,m*=2,e[0]=r+d+h,e[1]=i+f+p,e[2]=s+u+m,e}const XS=function(){const e=[0,0,0],t=[0,0,0];return function(n,r){Ul(e,n),Ul(t,r),Wl(e,e),Wl(t,t);let i=yg(e,t);return i>1?0:i<-1?Math.PI:Math.acos(i)}}();function ZS(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}class st extends Array{constructor(t=0,n=t,r=t){return super(t,n,r),this}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}set x(t){this[0]=t}set y(t){this[1]=t}set z(t){this[2]=t}set(t,n=t,r=t){return t.length?this.copy(t):(zS(this,t,n,r),this)}copy(t){return Ul(this,t),this}add(t,n){return n?Wf(this,t,n):Wf(this,this,t),this}sub(t,n){return n?Hf(this,t,n):Hf(this,this,t),this}multiply(t){return t.length?OS(this,this,t):Ca(this,this,t),this}divide(t){return t.length?IS(this,this,t):Ca(this,this,1/t),this}inverse(t=this){return WS(this,t),this}len(){return ai(this)}distance(t){return t?$S(this,t):ai(this)}squaredLen(){return qf(this)}squaredDistance(t){return t?BS(this,t):qf(this)}negate(t=this){return US(this,t),this}cross(t,n){return n?Gf(this,t,n):Gf(this,this,t),this}scale(t){return Ca(this,this,t),this}normalize(){return Wl(this,this),this}dot(t){return yg(this,t)}equals(t){return ZS(this,t)}applyMatrix3(t){return KS(this,this,t),this}applyMatrix4(t){return GS(this,this,t),this}scaleRotateMatrix4(t){return YS(this,this,t),this}applyQuaternion(t){return QS(this,this,t),this}angle(t){return XS(this,t)}lerp(t,n){return HS(this,this,t,n),this}smoothLerp(t,n,r){return qS(this,this,t,n,r),this}clone(){return new st(this[0],this[1],this[2])}fromArray(t,n=0){return this[0]=t[n],this[1]=t[n+1],this[2]=t[n+2],this}toArray(t=[],n=0){return t[n]=this[0],t[n+1]=this[1],t[n+2]=this[2],t}transformDirection(t){const n=this[0],r=this[1],i=this[2];return this[0]=t[0]*n+t[4]*r+t[8]*i,this[1]=t[1]*n+t[5]*r+t[9]*i,this[2]=t[2]*n+t[6]*r+t[10]*i,this.normalize()}}const Yf=new st;let JS=1,e5=1,Kf=!1;class t5{constructor(t,n={}){t.canvas||console.error("gl not passed as first argument to Geometry"),this.gl=t,this.attributes=n,this.id=JS++,this.VAOs={},this.drawRange={start:0,count:0},this.instancedCount=0,this.gl.renderer.bindVertexArray(null),this.gl.renderer.currentGeometry=null,this.glState=this.gl.renderer.state;for(let r in n)this.addAttribute(r,n[r])}addAttribute(t,n){if(this.attributes[t]=n,n.id=e5++,n.size=n.size||1,n.type=n.type||(n.data.constructor===Float32Array?this.gl.FLOAT:n.data.constructor===Uint16Array?this.gl.UNSIGNED_SHORT:this.gl.UNSIGNED_INT),n.target=t==="index"?this.gl.ELEMENT_ARRAY_BUFFER:this.gl.ARRAY_BUFFER,n.normalized=n.normalized||!1,n.stride=n.stride||0,n.offset=n.offset||0,n.count=n.count||(n.stride?n.data.byteLength/n.stride:n.data.length/n.size),n.divisor=n.instanced||0,n.needsUpdate=!1,n.usage=n.usage||this.gl.STATIC_DRAW,n.buffer||this.updateAttribute(n),n.divisor){if(this.isInstanced=!0,this.instancedCount&&this.instancedCount!==n.count*n.divisor)return console.warn("geometry has multiple instanced buffers of different length"),this.instancedCount=Math.min(this.instancedCount,n.count*n.divisor);this.instancedCount=n.count*n.divisor}else t==="index"?this.drawRange.count=n.count:this.attributes.index||(this.drawRange.count=Math.max(this.drawRange.count,n.count))}updateAttribute(t){const n=!t.buffer;n&&(t.buffer=this.gl.createBuffer()),this.glState.boundBuffer!==t.buffer&&(this.gl.bindBuffer(t.target,t.buffer),this.glState.boundBuffer=t.buffer),n?this.gl.bufferData(t.target,t.data,t.usage):this.gl.bufferSubData(t.target,0,t.data),t.needsUpdate=!1}setIndex(t){this.addAttribute("index",t)}setDrawRange(t,n){this.drawRange.start=t,this.drawRange.count=n}setInstancedCount(t){this.instancedCount=t}createVAO(t){this.VAOs[t.attributeOrder]=this.gl.renderer.createVertexArray(),this.gl.renderer.bindVertexArray(this.VAOs[t.attributeOrder]),this.bindAttributes(t)}bindAttributes(t){t.attributeLocations.forEach((n,{name:r,type:i})=>{if(!this.attributes[r]){console.warn(`active attribute ${r} not being supplied`);return}const s=this.attributes[r];this.gl.bindBuffer(s.target,s.buffer),this.glState.boundBuffer=s.buffer;let o=1;i===35674&&(o=2),i===35675&&(o=3),i===35676&&(o=4);const a=s.size/o,l=o===1?0:o*o*4,c=o===1?0:o*4;for(let d=0;d<o;d++)this.gl.vertexAttribPointer(n+d,a,s.type,s.normalized,s.stride+l,s.offset+d*c),this.gl.enableVertexAttribArray(n+d),this.gl.renderer.vertexAttribDivisor(n+d,s.divisor)}),this.attributes.index&&this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.attributes.index.buffer)}draw({program:t,mode:n=this.gl.TRIANGLES}){var i;this.gl.renderer.currentGeometry!==`${this.id}_${t.attributeOrder}`&&(this.VAOs[t.attributeOrder]||this.createVAO(t),this.gl.renderer.bindVertexArray(this.VAOs[t.attributeOrder]),this.gl.renderer.currentGeometry=`${this.id}_${t.attributeOrder}`),t.attributeLocations.forEach((s,{name:o})=>{const a=this.attributes[o];a.needsUpdate&&this.updateAttribute(a)});let r=2;((i=this.attributes.index)==null?void 0:i.type)===this.gl.UNSIGNED_INT&&(r=4),this.isInstanced?this.attributes.index?this.gl.renderer.drawElementsInstanced(n,this.drawRange.count,this.attributes.index.type,this.attributes.index.offset+this.drawRange.start*r,this.instancedCount):this.gl.renderer.drawArraysInstanced(n,this.drawRange.start,this.drawRange.count,this.instancedCount):this.attributes.index?this.gl.drawElements(n,this.drawRange.count,this.attributes.index.type,this.attributes.index.offset+this.drawRange.start*r):this.gl.drawArrays(n,this.drawRange.start,this.drawRange.count)}getPosition(){const t=this.attributes.position;if(t.data)return t;if(!Kf)return console.warn("No position buffer data found to compute bounds"),Kf=!0}computeBoundingBox(t){t||(t=this.getPosition());const n=t.data,r=t.size;this.bounds||(this.bounds={min:new st,max:new st,center:new st,scale:new st,radius:1/0});const i=this.bounds.min,s=this.bounds.max,o=this.bounds.center,a=this.bounds.scale;i.set(1/0),s.set(-1/0);for(let l=0,c=n.length;l<c;l+=r){const d=n[l],f=n[l+1],u=n[l+2];i.x=Math.min(d,i.x),i.y=Math.min(f,i.y),i.z=Math.min(u,i.z),s.x=Math.max(d,s.x),s.y=Math.max(f,s.y),s.z=Math.max(u,s.z)}a.sub(s,i),o.add(i,s).divide(2)}computeBoundingSphere(t){t||(t=this.getPosition());const n=t.data,r=t.size;this.bounds||this.computeBoundingBox(t);let i=0;for(let s=0,o=n.length;s<o;s+=r)Yf.fromArray(n,s),i=Math.max(i,this.bounds.center.squaredDistance(Yf));this.bounds.radius=Math.sqrt(i)}remove(){for(let t in this.VAOs)this.gl.renderer.deleteVertexArray(this.VAOs[t]),delete this.VAOs[t];for(let t in this.attributes)this.gl.deleteBuffer(this.attributes[t].buffer),delete this.attributes[t]}}let n5=1;const Qf={};class r5{constructor(t,{vertex:n,fragment:r,uniforms:i={},transparent:s=!1,cullFace:o=t.BACK,frontFace:a=t.CCW,depthTest:l=!0,depthWrite:c=!0,depthFunc:d=t.LEQUAL}={}){t.canvas||console.error("gl not passed as first argument to Program"),this.gl=t,this.uniforms=i,this.id=n5++,n||console.warn("vertex shader not supplied"),r||console.warn("fragment shader not supplied"),this.transparent=s,this.cullFace=o,this.frontFace=a,this.depthTest=l,this.depthWrite=c,this.depthFunc=d,this.blendFunc={},this.blendEquation={},this.stencilFunc={},this.stencilOp={},this.transparent&&!this.blendFunc.src&&(this.gl.renderer.premultipliedAlpha?this.setBlendFunc(this.gl.ONE,this.gl.ONE_MINUS_SRC_ALPHA):this.setBlendFunc(this.gl.SRC_ALPHA,this.gl.ONE_MINUS_SRC_ALPHA)),this.vertexShader=t.createShader(t.VERTEX_SHADER),this.fragmentShader=t.createShader(t.FRAGMENT_SHADER),this.program=t.createProgram(),t.attachShader(this.program,this.vertexShader),t.attachShader(this.program,this.fragmentShader),this.setShaders({vertex:n,fragment:r})}setShaders({vertex:t,fragment:n}){if(t&&(this.gl.shaderSource(this.vertexShader,t),this.gl.compileShader(this.vertexShader),this.gl.getShaderInfoLog(this.vertexShader)!==""&&console.warn(`${this.gl.getShaderInfoLog(this.vertexShader)}
|
|
Vertex Shader
|
|
${Xf(t)}`)),n&&(this.gl.shaderSource(this.fragmentShader,n),this.gl.compileShader(this.fragmentShader),this.gl.getShaderInfoLog(this.fragmentShader)!==""&&console.warn(`${this.gl.getShaderInfoLog(this.fragmentShader)}
|
|
Fragment Shader
|
|
${Xf(n)}`)),this.gl.linkProgram(this.program),!this.gl.getProgramParameter(this.program,this.gl.LINK_STATUS))return console.warn(this.gl.getProgramInfoLog(this.program));this.uniformLocations=new Map;let r=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_UNIFORMS);for(let o=0;o<r;o++){let a=this.gl.getActiveUniform(this.program,o);this.uniformLocations.set(a,this.gl.getUniformLocation(this.program,a.name));const l=a.name.match(/(\w+)/g);a.uniformName=l[0],a.nameComponents=l.slice(1)}this.attributeLocations=new Map;const i=[],s=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES);for(let o=0;o<s;o++){const a=this.gl.getActiveAttrib(this.program,o),l=this.gl.getAttribLocation(this.program,a.name);l!==-1&&(i[l]=a.name,this.attributeLocations.set(a,l))}this.attributeOrder=i.join("")}setBlendFunc(t,n,r,i){this.blendFunc.src=t,this.blendFunc.dst=n,this.blendFunc.srcAlpha=r,this.blendFunc.dstAlpha=i,t&&(this.transparent=!0)}setBlendEquation(t,n){this.blendEquation.modeRGB=t,this.blendEquation.modeAlpha=n}setStencilFunc(t,n,r){this.stencilRef=n,this.stencilFunc.func=t,this.stencilFunc.ref=n,this.stencilFunc.mask=r}setStencilOp(t,n,r){this.stencilOp.stencilFail=t,this.stencilOp.depthFail=n,this.stencilOp.depthPass=r}applyState(){this.depthTest?this.gl.renderer.enable(this.gl.DEPTH_TEST):this.gl.renderer.disable(this.gl.DEPTH_TEST),this.cullFace?this.gl.renderer.enable(this.gl.CULL_FACE):this.gl.renderer.disable(this.gl.CULL_FACE),this.blendFunc.src?this.gl.renderer.enable(this.gl.BLEND):this.gl.renderer.disable(this.gl.BLEND),this.cullFace&&this.gl.renderer.setCullFace(this.cullFace),this.gl.renderer.setFrontFace(this.frontFace),this.gl.renderer.setDepthMask(this.depthWrite),this.gl.renderer.setDepthFunc(this.depthFunc),this.blendFunc.src&&this.gl.renderer.setBlendFunc(this.blendFunc.src,this.blendFunc.dst,this.blendFunc.srcAlpha,this.blendFunc.dstAlpha),this.gl.renderer.setBlendEquation(this.blendEquation.modeRGB,this.blendEquation.modeAlpha),this.stencilFunc.func||this.stencilOp.stencilFail?this.gl.renderer.enable(this.gl.STENCIL_TEST):this.gl.renderer.disable(this.gl.STENCIL_TEST),this.gl.renderer.setStencilFunc(this.stencilFunc.func,this.stencilFunc.ref,this.stencilFunc.mask),this.gl.renderer.setStencilOp(this.stencilOp.stencilFail,this.stencilOp.depthFail,this.stencilOp.depthPass)}use({flipFaces:t=!1}={}){let n=-1;this.gl.renderer.state.currentProgram===this.id||(this.gl.useProgram(this.program),this.gl.renderer.state.currentProgram=this.id),this.uniformLocations.forEach((i,s)=>{let o=this.uniforms[s.uniformName];for(const a of s.nameComponents){if(!o)break;if(a in o)o=o[a];else{if(Array.isArray(o.value))break;o=void 0;break}}if(!o)return Zf(`Active uniform ${s.name} has not been supplied`);if(o&&o.value===void 0)return Zf(`${s.name} uniform is missing a value parameter`);if(o.value.texture)return n=n+1,o.value.update(n),Ea(this.gl,s.type,i,n);if(o.value.length&&o.value[0].texture){const a=[];return o.value.forEach(l=>{n=n+1,l.update(n),a.push(n)}),Ea(this.gl,s.type,i,a)}Ea(this.gl,s.type,i,o.value)}),this.applyState(),t&&this.gl.renderer.setFrontFace(this.frontFace===this.gl.CCW?this.gl.CW:this.gl.CCW)}remove(){this.gl.deleteProgram(this.program)}}function Ea(e,t,n,r){r=r.length?i5(r):r;const i=e.renderer.state.uniformLocations.get(n);if(r.length)if(i===void 0||i.length!==r.length)e.renderer.state.uniformLocations.set(n,r.slice(0));else{if(s5(i,r))return;i.set?i.set(r):o5(i,r),e.renderer.state.uniformLocations.set(n,i)}else{if(i===r)return;e.renderer.state.uniformLocations.set(n,r)}switch(t){case 5126:return r.length?e.uniform1fv(n,r):e.uniform1f(n,r);case 35664:return e.uniform2fv(n,r);case 35665:return e.uniform3fv(n,r);case 35666:return e.uniform4fv(n,r);case 35670:case 5124:case 35678:case 36306:case 35680:case 36289:return r.length?e.uniform1iv(n,r):e.uniform1i(n,r);case 35671:case 35667:return e.uniform2iv(n,r);case 35672:case 35668:return e.uniform3iv(n,r);case 35673:case 35669:return e.uniform4iv(n,r);case 35674:return e.uniformMatrix2fv(n,!1,r);case 35675:return e.uniformMatrix3fv(n,!1,r);case 35676:return e.uniformMatrix4fv(n,!1,r)}}function Xf(e){let t=e.split(`
|
|
`);for(let n=0;n<t.length;n++)t[n]=n+1+": "+t[n];return t.join(`
|
|
`)}function i5(e){const t=e.length,n=e[0].length;if(n===void 0)return e;const r=t*n;let i=Qf[r];i||(Qf[r]=i=new Float32Array(r));for(let s=0;s<t;s++)i.set(e[s],s*n);return i}function s5(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}function o5(e,t){for(let n=0,r=e.length;n<r;n++)e[n]=t[n]}let Ta=0;function Zf(e){Ta>100||(console.warn(e),Ta++,Ta>100&&console.warn("More than 100 program warnings - stopping logs."))}const ja=new st;let a5=1;class l5{constructor({canvas:t=document.createElement("canvas"),width:n=300,height:r=150,dpr:i=1,alpha:s=!1,depth:o=!0,stencil:a=!1,antialias:l=!1,premultipliedAlpha:c=!1,preserveDrawingBuffer:d=!1,powerPreference:f="default",autoClear:u=!0,webgl:h=2}={}){const p={alpha:s,depth:o,stencil:a,antialias:l,premultipliedAlpha:c,preserveDrawingBuffer:d,powerPreference:f};this.dpr=i,this.alpha=s,this.color=!0,this.depth=o,this.stencil=a,this.premultipliedAlpha=c,this.autoClear=u,this.id=a5++,h===2&&(this.gl=t.getContext("webgl2",p)),this.isWebgl2=!!this.gl,this.gl||(this.gl=t.getContext("webgl",p)),this.gl||console.error("unable to create webgl context"),this.gl.renderer=this,this.setSize(n,r),this.state={},this.state.blendFunc={src:this.gl.ONE,dst:this.gl.ZERO},this.state.blendEquation={modeRGB:this.gl.FUNC_ADD},this.state.cullFace=!1,this.state.frontFace=this.gl.CCW,this.state.depthMask=!0,this.state.depthFunc=this.gl.LEQUAL,this.state.premultiplyAlpha=!1,this.state.flipY=!1,this.state.unpackAlignment=4,this.state.framebuffer=null,this.state.viewport={x:0,y:0,width:null,height:null},this.state.textureUnits=[],this.state.activeTextureUnit=0,this.state.boundBuffer=null,this.state.uniformLocations=new Map,this.state.currentProgram=null,this.extensions={},this.isWebgl2?(this.getExtension("EXT_color_buffer_float"),this.getExtension("OES_texture_float_linear")):(this.getExtension("OES_texture_float"),this.getExtension("OES_texture_float_linear"),this.getExtension("OES_texture_half_float"),this.getExtension("OES_texture_half_float_linear"),this.getExtension("OES_element_index_uint"),this.getExtension("OES_standard_derivatives"),this.getExtension("EXT_sRGB"),this.getExtension("WEBGL_depth_texture"),this.getExtension("WEBGL_draw_buffers")),this.getExtension("WEBGL_compressed_texture_astc"),this.getExtension("EXT_texture_compression_bptc"),this.getExtension("WEBGL_compressed_texture_s3tc"),this.getExtension("WEBGL_compressed_texture_etc1"),this.getExtension("WEBGL_compressed_texture_pvrtc"),this.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),this.vertexAttribDivisor=this.getExtension("ANGLE_instanced_arrays","vertexAttribDivisor","vertexAttribDivisorANGLE"),this.drawArraysInstanced=this.getExtension("ANGLE_instanced_arrays","drawArraysInstanced","drawArraysInstancedANGLE"),this.drawElementsInstanced=this.getExtension("ANGLE_instanced_arrays","drawElementsInstanced","drawElementsInstancedANGLE"),this.createVertexArray=this.getExtension("OES_vertex_array_object","createVertexArray","createVertexArrayOES"),this.bindVertexArray=this.getExtension("OES_vertex_array_object","bindVertexArray","bindVertexArrayOES"),this.deleteVertexArray=this.getExtension("OES_vertex_array_object","deleteVertexArray","deleteVertexArrayOES"),this.drawBuffers=this.getExtension("WEBGL_draw_buffers","drawBuffers","drawBuffersWEBGL"),this.parameters={},this.parameters.maxTextureUnits=this.gl.getParameter(this.gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS),this.parameters.maxAnisotropy=this.getExtension("EXT_texture_filter_anisotropic")?this.gl.getParameter(this.getExtension("EXT_texture_filter_anisotropic").MAX_TEXTURE_MAX_ANISOTROPY_EXT):0}setSize(t,n){this.width=t,this.height=n,this.gl.canvas.width=t*this.dpr,this.gl.canvas.height=n*this.dpr,this.gl.canvas.style&&Object.assign(this.gl.canvas.style,{width:t+"px",height:n+"px"})}setViewport(t,n,r=0,i=0){this.state.viewport.width===t&&this.state.viewport.height===n||(this.state.viewport.width=t,this.state.viewport.height=n,this.state.viewport.x=r,this.state.viewport.y=i,this.gl.viewport(r,i,t,n))}setScissor(t,n,r=0,i=0){this.gl.scissor(r,i,t,n)}enable(t){this.state[t]!==!0&&(this.gl.enable(t),this.state[t]=!0)}disable(t){this.state[t]!==!1&&(this.gl.disable(t),this.state[t]=!1)}setBlendFunc(t,n,r,i){this.state.blendFunc.src===t&&this.state.blendFunc.dst===n&&this.state.blendFunc.srcAlpha===r&&this.state.blendFunc.dstAlpha===i||(this.state.blendFunc.src=t,this.state.blendFunc.dst=n,this.state.blendFunc.srcAlpha=r,this.state.blendFunc.dstAlpha=i,r!==void 0?this.gl.blendFuncSeparate(t,n,r,i):this.gl.blendFunc(t,n))}setBlendEquation(t,n){t=t||this.gl.FUNC_ADD,!(this.state.blendEquation.modeRGB===t&&this.state.blendEquation.modeAlpha===n)&&(this.state.blendEquation.modeRGB=t,this.state.blendEquation.modeAlpha=n,n!==void 0?this.gl.blendEquationSeparate(t,n):this.gl.blendEquation(t))}setCullFace(t){this.state.cullFace!==t&&(this.state.cullFace=t,this.gl.cullFace(t))}setFrontFace(t){this.state.frontFace!==t&&(this.state.frontFace=t,this.gl.frontFace(t))}setDepthMask(t){this.state.depthMask!==t&&(this.state.depthMask=t,this.gl.depthMask(t))}setDepthFunc(t){this.state.depthFunc!==t&&(this.state.depthFunc=t,this.gl.depthFunc(t))}setStencilMask(t){this.state.stencilMask!==t&&(this.state.stencilMask=t,this.gl.stencilMask(t))}setStencilFunc(t,n,r){this.state.stencilFunc===t&&this.state.stencilRef===n&&this.state.stencilFuncMask===r||(this.state.stencilFunc=t||this.gl.ALWAYS,this.state.stencilRef=n||0,this.state.stencilFuncMask=r||0,this.gl.stencilFunc(t||this.gl.ALWAYS,n||0,r||0))}setStencilOp(t,n,r){this.state.stencilFail===t&&this.state.stencilDepthFail===n&&this.state.stencilDepthPass===r||(this.state.stencilFail=t,this.state.stencilDepthFail=n,this.state.stencilDepthPass=r,this.gl.stencilOp(t,n,r))}activeTexture(t){this.state.activeTextureUnit!==t&&(this.state.activeTextureUnit=t,this.gl.activeTexture(this.gl.TEXTURE0+t))}bindFramebuffer({target:t=this.gl.FRAMEBUFFER,buffer:n=null}={}){this.state.framebuffer!==n&&(this.state.framebuffer=n,this.gl.bindFramebuffer(t,n))}getExtension(t,n,r){return n&&this.gl[n]?this.gl[n].bind(this.gl):(this.extensions[t]||(this.extensions[t]=this.gl.getExtension(t)),n?this.extensions[t]?this.extensions[t][r].bind(this.extensions[t]):null:this.extensions[t])}sortOpaque(t,n){return t.renderOrder!==n.renderOrder?t.renderOrder-n.renderOrder:t.program.id!==n.program.id?t.program.id-n.program.id:t.zDepth!==n.zDepth?t.zDepth-n.zDepth:n.id-t.id}sortTransparent(t,n){return t.renderOrder!==n.renderOrder?t.renderOrder-n.renderOrder:t.zDepth!==n.zDepth?n.zDepth-t.zDepth:n.id-t.id}sortUI(t,n){return t.renderOrder!==n.renderOrder?t.renderOrder-n.renderOrder:t.program.id!==n.program.id?t.program.id-n.program.id:n.id-t.id}getRenderList({scene:t,camera:n,frustumCull:r,sort:i}){let s=[];if(n&&r&&n.updateFrustum(),t.traverse(o=>{if(!o.visible)return!0;o.draw&&(r&&o.frustumCulled&&n&&!n.frustumIntersectsMesh(o)||s.push(o))}),i){const o=[],a=[],l=[];s.forEach(c=>{c.program.transparent?c.program.depthTest?a.push(c):l.push(c):o.push(c),c.zDepth=0,!(c.renderOrder!==0||!c.program.depthTest||!n)&&(c.worldMatrix.getTranslation(ja),ja.applyMatrix4(n.projectionViewMatrix),c.zDepth=ja.z)}),o.sort(this.sortOpaque),a.sort(this.sortTransparent),l.sort(this.sortUI),s=o.concat(a,l)}return s}render({scene:t,camera:n,target:r=null,update:i=!0,sort:s=!0,frustumCull:o=!0,clear:a}){r===null?(this.bindFramebuffer(),this.setViewport(this.width*this.dpr,this.height*this.dpr)):(this.bindFramebuffer(r),this.setViewport(r.width,r.height)),(a||this.autoClear&&a!==!1)&&(this.depth&&(!r||r.depth)&&(this.enable(this.gl.DEPTH_TEST),this.setDepthMask(!0)),(this.stencil||!r||r.stencil)&&(this.enable(this.gl.STENCIL_TEST),this.setStencilMask(255)),this.gl.clear((this.color?this.gl.COLOR_BUFFER_BIT:0)|(this.depth?this.gl.DEPTH_BUFFER_BIT:0)|(this.stencil?this.gl.STENCIL_BUFFER_BIT:0))),i&&t.updateMatrixWorld(),n&&n.updateMatrixWorld(),this.getRenderList({scene:t,camera:n,frustumCull:o,sort:s}).forEach(c=>{c.draw({camera:n})})}}function u5(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function c5(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function d5(e,t){let n=t[0],r=t[1],i=t[2],s=t[3],o=n*n+r*r+i*i+s*s;return o>0&&(o=1/Math.sqrt(o)),e[0]=n*o,e[1]=r*o,e[2]=i*o,e[3]=s*o,e}function f5(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function h5(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e}function p5(e,t,n){n=n*.5;let r=Math.sin(n);return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=Math.cos(n),e}function Jf(e,t,n){let r=t[0],i=t[1],s=t[2],o=t[3],a=n[0],l=n[1],c=n[2],d=n[3];return e[0]=r*d+o*a+i*c-s*l,e[1]=i*d+o*l+s*a-r*c,e[2]=s*d+o*c+r*l-i*a,e[3]=o*d-r*a-i*l-s*c,e}function m5(e,t,n){n*=.5;let r=t[0],i=t[1],s=t[2],o=t[3],a=Math.sin(n),l=Math.cos(n);return e[0]=r*l+o*a,e[1]=i*l+s*a,e[2]=s*l-i*a,e[3]=o*l-r*a,e}function g5(e,t,n){n*=.5;let r=t[0],i=t[1],s=t[2],o=t[3],a=Math.sin(n),l=Math.cos(n);return e[0]=r*l-s*a,e[1]=i*l+o*a,e[2]=s*l+r*a,e[3]=o*l-i*a,e}function y5(e,t,n){n*=.5;let r=t[0],i=t[1],s=t[2],o=t[3],a=Math.sin(n),l=Math.cos(n);return e[0]=r*l+i*a,e[1]=i*l-r*a,e[2]=s*l+o*a,e[3]=o*l-s*a,e}function v5(e,t,n,r){let i=t[0],s=t[1],o=t[2],a=t[3],l=n[0],c=n[1],d=n[2],f=n[3],u,h,p,m,w;return h=i*l+s*c+o*d+a*f,h<0&&(h=-h,l=-l,c=-c,d=-d,f=-f),1-h>1e-6?(u=Math.acos(h),p=Math.sin(u),m=Math.sin((1-r)*u)/p,w=Math.sin(r*u)/p):(m=1-r,w=r),e[0]=m*i+w*l,e[1]=m*s+w*c,e[2]=m*o+w*d,e[3]=m*a+w*f,e}function x5(e,t){let n=t[0],r=t[1],i=t[2],s=t[3],o=n*n+r*r+i*i+s*s,a=o?1/o:0;return e[0]=-n*a,e[1]=-r*a,e[2]=-i*a,e[3]=s*a,e}function w5(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function S5(e,t){let n=t[0]+t[4]+t[8],r;if(n>0)r=Math.sqrt(n+1),e[3]=.5*r,r=.5/r,e[0]=(t[5]-t[7])*r,e[1]=(t[6]-t[2])*r,e[2]=(t[1]-t[3])*r;else{let i=0;t[4]>t[0]&&(i=1),t[8]>t[i*3+i]&&(i=2);let s=(i+1)%3,o=(i+2)%3;r=Math.sqrt(t[i*3+i]-t[s*3+s]-t[o*3+o]+1),e[i]=.5*r,r=.5/r,e[3]=(t[s*3+o]-t[o*3+s])*r,e[s]=(t[s*3+i]+t[i*3+s])*r,e[o]=(t[o*3+i]+t[i*3+o])*r}return e}function k5(e,t,n="YXZ"){let r=Math.sin(t[0]*.5),i=Math.cos(t[0]*.5),s=Math.sin(t[1]*.5),o=Math.cos(t[1]*.5),a=Math.sin(t[2]*.5),l=Math.cos(t[2]*.5);return n==="XYZ"?(e[0]=r*o*l+i*s*a,e[1]=i*s*l-r*o*a,e[2]=i*o*a+r*s*l,e[3]=i*o*l-r*s*a):n==="YXZ"?(e[0]=r*o*l+i*s*a,e[1]=i*s*l-r*o*a,e[2]=i*o*a-r*s*l,e[3]=i*o*l+r*s*a):n==="ZXY"?(e[0]=r*o*l-i*s*a,e[1]=i*s*l+r*o*a,e[2]=i*o*a+r*s*l,e[3]=i*o*l-r*s*a):n==="ZYX"?(e[0]=r*o*l-i*s*a,e[1]=i*s*l+r*o*a,e[2]=i*o*a-r*s*l,e[3]=i*o*l+r*s*a):n==="YZX"?(e[0]=r*o*l+i*s*a,e[1]=i*s*l+r*o*a,e[2]=i*o*a-r*s*l,e[3]=i*o*l-r*s*a):n==="XZY"&&(e[0]=r*o*l-i*s*a,e[1]=i*s*l-r*o*a,e[2]=i*o*a+r*s*l,e[3]=i*o*l+r*s*a),e}const b5=u5,P5=c5,C5=f5,E5=d5;class T5 extends Array{constructor(t=0,n=0,r=0,i=1){super(t,n,r,i),this.onChange=()=>{},this._target=this;const s=["0","1","2","3"];return new Proxy(this,{set(o,a){const l=Reflect.set(...arguments);return l&&s.includes(a)&&o.onChange(),l}})}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}get w(){return this[3]}set x(t){this._target[0]=t,this.onChange()}set y(t){this._target[1]=t,this.onChange()}set z(t){this._target[2]=t,this.onChange()}set w(t){this._target[3]=t,this.onChange()}identity(){return h5(this._target),this.onChange(),this}set(t,n,r,i){return t.length?this.copy(t):(P5(this._target,t,n,r,i),this.onChange(),this)}rotateX(t){return m5(this._target,this._target,t),this.onChange(),this}rotateY(t){return g5(this._target,this._target,t),this.onChange(),this}rotateZ(t){return y5(this._target,this._target,t),this.onChange(),this}inverse(t=this._target){return x5(this._target,t),this.onChange(),this}conjugate(t=this._target){return w5(this._target,t),this.onChange(),this}copy(t){return b5(this._target,t),this.onChange(),this}normalize(t=this._target){return E5(this._target,t),this.onChange(),this}multiply(t,n){return n?Jf(this._target,t,n):Jf(this._target,this._target,t),this.onChange(),this}dot(t){return C5(this._target,t)}fromMatrix3(t){return S5(this._target,t),this.onChange(),this}fromEuler(t,n){return k5(this._target,t,t.order),n||this.onChange(),this}fromAxisAngle(t,n){return p5(this._target,t,n),this.onChange(),this}slerp(t,n){return v5(this._target,this._target,t,n),this.onChange(),this}fromArray(t,n=0){return this._target[0]=t[n],this._target[1]=t[n+1],this._target[2]=t[n+2],this._target[3]=t[n+3],this.onChange(),this}toArray(t=[],n=0){return t[n]=this[0],t[n+1]=this[1],t[n+2]=this[2],t[n+3]=this[3],t}}const j5=1e-6;function M5(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function N5(e,t,n,r,i,s,o,a,l,c,d,f,u,h,p,m,w){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=s,e[5]=o,e[6]=a,e[7]=l,e[8]=c,e[9]=d,e[10]=f,e[11]=u,e[12]=h,e[13]=p,e[14]=m,e[15]=w,e}function _5(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function A5(e,t){let n=t[0],r=t[1],i=t[2],s=t[3],o=t[4],a=t[5],l=t[6],c=t[7],d=t[8],f=t[9],u=t[10],h=t[11],p=t[12],m=t[13],w=t[14],y=t[15],v=n*a-r*o,x=n*l-i*o,S=n*c-s*o,k=r*l-i*a,P=r*c-s*a,C=i*c-s*l,E=d*m-f*p,N=d*w-u*p,M=d*y-h*p,I=f*w-u*m,A=f*y-h*m,B=u*y-h*w,L=v*B-x*A+S*I+k*M-P*N+C*E;return L?(L=1/L,e[0]=(a*B-l*A+c*I)*L,e[1]=(i*A-r*B-s*I)*L,e[2]=(m*C-w*P+y*k)*L,e[3]=(u*P-f*C-h*k)*L,e[4]=(l*M-o*B-c*N)*L,e[5]=(n*B-i*M+s*N)*L,e[6]=(w*S-p*C-y*x)*L,e[7]=(d*C-u*S+h*x)*L,e[8]=(o*A-a*M+c*E)*L,e[9]=(r*M-n*A-s*E)*L,e[10]=(p*P-m*S+y*v)*L,e[11]=(f*S-d*P-h*v)*L,e[12]=(a*N-o*I-l*E)*L,e[13]=(n*I-r*N+i*E)*L,e[14]=(m*x-p*k-w*v)*L,e[15]=(d*k-f*x+u*v)*L,e):null}function vg(e){let t=e[0],n=e[1],r=e[2],i=e[3],s=e[4],o=e[5],a=e[6],l=e[7],c=e[8],d=e[9],f=e[10],u=e[11],h=e[12],p=e[13],m=e[14],w=e[15],y=t*o-n*s,v=t*a-r*s,x=t*l-i*s,S=n*a-r*o,k=n*l-i*o,P=r*l-i*a,C=c*p-d*h,E=c*m-f*h,N=c*w-u*h,M=d*m-f*p,I=d*w-u*p,A=f*w-u*m;return y*A-v*I+x*M+S*N-k*E+P*C}function eh(e,t,n){let r=t[0],i=t[1],s=t[2],o=t[3],a=t[4],l=t[5],c=t[6],d=t[7],f=t[8],u=t[9],h=t[10],p=t[11],m=t[12],w=t[13],y=t[14],v=t[15],x=n[0],S=n[1],k=n[2],P=n[3];return e[0]=x*r+S*a+k*f+P*m,e[1]=x*i+S*l+k*u+P*w,e[2]=x*s+S*c+k*h+P*y,e[3]=x*o+S*d+k*p+P*v,x=n[4],S=n[5],k=n[6],P=n[7],e[4]=x*r+S*a+k*f+P*m,e[5]=x*i+S*l+k*u+P*w,e[6]=x*s+S*c+k*h+P*y,e[7]=x*o+S*d+k*p+P*v,x=n[8],S=n[9],k=n[10],P=n[11],e[8]=x*r+S*a+k*f+P*m,e[9]=x*i+S*l+k*u+P*w,e[10]=x*s+S*c+k*h+P*y,e[11]=x*o+S*d+k*p+P*v,x=n[12],S=n[13],k=n[14],P=n[15],e[12]=x*r+S*a+k*f+P*m,e[13]=x*i+S*l+k*u+P*w,e[14]=x*s+S*c+k*h+P*y,e[15]=x*o+S*d+k*p+P*v,e}function L5(e,t,n){let r=n[0],i=n[1],s=n[2],o,a,l,c,d,f,u,h,p,m,w,y;return t===e?(e[12]=t[0]*r+t[4]*i+t[8]*s+t[12],e[13]=t[1]*r+t[5]*i+t[9]*s+t[13],e[14]=t[2]*r+t[6]*i+t[10]*s+t[14],e[15]=t[3]*r+t[7]*i+t[11]*s+t[15]):(o=t[0],a=t[1],l=t[2],c=t[3],d=t[4],f=t[5],u=t[6],h=t[7],p=t[8],m=t[9],w=t[10],y=t[11],e[0]=o,e[1]=a,e[2]=l,e[3]=c,e[4]=d,e[5]=f,e[6]=u,e[7]=h,e[8]=p,e[9]=m,e[10]=w,e[11]=y,e[12]=o*r+d*i+p*s+t[12],e[13]=a*r+f*i+m*s+t[13],e[14]=l*r+u*i+w*s+t[14],e[15]=c*r+h*i+y*s+t[15]),e}function D5(e,t,n){let r=n[0],i=n[1],s=n[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*s,e[9]=t[9]*s,e[10]=t[10]*s,e[11]=t[11]*s,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function R5(e,t,n,r){let i=r[0],s=r[1],o=r[2],a=Math.hypot(i,s,o),l,c,d,f,u,h,p,m,w,y,v,x,S,k,P,C,E,N,M,I,A,B,L,me;return Math.abs(a)<j5?null:(a=1/a,i*=a,s*=a,o*=a,l=Math.sin(n),c=Math.cos(n),d=1-c,f=t[0],u=t[1],h=t[2],p=t[3],m=t[4],w=t[5],y=t[6],v=t[7],x=t[8],S=t[9],k=t[10],P=t[11],C=i*i*d+c,E=s*i*d+o*l,N=o*i*d-s*l,M=i*s*d-o*l,I=s*s*d+c,A=o*s*d+i*l,B=i*o*d+s*l,L=s*o*d-i*l,me=o*o*d+c,e[0]=f*C+m*E+x*N,e[1]=u*C+w*E+S*N,e[2]=h*C+y*E+k*N,e[3]=p*C+v*E+P*N,e[4]=f*M+m*I+x*A,e[5]=u*M+w*I+S*A,e[6]=h*M+y*I+k*A,e[7]=p*M+v*I+P*A,e[8]=f*B+m*L+x*me,e[9]=u*B+w*L+S*me,e[10]=h*B+y*L+k*me,e[11]=p*B+v*L+P*me,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}function V5(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e}function xg(e,t){let n=t[0],r=t[1],i=t[2],s=t[4],o=t[5],a=t[6],l=t[8],c=t[9],d=t[10];return e[0]=Math.hypot(n,r,i),e[1]=Math.hypot(s,o,a),e[2]=Math.hypot(l,c,d),e}function F5(e){let t=e[0],n=e[1],r=e[2],i=e[4],s=e[5],o=e[6],a=e[8],l=e[9],c=e[10];const d=t*t+n*n+r*r,f=i*i+s*s+o*o,u=a*a+l*l+c*c;return Math.sqrt(Math.max(d,f,u))}const wg=function(){const e=[1,1,1];return function(t,n){let r=e;xg(r,n);let i=1/r[0],s=1/r[1],o=1/r[2],a=n[0]*i,l=n[1]*s,c=n[2]*o,d=n[4]*i,f=n[5]*s,u=n[6]*o,h=n[8]*i,p=n[9]*s,m=n[10]*o,w=a+f+m,y=0;return w>0?(y=Math.sqrt(w+1)*2,t[3]=.25*y,t[0]=(u-p)/y,t[1]=(h-c)/y,t[2]=(l-d)/y):a>f&&a>m?(y=Math.sqrt(1+a-f-m)*2,t[3]=(u-p)/y,t[0]=.25*y,t[1]=(l+d)/y,t[2]=(h+c)/y):f>m?(y=Math.sqrt(1+f-a-m)*2,t[3]=(h-c)/y,t[0]=(l+d)/y,t[1]=.25*y,t[2]=(u+p)/y):(y=Math.sqrt(1+m-a-f)*2,t[3]=(l-d)/y,t[0]=(h+c)/y,t[1]=(u+p)/y,t[2]=.25*y),t}}();function z5(e,t,n,r){let i=ai([e[0],e[1],e[2]]);const s=ai([e[4],e[5],e[6]]),o=ai([e[8],e[9],e[10]]);vg(e)<0&&(i=-i),n[0]=e[12],n[1]=e[13],n[2]=e[14];const l=e.slice(),c=1/i,d=1/s,f=1/o;l[0]*=c,l[1]*=c,l[2]*=c,l[4]*=d,l[5]*=d,l[6]*=d,l[8]*=f,l[9]*=f,l[10]*=f,wg(t,l),r[0]=i,r[1]=s,r[2]=o}function O5(e,t,n,r){const i=e,s=t[0],o=t[1],a=t[2],l=t[3],c=s+s,d=o+o,f=a+a,u=s*c,h=s*d,p=s*f,m=o*d,w=o*f,y=a*f,v=l*c,x=l*d,S=l*f,k=r[0],P=r[1],C=r[2];return i[0]=(1-(m+y))*k,i[1]=(h+S)*k,i[2]=(p-x)*k,i[3]=0,i[4]=(h-S)*P,i[5]=(1-(u+y))*P,i[6]=(w+v)*P,i[7]=0,i[8]=(p+x)*C,i[9]=(w-v)*C,i[10]=(1-(u+m))*C,i[11]=0,i[12]=n[0],i[13]=n[1],i[14]=n[2],i[15]=1,i}function I5(e,t){let n=t[0],r=t[1],i=t[2],s=t[3],o=n+n,a=r+r,l=i+i,c=n*o,d=r*o,f=r*a,u=i*o,h=i*a,p=i*l,m=s*o,w=s*a,y=s*l;return e[0]=1-f-p,e[1]=d+y,e[2]=u-w,e[3]=0,e[4]=d-y,e[5]=1-c-p,e[6]=h+m,e[7]=0,e[8]=u+w,e[9]=h-m,e[10]=1-c-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function $5(e,t,n,r,i){let s=1/Math.tan(t/2),o=1/(r-i);return e[0]=s/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(i+r)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*i*r*o,e[15]=0,e}function B5(e,t,n,r,i,s,o){let a=1/(t-n),l=1/(r-i),c=1/(s-o);return e[0]=-2*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+n)*a,e[13]=(i+r)*l,e[14]=(o+s)*c,e[15]=1,e}function U5(e,t,n,r){let i=t[0],s=t[1],o=t[2],a=r[0],l=r[1],c=r[2],d=i-n[0],f=s-n[1],u=o-n[2],h=d*d+f*f+u*u;h===0?u=1:(h=1/Math.sqrt(h),d*=h,f*=h,u*=h);let p=l*u-c*f,m=c*d-a*u,w=a*f-l*d;return h=p*p+m*m+w*w,h===0&&(c?a+=1e-6:l?c+=1e-6:l+=1e-6,p=l*u-c*f,m=c*d-a*u,w=a*f-l*d,h=p*p+m*m+w*w),h=1/Math.sqrt(h),p*=h,m*=h,w*=h,e[0]=p,e[1]=m,e[2]=w,e[3]=0,e[4]=f*w-u*m,e[5]=u*p-d*w,e[6]=d*m-f*p,e[7]=0,e[8]=d,e[9]=f,e[10]=u,e[11]=0,e[12]=i,e[13]=s,e[14]=o,e[15]=1,e}function th(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e[9]=t[9]+n[9],e[10]=t[10]+n[10],e[11]=t[11]+n[11],e[12]=t[12]+n[12],e[13]=t[13]+n[13],e[14]=t[14]+n[14],e[15]=t[15]+n[15],e}function nh(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e[4]=t[4]-n[4],e[5]=t[5]-n[5],e[6]=t[6]-n[6],e[7]=t[7]-n[7],e[8]=t[8]-n[8],e[9]=t[9]-n[9],e[10]=t[10]-n[10],e[11]=t[11]-n[11],e[12]=t[12]-n[12],e[13]=t[13]-n[13],e[14]=t[14]-n[14],e[15]=t[15]-n[15],e}function W5(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e[9]=t[9]*n,e[10]=t[10]*n,e[11]=t[11]*n,e[12]=t[12]*n,e[13]=t[13]*n,e[14]=t[14]*n,e[15]=t[15]*n,e}class ao extends Array{constructor(t=1,n=0,r=0,i=0,s=0,o=1,a=0,l=0,c=0,d=0,f=1,u=0,h=0,p=0,m=0,w=1){return super(t,n,r,i,s,o,a,l,c,d,f,u,h,p,m,w),this}get x(){return this[12]}get y(){return this[13]}get z(){return this[14]}get w(){return this[15]}set x(t){this[12]=t}set y(t){this[13]=t}set z(t){this[14]=t}set w(t){this[15]=t}set(t,n,r,i,s,o,a,l,c,d,f,u,h,p,m,w){return t.length?this.copy(t):(N5(this,t,n,r,i,s,o,a,l,c,d,f,u,h,p,m,w),this)}translate(t,n=this){return L5(this,n,t),this}rotate(t,n,r=this){return R5(this,r,t,n),this}scale(t,n=this){return D5(this,n,typeof t=="number"?[t,t,t]:t),this}add(t,n){return n?th(this,t,n):th(this,this,t),this}sub(t,n){return n?nh(this,t,n):nh(this,this,t),this}multiply(t,n){return t.length?n?eh(this,t,n):eh(this,this,t):W5(this,this,t),this}identity(){return _5(this),this}copy(t){return M5(this,t),this}fromPerspective({fov:t,aspect:n,near:r,far:i}={}){return $5(this,t,n,r,i),this}fromOrthogonal({left:t,right:n,bottom:r,top:i,near:s,far:o}){return B5(this,t,n,r,i,s,o),this}fromQuaternion(t){return I5(this,t),this}setPosition(t){return this.x=t[0],this.y=t[1],this.z=t[2],this}inverse(t=this){return A5(this,t),this}compose(t,n,r){return O5(this,t,n,r),this}decompose(t,n,r){return z5(this,t,n,r),this}getRotation(t){return wg(t,this),this}getTranslation(t){return V5(t,this),this}getScaling(t){return xg(t,this),this}getMaxScaleOnAxis(){return F5(this)}lookAt(t,n,r){return U5(this,t,n,r),this}determinant(){return vg(this)}fromArray(t,n=0){return this[0]=t[n],this[1]=t[n+1],this[2]=t[n+2],this[3]=t[n+3],this[4]=t[n+4],this[5]=t[n+5],this[6]=t[n+6],this[7]=t[n+7],this[8]=t[n+8],this[9]=t[n+9],this[10]=t[n+10],this[11]=t[n+11],this[12]=t[n+12],this[13]=t[n+13],this[14]=t[n+14],this[15]=t[n+15],this}toArray(t=[],n=0){return t[n]=this[0],t[n+1]=this[1],t[n+2]=this[2],t[n+3]=this[3],t[n+4]=this[4],t[n+5]=this[5],t[n+6]=this[6],t[n+7]=this[7],t[n+8]=this[8],t[n+9]=this[9],t[n+10]=this[10],t[n+11]=this[11],t[n+12]=this[12],t[n+13]=this[13],t[n+14]=this[14],t[n+15]=this[15],t}}function H5(e,t,n="YXZ"){return n==="XYZ"?(e[1]=Math.asin(Math.min(Math.max(t[8],-1),1)),Math.abs(t[8])<.99999?(e[0]=Math.atan2(-t[9],t[10]),e[2]=Math.atan2(-t[4],t[0])):(e[0]=Math.atan2(t[6],t[5]),e[2]=0)):n==="YXZ"?(e[0]=Math.asin(-Math.min(Math.max(t[9],-1),1)),Math.abs(t[9])<.99999?(e[1]=Math.atan2(t[8],t[10]),e[2]=Math.atan2(t[1],t[5])):(e[1]=Math.atan2(-t[2],t[0]),e[2]=0)):n==="ZXY"?(e[0]=Math.asin(Math.min(Math.max(t[6],-1),1)),Math.abs(t[6])<.99999?(e[1]=Math.atan2(-t[2],t[10]),e[2]=Math.atan2(-t[4],t[5])):(e[1]=0,e[2]=Math.atan2(t[1],t[0]))):n==="ZYX"?(e[1]=Math.asin(-Math.min(Math.max(t[2],-1),1)),Math.abs(t[2])<.99999?(e[0]=Math.atan2(t[6],t[10]),e[2]=Math.atan2(t[1],t[0])):(e[0]=0,e[2]=Math.atan2(-t[4],t[5]))):n==="YZX"?(e[2]=Math.asin(Math.min(Math.max(t[1],-1),1)),Math.abs(t[1])<.99999?(e[0]=Math.atan2(-t[9],t[5]),e[1]=Math.atan2(-t[2],t[0])):(e[0]=0,e[1]=Math.atan2(t[8],t[10]))):n==="XZY"&&(e[2]=Math.asin(-Math.min(Math.max(t[4],-1),1)),Math.abs(t[4])<.99999?(e[0]=Math.atan2(t[6],t[5]),e[1]=Math.atan2(t[8],t[0])):(e[0]=Math.atan2(-t[9],t[10]),e[1]=0)),e}const rh=new ao;class q5 extends Array{constructor(t=0,n=t,r=t,i="YXZ"){super(t,n,r),this.order=i,this.onChange=()=>{},this._target=this;const s=["0","1","2"];return new Proxy(this,{set(o,a){const l=Reflect.set(...arguments);return l&&s.includes(a)&&o.onChange(),l}})}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}set x(t){this._target[0]=t,this.onChange()}set y(t){this._target[1]=t,this.onChange()}set z(t){this._target[2]=t,this.onChange()}set(t,n=t,r=t){return t.length?this.copy(t):(this._target[0]=t,this._target[1]=n,this._target[2]=r,this.onChange(),this)}copy(t){return this._target[0]=t[0],this._target[1]=t[1],this._target[2]=t[2],this.onChange(),this}reorder(t){return this._target.order=t,this.onChange(),this}fromRotationMatrix(t,n=this.order){return H5(this._target,t,n),this.onChange(),this}fromQuaternion(t,n=this.order,r){return rh.fromQuaternion(t),this._target.fromRotationMatrix(rh,n),r||this.onChange(),this}fromArray(t,n=0){return this._target[0]=t[n],this._target[1]=t[n+1],this._target[2]=t[n+2],this}toArray(t=[],n=0){return t[n]=this[0],t[n+1]=this[1],t[n+2]=this[2],t}}class G5{constructor(){this.parent=null,this.children=[],this.visible=!0,this.matrix=new ao,this.worldMatrix=new ao,this.matrixAutoUpdate=!0,this.worldMatrixNeedsUpdate=!1,this.position=new st,this.quaternion=new T5,this.scale=new st(1),this.rotation=new q5,this.up=new st(0,1,0),this.rotation._target.onChange=()=>this.quaternion.fromEuler(this.rotation,!0),this.quaternion._target.onChange=()=>this.rotation.fromQuaternion(this.quaternion,void 0,!0)}setParent(t,n=!0){this.parent&&t!==this.parent&&this.parent.removeChild(this,!1),this.parent=t,n&&t&&t.addChild(this,!1)}addChild(t,n=!0){~this.children.indexOf(t)||this.children.push(t),n&&t.setParent(this,!1)}removeChild(t,n=!0){~this.children.indexOf(t)&&this.children.splice(this.children.indexOf(t),1),n&&t.setParent(null,!1)}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.worldMatrixNeedsUpdate||t)&&(this.parent===null?this.worldMatrix.copy(this.matrix):this.worldMatrix.multiply(this.parent.worldMatrix,this.matrix),this.worldMatrixNeedsUpdate=!1,t=!0);for(let n=0,r=this.children.length;n<r;n++)this.children[n].updateMatrixWorld(t)}updateMatrix(){this.matrix.compose(this.quaternion,this.position,this.scale),this.worldMatrixNeedsUpdate=!0}traverse(t){if(!t(this))for(let n=0,r=this.children.length;n<r;n++)this.children[n].traverse(t)}decompose(){this.matrix.decompose(this.quaternion._target,this.position,this.scale),this.rotation.fromQuaternion(this.quaternion)}lookAt(t,n=!1){n?this.matrix.lookAt(this.position,t,this.up):this.matrix.lookAt(t,this.position,this.up),this.matrix.getRotation(this.quaternion._target),this.rotation.fromQuaternion(this.quaternion)}}function Y5(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function K5(e,t){let n=t[0],r=t[1],i=t[2],s=t[3],o=n+n,a=r+r,l=i+i,c=n*o,d=r*o,f=r*a,u=i*o,h=i*a,p=i*l,m=s*o,w=s*a,y=s*l;return e[0]=1-f-p,e[3]=d-y,e[6]=u+w,e[1]=d+y,e[4]=1-c-p,e[7]=h-m,e[2]=u-w,e[5]=h+m,e[8]=1-c-f,e}function Q5(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function X5(e,t,n,r,i,s,o,a,l,c){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=s,e[5]=o,e[6]=a,e[7]=l,e[8]=c,e}function Z5(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function J5(e,t){let n=t[0],r=t[1],i=t[2],s=t[3],o=t[4],a=t[5],l=t[6],c=t[7],d=t[8],f=d*o-a*c,u=-d*s+a*l,h=c*s-o*l,p=n*f+r*u+i*h;return p?(p=1/p,e[0]=f*p,e[1]=(-d*r+i*c)*p,e[2]=(a*r-i*o)*p,e[3]=u*p,e[4]=(d*n-i*l)*p,e[5]=(-a*n+i*s)*p,e[6]=h*p,e[7]=(-c*n+r*l)*p,e[8]=(o*n-r*s)*p,e):null}function ih(e,t,n){let r=t[0],i=t[1],s=t[2],o=t[3],a=t[4],l=t[5],c=t[6],d=t[7],f=t[8],u=n[0],h=n[1],p=n[2],m=n[3],w=n[4],y=n[5],v=n[6],x=n[7],S=n[8];return e[0]=u*r+h*o+p*c,e[1]=u*i+h*a+p*d,e[2]=u*s+h*l+p*f,e[3]=m*r+w*o+y*c,e[4]=m*i+w*a+y*d,e[5]=m*s+w*l+y*f,e[6]=v*r+x*o+S*c,e[7]=v*i+x*a+S*d,e[8]=v*s+x*l+S*f,e}function ek(e,t,n){let r=t[0],i=t[1],s=t[2],o=t[3],a=t[4],l=t[5],c=t[6],d=t[7],f=t[8],u=n[0],h=n[1];return e[0]=r,e[1]=i,e[2]=s,e[3]=o,e[4]=a,e[5]=l,e[6]=u*r+h*o+c,e[7]=u*i+h*a+d,e[8]=u*s+h*l+f,e}function tk(e,t,n){let r=t[0],i=t[1],s=t[2],o=t[3],a=t[4],l=t[5],c=t[6],d=t[7],f=t[8],u=Math.sin(n),h=Math.cos(n);return e[0]=h*r+u*o,e[1]=h*i+u*a,e[2]=h*s+u*l,e[3]=h*o-u*r,e[4]=h*a-u*i,e[5]=h*l-u*s,e[6]=c,e[7]=d,e[8]=f,e}function nk(e,t,n){let r=n[0],i=n[1];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=i*t[3],e[4]=i*t[4],e[5]=i*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function rk(e,t){let n=t[0],r=t[1],i=t[2],s=t[3],o=t[4],a=t[5],l=t[6],c=t[7],d=t[8],f=t[9],u=t[10],h=t[11],p=t[12],m=t[13],w=t[14],y=t[15],v=n*a-r*o,x=n*l-i*o,S=n*c-s*o,k=r*l-i*a,P=r*c-s*a,C=i*c-s*l,E=d*m-f*p,N=d*w-u*p,M=d*y-h*p,I=f*w-u*m,A=f*y-h*m,B=u*y-h*w,L=v*B-x*A+S*I+k*M-P*N+C*E;return L?(L=1/L,e[0]=(a*B-l*A+c*I)*L,e[1]=(l*M-o*B-c*N)*L,e[2]=(o*A-a*M+c*E)*L,e[3]=(i*A-r*B-s*I)*L,e[4]=(n*B-i*M+s*N)*L,e[5]=(r*M-n*A-s*E)*L,e[6]=(m*C-w*P+y*k)*L,e[7]=(w*S-p*C-y*x)*L,e[8]=(p*P-m*S+y*v)*L,e):null}class ik extends Array{constructor(t=1,n=0,r=0,i=0,s=1,o=0,a=0,l=0,c=1){return super(t,n,r,i,s,o,a,l,c),this}set(t,n,r,i,s,o,a,l,c){return t.length?this.copy(t):(X5(this,t,n,r,i,s,o,a,l,c),this)}translate(t,n=this){return ek(this,n,t),this}rotate(t,n=this){return tk(this,n,t),this}scale(t,n=this){return nk(this,n,t),this}multiply(t,n){return n?ih(this,t,n):ih(this,this,t),this}identity(){return Z5(this),this}copy(t){return Q5(this,t),this}fromMatrix4(t){return Y5(this,t),this}fromQuaternion(t){return K5(this,t),this}fromBasis(t,n,r){return this.set(t[0],t[1],t[2],n[0],n[1],n[2],r[0],r[1],r[2]),this}inverse(t=this){return J5(this,t),this}getNormalMatrix(t){return rk(this,t),this}}let sk=0;class ok extends G5{constructor(t,{geometry:n,program:r,mode:i=t.TRIANGLES,frustumCulled:s=!0,renderOrder:o=0}={}){super(),t.canvas||console.error("gl not passed as first argument to Mesh"),this.gl=t,this.id=sk++,this.geometry=n,this.program=r,this.mode=i,this.frustumCulled=s,this.renderOrder=o,this.modelViewMatrix=new ao,this.normalMatrix=new ik,this.beforeRenderCallbacks=[],this.afterRenderCallbacks=[]}onBeforeRender(t){return this.beforeRenderCallbacks.push(t),this}onAfterRender(t){return this.afterRenderCallbacks.push(t),this}draw({camera:t}={}){t&&(this.program.uniforms.modelMatrix||Object.assign(this.program.uniforms,{modelMatrix:{value:null},viewMatrix:{value:null},modelViewMatrix:{value:null},normalMatrix:{value:null},projectionMatrix:{value:null},cameraPosition:{value:null}}),this.program.uniforms.projectionMatrix.value=t.projectionMatrix,this.program.uniforms.cameraPosition.value=t.worldPosition,this.program.uniforms.viewMatrix.value=t.viewMatrix,this.modelViewMatrix.multiply(t.viewMatrix,this.worldMatrix),this.normalMatrix.getNormalMatrix(this.modelViewMatrix),this.program.uniforms.modelMatrix.value=this.worldMatrix,this.program.uniforms.modelViewMatrix.value=this.modelViewMatrix,this.program.uniforms.normalMatrix.value=this.normalMatrix),this.beforeRenderCallbacks.forEach(r=>r&&r({mesh:this,camera:t}));let n=this.program.cullFace&&this.worldMatrix.determinant()<0;this.program.use({flipFaces:n}),this.geometry.draw({mode:this.mode,program:this.program}),this.afterRenderCallbacks.forEach(r=>r&&r({mesh:this,camera:t}))}}function ak(e,t){return e[0]=t[0],e[1]=t[1],e}function lk(e,t,n){return e[0]=t,e[1]=n,e}function sh(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function oh(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function uk(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e}function ck(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e}function Ma(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function dk(e,t){var n=t[0]-e[0],r=t[1]-e[1];return Math.sqrt(n*n+r*r)}function fk(e,t){var n=t[0]-e[0],r=t[1]-e[1];return n*n+r*r}function ah(e){var t=e[0],n=e[1];return Math.sqrt(t*t+n*n)}function hk(e){var t=e[0],n=e[1];return t*t+n*n}function pk(e,t){return e[0]=-t[0],e[1]=-t[1],e}function mk(e,t){return e[0]=1/t[0],e[1]=1/t[1],e}function gk(e,t){var n=t[0],r=t[1],i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i)),e[0]=t[0]*i,e[1]=t[1]*i,e}function yk(e,t){return e[0]*t[0]+e[1]*t[1]}function lh(e,t){return e[0]*t[1]-e[1]*t[0]}function vk(e,t,n,r){var i=t[0],s=t[1];return e[0]=i+r*(n[0]-i),e[1]=s+r*(n[1]-s),e}function xk(e,t,n,r,i){const s=Math.exp(-r*i);let o=t[0],a=t[1];return e[0]=n[0]+(o-n[0])*s,e[1]=n[1]+(a-n[1])*s,e}function wk(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[3]*i+n[6],e[1]=n[1]*r+n[4]*i+n[7],e}function Sk(e,t,n){let r=t[0],i=t[1];return e[0]=n[0]*r+n[4]*i+n[12],e[1]=n[1]*r+n[5]*i+n[13],e}function kk(e,t){return e[0]===t[0]&&e[1]===t[1]}class hc extends Array{constructor(t=0,n=t){return super(t,n),this}get x(){return this[0]}get y(){return this[1]}set x(t){this[0]=t}set y(t){this[1]=t}set(t,n=t){return t.length?this.copy(t):(lk(this,t,n),this)}copy(t){return ak(this,t),this}add(t,n){return n?sh(this,t,n):sh(this,this,t),this}sub(t,n){return n?oh(this,t,n):oh(this,this,t),this}multiply(t){return t.length?uk(this,this,t):Ma(this,this,t),this}divide(t){return t.length?ck(this,this,t):Ma(this,this,1/t),this}inverse(t=this){return mk(this,t),this}len(){return ah(this)}distance(t){return t?dk(this,t):ah(this)}squaredLen(){return this.squaredDistance()}squaredDistance(t){return t?fk(this,t):hk(this)}negate(t=this){return pk(this,t),this}cross(t,n){return n?lh(t,n):lh(this,t)}scale(t){return Ma(this,this,t),this}normalize(){return gk(this,this),this}dot(t){return yk(this,t)}equals(t){return kk(this,t)}applyMatrix3(t){return wk(this,this,t),this}applyMatrix4(t){return Sk(this,this,t),this}lerp(t,n){return vk(this,this,t,n),this}smoothLerp(t,n,r){return xk(this,this,t,n,r),this}clone(){return new hc(this[0],this[1])}fromArray(t,n=0){return this[0]=t[n],this[1]=t[n+1],this}toArray(t=[],n=0){return t[n]=this[0],t[n+1]=this[1],t}}class bk extends t5{constructor(t,{attributes:n={}}={}){Object.assign(n,{position:{size:2,data:new Float32Array([-1,-1,3,-1,-1,3])},uv:{size:2,data:new Float32Array([0,0,2,0,0,2])}}),super(t,n)}}const Pk=`
|
|
attribute vec2 position;
|
|
void main(){gl_Position=vec4(position,0.0,1.0);}
|
|
`,Ck=`
|
|
#ifdef GL_ES
|
|
precision lowp float;
|
|
#endif
|
|
uniform vec2 uResolution;
|
|
uniform float uTime;
|
|
uniform float uHueShift;
|
|
uniform float uNoise;
|
|
uniform float uScan;
|
|
uniform float uScanFreq;
|
|
uniform float uWarp;
|
|
#define iTime uTime
|
|
#define iResolution uResolution
|
|
|
|
vec4 buf[8];
|
|
float rand(vec2 c){return fract(sin(dot(c,vec2(12.9898,78.233)))*43758.5453);}
|
|
|
|
mat3 rgb2yiq=mat3(0.299,0.587,0.114,0.596,-0.274,-0.322,0.211,-0.523,0.312);
|
|
mat3 yiq2rgb=mat3(1.0,0.956,0.621,1.0,-0.272,-0.647,1.0,-1.106,1.703);
|
|
|
|
vec3 hueShiftRGB(vec3 col,float deg){
|
|
vec3 yiq=rgb2yiq*col;
|
|
float rad=radians(deg);
|
|
float cosh=cos(rad),sinh=sin(rad);
|
|
vec3 yiqShift=vec3(yiq.x,yiq.y*cosh-yiq.z*sinh,yiq.y*sinh+yiq.z*cosh);
|
|
return clamp(yiq2rgb*yiqShift,0.0,1.0);
|
|
}
|
|
|
|
vec4 sigmoid(vec4 x){return 1./(1.+exp(-x));}
|
|
|
|
vec4 cppn_fn(vec2 coordinate,float in0,float in1,float in2){
|
|
buf[6]=vec4(coordinate.x,coordinate.y,0.3948333106474662+in0,0.36+in1);
|
|
buf[7]=vec4(0.14+in2,sqrt(coordinate.x*coordinate.x+coordinate.y*coordinate.y),0.,0.);
|
|
buf[0]=mat4(vec4(6.5404263,-3.6126034,0.7590882,-1.13613),vec4(2.4582713,3.1660357,1.2219609,0.06276096),vec4(-5.478085,-6.159632,1.8701609,-4.7742867),vec4(6.039214,-5.542865,-0.90925294,3.251348))*buf[6]+mat4(vec4(0.8473259,-5.722911,3.975766,1.6522468),vec4(-0.24321538,0.5839259,-1.7661959,-5.350116),vec4(0.,0.,0.,0.),vec4(0.,0.,0.,0.))*buf[7]+vec4(0.21808943,1.1243913,-1.7969975,5.0294676);
|
|
buf[1]=mat4(vec4(-3.3522482,-6.0612736,0.55641043,-4.4719114),vec4(0.8631464,1.7432913,5.643898,1.6106541),vec4(2.4941394,-3.5012043,1.7184316,6.357333),vec4(3.310376,8.209261,1.1355612,-1.165539))*buf[6]+mat4(vec4(5.24046,-13.034365,0.009859298,15.870829),vec4(2.987511,3.129433,-0.89023495,-1.6822904),vec4(0.,0.,0.,0.),vec4(0.,0.,0.,0.))*buf[7]+vec4(-5.9457836,-6.573602,-0.8812491,1.5436668);
|
|
buf[0]=sigmoid(buf[0]);buf[1]=sigmoid(buf[1]);
|
|
buf[2]=mat4(vec4(-15.219568,8.095543,-2.429353,-1.9381982),vec4(-5.951362,4.3115187,2.6393783,1.274315),vec4(-7.3145227,6.7297835,5.2473326,5.9411426),vec4(5.0796127,8.979051,-1.7278991,-1.158976))*buf[6]+mat4(vec4(-11.967154,-11.608155,6.1486754,11.237008),vec4(2.124141,-6.263192,-1.7050359,-0.7021966),vec4(0.,0.,0.,0.),vec4(0.,0.,0.,0.))*buf[7]+vec4(-4.17164,-3.2281182,-4.576417,-3.6401186);
|
|
buf[3]=mat4(vec4(3.1832156,-13.738922,1.879223,3.233465),vec4(0.64300746,12.768129,1.9141049,0.50990224),vec4(-0.049295485,4.4807224,1.4733979,1.801449),vec4(5.0039253,13.000481,3.3991797,-4.5561905))*buf[6]+mat4(vec4(-0.1285731,7.720628,-3.1425676,4.742367),vec4(0.6393625,3.714393,-0.8108378,-0.39174938),vec4(0.,0.,0.,0.),vec4(0.,0.,0.,0.))*buf[7]+vec4(-1.1811101,-21.621881,0.7851888,1.2329718);
|
|
buf[2]=sigmoid(buf[2]);buf[3]=sigmoid(buf[3]);
|
|
buf[4]=mat4(vec4(5.214916,-7.183024,2.7228765,2.6592617),vec4(-5.601878,-25.3591,4.067988,0.4602802),vec4(-10.57759,24.286327,21.102104,37.546658),vec4(4.3024497,-1.9625226,2.3458803,-1.372816))*buf[0]+mat4(vec4(-17.6526,-10.507558,2.2587414,12.462782),vec4(6.265566,-502.75443,-12.642513,0.9112289),vec4(-10.983244,20.741234,-9.701768,-0.7635988),vec4(5.383626,1.4819539,-4.1911616,-4.8444734))*buf[1]+mat4(vec4(12.785233,-16.345072,-0.39901125,1.7955981),vec4(-30.48365,-1.8345358,1.4542528,-1.1118771),vec4(19.872723,-7.337935,-42.941723,-98.52709),vec4(8.337645,-2.7312303,-2.2927687,-36.142323))*buf[2]+mat4(vec4(-16.298317,3.5471997,-0.44300047,-9.444417),vec4(57.5077,-35.609753,16.163465,-4.1534753),vec4(-0.07470326,-3.8656476,-7.0901804,3.1523974),vec4(-12.559385,-7.077619,1.490437,-0.8211543))*buf[3]+vec4(-7.67914,15.927437,1.3207729,-1.6686112);
|
|
buf[5]=mat4(vec4(-1.4109162,-0.372762,-3.770383,-21.367174),vec4(-6.2103205,-9.35908,0.92529047,8.82561),vec4(11.460242,-22.348068,13.625772,-18.693201),vec4(-0.3429052,-3.9905605,-2.4626114,-0.45033523))*buf[0]+mat4(vec4(7.3481627,-4.3661838,-6.3037653,-3.868115),vec4(1.5462853,6.5488915,1.9701879,-0.58291394),vec4(6.5858274,-2.2180402,3.7127688,-1.3730392),vec4(-5.7973905,10.134961,-2.3395722,-5.965605))*buf[1]+mat4(vec4(-2.5132585,-6.6685553,-1.4029363,-0.16285264),vec4(-0.37908727,0.53738135,4.389061,-1.3024765),vec4(-0.70647055,2.0111287,-5.1659346,-3.728635),vec4(-13.562562,10.487719,-0.9173751,-2.6487076))*buf[2]+mat4(vec4(-8.645013,6.5546675,-6.3944063,-5.5933375),vec4(-0.57783127,-1.077275,36.91025,5.736769),vec4(14.283112,3.7146652,7.1452246,-4.5958776),vec4(2.7192075,3.6021907,-4.366337,-2.3653464))*buf[3]+vec4(-5.9000807,-4.329569,1.2427121,8.59503);
|
|
buf[4]=sigmoid(buf[4]);buf[5]=sigmoid(buf[5]);
|
|
buf[6]=mat4(vec4(-1.61102,0.7970257,1.4675229,0.20917463),vec4(-28.793737,-7.1390953,1.5025433,4.656581),vec4(-10.94861,39.66238,0.74318546,-10.095605),vec4(-0.7229728,-1.5483948,0.7301322,2.1687684))*buf[0]+mat4(vec4(3.2547753,21.489103,-1.0194173,-3.3100595),vec4(-3.7316632,-3.3792162,-7.223193,-0.23685838),vec4(13.1804495,0.7916005,5.338587,5.687114),vec4(-4.167605,-17.798311,-6.815736,-1.6451967))*buf[1]+mat4(vec4(0.604885,-7.800309,-7.213122,-2.741014),vec4(-3.522382,-0.12359311,-0.5258442,0.43852118),vec4(9.6752825,-22.853785,2.062431,0.099892326),vec4(-4.3196306,-17.730087,2.5184598,5.30267))*buf[2]+mat4(vec4(-6.545563,-15.790176,-6.0438633,-5.415399),vec4(-43.591583,28.551912,-16.00161,18.84728),vec4(4.212382,8.394307,3.0958717,8.657522),vec4(-5.0237565,-4.450633,-4.4768,-5.5010443))*buf[3]+mat4(vec4(1.6985557,-67.05806,6.897715,1.9004834),vec4(1.8680354,2.3915145,2.5231109,4.081538),vec4(11.158006,1.7294737,2.0738268,7.386411),vec4(-4.256034,-306.24686,8.258898,-17.132736))*buf[4]+mat4(vec4(1.6889864,-4.5852966,3.8534803,-6.3482175),vec4(1.3543309,-1.2640043,9.932754,2.9079645),vec4(-5.2770967,0.07150358,-0.13962056,3.3269649),vec4(28.34703,-4.918278,6.1044083,4.085355))*buf[5]+vec4(6.6818056,12.522166,-3.7075126,-4.104386);
|
|
buf[7]=mat4(vec4(-8.265602,-4.7027016,5.098234,0.7509808),vec4(8.6507845,-17.15949,16.51939,-8.884479),vec4(-4.036479,-2.3946867,-2.6055532,-1.9866527),vec4(-2.2167742,-1.8135649,-5.9759874,4.8846445))*buf[0]+mat4(vec4(6.7790847,3.5076547,-2.8191125,-2.7028968),vec4(-5.743024,-0.27844876,1.4958696,-5.0517144),vec4(13.122226,15.735168,-2.9397483,-4.101023),vec4(-14.375265,-5.030483,-6.2599335,2.9848232))*buf[1]+mat4(vec4(4.0950394,-0.94011575,-5.674733,4.755022),vec4(4.3809423,4.8310084,1.7425908,-3.437416),vec4(2.117492,0.16342592,-104.56341,16.949184),vec4(-5.22543,-2.994248,3.8350096,-1.9364246))*buf[2]+mat4(vec4(-5.900337,1.7946124,-13.604192,-3.8060522),vec4(6.6583457,31.911177,25.164474,91.81147),vec4(11.840538,4.1503043,-0.7314397,6.768467),vec4(-6.3967767,4.034772,6.1714606,-0.32874924))*buf[3]+mat4(vec4(3.4992442,-196.91893,-8.923708,2.8142626),vec4(3.4806502,-3.1846354,5.1725626,5.1804223),vec4(-2.4009497,15.585794,1.2863957,2.0252278),vec4(-71.25271,-62.441242,-8.138444,0.50670296))*buf[4]+mat4(vec4(-12.291733,-11.176166,-7.3474145,4.390294),vec4(10.805477,5.6337385,-0.9385842,-4.7348723),vec4(-12.869276,-7.039391,5.3029537,7.5436664),vec4(1.4593618,8.91898,3.5101583,5.840625))*buf[5]+vec4(2.2415268,-6.705987,-0.98861027,-2.117676);
|
|
buf[6]=sigmoid(buf[6]);buf[7]=sigmoid(buf[7]);
|
|
buf[0]=mat4(vec4(1.6794263,1.3817469,2.9625452,0.),vec4(-1.8834411,-1.4806935,-3.5924516,0.),vec4(-1.3279216,-1.0918057,-2.3124623,0.),vec4(0.2662234,0.23235129,0.44178495,0.))*buf[0]+mat4(vec4(-0.6299101,-0.5945583,-0.9125601,0.),vec4(0.17828953,0.18300213,0.18182953,0.),vec4(-2.96544,-2.5819945,-4.9001055,0.),vec4(1.4195864,1.1868085,2.5176322,0.))*buf[1]+mat4(vec4(-1.2584374,-1.0552157,-2.1688404,0.),vec4(-0.7200217,-0.52666044,-1.438251,0.),vec4(0.15345335,0.15196142,0.272854,0.),vec4(0.945728,0.8861938,1.2766753,0.))*buf[2]+mat4(vec4(-2.4218085,-1.968602,-4.35166,0.),vec4(-22.683098,-18.0544,-41.954372,0.),vec4(0.63792,0.5470648,1.1078634,0.),vec4(-1.5489894,-1.3075932,-2.6444845,0.))*buf[3]+mat4(vec4(-0.49252132,-0.39877754,-0.91366625,0.),vec4(0.95609266,0.7923952,1.640221,0.),vec4(0.30616966,0.15693925,0.8639857,0.),vec4(1.1825981,0.94504964,2.176963,0.))*buf[4]+mat4(vec4(0.35446745,0.3293795,0.59547555,0.),vec4(-0.58784515,-0.48177817,-1.0614829,0.),vec4(2.5271258,1.9991658,4.6846647,0.),vec4(0.13042648,0.08864098,0.30187556,0.))*buf[5]+mat4(vec4(-1.7718065,-1.4033192,-3.3355875,0.),vec4(3.1664357,2.638297,5.378702,0.),vec4(-3.1724713,-2.6107926,-5.549295,0.),vec4(-2.851368,-2.249092,-5.3013067,0.))*buf[6]+mat4(vec4(1.5203838,1.2212278,2.8404984,0.),vec4(1.5210563,1.2651345,2.683903,0.),vec4(2.9789467,2.4364579,5.2347264,0.),vec4(2.2270417,1.8825914,3.8028636,0.))*buf[7]+vec4(-1.5468478,-3.6171484,0.24762098,0.);
|
|
buf[0]=sigmoid(buf[0]);
|
|
return vec4(buf[0].x,buf[0].y,buf[0].z,1.);
|
|
}
|
|
|
|
void mainImage(out vec4 fragColor,in vec2 fragCoord){
|
|
vec2 uv=fragCoord/uResolution.xy*2.-1.;
|
|
uv.y*=-1.;
|
|
uv+=uWarp*vec2(sin(uv.y*6.283+uTime*0.5),cos(uv.x*6.283+uTime*0.5))*0.05;
|
|
fragColor=cppn_fn(uv,0.1*sin(0.3*uTime),0.1*sin(0.69*uTime),0.1*sin(0.44*uTime));
|
|
}
|
|
|
|
void main(){
|
|
vec4 col;mainImage(col,gl_FragCoord.xy);
|
|
col.rgb=hueShiftRGB(col.rgb,uHueShift);
|
|
float scanline_val=sin(gl_FragCoord.y*uScanFreq)*0.5+0.5;
|
|
col.rgb*=1.-(scanline_val*scanline_val)*uScan;
|
|
col.rgb+=(rand(gl_FragCoord.xy+uTime)-0.5)*uNoise;
|
|
gl_FragColor=vec4(clamp(col.rgb,0.0,1.0),1.0);
|
|
}
|
|
`;class Ek extends b.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("ErrorBoundary caught an error:",t,n)}render(){return this.state.hasError?this.props.fallback||g.jsx("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",background:"radial-gradient(circle at center, rgba(0,0,0,0.8) 0%, rgba(0,0,0,1) 100%)",zIndex:-1,pointerEvents:"none"}}):this.props.children}}function Tk({hueShift:e=30,noiseIntensity:t=.02,scanlineIntensity:n=.05,speed:r=.3,scanlineFrequency:i=.4,warpAmount:s=.1,resolutionScale:o=.5}){const a=b.useRef(null);return b.useEffect(()=>{const l=a.current;if(!l){console.error("DarkVeil: Canvas not found");return}let c,d,f;try{c=new l5({dpr:Math.min(window.devicePixelRatio,2),canvas:l});const w=c.gl;if(!w){console.error("DarkVeil: WebGL context not available");return}const y=new bk(w);d=new r5(w,{vertex:Pk,fragment:Ck,uniforms:{uTime:{value:0},uResolution:{value:new hc},uHueShift:{value:e},uNoise:{value:t},uScan:{value:n},uScanFreq:{value:i},uWarp:{value:s}}}),f=new ok(w,{geometry:y,program:d}),console.log("DarkVeil: Successfully initialized")}catch(w){console.error("DarkVeil: Initialization error:",w);return}const u=()=>{const w=window.innerWidth,y=window.innerHeight;c.setSize(w*o,y*o),d.uniforms.uResolution.value.set(w,y)};window.addEventListener("resize",u),u();const h=performance.now();let p=0;const m=()=>{d.uniforms.uTime.value=(performance.now()-h)/1e3*r,d.uniforms.uHueShift.value=e,d.uniforms.uNoise.value=t,d.uniforms.uScan.value=n,d.uniforms.uScanFreq.value=i,d.uniforms.uWarp.value=s,c.render({scene:f}),p=requestAnimationFrame(m)};return m(),()=>{cancelAnimationFrame(p),window.removeEventListener("resize",u)}},[e,t,n,r,i,s,o]),g.jsxs(g.Fragment,{children:[g.jsx("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",background:"radial-gradient(circle at center, rgba(20,10,30,0.9) 0%, rgba(0,0,0,1) 100%)",zIndex:-2,pointerEvents:"none"}}),g.jsx("canvas",{ref:a,style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",zIndex:-1,pointerEvents:"none"}})]})}function uh(e){return g.jsx(Ek,{children:g.jsx(Tk,{...e})})}/**
|
|
* @license lucide-react v0.294.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/var jk={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
* @license lucide-react v0.294.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Mk=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),X=(e,t)=>{const n=b.forwardRef(({color:r="currentColor",size:i=24,strokeWidth:s=2,absoluteStrokeWidth:o,className:a="",children:l,...c},d)=>b.createElement("svg",{ref:d,...jk,width:i,height:i,stroke:r,strokeWidth:o?Number(s)*24/Number(i):s,className:["lucide",`lucide-${Mk(e)}`,a].join(" "),...c},[...t.map(([f,u])=>b.createElement(f,u)),...Array.isArray(l)?l:[l]]));return n.displayName=`${e}`,n};/**
|
|
* @license lucide-react v0.294.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Nk=X("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
* @license lucide-react v0.294.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const _k=X("Calendar",[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",ry:"2",key:"eu3xkr"}],["line",{x1:"16",x2:"16",y1:"2",y2:"6",key:"m3sa8f"}],["line",{x1:"8",x2:"8",y1:"2",y2:"6",key:"18kwsl"}],["line",{x1:"3",x2:"21",y1:"10",y2:"10",key:"xt86sb"}]]);/**
|
|
* @license lucide-react v0.294.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Ak=X("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/**
|
|
* @license lucide-react v0.294.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Lk=X("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
* @license lucide-react v0.294.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const pc=X("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
* @license lucide-react v0.294.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Sg=X("ExternalLink",[["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}],["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["line",{x1:"10",x2:"21",y1:"14",y2:"3",key:"18c3s4"}]]);/**
|
|
* @license lucide-react v0.294.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Xe=X("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
|
|
* @license lucide-react v0.294.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Dk=X("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
* @license lucide-react v0.294.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const ch=X("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
|
|
* @license lucide-react v0.294.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Rk=X("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
|
|
* @license lucide-react v0.294.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const jt=X("Music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);/**
|
|
* @license lucide-react v0.294.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Vk=X("Pause",[["rect",{width:"4",height:"16",x:"6",y:"4",key:"iffhe4"}],["rect",{width:"4",height:"16",x:"14",y:"4",key:"sjin7j"}]]);/**
|
|
* @license lucide-react v0.294.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const kg=X("PlayCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/**
|
|
* @license lucide-react v0.294.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const dh=X("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]);/**
|
|
* @license lucide-react v0.294.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const mc=X("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
* @license lucide-react v0.294.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const an=X("Sparkles",[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]]);/**
|
|
* @license lucide-react v0.294.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Fk=X("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/**
|
|
* @license lucide-react v0.294.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const zk=X("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
* @license lucide-react v0.294.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Ok=X("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
|
|
* @license lucide-react v0.294.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const lo=X("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
|
|
* @license lucide-react v0.294.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const bg=X("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
|
|
* @license lucide-react v0.294.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Ik=X("Volume2",[["polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5",key:"16drj5"}],["path",{d:"M15.54 8.46a5 5 0 0 1 0 7.07",key:"ltjumu"}],["path",{d:"M19.07 4.93a10 10 0 0 1 0 14.14",key:"1kegas"}]]);/**
|
|
* @license lucide-react v0.294.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const $k=X("Wand2",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72Z",key:"1bcowg"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]);/**
|
|
* @license lucide-react v0.294.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Bk=X("XCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
* @license lucide-react v0.294.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Uk=X("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Pg(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Pg(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Wk(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Pg(e))&&(r&&(r+=" "),r+=t);return r}const gc="-",Hk=e=>{const t=Gk(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(gc);return a[0]===""&&a.length!==1&&a.shift(),Cg(a,t)||qk(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},Cg=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?Cg(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(gc);return(o=t.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},fh=/^\[(.+)\]$/,qk=e=>{if(fh.test(e)){const t=fh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Gk=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Kk(Object.entries(e.classGroups),n).forEach(([s,o])=>{Hl(o,r,s,t)}),r},Hl=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:hh(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(Yk(i)){Hl(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{Hl(o,hh(t,s),n,r)})})},hh=(e,t)=>{let n=e;return t.split(gc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Yk=e=>e.isThemeGetter,Kk=(e,t)=>t?e.map(([n,r])=>{const i=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,a])=>[t+o,a])):s);return[n,i]}):e,Qk=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,o)=>{n.set(s,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let o=n.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){n.has(s)?n.set(s,o):i(s,o)}}},Eg="!",Xk=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],s=t.length,o=a=>{const l=[];let c=0,d=0,f;for(let w=0;w<a.length;w++){let y=a[w];if(c===0){if(y===i&&(r||a.slice(w,w+s)===t)){l.push(a.slice(d,w)),d=w+s;continue}if(y==="/"){f=w;continue}}y==="["?c++:y==="]"&&c--}const u=l.length===0?a:a.substring(d),h=u.startsWith(Eg),p=h?u.substring(1):u,m=f&&f>d?f-d:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}};return n?a=>n({className:a,parseClassName:o}):o},Zk=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},Jk=e=>({cache:Qk(e.cacheSize),parseClassName:Xk(e),...Hk(e)}),eb=/\s+/,tb=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],o=e.trim().split(eb);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:d,hasImportantModifier:f,baseClassName:u,maybePostfixModifierPosition:h}=n(c);let p=!!h,m=r(p?u.substring(0,h):u);if(!m){if(!p){a=c+(a.length>0?" "+a:a);continue}if(m=r(u),!m){a=c+(a.length>0?" "+a:a);continue}p=!1}const w=Zk(d).join(":"),y=f?w+Eg:w,v=y+m;if(s.includes(v))continue;s.push(v);const x=i(m,p);for(let S=0;S<x.length;++S){const k=x[S];s.push(y+k)}a=c+(a.length>0?" "+a:a)}return a};function nb(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Tg(t))&&(r&&(r+=" "),r+=n);return r}const Tg=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Tg(e[r]))&&(n&&(n+=" "),n+=t);return n};function rb(e,...t){let n,r,i,s=o;function o(l){const c=t.reduce((d,f)=>f(d),e());return n=Jk(c),r=n.cache.get,i=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const d=tb(l,n);return i(l,d),d}return function(){return s(nb.apply(null,arguments))}}const G=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},jg=/^\[(?:([a-z-]+):)?(.+)\]$/i,ib=/^\d+\/\d+$/,sb=new Set(["px","full","screen"]),ob=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ab=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,lb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ub=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,cb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,vt=e=>pr(e)||sb.has(e)||ib.test(e),Ft=e=>Nr(e,"length",vb),pr=e=>!!e&&!Number.isNaN(Number(e)),Na=e=>Nr(e,"number",pr),$r=e=>!!e&&Number.isInteger(Number(e)),db=e=>e.endsWith("%")&&pr(e.slice(0,-1)),O=e=>jg.test(e),zt=e=>ob.test(e),fb=new Set(["length","size","percentage"]),hb=e=>Nr(e,fb,Mg),pb=e=>Nr(e,"position",Mg),mb=new Set(["image","url"]),gb=e=>Nr(e,mb,wb),yb=e=>Nr(e,"",xb),Br=()=>!0,Nr=(e,t,n)=>{const r=jg.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},vb=e=>ab.test(e)&&!lb.test(e),Mg=()=>!1,xb=e=>ub.test(e),wb=e=>cb.test(e),Sb=()=>{const e=G("colors"),t=G("spacing"),n=G("blur"),r=G("brightness"),i=G("borderColor"),s=G("borderRadius"),o=G("borderSpacing"),a=G("borderWidth"),l=G("contrast"),c=G("grayscale"),d=G("hueRotate"),f=G("invert"),u=G("gap"),h=G("gradientColorStops"),p=G("gradientColorStopPositions"),m=G("inset"),w=G("margin"),y=G("opacity"),v=G("padding"),x=G("saturate"),S=G("scale"),k=G("sepia"),P=G("skew"),C=G("space"),E=G("translate"),N=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto",O,t],A=()=>[O,t],B=()=>["",vt,Ft],L=()=>["auto",pr,O],me=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],H=()=>["solid","dashed","dotted","double","none"],Pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],j=()=>["start","end","center","between","around","evenly","stretch"],R=()=>["","0",O],z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>[pr,O];return{cacheSize:500,separator:":",theme:{colors:[Br],spacing:[vt,Ft],blur:["none","",zt,O],brightness:D(),borderColor:[e],borderRadius:["none","","full",zt,O],borderSpacing:A(),borderWidth:B(),contrast:D(),grayscale:R(),hueRotate:D(),invert:R(),gap:A(),gradientColorStops:[e],gradientColorStopPositions:[db,Ft],inset:I(),margin:I(),opacity:D(),padding:A(),saturate:D(),scale:D(),sepia:R(),skew:D(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",O]}],container:["container"],columns:[{columns:[zt]}],"break-after":[{"break-after":z()}],"break-before":[{"break-before":z()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...me(),O]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",$r,O]}],basis:[{basis:I()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",O]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",$r,O]}],"grid-cols":[{"grid-cols":[Br]}],"col-start-end":[{col:["auto",{span:["full",$r,O]},O]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[Br]}],"row-start-end":[{row:["auto",{span:[$r,O]},O]}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",O]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",O]}],gap:[{gap:[u]}],"gap-x":[{"gap-x":[u]}],"gap-y":[{"gap-y":[u]}],"justify-content":[{justify:["normal",...j()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...j(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...j(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",O,t]}],"min-w":[{"min-w":[O,t,"min","max","fit"]}],"max-w":[{"max-w":[O,t,"none","full","min","max","fit","prose",{screen:[zt]},zt]}],h:[{h:[O,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[O,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[O,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[O,t,"auto","min","max","fit"]}],"font-size":[{text:["base",zt,Ft]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Na]}],"font-family":[{font:[Br]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",O]}],"line-clamp":[{"line-clamp":["none",pr,Na]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",vt,O]}],"list-image":[{"list-image":["none",O]}],"list-style-type":[{list:["none","disc","decimal",O]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",vt,Ft]}],"underline-offset":[{"underline-offset":["auto",vt,O]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",O]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",O]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...me(),pb]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",hb]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},gb]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...H(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:H()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...H()]}],"outline-offset":[{"outline-offset":[vt,O]}],"outline-w":[{outline:[vt,Ft]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[vt,Ft]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",zt,yb]}],"shadow-color":[{shadow:[Br]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...Pe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Pe()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",zt,O]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[x]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",O]}],duration:[{duration:D()}],ease:[{ease:["linear","in","out","in-out",O]}],delay:[{delay:D()}],animate:[{animate:["none","spin","ping","pulse","bounce",O]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[$r,O]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",O]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",O]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",O]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[vt,Ft,Na]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},kb=rb(Sb);function ph(...e){return kb(Wk(e))}function Ng(e){const t=Math.floor(e/6e4),n=Math.floor(e%6e4/1e3);return`${t}:${n.toString().padStart(2,"0")}`}function Ni(e){const t=new Date(e),r=(new Date().getTime()-t.getTime())/(1e3*60*60);return r<1?`${Math.floor(r*60)}m ago`:r<24?`${Math.floor(r)}h ago`:`${Math.floor(r/24)}d ago`}const bb=()=>{var l,c;const[e,t]=b.useState(!1),{currentUser:n,partnerUser:r,logout:i}=Tt(),s=yn(),o=[{name:"Dashboard",href:"/",icon:Xe},{name:"Last Listened",href:"/last-listened",icon:jt},{name:"Mixed Playlist",href:"/mixed-playlist",icon:kg},{name:"Memory Lane",href:"/memory-lane",icon:an}],a=()=>{i(),localStorage.removeItem("spotify-user"),localStorage.removeItem("spotify-partner")};return g.jsx(V.nav,{initial:{y:-100,opacity:0},animate:{y:0,opacity:1},className:"glass-fluid border-b border-white/10 sticky top-0 z-50",children:g.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[g.jsxs("div",{className:"flex justify-between items-center h-16",children:[g.jsxs(bs,{to:"/",className:"flex items-center space-x-2",children:[g.jsx(V.div,{whileHover:{scale:1.1,rotate:5},className:"w-8 h-8 bg-gradient-to-br from-pink-500 to-red-500 rounded-full flex items-center justify-center",children:g.jsx(Xe,{className:"w-5 h-5 text-white"})}),g.jsx("span",{className:"text-xl font-bold gradient-text",children:"Our Musical Journey"})]}),g.jsx("div",{className:"hidden md:flex items-center space-x-1",children:o.map(d=>{const f=s.pathname===d.href;return g.jsxs(bs,{to:d.href,className:ph("flex items-center space-x-2 px-4 py-2 rounded-lg transition-all duration-300",f?"bg-spotify-green/20 text-spotify-green border border-spotify-green/30":"text-white/70 hover:text-white hover:bg-white/10"),children:[g.jsx(d.icon,{className:"w-4 h-4"}),g.jsx("span",{className:"font-medium",children:d.name})]},d.name)})}),g.jsxs("div",{className:"hidden md:flex items-center space-x-4",children:[r&&g.jsxs(V.div,{initial:{scale:0},animate:{scale:1},className:"flex items-center space-x-2 text-sm text-white/70",children:[g.jsx(lo,{className:"w-4 h-4"}),g.jsxs("span",{children:["+ ",(l=r.user)==null?void 0:l.display_name]})]}),g.jsxs(V.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:a,className:"flex items-center space-x-2 px-3 py-2 rounded-lg text-white/70 hover:text-white hover:bg-red-500/20 transition-all duration-300",children:[g.jsx(ch,{className:"w-4 h-4"}),g.jsx("span",{className:"hidden lg:block",children:"Logout"})]})]}),g.jsx("button",{onClick:()=>t(!e),className:"md:hidden p-2 rounded-lg text-white/70 hover:text-white hover:bg-white/10 transition-all duration-300",children:e?g.jsx(Uk,{className:"w-6 h-6"}):g.jsx(Rk,{className:"w-6 h-6"})})]}),e&&g.jsx(V.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"md:hidden py-4 border-t border-white/10",children:g.jsxs("div",{className:"space-y-2",children:[o.map(d=>{const f=s.pathname===d.href;return g.jsxs(bs,{to:d.href,onClick:()=>t(!1),className:ph("flex items-center space-x-3 px-4 py-3 rounded-lg transition-all duration-300",f?"bg-spotify-green/20 text-spotify-green border border-spotify-green/30":"text-white/70 hover:text-white hover:bg-white/10"),children:[g.jsx(d.icon,{className:"w-5 h-5"}),g.jsx("span",{className:"font-medium",children:d.name})]},d.name)}),g.jsxs("div",{className:"pt-4 border-t border-white/10",children:[r&&g.jsxs("div",{className:"flex items-center space-x-3 px-4 py-2 text-sm text-white/70",children:[g.jsx(lo,{className:"w-4 h-4"}),g.jsxs("span",{children:["Connected with ",(c=r.user)==null?void 0:c.display_name]})]}),g.jsxs("button",{onClick:a,className:"w-full flex items-center space-x-3 px-4 py-3 rounded-lg text-white/70 hover:text-white hover:bg-red-500/20 transition-all duration-300",children:[g.jsx(ch,{className:"w-5 h-5"}),g.jsx("span",{className:"font-medium",children:"Logout"})]})]})]})})]})})};var _g={exports:{}};(function(e){var t=function(){var n="https://api.spotify.com/v1",r=null,i=null,s=function(u,h){return u.abort=h,u},o=function(u,h){var p;if(i!==null){var m=i.defer();u(function(w){m.resolve(w)},function(w){m.reject(w)}),p=m.promise}else window.Promise&&(p=new window.Promise(u));return p?new s(p,h):null},a=function(){var u=Array.prototype.slice.call(arguments),h=u[0],p=u.slice(1);return h=h||{},p.forEach(function(m){for(var w in m)m.hasOwnProperty(w)&&(h[w]=m[w])}),h},l=function(u,h){var p="";for(var m in h)if(h.hasOwnProperty(m)){var w=h[m];p+=encodeURIComponent(m)+"="+encodeURIComponent(w)+"&"}return p.length>0&&(p=p.substring(0,p.length-1),u=u+"?"+p),u},c=function(u,h){var p=new XMLHttpRequest,m=function(w,y){function v(P){w&&w(P),h&&h(null,P)}function x(){y&&y(p),h&&h(p,null)}var S=u.type||"GET";if(p.open(S,l(u.url,u.params)),r&&p.setRequestHeader("Authorization","Bearer "+r),p.onreadystatechange=function(){if(p.readyState===4){var P=null;try{P=p.responseText?JSON.parse(p.responseText):""}catch(C){console.error(C)}p.status>=200&&p.status<300?v(P):x()}},S==="GET")p.send(null);else{var k=null;u.postData&&(u.contentType==="image/jpeg"?(k=u.postData,p.setRequestHeader("Content-Type",u.contentType)):(k=JSON.stringify(u.postData),p.setRequestHeader("Content-Type","application/json"))),p.send(k)}};return h?(m(),null):o(m,function(){p.abort()})},d=function(u,h,p,m){var w={},y=null;typeof h=="object"?(w=h,y=p):typeof h=="function"&&(y=h);var v=u.type||"GET";return v!=="GET"&&u.postData&&!m?u.postData=a(u.postData,w):u.params=a(u.params,w),c(u,y)},f=function(){};return f.prototype={constructor:t},f.prototype.getGeneric=function(u,h){var p={url:u};return d(p,h)},f.prototype.getMe=function(u,h){var p={url:n+"/me"};return d(p,u,h)},f.prototype.getMySavedTracks=function(u,h){var p={url:n+"/me/tracks"};return d(p,u,h)},f.prototype.addToMySavedTracks=function(u,h,p){var m={url:n+"/me/tracks",type:"PUT",postData:u};return d(m,h,p)},f.prototype.removeFromMySavedTracks=function(u,h,p){var m={url:n+"/me/tracks",type:"DELETE",postData:u};return d(m,h,p)},f.prototype.containsMySavedTracks=function(u,h,p){var m={url:n+"/me/tracks/contains",params:{ids:u.join(",")}};return d(m,h,p)},f.prototype.getMySavedAlbums=function(u,h){var p={url:n+"/me/albums"};return d(p,u,h)},f.prototype.addToMySavedAlbums=function(u,h,p){var m={url:n+"/me/albums",type:"PUT",postData:u};return d(m,h,p)},f.prototype.removeFromMySavedAlbums=function(u,h,p){var m={url:n+"/me/albums",type:"DELETE",postData:u};return d(m,h,p)},f.prototype.containsMySavedAlbums=function(u,h,p){var m={url:n+"/me/albums/contains",params:{ids:u.join(",")}};return d(m,h,p)},f.prototype.getMyTopArtists=function(u,h){var p={url:n+"/me/top/artists"};return d(p,u,h)},f.prototype.getMyTopTracks=function(u,h){var p={url:n+"/me/top/tracks"};return d(p,u,h)},f.prototype.getMyRecentlyPlayedTracks=function(u,h){var p={url:n+"/me/player/recently-played"};return d(p,u,h)},f.prototype.followUsers=function(u,h){var p={url:n+"/me/following/",type:"PUT",params:{ids:u.join(","),type:"user"}};return d(p,h)},f.prototype.followArtists=function(u,h){var p={url:n+"/me/following/",type:"PUT",params:{ids:u.join(","),type:"artist"}};return d(p,h)},f.prototype.followPlaylist=function(u,h,p){var m={url:n+"/playlists/"+u+"/followers",type:"PUT",postData:{}};return d(m,h,p)},f.prototype.unfollowUsers=function(u,h){var p={url:n+"/me/following/",type:"DELETE",params:{ids:u.join(","),type:"user"}};return d(p,h)},f.prototype.unfollowArtists=function(u,h){var p={url:n+"/me/following/",type:"DELETE",params:{ids:u.join(","),type:"artist"}};return d(p,h)},f.prototype.unfollowPlaylist=function(u,h){var p={url:n+"/playlists/"+u+"/followers",type:"DELETE"};return d(p,h)},f.prototype.isFollowingUsers=function(u,h){var p={url:n+"/me/following/contains",type:"GET",params:{ids:u.join(","),type:"user"}};return d(p,h)},f.prototype.isFollowingArtists=function(u,h){var p={url:n+"/me/following/contains",type:"GET",params:{ids:u.join(","),type:"artist"}};return d(p,h)},f.prototype.areFollowingPlaylist=function(u,h,p){var m={url:n+"/playlists/"+u+"/followers/contains",type:"GET",params:{ids:h.join(",")}};return d(m,p)},f.prototype.getFollowedArtists=function(u,h){var p={url:n+"/me/following",type:"GET",params:{type:"artist"}};return d(p,u,h)},f.prototype.getUser=function(u,h,p){var m={url:n+"/users/"+encodeURIComponent(u)};return d(m,h,p)},f.prototype.getUserPlaylists=function(u,h,p){var m;return typeof u=="string"?m={url:n+"/users/"+encodeURIComponent(u)+"/playlists"}:(m={url:n+"/me/playlists"},p=h,h=u),d(m,h,p)},f.prototype.getPlaylist=function(u,h,p){var m={url:n+"/playlists/"+u};return d(m,h,p)},f.prototype.getPlaylistTracks=function(u,h,p){var m={url:n+"/playlists/"+u+"/tracks"};return d(m,h,p)},f.prototype.getPlaylistCoverImage=function(u,h){var p={url:n+"/playlists/"+u+"/images"};return d(p,h)},f.prototype.createPlaylist=function(u,h,p){var m={url:n+"/users/"+encodeURIComponent(u)+"/playlists",type:"POST",postData:h};return d(m,h,p)},f.prototype.changePlaylistDetails=function(u,h,p){var m={url:n+"/playlists/"+u,type:"PUT",postData:h};return d(m,h,p)},f.prototype.addTracksToPlaylist=function(u,h,p,m){var w={url:n+"/playlists/"+u+"/tracks",type:"POST",postData:{uris:h}};return d(w,p,m,!0)},f.prototype.replaceTracksInPlaylist=function(u,h,p){var m={url:n+"/playlists/"+u+"/tracks",type:"PUT",postData:{uris:h}};return d(m,{},p)},f.prototype.reorderTracksInPlaylist=function(u,h,p,m,w){var y={url:n+"/playlists/"+u+"/tracks",type:"PUT",postData:{range_start:h,insert_before:p}};return d(y,m,w)},f.prototype.removeTracksFromPlaylist=function(u,h,p){var m=h.map(function(y){return typeof y=="string"?{uri:y}:y}),w={url:n+"/playlists/"+u+"/tracks",type:"DELETE",postData:{tracks:m}};return d(w,{},p)},f.prototype.removeTracksFromPlaylistWithSnapshotId=function(u,h,p,m){var w=h.map(function(v){return typeof v=="string"?{uri:v}:v}),y={url:n+"/playlists/"+u+"/tracks",type:"DELETE",postData:{tracks:w,snapshot_id:p}};return d(y,{},m)},f.prototype.removeTracksFromPlaylistInPositions=function(u,h,p,m){var w={url:n+"/playlists/"+u+"/tracks",type:"DELETE",postData:{positions:h,snapshot_id:p}};return d(w,{},m)},f.prototype.uploadCustomPlaylistCoverImage=function(u,h,p){var m={url:n+"/playlists/"+u+"/images",type:"PUT",postData:h.replace(/^data:image\/jpeg;base64,/,""),contentType:"image/jpeg"};return d(m,{},p)},f.prototype.getAlbum=function(u,h,p){var m={url:n+"/albums/"+u};return d(m,h,p)},f.prototype.getAlbumTracks=function(u,h,p){var m={url:n+"/albums/"+u+"/tracks"};return d(m,h,p)},f.prototype.getAlbums=function(u,h,p){var m={url:n+"/albums/",params:{ids:u.join(",")}};return d(m,h,p)},f.prototype.getTrack=function(u,h,p){var m={};return m.url=n+"/tracks/"+u,d(m,h,p)},f.prototype.getTracks=function(u,h,p){var m={url:n+"/tracks/",params:{ids:u.join(",")}};return d(m,h,p)},f.prototype.getArtist=function(u,h,p){var m={url:n+"/artists/"+u};return d(m,h,p)},f.prototype.getArtists=function(u,h,p){var m={url:n+"/artists/",params:{ids:u.join(",")}};return d(m,h,p)},f.prototype.getArtistAlbums=function(u,h,p){var m={url:n+"/artists/"+u+"/albums"};return d(m,h,p)},f.prototype.getArtistTopTracks=function(u,h,p,m){var w={url:n+"/artists/"+u+"/top-tracks",params:{country:h}};return d(w,p,m)},f.prototype.getArtistRelatedArtists=function(u,h,p){var m={url:n+"/artists/"+u+"/related-artists"};return d(m,h,p)},f.prototype.getFeaturedPlaylists=function(u,h){var p={url:n+"/browse/featured-playlists"};return d(p,u,h)},f.prototype.getNewReleases=function(u,h){var p={url:n+"/browse/new-releases"};return d(p,u,h)},f.prototype.getCategories=function(u,h){var p={url:n+"/browse/categories"};return d(p,u,h)},f.prototype.getCategory=function(u,h,p){var m={url:n+"/browse/categories/"+u};return d(m,h,p)},f.prototype.getCategoryPlaylists=function(u,h,p){var m={url:n+"/browse/categories/"+u+"/playlists"};return d(m,h,p)},f.prototype.search=function(u,h,p,m){var w={url:n+"/search/",params:{q:u,type:h.join(",")}};return d(w,p,m)},f.prototype.searchAlbums=function(u,h,p){return this.search(u,["album"],h,p)},f.prototype.searchArtists=function(u,h,p){return this.search(u,["artist"],h,p)},f.prototype.searchTracks=function(u,h,p){return this.search(u,["track"],h,p)},f.prototype.searchPlaylists=function(u,h,p){return this.search(u,["playlist"],h,p)},f.prototype.searchShows=function(u,h,p){return this.search(u,["show"],h,p)},f.prototype.searchEpisodes=function(u,h,p){return this.search(u,["episode"],h,p)},f.prototype.getAudioFeaturesForTrack=function(u,h){var p={};return p.url=n+"/audio-features/"+u,d(p,{},h)},f.prototype.getAudioFeaturesForTracks=function(u,h){var p={url:n+"/audio-features",params:{ids:u}};return d(p,{},h)},f.prototype.getAudioAnalysisForTrack=function(u,h){var p={};return p.url=n+"/audio-analysis/"+u,d(p,{},h)},f.prototype.getRecommendations=function(u,h){var p={url:n+"/recommendations"};return d(p,u,h)},f.prototype.getAvailableGenreSeeds=function(u){var h={url:n+"/recommendations/available-genre-seeds"};return d(h,{},u)},f.prototype.getMyDevices=function(u){var h={url:n+"/me/player/devices"};return d(h,{},u)},f.prototype.getMyCurrentPlaybackState=function(u,h){var p={url:n+"/me/player"};return d(p,u,h)},f.prototype.getMyCurrentPlayingTrack=function(u,h){var p={url:n+"/me/player/currently-playing"};return d(p,u,h)},f.prototype.transferMyPlayback=function(u,h,p){var m=h||{};m.device_ids=u;var w={type:"PUT",url:n+"/me/player",postData:m};return d(w,h,p)},f.prototype.play=function(u,h){u=u||{};var p="device_id"in u?{device_id:u.device_id}:null,m={};["context_uri","uris","offset","position_ms"].forEach(function(v){v in u&&(m[v]=u[v])});var w={type:"PUT",url:n+"/me/player/play",params:p,postData:m},y=typeof u=="function"?u:{};return d(w,y,h)},f.prototype.queue=function(u,h,p){h=h||{};var m="device_id"in h?{uri:u,device_id:h.device_id}:{uri:u},w={type:"POST",url:n+"/me/player/queue",params:m};return d(w,h,p)},f.prototype.pause=function(u,h){u=u||{};var p="device_id"in u?{device_id:u.device_id}:null,m={type:"PUT",url:n+"/me/player/pause",params:p};return d(m,u,h)},f.prototype.skipToNext=function(u,h){u=u||{};var p="device_id"in u?{device_id:u.device_id}:null,m={type:"POST",url:n+"/me/player/next",params:p};return d(m,u,h)},f.prototype.skipToPrevious=function(u,h){u=u||{};var p="device_id"in u?{device_id:u.device_id}:null,m={type:"POST",url:n+"/me/player/previous",params:p};return d(m,u,h)},f.prototype.seek=function(u,h,p){h=h||{};var m={position_ms:u};"device_id"in h&&(m.device_id=h.device_id);var w={type:"PUT",url:n+"/me/player/seek",params:m};return d(w,h,p)},f.prototype.setRepeat=function(u,h,p){h=h||{};var m={state:u};"device_id"in h&&(m.device_id=h.device_id);var w={type:"PUT",url:n+"/me/player/repeat",params:m};return d(w,h,p)},f.prototype.setVolume=function(u,h,p){h=h||{};var m={volume_percent:u};"device_id"in h&&(m.device_id=h.device_id);var w={type:"PUT",url:n+"/me/player/volume",params:m};return d(w,h,p)},f.prototype.setShuffle=function(u,h,p){h=h||{};var m={state:u};"device_id"in h&&(m.device_id=h.device_id);var w={type:"PUT",url:n+"/me/player/shuffle",params:m};return d(w,h,p)},f.prototype.getShow=function(u,h,p){var m={};return m.url=n+"/shows/"+u,d(m,h,p)},f.prototype.getShows=function(u,h,p){var m={url:n+"/shows/",params:{ids:u.join(",")}};return d(m,h,p)},f.prototype.getMySavedShows=function(u,h){var p={url:n+"/me/shows"};return d(p,u,h)},f.prototype.addToMySavedShows=function(u,h,p){var m={url:n+"/me/shows",type:"PUT",postData:u};return d(m,h,p)},f.prototype.removeFromMySavedShows=function(u,h,p){var m={url:n+"/me/shows",type:"DELETE",postData:u};return d(m,h,p)},f.prototype.containsMySavedShows=function(u,h,p){var m={url:n+"/me/shows/contains",params:{ids:u.join(",")}};return d(m,h,p)},f.prototype.getShowEpisodes=function(u,h,p){var m={url:n+"/shows/"+u+"/episodes"};return d(m,h,p)},f.prototype.getEpisode=function(u,h,p){var m={};return m.url=n+"/episodes/"+u,d(m,h,p)},f.prototype.getEpisodes=function(u,h,p){var m={url:n+"/episodes/",params:{ids:u.join(",")}};return d(m,h,p)},f.prototype.getAccessToken=function(){return r},f.prototype.setAccessToken=function(u){r=u},f.prototype.setPromiseImplementation=function(u){var h=!1;try{var p=new u(function(m){m()});typeof p.then=="function"&&typeof p.catch=="function"&&(h=!0)}catch(m){console.error(m)}if(h)i=u;else throw new Error("Unsupported implementation of Promises/A+")},f}();e.exports=t})(_g);var Pb=_g.exports;const Cb=ql(Pb),Ag="7cab80d02df44a5bb96725be60a45875",yc="https://159.195.9.107:3443/callback.html";console.log("🔍 Debug - Current redirect URI:",yc);console.log("🔍 Debug - Environment VITE_REDIRECT_URI:","https://159.195.9.107:3443/callback.html");const Fe=new Cb,Eb=()=>{const e=["user-read-private","user-read-email","user-read-recently-played","user-top-read","playlist-read-private","playlist-read-collaborative","user-read-playback-state","user-modify-playback-state","user-read-currently-playing"].join(" "),n=`https://accounts.spotify.com/authorize?${new URLSearchParams({client_id:Ag,response_type:"code",redirect_uri:yc,scope:e,show_dialog:"true"}).toString()}`;return console.log("🔍 Debug - Generated Spotify Auth URL:",n),n},Tb=async e=>{const t=await fetch("https://accounts.spotify.com/api/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:`Basic ${btoa(`${Ag}:8c8da787e3bf443e90c2c4b1bf1f19a3`)}`},body:new URLSearchParams({grant_type:"authorization_code",code:e,redirect_uri:yc})});if(!t.ok)throw new Error("Failed to exchange code for token");return t.json()},jb=async e=>(Fe.setAccessToken(e),Fe.getMe()),Mb=async(e,t=20)=>(Fe.setAccessToken(e),(await Fe.getMyRecentlyPlayedTracks({limit:t})).items),Nb=async(e,t="short_term",n=20)=>(Fe.setAccessToken(e),(await Fe.getMyTopTracks({time_range:t,limit:n})).items),_b=async(e,t,n,r)=>(Fe.setAccessToken(e),await Fe.createPlaylist(t,{name:n,description:r,public:!1})),Ab=async(e,t,n)=>{Fe.setAccessToken(e),await Fe.addTracksToPlaylist(t,n)},Lb=async(e,t)=>{Fe.setAccessToken(e),await Fe.play({uris:[t]})},Db=async e=>{Fe.setAccessToken(e),await Fe.pause()},Rb=(e,t,n="Our Mixed Vibes")=>[...e,...t].filter((l,c,d)=>c===d.findIndex(f=>f.id===l.id)).sort((l,c)=>c.popularity-l.popularity).slice(0,30).sort(()=>Math.random()-.5).slice(0,25),Vb=()=>{const[e,t]=b.useState(!1),n=()=>{t(!0),window.location.href=Eb()},r=[{icon:jt,title:"Last Listened",description:"Discover what your partner is listening to right now and play it instantly"},{icon:an,title:"Mixed Playlist",description:"AI-powered playlists that blend your musical tastes perfectly"},{icon:Xe,title:"Memory Lane",description:"Create beautiful musical memories and shared experiences together"}];return g.jsx("div",{className:"min-h-screen flex items-center justify-center px-4 bg-black",children:g.jsxs("div",{className:"max-w-4xl w-full relative",children:[g.jsxs(V.div,{initial:{opacity:0,y:50},animate:{opacity:1,y:0},transition:{duration:.8},className:"text-center mb-12",children:[g.jsx(V.div,{initial:{scale:0},animate:{scale:1},transition:{delay:.2,type:"spring",stiffness:200},className:"w-20 h-20 mx-auto mb-6 bg-gradient-to-br from-pink-500 to-red-500 rounded-full flex items-center justify-center",children:g.jsx(Xe,{className:"w-10 h-10 text-white"})}),g.jsxs("h1",{className:"text-5xl md:text-6xl font-bold mb-4",children:[g.jsx("span",{className:"gradient-text",children:"Our Musical"}),g.jsx("br",{}),g.jsx("span",{className:"text-white",children:"Journey"})]}),g.jsx("p",{className:"text-xl text-white/70 max-w-2xl mx-auto leading-relaxed",children:"A private space where two hearts connect through music. Discover, share, and create beautiful musical memories together."})]}),g.jsx(V.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{delay:.4,duration:.8},className:"grid md:grid-cols-3 gap-6 mb-12",children:r.map((i,s)=>g.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.5+s*.1},whileHover:{y:-8,scale:1.03},className:"glass-bubble rounded-3xl p-8 text-center group cursor-pointer",children:[g.jsx(V.div,{whileHover:{rotate:15,scale:1.15},className:"w-16 h-16 mx-auto mb-6 bg-gradient-to-br from-purple-500/30 via-blue-500/30 to-pink-500/30 rounded-2xl flex items-center justify-center backdrop-blur-sm",children:g.jsx(i.icon,{className:"w-8 h-8 text-white"})}),g.jsx("h3",{className:"text-2xl font-bold text-white mb-3",children:i.title}),g.jsx("p",{className:"text-white/70 text-sm leading-relaxed",children:i.description})]},i.title))}),g.jsxs(V.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:.8,duration:.6},className:"glass-fluid rounded-3xl p-10 max-w-lg mx-auto",children:[g.jsxs("div",{className:"text-center mb-8",children:[g.jsx(V.div,{initial:{scale:0},animate:{scale:1},transition:{delay:1,type:"spring",stiffness:200},className:"w-20 h-20 mx-auto mb-6 bg-gradient-to-br from-purple-500/30 via-blue-500/30 to-pink-500/30 rounded-2xl flex items-center justify-center backdrop-blur-sm",children:g.jsx(bg,{className:"w-10 h-10 text-white"})}),g.jsx("h2",{className:"text-3xl font-bold text-white mb-3",children:"Begin Your Journey"}),g.jsx("p",{className:"text-white/70 text-lg",children:"Connect your Spotify account to start your musical love story"})]}),g.jsx(V.button,{whileHover:{scale:1.05,boxShadow:"0 15px 40px rgba(147, 51, 234, 0.4)"},whileTap:{scale:.95},onClick:n,disabled:e,className:"w-full bg-gradient-to-r from-purple-600 via-blue-600 to-pink-600 hover:from-purple-700 hover:via-blue-700 hover:to-pink-700 text-white font-bold py-5 px-8 rounded-2xl transition-all duration-300 flex items-center justify-center space-x-3 disabled:opacity-50 shadow-2xl",children:e?g.jsx("div",{className:"w-6 h-6 border-2 border-white border-t-transparent rounded-full animate-spin"}):g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"text-lg",children:"Connect with Spotify"}),g.jsx(Nk,{className:"w-6 h-6"})]})}),g.jsx("p",{className:"text-sm text-white/60 text-center mt-6 leading-relaxed",children:"We'll only access your listening history and playlist data to create your personalized musical journey"})]}),g.jsx(V.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:1,duration:.6},className:"text-center mt-12",children:g.jsx("p",{className:"text-white/40 text-sm",children:"Made with 💕 for a special someone"})})]})})},Fb=()=>{var i,s,o,a;const{currentUser:e,partnerUser:t}=Tt(),n=[{title:"Last Listened",description:"See what your partner is listening to right now",icon:jt,href:"/last-listened",color:"from-blue-500 to-purple-600",bgColor:"bg-blue-500/10",borderColor:"border-blue-500/30"},{title:"Mixed Playlist",description:"Create AI-powered playlists blending both your tastes",icon:kg,href:"/mixed-playlist",color:"from-green-500 to-emerald-600",bgColor:"bg-green-500/10",borderColor:"border-green-500/30"},{title:"Memory Lane",description:"Your shared musical journey and memories",icon:an,href:"/memory-lane",color:"from-pink-500 to-rose-600",bgColor:"bg-pink-500/10",borderColor:"border-pink-500/30"}],r=()=>{var l;return(l=e==null?void 0:e.recentlyPlayed)!=null&&l[0]?Ni(e.recentlyPlayed[0].played_at):null};return g.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[g.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"mb-8",children:[g.jsxs("h1",{className:"text-4xl font-bold text-white mb-2",children:["Welcome back, ",g.jsx("span",{className:"gradient-text",children:(i=e==null?void 0:e.user)==null?void 0:i.display_name})]}),g.jsx("p",{className:"text-white/70 text-lg",children:"Ready to explore your musical connection together?"})]}),g.jsx(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"mb-8",children:t?g.jsx("div",{className:"glass-bubble rounded-3xl p-8 border border-spotify-green/30 glow",children:g.jsxs("div",{className:"flex items-center space-x-6",children:[g.jsx("div",{className:"w-16 h-16 bg-gradient-to-br from-spotify-green to-green-600 rounded-2xl flex items-center justify-center",children:g.jsx(Xe,{className:"w-8 h-8 text-white"})}),g.jsxs("div",{children:[g.jsxs("h3",{className:"text-xl font-semibold text-white",children:["Connected with ",(s=t.user)==null?void 0:s.display_name]}),g.jsx("p",{className:"text-white/70",children:"Your musical journey is ready to begin! 💕"})]})]})}):g.jsx("div",{className:"glass-bubble rounded-3xl p-8 border border-orange-500/30",children:g.jsxs("div",{className:"flex items-center space-x-6",children:[g.jsx("div",{className:"w-16 h-16 bg-gradient-to-br from-orange-500 to-red-500 rounded-2xl flex items-center justify-center",children:g.jsx(mc,{className:"w-8 h-8 text-white"})}),g.jsxs("div",{children:[g.jsx("h3",{className:"text-xl font-semibold text-white",children:"Invite your partner"}),g.jsx("p",{className:"text-white/70",children:"Share this link so your partner can connect their Spotify account"}),g.jsx("button",{className:"mt-2 bg-orange-500 hover:bg-orange-600 text-white px-4 py-2 rounded-lg transition-colors",children:"Share Connection Link"})]})]})})}),g.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-8",children:[g.jsx("div",{className:"glass-bubble rounded-2xl p-6",children:g.jsxs("div",{className:"flex items-center space-x-4",children:[g.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-blue-500/30 to-cyan-500/30 rounded-xl flex items-center justify-center",children:g.jsx(pc,{className:"w-6 h-6 text-blue-400"})}),g.jsxs("div",{children:[g.jsx("p",{className:"text-white/70 text-sm",children:"Your last played"}),g.jsx("p",{className:"text-white font-semibold",children:r()||"No recent plays"})]})]})}),g.jsx("div",{className:"glass-bubble rounded-2xl p-6",children:g.jsxs("div",{className:"flex items-center space-x-4",children:[g.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-green-500/30 to-emerald-500/30 rounded-xl flex items-center justify-center",children:g.jsx(Ok,{className:"w-6 h-6 text-green-400"})}),g.jsxs("div",{children:[g.jsx("p",{className:"text-white/70 text-sm",children:"Top tracks analyzed"}),g.jsxs("p",{className:"text-white font-semibold",children:[((o=e==null?void 0:e.topTracks)==null?void 0:o.length)||0," songs"]})]})]})}),g.jsx("div",{className:"glass-bubble rounded-2xl p-6",children:g.jsxs("div",{className:"flex items-center space-x-4",children:[g.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-purple-500/30 to-pink-500/30 rounded-xl flex items-center justify-center",children:g.jsx(lo,{className:"w-6 h-6 text-purple-400"})}),g.jsxs("div",{children:[g.jsx("p",{className:"text-white/70 text-sm",children:"Recently played"}),g.jsxs("p",{className:"text-white font-semibold",children:[((a=e==null?void 0:e.recentlyPlayed)==null?void 0:a.length)||0," tracks"]})]})]})})]}),g.jsx(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},className:"grid md:grid-cols-3 gap-6",children:n.map((l,c)=>g.jsx(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4+c*.1},whileHover:{y:-5,scale:1.02},children:g.jsx(bs,{to:l.href,children:g.jsxs("div",{className:`glass rounded-2xl p-6 h-full border ${l.borderColor} group cursor-pointer transition-all duration-300 hover:shadow-xl`,children:[g.jsx("div",{className:`w-12 h-12 ${l.bgColor} rounded-xl flex items-center justify-center mb-4 group-hover:scale-110 transition-transform duration-300`,children:g.jsx(l.icon,{className:"w-6 h-6 text-white"})}),g.jsx("h3",{className:"text-xl font-semibold text-white mb-2",children:l.title}),g.jsx("p",{className:"text-white/70 text-sm leading-relaxed mb-4",children:l.description}),g.jsx("div",{className:`w-full h-1 bg-gradient-to-r ${l.color} rounded-full opacity-0 group-hover:opacity-100 transition-opacity duration-300`})]})})},l.title))}),(e==null?void 0:e.recentlyPlayed)&&e.recentlyPlayed.length>0&&g.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.6},className:"mt-8",children:[g.jsx("h2",{className:"text-2xl font-bold text-white mb-4",children:"Your Recent Activity"}),g.jsx("div",{className:"glass rounded-2xl p-6",children:g.jsx("div",{className:"space-y-4",children:e.recentlyPlayed.slice(0,3).map((l,c)=>{var d,f;return g.jsxs(V.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.7+c*.1},className:"flex items-center space-x-4 p-3 rounded-lg hover:bg-white/5 transition-colors",children:[g.jsx("img",{src:((d=l.track.album.images[0])==null?void 0:d.url)||"/placeholder-album.png",alt:l.track.album.name,className:"w-12 h-12 rounded-lg object-cover"}),g.jsxs("div",{className:"flex-1",children:[g.jsx("h4",{className:"text-white font-medium",children:l.track.name}),g.jsx("p",{className:"text-white/70 text-sm",children:(f=l.track.artists[0])==null?void 0:f.name})]}),g.jsx("div",{className:"text-white/50 text-sm",children:Ni(l.played_at)})]},l.track.id)})})})]})]})},mh=()=>{const[e]=dx(),t=To(),{setCurrentUser:n,setPartnerUser:r,currentUser:i}=Tt(),[s,o]=b.useState("loading"),[a,l]=b.useState("");b.useEffect(()=>{(async()=>{try{const u=e.get("code"),h=e.get("error");if(console.log("🔍 CallbackPage - Code:",u),console.log("🔍 CallbackPage - Error:",h),h)throw new Error("Spotify authorization was denied");if(!u)throw new Error("No authorization code received");l("Exchanging authorization code..."),console.log("🔍 CallbackPage - Exchanging code for tokens...");const p=await Tb(u);console.log("🔍 CallbackPage - Token data received:",!!p.access_token),l("Fetching your profile..."),console.log("🔍 CallbackPage - Fetching user profile...");const m=await jb(p.access_token);console.log("🔍 CallbackPage - User profile received:",m.display_name),l("Loading your music data...");const[w,y]=await Promise.all([Mb(p.access_token),Nb(p.access_token)]),v={user:m,accessToken:p.access_token,refreshToken:p.refresh_token,isAuthenticated:!0,recentlyPlayed:w,topTracks:y,topArtists:[]};localStorage.setItem("spotify-user",JSON.stringify(v)),i?(r(v),localStorage.setItem("spotify-partner",JSON.stringify(v)),l("Partner connected! Your musical journey begins...")):(n(v),l("Welcome! Setting up your musical journey...")),o("success"),Ne.success(i?"Partner connected successfully!":"Successfully connected to Spotify!",{duration:3e3}),setTimeout(()=>{t("/")},2e3)}catch(u){console.error("🔍 CallbackPage - ERROR:",u),console.error("🔍 CallbackPage - Error details:",{message:u instanceof Error?u.message:"Unknown error",stack:u instanceof Error?u.stack:void 0}),o("error"),l(u instanceof Error?u.message:"An unexpected error occurred"),Ne.error("Failed to connect to Spotify. Please try again."),setTimeout(()=>{t("/")},3e3)}})()},[e,t,n,r,i]);const c=()=>{switch(s){case"loading":return g.jsx(Dk,{className:"w-12 h-12 text-spotify-green animate-spin"});case"success":return g.jsx(Lk,{className:"w-12 h-12 text-green-400"});case"error":return g.jsx(Bk,{className:"w-12 h-12 text-red-400"})}},d=()=>{switch(s){case"loading":return"border-spotify-green/30";case"success":return"border-green-400/30";case"error":return"border-red-400/30"}};return g.jsx("div",{className:"min-h-screen flex items-center justify-center px-4 bg-black",children:g.jsxs(V.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:"glass-fluid rounded-3xl p-10 max-w-md w-full text-center",children:[g.jsx(V.div,{initial:{scale:0},animate:{scale:1},transition:{delay:.2,type:"spring",stiffness:200},className:`w-20 h-20 mx-auto mb-6 rounded-full border-2 flex items-center justify-center ${d()}`,children:c()}),g.jsxs(V.h2,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},className:"text-2xl font-bold text-white mb-4",children:[s==="loading"&&"Connecting...",s==="success"&&"Success!",s==="error"&&"Connection Failed"]}),g.jsx(V.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4},className:"text-white/70 mb-6",children:a}),s==="loading"&&g.jsx(V.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.5},className:"w-full bg-white/10 rounded-full h-2 mb-4",children:g.jsx(V.div,{className:"bg-spotify-green h-2 rounded-full",initial:{width:0},animate:{width:"100%"},transition:{duration:3,ease:"easeInOut"}})}),s==="error"&&g.jsx(V.button,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.5},whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>t("/"),className:"bg-spotify-green hover:bg-spotify-green/90 text-white font-semibold py-3 px-6 rounded-lg transition-all duration-300",children:"Try Again"}),s==="success"&&g.jsx(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.5},className:"text-spotify-green text-sm",children:"Redirecting you to your musical journey..."})]})})},zb=()=>{var u,h;const{currentUser:e,partnerUser:t,currentTrack:n,isPlaying:r,setCurrentTrack:i,setIsPlaying:s}=Tt(),[o,a]=b.useState(!1),[l,c]=b.useState(null),d=async(p,m)=>{var w,y;if(!(e!=null&&e.accessToken)){Ne.error("Not authenticated with Spotify");return}try{a(!0),c(m),r&&l===m?(await Db(e.accessToken),s(!1),i(null),c(null)):(await Lb(e.accessToken,p),s(!0),i(((y=(w=e.recentlyPlayed)==null?void 0:w.find(v=>v.track.id===m))==null?void 0:y.track)||null)),Ne.success(r&&l===m?"Paused":"Now playing")}catch(v){console.error("Playback error:",v),Ne.error("Failed to play track. Make sure Spotify is open on your device.")}finally{a(!1)}},f=({user:p,title:m,isPartner:w=!1})=>{var v,x;if(!((v=p==null?void 0:p.recentlyPlayed)!=null&&v.length))return g.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"glass rounded-2xl p-8 text-center",children:[g.jsx(jt,{className:"w-16 h-16 mx-auto mb-4 text-white/30"}),g.jsx("h3",{className:"text-xl font-semibold text-white mb-2",children:"No recent activity"}),g.jsxs("p",{className:"text-white/70",children:[w?"Your partner":"You"," haven't played any music recently"]})]});const y=p.recentlyPlayed[0];return g.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"glass rounded-2xl p-6",children:[g.jsxs("div",{className:"flex items-center space-x-4 mb-6",children:[g.jsx("div",{className:`w-12 h-12 rounded-full flex items-center justify-center ${w?"bg-gradient-to-br from-pink-500 to-purple-600":"bg-gradient-to-br from-blue-500 to-cyan-600"}`,children:g.jsx(lo,{className:"w-6 h-6 text-white"})}),g.jsxs("div",{children:[g.jsx("h2",{className:"text-2xl font-bold text-white",children:m}),g.jsxs("p",{className:"text-white/70",children:["Last played: ",Ni(y.played_at)]})]})]}),g.jsx(V.div,{whileHover:{scale:1.02},className:"bg-white/5 rounded-xl p-6 mb-6 border border-white/10",children:g.jsxs("div",{className:"flex items-center space-x-6",children:[g.jsxs("div",{className:"relative",children:[g.jsx("img",{src:((x=y.track.album.images[0])==null?void 0:x.url)||"/placeholder-album.png",alt:y.track.album.name,className:"w-20 h-20 rounded-lg object-cover"}),r&&l===y.track.id&&g.jsx("div",{className:"absolute inset-0 bg-spotify-green/20 rounded-lg flex items-center justify-center",children:g.jsx(Ik,{className:"w-6 h-6 text-spotify-green"})})]}),g.jsxs("div",{className:"flex-1",children:[g.jsx("h3",{className:"text-xl font-semibold text-white mb-1",children:y.track.name}),g.jsx("p",{className:"text-white/70 mb-2",children:y.track.artists.map(S=>S.name).join(", ")}),g.jsxs("p",{className:"text-white/50 text-sm",children:[y.track.album.name," • ",Ng(y.track.duration_ms)]})]}),g.jsxs("div",{className:"flex items-center space-x-3",children:[g.jsx("button",{onClick:()=>d(y.track.external_urls.spotify,y.track.id),disabled:o,className:`w-12 h-12 rounded-full flex items-center justify-center transition-all duration-300 ${r&&l===y.track.id?"bg-red-500 hover:bg-red-600 text-white":"bg-spotify-green hover:bg-spotify-green/90 text-white"} disabled:opacity-50`,children:o&&l===y.track.id?g.jsx("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"}):r&&l===y.track.id?g.jsx(Vk,{className:"w-5 h-5"}):g.jsx(dh,{className:"w-5 h-5 ml-0.5"})}),g.jsx("a",{href:y.track.external_urls.spotify,target:"_blank",rel:"noopener noreferrer",className:"w-10 h-10 rounded-full bg-white/10 hover:bg-white/20 flex items-center justify-center transition-colors",children:g.jsx(Sg,{className:"w-4 h-4 text-white"})})]})]})}),g.jsxs("div",{children:[g.jsxs("h3",{className:"text-lg font-semibold text-white mb-4 flex items-center space-x-2",children:[g.jsx(pc,{className:"w-5 h-5"}),g.jsx("span",{children:"Recent History"})]}),g.jsx("div",{className:"space-y-3",children:p.recentlyPlayed.slice(0,5).map((S,k)=>{var P,C;return g.jsxs(V.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:k*.1},className:"flex items-center space-x-4 p-3 rounded-lg hover:bg-white/5 transition-colors group",children:[g.jsx("img",{src:((P=S.track.album.images[0])==null?void 0:P.url)||"/placeholder-album.png",alt:S.track.album.name,className:"w-12 h-12 rounded-lg object-cover"}),g.jsxs("div",{className:"flex-1",children:[g.jsx("h4",{className:"text-white font-medium group-hover:text-spotify-green transition-colors",children:S.track.name}),g.jsx("p",{className:"text-white/70 text-sm",children:(C=S.track.artists[0])==null?void 0:C.name})]}),g.jsx("div",{className:"text-white/50 text-sm",children:Ni(S.played_at)}),g.jsx("button",{onClick:()=>d(S.track.external_urls.spotify,S.track.id),disabled:o,className:"opacity-0 group-hover:opacity-100 w-8 h-8 rounded-full bg-spotify-green hover:bg-spotify-green/90 flex items-center justify-center transition-all disabled:opacity-50",children:g.jsx(dh,{className:"w-4 h-4 text-white ml-0.5"})})]},S.track.id)})})]})]})};return g.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[g.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"mb-8",children:[g.jsxs("h1",{className:"text-4xl font-bold text-white mb-2 flex items-center space-x-3",children:[g.jsx(Xe,{className:"w-10 h-10 text-spotify-green"}),g.jsx("span",{children:"What's Playing"})]}),g.jsx("p",{className:"text-white/70 text-lg",children:"Discover what you and your partner are listening to right now"})]}),g.jsxs("div",{className:"grid lg:grid-cols-2 gap-8",children:[e&&g.jsx(f,{user:e,title:`${(u=e.user)==null?void 0:u.display_name}'s Music`,isPartner:!1}),t&&g.jsx(f,{user:t,title:`${(h=t.user)==null?void 0:h.display_name}'s Music`,isPartner:!0}),!t&&g.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"glass rounded-2xl p-8 text-center",children:[g.jsx(Xe,{className:"w-16 h-16 mx-auto mb-4 text-pink-400"}),g.jsx("h3",{className:"text-xl font-semibold text-white mb-2",children:"Waiting for your partner"}),g.jsx("p",{className:"text-white/70 mb-4",children:"Invite your partner to connect their Spotify account to see their music"}),g.jsx("button",{className:"bg-pink-500 hover:bg-pink-600 text-white px-6 py-3 rounded-lg transition-colors",children:"Send Invitation"})]})]})]})},Ob=()=>{const{currentUser:e,partnerUser:t,mixedPlaylists:n,addMixedPlaylist:r,removeMixedPlaylist:i}=Tt(),[s,o]=b.useState(!1),[a,l]=b.useState(!1),[c,d]=b.useState(null),f=async()=>{var w,y;if(!(e!=null&&e.topTracks)||!(t!=null&&t.topTracks)){Ne.error("Both users need to have their music data loaded");return}o(!0);try{await new Promise(x=>setTimeout(x,2e3));const v=Rb(e.topTracks,t.topTracks,"Our Perfect Mix");d({id:Date.now().toString(),name:"Our Perfect Mix",description:`A beautiful blend of ${(w=e.user)==null?void 0:w.display_name} and ${(y=t.user)==null?void 0:y.display_name}'s musical tastes`,tracks:v,createdAt:new Date,createdBy:"AI Magic ✨"}),Ne.success("Playlist generated successfully!")}catch(v){console.error("Playlist generation error:",v),Ne.error("Failed to generate playlist")}finally{o(!1)}},u=async()=>{if(!c||!(e!=null&&e.accessToken)||!(e!=null&&e.user)){Ne.error("Unable to create playlist");return}l(!0);try{const w=await _b(e.accessToken,e.user.id,c.name,c.description),y=c.tracks.map(v=>v.external_urls.spotify);await Ab(e.accessToken,w.id,y),r({...c,spotifyId:w.id,spotifyUrl:w.external_urls.spotify}),Ne.success("Playlist created on Spotify!"),d(null)}catch(w){console.error("Spotify playlist creation error:",w),Ne.error("Failed to create playlist on Spotify")}finally{l(!1)}},h=()=>{c&&(r(c),d(null),Ne.success("Playlist saved locally!"))},p=({playlist:w,isNew:y=!1})=>g.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},whileHover:{scale:1.02},className:`glass rounded-2xl p-6 ${y?"border-spotify-green/50":"border-white/10"}`,children:[g.jsxs("div",{className:"flex items-start justify-between mb-4",children:[g.jsxs("div",{className:"flex items-center space-x-4",children:[g.jsx("div",{className:`w-16 h-16 rounded-xl flex items-center justify-center ${y?"bg-gradient-to-br from-spotify-green to-green-600":"bg-gradient-to-br from-purple-500 to-pink-500"}`,children:y?g.jsx(an,{className:"w-8 h-8 text-white"}):g.jsx(jt,{className:"w-8 h-8 text-white"})}),g.jsxs("div",{children:[g.jsx("h3",{className:"text-xl font-semibold text-white",children:w.name}),g.jsx("p",{className:"text-white/70 text-sm",children:w.description}),g.jsxs("p",{className:"text-white/50 text-xs mt-1",children:["Created ",y?"just now":new Date(w.createdAt).toLocaleDateString()," • ",w.tracks.length," tracks"]})]})]}),g.jsxs("div",{className:"flex items-center space-x-2",children:[w.spotifyUrl&&g.jsx("a",{href:w.spotifyUrl,target:"_blank",rel:"noopener noreferrer",className:"w-8 h-8 rounded-full bg-white/10 hover:bg-white/20 flex items-center justify-center transition-colors",children:g.jsx(Sg,{className:"w-4 h-4 text-white"})}),!y&&g.jsx("button",{onClick:()=>i(w.id),className:"w-8 h-8 rounded-full bg-red-500/20 hover:bg-red-500/30 flex items-center justify-center transition-colors",children:g.jsx(zk,{className:"w-4 h-4 text-red-400"})})]})]}),g.jsxs("div",{className:"space-y-3 max-h-64 overflow-y-auto",children:[w.tracks.slice(0,5).map((v,x)=>{var S,k;return g.jsxs(V.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:x*.1},className:"flex items-center space-x-3 p-2 rounded-lg hover:bg-white/5 transition-colors",children:[g.jsx("img",{src:((S=v.album.images[0])==null?void 0:S.url)||"/placeholder-album.png",alt:v.album.name,className:"w-10 h-10 rounded-lg object-cover"}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsx("h4",{className:"text-white font-medium truncate",children:v.name}),g.jsx("p",{className:"text-white/70 text-sm truncate",children:(k=v.artists[0])==null?void 0:k.name})]}),g.jsx("div",{className:"text-white/50 text-sm",children:Ng(v.duration_ms)})]},v.id)}),w.tracks.length>5&&g.jsxs("div",{className:"text-center text-white/50 text-sm py-2",children:["+",w.tracks.length-5," more tracks"]})]}),y&&g.jsxs("div",{className:"flex items-center space-x-3 mt-6 pt-4 border-t border-white/10",children:[g.jsx("button",{onClick:u,disabled:a,className:"flex-1 bg-spotify-green hover:bg-spotify-green/90 text-white font-semibold py-3 px-4 rounded-lg transition-colors flex items-center justify-center space-x-2 disabled:opacity-50",children:a?g.jsx("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"}):g.jsxs(g.Fragment,{children:[g.jsx(mc,{className:"w-4 h-4"}),g.jsx("span",{children:"Create on Spotify"})]})}),g.jsx("button",{onClick:h,className:"px-4 py-3 bg-white/10 hover:bg-white/20 text-white rounded-lg transition-colors",children:"Save Locally"})]})]}),m=(e==null?void 0:e.topTracks)&&(t==null?void 0:t.topTracks);return g.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[g.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"mb-8",children:[g.jsxs("h1",{className:"text-4xl font-bold text-white mb-2 flex items-center space-x-3",children:[g.jsx(an,{className:"w-10 h-10 text-spotify-green"}),g.jsx("span",{children:"Mixed Playlists"})]}),g.jsx("p",{className:"text-white/70 text-lg",children:"AI-powered playlists that perfectly blend your musical tastes together"})]}),m&&g.jsx(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"mb-8",children:g.jsxs("div",{className:"glass rounded-2xl p-8 text-center border border-spotify-green/30",children:[g.jsx("div",{className:"w-16 h-16 mx-auto mb-4 bg-gradient-to-br from-spotify-green to-green-600 rounded-full flex items-center justify-center",children:g.jsx($k,{className:"w-8 h-8 text-white"})}),g.jsx("h2",{className:"text-2xl font-bold text-white mb-2",children:"Create Your Perfect Mix"}),g.jsx("p",{className:"text-white/70 mb-6 max-w-2xl mx-auto",children:"Our AI analyzes both your music tastes and creates a playlist that represents your unique musical connection"}),g.jsx("button",{onClick:f,disabled:s,className:"bg-gradient-to-r from-spotify-green to-green-600 hover:from-spotify-green/90 hover:to-green-600/90 text-white font-semibold py-4 px-8 rounded-xl transition-all duration-300 flex items-center space-x-3 mx-auto disabled:opacity-50",children:s?g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"w-5 h-5 border-2 border-white border-t-transparent rounded-full animate-spin"}),g.jsx("span",{children:"Analyzing your music..."})]}):g.jsxs(g.Fragment,{children:[g.jsx(an,{className:"w-5 h-5"}),g.jsx("span",{children:"Generate Mixed Playlist"})]})}),g.jsxs("div",{className:"mt-4 text-white/50 text-sm",children:["Analyzing ",e.topTracks.length+t.topTracks.length," tracks from both users"]})]})}),c&&g.jsxs(V.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:"mb-8",children:[g.jsx("h2",{className:"text-2xl font-bold text-white mb-4",children:"✨ Your New Playlist"}),g.jsx(p,{playlist:c,isNew:!0})]}),n.length>0&&g.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},children:[g.jsx("h2",{className:"text-2xl font-bold text-white mb-4",children:"Your Mixed Playlists"}),g.jsx("div",{className:"grid gap-6",children:n.map(w=>g.jsx(p,{playlist:w},w.id))})]}),!m&&g.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"glass rounded-2xl p-12 text-center",children:[g.jsx(Xe,{className:"w-16 h-16 mx-auto mb-4 text-pink-400"}),g.jsx("h3",{className:"text-xl font-semibold text-white mb-2",children:t?"Loading music data":"Waiting for your partner"}),g.jsx("p",{className:"text-white/70",children:t?"We need to analyze both your music tastes to create the perfect mixed playlist":"Invite your partner to connect their Spotify account to start creating mixed playlists"})]}),n.length===0&&m&&!c&&g.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"glass rounded-2xl p-12 text-center",children:[g.jsx(jt,{className:"w-16 h-16 mx-auto mb-4 text-white/30"}),g.jsx("h3",{className:"text-xl font-semibold text-white mb-2",children:"No playlists yet"}),g.jsx("p",{className:"text-white/70",children:"Create your first mixed playlist to start your musical journey together"})]})]})},Ib=()=>{const{currentUser:e,partnerUser:t,memoryLane:n,addMemoryLaneItem:r}=Tt(),[i,s]=b.useState(!1),[o,a]=b.useState({title:"",description:"",type:"milestone"});b.useEffect(()=>{var u,h,p,m,w,y,v,x,S,k,P,C;e&&t&&n.length===0&&[{id:"1",type:"milestone",title:"First Musical Connection",description:`${(u=e.user)==null?void 0:u.display_name} and ${(h=t.user)==null?void 0:h.display_name} discovered their shared love for music`,date:new Date(Date.now()-6048e5),users:[((p=e.user)==null?void 0:p.id)||"",((m=t.user)==null?void 0:m.id)||""]},{id:"2",type:"shared_track",title:"Shared Love for This Song",description:`Both of you have been listening to "${((y=(w=e.recentlyPlayed)==null?void 0:w[0])==null?void 0:y.track.name)||"Your favorite track"}" recently`,track:(x=(v=e.recentlyPlayed)==null?void 0:v[0])==null?void 0:x.track,date:new Date(Date.now()-2592e5),users:[((S=e.user)==null?void 0:S.id)||"",((k=t.user)==null?void 0:k.id)||""]},{id:"3",type:"playlist_created",title:"Our First Mixed Playlist",description:"Created a beautiful blend of your musical tastes",date:new Date(Date.now()-864e5),users:[((P=e.user)==null?void 0:P.id)||"",((C=t.user)==null?void 0:C.id)||""]}].forEach(N=>{r(N)})},[e,t,n.length,r]);const l=()=>{var h,p;if(!o.title.trim()||!o.description.trim()){Ne.error("Please fill in both title and description");return}const u={id:Date.now().toString(),...o,date:new Date,users:[((h=e==null?void 0:e.user)==null?void 0:h.id)||"",((p=t==null?void 0:t.user)==null?void 0:p.id)||""]};r(u),a({title:"",description:"",type:"milestone"}),s(!1),Ne.success("Memory added to your journey!")},c=u=>{switch(u){case"shared_track":return g.jsx(jt,{className:"w-5 h-5"});case"playlist_created":return g.jsx(an,{className:"w-5 h-5"});case"milestone":return g.jsx(Fk,{className:"w-5 h-5"});default:return g.jsx(Xe,{className:"w-5 h-5"})}},d=u=>{switch(u){case"shared_track":return"from-blue-500 to-cyan-500";case"playlist_created":return"from-purple-500 to-pink-500";case"milestone":return"from-yellow-500 to-orange-500";default:return"from-pink-500 to-red-500"}},f=({memory:u,index:h})=>{var p,m;return g.jsxs(V.div,{initial:{opacity:0,x:-50},animate:{opacity:1,x:0},transition:{delay:h*.1},className:"relative",children:[h<n.length-1&&g.jsx("div",{className:"absolute left-8 top-16 w-0.5 h-full bg-gradient-to-b from-white/20 to-transparent"}),g.jsxs("div",{className:"flex items-start space-x-6",children:[g.jsx("div",{className:`w-16 h-16 rounded-full bg-gradient-to-br ${d(u.type)} flex items-center justify-center relative z-10`,children:c(u.type)}),g.jsxs(V.div,{whileHover:{scale:1.02},className:"glass rounded-2xl p-6 flex-1 border border-white/10",children:[g.jsxs("div",{className:"flex items-start justify-between mb-4",children:[g.jsxs("div",{children:[g.jsx("h3",{className:"text-xl font-semibold text-white mb-2",children:u.title}),g.jsx("p",{className:"text-white/70 leading-relaxed",children:u.description})]}),g.jsxs("div",{className:"flex items-center space-x-2 text-white/50 text-sm",children:[g.jsx(_k,{className:"w-4 h-4"}),g.jsx("span",{children:Ni(u.date)})]})]}),u.track&&g.jsxs("div",{className:"flex items-center space-x-4 p-4 bg-white/5 rounded-lg",children:[g.jsx("img",{src:((p=u.track.album.images[0])==null?void 0:p.url)||"/placeholder-album.png",alt:u.track.album.name,className:"w-12 h-12 rounded-lg object-cover"}),g.jsxs("div",{className:"flex-1",children:[g.jsx("h4",{className:"text-white font-medium",children:u.track.name}),g.jsx("p",{className:"text-white/70 text-sm",children:(m=u.track.artists[0])==null?void 0:m.name})]}),g.jsx("button",{className:"w-8 h-8 rounded-full bg-spotify-green hover:bg-spotify-green/90 flex items-center justify-center transition-colors",children:g.jsx(jt,{className:"w-4 h-4 text-white"})})]}),g.jsxs("div",{className:"flex items-center justify-between mt-4 pt-4 border-t border-white/10",children:[g.jsxs("div",{className:"flex items-center space-x-4 text-white/50 text-sm",children:[g.jsxs("div",{className:"flex items-center space-x-1",children:[g.jsx(bg,{className:"w-4 h-4"}),g.jsx("span",{children:"Both of you"})]}),g.jsxs("div",{className:"flex items-center space-x-1",children:[g.jsx(pc,{className:"w-4 h-4"}),g.jsx("span",{children:new Date(u.date).toLocaleDateString()})]})]}),g.jsx("button",{className:"w-8 h-8 rounded-full bg-white/10 hover:bg-white/20 flex items-center justify-center transition-colors",children:g.jsx(Xe,{className:"w-4 h-4 text-white"})})]})]})]})]})};return g.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[g.jsx(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"mb-8",children:g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{children:[g.jsxs("h1",{className:"text-4xl font-bold text-white mb-2 flex items-center space-x-3",children:[g.jsx(Xe,{className:"w-10 h-10 text-pink-400"}),g.jsx("span",{children:"Memory Lane"})]}),g.jsx("p",{className:"text-white/70 text-lg",children:"Your beautiful musical journey together"})]}),g.jsxs(V.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>s(!0),className:"bg-gradient-to-r from-pink-500 to-red-500 hover:from-pink-600 hover:to-red-600 text-white font-semibold py-3 px-6 rounded-xl transition-all duration-300 flex items-center space-x-2",children:[g.jsx(mc,{className:"w-5 h-5"}),g.jsx("span",{children:"Add Memory"})]})]})}),i&&g.jsx(V.div,{initial:{opacity:0},animate:{opacity:1},className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 p-4",onClick:()=>s(!1),children:g.jsxs(V.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},onClick:u=>u.stopPropagation(),className:"glass rounded-2xl p-8 max-w-md w-full",children:[g.jsx("h3",{className:"text-2xl font-bold text-white mb-6",children:"Add a New Memory"}),g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{children:[g.jsx("label",{className:"block text-white/70 text-sm font-medium mb-2",children:"Title"}),g.jsx("input",{type:"text",value:o.title,onChange:u=>a({...o,title:u.target.value}),className:"w-full px-4 py-3 bg-white/10 border border-white/20 rounded-lg text-white placeholder-white/50 focus:outline-none focus:border-spotify-green",placeholder:"What's this memory about?"})]}),g.jsxs("div",{children:[g.jsx("label",{className:"block text-white/70 text-sm font-medium mb-2",children:"Description"}),g.jsx("textarea",{value:o.description,onChange:u=>a({...o,description:u.target.value}),className:"w-full px-4 py-3 bg-white/10 border border-white/20 rounded-lg text-white placeholder-white/50 focus:outline-none focus:border-spotify-green h-24 resize-none",placeholder:"Tell the story of this memory..."})]}),g.jsxs("div",{children:[g.jsx("label",{className:"block text-white/70 text-sm font-medium mb-2",children:"Type"}),g.jsxs("select",{value:o.type,onChange:u=>a({...o,type:u.target.value}),className:"w-full px-4 py-3 bg-white/10 border border-white/20 rounded-lg text-white focus:outline-none focus:border-spotify-green",children:[g.jsx("option",{value:"milestone",children:"Milestone"}),g.jsx("option",{value:"shared_track",children:"Shared Track"}),g.jsx("option",{value:"playlist_created",children:"Playlist Created"})]})]})]}),g.jsxs("div",{className:"flex items-center space-x-3 mt-6",children:[g.jsx("button",{onClick:l,className:"flex-1 bg-spotify-green hover:bg-spotify-green/90 text-white font-semibold py-3 px-4 rounded-lg transition-colors",children:"Add Memory"}),g.jsx("button",{onClick:()=>s(!1),className:"px-4 py-3 bg-white/10 hover:bg-white/20 text-white rounded-lg transition-colors",children:"Cancel"})]})]})}),g.jsx("div",{className:"space-y-8",children:n.length>0?n.map((u,h)=>g.jsx(f,{memory:u,index:h},u.id)):g.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"glass rounded-2xl p-12 text-center",children:[g.jsx(Ak,{className:"w-16 h-16 mx-auto mb-4 text-white/30"}),g.jsx("h3",{className:"text-xl font-semibold text-white mb-2",children:"No memories yet"}),g.jsx("p",{className:"text-white/70 mb-6",children:"Start creating beautiful musical memories together"}),g.jsx("button",{onClick:()=>s(!0),className:"bg-gradient-to-r from-pink-500 to-red-500 hover:from-pink-600 hover:to-red-600 text-white font-semibold py-3 px-6 rounded-xl transition-all duration-300",children:"Create First Memory"})]})}),n.length>0&&g.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.5},className:"mt-12 grid grid-cols-1 md:grid-cols-3 gap-6",children:[g.jsxs("div",{className:"glass rounded-2xl p-6 text-center",children:[g.jsx("div",{className:"w-12 h-12 mx-auto mb-3 bg-gradient-to-br from-pink-500 to-red-500 rounded-full flex items-center justify-center",children:g.jsx(Xe,{className:"w-6 h-6 text-white"})}),g.jsx("h4",{className:"text-2xl font-bold text-white mb-1",children:n.length}),g.jsx("p",{className:"text-white/70 text-sm",children:"Memories Created"})]}),g.jsxs("div",{className:"glass rounded-2xl p-6 text-center",children:[g.jsx("div",{className:"w-12 h-12 mx-auto mb-3 bg-gradient-to-br from-blue-500 to-cyan-500 rounded-full flex items-center justify-center",children:g.jsx(jt,{className:"w-6 h-6 text-white"})}),g.jsx("h4",{className:"text-2xl font-bold text-white mb-1",children:n.filter(u=>u.type==="shared_track").length}),g.jsx("p",{className:"text-white/70 text-sm",children:"Shared Tracks"})]}),g.jsxs("div",{className:"glass rounded-2xl p-6 text-center",children:[g.jsx("div",{className:"w-12 h-12 mx-auto mb-3 bg-gradient-to-br from-purple-500 to-pink-500 rounded-full flex items-center justify-center",children:g.jsx(an,{className:"w-6 h-6 text-white"})}),g.jsx("h4",{className:"text-2xl font-bold text-white mb-1",children:n.filter(u=>u.type==="playlist_created").length}),g.jsx("p",{className:"text-white/70 text-sm",children:"Playlists Created"})]})]})]})};function $b(){const{currentUser:e,partnerUser:t,isLoading:n}=Tt(),r=yn();console.log("🔍 App - Current location:",r.pathname),b.useEffect(()=>{const s=localStorage.getItem("spotify-user"),o=localStorage.getItem("spotify-partner");if(s)try{const a=JSON.parse(s);Tt.getState().setCurrentUser(a)}catch(a){console.error("Failed to parse stored user data:",a),localStorage.removeItem("spotify-user")}if(o)try{const a=JSON.parse(o);Tt.getState().setPartnerUser(a)}catch(a){console.error("Failed to parse stored partner data:",a),localStorage.removeItem("spotify-partner")}},[]);const i=(e==null?void 0:e.isAuthenticated)||!1;return t!=null&&t.isAuthenticated,n?g.jsxs("div",{className:"min-h-screen flex items-center justify-center relative",children:[g.jsx(uh,{}),g.jsxs(V.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},className:"glass-fluid rounded-3xl p-10 flex flex-col items-center space-y-6 relative z-10",children:[g.jsx("div",{className:"w-16 h-16 border-4 border-gradient-to-r from-purple-500 to-pink-500 border-t-transparent rounded-full animate-spin"}),g.jsx("p",{className:"text-white font-medium text-lg",children:"Loading your musical journey..."})]})]}):g.jsxs("div",{className:"min-h-screen relative overflow-hidden",children:[g.jsx(uh,{}),g.jsxs("div",{className:"relative z-10",children:[i&&g.jsx(bb,{}),g.jsxs(Jv,{children:[g.jsx(Ot,{path:"/",element:i?g.jsx(Fb,{}):g.jsx(Vb,{})}),g.jsx(Ot,{path:"/callback",element:g.jsx(mh,{})}),g.jsx(Ot,{path:"/callback.html",element:g.jsx(mh,{})}),i&&g.jsxs(g.Fragment,{children:[g.jsx(Ot,{path:"/last-listened",element:g.jsx(zb,{})}),g.jsx(Ot,{path:"/mixed-playlist",element:g.jsx(Ob,{})}),g.jsx(Ot,{path:"/memory-lane",element:g.jsx(Ib,{})})]}),g.jsx(Ot,{path:"*",element:g.jsx(Xv,{to:"/",replace:!0})})]})]})]})}_a.createRoot(document.getElementById("root")).render(g.jsx(Ai.StrictMode,{children:g.jsxs(ax,{children:[g.jsx($b,{}),g.jsx(Jx,{position:"top-right",toastOptions:{duration:4e3,style:{background:"rgba(255, 255, 255, 0.1)",backdropFilter:"blur(20px)",border:"1px solid rgba(255, 255, 255, 0.2)",color:"#fff"}}})]})}));
|